Deleting Tags

Problem

You want to delete a tag.

Warning

You must have administrator privileges to delete a tag.

Solution

You need the identifier of the tag you wish to delete. See Viewing Tag Information for details.

from posit import connect

TAG_ID = "your-tag-id"

client = connect.Client()

client.delete(f"/v1/tags/{TAG_ID}")

Create a Tag object representing the tag you wish to delete, and pass that to delete_tag().

library(connectapi)
client <- connect()

tags <- get_tags(client)
target_tag <- tags$Departments

delete_tag(client, depts_tag)

The delete_tag() function returns a copy of the client object.