# 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.

&#x20;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.

&#x20;

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

&#x20;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"
        }
    }
}
```

&#x20;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.

&#x20;

<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).

&#x20;

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.apica.io/platform-docs/test-data-orchestrator-tdo/user-documentation/api-guide/workset-apis/unlock-workset.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
