In Surpass, every item is assigned a status that indicates its progress along the workflow. Every item starts at Draft and must be set to Live before being able to be added to a test form. Users may only have access to certain workflow statuses depending on their permissions and you can create custom workflow statuses.
The Workflow API resource is used to list workflow statuses.
This article explains what calls can be made to the Surpass API using the WorkflowStatus resource.
Import this API into your Postman Workspace
In This Article
Listing workflow statuses
get/api/v2/WorkflowStatus
Send a request to the endpoint to retrieve a list of workflow statuses. Refer to the available parameters to influence the response. No request body is required.
Parameters
Parameters are passed with the endpoint to influence the response. Header parameters are included in the request header. Path parameters are extensions of the endpoint, and query parameters follow ? after any path parameters.
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.
accept
header
OPTIONAL
application/json or application/xml
Determines data format of the response, which can be either JSON or XML.
Sample response
If successful, the HTTP status code will be 200 and the response body will contain the information in either JSON or XML format as requested.
NOTE: This sample response contains all of the default workflow statuses in Surpass. Any more workflow statuses returned in a response are custom workflow statuses. For information on creating custom workflow statuses, read 'About Workflow Status settings' in About Site Settings options.
Response schema
The response schema contains a description of every property that can be returned for this endpoint.
countinteger
Details how many workflow statuses there are in total.
topinteger
Details number of workflow statuses returned in the response. This property is always returned as null.
skipinteger
Details how many workflow statuses were skipped to display those in the response. This property is always returned as null.
pageCountinteger
Details how many pages of workflow statuses there are. This property is always returned as null.
nextPageLinkstring
The endpoint to call the next page of workflow statuses. This property is always returned as null.
prevPageLinkstring
The endpoint to call the previous page of workflow statuses. This property is always returned as null.
responsearray
Contains the rest of the response.
idname
The unique identifier of the workflow status.
namestring
The name of the workflow status.
errorsstring
Information about any errors that occurred during the request.
serverTimeZoneenumeration
The timezone of the server sending the response.
Error Codes
Refer to the following table for information on error codes that may be encountered when using this resource.
Name
Code
Description
InternalServer
1
Internal server error.
Unauthorized
3
The request has been sent by an unauthorised user.
IncorrectFieldFormat
4
A field in the request has not been completed in the correct format.
InaccessibleOperation
5
The request has been sent by a user with invalid permissions.
InaccessibleData
6
The request has been sent by a user with invalid permissions.
Further reading
Read the following articles to learn more about similar APIs, how to get started with the Surpass API v2, and how to get the best out of this reference documentation: