Connecting to the Surpass API v2
Requests to the Surpass API must be authenticated. This is akin to logging in with user credentials. However, the user specified in the request must also have the Surpass permissions required to authorise the action taken.
This article explains how to connect to the Surpass API v2 and which permissions are required to successfully call each API.
In this section
Authentication
If you are logged in to and are using the Surpass API v2 test console to send requests to the Surpass API, a token is sent with each request to the Surpass API to authenticate the request.
To authenticate requests sent to Surpass APIs from a different HTTP client, send basic authentication details in an authorization header. This is documented in the parameters tables of the reference documentation as follows:
Name |
Parameter |
Input |
Description |
---|---|---|---|
authorization |
header MANDATORY |
Basic {credentials} |
Basic authentication details must be passed to authorise the user’s request, where {credentials} is a Base64 encoded username:password string. |
Connection to the Surpass API can also be authenticated using SAML if using Single Sign-On (SSO) to access Surpass. A SAML header parameter is passed in the request, with its value generated using the credentials specified in the SSO setup. For more information on SSO, read Single Sign-On.
Authorisation
For requests sent to Surpass APIs to be authorised, the user sending the request must have the requisite Surpass permission(s). Each part of the system has a unique permission, which acts as a key.
Users can also be assigned roles at subject, centre, and site-level. If the user making the request only has subject or centre-level access, then whatever it is they are requesting needs to be in the relevant subject and/or centre. For more information on roles and permissions in Surpass, read About roles and permissions.
Requisite permissions
Expand the following section for tables detailing which permission is needed to successfully call each Surpass API.
Item Authoring
API |
Permission |
---|---|
BasicPage API |
The requisite permissions for this API vary as follows:
|
Folder API |
The requisite permissions for this API vary as follows:
|
Item API |
The requisite permissions for this API vary as follows:
|
ItemList API |
The requisite permissions for this API vary as follows:
|
ItemSet API |
The requisite permissions for this API vary as follows:
|
ItemTagValue API |
Item Authoring > Edit permissions for items at the corresponding status. |
LanguageVariant API |
The requisite permissions for this API vary as follows:
|
Media API |
The requisite permissions for this API vary as follows:
|
MediaGroup API |
The requisite permissions for this API vary as follows:
|
Tasks
API |
Permission |
---|---|
Task API |
The requisite permissions for this API vary as follows:
|
TaskAttachment API |
The requisite permissions for this API vary as follows:
|
Test Creation
API |
Permission |
---|---|
Test API |
Create Tests |
TestForm API |
Create Tests |
TestProfile API |
Manage Test Profiles |
Test Administration
API |
Permission |
---|---|
SummaryResult API |
Results |
Result API |
Results |
TestSchedule API |
Schedule Test > Edit |
TestSession API |
The requisite permissions for this API vary as follows:
|
Reporting
API |
Permission |
---|---|
AnalyticsResult API |
Results and View Reports |
AnalyticsScaleScoreMapping API |
View Reports |
CustomReport API |
Manage Custom Report Template |
CustomReportGeneration API |
Generate Custom Report |
HistoricalResult API |
View Reports |
RescoringRule API |
Rescore Candidate Script |
Report API |
View Reports |
ScaleScoreMapping API |
View Reports |
Setup
API |
Permission |
---|---|
Candidate API |
Manage Candidates |
Centre API |
Manage Centres |
CentreSubjectAssociation API |
Manage Centres and Manage Subjects |
Country API |
N/A |
County API |
N/A |
Permission API |
Manage Users |
Subject API |
Manage Subjects |
Tag Category API |
Manage Subjects |
TagCollectionGroup API |
Manage Subjects |
TagGroup API |
Manage Subjects |
TagValue API |
Manage Subjects |
User API |
Manage Users |
UserPermission API |
Manage Users |
WorkflowStatus API |
N/A |
Misc.
API |
Permission |
---|---|
Token API |
Create Keycode Token
NOTE: This permission is not available in the Surpass UI. If you would like more information about this permission, contact your Surpass Customer Success Manager.
|
Further reading
Now you are connected to the Surpass API v2, read the following articles to learn more: