API Reference

Import a file

Description

Import a file for conversion to a Workiva equivalent. This is a long running operation.
Response includes an uploadUrl which indicates where to upload the file for import. To upload the file, perform a PUT against the uploadUrl with the same authentication credentials and flow as the import request. For more details, see Authentication documentation.

POST /files/import

🚧

Required OAuth Scopes:

file:write

Parameters

ParameterInTypeRequiredDescription
bodybodyFileImporttrueThe details of the file import

Body parameter example

{
  "fileName": "quarterly_report.docx",
  "kind": "Document"
}

Code Samples

curl -X POST https://api.app.wdesk.com/platform/v1/files/import  \ 
-H 'Content-Type: application/json' \ 
-H 'Accept: application/json' \ 
-H 'Authorization: Bearer {access-token}'
http POST https://api.app.wdesk.com/platform/v1/files/import  \ 
Content-Type:application/json \ 
Accept:application/json \ 
Authorization:"Bearer {access-token}"
wget --method=POST "https://api.app.wdesk.com/platform/v1/files/import" \
 --output-document -  \ 
 --header 'Content-Type: application/json' \ 
 --header 'Accept: application/json' \ 
 --header 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.app.wdesk.com/platform/v1/files/import', headers = headers)

print(r.json())

Returns

202 - Accepted

Returns a FileImportResponse object containing details for uploading the new file.

HeaderDescription
LocationThe location to poll for the operation result.
Retry-AfterThe number of seconds to wait before polling for a result and between polling attempts.

Example Responses


{
  "uploadUrl": "{opaqueUrl}"
}