Download OpenAPI specification:Download
All nodes have contents associated with them.
Contents of a directory node is a key-value object with keys representing the node names and values representing node entries.
For example:
{
"assets": {
"digest": {
"sha256": "n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg",
"sha384": "DH01Tx3ixOrDYbNcjqw+H53EIFSI232hbotDTy1E/NU6+qodYhdrswrXoEfx/nnx"
},
"from": "myassets:0.1.2"
},
"Enarx.toml": {
"digest": {
"sha256": "DodjLNRr1JB8UWMX622B/g+SGiPHZDAY8hKSiUtHBoE",
"sha384": "mqVuAfXRKap7bdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC"
}
}
}
Contents of a file node is binary data of an arbitrary media type other than "application/vnd.drawbridge.directory.v1+json"
All nodes have a media type associated with them.
"application/vnd.drawbridge.directory.v1+json"
type identifies a directory node.
Any other type than "application/vnd.drawbridge.directory.v1+json"
identifies a file node.
All nodes have a content length associated with them.
Content length of a directory node is equal to byte length of JSON-encoded directory contents without whitespace characters.
Content length of a file nodes is equal to byte length of raw file contents.
All nodes have a content digest associated with them.
Content digest of a directory node is equal to hash of lexicographically-sorted JSON-encoded directory contents without whitespace characters.
For example, sha256 content digest of a directory with following contents:
{
"assets": {
"digest": {
"sha256": "n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg",
"sha384": "DH01Tx3ixOrDYbNcjqw+H53EIFSI232hbotDTy1E/NU6+qodYhdrswrXoEfx/nnx"
},
"from": "myassets:0.1.2"
},
"Enarx.toml": {
"digest": {
"sha256": "DodjLNRr1JB8UWMX622B/g+SGiPHZDAY8hKSiUtHBoE",
"sha384": "mqVuAfXRKap7bdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC"
}
}
}
is equal to Z2oGasnuiV+nldtPLGf+wWDQ14nhUVjbeL8So4Zr1aA
Content digest of a file nodes is equal to hash of raw file contents.
Node entry is a combination of exherent properties of the node (for example, from
, representing the source from which it was mirrored, if applicable) and digest of its inherent properties.
For example, sha384
digest computed over following inherent properties of a file node:
{
"contentDigest": {
"sha384": "mqVuAfXRKap7bdgcCY5uykM6-R9GqQ8K_uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC"
},
"contentLength": 42,
"contentType": "text/plain"
}
is equal to:
7QuaGUAIdLBb9ZzarCY0ybasXdU6QhQzMkXAIiS8UwjDZBLWLNSr4Vhz2Kh+/R9r
An immutable mapping of a semver version string to a node entry.
A node entry identified by a tag.
Get a tree node entry associated with a tag.
tag required |
{- "digest": {
- "sha224": "kKPtnjKyqvTGHEEOuSVCYRnhqdxT1Chq3pmoCQ",
- "sha256": "n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg",
- "sha384": "DH01Tx3ixOrDYbNcjqw+H53EIFSI232hbotDTy1E/NU6+qodYhdrswrXoEfx/nnx",
- "sha512": "Pwpjrc6dKL0MgLLCchb4s9jvDfpOMRzgQ96yrfYtbttYBbxaaM/31ed2dw0tTghK8LAuOmfiUyxhsmToYQrG3g"
}
}
Create a tag.
tag required |
required | object Digests of inherent properties of a node. |
{- "digest": {
- "sha224": "kKPtnjKyqvTGHEEOuSVCYRnhqdxT1Chq3pmoCQ",
- "sha256": "n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg",
- "sha384": "DH01Tx3ixOrDYbNcjqw+H53EIFSI232hbotDTy1E/NU6+qodYhdrswrXoEfx/nnx",
- "sha512": "Pwpjrc6dKL0MgLLCchb4s9jvDfpOMRzgQ96yrfYtbttYBbxaaM/31ed2dw0tTghK8LAuOmfiUyxhsmToYQrG3g"
}
}
Get tree path contents.
tag required | |
path | string^[a-zA-Z0-9-_.,]+(/[a-zA-Z0-9-_.,])+$ Example: foo/bar/baz/file.txt Slash-delimited file path to a node within a tree. |
{- "assets": {
- "digest": {
- "sha256": "n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg",
- "sha384": "DH01Tx3ixOrDYbNcjqw+H53EIFSI232hbotDTy1E/NU6+qodYhdrswrXoEfx/nnx"
}, - "from": "myassets:0.1.2"
}, - "Enarx.toml": {
- "digest": {
- "sha256": "DodjLNRr1JB8UWMX622B/g+SGiPHZDAY8hKSiUtHBoE",
- "sha384": "mqVuAfXRKap7bdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC"
}
}
}
Upload tree path contents.
tag required | |
path | string^[a-zA-Z0-9-_.,]+(/[a-zA-Z0-9-_.,])+$ Example: foo/bar/baz/file.txt Slash-delimited file path to a node within a tree. |
Content-Digest required | string (ContentDigest) ^\*sha(224|256|384|512)=:[a-zA-Z0-9-_]{38,86}... Example: sha-256=:4REjxQ4yrqUVicfSKYNO/cF9zNj5ANbzgDZt3/h3Qxo=:,\sha-512=:WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A2svX+TaPm+AbwAgBWnrI\iYllu7BNNyealdVLvRwEmTHWXvJwew==: Node content digest. |
Content-Length required | integer <int64> (ContentLength) Example: 42 Node content length in bytes. |
Content-Type required | string (ContentType) ^(application|audio|image|text)/[a-zA-Z0-9-_.... Example: application/vnd.drawbridge.directory.v1+json Node media type. |
additional property | object (Entry) A node entry. |
{- "assets": {
- "digest": {
- "sha256": "n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg",
- "sha384": "DH01Tx3ixOrDYbNcjqw+H53EIFSI232hbotDTy1E/NU6+qodYhdrswrXoEfx/nnx"
}, - "from": "myassets:0.1.2"
}, - "Enarx.toml": {
- "digest": {
- "sha256": "DodjLNRr1JB8UWMX622B/g+SGiPHZDAY8hKSiUtHBoE",
- "sha384": "mqVuAfXRKap7bdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC"
}
}
}