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

Back to top

URL

https://{hostname}/api/apis/versions/{APIVersionID}/contracts[?][ActivatedOnly={Boolean}]&[Environment={Environment}]
&[IncludeActions={Boolean}]

Back to top

Sample Request

The example below shows a request for the contract version for the specified API version.

Request URL

https://{hostname}/api/apis/versions/9c84bae7-e5fa-49aa-b90f-ae1b4de79861.acmepaymentscorp/contracts

Sample request headers

Status Code: 200 OK
Content-Type: application/json

Sample request body

Not applicable.

Back to top

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

Back to top

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.

Back to top

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.

Back to top

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, 28 Jan 2016 20:26:00 GMT

Sample response body: application/json

{
  "channel" : {
    "title" : "Api Contracts",
    "item" : [ {
      "title" : "5f95ea32-f08c-4321-a919-974d277ae5f2.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" : "5f95ea32-f08c-4321-a919-974d277ae5f2.acmepaymentscorp"
      },
      "EntityReferences" : {
        "EntityReference" : [ {
          "Title" : "1.0",
          "Guid" : "be75b6a5-2e86-4ede-a90e-ce92de827b0c.acmepaymentscorp",
          "Category" : [ {
            "value" : "apiversion",
            "domain" : "uddi:soa.com:resourcetype"
          }, {
            "value" : "Public",
            "domain" : "uddi:soa.com:visibility"
          }, {
            "value" : "uddi:soa.com:api:resource-level-permissions-supported",
            "domain" : "uddi:soa.com:api:resource-level-permissions"
          } ]
        }, {
          "Title" : "SwaggerAPI_Both",
          "Guid" : "782fd8f0-a44b-4e32-874a-b3be719a9c26.acmepaymentscorp",
          "Category" : [ {
            "value" : "api",
            "domain" : "uddi:soa.com:resourcetype"
          } ]
        }, {
          "Title" : "1.0",
          "Guid" : "5OUtQCqGBGs8dulc9UC6vg82.acmepaymentscorp",
          "Category" : [ {
            "value" : "app-version",
            "domain" : "uddi:soa.com:resourcetype"
          } ]
        }, {
          "Title" : "__SwaggerApp_prod",
          "Guid" : "9fae61ac-3364-42d1-930e-153a86c893ed.acmepaymentscorp",
          "Category" : [ {
            "value" : "app",
            "domain" : "uddi:soa.com:resourcetype"
          } ]
        }, {
          "Guid" : "contract_request10085.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"
        } ]
      },
      "Image" : [ {
        "Url" : "http://acmepaymentscorp.com/api/apis/avatar/_V1mlhdHoCZJSVLVQa3UQCgQ",
        "Title" : "api",
        "Link" : "#/api/782fd8f0-a44b-4e32-874a-b3be719a9c26.acmepaymentscorp/versions/be75b6a5-2e86-4ede-a90e-ce92de827b0c.acmepaymentscorp/details"
      }, {
        "Url" : "http://acmepaymentscorp.com/api/apps/avatar/_V1mlhdHoCZJSVLVQa3UQCgQ",
        "Title" : "app",
        "Link" : "#/app/9fae61ac-3364-42d1-930e-153a86c893ed.acmepaymentscorp/versions/5OUtQCqGBGs8dulc9UC6vg82.acmepaymentscorp/details"
      } ]
    }, {
      "title" : "ac9284f5-2990-461a-85f0-7ac54478d36a.acmepaymentscorp",
      "category" : [ {
        "value" : "Sandbox",
        "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" : "ac9284f5-2990-461a-85f0-7ac54478d36a.acmepaymentscorp"
      },
      "EntityReferences" : {
        "EntityReference" : [ {
          "Title" : "1.0",
          "Guid" : "be75b6a5-2e86-4ede-a90e-ce92de827b0c.acmepaymentscorp",
          "Category" : [ {
            "value" : "apiversion",
            "domain" : "uddi:soa.com:resourcetype"
          }, {
            "value" : "Public",
            "domain" : "uddi:soa.com:visibility"
          }, {
            "value" : "uddi:soa.com:api:resource-level-permissions-supported",
            "domain" : "uddi:soa.com:api:resource-level-permissions"
          } ]
        }, {
          "Title" : "SwaggerAPI_Both",
          "Guid" : "782fd8f0-a44b-4e32-874a-b3be719a9c26.acmepaymentscorp",
          "Category" : [ {
            "value" : "api",
            "domain" : "uddi:soa.com:resourcetype"
          } ]
        }, {
          "Title" : "1.0",
          "Guid" : "3c0w1wFlbCc4GEm4PTC9c81R.acmepaymentscorp",
          "Category" : [ {
            "value" : "app-version",
            "domain" : "uddi:soa.com:resourcetype"
          } ]
        }, {
          "Title" : "__SwaggerApp_sbox",
          "Guid" : "1fd82aa1-a725-4680-89e4-014729b0a873.acmepaymentscorp",
          "Category" : [ {
            "value" : "app",
            "domain" : "uddi:soa.com:resourcetype"
          } ]
        }, {
          "Guid" : "contract_request10082.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"
        } ]
      },
      "Image" : [ {
        "Url" : "http://acmepaymentscorp.com/api/apis/avatar/_V1mlhdHoCZJSVLVQa3UQCgQ",
        "Title" : "api",
        "Link" : "#/api/782fd8f0-a44b-4e32-874a-b3be719a9c26.acmepaymentscorp/versions/be75b6a5-2e86-4ede-a90e-ce92de827b0c.acmepaymentscorp/details"
      }, {
        "Url" : "http://acmepaymentscorp.com/api/apps/avatar/_V1mlhdHoCZJSVLVQa3UQCgQ",
        "Title" : "app",
        "Link" : "#/app/1fd82aa1-a725-4680-89e4-014729b0a873.acmepaymentscorp/versions/3c0w1wFlbCc4GEm4PTC9c81R.acmepaymentscorp/details"
      } ]
    } ]
  },
  "version" : "1.0"
}

Back to top

Sample response headers: text/xml

Status Code: 200 OK
Content-Type: text/xml
Date: Thu, 28 Jan 2016 20:21:18 GMT

Sample response body: text/xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rss xmlns:ns2="http://soa.com/xsd/business/1.0" xmlns:ns3="http://soa.com/xsd/user/1.0" xmlns:ns4="http://soa.com/xsd/rss/1.0" 
xmlns:ns5="http://soa.com/xsd/comment/1.0" xmlns:ns6="http://soa.com/xsd/board/1.0" xmlns:ns7="http://soa.com/xsd/dnmodel/1.0" 
xmlns:ns8="http://a9.com/-/spec/opensearch/1.1/" xmlns:ns9="http://soa.com/xsd/resource/1.0" 
xmlns:ns10="http://soa.com/xsd/legals/1.0" xmlns:ns11="http://soa.com/xsd/fault/1.0" xmlns:ns12="http://soa.com/xsd/api/1.0" 
xmlns:ns13="http://soa.com/xsd/ticket/1.0" xmlns:ns14="http://soa.com/xsd/app/1.0" xmlns:ns15="http://soa.com/xsd/review/1.0" 
xmlns:ns16="http://soa.com/xsd/alert/1.0" xmlns:ns17="http://soa.com/xsd/contract/1.0" 
xmlns:ns18="http://soa.com/xsd/discussion/1.0" xmlns:ns19="http://soa.com/xsd/search/1.0" 
xmlns:ns20="http://soa.com/xsd/workflow/1.0" xmlns:ns21="http://soa.com/xsd/client/services/1.0" version="1.0">
  <channel>
    <title>Api Contracts</title>
    <item>
      <title>5f95ea32-f08c-4321-a919-974d277ae5f2.acmepaymentscorp</title>
      <category domain="uddi:soa.com:environment">Production</category>
      <category domain="uddi:soa.com:wfstate">apicontract.status.activated</category>
      <category domain="uddi:soa.com:status">com.soa.apicontract.inforce</category>
      <category domain="uddi:soa.com:restrictedscope">false</category>
      <guid>5f95ea32-f08c-4321-a919-974d277ae5f2.acmepaymentscorp</guid>
      <ns4:EntityReferences>
        <ns4:EntityReference>
          <Title>1.0</Title>
          <Guid>be75b6a5-2e86-4ede-a90e-ce92de827b0c.acmepaymentscorp</Guid>
          <ns4:Category domain="uddi:soa.com:resourcetype">apiversion</ns4:Category>
          <ns4:Category domain="uddi:soa.com:visibility">Public</ns4:Category>
          <ns4:Category domain="uddi:soa.com:api:resource-level-permissions">uddi:soa.com:api:resource-level-permissions-supported</ns4:Category>
        </ns4:EntityReference>
        <ns4:EntityReference>
          <Title>SwaggerAPI_Both</Title>
          <Guid>782fd8f0-a44b-4e32-874a-b3be719a9c26.acmepaymentscorp</Guid>
          <ns4:Category domain="uddi:soa.com:resourcetype">api</ns4:Category>
        </ns4:EntityReference>
        <ns4:EntityReference>
          <Title>1.0</Title>
          <Guid>5OUtQCqGBGs8dulc9UC6vg82.acmepaymentscorp</Guid>
          <ns4:Category domain="uddi:soa.com:resourcetype">app-version</ns4:Category>
        </ns4:EntityReference>
        <ns4:EntityReference>
          <Title>__SwaggerApp_prod</Title>
          <Guid>9fae61ac-3364-42d1-930e-153a86c893ed.acmepaymentscorp</Guid>
          <ns4:Category domain="uddi:soa.com:resourcetype">app</ns4:Category>
        </ns4:EntityReference>
        <ns4:EntityReference>
          <Guid>contract_request10085.acmepaymentscorp</Guid>
          <ns4:Category domain="uddi:soa.com:resourcetype">board-item</ns4:Category>
        </ns4:EntityReference>
      </ns4:EntityReferences>
      <ns4:Image>
        <Url>http://acmepaymentscorp.com/api/apis/avatar/_V1mlhdHoCZJSVLVQa3UQCgQ</Url>
        <Title>api</Title>
        <Link>#/api/782fd8f0-a44b-4e32-874a-b3be719a9c26.acmepaymentscorp/versions/be75b6a5-2e86-4ede-a90e-ce92de827b0c.acmepaymentscorp/details</Link>
      </ns4:Image>
      <ns4:Image>
        <Url>http://acmepaymentscorp.com/api/apps/avatar/_V1mlhdHoCZJSVLVQa3UQCgQ</Url>
        <Title>app</Title>
        <Link>#/app/9fae61ac-3364-42d1-930e-153a86c893ed.acmepaymentscorp/versions/5OUtQCqGBGs8dulc9UC6vg82.acmepaymentscorp/details</Link>
      </ns4:Image>
      <ns12:Endpoints />
      <ns4:Actions>
        <ns4:Action label="apicontract.action.suspend">apicontract.action.suspend</ns4:Action>
        <ns4:Action label="apicontract.action.cancel">apicontract.action.cancel</ns4:Action>
        <ns4:Action label="apicontract.action.revise">apicontract.action.revise</ns4:Action>
      </ns4:Actions>
    </item>
    <item>
      <title>ac9284f5-2990-461a-85f0-7ac54478d36a.acmepaymentscorp</title>
      <category domain="uddi:soa.com:environment">Sandbox</category>
      <category domain="uddi:soa.com:wfstate">apicontract.status.activated</category>
      <category domain="uddi:soa.com:status">com.soa.apicontract.inforce</category>
      <category domain="uddi:soa.com:restrictedscope">false</category>
      <guid>ac9284f5-2990-461a-85f0-7ac54478d36a.acmepaymentscorp</guid>
      <ns4:EntityReferences>
        <ns4:EntityReference>
          <Title>1.0</Title>
          <Guid>be75b6a5-2e86-4ede-a90e-ce92de827b0c.acmepaymentscorp</Guid>
          <ns4:Category domain="uddi:soa.com:resourcetype">apiversion</ns4:Category>
          <ns4:Category domain="uddi:soa.com:visibility">Public</ns4:Category>
          <ns4:Category domain="uddi:soa.com:api:resource-level-permissions">uddi:soa.com:api:resource-level-permissions-supported</ns4:Category>
        </ns4:EntityReference>
        <ns4:EntityReference>
          <Title>SwaggerAPI_Both</Title>
          <Guid>782fd8f0-a44b-4e32-874a-b3be719a9c26.acmepaymentscorp</Guid>
          <ns4:Category domain="uddi:soa.com:resourcetype">api</ns4:Category>
        </ns4:EntityReference>
        <ns4:EntityReference>
          <Title>1.0</Title>
          <Guid>3c0w1wFlbCc4GEm4PTC9c81R.acmepaymentscorp</Guid>
          <ns4:Category domain="uddi:soa.com:resourcetype">app-version</ns4:Category>
        </ns4:EntityReference>
        <ns4:EntityReference>
          <Title>__SwaggerApp_sbox</Title>
          <Guid>1fd82aa1-a725-4680-89e4-014729b0a873.acmepaymentscorp</Guid>
          <ns4:Category domain="uddi:soa.com:resourcetype">app</ns4:Category>
        </ns4:EntityReference>
        <ns4:EntityReference>
          <Guid>contract_request10082.acmepaymentscorp</Guid>
          <ns4:Category domain="uddi:soa.com:resourcetype">board-item</ns4:Category>
        </ns4:EntityReference>
      </ns4:EntityReferences>
      <ns4:Image>
        <Url>http://acmepaymentscorp.com/api/apis/avatar/_V1mlhdHoCZJSVLVQa3UQCgQ</Url>
        <Title>api</Title>
        <Link>#/api/782fd8f0-a44b-4e32-874a-b3be719a9c26.acmepaymentscorp/versions/be75b6a5-2e86-4ede-a90e-ce92de827b0c.acmepaymentscorp/details</Link>
      </ns4:Image>
      <ns4:Image>
        <Url>http://acmepaymentscorp.com/api/apps/avatar/_V1mlhdHoCZJSVLVQa3UQCgQ</Url>
        <Title>app</Title>
        <Link>#/app/1fd82aa1-a725-4680-89e4-014729b0a873.acmepaymentscorp/versions/3c0w1wFlbCc4GEm4PTC9c81R.acmepaymentscorp/details</Link>
      </ns4:Image>
      <ns12:Endpoints />
      <ns4:Actions>
        <ns4:Action label="apicontract.action.suspend">apicontract.action.suspend</ns4:Action>
        <ns4:Action label="apicontract.action.cancel">apicontract.action.cancel</ns4:Action>
        <ns4:Action label="apicontract.action.revise">apicontract.action.revise</ns4:Action>
      </ns4:Actions>
    </item>
  </channel>
</rss>

Back to top

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

Back to top

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.

Image

An array containing information about the image for each of the avatars associated with the contract. There can be one avatar for the app and one for the API. For each avatar, the image information includes:

  • URL: The URL of the avatar.
  • Title: The title of the resource the avatar is for; app or api.
  • Link: A relative link to the Board for the resource.
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:

  • Title: The title of the entity.
  • GUID: GUID for the entity; for example, the APIVersionID.
  • Category[ ]: an array of name/value pairs containing information about the app/API contract; for example, resource type, visibility setting.

Back to top

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.
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.

Back to top

Related Topics