GeographicaGS / fiware-sth-playground

Testing area and simulations with Fiware Short Time Historic (aka Fiware Comet).
1 stars 1 forks source link

Service and Service-path #1

Open juliozinga opened 6 years ago

juliozinga commented 6 years ago

Hi, First, congratulations on the fiware sth test space, because of it I learned STH-COMET this night. Now I would like to make my contribution so that others can test it. All the manage of a object/item (create entity, update entity, create subscribe). Example: https://github.com/GeographicaGS/fiware-sth-playground/blob/master/fiware-orion/scripts/contextbroker_entitycreation.sh

Need more two headers: --header "Fiware-Service: orion" --header "Fiware-ServicePath: /ufpb" Them, da code of contextbroker_entitycreation.sh

creating entity

curl -X POST localhost:1026/v1/updateContext -s -S --header "Fiware-Service: orion" --header "Fiware-ServicePath: /compose" --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ "contextElements": [ { "type": "entGeoTest", "isPattern": "false", "id": "entGeoTest:da01", "attributes": [ { "name": "s", "type": "float", "value": "2.1" }, { "name": "f", "type": "float", "value": "467.9" } ] } ], "updateAction": "APPEND" }'

Query entity created

curl localhost:1026/v1/contextEntities/entGeoTest:da01

curl localhost:1026/v1/contextEntities

cayetanobv commented 6 years ago

Hi @juliozinga ,

Is it your your request to add these two headers to contextbroker_entitycreation.sh script? You could do it through a Pull Request.

Thanks for all!

juliozinga commented 6 years ago

These examples were easy and didactic. I believe other learners will use it. However, I need to make this setting for execution to be complete.

cayetanobv commented 6 years ago

Ok @juliozinga , you can do a PR and I review and merge your changes.