API keys

API keys can be used by developers to gain programmatic access to the Qlik platform, acting as their own user.

Download specification

List API keys

Lists API keys for the tenant. To list API keys owned by other users, requesting user must be assigned the TenantAdmin role.

Facts

Rate limit Tier 1 (1000 requests per minute)
Categories authenticate

Query Parameters

  • createdByUserstring

    The user ID that created the API key.

  • endingBeforestring

    Get resources with IDs that are lower than the target resource ID. Cannot be used in conjunction with startingAfter.

  • limitnumber

    Maximum number of API keys to retrieve.

  • sortstring

    The field to sort by, with +/- prefix indicating sort order

    Can be one of: "createdByUser""+createdByUser""-createdByUser""sub""+sub""-sub""status""+status""-status""description""+description""-description""created""+created""-created"

  • startingAfterstring

    Get resources with IDs that are higher than the target resource ID. Cannot be used in conjunction with endingBefore.

  • statusstring

    The status of the API key.

    Can be one of: "active""expired""revoked"

  • substring

    The ID of the subject. For SCIM the format is SCIM\\{{IDP-ID}}, where {{IDP-ID}} is the ID of the IDP in Qlik. For users, use their user ID, e.g. 64ef645a3b7009d55dee5a2b.

Responses

200

application/json

The list API keys result.

  • application/jsonobject
    Show application/json properties
    • dataarray of objects
      Required

      Properties of API keys in a given tenant.

      Show data properties
      • idstring
        Required

        The unique ID for the resource.

      • substring
        Required

        The ID of the subject for the API key. For SCIM the format is SCIM\\{{IDP-ID}}, where {{IDP-ID}} is the ID of the IDP in Qlik. For users, use their user ID, e.g. 64ef645a3b7009d55dee5a2b.

      • expirystring
        Required

        When the API key will expire and no longer be a valid authentication token.

      • statusstring
        Required

        The status of the API key.

        Can be one of: "active""expired""revoked"

      • createdstring

        When the API key was created.

      • subTypestring
        Required

        Type of the subject. For SCIM, it should be externalClient.

        Can be one of: "user""externalClient"

      • tenantIdstring
        Required

        The tenant ID.

      • descriptionstring
        Required

        A description for the API key.

      • lastUpdatedstring

        When the API key was last updated.

      • createdByUserstring
        Required

        The ID of the user who created the key.

    • linksobject
      Required

      Navigation links to page results.

      Show links properties
      • nextobject
        Show next properties
        • hrefstring
          Required

          The URL for the link.

      • prevobject
        Show prev properties
        • hrefstring
          Required

          The URL for the link.

      • selfobject
        Required
        Show self properties
        • hrefstring
          Required

          The URL for the link.

400

application/json

Invalid request was made.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Additional properties relating to the error.

      • titlestring
        Required

        Summary of the problem.

      • detailstring

        A human-readable explanation specific to this occurrence of the problem.

      • sourceobject

        References to the source of the error.

        Show source properties
        • pointerstring

          A JSON Pointer to the property that caused the error.

        • parameterstring

          The URI query parameter that caused the error.

      • statusinteger

        The HTTP status code.

403

application/json

Requestor not allowed to list API keys.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Additional properties relating to the error.

      • titlestring
        Required

        Summary of the problem.

      • detailstring

        A human-readable explanation specific to this occurrence of the problem.

      • sourceobject

        References to the source of the error.

        Show source properties
        • pointerstring

          A JSON Pointer to the property that caused the error.

        • parameterstring

          The URI query parameter that caused the error.

      • statusinteger

        The HTTP status code.

429

application/json

Request has been rate limited.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Additional properties relating to the error.

      • titlestring
        Required

        Summary of the problem.

      • detailstring

        A human-readable explanation specific to this occurrence of the problem.

      • sourceobject

        References to the source of the error.

        Show source properties
        • pointerstring

          A JSON Pointer to the property that caused the error.

        • parameterstring

          The URI query parameter that caused the error.

      • statusinteger

        The HTTP status code.

GET /v1/api-keys
curl "https://your-tenant.us.qlikcloud.com/api/v1/api-keys" \
-H "Authorization: Bearer <access_token>"
const https = require('https')
  const data = JSON.stringify("")
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/api-keys',
    'method': 'GET',
    'headers': {
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  
qlik api-key ls

Response

{
  "data": [
    {
      "id": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69",
      "sub": "SCIM\\\\215g5595380d646163cadbb9",
      "expiry": "2018-10-30T07:06:22Z",
      "status": "active",
      "created": "2018-10-30T07:06:22Z",
      "subType": "user",
      "tenantId": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69",
      "description": "string",
      "lastUpdated": "2018-10-30T07:06:22Z",
      "createdByUser": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69"
    }
  ],
  "links": {
    "next": {
      "href": "string"
    },
    "prev": {
      "href": "string"
    },
    "self": {
      "href": "string"
    }
  }
}

Create API key

Creates an API key, either for a user, or for configuring SCIM for a compatible Identity Provider. Sending sub and subType is required only for creating SCIM keys.

Facts

Rate limit Tier 2 (100 requests per minute)
Categories authenticate

Request Body

Required

application/json

Properties that the user wants to set for the API key.

  • application/jsonobject
    Show application/json properties
    • substring

      The ID of the subject for the API key. For SCIM the format is SCIM\\{{IDP-ID}}, where {{IDP-ID}} is the ID of the IDP in Qlik. When creating an API key for a user, this is their user ID, e.g. 64ef645a3b7009d55dee5a2b, and will default to the requesting user if not provided. User must be assigned the Developer role.

    • expirystring

      The expiry of the API key, in ISO8601 duration format. For example, P7D sets expiry after 7 days. If not provided, defaults to the maximum API key or SCIM key expiry configured in the tenant.

    • subTypestring

      Type of the subject. For SCIM, it should be externalClient. If not specified, defaults to user.

      Can be one of: "user""externalClient"

    • descriptionstring
      Required

      Text that describes the API key.

Responses

201

application/json

Created the API key successfully.

  • application/jsonobject
    Show application/json properties
    • idstring
      Required

      The unique ID for the resource.

    • substring
      Required

      The ID of the subject for the API key.

    • tokenstring
      Required

      The generated signed JWT.

    • expirystring
      Required

      When the API key will expire and no longer be a valid authentication token.

    • statusstring
      Required

      The status of the API key.

      Can be one of: "active""expired""revoked"

    • createdstring

      When the API key was created.

    • subTypestring
      Required

      Type of the subject.

      Can be one of: "user"

    • tenantIdstring
      Required

      The tenant ID.

    • descriptionstring
      Required

      A description for the API key.

    • lastUpdatedstring

      When the API key was last updated.

    • createdByUserstring
      Required

      The id of the user who created the key.

400

application/json

Invalid request was made.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Additional properties relating to the error.

      • titlestring
        Required

        Summary of the problem.

      • detailstring

        A human-readable explanation specific to this occurrence of the problem.

      • sourceobject

        References to the source of the error.

        Show source properties
        • pointerstring

          A JSON Pointer to the property that caused the error.

        • parameterstring

          The URI query parameter that caused the error.

      • statusinteger

        The HTTP status code.

403

application/json

Requestor not allowed to create an API key

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Additional properties relating to the error.

      • titlestring
        Required

        Summary of the problem.

      • detailstring

        A human-readable explanation specific to this occurrence of the problem.

      • sourceobject

        References to the source of the error.

        Show source properties
        • pointerstring

          A JSON Pointer to the property that caused the error.

        • parameterstring

          The URI query parameter that caused the error.

      • statusinteger

        The HTTP status code.

429

application/json

Request has been rate limited.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Additional properties relating to the error.

      • titlestring
        Required

        Summary of the problem.

      • detailstring

        A human-readable explanation specific to this occurrence of the problem.

      • sourceobject

        References to the source of the error.

        Show source properties
        • pointerstring

          A JSON Pointer to the property that caused the error.

        • parameterstring

          The URI query parameter that caused the error.

      • statusinteger

        The HTTP status code.

default

application/json

Unexpected error.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Additional properties relating to the error.

      • titlestring
        Required

        Summary of the problem.

      • detailstring

        A human-readable explanation specific to this occurrence of the problem.

      • sourceobject

        References to the source of the error.

        Show source properties
        • pointerstring

          A JSON Pointer to the property that caused the error.

        • parameterstring

          The URI query parameter that caused the error.

      • statusinteger

        The HTTP status code.

POST /v1/api-keys
curl "https://your-tenant.us.qlikcloud.com/api/v1/api-keys" \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '{"sub":"SCIM\\\\215g5595380d646163cadbb9","expiry":"P7D","subType":"user","description":"string"}'
const https = require('https')
  const data = JSON.stringify({"sub":"SCIM\\\\215g5595380d646163cadbb9","expiry":"P7D","subType":"user","description":"string"})
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/api-keys',
    'method': 'POST',
    'headers': {
      'Content-type': 'application/json',
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  req.write(data)
  
qlik api-key create \
--description="string" \
--expiry="P7D" \
--sub="SCIM\\215g5595380d646163cadbb9" \
--subType="user"

Request

{
  "sub": "SCIM\\\\215g5595380d646163cadbb9",
  "expiry": "P7D",
  "subType": "user",
  "description": "string"
}

Response

{
  "id": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69",
  "sub": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69",
  "token": "string",
  "expiry": "2018-10-30T07:06:22Z",
  "status": "active",
  "created": "2018-10-30T07:06:22Z",
  "subType": "user",
  "tenantId": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69",
  "description": "string",
  "lastUpdated": "2018-10-30T07:06:22Z",
  "createdByUser": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69"
}

Get API key for a given ID

Returns the API key for a given API key ID.

Facts

Rate limit Tier 1 (1000 requests per minute)
Categories authenticate

Path Parameters

  • idstring
    Required

    The ID of the API key to be retrieved.

Responses

200

application/json

Returns an API key resource.

  • application/jsonobject
    Show application/json properties
    • idstring
      Required

      The unique ID for the resource.

    • substring
      Required

      The ID of the subject for the API key. For SCIM the format is SCIM\\{{IDP-ID}}, where {{IDP-ID}} is the ID of the IDP in Qlik. For users, use their user ID, e.g. 64ef645a3b7009d55dee5a2b.

    • expirystring
      Required

      When the API key will expire and no longer be a valid authentication token.

    • statusstring
      Required

      The status of the API key.

      Can be one of: "active""expired""revoked"

    • createdstring

      When the API key was created.

    • subTypestring
      Required

      Type of the subject. For SCIM, it should be externalClient.

      Can be one of: "user""externalClient"

    • tenantIdstring
      Required

      The tenant ID.

    • descriptionstring
      Required

      A description for the API key.

    • lastUpdatedstring

      When the API key was last updated.

    • createdByUserstring
      Required

      The ID of the user who created the key.

403

application/json

Requestor not allowed to query this API key.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Additional properties relating to the error.

      • titlestring
        Required

        Summary of the problem.

      • detailstring

        A human-readable explanation specific to this occurrence of the problem.

      • sourceobject

        References to the source of the error.

        Show source properties
        • pointerstring

          A JSON Pointer to the property that caused the error.

        • parameterstring

          The URI query parameter that caused the error.

      • statusinteger

        The HTTP status code.

404

application/json

API key was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Additional properties relating to the error.

      • titlestring
        Required

        Summary of the problem.

      • detailstring

        A human-readable explanation specific to this occurrence of the problem.

      • sourceobject

        References to the source of the error.

        Show source properties
        • pointerstring

          A JSON Pointer to the property that caused the error.

        • parameterstring

          The URI query parameter that caused the error.

      • statusinteger

        The HTTP status code.

429

application/json

Request has been rate limited.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Additional properties relating to the error.

      • titlestring
        Required

        Summary of the problem.

      • detailstring

        A human-readable explanation specific to this occurrence of the problem.

      • sourceobject

        References to the source of the error.

        Show source properties
        • pointerstring

          A JSON Pointer to the property that caused the error.

        • parameterstring

          The URI query parameter that caused the error.

      • statusinteger

        The HTTP status code.

default

application/json

Unexpected error.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Additional properties relating to the error.

      • titlestring
        Required

        Summary of the problem.

      • detailstring

        A human-readable explanation specific to this occurrence of the problem.

      • sourceobject

        References to the source of the error.

        Show source properties
        • pointerstring

          A JSON Pointer to the property that caused the error.

        • parameterstring

          The URI query parameter that caused the error.

      • statusinteger

        The HTTP status code.

GET /v1/api-keys/{id}
curl "https://your-tenant.us.qlikcloud.com/api/v1/api-keys/{id}" \
-H "Authorization: Bearer <access_token>"
const https = require('https')
  const data = JSON.stringify("")
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/api-keys/{id}',
    'method': 'GET',
    'headers': {
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  
qlik api-key get <api-keyId>

Response

{
  "id": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69",
  "sub": "SCIM\\\\215g5595380d646163cadbb9",
  "expiry": "2018-10-30T07:06:22Z",
  "status": "active",
  "created": "2018-10-30T07:06:22Z",
  "subType": "user",
  "tenantId": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69",
  "description": "string",
  "lastUpdated": "2018-10-30T07:06:22Z",
  "createdByUser": "TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69"
}

Update API key description

Updates an API key description for a given API key ID.

Facts

Rate limit Tier 2 (100 requests per minute)
Categories authenticate

Path Parameters

  • idstring
    Required

    The ID of the API key resource to be updated.

Request Body

Required

application/json

Properties that the user wants to update for the API key.

A JSON Patch document as defined in https://datatracker.ietf.org/doc/html/rfc6902.

  • application/jsonarray of objects

    A JSON Patch document as defined in https://datatracker.ietf.org/doc/html/rfc6902.

    Show application/json properties
    • opstring
      Required

      The operation to be performed.

      Can be one of: "replace"

    • pathstring
      Required

      The path for the given resource field to patch.

      Can be one of: "/description"

    • valuestring
      Required

      The value to be used for this operation.

Responses

204

API key updated successfully.

400

application/json

Invalid request was made.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Additional properties relating to the error.

      • titlestring
        Required

        Summary of the problem.

      • detailstring

        A human-readable explanation specific to this occurrence of the problem.

      • sourceobject

        References to the source of the error.

        Show source properties
        • pointerstring

          A JSON Pointer to the property that caused the error.

        • parameterstring

          The URI query parameter that caused the error.

      • statusinteger

        The HTTP status code.

403

application/json

Requestor not allowed to update this API key.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Additional properties relating to the error.

      • titlestring
        Required

        Summary of the problem.

      • detailstring

        A human-readable explanation specific to this occurrence of the problem.

      • sourceobject

        References to the source of the error.

        Show source properties
        • pointerstring

          A JSON Pointer to the property that caused the error.

        • parameterstring

          The URI query parameter that caused the error.

      • statusinteger

        The HTTP status code.

404

application/json

API key was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Additional properties relating to the error.

      • titlestring
        Required

        Summary of the problem.

      • detailstring

        A human-readable explanation specific to this occurrence of the problem.

      • sourceobject

        References to the source of the error.

        Show source properties
        • pointerstring

          A JSON Pointer to the property that caused the error.

        • parameterstring

          The URI query parameter that caused the error.

      • statusinteger

        The HTTP status code.

429

application/json

Request has been rate limited.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Additional properties relating to the error.

      • titlestring
        Required

        Summary of the problem.

      • detailstring

        A human-readable explanation specific to this occurrence of the problem.

      • sourceobject

        References to the source of the error.

        Show source properties
        • pointerstring

          A JSON Pointer to the property that caused the error.

        • parameterstring

          The URI query parameter that caused the error.

      • statusinteger

        The HTTP status code.

PATCH /v1/api-keys/{id}
curl "https://your-tenant.us.qlikcloud.com/api/v1/api-keys/{id}" \
-X PATCH \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '[{"op":"replace","path":"/description","value":"my new description"}]'
const https = require('https')
  const data = JSON.stringify([{"op":"replace","path":"/description","value":"my new description"}])
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/api-keys/{id}',
    'method': 'PATCH',
    'headers': {
      'Content-type': 'application/json',
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  req.write(data)
  
qlik api-key patch <api-keyId> \
--body='[{"op":"replace","path":"/description","value":"my new description"}]'

Request

[
  {
    "op": "replace",
    "path": "/description",
    "value": "my new description"
  }
]

Delete or revoke an API key

Deletes or revokes an API key for a given API key ID. When the owner of the API key sends the request, the key will be deleted and removed from the tenant. When a user assigned the TenantAdmin role sends the request, the key will be disabled and marked as revoked.

Facts

Rate limit Tier 2 (100 requests per minute)
Categories authenticate

Path Parameters

  • idstring
    Required

    The ID of the API key to be retrieved.

Responses

204

Deleted or revoked an API key resource.

403

application/json

Requestor not allowed to delete or revoke this API key.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Additional properties relating to the error.

      • titlestring
        Required

        Summary of the problem.

      • detailstring

        A human-readable explanation specific to this occurrence of the problem.

      • sourceobject

        References to the source of the error.

        Show source properties
        • pointerstring

          A JSON Pointer to the property that caused the error.

        • parameterstring

          The URI query parameter that caused the error.

      • statusinteger

        The HTTP status code.

404

application/json

API key was not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Additional properties relating to the error.

      • titlestring
        Required

        Summary of the problem.

      • detailstring

        A human-readable explanation specific to this occurrence of the problem.

      • sourceobject

        References to the source of the error.

        Show source properties
        • pointerstring

          A JSON Pointer to the property that caused the error.

        • parameterstring

          The URI query parameter that caused the error.

      • statusinteger

        The HTTP status code.

429

application/json

Request has been rate limited.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Additional properties relating to the error.

      • titlestring
        Required

        Summary of the problem.

      • detailstring

        A human-readable explanation specific to this occurrence of the problem.

      • sourceobject

        References to the source of the error.

        Show source properties
        • pointerstring

          A JSON Pointer to the property that caused the error.

        • parameterstring

          The URI query parameter that caused the error.

      • statusinteger

        The HTTP status code.

DELETE /v1/api-keys/{id}
curl "https://your-tenant.us.qlikcloud.com/api/v1/api-keys/{id}" \
-X DELETE \
-H "Authorization: Bearer <access_token>"
const https = require('https')
  const data = JSON.stringify("")
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/api-keys/{id}',
    'method': 'DELETE',
    'headers': {
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  
qlik api-key rm <api-keyId>

Get API key configuration

Retrieves the API key configuration for a tenant.

Facts

Rate limit Tier 1 (1000 requests per minute)
Categories authenticate

Path Parameters

  • tenantIdstring
    Required

    The tenant ID from which you wish to retrieve the API key configuration.

Responses

200

application/json

API keys configuration.

  • application/jsonobject
    Show application/json properties
    • api_keys_enabledboolean

      Enables or disables user API key functionality for the specified tenant.

    • max_keys_per_usernumber

      The maximum number of active API keys that any user can create for the specified tenant.

    • max_api_key_expirystring

      The maximum lifetime, in ISO8601 duration format, for which an API key can be issued for the specified tenant, e.g. P7D for 7 days.

    • scim_externalClient_expirystring

      The expiry of the scim externalClient token in ISO8601 duration format, e.g. P365D for 365 days. Used during the creation of an externalClient API key for configuring a SCIM compatible Identity Provider.

429

application/json

Request has been rate limited.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Additional properties relating to the error.

      • titlestring
        Required

        Summary of the problem.

      • detailstring

        A human-readable explanation specific to this occurrence of the problem.

      • sourceobject

        References to the source of the error.

        Show source properties
        • pointerstring

          A JSON Pointer to the property that caused the error.

        • parameterstring

          The URI query parameter that caused the error.

      • statusinteger

        The HTTP status code.

default

application/json

Unexpected error.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Additional properties relating to the error.

      • titlestring
        Required

        Summary of the problem.

      • detailstring

        A human-readable explanation specific to this occurrence of the problem.

      • sourceobject

        References to the source of the error.

        Show source properties
        • pointerstring

          A JSON Pointer to the property that caused the error.

        • parameterstring

          The URI query parameter that caused the error.

      • statusinteger

        The HTTP status code.

GET /v1/api-keys/configs/{tenantId}
curl "https://your-tenant.us.qlikcloud.com/api/v1/api-keys/configs/{tenantId}" \
-H "Authorization: Bearer <access_token>"
const https = require('https')
  const data = JSON.stringify("")
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/api-keys/configs/{tenantId}',
    'method': 'GET',
    'headers': {
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  
qlik api-key config get <tenantId>

Response

{
  "api_keys_enabled": false,
  "max_keys_per_user": 5,
  "max_api_key_expiry": "PT24H",
  "scim_externalClient_expiry": "P365D"
}

Update API keys configuration

Updates the API keys configuration for a given tenant ID.

Facts

Rate limit Tier 2 (100 requests per minute)
Categories authenticate

Path Parameters

  • tenantIdstring
    Required

    The tenant ID of the API keys configuration to be retrieved.

Request Body

Required

application/json

Configurations that the user wants to update for API keys.

A JSON Patch document as defined in https://datatracker.ietf.org/doc/html/rfc6902.

  • application/jsonarray of objects

    A JSON Patch document as defined in https://datatracker.ietf.org/doc/html/rfc6902.

    Show application/json properties
    • opstring
      Required

      The operation to be performed.

      Can be one of: "replace"

    • pathstring
      Required

      The path for the given resource field to patch.

      Can be one of: "/api_keys_enabled""/max_api_key_expiry""/max_keys_per_user""/scim_externalClient_expiry"

    • valueany
      Required

      The value to be used for this operation.

Responses

204

API keys configuration updated successfully.

400

application/json

Invalid request was made.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Additional properties relating to the error.

      • titlestring
        Required

        Summary of the problem.

      • detailstring

        A human-readable explanation specific to this occurrence of the problem.

      • sourceobject

        References to the source of the error.

        Show source properties
        • pointerstring

          A JSON Pointer to the property that caused the error.

        • parameterstring

          The URI query parameter that caused the error.

      • statusinteger

        The HTTP status code.

403

application/json

Requestor not allowed to update the API keys configuration.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Additional properties relating to the error.

      • titlestring
        Required

        Summary of the problem.

      • detailstring

        A human-readable explanation specific to this occurrence of the problem.

      • sourceobject

        References to the source of the error.

        Show source properties
        • pointerstring

          A JSON Pointer to the property that caused the error.

        • parameterstring

          The URI query parameter that caused the error.

      • statusinteger

        The HTTP status code.

404

application/json

Failed to update the API keys configuration.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Additional properties relating to the error.

      • titlestring
        Required

        Summary of the problem.

      • detailstring

        A human-readable explanation specific to this occurrence of the problem.

      • sourceobject

        References to the source of the error.

        Show source properties
        • pointerstring

          A JSON Pointer to the property that caused the error.

        • parameterstring

          The URI query parameter that caused the error.

      • statusinteger

        The HTTP status code.

429

application/json

Request has been rate limited.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Additional properties relating to the error.

      • titlestring
        Required

        Summary of the problem.

      • detailstring

        A human-readable explanation specific to this occurrence of the problem.

      • sourceobject

        References to the source of the error.

        Show source properties
        • pointerstring

          A JSON Pointer to the property that caused the error.

        • parameterstring

          The URI query parameter that caused the error.

      • statusinteger

        The HTTP status code.

PATCH /v1/api-keys/configs/{tenantId}
curl "https://your-tenant.us.qlikcloud.com/api/v1/api-keys/configs/{tenantId}" \
-X PATCH \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '[{"op":"replace","path":"/api_keys_enabled","value":true}]'
const https = require('https')
  const data = JSON.stringify([{"op":"replace","path":"/api_keys_enabled","value":true}])
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/api-keys/configs/{tenantId}',
    'method': 'PATCH',
    'headers': {
      'Content-type': 'application/json',
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  req.write(data)
  
qlik api-key config patch <tenantId> \
--body='[{"op":"replace","path":"/api_keys_enabled","value":true}]'

Request

[
  {
    "op": "replace",
    "path": "/api_keys_enabled",
    "value": true
  }
]