Delete an Attachment Associated with a Project Task

DELETE /project-tasks/{id}/attachments/{attachment_id} — Use this method to delete the attachment with the specified attachment ID associated with the project task with the specified internal ID, or clear the association between the workspace document with the specified attachment ID and the project task with the specified internal ID.

Parameters

Path parameters

Path parameter

Required / Optional

Description

Type

{id}

Required

The internal ID of the project task.

integer

{attachment_id}

Required

The internal ID of the attachment.

integer

Query string parameter

Path parameter

Required / Optional

Description

Type

filterSetId

Optional

The internal ID of the filter set to be applied.

  • When specified, the request is successful only if the action is available when the specified filter set is active in OpenAir. The filter set with the specified internal ID must exist and must be associated with the user who authorized the application as per the access token.

  • Otherwise and by default, the primary filter set associated with the user who authorized the application is applied.

integer

Response definitions

A successful or failed request returns a JSON object with the following properties:

Property

Description

message

A string containing a brief message about the status of your request — e.g. “Success” or “Attachment #4985 not found”.

Sample request

            DELETE /rest/v1/project-tasks/237/attachments/4982 HTTP/1.1
Host: company-id.app.openair.com
Authorization: Bearer <OAuth2_access_token> 

          

In the example, <OAuth2_access_token> is the OAuth 2.0 access token obtained for the client application connecting to OpenAir. See Authentication.

Sample response

            {
   "data": [
      {
         "id": 4982
      }
   ],
   "message": "success"
}