List your sites
GET/api/v1/sites
Needs the audits:read scope. About scopes
Parameters
| Name | In | Type | Description |
|---|---|---|---|
page | query | integer | From 1 |
limit | query | integer | Per page: default 20, at most 100 |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | SiteList |
| 401 | No key, or the key is invalid, expired or revoked (key_required, key_invalid) | Error |
| 403 | The key lacks a scope, or the plan doesn't allow it (missing_scope, plan_no_api, plan_limit) | Error |
| 404 | Not found, or not yours (not_found) | Error |
| 429 | Over the rate limit (rate_limited, rate_limited_daily) | Error |
Examples
curl
curl "https://app.kritano.com/api/v1/sites" \
-H "Authorization: Bearer $KRITANO_API_KEY"
JavaScript
const res = await fetch("https://app.kritano.com/api/v1/sites", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.KRITANO_API_KEY}`,
},
});
const data = await res.json();
Python
import os
import requests
res = requests.get(
"https://app.kritano.com/api/v1/sites",
headers={"Authorization": f"Bearer {os.environ['KRITANO_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
Go
req, _ := http.NewRequest("GET", "https://app.kritano.com/api/v1/sites", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KRITANO_API_KEY"))
res, err := http.DefaultClient.Do(req)