-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation for REST API PO endpoint (#234)
Added documentation for the REST API endpoint for creating new physical objects.
- Loading branch information
Showing
3 changed files
with
41 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,38 @@ | ||
.. _api-add-po: | ||
|
||
================================ | ||
Add physical object endpoint | ||
================================ | ||
|
||
**POST /api/physicalobjects** | ||
|
||
This endpoint will allow adding a :term:`physical object`. | ||
|
||
.. _add-po-ex-req: | ||
|
||
Example request | ||
=============== | ||
|
||
.. code-block:: none | ||
curl -v -X POST http://localhost:63001/api/physicalobjects -H 'Content-Type: application/json' -H 'REST-API-Key: 3e136949f7b9b915' -d '{ "name": "T-01", "location": "Example location", "type": "Shelf" }' | ||
.. _add-po-ex-resp: | ||
|
||
Example response | ||
================ | ||
|
||
Example response is truncated and edited for readability. | ||
|
||
.. code-block:: none | ||
HTTP/1.1 201 Created | ||
Content-Type: application/json; charset=utf-8 | ||
Transfer-Encoding: chunked | ||
Connection: keep-alive | ||
Cache-Control: private | ||
{"slug":"t-01"} | ||
:ref:`Back to top <api-add-po>` |
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
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