> For the complete documentation index, see [llms.txt](https://docs.raalabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.raalabs.io/getting-started/quickstart.md).

# Quick Start

Fetch a `Bearer` token by calling the token endpoint. In this example we assign the token to a variable for reuse within the shell session:

{% tabs %}
{% tab title="cURL" %}
{% code lineNumbers="true" %}

```bash
TOKEN=$(curl "https://auth.raalabs.io/oauth2/token" \
  -X POST \
  -u YOUR_CLIENT_ID:YOUR_CLIENT_SECRET \
  -d "grant_type=client_credentials" | jq -r '.access_token')
```

{% endcode %}
{% endtab %}

{% tab title="Python" %}
{% code lineNumbers="true" %}

```python
import requests

url = "https://auth.raalabs.io/oauth2/token"
response = requests.post(
    url,
    auth=("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET"),
    data={"grant_type": "client_credentials"},
)
TOKEN = response.json()["access_token"]
```

{% endcode %}
{% endtab %}
{% endtabs %}

Now you can start to make requests to the metadata, measurements and statistics endpoints. For ease of use, you can also store your tenant name as a variable.

{% tabs %}
{% tab title="cURL" %}
{% code lineNumbers="true" %}

```bash
ENVIRONMENT=$YOUR_ENVIRONMENT
curl "https://portal.raalabs.io/$ENVIRONMENT/measurements/raalabs/*?last=10minutes" \
  -H "Authorization: Bearer $TOKEN" \
  -H "x-api-version: 2025-10-31"
```

{% endcode %}
{% endtab %}

{% tab title="Python" %}
{% code lineNumbers="true" %}

```python
import requests

ENVIRONMENT = "YOUR_ENVIRONMENT"
url = f"https://portal.raalabs.io/{ENVIRONMENT}/measurements/raalabs/*?last=10minutes"
headers = {
    "Authorization": f"Bearer {TOKEN}",
    "x-api-version": "2025-10-31",
}

response = requests.get(url, headers=headers)
```

{% endcode %}
{% endtab %}
{% endtabs %}
