Skip to content
Sursa Developers

Objects

ApiKeyUpdate

Changes to the key. Fields that are not passed stay unchanged, and data_profile is optional. An empty scopes list means scopes by role, empty collection_ids and allowed_cidrs mean no restriction, and expires_at set to null means the key does not expire. A key that is itself restricted to collections cannot remove or widen a restriction to collections (collection_ids).

Fields

  • data_profilestring

    New data profile of the key. A data profile does not apply to the admin role, so for an admin key a profile other than full returns 400 api_keys.data_profile_not_applicable.

  • scopesarray of ApiKeyScope

    Scopes of the key. The system scope is not issued through the API.

  • collection_idsarray of integer

    Restricts the key to these collections. An empty list means no restriction. A calling key that is itself restricted to collections sees and changes only keys in its collections (other keys return 404 api_keys.not_found) and can set only a non-empty list of its own collections. An empty list or a collection outside its list returns 400 api_keys.invalid_collections. Without this field, the collections of the key stay unchanged.

    items ≤ 100

  • allowed_cidrsarray of string

    Networks the key may be used from.

    items ≤ 50

  • expires_atstring (date-time) | null

    Expiration time (in the future). null means the key does not expire.

Used by