GET /api/apis/versions/{APIVersionID}/legals

Retrieves a summary of information about active legal documents for the specified API version.

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

Back to top

URL

https://{hostname}/api/apis/versions/{APIVersionID}/legals

Back to top

Sample Request

The example below shows a request for legal documents for an API.

Request URL

https://{hostname}/api/apis/versions/a4cc9f79-e8ff-4b06-ad70-2c1a08139776.acmepaymentscorp/legals?Drafts=true&Inactive=true

Sample request headers

GET /api/apis/versions/apiversion500.acmepaymentscorp/legals?Drafts=true&Inactive=true HTTP/1.1
Host: {hostname}
Accept: application/json, text/javascript, */*; q=0.01
Content-Type: application/x-www-form-urlencoded
X-Csrf-Token_acmepaymentscorp":"TokenID%3D8ed70a13-8469-11e8-b37a-b155e4eabeb8%2CexpirationTime%3D153...

Sample request body

None.

Back to top

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

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.

Back to top

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.

Back to top

Response

If successful, this operation returns HTTP status code 200, with information about the legal agreements. The information is sent as an RSS channel in XML or JSON format.

Back to top

Sample Response

The sample response below shows the requested legal agreements returned.

Sample response headers: application/json

HTTP/1.1 200 OK
Date: Fri, 25 Apr 2014 13:28:20 GMT
Content-Type: application/json

Sample response body: application/json

{
  "channel" : {
    "title" : "Agreement Documents",
    "item" : [ {
      "title" : "Basic EULA",
      "link" : "api/492f7d2e-c2c6-41f3-a113-c614bf424252.acmepaymentscorp/legal/EULA_1.txt?version=1",
      "description" : "Basic EULA for most users.",
      "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" : "EULA_1.txt",
        "domain" : "uddi:soa.com:filename"
      }, {
        "value" : "1",
        "domain" : "uddi:soa.com:version"
      }, {
        "value" : "api/492f7d2e-c2c6-41f3-a113-c614bf424252.acmepaymentscorp/legal/EULA_1.txt",
        "domain" : "uddi:soa.com:docpath"
      } ],
      "guid" : {
        "value" : "1e5039cb-45b6-4844-8c18-f27d3a7c8f41.acmepaymentscorp"
      },
      "EntityReferences" : {
        "EntityReference" : [ {
          "Title" : "1.0",
          "Guid" : "a4cc9f79-e8ff-4b06-ad70-2c1a08139776.acmepaymentscorp",
          "Category" : [ {
            "value" : "apiversion",
            "domain" : "uddi:soa.com:resourcetype"
          } ]
        }, {
          "Title" : "ACME Payments API",
          "Guid" : "492f7d2e-c2c6-41f3-a113-c614bf424252.acmepaymentscorp",
          "Category" : [ {
            "value" : "api",
            "domain" : "uddi:soa.com:resourcetype"
          } ]
        } ]
      }
    }, {
      "title" : "EULA_2.txt",
      "link" : "/content/api/492f7d2e-c2c6-41f3-a113-c614bf424252.acmepaymentscorp/legal/EULA_2.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" : "EULA_2.txt",
        "domain" : "uddi:soa.com:filename"
      }, {
        "value" : "1",
        "domain" : "uddi:soa.com:version"
      }, {
        "value" : "api/492f7d2e-c2c6-41f3-a113-c614bf424252.acmepaymentscorp/legal/EULA_2.txt",
        "domain" : "uddi:soa.com:docpath"
      } ],
      "guid" : {
        "value" : "EULA_2.txt"
      }
    } ]
  },
  "version" : "1.0"
}

Sample response headers: text/xml

HTTP/1.1 200 OK
Date: Fri, 25 Apr 2014 13:37:36 GMT
Content-Type: application/json

Sample response body: text/xml

<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:ns2="http://soa.com/xsd/business/1.0" xmlns:ns3="http://soa.com/xsd/rss/1.0" xmlns:ns4="http://soa.com/xsd/user/1.0" 
xmlns:ns5="http://soa.com/xsd/comment/1.0" xmlns:ns6="http://a9.com/-/spec/opensearch/1.1/" xmlns:ns7="http://soa.com/xsd/resource/1.0" 
xmlns:ns8="http://soa.com/xsd/legals/1.0" xmlns:ns9="http://soa.com/xsd/fault/1.0" xmlns:ns10="http://soa.com/xsd/api/1.0" 
xmlns:ns11="http://soa.com/xsd/board/1.0" xmlns:ns12="http://soa.com/xsd/search/1.0" xmlns:ns13="http://soa.com/xsd/workflow/1.0" version="1.0">
  <channel>
    <title>Agreement Documents</title>
    <item>
      <title>Basic EULA</title>
      <link>api/492f7d2e-c2c6-41f3-a113-c614bf424252.acmepaymentscorp/legal/EULA_1.txt?version=1</link>
      <description>Basic EULA for most users.</description>
      <category domain="uddi:soa.com:resourcetype">agreement</category>
      <category domain="uddi:soa.com:documenttype">com.soa.atmosphere.legals.eula</category>
      <category domain="uddi:soa.com:state">com.soa.status.active</category>
      <category domain="uddi:soa.com:filename">EULA_1.txt</category>
      <category domain="uddi:soa.com:version">1</category>
      <category domain="uddi:soa.com:docpath">api/492f7d2e-c2c6-41f3-a113-c614bf424252.acmepaymentscorp/legal/EULA_1.txt</category>
      <guid>1e5039cb-45b6-4844-8c18-f27d3a7c8f41.acmepaymentscorp</guid>
      <ns3:EntityReferences>
        <ns3:EntityReference>
          <Title>1.0</Title>
          <Guid>a4cc9f79-e8ff-4b06-ad70-2c1a08139776.acmepaymentscorp</Guid>
          <ns3:Category domain="uddi:soa.com:resourcetype">apiversion</ns3:Category>
        </ns3:EntityReference>
        <ns3:EntityReference>
          <Title>ACME Payments API</Title>
          <Guid>492f7d2e-c2c6-41f3-a113-c614bf424252.acmepaymentscorp</Guid>
          <ns3:Category domain="uddi:soa.com:resourcetype">api</ns3:Category>
        </ns3:EntityReference>
      </ns3:EntityReferences>
    </item>
    <item>
      <title>EULA_2.txt</title>
      <link>/content/api/492f7d2e-c2c6-41f3-a113-c614bf424252.acmepaymentscorp/legal/EULA_2.txt?version=1</link>
      <category domain="uddi:soa.com:resourcetype">agreement</category>
      <category domain="uddi:soa.com:documenttype" />
      <category domain="uddi:soa.com:state">com.soa.status.draft</category>
      <category domain="uddi:soa.com:filename">EULA_2.txt</category>
      <category domain="uddi:soa.com:version">1</category>
      <category domain="uddi:soa.com:docpath">api/492f7d2e-c2c6-41f3-a113-c614bf424252.acmepaymentscorp/legal/EULA_2.txt</category>
      <guid>EULA_2.txt</guid>
    </item>
  </channel>
</rss>

Back to top

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

Back to top

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:

  • Resource type: the type of resource.
  • Document type: the legal document type(for values, see Legal Agreement Types).
  • Document State: the legal document state (for values, see Legal Document States).
  • Filename: the filename for the legal document, including extension.
  • Version: the API version that the legal document applies to.
  • Document path: the unique LegalDocumentID for the document.
guid GUID for the legal agreement; the LegalDocumentID.
EntityReferences

One or more entity references. Each includes:

  • GUID: GUID for the API version the legal agreement relates to.

Back to top

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.

Back to top

Related Topics