Commit 22411716 authored by canterafonsj's avatar canterafonsj
Browse files

API Examples from WI-009

parent 2c728a4f
Loading
Loading
Loading
Loading
+77 −0
Original line number Original line Diff line number Diff line
{
  "id": "urn:ngsi-ld:ContextSourceRegistration:csr1a3456",
  "type": "ContextSourceRegistration",
  "information": [
    {
      "entities": [
        {
          "id": "urn:ngsi-ld:Vehicle:A456",
          "type": "Vehicle"
        }
      ],
      "properties": [
        "brandName",
        "speed"
      ],
      "relationships": [
        "isParked"
      ]
    },
    {
      "entities": [
        {
          "idPattern": ".*downtown$",
          "type": "OffStreetParking"
        },
        {
          "idPattern": ".*47$",
          "type": "OffStreetParking"
        }
      ],
      "properties": [
        "availableSotNumber",
        "totalSpotNumber"
      ],
      "relationships": [
        "isNextToBuilding"
      ]
    }
  ],
  "endpoint": "http://my.csource.org:1026",
  "location": {
    "type": "Polygon",
    "coordinates": [
      [
        [
          100.0,
          0.0
        ],
        [
          101.0,
          0.0
        ],
        [
          101.0,
          1.0
        ],
        [
          100.0,
          1.0
        ],
        [
          100.0,
          0.0
        ]
      ]
    ]
  },
  "timestamp": {
    "start": " 2017-11-29T14:53:15"
  },
  "@context": [
    "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/coreContext/ngsi-ld-core-context.json",
    "http://example.org/cim/commonTerms.jsonld",
    "http://example.org/cim/vehicle.jsonld",
    "http://example.org/cim/parking.jsonld"
  ]
}
+31 −0
Original line number Original line Diff line number Diff line
{
  "id": "urn:ngsi-ld:Vehicle:B9211",
  "type": "Vehicle",
  "brandName": [
    {
      "type": "Property",
      "value": "Volvo"
    }
  ],
  "speed": [
    {
      "type": "Property",
      "value": 120,
      "observedAt": "2018-08-01T12:03:00"
    },
    {
      "type": "Property",
      "value": 80,
      "observedAt": "2018-08-01T12:05:00"
    },
    {
      "type": "Property",
      "value": 100,
      "observedAt": "2018-08-01T12:07:00"
    }
  ],
  "@context": [
    "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/coreContext/ngsi-ld-core-context.json",
    "http://example.org/ngsi-ld/vehicle.jsonld"
  ]
}
+34 −0
Original line number Original line Diff line number Diff line
{
  "id": "urn:ngsi-ld:Vehicle:B9211",
  "type": "Vehicle",
  "brandName": {
    "type": "Property",
    "values": [
      [
        "Volvo",
        ""
      ]
    ]
  },
  "speed": {
    "type": "Property",
    "values": [
      [
        120,
        "2018-08-01T12:03:00"
      ],
      [
        80,
        "2018-08-01T12:05:00"
      ],
      [
        100,
        "2018-08-01T12:07:00"
      ]
    ]
  },
  "@context": [
    "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/coreContext/ngsi-ld-core-context.json",
    "http://example.org/ngsi-ld/vehicle.jsonld"
  ]
}
+36 −0
Original line number Original line Diff line number Diff line
{
  	"id": "urn:ngsi-ld:OffStreetParking:Downtown1",
  	"type": "OffStreetParking",
	"name": {
		"type": "Property",
    	"value": "Downtown One"
	},
  	"availableSpotNumber": {
    	"type": "Property",
    	"value": 121,
		"observedAt": "2017-07-29T12:05:02",
    	"reliability": {
      		"type": "Property",
      		"value": 0.7
    	},
    	"providedBy": {
       		"type": "Relationship",
       		"object": "urn:ngsi-ld:Camera:C1"
    	}
	},
	"totalSpotNumber": {
    	"type": "Property",
    	"value": 200
	},
	"location": {
		"type": "GeoProperty",
		"value": {
			"type": "Point",
			"coordinates": [-8.5, 41.2]
		}
	},
	"@context": [
		"http://uri.etsi.org/ngsi-ld/coreContext.jsonld",
		"http://example.org/cim/parking.jsonld"
	]
}
+15 −0
Original line number Original line Diff line number Diff line
{
   	"id": "urn:ngsi-ld:OffStreetParking:Downtown1",
   	"type": "OffStreetParking",
	"name": "Downtown One",
   	"availableSpotNumber": 121,
	"totalSpotNumber": 200,
	"location": {
		"type": "Point",
		"coordinates": [-8.5, 41.2]
	},
	"@context": [
		"http://uri.etsi.org/ngsi-ld/coreContext.jsonld",
		"http://example.org/cim/parking.jsonld"
	]
}
Loading