GET /api/apis/versions/{APIVersionID}/contracts
Returns information about contracts for the specified API version.
Authorization Roles/Permissions: Must have Read permission for the resource.
This topic includes the following sections:
HTTP Method
GET
URL
https://{hostname}/api/apis/versions/{APIVersionID}/contracts[?][ActivatedOnly={Boolean}] &[Environment={Environment}]&[IncludeActions={Boolean}]&[Start={start_number}]&[Count={count_number}]
Or
https://{hostname}/api/apis/versions/{APIVersionID}/contracts[?][ActivatedOnly={Boolean}] &[Environment={Environment}]&[IncludeActions={Boolean}]&[start={start_number}]&[count={count_number}]
Sample Request
The example below shows a request for the contract version for the specified API version.
Sample Request URL
https://{hostname}/api/apis/versions/34944975-09d4-49a2-8c15-f835fba9c5b4.acmepaymentscorp/contracts
Sample request headers
Accept: application/json AtmoAuthToken_acmepaymentscorp=TokenID%3Dcd36a4bd-e600-4e99-961a-c4ca0cfc93cd%2Cclaimed_id%3Durn%3Aatmosphere%3Auser%3Aacmepaymentscorp%3A14b1902f-3dfc-43e3-b09a-81137f091b96%2CissueTime%3D1614802132363%2CexpirationTime%3D1614803992357%2C... 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 | text/xml, application/rss+xml, or 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 |
---|---|---|---|---|
APIVersionID | Path | string | Required | The unique ID for a specific API version. |
ActivatedOnly | Query | boolean | Optional | If set to true, only activated contracts are returned. If set to false or not specified, all contracts are returned. |
Environment | Query | string | Required | The environment (implementation) (Sandbox or Production). If specified, returns only contracts for that environment. If not specified, all are returned. |
IncludeActions | Query | boolean | Optional | Indicates whether workflow actions currently valid for the resource should be included in the results. Default: false. For valid workflow actions, see Workflow Actions. |
Start or start Valid in version: 2020.2.0 |
Query | integer | Optional | An index number indicating the starting point for the results to be returned. If not specified, results start at position 0, the first result. |
Count or count Valid in version: 2020.2.0 |
Query | integer | Optional | The number of results to be returned, from the specified starting point. If not specified, all matching results are returned. |
Response
If successful, this operation returns HTTP status code 200, with information about the API contracts. The information is sent as an RSS channel in JSON or XML format.
Sample Response
The sample response below returns the contracts for the specified API version. There are two contracts.
Sample response headers: application/json
Status Code: 200 OK Content-Type: application/json Date: Thu, 08 Oct 2020 17:31:31 GMT
Sample response body: application/json
{ "channel":{ "title":"Api Contracts", "item":[ { "title":"13b65ff9-d8ee-45c0-a679-474ccf66bf9b.acmepaymentscorp", "category":[ { "value":"Production", "domain":"uddi:soa.com:environment" }, { "value":"apicontract.status.activated", "domain":"uddi:soa.com:wfstate" }, { "value":"com.soa.apicontract.inforce", "domain":"uddi:soa.com:status" }, { "value":"false", "domain":"uddi:soa.com:restrictedscope" } ], "guid":{ "value":"13b65ff9-d8ee-45c0-a679-474ccf66bf9b.acmepaymentscorp" }, "EntityReferences":{ "EntityReference":[ { "Title":"1.0.5", "Guid":"34944975-09d4-49a2-8c15-f835fba9c5b4.acmepaymentscorp", "Category":[ { "value":"apiversion", "domain":"uddi:soa.com:resourcetype" }, { "value":"Public", "domain":"uddi:soa.com:visibility" }, { "value":"uddi:soa.com:api:resource-level-permissions-notsupported", "domain":"uddi:soa.com:api:resource-level-permissions" } ] }, { "Title":"Swagger_Petstore", "Guid":"dbe227e1-d0b9-4216-a075-25c835229ec2.acmepaymentscorp", "Category":[ { "value":"api", "domain":"uddi:soa.com:resourcetype" } ] }, { "Title":"1.0", "Guid":"nYPyTjqh405RdSqByAWkkaM9y5It3nNsjQjlli5c.acmepaymentscorp", "Category":[ { "value":"app-version", "domain":"uddi:soa.com:resourcetype" } ] }, { "Title":"Game App", "Guid":"cfda7a6b-4fde-485b-a5d3-611f9e43fbba.acmepaymentscorp", "Category":[ { "value":"app", "domain":"uddi:soa.com:resourcetype" } ] }, { "Guid":"contract_request17576.acmepaymentscorp", "Category":[ { "value":"board-item", "domain":"uddi:soa.com:resourcetype" } ] } ] }, "Endpoints":{ "Endpoint":[ ] }, "Actions":{ "Action":[ { "value":"apicontract.action.suspend", "label":"apicontract.action.suspend" }, { "value":"apicontract.action.cancel", "label":"apicontract.action.cancel" }, { "value":"apicontract.action.revise", "label":"apicontract.action.revise" } ] } }, { "title":"0962c9cd-e040-4417-8ea7-acde900c6a46.acmepaymentscorp", "category":[ { "value":"Production", "domain":"uddi:soa.com:environment" }, { "value":"apicontract.status.activated", "domain":"uddi:soa.com:wfstate" }, { "value":"com.soa.apicontract.inforce", "domain":"uddi:soa.com:status" }, { "value":"false", "domain":"uddi:soa.com:restrictedscope" } ], "guid":{ "value":"0962c9cd-e040-4417-8ea7-acde900c6a46.acmepaymentscorp" }, "EntityReferences":{ "EntityReference":[ { "Title":"1.0.5", "Guid":"34944975-09d4-49a2-8c15-f835fba9c5b4.acmepaymentscorp", "Category":[ { "value":"apiversion", "domain":"uddi:soa.com:resourcetype" }, { "value":"Public", "domain":"uddi:soa.com:visibility" }, { "value":"uddi:soa.com:api:resource-level-permissions-notsupported", "domain":"uddi:soa.com:api:resource-level-permissions" } ] }, { "Title":"Swagger_Petstore", "Guid":"dbe227e1-d0b9-4216-a075-25c835229ec2.acmepaymentscorp", "Category":[ { "value":"api", "domain":"uddi:soa.com:resourcetype" } ] }, { "Title":"1.0", "Guid":"y1Kh42Mjlt2BWTij4GLqnY4pJK3JPepT6j2vrkzU.acmepaymentscorp", "Category":[ { "value":"app-version", "domain":"uddi:soa.com:resourcetype" } ] }, { "Title":"Puzzle app Postman", "Guid":"bd487115-fc37-463e-8aab-bd578acd23f6.acmepaymentscorp", "Category":[ { "value":"app", "domain":"uddi:soa.com:resourcetype" } ] }, { "Guid":"contract_request17579.acmepaymentscorp", "Category":[ { "value":"board-item", "domain":"uddi:soa.com:resourcetype" } ] } ] }, "Endpoints":{ "Endpoint":[ ] }, "Actions":{ "Action":[ { "value":"apicontract.action.suspend", "label":"apicontract.action.suspend" }, { "value":"apicontract.action.cancel", "label":"apicontract.action.cancel" }, { "value":"apicontract.action.revise", "label":"apicontract.action.revise" } ] } } ] }, "version":"1.0" }
Response Headers
For general information on response header values, refer to HTTP Response Headers.
Header | Description |
---|---|
Content-Type | text/xml, application/rss+xml, or application/json |
Response Body
The response body is in the form of an RSS channel, and includes the items listed below. The RSS version is 1.0. The title of the RSS channel is API Contracts. Each item in the channel represents one API contract, and includes the information listed below.
Name | Description |
---|---|
title | The title of the contract. It is the unique ContractID; for example, contract24060.acmepaymentscorp. |
category[ ] |
An array of sets of two name/value pairs, each including Value and Domain, with a value for each. For example: "value" : "Sandbox", "domain" : "uddi:soa.com:environment" The example above indicates that the contract applies to the Sandbox implementation. "value" : "apicontract.status.activated", "domain" : "uddi:soa.com:wfstate" The example above indicates that the contract's status is activated. |
GUID | GUID for the contract. It is the unique ContractID; for example, contract24060.acmepaymentscorp. |
Endpoints |
An array of name/value pair sets containing information about the endpoints that the contract applies to. Each includes Category, which is the implementation for the endpoint, and URI, which is the URI for the endpoint. For example: "Category": "Sandbox", "Uri": "http://acmepaymentscorpsandbox.broker.soa.com/payments" The above indicates that the specified URI is for the Sandbox implementation. |
Actions |
An array of name/value pair sets containing information about one or more action events that are valid for the item. Each includes value and label, and both contain the name of the valid action. For example: "value" : "apicontract.action.suspend", "label" : "apicontract.action.suspend" The example above indicates that Suspend is a valid action for the contract. |
EntityReferences |
Information about one or more platform entities that information in the RSS channel applies to. Each includes: |
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. |
404 | The resource could not be found. For example, you might get this if there is an error in the APIID, or if there are no contracts for the specified API. |
500 | An error occurred processing the call. |
More information about Akana API Platform API error messages.