Page MenuHomeSoftware Heritage
Paste P444

swh-web schema
ActivePublic

Authored by vlorentz on Jun 20 2019, 1:38 PM.
info:
description: ''
title: Bookings API
version: ''
openapi: 3.0.0
paths:
/1/:
get:
description: Display the list of opened api endpoints.
operationId: list
/1/content/:
get:
description: ".. http:get:: /api/1/content/[(hash_type):](hash)/\n\n Get\
\ information about a content (aka a \"blob\") object.\n In the archive,\
\ a content object is identified based on checksum\n values computed using\
\ various hashing algorithms.\n\n :param string hash_type: optional parameter\
\ specifying which hashing algorithm has been used\n to compute the\
\ content checksum. It can be either ``sha1``, ``sha1_git``, ``sha256``\n\
\ or ``blake2s256``. If that parameter is not provided, it is assumed\
\ that the\n hashing algorithm used is ``sha1``.\n :param string\
\ hash: hexadecimal representation of the checksum value computed with\n \
\ the specified hashing algorithm.\n\n :reqheader Accept: the requested\
\ response content type,\n either ``application/json`` (default) or\
\ ``application/yaml``\n :resheader Content-Type: this depends on :http:header:`Accept`\
\ header of request\n\n :>json object checksums: object holding the computed\
\ checksum values for the requested content\n :>json string data_url: link\
\ to :http:get:`/api/1/content/[(hash_type):](hash)/raw/`\n for downloading\
\ the content raw bytes\n :>json string filetype_url: link to :http:get:`/api/1/content/[(hash_type):](hash)/filetype/`\n\
\ for getting information about the content MIME type\n :>json string\
\ language_url: link to :http:get:`/api/1/content/[(hash_type):](hash)/language/`\n\
\ for getting information about the programming language used in the\
\ content\n :>json number length: length of the content in bytes\n :>json\
\ string license_url: link to :http:get:`/api/1/content/[(hash_type):](hash)/license/`\n\
\ for getting information about the license of the content\n\n **Allowed\
\ HTTP Methods:** :http:method:`get`, :http:method:`head`, :http:method:`options`\n\
\n :statuscode 200: no error\n :statuscode 400: an invalid **hash_type**\
\ or **hash** has been provided\n :statuscode 404: requested content can\
\ not be found in the archive\n\n **Example:**\n\n .. parsed-literal::\n\
\n curl -i :swh_web_api:`content/sha1_git:fe95a46679d128ff167b7c55df5d02356c5a1ae1/`"
operationId: content_list
tags:
- content
/1/content/{q}/:
get:
description: ".. http:get:: /api/1/content/[(hash_type):](hash)/\n\n Get\
\ information about a content (aka a \"blob\") object.\n In the archive,\
\ a content object is identified based on checksum\n values computed using\
\ various hashing algorithms.\n\n :param string hash_type: optional parameter\
\ specifying which hashing algorithm has been used\n to compute the\
\ content checksum. It can be either ``sha1``, ``sha1_git``, ``sha256``\n\
\ or ``blake2s256``. If that parameter is not provided, it is assumed\
\ that the\n hashing algorithm used is ``sha1``.\n :param string\
\ hash: hexadecimal representation of the checksum value computed with\n \
\ the specified hashing algorithm.\n\n :reqheader Accept: the requested\
\ response content type,\n either ``application/json`` (default) or\
\ ``application/yaml``\n :resheader Content-Type: this depends on :http:header:`Accept`\
\ header of request\n\n :>json object checksums: object holding the computed\
\ checksum values for the requested content\n :>json string data_url: link\
\ to :http:get:`/api/1/content/[(hash_type):](hash)/raw/`\n for downloading\
\ the content raw bytes\n :>json string filetype_url: link to :http:get:`/api/1/content/[(hash_type):](hash)/filetype/`\n\
\ for getting information about the content MIME type\n :>json string\
\ language_url: link to :http:get:`/api/1/content/[(hash_type):](hash)/language/`\n\
\ for getting information about the programming language used in the\
\ content\n :>json number length: length of the content in bytes\n :>json\
\ string license_url: link to :http:get:`/api/1/content/[(hash_type):](hash)/license/`\n\
\ for getting information about the license of the content\n\n **Allowed\
\ HTTP Methods:** :http:method:`get`, :http:method:`head`, :http:method:`options`\n\
\n :statuscode 200: no error\n :statuscode 400: an invalid **hash_type**\
\ or **hash** has been provided\n :statuscode 404: requested content can\
\ not be found in the archive\n\n **Example:**\n\n .. parsed-literal::\n\
\n curl -i :swh_web_api:`content/sha1_git:fe95a46679d128ff167b7c55df5d02356c5a1ae1/`"
operationId: content_read
parameters:
- in: path
name: q
required: true
schema:
description: ''
title: ''
type: string
tags:
- content
/1/directory/:
get:
description: ".. http:get:: /api/1/directory/(sha1_git)/[(path)/]\n\n Get\
\ information about directory objects.\n Directories are identified by\
\ **sha1** checksums, compatible with Git directory identifiers.\n See\
\ :func:`swh.model.identifiers.directory_identifier` in our data model module\
\ for details\n about how they are computed.\n\n When given only a directory\
\ identifier, this endpoint returns information about the directory itself,\n\
\ returning its content (usually a list of directory entries). When given\
\ a directory identifier and a\n path, this endpoint returns information\
\ about the directory entry pointed by the relative path,\n starting path\
\ resolution from the given directory.\n\n :param string sha1_git: hexadecimal\
\ representation of the directory **sha1_git** identifier\n :param string\
\ path: optional parameter to get information about the directory entry\n\
\ pointed by that relative path\n\n :reqheader Accept: the requested\
\ response content type,\n either ``application/json`` (default) or\
\ ``application/yaml``\n :resheader Content-Type: this depends on :http:header:`Accept`\
\ header of request\n\n :>jsonarr object checksums: object holding the\
\ computed checksum values for a directory entry\n (only for file entries)\n\
\ :>jsonarr string dir_id: **sha1_git** identifier of the requested directory\n\
\ :>jsonarr number length: length of a directory entry in bytes (only for\
\ file entries)\n for getting information about the content MIME type\n\
\ :>jsonarr string name: the directory entry name\n :>jsonarr number\
\ perms: permissions for the directory entry\n :>jsonarr string target:\
\ **sha1_git** identifier of the directory entry\n :>jsonarr string target_url:\
\ link to :http:get:`/api/1/content/[(hash_type):](hash)/`\n or :http:get:`/api/1/directory/(sha1_git)/[(path)/]`\
\ depending on the directory entry type\n :>jsonarr string type: the type\
\ of the directory entry, can be either ``dir``, ``file`` or ``rev``\n\n \
\ **Allowed HTTP Methods:** :http:method:`get`, :http:method:`head`, :http:method:`options`\n\
\n :statuscode 200: no error\n :statuscode 400: an invalid **hash_type**\
\ or **hash** has been provided\n :statuscode 404: requested directory\
\ can not be found in the archive\n\n **Example:**\n\n .. parsed-literal::\n\
\n :swh_web_api:`directory/977fc4b98c0e85816348cebd3b12026407c368b6/`"
operationId: directory_list
tags:
- directory
/1/directory/{sha1_git}/:
get:
description: ".. http:get:: /api/1/directory/(sha1_git)/[(path)/]\n\n Get\
\ information about directory objects.\n Directories are identified by\
\ **sha1** checksums, compatible with Git directory identifiers.\n See\
\ :func:`swh.model.identifiers.directory_identifier` in our data model module\
\ for details\n about how they are computed.\n\n When given only a directory\
\ identifier, this endpoint returns information about the directory itself,\n\
\ returning its content (usually a list of directory entries). When given\
\ a directory identifier and a\n path, this endpoint returns information\
\ about the directory entry pointed by the relative path,\n starting path\
\ resolution from the given directory.\n\n :param string sha1_git: hexadecimal\
\ representation of the directory **sha1_git** identifier\n :param string\
\ path: optional parameter to get information about the directory entry\n\
\ pointed by that relative path\n\n :reqheader Accept: the requested\
\ response content type,\n either ``application/json`` (default) or\
\ ``application/yaml``\n :resheader Content-Type: this depends on :http:header:`Accept`\
\ header of request\n\n :>jsonarr object checksums: object holding the\
\ computed checksum values for a directory entry\n (only for file entries)\n\
\ :>jsonarr string dir_id: **sha1_git** identifier of the requested directory\n\
\ :>jsonarr number length: length of a directory entry in bytes (only for\
\ file entries)\n for getting information about the content MIME type\n\
\ :>jsonarr string name: the directory entry name\n :>jsonarr number\
\ perms: permissions for the directory entry\n :>jsonarr string target:\
\ **sha1_git** identifier of the directory entry\n :>jsonarr string target_url:\
\ link to :http:get:`/api/1/content/[(hash_type):](hash)/`\n or :http:get:`/api/1/directory/(sha1_git)/[(path)/]`\
\ depending on the directory entry type\n :>jsonarr string type: the type\
\ of the directory entry, can be either ``dir``, ``file`` or ``rev``\n\n \
\ **Allowed HTTP Methods:** :http:method:`get`, :http:method:`head`, :http:method:`options`\n\
\n :statuscode 200: no error\n :statuscode 400: an invalid **hash_type**\
\ or **hash** has been provided\n :statuscode 404: requested directory\
\ can not be found in the archive\n\n **Example:**\n\n .. parsed-literal::\n\
\n :swh_web_api:`directory/977fc4b98c0e85816348cebd3b12026407c368b6/`"
operationId: directory_read
parameters:
- in: path
name: sha1_git
required: true
schema:
description: ''
title: ''
type: string
tags:
- directory
/1/directory/{sha1_git}/{path}/:
get:
description: ".. http:get:: /api/1/directory/(sha1_git)/[(path)/]\n\n Get\
\ information about directory objects.\n Directories are identified by\
\ **sha1** checksums, compatible with Git directory identifiers.\n See\
\ :func:`swh.model.identifiers.directory_identifier` in our data model module\
\ for details\n about how they are computed.\n\n When given only a directory\
\ identifier, this endpoint returns information about the directory itself,\n\
\ returning its content (usually a list of directory entries). When given\
\ a directory identifier and a\n path, this endpoint returns information\
\ about the directory entry pointed by the relative path,\n starting path\
\ resolution from the given directory.\n\n :param string sha1_git: hexadecimal\
\ representation of the directory **sha1_git** identifier\n :param string\
\ path: optional parameter to get information about the directory entry\n\
\ pointed by that relative path\n\n :reqheader Accept: the requested\
\ response content type,\n either ``application/json`` (default) or\
\ ``application/yaml``\n :resheader Content-Type: this depends on :http:header:`Accept`\
\ header of request\n\n :>jsonarr object checksums: object holding the\
\ computed checksum values for a directory entry\n (only for file entries)\n\
\ :>jsonarr string dir_id: **sha1_git** identifier of the requested directory\n\
\ :>jsonarr number length: length of a directory entry in bytes (only for\
\ file entries)\n for getting information about the content MIME type\n\
\ :>jsonarr string name: the directory entry name\n :>jsonarr number\
\ perms: permissions for the directory entry\n :>jsonarr string target:\
\ **sha1_git** identifier of the directory entry\n :>jsonarr string target_url:\
\ link to :http:get:`/api/1/content/[(hash_type):](hash)/`\n or :http:get:`/api/1/directory/(sha1_git)/[(path)/]`\
\ depending on the directory entry type\n :>jsonarr string type: the type\
\ of the directory entry, can be either ``dir``, ``file`` or ``rev``\n\n \
\ **Allowed HTTP Methods:** :http:method:`get`, :http:method:`head`, :http:method:`options`\n\
\n :statuscode 200: no error\n :statuscode 400: an invalid **hash_type**\
\ or **hash** has been provided\n :statuscode 404: requested directory\
\ can not be found in the archive\n\n **Example:**\n\n .. parsed-literal::\n\
\n :swh_web_api:`directory/977fc4b98c0e85816348cebd3b12026407c368b6/`"
operationId: directory_read_0
parameters:
- in: path
name: sha1_git
required: true
schema:
description: ''
title: ''
type: string
- in: path
name: path
required: true
schema:
description: ''
title: ''
type: string
tags:
- directory
/1/origin/:
get:
description: ".. http:get:: /api/1/origin/(origin_id)/\n\n Get information\
\ about a software origin.\n\n :param int origin_id: a software origin\
\ identifier\n\n :>json number id: the origin unique identifier\n :>json\
\ string origin_visits_url: link to in order to get information about the\n\
\ visits for that origin\n :>json string type: the type of software\
\ origin (possible values are ``git``, ``svn``,\n ``hg``, ``deb``,\
\ ``pypi``, ``ftp`` or ``deposit``)\n :>json string url: the origin canonical\
\ url\n\n :reqheader Accept: the requested response content type,\n \
\ either ``application/json`` (default) or ``application/yaml``\n :resheader\
\ Content-Type: this depends on :http:header:`Accept` header of request\n\n\
\ **Allowed HTTP Methods:** :http:method:`get`, :http:method:`head`, :http:method:`options`\n\
\n :statuscode 200: no error\n :statuscode 404: requested origin can\
\ not be found in the archive\n\n **Example:**\n\n .. parsed-literal::\n\
\n :swh_web_api:`origin/1/`\n\n.. http:get:: /api/1/origin/(origin_type)/url/(origin_url)/\n\
\n Get information about a software origin.\n\n :param string origin_type:\
\ the origin type (possible values are ``git``, ``svn``,\n ``hg``,\
\ ``deb``, ``pypi``, ``ftp`` or ``deposit``)\n :param string origin_url:\
\ the origin url\n\n :>json number id: the origin unique identifier\n \
\ :>json string origin_visits_url: link to in order to get information about\
\ the\n visits for that origin\n :>json string type: the type of\
\ software origin\n :>json string url: the origin canonical url\n\n \
\ :reqheader Accept: the requested response content type,\n either\
\ ``application/json`` (default) or ``application/yaml``\n :resheader Content-Type:\
\ this depends on :http:header:`Accept` header of request\n\n **Allowed\
\ HTTP Methods:** :http:method:`get`, :http:method:`head`, :http:method:`options`\n\
\n :statuscode 200: no error\n :statuscode 404: requested origin can\
\ not be found in the archive\n\n **Example:**\n\n .. parsed-literal::\n\
\n :swh_web_api:`origin/git/url/https://github.com/python/cpython/`"
operationId: origin_list
tags:
- origin
/1/origin/{origin_id}/:
get:
description: ".. http:get:: /api/1/origin/(origin_id)/\n\n Get information\
\ about a software origin.\n\n :param int origin_id: a software origin\
\ identifier\n\n :>json number id: the origin unique identifier\n :>json\
\ string origin_visits_url: link to in order to get information about the\n\
\ visits for that origin\n :>json string type: the type of software\
\ origin (possible values are ``git``, ``svn``,\n ``hg``, ``deb``,\
\ ``pypi``, ``ftp`` or ``deposit``)\n :>json string url: the origin canonical\
\ url\n\n :reqheader Accept: the requested response content type,\n \
\ either ``application/json`` (default) or ``application/yaml``\n :resheader\
\ Content-Type: this depends on :http:header:`Accept` header of request\n\n\
\ **Allowed HTTP Methods:** :http:method:`get`, :http:method:`head`, :http:method:`options`\n\
\n :statuscode 200: no error\n :statuscode 404: requested origin can\
\ not be found in the archive\n\n **Example:**\n\n .. parsed-literal::\n\
\n :swh_web_api:`origin/1/`\n\n.. http:get:: /api/1/origin/(origin_type)/url/(origin_url)/\n\
\n Get information about a software origin.\n\n :param string origin_type:\
\ the origin type (possible values are ``git``, ``svn``,\n ``hg``,\
\ ``deb``, ``pypi``, ``ftp`` or ``deposit``)\n :param string origin_url:\
\ the origin url\n\n :>json number id: the origin unique identifier\n \
\ :>json string origin_visits_url: link to in order to get information about\
\ the\n visits for that origin\n :>json string type: the type of\
\ software origin\n :>json string url: the origin canonical url\n\n \
\ :reqheader Accept: the requested response content type,\n either\
\ ``application/json`` (default) or ``application/yaml``\n :resheader Content-Type:\
\ this depends on :http:header:`Accept` header of request\n\n **Allowed\
\ HTTP Methods:** :http:method:`get`, :http:method:`head`, :http:method:`options`\n\
\n :statuscode 200: no error\n :statuscode 404: requested origin can\
\ not be found in the archive\n\n **Example:**\n\n .. parsed-literal::\n\
\n :swh_web_api:`origin/git/url/https://github.com/python/cpython/`"
operationId: origin_read
parameters:
- in: path
name: origin_id
required: true
schema:
description: ''
title: ''
type: string
tags:
- origin
/1/origins/:
get:
description: ".. http:get:: /api/1/origins/\n\n Get list of archived software\
\ origins.\n\n Origins are sorted by ids before returning them.\n\n \
\ :query int origin_from: The first origin id that will be included\n \
\ in returned results (default to 1)\n :query int origin_count: The\
\ maximum number of origins to return\n (default to 100, can not exceed\
\ 10000)\n\n :>jsonarr number id: the origin unique identifier\n :>jsonarr\
\ string origin_visits_url: link to in order to get information about the\n\
\ visits for that origin\n :>jsonarr string type: the type of software\
\ origin (possible values are ``git``, ``svn``,\n ``hg``, ``deb``,\
\ ``pypi``, ``ftp`` or ``deposit``)\n :>jsonarr string url: the origin\
\ canonical url\n\n :reqheader Accept: the requested response content type,\n\
\ either ``application/json`` (default) or ``application/yaml``\n \
\ :resheader Content-Type: this depends on :http:header:`Accept` header\
\ of request\n :resheader Link: indicates that a subsequent or previous\
\ result page are available\n and contains the urls pointing to them\n\
\n **Allowed HTTP Methods:** :http:method:`get`, :http:method:`head`, :http:method:`options`\n\
\n :statuscode 200: no error\n\n **Example:**\n\n .. parsed-literal::\n\
\n :swh_web_api:`origins?origin_from=50000&origin_count=500`"
operationId: origins_list
tags:
- origins
/1/person/:
get:
description: ".. http:get:: /api/1/person/(person_id)/\n\n Get information\
\ about a person in the archive.\n\n :param int person_id: a person identifier\n\
\n :reqheader Accept: the requested response content type,\n either\
\ ``application/json`` (default) or ``application/yaml``\n :resheader Content-Type:\
\ this depends on :http:header:`Accept` header of request\n\n :>json string\
\ email: the email of the person\n :>json string fullname: the full name\
\ of the person: combination of its name and email\n :>json number id:\
\ the unique identifier of the person\n :>json string name: the name of\
\ the person\n\n **Allowed HTTP Methods:** :http:method:`get`, :http:method:`head`,\
\ :http:method:`options`\n\n :statuscode 200: no error\n :statuscode\
\ 404: requested person can not be found in the archive\n\n **Example:**\n\
\n .. parsed-literal::\n\n :swh_web_api:`person/8275/`"
operationId: person_list
tags:
- person
/1/person/{person_id}/:
get:
description: ".. http:get:: /api/1/person/(person_id)/\n\n Get information\
\ about a person in the archive.\n\n :param int person_id: a person identifier\n\
\n :reqheader Accept: the requested response content type,\n either\
\ ``application/json`` (default) or ``application/yaml``\n :resheader Content-Type:\
\ this depends on :http:header:`Accept` header of request\n\n :>json string\
\ email: the email of the person\n :>json string fullname: the full name\
\ of the person: combination of its name and email\n :>json number id:\
\ the unique identifier of the person\n :>json string name: the name of\
\ the person\n\n **Allowed HTTP Methods:** :http:method:`get`, :http:method:`head`,\
\ :http:method:`options`\n\n :statuscode 200: no error\n :statuscode\
\ 404: requested person can not be found in the archive\n\n **Example:**\n\
\n .. parsed-literal::\n\n :swh_web_api:`person/8275/`"
operationId: person_read
parameters:
- in: path
name: person_id
required: true
schema:
description: ''
title: ''
type: string
tags:
- person
/1/release/:
get:
description: ".. http:get:: /api/1/release/(sha1_git)/\n\n Get information\
\ about a release in the archive.\n Releases are identified by **sha1**\
\ checksums, compatible with Git tag identifiers.\n See :func:`swh.model.identifiers.release_identifier`\
\ in our data model module for details\n about how they are computed.\n\
\n :param string sha1_git: hexadecimal representation of the release **sha1_git**\
\ identifier\n\n :reqheader Accept: the requested response content type,\n\
\ either ``application/json`` (default) or ``application/yaml``\n \
\ :resheader Content-Type: this depends on :http:header:`Accept` header\
\ of request\n\n :>json object author: information about the author of\
\ the release\n :>json string author_url: link to :http:get:`/api/1/person/(person_id)/`\
\ to get\n information about the author of the release\n :>json\
\ string date: ISO representation of the release date (in UTC)\n :>json\
\ string id: the release unique identifier\n :>json string message: the\
\ message associated to the release\n :>json string name: the name of the\
\ release\n :>json string target: the target identifier of the release\n\
\ :>json string target_type: the type of the target, can be either **release**,\n\
\ **revision**, **content**, **directory**\n :>json string target_url:\
\ a link to the adequate api url based on the target type\n\n **Allowed\
\ HTTP Methods:** :http:method:`get`, :http:method:`head`, :http:method:`options`\n\
\n :statuscode 200: no error\n :statuscode 400: an invalid **sha1_git**\
\ value has been provided\n :statuscode 404: requested release can not\
\ be found in the archive\n\n **Example:**\n\n .. parsed-literal::\n\
\n :swh_web_api:`release/208f61cc7a5dbc9879ae6e5c2f95891e270f09ef/`"
operationId: release_list
tags:
- release
/1/release/{sha1_git}/:
get:
description: ".. http:get:: /api/1/release/(sha1_git)/\n\n Get information\
\ about a release in the archive.\n Releases are identified by **sha1**\
\ checksums, compatible with Git tag identifiers.\n See :func:`swh.model.identifiers.release_identifier`\
\ in our data model module for details\n about how they are computed.\n\
\n :param string sha1_git: hexadecimal representation of the release **sha1_git**\
\ identifier\n\n :reqheader Accept: the requested response content type,\n\
\ either ``application/json`` (default) or ``application/yaml``\n \
\ :resheader Content-Type: this depends on :http:header:`Accept` header\
\ of request\n\n :>json object author: information about the author of\
\ the release\n :>json string author_url: link to :http:get:`/api/1/person/(person_id)/`\
\ to get\n information about the author of the release\n :>json\
\ string date: ISO representation of the release date (in UTC)\n :>json\
\ string id: the release unique identifier\n :>json string message: the\
\ message associated to the release\n :>json string name: the name of the\
\ release\n :>json string target: the target identifier of the release\n\
\ :>json string target_type: the type of the target, can be either **release**,\n\
\ **revision**, **content**, **directory**\n :>json string target_url:\
\ a link to the adequate api url based on the target type\n\n **Allowed\
\ HTTP Methods:** :http:method:`get`, :http:method:`head`, :http:method:`options`\n\
\n :statuscode 200: no error\n :statuscode 400: an invalid **sha1_git**\
\ value has been provided\n :statuscode 404: requested release can not\
\ be found in the archive\n\n **Example:**\n\n .. parsed-literal::\n\
\n :swh_web_api:`release/208f61cc7a5dbc9879ae6e5c2f95891e270f09ef/`"
operationId: release_read
parameters:
- in: path
name: sha1_git
required: true
schema:
description: ''
title: ''
type: string
tags:
- release
/1/resolve/:
get:
description: ".. http:get:: /api/1/resolve/(swh_id)/\n\n Resolve a Software\
\ Heritage persistent identifier.\n\n Try to resolve a provided `persistent\
\ identifier <https://docs.softwareheritage.org/devel/swh-model/persistent-identifiers.html>`_\n\
\ into an url for browsing the pointed archive object. If the provided\n\
\ identifier is valid, the existence of the object in the archive\n \
\ will also be checked.\n\n :param string swh_id: a Software Heritage presistent\
\ identifier\n\n :>json string browse_url: the url for browsing the pointed\
\ object\n :>json object metadata: object holding optional parts of the\
\ persistent identifier\n :>json string namespace: the persistent identifier\
\ namespace\n :>json string object_id: the hash identifier of the pointed\
\ object\n :>json string object_type: the type of the pointed object\n\
\ :>json number scheme_version: the scheme version of the persistent identifier\n\
\n :reqheader Accept: the requested response content type,\n either\
\ ``application/json`` (default) or ``application/yaml``\n :resheader Content-Type:\
\ this depends on :http:header:`Accept` header of request\n\n **Allowed\
\ HTTP Methods:** :http:method:`get`, :http:method:`head`, :http:method:`options`\n\
\n :statuscode 200: no error\n :statuscode 400: an invalid persistent\
\ identifier has been provided\n :statuscode 404: the pointed object does\
\ not exist in the archive\n\n **Example:**\n\n .. parsed-literal::\n\
\n :swh_web_api:`resolve/swh:1:rev:96db9023b881d7cd9f379b0c154650d6c108e9a3;origin=https://github.com/openssl/openssl/`"
operationId: resolve_list
tags:
- resolve
/1/resolve/{swh_id}/:
get:
description: ".. http:get:: /api/1/resolve/(swh_id)/\n\n Resolve a Software\
\ Heritage persistent identifier.\n\n Try to resolve a provided `persistent\
\ identifier <https://docs.softwareheritage.org/devel/swh-model/persistent-identifiers.html>`_\n\
\ into an url for browsing the pointed archive object. If the provided\n\
\ identifier is valid, the existence of the object in the archive\n \
\ will also be checked.\n\n :param string swh_id: a Software Heritage presistent\
\ identifier\n\n :>json string browse_url: the url for browsing the pointed\
\ object\n :>json object metadata: object holding optional parts of the\
\ persistent identifier\n :>json string namespace: the persistent identifier\
\ namespace\n :>json string object_id: the hash identifier of the pointed\
\ object\n :>json string object_type: the type of the pointed object\n\
\ :>json number scheme_version: the scheme version of the persistent identifier\n\
\n :reqheader Accept: the requested response content type,\n either\
\ ``application/json`` (default) or ``application/yaml``\n :resheader Content-Type:\
\ this depends on :http:header:`Accept` header of request\n\n **Allowed\
\ HTTP Methods:** :http:method:`get`, :http:method:`head`, :http:method:`options`\n\
\n :statuscode 200: no error\n :statuscode 400: an invalid persistent\
\ identifier has been provided\n :statuscode 404: the pointed object does\
\ not exist in the archive\n\n **Example:**\n\n .. parsed-literal::\n\
\n :swh_web_api:`resolve/swh:1:rev:96db9023b881d7cd9f379b0c154650d6c108e9a3;origin=https://github.com/openssl/openssl/`"
operationId: resolve_read
parameters:
- in: path
name: swh_id
required: true
schema:
description: ''
title: ''
type: string
tags:
- resolve
/1/revision/:
get:
description: ".. http:get:: /api/1/revision/(sha1_git)/\n\n Get information\
\ about a revision in the archive.\n Revisions are identified by **sha1**\
\ checksums, compatible with Git commit identifiers.\n See :func:`swh.model.identifiers.revision_identifier`\
\ in our data model module for details\n about how they are computed.\n\
\n :param string sha1_git: hexadecimal representation of the revision **sha1_git**\
\ identifier\n\n :reqheader Accept: the requested response content type,\n\
\ either ``application/json`` (default) or ``application/yaml``\n \
\ :resheader Content-Type: this depends on :http:header:`Accept` header\
\ of request\n\n :>json object author: information about the author of\
\ the revision\n :>json string author_url: link to :http:get:`/api/1/person/(person_id)/`\
\ to get\n information about the author of the revision\n :>json\
\ object committer: information about the committer of the revision\n :>json\
\ string committer_url: link to :http:get:`/api/1/person/(person_id)/` to\
\ get\n information about the committer of the revision\n :>json\
\ string committer_date: ISO representation of the commit date (in UTC)\n\
\ :>json string date: ISO representation of the revision date (in UTC)\n\
\ :>json string directory: the unique identifier that revision points to\n\
\ :>json string directory_url: link to :http:get:`/api/1/directory/(sha1_git)/[(path)/]`\n\
\ to get information about the directory associated to the revision\n\
\ :>json string id: the revision unique identifier\n :>json boolean\
\ merge: whether or not the revision corresponds to a merge commit\n :>json\
\ string message: the message associated to the revision\n :>json array\
\ parents: the parents of the revision, i.e. the previous revisions\n \
\ that head directly to it, each entry of that array contains an unique\
\ parent\n revision identifier but also a link to :http:get:`/api/1/revision/(sha1_git)/`\n\
\ to get more information about it\n :>json string type: the type\
\ of the revision\n\n **Allowed HTTP Methods:** :http:method:`get`, :http:method:`head`,\
\ :http:method:`options`\n\n :statuscode 200: no error\n :statuscode\
\ 400: an invalid **sha1_git** value has been provided\n :statuscode 404:\
\ requested revision can not be found in the archive\n\n **Example:**\n\
\n .. parsed-literal::\n\n :swh_web_api:`revision/aafb16d69fd30ff58afdd69036a26047f3aebdc6/`"
operationId: revision_list
tags:
- revision
/1/revision/{sha1_git}/:
get:
description: ".. http:get:: /api/1/revision/(sha1_git)/\n\n Get information\
\ about a revision in the archive.\n Revisions are identified by **sha1**\
\ checksums, compatible with Git commit identifiers.\n See :func:`swh.model.identifiers.revision_identifier`\
\ in our data model module for details\n about how they are computed.\n\
\n :param string sha1_git: hexadecimal representation of the revision **sha1_git**\
\ identifier\n\n :reqheader Accept: the requested response content type,\n\
\ either ``application/json`` (default) or ``application/yaml``\n \
\ :resheader Content-Type: this depends on :http:header:`Accept` header\
\ of request\n\n :>json object author: information about the author of\
\ the revision\n :>json string author_url: link to :http:get:`/api/1/person/(person_id)/`\
\ to get\n information about the author of the revision\n :>json\
\ object committer: information about the committer of the revision\n :>json\
\ string committer_url: link to :http:get:`/api/1/person/(person_id)/` to\
\ get\n information about the committer of the revision\n :>json\
\ string committer_date: ISO representation of the commit date (in UTC)\n\
\ :>json string date: ISO representation of the revision date (in UTC)\n\
\ :>json string directory: the unique identifier that revision points to\n\
\ :>json string directory_url: link to :http:get:`/api/1/directory/(sha1_git)/[(path)/]`\n\
\ to get information about the directory associated to the revision\n\
\ :>json string id: the revision unique identifier\n :>json boolean\
\ merge: whether or not the revision corresponds to a merge commit\n :>json\
\ string message: the message associated to the revision\n :>json array\
\ parents: the parents of the revision, i.e. the previous revisions\n \
\ that head directly to it, each entry of that array contains an unique\
\ parent\n revision identifier but also a link to :http:get:`/api/1/revision/(sha1_git)/`\n\
\ to get more information about it\n :>json string type: the type\
\ of the revision\n\n **Allowed HTTP Methods:** :http:method:`get`, :http:method:`head`,\
\ :http:method:`options`\n\n :statuscode 200: no error\n :statuscode\
\ 400: an invalid **sha1_git** value has been provided\n :statuscode 404:\
\ requested revision can not be found in the archive\n\n **Example:**\n\
\n .. parsed-literal::\n\n :swh_web_api:`revision/aafb16d69fd30ff58afdd69036a26047f3aebdc6/`"
operationId: revision_read
parameters:
- in: path
name: sha1_git
required: true
schema:
description: ''
title: ''
type: string
tags:
- revision
/1/schema/:
get:
operationId: schema_list
tags:
- schema
/1/snapshot/:
get:
description: ".. http:get:: /api/1/snapshot/(snapshot_id)/\n\n Get information\
\ about a snapshot in the archive.\n\n A snapshot is a set of named branches,\
\ which are pointers to objects at any\n level of the Software Heritage\
\ DAG. It represents a full picture of an\n origin at a given time.\n\n\
\ As well as pointing to other objects in the Software Heritage DAG, branches\n\
\ can also be aliases, in which case their target is the name of another\n\
\ branch in the same snapshot, or dangling, in which case the target is\n\
\ unknown.\n\n A snapshot identifier is a salted sha1. See :func:`swh.model.identifiers.snapshot_identifier`\n\
\ in our data model module for details about how they are computed.\n\n\
\ :param sha1 snapshot_id: a snapshot identifier\n :query str branches_from:\
\ optional parameter used to skip branches\n whose name is lesser than\
\ it before returning them\n :query int branches_count: optional parameter\
\ used to restrain\n the amount of returned branches (default to 1000)\n\
\ :query str target_types: optional comma separated list parameter\n \
\ used to filter the target types of branch to return (possible values\n\
\ that can be contained in that list are ``content``, ``directory``,\n\
\ ``revision``, ``release``, ``snapshot`` or ``alias``)\n\n :reqheader\
\ Accept: the requested response content type,\n either ``application/json``\
\ (default) or ``application/yaml``\n :resheader Content-Type: this depends\
\ on :http:header:`Accept` header of request\n :resheader Link: indicates\
\ that a subsequent result page is available and contains\n the url\
\ pointing to it\n\n :>json object branches: object containing all branches\
\ associated to the snapshot,\n for each of them the associated target\
\ type and id are given but also\n a link to get information about\
\ that target\n :>json string id: the unique identifier of the snapshot\n\
\n **Allowed HTTP Methods:** :http:method:`get`, :http:method:`head`, :http:method:`options`\n\
\n :statuscode 200: no error\n :statuscode 400: an invalid snapshot\
\ identifier has been provided\n :statuscode 404: requested snapshot can\
\ not be found in the archive\n\n **Example:**\n\n .. parsed-literal::\n\
\n :swh_web_api:`snapshot/6a3a2cf0b2b90ce7ae1cf0a221ed68035b686f5a/`"
operationId: snapshot_list
tags:
- snapshot
/1/snapshot/{snapshot_id}/:
get:
description: ".. http:get:: /api/1/snapshot/(snapshot_id)/\n\n Get information\
\ about a snapshot in the archive.\n\n A snapshot is a set of named branches,\
\ which are pointers to objects at any\n level of the Software Heritage\
\ DAG. It represents a full picture of an\n origin at a given time.\n\n\
\ As well as pointing to other objects in the Software Heritage DAG, branches\n\
\ can also be aliases, in which case their target is the name of another\n\
\ branch in the same snapshot, or dangling, in which case the target is\n\
\ unknown.\n\n A snapshot identifier is a salted sha1. See :func:`swh.model.identifiers.snapshot_identifier`\n\
\ in our data model module for details about how they are computed.\n\n\
\ :param sha1 snapshot_id: a snapshot identifier\n :query str branches_from:\
\ optional parameter used to skip branches\n whose name is lesser than\
\ it before returning them\n :query int branches_count: optional parameter\
\ used to restrain\n the amount of returned branches (default to 1000)\n\
\ :query str target_types: optional comma separated list parameter\n \
\ used to filter the target types of branch to return (possible values\n\
\ that can be contained in that list are ``content``, ``directory``,\n\
\ ``revision``, ``release``, ``snapshot`` or ``alias``)\n\n :reqheader\
\ Accept: the requested response content type,\n either ``application/json``\
\ (default) or ``application/yaml``\n :resheader Content-Type: this depends\
\ on :http:header:`Accept` header of request\n :resheader Link: indicates\
\ that a subsequent result page is available and contains\n the url\
\ pointing to it\n\n :>json object branches: object containing all branches\
\ associated to the snapshot,\n for each of them the associated target\
\ type and id are given but also\n a link to get information about\
\ that target\n :>json string id: the unique identifier of the snapshot\n\
\n **Allowed HTTP Methods:** :http:method:`get`, :http:method:`head`, :http:method:`options`\n\
\n :statuscode 200: no error\n :statuscode 400: an invalid snapshot\
\ identifier has been provided\n :statuscode 404: requested snapshot can\
\ not be found in the archive\n\n **Example:**\n\n .. parsed-literal::\n\
\n :swh_web_api:`snapshot/6a3a2cf0b2b90ce7ae1cf0a221ed68035b686f5a/`"
operationId: snapshot_read
parameters:
- in: path
name: snapshot_id
required: true
schema:
description: ''
title: ''
type: string
tags:
- snapshot
servers:
- url: http://127.0.0.1:5004/api/1/schema/