Stati
WARNING
Creare, modificare o rimuovere stati tramite gli endpoint seguenti non è consigliato! Puoi farlo.
Elenca
Permesso richiesto: admin.object o ticket.agent oticket.customer
Richiesta GET inviata: /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"
}
]Mostra
Permesso richiesto: admin.object o ticket.agent oticket.customer
Richiesta GET inviata: /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"
}Crea
Permesso richiesto: admin.object
Richiesta POST inviata: /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
}Aggiornamento
Permesso richiesto: admin.object
Richiesta PUT inviata: /api/v1/ticket_states/{id}
Details
{
"note": "State created & updated via API"
}Elimina
Permesso richiesto: admin.object
Richiesta DELETE inviata: /api/v1/ticket_states/{id}
DANGER
Questa è una rimozione permanente
Tieni presente che rimuovere stati ticket non può essere annullato.
Details
Risposta:
// HTTP-Code 200 OK
{}