Changeset View
Changeset View
Standalone View
Standalone View
swh/web/api/views/release.py
# Copyright (C) 2015-2018 The Software Heritage developers | # Copyright (C) 2015-2018 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU Affero General Public License version 3, or any later version | # License: GNU Affero General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
from swh.web.common import service | from swh.web.common import service | ||||
from swh.web.api import utils | from swh.web.api import utils | ||||
from swh.web.api.apidoc import api_doc | from swh.web.api.apidoc import api_doc | ||||
from swh.web.api.apiurls import api_route | from swh.web.api.apiurls import api_route | ||||
from swh.web.api.views.utils import api_lookup | from swh.web.api.views.utils import api_lookup | ||||
@api_route(r'/release/(?P<sha1_git>[0-9a-f]+)/', 'api-release') | @api_route(r'/release/(?P<sha1_git>[0-9a-fA-F]+)/', 'api-release') | ||||
@api_doc('/release/') | @api_doc('/release/') | ||||
def api_release(request, sha1_git): | def api_release(request, sha1_git): | ||||
""" | """ | ||||
.. http:get:: /api/1/release/(sha1_git)/ | .. http:get:: /api/1/release/(sha1_git)/ | ||||
Get information about a release in the archive. | Get information about a release in the archive. | ||||
Releases are identified by **sha1** checksums, compatible with Git tag identifiers. | Releases are identified by **sha1** checksums, compatible with Git tag identifiers. | ||||
See :func:`swh.model.identifiers.release_identifier` in our data model module for details | See :func:`swh.model.identifiers.release_identifier` in our data model module for details | ||||
Show All 37 Lines |