# Clone Workset

This API will create a copy of the workset with the new name specified in the API call.  It is run as a POST call and adds a variable for the new workset name to the call used to get workset details (ie, after 'workset' the API includes the instruction 'clone' and then the ID of the workset being cloned and the name of the new workset being created).

The API looks like the example below.

https\://\<server>:\<port>/core/API/workSet/clone/\<workset\_id>?name=\<new\_name>.

For example, it would be:  <https://localhost:8080/core/API/workSet/clone/6761ae6d98cd8a04d7f4e959?api\\_clone\\_workset>.

When creating this url, remember to use a new name ending in '\_workset'.

&#x20; In this case, we are cloning the workset ‘api\_2\_workset’ shown below.

&#x20;

<figure><img src="/files/0wL8Xvi8njEV8ouOmUHD" alt=""><figcaption><p>workset list showing workset to be cloned</p></figcaption></figure>

&#x20;The body of this call is still the very simple body (user ID, password, and project).

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

When run, the response shows the details of the cloned workset.

&#x20;

<figure><img src="/files/xvNpW4RsecAYuJncN1In" alt=""><figcaption><p>Results for clone workset API</p></figcaption></figure>

&#x20;TDO now shows the cloned workset in the workset listing, and when you edit that workset the details are the same as the one that was cloned.

&#x20;

<figure><img src="/files/HedoaFNhF59zTHlCXeUK" alt=""><figcaption><p>New workset shown in list</p></figcaption></figure>

&#x20;&#x20;

<figure><img src="/files/f8eptcjIukbH0kxHqfcj" alt=""><figcaption><p>New workset details</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/clone-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.
