Create an Event Subscription
POST
- user: The subscribed user provided by the current authorization context.
- self: The created subscription.
Request URI
POST https://sandboxapi.deere.com/platform/eventSubscriptions
Accept: application/vnd.deere.axiom.v3+json
Parameters
Parameter | Type | Description & Example | Default | In |
---|---|---|---|---|
eventTypeId Required | string | See Event Types for valid event type names. Example: heartbeat | N/A | request |
filters1 Depends on eventType2 | array | List of MetadataFilters to filter events on metadata. Example: See sample request below | N/A | request |
targetEndpoint Required | --- | The postback endpoint that receives the event(s). Example: See sample request below | N/A | request |
status4 | string | The status of the event subscription. Only a status of Active can be specified on subscription creation. Example: Active | Active | request |
displayName | string | Human-readable name to easily identify the event subscription. Example: My Data Subscription | N/A | request |
token | string | A string that was sent with each delivery to validate the sender. Example: Follows pattern '^[A-Za-z0-9+/=]{0,256}$' | N/A | request |
Response Details
Field | Type | Description & Example |
---|---|---|
id | string | Event Subscription ID as a GUID. Example: 83ks9gh3-29fj-9302-837j-92jlsk92jd095kd |
eventTypeId | string | See Event Types for valid event names Example: heartbeat |
filters1 | array | List of MetadataFilters to filter events on metadata. Example: See the sample response below |
targetEndpoint3 | --- | The postback endpoint that receives the event(s). Example: See the sample response below |
status4 | string | The status of the event subscription. Example: Active |
displayName | string | Human-readable name to easily identify the event subscription. Example: My Data Subscription |
clientKey | string | The client key used to create the subscription. Example: johndeere-1234567898765432123456789876543212345678 |
token | string | A string that was sent with each delivery to validate the sender. Example: Follows pattern '^[A-Za-z0-9+/=]{0,256}$' |
links | array | Links to other resources. Example: See the sample response below |
Sample Request [JSON]
{ "eventTypeId": "fieldOperation", "filters": [ { "key": "orgId", "values": [ "123456" ] }, { "key": "fieldOperationType", "values": [ "seeding" ] }, { "key": "cropSeason", "values": [ "2017", "2018" ] }, { "key": "fieldId", "values": [ "12345" ] } ], "targetEndpoint": { "targetType": "https", "uri": "https://example.com/api/receiveEvents" }, "status": "Active", "displayName": "Org 123456 Seeding Field Ops Subscription", "token": "wVaS=dWgjKTyCg=g3RbDj0V51MWgG+ges9SVvpgIYlbOO2aqBqtSuivWonJY31vrSzf" }
Sample Response [JSON]
{ "id": "ae4b499c-1111-2222-3333-d7498cd7d9dd", "eventTypeId": "fieldOperation", "filters": [ { "key": "orgId", "values": [ "123456" ] }, { "key": "fieldOperationType", "values": [ "seeding" ] }, { "key": "cropSeason", "values": [ "2017", "2018" ] }, { "key": "fieldId", "values": [ "12345" ] } ], "targetEndpoint": { "targetType": "https", "uri": "https://website.com/api/receiveEvents" }, "status": "Active", "displayName": "Org 123456 Seeding Field Ops Subscription", "clientKey": "deere-1234567898765432123456789876543212345678", "token": "wVaS=dWgjKTyCg=g3RbDj0V51MWgG+ges9SVvpgIYlbOO2aqBqtSuivWonJY31vrSzf", "links": [ { "rel": "self", "uri": "https://sandboxapi.deere.com/platform/eventSubscriptions/ae4b499c-1111-2222-3333-d7498cd7d9dd" } ] }