Skip to content

Station Webhook

Station Webhook is an inbound station integration. Your logger or script posts records to Dendra over HTTP. You choose an organization Ingest data access key; Dendra binds that key to the integration, and posts must use it.

---
config:
  flowchart:
    nodeSpacing: 40
    rankSpacing: 48
    padding: 16
---
flowchart LR
    subgraph source [Source]
        logger[Logger or script]
    end
    subgraph stations [Stations]
        a[Station Webhook - Station 1]
        b[Station Webhook - Station 2]
        c[Station Webhook - Station 3]
    end
    logger --> a
    logger --> b
    logger --> c
SettingRequiredWhat you set
Org API keyYesOrganization key with purpose Ingest data
Table nameYesDefault logical table for ingested records
Time fieldYesPayload field that holds observation time (ISO-8601 string or Unix milliseconds)
Time adjust secondsNoSeconds to add so the time becomes UTC
String fieldsNoPayload fields stored as strings; other data fields are treated as floats
Table name fieldNoOptional payload field whose value overrides the table name per record
  1. Create the station in Dendra if you have not already. Work through the Station Readiness Checklist: the station is enabled, it has a deployment, and the site is enabled with a geolocation.

  2. Create an Ingest data organization key if you do not already have one. See Access Keys.

  3. Go to Tools > Data Setup > Configure Integrations. See Configure Integrations.

  4. Click New and choose inbound integration type Station Webhook.

  5. Select your station.

  6. In Settings, select the Org API key, Table name, and Time field. Fill optional fields if you need them, then Save.

  7. Copy the integration config id from the saved integration. Post data to:

    POST https://svcs.dendra.science/api/hooks/v3/integrations/{integration_config_id}

    Send header Authorization: Apikey <org-key> and a body of JSON, NDJSON, or CSV (Content-Type: application/json, application/x-ndjson, or text/csv). A successful request returns 202 with an ingest_id.

  8. Open Tools > Monitoring > Integrations, select this config, and confirm the activity log looks healthy. See Monitor Integrations.

    To see tables next, set this config to Live and Enabled.

  9. Confirm tables under Tools > Data Setup > Configure Datastreams, then continue with Configure Datastreams.

Post to:

https://svcs.dendra.science/api/hooks/v3/integrations/{integration_config_id}

Send Authorization: Apikey <org-key>. A successful request returns 202:

{ "ingest_id": "..." }

Each record needs the Time field you set on the integration. Other fields are stored as floats unless you list them under String fields.

Example: JSON

One object, or an array of objects.

Request:

Terminal window
curl \
--header 'Authorization: Apikey den_ak_org_01...' \
--header 'Content-Type: application/json' \
--data '[{"timestamp":"2024-01-02T03:04:05Z","temp":12.5,"rh":40},{"timestamp":"2024-01-02T03:14:05Z","temp":12.7,"rh":41}]' \
https://svcs.dendra.science/api/hooks/v3/integrations/{integration_config_id}

Example: NDJSON

JSON lines: one object per line, with a line break between records.

Request:

Terminal window
curl \
--header 'Authorization: Apikey den_ak_org_01...' \
--header 'Content-Type: application/x-ndjson' \
--data '{"timestamp":"2024-01-02T03:04:05Z","temp":12.5,"rh":40}
{"timestamp":"2024-01-02T03:14:05Z","temp":12.7,"rh":41}' \
https://svcs.dendra.science/api/hooks/v3/integrations/{integration_config_id}

Example: CSV

Header row, then one record per line.

Request:

Terminal window
curl \
--header 'Authorization: Apikey den_ak_org_01...' \
--header 'Content-Type: text/csv' \
--data 'timestamp,temp,rh
2024-01-02T03:04:05Z,12.5,40
2024-01-02T03:14:05Z,12.7,41' \
https://svcs.dendra.science/api/hooks/v3/integrations/{integration_config_id}