diff --git a/api-docs/v2.0/swagger.yml b/api-docs/v2.0/swagger.yml index a481596f8..94df83321 100644 --- a/api-docs/v2.0/swagger.yml +++ b/api-docs/v2.0/swagger.yml @@ -12,17 +12,17 @@ paths: security: - BasicAuth: [] parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: - '204': + "204": description: Successfully authenticated - '401': + "401": description: Unauthorized access content: application/json: schema: $ref: "#/components/schemas/Error" - '403': + "403": description: user account is disabled content: application/json: @@ -39,11 +39,11 @@ paths: operationId: PostSignout summary: Expire the current session parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: - '204': + "204": description: Session successfully expired - '401': + "401": description: Unauthorized access content: application/json: @@ -60,7 +60,7 @@ paths: operationId: GetRoutes summary: Map of all top level routes available parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: default: description: All routes @@ -76,11 +76,10 @@ paths: summary: Check if database has default user, org, bucket description: Returns `true` if no default user, organization, or bucket has been created. parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: - '200': - description: - allowed true or false + "200": + description: allowed true or false content: application/json: schema: @@ -92,7 +91,7 @@ paths: summary: Set up initial user, org and bucket description: Post an onboarding request to set up initial user, org and bucket. parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Source to create required: true @@ -101,31 +100,66 @@ paths: schema: $ref: "#/components/schemas/OnboardingRequest" responses: - '201': + "201": description: Created default user, bucket, org content: application/json: schema: $ref: "#/components/schemas/OnboardingResponse" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + /setup/user: + post: + operationId: PostSetupUser + tags: + - Setup + summary: Set up a new user, org and bucket + description: Post an onboarding request to set up a new user, org and bucket. + parameters: + - $ref: "#/components/parameters/TraceSpan" + requestBody: + description: Source to create + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/OnboardingRequest" + responses: + "201": + description: Created default user, bucket, org + content: + application/json: + schema: + $ref: "#/components/schemas/OnboardingResponse" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" /documents/templates: get: operationId: GetDocumentsTemplates tags: - Templates parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: org - description: Specifies the name of the organization of the template. - schema: - type: string - - in: query - name: orgID - description: Specifies the organization ID of the template. - schema: - type: string + - $ref: "#/components/parameters/TraceSpan" + - in: query + name: org + description: Specifies the name of the organization of the template. + schema: + type: string + - in: query + name: orgID + description: Specifies the organization ID of the template. + schema: + type: string responses: - '200': + "200": description: A list of template documents content: application/json: @@ -143,7 +177,7 @@ paths: - Templates summary: Create a template parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Template that will be created required: true @@ -152,7 +186,7 @@ paths: schema: $ref: "#/components/schemas/DocumentCreate" responses: - '201': + "201": description: Template created content: application/json: @@ -164,13 +198,13 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/documents/templates/{templateID}': + "/documents/templates/{templateID}": get: operationId: GetDocumentsTemplatesID tags: - Templates parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: templateID schema: @@ -178,7 +212,7 @@ paths: required: true description: The template ID. responses: - '200': + "200": description: The template requested content: application/json: @@ -195,7 +229,7 @@ paths: tags: - Templates parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: templateID schema: @@ -210,7 +244,7 @@ paths: schema: $ref: "#/components/schemas/DocumentUpdate" responses: - '200': + "200": description: The newly updated template content: application/json: @@ -228,7 +262,7 @@ paths: - Templates summary: Delete a template parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: templateID schema: @@ -236,7 +270,7 @@ paths: required: true description: The template ID. responses: - '204': + "204": description: Delete has been accepted default: description: Unexpected error @@ -244,14 +278,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/documents/templates/{templateID}/labels': + "/documents/templates/{templateID}/labels": get: operationId: GetDocumentsTemplatesIDLabels tags: - Templates summary: List all labels for a template parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: templateID schema: @@ -259,7 +293,7 @@ paths: required: true description: The template ID. responses: - '200': + "200": description: A list of all labels for a template content: application/json: @@ -277,7 +311,7 @@ paths: - Templates summary: Add a label to a template parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: templateID schema: @@ -292,7 +326,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The label added to the template content: application/json: @@ -304,14 +338,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/documents/templates/{templateID}/labels/{labelID}': + "/documents/templates/{templateID}/labels/{labelID}": delete: operationId: DeleteDocumentsTemplatesIDLabelsID tags: - Templates summary: Delete a label from a template parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: templateID schema: @@ -325,9 +359,9 @@ paths: required: true description: The label ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Template not found content: application/json: @@ -339,18 +373,233 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" + /dbrps: + get: + operationId: GetDBRPs + tags: + - DBRPs + summary: List all database retention policy mappings + parameters: + - $ref: "#/components/parameters/TraceSpan" + - in: query + name: orgID + required: true + description: Specifies the organization ID to filter on + schema: + type: string + - in: query + name: id + description: Specifies the mapping ID to filter on + schema: + type: string + - in: query + name: bucketID + description: Specifies the bucket ID to filter on + schema: + type: string + - in: query + name: default + description: Specifies filtering on default + schema: + type: boolean + - in: query + name: db + description: Specifies the database to filter on + schema: + type: string + - in: query + name: rp + description: Specifies the retention policy to filter on + schema: + type: string + responses: + "200": + description: A list of all database retention policy mappings + content: + application/json: + schema: + $ref: "#/components/schemas/DBRPs" + "400": + description: if any of the parameter passed is invalid + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + post: + operationId: PostDBRP + tags: + - DBRPs + summary: Add a database retention policy mapping + parameters: + - $ref: "#/components/parameters/TraceSpan" + requestBody: + description: The database retention policy mapping to add + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/DBRP" + responses: + "201": + description: Database retention policy mapping created + content: + application/json: + schema: + $ref: "#/components/schemas/DBRP" + "400": + description: if any of the IDs in the mapping is invalid + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "/dbrps/{dbrpID}": + get: + operationId: GetDBRPsID + tags: + - DBRPs + summary: Retrieve a database retention policy mapping + parameters: + - $ref: "#/components/parameters/TraceSpan" + - in: query + name: orgID + required: true + description: Specifies the organization ID of the mapping + schema: + type: string + - in: path + name: dbrpID + schema: + type: string + required: true + description: The database retention policy mapping ID + responses: + "200": + description: The database retention policy requested + content: + application/json: + schema: + $ref: "#/components/schemas/DBRP" + "400": + description: if any of the IDs passed is invalid + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + patch: + operationId: PatchDBRPID + tags: + - DBRPs + summary: Update a database retention policy mapping + requestBody: + description: Database retention policy update to apply + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/DBRPUpdate" + parameters: + - $ref: "#/components/parameters/TraceSpan" + - in: query + name: orgID + required: true + description: Specifies the organization ID of the mapping + schema: + type: string + - in: path + name: dbrpID + schema: + type: string + required: true + description: The database retention policy mapping. + responses: + "200": + description: An updated mapping + content: + application/json: + schema: + $ref: "#/components/schemas/DBRP" + "404": + description: The mapping was not found + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "400": + description: if any of the IDs passed is invalid + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + delete: + operationId: DeleteDBRPID + tags: + - DBRPs + summary: Delete a database retention policy + parameters: + - $ref: "#/components/parameters/TraceSpan" + - in: query + name: orgID + required: true + description: Specifies the organization ID of the mapping + schema: + type: string + - in: path + name: dbrpID + schema: + type: string + required: true + description: The database retention policy mapping + responses: + "204": + description: Delete has been accepted + "400": + description: if any of the IDs passed is invalid + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" /telegraf/plugins: get: operationId: GetTelegrafPlugins parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: type - description: The type of plugin desired. - schema: - type: string + - $ref: "#/components/parameters/TraceSpan" + - in: query + name: type + description: The type of plugin desired. + schema: + type: string responses: - '200': + "200": description: A list of Telegraf plugins. content: application/json: @@ -368,14 +617,14 @@ paths: tags: - Telegrafs parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: orgID - description: The organization ID the Telegraf config belongs to. - schema: - type: string + - $ref: "#/components/parameters/TraceSpan" + - in: query + name: orgID + description: The organization ID the Telegraf config belongs to. + schema: + type: string responses: - '200': + "200": description: A list of Telegraf configs content: application/json: @@ -393,7 +642,7 @@ paths: - Telegrafs summary: Create a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Telegraf config to create required: true @@ -402,7 +651,7 @@ paths: schema: $ref: "#/components/schemas/TelegrafRequest" responses: - '201': + "201": description: Telegraf config created content: application/json: @@ -414,14 +663,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/telegrafs/{telegrafID}': + "/telegrafs/{telegrafID}": get: operationId: GetTelegrafsID tags: - Telegrafs summary: Retrieve a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -439,7 +688,7 @@ paths: - application/json - application/octet-stream responses: - '200': + "200": description: Telegraf config details content: application/toml: @@ -465,7 +714,7 @@ paths: - Telegrafs summary: Update a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -480,7 +729,7 @@ paths: schema: $ref: "#/components/schemas/TelegrafRequest" responses: - '200': + "200": description: An updated Telegraf config content: application/json: @@ -498,7 +747,7 @@ paths: - Telegrafs summary: Delete a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -506,7 +755,7 @@ paths: required: true description: The Telegraf config ID. responses: - '204': + "204": description: Delete has been accepted default: description: Unexpected error @@ -514,14 +763,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/telegrafs/{telegrafID}/labels': + "/telegrafs/{telegrafID}/labels": get: operationId: GetTelegrafsIDLabels tags: - Telegrafs summary: List all labels for a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -529,7 +778,7 @@ paths: required: true description: The Telegraf config ID. responses: - '200': + "200": description: A list of all labels for a Telegraf config content: application/json: @@ -547,7 +796,7 @@ paths: - Telegrafs summary: Add a label to a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -562,7 +811,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The label added to the Telegraf config content: application/json: @@ -574,14 +823,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/telegrafs/{telegrafID}/labels/{labelID}': + "/telegrafs/{telegrafID}/labels/{labelID}": delete: operationId: DeleteTelegrafsIDLabelsID tags: - Telegrafs summary: Delete a label from a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -595,9 +844,9 @@ paths: required: true description: The label ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Telegraf config not found content: application/json: @@ -609,7 +858,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/telegrafs/{telegrafID}/members': + "/telegrafs/{telegrafID}/members": get: operationId: GetTelegrafsIDMembers tags: @@ -617,7 +866,7 @@ paths: - Telegrafs summary: List all users with member privileges for a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -625,7 +874,7 @@ paths: required: true description: The Telegraf config ID. responses: - '200': + "200": description: A list of Telegraf config members content: application/json: @@ -644,7 +893,7 @@ paths: - Telegrafs summary: Add a member to a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -659,7 +908,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Member added to Telegraf config content: application/json: @@ -671,7 +920,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/telegrafs/{telegrafID}/members/{userID}': + "/telegrafs/{telegrafID}/members/{userID}": delete: operationId: DeleteTelegrafsIDMembersID tags: @@ -679,7 +928,7 @@ paths: - Telegrafs summary: Remove a member from a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -693,7 +942,7 @@ paths: required: true description: The Telegraf config ID. responses: - '204': + "204": description: Member removed default: description: Unexpected error @@ -701,7 +950,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/telegrafs/{telegrafID}/owners': + "/telegrafs/{telegrafID}/owners": get: operationId: GetTelegrafsIDOwners tags: @@ -709,7 +958,7 @@ paths: - Telegrafs summary: List all owners of a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -717,7 +966,7 @@ paths: required: true description: The Telegraf config ID. responses: - '200': + "200": description: A list of Telegraf config owners content: application/json: @@ -736,7 +985,7 @@ paths: - Telegrafs summary: Add an owner to a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -751,7 +1000,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Telegraf config owner added content: application/json: @@ -763,7 +1012,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/telegrafs/{telegrafID}/owners/{userID}': + "/telegrafs/{telegrafID}/owners/{userID}": delete: operationId: DeleteTelegrafsIDOwnersID tags: @@ -771,7 +1020,7 @@ paths: - Telegrafs summary: Remove an owner from a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -785,7 +1034,7 @@ paths: required: true description: The Telegraf config ID. responses: - '204': + "204": description: Owner removed default: description: Unexpected error @@ -800,31 +1049,31 @@ paths: - ScraperTargets summary: Get all scraper targets parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: name - description: Specifies the name of the scraper target. - schema: - type: string - - in: query - name: id - description: List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used. - schema: - type: array - items: - type: string - - in: query - name: orgID - description: Specifies the organization ID of the scraper target. - schema: - type: string - - in: query - name: org - description: Specifies the organization name of the scraper target. - schema: + - $ref: "#/components/parameters/TraceSpan" + - in: query + name: name + description: Specifies the name of the scraper target. + schema: + type: string + - in: query + name: id + description: List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used. + schema: + type: array + items: type: string + - in: query + name: orgID + description: Specifies the organization ID of the scraper target. + schema: + type: string + - in: query + name: org + description: Specifies the organization name of the scraper target. + schema: + type: string responses: - '200': + "200": description: All scraper targets content: application/json: @@ -836,7 +1085,7 @@ paths: tags: - ScraperTargets parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Scraper target to create required: true @@ -845,7 +1094,7 @@ paths: schema: $ref: "#/components/schemas/ScraperTargetRequest" responses: - '201': + "201": description: Scraper target created content: application/json: @@ -857,14 +1106,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/scrapers/{scraperTargetID}': + "/scrapers/{scraperTargetID}": get: operationId: GetScrapersID tags: - ScraperTargets summary: Get a scraper target by ID parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID required: true @@ -872,7 +1121,7 @@ paths: type: string description: The scraper target ID. responses: - '200': + "200": description: Scraper target updated content: application/json: @@ -890,7 +1139,7 @@ paths: - ScraperTargets summary: Delete a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID required: true @@ -898,7 +1147,7 @@ paths: type: string description: The scraper target ID. responses: - '204': + "204": description: Scraper target deleted default: description: Internal server error @@ -912,7 +1161,7 @@ paths: tags: - ScraperTargets parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID required: true @@ -927,7 +1176,7 @@ paths: schema: $ref: "#/components/schemas/ScraperTargetRequest" responses: - '200': + "200": description: Scraper target updated content: application/json: @@ -939,14 +1188,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/scrapers/{scraperTargetID}/labels': + "/scrapers/{scraperTargetID}/labels": get: operationId: GetScrapersIDLabels tags: - ScraperTargets summary: List all labels for a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID schema: @@ -954,7 +1203,7 @@ paths: required: true description: The scraper target ID. responses: - '200': + "200": description: A list of all labels for a scraper target content: application/json: @@ -972,7 +1221,7 @@ paths: - ScraperTargets summary: Add a label to a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID schema: @@ -987,7 +1236,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The newly added label content: application/json: @@ -999,14 +1248,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/scrapers/{scraperTargetID}/labels/{labelID}': + "/scrapers/{scraperTargetID}/labels/{labelID}": delete: operationId: DeleteScrapersIDLabelsID tags: - ScraperTargets summary: Delete a label from a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID schema: @@ -1020,9 +1269,9 @@ paths: required: true description: The label ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Scraper target not found content: application/json: @@ -1040,7 +1289,7 @@ paths: - ScraperTargets summary: Update a label on a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID schema: @@ -1061,9 +1310,9 @@ paths: schema: $ref: "#/components/schemas/Label" responses: - '200': + "200": description: Updated successfully - '404': + "404": description: Scraper target not found content: application/json: @@ -1075,7 +1324,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/scrapers/{scraperTargetID}/members': + "/scrapers/{scraperTargetID}/members": get: operationId: GetScrapersIDMembers tags: @@ -1083,7 +1332,7 @@ paths: - ScraperTargets summary: List all users with member privileges for a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID schema: @@ -1091,7 +1340,7 @@ paths: required: true description: The scraper target ID. responses: - '200': + "200": description: A list of scraper target members content: application/json: @@ -1110,7 +1359,7 @@ paths: - ScraperTargets summary: Add a member to a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID schema: @@ -1125,7 +1374,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Member added to scraper targets content: application/json: @@ -1137,7 +1386,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/scrapers/{scraperTargetID}/members/{userID}': + "/scrapers/{scraperTargetID}/members/{userID}": delete: operationId: DeleteScrapersIDMembersID tags: @@ -1145,7 +1394,7 @@ paths: - ScraperTargets summary: Remove a member from a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -1159,7 +1408,7 @@ paths: required: true description: The scraper target ID. responses: - '204': + "204": description: Member removed default: description: Unexpected error @@ -1167,7 +1416,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/scrapers/{scraperTargetID}/owners': + "/scrapers/{scraperTargetID}/owners": get: operationId: GetScrapersIDOwners tags: @@ -1175,7 +1424,7 @@ paths: - ScraperTargets summary: List all owners of a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID schema: @@ -1183,7 +1432,7 @@ paths: required: true description: The scraper target ID. responses: - '200': + "200": description: A list of scraper target owners content: application/json: @@ -1202,7 +1451,7 @@ paths: - ScraperTargets summary: Add an owner to a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID schema: @@ -1217,7 +1466,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Scraper target owner added content: application/json: @@ -1229,7 +1478,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/scrapers/{scraperTargetID}/owners/{userID}': + "/scrapers/{scraperTargetID}/owners/{userID}": delete: operationId: DeleteScrapersIDOwnersID tags: @@ -1237,7 +1486,7 @@ paths: - ScraperTargets summary: Remove an owner from a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -1251,7 +1500,7 @@ paths: required: true description: The scraper target ID. responses: - '204': + "204": description: Owner removed default: description: Unexpected error @@ -1266,7 +1515,7 @@ paths: - Variables summary: Get all variables parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: query name: org description: The organization name. @@ -1278,13 +1527,13 @@ paths: schema: type: string responses: - '200': + "200": description: All variables for an organization content: application/json: schema: $ref: "#/components/schemas/Variables" - '400': + "400": description: Invalid request content: application/json: @@ -1302,7 +1551,7 @@ paths: tags: - Variables parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Variable to create required: true @@ -1311,7 +1560,7 @@ paths: schema: $ref: "#/components/schemas/Variable" responses: - '201': + "201": description: Variable created content: application/json: @@ -1323,14 +1572,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/variables/{variableID}': + "/variables/{variableID}": get: operationId: GetVariablesID tags: - Variables summary: Get a variable parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: variableID required: true @@ -1338,13 +1587,13 @@ paths: type: string description: The variable ID. responses: - '200': + "200": description: Variable found content: application/json: schema: $ref: "#/components/schemas/Variable" - '404': + "404": description: Variable not found content: application/json: @@ -1362,7 +1611,7 @@ paths: - Variables summary: Delete a variable parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: variableID required: true @@ -1370,7 +1619,7 @@ paths: type: string description: The variable ID. responses: - '204': + "204": description: Variable deleted default: description: Internal server error @@ -1384,7 +1633,7 @@ paths: tags: - Variables parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: variableID required: true @@ -1399,7 +1648,7 @@ paths: schema: $ref: "#/components/schemas/Variable" responses: - '200': + "200": description: Variable updated content: application/json: @@ -1417,7 +1666,7 @@ paths: tags: - Variables parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: variableID required: true @@ -1432,7 +1681,7 @@ paths: schema: $ref: "#/components/schemas/Variable" responses: - '200': + "200": description: Variable updated content: application/json: @@ -1444,14 +1693,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/variables/{variableID}/labels': + "/variables/{variableID}/labels": get: operationId: GetVariablesIDLabels tags: - Variables summary: List all labels for a variable parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: variableID schema: @@ -1459,7 +1708,7 @@ paths: required: true description: The variable ID. responses: - '200': + "200": description: A list of all labels for a variable content: application/json: @@ -1477,7 +1726,7 @@ paths: - Variables summary: Add a label to a variable parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: variableID schema: @@ -1492,7 +1741,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The newly added label content: application/json: @@ -1504,14 +1753,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/variables/{variableID}/labels/{labelID}': + "/variables/{variableID}/labels/{labelID}": delete: operationId: DeleteVariablesIDLabelsID tags: - Variables summary: Delete a label from a variable parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: variableID schema: @@ -1525,9 +1774,9 @@ paths: required: true description: The label ID to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Variable not found content: application/json: @@ -1553,7 +1802,7 @@ paths: schema: type: string parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: header name: Content-Encoding description: When present, its value indicates to the database that compression is applied to the line-protocol body. @@ -1615,33 +1864,33 @@ paths: schema: $ref: "#/components/schemas/WritePrecision" responses: - '204': + "204": description: Write data is correctly formatted and accepted for writing to the bucket. - '400': + "400": description: Line protocol poorly formed and no points were written. Response can be used to determine the first malformed line in the body line-protocol. All data in body was rejected and not written. content: application/json: schema: $ref: "#/components/schemas/LineProtocolError" - '401': + "401": description: Token does not have sufficient permissions to write to this organization and bucket or the organization and bucket do not exist. content: application/json: schema: $ref: "#/components/schemas/Error" - '403': + "403": description: No token was sent and they are required. content: application/json: schema: $ref: "#/components/schemas/Error" - '413': + "413": description: Write has been rejected because the payload is too large. Error message returns max size supported. All data in body was rejected and not written. content: application/json: schema: $ref: "#/components/schemas/LineProtocolLengthError" - '429': + "429": description: Token is temporarily over quota. The Retry-After header describes when to try the write again. headers: Retry-After: @@ -1649,7 +1898,7 @@ paths: schema: type: integer format: int32 - '503': + "503": description: Server is temporarily unavailable to accept writes. The Retry-After header describes when to try the write again. headers: Retry-After: @@ -1667,14 +1916,14 @@ paths: post: summary: Delete time series data from InfluxDB requestBody: - description: Predicate delete request - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/DeletePredicateRequest" + description: Predicate delete request + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/DeletePredicateRequest" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: query name: org description: Specifies the organization to delete data from. @@ -1699,21 +1948,21 @@ paths: type: string description: Only points from this bucket ID are deleted. responses: - '204': + "204": description: delete has been accepted - '400': + "400": description: invalid request. content: application/json: schema: $ref: "#/components/schemas/Error" - '404': + "404": description: the bucket or organization is not found. content: application/json: schema: $ref: "#/components/schemas/Error" - '403': + "403": description: no token was sent or does not have sufficient permissions. content: application/json: @@ -1727,16 +1976,16 @@ paths: $ref: "#/components/schemas/Error" /ready: servers: - - url: / + - url: / get: operationId: GetReady tags: - Ready summary: Get the readiness of an instance at startup parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: - '200': + "200": description: The instance is ready content: application/json: @@ -1750,22 +1999,22 @@ paths: $ref: "#/components/schemas/Error" /health: servers: - - url: / + - url: / get: operationId: GetHealth tags: - Health summary: Get the health of an instance parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: - '200': + "200": description: The instance is healthy content: application/json: schema: $ref: "#/components/schemas/HealthCheck" - '503': + "503": description: The instance is unhealthy content: application/json: @@ -1784,16 +2033,16 @@ paths: - Sources summary: Creates a source parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: - description: Source to create - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/Source" + description: Source to create + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/Source" responses: - '201': + "201": description: Created Source content: application/json: @@ -1811,14 +2060,14 @@ paths: - Sources summary: Get all sources parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: org - description: The organization name. - schema: - type: string + - $ref: "#/components/parameters/TraceSpan" + - in: query + name: org + description: The organization name. + schema: + type: string responses: - '200': + "200": description: All sources content: application/json: @@ -1837,7 +2086,7 @@ paths: - Sources summary: Delete a source parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: sourceID schema: @@ -1845,9 +2094,9 @@ paths: required: true description: The source ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: View not found content: application/json: @@ -1865,28 +2114,28 @@ paths: - Sources summary: Update a Source parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: sourceID - schema: - type: string - required: true - description: The source ID. - requestBody: - description: Source update + - $ref: "#/components/parameters/TraceSpan" + - in: path + name: sourceID + schema: + type: string required: true - content: - application/json: - schema: - $ref: "#/components/schemas/Source" + description: The source ID. + requestBody: + description: Source update + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/Source" responses: - '200': + "200": description: Created Source content: application/json: schema: $ref: "#/components/schemas/Source" - '404': + "404": description: Source not found content: application/json: @@ -1904,21 +2153,21 @@ paths: - Sources summary: Get a source parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: sourceID - schema: - type: string - required: true - description: The source ID. + - $ref: "#/components/parameters/TraceSpan" + - in: path + name: sourceID + schema: + type: string + required: true + description: The source ID. responses: - '200': + "200": description: A source content: application/json: schema: $ref: "#/components/schemas/Source" - '404': + "404": description: Source not found content: application/json: @@ -1937,21 +2186,21 @@ paths: - Sources summary: Get the health of a source parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: sourceID - schema: - type: string - required: true - description: The source ID. + - $ref: "#/components/parameters/TraceSpan" + - in: path + name: sourceID + schema: + type: string + required: true + description: The source ID. responses: - '200': + "200": description: The source is healthy content: application/json: schema: $ref: "#/components/schemas/HealthCheck" - '503': + "503": description: The source is not healthy content: application/json: @@ -1971,26 +2220,26 @@ paths: - Buckets summary: Get buckets in a source parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: sourceID - schema: - type: string - required: true - description: The source ID. - - in: query - name: org - description: The organization name. - schema: - type: string + - $ref: "#/components/parameters/TraceSpan" + - in: path + name: sourceID + schema: + type: string + required: true + description: The source ID. + - in: query + name: org + description: The organization name. + schema: + type: string responses: - '200': + "200": description: A source content: application/json: schema: $ref: "#/components/schemas/Buckets" - '404': + "404": description: Source not found content: application/json: @@ -2009,14 +2258,14 @@ paths: - Labels summary: Create a label requestBody: - description: Label to create - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/LabelCreateRequest" + description: Label to create + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/LabelCreateRequest" responses: - '201': + "201": description: Added label content: application/json: @@ -2034,14 +2283,14 @@ paths: - Labels summary: Get all labels parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: orgID - description: The organization ID. - schema: - type: string + - $ref: "#/components/parameters/TraceSpan" + - in: query + name: orgID + description: The organization ID. + schema: + type: string responses: - '200': + "200": description: All labels content: application/json: @@ -2060,7 +2309,7 @@ paths: - Labels summary: Get a label parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: labelID schema: @@ -2068,7 +2317,7 @@ paths: required: true description: The ID of the label to update. responses: - '200': + "200": description: A label content: application/json: @@ -2086,14 +2335,14 @@ paths: - Labels summary: Update a label requestBody: - description: Label update - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/LabelUpdate" + description: Label update + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/LabelUpdate" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: labelID schema: @@ -2101,13 +2350,13 @@ paths: required: true description: The ID of the label to update. responses: - '200': + "200": description: Updated label content: application/json: schema: $ref: "#/components/schemas/LabelResponse" - '404': + "404": description: Label not found content: application/json: @@ -2125,7 +2374,7 @@ paths: - Labels summary: Delete a label parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: labelID schema: @@ -2133,9 +2382,9 @@ paths: required: true description: The ID of the label to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Label not found content: application/json: @@ -2154,16 +2403,16 @@ paths: - Dashboards summary: Create a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: - description: Dashboard to create - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/CreateDashboardRequest" + description: Dashboard to create + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateDashboardRequest" responses: - '201': + "201": description: Added dashboard content: application/json: @@ -2183,40 +2432,40 @@ paths: - Dashboards summary: Get all dashboards parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: query - name: owner - description: The owner ID. - schema: - type: string - - in: query - name: sortBy - description: The column to sort by. - schema: - type: string - enum: - - "ID" - - "CreatedAt" - - "UpdatedAt" - - in: query - name: id - description: List of dashboard IDs to return. If both `id and `owner` are specified, only `id` is used. - schema: - type: array - items: - type: string - - in: query - name: orgID - description: The organization ID. - schema: - type: string - - in: query - name: org - description: The organization name. - schema: + - $ref: "#/components/parameters/TraceSpan" + - in: query + name: owner + description: The owner ID. + schema: + type: string + - in: query + name: sortBy + description: The column to sort by. + schema: + type: string + enum: + - "ID" + - "CreatedAt" + - "UpdatedAt" + - in: query + name: id + description: List of dashboard IDs to return. If both `id and `owner` are specified, only `id` is used. + schema: + type: array + items: type: string + - in: query + name: orgID + description: The organization ID. + schema: + type: string + - in: query + name: org + description: The organization name. + schema: + type: string responses: - '200': + "200": description: All dashboards content: application/json: @@ -2228,73 +2477,73 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}': + "/dashboards/{dashboardID}": get: operationId: GetDashboardsID tags: - Dashboards summary: Get a Dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: path - name: dashboardID - schema: - type: string - required: true - description: The ID of the dashboard to update. - - in: query - name: include - required: false - schema: - type: string - enum: - - properties - description: Includes the cell view properties in the response if set to `properties` + - $ref: "#/components/parameters/TraceSpan" + - in: path + name: dashboardID + schema: + type: string + required: true + description: The ID of the dashboard to update. + - in: query + name: include + required: false + schema: + type: string + enum: + - properties + description: Includes the cell view properties in the response if set to `properties` responses: - '200': - description: Get a single dashboard - content: - application/json: - schema: - oneOf: - - $ref: "#/components/schemas/Dashboard" - - $ref: "#/components/schemas/DashboardWithViewProperties" - '404': - description: Dashboard not found - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - default: - description: Unexpected error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" + "200": + description: Get a single dashboard + content: + application/json: + schema: + oneOf: + - $ref: "#/components/schemas/Dashboard" + - $ref: "#/components/schemas/DashboardWithViewProperties" + "404": + description: Dashboard not found + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" patch: operationId: PatchDashboardsID tags: - Dashboards summary: Update a dashboard requestBody: - description: Patching of a dashboard - required: true - content: - application/json: - schema: - type: object - properties: - name: - description: optional, when provided will replace the name - type: string - description: - description: optional, when provided will replace the description - type: string - cells: - description: optional, when provided will replace all existing cells with the cells provided - $ref: "#/components/schemas/CellWithViewProperties" + description: Patching of a dashboard + required: true + content: + application/json: + schema: + type: object + properties: + name: + description: optional, when provided will replace the name + type: string + description: + description: optional, when provided will replace the description + type: string + cells: + description: optional, when provided will replace all existing cells with the cells provided + $ref: "#/components/schemas/CellWithViewProperties" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2302,13 +2551,13 @@ paths: required: true description: The ID of the dashboard to update. responses: - '200': + "200": description: Updated dashboard content: application/json: schema: $ref: "#/components/schemas/Dashboard" - '404': + "404": description: Dashboard not found content: application/json: @@ -2326,7 +2575,7 @@ paths: - Dashboards summary: Delete a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2334,9 +2583,9 @@ paths: required: true description: The ID of the dashboard to update. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Dashboard not found content: application/json: @@ -2348,7 +2597,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/cells': + "/dashboards/{dashboardID}/cells": put: operationId: PutDashboardsIDCells tags: @@ -2357,13 +2606,13 @@ paths: summary: Replace cells in a dashboard description: Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells. requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/Cells" + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/Cells" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2371,13 +2620,13 @@ paths: required: true description: The ID of the dashboard to update. responses: - '201': + "201": description: Replaced dashboard cells content: application/json: schema: $ref: "#/components/schemas/Dashboard" - '404': + "404": description: Dashboard not found content: application/json: @@ -2396,14 +2645,14 @@ paths: - Dashboards summary: Create a dashboard cell requestBody: - description: Cell that will be added - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/CreateCell" + description: Cell that will be added + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateCell" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2411,13 +2660,13 @@ paths: required: true description: The ID of the dashboard to update. responses: - '201': + "201": description: Cell successfully added content: application/json: schema: $ref: "#/components/schemas/Cell" - '404': + "404": description: Dashboard not found content: application/json: @@ -2429,7 +2678,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/cells/{cellID}': + "/dashboards/{dashboardID}/cells/{cellID}": patch: operationId: PatchDashboardsIDCellsID tags: @@ -2438,13 +2687,13 @@ paths: summary: Update the non-positional information related to a cell description: Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts. requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/CellUpdate" + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CellUpdate" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2458,13 +2707,13 @@ paths: required: true description: The ID of the cell to update. responses: - '200': + "200": description: Updated dashboard cell content: application/json: schema: $ref: "#/components/schemas/Cell" - '404': + "404": description: Cell or dashboard not found content: application/json: @@ -2483,7 +2732,7 @@ paths: - Dashboards summary: Delete a dashboard cell parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2497,9 +2746,9 @@ paths: required: true description: The ID of the cell to delete. responses: - '204': + "204": description: Cell successfully deleted - '404': + "404": description: Cell or dashboard not found content: application/json: @@ -2511,7 +2760,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/cells/{cellID}/view': + "/dashboards/{dashboardID}/cells/{cellID}/view": get: operationId: GetDashboardsIDCellsIDView tags: @@ -2520,7 +2769,7 @@ paths: - Views summary: Retrieve the view for a cell parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2534,13 +2783,13 @@ paths: required: true description: The cell ID. responses: - '200': + "200": description: A dashboard cells view content: application/json: schema: $ref: "#/components/schemas/View" - '404': + "404": description: Cell or dashboard not found content: application/json: @@ -2560,13 +2809,13 @@ paths: - Views summary: Update the view for a cell requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/View" + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/View" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2580,13 +2829,13 @@ paths: required: true description: The ID of the cell to update. responses: - '200': + "200": description: Updated cell view content: application/json: schema: $ref: "#/components/schemas/View" - '404': + "404": description: Cell or dashboard not found content: application/json: @@ -2598,14 +2847,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/labels': + "/dashboards/{dashboardID}/labels": get: operationId: GetDashboardsIDLabels tags: - Dashboards summary: list all labels for a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2613,7 +2862,7 @@ paths: required: true description: The dashboard ID. responses: - '200': + "200": description: A list of all labels for a dashboard content: application/json: @@ -2631,7 +2880,7 @@ paths: - Dashboards summary: Add a label to a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2646,7 +2895,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The label added to the dashboard content: application/json: @@ -2658,14 +2907,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/labels/{labelID}': + "/dashboards/{dashboardID}/labels/{labelID}": delete: operationId: DeleteDashboardsIDLabelsID tags: - Dashboards summary: Delete a label from a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2679,9 +2928,9 @@ paths: required: true description: The ID of the label to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Dashboard not found content: application/json: @@ -2693,7 +2942,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/members': + "/dashboards/{dashboardID}/members": get: operationId: GetDashboardsIDMembers tags: @@ -2701,7 +2950,7 @@ paths: - Dashboards summary: List all dashboard members parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2709,7 +2958,7 @@ paths: required: true description: The dashboard ID. responses: - '200': + "200": description: A list of users who have member privileges for a dashboard content: application/json: @@ -2728,7 +2977,7 @@ paths: - Dashboards summary: Add a member to a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2743,7 +2992,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Added to dashboard members content: application/json: @@ -2755,7 +3004,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/members/{userID}': + "/dashboards/{dashboardID}/members/{userID}": delete: operationId: DeleteDashboardsIDMembersID tags: @@ -2763,7 +3012,7 @@ paths: - Dashboards summary: Remove a member from a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -2777,7 +3026,7 @@ paths: required: true description: The dashboard ID. responses: - '204': + "204": description: Member removed default: description: Unexpected error @@ -2785,7 +3034,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/owners': + "/dashboards/{dashboardID}/owners": get: operationId: GetDashboardsIDOwners tags: @@ -2793,7 +3042,7 @@ paths: - Dashboards summary: List all dashboard owners parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2801,7 +3050,7 @@ paths: required: true description: The dashboard ID. responses: - '200': + "200": description: A list of users who have owner privileges for a dashboard content: application/json: @@ -2820,7 +3069,7 @@ paths: - Dashboards summary: Add an owner to a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2835,7 +3084,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Added to dashboard owners content: application/json: @@ -2847,7 +3096,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/owners/{userID}': + "/dashboards/{dashboardID}/owners/{userID}": delete: operationId: DeleteDashboardsIDOwnersID tags: @@ -2855,7 +3104,7 @@ paths: - Dashboards summary: Remove an owner from a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -2869,7 +3118,7 @@ paths: required: true description: The dashboard ID. responses: - '204': + "204": description: Owner removed default: description: Unexpected error @@ -2877,7 +3126,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/logs': + "/dashboards/{dashboardID}/logs": get: operationId: GetDashboardsIDLogs tags: @@ -2885,9 +3134,9 @@ paths: - OperationLogs summary: Retrieve operation logs for a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' + - $ref: "#/components/parameters/TraceSpan" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Limit" - in: path name: dashboardID required: true @@ -2895,7 +3144,7 @@ paths: schema: type: string responses: - '200': + "200": description: Operation logs for the dashboard content: application/json: @@ -2914,13 +3163,13 @@ paths: tags: - Query parameters: - - $ref: '#/components/parameters/TraceSpan' - - in: header - name: Content-Type - schema: - type: string - enum: - - application/json + - $ref: "#/components/parameters/TraceSpan" + - in: header + name: Content-Type + schema: + type: string + enum: + - application/json requestBody: description: Analyzed Flux query to generate abstract syntax tree. content: @@ -2928,7 +3177,7 @@ paths: schema: $ref: "#/components/schemas/LanguageRequest" responses: - '200': + "200": description: Abstract syntax tree of flux query. content: application/json: @@ -2946,9 +3195,9 @@ paths: tags: - Query parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: - '200': + "200": description: Suggestions for next functions in call chain content: application/json: @@ -2960,13 +3209,13 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/query/suggestions/{name}': + "/query/suggestions/{name}": get: operationId: GetQuerySuggestionsName tags: - Query parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: name schema: @@ -2974,7 +3223,7 @@ paths: required: true description: The name of the branching suggestion. responses: - '200': + "200": description: Suggestions for next functions in call chain content: application/json: @@ -2993,7 +3242,7 @@ paths: - Authorizations summary: List all authorizations parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: query name: userID schema: @@ -3015,7 +3264,7 @@ paths: type: string description: Only show authorizations that belong to a organization name. responses: - '200': + "200": description: A list of authorizations content: application/json: @@ -3033,7 +3282,7 @@ paths: - Authorizations summary: Create an authorization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Authorization to create required: true @@ -3042,13 +3291,13 @@ paths: schema: $ref: "#/components/schemas/Authorization" responses: - '201': + "201": description: Authorization created content: application/json: schema: $ref: "#/components/schemas/Authorization" - '400': + "400": description: Invalid request content: application/json: @@ -3067,7 +3316,7 @@ paths: - Authorizations summary: Retrieve an authorization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: authID schema: @@ -3075,7 +3324,7 @@ paths: required: true description: The ID of the authorization to get. responses: - '200': + "200": description: Authorization details content: application/json: @@ -3100,7 +3349,7 @@ paths: schema: $ref: "#/components/schemas/AuthorizationUpdateRequest" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: authID schema: @@ -3108,7 +3357,7 @@ paths: required: true description: The ID of the authorization to update. responses: - '200': + "200": description: The active or inactie authorization content: application/json: @@ -3126,7 +3375,7 @@ paths: - Authorizations summary: Delete a authorization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: authID schema: @@ -3134,7 +3383,7 @@ paths: required: true description: The ID of the authorization to delete. responses: - '204': + "204": description: Authorization deleted default: description: Unexpected error @@ -3149,7 +3398,7 @@ paths: - Query summary: Analyze an InfluxQL or Flux query parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: header name: Content-Type schema: @@ -3157,33 +3406,33 @@ paths: enum: - application/json requestBody: - description: Flux or InfluxQL query to analyze + description: Flux or InfluxQL query to analyze + content: + application/json: + schema: + $ref: "#/components/schemas/Query" + responses: + "200": + description: Query analyze results. Errors will be empty if the query is valid. content: application/json: schema: - $ref: "#/components/schemas/Query" - responses: - '200': - description: Query analyze results. Errors will be empty if the query is valid. - content: - application/json: - schema: - $ref: "#/components/schemas/AnalyzeQueryResponse" - default: - description: Internal server error - headers: - X-Influx-Error: - description: Error string describing the problem - schema: - type: string - X-Influx-Reference: - description: Reference code unique to the error type - schema: - type: integer - content: - application/json: - schema: - $ref: "#/components/schemas/Error" + $ref: "#/components/schemas/AnalyzeQueryResponse" + default: + description: Internal server error + headers: + X-Influx-Error: + description: Error string describing the problem + schema: + type: string + X-Influx-Reference: + description: Reference code unique to the error type + schema: + type: integer + content: + application/json: + schema: + $ref: "#/components/schemas/Error" /query: post: operationId: PostQuery @@ -3191,7 +3440,7 @@ paths: - Query summary: Query InfluxDB parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: header name: Accept-Encoding description: The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand. @@ -3220,61 +3469,61 @@ paths: schema: type: string requestBody: - description: Flux query or specification to execute + description: Flux query or specification to execute + content: + application/json: + schema: + oneOf: + - $ref: "#/components/schemas/Query" + - $ref: "#/components/schemas/InfluxQLQuery" + application/vnd.flux: + schema: + type: string + responses: + "200": + description: Query results + headers: + Content-Encoding: + description: The Content-Encoding entity header is used to compress the media-type. When present, its value indicates which encodings were applied to the entity-body + schema: + type: string + description: Specifies that the response in the body is encoded with gzip or not encoded with identity. + default: identity + enum: + - gzip + - identity + Trace-Id: + description: The Trace-Id header reports the request's trace ID, if one was generated. + schema: + type: string + description: Specifies the request's trace ID. + content: + text/csv: + schema: + type: string + example: > + result,table,_start,_stop,_time,region,host,_value + mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:00Z,east,A,15.43 + mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:20Z,east,B,59.25 + mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:40Z,east,C,52.62 + application/vnd.influx.arrow: + schema: + type: string + format: binary + "429": + description: Token is temporarily over quota. The Retry-After header describes when to try the read again. + headers: + Retry-After: + description: A non-negative decimal integer indicating the seconds to delay after the response is received. + schema: + type: integer + format: int32 + default: + description: Error processing query content: application/json: schema: - oneOf: - - $ref: "#/components/schemas/Query" - - $ref: "#/components/schemas/InfluxQLQuery" - application/vnd.flux: - schema: - type: string - responses: - '200': - description: Query results - headers: - Content-Encoding: - description: The Content-Encoding entity header is used to compress the media-type. When present, its value indicates which encodings were applied to the entity-body - schema: - type: string - description: Specifies that the response in the body is encoded with gzip or not encoded with identity. - default: identity - enum: - - gzip - - identity - Trace-Id: - description: The Trace-Id header reports the request's trace ID, if one was generated. - schema: - type: string - description: Specifies the request's trace ID. - content: - text/csv: - schema: - type: string - example: > - result,table,_start,_stop,_time,region,host,_value - mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:00Z,east,A,15.43 - mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:20Z,east,B,59.25 - mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:40Z,east,C,52.62 - application/vnd.influx.arrow: - schema: - type: string - format: binary - '429': - description: Token is temporarily over quota. The Retry-After header describes when to try the read again. - headers: - Retry-After: - description: A non-negative decimal integer indicating the seconds to delay after the response is received. - schema: - type: integer - format: int32 - default: - description: Error processing query - content: - application/json: - schema: - $ref: "#/components/schemas/Error" + $ref: "#/components/schemas/Error" /buckets: get: operationId: GetBuckets @@ -3282,26 +3531,26 @@ paths: - Buckets summary: List all buckets parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: "#/components/parameters/Offset" - - $ref: "#/components/parameters/Limit" - - in: query - name: org - description: The organization name. - schema: - type: string - - in: query - name: orgID - description: The organization ID. - schema: - type: string - - in: query - name: name - description: Only returns buckets with a specific name. - schema: - type: string + - $ref: "#/components/parameters/TraceSpan" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Limit" + - in: query + name: org + description: The organization name. + schema: + type: string + - in: query + name: orgID + description: The organization ID. + schema: + type: string + - in: query + name: name + description: Only returns buckets with a specific name. + schema: + type: string responses: - '200': + "200": description: A list of buckets content: application/json: @@ -3319,7 +3568,7 @@ paths: - Buckets summary: Create a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Bucket to create required: true @@ -3328,7 +3577,7 @@ paths: schema: $ref: "#/components/schemas/PostBucketRequest" responses: - '201': + "201": description: Bucket created content: application/json: @@ -3346,14 +3595,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/buckets/{bucketID}': + "/buckets/{bucketID}": get: operationId: GetBucketsID tags: - Buckets summary: Retrieve a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3361,7 +3610,7 @@ paths: required: true description: The bucket ID. responses: - '200': + "200": description: Bucket details content: application/json: @@ -3386,7 +3635,7 @@ paths: schema: $ref: "#/components/schemas/Bucket" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3394,7 +3643,7 @@ paths: required: true description: The bucket ID. responses: - '200': + "200": description: An updated bucket content: application/json: @@ -3412,7 +3661,7 @@ paths: - Buckets summary: Delete a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3420,9 +3669,9 @@ paths: required: true description: The ID of the bucket to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Bucket not found content: application/json: @@ -3434,14 +3683,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/buckets/{bucketID}/labels': + "/buckets/{bucketID}/labels": get: operationId: GetBucketsIDLabels tags: - Buckets summary: List all labels for a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3449,7 +3698,7 @@ paths: required: true description: The bucket ID. responses: - '200': + "200": description: A list of all labels for a bucket content: application/json: @@ -3467,7 +3716,7 @@ paths: - Buckets summary: Add a label to a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3482,7 +3731,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The newly added label content: application/json: @@ -3494,14 +3743,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/buckets/{bucketID}/labels/{labelID}': + "/buckets/{bucketID}/labels/{labelID}": delete: operationId: DeleteBucketsIDLabelsID tags: - Buckets summary: delete a label from a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3515,9 +3764,9 @@ paths: required: true description: The ID of the label to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Bucket not found content: application/json: @@ -3529,7 +3778,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/buckets/{bucketID}/members': + "/buckets/{bucketID}/members": get: operationId: GetBucketsIDMembers tags: @@ -3537,7 +3786,7 @@ paths: - Buckets summary: List all users with member privileges for a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3545,7 +3794,7 @@ paths: required: true description: The bucket ID. responses: - '200': + "200": description: A list of bucket members content: application/json: @@ -3564,7 +3813,7 @@ paths: - Buckets summary: Add a member to a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3579,7 +3828,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Member added to bucket content: application/json: @@ -3591,7 +3840,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/buckets/{bucketID}/members/{userID}': + "/buckets/{bucketID}/members/{userID}": delete: operationId: DeleteBucketsIDMembersID tags: @@ -3599,7 +3848,7 @@ paths: - Buckets summary: Remove a member from a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -3613,7 +3862,7 @@ paths: required: true description: The bucket ID. responses: - '204': + "204": description: Member removed default: description: Unexpected error @@ -3621,7 +3870,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/buckets/{bucketID}/owners': + "/buckets/{bucketID}/owners": get: operationId: GetBucketsIDOwners tags: @@ -3629,7 +3878,7 @@ paths: - Buckets summary: List all owners of a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3637,7 +3886,7 @@ paths: required: true description: The bucket ID. responses: - '200': + "200": description: A list of bucket owners content: application/json: @@ -3656,7 +3905,7 @@ paths: - Buckets summary: Add an owner to a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3671,7 +3920,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Bucket owner added content: application/json: @@ -3683,7 +3932,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/buckets/{bucketID}/owners/{userID}': + "/buckets/{bucketID}/owners/{userID}": delete: operationId: DeleteBucketsIDOwnersID tags: @@ -3691,7 +3940,7 @@ paths: - Buckets summary: Remove an owner from a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -3705,7 +3954,7 @@ paths: required: true description: The bucket ID. responses: - '204': + "204": description: Owner removed default: description: Unexpected error @@ -3713,7 +3962,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/buckets/{bucketID}/logs': + "/buckets/{bucketID}/logs": get: operationId: GetBucketsIDLogs tags: @@ -3721,9 +3970,9 @@ paths: - OperationLogs summary: Retrieve operation logs for a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' + - $ref: "#/components/parameters/TraceSpan" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Limit" - in: path name: bucketID required: true @@ -3731,7 +3980,7 @@ paths: schema: type: string responses: - '200': + "200": description: Operation logs for the bucket content: application/json: @@ -3750,7 +3999,7 @@ paths: - Organizations summary: List all organizations parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: query name: org schema: @@ -3767,7 +4016,7 @@ paths: type: string description: Filter organizations to a specific user ID. responses: - '200': + "200": description: A list of organizations content: application/json: @@ -3785,7 +4034,7 @@ paths: - Organizations summary: Create an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Organization to create required: true @@ -3794,7 +4043,7 @@ paths: schema: $ref: "#/components/schemas/Organization" responses: - '201': + "201": description: Organization created content: application/json: @@ -3806,14 +4055,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}': + "/orgs/{orgID}": get: operationId: GetOrgsID tags: - Organizations summary: Retrieve an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -3821,7 +4070,7 @@ paths: required: true description: The ID of the organization to get. responses: - '200': + "200": description: Organization details content: application/json: @@ -3846,7 +4095,7 @@ paths: schema: $ref: "#/components/schemas/Organization" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -3854,7 +4103,7 @@ paths: required: true description: The ID of the organization to get. responses: - '200': + "200": description: Organization updated content: application/json: @@ -3872,7 +4121,7 @@ paths: - Organizations summary: Delete an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -3880,9 +4129,9 @@ paths: required: true description: The ID of the organization to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Organization not found content: application/json: @@ -3894,14 +4143,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}/labels': + "/orgs/{orgID}/labels": get: operationId: GetOrgsIDLabels tags: - Organizations summary: List all labels for a organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -3909,7 +4158,7 @@ paths: required: true description: The organization ID. responses: - '200': + "200": description: A list of all labels for an organization content: application/json: @@ -3927,7 +4176,7 @@ paths: - Organizations summary: Add a label to an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -3942,7 +4191,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: Returns the created label content: application/json: @@ -3954,14 +4203,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}/labels/{labelID}': + "/orgs/{orgID}/labels/{labelID}": delete: operationId: DeleteOrgsIDLabelsID tags: - Organizations summary: Delete a label from an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -3975,9 +4224,9 @@ paths: required: true description: The label ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Organization not found content: application/json: @@ -3989,7 +4238,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}/secrets': + "/orgs/{orgID}/secrets": get: operationId: GetOrgsIDSecrets tags: @@ -3997,7 +4246,7 @@ paths: - Organizations summary: List all secret keys for an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -4005,7 +4254,7 @@ paths: required: true description: The organization ID. responses: - '200': + "200": description: A list of all secret keys content: application/json: @@ -4024,7 +4273,7 @@ paths: - Organizations summary: Update secrets in an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -4039,7 +4288,7 @@ paths: schema: $ref: "#/components/schemas/Secrets" responses: - '204': + "204": description: Keys successfully patched default: description: Unexpected error @@ -4047,7 +4296,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}/secrets/delete': # had to make this because swagger wouldn't let me have a request body with a DELETE + "/orgs/{orgID}/secrets/delete": # had to make this because swagger wouldn't let me have a request body with a DELETE post: operationId: PostOrgsIDSecrets tags: @@ -4055,7 +4304,7 @@ paths: - Organizations summary: Delete secrets from an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -4070,7 +4319,7 @@ paths: schema: $ref: "#/components/schemas/SecretKeys" responses: - '204': + "204": description: Keys successfully patched default: description: Unexpected error @@ -4078,7 +4327,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}/members': + "/orgs/{orgID}/members": get: operationId: GetOrgsIDMembers tags: @@ -4086,7 +4335,7 @@ paths: - Organizations summary: List all members of an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -4094,13 +4343,13 @@ paths: required: true description: The organization ID. responses: - '200': + "200": description: A list of organization members content: application/json: schema: $ref: "#/components/schemas/ResourceMembers" - '404': + "404": description: Organization not found content: application/json: @@ -4119,7 +4368,7 @@ paths: - Organizations summary: Add a member to an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -4134,7 +4383,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Added to organization created content: application/json: @@ -4146,7 +4395,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}/members/{userID}': + "/orgs/{orgID}/members/{userID}": delete: operationId: DeleteOrgsIDMembersID tags: @@ -4154,7 +4403,7 @@ paths: - Organizations summary: Remove a member from an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -4168,7 +4417,7 @@ paths: required: true description: The organization ID. responses: - '204': + "204": description: Member removed default: description: Unexpected error @@ -4176,7 +4425,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}/owners': + "/orgs/{orgID}/owners": get: operationId: GetOrgsIDOwners tags: @@ -4184,7 +4433,7 @@ paths: - Organizations summary: List all owners of an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -4192,13 +4441,13 @@ paths: required: true description: The organization ID. responses: - '200': + "200": description: A list of organization owners content: application/json: schema: $ref: "#/components/schemas/ResourceOwners" - '404': + "404": description: Organization not found content: application/json: @@ -4217,7 +4466,7 @@ paths: - Organizations summary: Add an owner to an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -4232,7 +4481,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Organization owner added content: application/json: @@ -4244,7 +4493,162 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}/owners/{userID}': + "/orgs/{orgID}/invites": + post: + operationId: PostOrgsIDInvites + tags: + - Invites + - Organizations + summary: Creates an invite to an organization + parameters: + - $ref: "#/components/parameters/TraceSpan" + - in: path + name: orgID + schema: + type: string + required: true + description: The organization ID. + requestBody: + description: Invite to be sent + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/Invite" + responses: + "201": + description: Invite sent + content: + application/json: + schema: + $ref: "#/components/schemas/Invite" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "/orgs/{orgID}/invites/{inviteID}": + delete: + operationId: DeleteOrgsIDInviteID + tags: + - Invites + - Organizations + summary: Remove an invite to an organization + parameters: + - $ref: "#/components/parameters/TraceSpan" + - in: path + name: inviteID + schema: + type: string + required: true + description: The ID of the invite to remove. + - in: path + name: orgID + schema: + type: string + required: true + description: The organization ID. + responses: + "204": + description: Invite removed + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "/orgs/{orgID}/invites/{inviteID}/resend": + post: + operationId: DeleteOrgsIDInviteID + tags: + - Invites + - Organizations + summary: Resends an invite + parameters: + - $ref: "#/components/parameters/TraceSpan" + - in: path + name: inviteID + schema: + type: string + required: true + description: The ID of the invite to resend. + - in: path + name: orgID + schema: + type: string + required: true + description: The organization ID. + responses: + "200": + description: Invite resent + content: + application/json: + schema: + $ref: "#/components/schemas/Invite" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "/orgs/{orgID}/users": + get: + operationId: GetCloudUsers + tags: + - CloudUsers + parameters: + - $ref: "#/components/parameters/TraceSpan" + - in: path + name: orgID + description: Specifies the organization ID of the CloudUser. + required: true + schema: + type: string + responses: + "200": + description: A list of cloud users + content: + application/json: + schema: + $ref: "#/components/schemas/CloudUsers" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "/orgs/{orgID}/users/{userID}": + delete: + operationId: DeleteOrgsIDCloudUserID + tags: + - CloudUsers + - Organizations + summary: Deletes a cloud user + parameters: + - $ref: "#/components/parameters/TraceSpan" + - in: path + name: userID + schema: + type: string + required: true + description: The ID of the user to remove. + - in: path + name: orgID + schema: + type: string + required: true + description: The organization ID. + responses: + "204": + description: User removed + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "/orgs/{orgID}/owners/{userID}": delete: operationId: DeleteOrgsIDOwnersID tags: @@ -4252,7 +4656,7 @@ paths: - Organizations summary: Remove an owner from an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -4266,7 +4670,7 @@ paths: required: true description: The organization ID. responses: - '204': + "204": description: Owner removed default: description: Unexpected error @@ -4274,7 +4678,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}/logs': + "/orgs/{orgID}/logs": get: operationId: GetOrgsIDLogs tags: @@ -4282,9 +4686,9 @@ paths: - OperationLogs summary: Retrieve operation logs for an organization parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' + - $ref: "#/components/parameters/TraceSpan" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Limit" - in: path name: orgID required: true @@ -4292,7 +4696,7 @@ paths: schema: type: string responses: - '200': + "200": description: Operation logs for the organization content: application/json: @@ -4318,12 +4722,15 @@ paths: schema: $ref: "#/components/schemas/PkgCreate" responses: - '200': + "200": description: Influx package created content: application/json: schema: $ref: "#/components/schemas/Pkg" + application/x-yaml: + schema: + $ref: "#/components/schemas/Pkg" default: description: Unexpected error content: @@ -4349,7 +4756,7 @@ paths: schema: $ref: "#/components/schemas/PkgApply" responses: - '200': + "200": description: > Influx package dry-run successful, no new resources created. The provided diff and summary will not have IDs for resources @@ -4358,7 +4765,7 @@ paths: application/json: schema: $ref: "#/components/schemas/PkgSummary" - '201': + "201": description: > Influx package applied successfully. Newly created resources created available in summary. The diff compares the state of the world before @@ -4398,7 +4805,7 @@ paths: type: string description: A collection of stackIDs to filter the list by. responses: - '200': + "200": description: Influx stacks found content: application/json: @@ -4477,7 +4884,7 @@ paths: items: type: string responses: - '201': + "201": description: Influx stack created content: application/json: @@ -4530,7 +4937,7 @@ paths: type: string description: The organization id of the user responses: - '204': + "204": description: Stack and all its associated resources are deleted default: description: Unexpected error @@ -4538,6 +4945,41 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" + /packages/stacks/{stack_id}/export: + delete: + operationId: ExportStack + tags: + - InfluxPackages + summary: Export a stack's resources in the form of a package + parameters: + - in: path + name: stack_id + required: true + schema: + type: string + description: The stack id to be removed + - in: query + name: orgID + required: true + schema: + type: string + description: The organization id of the user + responses: + "200": + description: Stack and all its associated resources are deleted + content: + application/json: + schema: + $ref: "#/components/schemas/Pkg" + application/x-yaml: + schema: + $ref: "#/components/schemas/Pkg" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" /tasks: get: operationId: GetTasks @@ -4545,7 +4987,7 @@ paths: - Tasks summary: List all tasks parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: query name: name description: Returns task with a specific name. @@ -4588,7 +5030,7 @@ paths: default: 100 description: The number of tasks to return responses: - '200': + "200": description: A list of tasks content: application/json: @@ -4606,7 +5048,7 @@ paths: - Tasks summary: Create a new task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Task to create required: true @@ -4615,7 +5057,7 @@ paths: schema: $ref: "#/components/schemas/TaskCreateRequest" responses: - '201': + "201": description: Task created content: application/json: @@ -4627,14 +5069,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}': + "/tasks/{taskID}": get: operationId: GetTasksID tags: - Tasks summary: Retrieve a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4642,7 +5084,7 @@ paths: required: true description: The task ID. responses: - '200': + "200": description: Task details content: application/json: @@ -4668,7 +5110,7 @@ paths: schema: $ref: "#/components/schemas/TaskUpdateRequest" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4676,7 +5118,7 @@ paths: required: true description: The task ID. responses: - '200': + "200": description: Task updated content: application/json: @@ -4695,7 +5137,7 @@ paths: summary: Delete a task description: Deletes a task and all associated records parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4703,7 +5145,7 @@ paths: required: true description: The ID of the task to delete. responses: - '204': + "204": description: Task deleted default: description: Unexpected error @@ -4711,14 +5153,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/runs': + "/tasks/{taskID}/runs": get: operationId: GetTasksIDRuns tags: - Tasks summary: List runs for a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4751,7 +5193,7 @@ paths: format: date-time description: Filter runs to those scheduled before this time, RFC3339 responses: - '200': + "200": description: A list of task runs content: application/json: @@ -4769,7 +5211,7 @@ paths: - Tasks summary: Manually start a task run, overriding the current schedule parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4781,7 +5223,7 @@ paths: schema: $ref: "#/components/schemas/RunManually" responses: - '201': + "201": description: Run scheduled to start content: application/json: @@ -4793,14 +5235,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/runs/{runID}': + "/tasks/{taskID}/runs/{runID}": get: operationId: GetTasksIDRunsID tags: - Tasks summary: Retrieve a single run for a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4814,7 +5256,7 @@ paths: required: true description: The run ID. responses: - '200': + "200": description: The run record content: application/json: @@ -4832,7 +5274,7 @@ paths: - Tasks summary: Cancel a running task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4846,7 +5288,7 @@ paths: required: true description: The run ID. responses: - '204': + "204": description: Delete has been accepted default: description: Unexpected error @@ -4854,14 +5296,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/runs/{runID}/retry': + "/tasks/{taskID}/runs/{runID}/retry": post: operationId: PostTasksIDRunsIDRetry tags: - Tasks summary: Retry a task run parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4875,7 +5317,7 @@ paths: required: true description: The run ID. responses: - '200': + "200": description: Run that has been queued content: application/json: @@ -4887,14 +5329,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/logs': + "/tasks/{taskID}/logs": get: operationId: GetTasksIDLogs tags: - Tasks summary: Retrieve all logs for a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4902,7 +5344,7 @@ paths: required: true description: The task ID. responses: - '200': + "200": description: All logs for a task content: application/json: @@ -4914,14 +5356,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/runs/{runID}/logs': + "/tasks/{taskID}/runs/{runID}/logs": get: operationId: GetTasksIDRunsIDLogs tags: - Tasks summary: Retrieve all logs for a run parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4935,7 +5377,7 @@ paths: required: true description: ID of run to get logs for. responses: - '200': + "200": description: All logs for a run content: application/json: @@ -4947,14 +5389,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/labels': + "/tasks/{taskID}/labels": get: operationId: GetTasksIDLabels tags: - Tasks summary: List all labels for a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4962,7 +5404,7 @@ paths: required: true description: The task ID. responses: - '200': + "200": description: A list of all labels for a task content: application/json: @@ -4980,7 +5422,7 @@ paths: - Tasks summary: Add a label to a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4995,7 +5437,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: A list of all labels for a task content: application/json: @@ -5007,14 +5449,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/labels/{labelID}': + "/tasks/{taskID}/labels/{labelID}": delete: operationId: DeleteTasksIDLabelsID tags: - Tasks summary: Delete a label from a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -5028,9 +5470,9 @@ paths: required: true description: The label ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Task not found content: application/json: @@ -5049,9 +5491,9 @@ paths: - Users summary: Return the feature flags for the currently authenticated user parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: - '200': + "200": description: Feature flags for the currently authenticated user content: application/json: @@ -5070,9 +5512,9 @@ paths: - Users summary: Return the current authenticated user parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: - '200': + "200": description: Currently authenticated user content: application/json: @@ -5093,7 +5535,7 @@ paths: security: - BasicAuth: [] parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: New password required: true @@ -5102,7 +5544,7 @@ paths: schema: $ref: "#/components/schemas/PasswordResetBody" responses: - '204': + "204": description: Password successfully updated default: description: Unsuccessful authentication @@ -5110,7 +5552,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/members': + "/tasks/{taskID}/members": get: operationId: GetTasksIDMembers tags: @@ -5118,7 +5560,7 @@ paths: - Tasks summary: List all task members parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -5126,7 +5568,7 @@ paths: required: true description: The task ID. responses: - '200': + "200": description: A list of users who have member privileges for a task content: application/json: @@ -5145,7 +5587,7 @@ paths: - Tasks summary: Add a member to a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -5160,7 +5602,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Added to task members content: application/json: @@ -5172,7 +5614,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/members/{userID}': + "/tasks/{taskID}/members/{userID}": delete: operationId: DeleteTasksIDMembersID tags: @@ -5180,7 +5622,7 @@ paths: - Tasks summary: Remove a member from a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -5194,7 +5636,7 @@ paths: required: true description: The task ID. responses: - '204': + "204": description: Member removed default: description: Unexpected error @@ -5202,7 +5644,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/owners': + "/tasks/{taskID}/owners": get: operationId: GetTasksIDOwners tags: @@ -5210,7 +5652,7 @@ paths: - Tasks summary: List all owners of a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -5218,7 +5660,7 @@ paths: required: true description: The task ID. responses: - '200': + "200": description: A list of users who have owner privileges for a task content: application/json: @@ -5237,7 +5679,7 @@ paths: - Tasks summary: Add an owner to a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -5252,7 +5694,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Added to task owners content: application/json: @@ -5264,7 +5706,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/owners/{userID}': + "/tasks/{taskID}/owners/{userID}": delete: operationId: DeleteTasksIDOwnersID tags: @@ -5272,7 +5714,7 @@ paths: - Tasks summary: Remove an owner from a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -5286,7 +5728,7 @@ paths: required: true description: The task ID. responses: - '204': + "204": description: Owner removed default: description: Unexpected error @@ -5301,9 +5743,9 @@ paths: - Users summary: List all users parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: - '200': + "200": description: A list of users content: application/json: @@ -5321,7 +5763,7 @@ paths: - Users summary: Create a user parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: User to create required: true @@ -5330,7 +5772,7 @@ paths: schema: $ref: "#/components/schemas/User" responses: - '201': + "201": description: User created content: application/json: @@ -5342,14 +5784,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/users/{userID}': + "/users/{userID}": get: operationId: GetUsersID tags: - Users summary: Retrieve a user parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -5357,7 +5799,7 @@ paths: required: true description: The user ID. responses: - '200': + "200": description: User details content: application/json: @@ -5382,7 +5824,7 @@ paths: schema: $ref: "#/components/schemas/User" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -5390,7 +5832,7 @@ paths: required: true description: The ID of the user to update. responses: - '200': + "200": description: User updated content: application/json: @@ -5408,7 +5850,7 @@ paths: - Users summary: Delete a user parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -5416,7 +5858,7 @@ paths: required: true description: The ID of the user to delete. responses: - '204': + "204": description: User deleted default: description: Unexpected error @@ -5424,16 +5866,16 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/users/{userID}/password': - put: - operationId: PutUsersIDPassword + "/users/{userID}/password": + post: + operationId: PostUsersIDPassword tags: - Users summary: Update a password security: - BasicAuth: [] parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -5448,7 +5890,7 @@ paths: schema: $ref: "#/components/schemas/PasswordResetBody" responses: - '204': + "204": description: Password successfully updated default: description: Unsuccessful authentication @@ -5456,7 +5898,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/users/{userID}/logs': + "/users/{userID}/logs": get: operationId: GetUsersIDLogs tags: @@ -5464,9 +5906,9 @@ paths: - OperationLogs summary: Retrieve operation logs for a user parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' + - $ref: "#/components/parameters/TraceSpan" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Limit" - in: path name: userID required: true @@ -5474,7 +5916,7 @@ paths: schema: type: string responses: - '200': + "200": description: Operation logs for the user content: application/json: @@ -5490,12 +5932,12 @@ paths: get: operationId: GetChecks tags: - - Checks + - Checks summary: Get all checks parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' + - $ref: "#/components/parameters/TraceSpan" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Limit" - in: query name: orgID required: true @@ -5503,7 +5945,7 @@ paths: schema: type: string responses: - '200': + "200": description: A list of checks content: application/json: @@ -5514,7 +5956,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: "#/components/schemas/Error" post: operationId: CreateCheck tags: @@ -5526,9 +5968,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/PostCheck" + $ref: "#/components/schemas/PostCheck" responses: - '201': + "201": description: Check created content: application/json: @@ -5540,14 +5982,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/checks/{checkID}': + "/checks/{checkID}": get: operationId: GetChecksID tags: - Checks summary: Get a check parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: checkID schema: @@ -5555,7 +5997,7 @@ paths: required: true description: The check ID. responses: - '200': + "200": description: The check requested content: application/json: @@ -5580,7 +6022,7 @@ paths: schema: $ref: "#/components/schemas/Check" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: checkID schema: @@ -5588,13 +6030,13 @@ paths: required: true description: The check ID. responses: - '200': + "200": description: An updated check content: application/json: schema: $ref: "#/components/schemas/Check" - '404': + "404": description: The check was not found content: application/json: @@ -5617,9 +6059,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CheckPatch" + $ref: "#/components/schemas/CheckPatch" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: checkID schema: @@ -5627,13 +6069,13 @@ paths: required: true description: The check ID. responses: - '200': + "200": description: An updated check content: application/json: schema: $ref: "#/components/schemas/Check" - '404': + "404": description: The check was not found content: application/json: @@ -5651,7 +6093,7 @@ paths: - Checks summary: Delete a check parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: checkID schema: @@ -5659,9 +6101,9 @@ paths: required: true description: The check ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: The check was not found content: application/json: @@ -5673,14 +6115,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/checks/{checkID}/labels': + "/checks/{checkID}/labels": get: operationId: GetChecksIDLabels tags: - Checks summary: List all labels for a check parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: checkID schema: @@ -5688,7 +6130,7 @@ paths: required: true description: The check ID. responses: - '200': + "200": description: A list of all labels for a check content: application/json: @@ -5706,7 +6148,7 @@ paths: - Checks summary: Add a label to a check parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: checkID schema: @@ -5721,7 +6163,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The label was added to the check content: application/json: @@ -5733,14 +6175,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/checks/{checkID}/labels/{labelID}': + "/checks/{checkID}/labels/{labelID}": delete: operationId: DeleteChecksIDLabelsID tags: - Checks summary: Delete label from a check parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: checkID schema: @@ -5754,9 +6196,9 @@ paths: required: true description: The ID of the label to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Check or label not found content: application/json: @@ -5772,12 +6214,12 @@ paths: get: operationId: GetNotificationRules tags: - - NotificationRules + - NotificationRules summary: Get all notification rules parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' + - $ref: "#/components/parameters/TraceSpan" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Limit" - in: query name: orgID required: true @@ -5797,7 +6239,7 @@ paths: pattern: ^[a-zA-Z0-9_]+:[a-zA-Z0-9_]+$ example: env:prod responses: - '200': + "200": description: A list of notification rules content: application/json: @@ -5808,7 +6250,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: "#/components/schemas/Error" post: operationId: CreateNotificationRule tags: @@ -5822,7 +6264,7 @@ paths: schema: $ref: "#/components/schemas/PostNotificationRule" responses: - '201': + "201": description: Notification rule created content: application/json: @@ -5834,14 +6276,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/checks/{checkID}/query': + "/checks/{checkID}/query": get: operationId: GetChecksIDQuery tags: - Checks summary: Get a check query parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: checkID schema: @@ -5849,19 +6291,19 @@ paths: required: true description: The check ID. responses: - '200': + "200": description: The check query requested content: application/json: schema: $ref: "#/components/schemas/FluxResponse" - '400': + "400": description: Invalid request content: application/json: schema: $ref: "#/components/schemas/Error" - '404': + "404": description: Check not found content: application/json: @@ -5873,14 +6315,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/notificationRules/{ruleID}': + "/notificationRules/{ruleID}": get: operationId: GetNotificationRulesID tags: - NotificationRules summary: Get a notification rule parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: ruleID schema: @@ -5888,7 +6330,7 @@ paths: required: true description: The notification rule ID. responses: - '200': + "200": description: The notification rule requested content: application/json: @@ -5913,7 +6355,7 @@ paths: schema: $ref: "#/components/schemas/NotificationRule" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: ruleID schema: @@ -5921,13 +6363,13 @@ paths: required: true description: The notification rule ID. responses: - '200': + "200": description: An updated notification rule content: application/json: schema: $ref: "#/components/schemas/NotificationRule" - '404': + "404": description: The notification rule was not found content: application/json: @@ -5952,7 +6394,7 @@ paths: schema: $ref: "#/components/schemas/NotificationRuleUpdate" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: ruleID schema: @@ -5960,13 +6402,13 @@ paths: required: true description: The notification rule ID. responses: - '200': + "200": description: An updated notification rule content: application/json: schema: $ref: "#/components/schemas/NotificationRule" - '404': + "404": description: The notification rule was not found content: application/json: @@ -5984,7 +6426,7 @@ paths: - NotificationRules summary: Delete a notification rule parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: ruleID schema: @@ -5992,9 +6434,9 @@ paths: required: true description: The notification rule ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: The check was not found content: application/json: @@ -6006,14 +6448,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/notificationRules/{ruleID}/labels': + "/notificationRules/{ruleID}/labels": get: operationId: GetNotificationRulesIDLabels tags: - NotificationRules summary: List all labels for a notification rule parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: ruleID schema: @@ -6021,7 +6463,7 @@ paths: required: true description: The notification rule ID. responses: - '200': + "200": description: A list of all labels for a notification rule content: application/json: @@ -6039,7 +6481,7 @@ paths: - NotificationRules summary: Add a label to a notification rule parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: ruleID schema: @@ -6054,7 +6496,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The label was added to the notification rule content: application/json: @@ -6066,14 +6508,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/notificationRules/{ruleID}/labels/{labelID}': + "/notificationRules/{ruleID}/labels/{labelID}": delete: operationId: DeleteNotificationRulesIDLabelsID tags: - NotificationRules summary: Delete label from a notification rule parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: ruleID schema: @@ -6087,9 +6529,9 @@ paths: required: true description: The ID of the label to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Rule or label not found content: application/json: @@ -6101,14 +6543,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/notificationRules/{ruleID}/query': + "/notificationRules/{ruleID}/query": get: operationId: GetNotificationRulesIDQuery tags: - Rules summary: Get a notification rule query parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: ruleID schema: @@ -6116,19 +6558,19 @@ paths: required: true description: The notification rule ID. responses: - '200': + "200": description: The notification rule query requested content: application/json: schema: $ref: "#/components/schemas/FluxResponse" - '400': + "400": description: Invalid request content: application/json: schema: $ref: "#/components/schemas/Error" - '404': + "404": description: Notification rule not found content: application/json: @@ -6144,12 +6586,12 @@ paths: get: operationId: GetNotificationEndpoints tags: - - NotificationEndpoints + - NotificationEndpoints summary: Get all notification endpoints parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' + - $ref: "#/components/parameters/TraceSpan" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Limit" - in: query name: orgID required: true @@ -6157,7 +6599,7 @@ paths: schema: type: string responses: - '200': + "200": description: A list of notification endpoints content: application/json: @@ -6168,7 +6610,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Error" + $ref: "#/components/schemas/Error" post: operationId: CreateNotificationEndpoint tags: @@ -6182,7 +6624,7 @@ paths: schema: $ref: "#/components/schemas/PostNotificationEndpoint" responses: - '201': + "201": description: Notification endpoint created content: application/json: @@ -6194,14 +6636,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/notificationEndpoints/{endpointID}': + "/notificationEndpoints/{endpointID}": get: operationId: GetNotificationEndpointsID tags: - NotificationEndpoints summary: Get a notification endpoint parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: endpointID schema: @@ -6209,7 +6651,7 @@ paths: required: true description: The notification endpoint ID. responses: - '200': + "200": description: The notification endpoint requested content: application/json: @@ -6234,7 +6676,7 @@ paths: schema: $ref: "#/components/schemas/NotificationEndpoint" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: endpointID schema: @@ -6242,13 +6684,13 @@ paths: required: true description: The notification endpoint ID. responses: - '200': + "200": description: An updated notification endpoint content: application/json: schema: $ref: "#/components/schemas/NotificationEndpoint" - '404': + "404": description: The notification endpoint was not found content: application/json: @@ -6273,7 +6715,7 @@ paths: schema: $ref: "#/components/schemas/NotificationEndpointUpdate" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: endpointID schema: @@ -6281,13 +6723,13 @@ paths: required: true description: The notification endpoint ID. responses: - '200': + "200": description: An updated notification endpoint content: application/json: schema: $ref: "#/components/schemas/NotificationEndpoint" - '404': + "404": description: The notification endpoint was not found content: application/json: @@ -6305,7 +6747,7 @@ paths: - NotificationEndpoints summary: Delete a notification endpoint parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: endpointID schema: @@ -6313,9 +6755,9 @@ paths: required: true description: The notification endpoint ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: The endpoint was not found content: application/json: @@ -6327,14 +6769,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/notificationEndpoints/{endpointID}/labels': + "/notificationEndpoints/{endpointID}/labels": get: operationId: GetNotificationEndpointsIDLabels tags: - NotificationEndpoints summary: List all labels for a notification endpoint parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: endpointID schema: @@ -6342,7 +6784,7 @@ paths: required: true description: The notification endpoint ID. responses: - '200': + "200": description: A list of all labels for a notification endpoint content: application/json: @@ -6360,7 +6802,7 @@ paths: - NotificationEndpoints summary: Add a label to a notification endpoint parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: endpointID schema: @@ -6375,7 +6817,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The label was added to the notification endpoint content: application/json: @@ -6387,14 +6829,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/notificationEndpoints/{endpointID}/labels/{labelID}': + "/notificationEndpoints/{endpointID}/labels/{labelID}": delete: operationId: DeleteNotificationEndpointsIDLabelsID tags: - NotificationEndpoints summary: Delete a label from a notification endpoint parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: endpointID schema: @@ -6408,9 +6850,9 @@ paths: required: true description: The ID of the label to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Endpoint or label not found content: application/json: @@ -6458,8 +6900,8 @@ components: name: Zap-Trace-Span description: OpenTracing span context example: - trace_id: '1' - span_id: '1' + trace_id: "1" + span_id: "1" baggage: key: value required: false @@ -6732,7 +7174,7 @@ components: body: $ref: "#/components/schemas/Node" BinaryExpression: - description: uses binary operators to act on two operands in an expression + description: uses binary operators to act on two operands in an expression type: object properties: type: @@ -6948,42 +7390,42 @@ components: description: Type of AST node type: string Dialect: - description: Dialect are options to change the default CSV output format; https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/#dialect-descriptions - type: object - properties: - header: - description: If true, the results will contain a header row - type: boolean - default: true - delimiter: - description: Separator between cells; the default is , - type: string - default: "," - maxLength: 1 - minLength: 1 - annotations: - description: Https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns - type: array - items: - type: string - enum: - - "group" - - "datatype" - - "default" - uniqueItems: true - commentPrefix: - description: Character prefixed to comment strings - type: string - default: "#" - maxLength: 1 - minLength: 0 - dateTimeFormat: - description: Format of timestamps - type: string - default: "RFC3339" - enum: - - RFC3339 - - RFC3339Nano + description: Dialect are options to change the default CSV output format; https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/#dialect-descriptions + type: object + properties: + header: + description: If true, the results will contain a header row + type: boolean + default: true + delimiter: + description: Separator between cells; the default is , + type: string + default: "," + maxLength: 1 + minLength: 1 + annotations: + description: Https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns + type: array + items: + type: string + enum: + - "group" + - "datatype" + - "default" + uniqueItems: true + commentPrefix: + description: Character prefixed to comment strings + type: string + default: "#" + maxLength: 1 + minLength: 0 + dateTimeFormat: + description: Format of timestamps + type: string + default: "RFC3339" + enum: + - RFC3339 + - RFC3339Nano Permission: required: [action, resource] properties: @@ -6993,45 +7435,48 @@ components: - read - write resource: - type: object - required: [type] - properties: - type: - type: string - enum: - - authorizations - - buckets - - dashboards - - orgs - - sources - - tasks - - telegrafs - - users - - variables - - scrapers - - secrets - - labels - - views - - documents - - notificationRules - - notificationEndpoints - - checks - id: - type: string - nullable: true - description: If ID is set that is a permission for a specific resource. if it is not set it is a permission for all resources of that resource type. - name: - type: string - nullable: true - description: Optional name of the resource if the resource has a name field. - orgID: - type: string - nullable: true - description: If orgID is set that is a permission for all resources owned my that org. if it is not set it is a permission for all resources of that resource type. - org: - type: string - nullable: true - description: Optional name of the organization of the organization with orgID. + $ref: "#/components/schemas/Resource" + Resource: + type: object + required: [type] + properties: + type: + type: string + enum: + - authorizations + - buckets + - dashboards + - orgs + - sources + - tasks + - telegrafs + - users + - variables + - scrapers + - secrets + - labels + - views + - documents + - notificationRules + - notificationEndpoints + - checks + - dbrp + id: + type: string + nullable: true + description: If ID is set that is a permission for a specific resource. if it is not set it is a permission for all resources of that resource type. + name: + type: string + nullable: true + description: Optional name of the resource if the resource has a name field. + orgID: + type: string + nullable: true + description: If orgID is set that is a permission for all resources owned my that org. if it is not set it is a permission for all resources of that resource type. + org: + type: string + nullable: true + description: Optional name of the organization of the organization with orgID. AuthorizationUpdateRequest: properties: status: @@ -7449,9 +7894,29 @@ components: type: string spec: type: object + PkgEnvReferences: + type: array + items: + type: object + properties: + resourceField: + type: string + description: Field the environment reference corresponds too + envRefKey: + type: string + description: Key identified as environment reference and is the key identified in the template + value: + type: string + description: Value provided to fulfill reference + defaultValue: + type: string + description: Default value that will be provided for the reference when no value is provided + required: [resourceField, envRefKey, defaultValue] PkgSummary: type: object properties: + stackID: + type: string summary: type: object properties: @@ -7473,9 +7938,11 @@ components: retentionPeriod: type: integer labelAssociations: - type: array - items: - $ref: "#/components/schemas/PkgSummaryLabel" + type: array + items: + $ref: "#/components/schemas/PkgSummaryLabel" + envReferences: + $ref: "#/components/schemas/PkgEnvReferences" checks: type: array items: @@ -7489,6 +7956,8 @@ components: type: array items: $ref: "#/components/schemas/PkgSummaryLabel" + envReferences: + $ref: "#/components/schemas/PkgEnvReferences" labels: type: array items: @@ -7516,6 +7985,8 @@ components: type: array items: $ref: "#/components/schemas/PkgChart" + envReferences: + $ref: "#/components/schemas/PkgEnvReferences" labelMappings: type: array items: @@ -7558,6 +8029,8 @@ components: type: array items: $ref: "#/components/schemas/PkgSummaryLabel" + envReferences: + $ref: "#/components/schemas/PkgEnvReferences" notificationRules: type: array items: @@ -7607,6 +8080,8 @@ components: type: array items: $ref: "#/components/schemas/PkgSummaryLabel" + envReferences: + $ref: "#/components/schemas/PkgEnvReferences" tasks: type: array items: @@ -7630,6 +8105,8 @@ components: type: string status: type: string + envReferences: + $ref: "#/components/schemas/PkgEnvReferences" telegrafConfigs: type: array items: @@ -7643,6 +8120,8 @@ components: type: array items: $ref: "#/components/schemas/PkgSummaryLabel" + envReferences: + $ref: "#/components/schemas/PkgEnvReferences" variables: type: array items: @@ -7661,9 +8140,11 @@ components: arguments: $ref: "#/components/schemas/VariableProperties" labelAssociations: - type: array - items: - $ref: "#/components/schemas/PkgSummaryLabel" + type: array + items: + $ref: "#/components/schemas/PkgSummaryLabel" + envReferences: + $ref: "#/components/schemas/PkgEnvReferences" diff: type: object properties: @@ -7823,44 +8304,44 @@ components: new: type: object properties: - name: - type: string - description: - type: string - endpointName: - type: string - endpointID: - type: string - endpointType: - type: string - every: - type: string - offset: - type: string - messageTemplate: - type: string - status: - type: string - statusRules: - type: array - items: - type: object - properties: - currentLevel: - type: string - previousLevel: - type: string - tagRules: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - operator: - type: string + name: + type: string + description: + type: string + endpointName: + type: string + endpointID: + type: string + endpointType: + type: string + every: + type: string + offset: + type: string + messageTemplate: + type: string + status: + type: string + statusRules: + type: array + items: + type: object + properties: + currentLevel: + type: string + previousLevel: + type: string + tagRules: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + operator: + type: string old: type: object properties: @@ -8019,10 +8500,15 @@ components: type: string name: type: string - description: - type: string - retentionPeriod: - type: string + properties: + type: object + properties: + color: + type: string + description: + type: string + envReferences: + $ref: "#/components/schemas/PkgEnvReferences" PkgChart: type: object properties: @@ -8222,6 +8708,85 @@ components: TaskStatusType: type: string enum: [active, inactive] + Invite: + properties: + id: + description: the idpe id of the invite + readOnly: true + type: string + email: + type: string + role: + type: string + enum: + - member + - owner + expiresAt: + format: date-time + type: string + links: + type: object + readOnly: true + example: + self: "/api/v2/invites/1" + properties: + self: + type: string + format: uri + required: [id, email, role] + Invites: + type: object + properties: + links: + type: object + properties: + self: + type: string + format: uri + invites: + type: array + items: + $ref: "#/components/schemas/Invite" + CloudUser: + properties: + id: + description: the idpe id of the user + readOnly: true + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + role: + type: string + enum: + - member + - owner + links: + type: object + readOnly: true + example: + self: "/api/v2/cloud_users/1" + properties: + self: + type: string + format: uri + required: [id, email, role] + CloudUsers: + type: object + properties: + links: + type: object + properties: + self: + type: string + format: uri + users: + type: array + items: + $ref: "#/components/schemas/CloudUser" User: properties: id: @@ -8511,7 +9076,7 @@ components: description: Args are the arguments to the function type: array items: - $ref: '#/components/schemas/Field' + $ref: "#/components/schemas/Field" BuilderConfig: type: object properties: @@ -8522,11 +9087,11 @@ components: tags: type: array items: - $ref: '#/components/schemas/BuilderTagsType' + $ref: "#/components/schemas/BuilderTagsType" functions: type: array items: - $ref: '#/components/schemas/BuilderFunctionsType' + $ref: "#/components/schemas/BuilderFunctionsType" aggregateWindow: type: object properties: @@ -8542,10 +9107,10 @@ components: items: type: string aggregateFunctionType: - $ref: '#/components/schemas/BuilderAggregateFunctionType' + $ref: "#/components/schemas/BuilderAggregateFunctionType" BuilderAggregateFunctionType: type: string - enum: ['filter', 'group'] + enum: ["filter", "group"] BuilderFunctionsType: type: object properties: @@ -8558,14 +9123,14 @@ components: type: string description: The text of the Flux query. editMode: - $ref: '#/components/schemas/QueryEditMode' + $ref: "#/components/schemas/QueryEditMode" name: type: string builderConfig: - $ref: '#/components/schemas/BuilderConfig' + $ref: "#/components/schemas/BuilderConfig" QueryEditMode: type: string - enum: ['builder', 'advanced'] + enum: ["builder", "advanced"] Axis: type: object description: The description of a particular axis for a visualization. @@ -8591,13 +9156,13 @@ components: base: description: Base represents the radix for formatting axis values. type: string - enum: ['', '2', '10'] + enum: ["", "2", "10"] scale: - $ref: '#/components/schemas/AxisScale' + $ref: "#/components/schemas/AxisScale" AxisScale: description: 'Scale is the axis formatting scale. Supported: "log", "linear"' type: string - enum: ['log', 'linear'] + enum: ["log", "linear"] DashboardColor: type: object description: Defines an encoding of data value into color space. @@ -8672,16 +9237,16 @@ components: $ref: "#/components/schemas/DashboardColor" shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string showNoteWhenEmpty: description: If true, will display note when empty type: boolean axes: - $ref: '#/components/schemas/Axes' + $ref: "#/components/schemas/Axes" legend: - $ref: '#/components/schemas/Legend' + $ref: "#/components/schemas/Legend" xColumn: type: string yColumn: @@ -8692,7 +9257,7 @@ components: type: string enum: [overlaid, stacked] geom: - $ref: '#/components/schemas/XYGeom' + $ref: "#/components/schemas/XYGeom" XYGeom: type: string enum: [line, step, stacked, bar, monotoneX] @@ -8712,6 +9277,8 @@ components: - decimalPlaces - position properties: + timeFormat: + type: string type: type: string enum: [line-plus-single-stat] @@ -8726,16 +9293,16 @@ components: $ref: "#/components/schemas/DashboardColor" shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string showNoteWhenEmpty: description: If true, will display note when empty type: boolean axes: - $ref: '#/components/schemas/Axes' + $ref: "#/components/schemas/Axes" legend: - $ref: '#/components/schemas/Legend' + $ref: "#/components/schemas/Legend" xColumn: type: string yColumn: @@ -8750,7 +9317,7 @@ components: suffix: type: string decimalPlaces: - $ref: '#/components/schemas/DecimalPlaces' + $ref: "#/components/schemas/DecimalPlaces" ScatterViewProperties: type: object required: @@ -8789,7 +9356,7 @@ components: type: string shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string showNoteWhenEmpty: @@ -8866,7 +9433,7 @@ components: type: string shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string showNoteWhenEmpty: @@ -8930,7 +9497,7 @@ components: $ref: "#/components/schemas/DashboardColor" shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string showNoteWhenEmpty: @@ -8945,7 +9512,7 @@ components: tickSuffix: type: string legend: - $ref: '#/components/schemas/Legend' + $ref: "#/components/schemas/Legend" decimalPlaces: $ref: "#/components/schemas/DecimalPlaces" HistogramViewProperties: @@ -8978,7 +9545,7 @@ components: $ref: "#/components/schemas/DashboardColor" shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string showNoteWhenEmpty: @@ -9004,7 +9571,21 @@ components: type: integer GaugeViewProperties: type: object - required: [type, queries, colors, shape, note, showNoteWhenEmpty, prefix, tickPrefix, suffix, tickSuffix, legend, decimalPlaces] + required: + [ + type, + queries, + colors, + shape, + note, + showNoteWhenEmpty, + prefix, + tickPrefix, + suffix, + tickSuffix, + legend, + decimalPlaces, + ] properties: type: type: string @@ -9020,7 +9601,7 @@ components: $ref: "#/components/schemas/DashboardColor" shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string showNoteWhenEmpty: @@ -9035,7 +9616,7 @@ components: tickSuffix: type: string legend: - $ref: '#/components/schemas/Legend' + $ref: "#/components/schemas/Legend" decimalPlaces: $ref: "#/components/schemas/DecimalPlaces" TableViewProperties: @@ -9066,7 +9647,7 @@ components: $ref: "#/components/schemas/DashboardColor" shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string showNoteWhenEmpty: @@ -9099,14 +9680,14 @@ components: customization options type: array items: - $ref: '#/components/schemas/RenamableField' + $ref: "#/components/schemas/RenamableField" timeFormat: description: >- timeFormat describes the display format for time values according to moment.js date formatting type: string decimalPlaces: - $ref: '#/components/schemas/DecimalPlaces' + $ref: "#/components/schemas/DecimalPlaces" MarkdownViewProperties: type: object required: @@ -9119,7 +9700,7 @@ components: enum: [markdown] shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string CheckViewProperties: @@ -9136,11 +9717,11 @@ components: enum: [check] shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] checkID: type: string check: - $ref: '#/components/schemas/Check' + $ref: "#/components/schemas/Check" queries: type: array items: @@ -9153,12 +9734,12 @@ components: Axes: description: The viewport for a View's visualizations type: object - required: ['x', 'y'] + required: ["x", "y"] properties: x: - $ref: '#/components/schemas/Axis' + $ref: "#/components/schemas/Axis" "y": # Quoted to prevent YAML parser from interpreting y as shorthand for true. - $ref: '#/components/schemas/Axis' + $ref: "#/components/schemas/Axis" Legend: description: Legend define encoding of data into a view's legend type: object @@ -9266,36 +9847,36 @@ components: type: object example: variables: - - id: '1221432' - name: ":ok:" - selected: - - hello - arguments: - type: constant - values: - - howdy - - hello - - hi - - yo - - oy - - id: '1221432' - name: ":ok:" - selected: - - c - arguments: - type: map - values: - a: fdjaklfdjkldsfjlkjdsa - b: dfaksjfkljekfajekdljfas - c: fdjksajfdkfeawfeea - - id: '1221432' - name: ":ok:" - selected: - - host - arguments: - type: query - query: 'from(bucket: "foo") |> showMeasurements()' - language: flux + - id: "1221432" + name: ":ok:" + selected: + - hello + arguments: + type: constant + values: + - howdy + - hello + - hi + - yo + - oy + - id: "1221432" + name: ":ok:" + selected: + - c + arguments: + type: map + values: + a: fdjaklfdjkldsfjlkjdsa + b: dfaksjfkljekfajekdljfas + c: fdjksajfdkfeawfeea + - id: "1221432" + name: ":ok:" + selected: + - host + arguments: + type: query + query: 'from(bucket: "foo") |> showMeasurements()' + language: flux properties: variables: type: array @@ -9336,7 +9917,7 @@ components: name: type: string properties: - $ref: '#/components/schemas/ViewProperties' + $ref: "#/components/schemas/ViewProperties" Views: type: object properties: @@ -9575,7 +10156,7 @@ components: type: string format: date-time cells: - $ref: "#/components/schemas/Cells" + $ref: "#/components/schemas/Cells" labels: $ref: "#/components/schemas/Labels" Dashboards: @@ -9611,7 +10192,7 @@ components: type: string type: type: string - enum: ["v1","v2","self"] + enum: ["v1", "v2", "self"] url: type: string format: uri @@ -9666,7 +10247,7 @@ components: url: type: string description: The URL of the metrics endpoint. - example: http://localhost:9090/metrics + example: http://localhost:9090/metrics orgID: type: string description: The organization ID. @@ -9840,20 +10421,20 @@ components: orgID: type: string TelegrafRequestPlugin: - oneOf: - - $ref: '#/components/schemas/TelegrafPluginInputCpu' - - $ref: '#/components/schemas/TelegrafPluginInputDisk' - - $ref: '#/components/schemas/TelegrafPluginInputDiskio' - - $ref: '#/components/schemas/TelegrafPluginInputDocker' - - $ref: '#/components/schemas/TelegrafPluginInputFile' - - $ref: '#/components/schemas/TelegrafPluginInputKubernetes' - - $ref: '#/components/schemas/TelegrafPluginInputLogParser' - - $ref: '#/components/schemas/TelegrafPluginInputProcstat' - - $ref: '#/components/schemas/TelegrafPluginInputPrometheus' - - $ref: '#/components/schemas/TelegrafPluginInputRedis' - - $ref: '#/components/schemas/TelegrafPluginInputSyslog' - - $ref: '#/components/schemas/TelegrafPluginOutputFile' - - $ref: '#/components/schemas/TelegrafPluginOutputInfluxDBV2' + oneOf: + - $ref: "#/components/schemas/TelegrafPluginInputCpu" + - $ref: "#/components/schemas/TelegrafPluginInputDisk" + - $ref: "#/components/schemas/TelegrafPluginInputDiskio" + - $ref: "#/components/schemas/TelegrafPluginInputDocker" + - $ref: "#/components/schemas/TelegrafPluginInputFile" + - $ref: "#/components/schemas/TelegrafPluginInputKubernetes" + - $ref: "#/components/schemas/TelegrafPluginInputLogParser" + - $ref: "#/components/schemas/TelegrafPluginInputProcstat" + - $ref: "#/components/schemas/TelegrafPluginInputPrometheus" + - $ref: "#/components/schemas/TelegrafPluginInputRedis" + - $ref: "#/components/schemas/TelegrafPluginInputSyslog" + - $ref: "#/components/schemas/TelegrafPluginOutputFile" + - $ref: "#/components/schemas/TelegrafPluginOutputInfluxDBV2" TelegrafPluginInputCpu: type: object required: @@ -9883,8 +10464,7 @@ components: comment: type: string TelegrafPluginInputDiskio: - type: - object + type: object required: - name - type @@ -9898,8 +10478,7 @@ components: comment: type: string TelegrafPluginInputDocker: - type: - object + type: object required: - name - type @@ -9914,10 +10493,9 @@ components: comment: type: string config: - $ref: '#/components/schemas/TelegrafPluginInputDockerConfig' + $ref: "#/components/schemas/TelegrafPluginInputDockerConfig" TelegrafPluginInputFile: - type: - object + type: object required: - name - type @@ -9932,10 +10510,9 @@ components: comment: type: string config: - $ref: '#/components/schemas/TelegrafPluginInputFileConfig' + $ref: "#/components/schemas/TelegrafPluginInputFileConfig" TelegrafPluginInputKernel: - type: - object + type: object required: - name - type @@ -9949,8 +10526,7 @@ components: comment: type: string TelegrafPluginInputKubernetes: - type: - object + type: object required: - name - type @@ -9965,10 +10541,9 @@ components: comment: type: string config: - $ref: '#/components/schemas/TelegrafPluginInputKubernetesConfig' + $ref: "#/components/schemas/TelegrafPluginInputKubernetesConfig" TelegrafPluginInputLogParser: - type: - object + type: object required: - name - type @@ -9983,10 +10558,9 @@ components: comment: type: string config: - $ref: '#/components/schemas/TelegrafPluginInputLogParserConfig' + $ref: "#/components/schemas/TelegrafPluginInputLogParserConfig" TelegrafPluginInputMem: - type: - object + type: object required: - name - type @@ -10000,8 +10574,7 @@ components: comment: type: string TelegrafPluginInputNetResponse: - type: - object + type: object required: - name - type @@ -10015,8 +10588,7 @@ components: comment: type: string TelegrafPluginInputNet: - type: - object + type: object required: - name - type @@ -10030,8 +10602,7 @@ components: comment: type: string TelegrafPluginInputNginx: - type: - object + type: object required: - name - type @@ -10045,8 +10616,7 @@ components: comment: type: string TelegrafPluginInputProcesses: - type: - object + type: object required: - name - type @@ -10060,8 +10630,7 @@ components: comment: type: string TelegrafPluginInputProcstat: - type: - object + type: object required: - name - type @@ -10076,10 +10645,9 @@ components: comment: type: string config: - $ref: '#/components/schemas/TelegrafPluginInputProcstatConfig' + $ref: "#/components/schemas/TelegrafPluginInputProcstatConfig" TelegrafPluginInputPrometheus: - type: - object + type: object required: - name - type @@ -10094,10 +10662,9 @@ components: comment: type: string config: - $ref: '#/components/schemas/TelegrafPluginInputPrometheusConfig' + $ref: "#/components/schemas/TelegrafPluginInputPrometheusConfig" TelegrafPluginInputRedis: - type: - object + type: object required: - name - type @@ -10112,10 +10679,9 @@ components: comment: type: string config: - $ref: '#/components/schemas/TelegrafPluginInputRedisConfig' + $ref: "#/components/schemas/TelegrafPluginInputRedisConfig" TelegrafPluginInputSyslog: - type: - object + type: object required: - name - type @@ -10130,10 +10696,9 @@ components: comment: type: string config: - $ref: '#/components/schemas/TelegrafPluginInputSyslogConfig' + $ref: "#/components/schemas/TelegrafPluginInputSyslogConfig" TelegrafPluginInputSwap: - type: - object + type: object required: - name - type @@ -10147,8 +10712,7 @@ components: comment: type: string TelegrafPluginInputSystem: - type: - object + type: object required: - name - type @@ -10162,8 +10726,7 @@ components: comment: type: string TelegrafPluginInputTail: - type: - object + type: object required: - name - type @@ -10177,8 +10740,7 @@ components: comment: type: string TelegrafPluginOutputFile: - type: - object + type: object required: - name - type @@ -10193,10 +10755,9 @@ components: comment: type: string config: - $ref: '#/components/schemas/TelegrafPluginOutputFileConfig' + $ref: "#/components/schemas/TelegrafPluginOutputFileConfig" TelegrafPluginOutputInfluxDBV2: - type: - object + type: object required: - name - type @@ -10211,7 +10772,7 @@ components: comment: type: string config: - $ref: '#/components/schemas/TelegrafPluginOutputInfluxDBV2Config' + $ref: "#/components/schemas/TelegrafPluginOutputInfluxDBV2Config" Telegraf: type: object allOf: @@ -10441,6 +11002,10 @@ components: enum: - pass - fail + version: + type: string + commit: + type: string Labels: type: array items: @@ -10461,7 +11026,7 @@ components: additionalProperties: type: string description: Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value. - example: {"color": "ffb3b3", "description": "this is a description"} + example: { "color": "ffb3b3", "description": "this is a description" } LabelCreateRequest: type: object required: [orgID] @@ -10475,7 +11040,7 @@ components: additionalProperties: type: string description: Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value. - example: {"color": "ffb3b3", "description": "this is a description"} + example: { "color": "ffb3b3", "description": "this is a description" } LabelUpdate: type: object properties: @@ -10483,8 +11048,10 @@ components: type: string properties: type: object + additionalProperties: + type: string description: Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value. - example: {"color": "ffb3b3", "description": "this is a description"} + example: { "color": "ffb3b3", "description": "this is a description" } LabelMapping: type: object properties: @@ -10583,7 +11150,7 @@ components: discriminator: propertyName: type mapping: - deadman: "#/components/schemas/DeadmanCheck" + deadman: "#/components/schemas/DeadmanCheck" threshold: "#/components/schemas/ThresholdCheck" custom: "#/components/schemas/CustomCheck" Check: @@ -10713,7 +11280,7 @@ components: propertyName: type mapping: greater: "#/components/schemas/GreaterThreshold" - lesser: "#/components/schemas/LesserThreshold" + lesser: "#/components/schemas/LesserThreshold" range: "#/components/schemas/RangeThreshold" DeadmanCheck: allOf: @@ -10755,7 +11322,7 @@ components: description: The template used to generate and write a status message. type: string CustomCheck: - allOf: + allOf: - $ref: "#/components/schemas/CheckBase" - type: object properties: @@ -10766,7 +11333,7 @@ components: ThresholdBase: properties: level: - $ref: "#/components/schemas/CheckStatusLevel" + $ref: "#/components/schemas/CheckStatusLevel" allValues: description: If true, only alert if all values meet threshold. type: boolean @@ -10975,7 +11542,7 @@ components: type: string operator: type: string - enum: ["equal", "notequal", "equalregex","notequalregex"] + enum: ["equal", "notequal", "equalregex", "notequalregex"] StatusRule: type: object properties: @@ -11067,7 +11634,7 @@ components: propertyName: type mapping: slack: "#/components/schemas/SlackNotificationEndpoint" - pagerduty: "#/components/schemas/PagerDutyNotificationEndpoint" + pagerduty: "#/components/schemas/PagerDutyNotificationEndpoint" http: "#/components/schemas/HTTPNotificationEndpoint" NotificationEndpoint: allOf: @@ -11176,10 +11743,10 @@ components: type: string method: type: string - enum: ['POST', 'GET', 'PUT'] + enum: ["POST", "GET", "PUT"] authMethod: type: string - enum: ['none', 'basic', 'bearer'] + enum: ["none", "basic", "bearer"] contentTemplate: type: string headers: @@ -11189,7 +11756,59 @@ components: type: string NotificationEndpointType: type: string - enum: ['slack', 'pagerduty', 'http'] + enum: ["slack", "pagerduty", "http"] + DBRP: + required: + - orgID + - org + - bucketID + - database + - retention_policy + properties: + id: + type: string + description: the mapping identifier + readOnly: true + orgID: + type: string + description: the organization ID that owns this mapping. + org: + type: string + description: the organization that owns this mapping. + bucketID: + type: string + description: the bucket ID used as target for the translation. + database: + type: string + description: InfluxDB v1 database + retention_policy: + type: string + description: InfluxDB v1 retention policy + default: + type: boolean + description: Specify if this mapping represents the default retention policy for the database specificed. + links: + $ref: "#/components/schemas/Links" + DBRPs: + properties: + notificationEndpoints: + type: array + items: + $ref: "#/components/schemas/DBRP" + links: + $ref: "#/components/schemas/Links" + DBRPUpdate: + properties: + database: + type: string + description: InfluxDB v1 database + retention_policy: + type: string + description: InfluxDB v1 retention policy + default: + type: boolean + links: + $ref: "#/components/schemas/Links" securitySchemes: BasicAuth: type: http diff --git a/assets/styles/layouts/_modal.scss b/assets/styles/layouts/_cloud-selector.scss similarity index 88% rename from assets/styles/layouts/_modal.scss rename to assets/styles/layouts/_cloud-selector.scss index dfc7f7ba4..f6e5d8ff7 100644 --- a/assets/styles/layouts/_modal.scss +++ b/assets/styles/layouts/_cloud-selector.scss @@ -107,6 +107,7 @@ .products { display: flex; + flex-direction: column-reverse; flex-wrap: wrap; flex-grow: 1; justify-content: flex-start; @@ -178,6 +179,30 @@ } } +td,label,li { + &:after { + display: inline-block; + vertical-align: text-bottom; + font-style: italic; + font-weight: $medium; + font-size: .75em; + margin-left: .35rem; + padding: .1rem .3rem .12rem; + line-height: .75rem; + border-radius: 1rem; + } + &.beta:after { + content: 'beta'; + color: $r-dreamsicle; + background: rgba($r-dreamsicle, .1); + border: 1px solid $r-dreamsicle; + } +} + +label:after { + margin-left: .15rem; +} + ///////////////////////////// InfluxDB URL Triggers //////////////////////////// .article--content { @@ -211,6 +236,6 @@ } .code-tab-content { - .select-url{margin-top: -3.25rem} + .select-url{margin-top: -3.25rem} } } diff --git a/assets/styles/styles-default.scss b/assets/styles/styles-default.scss index afa7e41f5..97fd6d5cd 100644 --- a/assets/styles/styles-default.scss +++ b/assets/styles/styles-default.scss @@ -22,5 +22,5 @@ "layouts/algolia-search-overrides", "layouts/landing", "layouts/error-page", - "layouts/modal", + "layouts/cloud-selector", "layouts/feature-callouts"; diff --git a/content/v2.0/account-management/multi-member/_index.md b/content/v2.0/account-management/multi-member/_index.md deleted file mode 100644 index 6fe8b6980..000000000 --- a/content/v2.0/account-management/multi-member/_index.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Manage multiple members -description: > - View and manage multiple members in an InfluxDB Cloud account. -weight: 4 -menu: - v2_0: - parent: Account management - name: Manage multiple members ---- - -{{< cloud-name >}} accounts support multiple members in an organization. -Collaborate with others using these features. -By default, each member has full permissions on resources in your organization. - -{{< children >}} - -{{% cloud %}} -**Known issue**: Currently, checks created before a member is added are not visible to that member. -{{% /cloud %}} diff --git a/content/v2.0/account-management/multi-member/invite-member.md b/content/v2.0/account-management/multi-member/invite-member.md deleted file mode 100644 index 7f1bf84d4..000000000 --- a/content/v2.0/account-management/multi-member/invite-member.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Invite a member -list_title: Invite a member -description: > - Invite a member to collaborate in InfluxDB Cloud. -weight: 103 -menu: - v2_0: - parent: Manage multiple members - name: Invite a member ---- - -1. Navigate to the **Members** page under **Organizations** in the left navigation bar. - {{< nav-icon "org" >}} -2. Under **Add a new member to your organization**, enter the email address of the member to invite. - (Members must be invited one at a time.) -3. Click **Add & Invite**. - -An invitation with an activation link is sent to the specified email address. -The activation link expires after 72 hours. - -Once activated, the new member is added as an **Owner** with permissions to read and write all resources. - -{{% warn %}} -Currently, Cloud 2.0 has only one permission level: Owner. -With Owner permissions, a member can delete resources and other members from your organization. -Take care when inviting a member. -{{% /warn %}} diff --git a/content/v2.0/account-management/multi-member/remove-memberr.md b/content/v2.0/account-management/multi-member/remove-memberr.md deleted file mode 100644 index 614bebe14..000000000 --- a/content/v2.0/account-management/multi-member/remove-memberr.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Remove a member -seotitle: Remove a member from your InfluxDB Cloud organization -description: > - Remove a member from an InfluxDB Cloud organization. -weight: 103 -menu: - v2_0: - parent: Manage multiple members - identifier: remove_member_cloud ---- - -1. Navigate to the **Members** page under **Organizations** in the left navigation bar. - {{< nav-icon "org" >}} -2. Click the {{< icon "delete" >}} next to the member you want to remove. -3. Confirm the removal. diff --git a/content/v2.0/account-management/multi-user/_index.md b/content/v2.0/account-management/multi-user/_index.md new file mode 100644 index 000000000..365fe95fe --- /dev/null +++ b/content/v2.0/account-management/multi-user/_index.md @@ -0,0 +1,16 @@ +--- +title: Manage multiple users +description: > + View and manage multiple users in an InfluxDB Cloud account. +weight: 4 +menu: + v2_0: + parent: Account management + name: Manage multiple users +--- + +{{< cloud-name >}} accounts support multiple users in an organization. +Collaborate with others using these features. +By default, each user has full permissions on resources in your organization. + +{{< children >}} diff --git a/content/v2.0/account-management/multi-user/invite-user.md b/content/v2.0/account-management/multi-user/invite-user.md new file mode 100644 index 000000000..b3cfb526f --- /dev/null +++ b/content/v2.0/account-management/multi-user/invite-user.md @@ -0,0 +1,27 @@ +--- +title: Invite a user +list_title: Invite a user +description: > + Invite a user to collaborate in InfluxDB Cloud. +weight: 103 +menu: + v2_0: + parent: Manage multiple users + identifier: invite_user_cloud +--- + +1. Navigate to the **Users** page in the left navigation bar. +2. Under **Add a new user to your organization**, enter the email address of the user to invite. + (Users must be invited one at a time.) +3. Click **Add & Invite**. + +An invitation with an activation link is sent to the specified email address. +The activation link expires after 72 hours. + +Once activated, the new user is added as an **Owner** with permissions to read and write all resources. + +{{% warn %}} +Currently, Cloud 2.0 has only one permission level: Owner. +With Owner permissions, a user can delete resources and other users from your organization. +Take care when inviting a user. +{{% /warn %}} diff --git a/content/v2.0/account-management/multi-user/remove-user.md b/content/v2.0/account-management/multi-user/remove-user.md new file mode 100644 index 000000000..f00d2e034 --- /dev/null +++ b/content/v2.0/account-management/multi-user/remove-user.md @@ -0,0 +1,15 @@ +--- +title: Remove a user +seotitle: Remove a user from your InfluxDB Cloud organization +description: > + Remove a user from an InfluxDB Cloud organization. +weight: 103 +menu: + v2_0: + parent: Manage multiple users + identifier: remove_user_cloud +--- + +1. Navigate to the **Users** page in the left navigation bar. +2. Click the {{< icon "delete" >}} next to the user you want to remove. +3. Confirm the removal. diff --git a/content/v2.0/get-started.md b/content/v2.0/get-started.md index f1e38953d..9dbc7e64e 100644 --- a/content/v2.0/get-started.md +++ b/content/v2.0/get-started.md @@ -38,9 +38,14 @@ Limits are designed to let you monitor 5-10 sensors, stacks or servers comfortab 1. Choose one of the following: - **Subscribe through InfluxData** To subscribe to an InfluxDB Cloud 2.0 **Free Plan** through InfluxData, - go to [InfluxDB Cloud 2.0]({{< cloud-link >}}), enter your credentials, - and then click **Start your Free Plan now**. - When you're ready to grow, [upgrade to the Usage-Based Plan](/v2.0/account-management/billing/#upgrade-to-usage-based-plan). + go to [InfluxDB Cloud 2.0]({{< cloud-link >}}). + + - To use social sign-on, click **Continue with Google**. Note that Google social sign-on does not support email aliases. + + - Sign up with email by entering your name, email address, and password, then click **Create Account**. + + If you originally signed up with email but want to enable social sign-on, you can do so by logging in through Google as long as you use the same email address. + - **Subscribe through a cloud provider** To subscribe to an InfluxDB Cloud **Usage-Based** plan and pay through your **Amazon Web Services (AWS)** or **Google Cloud Platform (GCP)** account: @@ -61,16 +66,12 @@ Limits are designed to let you monitor 5-10 sensors, stacks or servers comfortab Currently, we do **not support** using an existing InfluxDB Cloud 2.0 account to sign up for an InfluxDB Cloud 2.0 plan through AWS or GCP Marketplaces. {{%/note%}} -2. InfluxDB Cloud requires email verification to complete the sign up process. +2. If you signed up with your email address, InfluxDB Cloud requires email verification to complete the sign up process. Verify your email address by opening the email sent to the address you provided and clicking **Verify Your Email**. 3. (If you subscribed through InfluxData) Choose your cloud provider. 4. Select a provider and region for your {{< cloud-name >}} instance. The following are available: - - **Amazon Web Services (AWS)** - - **US West (Oregon)** - - **EU Frankfurt** - - **Google Cloud Platform (GCP)** - - **Iowa** + {{< cloud_regions type="list" >}} _To suggest regions to add, click **Let us know** under Regions._ 5. (If you subscribed through InfluxData) Review the terms of the agreement, and then select **I have viewed and agree to InfluxDB Cloud 2.0 Services Subscription Agreement and InfluxData Global Data Processing Agreement**. @@ -116,7 +117,7 @@ executables, and running the initial setup process. ### Download and install InfluxDB v2.0 beta Download InfluxDB v2.0 beta for macOS. -InfluxDB v2.0 beta (macOS) +InfluxDB v2.0 beta (macOS) ### Unpackage the InfluxDB binaries To unpackage the downloaded archive, **double click the archive file in Finder** @@ -125,7 +126,7 @@ or run the following command in a macOS command prompt application such ```sh # Unpackage contents to the current working directory -tar zxvf ~/Downloads/influxdb_2.0.0-beta.10_darwin_amd64.tar.gz +tar zxvf ~/Downloads/influxdb_2.0.0-beta.12_darwin_amd64.tar.gz ``` #### (Optional) Place the binaries in your $PATH @@ -134,7 +135,7 @@ prefix the executables with `./` to run then in place. ```sh # (Optional) Copy the influx and influxd binary to your $PATH -sudo cp influxdb_2.0.0-beta.10_darwin_amd64/{influx,influxd} /usr/local/bin/ +sudo cp influxdb_2.0.0-beta.12_darwin_amd64/{influx,influxd} /usr/local/bin/ ``` {{% note %}} @@ -198,8 +199,8 @@ influxd --reporting-disabled ### Download and install InfluxDB v2.0 beta Download the InfluxDB v2.0 beta package appropriate for your chipset. -InfluxDB v2.0 beta (amd64) -InfluxDB v2.0 beta (arm) +InfluxDB v2.0 beta (amd64) +InfluxDB v2.0 beta (arm) ### Place the executables in your $PATH Unpackage the downloaded archive and place the `influx` and `influxd` executables in your system `$PATH`. @@ -208,10 +209,10 @@ _**Note:** The following commands are examples. Adjust the file names, paths, an ```sh # Unpackage contents to the current working directory -tar xvzf path/to/influxdb_2.0.0-beta.10_linux_amd64.tar.gz +tar xvzf path/to/influxdb_2.0.0-beta.12_linux_amd64.tar.gz # Copy the influx and influxd binary to your $PATH -sudo cp influxdb_2.0.0-beta.10_linux_amd64/{influx,influxd} /usr/local/bin/ +sudo cp influxdb_2.0.0-beta.12_linux_amd64/{influx,influxd} /usr/local/bin/ ``` {{% note %}} @@ -381,17 +382,17 @@ You are ready to [write or collect data](/v2.0/write-data). {{% note %}} #### Using the influx CLI after setting up InfluxDB through the UI -To use the [`influx` CLI](/v2.0/reference/cli/influx) after setting up InfluxDB through the UI, -use one of the following methods to provide your [authentication token](/v2.0/users/tokens/) to the CLI: +To use the [`influx` CLI](/v2.0/reference/cli/influx) after setting up InfluxDB through the UI, provide your [authentication token](/v2.0/users/tokens/), which is automatically generated during the setup process. For instructions on viewing your token via CLI or UI, see [View tokens](/v2.0/security/tokens/view-tokens/). -1. Pass your token to the `influx` CLI using the `-t` or `--token` flag. -2. Set the `INFLUX_TOKEN` environment variable using your token. +Use one of the following methods to provide your authentication token to the CLI: + +- Create a new InfluxDB connection configuration using the [`influx config create` command](/v2.0/reference/cli/influx/config/create/). +- Pass your token to the `influx` CLI using the `-t` or `--token` flag. +- Set the `INFLUX_TOKEN` environment variable using your token. ```bash export INFLUX_TOKEN=oOooYourAuthTokenOoooOoOO== ``` -3. Store your token in `~/.influxdbv2/credentials`. - _The content of the `credentials` file should be only your token._ _See [View tokens](/v2.0/security/tokens/view-tokens/) for information about retrieving authentication tokens._ @@ -418,7 +419,10 @@ influx setup Enter nothing for an infinite retention period. 7. Confirm the details for your primary user, organization, and bucket. -InfluxDB is now initialized with a primary user, organization, and bucket. +InfluxDB is now initialized with a primary user, organization, bucket, and authentication token. It has also create a config profile for you so that you don't have to add organization and token to every command. To view that config profile, use the [`influx config list`](/v2.0/reference/cli/influx/config) command. + +To continue to use InfluxDB via the CLI, you need the authentication token created during setup. To view the token, log into the UI with the credentials created above. (For instructions, see [View tokens in the InfluxDB UI](/v2.0/security/tokens/view-tokens/#view-tokens-in-the-influxdb-ui).) + You are ready to [write or collect data](/v2.0/write-data). {{% note %}} @@ -458,6 +462,10 @@ For details, see [Scrape data](/v2.0/write-data/scrape-data/). For information about using the InfluxDB v2 API, `influx` CLI, and client libraries to write data, see [Write data to InfluxDB](/v2.0/write-data/). +#### Demo data +If using **{{< cloud-name "short" >}}**, [add a demo data bucket](/v2.0/write-data/sample-data/demo-data/) +for quick, **free** access to time series data. + ### Query data Query data using Flux, the UI, and the `influx` command line interface. @@ -484,10 +492,7 @@ The primary differences between InfluxDB OSS 2.0 and InfluxDB Cloud 2.0 are: - [InfluxDB scrapers](/v2.0/write-data/scrape-data/) that collect data from specified targets are not available in {{< cloud-name "short" >}}. -- {{< cloud-name "short" >}} instances are currently limited to a single organization with a single user. -- **InfluxDB Cloud** does not support retrieving data from a file based CSV source - using the `file` parameter of the [`csv.from()`](/v2.0/reference/flux/functions/csv/from); - however you can use raw CSV data with the `csv` parameter. +- {{< cloud-name "short" >}} instances are currently limited to a single organization. #### New features in InfluxDB Cloud 2.0 diff --git a/content/v2.0/influxdb-templates/cloud.md b/content/v2.0/influxdb-templates/cloud.md new file mode 100644 index 000000000..c66e312d2 --- /dev/null +++ b/content/v2.0/influxdb-templates/cloud.md @@ -0,0 +1,30 @@ +--- +title: InfluxDB templates in InfluxDB Cloud +list_title: InfluxDB templates in Cloud +description: > + Download and use the `influx` CLI to apply and manage InfluxDB templates with + your InfluxDB Cloud account. +menu: + v2_0: + parent: InfluxDB templates + name: Templates in Cloud +weight: 101 +aliases: + - /v2.0/influxdb-templates/get_started_cloud/ +v2.0/tags: [templates] +products: [cloud] +--- + +If using InfluxDB Cloud, download and use the [`influx` command line interface (CLI)](/v2.0/reference/cli/influx/) +to apply and manage templates in your InfluxDB Cloud account. + +InfluxDB OSS 2.0 includes the InfluxDB CLI (`influx`). If you haven’t already, do the following: + +1. [Download and install InfluxDB 2.0 OSS](/v2.0/get-started/#start-with-influxdb-oss). +2. [Configure the `influx` CLI](/v2.0/get-started/#set-up-influxdb) to use your + InfluxDB Cloud instance URL, organization, and tokens. +3. [Use the `influx` CLI](/v2.0/reference/cli/influx/) to use, manage, and create + InfluxDB templates: + + - [Use templates](/v2.0/influxdb-templates/use/) + - [Create templates](/v2.0/influxdb-templates/create/) diff --git a/content/v2.0/influxdb-templates/create.md b/content/v2.0/influxdb-templates/create.md index 0093ffbaf..1dfd512d4 100644 --- a/content/v2.0/influxdb-templates/create.md +++ b/content/v2.0/influxdb-templates/create.md @@ -1,7 +1,7 @@ --- title: Create an InfluxDB template description: > - Use the InfluxDB UI and the `influx pkg export` command to create InfluxDB templates. + Use the InfluxDB UI and the `influx export` command to create InfluxDB templates. menu: v2_0: parent: InfluxDB templates @@ -10,11 +10,11 @@ menu: weight: 103 v2.0/tags: [templates] related: - - /v2.0/reference/cli/influx/pkg/export/ - - /v2.0/reference/cli/influx/pkg/export/all/ + - /v2.0/reference/cli/influx/export/ + - /v2.0/reference/cli/influx/export/all/ --- -Use the InfluxDB user interface (UI) and the `influx pkg export` command to +Use the InfluxDB user interface (UI) and the `influx export` command to create InfluxDB templates. Add resources (buckets, Telegraf configurations, tasks, and more) in the InfluxDB UI and export the resources as a template. @@ -61,7 +61,7 @@ Do one of the following to export a template: ### Export all resources To export all templatable resources within an organization to a template manifest, -use the `influx pkg export all` command. +use the `influx export all` command. Provide the following: - **Organization name** or **ID** @@ -73,17 +73,17 @@ Provide the following: ###### Export all resources to a template ```sh # Syntax -influx pkg export all -o -f -t +influx export all -o -f -t # Example -influx pkg export all \ +influx export all \ -o my-org \ -f ~/templates/awesome-template.yml \ -t $INFLUX_TOKEN ``` #### Export resources filtered by labelName or resourceKind -The `influx pkg export all` command has an optional `--filter` flag that exports +The `influx export all` command has an optional `--filter` flag that exports only resources that match specified label names or resource kinds. Provide multiple filters for both `labelName` and `resourceKind` @@ -97,7 +97,7 @@ and ``` ```sh -influx pkg export all \ +influx export all \ -o my-org \ -f ~/templates/awesome-template.yml \ -t $INFLUX_TOKEN \ @@ -107,15 +107,12 @@ influx pkg export all \ --filter=labelName=Example2 ``` - - - For information about flags, see the -[`influx pkg export all` documentation](/v2.0/reference/cli/influx/pkg/export/all/). +[`influx export all` documentation](/v2.0/reference/cli/influx/export/all/). ### Export specific resources To export specific resources within an organization to a template manifest, -use the `influx pkg export` with resource flags for each resource to include. +use the `influx export` with resource flags for each resource to include. Provide the following: - **Organization name** or **ID** @@ -125,15 +122,15 @@ Provide the following: **JSON** (`.json`) are supported. - **Resource flags** with corresponding lists of resource IDs to include in the template. For information about what resource flags are available, see the - [`influx pkg export` documentation](/v2.0/reference/cli/influx/pkg/export/). + [`influx export` documentation](/v2.0/reference/cli/influx/export/). ###### Export specific resources to a template ```sh # Syntax -influx pkg export all -o -f -t [resource-flags] +influx export all -o -f -t [resource-flags] # Example -influx pkg export all \ +influx export all \ -o my-org \ -f ~/templates/awesome-template.yml \ -t $INFLUX_TOKEN \ @@ -193,13 +190,13 @@ metadata: {{< /code-tabs-wrapper >}} Using the example above, users are prompted to provide a value for `bucket-name-1` -when [installing the template](/v2.0/influxdb-templates/use/#install-templates). +when [applying the template](/v2.0/influxdb-templates/use/#apply-templates). Users can also include the `--env-ref` flag with the appropriate key-value pair when installing the template. ```sh # Set bucket-name-1 to "myBucket" -influx pkg \ +influx apply \ -f /path/to/template.yml \ --env-ref=bucket-name-1=myBucket ``` @@ -211,7 +208,9 @@ exist in the template and what keys to use to replace them._ #### Resource fields that support environment references Only the following fields support environment references: - +- `metadata.name` +- `spec.endpointName` +- `spec.associations.name` {{% /note %}} ## Share your InfluxDB templates diff --git a/content/v2.0/influxdb-templates/get_started_cloud.md b/content/v2.0/influxdb-templates/get_started_cloud.md deleted file mode 100644 index 5741aaae6..000000000 --- a/content/v2.0/influxdb-templates/get_started_cloud.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Get started with InfluxDB templates -description: > - To get started with InfluxDB templates, you need to download the InfluxDB CLI. -menu: - v2_0: - parent: InfluxDB templates - name: Templates in Cloud - identifier: Templates requires CLI -weight: 101 -v2.0/tags: [templates] -products: [cloud] ---- - -If using **InfluxDB Cloud**, download the `influx` command line interface (CLI) -and use it to manage InfluxDB templates with your InfluxDB Cloud account. -**The `influx` CLI is part of InfluxDB OSS package.** - -- [Download InfluxDB OSS 2.0](/v2.0/get-started/#start-with-influxdb-oss) -- [Set up and use InfluxDB CLI](/v2.0/reference/cli/influx/) with the appropriate - InfluxDB Cloud instance URL, organization, and tokens associated with your - **InfluxDB Cloud** account. - -Use the `influx pkg` command to: - -- [Use templates](/v2.0/influxdb-templates/use/) -- [Create templates](/v2.0/influxdb-templates/create/) -- [Manage InfluxDB stacks](/v2.0/influxdb-templates/stacks/) diff --git a/content/v2.0/influxdb-templates/use.md b/content/v2.0/influxdb-templates/use.md index 760b4f81c..8c6f01b3a 100644 --- a/content/v2.0/influxdb-templates/use.md +++ b/content/v2.0/influxdb-templates/use.md @@ -1,8 +1,8 @@ --- title: Use InfluxDB templates description: > - Use the `influx pkg` command to view and install templates from your local - filesystem or from URLs. + Use the `influx` command line interface (CLI) to summarize, validate, and apply + templates from your local filesystem and from URLs. menu: v2_0: parent: InfluxDB templates @@ -10,23 +10,25 @@ menu: weight: 102 v2.0/tags: [templates] related: - - /v2.0/reference/cli/influx/pkg/ + - /v2.0/reference/cli/influx/apply/ + - /v2.0/reference/cli/influx/template/ + - /v2.0/reference/cli/influx/template/validate/ --- -Use the `influx pkg` command to summarize, validate, and install templates from -your local filesystem and from URLs. +Use the `influx` command line interface (CLI) to summarize, validate, and apply +templates from your local filesystem and from URLs. - [Use InfluxDB community templates](#use-influxdb-community-templates) - [View a template summary](#view-a-template-summary) - [Validate a template](#validate-a-template) -- [Install templates](#install-templates) +- [Apply templates](#apply-templates) ## Use InfluxDB community templates The [InfluxDB community templates repository](https://github.com/influxdata/community-templates/) is home to a growing number of InfluxDB templates developed and maintained by others in the InfluxData community. -Install community templates directly from GitHub using a template's download URL +Apply community templates directly from GitHub using a template's download URL or download the template. {{% note %}} @@ -47,8 +49,8 @@ https://raw.githubusercontent.com/influxdata/community-templates/master/docker/d View InfluxDB Community Templates ## View a template summary -To view a summary of what's included in a template before installing the template, -use the [`influx pkg summary` command](/v2.0/reference/cli/influx/pkg/summary/). +To view a summary of what's included in a template before applying the template, +use the [`influx template` command](/v2.0/reference/cli/influx/template/). View a summary of a template stored in your local filesystem or from a URL. {{% code-tabs-wrapper %}} @@ -59,26 +61,26 @@ View a summary of a template stored in your local filesystem or from a URL. {{% code-tab-content %}} ```sh # Syntax -influx pkg summary -f +influx template -f # Example -influx pkg summary -f /path/to/template.yml +influx template -f /path/to/template.yml ``` {{% /code-tab-content %}} {{% code-tab-content %}} ```sh # Syntax -influx pkg summary -u +influx template -u # Example -influx pkg summary -u https://raw.githubusercontent.com/influxdata/community-templates/master/linux_system/linux_system.yml +influx template -u https://raw.githubusercontent.com/influxdata/community-templates/master/linux_system/linux_system.yml ``` {{% /code-tab-content %}} {{% /code-tabs-wrapper %}} ## Validate a template To validate a template before you install it or troubleshoot a template, use -the [`influx pkg validate` command](/v2.0/reference/cli/influx/pkg/validate/). +the [`influx template validate` command](/v2.0/reference/cli/influx/template/validate/). Validate a template stored in your local filesystem or from a URL. {{% code-tabs-wrapper %}} @@ -89,99 +91,99 @@ Validate a template stored in your local filesystem or from a URL. {{% code-tab-content %}} ```sh # Syntax -influx pkg validate -f +influx template validate -f # Example -influx pkg validate -f /path/to/template.yml +influx template validate -f /path/to/template.yml ``` {{% /code-tab-content %}} {{% code-tab-content %}} ```sh # Syntax -influx pkg validate -u +influx template validate -u # Example -influx pkg validate -u https://raw.githubusercontent.com/influxdata/community-templates/master/linux_system/linux_system.yml +influx template validate -u https://raw.githubusercontent.com/influxdata/community-templates/master/linux_system/linux_system.yml ``` {{% /code-tab-content %}} {{% /code-tabs-wrapper %}} -## Install templates -Use the [`influx pkg` command](/v2.0/reference/cli/influx/pkg/) to install templates +## Apply templates +Use the [`influx apply` command](/v2.0/reference/cli/influx/apply/) to install templates from your local filesystem or from URLs. -- [Install a template from a file](#install-a-template-from-a-file) -- [Install all templates in a directory](#install-all-templates-in-a-directory) -- [Install a template from a URL](#install-a-template-from-a-url) -- [Install templates from both files and URLs](#install-templates-from-both-files-and-urls) +- [Apply a template from a file](#apply-a-template-from-a-file) +- [Apply all templates in a directory](#apply-all-templates-in-a-directory) +- [Apply a template from a URL](#apply-a-template-from-a-url) +- [Apply templates from both files and URLs](#apply-templates-from-both-files-and-urls) - [Define environment references](#define-environment-references) - [Include a secret when installing a template](#include-a-secret-when-installing-a-template) -### Install a template from a file +### Apply a template from a file To install templates stored on your local machine, use the `-f` or `--file` flag to provide the **file path** of the template manifest. ```sh # Syntax -influx pkg -o -f +influx apply -o -f # Examples -# Install a single template -influx pkg -o example-org -f /path/to/template.yml +# Apply a single template +influx apply -o example-org -f /path/to/template.yml -# Install multiple templates -influx pkg -o example-org \ +# Apply multiple templates +influx apply -o example-org \ -f /path/to/this/template.yml \ -f /path/to/that/template.yml ``` -### Install all templates in a directory -To install all templates in a directory, use the `-f` or `--file` flag to provide +### Apply all templates in a directory +To apply all templates in a directory, use the `-f` or `--file` flag to provide the **directory path** of the directory where template manifests are stored. -By default, this only installs templates stored in the specified directory. -To install all templates stored in the specified directory and its subdirectories, -include the `--recurse` flag. +By default, this only applies templates stored in the specified directory. +To apply all templates stored in the specified directory and its subdirectories, +include the `-R`, `--recurse` flag. ```sh # Syntax -influx pkg -o -f +influx apply -o -f # Examples -# Install all templates in a directory -influx pkg -o example-org -f /path/to/template/dir/ +# Apply all templates in a directory +influx apply -o example-org -f /path/to/template/dir/ -# Install all templates in a directory and its subdirectories -influx pkg -o example-org -f /path/to/template/dir/ --recurse +# Apply all templates in a directory and its subdirectories +influx apply -o example-org -f /path/to/template/dir/ -R ``` -### Install a template from a URL -To install templates from a URL, use the `-u` or `--url` flag to provide the URL +### Apply a template from a URL +To apply templates from a URL, use the `-u` or `--template-url` flag to provide the URL of the template manifest. ```sh # Syntax -influx pkg -o -u +influx apply -o -u # Examples -# Install a single template from a URL -influx pkg -o example-org -u https://example.com/templates/template.yml +# Apply a single template from a URL +influx apply -o example-org -u https://example.com/templates/template.yml -# Install multiple templates from URLs -influx pkg -o example-org \ +# Apply multiple templates from URLs +influx apply -o example-org \ -u https://example.com/templates/template1.yml \ -u https://example.com/templates/template2.yml ``` -### Install templates from both files and URLs -To install templates from both files and URLs in a single command, include multiple +### Apply templates from both files and URLs +To apply templates from both files and URLs in a single command, include multiple file or directory paths and URLs, each with the appropriate `-f` or `-u` flag. ```sh # Syntax -influx pkg -o -u -f +influx apply -o -u -f # Example -influx pkg -o example-org \ +influx apply -o example-org \ -u https://example.com/templates/template1.yml \ -u https://example.com/templates/template2.yml \ -f ~/templates/custom-template.yml \ @@ -191,14 +193,14 @@ influx pkg -o example-org \ ### Define environment references Some templates include [environment references](/v2.0/influxdb-templates/create/#include-user-definable-resource-names) that let you provide custom resource names. -The `influx pkg` command prompts you to provide a value for each environment +The `influx apply` command prompts you to provide a value for each environment reference in the template. You can also provide values for environment references by including an `--env-ref` flag with a key-value pair comprised of the environment reference key and the value to replace it. ```sh -influx pkg -o example-org -f /path/to/template.yml \ +influx apply -o example-org -f /path/to/template.yml \ --env-ref=bucket-name-1=myBucket --env-ref=label-name-1=Label1 \ --env-ref=label-name-2=Label2 @@ -212,18 +214,18 @@ with the secret key-value pair. ```sh # Syntax -influx pkg -o -f \ +influx apply -o -f \ --secret== # Examples -# Define a single secret when installing a template -influx pkg -o example-org -f /path/to/template.yml \ +# Define a single secret when applying a template +influx apply -o example-org -f /path/to/template.yml \ --secret=FOO=BAR -# Define multiple secrets when installing a template -influx pkg -o example-org -f /path/to/template.yml \ +# Define multiple secrets when applying a template +influx apply -o example-org -f /path/to/template.yml \ --secret=FOO=bar \ --secret=BAZ=quz ``` -_To add a secret after installing a template, see [Add secrets](/v2.0/security/secrets/manage-secrets/add/)._ +_To add a secret after applying a template, see [Add secrets](/v2.0/security/secrets/manage-secrets/add/)._ diff --git a/content/v2.0/monitor-alert/checks/_index.md b/content/v2.0/monitor-alert/checks/_index.md index b4700ecfe..2c84bb054 100644 --- a/content/v2.0/monitor-alert/checks/_index.md +++ b/content/v2.0/monitor-alert/checks/_index.md @@ -17,7 +17,3 @@ Checks in InfluxDB query data and apply a status or level to each data point bas Learn how to create and manage checks: {{< children >}} - -{{% cloud %}} -**Known issue**: Currently in {{< cloud-name >}}, checks created before a [member is added to an organization](/v2.0/account-management/multi-member) are not visible to that member. -{{% /cloud %}} diff --git a/content/v2.0/monitor-alert/checks/view.md b/content/v2.0/monitor-alert/checks/view.md index bb83be1c3..3c8412d4b 100644 --- a/content/v2.0/monitor-alert/checks/view.md +++ b/content/v2.0/monitor-alert/checks/view.md @@ -26,10 +26,6 @@ To view checks, click **Alerts** in navigation menu on the left. ## View a list of all checks The **Checks** section of the Alerts landing page displays all existing checks. -{{% cloud %}} -**Known issue**: Currently in {{< cloud-name >}}, checks created before a [member is added to an organization](/v2.0/account-management/multi-member) are not visible to that member. -{{% /cloud %}} - ## View check details Click the name of the check you want to view. The check builder appears. diff --git a/content/v2.0/query-data/execute-queries.md b/content/v2.0/query-data/execute-queries.md index 17624b841..a6711af03 100644 --- a/content/v2.0/query-data/execute-queries.md +++ b/content/v2.0/query-data/execute-queries.md @@ -89,9 +89,9 @@ curl http://localhost:9999/api/v2/query?org=my-org -XPOST -sS \ -H 'Accept: application/csv' \ -H 'Content-type: application/vnd.flux' \ -d 'from(bucket:"example-bucket") - |> range(start:-1000h) - |> group(columns:["_measurement"], mode:"by") - |> sum()' + |> range(start: -12h) + |> filter(fn: (r) => r._measurement == "example-measurement" + |> aggregateWindow(every: 1h, fn: mean)' ``` {{% /code-tab-content %}} @@ -103,9 +103,9 @@ curl http://localhost:9999/api/v2/query?org=my-org -XPOST -sS \ -H 'Content-type: application/vnd.flux' \ -H 'Accept-Encoding: gzip' \ -d 'from(bucket:"example-bucket") - |> range(start:-1000h) - |> group(columns:["_measurement"], mode:"by") - |> sum()' + |> range(start: -12h) + |> filter(fn: (r) => r._measurement == "example-measurement" + |> aggregateWindow(every: 1h, fn: mean)' ``` {{% /code-tab-content %}} {{< /code-tabs-wrapper >}} diff --git a/content/v2.0/query-data/flux/calculate-percentages.md b/content/v2.0/query-data/flux/calculate-percentages.md index 9b594ea0e..983e5527d 100644 --- a/content/v2.0/query-data/flux/calculate-percentages.md +++ b/content/v2.0/query-data/flux/calculate-percentages.md @@ -9,7 +9,7 @@ menu: v2_0: name: Calculate percentages parent: Query with Flux -weight: 206 +weight: 209 aliases: - /v2.0/query-data/guides/manipulate-timestamps/ related: @@ -201,7 +201,7 @@ pgHost = secrets.get(key: "POSTGRES_HOST") t1 = sql.from( driverName: "postgres", dataSourceName: "postgresql://${pgUser}:${pgPass}@${pgHost}", - query:"SELECT id, name, available FROM exampleTable" + query:"SELECT id, name, available FROM example_table" ) t2 = from(bucket: "example-bucket") diff --git a/content/v2.0/query-data/flux/explore-schema.md b/content/v2.0/query-data/flux/explore-schema.md new file mode 100644 index 000000000..c199c231f --- /dev/null +++ b/content/v2.0/query-data/flux/explore-schema.md @@ -0,0 +1,140 @@ +--- +title: Explore your data schema with Flux +list_title: Explore your schema +description: > + Flux provides functions that let you explore the structure and schema of your + data stored in InfluxDB. +v2.0/tags: [schema] +menu: + v2_0: + name: Explore your schema + parent: Query with Flux +weight: 206 +related: + - /v2.0/reference/flux/stdlib/built-in/inputs/buckets/ + - /v2.0/reference/flux/stdlib/influxdb-v1/measurements + - /v2.0/reference/flux/stdlib/influxdb-v1/fieldkeys + - /v2.0/reference/flux/stdlib/influxdb-v1/measurementfieldkeys + - /v2.0/reference/flux/stdlib/influxdb-v1/tagkeys + - /v2.0/reference/flux/stdlib/influxdb-v1/measurementtagkeys + - /v2.0/reference/flux/stdlib/influxdb-v1/tagvalues + - /v2.0/reference/flux/stdlib/influxdb-v1/measurementtagvalues +list_code_example: | + ```js + import "influxdata/influxdb/v1" + + // List buckets + buckets() + + // List measurements + v1.measurements(bucket: "example-bucket") + + // List field keys + v1.fieldKeys(bucket: "example-bucket") + + // List tag keys + v1.tagKeys(bucket: "example-bucket") + + // List tag values + v1.tagValues(bucket: "example-bucket", tag: "example-tag") + ``` +--- + +Flux provides functions that let you explore the structure and schema of your +data stored in InfluxDB. + +- [List buckets](#list-buckets) +- [List measurements](#list-measurements) +- [List field keys](#list-field-keys) +- [List tag keys](#list-tag-keys) +- [List tag values](#list-tag-values) + +## List buckets +Use the [`buckets()` function](/v2.0/reference/flux/stdlib/built-in/inputs/buckets/) +to list **buckets in your organization**. + +```js +buckets() +``` + +## List measurements +Use the [`v1.measurements()` function](/v2.0/reference/flux/stdlib/influxdb-v1/measurements) +to list **measurements in a bucket**. + +```js +import "influxdata/influxdb/v1" + +v1.measurements(bucket: "example-bucket") +``` + +## List field keys +Use the [`v1.fieldKeys` function](/v2.0/reference/flux/stdlib/influxdb-v1/fieldkeys) +to list **field keys in a bucket**. + +```js +import "influxdata/influxdb/v1" + +v1.fieldKeys(bucket: "example-bucket") +``` + +### List fields in a measurement +Use the [`v1.measurementFieldKeys` function](/v2.0/reference/flux/stdlib/influxdb-v1/measurementfieldkeys) +to list **field keys in a measurement**. + +```js +import "influxdata/influxdb/v1" + +v1.measurementFieldKeys( + bucket: "example-bucket", + measurement: "example-measurement" +) +``` + +## List tag keys +Use the [`v1.tagKeys()` function](/v2.0/reference/flux/stdlib/influxdb-v1/tagkeys) +to list **tag keys in a bucket**. + +```js +import "influxdata/influxdb/v1" + +v1.tagKeys(bucket: "example-bucket") +``` + +### List tag keys in a measurement +Use the [`v1.measurementTagKeys` function](/v2.0/reference/flux/stdlib/influxdb-v1/measurementtagkeys) +to list **tag keys in a measurement**. +_This function returns results from the last 30 days._ + +```js +import "influxdata/influxdb/v1" + +v1.measurementTagKeys( + bucket: "example-bucket", + measurement: "example-measurement" +) +``` + +## List tag values +Use the [`v1.tagValues()` function](/v2.0/reference/flux/stdlib/influxdb-v1/tagvalues) +to list **tag values for a given tag in a bucket**. + +```js +import "influxdata/influxdb/v1" + +v1.tagValues(bucket: "example-bucket", tag: "example-tag") +``` + +### List tag values in a measurement +Use the [`v1.measurementTagValues` function](/v2.0/reference/flux/stdlib/influxdb-v1/measurementtagvalues) +to list **tag values for a given tag in a measurement**. +_This function returns results from the last 30 days._ + +```js +import "influxdata/influxdb/v1" + +v1.measurementTagValues( + bucket: "example-bucket", + tag: "example-tag", + measurement: "example-measurement" +) +``` diff --git a/content/v2.0/query-data/flux/mathematic-operations.md b/content/v2.0/query-data/flux/mathematic-operations.md index 284657756..8b133dfc4 100644 --- a/content/v2.0/query-data/flux/mathematic-operations.md +++ b/content/v2.0/query-data/flux/mathematic-operations.md @@ -10,7 +10,7 @@ menu: v2_0: name: Transform data with math parent: Query with Flux -weight: 205 +weight: 208 aliases: - /v2.0/query-data/guides/mathematic-operations/ related: @@ -221,7 +221,7 @@ pgHost = secrets.get(key: "POSTGRES_HOST") t1 = sql.from( driverName: "postgres", dataSourceName: "postgresql://${pgUser}:${pgPass}@${pgHost}", - query:"SELECT id, name, available FROM exampleTable" + query:"SELECT id, name, available FROM example_table" ) t2 = from(bucket: "example-bucket") diff --git a/content/v2.0/query-data/flux/scalar-values.md b/content/v2.0/query-data/flux/scalar-values.md index 4eca5112d..3bb7a8542 100644 --- a/content/v2.0/query-data/flux/scalar-values.md +++ b/content/v2.0/query-data/flux/scalar-values.md @@ -32,9 +32,9 @@ This lets you, for example, dynamically set variables using query results. **To extract scalar values from output:** -1. [Extract a table](#extract-a-table). -2. [Extract a column from the table](#extract-a-column-from-the-table) - _**or**_ [extract a row from the table](#extract-a-row-from-the-table). +1. [Extract a column from the input stream](#extract-a-column) + _**or**_ [extract a row from the input stream](#extract-a-row). +2. Use the returned array or object to reference scalar values. _The samples on this page use the [sample data provided below](#sample-data)._ @@ -48,61 +48,33 @@ _The samples on this page use the [sample data provided below](#sample-data)._ See [#15321](https://github.com/influxdata/influxdb/issues/15231). {{% /warn %}} -## Extract a table +## Table extraction Flux formats query results as a stream of tables. -To extract a scalar value from a stream of tables, you must first extract a single table. - -to extract a single table from the stream of tables. - -{{% note %}} -If query results include only one table, it is still formatted as a stream of tables. -You still must extract that table from the stream. -{{% /note %}} - -Use [`tableFind()`](/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/tablefind/) -to extract the **first** table whose [group key](/v2.0/reference/glossary/#group-key) -values match the `fn` [predicate function](/v2.0/reference/glossary/#predicate-expression). -The predicate function requires a `key` object, which represents the group key of -each table. - -```js -sampleData - |> tableFind(fn: (key) => - key._field == "temp" and - key.location == "sfo" - ) -``` - -The example above returns a single table: - -| _time | location | _field | _value | -|:----- |:--------:|:------:| ------:| -| 2019-11-01T12:00:00Z | sfo | temp | 65.1 | -| 2019-11-01T13:00:00Z | sfo | temp | 66.2 | -| 2019-11-01T14:00:00Z | sfo | temp | 66.3 | -| 2019-11-01T15:00:00Z | sfo | temp | 66.8 | +Both [`findColumn()`](/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findcolumn/) +and [`findRecord()`](/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findrecord/) +extract the first table in a stream of tables whose [group key](/v2.0/reference/glossary/#group-key) +values match the `fn` [predicate function](/v2.0/reference/glossary/#predicate-function). {{% note %}} #### Extract the correct table -Flux functions do not guarantee table order and `tableFind()` returns only the -**first** table that matches the `fn` predicate. -To extract the table that includes the data you actually want, be very specific in -your predicate function or filter and transform your data to minimize the number -of tables piped-forward into `tableFind()`. +Flux functions do not guarantee table order. +`findColumn()` and `findRecord` extract only the **first** table that matches the `fn` predicate. +To extract the correct table, be very specific in your predicate function or +filter and transform your data to minimize the number of tables piped-forward into the functions. {{% /note %}} -## Extract a column from the table -Use the [`getColumn()` function](/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getcolumn/) +## Extract a column +Use the [`findColumn()` function](/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findcolumn/) to output an array of values from a specific column in the extracted table. +_See [Sample data](#sample-data) below._ ```js sampleData - |> tableFind(fn: (key) => - key._field == "temp" and - key.location == "sfo" + |> findColumn( + fn: (key) => key._field == "temp" and key.location == "sfo", + column: "_value" ) - |> getColumn(column: "_value") // Returns [65.1, 66.2, 66.3, 66.8] ``` @@ -113,13 +85,14 @@ In the example below, `SFOTemps` represents the array of values. Reference a specific index (integer starting from `0`) in the array to return the value at that index. +_See [Sample data](#sample-data) below._ + ```js SFOTemps = sampleData - |> tableFind(fn: (key) => - key._field == "temp" and - key.location == "sfo" + |> findColumn( + fn: (key) => key._field == "temp" and key.location == "sfo", + column: "_value" ) - |> getColumn(column: "_value") SFOTemps // Returns [65.1, 66.2, 66.3, 66.8] @@ -131,19 +104,18 @@ SFOTemps[2] // Returns 66.3 ``` -## Extract a row from the table -Use the [`getRecord()` function](/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getrecord/) +## Extract a row +Use the [`findRecord()` function](/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findrecord/) to output data from a single row in the extracted table. Specify the index of the row to output using the `idx` parameter. The function outputs an object with key-value pairs for each column. ```js sampleData - |> tableFind(fn: (key) => - key._field == "temp" and - key.location == "sfo" + |> findRecord( + fn: (key) => key._field == "temp" and key.location == "sfo", + idx: 0 ) - |> getRecord(idx: 0) // Returns { // _time:2019-11-11T12:00:00Z, @@ -161,11 +133,10 @@ keys in the object. ```js tempInfo = sampleData - |> tableFind(fn: (key) => - key._field == "temp" and - key.location == "sfo" + |> findRecord( + fn: (key) => key._field == "temp" and key.location == "sfo", + idx: 0 ) - |> getRecord(idx: 0) tempInfo // Returns { @@ -190,8 +161,10 @@ Create custom helper functions to extract scalar values from query output. // Define a helper function to extract field values getFieldValue = (tables=<-, field) => { extract = tables - |> tableFind(fn: (key) => key._field == field) - |> getColumn(column: "_value") + |> findColumn( + fn: (key) => key._field == field, + column: "_value" + ) return extract[0] } @@ -210,8 +183,10 @@ lastJFKTemp // Define a helper function to extract a row as an object getRow = (tables=<-, field, idx=0) => { extract = tables - |> tableFind(fn: (key) => true) - |> getRecord(idx: idx) + |> findRecord( + fn: (key) => true, + idx: idx + ) return extract } diff --git a/content/v2.0/query-data/flux/sql.md b/content/v2.0/query-data/flux/sql.md index ea2842d93..6baee5ac5 100644 --- a/content/v2.0/query-data/flux/sql.md +++ b/content/v2.0/query-data/flux/sql.md @@ -4,7 +4,7 @@ seotitle: Query SQL data sources with InfluxDB list_title: Query SQL data description: > The Flux `sql` package provides functions for working with SQL data sources. - Use `sql.from()` to query SQL databases like PostgreSQL and MySQL + Use `sql.from()` to query SQL databases like PostgreSQL, MySQL, Snowflake, and SQLite. v2.0/tags: [query, flux, sql] menu: v2_0: @@ -30,8 +30,8 @@ list_code_example: | The [Flux](/v2.0/reference/flux) `sql` package provides functions for working with SQL data sources. [`sql.from()`](/v2.0/reference/flux/stdlib/sql/from/) lets you query SQL data sources like [PostgreSQL](https://www.postgresql.org/), [MySQL](https://www.mysql.com/), -and [SQLite](https://www.sqlite.org/index.html), and use the results with InfluxDB -dashboards, tasks, and other operations. +[Snowflake](https://www.snowflake.com/), and [SQLite](https://www.sqlite.org/index.html), +and use the results with InfluxDB dashboards, tasks, and other operations. - [Query a SQL data source](#query-a-sql-data-source) - [Join SQL data with data in InfluxDB](#join-sql-data-with-data-in-influxdb) @@ -55,6 +55,7 @@ To query a SQL data source: {{% code-tabs %}} [PostgreSQL](#) [MySQL](#) +[Snowflake](#) [SQLite](#) {{% /code-tabs %}} @@ -82,6 +83,18 @@ sql.from( ``` {{% /code-tab-content %}} +{{% code-tab-content %}} +```js +import "sql" + +sql.from( + driverName: "snowflake", + dataSourceName: "user:password@account/db/exampleschema?warehouse=wh", + query: "SELECT * FROM example_table" +) +``` +{{% /code-tab-content %}} + {{% code-tab-content %}} ```js // NOTE: InfluxDB OSS and InfluxDB Cloud do not have access to diff --git a/content/v2.0/query-data/flux/window-aggregate.md b/content/v2.0/query-data/flux/window-aggregate.md index 993a5f3d8..d677aebc3 100644 --- a/content/v2.0/query-data/flux/window-aggregate.md +++ b/content/v2.0/query-data/flux/window-aggregate.md @@ -112,6 +112,11 @@ dataSet |> window(every: 1m) ``` +{{% note %}} +The `every` parameter supports all [valid duration units](/v2.0/reference/flux/language/types/#duration-types), +including **calendar months (`1mo`)** and **years (`1y`)**. +{{% /note %}} + Each window of time is output in its own table containing all records that fall within the window. {{% truncate %}} diff --git a/content/v2.0/query-data/get-started/transform-data.md b/content/v2.0/query-data/get-started/transform-data.md index 76328698c..b730144ab 100644 --- a/content/v2.0/query-data/get-started/transform-data.md +++ b/content/v2.0/query-data/get-started/transform-data.md @@ -59,6 +59,12 @@ It's just good to understand the steps in the process. Flux's [`window()` function](/v2.0/reference/flux/stdlib/built-in/transformations/window) partitions records based on a time value. Use the `every` parameter to define a duration of each window. +{{% note %}} +#### Calendar months and years +`every` supports all [valid duration units](/v2.0/reference/flux/language/types/#duration-types), +including **calendar months (`1mo`)** and **years (`1y`)**. +{{% /note %}} + For this example, window data in five minute intervals (`5m`). ```js diff --git a/content/v2.0/reference/api/client-libraries/kotlin.md b/content/v2.0/reference/api/client-libraries/kotlin.md new file mode 100644 index 000000000..ad3d976ad --- /dev/null +++ b/content/v2.0/reference/api/client-libraries/kotlin.md @@ -0,0 +1,12 @@ +--- +title: InfluxDB Kotlin client library +list_title: Kotlin +description: Use the Kotlin client library to interact with InfluxDB. +external_url: https://github.com/influxdata/influxdb-client-java/tree/master/client-kotlin +menu: + v2_0_ref: + name: Kotlin + parent: Client libraries + url: https://github.com/influxdata/influxdb-client-java/tree/master/client-kotlin +weight: 201 +--- diff --git a/content/v2.0/reference/api/client-libraries/scala.md b/content/v2.0/reference/api/client-libraries/scala.md new file mode 100644 index 000000000..e7fecb067 --- /dev/null +++ b/content/v2.0/reference/api/client-libraries/scala.md @@ -0,0 +1,12 @@ +--- +title: InfluxDB Scala client library +list_title: Scala +description: Use the Scala client library to interact with InfluxDB. +external_url: https://github.com/influxdata/influxdb-client-java/tree/master/client-scala +menu: + v2_0_ref: + name: Scala + parent: Client libraries + url: https://github.com/influxdata/influxdb-client-java/tree/master/client-scala +weight: 201 +--- diff --git a/content/v2.0/reference/cli/influx/_index.md b/content/v2.0/reference/cli/influx/_index.md index e217a088f..c6182babf 100644 --- a/content/v2.0/reference/cli/influx/_index.md +++ b/content/v2.0/reference/cli/influx/_index.md @@ -45,21 +45,24 @@ retrieving authentication tokens._ ## Commands | Command | Description | |:------- |:----------- | +| [apply](/v2.0/reference/cli/influx/apply) | Apply an InfluxDB template | | [auth](/v2.0/reference/cli/influx/auth) | Authorization management commands | | [backup](/v2.0/reference/cli/influx/backup) | Back up data | | [bucket](/v2.0/reference/cli/influx/bucket) | Bucket management commands | | [completion](/v2.0/reference/cli/influx/completion) | Generate completion scripts | | [config](/v2.0/reference/cli/influx/config) | Configuration management commands | | [delete](/v2.0/reference/cli/influx/delete) | Delete points from InfluxDB | +| [export](/v2.0/reference/cli/influx/export) | Export resources as a template | | [help](/v2.0/reference/cli/influx/help) | Help about any command | | [org](/v2.0/reference/cli/influx/org) | Organization management commands | | [ping](/v2.0/reference/cli/influx/ping) | Check the InfluxDB `/health` endpoint | -| [pkg](/v2.0/reference/cli/influx/pkg) | Manage InfluxDB packages | | [query](/v2.0/reference/cli/influx/query) | Execute a Flux query | | [repl](/v2.0/reference/cli/influx/repl) | Interactive REPL (read-eval-print-loop) | | [secret](/v2.0/reference/cli/influx/secret) | Manage secrets | | [setup](/v2.0/reference/cli/influx/setup) | Create default username, password, org, bucket, etc. | +| [stacks](/v2.0/reference/cli/influx/stacks) | Manage InfluxDB stacks | | [task](/v2.0/reference/cli/influx/task) | Task management commands | +| [template](/v2.0/reference/cli/influx/template) | Summarize and validate an InfluxDB template | | [transpile](/v2.0/reference/cli/influx/transpile) | Manually transpile an InfluxQL query to Flux | | [user](/v2.0/reference/cli/influx/user) | User management commands | | [write](/v2.0/reference/cli/influx/write) | Write points to InfluxDB | diff --git a/content/v2.0/reference/cli/influx/apply/_index.md b/content/v2.0/reference/cli/influx/apply/_index.md new file mode 100644 index 000000000..6e57e6c02 --- /dev/null +++ b/content/v2.0/reference/cli/influx/apply/_index.md @@ -0,0 +1,81 @@ +--- +title: influx apply +description: The 'influx apply' command applies InfluxDB templates. +menu: + v2_0_ref: + name: influx apply + parent: influx +weight: 101 +aliases: + - /v2.0/reference/cli/influx/pkg/ +v2.0/tags: [templates] +--- + +The `influx apply` command applies InfluxDB templates. +_For information about finding and using InfluxDB templates, see +[Use InfluxDB templates](/v2.0/influxdb-templates/use/)._ + +## Usage +``` +influx apply [flags] +``` + +#### Aliases +`apply`, `pkg` _(deprecated)_ + +## Flags +| Flag | Description | Input Type | {{< cli/mapped >}} | +|:---- |:----------------------------- |:---------- |:------------------ | +| `-c`, `--disable-color` | Disable color in output | | | +| `--disable-table-borders` | Disable table borders | | | +| `-e`, `--encoding` | Encoding of the input stream | string | | +| `--env-ref` | Environment references to provide with the template (format: `--env-ref=REF_KEY=REF_VALUE`) | string | | +| `-f`, `--file` | Path to template file | string | | +| `--force` | Ignore warnings about destructive changes | | | +| `-h`, `--help` | Help for the `apply` command | | | +| `--json` | Output data as JSON | | `INFLUX_OUTPUT_JSON` | +| `-o`, `--org` | Organization name that owns the bucket | string | `INFLUX_ORG` | +| `--org-id` | Organization ID that owns the bucket | string | `INFLUX_ORG_ID` | +| `-q`, `--quiet` | Disable output printing | | | +| `-R`, `--recurse` | Recurse through files in the directory specified in `-f`, `--file` | | | +| `--secret` | Secrets to provide with the template (format: `--secret=SECRET_KEY=SECRET_VALUE`) | string | | +| `--stack-id` | Stack ID to associate when applying the template | string | | +| `-u`, `--template-url` | URL of template file | string | | + +{{% cli/influx-global-flags %}} + +## Examples +```sh +# Apply a template from a file. +influx apply -f path/to/template.json + +# Apply a stack that has associated templates. +influx apply --stack-id $STACK_ID + +# Apply a template associated with a stack. +# Stacks make template application idempotent. +influx apply -f path/to/template.json --stack-id $STACK_ID + +# Apply multiple template files together. +influx apply \ + -f path/to/template_1.json \ + -f path/to/template_2.yml + +# Apply a template from a URL. +influx apply -u https://raw.githubusercontent.com/influxdata/community-templates/master/docker/docker.yml + +# Apply a template from STDIN. +cat template.json | influx apply --encoding json + +# Apply all templates in a directory. +influx apply -f path/to/template_directory + +# Recurse through a directory and its subdirectories and apply all templates. +influx apply -R -f path/to/template_directory + +# Apply templates from multiple sources – directory, file, and URL. +influx apply \ + -f path/to/template.yml + -f path/to/templates_directory + -u https://example.com/template.json +``` diff --git a/content/v2.0/reference/cli/influx/pkg/export/_index.md b/content/v2.0/reference/cli/influx/export/_index.md similarity index 70% rename from content/v2.0/reference/cli/influx/pkg/export/_index.md rename to content/v2.0/reference/cli/influx/export/_index.md index 6faab6a96..f89ae8fd6 100644 --- a/content/v2.0/reference/cli/influx/pkg/export/_index.md +++ b/content/v2.0/reference/cli/influx/export/_index.md @@ -1,28 +1,31 @@ --- -title: influx pkg export -description: The 'influx pkg' command exports existing resources as an InfluxDB template. +title: influx export +description: The 'influx export' command exports existing resources as an InfluxDB template. menu: v2_0_ref: - parent: influx pkg + parent: influx weight: 101 +aliases: + - /v2.0/reference/cli/influx/pkg/export/ related: - /v2.0/influxdb-templates/create/ --- -The `influx pkg export` command exports existing resources as an InfluxDB template. +The `influx export` command exports existing resources as an InfluxDB template. _For detailed examples of exporting InfluxDB templates, see [Create an InfluxDB template](/v2.0/influxdb-templates/create/)._ ## Usage ``` -influx pkg export [flags] -influx pkg export [command] +influx export [flags] +influx export [command] ``` ## Available subcommands -| Subcommand | Description | -|:---------- |:----------- | -| [all](/v2.0/reference/cli/influx/pkg/export/all/) | Export all resources in an organization as a template | +| Subcommand | Description | +|:---------- |:----------- | +| [all](/v2.0/reference/cli/influx/export/all/) | Export all resources in an organization as a template | +| [stack](/v2.0/reference/cli/influx/export/stack/) | Export all resources associated with a stack as a template | ## Flags @@ -42,3 +45,15 @@ influx pkg export [command] | `--variables` | Comma-separated list of variable IDs | string | {{% cli/influx-global-flags %}} + +## Examples +```sh +# Export buckets by ID +influx export --buckets=$ID1,$ID2,$ID3 + +# Export buckets, labels, and dashboards by ID +influx export \ + --buckets=$BID1,$BID2,$BID3 \ + --labels=$LID1,$LID2,$LID3 \ + --dashboards=$DID1,$DID2,$DID3 +``` diff --git a/content/v2.0/reference/cli/influx/pkg/export/all.md b/content/v2.0/reference/cli/influx/export/all.md similarity index 51% rename from content/v2.0/reference/cli/influx/pkg/export/all.md rename to content/v2.0/reference/cli/influx/export/all.md index 6ce2b4786..2ecd14920 100644 --- a/content/v2.0/reference/cli/influx/pkg/export/all.md +++ b/content/v2.0/reference/cli/influx/export/all.md @@ -1,23 +1,25 @@ --- -title: influx pkg export all +title: influx export all description: > - The 'influx pkg' command exports all resources in an organization as an InfluxDB template. + The 'influx export all' command exports all resources in an organization as an InfluxDB template. menu: v2_0_ref: - parent: influx pkg export + parent: influx export weight: 201 +aliases: + - /v2.0/reference/cli/influx/pkg/export/all/ related: - /v2.0/influxdb-templates/create/ --- -The `influx pkg export all` command exports all resources in an +The `influx export all` command exports all resources in an organization as an InfluxDB template. _For detailed examples of exporting InfluxDB templates, see [Create an InfluxDB template](/v2.0/influxdb-templates/create/)._ ## Usage ``` -influx pkg export all [flags] +influx export all [flags] ``` ## Flags @@ -25,8 +27,35 @@ influx pkg export all [flags] |:---- |:----------- |:---------- |:------------------ | | `-f`, `--file` | Template output file. Defaults to stdout. Use `.yml` or `.json` file extensions. | string | | | `--filter` | Specify resources to export by labelName or resourceKind (format: `--filter=labelName=example`) | list of strings | -| `-h`, `--help` | Help for the `export` command | | | +| `-h`, `--help` | Help for the `export all` command | | | | `-o`, `--org` | Organization name that owns the resources | string | `INFLUX_ORG` | | `--org-id` | Organization ID that owns the resources | string | `INFLUX_ORG_ID` | {{% cli/influx-global-flags %}} + +## Examples +```sh +# Export all resources in an organization as a template +influx export all --org $INFLUX_ORG + +# Export all bucket resources as a template +influx export all --org $INFLUX_ORG --filter=resourceKind=Bucket + +# Export all resources associated with label Foo +influx export all --org $INFLUX_ORG --filter=labelName=Foo + +# Export all bucket resources and filter by label Foo +influx export all --org $INFLUX_ORG \ + --filter=resourceKind=Bucket \ + --filter=labelName=Foo + +# Export all bucket or dashboard resources and filter by label Foo. +# +# Note: "like" filters are unioned and filter types are intersections. +# For example, the following will export a resource if it is a dashboard or +# bucket and has an associated label of Foo. +influx export all --org $INFLUX_ORG \ + --filter=resourceKind=Bucket \ + --filter=resourceKind=Dashboard \ + --filter=labelName=Foo +`` diff --git a/content/v2.0/reference/cli/influx/export/stack.md b/content/v2.0/reference/cli/influx/export/stack.md new file mode 100644 index 000000000..5600d3b3d --- /dev/null +++ b/content/v2.0/reference/cli/influx/export/stack.md @@ -0,0 +1,35 @@ +--- +title: influx export stack +description: > + The 'influx export stack' command exports all resources associated with a stack as an InfluxDB template. +menu: + v2_0_ref: + parent: influx export +weight: 201 +aliases: + - /v2.0/reference/cli/influx/pkg/export/stack +--- + +The `influx export stack` command exports all resources associated with a stack as a template. +All `metadata.name` fields remain the same. + +## Usage +``` +influx export stack [flags] +``` + +## Flags +| Flag | Description | Input Type | {{< cli/mapped >}} | +|:---- |:----------- |:---------- |:------------------ | +| `-f`, `--file` | Template output file. Defaults to stdout. Use `.yml` or `.json` file extensions. | string | | +| `-h`, `--help` | Help for the `export stack` command | | | +| `-o`, `--org` | Organization name that owns the resources | string | `INFLUX_ORG` | +| `--org-id` | Organization ID that owns the resources | string | `INFLUX_ORG_ID` | + +{{% cli/influx-global-flags %}} + +## Examples +```sh +# Export a stack as a template +influx export stack $STACK_ID +``` diff --git a/content/v2.0/reference/cli/influx/pkg/_index.md b/content/v2.0/reference/cli/influx/pkg/_index.md deleted file mode 100644 index 1cabeba62..000000000 --- a/content/v2.0/reference/cli/influx/pkg/_index.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: influx pkg -description: The 'influx pkg' command and its subcommands manage InfluxDB templates. -menu: - v2_0_ref: - name: influx pkg - parent: influx -weight: 101 -v2.0/tags: [templates] -related: - - /v2.0/influxdb-templates/use/ ---- - -The `influx pkg` command manages InfluxDB templates. -_For information about finding and using InfluxDB templates, see -[Use InfluxDB templates](/v2.0/influxdb-templates/use/)._ - -## Usage -``` -influx pkg [flags] -influx pkg [command] -``` - -## Subcommands -| Subcommand | Description | -|:------- |:----------- | -| [export](/v2.0/reference/cli/influx/pkg/export/) | Export resources as a template | -| [stack](/v2.0/reference/cli/influx/pkg/stack/) | Manage stacks | -| [summary](/v2.0/reference/cli/influx/pkg/summary/) | Summarize the specified template | -| [validate](/v2.0/reference/cli/influx/pkg/validate/) | Validate the specified template | - -## Flags - -| Flag | Description | Input Type | {{< cli/mapped >}} | -|:---- |:----------------------------- |:---------- |:------------------ | -| `-c`, `--disable-color` | Disable color in output | | | -| `--disable-table-borders` | Disable table borders | | | -| `-e`, `--encoding` | Encoding of the input stream | string | | -| `--env-ref` | Environment references to provide with the template (format: `--env-ref=REF_KEY=REF_VALUE`) | string | | -| `-f`, `--file` | Path to template file | string | | -| `--force` | Ignore warnings about destructive changes | | | -| `-h`, `--help` | Help for the `pkg` command | | | -| `-o`, `--org` | Organization name that owns the bucket | string | `INFLUX_ORG` | -| `--org-id` | Organization ID that owns the bucket | string | `INFLUX_ORG_ID` | -| `-q`, `--quiet` | Disable output printing | | | -| `-R`, `--recurse` | Recurse through files in the directory specified in `-f`, `--file` | | | -| `--secret` | Secrets to provide with the template (format: `--secret=SECRET_KEY=SECRET_VALUE`) | string | | -| `-u`, `--url` | URL of template file | string | | - -{{% cli/influx-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/pkg/stack/_index.md b/content/v2.0/reference/cli/influx/pkg/stack/_index.md deleted file mode 100644 index 45d66a6e7..000000000 --- a/content/v2.0/reference/cli/influx/pkg/stack/_index.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: influx pkg stack -description: The 'influx pkg stack' command and its subcommands manage InfluxDB stacks. -menu: - v2_0_ref: - name: influx pkg stack - parent: influx pkg -weight: 101 -v2.0/tags: [templates] ---- - -The `influx pkg stack` command manages InfluxDB stacks. - -## Usage -``` -influx pkg stack [flags] -influx pkg stack [command] -``` - -## Subcommands -| Subcommand | Description | -|:------- |:----------- | -| [init](/v2.0/reference/cli/influx/pkg/stack/init/) | Initialize a stack | -| [list](/v2.0/reference/cli/influx/pkg/stack/list/) | List stacks | -| [remove](/v2.0/reference/cli/influx/pkg/stack/remove/) | Remove a stack | - -## Flags -| Flag | Description | -|:---- |:----------- | -| `-h`, `--help` | Help for the `stack` command | - -{{% cli/influx-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/pkg/stack/init.md b/content/v2.0/reference/cli/influx/pkg/stack/init.md deleted file mode 100644 index 1c3b45e74..000000000 --- a/content/v2.0/reference/cli/influx/pkg/stack/init.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: influx pkg stack init -description: The 'influx pkg stack init' command initializes an InfluxDB stack. -menu: - v2_0_ref: - name: influx pkg stack init - parent: influx pkg stack -weight: 201 -v2.0/tags: [templates] ---- - -The `influx pkg stack init` command initializes an InfluxDB stack. - -## Usage -``` -influx pkg stack init [flags] -``` - -## Flags -| Flag | Description | Input type | {{< cli/mapped >}} | -|:---- |:----------- |:----------: |:------------------ | -| `-h`, `--help` | Help for the `init` command | | | -| `--hide-headers` | Hide table headers (default `false`) | | `INFLUX_HIDE_HEADERS` | -| `--json` | Output data as JSON (default `false`) | | `INFLUX_OUTPUT_JSON` | -| `-o`, `--org` | Organization name | string | `INFLUX_ORG` | -| `--org-id` | Organization ID | string | `INFLUX_ORG_ID` | -| `-u`, `--package-url` | Package URLs to associate stack | list of strings | | -| `-d`, `--stack-description` | Stack description | string | | -| `-n`, `--stack-name` | Stack name | string | | - -{{% cli/influx-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/pkg/validate.md b/content/v2.0/reference/cli/influx/pkg/validate.md deleted file mode 100644 index 5a5610626..000000000 --- a/content/v2.0/reference/cli/influx/pkg/validate.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: influx pkg validate -description: > - The 'influx pkg validate' command validates the provided InfluxDB template. -menu: - v2_0_ref: - parent: influx pkg -weight: 101 ---- - -The `influx pkg validate` command validates the provided InfluxDB template. - -## Usage -``` -influx pkg validate [flags] -``` - -## Flags - -| Flag | Description | Input Type | {{< cli/mapped >}} | -|:---- |:----------- |:---------- |:------------------ | -| `-e`, `--encoding` | Encoding of the input stream | string | | -| `-f`, `--file` | Package file to validate | string | | -| `-h`, `--help` | Help for the `validate` command | | | -| `--json` | Output data as JSON (default `false`) | | `INFLUX_OUTPUT_JSON` | -| `-R`, `--recurse` | Recurse through files in the directory specified in `-f`, `--file` | | | -| `-u`, `--url` | URL of template file to validate | string | | - -{{% cli/influx-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/repl/_index.md b/content/v2.0/reference/cli/influx/repl/_index.md index 06c56dec0..59787e8d5 100644 --- a/content/v2.0/reference/cli/influx/repl/_index.md +++ b/content/v2.0/reference/cli/influx/repl/_index.md @@ -1,7 +1,7 @@ --- title: influx repl description: > - The 'influx repl' command opens and interactive read-eval-print-loop (REPL) + The 'influx repl' command opens an interactive read-eval-print-loop (REPL) from which you can run Flux commands. menu: v2_0_ref: @@ -11,7 +11,7 @@ weight: 101 v2.0/tags: [query] --- -The `influx repl` command opens and interactive read-eval-print-loop (REPL) +The `influx repl` command opens an interactive read-eval-print-loop (REPL) from which you can run Flux commands. ## Usage diff --git a/content/v2.0/reference/cli/influx/pkg/stack/list.md b/content/v2.0/reference/cli/influx/stacks/_index.md similarity index 55% rename from content/v2.0/reference/cli/influx/pkg/stack/list.md rename to content/v2.0/reference/cli/influx/stacks/_index.md index 4be91088d..0d303a718 100644 --- a/content/v2.0/reference/cli/influx/pkg/stack/list.md +++ b/content/v2.0/reference/cli/influx/stacks/_index.md @@ -1,29 +1,37 @@ --- -title: influx pkg stack list +title: influx stacks description: > - The 'influx pkg stack list' command lists InfluxDB stacks and associated resources. + The 'influx stacks' command and its subcommands list and manage InfluxDB stacks + and associated resources. menu: v2_0_ref: - name: influx pkg stack list - parent: influx pkg stack -weight: 201 + name: influx stacks + parent: influx +weight: 101 +aliases: + - /v2.0/reference/cli/influx/pkg/stack/list/ v2.0/tags: [templates] --- -The `influx pkg stack list` command lists InfluxDB stacks and associated resources. +The `influx stacks` command and its subcommands list and manage InfluxDB stacks +and associated resources. ## Usage ``` -influx pkg stack list [flags] +influx stacks [flags] +influx stacks [command] ``` -#### Aliases -`list`, `ls` +## Subcommands +| Subcommand | Description | +|:------- |:----------- | +| [init](/v2.0/reference/cli/influx/stacks/init/) | Initialize a stack | +| [remove](/v2.0/reference/cli/influx/stacks/remove/) | Remove a stack | ## Flags | Flag | Description | Input type | {{< cli/mapped >}} | |:---- |:----------- |:----------: |:------------------ | -| `-h`, `--help` | Help for the `list` command | | | +| `-h`, `--help` | Help for the `stacks` command | | | | `--hide-headers` | Hide table headers (default `false`) | | `INFLUX_HIDE_HEADERS` | | `--json` | Output data as JSON (default `false`) | | `INFLUX_OUTPUT_JSON` | | `-o`, `--org` | Organization name | string | `INFLUX_ORG` | diff --git a/content/v2.0/reference/cli/influx/stacks/init.md b/content/v2.0/reference/cli/influx/stacks/init.md new file mode 100644 index 000000000..dafe8022a --- /dev/null +++ b/content/v2.0/reference/cli/influx/stacks/init.md @@ -0,0 +1,42 @@ +--- +title: influx stacks init +description: The 'influx stacks init' command initializes an InfluxDB stack. +menu: + v2_0_ref: + name: influx stacks init + parent: influx stacks +weight: 201 +aliases: + - /v2.0/reference/cli/influx/pkg/stack/init/ +v2.0/tags: [templates] +--- + +The `influx stacks init` command initializes an InfluxDB stack. + +## Usage +``` +influx stacks init [flags] +``` + +## Flags +| Flag | Description | Input type | {{< cli/mapped >}} | +|:---- |:----------- |:----------: |:------------------ | +| `-h`, `--help` | Help for the `init` command | | | +| `--hide-headers` | Hide table headers (default `false`) | | `INFLUX_HIDE_HEADERS` | +| `--json` | Output data as JSON (default `false`) | | `INFLUX_OUTPUT_JSON` | +| `-o`, `--org` | Organization name | string | `INFLUX_ORG` | +| `--org-id` | Organization ID | string | `INFLUX_ORG_ID` | +| `-d`, `--stack-description` | Stack description | string | | +| `-n`, `--stack-name` | Stack name | string | | +| `-u`, `--template-url` | Template URLs to associate with a stack | list of strings | | + +{{% cli/influx-global-flags %}} + +## Examples +```sh +# Initialize a stack with a name and description +influx stack init -n $STACK_NAME -d $STACK_DESCRIPTION + +# Initialize a stack with a name and urls to associate with stack. +influx stack init -n $STACK_NAME -u $PATH_TO_TEMPLATE +``` diff --git a/content/v2.0/reference/cli/influx/pkg/stack/remove.md b/content/v2.0/reference/cli/influx/stacks/remove.md similarity index 72% rename from content/v2.0/reference/cli/influx/pkg/stack/remove.md rename to content/v2.0/reference/cli/influx/stacks/remove.md index 53913852a..ceb0b45b0 100644 --- a/content/v2.0/reference/cli/influx/pkg/stack/remove.md +++ b/content/v2.0/reference/cli/influx/stacks/remove.md @@ -1,19 +1,21 @@ --- -title: influx pkg stack remove -description: The 'influx pkg stack remove' command removes an InfluxDB stack. +title: influx stacks remove +description: The 'influx stacks remove' command removes an InfluxDB stack and all associated resources. menu: v2_0_ref: - name: influx pkg stack remove - parent: influx pkg stack + name: influx stacks remove + parent: influx stacks weight: 201 +aliases: + - /v2.0/reference/cli/influx/pkg/stack/remove/ v2.0/tags: [templates] --- -The `influx pkg stack remove` command removes an InfluxDB stack. +The `influx stacks remove` command removes an InfluxDB stack and all associated resources. ## Usage ``` -influx pkg stack remove [flags] +influx stacks remove [flags] ``` #### Aliases diff --git a/content/v2.0/reference/cli/influx/pkg/summary.md b/content/v2.0/reference/cli/influx/template/_index.md similarity index 60% rename from content/v2.0/reference/cli/influx/pkg/summary.md rename to content/v2.0/reference/cli/influx/template/_index.md index 04a24b146..38ff059b1 100644 --- a/content/v2.0/reference/cli/influx/pkg/summary.md +++ b/content/v2.0/reference/cli/influx/template/_index.md @@ -1,32 +1,39 @@ --- -title: influx pkg summary -description: > - The 'influx pkg summary' command summarizes the provided InfluxDB template. +title: influx template +description: The 'influx template' command summarizes the specified InfluxDB template. menu: v2_0_ref: - parent: influx pkg + name: influx template + parent: influx weight: 101 +v2.0/tags: [templates] +aliases: + - /v2.0/reference/cli/influx/pkg/summary/ --- -The `influx pkg summary` command summarizes the provided InfluxDB template. +The `influx template` command summarizes the specified InfluxDB template. ## Usage ``` -influx pkg summary [flags] +influx template [flags] +influx template [command] ``` -## Flags +## Subcommands +| Subcommand | Description | +|:---------- |:----------- | +| [validate](/v2.0/reference/cli/influx/template/validate) | Validate a template | +## Flags | Flag | Description | Input Type | {{< cli/mapped >}} | |:---- |:----------- |:---------- |:------------------ | | `-c`, `--disable-color` | Disable color in output | | | | `--disable-table-borders` | Disable table borders | | | | `-e`, `--encoding` | Encoding of the input stream | string | | -| `-f`, `--file` | Package file to summarize | string | | -| `-h`, `--help` | Help for the `summary` command | | | +| `-f`, `--file` | Template file to summarize | string | | +| `-h`, `--help` | Help for the `template` command | | | | `--json` | Output data as JSON (default `false`) | | `INFLUX_OUTPUT_JSON` | | `-R`, `--recurse` | Recurse through files in the directory specified in `-f`, `--file` | | | -| `-u`, `--url` | URL of template file to summarize | string | | - +| `-u`, `--template-url` | URL of template file to summarize | string | | {{% cli/influx-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/template/validate.md b/content/v2.0/reference/cli/influx/template/validate.md new file mode 100644 index 000000000..acb509508 --- /dev/null +++ b/content/v2.0/reference/cli/influx/template/validate.md @@ -0,0 +1,30 @@ +--- +title: influx template validate +description: > + The 'influx template validate' command validates the provided InfluxDB template. +menu: + v2_0_ref: + parent: influx template +weight: 201 +aliases: + - /v2.0/reference/cli/influx/pkg/validate/ +--- + +The `influx template validate` command validates the provided InfluxDB template. + +## Usage +``` +influx template validate [flags] +``` + +## Flags + +| Flag | | Description | Input Type | +|:---- | --- |:----------- |:---------- | +| `-e` | `--encoding` | Encoding of the input stream | string | +| `-f` | `--file` | Template file to validate | string | +| `-h` | `--help` | Help for the `validate` command | | +| `-R` | `--recurse` | Recurse through files in the directory specified in `-f`, `--file` | | +| `-u` | `--template-url` | URL of template file to validate | string | + +{{% cli/influx-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/write/_index.md b/content/v2.0/reference/cli/influx/write/_index.md index f593b05fb..d1eabffec 100644 --- a/content/v2.0/reference/cli/influx/write/_index.md +++ b/content/v2.0/reference/cli/influx/write/_index.md @@ -9,6 +9,9 @@ menu: parent: influx weight: 101 v2.0/tags: [write] +related: + - /v2.0/write-data/ + - /v2.0/write-data/csv/ --- The `influx write` command writes data to InfluxDB via stdin or from a specified file. @@ -27,15 +30,21 @@ influx write [command] | [dryrun](/v2.0/reference/cli/influx/write/dryrun) | Write to stdout instead of InfluxDB | ## Flags -| Flag | Description | Input type | {{< cli/mapped >}} | -|:---- |:----------- |:----------:|:------------------ | -| `-b`, `--bucket` | Bucket name | string | `INFLUX_BUCKET_NAME` | -| `--bucket-id` | Bucket ID | string | `INFLUX_BUCKET_ID` | -| `-f`, `--file` | File to import | string | | -| `--format` | Input format (`lp` or `csv`, default `lp`) | string | | -| `-h`, `--help` | Help for the `dryrun` command | | | -| `-o`, `--org` | Organization name | string | `INFLUX_ORG` | -| `--org-id` | Organization ID | string | `INFLUX_ORG_ID` | -| `-p`, `--precision` | Precision of the timestamps (default `ns`) | string | `INFLUX_PRECISION` | +| Flag | Description | Input type | {{< cli/mapped >}} | +|:---- |:----------- |:----------:|:------------------ | +| `-b`, `--bucket` | Bucket name | string | `INFLUX_BUCKET_NAME` | +| `--bucket-id` | Bucket ID | string | `INFLUX_BUCKET_ID` | +| `--debug` | Output errors to stderr | | | +| `--encoding` | Character encoding of input (default `UTF-8`) | string | | +| `-f`, `--file` | File to import | string | | +| `--format` | Input format (`lp` or `csv`, default `lp`) | string | | +| `--header` | Prepend header line to CSV input data | string | | +| `-h`, `--help` | Help for the `dryrun` command | | | +| `-o`, `--org` | Organization name | string | `INFLUX_ORG` | +| `--org-id` | Organization ID | string | `INFLUX_ORG_ID` | +| `-p`, `--precision` | Precision of the timestamps (default `ns`) | string | `INFLUX_PRECISION` | +| `--skipHeader` | Skip first n rows of input data | integer | | +| `--skipRowOnError` | Output CSV errors to stderr, but continue processing | | | +| `-u`, `--url` | URL to import data from | string | | {{% cli/influx-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/write/dryrun.md b/content/v2.0/reference/cli/influx/write/dryrun.md index 728c4f89e..405d76018 100644 --- a/content/v2.0/reference/cli/influx/write/dryrun.md +++ b/content/v2.0/reference/cli/influx/write/dryrun.md @@ -24,15 +24,21 @@ influx write dryrun [flags] ``` ## Flags -| Flag | Description | Input type | {{< cli/mapped >}} | -|:---- |:----------- |:----------:|:------------------ | -| `-b`, `--bucket` | Bucket name | string | `INFLUX_BUCKET_NAME` | -| `--bucket-id` | Bucket ID | string | `INFLUX_BUCKET_ID` | -| `-f`, `--file` | File to import | string | | -| `--format` | Input format (`lp` or `csv`, defaults `lp`) | string | | -| `-h`, `--help` | Help for the `dryrun` command | | | -| `-o`, `--org` | Organization name | string | `INFLUX_ORG` | -| `--org-id` | Organization ID | string | `INFLUX_ORG_ID` | -| `-p`, `--precision` | Precision of the timestamps (default `ns`) | string | `INFLUX_PRECISION` | +| Flag | Description | Input type | {{< cli/mapped >}} | +|:---- |:----------- |:----------:|:------------------ | +| `-b`, `--bucket` | Bucket name | string | `INFLUX_BUCKET_NAME` | +| `--bucket-id` | Bucket ID | string | `INFLUX_BUCKET_ID` | +| `--debug` | Output errors to stderr | | | +| `--encoding` | Character encoding of input (default `UTF-8`) | string | | +| `-f`, `--file` | File to import | string | | +| `--format` | Input format (`lp` or `csv`, default `lp`) | string | | +| `--header` | Prepend header line to CSV input data | string | | +| `-h`, `--help` | Help for the `dryrun` command | | | +| `-o`, `--org` | Organization name | string | `INFLUX_ORG` | +| `--org-id` | Organization ID | string | `INFLUX_ORG_ID` | +| `-p`, `--precision` | Precision of the timestamps (default `ns`) | string | `INFLUX_PRECISION` | +| `--skipHeader` | Skip first n rows of input data | integer | | +| `--skipRowOnError` | Output CSV errors to stderr, but continue processing | | | +| `-u`, `--url` | URL to import data from | string | | {{% cli/influx-global-flags %}} diff --git a/content/v2.0/reference/flux/language/types.md b/content/v2.0/reference/flux/language/types.md index 636cbc564..2a273b15e 100644 --- a/content/v2.0/reference/flux/language/types.md +++ b/content/v2.0/reference/flux/language/types.md @@ -90,9 +90,18 @@ Durations can be added to times to produce a new time. ##### Examples of duration types ```js -2018-07-01T00:00:00Z + 1mo // 2018-08-01T00:00:00Z -2018-07-01T00:00:00Z + 2y // 2020-07-01T00:00:00Z -2018-07-01T00:00:00Z + 5h // 2018-07-01T05:00:00Z +1ns // 1 nanosecond +1us // 1 microsecond +1ms // 1 millisecond +1s // 1 second +1m // 1 minute +1h // 1 hour +1d // 1 day +1w // 1 week +1mo // 1 calendar month +1y // 1 calendar year + +3d12h4m25s // 3 days, 12 hours, 4 minutes, and 25 seconds ``` ### String types diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/aggregates/aggregatewindow.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/aggregates/aggregatewindow.md index c26425fb6..4926638ae 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/aggregates/aggregatewindow.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/aggregates/aggregatewindow.md @@ -11,8 +11,8 @@ menu: weight: 501 related: - /v2.0/query-data/flux/window-aggregate/ - - https://docs.influxdata.com/influxdb/latest/query_language/functions/#aggregations – InfluxQL – Aggregate functions - - https://docs.influxdata.com/influxdb/latest/query_language/data_exploration/#the-group-by-clause – InfluxQL – GROUP BY time() + - https://docs.influxdata.com/influxdb/latest/query_language/functions/#aggregations, InfluxQL – Aggregate functions + - https://docs.influxdata.com/influxdb/latest/query_language/explore-data/#the-group-by-clause, InfluxQL – GROUP BY time() --- The `aggregateWindow()` function applies an aggregate or selector function @@ -49,6 +49,12 @@ Make sure `fn` parameter names match each specified parameter. To learn why, see The duration of windows. +{{% note %}} +#### Calendar months and years +`every` supports all [valid duration units](/v2.0/reference/flux/language/types/#duration-types), +including **calendar months (`1mo`)** and **years (`1y`)**. +{{% /note %}} + _**Data type:** Duration_ ### fn @@ -91,31 +97,35 @@ Defaults to `true`. _**Data type:** Boolean_ ## Examples - -###### Using an aggregate function with default parameters +The examples below use a `data` variable to represent a filtered data set. ```js -from(bucket: "example-bucket") - |> range(start: 1h) +data = from(bucket: "example-bucket") + |> range(start: -1h) |> filter(fn: (r) => r._measurement == "mem" and r._field == "used_percent") +``` + +##### Use an aggregate function with default parameters +The following example uses the default parameters of the +[`mean()` function](/v2.0/reference/flux/stdlib/built-in/transformations/aggregates/mean/) +to aggregate time-based windows: + +```js +data |> aggregateWindow( every: 5m, fn: mean ) ``` -###### Specify parameters of the aggregate function +##### Specify parameters of the aggregate function To use functions that don't provide defaults for required parameters with `aggregateWindow()`, -define an anonymous function with `column` and `tables` parameters that pipe-forward +define an anonymous function with `column` and `tables` parameters that pipes-forward tables into the aggregate or selector function with all required parameters defined: ```js -from(bucket: "example-bucket") - |> range(start: 1h) - |> filter(fn: (r) => - r._measurement == "mem" and - r._field == "used_percent") +data |> aggregateWindow( column: "_value", every: 5m, @@ -123,6 +133,12 @@ from(bucket: "example-bucket") ) ``` +##### Window and aggregate by calendar month +```js +data + |> aggregateWindow(every: 1mo, fn: mean) +``` + ## Function definition ```js diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/aggregates/reduce.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/aggregates/reduce.md index 940752e6f..2de32abf9 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/aggregates/reduce.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/aggregates/reduce.md @@ -86,24 +86,12 @@ identity: {sum: 0.0, count: 0.0} ## Important notes -#### Preserve columns +#### Dropped columns By default, `reduce()` drops any columns that: -1. Are not part of the input table's group key. +1. Are not part of the input table's [group key](/v2.0/reference/glossary/#group-key). 2. Are not explicitly mapped in the `reduce()` function. -This often results in the `_time` column being dropped. -To preserve the `_time` column and other columns that do not meet the criteria above, -use the `with` operator to map values in the `r` object. -The `with` operator updates a column if it already exists, -creates a new column if it doesn't exist, and includes all existing columns in -the output table. - -```js -reduce(fn: (r) => ({ r with newColumn: r._value * 2 })) -``` - - ## Examples ##### Compute the sum of the value column @@ -157,14 +145,13 @@ from(bucket:"example-bucket") ) ``` -##### Calculate the average and preserve existing columns +##### Calculate the average ```js from(bucket: "example-bucket") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r._measurement == "mem" and r._field == "used_percent") |> window(every: 5m) |> reduce(fn: (r, accumulator) => ({ - r with count: accumulator.count + 1, total: accumulator.total + r._value, avg: (accumulator.total + r._value) / float(v: accumulator.count) diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/columns.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/columns.md index 9bd20c876..9c09ff63c 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/columns.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/columns.md @@ -11,7 +11,7 @@ menu: v2_0_ref: name: columns parent: built-in-transformations -weight: 401 +weight: 402 related: - https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration/#show-measurements, InfluxQL – SHOW MEASUREMENTS - https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration/#show-field-keys, InfluxQL – SHOW FIELD KEYS diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/cumulativesum.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/cumulativesum.md index 1def460fe..29bf1635a 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/cumulativesum.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/cumulativesum.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: cumulativeSum parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/query-data/flux/cumulativesum/ - https://docs.influxdata.com/influxdb/latest/query_language/functions/#cumulative-sum, InfluxQL – CUMULATIVE_SUM() diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/drop.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/drop.md index 75a5e90bb..ac71f26af 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/drop.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/drop.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: drop parent: built-in-transformations -weight: 401 +weight: 402 --- The `drop()` function removes specified columns from a table. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/duplicate.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/duplicate.md index cbc060dc0..db6a2ebc1 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/duplicate.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/duplicate.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: duplicate parent: built-in-transformations -weight: 401 +weight: 402 --- The `duplicate()` function duplicates a specified column in a table. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/elapsed.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/elapsed.md index b297476c2..e4adcbc2e 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/elapsed.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/elapsed.md @@ -7,7 +7,7 @@ menu: v2_0_ref: name: elapsed parent: built-in-transformations -weight: 401 +weight: 402 --- The `elapsed()` function returns the time between subsequent records. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/fill.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/fill.md index a0997656f..e3a3bf247 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/fill.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/fill.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: fill parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/query-data/flux/fill/ - https://docs.influxdata.com/influxdb/latest/query_language/data_exploration/#group-by-time-intervals-and-fill, InfluxQL – FILL diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/filter.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/filter.md index 5826b2023..50e77e6ff 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/filter.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/filter.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: filter parent: built-in-transformations -weight: 401 +weight: 402 v2.0/tags: [exists] related: - /v2.0/query-data/flux/query-fields/ diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/group.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/group.md index e0201f821..77fc61f9c 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/group.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/group.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: group parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/query-data/flux/group-data/ - https://docs.influxdata.com/influxdb/latest/query_language/data_exploration/#the-group-by-clause, InfluxQL – GROUP BY diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/histogram.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/histogram.md index cf0b839d5..7f9d43c39 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/histogram.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/histogram.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: histogram parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/query-data/flux/histograms/ --- diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/hourselection.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/hourselection.md index b56ad99f5..ee53fa130 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/hourselection.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/hourselection.md @@ -10,7 +10,7 @@ menu: v2_0_ref: name: hourSelection parent: built-in-transformations -weight: 401 +weight: 402 --- The `hourSelection()` function retains all rows with time values in a specified hour range. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/join.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/join.md index 5d65d942a..cb4946451 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/join.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/join.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: join parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/query-data/flux/join/ - /v2.0/reference/flux/stdlib/built-in/transformations/union/ diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/keep.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/keep.md index 6c4f0dada..94c7e6d29 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/keep.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/keep.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: keep parent: built-in-transformations -weight: 401 +weight: 402 --- The `keep()` function returns a table containing only the specified columns, ignoring all others. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/keys.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/keys.md index 21a34feb6..e7b604dcf 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/keys.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/keys.md @@ -11,7 +11,7 @@ menu: v2_0_ref: name: keys parent: built-in-transformations -weight: 401 +weight: 402 related: - https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration/#show-measurements, InfluxQL – SHOW MEASUREMENTS - https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration/#show-field-keys, InfluxQL – SHOW FIELD KEYS diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/keyvalues.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/keyvalues.md index 0dafff28e..147690368 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/keyvalues.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/keyvalues.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: keyValues parent: built-in-transformations -weight: 401 +weight: 402 related: - https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration/#show-measurements, InfluxQL – SHOW MEASUREMENTS - https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration/#show-field-keys, InfluxQL – SHOW FIELD KEYS diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/limit.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/limit.md index 6fb5f9db1..472386eca 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/limit.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/limit.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: limit parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/query-data/flux/sort-limit/ - /v2.0/reference/flux/stdlib/built-in/transformations/tail/ diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/map.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/map.md index dfe4dd628..5979b42d5 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/map.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/map.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: map parent: built-in-transformations -weight: 401 +weight: 402 v2.0/tags: [exists] related: - /v2.0/query-data/flux/conditional-logic/ diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/pivot.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/pivot.md index 422814428..b9f552a53 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/pivot.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/pivot.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: pivot parent: built-in-transformations -weight: 401 +weight: 402 --- The `pivot()` function collects values stored vertically (column-wise) in a table diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/range.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/range.md index 1a6ad098f..70360537f 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/range.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/range.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: range parent: built-in-transformations -weight: 401 +weight: 402 related: - https://docs.influxdata.com/influxdb/latest/query_language/data_exploration/#the-where-clause, InfluxQL – WHERE --- diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/rename.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/rename.md index 57e3c504f..8f34a8f0c 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/rename.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/rename.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: rename parent: built-in-transformations -weight: 401 +weight: 402 --- The `rename()` function renames specified columns in a table. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/set.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/set.md index 812bc21b0..0354cbdf5 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/set.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/set.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: set parent: built-in-transformations -weight: 401 +weight: 402 --- The `set()` function assigns a static value to each record in the input table. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/sort.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/sort.md index 9c64201b4..f3de134dd 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/sort.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/sort.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: sort parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/query-data/flux/sort-limit/ --- diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/statecount.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/statecount.md index 2b2e83ca7..0668b3948 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/statecount.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/statecount.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: stateCount parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/query-data/flux/monitor-states/ --- diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/stateduration.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/stateduration.md index f46f7ef13..8e2381741 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/stateduration.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/stateduration.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: stateDuration parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/query-data/flux/monitor-states/ --- diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/_index.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/_index.md index 688684818..f64bccad1 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/_index.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/_index.md @@ -20,11 +20,31 @@ related: Use stream and table functions to extract a table from a stream of tables and access its columns and records. -##### Example stream and table functions +{{< children type="functions" >}} + +### Example stream and table functions + +##### Recommended usage ```js data = from(bucket:"example-bucket") - |> range(start: -5m) - |> filter(fn:(r) => r._measurement == "cpu") + |> range(start: -5m) + |> filter(fn:(r) => r._measurement == "cpu") + +// Extract the "_value" column from the table +data + |> findColumn(fn: (key) => key._field == "usage_idle", column: "_value") + +// Extract the first record from the table +data + |> findRecord(fn: (key) => key._field == "usage_idle", idx: 0) + +``` + +##### Alternate usage +```js +data = from(bucket:"example-bucket") + |> range(start: -5m) + |> filter(fn:(r) => r._measurement == "cpu") // Extract the first available table for which "_field" is equal to "usage_idle" t = data |> tableFind(fn: (key) => key._field == "usage_idle") @@ -35,5 +55,3 @@ values = t |> getColumn(column: "_value") // Extract the first record from the table r0 = t |> getRecord(idx: 0) ``` - -{{< children type="functions" >}} diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findcolumn.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findcolumn.md new file mode 100644 index 000000000..53310e3b8 --- /dev/null +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findcolumn.md @@ -0,0 +1,54 @@ +--- +title: findColumn() function +description: > + The `findColumn()` function returns an array of values in a specified column from the + first table in a stream of tables where group key values match the specified predicate. +menu: + v2_0_ref: + name: findColumn + parent: Stream & table +weight: 501 +related: + - /v2.0/query-data/flux/scalar-values/ +--- + +The `findColumn()` function returns an array of values in a specified column from the +first table in a stream of tables where the group key values match the specified predicate. +The function returns an empty array if no table is found or if the column label +is not present in the set of columns. + +_**Function type:** Stream and table_ + +```js +findColumn( + fn: (key) => key._field == "fieldName") + column: "_value" +) +``` + +## Parameters + +### fn +A predicate function for matching keys in a table's group key. +Expects a `key` argument that represents a group key in the input stream. + +_**Data type:** Function_ + +### column +Name of the column to extract. + +_**Data type:** String_ + +## Example +```js +vs = from(bucket:"example-bucket") + |> range(start: -5m) + |> filter(fn:(r) => r._measurement == "cpu") + |> findColumn( + fn: (key) => key._field == "usage_idle", + column: "_value" + ) + +// Use column values +x = vs[0] + vs[1] +``` diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findrecord.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findrecord.md new file mode 100644 index 000000000..edf2f8a56 --- /dev/null +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findrecord.md @@ -0,0 +1,54 @@ +--- +title: findRecord() function +description: > + The `findRecord()` function returns a record at a specified index from the first + table in a stream of tables where the group key values match the specified predicate. +menu: + v2_0_ref: + name: findRecord + parent: Stream & table +weight: 501 +related: + - /v2.0/query-data/flux/scalar-values/ +--- + +The `findRecord()` function returns a record at a specified index from the first +table in a stream of tables where the group key values match the specified predicate. +The function returns an empty object if no table is found or if the index is out of bounds. + +_**Function type:** Stream and table_ + +```js +findRecord( + fn: (key) => key._field == "fieldName", + idx: 0 +) +``` + +## Parameters + +### fn +A predicate function for matching keys in a table's group key. +Expects a `key` argument that represents a group key in the input stream. + +_**Data type:** Function_ + +### idx +Index of the record to extract. + +_**Data type:** Integer_ + +## Example +```js +r0 = from(bucket:"example-bucket") + |> range(start: -5m) + |> filter(fn:(r) => r._measurement == "cpu") + |> tableFind() + |> findRecord( + fn: (key) => key._field == "usage_idle", + idx: 0 + ) + +// Use record values +x = r0._field + "--" + r0._measurement +``` diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getcolumn.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getcolumn.md index 0eb8864ac..37ee22574 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getcolumn.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getcolumn.md @@ -33,7 +33,7 @@ to extract a single table from a stream of tables. ## Parameters ### column -The name of the column to extract. +Name of the column to extract. _**Data type:** String_ diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getrecord.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getrecord.md index 6aa31318f..5ac41aa20 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getrecord.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/getrecord.md @@ -33,7 +33,7 @@ to extract a single table from a stream of tables. ## Parameters ### idx -The index of the record to extract. +Index of the record to extract. _**Data type:** Integer_ diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/tablefind.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/tablefind.md index 14c5c8519..4644e1ad6 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/tablefind.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/tablefind.md @@ -34,7 +34,7 @@ To learn why, see [Match parameter names](/v2.0/reference/flux/language/data-mod A predicate function for matching keys in a table's group key. `tableFind` returns the first table that resolves as `true`. -It expects a `key` argument which represents a group key in the input stream. +Expects a `key` argument that represents a group key in the input stream. _**Data type:** Function_ diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/tail.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/tail.md index b86287b1b..fe975298e 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/tail.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/tail.md @@ -7,7 +7,7 @@ menu: v2_0_ref: name: tail parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/reference/flux/functions/built-in/transformations/limit/ --- diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/timeshift.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/timeshift.md index be365a397..624fe3b8a 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/timeshift.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/timeshift.md @@ -9,7 +9,7 @@ menu: v2_0_ref: name: timeShift parent: built-in-transformations -weight: 401 +weight: 402 --- The `timeShift()` function adds a fixed duration to time columns. diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/truncatetimecolumn.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/truncatetimecolumn.md index 6b0a0b053..63df2ba40 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/truncatetimecolumn.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/truncatetimecolumn.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: truncateTimeColumn parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/reference/flux/stdlib/date/truncate/ --- diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/union.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/union.md index f2ed1030a..529bc546e 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/union.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/union.md @@ -8,7 +8,7 @@ menu: v2_0_ref: name: union parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/reference/flux/stdlib/built-in/transformations/join/ --- diff --git a/content/v2.0/reference/flux/stdlib/built-in/transformations/window.md b/content/v2.0/reference/flux/stdlib/built-in/transformations/window.md index 9c72e0b1b..ff037a5ec 100644 --- a/content/v2.0/reference/flux/stdlib/built-in/transformations/window.md +++ b/content/v2.0/reference/flux/stdlib/built-in/transformations/window.md @@ -8,9 +8,10 @@ menu: v2_0_ref: name: window parent: built-in-transformations -weight: 401 +weight: 402 related: - /v2.0/query-data/flux/window-aggregate/ + - /v2.0/reference/flux/stdlib/built-in/transformations/aggregates/aggregatewindow/ - https://docs.influxdata.com/influxdb/latest/query_language/data_exploration/#the-group-by-clause, InfluxQL – GROUP BY time() --- @@ -36,22 +37,14 @@ window( stopColumn: "_stop", createEmpty: false ) - -// OR - -window( - intervals: intervals(every: 5m, period: 5m, offset: 12h), - timeColumn: "_time", - startColumn: "_start", - stopColumn: "_stop", - createEmpty: false -) ``` ## Parameters {{% note %}} -`every`,`period` or `intervals` is required. +#### Calendar months and years +`every`, `period`, and `offset` support all [valid duration units](/v2.0/reference/flux/language/types/#duration-types), +including **calendar months (`1mo`)** and **years (`1y`)**. {{% /note %}} ### every @@ -75,20 +68,6 @@ Defaults to 0, which will align window end boundaries with the `every` duration. _**Data type:** Duration_ -### intervals -A function that returns an interval generator, a set of intervals used as windows. - -_**Data type:** Function_ - -###### Example interval generator function -```js -intervals(every:1d, period:8h, offset:9h) -``` - -{{% note %}} -When `intervals` is used, `every`, `period`, and `start` cannot be used or need to be set to 0. -{{% /note %}} - ### timeColumn The column containing time. Defaults to `"_time"`. @@ -118,15 +97,15 @@ _**Data type:** Boolean_ #### Window data into 10 minute intervals ```js from(bucket:"example-bucket") - |> range(start:-12h) - |> window(every:10m) + |> range(start: -12h) + |> window(every: 10m) // ... ``` -#### Window data using intervals function -The following windows data into 8 hour intervals starting at 9AM every day. +#### Window by calendar month ```js from(bucket:"example-bucket") - |> range(start:-12h) - |> window(intervals: intervals(every:1d, period:8h, offset:9h)) + |> range(start: -1y) + |> window(every: 1mo) + // ... ``` diff --git a/content/v2.0/reference/flux/stdlib/contrib/_index.md b/content/v2.0/reference/flux/stdlib/contrib/_index.md new file mode 100644 index 000000000..5355284b8 --- /dev/null +++ b/content/v2.0/reference/flux/stdlib/contrib/_index.md @@ -0,0 +1,16 @@ +--- +title: Flux user-contributed functions +list_title: User-contributed functions +description: > + User-contributed packages and functions are contributed and maintained by members of the InfluxDB and Flux communities. +menu: + v2_0_ref: + name: User-contributed + parent: Flux standard library +weight: 202 +v2.0/tags: [contributed, functions, package] +--- + +User-contributed packages and functions are contributed and maintained by members of the InfluxDB and Flux communities. + +{{< children >}} diff --git a/content/v2.0/reference/flux/stdlib/contrib/discord/_index.md b/content/v2.0/reference/flux/stdlib/contrib/discord/_index.md new file mode 100644 index 000000000..7bff095dd --- /dev/null +++ b/content/v2.0/reference/flux/stdlib/contrib/discord/_index.md @@ -0,0 +1,28 @@ +--- +title: Flux Discord package +list_title: Discord package +description: > + The Flux Discord package provides functions for sending data to Discord. + Import the `contrib/chobbs/discord` package. +menu: + v2_0_ref: + name: Discord + parent: User-contributed +weight: 202 +v2.0/tags: [functions, discord, package] +--- + +The Flux Discord package provides functions for sending data to Discord. +Import the `contrib/chobbs/discord` package: + +```js +import "contrib/chobbs/discord" +``` + +{{< children type="functions" show="pages" >}} + +{{% note %}} +#### Package author and maintainer +**Github:** [@chobbs](https://github.com/chobbs) +**InfluxDB Slack:** [@craig](https://influxdata.com/slack) +{{% /note %}} diff --git a/content/v2.0/reference/flux/stdlib/contrib/discord/send.md b/content/v2.0/reference/flux/stdlib/contrib/discord/send.md new file mode 100644 index 000000000..62f6bdee8 --- /dev/null +++ b/content/v2.0/reference/flux/stdlib/contrib/discord/send.md @@ -0,0 +1,86 @@ +--- +title: discord.send() function +description: > + The `discord.send()` function sends a single message to a Discord channel using + a [Discord webhook](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks&?page=3). +menu: + v2_0_ref: + name: discord.send + parent: Discord +weight: 202 +--- + +The `discord.send()` function sends a single message to a Discord channel using +a [Discord webhook](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks&?page=3). + +_**Function type:** Output_ + +```js +import "contrib/chobbs/discord" + +discord.send( + webhookToken: "mySuPerSecRetTokEn", + webhookID: "123456789", + username: "username", + content: "This is an example message", + avatar_url: "https://example.com/avatar_pic.jpg" +) +``` + +## Parameters + +### webhookToken +Discord [webhook token](https://discord.com/developers/docs/resources/webhook). + +_**Data type:** String_ + +### webhookID +Discord [webhook ID](https://discord.com/developers/docs/resources/webhook). + +_**Data type:** String_ + +### username +Override the Discord webhook's default username. + +_**Data type:** String_ + +### content +Message to send to Discord (2000 character limit). + +_**Data type:** String_ + +### avatar_url +Override the Discord webhook's default avatar. + +_**Data type:** String_ + +## Examples + +##### Send the last reported status to Discord +```js +import "contrib/chobbs/discord" +import "influxdata/influxdb/secrets" + +token = secrets.get(key: "DISCORD_TOKEN") + +lastReported = + from(bucket: "example-bucket") + |> range(start: -1m) + |> filter(fn: (r) => r._measurement == "statuses") + |> last() + |> findRecord(fn: (key) => true, idx: 0) + +discord.send( + webhookToken:token, + webhookID: "1234567890", + username: "chobbs", + content: "The current status is \"${lastReported.status}\".", + avatar_url: "https://staff-photos.net/pic.jpg" +) +``` + +{{% note %}} +#### Package author and maintainer +**Github:** [@chobbs](https://github.com/chobbs) +**InfluxDB Slack:** [@craig](https://influxdata.com/slack) +{{% /note %}} diff --git a/content/v2.0/reference/flux/stdlib/experimental/chain.md b/content/v2.0/reference/flux/stdlib/experimental/chain.md new file mode 100644 index 000000000..8f7868231 --- /dev/null +++ b/content/v2.0/reference/flux/stdlib/experimental/chain.md @@ -0,0 +1,68 @@ +--- +title: experimental.chain() function +description: > + The `experimental.chain()` function runs two queries in a single Flux script + sequentially and outputs the results of the second query. +menu: + v2_0_ref: + name: experimental.chain + parent: Experimental +weight: 302 +--- + +The `experimental.chain()` function runs two queries in a single Flux script +sequentially and outputs the results of the second query. +Flux typically executes multiple queries in a single script in parallel. +Running the queries sequentially ensures any dependencies the second query has on +the results of the first query are met. + +##### Applicable use cases +- Writing to a bucket and querying the written data in a single Flux script or + [InfluxDB task](/v2.0/process-data/get-started/). +- Execute queries sequentially in testing scenarios. + +_**Function type:** Miscellaneous_ + +```js +import "experimental" + +experimental.chain( + first: query1, + second: query2 +) +``` + +## Parameters + +### first +The first query to execute. + +_**Data type:** Stream of tables_ + +### second +The second query to execute. + +_**Data type:** Stream of tables_ + +## Examples + +### Write to a bucket and query the written data +```js +import "experimental" + +downsampled_max = from(bucket: "example-bucket-1") + |> range(start: -1d) + |> filter(fn: (r) => r._measurement == "example-measurement") + |> aggregateWindow(every: 1h, fn: max) + |> to(bucket: "downsample-1h-max", org: "example-org") + +average_max = from(bucket: "downsample-1h-max") + |> range(start: -1d) + |> filter(fn: (r) => r.measurement == "example-measurement") + |> mean() + +experimental.chain( + first: downsampled_max, + second: average_max +) +``` diff --git a/content/v2.0/reference/flux/stdlib/experimental/json/_index.md b/content/v2.0/reference/flux/stdlib/experimental/json/_index.md new file mode 100644 index 000000000..00b7b518a --- /dev/null +++ b/content/v2.0/reference/flux/stdlib/experimental/json/_index.md @@ -0,0 +1,23 @@ +--- +title: Flux Experimental JSON package +list_title: JSON package +description: > + The Flux experimental JSON package provides functions for working with JSON. + Import the `experimental/json` package. +menu: + v2_0_ref: + name: JSON + identifier: JSON-exp + parent: Experimental +weight: 301 +v2.0/tags: [functions, json, package] +--- + +Flux experimental JSON functions provide tools for working with JSON. +Import the `experimental/json` package: + +```js +import "experimental/json" +``` + +{{< children type="functions" show="pages" >}} diff --git a/content/v2.0/reference/flux/stdlib/experimental/json/parse.md b/content/v2.0/reference/flux/stdlib/experimental/json/parse.md new file mode 100644 index 000000000..363bab106 --- /dev/null +++ b/content/v2.0/reference/flux/stdlib/experimental/json/parse.md @@ -0,0 +1,52 @@ +--- +title: json.parse() function +description: > + The `json.parse()` function takes JSON data as bytes and returns a value. +menu: + v2_0_ref: + name: json.parse + parent: JSON-exp +weight: 401 +--- + +The `json.parse()` function takes JSON data as bytes and returns a value. +The function can return lists, objects, strings, booleans, and float values. +All numeric values are returned as floats. + +_**Function type:** Type conversion_ + +```js +import "experimental/json" + +json.parse( + data: bytes(v: "{\"\"a\"\":1,\"\"b\"\":2,\"\"c\"\":3}") +) +``` + +## Parameters + +### data +JSON data to parse. + +_**Data type:** Bytes_ + + +## Examples + +##### Parse and use JSON data to restructure a table +```js +import "experimental/json" + +data + |> map(fn: (r) => { + jsonData = json.parse(data: bytes(v: r._value)) + + return { + _time: r._time, + _field: r._field, + a: jsonData.a, + b: jsonData.b, + c: jsonData.c, + } + }) +``` diff --git a/content/v2.0/reference/flux/stdlib/influxdb-v1/fieldkeys.md b/content/v2.0/reference/flux/stdlib/influxdb-v1/fieldkeys.md new file mode 100644 index 000000000..9d3b680e0 --- /dev/null +++ b/content/v2.0/reference/flux/stdlib/influxdb-v1/fieldkeys.md @@ -0,0 +1,67 @@ +--- +title: v1.fieldKeys() function +description: The `v1.fieldKeys()` function returns field keys in a bucket. +menu: + v2_0_ref: + name: v1.fieldKeys + parent: InfluxDB v1 +weight: 301 +v2.0/tags: [fields] +related: + - /v2.0/query-data/flux/explore-schema/ + - https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration#show-field-keys, SHOW FIELD KEYS in InfluxQL +--- + +The `v1.fieldKeys()` function returns field keys in a bucket. +The return value is always a single table with a single column, `_value`. + +```js +import "influxdata/influxdb/v1" + +v1.fieldKeys( + bucket: "example-bucket", + predicate: (r) => true, + start: -30d +) +``` + +## Parameters + +### bucket +The bucket to list field keys from. + +_**Data type:** String_ + +### predicate +The predicate function that filters field keys. +_Defaults to `(r) => true`._ + +_**Data type:** Function_ + +### start +The oldest time to include in results. +_Defaults to `-30d`._ + +Relative start times are defined using negative durations. +Negative durations are relative to now. +Absolute start times are defined using timestamps. + +_**Data type:** Duration_ + +## Examples +```js +import "influxdata/influxdb/v1" + +v1.fieldKeys(bucket: "my-bucket") +``` + +## Function definition +```js +package v1 + +fieldKeys = (bucket, predicate=(r) => true, start=-30d) => + tagValues(bucket: bucket, tag: "_field", predicate: predicate, start: start) +``` + +_**Used functions:** +[v1.tagValues](/v2.0/reference/flux/stdlib/influxdb-v1/tagvalues/)_ diff --git a/content/v2.0/reference/flux/stdlib/influxdb-v1/fieldsascols.md b/content/v2.0/reference/flux/stdlib/influxdb-v1/fieldsascols.md index a1596f8a6..13c4df176 100644 --- a/content/v2.0/reference/flux/stdlib/influxdb-v1/fieldsascols.md +++ b/content/v2.0/reference/flux/stdlib/influxdb-v1/fieldsascols.md @@ -36,6 +36,8 @@ from(bucket:"example-bucket") ## Function definition ```js +package v1 + fieldsAsCols = (tables=<-) => tables |> pivot( diff --git a/content/v2.0/reference/flux/stdlib/influxdb-v1/measurementfieldkeys.md b/content/v2.0/reference/flux/stdlib/influxdb-v1/measurementfieldkeys.md new file mode 100644 index 000000000..519c91216 --- /dev/null +++ b/content/v2.0/reference/flux/stdlib/influxdb-v1/measurementfieldkeys.md @@ -0,0 +1,69 @@ +--- +title: v1.measurementFieldKeys() function +description: The `v1.measurementFieldKeys()` function returns a list of fields in a measurement. +menu: + v2_0_ref: + name: v1.measurementFieldKeys + parent: InfluxDB v1 +weight: 301 +v2.0/tags: [fields] +related: + - /v2.0/query-data/flux/explore-schema/ + - https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration#show-field-keys, SHOW FIELD KEYS in InfluxQL +--- + +The `v1.measurementFieldKeys()` function returns a list of fields in a measurement. +The return value is always a single table with a single column, `_value`. + +```js +import "influxdata/influxdb/v1" + +v1.measurementFieldKeys( + bucket: "example-bucket", + measurement: "example-measurement", + start: -30d +) +``` + +## Parameters + +### bucket +The bucket to list field keys from. + +_**Data type:** String_ + +### measurement +The measurement to list field keys from. + +_**Data type:** String_ + +### start +The oldest time to include in results. +_Defaults to `-30d`._ + +Relative start times are defined using negative durations. +Negative durations are relative to now. +Absolute start times are defined using timestamps. + +_**Data type:** Duration_ + +## Examples +```js +import "influxdata/influxdb/v1" + +v1.measurementFieldKeys( + bucket: "telegraf", + measurement: "cpu", +) +``` + +## Function definition +```js +package v1 + +measurementFieldKeys = (bucket, measurement, start=-30d) => + fieldKeys(bucket: bucket, predicate: (r) => r._measurement == measurement, start: start) +``` + +_**Used functions:** +[v1.fieldKeys](/v2.0/reference/flux/stdlib/influxdb-v1/fieldkeys/)_ diff --git a/content/v2.0/reference/flux/stdlib/influxdb-v1/measurements.md b/content/v2.0/reference/flux/stdlib/influxdb-v1/measurements.md index 55143bda3..d7e113fe5 100644 --- a/content/v2.0/reference/flux/stdlib/influxdb-v1/measurements.md +++ b/content/v2.0/reference/flux/stdlib/influxdb-v1/measurements.md @@ -10,6 +10,7 @@ menu: weight: 301 v2.0/tags: [measurements] related: + - /v2.0/query-data/flux/explore-schema/ - https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration#show-measurements, SHOW MEASUREMENTS in InfluxQL --- @@ -31,9 +32,11 @@ _**Data type:** String_ ## Function definition ```js +package v1 + measurements = (bucket) => tagValues(bucket: bucket, tag: "_measurement") ``` _**Used functions:** -[tagValues()](/v2.0/reference/flux/stdlib/influxdb-v1/tagvalues)_ +[v1.tagValues()](/v2.0/reference/flux/stdlib/influxdb-v1/tagvalues)_ diff --git a/content/v2.0/reference/flux/stdlib/influxdb-v1/measurementtagkeys.md b/content/v2.0/reference/flux/stdlib/influxdb-v1/measurementtagkeys.md index ae6f20774..b1480d09e 100644 --- a/content/v2.0/reference/flux/stdlib/influxdb-v1/measurementtagkeys.md +++ b/content/v2.0/reference/flux/stdlib/influxdb-v1/measurementtagkeys.md @@ -10,6 +10,7 @@ menu: weight: 301 v2.0/tags: [tags] related: + - /v2.0/query-data/flux/explore-schema/ - https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration#show-tag-keys, SHOW TAG KEYS in InfluxQL --- @@ -39,11 +40,14 @@ _**Data type:** String_ ## Function definition ```js +package v1 + measurementTagKeys = (bucket, measurement) => tagKeys( bucket: bucket, - predicate: (r) => r._measurement == measurement) + predicate: (r) => r._measurement == measurement + ) ``` _**Used functions:** -[tagKeys()](/v2.0/reference/flux/stdlib/influxdb-v1/tagkeys)_ +[v1.tagKeys()](/v2.0/reference/flux/stdlib/influxdb-v1/tagkeys)_ diff --git a/content/v2.0/reference/flux/stdlib/influxdb-v1/measurementtagvalues.md b/content/v2.0/reference/flux/stdlib/influxdb-v1/measurementtagvalues.md index 9d51d7a9e..701c42b35 100644 --- a/content/v2.0/reference/flux/stdlib/influxdb-v1/measurementtagvalues.md +++ b/content/v2.0/reference/flux/stdlib/influxdb-v1/measurementtagvalues.md @@ -10,6 +10,7 @@ menu: weight: 301 v2.0/tags: [tags] related: + - /v2.0/query-data/flux/explore-schema/ - https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration#show-tag-values, SHOW TAG VALUES in InfluxQL --- @@ -48,6 +49,8 @@ _**Data type:** String_ ## Function definition ```js +package v1 + measurementTagValues = (bucket, measurement, tag) => tagValues( bucket: bucket, @@ -57,4 +60,4 @@ measurementTagValues = (bucket, measurement, tag) => ``` _**Used functions:** -[tagValues()](/v2.0/reference/flux/stdlib/influxdb-v1/tagvalues)_ +[v1.tagValues()](/v2.0/reference/flux/stdlib/influxdb-v1/tagvalues)_ diff --git a/content/v2.0/reference/flux/stdlib/influxdb-v1/tagkeys.md b/content/v2.0/reference/flux/stdlib/influxdb-v1/tagkeys.md index 46bc4f8d0..f523c753b 100644 --- a/content/v2.0/reference/flux/stdlib/influxdb-v1/tagkeys.md +++ b/content/v2.0/reference/flux/stdlib/influxdb-v1/tagkeys.md @@ -10,6 +10,7 @@ menu: weight: 301 v2.0/tags: [tags] related: + - /v2.0/query-data/flux/explore-schema/ - https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration#show-tag-keys, SHOW TAG KEYS in InfluxQL --- @@ -40,7 +41,7 @@ _Defaults to `(r) => true`._ _**Data type:** Function_ ### start -Specifies the oldest time to be included in the results. +The oldest time to include in results. _Defaults to `-30d`._ Relative start times are defined using negative durations. @@ -59,6 +60,8 @@ v1.tagKeys(bucket: "my-bucket") ## Function definition ```js +package v1 + tagKeys = (bucket, predicate=(r) => true, start=-30d) => from(bucket: bucket) |> range(start: start) diff --git a/content/v2.0/reference/flux/stdlib/influxdb-v1/tagvalues.md b/content/v2.0/reference/flux/stdlib/influxdb-v1/tagvalues.md index e07f53827..35ba8e1ee 100644 --- a/content/v2.0/reference/flux/stdlib/influxdb-v1/tagvalues.md +++ b/content/v2.0/reference/flux/stdlib/influxdb-v1/tagvalues.md @@ -10,6 +10,7 @@ menu: weight: 301 v2.0/tags: [tags] related: + - /v2.0/query-data/flux/explore-schema/ - https://docs.influxdata.com/influxdb/latest/query_language/schema_exploration#show-tag-values, SHOW TAG VALUES in InfluxQL --- @@ -46,7 +47,7 @@ _Defaults to `(r) => true`._ _**Data type:** Function_ ### start -Specifies the oldest time to be included in the results. +The oldest time to include in results. _Defaults to `-30d`._ Relative start times are defined using negative durations. @@ -59,7 +60,7 @@ _**Data type:** Duration_ ```js import "influxdata/influxdb/v1" -v1.tagKeys( +v1.tagValues( bucket: "my-bucket", tag: "host", ) @@ -67,6 +68,8 @@ v1.tagKeys( ## Function definition ```js +package v1 + tagValues = (bucket, tag, predicate=(r) => true, start=-30d) => from(bucket: bucket) |> range(start: start) diff --git a/content/v2.0/reference/flux/stdlib/sql/_index.md b/content/v2.0/reference/flux/stdlib/sql/_index.md index 51d3d2c9b..2fd8814e0 100644 --- a/content/v2.0/reference/flux/stdlib/sql/_index.md +++ b/content/v2.0/reference/flux/stdlib/sql/_index.md @@ -18,7 +18,7 @@ related: --- SQL Flux functions provide tools for working with data in SQL databases such as -MySQL, PostgreSQL, and SQLite. +MySQL, PostgreSQL, Snowflake, and SQLite. Import the `sql` package: ```js diff --git a/content/v2.0/reference/flux/stdlib/sql/from.md b/content/v2.0/reference/flux/stdlib/sql/from.md index 2d8b1d43c..0ecc56666 100644 --- a/content/v2.0/reference/flux/stdlib/sql/from.md +++ b/content/v2.0/reference/flux/stdlib/sql/from.md @@ -37,6 +37,7 @@ The following drivers are available: - mysql - postgres +- snowflake - sqlite3 – _Does not work with InfluxDB OSS or InfluxDB Cloud. More information [below](#query-an-sqlite-database)._ ### dataSourceName @@ -53,6 +54,11 @@ postgres://pqgotest:password@localhost/pqgotest?sslmode=verify-full # MySQL Driver DSN username:password@tcp(localhost:3306)/dbname?param=value +# Snowflake Driver DSNs +username[:password]@accountname/dbname/schemaname?param1=value1¶mN=valueN +username[:password]@accountname/dbname?param1=value1¶mN=valueN +username[:password]@hostname:port/dbname/schemaname?account=¶m1=value1¶mN=valueN + # SQLite Driver DSN file:/path/to/test.db?cache=shared&mode=ro ``` @@ -80,7 +86,7 @@ password = secrets.get(key: "MYSQL_PASS") sql.from( driverName: "mysql", dataSourceName: "${username}:${password}@tcp(localhost:3306)/db", - query:"SELECT * FROM ExampleTable" + query:"SELECT * FROM example_table" ) ``` @@ -95,7 +101,23 @@ password = secrets.get(key: "POSTGRES_PASS") sql.from( driverName: "postgres", dataSourceName: "postgresql://${username}:${password}@localhost", - query:"SELECT * FROM ExampleTable" + query:"SELECT * FROM example_table" +) +``` + +### Query a Snowflake database +```js +import "sql" +import "influxdata/influxdb/secrets" + +username = secrets.get(key: "SNOWFLAKE_USER") +password = secrets.get(key: "SNOWFLAKE_PASS") +account = secrets.get(key: "SNOWFLAKE_ACCT") + +sql.from( + driverName: "snowflake", + dataSourceName: "${username}:${password}@${account}/db/exampleschema?warehouse=wh", + query: "SELECT * FROM example_table" ) ``` @@ -114,6 +136,6 @@ import "sql" sql.from( driverName: "sqlite3", dataSourceName: "file:/path/to/test.db?cache=shared&mode=ro", - query:"SELECT * FROM ExampleTable" + query: "SELECT * FROM example_table" ) ``` diff --git a/content/v2.0/reference/flux/stdlib/sql/to.md b/content/v2.0/reference/flux/stdlib/sql/to.md index 0286011dd..4d94200ef 100644 --- a/content/v2.0/reference/flux/stdlib/sql/to.md +++ b/content/v2.0/reference/flux/stdlib/sql/to.md @@ -20,7 +20,7 @@ import "sql" sql.to( driverName: "mysql", dataSourceName: "username:password@tcp(localhost:3306)/dbname?param=value", - table: "ExampleTable", + table: "example_table", batchSize: 10000 ) ``` @@ -36,6 +36,7 @@ The following drivers are available: - mysql - postgres +- snowflake - sqlite3 – _Does not work with InfluxDB OSS or InfluxDB Cloud. More information [below](#write-data-to-an-sqlite-database)._ ### dataSourceName @@ -52,6 +53,11 @@ postgres://pqgotest:password@localhost/pqgotest?sslmode=verify-full # MySQL Driver DSN username:password@tcp(localhost:3306)/dbname?param=value +# Snowflake Driver DSNs +username[:password]@accountname/dbname/schemaname?param1=value1¶mN=valueN +username[:password]@accountname/dbname?param1=value1¶mN=valueN +username[:password]@hostname:port/dbname/schemaname?account=¶m1=value1¶mN=valueN + # SQLite Driver DSN file:/path/to/test.db?cache=shared&mode=rw ``` @@ -89,7 +95,7 @@ password = secrets.get(key: "MYSQL_PASS") sql.to( driverName: "mysql", dataSourceName: "${username}:${password}@tcp(localhost:3306)/db", - table: "ExampleTable" + table: "example_table" ) ``` @@ -104,7 +110,23 @@ password = secrets.get(key: "POSTGRES_PASS") sql.to( driverName: "postgres", dataSourceName: "postgresql://${username}:${password}@localhost", - table: "ExampleTable" + table: "example_table" +) +``` + +### Write data to a Snowflake database +```js +import "sql" +import "influxdata/influxdb/secrets" + +username = secrets.get(key: "SNOWFLAKE_USER") +password = secrets.get(key: "SNOWFLAKE_PASS") +account = secrets.get(key: "SNOWFLAKE_ACCT") + +sql.to( + driverName: "snowflake", + dataSourceName: "${username}:${password}@${account}/db/exampleschema?warehouse=wh", + table: "example_table" ) ``` @@ -123,6 +145,6 @@ import "sql" sql.to( driverName: "sqlite3", dataSourceName: "file:/path/to/test.db?cache=shared&mode=rw", - table: "ExampleTable" + table: "example_table" ) ``` diff --git a/content/v2.0/reference/flux/stdlib/strings/hasprefix.md b/content/v2.0/reference/flux/stdlib/strings/hasprefix.md index 200aca3cf..33ba6a05b 100644 --- a/content/v2.0/reference/flux/stdlib/strings/hasprefix.md +++ b/content/v2.0/reference/flux/stdlib/strings/hasprefix.md @@ -19,7 +19,7 @@ _**Output data type:** Boolean_ ```js import "strings" -strings.hasPrefix(v: "go gopher", t: "go") +strings.hasPrefix(v: "go gopher", prefix: "go") // returns true ``` @@ -31,7 +31,7 @@ The string value to search. _**Data type:** String_ -### t +### prefix The prefix to search for. _**Data type:** String_ @@ -41,5 +41,5 @@ _**Data type:** String_ import "strings" data - |> filter(fn:(r) => strings.hasPrefix(v: r.metric, t: "int_" )) + |> filter(fn:(r) => strings.hasPrefix(v: r.metric, prefix: "int_" )) ``` diff --git a/content/v2.0/reference/flux/stdlib/strings/hassuffix.md b/content/v2.0/reference/flux/stdlib/strings/hassuffix.md index dfc66563a..0ed74e822 100644 --- a/content/v2.0/reference/flux/stdlib/strings/hassuffix.md +++ b/content/v2.0/reference/flux/stdlib/strings/hassuffix.md @@ -19,7 +19,7 @@ _**Output data type:** Boolean_ ```js import "strings" -strings.hasSuffix(v: "go gopher", t: "go") +strings.hasSuffix(v: "go gopher", suffix: "go") // returns false ``` @@ -31,7 +31,7 @@ The string value to search. _**Data type:** String_ -### t +### suffix The suffix to search for. _**Data type:** String_ @@ -41,5 +41,5 @@ _**Data type:** String_ import "strings" data - |> filter(fn:(r) => strings.hasSuffix(v: r.metric, t: "_count" )) + |> filter(fn:(r) => strings.hasSuffix(v: r.metric, suffix: "_count" )) ``` diff --git a/content/v2.0/reference/glossary.md b/content/v2.0/reference/glossary.md index 0c9a97443..daee14047 100644 --- a/content/v2.0/reference/glossary.md +++ b/content/v2.0/reference/glossary.md @@ -90,6 +90,8 @@ Related entries: [implicit block](#implicit-block), [explicit block](#explicit-b A data type with two possible values: true or false. By convention, you can express `true` as the integer `1` and false as the integer `0` (zero). +In [annotated CSV](/v2.0/reference/syntax/annotated-csv/), columns that contain +boolean values are annotated with the `boolean` datatype. ### bucket @@ -337,8 +339,10 @@ Related entries: [block](#block) ### float -A float represents real numbers and is written with a decimal point dividing the integer and fractional parts. -For example, 1.0, 3.14. +A real number written with a decimal point dividing the integer and fractional parts (`1.0`, `3.14`, `-20.1`). +InfluxDB supports 64-bit float values. +In [annotated CSV](/v2.0/reference/syntax/annotated-csv/), columns that contain +float values are annotated with the `double` datatype. ### flush interval @@ -466,9 +470,14 @@ Related entries: [aggregator plugin](#aggregator-plugin), [collection interval]( An entity comprising data on a server (or virtual server in cloud computing). -### int (data type) +### integer -A data type that represents an integer, a whole number that's positive, negative, or zero. +A whole number that is positive, negative, or zero (`0`, `-5`, `143`). +InfluxDB supports 64-bit integers (minimum: `-9223372036854775808`, maximum: `9223372036854775807`). +In [annotated CSV](/v2.0/reference/syntax/annotated-csv/), columns that contain +integers are annotated with the `long` datatype. + +Related entries: [unsigned integer](#unsigned-integer) ## J @@ -945,6 +954,8 @@ A stream includes a series of tables over a sequence of time intervals. ### string A data type used to represent text. +In [annotated CSV](/v2.0/reference/syntax/annotated-csv/), columns that contain +string values are annotated with the `string` datatype. ## T @@ -1094,6 +1105,14 @@ InfluxDB supports the following unix timestamp precisions: Related entries: [timestamp](#timestamp), [RFC3339 timestamp](#rfc3339-timestamp) +### unsigned integer +A whole number that is positive or zero (`0`, `143`). Also known as a "uinteger." +InfluxDB supports 64-bit unsigned integers (minimum: `0`, maximum: `18446744073709551615`). +In [annotated CSV](/v2.0/reference/syntax/annotated-csv/), columns that contain +integers are annotated with the `unisgnedLong` datatype. + +Related entries: [integer](#integer) + ### user InfluxDB users are granted permission to access to InfluxDB. diff --git a/content/v2.0/reference/key-concepts/data-schema.md b/content/v2.0/reference/key-concepts/data-schema.md new file mode 100644 index 000000000..cc01a54f0 --- /dev/null +++ b/content/v2.0/reference/key-concepts/data-schema.md @@ -0,0 +1,63 @@ +--- +title: InfluxDB data schema +description: > + InfluxDB uses a tabular data schema for displaying raw data in Data Explorer and for returning query results in annotated CSV syntax. +aliases: + - /v2.0/reference/key-concepts/table-structure +weight: 103 +menu: + v2_0_ref: + parent: Key concepts + name: Data schema +v2.0/tags: [key concepts] +--- + +InfluxDB [data elements](/v2.0/reference/key-concepts/data-elements/) are stored in [time-structured merge tree (TSM)](/v2.0/reference/internals/storage-engine/#time-structured-merge-tree-tsm) and [time series index (TSI)](/v2.0/reference/internals/storage-engine/#time-series-index-tsi) files to efficiently compact stored data. + +InfluxDB also provides a **tabular data schema** that includes the following: + +- [Annotation rows](#annotation-rows) +- [Header row](#header-row) +- [Data rows](#data-row) +- [Data columns](#data-columns) +- [Group keys](#group-keys) + +The **tabular data schema is used for the following**: + +- To [view raw data](/v2.0/visualize-data/explore-metrics/#view-raw-data) when [exploring metrics with InfluxDB](/v2.0/visualize-data/explore-metrics) +- To return query results in [annotated CSV syntax](/v2.0/reference/syntax/annotated-csv/) + +## Annotation rows + +Annotation rows describe column properties, for example: + +- `#group` +- `#datatype` +- `#default` + +## Header row + +The header row defines column labels that describe data in each column, for example: + +- `table` +- `_time` +- `_value` +- `_field` +- `_measurement` +- tag key names (without underscore prefix): `tag-1`, `tag-2` + +## Data rows + +Each data row contains the data specified in the header row for one [point](/v2.0/reference/glossary/#point). + +## Other columns + +In addition to the columns in each data row (specified in the header row), the following columns are optional: + +- `annotation` +- `result` +- `table` + +## Group keys + +Determine the contents of output tables in Flux by grouping records that share common values in specified columns. Learn more about [grouping your data with Flux](/v2.0/query-data/flux/group-data/). diff --git a/content/v2.0/reference/key-concepts/table-structure.md b/content/v2.0/reference/key-concepts/table-structure.md deleted file mode 100644 index 71011c1bb..000000000 --- a/content/v2.0/reference/key-concepts/table-structure.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: InfluxDB table structure -description: > - InfluxDB uses a columnar system to structure tables. -weight: 103 -menu: - v2_0_ref: - parent: Key concepts - name: Table structure -v2.0/tags: [key concepts] ---- - -InfluxDB 2.0 uses the following columnar table structure to store data: - -- **Annotation rows:** include the following rows: #group, #datatype, and #default. -- **Header row:** describes the data labels for each column in a row. -- **Data columns:** include the following columns: annotation, result, and table. -- **Data rows:** all rows that contain time series data. For details about the type of data stored in InfluxDB, see [InfluxDB data elements](/v2.0/reference/key-concepts/data-elements/). -- **Group keys** determine the contents of output tables in Flux by grouping records that share common values in specified columns. Learn more about [grouping your data with Flux](/v2.0/query-data/flux/group-data/). - -For specifications on the InfluxDB 2.0 table structure, see [Tables](/v2.0/reference/syntax/annotated-csv/#tables). - -**_Tip:_** To visualize your table structure in the InfluxDB user interface, click the **Data Explorer** icon -in the sidebar, create a query, click **Submit**, and then select **View Raw Data**. diff --git a/content/v2.0/reference/release-notes/flux.md b/content/v2.0/reference/release-notes/flux.md index daf7f5630..ed3c14153 100644 --- a/content/v2.0/reference/release-notes/flux.md +++ b/content/v2.0/reference/release-notes/flux.md @@ -11,11 +11,168 @@ aliases: --- {{% note %}} -_The latest release of InfluxDB v2.0 beta includes **Flux v0.66.1**. +_The latest release of InfluxDB v2.0 beta includes **Flux v0.69.2**. Though newer versions of Flux may be available, they will not be included with InfluxDB until the next InfluxDB v2.0 release._ {{% /note %}} +## v0.69.2 [2020-06-10] + +### Bug fixes +- Include a hash of sources for `libflux`. + +--- + +## v0.69.1 [2020-06-09] + +### Bug fixes +- Fix experimental `json.parse()` test. + +--- + +## v0.69.0 [2020-06-08] + +### Features +- Add [Discord package](/v2.0/reference/flux/stdlib/contrib/discord/) + _(contributed by [@chobbs](https://github.com/chobbs))_. +- Add [`json.parse()` function](/v2.0/reference/flux/stdlib/experimental/json/parse/). + +### Bug fixes +- Adjust error handling in Flux `date` package. + +--- + +## v0.68.0 [2020-05-28] +This version of Flux introduces an updated type inference system that improves +performance, error messaging, and usability of the +[Flux Language Server Protocol (LSP)](https://github.com/influxdata/flux-lsp). + +## Breaking Changes +- Change signature of `group()` function. + +## Features +- Add [`fieldKeys()`](/v2.0/reference/flux/stdlib/influxdb-v1/fieldkeys/) and + [`measurementFieldKeys()`](/v2.0/reference/flux/stdlib/influxdb-v1/measurementfieldkeys/) + to v1 package. +- Add a context to `plantest.RuleTestCase`. +- Add Snowflake support to SQL package. +- Add [`experimental.chain()`](/v2.0/reference/flux/stdlib/experimental/chain/) function. +- Add semantic nodes for bad statement and bad expression. +- Add [`findColumn()`](/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findcolumn/) + and [`findRecord()`](/v2.0/reference/flux/stdlib/built-in/transformations/stream-table/findrecord/) functions. +- Return `false` if `contains()` is called with an empty set. +- Various performance optimizations. +- Add a dynamically linked Valgrind test. +- Add location information to type error messages. +- Add all Linux cross-compilation tools to release Docker image. +- Support remote `buckets()` and `v1.databases()` calls. +- Add support for static linking. +- Add `influxdb` source. +- Add support for `pkg-config`. +- Transform semantic nodes back to AST nodes. +- Handle multi-file packages. +- Make `Eval()` and `EvalAST()` use libflux for parsing and analysis. +- Add `lookuptype` function for stdlib builtins. + +## Bug Fixes +- Re-enable Clippy linter rule match single binding. +- Fix bug in object equal method. +- Add builtin formatting. +- Implement `TimeBounds` for `influxdb.fromRemote`. +- Inject the URL validator into `NewDefaultClient`. +- Fix race condition in the `filter()` function. +- Validate HTTP redirects against private IPs. +- Hide DNS information in HTTP. +- Fix concurrent map write in `filter()` transformation. +- Copy all fields of `WindowProcedureSpec` in `Copy()`. +- Run `go generate` on libflux when `go generate` is run on stdlib. +- Fix panic when `map()` overwrites group column. +- Support execution contexts in the REPL. +- Apply substitution fully when compiling lambda. +- Planner rewrite rules take a context. +- Fix panics when functions operate on null values. +- Fix logic for merging packages with no package clause. +- Compute function's return type after substitution. +- Resolve member expressions. +- Improve error message descriptions. +- Check types of parts when evaluating `StringExpression`. +- Bind appropriate interpreter when evaluating functions. +- Tweak Rust JSON serialization and add tests. +- Pivot sends update watermark and processing time exactly once. +- Calculate diff's watermark using both predecessors. +- Add length check to avoid allocs checking for JSON `null`. +- Make compilers robust to `null` keyword in `extern` field. +- Address issues in `RemoveTrivialFilterRule`. +- Bind appropriate interpreter when evaluating functions. +- Convert `HashMap` in semantic package to `BTreeMap`. +- Use static linking when creating the Valgrind test. +- Update `flatbuffers` dependency. +- Fix JSON serialization of Rust AST. +- Remove unused environment variables. +- Make `merge_packages` allow no package clauses. +- Do not call `CheckKind` when evaluating logical expressions. +- Force the Go libflux wrapper to rebuild using `go generate`. +- Adjust `test-bench` config for Circle CI. +- Fix Valgrind test code. +- Let Rust parser parse with file name. +- Remove Algorithm-W to-do list. +- `JoinStr` returns a string, not an empty record. +- Only add visible properties to output of `map()`. +- Serialize the correct sign duration literal. +- Remove code in semantic package that depends on Rust/Cgo code. +- Remove `component` field from API. +- Remove unused notification rule fields from Slack and PagerDuty APIs. +- Array builders accept array types as input. +- Enable `map()` tests with null values. +- Remove tests for marshalling semantic graph. +- Run `make generate` to generate stdlib. +- Fix type error in benchmark test. +- Update `TableObject` test. +- Do not call `LocalRange` on nil scope. +- Type assertion error in `length()` tests. +- Update type inference test case with test for `union()`. +- Make non-test CI steps pass. +- Fix semantic check for option reassignment. +- Type inference tests for binary comparison operators. +- Fix typo in builtins. +- Update `holtWinters()` to make `seasonality` optional. +- Fix type errors in tests. +- Remove default value from notify data. +- Allow options to be set in scope. +- Replace `ScopeComparer` with `ScopeTransformer`. +- Use `LocalRange` in compile tests. +- Add missing parameter to type of `to()`. +- Get `TableObject` test case to compile. +- Fix typo in test case. +- Update `TableObjects` to type `Array`. +- Use array type method correctly. +- Update schema mutators. +- Return proper types for type conversion functions. +- Enable complete package to compile and pass tests. +- Make stdlib compile. +- Expect monotypes for function values. +- Require successful lookup of stdlib builtins or panic. +- Optimize lookup function using hashmap. +- Include function type when deserializing function expressions. + +--- + +## v0.67.0 [2020-04-28] + +### Features +- Planner Pattern interface supplies a set of ProcedureKind as root. +- Initial prototype of a table-based Flux. +- Evaluate and store "now" in execution dependencies for `tableFind()` to use. +- Static analysis tool for listing entry points to Flux. +- Pass context to rewrite rules in the planner. + +### Bug fixes +- Pivot sends update watermark and processing time exactly once. +- `system.time()` checks context for override. +- Add bounds to alignTime tests. + +--- + ## v0.66.1 [2020-04-14] ### Bug fixes @@ -177,7 +334,7 @@ InfluxDB until the next InfluxDB v2.0 release._ ## v0.59.0 [2020-01-14] ### Features -- Add Go/Rust API for getting semantic graph.. +- Add Go/Rust API for getting semantic graph. - Optimize `limit()` transformation. - Optimize `group()` transformation. @@ -235,7 +392,7 @@ InfluxDB until the next InfluxDB v2.0 release._ - Update `experimental.set` builtin type. - Update the type of `influxdb.to` to be a passthrough. - Update `fill` builtin type. -- Remove redundant clones found by a new version of clippy. +- Remove redundant clones found by a new version of Clippy. - Fix durations in Rust semantic graph. - Removes unnecessary rc clone in semantic serializer. - Do not stall forever in flux-config when an error happens with verbose. @@ -250,7 +407,7 @@ InfluxDB until the next InfluxDB v2.0 release._ ## v0.57.0 [2019-12-10] ### Features -- Categorize more flux errors with codes. +- Categorize more Flux errors with codes. - Teach flux-config how to download the sources when using vendor. - Opentracing in query execution runtime. - Reduce memory allocations for operations in values. @@ -276,7 +433,7 @@ InfluxDB until the next InfluxDB v2.0 release._ ### Bug fixes - Properly use a fake version with `flux-config` when no version is present. -- Address clippy lints. +- Address Clippy lints. - Add bytes monotype to Rust semantic module. - Allow underscores (`_`) in type expressions. @@ -392,7 +549,7 @@ InfluxDB until the next InfluxDB v2.0 release._ - Update libflux parser to match the Go parser. - Allow data collected by `prometheus.scrape()` to be used by `histogramQuantile()`. - Remove mock allocator. -- Validate url for `sql.from()`, `sql.to()`, and `socket.from()`. +- Validate URL for `sql.from()`, `sql.to()`, and `socket.from()`. --- diff --git a/content/v2.0/reference/release-notes/influxdb.md b/content/v2.0/reference/release-notes/influxdb.md index 827286226..d7fb3ac7f 100644 --- a/content/v2.0/reference/release-notes/influxdb.md +++ b/content/v2.0/reference/release-notes/influxdb.md @@ -8,6 +8,57 @@ menu: weight: 101 --- +## v2.0.0-beta.12 [2020-06-12] + +### Features + +- Consolidate `influx apply` commands under templates. Remove some nesting of the `influx` CLI commands. +- Make all `influx apply` applications stateful through stacks. +- Add ability to export a stack's existing resource state using `influx export`. +- Update `influx apply` commands with improved usage and examples in long form. +- Update `influx` CLI to include the `-version` command and return the User-Agent header. +- Add `RedirectTo` functionality to ensure Cloud users are redirected to the page that they were trying access after logging into Cloud. +- Maintain sort order on a dashboard after navigating away. +- Allow tasks to open in new tabs. + +### Bug Fixes + +- Support organization name and ID in DBRP operations. +- Prevent the CLI from failing when an unexpected flag is entered in the CLI. +- `influx delete` now respects the configuration settings. +- Store initialization for `pkger` enforced on reads. +- Backfill missing `fillColumns` field for histograms in `pkger`. +- Notify the user how to escape presentation mode when the feature is toggled. + +### UI Improvements + +- Display bucket ID in bucket list and enable 1-click copying. +- Update Tokens list to be consistent with other resource lists. +- Reduce the number of variables being hydrated when toggling variables. +- Redesign dashboard cell loading indicator to be more obvious. + +## v2.0.0-beta.11 [2020-05-27] + +{{% warn %}} +The beta 11 version was **not released**. Changes below are included in the beta 12 release. +{{% /warn %}} + +### Features + +- Ability to set UTC time for a custom time range query. +- Ability to set a minimum or maximum value for the y-axis visualization setting (rather than requiring both). +- New `csv2lp` library for converting CSV (comma separated values) to InfluxDB line protocol. +- Add influxdb version to the InfluxDB v2 API `/health` endpoint. + +### Bug Fixes + +- Automatically adjust the drop-down list width to ensure the longest item in a list is visible. +- Fix bug in Graph + Single Stat visualizations to ensure `timeFormat` persists. +- Authorizer now exposes the full permission set. This adds the ability to derive which organizations the Authorizer has access to read or write to without using a User Request Management (URM) service. +- Fix issue causing variable selections to hydrate all variable values, decreasing the impact on network requests. +- Resolve scrollbar issues to ensure datasets are visible and scrollable. +- Check status now displays a warning if loading a large amount. + ## v2.0.0-beta.10 [2020-05-07] ### Features diff --git a/content/v2.0/reference/syntax/annotated-csv.md b/content/v2.0/reference/syntax/annotated-csv/_index.md similarity index 99% rename from content/v2.0/reference/syntax/annotated-csv.md rename to content/v2.0/reference/syntax/annotated-csv/_index.md index 9b1a8db49..0466536cb 100644 --- a/content/v2.0/reference/syntax/annotated-csv.md +++ b/content/v2.0/reference/syntax/annotated-csv/_index.md @@ -1,6 +1,5 @@ --- -title: Annotated CSV syntax -list_title: Annotated CSV +title: Annotated CSV description: > InfluxDB and Flux return query results in annotated CSV format. You can also read annotated CSV directly from Flux with the `csv.from()` function @@ -9,10 +8,12 @@ weight: 103 menu: v2_0_ref: parent: Syntax - name: Annotated CSV v2.0/tags: [csv, syntax] aliases: - /v2.0/reference/annotated-csv/ +related: + - /v2.0/reference/flux/stdlib/csv/from/ + - /v2.0/reference/syntax/annotated-csv/extended/ --- InfluxDB and Flux return query results in annotated CSV format. diff --git a/content/v2.0/reference/syntax/annotated-csv/extended.md b/content/v2.0/reference/syntax/annotated-csv/extended.md new file mode 100644 index 000000000..9fe12efbd --- /dev/null +++ b/content/v2.0/reference/syntax/annotated-csv/extended.md @@ -0,0 +1,366 @@ +--- +title: Extended annotated CSV +description: > + Extended annotated CSV provides additional annotations and options that specify + how CSV data should be converted to [line protocol](/v2.0/reference/syntax/line-protocol/) + and written to InfluxDB. +menu: + v2_0_ref: + name: Extended annotated CSV + parent: Annotated CSV +weight: 201 +v2.0/tags: [csv, syntax, write] +related: + - /v2.0/write-data/csv/ + - /v2.0/reference/cli/influx/write/ + - /v2.0/reference/syntax/line-protocol/ + - /v2.0/reference/syntax/annotated-csv/ +--- + +**Extended annotated CSV** provides additional annotations and options that specify +how CSV data should be converted to [line protocol](/v2.0/reference/syntax/line-protocol/) +and written to InfluxDB. +InfluxDB uses the [`csv2lp` library](https://github.com/influxdata/influxdb/tree/master/pkg/csv2lp) +to convert CSV into line protocol. +Extended annotated CSV supports all [Annotated CSV](/v2.0/reference/syntax/annotated-csv/) +annotations. + +{{% warn %}} +The Flux [`csv.from` function](/v2.0/reference/flux/stdlib/csv/from/) only supports +**annotated CSV**, not **extended annotated CSV**. +{{% /warn %}} + +To write data to InfluxDB, line protocol must include the following: + +- [measurement](/v2.0/reference/syntax/line-protocol/#measurement) +- [field set](/v2.0/reference/syntax/line-protocol/#field-set) +- [timestamp](/v2.0/reference/syntax/line-protocol/#timestamp) _(Optional but recommended)_ +- [tag set](/v2.0/reference/syntax/line-protocol/#tag-set) _(Optional)_ + +Extended CSV annotations identify the element of line protocol a column represents. + +## CSV Annotations +Extended annotated CSV extends and adds the following annotations: + +- [datatype](#datatype) +- [constant](#constant) +- [timezone](#timezone) + +### datatype +Use the `#datatype` annotation to specify the [line protocol element](/v2.0/reference/syntax/line-protocol/#elements-of-line-protocol) +a column represents. +To explicitly define a column as a **field** of a specific data type, use the field +type in the annotation (for example: `string`, `double`, `long`, etc.). + +| Data type | Resulting line protocol | +|:---------- |:----------------------- | +| [measurement](#measurement) | Column is the **measurement** | +| [tag](#tag) | Column is a **tag** | +| [dateTime](#datetime) | Column is the **timestamp** | +| [field](#field) | Column is a **field** | +| [ignored](#ignored) | Column is ignored | +| [string](#string) | Column is a **string field** | +| [double](#double) | Column is a **float field** | +| [long](#long) | Column is an **integer field** | +| [unsignedLong](#unsignedlong) | Column is an **unsigned integer field** | +| [boolean](#boolean) | Column is a **boolean field** | + +#### measurement +Indicates the column is the **measurement**. + +#### tag +Indicates the column is a **tag**. +The **column label** is the **tag key**. +The **column value** is the **tag value**. + +#### dateTime +Indicates the column is the **timestamp**. +`time` is an alias for `dateTime`. +If the [timestamp format](#supported-timestamp-formats) includes a time zone, +the parsed timestamp includes the time zone offset. +By default, all timestamps are UTC. +You can also use the [`#timezone` annotation](#timezone) to adjust timestamps to +a specific time zone. + +{{% note %}} +There can only be **one** `dateTime` column. +{{% /note %}} + +The `influx write` command converts timestamps to [Unix timestamps](/v2.0/reference/glossary/#unix-timestamp). +Append the timestamp format to the `dateTime` datatype with (`:`). + +```csv +#datatype dateTime:RFC3339 +#datatype dateTime:RFC3339Nano +#datatype dateTime:number +#datatype dateTime:2006-01-02 +``` + +##### Supported timestamp formats + +| Timestamp format | Description | Example | +|:---------------- |:----------- |:------- | +| **RFC3339** | RFC3339 timestamp | `2020-01-01T00:00:00Z` | +| **RFC3339Nano** | RFC3339 timestamp | `2020-01-01T00:00:00.000000000Z` | +| **number** | Unix timestamp | `1577836800000000000` | + +{{% note %}} +If using the `number` timestamp format and timestamps are **not in nanoseconds**, +use the [`influx write --precision` flag](/v2.0/reference/cli/influx/write/#flags) +to specify the [timestamp precision](/v2.0/reference/glossary/#precision). +{{% /note %}} + +##### Custom timestamp formats +To specify a custom timestamp format, use timestamp formats as described in the +[Go time package](https://golang.org/pkg/time). +For example: `2020-01-02`. + +#### field +Indicates the column is a **field**. +The **column label** is the **field key**. +The **column value** is the **field value**. + +{{% note %}} +With the `field` datatype, field values are copies **as-is** to line protocol. +For information about line protocol values and how they are written to InfluxDB, +see [Line protocol data types and formats](/v2.0/reference/syntax/line-protocol/#data-types-and-format). +We generally recommend specifying the [field type](#field-types) in annotations. +{{% /note %}} + +#### ignored +The column is ignored and not written to InfluxDB. + +#### Field types +The column is a **field** of a specified type. +The **column label** is the **field key**. +The **column value** is the **field value**. + +- [string](#string) +- [double](#double) +- [long](#long) +- [unsignedLong](#unsignedlong) +- [boolean](#boolean) + +##### string +Column is a **[string](/v2.0/reference/glossary/#string) field**. + +##### double +Column is a **[float](/v2.0/reference/glossary/#float) field**. +By default, InfluxDB expects float values that use a period (`.`) to separate the +fraction from the whole number. +If column values include or use other separators, such as commas (`,`) to visually +separate large numbers into groups, specify the following **float separators**: + +- **fraction separator**: Separates the fraction from the whole number. +- **ignored separator**: Visually separates the whole number into groups but ignores + the separator when parsing the float value. + +Use the following syntax to specify **float separators**: + +```sh +# Syntax + + +# Example +., + +# With the float separators above +# 1,200,000.15 => 1200000.15 +``` + +Append **float separators** to the `double` datatype annotation with a colon (`:`). +For example: + +``` +#datatype "double:.," +``` + +{{% note %}} +If your **float separators** include a comma (`,`), wrap the column annotation in double +quotes (`""`) to prevent the comma from being parsed as a column separator or delimiter. +You can also [define a custom column separator](#define-custom-column-separator). +{{% /note %}} + +##### long +Column is an **[integer](/v2.0/reference/glossary/#integer) field**. +If column values contain separators such as periods (`.`) or commas (`,`), specify +the following **integer separators**: + +- **fraction separator**: Separates the fraction from the whole number. + _**Integer values are truncated at the fraction separator when converted to line protocol.**_ +- **ignored separator**: Visually separates the whole number into groups but ignores + the separator when parsing the integer value. + +Use the following syntax to specify **integer separators**: + +```sh +# Syntax + + +# Example +., + +# With the integer separators above +# 1,200,000.00 => 1200000i +``` + +Append **integer separators** to the `long` datatype annotation with a colon (`:`). +For example: + +``` +#datatype "long:.," +``` + +{{% note %}} +If your **integer separators** include a comma (`,`), wrap the column annotation in double +quotes (`""`) to prevent the comma from being parsed as a column separator or delimiter. +You can also [define a custom column separator](#define-custom-column-separator). +{{% /note %}} + +##### unsignedLong +Column is an **[unsigned integer (uinteger)](/v2.0/reference/glossary/#unsigned-integer) field**. +If column values contain separators such as periods (`.`) or commas (`,`), specify +the following **uinteger separators**: + +- **fraction separator**: Separates the fraction from the whole number. + _**Uinteger values are truncated at the fraction separator when converted to line protocol.**_ +- **ignored separator**: Visually separates the whole number into groups but ignores + the separator when parsing the uinteger value. + +Use the following syntax to specify **uinteger separators**: + +```sh +# Syntax + + +# Example +., + +# With the uinteger separators above +# 1,200,000.00 => 1200000u +``` + +Append **uinteger separators** to the `long` datatype annotation with a colon (`:`). +For example: + +``` +#datatype "usignedLong:.," +``` + +{{% note %}} +If your **uinteger separators** include a comma (`,`), wrap the column annotation in double +quotes (`""`) to prevent the comma from being parsed as a column separator or delimiter. +You can also [define a custom column separator](#define-custom-column-separator). +{{% /note %}} + +##### boolean +Column is a **[boolean](/v2.0/reference/glossary/#boolean) field**. +If column values are not [supported boolean values](/v2.0/reference/syntax/line-protocol/#boolean), +specify the **boolean format** with the following syntax: + +```sh +# Syntax +: + +# Example +y,Y,1:n,N,0 + +# With the boolean format above +# y => true, Y => true, 1 => true +# n => false, N => false, 0 => false +``` + +Append the **boolean format** to the `boolean` datatype annotation with a colon (`:`). +For example: + +``` +#datatype "boolean:y,Y:n,N" +``` + +{{% note %}} +If your **boolean format** contains commas (`,`), wrap the column annotation in double +quotes (`""`) to prevent the comma from being parsed as a column separator or delimiter. +You can also [define a custom column separator](#define-custom-column-separator). +{{% /note %}} + +### constant +Use the `#constant` annotation to define a constant column label and value for each row. +The `#constant` annotation provides a way to supply +[line protocol elements](/v2.0/reference/syntax/line-protocol/#elements-of-line-protocol) +that don't exist in the CSV data. + +Use the following syntax to define constants: + +``` +#constant ,, +``` + +To provide multiple constants, include each `#constant` annotations on a separate line. + +``` +#constant measurement,m +#constant tag,dataSource,csv +``` + +{{% note %}} +For constants with `measurement` and `dateTime` datatypes, the second value in +the constant definition is the **column-value**. +{{% /note %}} + +### timezone +Use the `#timezone` annotation to update timestamps to a specific timezone. +By default, timestamps are parsed as UTC. +Use the `±HHmm` format to specify the timezone offset relative to UTC. + +##### Timezone examples +| Timezone | Offset | +|:-------- | ------: | +| US Mountain Daylight Time | `-0600` | +| Central European Summer Time | `+0200` | +| Australia Eastern Standard Time | `+1000` | +| Apia Daylight Time | `+1400` | + +##### Timezone annotation example +``` +#timezone -0600 +``` + +## Define custom column separator +If columns are delimited using a character other than a comma, use the `sep` +keyword to define a custom separator **in the first line of your CSV file**. + +``` +sep=; +``` + +## Annotation shorthand +Extended annotated CSV supports **annotation shorthand**. +Include the column label, datatype, and _(optional)_ default value in each column +header row using the following syntax: + +``` +|| +``` + +##### Example annotation shorthand +``` +m|measurement,location|tag|Hong Kong,temp|double,pm|long|0,time|dateTime:RFC3339 +weather,San Francisco,51.9,38,2020-01-01T00:00:00Z +weather,New York,18.2,,2020-01-01T00:00:00Z +weather,,53.6,171,2020-01-01T00:00:00Z +``` + +##### The shorthand explained +- The `m` column represents the **measurement** and has no default value. +- The `location` column is a **tag** with the default value, `Hong Kong`. +- The `temp` column is a **field** with **float** (`double`) values and no default value. +- The `pm` column is a **field** with **integer** (`long`) values and a default of `0`. +- The `time` column represents the **timestamp**, uses the **RFC3339** timestamp format, + and has no default value. + +##### Resulting line protocol +``` +weather,location=San\ Francisco temp=51.9,pm=38i 1577836800000000000 +weather,location=New\ York temp=18.2,pm=0i 1577836800000000000 +weather,location=Hong\ Kong temp=53.6,pm=171i 1577836800000000000 +``` diff --git a/content/v2.0/reference/urls.md b/content/v2.0/reference/urls.md index 97c8d9f41..738cd6b58 100644 --- a/content/v2.0/reference/urls.md +++ b/content/v2.0/reference/urls.md @@ -28,4 +28,4 @@ Use the URLs below to interact with your InfluxDB Cloud instances with the [InfluxDB API](/v2.0/reference/api/), [InfluxDB client libraries](/v2.0/reference/api/client-libraries/), [`influx` CLI](/v2.0/reference/cli/influx/), or [Telegraf](/v2.0/write-data/use-telegraf/). -{{< cloud_urls >}} +{{< cloud_regions >}} diff --git a/content/v2.0/visualize-data/dashboards/control-dashboard.md b/content/v2.0/visualize-data/dashboards/control-dashboard.md index f83059933..1e69d4454 100644 --- a/content/v2.0/visualize-data/dashboards/control-dashboard.md +++ b/content/v2.0/visualize-data/dashboards/control-dashboard.md @@ -47,11 +47,13 @@ Click the refresh button (**{{< icon "refresh" >}}**) to manually refresh the da 1. Select from the time range options in the dropdown menu. -{{< img-hd src="/img/2-0-controls-time-range.png" alt="Select time range" />}} + {{< img-hd src="/img/2-0-controls-time-range.png" alt="Select time range" />}} 2. Select **Custom Time Range** to enter a custom time range with precision up to nanoseconds. The default time range is 5 minutes. + > The custom time range uses the selected timezone (local time or UTC). + ### Add variables Click **Variables** to display variables available for your dashboard. For details, see [Use and manage variables](/v2.0/visualize-data/variables/) diff --git a/content/v2.0/visualize-data/explore-metrics.md b/content/v2.0/visualize-data/explore-metrics.md index ac4116aa5..e009259ca 100644 --- a/content/v2.0/visualize-data/explore-metrics.md +++ b/content/v2.0/visualize-data/explore-metrics.md @@ -46,11 +46,9 @@ See [Get started with Flux](/v2.0/query-data/get-started) to learn more about Fl ## Visualize your query -Select from available [visualization types](/v2.0/visualize-data/visualization-types/) or enable the **View Raw Data** option to view all of your query's results. +- Select an available [visualization types](/v2.0/visualize-data/visualization-types/) from the dropdown menu in the upper-left: -Select a visualization type from the dropdown menu in the upper-left. - - {{< img-hd src="/img/2-0-visualization-dropdown.png" title="Visualization dropdown" />}} + {{< img-hd src="/img/2-0-visualizations-dropdown.png" title="Visualization dropdown" />}} ## Control your dashboard cell @@ -86,6 +84,8 @@ Click the refresh button ({{< icon "refresh" >}}) to manually refresh the dashbo 2. Select **Custom Time Range** to enter a custom time range with precision up to nanoseconds. The default time range is 5m. +> The custom time range uses the selected timezone (local time or UTC). + ### Query Builder or Script Editor Click **Query Builder** to use the builder to create a Flux query. Click **Script Editor** to manually edit the query. diff --git a/content/v2.0/visualize-data/visualization-types/graph-single-stat.md b/content/v2.0/visualize-data/visualization-types/graph-single-stat.md index ca5a90da9..1e704558f 100644 --- a/content/v2.0/visualize-data/visualization-types/graph-single-stat.md +++ b/content/v2.0/visualize-data/visualization-types/graph-single-stat.md @@ -55,7 +55,7 @@ the visualization dropdown. - **Y Tick Suffix**: Suffix to be added to y-value. - **Y Axis Domain**: The y-axis value range. - **Auto**: Automatically determine the value range based on values in the data set. - - **Custom**: Manually specify the value range of the y-axis. + - **Custom**: Manually specify the minimum y-axis value, maximum y-axis value, or range by including both. - **Min**: Minimum y-axis value. - **Max**: Maximum y-axis value. - **Positioning**: diff --git a/content/v2.0/visualize-data/visualization-types/graph.md b/content/v2.0/visualize-data/visualization-types/graph.md index fc41435d7..cc60a5e03 100644 --- a/content/v2.0/visualize-data/visualization-types/graph.md +++ b/content/v2.0/visualize-data/visualization-types/graph.md @@ -48,7 +48,7 @@ the visualization dropdown. - **Y Tick Suffix**: Suffix to be added to y-value. - **Y Axis Domain**: The y-axis value range. - **Auto**: Automatically determine the value range based on values in the data set. - - **Custom**: Manually specify the value range of the y-axis. + - **Custom**: Manually specify the minimum y-axis value, maximum y-axis value, or range by including both. - **Min**: Minimum y-axis value. - **Max**: Maximum y-axis value. - **Positioning**: diff --git a/content/v2.0/visualize-data/visualization-types/heatmap.md b/content/v2.0/visualize-data/visualization-types/heatmap.md index 99cf8fa7a..a49e12319 100644 --- a/content/v2.0/visualize-data/visualization-types/heatmap.md +++ b/content/v2.0/visualize-data/visualization-types/heatmap.md @@ -46,7 +46,7 @@ the visualization dropdown. - **X Tick Suffix**: Suffix to be added to x-value. - **X Axis Domain**: The x-axis value range. - **Auto**: Automatically determine the value range based on values in the data set. - - **Custom**: Manually specify the value range of the x-axis. + - **Custom**: Manually specify the minimum y-axis value, maximum y-axis value, or range by including both. - **Min**: Minimum x-axis value. - **Max**: Maximum x-axis value. @@ -56,7 +56,7 @@ the visualization dropdown. - **Y Tick Suffix**: Suffix to be added to y-value. - **Y Axis Domain**: The y-axis value range. - **Auto**: Automatically determine the value range based on values in the data set. - - **Custom**: Manually specify the value range of the y-axis. + - **Custom**: Manually specify the minimum y-axis value, maximum y-axis value, or range by including both. - **Min**: Minimum y-axis value. - **Max**: Maximum y-axis value. diff --git a/content/v2.0/visualize-data/visualization-types/scatter.md b/content/v2.0/visualize-data/visualization-types/scatter.md index 87c5374dc..89aa1dcd7 100644 --- a/content/v2.0/visualize-data/visualization-types/scatter.md +++ b/content/v2.0/visualize-data/visualization-types/scatter.md @@ -48,7 +48,7 @@ the visualization dropdown. - **Y Tick Suffix**: Suffix to be added to y-value. - **Y Axis Domain**: The y-axis value range. - **Auto**: Automatically determine the value range based on values in the data set. - - **Custom**: Manually specify the value range of the y-axis. + - **Custom**: Manually specify the minimum y-axis value, maximum y-axis value, or range by including both. - **Min**: Minimum y-axis value. - **Max**: Maximum y-axis value. diff --git a/content/v2.0/write-data/_index.md b/content/v2.0/write-data/_index.md index e94db17ea..b5515ec42 100644 --- a/content/v2.0/write-data/_index.md +++ b/content/v2.0/write-data/_index.md @@ -3,7 +3,7 @@ title: Write data to InfluxDB list_title: Write data description: > Collect and write time series data to InfluxDB using line protocol, Telegraf, data scrapers, - the InfluxDB v2 API, `influx` CLI, the InfluxDB UI, and client libaries. + the InfluxDB v2 API, `influx` CLI, the InfluxDB UI, client libraries, and third-party technologies. weight: 2 menu: v2_0: @@ -19,13 +19,14 @@ related: Collect and write time series data to InfluxDB using [line protocol](/v2.0/reference/syntax/line-protocol), Telegraf, data scrapers, the InfluxDB v2 API, `influx` command line interface (CLI), -the InfluxDB user interface (UI), and client libraries. +the InfluxDB user interface (UI), client libraries, and third-party technologies. - [What you'll need](#what-you-ll-need) - [Ways to write data into InfluxDB](#ways-to-write-data-into-influxdb) - [User Interface](#user-interface) - [influx CLI](#influx-cli) - [InfluxDB API](#influxdb-api) + - [Third-party technologies (with native line protocol support)](#third-party-technologies) - [Other ways to write data](#other-ways-to-write-data) - [Next steps](#next-steps) @@ -57,6 +58,7 @@ mem,host=host1 used_percent=21.83599203 1556892777007291000 ``` #### Timestamp precision + When writing data to InfluxDB, we [recommend including a timestamp](/v2.0/reference/syntax/line-protocol/#timestamp) with each point. If a data point does not include a timestamp when it is received by the database, InfluxDB uses the current system time (UTC) of its host machine. @@ -234,6 +236,64 @@ mem,host=host2 used_percent=27.18294630 1556896336 _For information about **InfluxDB API response codes**, see [InfluxDB API Write documentation](/v2.0/api/#operation/PostWrite)._ +### Third-party technologies + +A number of third-party technologies can be configured to send line protocol directly to InfluxDB. + +If you're using any of the following technologies, check out the handy links below to configure these technologies to write data to InfluxDB (**no additional software to download or install**): + +- (Write metrics only) [Vector 0.9 or later](#configure-vector) + +- [Apache NiFi 1.8 or later](#configure-apache-nifi) + +- [OpenHAB 3.0 or later](#configure-openhab) + +- [Apache JMeter 5.2 or later](#configure-apache-jmeter) + +- [FluentD 1.x or later](#configure-fluentd) + +#### Configure Vector + +1. On the Vector.dev docs site, see the [InfluxDB Metrics Sink](https://vector.dev/docs/reference/sinks/influxdb_metrics/) page. +2. Under **Configuration**, click **v2** to view configuration settings. +3. Scroll down to [How It Works](https://vector.dev/docs/reference/sinks/influxdb_metrics/#how-it-works) for more detail. + +#### Configure Apache NiFi + +See the _[InfluxDB Processors for Apache NiFi Readme](https://github.com/influxdata/nifi-influxdb-bundle#influxdb-processors-for-apache-nifi)_ for details. + +#### Configure OpenHAB + +See the _[InfluxDB Persistence Readme](https://github.com/openhab/openhab-addons/tree/master/bundles/org.openhab.persistence.influxdb)_ for details. + +#### Configure Apache JMeter + + + +To configure Apache JMeter, complete the following steps in InfluxDB and JMeter. + +##### In InfluxDB + +1. [Find the name of your organization](https://v2.docs.influxdata.com/v2.0/organizations/view-orgs/) (needed to create a bucket and token). +2. [Create a bucket using the influx CLI](https://v2.docs.influxdata.com/v2.0/organizations/buckets/create-bucket/#create-a-bucket-using-the-influx-cli) and name it `jmeter`. +3. [Create a token](https://v2.docs.influxdata.com/v2.0/security/tokens/create-token/). + +##### In JMeter + +1. Create a [Backend Listener](https://jmeter.apache.org/usermanual/component_reference.html#Backend_Listener) using the _InfluxDBBackendListenerClient_ implementation. +2. In the **Backend Listener implementation** field, enter _org.apache.jmeter.visualizers.backend.influxdb.influxdbBackendListenerClient_ +3. Under **Parameters**, specify the following: + - **influxdbMetricsSender**: _org.apache.jmeter.visualizers.backend.influxdb.HttpMetricsSender_ + - **influxdbUrl**: _http://localhost:9999/api/v2/write?org=my-org&bucket=jmeter_ (include the bucket and org you created in InfluxDB) + - **application**: _InfluxDB2_ + - **influxdbToken**: _my-token_ (include the token you created in InfluxDB) + - Include additional parameters as needed. +4. Click **Add** to add the _InfluxDBBackendListenerClient_ implementation. + +#### Configure FluentD + +See the _[influxdb-plugin-fluent Readme](https://github.com/influxdata/influxdb-plugin-fluent)_ for details. + ## Other ways to write data {{< children >}} diff --git a/content/v2.0/write-data/csv.md b/content/v2.0/write-data/csv.md new file mode 100644 index 000000000..9d0f2e51a --- /dev/null +++ b/content/v2.0/write-data/csv.md @@ -0,0 +1,493 @@ +--- +title: Write CSV data to InfluxDB +description: > + Use the [`influx write` command](/v2.0/reference/cli/influx/write/) to write CSV data + to InfluxDB. Include annotations with the CSV data to determine how the data translates + into [line protocol](/v2.0/reference/syntax/line-protocol/). +menu: + v2_0: + name: Write CSV data + parent: Write data +weight: 104 +related: + - /v2.0/reference/syntax/line-protocol/ + - /v2.0/reference/syntax/annotated-csv/ + - /v2.0/reference/cli/influx/write/ +--- + +Use the [`influx write` command](/v2.0/reference/cli/influx/write/) to write CSV data +to InfluxDB. Include [Extended annotated CSV](/v2.0/reference/syntax/annotated-csv/extended/) +annotations to specify how the data translates into [line protocol](/v2.0/reference/syntax/line-protocol/). +Include annotations in the CSV file or inject them using the `--header` flag of +the `influx write` command. + +##### On this page +- [CSV Annotations](#csv-annotations) +- [Inject annotation headers](#inject-annotation-headers) +- [Skip annotation headers](#skip-annotation-headers) +- [Process input as CSV](#process-input-as-csv) +- [Specify CSV character encoding](#specify-csv-character-encoding) +- [Skip rows with errors](#skip-rows-with-errors) +- [Advanced examples](#advanced-examples) + +##### Example write command +```sh +influx write -b example-bucket -f path/to/example.csv +``` + +##### example.csv +``` +#datatype measurement,tag,float,dateTime:RFC3339 +m,host,used_percent,time +mem,host1,64.23,2020-01-01T00:00:00Z +mem,host2,72.01,2020-01-01T00:00:00Z +mem,host1,62.61,2020-01-01T00:00:10Z +mem,host2,72.98,2020-01-01T00:00:10Z +mem,host1,63.40,2020-01-01T00:00:20Z +mem,host2,73.77,2020-01-01T00:00:20Z +``` + +##### Resulting line protocol +``` +mem,host=host1 used_percent=64.23 1577836800000000000 +mem,host=host2 used_percent=72.01 1577836800000000000 +mem,host=host1 used_percent=62.61 1577836810000000000 +mem,host=host2 used_percent=72.98 1577836810000000000 +mem,host=host1 used_percent=63.40 1577836820000000000 +mem,host=host2 used_percent=73.77 1577836820000000000 +``` + +{{% note %}} +To test the CSV to line protocol conversion process, use the `influx write dryrun` +command to print the resulting line protocol to stdout rather than write to InfluxDB. +{{% /note %}} + +## CSV Annotations +Use **CSV annotations** to specify which element of line protocol each CSV column +represents and how to format the data. CSV annotations are rows at the beginning +of a CSV file that describe column properties. + +The `influx write` command supports [Extended annotated CSV](/v2.0/reference/syntax/annotated-csv/extended) +which provides options for specifying how CSV data should be converted into line +protocol and how data is formatted. + +To write data to InfluxDB, data must include the following: + +- [measurement](/v2.0/reference/syntax/line-protocol/#measurement) +- [field set](/v2.0/reference/syntax/line-protocol/#field-set) +- [timestamp](/v2.0/reference/syntax/line-protocol/#timestamp) _(Optional but recommended)_ +- [tag set](/v2.0/reference/syntax/line-protocol/#tag-set) _(Optional)_ + +Use CSV annotations to specify which of these elements each column represents. + +## Write raw query results back to InfluxDB +Flux returns query results in [Annotated CSV](/v2.0/reference/syntax/annotated-csv/). +These results include all annotations necessary to write the data back to InfluxDB. + +## Inject annotation headers +If the CSV data you want to write to InfluxDB does not contain the annotations +required to properly convert the data to line protocol, use the `--header` flag +to inject annotation rows into the CSV data. + +```sh +influx write -b example-bucket \ + -f path/to/example.csv \ + --header "#constant measurement,birds" \ + --header "#datatype dataTime:2006-01-02,long,tag" +``` + +{{< flex >}} +{{% flex-content %}} +##### example.csv +``` +date,sighted,loc +2020-01-01,12,Boise +2020-06-01,78,Boise +2020-01-01,54,Seattle +2020-06-01,112,Seattle +2020-01-01,9,Detroit +2020-06-01,135,Detroit +``` +{{% /flex-content %}} +{{% flex-content %}} +##### Resulting line protocol +``` +birds,loc=Boise sighted=12 1577836800000000000 +birds,loc=Boise sighted=78 1590969600000000000 +birds,loc=Seattle sighted=54 1577836800000000000 +birds,loc=Seattle sighted=112 1590969600000000000 +birds,loc=Detroit sighted=9 1577836800000000000 +birds,loc=Detroit sighted=135 1590969600000000000 +``` +{{% /flex-content %}} +{{< /flex >}} + +#### Use files to inject headers +The `influx write` command supports importing multiple files in a single command. +Include annotations and header rows in their own file and import them with the write command. +Files are read in the order in which they're provided. + +```sh +influx write -b example-bucket \ + -f path/to/headers.csv \ + -f path/to/example.csv +``` + +{{< flex >}} +{{% flex-content %}} +##### headers.csv +``` +#constant measurement,birds +#datatype dataTime:2006-01-02,long,tag +``` +{{% /flex-content %}} +{{% flex-content %}} +##### example.csv +``` +date,sighted,loc +2020-01-01,12,Boise +2020-06-01,78,Boise +2020-01-01,54,Seattle +2020-06-01,112,Seattle +2020-01-01,9,Detroit +2020-06-01,135,Detroit +``` +{{% /flex-content %}} +{{< /flex >}} + +##### Resulting line protocol +``` +birds,loc=Boise sighted=12 1577836800000000000 +birds,loc=Boise sighted=78 1590969600000000000 +birds,loc=Seattle sighted=54 1577836800000000000 +birds,loc=Seattle sighted=112 1590969600000000000 +birds,loc=Detroit sighted=9 1577836800000000000 +birds,loc=Detroit sighted=135 1590969600000000000 +``` + +## Skip annotation headers +Some CSV data may include header rows that conflict with or lack the annotations +necessary to write CSV data to InfluxDB. +Use the `--skipHeader` flag to specify the **number of rows to skip** at the +beginning of the CSV data. + +```sh +influx write -b example-bucket \ + -f path/to/example.csv \ + --skipHeader=2 +``` + +You can then [inject new header rows](#inject-annotation-headers) to rename columns +and provide the necessary annotations. + +## Process input as CSV +The `influx write` command automatically processes files with the `.csv` extension as CSV files. +If your CSV file uses a different extension, use the `--format` flat to explicitly +declare the format of the input file. + +```sh +influx write -b example-bucket \ + -f path/to/example.txt \ + --format csv +``` + +{{% note %}} +The `influx write` command assumes all input files are line protocol unless they +include the `.csv` extension or you declare the `csv`. +{{% /note %}} + +## Specify CSV character encoding +The `influx write` command assumes CSV files contain UTF-8 encoded characters. +If your CSV data uses different character encoding, specify the encoding +with the `--encoding`. + +```sh +influx write -b example-bucket \ + -f path/to/example.csv \ + --encoding "UTF-16" +``` + +## Skip rows with errors +If a row in your CSV data is missing an +[element required to write to InfluxDB](/v2.0/reference/syntax/line-protocol/#elements-of-line-protocol) +or data is incorrectly formatted, when processing the row, the `influx write` command +returns an error and cancels the write request. +To skip rows with errors, use the `--skipRowOnError` flag. + +```sh +influx write -b example-bucket \ + -f path/to/example.csv \ + --skipRowOnError +``` + +{{% warn %}} +Skipped rows are ignored and are not written to InfluxDB. +{{% /warn %}} + +## Advanced examples + +- [Define constants](#define-constants) +- [Annotation shorthand](#annotation-shorthand) +- [Use alternate numeric formats](#use-alternate-numeric-formats) +- [Use alternate boolean format](#use-alternate-boolean-format) +- [Use different timestamp formats](#use-different-timestamp-formats) + +--- + +### Define constants +Use the Extended annotated CSV [`#constant` annotation](/v2.0/reference/syntax/annotated-csv/extended/#constant) +to add a column and value to each row in the CSV data. + +{{< flex >}} +{{% flex-content %}} +##### CSV with constants +``` +#constant measurement,example +#constant tag,source,csv +#datatype long,dateTime:RFC3339 +count,time +1,2020-01-01T00:00:00Z +4,2020-01-02T00:00:00Z +9,2020-01-03T00:00:00Z +18,2020-01-04T00:00:00Z +``` +{{% /flex-content %}} +{{% flex-content %}} +##### Resulting line protocol +``` +example,source=csv count=1 1577836800000000000 +example,source=csv count=4 1577923200000000000 +example,source=csv count=9 1578009600000000000 +example,source=csv count=18 1578096000000000000 +``` +{{% /flex-content %}} +{{< /flex >}} + +--- + +### Annotation shorthand +Extended annotated CSV supports [annotation shorthand](/v2.0/reference/syntax/annotated-csv/extended/#annotation-shorthand), +which lets you define the **column label**, **datatype**, and **default value** in the column header. + +{{< flex >}} +{{% flex-content %}} +##### CSV with annotation shorthand +``` +m|measurement,count|long|0,time|dateTime:RFC3339 +example,1,2020-01-01T00:00:00Z +example,4,2020-01-02T00:00:00Z +example,,2020-01-03T00:00:00Z +example,18,2020-01-04T00:00:00Z +``` +{{% /flex-content %}} +{{% flex-content %}} +##### Resulting line protocol +``` +example count=1 1577836800000000000 +example count=4 1577923200000000000 +example count=0 1578009600000000000 +example count=18 1578096000000000000 +``` +{{% /flex-content %}} +{{< /flex >}} + +#### Replace column header with annotation shorthand +It's possible to replace the column header row in a CSV file with annotation +shorthand without modifying the CSV file. +This lets you define column data types and default values while writing to InfluxDB. + +To replace an existing column header row with annotation shorthand: + +1. Use the `--skipHeader` flag to ignore the existing column header row. +2. Use the `--header` flag to inject a new column header row that uses annotation shorthand. + +{{% note %}} +`--skipHeader` is the same as `--skipHeader=1`. +{{% /note %}} + +```sh +influx write -b example-bucket \ + -f example.csv \ + --skipHeader + --header="m|measurement,count|long|0,time|dateTime:RFC3339" +``` + +{{< flex >}} +{{% flex-content %}} +##### Unmodified example.csv +``` +m,count,time +example,1,2020-01-01T00:00:00Z +example,4,2020-01-02T00:00:00Z +example,,2020-01-03T00:00:00Z +example,18,2020-01-04T00:00:00Z +``` +{{% /flex-content %}} +{{% flex-content %}} +##### Resulting line protocol +``` +example count=1 1577836800000000000 +example count=4 1577923200000000000 +example count=0 1578009600000000000 +example count=18 1578096000000000000 +``` +{{% /flex-content %}} +{{< /flex >}} + +--- + +### Use alternate numeric formats +If your CSV data contains numeric values that use a non-default fraction separator (`.`) +or contain group separators, [define your numeric format](/v2.0/reference/syntax/annotated-csv/extended/#double) +in the `double`, `long`, and `unsignedLong` datatype annotations. + +{{% note %}} +If your **numeric format separators** include a comma (`,`), wrap the column annotation in double +quotes (`""`) to prevent the comma from being parsed as a column separator or delimiter. +You can also [define a custom column separator](##################). +{{% /note %}} + +{{< tabs-wrapper >}} +{{% tabs %}} +[Floats](#) +[Integers](#) +[Uintegers](#) +{{% /tabs %}} +{{% tab-content %}} +{{< flex >}} +{{% flex-content %}} +##### CSV with non-default float values +``` +#datatype measurement,"double:.,",dateTime:RFC3339 +m,lbs,time +example,"1,280.7",2020-01-01T00:00:00Z +example,"1,352.5",2020-01-02T00:00:00Z +example,"1,862.8",2020-01-03T00:00:00Z +example,"2,014.9",2020-01-04T00:00:00Z +``` +{{% /flex-content %}} +{{% flex-content %}} +##### Resulting line protocol +``` +example lbs=1280.7 1577836800000000000 +example lbs=1352.5 1577923200000000000 +example lbs=1862.8 1578009600000000000 +example lbs=2014.9 1578096000000000000 +``` +{{% /flex-content %}} +{{< /flex >}} +{{% /tab-content %}} + +{{% tab-content %}} +{{< flex >}} +{{% flex-content %}} +##### CSV with non-default integer values +``` +#datatype measurement,"long:.,",dateTime:RFC3339 +m,lbs,time +example,"1,280.0",2020-01-01T00:00:00Z +example,"1,352.0",2020-01-02T00:00:00Z +example,"1,862.0",2020-01-03T00:00:00Z +example,"2,014.9",2020-01-04T00:00:00Z +``` +{{% /flex-content %}} +{{% flex-content %}} +##### Resulting line protocol +``` +example lbs=1280i 1577836800000000000 +example lbs=1352i 1577923200000000000 +example lbs=1862i 1578009600000000000 +example lbs=2014i 1578096000000000000 +``` +{{% /flex-content %}} +{{< /flex >}} +{{% /tab-content %}} + +{{% tab-content %}} +{{< flex >}} +{{% flex-content %}} +##### CSV with non-default uinteger values +``` +#datatype measurement,"unsignedLong:.,",dateTime:RFC3339 +m,lbs,time +example,"1,280.0",2020-01-01T00:00:00Z +example,"1,352.0",2020-01-02T00:00:00Z +example,"1,862.0",2020-01-03T00:00:00Z +example,"2,014.9",2020-01-04T00:00:00Z +``` +{{% /flex-content %}} +{{% flex-content %}} +##### Resulting line protocol +``` +example lbs=1280u 1577836800000000000 +example lbs=1352u 1577923200000000000 +example lbs=1862u 1578009600000000000 +example lbs=2014u 1578096000000000000 +``` +{{% /flex-content %}} +{{< /flex >}} +{{% /tab-content %}} +{{< /tabs-wrapper >}} + +--- + +### Use alternate boolean format +Line protocol supports only [specific boolean values](/v2.0/reference/syntax/line-protocol/#boolean). +If your CSV data contains boolean values that line protocol does not support, +[define your boolean format](/v2.0/reference/syntax/annotated-csv/extended/#boolean) +in the `boolean` datatype annotation. + +{{< flex >}} +{{% flex-content %}} +##### CSV with non-default boolean values +``` +sep=; +#datatype measurement,"boolean:y,Y,1:n,N,0",dateTime:RFC3339 +m,verified,time +example,y,2020-01-01T00:00:00Z +example,n,2020-01-02T00:00:00Z +example,1,2020-01-03T00:00:00Z +example,N,2020-01-04T00:00:00Z +``` +{{% /flex-content %}} +{{% flex-content %}} +##### Resulting line protocol +``` +example verified=true 1577836800000000000 +example verified=false 1577923200000000000 +example verified=true 1578009600000000000 +example verified=false 1578096000000000000 +``` +{{% /flex-content %}} +{{< /flex >}} + +--- + +### Use different timestamp formats +The `influx write` command automatically detects **RFC3339** and **number** formatted +timestamps when converting CSV to line protocol. +If using a different timestamp format, [define your timestamp format](/v2.0/reference/syntax/annotated-csv/extended/#datetime) +in the `dateTime` datatype annotation. + +{{< flex >}} +{{% flex-content %}} +##### CSV with non-default timestamps +``` +#datatype measurement,dateTime:2006-01-02,field +m,time,lbs +example,2020-01-01,1280.7 +example,2020-01-02,1352.5 +example,2020-01-03,1862.8 +example,2020-01-04,2014.9 +``` +{{% /flex-content %}} +{{% flex-content %}} +##### Resulting line protocol +``` +example lbs=1280.7 1577836800000000000 +example lbs=1352.5 1577923200000000000 +example lbs=1862.8 1578009600000000000 +example lbs=2014.9 1578096000000000000 +``` +{{% /flex-content %}} +{{< /flex >}} diff --git a/content/v2.0/write-data/sample-data/_index.md b/content/v2.0/write-data/sample-data/_index.md new file mode 100644 index 000000000..7893961b1 --- /dev/null +++ b/content/v2.0/write-data/sample-data/_index.md @@ -0,0 +1,49 @@ +--- +title: Sample data +description: > + Use sample data to familiarize yourself with time series data and InfluxDB. + InfluxData provides many sample time series datasets to use with InfluxDB + and InfluxDB Cloud. +menu: + v2_0: + parent: Write data +weight: 105 +--- + +Use sample data to familiarize yourself with time series data and InfluxDB. +InfluxData provides many sample time series datasets to use with **InfluxDB** and **InfluxDB Cloud**. + +{{< children hlevel="h2" >}} + +--- + +## Sample data sets +The following sample data sets are used as examples in [InfluxDB query guides](/v2.0/query-data/flux) +and can be used with **InfluxDB OSS** or **InfluxDB Cloud**. + +- [Air sensor sample data](#air-sensor-sample-data) +- [Bird migration sample data](#bird-migration-sample-data) + +### Air sensor sample data +Air sensor sample data represents an "Internet of Things" (IoT) use case by simulating +temperature, humidity, and carbon monoxide levels for multiple rooms in a building. +The dataset also includes a relational SQL dataset with meta information about sensors in each room. + + + View air sensor sample data + + +_Used in [Query SQL data sources](/v2.0/query-data/flux/sql/)._ + +### Bird migration sample data +Bird migration data is adapted from the +[Movebank: Animal Tracking data set on Kaggle](https://www.kaggle.com/pulkit8595/movebank-animal-tracking) +and represents animal migratory movements throughout 2019. +Use the [Flux Geo package](https://v2.docs.influxdata.com/v2.0/reference/flux/stdlib/experimental/geo/#geo-schema-requirements) +to query and analyze the geo-temporal data in this sample data set. + + + View bird migration sample data + + +_Used in [Work with geo-temporal data](/v2.0/query-data/flux/geo/)._ diff --git a/content/v2.0/write-data/sample-data/demo-data.md b/content/v2.0/write-data/sample-data/demo-data.md new file mode 100644 index 000000000..2e98e3977 --- /dev/null +++ b/content/v2.0/write-data/sample-data/demo-data.md @@ -0,0 +1,63 @@ +--- +title: InfluxDB Cloud demo data +description: > + Use **InfluxDB Cloud** demo data buckets for quick, **free** access to different types of sample data. +menu: + v2_0: + name: Demo data + parent: Sample data +weight: 201 +v2.0/tags: [sample data] +products: [cloud] +--- + +Use **InfluxDB Cloud** demo data buckets for quick and easy access to different +types of demo data that let you explore and familiarize yourself with InfluxDB Cloud. + +- [Add a demo data bucket](#add-a-demo-data-bucket) +- [Explore demo data](#explore-demo-data) +- [View demo data dashboards](#view-demo-data-dashboards) + +{{% note %}} +#### Free to use and read-only +- InfluxDB Cloud demo data buckets are **free to use** and are **_not_ subject to + [Free Plan](/v2.0/account-management/pricing-plans/#free-plan) rate limits**. +- Demo data buckets are **read-only**. You cannot write data into demo data buckets. +{{% /note %}} + +## Demo data sets +Choose from the following demo data sets: + +- **Website Monitoring** + Explore, visualize, and monitor HTTP response metrics from InfluxData websites. + + +## Add a demo data bucket +1. In the navigation menu on the left, click **Data (Load Data)** > **Buckets**. + + {{< nav-icon "data" >}} + +2. Click **{{< icon "plus" >}} Add Demo Data**, and then select the demo data bucket to add. +3. The Demo Data bucket appears in your list of buckets. + +## Explore demo data +Use the [Data Explorer](https://v2.docs.influxdata.com/v2.0/visualize-data/explore-metrics/) +to query and visualize data in demo data buckets. + +In the navigation menu on the left, click **Explore (Data Explorer)**. + +{{< nav-icon "explore" >}} + +## View demo data dashboards +After adding a demo data bucket, view the pre-built dashboard specific to the demo data set: + +1. In the navigation menu on the left, click **Boards (Dashboards)**. + + {{< nav-icon "dashboards" >}} + +2. Click the name of the dashboard that corresponds to your demo data bucket. + +{{% note %}} +#### Other sample data sets +See [Sample data](/v2.0/write-data/sample-data) for more sample InfluxDB data sets. +{{% /note %}} diff --git a/data/influxdb_urls.yml b/data/influxdb_urls.yml index 2f4b82beb..202b9fd73 100644 --- a/data/influxdb_urls.yml +++ b/data/influxdb_urls.yml @@ -13,11 +13,21 @@ cloud: short_name: AWS regions: - name: US West (Oregon) + location: Oregon, USA url: https://us-west-2-1.aws.cloud2.influxdata.com - name: EU Frankfurt + location: Frankfurt, Germany url: https://eu-central-1-1.aws.cloud2.influxdata.com - name: Google Cloud Platform short_name: GCP regions: - name: US Central (Iowa) + location: Iowa, USA url: https://us-central1-1.gcp.cloud2.influxdata.com + - name: Microsoft Azure + short_name: Azure + regions: + - name: West Europe + location: Amsterdam, Netherlands + url: https://westeurope-1.azure.cloud2.influxdata.com + status: beta diff --git a/layouts/partials/footer/influxdb-url-modal.html b/layouts/partials/footer/influxdb-url-modal.html index 4d059b994..97028500b 100644 --- a/layouts/partials/footer/influxdb-url-modal.html +++ b/layouts/partials/footer/influxdb-url-modal.html @@ -18,7 +18,7 @@
    {{ range .regions }}
  • -