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

Request URL #1

Requests information about the platform signup document.

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

Request URL #2

Requests information about the legal agreement for the specified API version.

https://{hostname}/api/legals?ResourceID=e55ec961-c4bc-4da5-b289-24d344a07cdd.acmepaymentscorp

Sample request headers

Accept: application/vnd.soa.v81+xml

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

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 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: Thu, 11 Jan 2018 17:56:33 GMT

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

{
  "AgreementDocument":[
    {
      "DocumentID":"29b619ed-b4ee-4a5c-b6dc-695714c087a4.acmepaymentscorp",
      "Name":"SwaggerPetstoreLegal",
      "Description":"SwaggerPetstoreLegal",
      "AgreementType":"com.soa.atmosphere.legals.eula",
      "ResourceID":"e55ec961-c4bc-4da5-b289-24d344a07cdd.acmepaymentscorp",
      "ResourceType":"apiversion",
      "ContentPath":"api/90280da2-c33d-45c0-8ce3-93fb930dbb97.acmepaymentscorp/legal/legalagreement.txt",
      "MetadataResourceURI":"tenants/acmepaymentscorp/content/api/90280da2-c33d-45c0-8ce3-93fb930dbb97.acmepaymentscorp/legal/legalagreement.txt",
      "MetadataResourceVersion":1,
      "Active":true,
      "PrintContentPath":"api/90280da2-c33d-45c0-8ce3-93fb930dbb97.acmepaymentscorp/legal/legalagreement.txt",
      "PrintResourceURI":"tenants/acmepaymentscorp/content/api/90280da2-c33d-45c0-8ce3-93fb930dbb97.acmepaymentscorp/legal/legalagreement.txt",
      "PrintVersion":1,
      "DocumentState":"com.soa.status.active",
      "FileName":"legalagreement.txt",
      "Link":"api/90280da2-c33d-45c0-8ce3-93fb930dbb97.acmepaymentscorp/legal/legalagreement.txt?version=1",
      "TargetResources":{
        "TargetResource":[
          {
            "Name":"Swagger_Petstore_Subset",
            "ID":"90280da2-c33d-45c0-8ce3-93fb930dbb97.acmepaymentscorp",
            "Type":"api"
          }
        ]
      }
    }
  ]
}

Back to top

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

Status Code: 200 OK
Content-Type: application/vnd.soa.v81+xml
Date: Thu, 11 Jan 2018 18:00:27 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>29b619ed-b4ee-4a5c-b6dc-695714c087a4.acmepaymentscorp</DocumentID>
    <Name>SwaggerPetstoreLegal</Name>
    <Description>SwaggerPetstoreLegal</Description>
    <AgreementType>com.soa.atmosphere.legals.eula</AgreementType>
    <ResourceID>e55ec961-c4bc-4da5-b289-24d344a07cdd.acmepaymentscorp</ResourceID>
    <ResourceType>apiversion</ResourceType>
    <ContentPath>api/90280da2-c33d-45c0-8ce3-93fb930dbb97.acmepaymentscorp/legal/legalagreement.txt</ContentPath>
    <MetadataResourceURI>tenants/acmepaymentscorp/content/api/90280da2-c33d-45c0-8ce3-93fb930dbb97.acmepaymentscorp/legal/legalagreement.txt</MetadataResourceURI>
    <MetadataResourceVersion>1</MetadataResourceVersion>
    <Active>true</Active>
    <PrintContentPath>api/90280da2-c33d-45c0-8ce3-93fb930dbb97.acmepaymentscorp/legal/legalagreement.txt</PrintContentPath>
    <PrintResourceURI>tenants/acmepaymentscorp/content/api/90280da2-c33d-45c0-8ce3-93fb930dbb97.acmepaymentscorp/legal/legalagreement.txt</PrintResourceURI>
    <PrintVersion>1</PrintVersion>
    <DocumentState>com.soa.status.active</DocumentState>
    <FileName>legalagreement.txt</FileName>
    <Link>api/90280da2-c33d-45c0-8ce3-93fb930dbb97.acmepaymentscorp/legal/legalagreement.txt?version=1</Link>
    <ns2:TargetResources>
      <ns2:TargetResource>
        <ns2:Name>Swagger_Petstore_Subset</ns2:Name>
        <ns2:ID>90280da2-c33d-45c0-8ce3-93fb930dbb97.acmepaymentscorp</ns2:ID>
        <ns2:Type>api</ns2:Type>
      </ns2:TargetResource>
    </ns2:TargetResources>
  </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. 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