# Tag assignments

Use this endpoint to apply tags to or remove tags from assets in your workspace.

TAG APIS

To create, retrieve, update, and delete tags programmatically, refer to our Environment management API documentation.

# Quick reference

Type Resource Description
POST /api/tags_assignments Apply tags to or remove tags from assets in your workspace.

# Manage tag assignments

Applies or removes tags from assets in your workspace. Assets that can be tagged through this endpoint include recipes and connections. You can assign one or more tags to these assets or remove existing tags.

POST /api/tags_assignments

# Payload

Name Type Description
add_tags array of strings
optional
An array of tag handles to be added. Each handle represents a tag to be applied to the specified assets.
remove_tags array of strings
optional
An array of tag handles to be removed. Each handle represents a tag to be removed from the specified assets.
recipe_ids array of integers
conditional
An array of recipe IDs to tag or untag. Required if connection_ids is not provided.
connection_ids array of integers
conditional
An array of connection IDs to tag or untag. Required if recipe_ids is not provided.

RETRIEVE TAG HANDLES WITH THE LIST TAGS ENDPOINT

Use the List tags (GET /api/tags) endpoint to retrieve the handles of the tags you plan to apply or remove.

# Sample request

This request adds the Accounting tag with the handle tag-ANgdXgTF-bANz3H to both a connection and a recipe in Workato.

curl  -X POST "https://www.workato.com/api/tags_assignments" \
      -H "Authorization: Bearer <api_token>" \
      -H "Content-Type: application/json" \
      -d '{
            "add_tags": ["tag-ANgdXgTF-bANz3H"],
            "recipe_ids": [54525313],
            "connection_ids": [1571346]
          }'

# Response

If the request returns a 200 OK status, the tag has been successfully added to or removed from the asset. No content is returned in the response body.


Last updated: 10/11/2024, 7:38:58 PM