Changeset View
Changeset View
Standalone View
Standalone View
docs/extrinsic-metadata-specification.rst
Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | |||||
* :term:`deposit` submitters, which push metadata to SWH from a | * :term:`deposit` submitters, which push metadata to SWH from a | ||||
third-party; usually at the same time as a :term:`software artifact` | third-party; usually at the same time as a :term:`software artifact` | ||||
* crawlers, which fetch metadata from an authority in a way that is | * crawlers, which fetch metadata from an authority in a way that is | ||||
none of the above (eg. by querying a specific API of the origin's forge). | none of the above (eg. by querying a specific API of the origin's forge). | ||||
Storage API | Storage API | ||||
~~~~~~~~~~~ | ----------- | ||||
Authorities and metadata fetchers | Authorities and metadata fetchers | ||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||||
The :term:`storage` API offers these endpoints to manipulate metadata | The :term:`storage` API offers these endpoints to manipulate metadata | ||||
authorities and metadata fetchers: | authorities and metadata fetchers: | ||||
* ``metadata_authority_add(type, url, metadata)`` | * ``metadata_authority_add(type, url, metadata)`` | ||||
Show All 14 Lines | |||||
These `metadata` fields contain JSON-encodable dictionaries | These `metadata` fields contain JSON-encodable dictionaries | ||||
with information about the authority/fetcher, in a format specific to each | with information about the authority/fetcher, in a format specific to each | ||||
authority/fetcher. | authority/fetcher. | ||||
With authority, the `metadata` field is reserved for information describing | With authority, the `metadata` field is reserved for information describing | ||||
and qualifying the authority. | and qualifying the authority. | ||||
With fetchers, the `metadata` field is reserved for configuration metadata | With fetchers, the `metadata` field is reserved for configuration metadata | ||||
and other technical usage. | and other technical usage. | ||||
Origin metadata storage | Origin metadata | ||||
----------------------- | ^^^^^^^^^^^^^^^ | ||||
Extrinsic metadata are stored in SWH's :term:`storage database`. | Extrinsic metadata are stored in SWH's :term:`storage database`. | ||||
The storage API offers three endpoints to manipulate origin metadata: | The storage API offers three endpoints to manipulate origin metadata: | ||||
* Adding metadata:: | * Adding metadata:: | ||||
origin_metadata_add(origin_url, discovery_date, | origin_metadata_add(origin_url, discovery_date, | ||||
authority, fetcher, | authority, fetcher, | ||||
▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines |