Skip to content

Commit b81bcfb

Browse files
authored
Merge pull request #136 from TelemetryDeck/docs/update-rest-api
Update the V2 Integration Page
2 parents 1f8b746 + b7368e0 commit b81bcfb

2 files changed

Lines changed: 22 additions & 31 deletions

File tree

.styles/config/vocabularies/Base/accept.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ anonymization
4848
glowy
4949
pseudonymization
5050
namespaced
51+
namespace
5152
Bool
5253
Vue
5354
(npm|NPM)
@@ -71,4 +72,4 @@ SDKs
7172
Walkthrough
7273
multiple
7374
unpublished
74-
UUID
75+
UUID

ingest/v2.md

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
---
22
title: Ingest API v2
33
tags: overview
4-
description: Use the TelemetryDeck Ingest API to send signals to TelemetryDeck
5-
lead: Use the TelemetryDeck Ingest API to send signals to TelemetryDeck
4+
description: Use the TelemetryDeck Ingest API to send events to TelemetryDeck
5+
lead: Use the TelemetryDeck Ingest API to send events to TelemetryDeck
66
order: 0
77
headerImage: /img/ingestv2.jpg
88
---
99

10-
Usually you'll send signals 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 signals directly to our Ingest API.
10+
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.
1111

1212
## Ingest Endpoint
1313

14-
Please send your signals as POST request to our ingestion server at `https://nom.telemetrydeck.com/v2/`, with the headers `Content-Type: application/json` and `charset=utf-8`.
14+
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`.
15+
16+
Replace `{namespace}` with your organization's TelemetryDeck namespace. You can find your namespace in the [TelemetryDeck Dashboard](https://dashboard.telemetrydeck.com/).
1517

1618
Here's an example in cURL:
1719

1820
```bash
19-
curl -X "POST" "https://nom.telemetrydeck.com/v2/" \
21+
curl -X "POST" "https://nom.telemetrydeck.com/v2/namespace/your-namespace/" \
2022
-H 'Content-Type: application/json; charset=utf-8' \
2123
-d $'[
2224
{
@@ -29,20 +31,21 @@ curl -X "POST" "https://nom.telemetrydeck.com/v2/" \
2931

3032
## Body Structure
3133

32-
The post body should be an **array of JSON objects**, because you can send multiple signals at once. Each signal object **must** have these properties:
34+
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:
3335

3436
| Property | Type | Description |
3537
| ------------ | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
3638
| `appID` | string | Your app's ID |
3739
| `clientUser` | string | A hash of the user's ID. This should always be the same for the same user. |
38-
| `type` | string | The type of signal. While it is not enforced, we recommend structuring your signal names in name spaces separated by dots, with the signal type beginning with a lower case letter and any namespaced beginning with an uppercase letter. |
40+
| `type` | string | The 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. |
3941

4042
The following properties are optional:
4143

4244
| Property | Type | Description |
4345
| ------------ | ------ | ------------------------------------------------------------------------------------------- |
4446
| `sessionID` | string | The user's session ID. This should be the same value for the same session/user combination. |
4547
| `isTestMode` | Bool | If `true`, the signal will be excluded from production queries. Defaults to `false`. |
48+
| `floatValue` | number | A numeric measurement. Use for any numeric operations, such as building averages or sums. |
4649
| `payload` | object | A JSON object with additional data. |
4750

4851
## Payload
@@ -56,46 +59,33 @@ The `payload` object can contain data you want to send to TelemetryDeck. It must
5659
"type": "Curl.Development.apiCall",
5760
"sessionID": "mySessionID",
5861
"isTestMode": false,
62+
"floatValue": 3.14159,
5963
"payload": {
6064
"TelemetryDeck.RunContext.locale": "en_US",
61-
"TelemetryDeck.Device.architecture": "x86_64",
62-
"floatValue": 3.14159
65+
"TelemetryDeck.Device.architecture": "x86_64"
6366
}
6467
}
6568
```
6669

67-
Payload keys should be in the format `Namespace.OptionalSubNamespace.key`, with the name spaces 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.
70+
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.
6871

6972
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.
7073

7174
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](https://druid.apache.org/docs/latest/querying/multi-value-dimensions/)).
7275

73-
## Special Payload Values
74-
75-
The following payload values are not converted to strings, but need to be sent as their respective types:
76+
## Numeric Values
7677

77-
| Property | Type | Description |
78-
| ------------ | ----- | ------------------------------------------------------------------------------------------------------- |
79-
| `floatValue` | Float | A floating point number. Use for any numeric operations, such as building averages or adding up values. |
78+
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.
8079

8180
{% noteinfo "More special values" %}
82-
More special values are coming soon for internal use.
81+
More special top-level fields are coming soon for internal use.
8382

84-
- The ones being defined in [this PR](https://github.com/TelemetryDeck/docs/pull/85) need to be implemented server side first.
83+
- The ones being defined in [this PR](https://github.com/TelemetryDeck/docs/pull/85) need to be implemented server-side first.
8584
- We're preparing a number of special values specifically for metrics and crashes, but these need to be defined first.
8685
{% endnoteinfo %}
8786

88-
## Forbidden Payload Values
89-
90-
You are not allowed to send the following keys in the payload:
87+
## Reserved Payload Keys
9188

92-
- `count`
93-
- `type`
94-
- `appID`
95-
- `clientUser`
96-
- `__time`
97-
- `payload`
98-
- `platform`
99-
- `receivedAt`
89+
Some payload keys are reserved for internal use by TelemetryDeck. See the [complete list of reserved parameters](/docs/ingest/default-parameters/#reserved-parameters) which you're not allowed to include in the payload.
10090

101-
These keys are reserved for internal use. If you use them, we'll rename them on the server for you by prepending an underscore. For example, if you send `count`, we'll store it as `_count`.
91+
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.

0 commit comments

Comments
 (0)