Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

InfluxDB Templates API

Export and apply InfluxDB **templates**.Manage **stacks** of templated InfluxDB resources.InfluxDB templates are prepackaged configurations for resources.Use InfluxDB templates to configure a fresh instance of InfluxDB,back up your dashboard configuration, or share your configuration.Use the `/api/v2/templates` endpoints to export templates and apply templates.**InfluxDB stacks** are stateful InfluxDB templates that let youadd, update, and remove installed template resources over time, avoid duplicatingresources when applying the same or similar templates more than once, andapply changes to distributed instances of InfluxDB OSS or InfluxDB Cloud.Use the `/api/v2/stacks` endpoints to manage installed template resources.### Related guides- [InfluxDB stacks](https://docs.influxdata.com/influxdb/cloud/influxdb-templates/stacks/)- [InfluxDB templates](https://docs.influxdata.com/influxdb/cloud/influxdb-templates/)

InfluxDB Templates API is one of 40 APIs that InfluxDB publishes on the APIs.io network, described by a machine-readable OpenAPI specification and an AsyncAPI event-driven specification.

Tagged areas include Templates. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an AsyncAPI specification, authentication docs, and a getting-started guide.

This API exposes 8 operations across 5 paths, and defines 80 schemas. It is described by OpenAPI 3.0.0.

Requests are made against the base URL https://cloud2.influxdata.com/api/v2.

8 operations 5 paths 80 schemas 1 DELETE2 GET1 PATCH4 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.0
Base URL
https://cloud2.influxdata.com/api/v2
Authentication
HTTP Basic, API Key
Resource Areas
1

Authentication & Security 2

InfluxDB Templates API declares 2 security schemes for authenticating requests. It accepts HTTP basic authentication (BasicAuthentication). An API key is passed in the header as Authorization (TokenAuthentication). By default, every request must be authenticated.

  • BasicAuthentication — Basic authentication scheme Use the HTTP Basic authentication scheme for InfluxDB /api/v2 API operations that support it: Syntax Authorization: Basic BASE64ENC…
  • TokenAuthentication — Use the [Token authentication](section/Authentication/TokenAuthentication) scheme to authenticate to the InfluxDB API. In your API requests, send an Authorizat…

Paths & Operations 8

Across 5 paths, the API surfaces 8 operations — 1 DELETE, 2 GET, 1 PATCH, 4 POST. Each is listed below with its method, path, parameters, and response codes.

Templates 8

Export and apply InfluxDB templates. Manage stacks of templated InfluxDB resources. InfluxDB templates are prepackaged configurations for resources. Use InfluxDB templates to conf…

GET
/api/v2/stacks
List installed stacks
ListStacks 3 params → 200400401500default
POST
/api/v2/stacks
Create a stack
CreateStack body → 201401422500default
DELETE
/api/v2/stacks/{stack_id}
Delete a stack and associated resources
DeleteStack 2 params → 204default
GET
/api/v2/stacks/{stack_id}
Retrieve a stack
ReadStack 1 param → 200default
PATCH
/api/v2/stacks/{stack_id}
Update a stack
UpdateStack 1 param body → 200default
POST
/api/v2/stacks/{stack_id}/uninstall
Uninstall a stack
UninstallStack 1 param → 200default
POST
/api/v2/templates/apply
Apply or dry-run a template
ApplyTemplate body → 200201422500default
POST
/api/v2/templates/export
Export a new template
ExportTemplate body → 200default

Schemas 80

The contract defines 80 schemas that model the data the API accepts and returns. The most detailed are ScatterViewProperties (32 properties), HeatmapViewProperties (31 properties), LinePlusSingleStatProperties (30 properties), BandViewProperties (29 properties). Each schema is shown below with its type and property counts.

AxisScale
string
Scale is the axis formatting scale. Supported: "log", "linear"
NotificationEndpointType
string
SimpleTableViewProperties
object
6 properties 6 required
TemplateEnvReferences
array
HeatmapViewProperties
object
31 properties 17 required
Stack
object
4 properties
RetentionRule
object
3 properties 1 required
DecimalPlaces
object
Indicates whether decimal places should be enforced, and how many digits it should show.
2 properties
RenamableField
object
Describes a field that can be renamed and made visible or invisible.
3 properties
LinePlusSingleStatProperties
object
30 properties 11 required
Labels
array
LesserThreshold
TableViewProperties
object
10 properties 10 required
Axis
object
Axis used in a visualization.
6 properties
CustomCheck
BandViewProperties
object
29 properties 8 required
TemplateExportByName
object
3 properties
Threshold
ThresholdCheck
ThresholdBase
object
2 properties
MosaicViewProperties
object
29 properties 17 required
CheckBase
object
15 properties 3 required
GaugeViewProperties
object
11 properties 11 required
XYGeom
string
SlackNotificationEndpoint
object
ScatterViewProperties
object
32 properties 18 required
DeadmanCheck
CheckDiscriminator
NotificationEndpointBase
object
11 properties 2 required
HTTPNotificationEndpoint
object
BuilderFunctionsType
object
1 property
GreaterThreshold
Error
object
4 properties 1 required
MarkdownViewProperties
object
3 properties 3 required
GeoPointMapViewLayer
RangeThreshold
TelegrafRequest
object
5 properties
ConstantVariableProperties
object
2 properties
PagerDutyNotificationEndpoint
object
SingleStatViewProperties
object
12 properties 11 required
Check
BuilderAggregateFunctionType
string
QueryVariableProperties
object
2 properties
ErrorCode
string
code is the machine-readable error code.
DashboardColor
object
Defines an encoding of data value into color space.
5 properties 5 required
HistogramViewProperties
object
16 properties 12 required
TemplateExportByID
object
3 properties
Label
object
4 properties
DashboardQuery
object
4 properties
GeoViewLayer
object
TemplateSummaryLabel
object
7 properties
VariableProperties
object
Axes
object
The viewport for a View's visualizations
2 properties 2 required
XYViewProperties
object
29 properties 9 required
TelegramNotificationEndpoint
object
CheckViewProperties
object
11 properties 5 required
LatLonColumns
object
Object type to define lat/lon columns
2 properties 2 required
TaskStatusType
string
inactive cancels scheduled runs and prevents manual runs of the task.
ViewProperties
LatLonColumn
object
Object type for key and column definitions
2 properties 2 required
GeoTrackMapViewLayer
object
4 properties
TemplateSummary
object
5 properties
NotificationEndpointDiscriminator
GeoCircleViewLayer
Link
string
URI of resource.
Template
array
TemplateChart
object
5 properties
ColorMapping
object
A color mapping is an object that maps time series data to a UI color scheme to allow the UI to render graphs consistent colors across reloads.
MapVariableProperties
object
2 properties
GeoHeatMapViewLayer
BuilderTagsType
object
3 properties
CheckStatusLevel
string
The state to record if check matches a criteria.
BuilderConfig
object
4 properties
RetentionRules
array
Retention rules to expire or retain data. The InfluxDB /api/v2 API uses RetentionRules to configure the [retention period](https://docs.influxdata.com/influxdb…
GeoViewLayerProperties
object
1 property 1 required
TemplateApply
object
9 properties
GeoViewProperties
object
15 properties 10 required
TemplateKind
string
QueryEditMode
string
StaticLegend
object
StaticLegend represents the options specific to the static legend
7 properties

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

influxdb-templates-api-openapi.yml Raw ↑

Other APIs InfluxDB publishes across the network.

InfluxDB Authorizations (API tokens) API
InfluxDB Bucket Schemas API
InfluxDB Buckets API
InfluxDB Cells API
InfluxDB Checks API
InfluxDB Config API
InfluxDB Dashboards API
InfluxDB Data I/O endpoints API
InfluxDB DBRPs API
InfluxDB Delete API
InfluxDB Invokable Scripts API
InfluxDB Labels API