archivematica / Issues

Issues repository for the Archivematica project
GNU Affero General Public License v3.0
16 stars 1 forks source link

Problem: There doesn't seem to be a need to have two package-type status endpoints #626

Open ross-spencer opened 5 years ago

ross-spencer commented 5 years ago

Please describe the problem you'd like to be solved.

As a developer using the API I currently have to integrate two different calls to check Transfer or SIP status depending on where I expect processing to be in the Archivematica pipeline.

I may loop around checking Transfer status until it is COMPLETE. At which point, I might then monitor Ingest status until it is COMPLETE so that I can tick-off that the package (the AIP) was created and properly stored.

Describe the solution you'd like to see implemented.

I would like to be able to make a single call to a generic package endpoint whether I am looking at a Transfer or a SIP and retrieve the same status information.

As a consumer of the endpoint I would like to see returned:

  1. Whether I am looking at a Transfer or a SIP.
  2. Status, e.g. COMPLETE vs FAILURE.
  3. Possibly the last Job that was completed or unsuccessful see: https://github.com/archivematica/Issues/issues/625.
  4. Both the transfer uuid and the sip uuid.

A user would only need to submit one UUID and Archivematica would need to find a SIP or an AIP with the matching UUID and return the appropriate information.

Describe alternatives you've considered.

We could leave the two endpoints as-is. I just feel that a mechanism like this would help in the day-to-day running of Archivematica, and make engaging with Archivematica that much easier in tools such as the automation-tools.

Additional context

Nothing of note.


For Artefactual use: Please make sure these steps are taken before moving this issue from Review to Verified in Waffle:

ross-spencer commented 4 years ago

Related to https://github.com/archivematica/Issues/issues/972 and provided as a potential way to achieve this via https://github.com/artefactual-labs/amclient/commit/8dd3d9fac9e1df96aaea833fbcf0ba5377515c05