Skip to content

Pushing Data via the REST API

Omnismith exposes a REST API so scripts, agents, and automated pipelines can create and update entities without touching the UI.

Generate a Personal Access Token in your account settings and pass it as a Bearer token in every request:

Authorization: Bearer omni_your_token_here
PUT https://api.omnismith.io/v1/entities/{id}
Content-Type: application/json
Authorization: Bearer omni_your_token_here
{
"attribute_values": [
{ "attribute_id": "ATTR_UUID", "value": "some value" },
{ "attribute_id": "ANOTHER_ATTR_UUID", "value": 42 }
]
}

Each item in attribute_values must include:

FieldRequiredDescription
attribute_idUUID of the attribute to update
valueNew value — string, number, or boolean
updated_atISO 8601 timestamp; defaults to current server time if omitted

The optional updated_at field lets you record a value at a specific point in the past. This is useful when:

  • A remote device lost network connectivity and buffered readings locally
  • You are migrating historical data from another system
  • You need to fill a gap in your time series

When updated_at is supplied, Omnismith inserts the value at the exact position in the time series. The History tab and Chart tab will reflect the correct timeline without gaps.

Terminal window
# Device reconnected after 15 min offline — replay buffered CPU readings
SERVER_ID="entity-uuid-here"
TOKEN="omni_your_token_here"
curl -s -X PUT "https://api.omnismith.io/v1/entities/$SERVER_ID" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"attribute_values": [
{ "attribute_id": "cpu-attr-uuid", "value": 72.4, "updated_at": "2026-02-23T10:00:00Z" },
{ "attribute_id": "cpu-attr-uuid", "value": 85.1, "updated_at": "2026-02-23T10:05:00Z" },
{ "attribute_id": "cpu-attr-uuid", "value": 91.3, "updated_at": "2026-02-23T10:10:00Z" },
{ "attribute_id": "cpu-attr-uuid", "value": 67.8, "updated_at": "2026-02-23T10:15:00Z" }
]
}'
# Four readings inserted at their exact collection times