Skip to content

The v1 docs follow nauthera-server's main branch and its 0.x releases on the way to 1.0, so fields and APIs can still change.

v1

Count audit events (admin)

Docs version v1 (main)Nauthera is pre-1.0, in a design-partner program

GET/v1/admin/orgs/{slug}/audit-events/count

How many audit events the list holds, and how many of them the search and filters leave. Takes exactly the parameters adminListAuditEvents filters by, with the same rules and the same refusals, and needs the same permission. Recorded at the trace level as list.counted, since a dashboard counts again on every change of its filters.

Counting reads every record of the window, so the audit log counts at most 10000 records for each number and sets at_least on one that stopped there. Both numbers are of the window: total is every record in it, matching the ones the filters leave.

The access token must carry the scope shown.

Send it in the Authorization header:

The access token, as Bearer <token> (RFC 6750 §2.1) or, for a sender-constrained token, DPoP <token> (RFC 9449 §7.1). A token minted with a cnf.jkt confirmation is only accepted together with a DPoP proof signed by that key, whichever of the two schemes carries it.

The caller must also hold the permission audit.read: Read an organization's audit log.

  • slugstringrequired

    The organization slug. It names the TENANT OF RECORD for the operation: the rows it reads and writes, the policy its secrets are derived under, and the organization its audit record is filed against all come from this organization. A token is admitted only through its own slug, except a main-org token, which may be admitted through any — so cross-tenant administration is performed through the TARGET tenant's slug, never by naming its resources through another. A token reaching for a slug it may not be admitted through is refused identically whether that organization exists or not.

    1–64 characters

  • fromstring · date-time

    Inclusive start of the window (RFC3339). Defaults to 30 days before to.

    The window from from to to may span at most 90 days.

    at most 64 characters

  • tostring · date-time

    Exclusive end of the window (RFC3339). Defaults to now.

    The window from from to to may span at most 90 days.

    at most 64 characters

  • actionarray of strings

    Action patterns, comma-separated. * and ? are wildcards and do not stop at a dot, so user.* covers user.password.changed as well as user.created. A pattern matching no known action simply returns nothing, and an empty element is ignored. With no pattern, every action but system.audit.checkpoint is returned: the hash chain's checkpoint records, which the verifier reads, come back only to a pattern that matches them.

    at most 32 items · each item: at most 128 characters · each item: pattern ^[a-z0-9_.*?-]*$

  • categoryarray of enums

    Categories, comma-separated. A record is matched by the category it was written under.

    Possible values11 values
    • authentication
    • session
    • mfa
    • token
    • user
    • organization
    • client
    • role
    • admin
    • audit
    • system

    at most 16 items

  • outcomearray of enums

    Outcomes, comma-separated. failure,denied,error, in any order, is every refusal and fault: the base query of most detectors, which has an index of its own.

    Possible values4 values
    • success
    • failure
    • denied
    • error

    at most 16 items

  • severityarray of enums

    Severities, comma-separated.

    Possible values4 values
    • info
    • notice
    • warning
    • critical

    at most 16 items

  • reasonarray of enums

    Reasons, comma-separated: the error each refusal answered with, such as invalid_grant or invalid_dpop_proof. A success carries no reason; ask for successes with outcome.

    Possible values61 values
    • invalid_credentials
    • account_locked
    • rate_limited
    • mfa_required
    • email_verification_required
    • invalid_code
    • factor_locked
    • missing_role
    • missing_scope
    • cross_org_denied
    • not_found
    • conflict
    • invalid_request
    • invalid_client
    • invalid_grant
    • invalid_redirect_uri
    • unauthenticated
    • registration_closed
    • invalid_target
    • invalid_dpop_proof
    • repeated_header
    • token_expired
    • missing_expiry
    • audience_mismatch
    • unsupported_critical
    • unregistered_client
    • redirect_uri_required
    • pushed_request_required
    • invalid_request_uri
    • request_uri_client_mismatch
    • invalid_request_object
    • unavailable
    • internal_error
    • access_denied
    • login_required
    • consent_required
    • interaction_required
    • unsupported_grant_type
    • invalid_scope
    • unauthorized_client
    • unsupported_response_type
    • account_selection_required
    • invalid_authorization_details
    • expired_token
    • request_not_supported
    • request_uri_not_supported
    • unsupported_token_type
    • invalid_token
    • use_dpop_nonce
    • authorization_pending
    • slow_down
    • invalid_client_metadata
    • invalid_software_statement
    • unapproved_software_statement
    • account_unavailable
    • insufficient_user_authentication
    • protected_account
    • passkey_offered
    • password_change_required
    • terms_acceptance_required
    • insufficient_scope

    at most 16 items

  • actor_typearray of enums

    Actor types, comma-separated. anonymous is every record made before a caller was identified.

    Possible values5 values
    • user
    • admin
    • client
    • system
    • anonymous

    at most 8 items

  • operationarray of strings

    Operations, comma-separated, each matched exactly: the operation a record was made under, as its operation field holds it — the operationId as this document spells it, so a record stored by an earlier release, which holds the Go identifier (GetJWKS), is found by that spelling.

    at most 16 items · each item: at most 256 characters · each item: pattern ^[A-Za-z0-9_./-]+$

  • actor_idstring

    Only records caused by this principal.

    at most 256 characters

  • target_idstring

    Only records acting on this object.

    at most 256 characters

  • The kind of object an event acted upon. audit_log is the log itself, for the events that record reading or exporting it. consent is one user's standing agreement with one client for one resource, named by the agreement's id, so every decision about it shares one target. group is one of an organization's groups of users.

    Possible values11 values
    • user
    • organization
    • client
    • session
    • token
    • factor
    • role
    • system
    • audit_log
    • consent
    • group
  • subjectstring

    Only records in which this user is the actor or the target: their whole trail, each record once, in one keyset-paginated listing. Composes with actor_id and target_id like any other filter.

    at most 256 characters

  • client_ipstring

    Only records from this address. Any spelling of an address matches the one the server stores (2001:DB8::1 is 2001:db8::1, and ::ffff:203.0.113.5 is 203.0.113.5); a value that is not an IP address is rejected with a 400. An address is personal data, so a caller without the users.pii.read permission is refused with a 403.

    at most 64 characters

  • Only records from addresses in this network: an IPv4 /24 or an IPv6 /64, the unit an address rotates within while its owner stays the same. A single address stands for the network it lies in. Any other prefix length is rejected with a 400. Records written before the server kept the network are not matched.

    at most 64 characters

  • network_zonearray of strings

    Network zones, comma-separated: only records whose client address fell in one of them, as the record's network_zones names them. A sign-in records its zones; other records name none and are not matched. A value that is not a lowercase label is rejected with a 400.

    at most 16 items · each item: at most 63 characters

  • client_ip_countryarray of strings · iso-3166-1-alpha-2

    Countries, comma-separated, each an ISO 3166-1 alpha-2 code in either case: only records whose client address was in one of them when the record was written, as the record's client_ip_country names it. A record written without an IP geolocation database (geoip.database), or before the server kept the country, is not matched. Where a user was is personal data, so a caller without the users.pii.read permission is refused with a 403.

    at most 16 items · each item: at most 2 characters · each item: pattern ^[A-Za-z]{2}$

  • client_ip_asnarray of strings

    AS numbers, comma-separated, each with or without AS in front: only records whose client address was announced from one of them when the record was written, as the record's client_ip_asn names it. A record written without an ASN database (geoip.asn_database), or before the server kept the network, is not matched. A caller without the users.pii.read permission is refused with a 403, as for client_ip.

    at most 16 items · each item: at most 12 characters · each item: pattern ^(AS|as)?[0-9]{1,10}$

  • The organization of the autonomous system the client address was announced from when the record was written (client_ip_asn's organization), ignoring case. * stands for any run of characters and ? for any one, so *hosting* matches every provider whose name holds "hosting"; without either the whole name must match. A record written without an ASN database is not matched. A caller without the users.pii.read permission is refused with a 403, as for client_ip.

    at most 128 characters

  • client_idstring

    Only records about this client, whether the server resolved the record to it or the caller only named it. Each record says which: a resolved client is its client_id, a named one its claimed_client_id.

    at most 256 characters

  • at most 256 characters

  • The X-Request-ID of a single request. This and trace_id are what a support engineer arrives with.

    at most 256 characters

  • trace_idstring

    at most 64 characters

  • Only actions taken on this organization by an actor from another one. It is the single most useful security view a multi-tenant audit log offers, which is why it is a first-class filter.

  • DPoPstring

    DPoP proof JWT (RFC 9449 §4). REQUIRED on a request presenting a DPoP-bound access token, and it must be signed by the key named in the token's cnf.jkt and cover this request's method and URI. The proof is read from the request itself rather than from this decoded parameter, so every protected operation is covered whether or not it declares it.

    at most 8192 characters

  • 200 OKapplication/jsonThe audit events the list holds and the audit events that match.

    The audit events the list holds and the audit events that match.

    Headers

    • Cache-Controlno-store

    Body

    How many rows a list holds (total, with no search and no filter) and how many of them its search and filters leave (matching): the numbers a page of the list cannot carry, read beside it from the list's count operation.

    • totalobjectrequired

      A number of rows. A list that counts at most a cap of rows (the audit log) stops there and says so with at_least; every other list counts exactly and never sets it.

      Show child attributes
      • countinteger · int64required
        Example1240

        at least 0

      • at_leastbooleanrequired

        The count stopped at the cap, so the rows number count or more.

      No other properties are accepted.

    • matchingobjectrequired

      A number of rows. A list that counts at most a cap of rows (the audit log) stops there and says so with at_least; every other list counts exactly and never sets it.

      Show child attributes
      • countinteger · int64required
        Example1240

        at least 0

      • at_leastbooleanrequired

        The count stopped at the cap, so the rows number count or more.

      No other properties are accepted.

  • 400 Bad Requestapplication/problem+jsonThe search or a filter was invalid, as adminListAuditEvents would refuse it.

    The search or a filter was invalid, as adminListAuditEvents would refuse it.

    Body

    RFC 9457 (formerly RFC 7807) problem details (application/problem+json). code is a stable machine-readable slug for the problem kind (it mirrors the last path segment of type), so consumers can branch on it without parsing prose. type is https://nauthera.io/problems/<code>, which resolves to the code's runbook: why it happened, who is affected and what to do (RFC 9457 §3.1.1). A problem without a code has about:blank. errors is present on validation failures and lists every offending field.

    • titlestringrequired
      Example"Request validation failed"
    • statusintegerrequired
      Example400
    • typestring · uri
      Example"https://nauthera.io/problems/validation_error"
    • detailstring
      Example"One or more fields did not satisfy the API schema."
    • codeenum

      The kind of problem, as a stable machine-readable slug a client branches on and translates rather than parsing title or detail, which are English prose for logs. A problem whose status says everything the server knows carries no code.

      Show more

      validation_error is the one code whose message is not a sentence about the code itself: the request failed the schema, and the specifics are the errors list — one entry per offending field — which a form renders on those fields. required and malformed are spelled like two of the per-field violation codes (FieldError.code) but mean something else; the two vocabularies are told apart by position, never by spelling.

      Compatibility: this is a CLOSED enum, with the same cost as AuditAction: a client generated against an older version of this document rejects a problem carrying a code added after it was built. Regenerate on upgrade, or decode the field as a plain string. It is enumerated anyway so that what a client must translate is knowable from the contract alone.

      Possible values47 values
      • invalid_request
      • invalid_credentials
      • forbidden
      • unauthorized
      • insufficient_user_authentication
      • protected_account
      • password_held_by_directory
      • last_role_administrator
      • group_membership_managed
      • invalid_code
      • too_many_requests
      • too_many_attempts
      • account_locked
      • account_unavailable
      • already_enrolled
      • registration_disabled
      • registration_conflict
      • terms_acceptance_required
      • captcha_failed
      • invalid_reset_link
      • password_reused
      • password_too_short
      • password_too_long
      • password_compromised
      • invalid_verification_link
      • invalid_invitation_link
      • mail_relay_missing
      • email_unverified
      • not_found
      • conflict
      • precondition_failed
      • unavailable
      • busy
      • window_too_large
      • too_many_series
      • internal_error
      • rate_limited
      • malformed
      • body_too_large
      • unsupported_media_type
      • required
      • validation_error
      • unknown_org
      • invalid_token
      • invalid_dpop_proof
      • use_dpop_nonce
      • server_error
    • instancestring
      Example"/introspect"
    • Example"8d94ed49-1caf-4ab3-9594-557142f2d023"
    • trace_idstring

      Distributed-trace id (hex) for correlating this response with traces and logs. Present only when tracing is enabled and the request was recorded. Opaque and safe to log/share.

      Example"4bf92f3577b34da6a3ce929d0e0e4736"
    • errorsarray of objects

      Field-level violations (present for validation errors).

      Each item:

      A single field-level validation violation.

      Show item attributes
      • fieldstringrequired

        Offending field, dotted for nested bodies (e.g. child.id).

        Example"token_type_hint"
      • codeenumrequired

        The rule a field broke, as a stable machine-readable slug a client branches on and translates rather than parsing message, which is English prose for logs.

        Show more

        Compatibility: a CLOSED enum, with the cost ProblemCode has: a client generated against an older version of this document rejects a field error carrying a code added after it was built.

        Possible values14 values
        • required
        • too_short
        • too_long
        • pattern
        • invalid_format
        • not_allowed
        • minimum
        • maximum
        • too_few
        • too_many
        • not_unique
        • malformed
        • undeclared
        • read_only
      • messagestringrequired
        Example"field token_type_hint must be one of [access_token, refresh_token]"
  • 401 Unauthorizedapplication/problem+jsonProblem details (RFC 9457) with an RFC 6750 / RFC 9449 challenge.

    Problem details (RFC 9457) with an RFC 6750 / RFC 9449 challenge.

    Headers

    • Cache-Controlno-store
    • WWW-Authenticatestring
    • DPoP-Noncestring

    Body

    RFC 9457 (formerly RFC 7807) problem details (application/problem+json). code is a stable machine-readable slug for the problem kind (it mirrors the last path segment of type), so consumers can branch on it without parsing prose. type is https://nauthera.io/problems/<code>, which resolves to the code's runbook: why it happened, who is affected and what to do (RFC 9457 §3.1.1). A problem without a code has about:blank. errors is present on validation failures and lists every offending field.

    • titlestringrequired
      Example"Request validation failed"
    • statusintegerrequired
      Example400
    • typestring · uri
      Example"https://nauthera.io/problems/validation_error"
    • detailstring
      Example"One or more fields did not satisfy the API schema."
    • codeenum

      The kind of problem, as a stable machine-readable slug a client branches on and translates rather than parsing title or detail, which are English prose for logs. A problem whose status says everything the server knows carries no code.

      Show more

      validation_error is the one code whose message is not a sentence about the code itself: the request failed the schema, and the specifics are the errors list — one entry per offending field — which a form renders on those fields. required and malformed are spelled like two of the per-field violation codes (FieldError.code) but mean something else; the two vocabularies are told apart by position, never by spelling.

      Compatibility: this is a CLOSED enum, with the same cost as AuditAction: a client generated against an older version of this document rejects a problem carrying a code added after it was built. Regenerate on upgrade, or decode the field as a plain string. It is enumerated anyway so that what a client must translate is knowable from the contract alone.

      Possible values47 values
      • invalid_request
      • invalid_credentials
      • forbidden
      • unauthorized
      • insufficient_user_authentication
      • protected_account
      • password_held_by_directory
      • last_role_administrator
      • group_membership_managed
      • invalid_code
      • too_many_requests
      • too_many_attempts
      • account_locked
      • account_unavailable
      • already_enrolled
      • registration_disabled
      • registration_conflict
      • terms_acceptance_required
      • captcha_failed
      • invalid_reset_link
      • password_reused
      • password_too_short
      • password_too_long
      • password_compromised
      • invalid_verification_link
      • invalid_invitation_link
      • mail_relay_missing
      • email_unverified
      • not_found
      • conflict
      • precondition_failed
      • unavailable
      • busy
      • window_too_large
      • too_many_series
      • internal_error
      • rate_limited
      • malformed
      • body_too_large
      • unsupported_media_type
      • required
      • validation_error
      • unknown_org
      • invalid_token
      • invalid_dpop_proof
      • use_dpop_nonce
      • server_error
    • instancestring
      Example"/introspect"
    • Example"8d94ed49-1caf-4ab3-9594-557142f2d023"
    • trace_idstring

      Distributed-trace id (hex) for correlating this response with traces and logs. Present only when tracing is enabled and the request was recorded. Opaque and safe to log/share.

      Example"4bf92f3577b34da6a3ce929d0e0e4736"
    • errorsarray of objects

      Field-level violations (present for validation errors).

      Each item:

      A single field-level validation violation.

      Show item attributes
      • fieldstringrequired

        Offending field, dotted for nested bodies (e.g. child.id).

        Example"token_type_hint"
      • codeenumrequired

        The rule a field broke, as a stable machine-readable slug a client branches on and translates rather than parsing message, which is English prose for logs.

        Show more

        Compatibility: a CLOSED enum, with the cost ProblemCode has: a client generated against an older version of this document rejects a field error carrying a code added after it was built.

        Possible values14 values
        • required
        • too_short
        • too_long
        • pattern
        • invalid_format
        • not_allowed
        • minimum
        • maximum
        • too_few
        • too_many
        • not_unique
        • malformed
        • undeclared
        • read_only
      • messagestringrequired
        Example"field token_type_hint must be one of [access_token, refresh_token]"
  • 403 Forbiddenapplication/problem+jsonProblem details (RFC 9457) with an RFC 6750 / RFC 9449 challenge.

    Problem details (RFC 9457) with an RFC 6750 / RFC 9449 challenge.

    Headers

    • Cache-Controlno-store
    • WWW-Authenticatestring
    • DPoP-Noncestring

    Body

    RFC 9457 (formerly RFC 7807) problem details (application/problem+json). code is a stable machine-readable slug for the problem kind (it mirrors the last path segment of type), so consumers can branch on it without parsing prose. type is https://nauthera.io/problems/<code>, which resolves to the code's runbook: why it happened, who is affected and what to do (RFC 9457 §3.1.1). A problem without a code has about:blank. errors is present on validation failures and lists every offending field.

    • titlestringrequired
      Example"Request validation failed"
    • statusintegerrequired
      Example400
    • typestring · uri
      Example"https://nauthera.io/problems/validation_error"
    • detailstring
      Example"One or more fields did not satisfy the API schema."
    • codeenum

      The kind of problem, as a stable machine-readable slug a client branches on and translates rather than parsing title or detail, which are English prose for logs. A problem whose status says everything the server knows carries no code.

      Show more

      validation_error is the one code whose message is not a sentence about the code itself: the request failed the schema, and the specifics are the errors list — one entry per offending field — which a form renders on those fields. required and malformed are spelled like two of the per-field violation codes (FieldError.code) but mean something else; the two vocabularies are told apart by position, never by spelling.

      Compatibility: this is a CLOSED enum, with the same cost as AuditAction: a client generated against an older version of this document rejects a problem carrying a code added after it was built. Regenerate on upgrade, or decode the field as a plain string. It is enumerated anyway so that what a client must translate is knowable from the contract alone.

      Possible values47 values
      • invalid_request
      • invalid_credentials
      • forbidden
      • unauthorized
      • insufficient_user_authentication
      • protected_account
      • password_held_by_directory
      • last_role_administrator
      • group_membership_managed
      • invalid_code
      • too_many_requests
      • too_many_attempts
      • account_locked
      • account_unavailable
      • already_enrolled
      • registration_disabled
      • registration_conflict
      • terms_acceptance_required
      • captcha_failed
      • invalid_reset_link
      • password_reused
      • password_too_short
      • password_too_long
      • password_compromised
      • invalid_verification_link
      • invalid_invitation_link
      • mail_relay_missing
      • email_unverified
      • not_found
      • conflict
      • precondition_failed
      • unavailable
      • busy
      • window_too_large
      • too_many_series
      • internal_error
      • rate_limited
      • malformed
      • body_too_large
      • unsupported_media_type
      • required
      • validation_error
      • unknown_org
      • invalid_token
      • invalid_dpop_proof
      • use_dpop_nonce
      • server_error
    • instancestring
      Example"/introspect"
    • Example"8d94ed49-1caf-4ab3-9594-557142f2d023"
    • trace_idstring

      Distributed-trace id (hex) for correlating this response with traces and logs. Present only when tracing is enabled and the request was recorded. Opaque and safe to log/share.

      Example"4bf92f3577b34da6a3ce929d0e0e4736"
    • errorsarray of objects

      Field-level violations (present for validation errors).

      Each item:

      A single field-level validation violation.

      Show item attributes
      • fieldstringrequired

        Offending field, dotted for nested bodies (e.g. child.id).

        Example"token_type_hint"
      • codeenumrequired

        The rule a field broke, as a stable machine-readable slug a client branches on and translates rather than parsing message, which is English prose for logs.

        Show more

        Compatibility: a CLOSED enum, with the cost ProblemCode has: a client generated against an older version of this document rejects a field error carrying a code added after it was built.

        Possible values14 values
        • required
        • too_short
        • too_long
        • pattern
        • invalid_format
        • not_allowed
        • minimum
        • maximum
        • too_few
        • too_many
        • not_unique
        • malformed
        • undeclared
        • read_only
      • messagestringrequired
        Example"field token_type_hint must be one of [access_token, refresh_token]"
  • 429 Too Many Requestsapplication/problem+jsonToo many requests.

    Too many requests.

    Body

    RFC 9457 (formerly RFC 7807) problem details (application/problem+json). code is a stable machine-readable slug for the problem kind (it mirrors the last path segment of type), so consumers can branch on it without parsing prose. type is https://nauthera.io/problems/<code>, which resolves to the code's runbook: why it happened, who is affected and what to do (RFC 9457 §3.1.1). A problem without a code has about:blank. errors is present on validation failures and lists every offending field.

    • titlestringrequired
      Example"Request validation failed"
    • statusintegerrequired
      Example400
    • typestring · uri
      Example"https://nauthera.io/problems/validation_error"
    • detailstring
      Example"One or more fields did not satisfy the API schema."
    • codeenum

      The kind of problem, as a stable machine-readable slug a client branches on and translates rather than parsing title or detail, which are English prose for logs. A problem whose status says everything the server knows carries no code.

      Show more

      validation_error is the one code whose message is not a sentence about the code itself: the request failed the schema, and the specifics are the errors list — one entry per offending field — which a form renders on those fields. required and malformed are spelled like two of the per-field violation codes (FieldError.code) but mean something else; the two vocabularies are told apart by position, never by spelling.

      Compatibility: this is a CLOSED enum, with the same cost as AuditAction: a client generated against an older version of this document rejects a problem carrying a code added after it was built. Regenerate on upgrade, or decode the field as a plain string. It is enumerated anyway so that what a client must translate is knowable from the contract alone.

      Possible values47 values
      • invalid_request
      • invalid_credentials
      • forbidden
      • unauthorized
      • insufficient_user_authentication
      • protected_account
      • password_held_by_directory
      • last_role_administrator
      • group_membership_managed
      • invalid_code
      • too_many_requests
      • too_many_attempts
      • account_locked
      • account_unavailable
      • already_enrolled
      • registration_disabled
      • registration_conflict
      • terms_acceptance_required
      • captcha_failed
      • invalid_reset_link
      • password_reused
      • password_too_short
      • password_too_long
      • password_compromised
      • invalid_verification_link
      • invalid_invitation_link
      • mail_relay_missing
      • email_unverified
      • not_found
      • conflict
      • precondition_failed
      • unavailable
      • busy
      • window_too_large
      • too_many_series
      • internal_error
      • rate_limited
      • malformed
      • body_too_large
      • unsupported_media_type
      • required
      • validation_error
      • unknown_org
      • invalid_token
      • invalid_dpop_proof
      • use_dpop_nonce
      • server_error
    • instancestring
      Example"/introspect"
    • Example"8d94ed49-1caf-4ab3-9594-557142f2d023"
    • trace_idstring

      Distributed-trace id (hex) for correlating this response with traces and logs. Present only when tracing is enabled and the request was recorded. Opaque and safe to log/share.

      Example"4bf92f3577b34da6a3ce929d0e0e4736"
    • errorsarray of objects

      Field-level violations (present for validation errors).

      Each item:

      A single field-level validation violation.

      Show item attributes
      • fieldstringrequired

        Offending field, dotted for nested bodies (e.g. child.id).

        Example"token_type_hint"
      • codeenumrequired

        The rule a field broke, as a stable machine-readable slug a client branches on and translates rather than parsing message, which is English prose for logs.

        Show more

        Compatibility: a CLOSED enum, with the cost ProblemCode has: a client generated against an older version of this document rejects a field error carrying a code added after it was built.

        Possible values14 values
        • required
        • too_short
        • too_long
        • pattern
        • invalid_format
        • not_allowed
        • minimum
        • maximum
        • too_few
        • too_many
        • not_unique
        • malformed
        • undeclared
        • read_only
      • messagestringrequired
        Example"field token_type_hint must be one of [access_token, refresh_token]"
  • Errorapplication/problem+jsonProblem details (RFC 9457) with an RFC 6750 / RFC 9449 challenge.

    Problem details (RFC 9457) with an RFC 6750 / RFC 9449 challenge.

    Headers

    • Cache-Controlno-store
    • WWW-Authenticatestring
    • DPoP-Noncestring

    Body

    RFC 9457 (formerly RFC 7807) problem details (application/problem+json). code is a stable machine-readable slug for the problem kind (it mirrors the last path segment of type), so consumers can branch on it without parsing prose. type is https://nauthera.io/problems/<code>, which resolves to the code's runbook: why it happened, who is affected and what to do (RFC 9457 §3.1.1). A problem without a code has about:blank. errors is present on validation failures and lists every offending field.

    • titlestringrequired
      Example"Request validation failed"
    • statusintegerrequired
      Example400
    • typestring · uri
      Example"https://nauthera.io/problems/validation_error"
    • detailstring
      Example"One or more fields did not satisfy the API schema."
    • codeenum

      The kind of problem, as a stable machine-readable slug a client branches on and translates rather than parsing title or detail, which are English prose for logs. A problem whose status says everything the server knows carries no code.

      Show more

      validation_error is the one code whose message is not a sentence about the code itself: the request failed the schema, and the specifics are the errors list — one entry per offending field — which a form renders on those fields. required and malformed are spelled like two of the per-field violation codes (FieldError.code) but mean something else; the two vocabularies are told apart by position, never by spelling.

      Compatibility: this is a CLOSED enum, with the same cost as AuditAction: a client generated against an older version of this document rejects a problem carrying a code added after it was built. Regenerate on upgrade, or decode the field as a plain string. It is enumerated anyway so that what a client must translate is knowable from the contract alone.

      Possible values47 values
      • invalid_request
      • invalid_credentials
      • forbidden
      • unauthorized
      • insufficient_user_authentication
      • protected_account
      • password_held_by_directory
      • last_role_administrator
      • group_membership_managed
      • invalid_code
      • too_many_requests
      • too_many_attempts
      • account_locked
      • account_unavailable
      • already_enrolled
      • registration_disabled
      • registration_conflict
      • terms_acceptance_required
      • captcha_failed
      • invalid_reset_link
      • password_reused
      • password_too_short
      • password_too_long
      • password_compromised
      • invalid_verification_link
      • invalid_invitation_link
      • mail_relay_missing
      • email_unverified
      • not_found
      • conflict
      • precondition_failed
      • unavailable
      • busy
      • window_too_large
      • too_many_series
      • internal_error
      • rate_limited
      • malformed
      • body_too_large
      • unsupported_media_type
      • required
      • validation_error
      • unknown_org
      • invalid_token
      • invalid_dpop_proof
      • use_dpop_nonce
      • server_error
    • instancestring
      Example"/introspect"
    • Example"8d94ed49-1caf-4ab3-9594-557142f2d023"
    • trace_idstring

      Distributed-trace id (hex) for correlating this response with traces and logs. Present only when tracing is enabled and the request was recorded. Opaque and safe to log/share.

      Example"4bf92f3577b34da6a3ce929d0e0e4736"
    • errorsarray of objects

      Field-level violations (present for validation errors).

      Each item:

      A single field-level validation violation.

      Show item attributes
      • fieldstringrequired

        Offending field, dotted for nested bodies (e.g. child.id).

        Example"token_type_hint"
      • codeenumrequired

        The rule a field broke, as a stable machine-readable slug a client branches on and translates rather than parsing message, which is English prose for logs.

        Show more

        Compatibility: a CLOSED enum, with the cost ProblemCode has: a client generated against an older version of this document rejects a field error carrying a code added after it was built.

        Possible values14 values
        • required
        • too_short
        • too_long
        • pattern
        • invalid_format
        • not_allowed
        • minimum
        • maximum
        • too_few
        • too_many
        • not_unique
        • malformed
        • undeclared
        • read_only
      • messagestringrequired
        Example"field token_type_hint must be one of [access_token, refresh_token]"