# 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: 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/coverage-set-apis/lock-coverage-set.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.
