Skip to main content

Tags

Tags help organize and categorize test cases within your project. You can use tags in query plans to filter test cases when creating runs.

List Project Tags

GET/api/public/v0/project/{project_id}/tag

Returns all tags defined in the project. This endpoint is particularly useful when creating run query plans that filter test cases by tags.

Path Parameters

  • project_id: The project identifier (can be either the project code or UUID)

Authentication

Requires an API key with at least Viewer role permissions. See Authentication for more details.

Response

Status: 200 OK

{
tags: Array<{
id: number // Unique tag identifier within the project
title: string // Tag name/label
}>
}

Example Request

curl \
-H "Authorization: ApiKey your.api.key.here" \
https://your-company.your-region-code.qasphere.com/api/public/v0/project/BD/tag

Example Response

{
"tags": [
{
"id": 1,
"title": "regression"
},
{
"id": 2,
"title": "api-tests"
},
{
"id": 3,
"title": "smoke-tests"
}
]
}

Error Responses

Status CodeDescription
401Invalid or missing API key
403Insufficient permissions or suspended tenant
404Project not found
500Internal server error

Using Tags in Run Query Plans

Tags returned by this endpoint can be used in run query plans to filter test cases. For example:

{
"title": "API Regression Run",
"type": "live",
"queryPlans": [
{
"folderIds": [1],
"tagIds": [2], // Using the tag ID for "api-tests"
"priorities": ["high"]
}
]
}
note

Tag IDs are unique within a project but not across projects. Always verify you're using tag IDs from the correct project.

Using Multiple Tags

You can include multiple tag IDs in a query plan to select test cases that have any of the specified tags.

{
"tagIds": [2, 3] // Selects test cases with either "api-tests" or "smoke-tests" tags
}