Skip to main content

List API keys

GET 

/v2/config/admin/apikeys

Lists the API keys of the organisation, with pagination. The service sorts them with the most recently written key first.

The list holds only the keys that you create with this group of operations; it leaves out the internal keys of the platform.

The list also depends on the sandbox organisation of the request. Without the X-SandboxOrgId header the service returns the keys of the main wallet only. With the header it returns the keys that are bound to that sandbox organisation. When you authenticate with an API key, the service takes the sandbox organisation from the key.

Every item holds the signed token in its apiKey field, so treat the response as a secret.

Request

Query Parameters

    offset integerrequired

    Default value: 0

    Number of records to skip for pagination. A negative or unreadable value falls back to 0.

    limit integerrequired

    Default value: 10

    Maximum number of records to return per page.

Header Parameters

    X-SandboxOrgId stringrequired

    Optional. Unique identifier of the sandbox organisation to use for this request. When you send this header, the service runs the operation in the context of the named sandbox organisation, that is, against the wallet of that sandbox organisation and not against the main wallet of the organisation. Leave the header out to use the main wallet.

    The service reads this header only when you authenticate with a bearer access token. When you authenticate with an API key, the service takes the sandbox organisation from the API key and ignores this header. To run an API-key call in a sandbox organisation, bind the key to the sandbox organisation with PUT /v2/config/admin/apikey/{apiKeyId}/sandbox-org instead.

    X-SubwalletId is the deprecated name of this header. The service continues to accept it, but X-SandboxOrgId wins if you send both headers.

    The sandbox organisation must exist, must belong to your organisation and must be deployed. An unknown identifier, an identifier of a sandbox organisation that is not deployed, and an identifier that belongs to a different organisation all make the call fail with HTTP 400.

    Example: 6889e1a4c5b2f30001a3d710

Responses

The service listed the API keys.

Response Headers
    Schema
      apiKeys object[]required

      API keys for the current page. The array is empty when the organisation has no API key for the current sandbox organisation.

    • Array [
    • id stringrequired

      Unique identifier of the API key.

      name stringrequired

      Name of the API key. The service does not check this value for uniqueness.

      scopes string[]required

      Possible values: [config, audit, service, onboard]

      Scopes of the API key. Each scope opens a group of endpoints. The service refuses any other value with HTTP 400.

      apiKey stringrequired

      The signed JSON Web Token. Send it as Authorization: ApiKey <apiKey>. The token holds the scopes, the organisation, the organisation administrator and, when the key is bound to a sandbox organisation, the sandbox organisation.

      expiryInDays integerrequired

      Default value: 30

      Lifetime of the API key in days, counted from the moment the service created or last updated the key. The service uses 30 days when you send 0 or a negative value.

      timestamp date-timerequired

      Moment when the service last wrote the API key, in UTC. The service sets this value on create and on every update, including the delete operation.

      expiryTimestamp date-timerequired

      Moment when the API key expires, in UTC.

      type stringrequired

      Possible values: [igrantio, aip10]

      Type of the API key. The list operation returns only keys of type igrantio; these are the keys that you create with this group of operations.

      sandboxOrgId string

      Identifier of the sandbox organisation that the API key is bound to. The field is absent when the key belongs to the main wallet of the organisation.

      createdBy objectrequired

      The user who created the API key, and the moment of creation. The service keeps this as log metadata.

      id stringrequired

      Identifier of the user who created the API key. The value is an empty string for a key created with an API key.

      email stringrequired

      Email address of the user who created the API key.

      at date-timerequired

      Moment of creation, in UTC.

    • ]
    • pagination objectrequired
      currentPage integer

      Current page number

      totalItems integer

      Total number of items available

      totalPages integer

      Total number of pages based on limit

      limit integer

      Number of items per page

      hasPrevious boolean

      Indicates if there's a previous page

      hasNext boolean

      Indicates if there's a next page

    Loading...