Work with tags

You can use API resources to work with OpenText Core Software Delivery Platform user tag entities. 

Overview

Tags are user-defined identifiers. You do not specify a value for a tag. Instead, use tags like a label or a flag on an item.

Use the ID field of the user_tag entity to apply the tag to another entity.

Back to top

GET: Read tags

To see all tags:

GET .../api/shared_spaces/<space_id>/workspaces/<workspace_id>/user_tags

To see the first 200 tags in name order, by name only.

GET .../api/shared_spaces/<space_id>/workspaces/<workspace_id>/user_tags?fields=name&limit=200&order_by=name

Back to top

POST: Create a tag

We create test suites using the user_tags resource collection.

To create a tag: 

This example creates a tag named CustomerCommitment.

POST .../api/shared_spaces/<space_id>/workspaces/<workspace_id>/user_tags
     {"data":[
       {
         "name":"CustomerCommitment" 
       }    
   ]
}

Back to top

PUT: Apply tags to an entity

We apply tags to an entity using the tag's ID field.

To apply a tag to an existing test: 

This example applies a tag named CustomerCommitment to test 1234. The ID of the CustomerCommitment user tag is 1111.

PUT .../api/shared_spaces/<space_id>/workspaces/<workspace_id>/tests/1234
{
   "user_tags":{
        "data":[
            {    "type":"user_tag",
                 "id":"1111"
            }
         ]
   },
   "id":"1234",
   "client_lock_stamp":1
}

Back to top