Get Folder Lock

Get Folder Lock

To get a list of the current locks on a folder in Box, call the GET /folder_locks/ API with the id of the folder supplied as a folder_id query string parameter.

cURL
curl -i -X GET "https://api.box.com/2.0/folder_locks?folder_id=33552487093" \
     -H "Authorization: Bearer <ACCESS_TOKEN>"
iOS
client.folders.listLocks(folderId: "22222") { results in
    switch results {
    case let .success(iterator):
        for i in 1 ... 10 {
            iterator.next { result in
                switch result {
                case let .success(folderLock):
                    print("- \(folderLock.id)")
                case let .failure(error):
                    print(error)
                }
            }
        }
    case let .failure(error):
        print(error)
    }
}

Folder ID

The id of any folder can be determined by visiting a folder in the web application and copying the id from the URL. For example, for the URL https://*.app.box.com/folder/123 the folder_id is 123.