Changeset View
Changeset View
Standalone View
Standalone View
swh/web/api/views/directory.py
Show All 23 Lines | |||||
@format_docstring() | @format_docstring() | ||||
def api_directory(request, sha1_git, path=None): | def api_directory(request, sha1_git, path=None): | ||||
""" | """ | ||||
.. http:get:: /api/1/directory/(sha1_git)/[(path)/] | .. http:get:: /api/1/directory/(sha1_git)/[(path)/] | ||||
Get information about directory objects. | Get information about directory objects. | ||||
Directories are identified by **sha1** checksums, compatible with Git | Directories are identified by **sha1** checksums, compatible with Git | ||||
directory identifiers. | directory identifiers. | ||||
See :func:`swh.model.identifiers.directory_identifier` in our data model | See :func:`swh.model.git_objects.directory_git_object` in our data model | ||||
module for details about how they are computed. | module for details about how they are computed. | ||||
When given only a directory identifier, this endpoint returns information | When given only a directory identifier, this endpoint returns information | ||||
about the directory itself, returning its content (usually a list of directory | about the directory itself, returning its content (usually a list of directory | ||||
entries). When given a directory identifier and a path, this endpoint returns | entries). When given a directory identifier and a path, this endpoint returns | ||||
information about the directory entry pointed by the relative path, starting | information about the directory entry pointed by the relative path, starting | ||||
path resolution from the given directory. | path resolution from the given directory. | ||||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |