diff --git a/assets/styles/layouts/_code-controls.scss b/assets/styles/layouts/_code-controls.scss index 39143a237..66ecc8445 100644 --- a/assets/styles/layouts/_code-controls.scss +++ b/assets/styles/layouts/_code-controls.scss @@ -113,6 +113,7 @@ pre { display: block; line-height: 1.75rem; + font-family: $code; @import "article/code-api-methods"; } diff --git a/assets/styles/layouts/article/_code-api-methods.scss b/assets/styles/layouts/article/_code-api-methods.scss index 67d30d0e9..d17c84fa9 100644 --- a/assets/styles/layouts/article/_code-api-methods.scss +++ b/assets/styles/layouts/article/_code-api-methods.scss @@ -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; + } + } + } } \ No newline at end of file diff --git a/assets/styles/layouts/article/_code.scss b/assets/styles/layouts/article/_code.scss index e6ce1e81b..614e62e8b 100644 --- a/assets/styles/layouts/article/_code.scss +++ b/assets/styles/layouts/article/_code.scss @@ -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"; } diff --git a/content/influxdb/cloud-iox/admin/buckets/manage-explicit-bucket-schemas.md b/content/influxdb/cloud-iox/admin/buckets/manage-explicit-bucket-schemas.md index e65c4aafb..9223d48e7 100644 --- a/content/influxdb/cloud-iox/admin/buckets/manage-explicit-bucket-schemas.md +++ b/content/influxdb/cloud-iox/admin/buckets/manage-explicit-bucket-schemas.md @@ -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 { diff --git a/content/influxdb/cloud-iox/admin/buckets/update-bucket.md b/content/influxdb/cloud-iox/admin/buckets/update-bucket.md index c85274dda..2ef71bc3e 100644 --- a/content/influxdb/cloud-iox/admin/buckets/update-bucket.md +++ b/content/influxdb/cloud-iox/admin/buckets/update-bucket.md @@ -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. - {{< 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 { diff --git a/content/influxdb/cloud-iox/admin/buckets/view-buckets.md b/content/influxdb/cloud-iox/admin/buckets/view-buckets.md index d4a7e7ade..4900c3c11 100644 --- a/content/influxdb/cloud-iox/admin/buckets/view-buckets.md +++ b/content/influxdb/cloud-iox/admin/buckets/view-buckets.md @@ -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" %}} diff --git a/content/influxdb/cloud-iox/get-started/query.md b/content/influxdb/cloud-iox/get-started/query.md index 1b55cc425..8c6333da9 100644 --- a/content/influxdb/cloud-iox/get-started/query.md +++ b/content/influxdb/cloud-iox/get-started/query.md @@ -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/) diff --git a/content/influxdb/cloud-iox/get-started/setup.md b/content/influxdb/cloud-iox/get-started/setup.md index e1aeca7bb..78699fa33 100644 --- a/content/influxdb/cloud-iox/get-started/setup.md +++ b/content/influxdb/cloud-iox/get-started/setup.md @@ -246,7 +246,7 @@ export INFLUX_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: diff --git a/content/influxdb/cloud-iox/get-started/write.md b/content/influxdb/cloud-iox/get-started/write.md index f166b66d9..1304349aa 100644 --- a/content/influxdb/cloud-iox/get-started/write.md +++ b/content/influxdb/cloud-iox/get-started/write.md @@ -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: diff --git a/content/influxdb/cloud/api-guide/api-invokable-scripts/_index.md b/content/influxdb/cloud/api-guide/api-invokable-scripts/_index.md index 14827fd3f..f477c98e0 100644 --- a/content/influxdb/cloud/api-guide/api-invokable-scripts/_index.md +++ b/content/influxdb/cloud/api-guide/api-invokable-scripts/_index.md @@ -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: diff --git a/content/influxdb/cloud/get-started/setup.md b/content/influxdb/cloud/get-started/setup.md index 81a2ce1cf..f55b1928a 100644 --- a/content/influxdb/cloud/get-started/setup.md +++ b/content/influxdb/cloud/get-started/setup.md @@ -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= 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: diff --git a/content/influxdb/cloud/organizations/buckets/bucket-schema/_index.md b/content/influxdb/cloud/organizations/buckets/bucket-schema/_index.md index b75518b5a..de09d27b1 100644 --- a/content/influxdb/cloud/organizations/buckets/bucket-schema/_index.md +++ b/content/influxdb/cloud/organizations/buckets/bucket-schema/_index.md @@ -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 { diff --git a/content/influxdb/cloud/organizations/buckets/update-bucket.md b/content/influxdb/cloud/organizations/buckets/update-bucket.md index 2b29f04ad..6348878c1 100644 --- a/content/influxdb/cloud/organizations/buckets/update-bucket.md +++ b/content/influxdb/cloud/organizations/buckets/update-bucket.md @@ -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. - {{< 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 { diff --git a/content/influxdb/cloud/organizations/buckets/view-buckets.md b/content/influxdb/cloud/organizations/buckets/view-buckets.md index bbbfb59ae..cc3e8b9a9 100644 --- a/content/influxdb/cloud/organizations/buckets/view-buckets.md +++ b/content/influxdb/cloud/organizations/buckets/view-buckets.md @@ -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" %}} \ No newline at end of file +{{% api-endpoint method="get" endpoint="https://cloud2.influxdata.com/api/v2/buckets" api-ref="/influxdb/cloud/api/#operation/GetBuckets" %}} \ No newline at end of file diff --git a/content/influxdb/v2.6/get-started/query.md b/content/influxdb/v2.6/get-started/query.md index a3cdead0b..6cdd3953f 100644 --- a/content/influxdb/v2.6/get-started/query.md +++ b/content/influxdb/v2.6/get-started/query.md @@ -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: diff --git a/content/influxdb/v2.6/get-started/setup.md b/content/influxdb/v2.6/get-started/setup.md index 2f56c60e5..38cdd155f 100644 --- a/content/influxdb/v2.6/get-started/setup.md +++ b/content/influxdb/v2.6/get-started/setup.md @@ -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= 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: diff --git a/content/influxdb/v2.6/get-started/write.md b/content/influxdb/v2.6/get-started/write.md index 488db1688..6973ac142 100644 --- a/content/influxdb/v2.6/get-started/write.md +++ b/content/influxdb/v2.6/get-started/write.md @@ -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: diff --git a/content/influxdb/v2.6/process-data/manage-tasks/create-task.md b/content/influxdb/v2.6/process-data/manage-tasks/create-task.md index e0f0c8283..19791fcfd 100644 --- a/content/influxdb/v2.6/process-data/manage-tasks/create-task.md +++ b/content/influxdb/v2.6/process-data/manage-tasks/create-task.md @@ -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: diff --git a/content/influxdb/v2.6/process-data/manage-tasks/delete-task.md b/content/influxdb/v2.6/process-data/manage-tasks/delete-task.md index fcfa06752..50b9ba114 100644 --- a/content/influxdb/v2.6/process-data/manage-tasks/delete-task.md +++ b/content/influxdb/v2.6/process-data/manage-tasks/delete-task.md @@ -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/)_ diff --git a/content/influxdb/v2.6/process-data/manage-tasks/run-task.md b/content/influxdb/v2.6/process-data/manage-tasks/run-task.md index 9b3171fab..36354bed7 100644 --- a/content/influxdb/v2.6/process-data/manage-tasks/run-task.md +++ b/content/influxdb/v2.6/process-data/manage-tasks/run-task.md @@ -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">}} diff --git a/content/influxdb/v2.6/process-data/manage-tasks/task-run-history.md b/content/influxdb/v2.6/process-data/manage-tasks/task-run-history.md index a31338eca..38a5a1ba0 100644 --- a/content/influxdb/v2.6/process-data/manage-tasks/task-run-history.md +++ b/content/influxdb/v2.6/process-data/manage-tasks/task-run-history.md @@ -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/). diff --git a/content/influxdb/v2.6/process-data/manage-tasks/update-task.md b/content/influxdb/v2.6/process-data/manage-tasks/update-task.md index 85b9c6639..884a0b09c 100644 --- a/content/influxdb/v2.6/process-data/manage-tasks/update-task.md +++ b/content/influxdb/v2.6/process-data/manage-tasks/update-task.md @@ -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. diff --git a/content/influxdb/v2.6/process-data/manage-tasks/view-tasks.md b/content/influxdb/v2.6/process-data/manage-tasks/view-tasks.md index 8ee294787..fc83fee4f 100644 --- a/content/influxdb/v2.6/process-data/manage-tasks/view-tasks.md +++ b/content/influxdb/v2.6/process-data/manage-tasks/view-tasks.md @@ -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" >}} \ No newline at end of file +{{< api-endpoint method="GET" endpoint="http://localhost:8086/api/v2/tasks" api-ref="/influxdb/v2.6/api/#operation/GetTasks" >}} \ No newline at end of file diff --git a/content/influxdb/v2.6/query-data/flux/flux-version.md b/content/influxdb/v2.6/query-data/flux/flux-version.md index 0287a7648..6f71776fc 100644 --- a/content/influxdb/v2.6/query-data/flux/flux-version.md +++ b/content/influxdb/v2.6/query-data/flux/flux-version.md @@ -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 diff --git a/content/influxdb/v2.6/query-data/influxql/dbrp.md b/content/influxdb/v2.6/query-data/influxql/dbrp.md index 38adc3a21..c53c03839 100644 --- a/content/influxdb/v2.6/query-data/influxql/dbrp.md +++ b/content/influxdb/v2.6/query-data/influxql/dbrp.md @@ -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. - -{{< api-endpoint endpoint="http://localhost:8086/api/v2/dbrps" method="POST" >}} - +{{< 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. - -{{< api-endpoint endpoint="http://localhost:8086/api/v2/dbrps" method="GET" >}} - +{{< 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. - -{{< api-endpoint endpoint="http://localhost:8086/api/v2/dbrps/{dbrpID}" method="PATCH" >}} - +{{< 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. - -{{< api-endpoint endpoint="http://localhost:8086/api/v2/dbrps/{dbrpID}" method="DELETE" >}} - +{{< api-endpoint endpoint="http://localhost:8086/api/v2/dbrps/{dbrpID}" method="DELETE" api-ref="/influxdb/v2.6/api/#operation/DeleteDBRPID" >}} Include the following: diff --git a/content/influxdb/v2.6/reference/config-options.md b/content/influxdb/v2.6/reference/config-options.md index ac801ccd0..9133edf85 100644 --- a/content/influxdb/v2.6/reference/config-options.md +++ b/content/influxdb/v2.6/reference/config-options.md @@ -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: diff --git a/content/influxdb/v2.6/reference/internals/metrics.md b/content/influxdb/v2.6/reference/internals/metrics.md index 7bca67faa..50cf7f760 100644 --- a/content/influxdb/v2.6/reference/internals/metrics.md +++ b/content/influxdb/v2.6/reference/internals/metrics.md @@ -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. diff --git a/content/influxdb/v2.6/security/tokens/create-token.md b/content/influxdb/v2.6/security/tokens/create-token.md index f4a892969..76ce02415 100644 --- a/content/influxdb/v2.6/security/tokens/create-token.md +++ b/content/influxdb/v2.6/security/tokens/create-token.md @@ -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: diff --git a/content/influxdb/v2.6/security/tokens/delete-token.md b/content/influxdb/v2.6/security/tokens/delete-token.md index 9982ce766..3f755472b 100644 --- a/content/influxdb/v2.6/security/tokens/delete-token.md +++ b/content/influxdb/v2.6/security/tokens/delete-token.md @@ -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: diff --git a/content/influxdb/v2.6/security/tokens/update-tokens.md b/content/influxdb/v2.6/security/tokens/update-tokens.md index 038e4ce6e..30f5fa7a7 100644 --- a/content/influxdb/v2.6/security/tokens/update-tokens.md +++ b/content/influxdb/v2.6/security/tokens/update-tokens.md @@ -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: diff --git a/content/influxdb/v2.6/security/tokens/view-tokens.md b/content/influxdb/v2.6/security/tokens/view-tokens.md index 1f6048c7e..ed1a4996a 100644 --- a/content/influxdb/v2.6/security/tokens/view-tokens.md +++ b/content/influxdb/v2.6/security/tokens/view-tokens.md @@ -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 diff --git a/content/influxdb/v2.6/write-data/delete-data.md b/content/influxdb/v2.6/write-data/delete-data.md index d30ec3cb7..4e2790eb7 100644 --- a/content/influxdb/v2.6/write-data/delete-data.md +++ b/content/influxdb/v2.6/write-data/delete-data.md @@ -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: diff --git a/content/influxdb/v2.6/write-data/replication/replicate-data.md b/content/influxdb/v2.6/write-data/replication/replicate-data.md index 74df04172..2deb8bba3 100644 --- a/content/influxdb/v2.6/write-data/replication/replicate-data.md +++ b/content/influxdb/v2.6/write-data/replication/replicate-data.md @@ -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 >}} - - {{< api-endpoint endpoint="localhost:8086/api/v2/remotes" method="POST" >}} - + {{< 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 >}} - - {{< api-endpoint endpoint="localhost:8086/api/v2/remotes" method="GET" >}} - + {{< 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 >}} - - {{< api-endpoint endpoint="localhost:8086/api/v2/remotes" method="POST" >}} - + {{< 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 >}} - -{{< api-endpoint endpoint="localhost:8086/api/v2/replications" method="GET" >}} - +{{< api-endpoint endpoint="localhost:8086/api/v2/replications" method="GET" api-ref="/influxdb/v2.6/api/#operation/GetReplications" >}} Include the following in your request: diff --git a/layouts/shortcodes/api-endpoint.html b/layouts/shortcodes/api-endpoint.html index 0053a729b..b3af9b43b 100644 --- a/layouts/shortcodes/api-endpoint.html +++ b/layouts/shortcodes/api-endpoint.html @@ -2,7 +2,7 @@ {{- $methodStyle := .Get "method" | lower -}} {{- $endpoint := .Get "endpoint" -}} {{- $apiRef := .Get "api-ref" | default "" -}} -
+
   {{- if ne $apiRef "" -}}
   {{ $method }} {{ $endpoint }}
   {{- else -}}