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

Back to top

URL

https://{hostname}/api/legals?AgreementType={LegalAgreementType}

Back to top

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.

Back to top

Request Headers

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

Header Description
Accept text/xml or application/json
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
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.

Back to top

Response

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

Back to top

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: Fri, 02 May 2014 19:20:00 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"
}

Back to top

Sample response headers: text/xml

Accept: text/xml

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/user/1.0" xmlns:ns4="http://soa.com/xsd/rss/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>Acmecorp Signup Agreement v1</title>
      <link>/home/landing/developeragreement_open.html?version=1</link>
      <description>Acmecorp Developer Agreement</description>
      <category domain="uddi:soa.com:resourcetype">agreement</category>
      <category domain="uddi:soa.com:documenttype">com.soa.atmosphere.legals.signup</category>
      <category domain="uddi:soa.com:state">com.soa.status.active</category>
      <category domain="uddi:soa.com:filename">developeragreement_open.html</category>
      <category domain="uddi:soa.com:version">1</category>
      <category domain="uddi:soa.com:docpath">/home/landing/developeragreement_acmepaymentscorp.pdf</category>
      <guid>signupagrmtv1.acmepaymentscorp</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 text/xml or application/json

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 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.

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
400 Bad request: Returned if the client sends 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.

Back to top

Related Topics