> For the complete documentation index, see [llms.txt](https://docs.apica.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apica.io/platform-docs/test-data-orchestrator-tdo/user-documentation/api-guide/workset-apis/unlock-workset.md).

# Unlock Workset

This call is used to remove a lock placed on a workset. In TDO, you can see that the workset ‘api\_workset’ has a lock placed by user ‘mbj\_test’. Note that locks can be removed under two circumstances: the user who placed the lock can remove their own lock. In addition, an Admin user can remove any lock.

NOTE: there is no API call to place a lock on a workset; this lock is placed when you run the data assembly process (either via the UI or API).

<figure><img src="/files/iUdVgyEbSRQuCak8dT8P" alt=""><figcaption><p>Locked workset in TDO</p></figcaption></figure>

This API is sent as a PATCH call. The call includes the instruction ‘unlock’ and the id of the workset to have the lock removed.

<figure><img src="/files/y3LynEwq7u6cIS41DUMO" alt=""><figcaption><p>Unlock workset API call</p></figcaption></figure>

The body is the same as the body for the Get Details API.

```
 {
    "context": {
        "user": "mbj_test",
        "password": "xxxx",
        "project": {
            "name": "imp_payments_demo",
            "version": "1.0"
        }
    }
}
```

The return message shows that the lock has been removed (last fields) where the ‘lockedBy’ and ‘lockDateTime’ fields are blank/null and the ‘lockTimeout’ is ‘-1.

<figure><img src="/files/z6ESaeQaxwtuylrPF759" alt=""><figcaption><p>Unlock workset return message</p></figcaption></figure>

Viewing the workset screen in TDO after this API has been run, you can see that there is no longer a lock present on this workset (no value in the ‘locked by’ column).

<figure><img src="/files/tcSXsSiNMKpHFlx6KEJ8" alt=""><figcaption><p>Lock removed in TDO</p></figcaption></figure>
