GET /api/apis/versions/{APIVersionID}/legals
Retrieves a summary of information about active legal documents for the specified API version in RSS format.
For more information about managing legal agreements for your API, see Managing Legal Agreements on the Platform.
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/a4cc9f79-e8ff-4b06-ad70-2c1a08139776.acmepaymentscorp/legals?Drafts=true&Inactive=true
Sample request headers
Accept: application/json, text/javascript, */*; q=0.01 X-Csrf-Token_acmepaymentscorp: TokenID%3D8ed70a13-8469-11e8-b37a-b155e4eabeb8%2CexpirationTime%3D153...
Sample request body
None.
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. |
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 as an RSS channel.
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: application/json
HTTP/1.1 200 OK Date: Wed, 14 Oct 2020 20:44:32 GMT Content-Type: application/json
Sample response body: application/json
{ "channel":{ "title":"Agreement Documents", "item":[ { "title":"Swagger_Petstore_Test legal agreement", "link":"api/305c47eb-54c7-4db7-967c-f9cdeb3416d4.acmepaymentscorp/legal/api_eula.txt?version=1", "description":"Swagger_Petstore_Test legal agreement", "category":[ { "value":"agreement", "domain":"uddi:soa.com:resourcetype" }, { "value":"com.soa.atmosphere.legals.eula", "domain":"uddi:soa.com:documenttype" }, { "value":"com.soa.status.active", "domain":"uddi:soa.com:state" }, { "value":"api_eula.txt", "domain":"uddi:soa.com:filename" }, { "value":"1", "domain":"uddi:soa.com:version" }, { "value":"api/305c47eb-54c7-4db7-967c-f9cdeb3416d4.acmepaymentscorp/legal/api_eula.txt", "domain":"uddi:soa.com:docpath" } ], "guid":{ "value":"e2e6168a-8ffb-4f88-9a00-344371e5ef03.acmepaymentscorp" }, "EntityReferences":{ "EntityReference":[ { "Title":"1.0.5", "Guid":"70ad8d6b-3c1f-4ab2-8dc3-a566093bc03a.acmepaymentscorp", "Category":[ { "value":"apiversion", "domain":"uddi:soa.com:resourcetype" } ] }, { "Title":"Swagger_Petstore_Test", "Guid":"305c47eb-54c7-4db7-967c-f9cdeb3416d4.acmepaymentscorp", "Category":[ { "value":"api", "domain":"uddi:soa.com:resourcetype" } ] } ] } }, { "title":"api_eula_updated.txt", "link":"/content/api/305c47eb-54c7-4db7-967c-f9cdeb3416d4.acmepaymentscorp/legal/api_eula_updated.txt?version=1", "category":[ { "value":"agreement", "domain":"uddi:soa.com:resourcetype" }, { "domain":"uddi:soa.com:documenttype" }, { "value":"com.soa.status.draft", "domain":"uddi:soa.com:state" }, { "value":"api_eula_updated.txt", "domain":"uddi:soa.com:filename" }, { "value":"1", "domain":"uddi:soa.com:version" }, { "value":"api/305c47eb-54c7-4db7-967c-f9cdeb3416d4.acmepaymentscorp/legal/api_eula_updated.txt", "domain":"uddi:soa.com:docpath" } ], "guid":{ "value":"api_eula_updated.txt" } } ] }, "version":"1.0" }
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
The response body is in the form of an RSS channel, and includes the items listed below. The RSS version is 1.0. The title of the RSS channel is Agreement Documents. Each item in the channel represents an agreement document, and includes the information listed below.
Name | Description |
---|---|
title | The title of the legal agreement document. |
link | URL for the agreement document on the server. |
description | User-defined description of the agreement document. |
category |
One or more categories. Each category is a set of two name/value pairs. The second item defines the Domain, and the first defines the actual value for the property. For example, the set of values below shows that the document type is a legal eula (end-user licensing agreement) document: { "value" : "com.soa.atmosphere.legals.eula", "domain" : "uddi:soa.com:documenttype" } The categories are:
|
guid | GUID for the legal agreement; the LegalDocumentID. |
EntityReferences |
One or more entity references. Each includes:
|
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.