import AgriFarm Smart Model Data into a FIWARE context broker #264
Labels
AgriFarm data
to import AgriFarm Smart Model Data into a FIWARE context broker
json-rest-apis-curl
Suggested skills: JSON REST APIs, curl
import AgriFarm Smart Model Data into a FIWARE context broker
Your mission, should you choose to accept it, is to import AgriFarm Smart Model Data into a FIWARE context broker.
Walk through Youtube videos related to your task
These Youtube videos have been carefully prepared to help you with this data import task:
More details about your task
Example payloads
section. Save an example JSON payload to a file like~/Downloads/AgriFarm1.json
. Then POST the Smart Model Data to the Context Broker with thecurl
command:curl -iX POST 'http://orion-ld-fiware.apps-crc.testing/v2/entities?options=keyValues' -H 'Content-Type: application/json' -d @$HOME/Downloads/AgriFarm1.json
if using aNGSI-v2 key-values Example
.curl -iX POST 'http://orion-ld-fiware.apps-crc.testing/v2/entities' -H 'Content-Type: application/json' -d @$HOME/Downloads/AgriFarm1.json
if using a NGSI-v2 normalized Example.id
andtype
fields in~/Downloads/AgriFarm1.json
, but keep track of the value of theid
field, because you will need it for the next part. Then PUT the Smart Model Data to the Context Broker with thecurl
command, but replace ENTITY_ID with theid
of the entity URL encoded:curl -iX PUT 'http://orion-ld-fiware.apps-crc.testing/v2/entities/ENTITIY_ID/attrs?options=keyValues' -H 'Content-Type: application/json' -d @$HOME/Downloads/AgriFarm1.json
if using aNGSI-v2 key-values Example
.curl -iX PUT 'http://orion-ld-fiware.apps-crc.testing/v2/entities/ENTITY_ID/attrs' -H 'Content-Type: application/json' -d @$HOME/Downloads/AgriFarm1.json
if using a NGSI-v2 normalized Example.The day of the operation is Thursday February 2nd, 2023
You will have 4 hours to complete your mission.
Work with Smart Data Models and the FIWARE Context broker in Europe
At the end of the day
Should you, or any of your force be taken or compromised that day, you must report back as many changes as you have made, and any knowledge of your actions, by pull request or comments on the issue on the board.
The details of your mission:
Entity: AgriFarm
Open License
document generated automatically
Global description: This entity contains a harmonised description of a generic farm made up of buildings and parcels. This entity is primarily associated with the agricultural vertical and related IoT applications.
version: 0.0.5
List of properties
address
: The mailing addressalternateName
: An alternative name for this itemareaServed
: The geographic area where a service or offered item is providedcontactPoint
: The details to contact with the item.dataProvider
: A sequence of characters identifying the provider of the harmonised data entity.dateCreated
: Entity creation timestamp. This will usually be allocated by the storage platform.dateModified
: Timestamp of the last modification of the entity. This will usually be allocated by the storage platform.description
: A description of this itemhasAgriParcel
: List of agri parcels belonging to the farmhasBuilding
: List of buildings belonging to the farmid
: Unique identifier of the entitylandLocation
: Geojson reference to the item. It can be Point, LineString, Polygon, MultiPoint, MultiLineString or MultiPolygonlocation
: Geojson reference to the item. It can be Point, LineString, Polygon, MultiPoint, MultiLineString or MultiPolygonname
: The name of this item.ownedBy
: Owner (Person or Organization) of the farmowner
: A List containing a JSON encoded sequence of characters referencing the unique Ids of the owner(s)relatedSource
: List of IDs the current entity may have in external applicationsseeAlso
: list of uri pointing to additional resources about the itemsource
: A sequence of characters giving the original source of the entity data as a URL. Recommended to be the fully qualified domain name of the source provider, or the URL to the source object.type
: NGSI Entity Type. It has to be AgriFarmRequired properties
id
type
Data Model description of properties
Sorted alphabetically (click for details)
full yaml details
Example payloads
AgriFarm NGSI-v2 key-values Example
Here is an example of a AgriFarm in JSON-LD format as key-values. This is compatible with NGSI-v2 when using
options=keyValues
and returns the context data of an individual entity.AgriFarm NGSI-v2 normalized Example
Here is an example of a AgriFarm in JSON-LD format as normalized. This is compatible with NGSI-v2 when not using options and returns the context data of an individual entity.
AgriFarm NGSI-LD key-values Example
Here is an example of a AgriFarm in JSON-LD format as key-values. This is compatible with NGSI-LD when using
options=keyValues
and returns the context data of an individual entity.AgriFarm NGSI-LD normalized Example
Here is an example of a AgriFarm in JSON-LD format as normalized. This is compatible with NGSI-LD when not using options and returns the context data of an individual entity.
See FAQ 10 to get an answer on how to deal with magnitude units
AgriFarm adopters
This message will not self destruct, because this project is open source.
The text was updated successfully, but these errors were encountered: