Skip to content
Registry StackDocsDevelopment (unreleased)

Read one document's metadata and the actions the caller may take.

GET
/v1/documents/{documentId}
curl --request GET \
--url https://example.com/v1/documents/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>'
documentId
required
string format: uuid

The operation succeeded.

Media typeapplication/json

One document as its custodian reads it.

object
actions
required

What the reading caller may do to this document now, in vocabulary order.

Array<string>
Allowed values: download share revoke-share list-shares request-erasure
custodian
required

The custodian a reservation names: a subject at the configured token issuer.

object
subject
required

An identifier another system issues, written exactly as its issuer gives it.

string
>= 1 characters <= 512 characters /^[^\u0000-\u001F\u007F-\u009F]+$/
id
required
string
label

The label the reserving caller chose, as written. Untrusted.

string
policy
required

The policy a document version was reserved under, frozen at reservation: its id, its authored version, and the digest of its whole authored body.

object
digest
required

A SHA-256 digest: sha256: followed by 64 lowercase hex digits.

string
/^sha256:[0-9a-f]{64}$/
id
required

A local identifier: a lowercase letter, then up to 63 lowercase letters, digits, _, or -.

string
/^[a-z][a-z0-9_-]{0,63}$/
version
required
string
version
required

One document version: its declared and verified content, and the one status a client acts on.

object
expectedDigest
required

A SHA-256 digest: sha256: followed by 64 lowercase hex digits.

string
/^sha256:[0-9a-f]{64}$/
finalizedAt
string
id
required
string
length
required
integer format: uint64
mediaType
required
string
reservedAt
required
string
status
required
One of:

Reserved, or the reservation lapsed: no content is stored.

string
Allowed value: awaiting-content

Example

{
"actions": [
"download"
],
"version": {
"status": "awaiting-content"
}
}

A problem: authentication.refused.

Media typeapplication/problem+json
object
code
required
string
Allowed values: authentication.refused custody.not-permitted custody.quota-exceeded document-grant.expiry-out-of-range document-policy.unknown document-version.not-releasable document.content-type-not-allowed document.too-large idempotency.expired idempotency.key-reused profile.not-authorized request.body-too-large request.invalid request.method-not-allowed request.not-found request.unprocessable request.unsupported-media-type resource.not-found service.unavailable upload.content-type-mismatch upload.digest-mismatch upload.expired upload.finalized upload.length-mismatch
detail
required
string
status
required
integer
title
required
string
traceId
required
string
type
required
string
Allowed values: https://id.registrystack.org/problems/registry-documents/authentication/refused https://id.registrystack.org/problems/registry-documents/custody/not-permitted https://id.registrystack.org/problems/registry-documents/custody/quota-exceeded https://id.registrystack.org/problems/registry-documents/document-grant/expiry-out-of-range https://id.registrystack.org/problems/registry-documents/document-policy/unknown https://id.registrystack.org/problems/registry-documents/document-version/not-releasable https://id.registrystack.org/problems/registry-documents/document/content-type-not-allowed https://id.registrystack.org/problems/registry-documents/document/too-large https://id.registrystack.org/problems/registry-documents/idempotency/expired https://id.registrystack.org/problems/registry-documents/idempotency/key-reused https://id.registrystack.org/problems/registry-documents/profile/not-authorized https://id.registrystack.org/problems/registry-documents/request/body-too-large https://id.registrystack.org/problems/registry-documents/request/invalid https://id.registrystack.org/problems/registry-documents/request/method-not-allowed https://id.registrystack.org/problems/registry-documents/request/not-found https://id.registrystack.org/problems/registry-documents/request/unprocessable https://id.registrystack.org/problems/registry-documents/request/unsupported-media-type https://id.registrystack.org/problems/registry-documents/resource/not-found https://id.registrystack.org/problems/registry-documents/service/unavailable https://id.registrystack.org/problems/registry-documents/upload/content-type-mismatch https://id.registrystack.org/problems/registry-documents/upload/digest-mismatch https://id.registrystack.org/problems/registry-documents/upload/expired https://id.registrystack.org/problems/registry-documents/upload/finalized https://id.registrystack.org/problems/registry-documents/upload/length-mismatch
code
required
Allowed values: authentication.refused

Example

{
"code": "authentication.refused",
"type": "https://id.registrystack.org/problems/registry-documents/authentication/refused"
}
WWW-Authenticate
required
string
Allowed value: Bearer

The bearer challenge.

A problem: profile.not-authorized.

Media typeapplication/problem+json
object
code
required
string
Allowed values: authentication.refused custody.not-permitted custody.quota-exceeded document-grant.expiry-out-of-range document-policy.unknown document-version.not-releasable document.content-type-not-allowed document.too-large idempotency.expired idempotency.key-reused profile.not-authorized request.body-too-large request.invalid request.method-not-allowed request.not-found request.unprocessable request.unsupported-media-type resource.not-found service.unavailable upload.content-type-mismatch upload.digest-mismatch upload.expired upload.finalized upload.length-mismatch
detail
required
string
status
required
integer
title
required
string
traceId
required
string
type
required
string
Allowed values: https://id.registrystack.org/problems/registry-documents/authentication/refused https://id.registrystack.org/problems/registry-documents/custody/not-permitted https://id.registrystack.org/problems/registry-documents/custody/quota-exceeded https://id.registrystack.org/problems/registry-documents/document-grant/expiry-out-of-range https://id.registrystack.org/problems/registry-documents/document-policy/unknown https://id.registrystack.org/problems/registry-documents/document-version/not-releasable https://id.registrystack.org/problems/registry-documents/document/content-type-not-allowed https://id.registrystack.org/problems/registry-documents/document/too-large https://id.registrystack.org/problems/registry-documents/idempotency/expired https://id.registrystack.org/problems/registry-documents/idempotency/key-reused https://id.registrystack.org/problems/registry-documents/profile/not-authorized https://id.registrystack.org/problems/registry-documents/request/body-too-large https://id.registrystack.org/problems/registry-documents/request/invalid https://id.registrystack.org/problems/registry-documents/request/method-not-allowed https://id.registrystack.org/problems/registry-documents/request/not-found https://id.registrystack.org/problems/registry-documents/request/unprocessable https://id.registrystack.org/problems/registry-documents/request/unsupported-media-type https://id.registrystack.org/problems/registry-documents/resource/not-found https://id.registrystack.org/problems/registry-documents/service/unavailable https://id.registrystack.org/problems/registry-documents/upload/content-type-mismatch https://id.registrystack.org/problems/registry-documents/upload/digest-mismatch https://id.registrystack.org/problems/registry-documents/upload/expired https://id.registrystack.org/problems/registry-documents/upload/finalized https://id.registrystack.org/problems/registry-documents/upload/length-mismatch
code
required
Allowed values: profile.not-authorized

Example

{
"code": "profile.not-authorized",
"type": "https://id.registrystack.org/problems/registry-documents/authentication/refused"
}

A problem: resource.not-found.

Media typeapplication/problem+json
object
code
required
string
Allowed values: authentication.refused custody.not-permitted custody.quota-exceeded document-grant.expiry-out-of-range document-policy.unknown document-version.not-releasable document.content-type-not-allowed document.too-large idempotency.expired idempotency.key-reused profile.not-authorized request.body-too-large request.invalid request.method-not-allowed request.not-found request.unprocessable request.unsupported-media-type resource.not-found service.unavailable upload.content-type-mismatch upload.digest-mismatch upload.expired upload.finalized upload.length-mismatch
detail
required
string
status
required
integer
title
required
string
traceId
required
string
type
required
string
Allowed values: https://id.registrystack.org/problems/registry-documents/authentication/refused https://id.registrystack.org/problems/registry-documents/custody/not-permitted https://id.registrystack.org/problems/registry-documents/custody/quota-exceeded https://id.registrystack.org/problems/registry-documents/document-grant/expiry-out-of-range https://id.registrystack.org/problems/registry-documents/document-policy/unknown https://id.registrystack.org/problems/registry-documents/document-version/not-releasable https://id.registrystack.org/problems/registry-documents/document/content-type-not-allowed https://id.registrystack.org/problems/registry-documents/document/too-large https://id.registrystack.org/problems/registry-documents/idempotency/expired https://id.registrystack.org/problems/registry-documents/idempotency/key-reused https://id.registrystack.org/problems/registry-documents/profile/not-authorized https://id.registrystack.org/problems/registry-documents/request/body-too-large https://id.registrystack.org/problems/registry-documents/request/invalid https://id.registrystack.org/problems/registry-documents/request/method-not-allowed https://id.registrystack.org/problems/registry-documents/request/not-found https://id.registrystack.org/problems/registry-documents/request/unprocessable https://id.registrystack.org/problems/registry-documents/request/unsupported-media-type https://id.registrystack.org/problems/registry-documents/resource/not-found https://id.registrystack.org/problems/registry-documents/service/unavailable https://id.registrystack.org/problems/registry-documents/upload/content-type-mismatch https://id.registrystack.org/problems/registry-documents/upload/digest-mismatch https://id.registrystack.org/problems/registry-documents/upload/expired https://id.registrystack.org/problems/registry-documents/upload/finalized https://id.registrystack.org/problems/registry-documents/upload/length-mismatch
code
required
Allowed values: resource.not-found

Example

{
"code": "resource.not-found",
"type": "https://id.registrystack.org/problems/registry-documents/authentication/refused"
}

A problem: request.method-not-allowed.

Media typeapplication/problem+json
object
code
required
string
Allowed values: authentication.refused custody.not-permitted custody.quota-exceeded document-grant.expiry-out-of-range document-policy.unknown document-version.not-releasable document.content-type-not-allowed document.too-large idempotency.expired idempotency.key-reused profile.not-authorized request.body-too-large request.invalid request.method-not-allowed request.not-found request.unprocessable request.unsupported-media-type resource.not-found service.unavailable upload.content-type-mismatch upload.digest-mismatch upload.expired upload.finalized upload.length-mismatch
detail
required
string
status
required
integer
title
required
string
traceId
required
string
type
required
string
Allowed values: https://id.registrystack.org/problems/registry-documents/authentication/refused https://id.registrystack.org/problems/registry-documents/custody/not-permitted https://id.registrystack.org/problems/registry-documents/custody/quota-exceeded https://id.registrystack.org/problems/registry-documents/document-grant/expiry-out-of-range https://id.registrystack.org/problems/registry-documents/document-policy/unknown https://id.registrystack.org/problems/registry-documents/document-version/not-releasable https://id.registrystack.org/problems/registry-documents/document/content-type-not-allowed https://id.registrystack.org/problems/registry-documents/document/too-large https://id.registrystack.org/problems/registry-documents/idempotency/expired https://id.registrystack.org/problems/registry-documents/idempotency/key-reused https://id.registrystack.org/problems/registry-documents/profile/not-authorized https://id.registrystack.org/problems/registry-documents/request/body-too-large https://id.registrystack.org/problems/registry-documents/request/invalid https://id.registrystack.org/problems/registry-documents/request/method-not-allowed https://id.registrystack.org/problems/registry-documents/request/not-found https://id.registrystack.org/problems/registry-documents/request/unprocessable https://id.registrystack.org/problems/registry-documents/request/unsupported-media-type https://id.registrystack.org/problems/registry-documents/resource/not-found https://id.registrystack.org/problems/registry-documents/service/unavailable https://id.registrystack.org/problems/registry-documents/upload/content-type-mismatch https://id.registrystack.org/problems/registry-documents/upload/digest-mismatch https://id.registrystack.org/problems/registry-documents/upload/expired https://id.registrystack.org/problems/registry-documents/upload/finalized https://id.registrystack.org/problems/registry-documents/upload/length-mismatch
code
required
Allowed values: request.method-not-allowed

Example

{
"code": "request.method-not-allowed",
"type": "https://id.registrystack.org/problems/registry-documents/authentication/refused"
}

A problem: service.unavailable.

Media typeapplication/problem+json
object
code
required
string
Allowed values: authentication.refused custody.not-permitted custody.quota-exceeded document-grant.expiry-out-of-range document-policy.unknown document-version.not-releasable document.content-type-not-allowed document.too-large idempotency.expired idempotency.key-reused profile.not-authorized request.body-too-large request.invalid request.method-not-allowed request.not-found request.unprocessable request.unsupported-media-type resource.not-found service.unavailable upload.content-type-mismatch upload.digest-mismatch upload.expired upload.finalized upload.length-mismatch
detail
required
string
status
required
integer
title
required
string
traceId
required
string
type
required
string
Allowed values: https://id.registrystack.org/problems/registry-documents/authentication/refused https://id.registrystack.org/problems/registry-documents/custody/not-permitted https://id.registrystack.org/problems/registry-documents/custody/quota-exceeded https://id.registrystack.org/problems/registry-documents/document-grant/expiry-out-of-range https://id.registrystack.org/problems/registry-documents/document-policy/unknown https://id.registrystack.org/problems/registry-documents/document-version/not-releasable https://id.registrystack.org/problems/registry-documents/document/content-type-not-allowed https://id.registrystack.org/problems/registry-documents/document/too-large https://id.registrystack.org/problems/registry-documents/idempotency/expired https://id.registrystack.org/problems/registry-documents/idempotency/key-reused https://id.registrystack.org/problems/registry-documents/profile/not-authorized https://id.registrystack.org/problems/registry-documents/request/body-too-large https://id.registrystack.org/problems/registry-documents/request/invalid https://id.registrystack.org/problems/registry-documents/request/method-not-allowed https://id.registrystack.org/problems/registry-documents/request/not-found https://id.registrystack.org/problems/registry-documents/request/unprocessable https://id.registrystack.org/problems/registry-documents/request/unsupported-media-type https://id.registrystack.org/problems/registry-documents/resource/not-found https://id.registrystack.org/problems/registry-documents/service/unavailable https://id.registrystack.org/problems/registry-documents/upload/content-type-mismatch https://id.registrystack.org/problems/registry-documents/upload/digest-mismatch https://id.registrystack.org/problems/registry-documents/upload/expired https://id.registrystack.org/problems/registry-documents/upload/finalized https://id.registrystack.org/problems/registry-documents/upload/length-mismatch
code
required
Allowed values: service.unavailable

Example

{
"code": "service.unavailable",
"type": "https://id.registrystack.org/problems/registry-documents/authentication/refused"
}
Retry-After
required
integer
>= 1

Whole seconds to wait before trying again.