Changeset View
Changeset View
Standalone View
Standalone View
docs/api/use-cases.rst
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | 3. The client sends a deposit (a zip archive, some metadata or both) through | ||||
Then: | Then: | ||||
a. Server validates the client's input or returns detailed error if any. | a. Server validates the client's input or returns detailed error if any. | ||||
b. Server stores information received (metadata or software archive source | b. Server stores information received (metadata or software archive source | ||||
code or both). | code or both). | ||||
4. The server notifies the client it acknowledged the client's request. An | 4. The server creates a loading task and submits it to the | ||||
:ref:`Job Scheduler <swh-scheduler>` | |||||
5. The server notifies the client it acknowledged the client's request. An | |||||
``http 201 Created`` response with a deposit receipt in the body response is | ``http 201 Created`` response with a deposit receipt in the body response is | ||||
sent back. That deposit receipt will hold the necessary information to | sent back. That deposit receipt will hold the necessary information to | ||||
eventually complete the deposit later on if it was incomplete (also known as | eventually complete the deposit later on if it was incomplete (also known as | ||||
status ``partial``). | status ``partial``). | ||||
Schema representation | Schema representation | ||||
^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^ | ||||
Scenario: pushing a deposit via the SWORDv2_ protocol (nominal scenario): | Scenario: pushing a deposit via the SWORDv2_ protocol (nominal scenario): | ||||
.. figure:: ../images/deposit-create-chart.svg | .. figure:: ../images/deposit-create-chart.svg | ||||
:alt: | :alt: | ||||
Updating an existing deposit | Updating an existing deposit | ||||
"""""""""""""""""""""""""""" | """""""""""""""""""""""""""" | ||||
5. Client updates existing deposit through the *update uris* (one or more POST | 6. Client updates existing deposit through the *update uris* (one or more POST | ||||
or PUT requests to either the *edit-media iri* or *edit iri*). | or PUT requests to either the *edit-media iri* or *edit iri*). | ||||
1. Server validates the client's input or returns detailed error if any | 1. Server validates the client's input or returns detailed error if any | ||||
2. Server stores information received (metadata or software archive source | 2. Server stores information received (metadata or software archive source | ||||
code or both) | code or both) | ||||
This would be the case for example if the client initially posted a | This would be the case for example if the client initially posted a | ||||
Show All 21 Lines | |||||
.. figure:: ../images/deposit-update-chart.svg | .. figure:: ../images/deposit-update-chart.svg | ||||
:alt: | :alt: | ||||
Deleting deposit (or associated archive, or associated metadata) | Deleting deposit (or associated archive, or associated metadata) | ||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | ||||
6. Deposit deletion is possible as long as the deposit is still in ``partial`` | 7. Deposit deletion is possible as long as the deposit is still in ``partial`` | ||||
state. | state. | ||||
1. Server validates the client's input or returns detailed error if any | 1. Server validates the client's input or returns detailed error if any | ||||
2. Server actually delete information according to request | 2. Server actually delete information according to request | ||||
Schema representation | Schema representation | ||||
^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^ | ||||
Scenario: deleting a deposit via SWORDv2_ protocol: | Scenario: deleting a deposit via SWORDv2_ protocol: | ||||
.. figure:: ../images/deposit-delete-chart.svg | .. figure:: ../images/deposit-delete-chart.svg | ||||
:alt: | :alt: | ||||
Client asks for operation status | Client asks for operation status | ||||
"""""""""""""""""""""""""""""""" | """""""""""""""""""""""""""""""" | ||||
7. Operation status can be read through a GET query to the *state iri*. | 8. Operation status can be read through a GET query to the *state iri*. | ||||
Server: Triggering deposit checks | Server: Triggering deposit checks | ||||
""""""""""""""""""""""""""""""""" | """"""""""""""""""""""""""""""""" | ||||
Once the status ``deposited`` is reached for a deposit, checks for the | Once the status ``deposited`` is reached for a deposit, checks for the | ||||
associated archive(s) and metadata will be triggered. If those checks | associated archive(s) and metadata will be triggered. If those checks | ||||
fail, the status is changed to ``rejected`` and nothing more happens | fail, the status is changed to ``rejected`` and nothing more happens | ||||
Show All 15 Lines |