Endpoints

Tags

How to work with test case tags using the public API

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 Tags

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

/paginated endpoints are transitional. In API v1, the base paths will return paginated responses and the /paginated suffix will be removed.

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)

Query Parameters

ParameterTypeDescriptionDefaultExample
offsetnumberNumber of rows to skip before returning results.0offset=10
limitnumberMaximum number of rows to return. Accepted range: 0โ€“1,000.100limit=20
sortFieldstringField to sort by: created_at or title.titlesortField=title
sortOrderstringSort direction for sortField: asc or desc.ascsortOrder=asc
includestringInclude additional fields omitted by default. Accepted value: tcaseCount.Noneinclude=tcaseCount

Response

Status: 200 OK

{
  total: number,         // Total number of tags
  offset: number,        // The page offset
  limit: number,         // The page limit
  data: Array<{          // List of tags in the page
    id: number           //   Unique tag identifier within the project
    title: string        //   Tag label
    tcaseCount?: number  //   Number of test cases using this tag (only included if requested)
  }>
}

Example Request

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

Example Response

{
  "total": 3,
  "offset": 0,
  "limit": 100,
  "data": [
    {
      "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"]
    }
  ]
}

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
}

List Tags (Deprecated)

Deprecated

This endpoint is deprecated. Use List Tags (GET /api/public/v0/project/{project_id}/tag/paginated) instead.

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)

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