Download repository content

post/repository/items/{itemId}/content

Downloads repository content and returns the stream on the response body.

If the itemId is for a file, the latest file content is downloaded by default. To download the content of a specific version, see getRepositoryFileContentByIdAndVersion operation.

If the itemId is for a container, the container and all of its children are downloaded to a ZIP file. Multiple items in the container can be downloaded to a ZIP file by providing the item names on the request body.

Optionally, an action status ID can be provided to monitor the completion status. To get the action status ID, first call [batchUpdate](#operationId:batchUpdate) with the action DOWNLOAD, which returns the action status ID on the request header.

Authorization: Requires read permission on the file for file downloads. Requires read permission on the container and children for container downloads.

Request Samples

1

Response Samples

1Not Available

Path Parameters

NameTypeRequiredDescription
itemId
string
true

The unique identifier for the repository item.

Query Parameters

NameTypeRequiredDescription
actionStatusId
string
false

The action status ID if monitoring the completion status. The action status ID is obtained by calling batchUpdate with the action DOWNLOAD.

Request Body

A collection of strings that includes the names of items in the container specified to download to a ZIP file. File and container names can be specified. The request body is ignored, if the itemId for to a file.

Responses

StatusMeaningDescription
200OK

Content downloaded.

404Not Found

Not found - the repository item could not be found.