Changeset View
Changeset View
Standalone View
Standalone View
swh/deposit/api/deposit_update.py
Show First 20 Lines • Show All 158 Lines • ▼ Show 20 Lines | ) -> Dict[str, Any]: | ||||
- no swhid, atom: replace all the deposit (status partial) metadata with the | - no swhid, atom: replace all the deposit (status partial) metadata with the | ||||
provided ones. | provided ones. | ||||
- with swhid, atom: replace all the deposit (status done) metadata with the | - with swhid, atom: replace all the deposit (status done) metadata with the | ||||
provided ones and push such metadata to the metadata storage directly. | provided ones and push such metadata to the metadata storage directly. | ||||
source: | source: | ||||
- http://swordapp.github.io/SWORDv2-Profile/SWORDProfile.html#protocoloperations_editingcontent_metadata # noqa | - http://swordapp.github.io/SWORDv2-Profile/SWORDProfile.html#protocoloperations_editingcontent_metadata | ||||
- http://swordapp.github.io/SWORDv2-Profile/SWORDProfile.html#protocoloperations_editingcontent_multipart # noqa | - http://swordapp.github.io/SWORDv2-Profile/SWORDProfile.html#protocoloperations_editingcontent_multipart | ||||
Raises: | Raises: | ||||
400 if any of the following occur: | 400 if any of the following occur: | ||||
- the swhid provided and the deposit swhid do not match | - the swhid provided and the deposit swhid do not match | ||||
- the provided metadata xml file is malformed | - the provided metadata xml file is malformed | ||||
- the provided xml atom entry is empty | - the provided xml atom entry is empty | ||||
- the provided swhid does not exist in the archive | - the provided swhid does not exist in the archive | ||||
Returns: | Returns: | ||||
204 No content | 204 No content | ||||
""" | """ # noqa | ||||
if request.content_type.startswith("multipart/"): | if request.content_type.startswith("multipart/"): | ||||
return self._multipart_upload( | return self._multipart_upload( | ||||
request, | request, | ||||
headers, | headers, | ||||
collection_name, | collection_name, | ||||
deposit_id=deposit_id, | deposit_id=deposit_id, | ||||
replace_archives=True, | replace_archives=True, | ||||
replace_metadata=True, | replace_metadata=True, | ||||
▲ Show 20 Lines • Show All 172 Lines • Show Last 20 Lines |