Aggregation Queries
Aggregation queries compute summary values (averages, totals, extremes) across time-series data points instead of returning individual rows. Use these when you need calculated metrics rather than raw data — for example, the average voltage over the last hour or the total energy produced per machine.
Association Roles
Association Roles define the relationship types between entities. Each role specifies the multiplicity and naming for both directions of the relationship (inbound and outbound).
Associations
Associations define relationships between entities in the runtime model. This chapter describes how to query and navigate associations.
Attributes
Attributes are reusable property definitions that can be applied to types. Each attribute has a value type and optional constraints.
Best Practices
This chapter provides best practices for writing efficient and maintainable GraphQL queries and mutations.
Construction Kit
The Construction Kit defines the schema and structure of your data model. Unlike the Runtime Model which stores actual data instances, the Construction Kit contains the metadata that defines what types of entities can exist, their attributes, relationships, and constraints.
Create
GraphQL allows to query and mutate data. Mutations are operations like create, update and delete. This chapter describes how data can be created.
Delete
GraphQL allows to query and mutate data. Mutations are operations like create, update and delete. This chapter describes how data can be deleted.
Downsampling Query
A downsampling query reduces the density of time-series data by dividing a time range into equal-sized buckets and applying an aggregation function to each bucket. This is essential for visualizing large datasets on dashboards and charts — instead of transferring thousands of raw data points, you get a manageable number of summarized values.
Enums
Enums define a fixed set of allowed values for an attribute. Each enum value has a numeric key, a name, and an optional description.
Error Handling
This chapter describes how errors are returned in GraphQL responses and how to handle them.
Models
Models are containers that group related types, attributes, enums, and records. Each model has a name, version, and can depend on other models.
Overview
In OctoMesh, we understand that data is at the heart of your operations. This chapter focuses on how you can access and interact with your data through our Construction Kits (CK), tailored for both runtime data and stream (time series) data. Leveraging GraphQL endpoints, OctoMesh offers a seamless and efficient way to work with your data, regardless of its nature.
Persisted Queries
Persisted queries are saved query definitions stored as runtime entities. Instead of specifying all query parameters every time, you create a query definition once and execute it by its rtId. This is useful for dashboard widgets, recurring reports, and any scenario where the same query needs to be executed repeatedly.
Records
Records are composite value types that group related attributes together. Unlike types, records are embedded directly within entities rather than being independent entities with their own runtime IDs.
Retrieve
This chapter describes common query patterns for retrieving Construction Kit metadata. The Construction Kit API is read-only - you query the model structure but cannot modify it through GraphQL.
Retrieve
API Approaches
Runtime Model
GraphQL allows to query and mutate data. Mutations are operations like create, update and delete. This chapter describes how data can be created, retrieved, updated and deleted. It provides a reference for the GraphQL scalar types, input types, and enums used in the OctoMesh GraphQL API.
SearchFilter
The SearchFilter provides text search capabilities across multiple attributes of an entity. It is optimized for text-based searches and is typically used for search fields in list views.
Simple Query
A simple query retrieves raw time-series rows from CrateDB. You choose which columns to return and can apply filters, sorting, and time range restrictions. This is the most fundamental stream data query type — use it when you need individual data points rather than aggregated summaries.
Stream Data Access
Stream data provides access to time-series data stored in CrateDB. While runtime queries retrieve the current state of entities from MongoDB, stream data queries retrieve historical measurements and events recorded over time — such as sensor readings, machine metrics, or energy production values.
System Queries
This chapter describes how to create System Queries. For an overview of System Queries and their use cases, see System Queries.
System Queries
System Queries are reusable query configurations stored in the repository. They allow you to define a query once and execute it from multiple places using only its ID.
System Queries
This chapter describes how to update System Queries. For an overview of System Queries and their use cases, see System Queries.
Transient Queries
Transient queries allow you to dynamically query runtime entities with configurable column paths. Unlike regular queries where the returned fields are defined in the GraphQL query itself, transient queries return data in a table-like structure with rows and cells.
Types
Types define the structure of entities in the Runtime Model. Each type has attributes, can inherit from a base type, and can participate in associations with other types.
Update
GraphQL allows to query and mutate data. Mutations are operations like create, update and delete. This chapter describes how data can be updated.