Skip to content
Registry StackDocsDevelopment (unreleased)

List the policies the caller may place documents under, with their bounds.

GET
/v1/document-policies
curl --request GET \
--url https://example.com/v1/document-policies \
--header 'Authorization: Bearer <token>'

The operation succeeded.

Media typeapplication/json

The policies the caller may place documents under, by id.

object
items
required
Array<object>

One policy the caller may place documents under, with the restrictions a client checks before it uploads.

object
allowedContentTypes
required
Array<string>
grantExpiryHours
required
integer format: uint32
id
required

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

string
/^[a-z][a-z0-9_-]{0,63}$/
label
required
string
maximumDocumentBytes
required
integer format: uint64
maximumGrantExpiryHours
required
integer format: uint32
version
required
string

Example generated

{
"items": [
{
"allowedContentTypes": [
"example"
],
"grantExpiryHours": 1,
"id": "example",
"label": "example",
"maximumDocumentBytes": 1,
"maximumGrantExpiryHours": 1,
"version": "example"
}
]
}

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.