-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #205 from zammad/private/rs/sla
Add rest api documentation for slas endpoint.
- Loading branch information
Showing
2 changed files
with
199 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,198 @@ | ||
Service-Level Agreements (SLA) | ||
****************************** | ||
|
||
List | ||
==== | ||
|
||
Required permission: ``admin.sla`` | ||
|
||
``GET``-Request sent: ``/api/v1/slas`` | ||
|
||
Response: | ||
|
||
.. code-block:: json | ||
:force: | ||
# HTTP-Code 200 Ok | ||
[ | ||
{ | ||
"id":2, | ||
"calendar_id":1, | ||
"name":"new sla", | ||
"first_response_time":120, | ||
"response_time":null, | ||
"update_time":120, | ||
"solution_time":120, | ||
"condition":{ | ||
"ticket.state_id":{ | ||
"operator":"is", | ||
"value":"2" | ||
} | ||
}, | ||
"updated_by_id":3, | ||
"created_by_id":3, | ||
"created_at":"2021-11-10T12:54:39.368Z", | ||
"updated_at":"2021-11-10T12:54:39.368Z" | ||
} | ||
] | ||
Show | ||
==== | ||
|
||
Required permission: ``admin.sla`` | ||
|
||
``GET``-Request sent: ``/api/v1/slas/{id}`` | ||
|
||
Response: | ||
|
||
.. code-block:: json | ||
:force: | ||
# HTTP-Code 200 Ok | ||
{ | ||
"id":2, | ||
"calendar_id":1, | ||
"name":"new sla", | ||
"first_response_time":120, | ||
"response_time":null, | ||
"update_time":120, | ||
"solution_time":120, | ||
"condition":{ | ||
"ticket.state_id":{ | ||
"operator":"is", | ||
"value":"2" | ||
} | ||
}, | ||
"updated_by_id":3, | ||
"created_by_id":3, | ||
"created_at":"2021-11-10T12:54:39.368Z", | ||
"updated_at":"2021-11-10T12:54:39.368Z" | ||
} | ||
Create | ||
====== | ||
|
||
Required permission: ``admin.sla`` | ||
|
||
``POST``-Request sent: ``/api/v1/slas`` | ||
|
||
.. code-block:: json | ||
{ | ||
"name":"new sla", | ||
"first_response_time":"120", | ||
"response_time":"", | ||
"update_time":"120", | ||
"solution_time":"120", | ||
"condition":{ | ||
"ticket.state_id":{ | ||
"operator":"is", | ||
"value":"2" | ||
} | ||
}, | ||
"calendar_id":"1", | ||
} | ||
Response: | ||
|
||
.. code-block:: json | ||
:force: | ||
# HTTP-Code 201 Created | ||
{ | ||
"id":2, | ||
"calendar_id":1, | ||
"name":"new sla", | ||
"first_response_time":120, | ||
"response_time":null, | ||
"update_time":120, | ||
"solution_time":120, | ||
"condition":{ | ||
"ticket.state_id":{ | ||
"operator":"is", | ||
"value":"2" | ||
} | ||
}, | ||
"updated_by_id":3, | ||
"created_by_id":3, | ||
"created_at":"2021-11-10T12:54:39.368Z", | ||
"updated_at":"2021-11-10T12:54:39.368Z" | ||
} | ||
Update | ||
====== | ||
|
||
Required permission: ``admin.sla`` | ||
|
||
``PUT``-Request sent: ``/api/v1/slas/{id}`` | ||
|
||
.. code-block:: json | ||
{ | ||
"name":"update sla", | ||
"first_response_time":"120", | ||
"response_time":"", | ||
"update_time":"120", | ||
"solution_time":"120", | ||
"condition":{ | ||
"ticket.state_id":{ | ||
"operator":"is", | ||
"value":"2" | ||
} | ||
}, | ||
"calendar_id":"1", | ||
"id":2 | ||
} | ||
Response: | ||
|
||
.. code-block:: json | ||
:force: | ||
# HTTP-Code 200 Ok | ||
{ | ||
"id":2, | ||
"calendar_id":1, | ||
"name":"update sla", | ||
"first_response_time":120, | ||
"response_time":null, | ||
"update_time":120, | ||
"solution_time":120, | ||
"condition":{ | ||
"ticket.state_id":{ | ||
"operator":"is", | ||
"value":"2" | ||
} | ||
}, | ||
"updated_by_id":3, | ||
"created_by_id":3, | ||
"created_at":"2021-11-10T12:54:39.368Z", | ||
"updated_at":"2021-11-10T13:02:52.053Z" | ||
} | ||
Delete | ||
====== | ||
|
||
Required permission: ``admin.sla`` | ||
|
||
.. danger:: **⚠ This is a permanent removal** | ||
|
||
Please note that removing SLA configurations cannot be undone. | ||
|
||
``DELETE``-Request sent: ``/api/v1/slas/{id}`` | ||
|
||
Response: | ||
|
||
.. code-block:: json | ||
:force: | ||
# HTTP-Code 200 Ok | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters