DELETE /api/apis/versions/{APIVersionID}/legals/{LegalDocumentID}

Deletes the association between a specific legal agreement document and an API version.

Associating a legal document with an API version is a two-step process: first you upload and publish the document, using the Content service (see POST /content/{path}), and then you associate the document with the API version using POST /api/apis/versions/{APIVersionID}/legals.

Similarly, in reversing the process, you must first delete the association between the API version and the legal agreement, using this operation. You can then delete the document using the Content API (see POST /content/delete).

If you don't have the LegalDocumentID, you could run the GET /api/apis/versions/{APIVersionID}/legals operation which includes this information in the response.

Note: Once a legal agreement is active it's best to keep it unless you're sure you don't need the information on user acceptance of the agreement, or already have the data. Once a legal agreement is active, and apps are using your API, it's safer to leave the agreement in place even if it's currently inactive and/or has been superseded by later versions. If you think users have already accepted the agreement but you need to go ahead with deleting it, call Akana Technical Support for a script to retrieve the user acceptance information from the database.

For more information about managing legal agreements for your API, see Managing Legal Agreements on the Platform.

Authorization Roles/Permissions: Must be logged in. Must have Modify permission for the resource.

This topic includes the following sections:

HTTP Method

DELETE

URL

https://{hostname}/api/apis/versions/{APIVersionID}/legals/{LegalDocumentID}

Sample Request

The example below shows a specific legal document being deleted.

Sample Request URL

https://{hostname}/api/apis/versions/23b8637d-b75e-4bc6-86ca-16161fbfe047.acmepaymentscorp/legals/703a5c5b-c5d0-41fe-b3c8-4f1ee6da49da.acmepaymentscorp

Sample request headers

DELETE /content/api/apis/versions/23b8637d-b75e-4bc6-86ca-16161fbfe047.acmepaymentscorp/legals/703a5c5b-c5d0-41fe-b3c8-4f1ee6da49da.acmepaymentscorp HTTP/1.1
Host: {hostname}
Accept: */*
X-Csrf-Token_acmepaymentscorp: TokenID%3D8ed70a13-8469-11e8-b37a-b155e4eabeb8%2CexpirationTime%3D153...

Sample request body

None.

Request Headers

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

Header Description
Accept Any Accept header value that supports a response Content-Type of text/plain is valid; for example, */*.
Content-Type Any format (*/*)
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
APIVersionID Path string Required The unique ID for a specific API version.
LegalDocumentID Path string Required The unique ID for the association of a specific legal document with a resource such as an API version, license, or the platform.

Response

If successful, this operation returns HTTP status code 200, with the LegalDocumentID in the response body as confirmation that the operation was successful.

Sample Response

The sample response below shows that the delete operation completed successfully.

Sample response headers

HTTP/1.1 200 OK
Date: Mon, 28 Apr 2014 15:41:03 GMT

Sample response body

703a5c5b-c5d0-41fe-b3c8-4f1ee6da49da.acmepaymentscorp

Response Headers

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

Header Description
Content-Type text/plain

Response Body

Name Type Description
LegalDocumentID string The unique ID for the association of a specific legal document with a resource such as an API version, license, or the platform.

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.
405 Method Not Allowed. You might get this if there is an error in the URL, or if you used the wrong HTTP verb.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.