Delete a File

This method is used to delete files previously uploaded through the upload and replace endpoints.

 

Method

DELETE

 

URL

 

Headers

In order to provide CME with the JWT, you must provide a header named Authorization and the token must be prefixed with the word Bearer.

Key

Authorization

Value

Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MTY3NCwiZW1haWwiOiJvcmdvd25lckBjeWJhZ2UuY29tIiwiZmlyc3RfbmFtZSI6IkN5YmFnZSIsImxhc3RfbmFtZSI6Ik9yZyBPd25lciIsIm9yZ3MiOltdLCJzZXNzaW9uX2lkIjoiNzk3ZWRjNmY2Mjk5Y2JmYmEyODE3NDlhMGFlZjI0YmNhNmZmODM0NSIsIm9yZ19pZCI6NTEsIm9yZ19uYW1lIjoiQ3liYWdlIENsZWFuIiwiaWF0IjoxNDg4MjI5ODY0LCJleHAiOjE0ODgzMTYyNjR9.Vd7BCYEkeWOq2B3_3Np9ylYDwYaAWyE1-e4ZvCIvK4E

 

Request Parameters

Required parameters are underlined.

Parameter

Value

Description

file

URL

An S3 URL returned from the upload or replace endpoint.

 

Request

{
"file": "https://lbs-dev.s3.amazonaws.com/cyb-cln/e4d22a023db54fa08680b11078e0d9d6/dog_typing_fast.gif"
}

 

Response

A successful response will have a 200 status code and a body containing the URL of the new file.

{
"message": "Successfully deleted file from S3."
}

 

Error Handling

An error response will return a 400, 403, or 404 (or 500 for internal server error) and a message:

{
"message": "File does not exist."
}