Changeset View
Changeset View
Standalone View
Standalone View
swh/web/api/views/vault.py
Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | .. http:post:: /api/1/vault/directory/(dir_id)/ | ||||
(directory or revision) | (directory or revision) | ||||
:>json string progress_message: message describing the cooking task | :>json string progress_message: message describing the cooking task | ||||
progress | progress | ||||
:>json number id: the cooking task id | :>json number id: the cooking task id | ||||
:>json string status: the cooking task status | :>json string status: the cooking task status | ||||
(either **new**, **pending**, **done** or **failed**) | (either **new**, **pending**, **done** or **failed**) | ||||
:>json string obj_id: the identifier of the object to cook | :>json string obj_id: the identifier of the object to cook | ||||
**Allowed HTTP Methods:** :http:method:`get`, :http:method:`post`, | |||||
:http:method:`head`, :http:method:`options` | |||||
:statuscode 200: no error | :statuscode 200: no error | ||||
:statuscode 400: an invalid directory identifier has been provided | :statuscode 400: an invalid directory identifier has been provided | ||||
:statuscode 404: requested directory did not receive any cooking | :statuscode 404: requested directory did not receive any cooking | ||||
request yet (in case of GET) or can not be found in the archive | request yet (in case of GET) or can not be found in the archive | ||||
(in case of POST) | (in case of POST) | ||||
""" | """ | ||||
_, obj_id = query.parse_hash_with_algorithms_or_throws( | _, obj_id = query.parse_hash_with_algorithms_or_throws( | ||||
dir_id, ['sha1'], 'Only sha1_git is supported.') | dir_id, ['sha1'], 'Only sha1_git is supported.') | ||||
Show All 16 Lines | .. http:get:: /api/1/vault/directory/(dir_id)/raw/ | ||||
See :http:get:`/api/1/vault/directory/(dir_id)/` to get more | See :http:get:`/api/1/vault/directory/(dir_id)/` to get more | ||||
details on directory cooking. | details on directory cooking. | ||||
:param string dir_id: the directory's sha1 identifier | :param string dir_id: the directory's sha1 identifier | ||||
:resheader Content-Type: application/octet-stream | :resheader Content-Type: application/octet-stream | ||||
**Allowed HTTP Methods:** :http:method:`get`, :http:method:`head`, | |||||
:http:method:`options` | |||||
:statuscode 200: no error | :statuscode 200: no error | ||||
:statuscode 400: an invalid directory identifier has been provided | :statuscode 400: an invalid directory identifier has been provided | ||||
:statuscode 404: requested directory did not receive any cooking | :statuscode 404: requested directory did not receive any cooking | ||||
request yet (in case of GET) or can not be found in the archive | request yet (in case of GET) or can not be found in the archive | ||||
(in case of POST) | (in case of POST) | ||||
""" | """ | ||||
_, obj_id = query.parse_hash_with_algorithms_or_throws( | _, obj_id = query.parse_hash_with_algorithms_or_throws( | ||||
dir_id, ['sha1'], 'Only sha1_git is supported.') | dir_id, ['sha1'], 'Only sha1_git is supported.') | ||||
▲ Show 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | .. http:post:: /api/1/vault/revision/(rev_id)/gitfast/ | ||||
:>json string obj_type: the type of object to cook | :>json string obj_type: the type of object to cook | ||||
(directory or revision) | (directory or revision) | ||||
:>json string progress_message: message describing the cooking task | :>json string progress_message: message describing the cooking task | ||||
progress | progress | ||||
:>json number id: the cooking task id | :>json number id: the cooking task id | ||||
:>json string status: the cooking task status (new/pending/done/failed) | :>json string status: the cooking task status (new/pending/done/failed) | ||||
:>json string obj_id: the identifier of the object to cook | :>json string obj_id: the identifier of the object to cook | ||||
**Allowed HTTP Methods:** :http:method:`get`, :http:method:`post`, | |||||
:http:method:`head`, :http:method:`options` | |||||
:statuscode 200: no error | :statuscode 200: no error | ||||
:statuscode 400: an invalid revision identifier has been provided | :statuscode 400: an invalid revision identifier has been provided | ||||
:statuscode 404: requested directory did not receive any cooking | :statuscode 404: requested directory did not receive any cooking | ||||
request yet (in case of GET) or can not be found in the archive | request yet (in case of GET) or can not be found in the archive | ||||
(in case of POST) | (in case of POST) | ||||
""" | """ | ||||
_, obj_id = query.parse_hash_with_algorithms_or_throws( | _, obj_id = query.parse_hash_with_algorithms_or_throws( | ||||
rev_id, ['sha1'], 'Only sha1_git is supported.') | rev_id, ['sha1'], 'Only sha1_git is supported.') | ||||
Show All 16 Lines | .. http:get:: /api/1/vault/revision/(rev_id)/gitfast/raw/ | ||||
See :http:get:`/api/1/vault/revision/(rev_id)/gitfast/` to get more | See :http:get:`/api/1/vault/revision/(rev_id)/gitfast/` to get more | ||||
details on directory cooking. | details on directory cooking. | ||||
:param string rev_id: the revision's sha1 identifier | :param string rev_id: the revision's sha1 identifier | ||||
:resheader Content-Type: application/octet-stream | :resheader Content-Type: application/octet-stream | ||||
**Allowed HTTP Methods:** :http:method:`get`, :http:method:`head`, | |||||
:http:method:`options` | |||||
:statuscode 200: no error | :statuscode 200: no error | ||||
:statuscode 400: an invalid revision identifier has been provided | :statuscode 400: an invalid revision identifier has been provided | ||||
:statuscode 404: requested directory did not receive any cooking | :statuscode 404: requested directory did not receive any cooking | ||||
request yet (in case of GET) or can not be found in the archive | request yet (in case of GET) or can not be found in the archive | ||||
(in case of POST) | (in case of POST) | ||||
""" | """ | ||||
_, obj_id = query.parse_hash_with_algorithms_or_throws( | _, obj_id = query.parse_hash_with_algorithms_or_throws( | ||||
rev_id, ['sha1'], 'Only sha1_git is supported.') | rev_id, ['sha1'], 'Only sha1_git is supported.') | ||||
Show All 23 Lines |