Skip to content

Instantly share code, notes, and snippets.

@fgalan
Created January 13, 2016 18:19
Show Gist options
  • Save fgalan/f0f44d5113fa88e4825a to your computer and use it in GitHub Desktop.
Save fgalan/f0f44d5113fa88e4825a to your computer and use it in GitHub Desktop.
Subscription curl-based test
Resquest:
---------
(curl localhost:1026/v1/subscribeContext -s -S --header 'Content-Type: application/json' --header 'Accept: application/json' -d @- | python -mjson.tool) <<EOF
{
"entities": [
{
"type": "Location",
"isPattern": "false",
"id": "Device-1"
}
],
"reference": "http://52.31.144.170:5050/notify",
"duration": "PT10S",
"notifyConditions": [
{
"type": "ONCHANGE",
"condValues": [
"position"
]
}
],
"attributes": [
"position"
]
}
EOF
Response:
---------
{
"subscribeResponse": {
"duration": "PT10S",
"subscriptionId": "569694ee767b6bea04a0544e"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment