Creating a new file with Document API
To create a new file with Document API:
-
Sign in to the Developer Portal.
-
Go to APIs and click document API - v2. The document API page opens.
-
From the list of API calls select Creates the specified file and content, including optional folder hierarchy. Then click Try it.
-
Scroll down to Body and populate the fields with your values:
-
filePath: Put in your file path.
Important! File path name must be a full path and file name, for example: /Project/Files/MyFile.txt -
content: If you don't provide data for the file, your file will be empty. To save data in your file, provide base64-encoded data in the content field. To create an empty file, delete the content field from Body.
-
thumbnail: Provide a thumbnail image to be displayed in Documents in Control Center. If you don't want to provide your thumbnail, delete the thumbnail field from Body.
-
comment: optional for the first revision. For other revisions, populate this field.
-
-
Delete the lines for any skipped fields.
- Scroll down and click Send.
If your result is a 201 Created response, the API call was successful.