Skip to content

Checkout Resource

When a user checks out a file or folder it makes it so that other users cannot make modifications to the resource or its children until the resource is checked back in.

POST {baseUrl}/spaces/{spaceId}/folders/{folderId}/checkout
POST {baseUrl}/spaces/{spaceId}/files/{fileId}/checkout
  • HEADER:

    • Authorization: Bearer {tid token}
  • BODY:

    • reason - User input string on why the resource is being checked out (Optional)
POST {baseUrl}/spaces/{spaceId}/folders/{folderId}/checkin
POST {baseUrl}/spaces/{spaceId}/files/{fileId}/checkin
  • HEADER:

    • Authorization: Bearer {tid token}
  • BODY:

    • Empty

    After the checkin operation is completed, the JSON response returns the checked out file or folder.

In order to lock a resource, users must have either the ContentContributor or ContentManager role. Users with ContentManager on a resource have the ability to check that resource back in even if it was checked out by a different user in order to prevent resources from being accidentally or maliciously locked permanently, for instance if a user owning a checkout leaves the company/project.

Users are not prevented from checking out a folder which contains a child with a checkout from a different user. The new checkout of the parent will not apply to the checked out child resource, whose checkout remains unaffected, meaning the parent checkout owner will not be able to make changes to the child resource still. If the owner of the child checkout checks in that resource, then the parent checkout will automatically be applied to the child.

An example scenario would be that there exists folder1 with children file1 and file2. UserA checks out file1, and becomes the only user who can modify file1. UserB checks out folder1 which is allowed, but they can still not modify file1, only userA can. UserA cannot modify folder1 or file2, only userB can. Once userA checks in file1, it falls under the folder1 checkout, so only userB can modify folder1, file1, and file2, until they check in folder1.

Support file creation and mutation are not blocked by checkouts in order for automated systems to work as intented. Modifications against master files are affected by checkouts which includes changes to its links attribute, so if an async process or application needs to be able to update master file links, it can be granted the SupportFileAdmin role in the Space ACL to allow it to bypass checkouts and update master file links.