Skip to content

Commit 107a5f4

Browse files
committed
README: Vehicle Events API
1 parent cc205c7 commit 107a5f4

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,28 @@ my_query = """
209209
total_network_vehicles = dimo.identity.query(query=my_query)
210210
```
211211

212+
### Vehicle Events API (DIMO Webhooks)
213+
214+
The SDK supports calls to the Vehicle Events API, including: registering a new webhook, subscribing and unsubscribing vehicles, checking vehicles subscribed to a specific webhook, and more. To view all the available methods, check out the [Vehicle Events API Documentation here](https://docs.dimo.org/developer-platform/vehicle-events-api-webhooks).
215+
216+
Here's a sample of how you might register a new webhook:
217+
218+
```python
219+
220+
new_webhook_config = {
221+
"service": "Telemetry",
222+
"data": "powertrainTransmissionTravelledDistance",
223+
"trigger": "valueNumber > 10000",
224+
"setup": "Realtime",
225+
"description": "Trigger when odometer above 10000 km",
226+
"target_uri": "https://my-target-uri.com/webhook",
227+
"status": "Active",
228+
"verification_token": "abc"
229+
}
230+
231+
dimo.vehicle_events.register_webhook(developer_jwt=dev_jwt, request=new_webhook_config)
232+
```
233+
212234
## How to Contribute to the SDK
213235

214236
You can read more about contributing [here](https://github.com/DIMO-Network/dimo-python-sdk/blob/dev-barrettk/CONTRIBUTING.md)

0 commit comments

Comments
 (0)