# Tag assignments

Use this endpoint to apply tags to or remove tags from assets in a customer 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/v2/managed_users/:id/tags_assignments Apply tags to or remove tags from assets in a customer workspace.

# Manage tag assignments

Applies or removes tags from assets in a customer 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/v2/managed_users/:id/tags_assignments

# URL parameters

Name Type Description
id string
required
Embedded customer ID/external ID. The External ID must be URL encoded and prefixed with an E (for example, EA2300).

# 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/v2/managed_users/:id/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/v2/managed_users/19029/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/16/2024, 12:26:21 AM