Documents / Entity
Add Document
This endpoint allows you to upload a Document based on JSON input.
You will only be able to upload a Document after first providing the Session Key. To know how you can obtain the Session Key, go to Authentication.
HEADERS
| Parameter | Value | Description |
|---|---|---|
| Content-Type | application/json | Language in which all request and response bodies are encoded |
| Accept | */* | Any data of whatever mime type is accepted |
| X-Session-Key | AUTH_TOKEN | This field must be completed with the token obtained at the authentication |
REQUEST BODY
| Attribute | Type | Description |
|---|---|---|
| folderId (Required) | String | Set the value -1 if you want to upload the Document in the Root folder, otherwise set the Folder's ID if you want to upload the file in a specific folder |
| name (Required) | String | The Document's name |
RESPONSE
| Attribute | Type | Description |
|---|---|---|
| locator | String | The url you should upload the Document (check table below). |
| id | Integer | The ID assigned to the Document in the ForceManager Database |
IMPORTANT: To upload your file to ForceManager storage you must do a PUT request with the binary data you want to upload and set the following headers:
| Attribute | Value | Description |
|---|---|---|
| Content-Type | application/octet-stream | Binary file specification |
| Content-Length | {file.size} | It is the size of the file you are going to upload, in bytes |
The endpoint to invoke with the PUT request is the one returned by this API call under the locator field.
RESPONSE CODES
| Status | Description |
|---|---|
| 200 OK | Shows if operation succeeded |
| 400 Bad Request | Shows when an invalid request or the requested service is not available |
post/documents
Request
- Base URL: https://api.forcemanager.com/api/v4
- URL: https://api.forcemanager.com/api/v4/documents
- Auth: API key in header X-Session-Key
Headers
Acceptstring
Request body
Response
Upload Document
Changes
No recorded changes to this operation across all 1 revision of this API.