About this resource
Representation of a File
Properties
Property | Description | Type |
---|---|---|
checkedOut | Gets a value indicating whether the file is checked out. | boolean |
checkedOutOn | Gets the checked out on date in UTC time. | datetime |
createdOn | Gets the creation datetime in UTC time. | datetime |
id | Gets the identifier for this file. | guid |
watermarkId | Gets or sets the watermark id. | guid |
watermarkType | Gets or sets the watermark type. | string (values: none, usesetting, usespecified) |
Relations
Method | Name | Select-key | Resource type | Description |
---|---|---|---|---|
GET | self | Provides a link to this resource. | ||
GET | preview | select-File: preview | Image | Gets the master preview of the latest version of this file |
GET | thumbnail | select-File: thumbnail | Image | Gets the thumbnail of the latest version of this file |
GET | fileversions | select-File: fileversions | FileCollection | Gets all the fileversions for this file. |
GET | latestversion | select-File: latestversion | FileVersion | Gets the id of the latest version. |
GET | fields | select-File: fields | FieldCollection | Gets the collection containing all the fields of this file. |
GET | checkedoutby | select-File: checkedoutby | User | Gets or sets the user who checked out this file. |
GET | watermark | select-File: watermark | Watermark | Gets the watermark. |
GET | createdby | select-File: createdby | User | Gets or sets the user that created this resource. |
Actions
Method | Action | Description | Response codes | ||||||
---|---|---|---|---|---|---|---|---|---|
POST /file/{fileId}/checkouts | checkout | Checks out a file |
|
||||||
DELETE /file/{fileId}/checkouts | undocheckout | Undos the checkout a file |
|
Examples
Uploading a file
To upload a file you can use different ways.
See Uploading Files overview section for details.
Adding or updating a record's file
After a file upload process is finished, you will receive a file upload token.
You can use this token to add or update a record's files or file versions.
See the examples on creating a record and
editing a record for more details on how to do it.
Keep in mind, the file upload token can be consumed only once.
404 Not Found error response is returned if you try consuming a token more than once.
Applying a watermark to a file
A watermark can be applied to a file and can be configured through the
creation of a record and/or
editing of a record. For more info, see the
Watermark resource page.
Checking a file out and back in
Checking out a file can be done via a POST request to the checkouts
action endpoint. No body needs to be specified.
POST /file/4535a5a3e75a4bc0a341a3cd0069b675/checkouts
Checking the file back in is an implicit operation that happens
automatically when adding a new file version to a checked out file.
Undoing a file checkout
You can also undo a file's checkout lock via a DELETE request to the
checkouts action endpoint. No body needs to be specified.
DELETE /file/4535a5a3e75a4bc0a341a3cd0069b675/checkouts