Changeset View
Changeset View
Standalone View
Standalone View
swh/web/api/views/revision.py
Show First 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | .. http:get:: /api/1/revision/(sha1_git)/ | ||||
:param string sha1_git: hexadecimal representation of the revision | :param string sha1_git: hexadecimal representation of the revision | ||||
**sha1_git** identifier | **sha1_git** identifier | ||||
{common_headers} | {common_headers} | ||||
{return_revision} | {return_revision} | ||||
**Allowed HTTP Methods:** :http:method:`get`, :http:method:`head`, | |||||
:http:method:`options` | |||||
:statuscode 200: no error | :statuscode 200: no error | ||||
:statuscode 400: an invalid **sha1_git** value has been provided | :statuscode 400: an invalid **sha1_git** value has been provided | ||||
:statuscode 404: requested revision can not be found in the archive | :statuscode 404: requested revision can not be found in the archive | ||||
**Example:** | **Example:** | ||||
.. parsed-literal:: | .. parsed-literal:: | ||||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | .. http:get:: /api/1/revision/(sha1_git)/directory/[(path)/] | ||||
{common_headers} | {common_headers} | ||||
:>json array content: directory entries as returned by :http:get:`/api/1/directory/(sha1_git)/[(path)/]` | :>json array content: directory entries as returned by :http:get:`/api/1/directory/(sha1_git)/[(path)/]` | ||||
:>json string path: path of directory from the revision root one | :>json string path: path of directory from the revision root one | ||||
:>json string revision: the unique revision identifier | :>json string revision: the unique revision identifier | ||||
:>json string type: the type of the directory | :>json string type: the type of the directory | ||||
**Allowed HTTP Methods:** :http:method:`get`, :http:method:`head`, | |||||
:http:method:`options` | |||||
:statuscode 200: no error | :statuscode 200: no error | ||||
:statuscode 400: an invalid **sha1_git** value has been provided | :statuscode 400: an invalid **sha1_git** value has been provided | ||||
:statuscode 404: requested revision can not be found in the archive | :statuscode 404: requested revision can not be found in the archive | ||||
**Example:** | **Example:** | ||||
.. parsed-literal:: | .. parsed-literal:: | ||||
Show All 23 Lines | .. http:get:: /api/1/revision/(sha1_git)[/prev/(prev_sha1s)]/log/ | ||||
If provided, revisions information will be added at the beginning of the returned list. | If provided, revisions information will be added at the beginning of the returned list. | ||||
:query int per_page: number of elements in the returned list, for pagination purpose | :query int per_page: number of elements in the returned list, for pagination purpose | ||||
{common_headers} | {common_headers} | ||||
{resheader_link} | {resheader_link} | ||||
{return_revision_array} | {return_revision_array} | ||||
**Allowed HTTP Methods:** :http:method:`get`, :http:method:`head`, | |||||
:http:method:`options` | |||||
:statuscode 200: no error | :statuscode 200: no error | ||||
:statuscode 400: an invalid **sha1_git** value has been provided | :statuscode 400: an invalid **sha1_git** value has been provided | ||||
:statuscode 404: requested revision can not be found in the archive | :statuscode 404: requested revision can not be found in the archive | ||||
**Example:** | **Example:** | ||||
.. parsed-literal:: | .. parsed-literal:: | ||||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |