GET /api/apis/versions/{APIVersionID}/licenses
Returns information about the licenses that apply to the specified API version.
Authorization Roles/Permissions: Must be a user with Read authorization to view information about the API.
This topic includes the following sections:
HTTP Method
GET
URL
https://{hostname}/api/apis/versions/{APIVersionID}/licenses
Sample Request
The example below shows a request for the license information for the specified API version.
Sample Request URL
https://{hostname}/api/apis/versions/2f12dfe6-2777-43a6-80e5-2348aff02ac8.acmepaymentscorp/licenses
Sample request headers
Accept: application/json 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 | application/json, text/xml, application/vnd.soa.v71+json, application/vnd.soa.v71+xml, 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 |
---|---|---|---|---|
APIVersionID | Path | string | Required | The unique ID for a specific API version. |
Environment | Query | string | Optional | The environment (implementation) (Sandbox or Production). If not specified, license information is returned for all environments applicable to the API. |
Response
If successful, this operation returns HTTP status code 200, with information about whether the API supports licenses, and if it does, information about the licenses that are applicable to the API.
Sample Response
The sample response below shows that there are three licenses applicable to the API: bronze, beta, and gold.
Sample response headers: application/json
Content-Type: application/json
Sample response body: application/json
{ "SupportsUnrestricted" : true, "APILicense" : [ { "LicenseDetails" : { "LicenseID" : "a8ea43ac-0330-4cce-bf0d-3605ec119b2f.acmepaymentscorp", "Name" : "Bronze", "Description" : "Read-only access at no charge. Both environments, public, approval required.", "Visibility" : "Public", "SandboxAccessAutoApproved" : false, "ProductionAccessAutoApproved" : false, "LicensePartsDetails" : { "LicensePartDetails" : [ { "Name" : "525cf514-ab10-4f3d-9975-41ded49c2d83", "Resource" : [ { "ResourceID" : "bc0f8b1b-e7a6-4f42-b835-a694fb76d92c.acmepaymentscorp", "Name" : "ReadOnly_Scope", "ShortDescription" : "Read-only operations.", "LongDescription" : "Read-only operations. Public visibility", "Visibility" : "Public", "SandboxAnonymousAccessAllowed" : false, "ProductionAnonymousAccessAllowed" : false, "ResourcePath" : "", "OAuthGrantDefaultResource" : true, "OAuthGrantUserAuthorizationRequired" : true, "BusinessID" : "tenantbusiness.acmepaymentscorp" } ] } ] }, "BusinessID" : "tenantbusiness.acmepaymentscorp", "Active" : true, "Environment" : [ "Production", "Sandbox" ], "AgreementDetails" : { "AgreementDocument" : [ ] } } }, { "LicenseDetails" : { "LicenseID" : "b35b49c9-f807-44e3-8c9d-783a09d6ae68.acmepaymentscorp", "Name" : "Beta", "Description" : "Access for beta testing, private.", "Visibility" : "Limited", "SandboxAccessAutoApproved" : false, "ProductionAccessAutoApproved" : false, "LicensePartsDetails" : { "LicensePartDetails" : [ { "Name" : "c93af63b-41ba-4a33-9288-ea18cc92fb61", "Resource" : [ { "ResourceID" : "cc10238a-d056-4953-b6a8-2a8c03e9a3e7.acmepaymentscorp", "Name" : "Beta_Scope", "ShortDescription" : "Access to beta operations.", "LongDescription" : "Access to beta operations for testing (private)", "Visibility" : "Limited", "SandboxAnonymousAccessAllowed" : false, "ProductionAnonymousAccessAllowed" : false, "ResourcePath" : "", "OAuthGrantDefaultResource" : true, "OAuthGrantUserAuthorizationRequired" : true, "BusinessID" : "tenantbusiness.acmepaymentscorp" } ] } ] }, "BusinessID" : "tenantbusiness.acmepaymentscorp", "Active" : true, "Environment" : [ "Production", "Sandbox" ], "AgreementDetails" : { "AgreementDocument" : [ ] } } }, { "LicenseDetails" : { "LicenseID" : "8ce9a929-3c68-4c27-abe1-f7848b4bd8c4.acmepaymentscorp", "Name" : "Gold", "Description" : "Full access, monthly fee.", "Visibility" : "Public", "SandboxAccessAutoApproved" : false, "ProductionAccessAutoApproved" : false, "LicensePartsDetails" : { "LicensePartDetails" : [ { "Name" : "748e774f-23d4-4444-b3ac-8d77531f7745", "Resource" : [ { "ResourceID" : "7bf71695-c016-4661-b85c-19334480d2dd.acmepaymentscorp", "Name" : "Full_Scope", "ShortDescription" : "Full access to all operations.", "LongDescription" : "Full access to all operations.", "Visibility" : "Public", "SandboxAnonymousAccessAllowed" : false, "ProductionAnonymousAccessAllowed" : false, "ResourcePath" : "", "OAuthGrantDefaultResource" : true, "OAuthGrantUserAuthorizationRequired" : true, "BusinessID" : "tenantbusiness.acmepaymentscorp" } ] } ] }, "BusinessID" : "tenantbusiness.acmepaymentscorp", "Active" : true, "Environment" : [ "Production", "Sandbox" ], "AgreementDetails" : { "AgreementDocument" : [ ] } } } ] }
Response Headers
For general information on response header values, refer to HTTP Response Headers.
Header | Description |
---|---|
Content-Type | application/json, text/xml, application/vnd.soa.v71+json, application/vnd.soa.v71+xml, 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 |
---|---|---|
APILicenses | APILicenses | Contains information about the licenses for a specified API version. |
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 |
---|---|
400 | Bad request: Returned if the client sends a malformed request; for example, invalid parameters or body content.For example, you might get this response if you forgot to replace the variable in the URL with a valid 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 APIVersionID in the request. |
500 | An error occurred processing the call. |
More information about Akana API Platform API error messages.