Contexts

Create a context.

Changed on

Creates a context from the name and settings in the body. A setting left out takes its default. A user can have at most 10 contexts, counting default. Requires the contexts:write scope.

post/api/contexts

Request

  • Base URL
    / (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/contexts
  • Auth
    HTTP bearer

Query parameters

ownerstring

Headers

Authorizationstring required

Request body

namestring required

The context's name.

disambiguationScope'document' | 'context'

Whether span disambiguation learns within each document (document) or across every document redacted in the context (context). Applies when entityTypeDisambiguation is on.

entityTypeDisambiguationboolean

Whether to apply entity-type span disambiguation.

ledgerboolean

Whether to record redactions in the ledger.

Response

The context was created.

fieldstring

For a request refused as invalid, the parameter or body field that was invalid, when one is.

messagestring

What happened, written for a person to read. It may change; use reason in code.

reasonstring

For an error, why the request was refused, as a stable code a client can act on. The codes are listed in the API documentation under Errors.

Changes

    • breaking

      added required request body

    • warning

      deleted the query request parameter disambiguation_scope

    • warning

      deleted the query request parameter entity_type_disambiguation

    • warning

      deleted the query request parameter ledger

    • warning

      deleted the query request parameter name

    • breaking

      removed the success response with the status

    • info

      added the success response with the status