archivematica icon indicating copy to clipboard operation
archivematica copied to clipboard

Use json.loads in OutputClientScriptJob

Open sevein opened this issue 10 months ago • 0 comments

What get_aip_storage_locations writes to stdout is a JSON blob so we should use the json decoder to deserialize it. The payload looks like the following, always hitting the Storage Service API to build the full list of locations:

{
  "default": {"description": "Default Location", "uri": "/api/v2/location/default/AS/"},
  "3191bf34-c803-4bdf-a37a-cf1aaf1364d9": {"description": "...", "uri": "..."}
}

This is done twice in the standard Archivematica workflow, i.e. for AIP (AS) and DIP (DS) store locations.

sevein avatar Apr 23 '24 03:04 sevein