Description
From @ross-spencer on June 18, 2018 15:15
An example re-ingest query looks like this:
curl http://127.0.0.1:62080/api/ingest/reingest \
-H "Authorization: ApiKey test:test" \
-d'name=rein_1&uuid=5a5ad892-9244-458a-bfad-1df645caa323'
When it is run however, the following 404 can be seen (with a Django test configuration):
The path Archivematica is looking in for the AIP is:
[Errno 2] No such file or directory: u'/var/archivematica/sharedDirectory/tmp/rein_1'
And it can be seen in the source code that it will always add 'tmp'
as part of the URL being queried.
The workaround for this is to use the Storage Service Reingest method documented here:
curl -v -H "Authorization: ApiKey test:test" \
-H "Content-Type: application/json" \
-X POST \
-d '{"pipeline":"b10c005e-87da-452c-ac3f-7d525056cad4","reingest_type":"full"}' \
'http://127.0.0.1:62081/api/v2/file/5a5ad892-9244-458a-bfad-1df645caa323/reingest/'
NB. we can only automatically approve a full-reingest, not partial or meta, see: https://github.com/artefactual/archivematica/issues/1145
We should seek to enable the pipeline being queried to ask the storage service for the correct AIP Store location, for example if the following is configured in my storage service:
Then the location (I believe) needs to look like:
/var/archivematica/sharedDirectory/www/AIPsStore
However, the re-ingest process via the dashboard might need to be looked at in more detail to understand if its behaviour still works as originally intended. The docs need to be improved to make the functionality clearer, see here for an example where a request using a JSON body does not seem to be acknowledged as expected.
Copied from original issue: artefactual/archivematica#1143