Skip to content

Commit

Permalink
Add documentation for REST API PO endpoint
Browse files Browse the repository at this point in the history
WIP
  • Loading branch information
anvit committed Oct 31, 2023
1 parent b62a20b commit 9f732fc
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
41 changes: 41 additions & 0 deletions dev-manual/api/add-po.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
.. _api-add-po:

================================
Add physical object endpoint
================================

**POST /api/informationobjects**

This endpoint will allow adding a :term:`physical object`.

.. _add-po-ex-req:

Example request
===============

.. code-block:: none
curl -v -X POST -H "REST-API-Key: api-key" "https://www.example.com/api/informationobjects" -H Content-Type: "application/json" -d '{"name": "testobject", "location": "Test location"}'
.. _add-po-ex-resp:

Example response
================

Example response is truncated and edited for readability.

.. code-block:: none
HTTP/1.1 200 OK
Content-Type: application/pdf
Content-Length: 339503
Content-Description: File Transfer
Content-Transfer-Encoding: binary
Content-Disposition: attachment; filename=sample_file.pdf
Cache-Control: public, must-revalidate
Pragma: public
(file bitstream)
:ref:`Back to top <api-add-po>`
2 changes: 2 additions & 0 deletions dev-manual/api/api-intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ parameters. There are three endpoints available:
* :ref:`Browse taxonomy terms <api-browse-taxonomies>`
* :ref:`Browse information objects <api-browse-io>`
* :ref:`Read information object <api-read-io>`
* :ref:`Download digital objects <api-download-do>`
* :ref:`Add physical objects <api-add-po>`

.. _api-intro-i18n:

Expand Down

0 comments on commit 9f732fc

Please sign in to comment.