Loading...

Download a File from a Public Share (REST API: GET)

This operation downloads a backed up file from a public share.

Note: Downloading a folder is currently not supported using this operation.

Request

Syntax

GET <webservice>/stream/publicshare/{shareId}/action/download?path={path} HTTP/1.1
Host: <host name>
Accept: application/xml

where <webservice> is the root path used to route the API requests to the Web Server.

For more information, see Available Web Services for REST API.

Request Parameters

Name

Description

Required

shareId

The unique identifier (syncWebFolderId response) returned when you share a file or folder or view the shared files and folders. If the shareId is not known, see View Shared Files and Folders to retrieve it.

Yes

path

The path to the shared file that you want to download. Specify the path relative from the share root.

Note: The path must be URL encoded before they are sent in the request.

Yes

Request Headers

Name

Description

Host

The host name of the Web Server or Web Console used in the API request.

Accept

The format of the response. Valid values are: application/xml or application/json.

Response

Response Parameters

Parameter

Description

Element

errorCode

The possible error codes.

Valid values are:

  • 0, successful completion.
  • a specific error code.

App_GenericResp

errorString

The description of the error code. Not all error codes have an error string.

App_GenericResp

Examples

Sample Request

GET <webservice>/stream/publicshare/39/action/download?path=\DemoFolder\DemoFile1.doc HTTP/1.1
Host: client.mydomain.com
Accept: application/xml

Sample Response

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<App_GenericResp errorCode="0"/>

Supported Error Codes

Code

Status

Description

400

Bad Request

The request is missing required parameters.

403

Forbidden

Error cased due to one of the following reasons:

  • The user does not have access to the share
  • The file requested is not accessible inside the share
  • Download operation is not allowed. This can happen if you attempt to download a folder.

404

Not Found

The specified file does not exist.

Last modified: 1/10/2018 5:32:24 PM