swarmtix_online_categories_delete
Removes a category from an online event and from its talks
swarmtix_online_categories_delete
Removes a category from an online event and from every talk of that event, and returns how many talks it was taken off. This cannot be undone.
When you would reach for it
- Removing a category added by mistake.
Scope
events:write
The connection's user must be allowed to edit the event, and the event must be an online event.
The event must be unpublished.
This tool is marked destructive and is not idempotent. A second call finds the category already gone and is refused. There is no undo.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
event | string | Yes | - | The event's id (a GUID) or its URL slug. |
category | string | Yes | - | The id of the category, as returned by swarmtix_online_program_get. |
Example call
{
"name": "swarmtix_online_categories_delete",
"arguments": {
"event": "spring-summit-online",
"category": "6e0d4a1c-0000-0000-0000-000000000000"
}
}What comes back
{ "deleted": "6e0d4a1c-0000-0000-0000-000000000000", "removedFromTalks": 3 }removedFromTalks is how many of this event's talks the category was taken off.
What happens when you call it
- The event is resolved through the edit gate and must be an online event.
- The category must be linked to this event. The link is what counts, not who created the category.
- A published event is refused.
- The category is unlinked from this event and from this event's talks.
- The category row itself is deleted only when no other event or talk still uses it.
Troubleshooting
"Event not found, or this connection does not have access to it."
The event does not exist, it belongs to another organisation, or this organizer may read it but not edit it.
"This event is not an online event. Talks, speakers, categories and hosts belong to online events only. Nothing was changed."
The event is a physical event. These tools only work on events created with kind: "online".
"event is not valid: it is published, so a category cannot be deleted."
Deleting is refused while the event is published. Unpublish it first with swarmtix_events_unpublish, then try again.
"category is not valid: there is no category with that id on this event."
The id is not a category of this event. Get the ids from swarmtix_online_program_get.
Use cases
- Tidying a duplicated program