Delete an existing automation by ID
Before You Begin
- Use the GraphQL Playground.
- Authenticate with a Service Account token.
Prerequisites
- You must have admin permission on the automation's repository to delete it.
- You need the automation ID to delete. See Retrieve automations to find automation IDs.
Delete an Automation
Basic example (delete automation by ID)
Inputs
- id: The automation ID to delete. Get this from Retrieve automations.
mutation {
deleteAutomation(input: {id: "21"}) {
success
}
}
Response:
{
"data": {
"deleteAutomation": {
"success": true,
}
}
}
Response explained
- success: Boolean indicating whether the deletion was successful.
Tips
- Verify before deleting: Use Retrieve automations to confirm the automation ID and ensure you have the correct automation.
- Check permissions: Ensure you have admin access to the automation's repository before attempting deletion.
- Permanent action: Deletion is irreversible. Consider deactivating the automation first using Update automation if you might need to restore it later.
- Error handling: Always check the
success
field in the response to handle potential errors gracefully.
See also
- Retrieve automations: Retrieve automations
- Create automation: Create automation
- Update automation: Update automation