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 Community Manager developer portal: Business Admin.
This topic includes the following sections:
HTTP Method
GET
URL
https://{hostname}/api/apis/versions
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.
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 |
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 |
---|---|---|---|---|
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. |
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.
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" } ] } } ] }
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 |
Response Body
Name | Type | Description |
---|---|---|
APIVersions | APIVersions | Contains information about one or more API versions. |
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.