Before you begin
You need:- An access token. See the quickstart.
-
A service account whose KODE OS role allows the actions you use:
Choose a building
You can use a building that already exists or create one.- Use an existing building
- Create a building
Call List buildings and note the
_id of the building to use as buildingId.403, the building does not exist, is not available to your service account, or has no api product enabled. The API gives the same answer in each case.
Ingest devices and points
1
Check for an existing connector
Call List connectors. The list holds every connector in the building. A connector you can ingest into has If one fits, note its
integrationType set to API_KODE._id as connectorId and go to the ingest steps. Otherwise create one.2
Create a KODE API connector
Send a Keep the
name to Create a KODE API connector._id from the response as connectorId. The name is free text. The API does not reject a repeated name, so a second request with the same name creates a second connector.The integrations endpoints call a connector a data source, and its _id is the datasourceId they use.3
Ingest the devices
Send your devices to Ingest devices through a connector. Use stable identifiers from your system for The response has status Keep the job
deviceExternalId.202 and holds a job:_id as jobId. Send up to 1,000 devices in one request. Sending a deviceExternalId again updates the name and location of that device. It does not create a duplicate.4
Wait for the devices job
Call Get a job every few seconds until
status is COMPLETED or FAILED.Polling counts toward your rate limits, so wait a few seconds between calls.
5
Ingest the points
Points belong to devices, so ingest the devices first. Each point item names its parent device with the same Use these rules:
deviceExternalId and deviceExternalPath you sent in the previous step. Send the items to Ingest points through a connector.pointKindisNumber,Str, orBool, with that capitalization.pointUnitis the_idof an ontology unit. An unknown unit returns400.pointEnumis one comma-separated string, such asoff,on,auto.pointMinValcannot be higher thanpointMaxVal.pointWritabledefaults tofalse.
400 and names the missing deviceExternalId values. Fix the request and send it again. Then wait for the job as you did for the devices.6
Confirm the result
A completed job tells you that it ran to the end. It does not list what it stored. Read the data back:
- List building devices shows the ingested devices.
- List building points shows the ingested points and their parent devices.
- Get a connector shows the connector.
- Get connector status shows the last connection status KODE OS recorded. A new KODE API connector has none, so the response is an empty object. Ingesting devices or points does not change it.
Send point values
After the points exist, send their values with the timeseries endpoints. See Ingest device and point data, which covers current values, history, and rate limits.Update what you sent
Send a device again with the samedeviceExternalId to change its name or location. Send a point again with the same pointExternalId and the API does not create a second point.
Limits
Ingest requests count toward your rate limits.

