> 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/coverage-set-apis/lock-coverage-set.md).

# Lock Coverage Set

This call is sent to lock a coverage set in TDO – this will prevent any other user (within the UI or from automated API calls) from making changes to the coverage set or business rules while you are working within that coverage set.  It is sent as a ‘PATCH’.

Note that the header is slightly different (it includes the command ‘lock’ in addition to the coverage set ID.

&#x20;

<figure><img src="/files/1F0c0dv0PJuegOjwBeF0" alt=""><figcaption><p>Lock coverage set call</p></figcaption></figure>

&#x20;&#x20;

The body of this call remains the same as the ‘get details’ API.

&#x20;

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

&#x20;

The return message contains all of the details.  Highlighted below is the section of the details around the lock that was placed.

&#x20;&#x20;

<figure><img src="/files/1WaIKr8PlCfv8qck2Pnc" alt=""><figcaption><p>Lock coverage set return message - successfu;</p></figcaption></figure>

&#x20;

In TDO, the lock can be seen on the main coverage set page; the ID of the user who placed the lock is visible.  By hovering the cursor to the right of that ID, you can see the lock icon is also visible.

&#x20;

<figure><img src="/files/ZTcKpAJZz6heNlDXKsWO" alt=""><figcaption><p>Coverage set lock shown in TDO</p></figcaption></figure>

&#x20;

If you try to place a lock, and the coverage set is already locked by a different user, you will get the return message below, including the ID of the user who has the lock in place.

<figure><img src="/files/4unc7VZxFUYb6QOqW92T" alt=""><figcaption><p>Error message - coverage set already locked</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.apica.io/platform-docs/test-data-orchestrator-tdo/user-documentation/api-guide/coverage-set-apis/lock-coverage-set.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
