GET /api/apis/versions/{ApiVersionID}/implementations/{ImplCode}/policies
Returns information about the policies assigned to the specified implementation for the specified API version, including policies assigned to individual operations in the implementation.
Authorization Roles/Permissions: Must be logged in and have permission to view the requested resources. If the user is logged in but doesn't have permission to view certain resources, the operation works, but limited (or empty) results are returned.
This topic includes the following sections:
HTTP Method
GET
URL
https://{hostname}/api/apis/versions/{ApiVersionID}/implementations/{ImplCode}/policies
Sample Request
The example below shows a request for information about the policies assigned to the specified implementation for the specified API version. There are two policies assigned.
Sample Request URL
https://{hostname}/api/apis/versions/4a1a513f-2758-48a9-8103-d869793e2ac8.acmepaymentscorp/implementations/Live/policies
Sample request headers
Accept: application/vnd.soa.v81+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, application/vnd.soa.v81+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 |
---|---|---|---|---|
APIVersionID | Path | string | Required | The unique ID for a specific API version. |
ImplCode | Path | string | Required | A code for a specific implementation. Valid values: Live or Sandbox. |
IncludeImpliedPolicies | Path | Boolean | Optional |
If set to true, implied policies are also included in the response. These are policies that are assigned to ancestors. For example, policies assigned to the platform tenant will apply to all services. If this parameter is set to true, all policies assigned to services, including inherited policy assignments, are returned. Default: false. |
Response
If successful, this operation returns HTTP status code 200, with information about the policies assigned to the specified API version implementation.
Sample Response
The sample response below shows successful completion of this operation. In this example, there is one policy attached to the service, and one policy attached to one operation.
Sample response headers
Status Code: 200 OK Content-Type: application/json Date: Fri, 20 Nov 2020 14:18:31 GMT
Sample response body
{ "Policy": [ { "PolicyKey": "acmepaymentscorp-AtmosphereApplicationSecurityPolicy", "Name": "AtmosphereApplicationSecurityPolicy", "Description": "", "PolicyType": "Operational Policy", "PolicySubType": "policy.apisec" } ], "ApiOperationPolicy": [ { "Operation": { "Name": "addPet", "Method": "POST", "Path": "/pet", "InputContentType": "application/xml,application/json", "OutputContentType": "application/xml,application/json", "FaultContentType": "", "Input": [ { "Name": "body", "Type": "entity" } ], "OperationKey": "4f30020e-5304-4f6e-a9cb-8a986caecde8", "InterfaceQName": "{Swagger_Petstore_5_Operations_v1}Swagger_Petstore_5_Operations_PortType_0", "WsdlOperationName": "addPet" }, "Policy": [ { "PolicyKey": "acmepaymentscorp-DetailedAuditing", "Name": "DetailedAuditing", "Description": "", "PolicyType": "Operational Policy", "PolicySubType": "policy.auditservice" } ] }, { "Operation": { "Name": "findPetsByStatus", "Method": "GET", "Path": "/pet/findByStatus", "InputContentType": "", "OutputContentType": "application/xml,application/json", "FaultContentType": "", "Input": [ { "Name": "status", "Type": "query" } ], "OperationKey": "d45d2614-9f22-4cc0-893e-10c0b4338d5f", "InterfaceQName": "{Swagger_Petstore_5_Operations_v1}Swagger_Petstore_5_Operations_PortType_0", "WsdlOperationName": "findPetsByStatus" } } ] }
Response Headers
For general information on response header values, refer to HTTP Response Headers.
Header | Description |
---|---|
Content-Type | application/json, application/vnd.soa.v81+json |
Response Body
Name | Type | Description |
---|---|---|
ApiPolicies Valid in version: 2020.0.0 and later |
ApiPolicies |
Contains information about the policies assigned to an API or API implementation. Note: In versions prior to 2020.2.0, this operation used the Policies model object. |
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.