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
= "your-tag-id"
TAG_ID
= connect.Client()
client
# Destroy using the tag ID
client.tags.destroy(TAG_ID)
# Destroy using the tag object
= client.tags.get(TAG_ID)
tag tag.destroy()
Create a Tag
object representing the tag you wish to delete, and pass that to delete_tag()
.
library(connectapi)
<- connect()
client
<- get_tags(client)
tags <- tags$Departments
target_tag
delete_tag(client, depts_tag)
The delete_tag()
function returns a copy of the client
object.