Interface ApiKeysAPI

interface ApiKeysAPI {
    clearCache: () => void;
    createApiKey: (
        body: ApiKeyBody,
        options?: ApiCallOptions,
    ) => Promise<CreateApiKeyHttpResponse>;
    deleteApiKey: (
        id: string,
        options?: ApiCallOptions,
    ) => Promise<DeleteApiKeyHttpResponse>;
    getApiKey: (
        id: string,
        options?: ApiCallOptions,
    ) => Promise<GetApiKeyHttpResponse>;
    getApiKeys: (
        query: {
            createdByUser?: string;
            endingBefore?: string;
            limit?: number;
            sort?:
                | "sub"
                | "status"
                | "createdByUser"
                | "+createdByUser"
                | "-createdByUser"
                | "+sub"
                | "-sub"
                | "+status"
                | "-status"
                | "description"
                | "+description"
                | "-description"
                | "created"
                | "+created"
                | "-created";
            startingAfter?: string;
            status?: "active"
            | "expired"
            | "revoked";
            sub?: string;
        },
        options?: ApiCallOptions,
    ) => Promise<GetApiKeysHttpResponse>;
    getApiKeysConfig: (
        tenantId: string,
        options?: ApiCallOptions,
    ) => Promise<GetApiKeysConfigHttpResponse>;
    patchApiKey: (
        id: string,
        body: ApiKeysPatchSchema,
        options?: ApiCallOptions,
    ) => Promise<PatchApiKeyHttpResponse>;
    patchApiKeysConfig: (
        tenantId: string,
        body: ApiKeysConfigPatchSchema,
        options?: ApiCallOptions,
    ) => Promise<PatchApiKeysConfigHttpResponse>;
}
Index

Properties

clearCache: () => void

Clears the cache for api-keys api requests.

Type declaration

    • (): void
    • Clears the cache for api-keys api requests.

      Returns void

createApiKey: (
    body: ApiKeyBody,
    options?: ApiCallOptions,
) => Promise<CreateApiKeyHttpResponse>

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.

Type declaration

an object with the body content

CreateApiKeyHttpError

deleteApiKey: (
    id: string,
    options?: ApiCallOptions,
) => Promise<DeleteApiKeyHttpResponse>

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.

Type declaration

    • (id: string, options?: ApiCallOptions): Promise<DeleteApiKeyHttpResponse>
    • 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.

      Parameters

      • id: string

        The ID of the API key to be retrieved.

      • Optionaloptions: ApiCallOptions

      Returns Promise<DeleteApiKeyHttpResponse>

      DeleteApiKeyHttpError

The ID of the API key to be retrieved.

DeleteApiKeyHttpError

getApiKey: (
    id: string,
    options?: ApiCallOptions,
) => Promise<GetApiKeyHttpResponse>

Returns the API key for a given API key ID.

Type declaration

The ID of the API key to be retrieved.

GetApiKeyHttpError

getApiKeys: (
    query: {
        createdByUser?: string;
        endingBefore?: string;
        limit?: number;
        sort?:
            | "sub"
            | "status"
            | "createdByUser"
            | "+createdByUser"
            | "-createdByUser"
            | "+sub"
            | "-sub"
            | "+status"
            | "-status"
            | "description"
            | "+description"
            | "-description"
            | "created"
            | "+created"
            | "-created";
        startingAfter?: string;
        status?: "active"
        | "expired"
        | "revoked";
        sub?: string;
    },
    options?: ApiCallOptions,
) => Promise<GetApiKeysHttpResponse>

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

Type declaration

    • (
          query: {
              createdByUser?: string;
              endingBefore?: string;
              limit?: number;
              sort?:
                  | "sub"
                  | "status"
                  | "createdByUser"
                  | "+createdByUser"
                  | "-createdByUser"
                  | "+sub"
                  | "-sub"
                  | "+status"
                  | "-status"
                  | "description"
                  | "+description"
                  | "-description"
                  | "created"
                  | "+created"
                  | "-created";
              startingAfter?: string;
              status?: "active"
              | "expired"
              | "revoked";
              sub?: string;
          },
          options?: ApiCallOptions,
      ): Promise<GetApiKeysHttpResponse>
    • Lists API keys for the tenant. To list API keys owned by other users, requesting user must be assigned the TenantAdmin role.

      Parameters

      • query: {
            createdByUser?: string;
            endingBefore?: string;
            limit?: number;
            sort?:
                | "sub"
                | "status"
                | "createdByUser"
                | "+createdByUser"
                | "-createdByUser"
                | "+sub"
                | "-sub"
                | "+status"
                | "-status"
                | "description"
                | "+description"
                | "-description"
                | "created"
                | "+created"
                | "-created";
            startingAfter?: string;
            status?: "active"
            | "expired"
            | "revoked";
            sub?: string;
        }

        an object with query parameters

        • OptionalcreatedByUser?: string

          The user ID that created the API key.

        • OptionalendingBefore?: string

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

        • Optionallimit?: number

          Maximum number of API keys to retrieve.

        • Optionalsort?:
              | "sub"
              | "status"
              | "createdByUser"
              | "+createdByUser"
              | "-createdByUser"
              | "+sub"
              | "-sub"
              | "+status"
              | "-status"
              | "description"
              | "+description"
              | "-description"
              | "created"
              | "+created"
              | "-created"

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

        • OptionalstartingAfter?: string

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

        • Optionalstatus?: "active" | "expired" | "revoked"

          The status of the API key.

        • Optionalsub?: string

          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.

      • Optionaloptions: ApiCallOptions

      Returns Promise<GetApiKeysHttpResponse>

      GetApiKeysHttpError

an object with query parameters

GetApiKeysHttpError

getApiKeysConfig: (
    tenantId: string,
    options?: ApiCallOptions,
) => Promise<GetApiKeysConfigHttpResponse>

Retrieves the API key configuration for a tenant.

Type declaration

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

GetApiKeysConfigHttpError

patchApiKey: (
    id: string,
    body: ApiKeysPatchSchema,
    options?: ApiCallOptions,
) => Promise<PatchApiKeyHttpResponse>

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

Type declaration

The ID of the API key resource to be updated.

an object with the body content

PatchApiKeyHttpError

patchApiKeysConfig: (
    tenantId: string,
    body: ApiKeysConfigPatchSchema,
    options?: ApiCallOptions,
) => Promise<PatchApiKeysConfigHttpResponse>

Updates the API keys configuration for a given tenant ID.

Type declaration

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

an object with the body content

PatchApiKeysConfigHttpError