GET /api/legals?AgreementType={LegalAgreementType}

Returns a summary of information about a specific type of legal agreement documents on the platform, in the form of an RSS feed.

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/legals?AgreementType={LegalAgreementType}

Sample Request

The examples below show requests for legal agreement documents of type signup (for developers signing up to use the platform).

Request URL #1

Returns all legal agreements of the specified agreement type.

https://{hostname}/api/legals?AgreementType=com.soa.atmosphere.legals.signup

Request URL #2

Returns the legal document with the specified LegalDocumentID. Note the first parameter is still required.

https://{hostname}/api/legals?AgreementType=com.soa.atmosphere.legals.signup&ResourceID=signupagrmtv1.acmepaymentscorp

Sample request headers

Accept: application/json

Sample request body

Not applicable.

Request Headers

For general information on request header values, refer to HTTP Request Headers.

Header Description
Accept text/xml or application/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
AgreementType Query string Required

The type of legal agreement to be returned in the response. For valid values, refer to Legal Agreement Types.

Required unless ResourceID parameter is present.

ResourceID Query string Optional

The unique ID for a specific resource; for example, the ScopeID or the APIVersionID.

In this case it is the LegalDocumentID for a specific legal agreement document.

Required if AgreementType parameter is not present.

Response

If successful, this operation returns HTTP status code 200, with information about the agreement documents in the form of an RSS feed.

Sample Response

The sample response below shows successful completion of the operation. The first example (JSON) shows the response to sample request #1, with two documents returned, and the second (text/XML) shows the response to sample request #2, with the specified document returned.

Sample response headers: application/json

Status Code: 200 OK
Content-Type: application/json
Date: Wed, 12 Dec 2018 22:39:28 GMT

Sample response body: application/json

{
  "channel" : {
    "title" : "Agreement Documents",
    "item" : [ {
      "title" : "Acmecorp Signup Agreement v1",
      "link" : "/home/landing/developeragreement_acmepaymentscorp.html?version=1",
      "description" : "Acmecorp Developer Agreement",
      "category" : [ {
        "value" : "agreement",
        "domain" : "uddi:soa.com:resourcetype"
      }, {
        "value" : "com.soa.atmosphere.legals.signup",
        "domain" : "uddi:soa.com:documenttype"
      }, {
        "value" : "com.soa.status.active",
        "domain" : "uddi:soa.com:state"
      }, {
        "value" : "developeragreement_acmepaymentscorp.html",
        "domain" : "uddi:soa.com:filename"
      }, {
        "value" : "1",
        "domain" : "uddi:soa.com:version"
      }, {
        "value" : "/home/landing/developeragreement_acmepaymentscorp.pdf",
        "domain" : "uddi:soa.com:docpath"
      } ],
      "guid" : {
        "value" : "signupagrmtv1.acmepaymentscorp"
      }
    } ]
  },
  "version" : "1.0"
}

Response Headers

For general information on response header values, refer to HTTP Response Headers.

Header Description
Content-Type text/xml or application/json

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 is in a state of active:

{
  "value" : "com.soa.status.active",
  "domain" : "uddi:soa.com:state"
}

The domains for which values are defined are:

  • Resource type: uddi:soa.com:resourcetype
  • Document type: uddi:soa.com:documenttype
  • Document State: uddi:soa.com:state (for values, see Legal Document States).
  • Filename: uddi:soa.com:filename
  • Version: uddi:soa.com:version
  • Document path: uddi:soa.com:docpath
guid GUID for the legal agreement; the LegalDocumentID.

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 don't include a parameter; either the AgreementType or ResourceID parameter must be present.
404 The resource could not be found. For example, you might get this if you used an incorrect media type for the Accept header.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.