Skip to content
Snippets Groups Projects

User documentation for the deposit service

Open Renaud Boyer requested to merge deposit into master
2 files
+ 59
41
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -5,7 +5,7 @@ Requisites
----------
1. Have your account credentials and prepared artefacts at hand.
2. Either the CLI installed or a tool to make API calls (curl_, HTTPie_, etc.)
2. Either the CLI installed or a tool to make API calls (curl, HTTPie, etc.)
Make a code deposit
-------------------
@@ -13,40 +13,48 @@ Make a code deposit
One shot
^^^^^^^^
.. tabs::
.. code-tab:: CLI
.. tab-set::
.. tab-item:: CLI
.. code-block:: console
swh deposit ...
.. code-tab:: API
.. tab-item:: API
.. code-block:: console
# Note the 'In-Progress: false' header
curl -i -u <username>:<pass> \
-F "file=@deposit.json;type=application/zip;filename=payload" \
-F "atom=@atom-entry.xml;type=application/atom+xml;charset=UTF-8" \
-H 'In-Progress: false' \
-XPOST https://deposit.softwareheritage.org/1/hal/
-F "file=@deposit.json;type=application/zip;filename=payload" \
-F "atom=@atom-entry.xml;type=application/atom+xml;charset=UTF-8" \
-H 'In-Progress: false' \
-XPOST https://deposit.softwareheritage.org/1/hal/
Partial
^^^^^^^
Check its status
----------------
Your deposit will go :doc:`through multiple steps </references/workflow>` before appearing in the archive, You can check the status of your deposit ang get its SWHID :
.. tabs::
.. tab-set::
.. code-tab:: CLI
swh deposit status ...
.. tab-item:: CLI
.. code-tab:: API
.. code-block:: console
swh deposit ...
curl -i -u hal:<pass> \
-F "file=@deposit.json;type=application/zip;filename=payload" \
-F "atom=@atom-entry.xml;type=application/atom+xml;charset=UTF-8" \
-H 'In-Progress: false' \
-XPOST https://deposit.softwareheritage.org/1/hal/
.. tab-item:: API
.. code-block:: console
:: _curl: https://curl.se/
:: _HTTPie: https://httpie.io/
\ No newline at end of file
curl -i -u hal:<pass> \
-F "file=@deposit.json;type=application/zip;filename=payload" \
-F "atom=@atom-entry.xml;type=application/atom+xml;charset=UTF-8" \
-H 'In-Progress: false' \
-XPOST https://deposit.softwareheritage.org/1/hal/
Loading