Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
naiades
naiades-platform-poc
Commits
af988f02
Commit
af988f02
authored
Sep 03, 2021
by
Cédric Crettaz
🖥
Browse files
Upload script for WeatherForecast subscription.
parent
e50b0d02
Changes
1
Hide whitespace changes
Inline
Side-by-side
historic_07_set_up.sh
0 → 100644
View file @
af988f02
#!/usr/bin/env bash
[[
-z
"
$ORION_HOST
"
]]
&&
echo
"Please set ORION_HOST env var. E.g. export ORION_HOST=127.0.0.1"
&&
exit
echo
"Querying context broker at:
${
ORION_HOST
}
"
# API NOTES:
# "condition": { "attrs": [] } -> means monitor all the attributes in the entity
curl
--location
--request
POST
\
"http://
$ORION_HOST
:1026/v2/subscriptions/"
\
--header
"Fiware-Service: carouge"
\
--header
"Content-Type: application/json"
\
--header
"Accept: application/json"
\
--data
'{
"description": "Notify QuantumLeap, the historic API, of all WeatherForecast changes",
"subject": {
"entities": [
{
"idPattern": ".*",
"type": "WeatherForecast"
}
]
},
"notification": {
"http": {
"url": "http://172.18.1.7:8668/v2/notify"
},
"attrs": [],
"metadata": ["dateCreated", "dateModified"]
}
}'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment