GET /api/apis/{APIID}/versions

Returns a list of versions associated with the specified API, as an RSS channel.

Note: version information does not include operations. For information about operations for a specific API version, use GET /api/apis/versions/{APIVersionID} with the optional includeOperations parameter.

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/{APIID}/versions

Back to top

Sample Request

The example below show a request for a list of valid versions for the specified API.

Request URL

https://{hostname}/api/apis/api18969.acmepaymentscorp/versions

Sample request headers

GET /api/apis/api18969.acmepaymentscorp/versions HTTP/1.1
Host: {hostname}
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.

Back to top

Request Headers

For general information on request header values, refer to HTTP Request Headers.

Header Description
Accept application/json, application/vnd.soa.v71+json, application/vnd.soa.v72+json, application/vnd.soa.v80+json
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.

Back to top

Request Parameters

Parameter Parm Type Data Type Required Description
APIID Path string Required The unique ID for a specific API.

Back to top

Response

If successful, this operation returns HTTP status code 200, with information about the API versions in the form of an RSS feed.

Back to top

Sample Response

The sample response below shows that there are three versions of the API.

Sample response headers

HTTP/1.1 200 OK
Date: Wed, 30 Jan 2013 19:53:03 GMT
Content-Type: application/json

Sample response body (JSON)

{
  "channel" : {
    "title" : "API Versions",
    "item" : [ {
      "title" : "1.4",
      "description" : "Fourth update.",
      "category" : [ {
        "value" : "apiversion",
        "domain" : "uddi:soa.com:resourcetype"
      }, {
        "value" : "com.soa.api.state.open",
        "domain" : "uddi:soa.com:state"
      }, {
        "value" : "Limited",
        "domain" : "uddi:soa.com:visibility"
      }, {
        "value" : "payments API update",
        "domain" : "uddi:soa.com:tag"
      } ],
      "guid" : {
        "value" : "apiversion18974.acmepaymentscorp"
      },
      "pubDate" : "Fri, 18 Jan 2013 15:16:07 GMT",
      "Endpoints" : {
        "Endpoint" : [ {
          "Category" : "Sandbox",
          "Uri" : "http://acmepaymentscorpsandbox.broker.2.soa.com/payments"
        }, {
          "Category" : "Production",
          "Uri" : "http://acmepaymentscorp.broker.1.soa.com/payments"
        } ]
      }
    }, {
      "title" : "1.1",
      "description" : "Update to first release includes key fixes.",
      "category" : [ {
        "value" : "apiversion",
        "domain" : "uddi:soa.com:resourcetype"
      }, {
        "value" : "com.soa.api.state.open",
        "domain" : "uddi:soa.com:state"
      }, {
        "value" : "Public",
        "domain" : "uddi:soa.com:visibility"
      }, {
        "value" : "payments API",
        "domain" : "uddi:soa.com:tag"
      } ],
      "guid" : {
        "value" : "apiversion18972.acmepaymentscorp"
      },
      "pubDate" : "Fri, 18 Jan 2013 09:10:50 GMT",
      "Endpoints" : {
        "Endpoint" : [ {
          "Category" : "Sandbox",
          "Uri" : "http://acmepaymentscorpsandbox.broker.soa.com/payments"
        }, {
          "Category" : "Production",
          "Uri" : "http://acmepaymentscorp.broker.soa.com/payments"
        } ]
      }
    }, {
      "title" : "1.0",
      "description" : "First release.",
      "category" : [ {
        "value" : "apiversion",
        "domain" : "uddi:soa.com:resourcetype"
      }, {
        "value" : "com.soa.api.state.open",
        "domain" : "uddi:soa.com:state"
      }, {
        "value" : "Public",
        "domain" : "uddi:soa.com:visibility"
      }, {
        "value" : "payments API",
        "domain" : "uddi:soa.com:tag"
      } ],
      "guid" : {
        "value" : "apiversion18971.acmepaymentscorp"
      },
      "pubDate" : "Fri, 18 Jan 2013 08:46:27 GMT",
      "Endpoints" : {
        "Endpoint" : [ {
          "Category" : "Sandbox",
          "Uri" : "http://acmepaymentscorpsandbox.broker.soa.com/payments"
        }, {
          "Category" : "Production",
          "Uri" : "http://acmepaymentscorp.broker.soa.com/payments"
        } ]
      }
    } ]
  },
  "version" : "1.0"
}

Back to top

Response Headers

For general information on response header values, refer to HTTP Response Headers.

Header Description
Content-Type application/json, application/vnd.soa.v71+json, application/vnd.soa.v72+json, application/vnd.soa.v80+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 versions. Each item in the channel represents one API version, and includes the information listed below.

Name Description
title The title of the RSS channel; in this case, API Versions.
Item

An array of individual items, each of which represents an API version. For each item:

  • Title
  • Description
  • Category[ ]—One or more categories for the API version. For each defined category there are two values, value and domain.
  • GUID: the unique ID for the item.
  • pubDate
  • Endpoints[ ]—One or more endpoints for the API version. For each defined endpoint there are two values, Category and Uri.

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

Back to top

Related Topics