Skip to content
Registry StackDocsDevelopment (unreleased)

List the active grants that name the caller.

GET
/v1/document-grants
curl --request GET \
--url 'https://example.com/v1/document-grants?limit=50' \
--header 'Authorization: Bearer <token>'
cursor
string
<= 256 characters

The opaque cursor a previous page returned as nextCursor.

limit
integer
default: 50 >= 1 <= 100

Items per page.

The operation succeeded.

Media typeapplication/json

One page of document grants, oldest first.

object
items
required
Array<object>

One document grant.

object
documentId
required
string
expiresAt
required
string
grantee
required

The recipient a grant names: a subject at the configured token issuer, and the actor kind a caller must resolve to for the grant to release anything to it.

object
kind
required

An actor kind: a service, or a human person.

string
Allowed values: service human
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
issuedAt
required
string
revokedAt
string
state
required

Where a grant stands.

string
Allowed values: active expired revoked
versionId
required
string
nextCursor

The cursor of the next page; absent on the last page.

string

Example

{
"items": [
{
"grantee": {
"kind": "service"
},
"state": "active"
}
]
}

A problem: request.invalid.

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.invalid

Example

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

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: 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.