Lookups

Attach resource

Note: The path is a placeholder. The actual path is determined by the configuration of the app component.

When the user attaches a resource URL to a task, Asana will make a signed request to the specified resource_attach_url in the app configuration. Information about the attached resource should be included in the response.

post/resource_attach_url_path_placeholder

Request

  • Base URL
    {siteUrl}
  • URL
    {siteUrl}/resource_attach_url_path_placeholder
  • Auth
    none declared

Request body

expires_atstring

The time (in ISO 8601 date format) when the request should expire.

userstring

The user GID this hook is coming from.

workspacestring

The workspace GID this hook is coming from.

taskstring

The task GID this hook is coming from.

attachmentstring

The attachment ID of the URL attachment

querystring

The user’s input in the lookup text input. This is often a resource URL or resource key, such as "CP-1" or "https://abcde.atlassian.net/browse/CP-1"

Example request

{
  "expires_at": "2019-04-15T01:01:46.055Z",
  "user": "54321",
  "workspace": "12345"
}

Response

Successfully attached the resource to the given object.

resource_namestring required

The name of the attached resource

resource_urlstring required

The URL of the attached resource

errorstring

The error that should be displayed to the user

Example response

{
  "resource_name": "Build the Thing",
  "resource_url": "https://example.atlassian.net/browse/CP-1",
  "error": "No resource matched that input"
}

Changes

No recorded changes to this operation across all 1 revision of this API.