Skip to main content

Get Attachment

GetAttachment retrieves an attachment by its ID.

It calls GET https://dev.azure.com/{organization}/{project}/_apis/wit/attachments/{id}, where {id} is the value of the Id field.

The activity has four tabs: Configuration, Auth, Input, and Output.

Configuration

FieldRequiredDescription
NameOptionalName of the step, should be unique within this workflow.
DescriptionOptionalDescribe the purpose or function of this step.
Api VersionRequiredEnter the version of the API to use.
OrganizationRequiredEnter the name of the organization.
ProjectRequiredEnter the name of the project.
IdRequiredEnter the ID of the resource.
File NameOptionalEnter the name of the file to be processed.
DownloadOptionalSpecify whether to download the file (true/false).

Download is a checkbox. File Name and Download are query parameters.

Auth

FieldRequiredDescription
Auth TypeOptionalSelect the authentication method for the request. Options: No Auth, Basic, API Key, OAuth 2.
User NameOptionalUsername for Basic Authentication.
PasswordOptionalPassword for Basic Authentication.

Input

This activity is built on the REST Client, so the Input tab is the generic HTTP request rather than an Azure Boards-shaped payload.

FieldRequiredData TypeDescription
TargetRequiredObjectThe HTTP request.

Output

The activity returns an httpResponse object.

FieldData TypeDescription
status.codeIntegerNumeric HTTP status code.
status.messageStringShort message associated with the HTTP status.
headersObjectHTTP response headers.
bodyObjectParsed body of the response — the attachment content.
note

The output schema for this activity describes the response body only as a JSON Schema document, so no response fields are listed here.