Getting started with the SecureMarker OAPI
The SecureMarker OAPI uses standard HTTP protocols to send and retrieve data. Requests can be made to each SecureMarker OAPI from a Surpass instance’s corresponding SecureMarker Swagger console, or any other HTTP client.
This article explains what makes up a request to and a response from the SecureMarker OAPI, and how to access your SecureMarker OAPI Swagger console.
In this section
What makes up a request?
A request to the SecureMarker OAPI is made up of header, query, or path parameters, along with properties in a request body if required, sent to an endpoint with a specified method.
The methods available for the Surpass OAPI are:
Requests can be sent from any HTTP client. However, authorisation details must also be passed in an authorization header parameter. Read Connecting to the SecureMarker OAPI for more information on authorising and authenticating requests to the SecureMarker OAPI.
The SecureMarker OAPI can accept data in JSON or XML format. You must specify the data type by sending a content-type header parameter with the value application/json or application/xml, and the data length using a content-length header parameter.
Sample request
Expand the following section for a sample request.
What makes up a response?
A response from the SecureMarker OAPI contains a standard HTTP status code to indicate the success or failure of the request, header parameters, and a response body containing any relevant information.
If sent with authenticated authorisation details, the HTTP status code of a successful call is 200. An unsuccessful request may return a HTTP status code of 404, for example, and an ErrorCode property in the response body that indicates what the issue is.
A response body is always returned in the response to a successful request. In the case of successful GET requests, the requested information is returned in the response body.
The SecureMarker OAPI can return data in JSON or XML format. By default, JSON is returned. To return XML data, send an accept header parameter with the value application/xml.
Sample response
Expand the following section for a sample response.
SecureMarker OAPI Swagger console
Each instance of SecureMarker has an OAPI Swagger console. To access it, add /swagger/ui/index to your SecureMarker instance’s URL.
SecureMarker/swagger/ui/index
The Swagger console lets you test the SecureMarker OAPI by directly sending a HTTPS request to any of the available endpoints for your instance of Surpass. It automatically generates the endpoint URL, header parameters, and request body, leaving you to complete/amend any parameters and properties as needed.
For more information on the SecureMarker OAPI Swagger console, read Using the SecureMarker OAPI Swagger console.
Further reading
Now you have got started with the SecureMarker OAPI, read the following articles to learn more: