GET /api/apps/versions/{AppVersionID}/apilegals

Returns the legal documents associated with an API that an app is connecting to.

Authorization Roles/Permissions: None.

This topic includes the following sections:

HTTP Method

GET

Back to top

URL

https://{hostname}/api/apps/versions/{AppVersionID}/apilegals

Back to top

Sample Request

The example below shows a request for the legal documents for the specified API version.

Sample request URL #1

https://{hostname}/api/apps/versions/6A2GwiVxJCp5AuUemLnKBA5n.acmepaymentscorp/apilegals

Sample request URL #2 (with parameter)

https://{hostname}/api/apps/versions/9CA3Avaz8e96zMUKhaL4mM4s.acmepaymentscorp/apilegals?State=com.soa.app.apilegal.pending

Sample request headers

GET /api/apps/versions/9CA3Avaz8e96zMUKhaL4mM4s.acmepaymentscorp/apilegals?State=com.soa.app.apilegal.pending HTTP/1.1
Host: {hostname}
Accept: application/json, text/javascript, */*; q=0.01
X-Csrf-Token_acmepaymentscorp":"TokenID%3D8ed70a13-8469-11e8-b37a-b155e4eabeb8%2CexpirationTime%3D153...

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/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
AppVersionID Path string Required The unique ID for a specific app version.
APIVersionID Path string Required The unique ID for a specific API version.
State Query string Optional If a state is specified, only legal documents in that state are returned. Possible values: com.soa.status.active, com.soa.status.inactive. For more information, see Legal Document State.
Federation Query boolean Optional

Indicates whether the current implementation is a federation.

If not specified, defaults to true.

Back to top

Response

If successful, this operation returns HTTP status code 200, with information about the legal agreement documents for the specified API version. The response is returned as an RSS feed in JSON format.

Back to top

Sample Response

The sample response below shows that there are no legal agreement documents for this API version.

Sample response headers

HTTP/1.1 200 OK
Date: Tue, 22 Apr 2014 15:12:56 GMT
Content-Type: application/json

Sample response body

The example below is the response to Sample Request #1 above.

{
  "channel" : {
    "title" : "Agreement Documents",
    "item" : [ {
      "title" : "Supplementary EULA",
      "link" : "api/bdb478d6-8221-4d27-85d7-fc9379a6428f.acmepaymentscorp/legal/EULA_2.txt?version=1",
      "description" : "Supplementary EULA",
      "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_2.txt",
        "domain" : "uddi:soa.com:filename"
      }, {
        "value" : "1",
        "domain" : "uddi:soa.com:version"
      }, {
        "value" : "api/bdb478d6-8221-4d27-85d7-fc9379a6428f.acmepaymentscorp/legal/EULA_2.txt",
        "domain" : "uddi:soa.com:docpath"
      } ],
      "guid" : {
        "value" : "79291101-27d7-4f3a-89d7-0feb0358d1e8.acmepaymentscorp"
      },
      "EntityReferences" : {
        "EntityReference" : [ {
          "Title" : "1.0",
          "Guid" : "cd5d0680-82cc-4e8f-98ae-09fc622a3bcc.acmepaymentscorp",
          "Category" : [ {
            "value" : "apiversion",
            "domain" : "uddi:soa.com:resourcetype"
          } ]
        }, {
          "Title" : "ACME Payments API",
          "Guid" : "bdb478d6-8221-4d27-85d7-fc9379a6428f.acmepaymentscorp",
          "Category" : [ {
            "value" : "api",
            "domain" : "uddi:soa.com:resourcetype"
          } ]
        } ]
      }
    }, {
      "title" : "Basic EULA",
      "link" : "api/bdb478d6-8221-4d27-85d7-fc9379a6428f.acmepaymentscorp/legal/EULA_1.txt?version=1",
      "description" : "Basic EULA for all contracts.",
      "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/bdb478d6-8221-4d27-85d7-fc9379a6428f.acmepaymentscorp/legal/EULA_1.txt",
        "domain" : "uddi:soa.com:docpath"
      } ],
      "guid" : {
        "value" : "69e20bfb-8bac-491f-94c6-f91b0e7a88c6.acmepaymentscorp"
      },
      "EntityReferences" : {
        "EntityReference" : [ {
          "Title" : "1.0",
          "Guid" : "cd5d0680-82cc-4e8f-98ae-09fc622a3bcc.acmepaymentscorp",
          "Category" : [ {
            "value" : "apiversion",
            "domain" : "uddi:soa.com:resourcetype"
          } ]
        }, {
          "Title" : "ACME Payments API",
          "Guid" : "bdb478d6-8221-4d27-85d7-fc9379a6428f.acmepaymentscorp",
          "Category" : [ {
            "value" : "api",
            "domain" : "uddi:soa.com:resourcetype"
          } ]
        } ]
      }
    } ]
  },
  "version" : "1.0"
}

Back to top

Response Headers

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

Header Description
Content-Type 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 type is a legal eula (end-user licensing agreement) document:

{
  "value" : "com.soa.atmosphere.legals.eula",
  "domain" : "uddi:soa.com:documenttype"
}

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
  • Filename: uddi:soa.com:filename
  • Version: uddi:soa.com:version
  • Document path: uddi:soa.com:docpath
guid GUID for the legal agreement.
EntityReferences

One or more entity references. Each includes:

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

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