Software Heritage is the universal archive of software source code.

Prefix
swh
Links
Homepage
Contact
Missing Contact
Pattern for Local Unique Identifiers

Local identifiers in Software Heritage should match this regular expression:
^[1-9]:(cnt|dir|rel|rev|snp):[0-9a-f]+(;(origin|visit|anchor|path|lines)=\S+)*$

Example Local Unique Identifier
1:rev:309cf2674ee7a0749978cf8265ab91a60aea0f7d   Resolve
Pattern for CURIES

Compact URIs (CURIEs) constructed from Software Heritage should match this regular expression:
^swh:[1-9]:(cnt|dir|rel|rev|snp):[0-9a-f]+(;(origin|visit|anchor|path|lines)=\S+)*$

Example CURIE
swh:1:rev:309cf2674ee7a0749978cf8265ab91a60aea0f7d
MIRIAM Namespace Embedded in LUI
The legacy MIRIAM standard for generating CURIEs with this resource includes the namespaceEmbeddedInLUI as true. The actual part that gets prefixed before the local unique identifier regex, otherwise known as the banana, is swh:. Therefore, you might see local unique identifiers written out as CURIEs.
Metaregistry Software Heritage

The metaregistry provides mappings between the Bioregistry and other registries. There are 3 mappings to external registries for swh.

Registry Name Metaprefix External Prefix
BioContext biocontext SWH
Identifiers.org Identifiers.org logo miriam swh
Name-to-Thing Name-to-Thing logo n2t swh
Providers

Providers are various services that resolve CURIEs to URLs. The example CURIE swh: is used to demonstrate the provides available for swh. Generation of OLS and BioPortal URLs requires additional programmatic logic beyond string formatting.

Name Metaprefix URI
Software Heritage swh https://archive.softwareheritage.org/browse/swh:1:rev:309cf2674ee7a0749978cf8265ab91a60aea0f7d
Bioregistry bioregistry https://bioregistry.io/swh:1:rev:309cf2674ee7a0749978cf8265ab91a60aea0f7d
Identifiers.org miriam https://identifiers.org/swh:1:rev:309cf2674ee7a0749978cf8265ab91a60aea0f7d
Name-to-Thing n2t https://n2t.net/swh:1:rev:309cf2674ee7a0749978cf8265ab91a60aea0f7d