Skip to content

Reference

Data Buckets

REST API reference for Data Buckets: create data buckets, write and read their data, and manage tags, exports and imports. 17 operations.

Reference14 min read

For the base URL, authentication and errors, see the REST API overview.

GET /v1/users/{user}/buckets ​

  • Request: GET /v1/users/{user}/buckets
  • Operation: ListBuckets
  • Operation ID: Bucket_List
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes

Example request

bash
curl 'https://YOUR_SERVER/v1/users/YOUR_USER/buckets' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

Response example (200)

json
[
  {
    "bucket": "api_write",
    "config": {
      "source": "api"
    },
    "created": 1792263090784,
    "description": "Bucket for API write",
    "enabled": true,
    "modified": 1792263090784,
    "name": "API Write"
  },
  {
    "bucket": "mqtt_bucket",
    "config": {
      "source": "mqtt",
      "topic": "house/+/temperature"
    },
    "created": 1792263090784,
    "description": "Bucket for MQTT topic",
    "enabled": true,
    "modified": 1792263090784,
    "name": "MQTT Bucket"
  },
  {
    "bucket": "device_bucket",
    "config": {
      "device": "macbook",
      "interval": 300,
      "resource": "data",
      "source": "device",
      "update": "interval"
    },
    "created": 1792263090784,
    "description": "Bucket for Thinger.io device",
    "enabled": true,
    "modified": 1792263090784,
    "name": "Device Bucket"
  },
  {
    "bucket": "device_write",
    "config": {
      "source": "write"
    },
    "created": 1792263090784,
    "description": "Bucket dor device write",
    "enabled": true,
    "modified": 1792263090784,
    "name": "Device Write"
  },
  {
    "backend": "influxdb",
    "bucket": "vibration",
    "config": {
      "device": "vibration_01",
      "interval": 10,
      "resource": "accel",
      "source": "device",
      "update": "interval"
    },
    "created": 1792263090784,
    "description": "Accelerometer read every 10 seconds",
    "enabled": true,
    "modified": 1792263090784,
    "name": "Vibration"
  },
  {
    "bucket": "meter_readings",
    "config": {
      "source": "write",
      "tags": [
        "device",
        "site"
      ]
    },
    "created": 1792263090784,
    "description": "Readings written by every meter, tagged by device and site",
    "enabled": true,
    "modified": 1792263090784,
    "name": "Meter readings"
  }
]

POST /v1/users/{user}/buckets ​

  • Request: POST /v1/users/{user}/buckets
  • Operation: CreateBucket
  • Operation ID: Bucket_Create
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes

Request body (application/json, required)

FieldTypeRequiredConstraintsDescription
asset_groupstringnoPattern: ^[a-zA-Z0-9_-]{1,32}$A unique identifier for resources, consisting of alphanumeric characters, underscores, or hyphens, and limited to 32 characters.
asset_typestringnoPattern: ^[a-zA-Z0-9_-]{1,32}$A unique identifier for resources, consisting of alphanumeric characters, underscores, or hyphens, and limited to 32 characters.
backendstringnoOne of: ``, mongodb, influxdb, dynamodbSpecifies the database backend to use for storage, with an option for default (represented by an empty string), 'mongodb', or 'influxdb'.
bucketstringyesPattern: ^[a-zA-Z0-9_-]{1,32}$A unique identifier for resources, consisting of alphanumeric characters, underscores, or hyphens, and limited to 32 characters.
configobjectyesConfiguration schema for a data bucket specifying how data is sourced and updated. This schema supports multiple source types including devices and MQTT topics, each with its own set of required properties.
configobjectnoVariant 1: Configuration for data sourced from a device. This requires specifying the device, user, resource, update interval, and optional tags.
config.devicestringyesPattern: ^[a-zA-Z0-9_-]{1,32}$Variant 1: The unique identifier for the device.
config.intervalnumberyesVariant 1: The time between updates, in seconds.
config.resourcestringyesMaximum length: 255Variant 1: The specific resource from the device being tracked.
config.sourcestringyesOne of: deviceVariant 1: Indicates the data source is a device.
config.tagsarray of stringnoMaximum items: 5Variant 1: A collection of tags for categorization, limited to 5.
config.updatestringyesOne of: intervalVariant 1: Specifies that the bucket is updated at regular intervals.
config.userstringnoPattern: ^[a-zA-Z0-9_-]{1,32}$Variant 1: The unique identifier for the user associated with this bucket.
configobjectnoVariant 2: Configuration for data sourced from a device with event-based or no updates. This variation does not require an interval.
config.devicestringyesPattern: ^[a-zA-Z0-9_-]{1,32}$Variant 2: The unique identifier for the device.
config.resourcestringyesMaximum length: 255Variant 2: The specific resource from the device being tracked.
config.sourcestringyesOne of: deviceVariant 2: Indicates the data source is a device.
config.tagsarray of stringnoMaximum items: 5Variant 2: A collection of tags for categorization, limited to 5.
config.updatestringyesOne of: events, noneVariant 2: Specifies how the bucket is updated: either by specific events or not updated automatically.
config.userstringnoPattern: ^[a-zA-Z0-9_-]{1,32}$Variant 2: The unique identifier for the user associated with this bucket.
configobjectnoVariant 3: Configuration for data sourced from an MQTT topic. This requires specifying the topic and allows optional tags.
config.sourcestringyesOne of: mqttVariant 3: Indicates the data source is an MQTT topic.
config.tagsarray of stringnoMaximum items: 5Variant 3: A collection of tags for categorization, limited to 5.
config.topicstringyesMaximum length: 512Variant 3: The MQTT topic from which data is sourced.
configobjectnoVariant 4: Configuration for data manually written or provided via an API. This variation only requires source specification and allows optional tags.
config.sourcestringyesOne of: write, apiVariant 4: Indicates the data source is either manually written ('write') or sourced via an API ('api').
config.tagsarray of stringnoMaximum items: 5Variant 4: A collection of tags for categorization, limited to 5.
descriptionstringnoMaximum length: 255A brief description of the resource, providing context or additional information, limited to 255 characters.
enabledbooleanyes
namestringyesMaximum length: 255The name of the resource, limited to 255 characters. It can include any character.
productstringnoPattern: ^[a-zA-Z0-9_-]{1,32}$A unique identifier for resources, consisting of alphanumeric characters, underscores, or hyphens, and limited to 32 characters.
retentionobjectnoConfiguration schema for data bucket retention policy.
retention.periodintegernoMinimum: 0The duration of the retention period. 0 for unlimited retention.
retention.unitstringnoOne of: hours, days, weeks, months, yearsThe unit of measurement for the retention period.

Example request: From API Call

bash
curl -X POST 'https://YOUR_SERVER/v1/users/YOUR_USER/buckets' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "bucket": "api_write",
  "config": {
    "source": "api"
  },
  "description": "Bucket for API write",
  "enabled": true,
  "name": "API Write"
}'

Example body: From MQTT Topic

json
{
  "bucket": "mqtt_bucket",
  "config": {
    "source": "mqtt",
    "topic": "house/+/temperature"
  },
  "description": "Bucket for MQTT topic",
  "enabled": true,
  "name": "MQTT Bucket"
}

Example body: From Thinger Device

json
{
  "bucket": "device_bucket",
  "config": {
    "device": "macbook",
    "interval": 300,
    "resource": "data",
    "source": "device",
    "update": "interval"
  },
  "description": "Bucket for Thinger.io device",
  "enabled": true,
  "name": "Device Bucket"
}

Example body: From Thinger Device Write

json
{
  "bucket": "device_write",
  "config": {
    "source": "write"
  },
  "description": "Bucket dor device write",
  "enabled": true,
  "name": "Device Write"
}

Example body: High rate on InfluxDB

json
{
  "backend": "influxdb",
  "bucket": "vibration",
  "config": {
    "device": "vibration_01",
    "interval": 10,
    "resource": "accel",
    "source": "device",
    "update": "interval"
  },
  "description": "Accelerometer read every 10 seconds",
  "enabled": true,
  "name": "Vibration",
  "retention": {
    "period": 30,
    "unit": "days"
  }
}

Example body: Tagged writes, kept 2 years

json
{
  "bucket": "meter_readings",
  "config": {
    "source": "write",
    "tags": [
      "device",
      "site"
    ]
  },
  "description": "Readings written by every meter, tagged by device and site",
  "enabled": true,
  "name": "Meter readings",
  "retention": {
    "period": 2,
    "unit": "years"
  }
}

Responses

StatusDescription
200ok
401unauthorized
403forbidden

GET /v1/users/{user}/buckets/{bucket} ​

  • Request: GET /v1/users/{user}/buckets/
  • Operation: ReadBucketConfig
  • Operation ID: Bucket_ReadConfig
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
bucketpathstringyes

Example request

bash
curl 'https://YOUR_SERVER/v1/users/YOUR_USER/buckets/YOUR_BUCKET' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

Response example (200, From API Call)

json
{
  "bucket": "api_write",
  "config": {
    "source": "api"
  },
  "created": 1792263090784,
  "description": "Bucket for API write",
  "enabled": true,
  "modified": 1792263090784,
  "name": "API Write"
}

Response example (200, From MQTT Topic)

json
{
  "bucket": "mqtt_bucket",
  "config": {
    "source": "mqtt",
    "topic": "house/+/temperature"
  },
  "created": 1792263090784,
  "description": "Bucket for MQTT topic",
  "enabled": true,
  "modified": 1792263090784,
  "name": "MQTT Bucket"
}

Response example (200, From Thinger Device)

json
{
  "bucket": "device_bucket",
  "config": {
    "device": "macbook",
    "interval": 300,
    "resource": "data",
    "source": "device",
    "update": "interval"
  },
  "created": 1792263090784,
  "description": "Bucket for Thinger.io device",
  "enabled": true,
  "modified": 1792263090784,
  "name": "Device Bucket"
}

Response example (200, From Thinger Device Write)

json
{
  "bucket": "device_write",
  "config": {
    "source": "write"
  },
  "created": 1792263090784,
  "description": "Bucket dor device write",
  "enabled": true,
  "modified": 1792263090784,
  "name": "Device Write"
}

Response example (200, High rate on InfluxDB)

json
{
  "backend": "influxdb",
  "bucket": "vibration",
  "config": {
    "device": "vibration_01",
    "interval": 10,
    "resource": "accel",
    "source": "device",
    "update": "interval"
  },
  "created": 1792263090784,
  "description": "Accelerometer read every 10 seconds",
  "enabled": true,
  "modified": 1792263090784,
  "name": "Vibration",
  "retention": {
    "period": 30,
    "unit": "days"
  }
}

Response example (200, Tagged writes, kept 2 years)

json
{
  "bucket": "meter_readings",
  "config": {
    "source": "write",
    "tags": [
      "device",
      "site"
    ]
  },
  "created": 1792263090784,
  "description": "Readings written by every meter, tagged by device and site",
  "enabled": true,
  "modified": 1792263090784,
  "name": "Meter readings",
  "retention": {
    "period": 2,
    "unit": "years"
  }
}

PUT /v1/users/{user}/buckets/{bucket} ​

  • Request: PUT /v1/users/{user}/buckets/
  • Operation: UpdateBucket
  • Operation ID: Bucket_Update
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
bucketpathstringyes

Request body (application/json, required)

FieldTypeRequiredConstraintsDescription
asset_groupstringnoVariant 1: Pattern: ^[a-zA-Z0-9_-]{1,32}$
Variant 2: Maximum length: 0
A unique identifier for resources, consisting of alphanumeric characters, underscores, or hyphens, and limited to 32 characters.
asset_typestringnoVariant 1: Pattern: ^[a-zA-Z0-9_-]{1,32}$
Variant 2: Maximum length: 0
A unique identifier for resources, consisting of alphanumeric characters, underscores, or hyphens, and limited to 32 characters.
backendstringnoOne of: ``, mongodb, influxdb, dynamodbSpecifies the database backend to use for storage, with an option for default (represented by an empty string), 'mongodb', or 'influxdb'.
configobjectnoConfiguration schema for a data bucket specifying how data is sourced and updated. This schema supports multiple source types including devices and MQTT topics, each with its own set of required properties.
configobjectnoVariant 1: Configuration for data sourced from a device. This requires specifying the device, user, resource, update interval, and optional tags.
config.devicestringyesPattern: ^[a-zA-Z0-9_-]{1,32}$Variant 1: The unique identifier for the device.
config.intervalnumberyesVariant 1: The time between updates, in seconds.
config.resourcestringyesMaximum length: 255Variant 1: The specific resource from the device being tracked.
config.sourcestringyesOne of: deviceVariant 1: Indicates the data source is a device.
config.tagsarray of stringnoMaximum items: 5Variant 1: A collection of tags for categorization, limited to 5.
config.updatestringyesOne of: intervalVariant 1: Specifies that the bucket is updated at regular intervals.
config.userstringnoPattern: ^[a-zA-Z0-9_-]{1,32}$Variant 1: The unique identifier for the user associated with this bucket.
configobjectnoVariant 2: Configuration for data sourced from a device with event-based or no updates. This variation does not require an interval.
config.devicestringyesPattern: ^[a-zA-Z0-9_-]{1,32}$Variant 2: The unique identifier for the device.
config.resourcestringyesMaximum length: 255Variant 2: The specific resource from the device being tracked.
config.sourcestringyesOne of: deviceVariant 2: Indicates the data source is a device.
config.tagsarray of stringnoMaximum items: 5Variant 2: A collection of tags for categorization, limited to 5.
config.updatestringyesOne of: events, noneVariant 2: Specifies how the bucket is updated: either by specific events or not updated automatically.
config.userstringnoPattern: ^[a-zA-Z0-9_-]{1,32}$Variant 2: The unique identifier for the user associated with this bucket.
configobjectnoVariant 3: Configuration for data sourced from an MQTT topic. This requires specifying the topic and allows optional tags.
config.sourcestringyesOne of: mqttVariant 3: Indicates the data source is an MQTT topic.
config.tagsarray of stringnoMaximum items: 5Variant 3: A collection of tags for categorization, limited to 5.
config.topicstringyesMaximum length: 512Variant 3: The MQTT topic from which data is sourced.
configobjectnoVariant 4: Configuration for data manually written or provided via an API. This variation only requires source specification and allows optional tags.
config.sourcestringyesOne of: write, apiVariant 4: Indicates the data source is either manually written ('write') or sourced via an API ('api').
config.tagsarray of stringnoMaximum items: 5Variant 4: A collection of tags for categorization, limited to 5.
descriptionstringnoMaximum length: 255A brief description of the resource, providing context or additional information, limited to 255 characters.
enabledbooleanno
namestringnoMaximum length: 255The name of the resource, limited to 255 characters. It can include any character.
productstringnoVariant 1: Pattern: ^[a-zA-Z0-9_-]{1,32}$
Variant 2: Maximum length: 0
A unique identifier for resources, consisting of alphanumeric characters, underscores, or hyphens, and limited to 32 characters.
retentionobjectnoConfiguration schema for data bucket retention policy.
retention.periodintegernoMinimum: 0The duration of the retention period. 0 for unlimited retention.
retention.unitstringnoOne of: hours, days, weeks, months, yearsThe unit of measurement for the retention period.

Example request: Full Update

bash
curl -X PUT 'https://YOUR_SERVER/v1/users/YOUR_USER/buckets/YOUR_BUCKET' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "bucket": "api_write",
  "config": {
    "source": "api"
  },
  "description": "Bucket for API write",
  "enabled": true,
  "name": "API Write"
}'

Example body: Update 'config'

json
{
  "config": {
    "source": "api"
  }
}

Example body: Update 'description'

json
{
  "description": "Bucket for API write"
}

Example body: Update 'enabled'

json
{
  "enabled": true
}

Example body: Update 'name'

json
{
  "name": "API Write"
}

Responses

StatusDescription
200ok
401unauthorized
403forbidden

DELETE /v1/users/{user}/buckets/{bucket} ​

  • Request: DELETE /v1/users/{user}/buckets/
  • Operation: DeleteBucket
  • Operation ID: Bucket_Delete
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
bucketpathstringyes

Example request

bash
curl -X DELETE 'https://YOUR_SERVER/v1/users/YOUR_USER/buckets/YOUR_BUCKET' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

GET /v1/users/{user}/buckets/{bucket}/clone ​

  • Request: GET /v1/users/{user}/buckets/{bucket}/clone
  • Operation: CloneBucketConfig
  • Operation ID: Bucket_CloneConfig
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
bucketpathstringyes

Example request

bash
curl 'https://YOUR_SERVER/v1/users/YOUR_USER/buckets/YOUR_BUCKET/clone' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

POST /v1/users/{user}/buckets/{bucket}/clone ​

  • Request: POST /v1/users/{user}/buckets/{bucket}/clone
  • Operation: CloneBucket
  • Operation ID: Bucket_Clone
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
bucketpathstringyes

Request body (application/json, required)

FieldTypeRequiredConstraintsDescription
bucketstringyesPattern: ^[a-zA-Z0-9_-]{1,32}$A unique identifier for resources, consisting of alphanumeric characters, underscores, or hyphens, and limited to 32 characters.
descriptionstringnoMaximum length: 255A brief description of the resource, providing context or additional information, limited to 255 characters.
enabledbooleanno
namestringnoMaximum length: 255The name of the resource, limited to 255 characters. It can include any character.

Example request: Copy with a new id

bash
curl -X POST 'https://YOUR_SERVER/v1/users/YOUR_USER/buckets/YOUR_BUCKET/clone' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "bucket": "copy_of_bucket"
}'

Example body: Copy with name and description

json
{
  "bucket": "line_2_bucket",
  "description": "Same configuration as the original, for production line 2",
  "name": "Line 2 copy"
}

Responses

StatusDescription
200ok
401unauthorized
403forbidden

POST /v1/users/{user}/buckets/{bucket}/data ​

  • Request: POST /v1/users/{user}/buckets/{bucket}/data
  • Operation: WriteBucket
  • Operation ID: Bucket_WriteData
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
bucketpathstringyes

Request body (application/json, required)

The JSON object becomes one record. ?ts=<epoch ms> sets its timestamp (MongoDB buckets also take a numeric 'ts' field). Fields listed in the bucket tags are indexed for filtering. The bucket must be enabled.

Example request: One record

bash
curl -X POST 'https://YOUR_SERVER/v1/users/YOUR_USER/buckets/YOUR_BUCKET/data' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "device": "greenhouse_01",
  "humidity": 51,
  "temperature": 23.4
}'

Example body: With its own timestamp

json
{
  "energy": 1532.8,
  "power": 2.1,
  "ts": 1791650000000
}

Responses

StatusDescription
200ok
401unauthorized
403forbidden

GET /v1/users/{user}/buckets/{bucket}/exports ​

  • Request: GET /v1/users/{user}/buckets/{bucket}/exports
  • Operation: ListBucketExports
  • Operation ID: Bucket_ListExports
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
bucketpathstringyes

Example request

bash
curl 'https://YOUR_SERVER/v1/users/YOUR_USER/buckets/YOUR_BUCKET/exports' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

POST /v1/users/{user}/buckets/{bucket}/exports ​

  • Request: POST /v1/users/{user}/buckets/{bucket}/exports
  • Operation: CreateBucketExport
  • Operation ID: Bucket_CreateExport
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
bucketpathstringyes

Request body (application/json, required)

Generates a file with the bucket data between min_ts and max_ts (epoch ms; all data when missing), listed in GET .../exports when ready. callback: notify by email to the owner or call an endpoint when it finishes.

FieldTypeRequiredConstraintsDescription
callbackstringnoOne of: email, endpoint
data_typestringnoOne of: csv, arff, json
endpointstringnoPattern: ^[a-zA-Z0-9_-]{1,32}$A unique identifier for resources, consisting of alphanumeric characters, underscores, or hyphens, and limited to 32 characters.
max_tsnumbernoMinimum: 0
min_tsnumbernoMinimum: 0
timestamp_formatstringnoOne of: iso, seconds, milliseconds

Example request: Everything as JSON, call an endpoint

bash
curl -X POST 'https://YOUR_SERVER/v1/users/YOUR_USER/buckets/YOUR_BUCKET/exports' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "callback": "endpoint",
  "data_type": "json",
  "endpoint": "export_ready",
  "timestamp_format": "milliseconds"
}'

Example body: Last month as CSV, email when ready

json
{
  "callback": "email",
  "data_type": "csv",
  "max_ts": 1791590400000,
  "min_ts": 1788998400000,
  "timestamp_format": "iso"
}

Responses

StatusDescription
200ok
401unauthorized
403forbidden

GET /v1/users/{user}/buckets/{bucket}/exports/{file} ​

  • Request: GET /v1/users/{user}/buckets/{bucket}/exports/
  • Operation: ReadBucketExport
  • Operation ID: Bucket_ReadExport
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
bucketpathstringyes
filepathstringyes

Example request

bash
curl 'https://YOUR_SERVER/v1/users/YOUR_USER/buckets/YOUR_BUCKET/exports/YOUR_FILE' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

DELETE /v1/users/{user}/buckets/{bucket}/exports/{file} ​

  • Request: DELETE /v1/users/{user}/buckets/{bucket}/exports/
  • Operation: DeleteBucketExport
  • Operation ID: Bucket_DeleteExport
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
bucketpathstringyes
filepathstringyes

Example request

bash
curl -X DELETE 'https://YOUR_SERVER/v1/users/YOUR_USER/buckets/YOUR_BUCKET/exports/YOUR_FILE' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

POST /v1/users/{user}/buckets/{bucket}/imports ​

  • Request: POST /v1/users/{user}/buckets/{bucket}/imports
  • Operation: CreateBucketImport
  • Operation ID: Bucket_CreateImport
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
bucketpathstringyes

Request body (application/json, required)

Loads records into the bucket from a file already uploaded to a file storage (CSV with a header row, as produced by an export).

FieldTypeRequiredConstraintsDescription
filestringyes
sourcestringyesOne of: storage
storagestringyesPattern: ^[a-zA-Z0-9_-]{1,32}$A unique identifier for resources, consisting of alphanumeric characters, underscores, or hyphens, and limited to 32 characters.

Example request: CSV from a storage

bash
curl -X POST 'https://YOUR_SERVER/v1/users/YOUR_USER/buckets/YOUR_BUCKET/imports' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "file": "meter_readings_2025.csv",
  "source": "storage",
  "storage": "imports"
}'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

PUT /v1/users/{user}/buckets/{bucket}/projects ​

  • Request: PUT /v1/users/{user}/buckets/{bucket}/projects
  • Operation: UpdateBucketProjects
  • Operation ID: Bucket_UpdateProjects
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
bucketpathstringyes

Request body (application/json, required)

FieldTypeRequiredConstraintsDescription
(body)array of stringnoProjects the resource belongs to, as <owner>@<project> ids. Replaces the whole list: read the current one first to add or remove a single project; [] removes it from every project.

Example request: No projects

bash
curl -X PUT 'https://YOUR_SERVER/v1/users/YOUR_USER/buckets/YOUR_BUCKET/projects' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '[]'

Example body: One project

json
[
  "YOUR_USER@greenhouse"
]

Example body: Two projects

json
[
  "YOUR_USER@greenhouse",
  "YOUR_USER@maintenance"
]

Responses

StatusDescription
200ok
401unauthorized
403forbidden

GET /v1/users/{user}/buckets/{bucket}/tags ​

  • Request: GET /v1/users/{user}/buckets/{bucket}/tags
  • Operation: ListBucketTags
  • Operation ID: Bucket_ListTags
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
bucketpathstringyes

Example request

bash
curl 'https://YOUR_SERVER/v1/users/YOUR_USER/buckets/YOUR_BUCKET/tags' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

GET /v1/users/{user}/buckets/{bucket}/tags/{tag} ​

  • Request: GET /v1/users/{user}/buckets/{bucket}/tags/
  • Operation: ReadBucketTag
  • Operation ID: Bucket_ReadTag
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
userpathstringyes
bucketpathstringyes
tagpathstringyes

Example request

bash
curl 'https://YOUR_SERVER/v1/users/YOUR_USER/buckets/YOUR_BUCKET/tags/YOUR_TAG' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden

GET /{version}/users/{user}/buckets/{bucket}/data ​

  • Request: GET /{version}/users/{user}/buckets/{bucket}/data
  • Operation: ReadBucket
  • Operation ID: Bucket_ReadData
  • Authentication: access token, Authorization: Bearer YOUR_TOKEN

Parameters

NameInTypeRequiredDescription
versionpathstringyes
userpathstringyes
bucketpathstringyes

Example request

bash
curl 'https://YOUR_SERVER/YOUR_VERSION/users/YOUR_USER/buckets/YOUR_BUCKET/data' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Responses

StatusDescription
200ok
401unauthorized
403forbidden