Get files in one activity

Contents

Get the files of one specific activity.

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

Request Syntax


GET /v1/activities/:id/files



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


Request Path Parameters

Parameter Description Required
id The ID of the activity whose files you want to retrieve.

Value of type: string
true


Request Query Parameters

Parameter Description Required
fields The fields to return.

Value of type: csv

Default: All fields
false
limit The page size limit. Max value is 1000.

Value of type: integer

Default: 20
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
files The array of files.

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

Value of type: string
false


Example

Sample request to retrieve the files of one specific activity.

Request


GET /sdk/v1/activities/pvFO6ksxBSkkftgx1ol0iz8VT2i8a1aVtD3vSLnZ/files?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": "",
  "files": [
    {
      "id": "i_N8-GKHwIHS3TzIXNSoTo5ZblcML_7o8MkVRYBb",
      "parentID": "o12KLQH8XDYPOV1MfqNy8WgMUnL7LFglOi-xektJ",
      "eTag": "\"BA\"",
      "size": 5850341,
      "mimeType": "video/mp4",
      "name": "filtered-B13E44BF-6916-4BBF-AFDC-54F264CEFAFE.mp4",
      "mTime": "2017-09-12T20:38:36.396Z",
      "cTime": "2017-09-12T20:38:35.817Z",
      "storageType": "local",
      "extension": ".mp4",
      "hidden": "none",
      "video": {
         "audioCodec": "aac",
         "videoCodec": "h264",
         "videoCodecProfile": "Main",
         "videoCodecLevel": 31,
         "bitRate": 5291.39,
         "frameRate": 30.00000000114504,
         "width": 720,
         "height": 1280,
         "duration": 8.733333333
      },
      "publiclyShared": false,
      "privatelyShared": false,
      "trashed": false
    },
    {
      "id": "64mrhfhSugnZyS3-9SUsy6TkgbgwuRgvmfUaiFLn",
      "parentID": "o12KLQH8XDYPOV1MfqNy8WgMUnL7LFglOi-xektJ",
      "eTag": "\"BA\"",
      "size": 5160924,
      "mimeType": "video/mp4",
      "name": "filtered-B0B34D86-BD9D-406A-AA3F-07FDA90A2DA1.mp4",
      "mTime": "2017-09-12T20:38:35.632Z",
      "cTime": "2017-09-12T20:38:34.916Z",
      "storageType": "local",
      "extension": ".mp4",
      "hidden": "none",
      "video": {
          "audioCodec": "aac",
          "videoCodec": "h264",
          "videoCodecProfile": "Main",
          "videoCodecLevel": 31,
          "bitRate": 5225.463,
          "frameRate": 29.871794871794876,
          "width": 720,
          "height": 1280,
          "duration": 7.8
      },
      "publiclyShared": false,
      "privatelyShared": false,
      "trashed": false
    }
    ]
}

Have question about this section?