Objects
ApiKeyCreate
Fields
namestringrequiredlength ≥ 1, length ≤ 64
rolestringDefault: "editor"
data_profilestring | nullData profile of the key. Without it, the key gets the default profile of the organization. A data profile does not apply to the
adminrole. An admin key sees all data of the organization, and a profile other thanfullreturns400 api_keys.data_profile_not_applicable.expires_atstring (date-time) | nullExpiration time of the key (ISO 8601, in the future).
nullor no value means the key does not expire.scopesarray of ApiKeyScope | nullScopes of the key. If absent, the scopes follow the role:
admingetsread,write,admin;editorandverifiergetread,write;viewergetsread. Thesystemscope is issued only by the installation administrator. Fine-grainedresource:actionscopes (ApiKeyScope) are accepted too; the earlierread,writeandadminexpand into sets of scopes.collection_idsarray of integer | nullRestricts the key to these collections of the organization. Cards, search, answers and events work only in them, on top of the role and the data profile. No value or an empty list means no restriction. If the calling key is itself restricted to collections, the new key can only be in its collections. Without this field, the new key gets the collections of the calling key. An empty list or a collection outside its list returns
400 api_keys.invalid_collections.items ≤ 100
allowed_cidrsarray of string | nullNetworks the key may be used from, such as
10.0.0.0/8or2001:db8::/32. A single address is a network of one address. A request from another address returns403 api_keys.ip_not_allowed. No value means no restriction.items ≤ 50