Status
WARNING
Das Erstellen, Ändern oder Entfernen von Status über die unten aufgeführten Endpunkte wird nicht empfohlen! Sie können dies in der Benutzeroberfläche von Zammad tun. Gehen Sie dazu in der Verwaltungsoberfläche zu System > Objekte > Ticket.
Auflisten
Erforderliche Berechtigung: admin.object oder ticket.agent oderticket.customer
GET-Anfrage gesendet: /api/v1/ticket_states
Details
// HTTP-Code 200 OK
[
{
"id": 1,
"state_type_id": 1,
"name": "new",
"next_state_id": null,
"ignore_escalation": false,
"default_create": true,
"default_follow_up": false,
"note": null,
"active": true,
"updated_by_id": 1,
"created_by_id": 1,
"created_at": "2021-11-03T11:51:13.504Z",
"updated_at": "2021-11-03T11:51:13.520Z"
},
{
"id": 2,
"state_type_id": 2,
"name": "open",
"next_state_id": null,
"ignore_escalation": false,
"default_create": false,
"default_follow_up": true,
"note": null,
"active": true,
"updated_by_id": 1,
"created_by_id": 1,
"created_at": "2021-11-03T11:51:13.518Z",
"updated_at": "2021-11-03T11:51:13.518Z"
},
{
"id": 3,
"state_type_id": 3,
"name": "pending reminder",
"next_state_id": null,
"ignore_escalation": true,
"default_create": false,
"default_follow_up": false,
"note": null,
"active": true,
"updated_by_id": 1,
"created_by_id": 1,
"created_at": "2021-11-03T11:51:13.528Z",
"updated_at": "2021-11-03T11:51:13.528Z"
},
{
"id": 4,
"state_type_id": 5,
"name": "closed",
"next_state_id": null,
"ignore_escalation": true,
"default_create": false,
"default_follow_up": false,
"note": null,
"active": true,
"updated_by_id": 1,
"created_by_id": 1,
"created_at": "2021-11-03T11:51:13.535Z",
"updated_at": "2021-11-03T11:51:13.535Z"
},
{
"id": 5,
"state_type_id": 6,
"name": "merged",
"next_state_id": null,
"ignore_escalation": true,
"default_create": false,
"default_follow_up": false,
"note": null,
"active": true,
"updated_by_id": 1,
"created_by_id": 1,
"created_at": "2021-11-03T11:51:13.540Z",
"updated_at": "2021-11-03T11:51:13.540Z"
},
{
"id": 6,
"state_type_id": 7,
"name": "removed",
"next_state_id": null,
"ignore_escalation": true,
"default_create": false,
"default_follow_up": false,
"note": null,
"active": false,
"updated_by_id": 1,
"created_by_id": 1,
"created_at": "2021-11-03T11:51:13.546Z",
"updated_at": "2021-11-03T11:51:13.546Z"
},
{
"id": 7,
"state_type_id": 4,
"name": "pending close",
"next_state_id": 4,
"ignore_escalation": true,
"default_create": false,
"default_follow_up": false,
"note": null,
"active": true,
"updated_by_id": 1,
"created_by_id": 1,
"created_at": "2021-11-03T11:51:13.553Z",
"updated_at": "2021-11-03T11:51:13.553Z"
}
]Anzeigen
Erforderliche Berechtigung: admin.object oder ticket.agent oderticket.customer
GET-Anfrage gesendet: /api/v1/ticket_states/{id}
Details
// HTTP-Code 200 OK
{
"id": 4,
"state_type_id": 5,
"name": "closed",
"next_state_id": null,
"ignore_escalation": true,
"default_create": false,
"default_follow_up": false,
"note": null,
"active": true,
"updated_by_id": 1,
"created_by_id": 1,
"created_at": "2021-11-03T11:51:13.535Z",
"updated_at": "2021-11-03T11:51:13.535Z"
}Erstellen
Erforderliche Berechtigung: admin.object
POST-Anfrage gesendet: /api/v1/ticket_states
INFO
Below payload makes use of state_type_id which is a instance specific set of IDs. State types indicate how the state will work.
As there's no endpoint for retrieving these, please use the Rails console.
Details
{
"name": "in progress",
"state_type_id": 2,
"ignore_escalation": true,
"active": true
}Aktualisierung
Erforderliche Berechtigung: admin.object
PUT-Anfrage gesendet: /api/v1/ticket_states/{id}
Details
{
"note": "State created & updated via API"
}Löschen
Erforderliche Berechtigung: admin.object
DELETE-Anfrage gesendet: /api/v1/ticket_states/{id}
DANGER
Dies ist eine dauerhafte Entfernung
Bitte beachten Sie, dass das Entfernen von Ticket-Status nicht rückgängig gemacht werden kann.
Das Entfernen von Ticket-Status mit Referenzen in Tickets ist nicht möglich über API - dies wird angezeigt durch "Fehler": "Kann nicht gelöscht werden, Objekt hat Referenzen.". Dies ist kein Fehler.
Erwägen Sie, entweder den besagten Status auf active: false zu setzen oder alle Tickets mit dem Status auf einen anderen Status abzuändern.
Details
Response:
// HTTP-Code 200 OK
{}