Connecting to the SecureMarker OAPI

Requests to the SecureMarker OAPIs must be authenticated using user credentials (basic authentication).

This article explains how to connect to the SecureMarker OAPIs and which permissions are required to successfully call each API.

In this section

Authentication

If you are using the SecureMarker OAPI Swagger console to send requests to the SecureMarker OAPI, select Authorize.

Your browser will prompt you to enter your credentials. A token is generated from your credentials and sent with each request to the SecureMarker OAPI in order to authenticate the requests.

NOTE: If a request does not contain valid authentication details, a 401 error is returned.

To authenticate requests sent to SecureMarker OAPIs 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.

TIP: We recommend creating a dedicated integration user that can be used when calling the SecureMarker OAPI using basic authentication. This is a good idea even if you are only testing the OAPI as it enables you to work in the SecureMarker UI and OAPI simultaneously without being logged out of the UI after each request to the OAPI.

Authorisation

For requests sent to SecureMarker APIs to be authorised, the user sending the request must have the requisite SecureMarker permission(s). Each part of the system has a unique permission, which acts as a key.

In SecureMarker, a “role” is a predefined set of permissions that grant access to specific areas of the system. Roles can be assigned at exam level or global level. For more information on roles and permissions in SecureMarker, read About the Roles screen in SecureMarker.

NOTE: If the user sending a request does not have the requisite permissions, an error is returned.

Requisite permissions

Expand the following section for tables detailing which permission is needed to successfully call each SecureMarker OAPI.

Further reading

Now you are connected to the SecureMarker OAPI, read the following articles to learn more: