Get Shares

Contents

Returns list of shares associated with the user.

Endpoint URL: {service.share.url} received in EndpointFetching

Request Syntax


GET /v1/shares



Request Headers

Parameter Description Required
Authorization Authorization token in the form "Bearer {token}".

Value of type: string
true


Request Query Parameters

Parameter Description Required
limit The maximum numer of shared records that may be returned for a given request.

Value of type: number

Default: 20
false
offset Offset is the number of shared records that you want to start, indexed at 0. Offset parameter is used in conjunction with limit parameter to page through a dataset. For example, an offset of 0 and a limit of 10 would return the first 10 shared records. An offset of 10 and a limit of 20 would return shared records 11-30.

Value of type: number

Default: 0
false


200 Response

Success

Response Headers

Parameter Description Required
Access-Control-Allow-Origin Indicates whether the response can be shared with resources with the given origin.

Value of type: string
false
X-Total-Count Indicates the total shared records count.

Value of type: number
false


Response Payload

Parameter Description Required
data List of shared records.

Object of type: ListOfShareResponse
false
error A successful response will return null in error response.

Object of type: ErrorResponse
false
message Message text

Value of type: string
false


400 Response

GENERAL_INSUFFICIENT_PARAMETERS, "400 Bad Request Required parameter {parameter name} not present, invalid or empty"

Response Headers

Parameter Description Required
Access-Control-Allow-Origin Indicates whether the response can be shared with resources with the given origin.

Value of type: string
false


401 Response

GENERAL_INVALID_TOKEN, "401 Not Authorized User token is invalid"

Response Headers

Parameter Description Required
Access-Control-Allow-Origin Indicates whether the response can be shared with resources with the given origin.

Value of type: string
false


404 Response

GENERAL_NOT_FOUND, "404 Not Found Could not find share"

Response Headers

Parameter Description Required
Access-Control-Allow-Origin Indicates whether the response can be shared with resources with the given origin.

Value of type: string
false


405 Response

GENERAL_METHOD_NOT_ALLOWED, "405 Method Not Allowed PUT not allowed for this resource"

Response Headers

Parameter Description Required
Access-Control-Allow-Origin Indicates whether the response can be shared with resources with the given origin.

Value of type: string
false


500 Response

GENERAL_UNKNOWN, "500 Internal Server Error An unexpected error occurred"

Response Headers

Parameter Description Required
Access-Control-Allow-Origin Indicates whether the response can be shared with resources with the given origin.

Value of type: string
false


Example

Sample request to get all the shares for a given user.

Request


GET shares/v1/shares HTTP/1.1
Host: Endpoint-URL
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSU
Content-Type: application/json

Response


HTTP/1.1 200 OK
{
  "data": {
    "items": [
      {
        "deviceId": "12345-device",
        "shareId": "12345-share",
        "fileIds": [
          "357",
          "579"
        ],
        "ownerId": "123",
        "authId": "12345678",
        "url": "https://mycloud.com/#/action/share/12345-share"
      },
      {
        "deviceId": "098765-device",
        "shareId": "098765-share",
        "fileIds": [
          "357",
          "579"
        ],
        "ownerId": "123",
        "authId": "12345678",
        "url": "https://mycloud.com/#/action/share/098765-share"
      }
    ],
    count: 2,
    nextPageToken: ""
  },
  "error": null
}

Have question about this section?