#docs #ingest #overview

Ingest API v2

Use the TelemetryDeck Ingest API to send events to TelemetryDeck

Ingest API v2

Usually you’ll send events to TelemetryDeck using one of our SDKs. However, if you’re working with a language or framework that we don’t have an SDK for, you can send events directly to our Ingest API.

Ingest Endpoint

Please send your events as a POST request to our ingestion server at https://nom.telemetrydeck.com/v2/namespace/{namespace}/, with the headers Content-Type: application/json and charset=utf-8.

Replace {namespace} with your organization’s TelemetryDeck namespace. You can find your namespace in the TelemetryDeck Dashboard.

Here’s an example in cURL:

curl -X "POST" "https://nom.telemetrydeck.com/v2/namespace/your-namespace/" \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'[
        {
          "appID": "AAAA-BBBBBBBB-CCCC-DDDD",
          "clientUser": "myClientUserHash",
          "type": "Actions.LoginView.loginButtonSucceeded"
        }
      ]'

Body Structure

The post body should be an array of JSON objects, because you can send multiple events at once. Each signal object must have these properties:

PropertyTypeDescription
appIDstringYour app’s ID
clientUserstringA hash of the user’s ID. This should always be the same for the same user.
typestringThe type of signal. While it is not enforced, we recommend structuring your signal names in scopes separated by dots, with the signal type beginning with a lowercase letter and any scope beginning with an uppercase letter.

The following properties are optional:

PropertyTypeDescription
sessionIDstringThe user’s session ID. This should be the same value for the same session/user combination.
isTestModeBoolIf true, the signal will be excluded from production queries. Defaults to false.
floatValuenumberA numeric measurement. Use for any numeric operations, such as building averages or sums.
payloadobjectA JSON object with additional data.

Payload

The payload object can contain data you want to send to TelemetryDeck. It must be a JSON object containing primitives. Here’s an example:

{
  "appID": "AAAA-BBBBBBBB-CCCC-DDDD",
  "clientUser": "myClientUserHash",
  "type": "Curl.Development.apiCall",
  "sessionID": "mySessionID",
  "isTestMode": false,
  "floatValue": 3.14159,
  "payload": {
    "TelemetryDeck.RunContext.locale": "en_US",
    "TelemetryDeck.Device.architecture": "x86_64"
  }
}

Payload keys should be in the format Scope.OptionalSubScope.key, with the scopes capitalized and the key starting with a lowercase letter. This is not enforced but helps you organize your payload dimensions and fit in better with TelemetryDeck’s internal payload keys.

The value can be any primitive JSON value, but we’ll convert it to a string before storing it, except for a number of special cases that are stored as their original type.

The payload should not contain nested objects. The behavior of arrays of strings is left undefined and should be avoided (except if you have a deep knowledge of multi-value dimensions in Apache Druid).

Numeric Values

The floatValue field is a top-level property on the signal object (see the optional properties table above). It is not part of the payload object. Use it for any numeric operations such as building averages or adding up values.

Reserved Payload Keys

Some payload keys are reserved for internal use by TelemetryDeck. See the complete list of reserved parameters which you’re not allowed to include in the payload.

In general, avoid using parameter names that begin with the TelemetryDeck. scope, as this is reserved for parameters set by TelemetryDeck SDKs and the ingestion server.