Commit e627bdbd authored by canterafonsj's avatar canterafonsj
Browse files

Entity Temporal

parent 1b502d2e
...@@ -156,8 +156,8 @@ ...@@ -156,8 +156,8 @@
} }
}, },
"post": { "post": {
"description": "Create temporal representation of an Entity within an NGSI-LD system", "description": "Create or update temporal representation of an Entity within an NGSI-LD system",
"operationId": "createEntityTemporal", "operationId": "createUpdateEntityTemporal",
"requestBody": { "requestBody": {
"required": true, "required": true,
"content": { "content": {
...@@ -177,6 +177,9 @@ ...@@ -177,6 +177,9 @@
"201": { "201": {
"description": "Created. Contains the resource URI of the created Entity" "description": "Created. Contains the resource URI of the created Entity"
}, },
"204": {
"description": "Updated. No Content"
},
"400": { "400": {
"description": "Bad request", "description": "Bad request",
"content": { "content": {
......
{ {
"openapi": "3.0.1", "openapi": "3.0.1",
"info": { "info": {
"title": "NGSI-LD Entity Attributes", "title": "NGSI-LD Temporal Entity Attributes",
"version": "latest" "version": "latest"
}, },
"components": { "components": {
...@@ -25,16 +25,14 @@ ...@@ -25,16 +25,14 @@
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Name" "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Name"
} }
}, },
"options": { "instanceId": {
"name": "options", "name": "instanceId",
"description": "Indicates that no attribute overwrite shall be performed", "description": "Instance Id",
"in": "query", "in": "path",
"required": false, "required": true,
"schema": { "schema": {
"type": "string", "type": "string",
"enum": [ "format": "uri"
"noOverwrite"
]
} }
} }
} }
...@@ -42,14 +40,11 @@ ...@@ -42,14 +40,11 @@
"paths": { "paths": {
"/temporal/entities/{entityId}/attrs/": { "/temporal/entities/{entityId}/attrs/": {
"post": { "post": {
"description": "Append new Entity attributes to an existing Entity within an NGSI-LD system", "description": "Add new attributes to an existing Temporal Entity within an NGSI-LD system",
"operationId": "appendEntityAttrs", "operationId": "addTemporalEntityAttrs",
"parameters": [ "parameters": [
{ {
"$ref": "#/components/parameters/entityId" "$ref": "#/components/parameters/entityId"
},
{
"$ref": "#/components/parameters/options"
} }
], ],
"requestBody": { "requestBody": {
...@@ -57,7 +52,7 @@ ...@@ -57,7 +52,7 @@
"content": { "content": {
"application/json;application/ld+json": { "application/json;application/ld+json": {
"schema": { "schema": {
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/EntityFragment" "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/temporal/EntityTemporal.json#/definitions/EntityTemporalFragment"
} }
} }
} }
...@@ -66,16 +61,6 @@ ...@@ -66,16 +61,6 @@
"204": { "204": {
"description": "No Content" "description": "No Content"
}, },
"207": {
"description": "Partial Success. Only the attributes included in the response payload were successfully appended",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/UpdateResult.json#"
}
}
}
},
"400": { "400": {
"description": "Bad request", "description": "Bad request",
"content": { "content": {
...@@ -97,39 +82,24 @@ ...@@ -97,39 +82,24 @@
} }
} }
} }
}, }
"patch": { },
"description": "Update existing Entity attributes within an NGSI-LD system", "/temporal/entities/{entityId}/attrs/{attrId}": {
"operationId": "updateEntityAttrs", "delete": {
"description": "Attribute from Temporal Representation of Entity deletion",
"operationId": "removeEntityTemporalAttr",
"parameters": [ "parameters": [
{ {
"$ref": "#/components/parameters/entityId" "$ref": "#/components/parameters/entityId"
},
{
"$ref": "#/components/parameters/attrId"
} }
], ],
"requestBody": {
"required": true,
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/EntityFragment"
}
}
}
},
"responses": { "responses": {
"204": { "204": {
"description": "No Content." "description": "No Content."
}, },
"207": {
"description": "Partial Success. Only the attributes included in the response payload were successfully updated",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/UpdateResult.json#"
}
}
}
},
"400": { "400": {
"description": "Bad Request", "description": "Bad Request",
"content": { "content": {
...@@ -153,16 +123,19 @@ ...@@ -153,16 +123,19 @@
} }
} }
}, },
"/temporal/entities/{entityId}/attrs/{attrId}": { "/temporal/entities/{entityId}/attrs/{attrId}/{instanceId}": {
"patch": { "patch": {
"description": "Update existing Entity attributes within an NGSI-LD system", "description": "Allows modifying a specific Attribute (Property or Relationship) instance, identified by its instanceId, of a Temporal Representation of an Entity.",
"operationId": "partialAttrUpdate", "operationId": "modifyEntityTemporalAttrInstance",
"parameters": [ "parameters": [
{ {
"$ref": "#/components/parameters/entityId" "$ref": "#/components/parameters/entityId"
}, },
{ {
"$ref": "#/components/parameters/attrId" "$ref": "#/components/parameters/attrId"
},
{
"$ref": "#/components/parameters/instanceId"
} }
], ],
"requestBody": { "requestBody": {
...@@ -170,17 +143,17 @@ ...@@ -170,17 +143,17 @@
"content": { "content": {
"application/json;application/ld+json": { "application/json;application/ld+json": {
"schema": { "schema": {
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/EntityFragment" "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/temporal/EntityTemporal.json#/definitions/EntityTemporalFragment"
} }
} }
} }
}, },
"responses": { "responses": {
"204": { "204": {
"description": "No Content." "description": "No Content"
}, },
"400": { "400": {
"description": "Bad Request", "description": "Bad request",
"content": { "content": {
"application/json;application/ld+json": { "application/json;application/ld+json": {
"schema": { "schema": {
...@@ -202,14 +175,17 @@ ...@@ -202,14 +175,17 @@
} }
}, },
"delete": { "delete": {
"description": "Removes an existing Entity attribute within an NGSI-LD system", "description": "Attribute Instance deletion by instance id.",
"operationId": "removeEntityAttr", "operationId": "removeEntityTemporalAttrInstance",
"parameters": [ "parameters": [
{ {
"$ref": "#/components/parameters/entityId" "$ref": "#/components/parameters/entityId"
}, },
{ {
"$ref": "#/components/parameters/attrId" "$ref": "#/components/parameters/attrId"
},
{
"$ref": "#/components/parameters/instanceId"
} }
], ],
"responses": { "responses": {
......
Supports Markdown
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