Get activities

Contents

Get a list of user's recent activities.

Endpoint URL: {network.internalDNSName or network.proxyURL} received in DeviceInformation

Request Syntax


GET /v1/activities



Request Headers

Parameter Description Required
Accept-Encoding Use value gzip in Accept-Encoding header to compress the response data. This reduces network traffic and improves response time.

Value of type: string
false
Authorization An access token with nas_read_only or nas_read_write scope as well as permission at the time the activity was created.

Value of type: string
true
If-Match A previous response ETag or *. Return the object only if its entity tag (ETag) is the same as the one specified.

Value of type: string
false
If-None-Match A previous response ETag or *. Return the object only if its entity tag (ETag) is different from the one specified.

Value of type: string
false


Request Query Parameters

Parameter Description Required
fields The fields to return.

Value of type: csv

Default: All fields
false
limit The page size limit and optionally the max number of files to return per listed activity.

Value of type: two comma separated integers

Default: 20,5
false
pageToken The pageToken obtained from the last response.

Value of type: string
false
pretty Whether to pretty print the response. It refers to the process of displaying source code or other items in a presentable and attractive way.

Value of type: boolean

Default: false
false


200 Response

OK

Response Headers

Parameter Description Required
Content-Type Indicates the media type for the message body. The value will be application/json. false
Etag The ETag for the response. It is used to determine the change in file metadata and content. false


Response Payload

Parameter Description Required
activities The array of Activities.

Array of type: Activity
true
pageToken The pageToken for the next request.

Value of type: string
false


Example

Sample request to retrieve the first page of activities.

Request


GET /sdk/v1/activities?pretty=true HTTP/1.1
Host: Endpoint-URL
Authorization: Bearer 9e9d3d16-f9b1-43dc-8599-d1db6fcedfa9

Response


HTTP/1.1 200 OK
Content-Type: application/json
Etag: "4OExoJIFTV-SFANiVsNHtw"
Vary: Origin
Date: Thu, 27 Apr 2017 23:45:49 GMT
Content-Length: 1873

{
   "pageToken": "",
   "activities": [
      {
         "updatedTime": "2017-04-27T23:19:38.459Z",
         "type": 1,
         "clientType": "mobile",
         "fileCreations": 
           {
             "count": 3,
             "files": [
                {
                  "id": "2mnsz4CEBf2-YzmhUvlxfXFx3qD2qO0T0WQu-r3k",
                  "parentID": "PgH6TTT8GJ5KJAMS1X_XiornUSa_Vk2TC3O1PT1W",
                  "eTag": "\"Cg\"",
                  "size": 461455,
                  "mimeType": "image/jpeg",
                  "name": "97H.jpg",
                  "mTime": "2017-04-27T23:19:37.332Z",
                  "cTime": "2017-04-27T23:19:35.656Z",
                  "storageType": "local",
                  "extension": ".jpg",
                  "hidden": "none",
                  "image": {
                      "width": 1536,
                      "height": 1024
                    },
                    "publiclyShared": false,
                    "privatelyShared": false
                },
                {
                  "id": "my2dtvRn5NYFOBtwHJrrURjwi6364NyjKPcpXX_o",
                  "parentID": "PgH6TTT8GJ5KJAMS1X_XiornUSa_Vk2TC3O1PT1W",
                  "eTag": "\"Cg\"",
                  "size": 288551,
                  "mimeType": "image/jpeg",
                  "name": "139H.jpg",
                  "mTime": "2017-04-27T23:19:37.295Z",
                  "cTime": "2017-04-27T23:19:35.699Z",
                  "storageType": "local",
                  "extension": ".jpg",
                  "hidden": "none",
                  "image": {
                      "width": 1536,
                      "height": 1024
                  },
                    "publiclyShared": false,
                    "privatelyShared": false
                },
                {
                  "id": "Ke-5CpDg2fDRsSMkljJ8Jp6hz96z4X3wlIaHg5j0",
                  "parentID": "PgH6TTT8GJ5KJAMS1X_XiornUSa_Vk2TC3O1PT1W",
                  "eTag": "\"Cg\"",
                  "size": 156385,
                  "mimeType": "image/jpeg",
                  "name": "101H.jpg",
                  "mTime": "2017-04-27T23:19:36.786Z",
                  "cTime": "2017-04-27T23:19:35.694Z",
                  "storageType": "local",
                  "extension": ".jpg",
                  "hidden": "none",
                  "image": {
                      "width": 1536,
                      "height": 1024
                  },
                  "publiclyShared": false,
                  "privatelyShared": false
                }
                ]
              }
      }
      ]
}

Have question about this section?