diff --git a/dev-manual/api/api-reference-archivematica.rst b/dev-manual/api/api-reference-archivematica.rst index 89632a40..a39497bf 100644 --- a/dev-manual/api/api-reference-archivematica.rst +++ b/dev-manual/api/api-reference-archivematica.rst @@ -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 (expect reason to include different validation errors):: + + { + "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