Note: This page will explain to you how to generate an API Token and how you can use it to authenticate against our API. To get more information about our API, please visit the Developers Genesis Cloud page.


Why use API Token?


API tokens are unique identifiers associated with your Genesis Cloud account and consist of an ID and a Secret Token. The Secret Token is required to authenticate against our API and will only be displayed when you create the token.


Important: For security reasons, the secret token is only shown once. Please copy it and store it securely.


Before using our API, you need to generate a Security Token and ID pair. Consider the token as a combination of user credentials and a password. The ID is a unique identifier as user-given token names or descriptions might be changed. 


The ID:

  • An ID can uniquely identify a token

  • It’s not a sensitive piece of information.

  • It allows you to identify a specific token if you need to revoke it.


The Token:

  • The Secret Token is the value that can be used to authenticate against the API (the value used in X-Auth-Token HTTP-header).

  • The Secret Token must stay secret and not be given to anyone or published online.


Note: The API Token has the same power as your username and password. If someone else sees your Token, they can gain full access to your resources. Treat the Token like your password. Immediately revoke a token if someone else might have seen it.


Important: Resources created via the API are subject to the same pricing and costs as a resource created via the web dashboard. You can always find all your billed resources in the Billing Dashboard.



How to generate an API Token?


1. Login to your console dashboard and click on 'Key and Tokens' from left-hand side menu under 'Account' section.

2. To generate a new token, click on 'Generate new API Token' in the 'API Tokens' section of the page. 


Important: Only the ID and Description will show on your screen. Take note of the Secret Token, as it will not be shown again.


How to generate new API Token

How to generate new API Token


How to use the API Token?


Execute a command through our API (e.g. List your images/snapshots) with your API Token:

{
    "images": [
        {
            "id": "ac26fa2b-c6d5-47a7-bc4e-5a219797e70f",
            "name": "Ubuntu 20.04",
            "type": "base-os",
            "created_at": "2022-01-21T10:36:00.000Z"
        },
        {
            "id": "45d06539-f8f5-48d9-816e-d4b1a8e5163e",
            "name": "Ubuntu 18.04",
            "type": "base-os",
            "created_at": "2022-01-21T10:36:00.000Z"
        },
        {
            "id": "6d5c3613-f6cb-48e1-8711-14f084060209",
            "name": "Ubuntu 16.04",
            "type": "base-os",
            "created_at": "2020-10-23T05:13:00.000Z"
        }
    ],
    "total_count": 3,
    "page": 1,
    "per_page": 50
}



How to delete the API Token?


1. To delete an API Token, click on the 'Three Dots' icon on the right-side of that API token.

2. Click on the 'Delete' button to confirm your action.


How to delete the API Token

How to delete the API Token