GET /api/apps/versions/{AppVersionID}/contracts
Returns information about API contracts for the specified app version, in the form of a JSON object.
Authorization Roles/Permissions: Must have read permission for the resource.
This topic includes the following sections:
HTTP Method
GET
URL
https://{hostname}/api/apps/versions/{AppVersionID}/contracts[?][Environment=environment][&][ActivatedOnly]
Sample Request
The example below shows a request for the contracts for the specified app version.
Request URL #1
Returns results for all environments.
https://{hostname}/api/apps/versions/2mWn90b8Y4C2vL7qCxDW8f38.acmepaymentscorp/contracts
Request URL #2
With optional parameter, returns results for Sandbox only.
https://{hostname}/api/apps/versions/2mWn90b8Y4C2vL7qCxDW8f38.acmepaymentscorp/contracts?Environment=sandbox
Sample request headers
Accept: application/vnd.soa.v71+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/vnd.soa.v71+json, application/vnd.soa.v72+json application/vnd.soa.v80+json, application/vnd.soa.v81+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 |
---|---|---|---|---|
AppVersionID | Path | string | Required | The unique ID for a specific app version. |
Environment | Query | string | Optional | The environment (implementation) (Sandbox or Production). If not specified, results are returned for all environments. |
ActivatedOnly | Query | boolean | Optional | Indicates whether only activated contracts should be returned in the response. If not specified, defaults to false. |
IncludeAPIEndpoints | Query | boolean | Optional | Indicates whether API endpoints currently valid for the resource should be included in the results. Default: true. |
Response
If successful, this operation returns HTTP status code 200, with information about the contracts applicable to the specified app version.
Sample Response
The sample response below shows successful completion of this operation (sample request #1). There is one contract.
Sample response headers: application/vnd.soa.v72+json
Status Code: 200 OK Content-Type: application/vnd.soa.v72+json Expires: Tue, Thu, 12 Mar 2020 18:39:51 GMT
Sample response body: application/vnd.soa.v72+json
{ "Contract": [ { "ContractID": "79795dce-9eb3-43a9-8ebb-ab487fa41d1a.acmepaymentscorp", "APIVersionID": "38fcd5ae-08ae-4161-9fd3-65288dffb92e.acmepaymentscorp", "RuntimeID": "fZGCeQYlHJ7LJkbJ34VXADk7ATRQzfLfwvjFZxgA.acmepaymentscorp", "Environment": "Production", "State": "apicontract.status.activated", "ContractScope": { "Restricted": false, "LicenseID": [] }, "Updated": "2020-03-03T16:05:22Z", "UpdatedInMillis": 1583251522000, "TargetResources": { "TargetResource": [ { "Name": "v1", "ID": "38fcd5ae-08ae-4161-9fd3-65288dffb92e.acmepaymentscorp", "Type": "apiversion", "Visibility": "Public", "IsResourceLevelPermissionSupported": true }, { "Name": "Swagger_Petstore_5_Operations", "ID": "f1c665a2-eb4f-4b66-a254-25a4d4ff8aab.acmepaymentscorp", "Type": "api", "Image": { "Url": "https://acmepaymentscorp.apiportal.akana.com:443/api/apis/avatar/_VyLI9DgFX3uzW1-QNKBAN4w", "Title": "api", "Link": "#/api/f1c665a2-eb4f-4b66-a254-25a4d4ff8aab.acmepaymentscorp/versions/38fcd5ae-08ae-4161-9fd3-65288dffb92e.acmepaymentscorp/details" } }, { "Name": "v1", "ID": "fZGCeQYlHJ7LJkbJ34VXADk7ATRQzfLfwvjFZxgA.acmepaymentscorp", "Type": "app-version" }, { "Name": "Petstore API Test App", "ID": "7f3ef94a-3ac3-405c-bda6-efba9ff52b75.acmepaymentscorp", "Type": "app", "Image": { "Url": "https://acmepaymentscorp.apiportal.akana.com:443/api/apps/avatar/_VyLI9DgFX3uzW1-QNKBAN4w", "Title": "app", "Link": "#/app/7f3ef94a-3ac3-405c-bda6-efba9ff52b75.acmepaymentscorp/versions/fZGCeQYlHJ7LJkbJ34VXADk7ATRQzfLfwvjFZxgA.acmepaymentscorp/details" } }, { "ID": "contract_request583207.acmepaymentscorp", "Type": "board-item" } ] }, "Endpoints": { "Endpoint": [ { "Category": "Production", "Uri": "http://api578647live.gateway.akana.com:80/", "CName": "api578647live.gateway.akana.com", "DeploymentZoneRule": "container-1051default-http0", "ConnectionProperties": [ { "Name": "virtualHost", "Value": "api578647live.gateway.akana.com" }, { "Name": "gateway_hostname", "Value": "api578647live.gateway.akana.com" }, { "Name": "visibility", "Value": "public" } ], "BindingQName": "{Swagger_Petstore_5_Operations_v1}Swagger_Petstore_5_Operations_Binding_0", "BindingType": "binding.http", "EndpointKey": "uddi:cf133f7d-4177-11ea-be1c-b71095ab9d8f", "ImplementationCode": "Live" }, { "Category": "Production", "Uri": "https://api578647live.gateway.akana.com:443/", "CName": "api578647live.gateway.akana.com", "DeploymentZoneRule": "container-1051default-https", "ConnectionProperties": [ { "Name": "virtualHost", "Value": "api578647live.gateway.akana.com" }, { "Name": "gateway_hostname", "Value": "api578647live.gateway.akana.com" }, { "Name": "visibility", "Value": "public" } ], "BindingQName": "{Swagger_Petstore_5_Operations_v1}Swagger_Petstore_5_Operations_Binding_0", "BindingType": "binding.http", "EndpointKey": "uddi:cf629706-4177-11ea-be1c-b71095ab9d8f", "ImplementationCode": "Live" }, { "Category": "Production", "Uri": "https://api578647live.mtl-west.gateway.akana.com:443/", "CName": "api578647live.mtl-west.gateway.akana.com", "DeploymentZoneRule": "container-1051mutual-https", "ConnectionProperties": [ { "Name": "virtualHost", "Value": "api578647live.mtl-west.gateway.akana.com" }, { "Name": "gateway_hostname", "Value": "api578647live.mtl-west.gateway.akana.com" }, { "Name": "visibility", "Value": "public" } ], "BindingQName": "{Swagger_Petstore_5_Operations_v1}Swagger_Petstore_5_Operations_Binding_0", "BindingType": "binding.http", "EndpointKey": "uddi:cfa7683d-4177-11ea-be1c-b71095ab9d8f", "ImplementationCode": "Live" } ] }, "Status": "com.soa.apicontract.inforce" } ] }
Response Headers
For general information on response header values, refer to HTTP Response Headers.
Header | Description |
---|---|
Content-Type |
application/vnd.soa.v71+json, application/vnd.soa.v72+json application/vnd.soa.v80+json, application/vnd.soa.v81+json |
Response Body
Name | Type | Description |
---|---|---|
Contracts | Contracts | Includes information about one or more app/API contracts. |
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.