GET /api/legals?AgreementType={LegalAgreementType}

Returns information about all legal agreement documents matching the specified criteria, in the form of a JSON or XML object.

Authorization Roles/Permissions: Anyone can use this operation; login is not required. However, note that for any operations that do not require login, information about private resources is not returned unless the user is logged in and is authorized to view information about those resources. Without login, only public information is returned. Permission is limited to API visibility.

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 example below shows a request for any signup agreements on the platform.

Request URL

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

Sample request headers

Accept: application/vnd.soa.v81+xml
X-Csrf-Token_{tenant}: {TokenID}

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

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

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 the legal agreement information.

Back to top

Sample Response

The sample response below shows successful completion of this operation.

Sample response headers: application/vnd.soa.v81+json

Status Code: 200 OK
Content-Type: application/vnd.soa.v81+json
Date: Fri, 29 Apr 2016 14:24:27 GMT

Sample response body: application/vnd.soa.v81+json

{
  "AgreementDocument" : [ {
    "DocumentID" : "signupagrmtv1.atmosphere",
    "Name" : "Atmosphere Signup Agreement v1",
    "Description" : "Atmosphere Developer Agreement",
    "AgreementType" : "com.soa.atmosphere.legals.signup",
    "ContentPath" : "/home/landing/developeragreement_open.html",
    "MetadataResourceURI" : "tenants/atmosphere/content/home/landing/developeragreement_open.html",
    "MetadataResourceVersion" : 0,
    "Active" : true,
    "PrintContentPath" : "/home/landing/developeragreement_open.pdf",
    "PrintResourceURI" : "tenants/atmosphere/content/home/landing/developeragreement_open.pdf",
    "PrintVersion" : 0,
    "DocumentState" : "com.soa.status.active",
    "FileName" : "developeragreement_open.html",
    "Link" : "/home/landing/developeragreement_open.html?version=0"
  } ]
}

Back to top

Sample response headers: application/vnd.soa.v81+xml

Status Code: 200 OK
Content-Type: application/vnd.soa.v81+xml
Date: Fri, 29 Apr 2016 14:25:53 GMT

Sample response body: application/vnd.soa.v81+xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AgreementDocuments xmlns="http://soa.com/xsd/legals/1.0" xmlns:ns2="http://soa.com/xsd/dnmodel/1.0" 
xmlns:ns3="http://soa.com/xsd/user/1.0">
  <AgreementDocument>
    <DocumentID>signupagrmtv1.atmosphere</DocumentID>
    <Name>Atmosphere Signup Agreement v1</Name>
    <Description>Atmosphere Developer Agreement</Description>
    <AgreementType>com.soa.atmosphere.legals.signup</AgreementType>
    <ContentPath>/home/landing/developeragreement_open.html</ContentPath>
    <MetadataResourceURI>tenants/atmosphere/content/home/landing/developeragreement_open.html</MetadataResourceURI>
    <MetadataResourceVersion>0</MetadataResourceVersion>
    <Active>true</Active>
    <PrintContentPath>/home/landing/developeragreement_open.pdf</PrintContentPath>
    <PrintResourceURI>tenants/atmosphere/content/home/landing/developeragreement_open.pdf</PrintResourceURI>
    <PrintVersion>0</PrintVersion>
    <DocumentState>com.soa.status.active</DocumentState>
    <FileName>developeragreement_open.html</FileName>
    <Link>/home/landing/developeragreement_open.html?version=0</Link>
  </AgreementDocument>
</AgreementDocuments>

Back to top

Response Headers

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

Header Description
Content-Type

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

Name Type Description
AgreementDocuments AgreementDocuments Contains Information about the legal agreement documents matching the specified criteria.

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.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.

Back to top

Related Topics