{ "opencollection": "1.0.0", "info": { "name": "Complete InfluxDB Cloud Authorizations (API tokens) Authorizations (API tokens) Bucket Schemas API" }, "request": { "auth": { "type": "apikey", "key": "Authorization", "value": "{{Authorization}}", "placement": "header" } }, "items": [ { "info": { "name": "Bucket Schemas", "type": "folder" }, "items": [ { "info": { "name": "List measurement schemas of a bucket", "type": "http" }, "http": { "method": "GET", "url": "/api/v2/buckets/:bucketID/schema/measurements", "params": [ { "name": "org", "value": "", "type": "query", "description": "An organization name.\nSpecifies the organization that owns the schema.\n" }, { "name": "orgID", "value": "", "type": "query", "description": "An organization ID.\nSpecifies the organization that owns the schema.\n" }, { "name": "name", "value": "", "type": "query", "description": "A measurement name.\nOnly returns measurement schemas with the specified name.\n" }, { "name": "bucketID", "value": "", "type": "path", "description": "A bucket ID.\nLists measurement schemas for the specified bucket.\n" } ] }, "docs": "Lists _explicit_\n[schemas](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#schema)\n(`\"schemaType\": \"explicit\"`) for a bucket.\n\n_Explicit_ schemas are used to enforce column names, tags, fields, and data\ntypes for your data.\n\nBy default, buckets have an _implicit_ schema-type (`\"schemaType\": \"implicit\"`)\nthat conforms to your data.\n\n#### Related guides\n\n- [Using bucket schemas](https://www.influxdata.com/blog/new-bucket-schema-option-protect-from-unwanted-schema-changes/)\n" }, { "info": { "name": "Create a measurement schema for a bucket", "type": "http" }, "http": { "method": "POST", "url": "/api/v2/buckets/:bucketID/schema/measurements", "params": [ { "name": "org", "value": "", "type": "query", "description": "An organization name.\nSpecifies the organization that owns the schema.\n" }, { "name": "orgID", "value": "", "type": "query", "description": "An organization ID.\nSpecifies the organization that owns the schema.\n" }, { "name": "bucketID", "value": "", "type": "path", "description": "A bucket ID.\nAdds a schema for the specified bucket.\n" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Creates an _explict_ measurement [schema](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#schema)\nfor a bucket.\n\n_Explicit_ schemas are used to enforce column names, tags, fields, and data\ntypes for your data.\n\nBy default, buckets have an _implicit_ schema-type (`\"schemaType\": \"implicit\"`)\nthat conforms to your data.\n\nUse this endpoint to create schemas that prevent non-conforming write requests.\n\n#### Limitations\n\n- Buckets must be created with the \"explict\" `schemaType` in order" }, { "info": { "name": "Retrieve a measurement schema", "type": "http" }, "http": { "method": "GET", "url": "/api/v2/buckets/:bucketID/schema/measurements/:measurementID", "params": [ { "name": "org", "value": "", "type": "query", "description": "Organization name.\nSpecifies the organization that owns the schema.\n" }, { "name": "orgID", "value": "", "type": "query", "description": "Organization ID.\nSpecifies the organization that owns the schema.\n" }, { "name": "bucketID", "value": "", "type": "path", "description": "A bucket ID.\nRetrieves schemas for the specified bucket.\n" }, { "name": "measurementID", "value": "", "type": "path", "description": "The measurement schema ID.\nSpecifies the measurement schema to retrieve.\n" } ] }, "docs": "Retrieves an explicit measurement [schema](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#schema).\n" }, { "info": { "name": "Update a measurement schema", "type": "http" }, "http": { "method": "PATCH", "url": "/api/v2/buckets/:bucketID/schema/measurements/:measurementID", "params": [ { "name": "org", "value": "", "type": "query", "description": "An organization name.\nSpecifies the organization that owns the schema.\n" }, { "name": "orgID", "value": "", "type": "query", "description": "An organization ID.\nSpecifies the organization that owns the schema.\n" }, { "name": "bucketID", "value": "", "type": "path", "description": "A bucket ID.\nSpecifies the bucket to retrieve schemas for.\n" }, { "name": "measurementID", "value": "", "type": "path", "description": "A measurement schema ID.\nRetrieves the specified measurement schema.\n" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Updates a measurement [schema](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#schema).\n\nUse this endpoint to update the fields (`name`, `type`, and `dataType`) of a\nmeasurement schema.\n\n#### Limitations\n\n- You can't update the `name` of a measurement.\n\n#### Related guides\n\n- [Manage bucket schemas](https://docs.influxdata.com/influxdb/cloud/organizations/buckets/bucket-schema/).\n- [Using bucket schemas](https://www.influxdata.com/blog/new-bucket-schema-option-protect-from-unwante" } ] } ], "bundled": true }