Skip to main content
Skip table of contents

API Token

Overview

The External API Token management page allows administrators to issue and manage API tokens for accessing QueryPie functionalities externally, beyond the web console.

What is an External API?

An External API in QueryPie enables the use of its features outside the web console. As of version 10.0, QueryPie offers two API versions: V0.9 and V2.

  • QueryPie API V2

    • Supported starting from QueryPie version 9.16.1.

    • Accessible via {querypie url}/api/external/v2/ without affecting API V0.9.

  • Required headers for API calls include:

Key

Value

Content-Type

application/json

Authorization

{querypie api token}

Key Notes for API Token Usage:

  • API tokens can only be issued by users with Owner privileges or administrators with access to this menu.

  • The full token is only visible at the time of issuance. After that, it is masked, showing only the first 8 characters.

    • If a token is lost, it is recommended to delete the existing token and issue a new one.

  • Extending the API token's validity will reset its expiration date based on the selected validity period from the time of the update.

For a complete list of available APIs and detailed specifications, refer to the API documentation accessible by clicking API Docs in the Administrator > General > System > API Token menu.

Viewing the API Token List

스크린샷 2024-07-23 오전 11.06.19.png

Administrator > General > System > API Token

  1. Navigate to the Administrator > General > System > API Token menu.

  2. Review the list of currently generated tokens, sorted by creation date (latest first).

  3. Search and Filter:

    1. Search tokens by Token Name or Token Value.

    2. Filter the list by the status of the tokens.

Creating an API Token

image-20240520-091811.png

General Settings > System > API Token > Create API Token

  1. Click the Create API Token button located at the top right of the page.

  2. Enter the following information:

    1. API Name: A unique and identifiable name for the API token.

    2. Validity Period Type: Set the expiration period for the token.

      • It is recommended not to select "Never Expire" for security reasons.

    3. Scopes: Define the permissions for the API token.

      1. Full Access: Grants all administrative capabilities.

      2. Select Role: Choose specific Admin Roles to limit the token’s access scope.

        • You can save the token without selecting any Admin Roles. In this case, the API token will not be able to perform any actions.

    4. Allowed Zones: Define the IP ranges where the API token can be used.

      1. Navigate to the Admin > General > Company Management > Allowed Zones and map the predefined Allowed Zones to configure the API call IP ACL.

    5. Description : Provide a description for the API token.

  3. Click OK to complete the creation process.

  4. The token details will be displayed in a modal. This is the only time the full token value will be visible.

    스크린샷 2024-07-23 오후 12.05.33.png

    General Settings > System > API Token > Create API Token

    1. Click the copy button to copy the token information.

    2. Click OK to close the modal.

Editing an API Token

image-20240520-095220.png

General Settings > System > API Token > Edit API Token

  1. In the Token list, click the token you want to edit.

  2. An "Edit API Token" modal will appear, allowing changes to the following:

    1. API Name: Update the name if needed.

    2. Validity Period Type: Change the token’s expiration date.

      1. The new date will overwrite the previous expiration date based on the current setting.

      2. Whether the remaining time until the API token expires is shorter or longer than the newly specified expiration period, the expiration date will be overwritten with the newly set value. This allows you to extend or shorten the API token's lifespan depending on the situation.

      3. If you select "Never Expire," the expiration date will be removed. However, this is not recommended.

    3. Scopes: Modify the permissions that the API token will have.

      1. Full Access: Grants all administrative capabilities.

      2. Select Role: Choose specific Admin Roles to limit the token’s access scope.

        • You can save the token without selecting any Admin Roles. In this case, the API token will not be able to perform any actions.

    4. Allowed Zones: Defines the IP ranges where the API token can be used.

      1. Navigate to the Admin > General > Company Management > Allowed Zones, map the predefined Allowed Zones to configure the API call IP ACL.

    5. Description: Update the description if necessary.

  3. Click OK to save the changes.

Renewing an API Token

  1. From the API Token page, locate the token you wish to renew and click the Update button.

  2. Upon successful renewal, a toast notification will appear, and the token's expiration date will be extended based on the Validity Period Type setting.

Deleting an API Token

스크린샷 2024-07-23 오후 12.12.12.png

Administrator > General > System > API Token > Delete

  1. In the API Token page, select the token(s) you wish to delete by checking the corresponding boxes.

  2. Click the Delete button in the table header.

  3. Confirm deletion in the popup by clicking the OK button.

  4. Verify that the token has been removed from the list.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.