Authentication
Authenticate to the WASViking REST API with an organization API key sent in the ApiKey scheme.
Every call to the WASViking REST API is authenticated with an API key of your organization. The key decides which organization the data comes from and, through its scopes, what the call may do.
Base address
All endpoints live under:
https://api.wasviking.com/api/v1/public/
The API speaks JSON over HTTPS. Read endpoints answer GET; the few that
start something answer POST.
Create a key
In the portal, open Settings, tab API Keys, and choose Create key. Give it a label that says where it will be used, tick the scopes it needs (see Scopes) and save. The key is shown once, in full: copy it to your secret store right away. WASViking keeps only a hash of it and cannot show it again.
A key that is created without any scope ticked receives the default set:
every scope except ai_guardian:data_admin. Tick only what the
integration needs.
Creating a key needs the API tokens create permission; revoking or editing one needs the revoke permission.
Send the key
Send the key in the Authorization header with the ApiKey scheme:
curl -sS https://api.wasviking.com/api/v1/public/infrastructure/hosts/ \
-H "Authorization: ApiKey ${WASVIKING_API_KEY}" \
-H "Accept: application/json"
Any other scheme, such as Bearer, is not an API key and the call is
refused with 401.
Manage keys
On the same tab you can change the label and the scopes of a key, and revoke it. A revoked key stops working at once. The list shows when each key was last used, so a key nobody uses is easy to spot and revoke.
Errors
| Status | Meaning |
|---|---|
400 |
A query parameter is not valid. The body says which one. |
401 |
The key is missing, unknown, revoked or expired. |
403 |
The key is valid but lacks the scope the endpoint needs. |
404 |
The resource does not exist in the organization of the key. |
405 |
The endpoint does not accept that HTTP method. |
429 |
Too many requests. See Rate limits. |
5xx |
A server error. Retry later. |
Error bodies are JSON with a detail field, for example:
{"detail": "Invalid or revoked API key."}
Languages
The API is plain HTTPS and JSON, so any language with an HTTP client can use it. Endpoints shows the same call in Python, PowerShell, Ruby, JavaScript and Java. There is no SDK to install.
