GET /api/apis/versions

Returns information about API versions for all APIs, in the form of a JSON or XML object.

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.

GET /api/apis/versions with text/xml or application/json content-type returns API version information in the form of an RSS channel; GET /api/apis/versions (this operation) returns it as a JSON or XML object. Both operations return the same information; only the structure/format is different.

Note: this operation might return a large amount of content. If you want to view versions for a specific API, use the GET apis/{APIID}/versions operation instead.

Authorization Roles/Permissions: Must be logged in. Must be authorized to view all APIs on the developer portal: Business Admin.

This topic includes the following sections:

HTTP Method

GET

Back to top

URL

https://{hostname}/api/apis/versions

Back to top

Sample Request

Request URL #1

Returns all API versions.

https://{hostname}/api/apis/versions

Request URL #2

Returns deleted API versions.

https://{hostname}/api/apis/versions?State=com.soa.api.state.deleted

Sample request headers

Accept: application/vnd.soa.v72+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

application/vnd.soa.v72+json, application/vnd.soa.v72+xml

application/vnd.soa.v80+json, application/vnd.soa.v80+xml

application/vnd.soa.v81+json, application/vnd.soa.v81+xml

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
State Query string Optional

If a state is specified, only APIs in that state are returned. For valid values, see API States.

If this parameter is not specified, all matching results are returned.

IncludeEndpoints Query Boolean Optional Indicates whether information about endpoints should be included in the response. Default: true.
IncludeTags Query Boolean Optional Indicates whether information about tags should be included in the response. Default: false.

Back to top

Response

If successful, this operation returns HTTP status code 200, with a list of all the API versions visible to the user initiating the operation. The information is sent in JSON or XML format.

Back to top

Sample Response

The sample response below shows successful completion of this operation (sample request URL #2, deleted APIs). There is only one deleted API version.

Sample response headers: application/vnd.soa.v72+json

Status Code: 200 OK
Content-Type: application/vnd.soa.v72+json
Expires: Wed, 01 Apr 2015 15:35:29 GMT

Sample response body: application/vnd.soa.v72+json

{
  "APIVersion" : [ {
    "APIVersionID" : "aa556d1d-a35c-44b8-8aa9-85c68ece27cb.acmepaymentscorp",
    "APIID" : "931b94ae-f5f0-4c3e-844a-a375e28b82af.acmepaymentscorp",
    "Name" : "ACME Payments API (1.0)",
    "Description" : "First release",
    "Type" : "shttp",
    "Visibility" : "Limited",
    "Created" : "2015-04-01T16:28:54Z",
    "Updated" : "2015-04-01T20:38:57Z",
    "State" : "com.soa.api.state.deleted",
    "ProductionEndpointAccessAutoApproved" : true,
    "SandboxEndpointAccessAutoApproved" : true,
    "SandboxAnonymousAccessAllowed" : false,
    "ProductionAnonymousAccessAllowed" : false,
    "ResourceLevelPermissionsSupported" : true,
    "APIOwnedImplementations" : true,
    "TargetResources" : {
      "TargetResource" : [ {
        "Name" : "ACME Payments API",
        "ID" : "931b94ae-f5f0-4c3e-844a-a375e28b82af.acmepaymentscorp",
        "Type" : "api"
      } ]
    }
  }  ]
}

Back to top

Sample response headers: application/vnd.soa.v72+xml

Status Code: 200 OK
Content-Type: application/vnd.soa.v72+xml
Expires: Wed, 01 Apr 2015 15:48:56 GMT

Sample response body: application/vnd.soa.v72+xml

<?xml version="1.0" encoding="UTF-8"?>
<APIVersions xmlns="http://soa.com/xsd/api/1.0" xmlns:ns2="http://soa.com/xsd/business/1.0" 
xmlns:ns3="http://soa.com/xsd/legals/1.0" xmlns:ns4="http://soa.com/xsd/dnmodel/1.0" 
xmlns:ns5="http://soa.com/xsd/resource/1.0">
  <APIVersion>
    <APIVersionID>aa556d1d-a35c-44b8-8aa9-85c68ece27cb.acmepaymentscorp</APIVersionID>
    <APIID>931b94ae-f5f0-4c3e-844a-a375e28b82af.acmepaymentscorp</APIID>
    <Name>ACME Payments API (1.0)</Name>
    <Description>First release</Description>
    <Type>shttp</Type>
    <Visibility>Limited</Visibility>
    <Created>2015-04-01T16:28:54Z</Created>
    <Updated>2015-04-01T20:38:57Z</Updated>
    <State>com.soa.api.state.deleted</State>
    <ProductionEndpointAccessAutoApproved>true</ProductionEndpointAccessAutoApproved>
    <SandboxEndpointAccessAutoApproved>true</SandboxEndpointAccessAutoApproved>
    <SandboxAnonymousAccessAllowed>false</SandboxAnonymousAccessAllowed>
    <ProductionAnonymousAccessAllowed>false</ProductionAnonymousAccessAllowed>
    <ResourceLevelPermissionsSupported>true</ResourceLevelPermissionsSupported>
    <APIOwnedImplementations>true</APIOwnedImplementations>
    <ns4:TargetResources>
      <ns4:TargetResource>
        <ns4:Name>ACME Payments API</ns4:Name>
        <ns4:ID>931b94ae-f5f0-4c3e-844a-a375e28b82af.acmepaymentscorp</ns4:ID>
        <ns4:Type>api</ns4:Type>
      </ns4:TargetResource>
    </ns4:TargetResources>
  </APIVersion>
</APIVersions>

Back to top

Response Headers

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

Header Description
Content-Type

application/vnd.soa.v72+json, application/vnd.soa.v72+xml

application/vnd.soa.v80+json, application/vnd.soa.v80+xml

application/vnd.soa.v81+json, application/vnd.soa.v81+xml

Back to top

Response Body

Name Type Description
APIVersions APIVersions Contains information about one or more API versions.

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