locks
Locks

Create Lock

post/locks/{path}

Request

  • Base URL
    https://app.files.com/api/rest/v1
  • URL
    https://app.files.com/api/rest/v1/locks/{path}
  • Auth
    none declared

Path parameters

pathstring required

Path

Request body multipart/form-data

tokenstring

Lock token. With expected_token, use the same value to refresh or a different value to replace the existing token.

expected_tokenstring

Require this existing, unexpired token before refreshing or replacing a lock. Set token to the same value to refresh, or a different value to replace.

allow_access_by_any_userboolean

Can lock be modified by users other than its creator?

exclusiveboolean

Is lock exclusive?

recursiveboolean

Does lock apply to subfolders?

ownerstring

Arbitrary descriptive label for the lock. Does not change the lock creator or permissions.

timeoutinteger

Lock timeout in seconds

Example request

{
  "recursive": true,
  "owner": "user",
  "timeout": 1
}

Response

The Locks object.

pathstring

Path

timeoutinteger

Lock timeout in seconds

depthstring
recursiveboolean

Does lock apply to subfolders?

ownerstring

Arbitrary descriptive label for the lock. Does not change the lock creator or permissions.

scopestring
exclusiveboolean

Is lock exclusive?

tokenstring

Lock token. Use to release lock.

typestring
allow_access_by_any_userboolean

Can lock be modified by users other than its creator?

user_idinteger

Lock creator user ID

usernamestring

Lock creator username

Example response

{
  "path": "locked_file",
  "timeout": 1,
  "depth": "infinity",
  "recursive": true,
  "owner": "user",
  "scope": "shared",
  "token": "17c54824e9931a4688ca032d03f6663c",
  "type": "write",
  "user_id": 1,
  "username": "username"
}

Changes