GET /api/models/{ModelID}/versions
Returns information about the versions for the specified model.
Authorization Roles/Permissions: Must have Read permission for the resource.
This topic includes the following sections:
HTTP Method
GET
URL
https://{hostname}/api/models/{ModelID}/versions
Sample Request
The example below shows a request for the versions for the specified model.
Sample Request URL
https://{hostname}/api/models/589a932c-b5f6-4167-8758-0cf2532789f3.acmepaymentscorp/versions
Sample request headers
Accept: application/json X-Csrf-Token_acmepaymentscorp: TokenID%3D8ed70a13-8469-11e8-b37a-b155e4eabeb8%2CexpirationTime%3D153...
Sample request body
Not applicable.
Request Headers
For general information on request header values, refer to HTTP Request Headers.
Header | Description |
---|---|
Accept | application/json |
Cookie | AtmoAuthToken_{fedmemberid}={cookie value, which usually starts with TokenID}—The platform cookie. This is the Akana API Platform authorization token, and must be sent with every API request that requires login. For more information and an example, see Session cookies. |
X-Csrf-Token_{fedmemberID} | The CSRF prevention header; may or may not be required, depending on platform settings. See CSRF Prevention on the Platform. By default, the CSRF header is not required for GET operations and is required for all others, with a few exceptions relating to user login. |
Request Parameters
Parameter | Parm Type | Data Type | Required | Description |
---|---|---|---|---|
ModelID | Path | string | Required | The unique ID for a model object defined for a business organization. |
includeSchema | Query | boolean | Optional | Indicates whether results should include information about the schema for each model version. Defaults to false, so schema information is not included unless this parameter is set to true. |
includeReferences | Path | Path | Optional | Indicates whether model references should be included in the response. Default: false. |
includeTargetResources | Query | boolean | Optional | If included with a value of true, idicates whether results should include information about target resources for each model version. Defaults to false. |
Response
If successful, this operation returns HTTP status code 200, with information about the versions for the specified model.
Sample Response
The sample response below shows successful completion of this operation. This model has three versions.
Sample response headers
HTTP/1.1 200 OK Date: Thu, 09 May 2019 15:38:23 GMT Content-Type: application/json
Sample response body
{ "ModelVersion":[ { "ModelVersionID":"cef16710-198c-4ca5-bc8d-423542b1806d.acmepaymentscorp", "ModelID":"589a932c-b5f6-4167-8758-0cf2532789f3.acmepaymentscorp", "Name":"v1", "Description":"For use in multiple top-level model objects.", "Visibility":"Public", "Created":"2019-05-09T13:39:04Z", "Updated":"2019-05-09T13:39:04Z", "State":"com.akana.model.state.pending_approval" }, { "ModelVersionID":"79d2f19b-02a0-4f45-b936-04c20fd5e9b3.acmepaymentscorp", "ModelID":"589a932c-b5f6-4167-8758-0cf2532789f3.acmepaymentscorp", "Name":"Check Purchase", "Description":"Check purchase version 3 (updated)", "Visibility":"Public", "Created":"2019-05-09T14:35:47Z", "Updated":"2019-05-09T15:15:56Z", "State":"com.akana.model.state.draft" }, { "ModelVersionID":"13b0a711-e93b-4599-ac59-da95915237d0.acmepaymentscorp", "ModelID":"589a932c-b5f6-4167-8758-0cf2532789f3.acmepaymentscorp", "Name":"v3", "Description":"Version 3", "Visibility":"Public", "Created":"2019-05-09T14:44:37Z", "Updated":"2019-05-09T14:44:37Z", "State":"com.akana.model.state.draft" } ] }
Response Headers
For general information on response header values, refer to HTTP Response Headers.
Header | Description |
---|---|
Content-Type | application/json |
Response Body
Name | Type | Description |
---|---|---|
ModelVersions | ModelVersions | Contains information about versions for model objects defined at the organization level. |
Error Codes/Messages
If the call is unsuccessful an error code/message is returned. One or more examples of possible errors for this operation are shown below.
Item | Value |
---|---|
401 | Unauthorized. For example, you would get this response if you didn't include the custom X-Csrf-Token_{fedmemberID} header in the request, when it was required by the platform settings; or if you included an invalid or expired value for this header. You would also get this response for any operation that requires login (almost all) if the login cookie was missing. |
500 | An error occurred processing the call. |
More information about Akana API Platform API error messages.