GET /api/apis/versions/{APIVersionID}/legals
Retrieves a summary of information about active legal documents for the specified API version. The response is in JSON format.
Authorization Roles/Permissions: Must have Read permission for the resource.
This topic includes the following sections:
HTTP Method
GET
URL
https://{hostname}/api/apis/versions/{APIVersionID}/legals
Sample Request
The example below shows a request for legal documents for an API. Inactive and Draft legal agreements are also requested.
Sample Request URL
https://{hostname}/api/apis/versions/70ad8d6b-3c1f-4ab2-8dc3-a566093bc03a.acmepaymentscorp/legals?Drafts=true&Inactive=true
Sample request headers
Accept: application/vnd.akana.v2020+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/vnd.akana.v2020+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. |
Drafts | Query | boolean | Optional | Optional parameter indicating whether legal documents with a legal document state value of Draft should be included in the results returned. Defaults to false; if this parameter is not specified, drafts are not included. |
Inactive | Query | boolean | Optional | Optional parameter indicating whether legal documents with a state of inactive should be included in the results returned. Defaults to false; if not specified, inactive documents are not included. |
Response
If successful, this operation returns HTTP status code 200, with information about the legal agreements. The information is sent in JSON format.
Sample Response
The sample response below shows the requested legal agreements returned. Draft and Inactive documents are included, as specified in the sample request.
Sample response headers
HTTP/1.1 200 OK Date: Wed, 14 Oct 2020 20:39:10 GMT Content-Type: application/vnd.akana.v2020+json
Sample response body
{ "AgreementDocument":[ { "DocumentID":"e2e6168a-8ffb-4f88-9a00-344371e5ef03.acmepaymentscorp", "Name":"Swagger_Petstore_Test legal agreement", "Description":"Swagger_Petstore_Test legal agreement", "AgreementType":"com.soa.atmosphere.legals.eula", "ResourceID":"70ad8d6b-3c1f-4ab2-8dc3-a566093bc03a.acmepaymentscorp", "ContentPath":"api/305c47eb-54c7-4db7-967c-f9cdeb3416d4.acmepaymentscorp/legal/api_eula.txt", "MetadataResourceURI":"tenants/acmepaymentscorp/content/api/305c47eb-54c7-4db7-967c-f9cdeb3416d4.acmepaymentscorp/legal/api_eula.txt", "MetadataResourceVersion":1, "Active":true, "PrintContentPath":"api/305c47eb-54c7-4db7-967c-f9cdeb3416d4.acmepaymentscorp/legal/api_eula.txt", "PrintResourceURI":"tenants/acmepaymentscorp/content/api/305c47eb-54c7-4db7-967c-f9cdeb3416d4.acmepaymentscorp/legal/api_eula.txt", "PrintVersion":1, "DocumentState":"com.soa.status.active", "FileName":"api_eula.txt" }, { "Name":"api_eula_updated.txt", "ContentPath":"/content/api/305c47eb-54c7-4db7-967c-f9cdeb3416d4.acmepaymentscorp/legal/api_eula_updated.txt", "MetadataResourceURI":"tenants/acmepaymentscorp/content/api/305c47eb-54c7-4db7-967c-f9cdeb3416d4.acmepaymentscorp/legal/api_eula_updated.txt", "MetadataResourceVersion":1, "Active":false, "PrintContentPath":"api/305c47eb-54c7-4db7-967c-f9cdeb3416d4.acmepaymentscorp/legal/api_eula_updated.txt", "DocumentState":"com.soa.status.draft", "FileName":"api_eula_updated.txt" } ] }
Response Headers
For general information on response header values, refer to HTTP Response Headers.
Header | Description |
---|---|
Content-Type | application/vnd.akana.v2020+json |
Response Body
Name | Type | Description |
---|---|---|
AgreementDocuments | AgreementDocuments | Contains Information about the legal agreement documents matching the specified criteria. |
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.