GET /api/apis/{APIID}
Returns information about an API. With optional parameter, also returns the settings for the API.
Authorization Roles/Permissions: Must have Read permission for the resource.
This topic includes the following sections:
HTTP Method
GET
URL
https://{hostname}/api/apis/{APIID}[?includeDefaultVersion=boolean][?IncludeSettings=boolean]
Sample Request
The example below shows a request for a specific API, with the optional settings included.
Sample Request URL
https://{hostname}/api/apis/12770263-e036-4222-b8eb-87d33676d3ad.acmepaymentscorp?IncludeSettings=true
Sample request headers
GET /api/apis/12770263-e036-4222-b8eb-87d33676d3ad.acmepaymentscorp?IncludeSettings=true 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.
Request Headers
For general information on request header values, refer to HTTP Request Headers.
Header | Description |
---|---|
Accept |
Any of the following media types is valid for the Accept header: application/json, application/vnd.soa.v71+json, application/vnd.soa.v72+json, application/vnd.soa.v80+json, application/vnd.soa.v81+json, application/vnd.soa.v83+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 |
---|---|---|---|---|
APIID | Path | string | Required | The unique ID for a specific API. |
includeDefaultVersion | Query | boolean | Optional | Indicates whether to include the default version in the information returned. If not specified, defaults to false. |
IncludeSettings | Query | boolean | Optional | Indicates whether the settings for the resource should be included in the response. If not specified, defaults to false. |
Response
If successful, this operation returns HTTP status code 200, with information about the API.
Sample Response
Examples below:
- #1: Sample response body without optional parameters. Shows the information returned about the ACME Payments API. The information is returned as a JSON object.
- #2: Sample response body with optional request parameter IncludeSettings=true
Sample response headers
HTTP/1.1 200 OK Date: Tue, 23 Jan 2018 20:05:59 GMT Content-Type: application/json
#1: Sample response body without optional parameters
{ "APIID":"c31049c0-6121-49f3-b862-db96c651a5ad.acmepaymentscorp", "Name":"Swagger_Petstore_Subset", "Description":"Subset (6 operations) of the Swagger JSON file from petstore.swagger.io.", "Visibility":"Public", "LatestVersionID":"8c1e9304-f5c9-47c4-b8a1-c7dc0a72a1e3.acmepaymentscorp", "IsFollowed":false, "RatingSummary":{ "Five":0, "Four":0, "Three":0, "Two":0, "One":0 }, "AdminGroupID":"apiadmin-c31049c0-6121-49f3-b862-db96c651a5ad.acmepaymentscorp", "Created":"2018-01-23T19:59:43Z", "Updated":"2018-01-23T19:59:43Z", "AvatarURL":"http://testing.acmepaymentscorp.com/api/apis/avatar/_Vf7z2dQ6XivNC8ORmMpyMAA", "BusinessID":"tenantbusiness.acmepaymentscorp", "TargetResources":{ "TargetResource":[ { "Name":"Tenant - acmepaymentscorp", "ID":"tenantbusiness.acmepaymentscorp", "Type":"business" } ] }, "OrganizationKey":"uddi:f2ecbf31-0077-11e8-ab8e-bf81c7147c98" }
#2: Sample response body with optional request parameter IncludeSettings=true
{ "APIID":"c31049c0-6121-49f3-b862-db96c651a5ad.acmepaymentscorp", "Name":"Swagger_Petstore_Subset", "Description":"Subset (6 operations) of the Swagger JSON file from petstore.swagger.io.", "Visibility":"Public", "LatestVersionID":"8c1e9304-f5c9-47c4-b8a1-c7dc0a72a1e3.acmepaymentscorp", "IsFollowed":false, "RatingSummary":{ "Five":0, "Four":0, "Three":0, "Two":0, "One":0 }, "AdminGroupID":"apiadmin-c31049c0-6121-49f3-b862-db96c651a5ad.acmepaymentscorp", "Created":"2018-01-23T19:59:43Z", "Updated":"2018-01-23T19:59:43Z", "AvatarURL":"http://testing.acmepaymentscorp.com/api/apis/avatar/_Vf7z2dQ6XivNC8ORmMpyMAA", "APISettings":{ "PublicAPISupport":"com.soa.feature.enabled", "PublicAPISandboxEndpointSupport":"com.soa.feature.enabled", "PublicAPIProductionEndpointSupport":"com.soa.feature.enabled", "PublicAPISandboxAutoApprovalSupport":"com.soa.feature.enabled", "PublicAPIProductionAutoApprovalSupport":"com.soa.feature.enabled", "PublicAPIBoardSupport":"com.soa.feature.enabled", "PublicAPIRatingsSupport":"com.soa.feature.enabled", "PublicAPIReviewsSupport":"com.soa.feature.enabled", "PrivateAPISupport":"com.soa.feature.enabled", "PrivateAPISandboxEndpointSupport":"com.soa.feature.enabled", "PrivateAPIProductionEndpointSupport":"com.soa.feature.enabled", "PrivateAPISandboxAutoApprovalSupport":"com.soa.feature.enabled", "PrivateAPIProductionAutoApprovalSupport":"com.soa.feature.enabled", "PrivateAPIGroupTypeSupport":"com.soa.feature.disabled", "PrivateAPIIndependentGroupSupport":"com.soa.feature.enabled", "PrivateAPIBoardSupport":"com.soa.feature.enabled", "PrivateAPIRatingsSupport":"com.soa.feature.enabled", "PrivateAPIReviewsSupport":"com.soa.feature.enabled", "PublicAPIResourceLevelPermissionsSupport":"com.soa.feature.enabled", "PrivateAPIResourceLevelPermissionsSupport":"com.soa.feature.enabled", "ValidateUniqueContextPath":"com.soa.feature.disabled" }, "BusinessID":"tenantbusiness.acmepaymentscorp", "TargetResources":{ "TargetResource":[ { "Name":"Tenant - acmepaymentscorp", "ID":"tenantbusiness.acmepaymentscorp", "Type":"business" } ] }, "OrganizationKey":"uddi:f2ecbf31-0077-11e8-ab8e-bf81c7147c98" }
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, application/vnd.soa.v81+json, application/vnd.soa.v83+json |
Response Body
Name | Type | Description |
---|---|---|
API | API | Contains information about an API. |
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. |
404 | The resource could not be found. For example, you might get this if you include an invalid APIID in the request. |
500 | An error occurred processing the call. |
More information about Akana API Platform API error messages.