Skip to content

Commit

Permalink
Update api docs with usage examples and responses
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhwaniartefact committed Mar 14, 2024
1 parent d33dd18 commit a8996d3
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions dev-manual/api/api-reference-archivematica.rst
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,38 @@ Response definitions:
================== ==========================================================


Usage example (assuming that avalon.csv exists)::

curl -X POST \
http://my_archivematica_instance.archivematica.org/api/ingest/copy_metadata_files/ \
-H 'Authorization: ApiKey [_your_username_]:[_your_ApiKey_]' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'sip_uuid=a7f1f36c-55c1-4fb7-a898-76d102e847dc&source_paths%5B%5D='''NmRjYTgxNDAtMDg2NC00MzE5LTg2ZDctNTg0ZjZiZTY4N2EzOi9ob21lL2FyY2hpdmVtYXRpY2EvYXJjaGl2ZW1hdGljYS1zYW1wbGVkYXRhL2lzc3VlX3RlbXBsYXRlLm1k''''


Response examples

200 OK::

{
"error": false,
"message": "Metadata files added successfully."
}

400 Bad Request ::

{
"error": true,
"message": "sip_uuid and source_paths[] both required."
}

500 Internal Server Error::

{
"error": true,
"message": "sip_uuid and source_paths[] both required."
}

.. _admin-resource:

Administration
Expand Down

0 comments on commit a8996d3

Please sign in to comment.