Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions apl/data-types/map-fields.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ description: 'This page explains what map fields are and how to query them.'
keywords: ['axiom documentation', 'documentation', 'axiom', 'map fields', 'object fields', 'data types']
---

import ReplaceDomain from "/snippets/replace-domain.mdx"
import ReplaceDatasetToken from "/snippets/replace-dataset-token.mdx"

Map fields are a special type of field that can hold a collection of nested key-value pairs within a single field. You can think of the content of a map field as a JSON object.
Expand Down Expand Up @@ -56,7 +55,7 @@ To create a map field using the Axiom API, send a request to the [Create map fie

```bash
curl --request POST \
--url https://AXIOM_DOMAIN/v2/datasets/{DATASET_NAME}/mapfields \
--url https://api.axiom.co/v2/datasets/DATASET_NAME/mapfields \
--header 'Authorization: Bearer API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
Expand All @@ -65,7 +64,6 @@ curl --request POST \
```

<Info>
<ReplaceDomain />
<ReplaceDatasetToken />
Replace `MAP_FIELD` with the name of the field that you want to change to a map field.
</Info>
Expand Down
7 changes: 2 additions & 5 deletions console/intelligence/mcp-server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ sidebarTitle: MCP Server
---

import Prerequisites from "/snippets/minimal-prerequisites.mdx"
import ReplaceDomain from "/snippets/replace-domain.mdx"
import ReplaceToken from "/snippets/replace-token.mdx"
import PrerequisiteToken from "/snippets/prerequisite-token.mdx"

Expand Down Expand Up @@ -195,7 +194,7 @@ Configure your AI agent to use the MCP Server in one of the following ways:

```bash config.txt
token API_TOKEN
url https://AXIOM_DOMAIN
url https://api.axiom.co
query-rate 1
query-burst 1
datasets-rate 1
Expand All @@ -206,8 +205,6 @@ Configure your AI agent to use the MCP Server in one of the following ways:

<Info>
<ReplaceToken />

<ReplaceDomain />
</Info>

Optionally, configure the rate and the burst limits at the query, dataset, and monitor levels. The rate limit is the maximum number of requests that your AI agent can make per second. The burst limit is the maximum number of requests that your AI agent can make in a short period (burst) before the rate limit applies to further requests.
Expand Down Expand Up @@ -249,7 +246,7 @@ For example, if you use the Claude desktop app, add `axiom` to the `mcpServers`
"command": "PATH_AXIOM_MCP_BINARY",
"env": {
"AXIOM_TOKEN": "API_TOKEN",
"AXIOM_URL": "https://AXIOM_DOMAIN",
"AXIOM_URL": "https://api.axiom.co",
"AXIOM_QUERY_RATE": "1",
"AXIOM_QUERY_BURST": "1",
"AXIOM_DATASETS_RATE": "1",
Expand Down
21 changes: 7 additions & 14 deletions query-data/annotate-charts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ keywords: ['axiom documentation', 'documentation', 'axiom', 'annotation', 'span'
import Prerequisites from "/snippets/minimal-prerequisites.mdx"
import ReplaceDatasetToken from "/snippets/replace-dataset-token.mdx"
import ReplaceToken from "/snippets/replace-token.mdx"
import ReplaceDomain from "/snippets/replace-domain.mdx"

Annotating charts lets you add context to your charts. For example, use annotations to mark the time of the following:

Expand Down Expand Up @@ -67,7 +66,7 @@ This creates an annotation in Axiom each time you deploy in GitHub.
To create an annotation using the Axiom API, use the following API request:

```bash
curl -X 'POST' 'https://AXIOM_DOMAIN/v2/annotations' \
curl -X 'POST' 'https://api.axiom.co/v2/annotations' \
-H 'Authorization: Bearer API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
Expand All @@ -81,7 +80,6 @@ curl -X 'POST' 'https://AXIOM_DOMAIN/v2/annotations' \
```

<Info>
<ReplaceDomain />
<ReplaceDatasetToken />
</Info>

Expand All @@ -108,12 +106,11 @@ The API response from Axiom contains an `id` field. This is the annotation ID th
To get information about all datasets in your org, use the following API request:

```bash
curl -X 'GET' 'https://AXIOM_DOMAIN/v2/annotations' \
curl -X 'GET' 'https://api.axiom.co/v2/annotations' \
-H 'Authorization: Bearer API_TOKEN'
```

<Info>
<ReplaceDomain />
<ReplaceToken />
</Info>

Expand All @@ -125,7 +122,7 @@ Use the following parameters in the endpoint URL to filter for a specific time i
The example below gets information about annotations about occurrences between March 16th and 19th, 2024 and added to the dataset `my-dataset`:

```bash
curl -X 'GET' 'https://AXIOM_DOMAIN/v2/annotations?start=2024-03-16T00:00:00.000Z&end=2024-03-19T23:59:59.999Z&datasets=my-dataset' \
curl -X 'GET' 'https://api.axiom.co/v2/annotations?start=2024-03-16T00:00:00.000Z&end=2024-03-19T23:59:59.999Z&datasets=my-dataset' \
-H 'Authorization: Bearer API_TOKEN'
```

Expand Down Expand Up @@ -159,12 +156,11 @@ The API response from Axiom contains an `id` field. This is the annotation ID th
To get information about a specific annotation, use the following API request:

```bash
curl -X 'GET' 'https://AXIOM_DOMAIN/v2/annotations/ANNOTATION_ID' \
curl -X 'GET' 'https://api.axiom.co/v2/annotations/ANNOTATION_ID' \
-H 'Authorization: Bearer API_TOKEN'
```

<Info>
<ReplaceDomain />
Replace `ANNOTATION_ID` with the ID of the annotation.
<ReplaceToken />
</Info>
Expand All @@ -190,7 +186,7 @@ For more information on these fields, see [Annotation object](#annotation-object
To change an existing annotation, use the following API request:

```bash
curl -X 'PUT' 'https://AXIOM_DOMAIN/v2/annotations/ANNOTATION_ID' \
curl -X 'PUT' 'https://api.axiom.co/v2/annotations/ANNOTATION_ID' \
-H 'Authorization: Bearer API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
Expand All @@ -199,7 +195,6 @@ curl -X 'PUT' 'https://AXIOM_DOMAIN/v2/annotations/ANNOTATION_ID' \
```

<Info>
<ReplaceDomain />
Replace `ANNOTATION_ID` with the ID of the annotation. For more information about how to determine the annotation ID, see [Get information about annotations](#get-information-about-annotations).
<ReplaceToken />
In the payload, specify the properties of the annotation that you want to change. The example above adds an `endTime` field to the annotation created above. For more information on the allowed fields, see [Annotation object](#annotation-object).
Expand All @@ -225,12 +220,11 @@ In the payload, specify the properties of the annotation that you want to change
To delete an existing annotation, use the following API request:

```bash
curl -X 'DELETE' 'https://AXIOM_DOMAIN/v2/annotations/ANNOTATION_ID' \
curl -X 'DELETE' 'https://api.axiom.co/v2/annotations/ANNOTATION_ID' \
-H 'Authorization: Bearer API_TOKEN' \
```

<Info>
<ReplaceDomain />
Replace `ANNOTATION_ID` with the ID of the annotation. For more information about how to determine the annotation ID, see [Get information about annotations](#get-information-about-annotations).
<ReplaceToken />
</Info>
Expand Down Expand Up @@ -265,7 +259,7 @@ The example below demonstrates how annotations help you troubleshoot issues in y
Use the following API request to create an annotation:

```bash
curl -X 'POST' 'https://AXIOM_DOMAIN/v2/annotations' \
curl -X 'POST' 'https://api.axiom.co/v2/annotations' \
-H 'Authorization: Bearer API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
Expand All @@ -279,7 +273,6 @@ curl -X 'POST' 'https://AXIOM_DOMAIN/v2/annotations' \
```

<Info>
<ReplaceDomain />
<ReplaceToken />
</Info>

Expand Down
4 changes: 1 addition & 3 deletions restapi/delete-blocks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ sidebarTitle: 'Delete blocks'
noindex: "true"
---

import ReplaceDomain from "/snippets/replace-domain.mdx"
import ReplaceDatasetToken from "/snippets/replace-dataset-token.mdx"

After data ingestion, Axiom stores events in blocks of tens of thousands of events. Currently, you can’t delete individual events after you send them to Axiom, but you can delete entire blocks of data. With the `/v2/datasets/_apl/delete` endpoint, you can specify an APL query and delete all blocks that contain matching events.
Expand Down Expand Up @@ -50,7 +49,7 @@ When you make a successful request with `commit` set to `true`, blocks containin
## Example request

```bash
curl -X 'POST' 'https://AXIOM_DOMAIN/v2/datasets/_apl/delete' \
curl -X 'POST' 'https://api.axiom.co/v2/datasets/_apl/delete' \
-H 'Authorization: Bearer API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
Expand All @@ -62,7 +61,6 @@ curl -X 'POST' 'https://AXIOM_DOMAIN/v2/datasets/_apl/delete' \
```

<Info>
<ReplaceDomain />
<ReplaceDatasetToken />
</Info>

Expand Down
25 changes: 8 additions & 17 deletions restapi/pagination.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ sidebarTitle: Pagination
keywords: ['axiom documentation', 'documentation', 'axiom', 'axiom api', 'rest api', 'rest', 'pagination', 'cursor', 'query']
---

import ReplaceDomain from "/snippets/replace-domain.mdx"
import ReplaceDatasetToken from "/snippets/replace-dataset-token.mdx"
import Prerequisites from "/snippets/standard-prerequisites.mdx"

Expand Down Expand Up @@ -79,7 +78,7 @@ Both the Run Query and the Run Query (Legacy) endpoints allow request-based limi
#### Example request Run Query

```bash
curl -X 'POST' 'https://AXIOM_DOMAIN/v1/datasets/_apl?format=tabular' \
curl -X 'POST' 'https://api.axiom.co/v1/datasets/_apl?format=tabular' \
-H 'Authorization: Bearer API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
Expand All @@ -90,14 +89,13 @@ curl -X 'POST' 'https://AXIOM_DOMAIN/v1/datasets/_apl?format=tabular' \
```

<Info>
<ReplaceDomain />
<ReplaceDatasetToken />
</Info>

#### Example request Run Query (Legacy)

```bash
curl -X 'POST' 'https://AXIOM_DOMAIN/v1/datasets/DATASET_NAME/query' \
curl -X 'POST' 'https://api.axiom.co/v1/datasets/DATASET_NAME/query' \
-H 'Authorization: Bearer API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
Expand All @@ -109,7 +107,6 @@ curl -X 'POST' 'https://AXIOM_DOMAIN/v1/datasets/DATASET_NAME/query' \
```

<Info>
<ReplaceDomain />
<ReplaceDatasetToken />
</Info>

Expand All @@ -118,7 +115,7 @@ curl -X 'POST' 'https://AXIOM_DOMAIN/v1/datasets/DATASET_NAME/query' \
Example request to go to next page for Run Query:

```bash
curl -X 'POST' 'https://AXIOM_DOMAIN/v1/datasets/_apl?format=tabular' \
curl -X 'POST' 'https://api.axiom.co/v1/datasets/_apl?format=tabular' \
-H 'Authorization: Bearer API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
Expand All @@ -129,14 +126,13 @@ curl -X 'POST' 'https://AXIOM_DOMAIN/v1/datasets/_apl?format=tabular' \
```

<Info>
<ReplaceDomain />
<ReplaceDatasetToken />
</Info>

Example request to go to next page for Run Query (Legacy):

```bash
curl -X 'POST' 'https://AXIOM_DOMAIN/v1/datasets/DATASET_NAME/query' \
curl -X 'POST' 'https://api.axiom.co/v1/datasets/DATASET_NAME/query' \
-H 'Authorization: Bearer API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
Expand All @@ -148,7 +144,6 @@ curl -X 'POST' 'https://AXIOM_DOMAIN/v1/datasets/DATASET_NAME/query' \
```

<Info>
<ReplaceDomain />
<ReplaceDatasetToken />
</Info>

Expand Down Expand Up @@ -215,7 +210,7 @@ If the query returns fewer results than the specified limit, paging can stop.
#### Example request Run Query

```bash
curl -X 'POST' 'https://AXIOM_DOMAIN/v1/datasets/_apl?format=tabular' \
curl -X 'POST' 'https://api.axiom.co/v1/datasets/_apl?format=tabular' \
-H 'Authorization: Bearer API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
Expand All @@ -226,14 +221,13 @@ curl -X 'POST' 'https://AXIOM_DOMAIN/v1/datasets/_apl?format=tabular' \
```

<Info>
<ReplaceDomain />
<ReplaceDatasetToken />
</Info>

#### Example request Run Query (Legacy)

```bash
curl -X 'POST' 'https://AXIOM_DOMAIN/v1/datasets/DATASET_NAME/query' \
curl -X 'POST' 'https://api.axiom.co/v1/datasets/DATASET_NAME/query' \
-H 'Authorization: Bearer API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
Expand All @@ -245,7 +239,6 @@ curl -X 'POST' 'https://AXIOM_DOMAIN/v1/datasets/DATASET_NAME/query' \
```

<Info>
<ReplaceDomain />
<ReplaceDatasetToken />
</Info>

Expand All @@ -271,7 +264,7 @@ To page through the result set, use the appropriate cursor value in your next re
Example request to go to next page for Run Query:

```bash
curl -X 'POST' 'https://AXIOM_DOMAIN/v1/datasets/_apl?format=tabular' \
curl -X 'POST' 'https://api.axiom.co/v1/datasets/_apl?format=tabular' \
-H 'Authorization: Bearer API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
Expand All @@ -283,14 +276,13 @@ curl -X 'POST' 'https://AXIOM_DOMAIN/v1/datasets/_apl?format=tabular' \
```

<Info>
<ReplaceDomain />
<ReplaceDatasetToken />
</Info>

Example request to go to next page for Run Query (Legacy):

```bash
curl -X 'POST' 'https://AXIOM_DOMAIN/v1/datasets/DATASET_NAME/query' \
curl -X 'POST' 'https://api.axiom.co/v1/datasets/DATASET_NAME/query' \
-H 'Authorization: Bearer API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
Expand All @@ -303,6 +295,5 @@ curl -X 'POST' 'https://AXIOM_DOMAIN/v1/datasets/DATASET_NAME/query' \
```

<Info>
<ReplaceDomain />
<ReplaceDatasetToken />
</Info>