Commit 3b958f36 authored by canterafonsj's avatar canterafonsj

First Stab Entity By Id

parent dea7563e
[
{
"id": "urn:ngsi-ld:Vehicle:V123",
"type": "Vehicle",
"speed": {
"type": "Property",
"value": 23,
"accuracy": {
"type": "Property",
"value": 0.7
},
"providedBy": {
"type": "Relationship",
"object": "urn:ngsi-ld:Person:Bob"
}
},
"closeTo": {
"type": "Relationship",
"object": "urn:ngsi-ld:Building:B1234"
},
"location": {
"type": "GeoProperty",
"value": {
"type":"Point",
"coordinates": [-8,44]
}
}
}
]
......@@ -165,7 +165,7 @@
},
"examples": {
"simple": {
"externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/Entity-example.json"
"externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/EntityList-example.json"
}
}
}
......
{
"openapi": "3.0.1",
"info": {
"title": "NGSI-LD Entity By Id",
"version": "latest"
},
"components": {
"parameters": {
"entityId": {
"name": "entityId",
"description": "Entity Id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uri"
}
},
"type": {
"name": "type",
"description": "Entity Type",
"in": "query",
"required": false,
"schema": {
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Name"
}
},
"attrs": {
"name": "attrs",
"description": "Comma separated list of attribute names (properties or relationships) to be retrieved",
"in": "query",
"required": false,
"schema": {
"type": "string",
"minLength": 1
}
}
}
},
"paths": {
"/entities/{entityId}": {
"get": {
"description": "Retrieve an specific Entity from an NGSI-LD system. It's possible to specify the Entity attributes to be retrieved by using query parameters",
"operationId": "retrieveEntityById",
"parameters": [
{
"$ref": "#/components/parameters/entityId"
},
{
"$ref": "#/components/parameters/attrs"
},
{
"$ref": "#/components/parameters/type"
},
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#"
},
"examples": {
"simple": {
"externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/Entity-example.json"
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
}
}
}
}
}
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment