ListFiles
Use this resource to retrieve a list of all or a range of files for an account.
Method summary
HTTP Method | Path | Description |
---|---|---|
GET | /scr/api/ListFiles | Retrieves a list of all or a range of files for the account. |
GET /scr/api/ListFiles
- Description
- Use this method to retrieve a list of all or a range of files for the account.
- Resource information
-
Requirements Description Response format JSON Requires authentication Yes. The user must be an administrator to access the ListFiles API. Supports OAuth 2 client credentials Yes using a User Service ID containing Artifact Reporting Category Rate limited Not yet
- Parameters
-
Name Location Description Required Type X-On-Behalf-Of Header The user context. The value must be a username in the account. The user must have permission to perform the action in the account and in the specified parent space, if any. Required if Service ID OAuth credentials are used. Not required when using User Service ID OAuth credential. String from Query Lists all files uploaded after this date. The date is represented with the following ISO 8601 date formats: - The long form is 2012-08-13T15:44:31.571-05:00.
- The short form is 2012-08-13. The short form dates are assumed to be midnight Central Standard Time (CST) of the date specified. Therefore, 2012-07-25 is the same as 2012-07-25T00:00:00.000-05:00.
No ISO 8601 date format
- Response
-
- Example input
-
- Using OAuth 2 client
credentials:
curl -i -H "Authorization: Bearer access_token" "https://your_server_url/scr/api/ListFiles?from=2012-08-13T15:37:01.887-05:00"
- Using OAuth 2 client
credentials:
- Example output
-
{ "files":[ { "fileId":"b0050", "uploadUserId":"bob@foo.com", "uploadDate":"2012-08-13T15:37:08.770-05:00", "fileSize":591728, "fileName":"Earth.tif", "attachedToId":"b000f", "attachedToType":"process" } ] }
- Response properties
-
- fileId
- The unique ID of the file. Use this property to call the
FileDownload
. - uploadUserId
- The login ID or email address of the user who uploaded the file.
- uploadDate
- The date when the file was uploaded, expressed in ISO 8601 format.
- fileSize
- The file size in bytes.
- fileName
- The name of the file.
- attachedToId
- The ID of the process, post, or other item that the file is attached to.
- attachedToType
- The process, post, or other type of object that the file is attached to.
- Response messages
-
HTTP code Reason 200 The request was completed successfully.
401 The user isn't authorized to make the request.