curl --request POST \
--url https://api.demo.cula.earth/tracking/v1/machine-data-annotations/{id}/machine-variables/{machine_variable_id} \
--header 'Authorization: Bearer <token>' \
--header 'Cula-Organisation-Id: <cula-organisation-id>'import requests
url = "https://api.demo.cula.earth/tracking/v1/machine-data-annotations/{id}/machine-variables/{machine_variable_id}"
headers = {
"Cula-Organisation-Id": "<cula-organisation-id>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Cula-Organisation-Id': '<cula-organisation-id>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.demo.cula.earth/tracking/v1/machine-data-annotations/{id}/machine-variables/{machine_variable_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.demo.cula.earth/tracking/v1/machine-data-annotations/{id}/machine-variables/{machine_variable_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Cula-Organisation-Id: <cula-organisation-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.demo.cula.earth/tracking/v1/machine-data-annotations/{id}/machine-variables/{machine_variable_id}"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Cula-Organisation-Id", "<cula-organisation-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.demo.cula.earth/tracking/v1/machine-data-annotations/{id}/machine-variables/{machine_variable_id}")
.header("Cula-Organisation-Id", "<cula-organisation-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.demo.cula.earth/tracking/v1/machine-data-annotations/{id}/machine-variables/{machine_variable_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Cula-Organisation-Id"] = '<cula-organisation-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "mda_01k7v3n9cbp2s0w8qh4xr6fzje",
"external_id": "ANNOTATION-EXT-0001",
"type": "instant",
"occurred_at": "2026-05-01T12:30:00.000Z",
"site": {
"id": "ste_01k8g7aec6dt5zrtamc72ww446",
"external_id": "SITE-EXT-0001"
},
"created_at": "2026-05-06T19:34:00.000Z",
"text": "Kiln restarted after the morning inspection",
"machine_variables": [
{
"id": "mvr_01kae7a2kpkcqwy7fwk2fft11h"
}
]
}{
"code": "bad_request",
"message": "The field limit must not be greater than 100."
}{
"code": "unauthorized",
"message": "Invalid or expired token"
}{
"code": "not_found",
"message": "Resource with ID xyz_01k56g7aec6dt5zrtamc72vw446 could not be found."
}{
"code": "internal_server_error",
"message": "Internal server error."
}Attach a machine variable to a machine data annotation
curl --request POST \
--url https://api.demo.cula.earth/tracking/v1/machine-data-annotations/{id}/machine-variables/{machine_variable_id} \
--header 'Authorization: Bearer <token>' \
--header 'Cula-Organisation-Id: <cula-organisation-id>'import requests
url = "https://api.demo.cula.earth/tracking/v1/machine-data-annotations/{id}/machine-variables/{machine_variable_id}"
headers = {
"Cula-Organisation-Id": "<cula-organisation-id>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Cula-Organisation-Id': '<cula-organisation-id>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.demo.cula.earth/tracking/v1/machine-data-annotations/{id}/machine-variables/{machine_variable_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.demo.cula.earth/tracking/v1/machine-data-annotations/{id}/machine-variables/{machine_variable_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Cula-Organisation-Id: <cula-organisation-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.demo.cula.earth/tracking/v1/machine-data-annotations/{id}/machine-variables/{machine_variable_id}"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Cula-Organisation-Id", "<cula-organisation-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.demo.cula.earth/tracking/v1/machine-data-annotations/{id}/machine-variables/{machine_variable_id}")
.header("Cula-Organisation-Id", "<cula-organisation-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.demo.cula.earth/tracking/v1/machine-data-annotations/{id}/machine-variables/{machine_variable_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Cula-Organisation-Id"] = '<cula-organisation-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "mda_01k7v3n9cbp2s0w8qh4xr6fzje",
"external_id": "ANNOTATION-EXT-0001",
"type": "instant",
"occurred_at": "2026-05-01T12:30:00.000Z",
"site": {
"id": "ste_01k8g7aec6dt5zrtamc72ww446",
"external_id": "SITE-EXT-0001"
},
"created_at": "2026-05-06T19:34:00.000Z",
"text": "Kiln restarted after the morning inspection",
"machine_variables": [
{
"id": "mvr_01kae7a2kpkcqwy7fwk2fft11h"
}
]
}{
"code": "bad_request",
"message": "The field limit must not be greater than 100."
}{
"code": "unauthorized",
"message": "Invalid or expired token"
}{
"code": "not_found",
"message": "Resource with ID xyz_01k56g7aec6dt5zrtamc72vw446 could not be found."
}{
"code": "internal_server_error",
"message": "Internal server error."
}Authorizations
OAuth 2.0 client credentials. Exchange your client_id and client_secret for an access token scoped to the organisation that provides data access.
Headers
ID of the organisation the request operates on behalf of (e.g. org_...). Must be an organisation the API client has access to.
"org_01k83mfmhgchya944v86ryvhpq"
Path Parameters
"mvr_01kae7a2kpkcqwy7fwk2fft11h"
"mda_01k7v3n9cbp2s0w8qh4xr6fzje"
Response
The updated machine data annotation. The machine variable must be available at the site of the annotation; attaching an already attached machine variable has no effect.
- Instant
- Range
Unique identifier of the machine data annotation.
"mda_01k7v3n9cbp2s0w8qh4xr6fzje"
The external ID you assigned to this annotation, if any.
"ANNOTATION-EXT-0001"
Whether the annotation marks a single instant or a time range.
instant The annotated instant as a UTC ISO 8601 timestamp.
"2026-05-01T12:30:00.000Z"
The site the annotation belongs to.
Show child attributes
Show child attributes
Time the annotation was created.
"2026-05-06T19:34:00.000Z"
Free-text note describing the annotated event that affected machine data.
"Kiln restarted after the morning inspection"
The machine variables the annotation is linked to.
Show child attributes
Show child attributes
Was this page helpful?