Retrieve a list of files#
Description#
Returns a paged list of all files associated with the provided table ID, as well as metadata associated with each file.
GET /api/v1/file
Required OAuth Scopes
No OAuth scopes are required to use this endpoint.
Parameters#
Parameter |
In |
Type |
Required |
Description |
|---|---|---|---|---|
tableId |
query |
string |
true |
The unique table identifier associated with this file |
cursor |
query |
string |
false |
A paging cursor; if included, |
limit |
query |
integer(int32) |
false |
The number of files to return, from 1 to 1000; by default, 1000 |
offset |
query |
integer(int64) |
false |
The item to start with on the page, greater than or equal to 0; by default, 0 |
sortOrder |
query |
string |
false |
The sort order for the files being returned |
sortBy |
query |
string |
false |
The column to use the sort order on |
searchText |
query |
string |
false |
The text to filter the results upon; matching the file name |
Enumerated Values#
Parameter |
Value |
|---|---|
sortOrder |
|
sortOrder |
|
sortBy |
|
sortBy |
|
Code Samples#
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/file \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' \
-G \
--data-urlencoded "tableId=string"
http GET https://h.app.wdesk.com/s/wdata/prep/api/v1/file \
Accept:application/json \
Authorization:"Bearer {access-token}" \
tableId==string
wget --method=GET "https://h.app.wdesk.com/s/wdata/prep/api/v1/file?tableId=string" \
--output-document - \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/file', params={
'tableId': 'string'
}, headers = headers)
print(r.json())
Returns#
200 - OK#
Returns a JSON object with body and cursor properties.
bodycontains an array ofFileMetaDtoobjects. If the request returns no results,bodycontains an empty array.cursorcontains a paging cursor, which can be included in the next call to the endpoint to retrieve the next set of results. If no additional results,cursorisnull.
Example Responses#
{
"body": [
{
"columnMappings": {},
"created": "string",
"delimiter": "string",
"id": "string",
"key": "string",
"metadata": {},
"name": "string",
"numErrors": "integer",
"numRecords": "integer",
"originalFileSize": "integer",
"source": "string",
"status": "string",
"tableId": "string",
"tags": {},
"updated": "string",
"userId": "string",
"version": "integer"
}
],
"code": "integer",
"cursor": "string"
}