Add tags
POST
/tagsAdd tags for test cases
Example
Section titled “Example”Use resource IDs from your own project. Keep the API token in your server or CI environment.
import { createConfiguration, TestCasesApi } from '@testcollab/sdk';
const config = createConfiguration(process.env.TESTCOLLAB_TOKEN!);const api = new TestCasesApi(config);
const result = await api.addTags({ "testCasesTagPayload": { "name": "Checkout smoke tests", "project": 123 }});console.log(result);curl --request POST \ "https://api.testcollab.io/tags?token=$TESTCOLLAB_TOKEN" \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "project": 123}'Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | — |
project |
number | Yes | — |
Response
Section titled “Response”200 — result
| Field | Type | Required | Description |
|---|---|---|---|
id |
number | Yes | — |
name |
string | Yes | — |
test_case_count |
number | No | — |
{ "id": 123, "name": "example", "test_case_count": 123}Errors
Section titled “Errors”| Status | Meaning |
|---|---|
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not found |
500 |
Internal server error |