Workspaces Org API
The Org API provides a REST service for querying Clients/Organizations in Journey Manager in a secure and efficient manner.
Security
To access the Workspaces REST endpoint the caller needs to pass through Spring Security Session Management. First the user has to be authenticated with the Workspaces configured security manager. The user may authenticate via a login page or via Single Sign-on such as ADFS, oAuth2 or custom SSO.
The result of the API calls is subject to the user security policy.
URL Endpoint
The Workspaces Org API URL endpoint is as follows:
``` https://Service API
This section provides a description all the Org API operations including:
POST Query Org
Returns a list of organisations filtered on the specified criteria.
The result will be ordered alphabetically by name.
URL Format
POST https://<tm server>/workspaces/secure/api/v1/org/query
POST Body
The POST request must contain a JSON structure describing the org query.
To support multiple parameters this API uses the HTTP Content Type: application/json
The set of query JSON attributes is listed below (all attributes are optional unless indicated otherwise):
Attribute | Type | Description |
---|---|---|
fetchLimit | Integer | Specifies the fetchLimit of the query and is the max number of results returned. Default value is applied if fetchLimit entered is greater than 10,000. Default value is 10,000 (required) |
fetchOffset | Integer | Specifies fetchOffset of the query. Returns (fetchOffset + fetchLimit) number of results starting from the fetchOffset index. Default value is 0 (optional) |
Any additional attributes will give a Bad Request response.
Example: Query Org
Please ensure you specify Content-Type: application/json
POST <b>/workspaces/secure/api/v1/org/query</b> HTTP/1.1
Host: https://transact.workspaces.com
Content-Type: application/json
{
"fetchLimit": 2,
"fetchOffset": 0
}
200 Response
{
"fetchLimit": 2,
"fetchOffset": 0,
"durationMs": 26,
"result": [
{
"orgName": "Bank",
"clientCode": "Bank",
"categoryNames": [],
"spaceNames": [
"Maguire",
"Web Plug-in",
"Work Spaces"
]
},
{
"orgName": "Workspaces",
"clientCode": "workspace",
"categoryNames": [
"Deposit Account Opening",
"Loan applications"
],
"spaceNames": [
"Maguire",
"Salesforce",
"Web Plug-in",
"Work Space",
"Work Spaces"
]
}
]
}
Error Messages
Error Key | Error | Error Code |
---|---|---|
illegalArgument | Please see Error Log ID {number} | 400 - Bad Request |
internalError | Please see Error Log ID {number} | 500 - Internal Server Error |
unableToResolvePortal | Unable to resolve portal from request | 400 - Bad Request |
Error Responses
- 400 - Bad Request
- Bad request or request parameter. Check error message for details.
- 404 - Not Found
- Ensure the URL endpoint is entered correctly.
- 500 - Internal Server Error
- Exception occurred in org query. Contact administrator.