You can manage (i.e., create, update, delete) Test Sets directly through the Jira's native REST API.
The Xray REST API provides the following endpoints.
Test Set Tests
- To view the Test associated with a Test Set, you need to specify the key of the Test Set you wish to view.
- To associate or remove a Test from a Test Set, you need to send a JSON with a list of the keys. When associating, these keys can be Test keys or Test Set keys; when removing, they can only be Test keys.
- To remove a Test from a Test Set, you need to specify the key of the Test you wish to remove. It is also possible to remove all Tests from the Test Set.