-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
682 additions
and
274 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,15 @@ | ||
Checklist Endpoints | ||
=================== | ||
|
||
Zammad has different checklist endpoints: | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:glob: | ||
|
||
/api/checklist/checklists | ||
/api/checklist/checklist-items | ||
/api/checklist/checklist-templates | ||
|
||
.. note:: *Checklist templates* include their items whereas the *standard | ||
checklist* has a separate item endpoint. |
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,115 @@ | ||
Checklist Items | ||
=============== | ||
|
||
Show | ||
---- | ||
|
||
Required permission: ``ticket.agent`` | ||
|
||
``GET``-Request sent: ``/api/v1/checklist_items/{checklist item id}`` | ||
|
||
Response: | ||
|
||
.. code-block:: json | ||
:force: | ||
# HTTP-Code 200 OK | ||
{ | ||
"text": "Hand over the goods to the shipping company", | ||
"checked": false, | ||
"updated_by_id": 3, | ||
"ticket_id": null, | ||
"created_by_id": 3, | ||
"checklist_id": 6, | ||
"id": 20, | ||
"created_at": "2024-10-15T08:48:14.216Z", | ||
"updated_at": "2024-10-15T08:49:10.467Z" | ||
} | ||
Create | ||
------ | ||
|
||
Required permission: ``ticket.agent`` | ||
|
||
``POST``-Request sent: ``/api/v1/checklist_items`` | ||
|
||
Request: | ||
|
||
.. code-block:: json | ||
:force: | ||
{ | ||
"text": "New Item via API!", | ||
"checklist_id": 12, | ||
"checked": false | ||
} | ||
Response: | ||
|
||
.. code-block:: json | ||
:force: | ||
# HTTP-Code 200 OK | ||
{ | ||
"id": 35, | ||
"text": "New Item via API!", | ||
"checked": false, | ||
"checklist_id": 12, | ||
"created_by_id": 3, | ||
"updated_by_id": 3, | ||
"created_at": "2024-10-16T08:00:35.347Z", | ||
"updated_at": "2024-10-16T08:00:35.347Z", | ||
"ticket_id": null | ||
} | ||
Update | ||
------ | ||
|
||
Required permission: ``ticket.agent`` | ||
|
||
``PATCH``-Request sent: ``/api/v1/checklist_items/{checklist item id}`` | ||
|
||
Request: | ||
|
||
.. code-block:: json | ||
:force: | ||
{ | ||
"text": "Changed checklist item", | ||
"checked": true | ||
} | ||
Response: | ||
|
||
.. code-block:: json | ||
:force: | ||
# HTTP-Code 200 OK | ||
{ | ||
"text": "Changed checklist item", | ||
"checked": true, | ||
"updated_by_id": 3, | ||
"ticket_id": null, | ||
"created_by_id": 3, | ||
"checklist_id": 6, | ||
"id": 20, | ||
"created_at": "2024-10-15T08:48:14.216Z", | ||
"updated_at": "2024-10-15T12:19:35.235Z" | ||
} | ||
Delete | ||
------ | ||
|
||
Required permission: ``ticket.agent`` | ||
|
||
``DELETE``-Request sent: ``/api/v1/checklist_items/{checklist item 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
Checklist Templates | ||
=================== | ||
|
||
Show | ||
---- | ||
|
||
Required permission: ``admin.checklists`` or ``ticket.agent`` | ||
|
||
``GET``-Request sent: ``/api/v1/checklist_templates/{checklist template id}`` | ||
|
||
Response: | ||
|
||
.. code-block:: json | ||
:force: | ||
# HTTP-Code 200 OK | ||
{ | ||
"name": "Return order", | ||
"active": true, | ||
"updated_by_id": 3, | ||
"created_by_id": 3, | ||
"id": 28, | ||
"sorted_item_ids": [ | ||
"18", | ||
"19", | ||
"20", | ||
"21" | ||
], | ||
"created_at": "2024-10-15T12:43:14.642Z", | ||
"updated_at": "2024-10-15T12:43:34.242Z", | ||
"item_ids": [ | ||
18, | ||
19, | ||
20, | ||
21 | ||
] | ||
} | ||
Create | ||
------ | ||
|
||
Required permission: ``admin.checklists`` | ||
|
||
``POST``-Request sent: ``/api/v1/checklist_templates`` | ||
|
||
Request: | ||
|
||
.. code-block:: json | ||
:force: | ||
{ | ||
"name": "My checklist template", | ||
"active": true, | ||
"items": [ | ||
"Item 1", | ||
"Item 2", | ||
"Item 3" | ||
] | ||
} | ||
Response: | ||
|
||
.. code-block:: json | ||
:force: | ||
# HTTP-Code 200 OK | ||
{ | ||
"id": 30, | ||
"name": "Test API II", | ||
"active": true, | ||
"sorted_item_ids": [ | ||
"22", | ||
"23", | ||
"24" | ||
], | ||
"created_by_id": 3, | ||
"updated_by_id": 3, | ||
"created_at": "2024-10-15T12:46:31.927Z", | ||
"updated_at": "2024-10-15T12:46:31.982Z", | ||
"item_ids": [ | ||
22, | ||
23, | ||
24 | ||
] | ||
} | ||
Update | ||
------ | ||
|
||
Required permission: ``admin.checklists`` | ||
|
||
``PATCH``-Request sent: ``/api/v1/checklist_templates/{checklist template id}`` | ||
|
||
Request: | ||
|
||
.. code-block:: json | ||
:force: | ||
{ | ||
"name": "My changed checklist template name", | ||
"active": true, | ||
"items": [ | ||
"Item 7", | ||
"Item 8", | ||
"Item 9" | ||
] | ||
} | ||
Response: | ||
|
||
.. code-block:: json | ||
:force: | ||
# HTTP-Code 200 OK | ||
{ | ||
"name": "My changed checklist template name", | ||
"active": true, | ||
"updated_by_id": 3, | ||
"created_by_id": 3, | ||
"id": 30, | ||
"sorted_item_ids": [ | ||
"25", | ||
"26", | ||
"27" | ||
], | ||
"created_at": "2024-10-15T12:46:31.927Z", | ||
"updated_at": "2024-10-15T12:51:22.245Z", | ||
"item_ids": [ | ||
25, | ||
26, | ||
27 | ||
] | ||
} | ||
Delete | ||
------ | ||
|
||
Required permission: ``admin.checklists`` | ||
|
||
``DELETE``-Request sent: ``/api/v1/checklist_templates/{checklist template id}`` | ||
|
||
Response: | ||
|
||
.. code-block:: json | ||
:force: | ||
# HTTP-Code 200 OK |
Oops, something went wrong.