GET /api/apps/versions/{AppVersionID}/contracts

Returns information about API contracts for the specified app version, as an RSS feed.

Note: GET /api/apps/versions/{AppVersionID}/contracts (list contracts, with custom Accept header) returns the same information as a JSON object. We recommend using that operation rather than this one.

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=Boolean][&][IncludeActions=Boolean][&][IncludeAPIEndpoints=Boolean]

Sample Request

The example below is a request for contract info for the specified app version.

Sample request URL

https://{hostname}/api/apps/versions/y1Kh42Mjlt2BWTij4GLqnY4pJK3JPepT6j2vrkzU.acmepaymentscorp/contracts

Sample request headers

GET /api/apps/versions/y1Kh42Mjlt2BWTij4GLqnY4pJK3JPepT6j2vrkzU.acmepaymentscorp/contracts HTTP/1.1
Host:api.acmepaymentscorp.com
Accept: application/json, text/javascript, */*; q=0.01
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 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
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.
IncludeActions Query boolean Optional Indicates whether workflow actions currently valid for the resource should be included in the results. Default: true. For valid workflow actions, see Workflow Actions.
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 contract versions in an RSS channel.

Sample Response

The sample response below shows the contract versions for the specified app. In this example, there are two contract versions.

Sample response headers: application/json

HTTP/1.1 200 OK
Date: Thu, 08 Oct 2020 17:41:59 GMT
Content-Type: application/json

Sample response body: application/json

{
  "channel":{
    "title":"Application Contracts",
    "item":[
      {
        "title":"bd857504-acfe-41c3-bb5f-fbd2b3138538.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":"bd857504-acfe-41c3-bb5f-fbd2b3138538.acmepaymentscorp"
        },
        "EntityReferences":{
          "EntityReference":[
            {
              "Title":"1.0.5",
              "Guid":"36f1dbe2-5914-4588-bc43-d8d612fddf4f.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":"FAA_Airport_Status",
              "Guid":"bd5cb342-2186-451d-b81e-bde8dc393663.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_request17587.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 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 Application Contracts. Each item in the channel represents a contract that the app version has with an API, and includes the information listed below.

Name Description
title The unique ID for the contract.
category

One or more categories. Each category is a set of two name/value pairs. The second item defines the Domain, and the first defines the actual value for the property. For example, the set of values below shows that the contract is in the Live implementation:

{
  "value": "Production",
  "domain": "uddi:soa.com:environment"
}

The domains for which values are defined are:

  • Environment: uddi:soa.com:environment
  • Contract state: uddi:soa.com:wfstate
guid GUID for the contract.
Endpoints The URI for the endpoint the contract relates to.
Actions Workflow actions that are valid for the contract.
EntityReferences

One or more entity references. Each includes:

  • Title
  • GUID: GUID for the API version the legal agreement relates to.
  • Category: one or more sets of name/value pairs conveying information about the contract.

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
400 Bad request: Returned if the client sends a malformed request; for example, invalid parameters or body content.For example, you might get this response if you have typos in the URL.
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.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.