Description
Retrieves a file given its ID
GET
/files/{fileId}
Required OAuth Scopes:
file:read
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
fileId | path | string | true | The unique identifier of the file |
Code Samples
curl -X GET https://api.app.wdesk.com/platform/v1/files/{fileId} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
http GET https://api.app.wdesk.com/platform/v1/files/{fileId} \
Accept:application/json \
Authorization:"Bearer {access-token}"
wget --method=GET "https://api.app.wdesk.com/platform/v1/files/{fileId}" \
--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://api.app.wdesk.com/platform/v1/files/{fileId}', headers = headers)
print(r.json())
Returns
200 - OK
Returns a File
object containing details about the requested File
.
Example Responses
{
"container": "",
"created": {
"dateTime": "2019-10-28T15:03:27Z"
},
"name": "2019 Year-End Summary",
"id": "124efa2a142f472ba1ceab34ed18915f",
"kind": "Document",
"modified": {
"dateTime": "2019-10-28T15:03:27Z"
},
"type": "Document",
"template": false
}