Next we address the two main authentication settings to successfully send metrics to Statful: the Access Token and the Domain.
Statful defines an Access Token as the primary credential needed to grant the user with access to its API, and send in metrics.
To send metrics to Statful from your own applications or other sources (e.g., our collectors), you will need to set authentication details that allow Statful to recognize that these should be allocated to your account. You can find examples of typical configurations at the Clients’ documentation (e.g., here).
When sending data manually, you must send the Access Token with each request as an HTTP Header M-Api-Token.
Any given account may have several active Access Tokens, which you can use to manage which applications are able to send metrics to Statful.
To generate the Access Token, you need to go to Settings -> Api Tokens and click on the New Token button, which you can find on your right-hand side. It will open a pop-up window that asks for a description to associate to that token. Choose any that works for you.
A new Access Token is shown on the previously empty list, with the following fields:
- Description: Short descriptive text, typically used to identify your application.
- Token: Unique, auto-generated Access Token.
- Created: Date of creation of the appointed token.
- Last Modified: Date of last modification made to that token.
- Last Used: Registers date of using that token.
To delete an Access Token, hover the mouse over the token that you want to delete and click on the trash icon at that row. Then, confirm the Delete action.
Another way to identify your account and ensure your metrics are under it is by adding the Domain of your web app to Statful. You can give access to any number of pertinent and trusted websites.
To register your domain, go to Settings -> Domains and click on the New Domain button, which you can find on the right-hand side.
A pop-window will show up to validate your input. The ruling is usually (but not limited to):
- Characters should be a-z | A-Z | 0-9, period (.) and dash (-);
- The domain name should not start or end with dash (-) or period (.) (e.g. -domain-.com);
- The domain name should be between 1 to 63 characters long.
To delete a Domain, hover the mouse over the entry that you want to delete and click on the trash icon at that row. Then, confirm the Delete action.