updated api-endpoint shortcodes with api-refs and new styles (#4834)
parent
869a6efbaf
commit
8adade5927
|
|
@ -113,6 +113,7 @@
|
|||
pre {
|
||||
display: block;
|
||||
line-height: 1.75rem;
|
||||
font-family: $code;
|
||||
|
||||
@import "article/code-api-methods";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
padding: .15rem .5rem .25rem;
|
||||
border-radius: $radius;
|
||||
color: $g20-white;
|
||||
font-family: $code;
|
||||
font-weight: bold;
|
||||
font-size: 1rem;
|
||||
|
||||
|
|
@ -11,4 +12,32 @@
|
|||
&.patch { background: $y-topaz; }
|
||||
&.delete { background: $r-ruby; }
|
||||
&.put {background: $br-pulsar; }
|
||||
}
|
||||
|
||||
&.api-endpoint {
|
||||
a {
|
||||
position: relative;
|
||||
color: $article-code-link;
|
||||
text-decoration: none;
|
||||
|
||||
&:after {
|
||||
content: "\e90d";
|
||||
position: absolute;
|
||||
right: -1.45rem;
|
||||
top: 0.65rem;
|
||||
font-family: "icomoon-v4";
|
||||
color: $article-code-link-hover;
|
||||
display: inline-block;
|
||||
font-size: 1.1rem;
|
||||
line-height: 0;
|
||||
opacity: 0;
|
||||
transition: opacity .2s;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: $article-code-link-hover;
|
||||
&:after {opacity: .6;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -71,6 +71,7 @@ pre {
|
|||
white-space: pre;
|
||||
}
|
||||
|
||||
// These API method styles are imported because they are used in other places.
|
||||
@import "code-api-methods";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ and set the following properties in the request body:
|
|||
|
||||
For example, the following request defines the _explicit_ bucket measurement schema for `airSensors` measurements:
|
||||
|
||||
{{< api-endpoint method="post" endpoint="https://cloud2.influxdata.com/api/v2/buckets/{BUCKET_ID}/schema/measurements" >}}
|
||||
{{< api-endpoint method="post" endpoint="https://cloud2.influxdata.com/api/v2/buckets/{BUCKET_ID}/schema/measurements" api-ref="/influxdb/cloud-iox/api/#operation/createMeasurementSchema" >}}
|
||||
|
||||
```js
|
||||
{
|
||||
|
|
@ -209,7 +209,7 @@ To view schema column definitions and metadata, specify the `--json` flag.
|
|||
|
||||
To list schemas for a bucket, send a request to the InfluxDB HTTP [`/api/v2/buckets/{BUCKET_ID}/schema/measurements` endpoint](/influxdb/cloud-iox/api/#operation/getMeasurementSchemas):
|
||||
|
||||
{{% api-endpoint method="get" endpoint="https://cloud2.influxdata.com/api/v2/buckets/{BUCKET_ID}/schema/measurements" %}}
|
||||
{{% api-endpoint method="get" endpoint="https://cloud2.influxdata.com/api/v2/buckets/{BUCKET_ID}/schema/measurements" api-ref="/influxdb/cloud-iox/api/#operation/getMeasurementSchemas" %}}
|
||||
|
||||
## Update a bucket schema
|
||||
|
||||
|
|
@ -252,7 +252,7 @@ You can't modify or delete columns in bucket schemas.
|
|||
|
||||
In the request body, set the `columns` property to a list of old and new column definitions for the measurement schema--for example, the following request appends the new column `CO2` to `columns` retrieved in the previous step:
|
||||
|
||||
{{< api-endpoint method="patch" endpoint="https://cloud2.influxdata.com/api/v2/buckets/{BUCKET_ID}/schema/measurements/{MEASUREMENT_ID}" >}}
|
||||
{{< api-endpoint method="patch" endpoint="https://cloud2.influxdata.com/api/v2/buckets/{BUCKET_ID}/schema/measurements/{MEASUREMENT_ID}" api-ref="/influxdb/cloud-iox/api/#operation/updateMeasurementSchema" >}}
|
||||
|
||||
```js
|
||||
{
|
||||
|
|
|
|||
|
|
@ -113,14 +113,14 @@ You can update the following bucket properties:
|
|||
|
||||
1. To find the bucket ID, send a request to the HTTP API [`GET /api/v2/buckets/` endpoint](/influxdb/cloud-iox/api/#operation/GetBuckets) to retrieve the list of buckets. <!-- @TODO: provide API auth note about tokens and read access to buckets -->
|
||||
|
||||
{{< api-endpoint method="get" endpoint="https://cloud2.influxdata.com/api/v2/buckets" >}}
|
||||
{{< api-endpoint method="get" endpoint="https://cloud2.influxdata.com/api/v2/buckets" api-ref="/influxdb/cloud-iox/api/#operation/GetBuckets" >}}
|
||||
|
||||
2. Send a request to the HTTP API [PATCH `/api/v2/buckets/{BUCKET_ID}` endpoint](/influxdb/cloud-iox/api/#operation/PatchBucketsID).
|
||||
|
||||
In the URL path, specify the ID of the bucket from the previous step that you want to update.
|
||||
In the request body, set the properties that you want to update--for example:
|
||||
|
||||
{{< api-endpoint method="patch" endpoint="https://cloud2.influxdata.com/api/v2/buckets/{BUCKET_ID}" >}}
|
||||
{{< api-endpoint method="patch" endpoint="https://cloud2.influxdata.com/api/v2/buckets/{BUCKET_ID}" api-ref="/influxdb/cloud-iox/api/#operation/PatchBucketsID" >}}
|
||||
|
||||
```js
|
||||
{
|
||||
|
|
|
|||
|
|
@ -39,6 +39,6 @@ for information about other available flags.
|
|||
|
||||
Send a request to the InfluxDB HTTP API [`/api/v2/buckets` endpoint](/influxdb/cloud-iox/api/#operation/GetBuckets) to view buckets in an organization.
|
||||
|
||||
{{% api-endpoint method="get" endpoint="https://cloud2.influxdata.com/api/v2/buckets" %}}
|
||||
{{% api-endpoint method="get" endpoint="https://cloud2.influxdata.com/api/v2/buckets" api-ref="/influxdb/cloud-iox/api/#operation/GetBuckets" %}}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -282,7 +282,7 @@ To query data from InfluxDB using SQL and the InfluxDB HTTP API, send a request
|
|||
to the InfluxDB API [`/api/v2/query` endpoint](/influxdb/cloud-iox/api/#operation/PostQuery)
|
||||
using the `POST` request method.
|
||||
|
||||
{{< api-endpoint endpoint="http://localhost:8086/api/v2/query" method="post" >}}
|
||||
{{< api-endpoint endpoint="http://localhost:8086/api/v2/query" method="post" api-ref="/influxdb/cloud-iox/api/#operation/PostQuery" >}}
|
||||
|
||||
The `/api/v2/query` endpoint only accepts Flux queries.
|
||||
To query data with SQL, wrap your SQL query in Flux and use [`iox.sql()`](/flux/v0.x/stdlib/experimental/iox/)
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ export INFLUX_TOKEN=<YOUR_INFLUXDB_API_TOKEN>
|
|||
To create a bucket using the InfluxDB HTTP API, send a request to
|
||||
the InfluxDB API `/api/v2/buckets` endpoint using the `POST` request method.
|
||||
|
||||
{{< api-endpoint endpoint="https://cloud2.influxdata.com/api/v2/buckets" method="post" >}}
|
||||
{{< api-endpoint endpoint="https://cloud2.influxdata.com/api/v2/buckets" method="post" api-ref="/influxdb/cloud-iox/api/#operation/PostBuckets" >}}
|
||||
|
||||
Include the following with your request:
|
||||
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200
|
|||
To write data to InfluxDB using the InfluxDB HTTP API, send a request to
|
||||
the InfluxDB API `/api/v2/write` endpoint using the `POST` request method.
|
||||
|
||||
{{< api-endpoint endpoint="http://localhost:8086/api/v2/write" method="post" >}}
|
||||
{{< api-endpoint endpoint="http://localhost:8086/api/v2/write" method="post" api-ref="/influxdb/cloud-iox/api/#operation/PostWrite" >}}
|
||||
|
||||
Include the following with your request:
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ for your [organization](/influxdb/v2.0/reference/glossary/#organization),
|
|||
send a request using the `POST` method to the `/api/v2/scripts` InfluxDB API endpoint.
|
||||
|
||||
|
||||
[{{< api-endpoint method="post" endpoint="https://cloud2.influxdata.com/api/v2/scripts" >}}](/influxdb/cloud/api/#operation/PostScripts)
|
||||
{{< api-endpoint method="post" endpoint="https://cloud2.influxdata.com/api/v2/scripts" api-ref="/influxdb/cloud/api/#operation/PostScripts" >}}
|
||||
|
||||
Provide the following in your API request:
|
||||
|
||||
|
|
@ -88,7 +88,7 @@ InfluxDB returns the newly created script. Next, see how to [invoke a script](#i
|
|||
## Invoke a script
|
||||
To invoke a script, send a request using the `POST` method to the `/api/v2/scripts/SCRIPT_ID/invoke` InfluxDB API endpoint.
|
||||
|
||||
[{{< api-endpoint method="post" endpoint="https://cloud2.influxdata.com/api/v2/scripts/SCRIPT_ID" >}}](/influxdb/cloud/api/#operation/PostScriptsIDInvoke)
|
||||
{{< api-endpoint method="post" endpoint="https://cloud2.influxdata.com/api/v2/scripts/SCRIPT_ID" api-ref="/influxdb/cloud/api/#operation/PostScriptsIDInvoke" >}}
|
||||
|
||||
Replace *`SCRIPT_ID`* with the ID of the script you want to execute. To find the script ID, see how to [list scripts](#list-scripts).
|
||||
|
||||
|
|
@ -206,7 +206,7 @@ Provide the following in your request:
|
|||
|
||||
To find a specific script for an organization, send a request using the `GET` method to the `/api/v2/scripts/SCRIPT_ID` InfluxDB API endpoint.
|
||||
|
||||
[{{< api-endpoint method="get" endpoint="https://cloud2.influxdata.com/api/v2/scripts/SCRIPT_ID" >}}](/influxdb/cloud/api/#operation/GetScriptsID)
|
||||
{{< api-endpoint method="get" endpoint="https://cloud2.influxdata.com/api/v2/scripts/SCRIPT_ID" api-ref="/influxdb/cloud/api/#operation/GetScriptsID" >}}
|
||||
|
||||
Replace *`SCRIPT_ID`* with the ID of the script you want to find.
|
||||
|
||||
|
|
@ -228,7 +228,7 @@ Use the API to replace the following properties of an invokable script:
|
|||
To update an existing script for an organization, send a request using the `PATCH` method to the `/api/v2/scripts/SCRIPT_ID` InfluxDB API endpoint.
|
||||
Replace *`SCRIPT_ID`* with the ID of the script you want to update.
|
||||
|
||||
[{{< api-endpoint method="patch" endpoint="https://cloud2.influxdata.com/api/v2/scripts/SCRIPT_ID" >}}](/influxdb/cloud/api/#operation/PatchScriptsID)
|
||||
{{< api-endpoint method="patch" endpoint="https://cloud2.influxdata.com/api/v2/scripts/SCRIPT_ID" api-ref="/influxdb/cloud/api/#operation/PatchScriptsID" >}}
|
||||
|
||||
Provide the following in your request:
|
||||
|
||||
|
|
@ -258,7 +258,7 @@ InfluxDB returns the updated invokable script.
|
|||
To delete a script, send a request using the `DELETE` method to the `/api/v2/scripts/SCRIPT_ID` InfluxDB API endpoint.
|
||||
Replace *`SCRIPT_ID`* with the ID of the script you want to update.
|
||||
|
||||
[{{< api-endpoint method="delete" endpoint="https://cloud2.influxdata.com/api/v2/scripts/SCRIPT_ID" >}}](/influxdb/cloud/api/#operation/DeleteScriptsID)
|
||||
{{< api-endpoint method="delete" endpoint="https://cloud2.influxdata.com/api/v2/scripts/SCRIPT_ID" api-ref="/influxdb/cloud/api/#operation/DeleteScriptsID" >}}
|
||||
|
||||
Provide the following in your request:
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ you need is in place.
|
|||
|
||||
Send a request to the InfluxDB API `/api/v2/authorizations` endpoint using the `POST` request method.
|
||||
|
||||
{{< api-endpoint endpoint="http://cloud2.influxdata.com/api/v2/authorizations" method="post" >}}
|
||||
{{< api-endpoint endpoint="http://cloud2.influxdata.com/api/v2/authorizations" method="post" api-ref="/influxdb/cloud/api/#operation/PostAuthorizations" >}}
|
||||
|
||||
Include the following with your request:
|
||||
|
||||
|
|
@ -372,7 +372,7 @@ export INFLUX_TOKEN=<YOUR_INFLUXDB_API_TOKEN>
|
|||
To create a bucket using the InfluxDB HTTP API, send a request to
|
||||
the InfluxDB API `/api/v2/buckets` endpoint using the `POST` request method.
|
||||
|
||||
{{< api-endpoint endpoint="http://cloud2.influxdata.com/api/v2/buckets" method="post" >}}
|
||||
{{< api-endpoint endpoint="http://cloud2.influxdata.com/api/v2/buckets" method="post" api-ref="/influxdb/cloud/api/#operation/PostBuckets" >}}
|
||||
|
||||
Include the following with your request:
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ and set the following properties in the request body:
|
|||
|
||||
For example, the following request defines the _explicit_ bucket measurement schema for `airSensors` measurements:
|
||||
|
||||
{{< api-endpoint method="post" endpoint="https://cloud2.influxdata.com/api/v2/buckets/{BUCKET_ID}/schema/measurements" >}}
|
||||
{{< api-endpoint method="post" endpoint="https://cloud2.influxdata.com/api/v2/buckets/{BUCKET_ID}/schema/measurements" api-ref="/influxdb/cloud/api/#operation/createMeasurementSchema" >}}
|
||||
|
||||
```js
|
||||
{
|
||||
|
|
@ -213,7 +213,7 @@ To view schema column definitions and metadata, specify the `--json` flag.
|
|||
|
||||
To list schemas for a bucket, send a request to the InfluxDB HTTP [`/api/v2/buckets/{BUCKET_ID}/schema/measurements` endpoint](/influxdb/cloud/api/#operation/getMeasurementSchemas):
|
||||
|
||||
{{% api-endpoint method="get" endpoint="https://cloud2.influxdata.com/api/v2/buckets/{BUCKET_ID}/schema/measurements" %}}
|
||||
{{% api-endpoint method="get" endpoint="https://cloud2.influxdata.com/api/v2/buckets/{BUCKET_ID}/schema/measurements" api-ref="/influxdb/cloud/api/#operation/getMeasurementSchemas" %}}
|
||||
|
||||
## Update a bucket schema
|
||||
|
||||
|
|
@ -256,7 +256,7 @@ You can't modify or delete columns in bucket schemas.
|
|||
|
||||
In the request body, set the `columns` property to a list of old and new column definitions for the measurement schema--for example, the following request appends the new column `CO2` to `columns` retrieved in the previous step:
|
||||
|
||||
{{< api-endpoint method="patch" endpoint="https://cloud2.influxdata.com/api/v2/buckets/{BUCKET_ID}/schema/measurements/{MEASUREMENT_ID}" >}}
|
||||
{{< api-endpoint method="patch" endpoint="https://cloud2.influxdata.com/api/v2/buckets/{BUCKET_ID}/schema/measurements/{MEASUREMENT_ID}" api-ref="/influxdb/cloud/api/#operation/updateMeasurementSchema" >}}
|
||||
|
||||
```js
|
||||
{
|
||||
|
|
|
|||
|
|
@ -117,14 +117,14 @@ You can update the following bucket properties:
|
|||
|
||||
1. To find the bucket ID, send a request to the HTTP API [`GET /api/v2/buckets/` endpoint](/influxdb/cloud/api/#operation/GetBuckets) to retrieve the list of buckets. <!-- @TODO: provide API auth note about tokens and read access to buckets -->
|
||||
|
||||
{{< api-endpoint method="get" endpoint="https://cloud2.influxdata.com/api/v2/buckets" >}}
|
||||
{{< api-endpoint method="get" endpoint="https://cloud2.influxdata.com/api/v2/buckets" api-ref="/influxdb/cloud/api/#operation/GetBuckets" >}}
|
||||
|
||||
2. Send a request to the HTTP API [PATCH `/api/v2/buckets/{BUCKET_ID}` endpoint](/influxdb/cloud/api/#operation/PatchBucketsID).
|
||||
|
||||
In the URL path, specify the ID of the bucket from the previous step that you want to update.
|
||||
In the request body, set the properties that you want to update--for example:
|
||||
|
||||
{{< api-endpoint method="patch" endpoint="https://cloud2.influxdata.com/api/v2/buckets/{BUCKET_ID}" >}}
|
||||
{{< api-endpoint method="patch" endpoint="https://cloud2.influxdata.com/api/v2/buckets/{BUCKET_ID}" api-ref="/influxdb/cloud/api/#operation/PatchBucketsID" >}}
|
||||
|
||||
```js
|
||||
{
|
||||
|
|
|
|||
|
|
@ -37,4 +37,4 @@ for information about other available flags.
|
|||
|
||||
Send a request to the InfluxDB HTTP API [`/api/v2/buckets` endpoint](/influxdb/cloud/api/#operation/GetBuckets) to view buckets in an organization.
|
||||
|
||||
{{% api-endpoint method="get" endpoint="https://cloud2.influxdata.com/api/v2/buckets" %}}
|
||||
{{% api-endpoint method="get" endpoint="https://cloud2.influxdata.com/api/v2/buckets" api-ref="/influxdb/cloud/api/#operation/GetBuckets" %}}
|
||||
|
|
@ -272,7 +272,7 @@ To query data from InfluxDB using Flux and the InfluxDB HTTP API, send a request
|
|||
to the InfluxDB API [`/api/v2/query` endpoint](/influxdb/v2.6/api/#operation/PostQuery)
|
||||
using the `POST` request method.
|
||||
|
||||
{{< api-endpoint endpoint="http://localhost:8086/api/v2/query" method="post" >}}
|
||||
{{< api-endpoint endpoint="http://localhost:8086/api/v2/query" method="post" api-ref="/influxdb/v2.6/api/#operation/PostQuery" >}}
|
||||
|
||||
Include the following with your request:
|
||||
|
||||
|
|
@ -513,7 +513,7 @@ To query data from InfluxDB using InfluxQL and the InfluxDB HTTP API, send a req
|
|||
to the InfluxDB API [`/query` 1.X compatibility endpoint](/influxdb/v2.6/reference/api/influxdb-1x/query/)
|
||||
using the `POST` request method.
|
||||
|
||||
{{< api-endpoint endpoint="http://localhost:8086/query" method="post" >}}
|
||||
{{< api-endpoint endpoint="http://localhost:8086/query" method="post" api-ref="/influxdb/v2.6/api/v1-compatibility/#operation/PostQueryV1" >}}
|
||||
|
||||
Include the following with your request:
|
||||
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ see [InfluxDB configuration options](/influxdb/v2.6/reference/config-options/).
|
|||
|
||||
Send a request to the InfluxDB API `/api/v2/authorizations` endpoint using the `POST` request method.
|
||||
|
||||
{{< api-endpoint endpoint="http://localhost:8086/api/v2/authorizations" method="post" >}}
|
||||
{{< api-endpoint endpoint="http://localhost:8086/api/v2/authorizations" method="post" api-ref="/influxdb/v2.6/api/#operation/PostAuthorizations" >}}
|
||||
|
||||
Include the following with your request:
|
||||
|
||||
|
|
@ -414,7 +414,7 @@ export INFLUX_TOKEN=<YOUR_INFLUXDB_API_TOKEN>
|
|||
To create a bucket using the InfluxDB HTTP API, send a request to
|
||||
the InfluxDB API `/api/v2/buckets` endpoint using the `POST` request method.
|
||||
|
||||
{{< api-endpoint endpoint="http://localhost:8086/api/v2/buckets" method="post" >}}
|
||||
{{< api-endpoint endpoint="http://localhost:8086/api/v2/buckets" method="post" api-ref="/influxdb/v2.6/api/#operation/PostBuckets" >}}
|
||||
|
||||
Include the following with your request:
|
||||
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ The UI will confirm that the data has been written successfully.
|
|||
To write data to InfluxDB using the InfluxDB HTTP API, send a request to
|
||||
the InfluxDB API `/api/v2/write` endpoint using the `POST` request method.
|
||||
|
||||
{{< api-endpoint endpoint="http://localhost:8086/api/v2/write" method="post" >}}
|
||||
{{< api-endpoint endpoint="http://localhost:8086/api/v2/write" method="post" api-ref="/influxdb/v2.6/api/#operation/PostWrite" >}}
|
||||
|
||||
Include the following with your request:
|
||||
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ option task = {
|
|||
|
||||
Use the [`/api/v2/tasks` InfluxDB API endpoint](/influxdb/v2.6/api/#operation/PostTasks) to create a task.
|
||||
|
||||
{{< api-endpoint method="POST" endpoint="http://localhost:8086/api/v2/tasks/" >}}
|
||||
{{< api-endpoint method="POST" endpoint="http://localhost:8086/api/v2/tasks/" api-ref="/influxdb/v2.6/api/#operation/PostTasks" >}}
|
||||
|
||||
Provide the following in your API request:
|
||||
##### Request headers
|
||||
|
|
@ -178,7 +178,7 @@ You can use tasks to pass script parameters and schedule runs.
|
|||
Use the [`/api/v2/tasks` InfluxDB API endpoint](/influxdb/cloud/api/#operation/PostTasks) to create a task
|
||||
that references a script ID.
|
||||
|
||||
{{< api-endpoint method="POST" endpoint="http://localhost:8086/api/v2/tasks/" >}}
|
||||
{{< api-endpoint method="POST" endpoint="http://localhost:8086/api/v2/tasks/" api-ref="/influxdb/cloud/api/#operation/PostTasks" >}}
|
||||
|
||||
Provide the following in your API request:
|
||||
|
||||
|
|
@ -258,7 +258,7 @@ Replace **`INFLUX_API_TOKEN`** with your InfluxDB API token.
|
|||
|
||||
Use the [`/api/v2/tasks` InfluxDB API endpoint](/influxdb/cloud/api/#operation/PostTasks) to create a task that contains a Flux script with task options.
|
||||
|
||||
{{< api-endpoint method="POST" endpoint="https://cloud2.influxdata.com/api/v2/tasks/" >}}
|
||||
{{< api-endpoint method="POST" endpoint="https://cloud2.influxdata.com/api/v2/tasks/" api-ref="/influxdb/cloud/api/#operation/PostTasks" >}}
|
||||
|
||||
Provide the following in your API request:
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ _To find the task ID, see [how to view tasks](/influxdb/v2.6/process-data/manage
|
|||
|
||||
Use the [`/tasks/TASK_ID` InfluxDB API endpoint](/influxdb/v2.6/api/#operation/DeleteTasksID) to delete a task and all associated records (task runs, logs, and labels).
|
||||
|
||||
{{< api-endpoint method="DELETE" endpoint="http://localhost:8086/api/v2/tasks/TASK_ID" >}}
|
||||
{{< api-endpoint method="DELETE" endpoint="http://localhost:8086/api/v2/tasks/TASK_ID" api-ref="/influxdb/v2.6/api/#operation/DeleteTasksID" >}}
|
||||
|
||||
_To find the task ID, see [how to view tasks](/influxdb/v2.6/process-data/manage-tasks/view-tasks/)_
|
||||
|
||||
|
|
|
|||
|
|
@ -69,13 +69,13 @@ influx task retry-failed \
|
|||
```
|
||||
|
||||
## Run a task with the InfluxDB API
|
||||
Use the [`/tasks/TASK_ID/runs`
|
||||
InfluxDB API endpoint](/influxdb/v2.6/api/#operation/PostTasksIDRuns) to manually start a task run.
|
||||
Use the [`/tasks/TASK_ID/runs` InfluxDB API endpoint](/influxdb/v2.6/api/#operation/PostTasksIDRuns)
|
||||
to manually start a task run.
|
||||
|
||||
{{< api-endpoint method="POST" endpoint="http://localhost:8086/api/v2/tasks/TASK_ID/runs" >}}
|
||||
{{< api-endpoint method="POST" endpoint="http://localhost:8086/api/v2/tasks/TASK_ID/runs" api-ref="/influxdb/v2.6/api/#operation/PostTasksIDRuns" >}}
|
||||
|
||||
### Retry failed task runs
|
||||
Use the [`/tasks/TASK_ID/runs/RUN_ID/retry`
|
||||
InfluxDB API endpoint](/influxdb/v2.6/api/#operation/PostTasksIDRunsIDRetry) to retry a task run.
|
||||
Use the [`/tasks/TASK_ID/runs/RUN_ID/retry` InfluxDB API endpoint](/influxdb/v2.6/api/#operation/PostTasksIDRunsIDRetry)
|
||||
to retry a task run.
|
||||
|
||||
{{< api-endpoint method="POST" endpoint="http://localhost:8086/api/v2/tasks/TASK_ID/runs/RUN_ID/retry" >}}
|
||||
{{< api-endpoint method="POST" endpoint="http://localhost:8086/api/v2/tasks/TASK_ID/runs/RUN_ID/retry" api-ref="/influxdb/v2.6/api/#operation/PostTasksIDRunsIDRetry">}}
|
||||
|
|
|
|||
|
|
@ -63,24 +63,23 @@ To retry failed task runs, see how to [run tasks](/influxdb/v2.6/process-data/ma
|
|||
|
||||
## View logs for a task with the InfluxDB API
|
||||
|
||||
Use the [`/api/v2/tasks/TASK_ID/logs`
|
||||
InfluxDB API endpoint](/influxdb/v2.6/api/#operation/GetTasksIDLogs) to view the log events for a task and exclude additional task metadata.
|
||||
Use the [`/api/v2/tasks/TASK_ID/logs` InfluxDB API endpoint](/influxdb/v2.6/api/#operation/GetTasksIDLogs)
|
||||
to view the log events for a task and exclude additional task metadata.
|
||||
|
||||
{{< api-endpoint method="GET" endpoint="http://localhost:8086/api/v2/tasks/TASK_ID/logs" >}}
|
||||
{{< api-endpoint method="GET" endpoint="http://localhost:8086/api/v2/tasks/TASK_ID/logs" api-ref="/influxdb/v2.6/api/#operation/GetTasksIDLogs" >}}
|
||||
|
||||
## View a task's run history with the InfluxDB API
|
||||
|
||||
Use the [`/tasks/TASK_ID/runs`
|
||||
InfluxDB API endpoint](/influxdb/v2.6/api/#operation/GetTasksIDRuns) to view a task's run history.
|
||||
Use the [`/tasks/TASK_ID/runs` InfluxDB API endpoint](/influxdb/v2.6/api/#operation/GetTasksIDRuns)
|
||||
to view a task's run history.
|
||||
|
||||
{{< api-endpoint method="GET" endpoint="http://localhost:8086/api/v2/tasks/{taskID}/runs" >}}
|
||||
{{< api-endpoint method="GET" endpoint="http://localhost:8086/api/v2/tasks/{taskID}/runs" api-ref="/influxdb/v2.6/api/#operation/GetTasksIDRuns" >}}
|
||||
|
||||
### View task run logs with the InfluxDB API
|
||||
|
||||
To view logs associated with a run, use the
|
||||
[`/api/v2/tasks/TASK_ID/runs/RUN_ID/logs` InfluxDB API
|
||||
endpoint](/influxdb/v2.6/api/#operation/GetTasksIDRunsIDLogs).
|
||||
[`/api/v2/tasks/TASK_ID/runs/RUN_ID/logs` InfluxDB API endpoint](/influxdb/v2.6/api/#operation/GetTasksIDRunsIDLogs).
|
||||
|
||||
{{< api-endpoint method="GET" endpoint="http://localhost:8086/api/v2/tasks/TASK_ID/runs/RUN_ID/logs" >}}
|
||||
{{< api-endpoint method="GET" endpoint="http://localhost:8086/api/v2/tasks/TASK_ID/runs/RUN_ID/logs" api-ref="/influxdb/v2.6/api/#operation/GetTasksIDRunsIDLogs" >}}
|
||||
|
||||
To retry failed task runs, see how to [run tasks](/influxdb/v2.6/process-data/manage-tasks/run-task/).
|
||||
|
|
|
|||
|
|
@ -74,10 +74,10 @@ influx task update -i 0343698431c35000 --status inactive
|
|||
```
|
||||
|
||||
## Update a task with the InfluxDB API
|
||||
Use the [`/tasks/TASK_ID`
|
||||
InfluxDB API endpoint](/influxdb/v2.6/api/#operation/PatchTasksID) to update properties of a task.
|
||||
Use the [`/tasks/TASK_ID` InfluxDB API endpoint](/influxdb/v2.6/api/#operation/PatchTasksID)
|
||||
to update properties of a task.
|
||||
|
||||
{{< api-endpoint method="PATCH" endpoint="http://localhost:8086/api/v2/tasks/TASK_ID" >}}
|
||||
{{< api-endpoint method="PATCH" endpoint="http://localhost:8086/api/v2/tasks/TASK_ID" api-ref="/influxdb/v2.6/api/#operation/PatchTasksID" >}}
|
||||
|
||||
In your request, pass the task ID and an object that contains the updated key-value pairs.
|
||||
To activate or inactivate a task, set the `status` property.
|
||||
|
|
|
|||
|
|
@ -34,11 +34,11 @@ influx task list
|
|||
#### Filter tasks using the CLI
|
||||
Other filtering options such as filtering by organization or user,
|
||||
or limiting the number of tasks returned, are available.
|
||||
See the [`influx task list` documentation](/influxdb/v2.6/reference/cli/influx/task/list)
|
||||
See the [`influx task list` documentation](/influxdb/v2.6/reference/cli/influx/task/list/)
|
||||
for information about other available flags.
|
||||
|
||||
## View tasks with the InfluxDB API
|
||||
Use the [`/tasks` InfluxDB API endpoint](/influxdb/v2.6/api/#operation/GetTasks)
|
||||
to return a list of tasks.
|
||||
|
||||
{{< api-endpoint method="GET" endpoint="http://localhost:8086/api/v2/tasks" >}}
|
||||
{{< api-endpoint method="GET" endpoint="http://localhost:8086/api/v2/tasks" api-ref="/influxdb/v2.6/api/#operation/GetTasks" >}}
|
||||
|
|
@ -109,7 +109,7 @@ Table: keys: []
|
|||
To return the version of Flux installed with InfluxDB using the InfluxDB API,
|
||||
use the [`/api/v2/query` endpoint](/influxdb/v2.6/api/#tag/Query).
|
||||
|
||||
{{< api-endpoint method="POST" endpoint="http://localhost:8086/api/v2/query" >}}
|
||||
{{< api-endpoint method="POST" endpoint="http://localhost:8086/api/v2/query" api-ref="/influxdb/v2.6/api/#operation/PostQuery" >}}
|
||||
Provide the following:
|
||||
|
||||
- InfluxDB {{% cloud-only %}}Cloud{{% /cloud-only %}} host
|
||||
|
|
|
|||
|
|
@ -97,9 +97,7 @@ influx v1 dbrp create \
|
|||
|
||||
Use the [`/api/v2/dbrps` API endpoint](/influxdb/v2.6/api/#operation/PostDBRP) to create a new DBRP mapping.
|
||||
|
||||
<a href="/influxdb/v2.6/api/#operation/PostDBRP">
|
||||
{{< api-endpoint endpoint="http://localhost:8086/api/v2/dbrps" method="POST" >}}
|
||||
</a>
|
||||
{{< api-endpoint endpoint="http://localhost:8086/api/v2/dbrps" method="POST" api-ref="/influxdb/v2.6/api/#operation/PostDBRP" >}}
|
||||
|
||||
Include the following:
|
||||
|
||||
|
|
@ -171,9 +169,7 @@ influx v1 dbrp list --bucket-id 00oxo0oXx000x0Xo
|
|||
{{% tab-content %}}
|
||||
Use the [`/api/v2/dbrps` API endpoint](/influxdb/v2.6/api/#operation/GetDBRPs) to list DBRP mappings.
|
||||
|
||||
<a href="/influxdb/v2.6/api/#operation/GetDBRPs">
|
||||
{{< api-endpoint endpoint="http://localhost:8086/api/v2/dbrps" method="GET" >}}
|
||||
</a>
|
||||
{{< api-endpoint endpoint="http://localhost:8086/api/v2/dbrps" method="GET" api-ref="/influxdb/v2.6/api/#operation/GetDBRPs" >}}
|
||||
|
||||
Include the following:
|
||||
|
||||
|
|
@ -256,9 +252,7 @@ influx v1 dbrp update \
|
|||
|
||||
Use the [`/api/v2/dbrps/{dbrpID}` API endpoint](/influxdb/v2.6/api/#operation/GetDBRPs) to update DBRP mappings.
|
||||
|
||||
<a href="/influxdb/v2.6/api/#operation/PatchDBRPID">
|
||||
{{< api-endpoint endpoint="http://localhost:8086/api/v2/dbrps/{dbrpID}" method="PATCH" >}}
|
||||
</a>
|
||||
{{< api-endpoint endpoint="http://localhost:8086/api/v2/dbrps/{dbrpID}" method="PATCH" api-ref="/influxdb/v2.6/api/#operation/PatchDBRPID" >}}
|
||||
|
||||
Include the following:
|
||||
|
||||
|
|
@ -326,9 +320,7 @@ influx v1 dbrp delete --id 00oxo0X0xx0XXoX0
|
|||
|
||||
Use the [`/api/v2/dbrps/{dbrpID}` API endpoint](/influxdb/v2.6/api/#operation/DeleteDBRPID) to delete a DBRP mapping.
|
||||
|
||||
<a href="/influxdb/v2.6/api/#operation/DeleteDBRPID">
|
||||
{{< api-endpoint endpoint="http://localhost:8086/api/v2/dbrps/{dbrpID}" method="DELETE" >}}
|
||||
</a>
|
||||
{{< api-endpoint endpoint="http://localhost:8086/api/v2/dbrps/{dbrpID}" method="DELETE" api-ref="/influxdb/v2.6/api/#operation/DeleteDBRPID" >}}
|
||||
|
||||
Include the following:
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ influx server-config
|
|||
|
||||
Use the `/api/v2/config` InfluxDB API endpoint to retrieve your runtime server configuration.
|
||||
|
||||
[{{< api-endpoint method="GET" endpoint="http://localhost:8086/api/v2/config" >}}]((/influxdb/v2.6/api/#operation/GetConfig))
|
||||
{{< api-endpoint method="GET" endpoint="http://localhost:8086/api/v2/config" api-ref="/influxdb/v2.6/api/#operation/GetConfig" >}}
|
||||
|
||||
### Configuration precedence
|
||||
InfluxDB honors configuration settings using the following precedence:
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ Get metrics about the workload performance of an InfluxDB OSS instance.
|
|||
InfluxDB OSS exposes a `/metrics` endpoint that returns
|
||||
performance, resource, and usage metrics formatted in the [Prometheus plain-text exposition format](https://prometheus.io/docs/instrumenting/exposition_formats).
|
||||
|
||||
[{{< api-endpoint method="GET" endpoint="http://localhost:8086/metrics" >}}](/influxdb/v2.1/api/#operation/GetMetrics)
|
||||
{{< api-endpoint method="GET" endpoint="http://localhost:8086/metrics" api-ref="/influxdb/v2.6/api/#operation/GetMetrics" >}}
|
||||
|
||||
Metrics contain a name, an optional set of key-value pairs, and a value.
|
||||
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ See the [`influx auth create` documentation](/{{< latest "influxdb" >}}/referenc
|
|||
|
||||
Use the `/api/v2/authorizations` InfluxDB API endpoint to create a token.
|
||||
|
||||
[{{< api-endpoint method="POST" endpoint="http://localhost:8086/api/v2/authorizations" >}}]((/influxdb/v2.6/api/#operation/PostAuthorizations))
|
||||
{{< api-endpoint method="POST" endpoint="http://localhost:8086/api/v2/authorizations" api-ref="/influxdb/v2.6/api/#operation/PostAuthorizations" >}}
|
||||
|
||||
Include the following in your request:
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ influx auth delete -i 03a2bee5a9c9a000
|
|||
|
||||
Use the `/api/v2/authorizations` InfluxDB API endpoint to delete a token.
|
||||
|
||||
[{{< api-endpoint method="DELETE" endpoint="http://localhost:8086/api/v2/authorizations/AUTH_ID" >}}](/influxdb/v2.6/api/#operation/DeleteAuthorizationsID)
|
||||
{{< api-endpoint method="DELETE" endpoint="http://localhost:8086/api/v2/authorizations/AUTH_ID" api-ref="/influxdb/v2.6/api/#operation/DeleteAuthorizationsID" >}}
|
||||
|
||||
Include the following in your request:
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ influx auth find --json
|
|||
|
||||
Use the `/api/v2/authorizations` InfluxDB API endpoint to update the description and status of a token.
|
||||
|
||||
[{{< api-endpoint method="PATCH" endpoint="http://localhost:8086/api/v2/authorizations/AUTH_ID" >}}](/influxdb/v2.6/api/#operation/PatchAuthorizationsID)
|
||||
{{< api-endpoint method="PATCH" endpoint="http://localhost:8086/api/v2/authorizations/AUTH_ID" api-ref="/influxdb/v2.6/api/#operation/PatchAuthorizationsID" >}}
|
||||
|
||||
Include the following in your request:
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ for information about other available flags.
|
|||
|
||||
Use the `/api/v2/authorizations` InfluxDB API endpoint to view tokens and permissions.
|
||||
|
||||
[{{< api-endpoint method="GET" endpoint="/api/v2/authorizations" >}}](/influxdb/cloud/api/#operation/GetAuthorizations)
|
||||
{{< api-endpoint method="GET" endpoint="/api/v2/authorizations" api-ref="/influxdb/cloud/api/#operation/GetAuthorizations" >}}
|
||||
|
||||
Include the following in your request:
|
||||
|
||||
|
|
@ -90,7 +90,7 @@ Include the following in your request:
|
|||
|
||||
To view a specific authorization and token, include the authorization ID in the URL path.
|
||||
|
||||
{{% api-endpoint method="GET" endpoint="/api/v2/authorizations/{authID}" %}}
|
||||
{{% api-endpoint method="GET" endpoint="/api/v2/authorizations/{authID}" api-ref="/influxdb/v2.6/api/#operation/GetAuthorizationsID" %}}
|
||||
|
||||
### Filter the token list
|
||||
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ influx delete --bucket example-bucket \
|
|||
Use the InfluxDB API [`/api/v2/delete` endpoint](/influxdb/v2.6/api/#operation/PostDelete)
|
||||
to delete points from InfluxDB.
|
||||
|
||||
{{< api-endpoint method="post" endpoint="http://localhost:8086/api/v2/delete" >}}
|
||||
{{< api-endpoint method="post" endpoint="http://localhost:8086/api/v2/delete" api-ref="/influxdb/v2.6/api/#operation/PostDelete" >}}
|
||||
|
||||
Include the following:
|
||||
|
||||
|
|
|
|||
|
|
@ -101,9 +101,7 @@ max queue size, and latest status code.
|
|||
1. Send a `POST` request to your {{% oss-only %}}local{{% /oss-only %}} InfluxDB OSS `/api/v2/remotes` endpoint to create a remote connection to replicate data to.
|
||||
|
||||
{{< keep-url >}}
|
||||
<a href="/influxdb/v2.6/api/#operation/PostRemoteConnection">
|
||||
{{< api-endpoint endpoint="localhost:8086/api/v2/remotes" method="POST" >}}
|
||||
</a>
|
||||
{{< api-endpoint endpoint="localhost:8086/api/v2/remotes" method="POST" api-ref="/influxdb/v2.6/api/#operation/PostRemoteConnection" >}}
|
||||
|
||||
Include the following in your request:
|
||||
|
||||
|
|
@ -144,9 +142,7 @@ max queue size, and latest status code.
|
|||
endpoint with the `GET` request method.
|
||||
|
||||
{{< keep-url >}}
|
||||
<a href="/influxdb/v2.6/api/#operation/GetRemoteConnections">
|
||||
{{< api-endpoint endpoint="localhost:8086/api/v2/remotes" method="GET" >}}
|
||||
</a>
|
||||
{{< api-endpoint endpoint="localhost:8086/api/v2/remotes" method="GET" api-ref="/influxdb/v2.6/api/#operation/GetRemoteConnections" >}}
|
||||
|
||||
Include the following in your request:
|
||||
|
||||
|
|
@ -167,9 +163,7 @@ max queue size, and latest status code.
|
|||
`/api/v2/replications` endpoint to create a replication stream.
|
||||
|
||||
{{< keep-url >}}
|
||||
<a href="/influxdb/v2.6/api/#operation/PostRemoteConnection">
|
||||
{{< api-endpoint endpoint="localhost:8086/api/v2/remotes" method="POST" >}}
|
||||
</a>
|
||||
{{< api-endpoint endpoint="localhost:8086/api/v2/remotes" method="POST" api-ref="/influxdb/v2.6/api/#operation/PostRemoteConnection" >}}
|
||||
|
||||
Include the following in your request:
|
||||
|
||||
|
|
@ -220,9 +214,7 @@ information such as the current queue size, max queue size, and latest status
|
|||
code for each replication stream, send a `GET` request to your {{% oss-only %}}local{{% /oss-only %}} InfluxDB OSS `/api/v2/replications` endpoint.
|
||||
|
||||
{{< keep-url >}}
|
||||
<a href="/influxdb/v2.6/api/#operation/GetReplications">
|
||||
{{< api-endpoint endpoint="localhost:8086/api/v2/replications" method="GET" >}}
|
||||
</a>
|
||||
{{< api-endpoint endpoint="localhost:8086/api/v2/replications" method="GET" api-ref="/influxdb/v2.6/api/#operation/GetReplications" >}}
|
||||
|
||||
Include the following in your request:
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
{{- $methodStyle := .Get "method" | lower -}}
|
||||
{{- $endpoint := .Get "endpoint" -}}
|
||||
{{- $apiRef := .Get "api-ref" | default "" -}}
|
||||
<pre>
|
||||
<pre class="api-endpoint">
|
||||
{{- if ne $apiRef "" -}}
|
||||
<a href="{{ $apiRef }}" target="_blank"><span class="api {{ $methodStyle }}">{{ $method }}</span> {{ $endpoint }}</a>
|
||||
{{- else -}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue