Commit 472993b6 authored by canterafonsj's avatar canterafonsj

Entity By Attributes

parent 5198143a
{
"openapi": "3.0.1",
"info": {
"title": "NGSI-LD Entity Attributes",
"version": "latest"
},
"components": {
"parameters": {
"entityId": {
"name": "entityId",
"description": "Entity Id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uri"
}
},
"attrId": {
"name": "attrId",
"description": "Attribute Id",
"in": "path",
"required": true,
"schema": {
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Name"
}
},
"options": {
"name": "options",
"description": "Indicates that no attribute overwrite shall be performed",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"noOverwrite"
]
}
}
}
},
"paths": {
"/entities/{entityId}/attrs/": {
"post": {
"description": "Append new Entity attributes to an existing Entity within an NGSI-LD system",
"operationId": "appendEntityAttrs",
"parameters": [
{
"$ref": "#/components/parameters/entityId"
},
{
"$ref": "#/components/parameters/options"
}
],
"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#"
}
}
}
},
"responses": {
"204": {
"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": {
"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"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
}
}
}
}
}
},
"patch": {
"description": "Update existing Entity attributes within an NGSI-LD system",
"operationId": "updateEntityAttrs",
"parameters": [
{
"$ref": "#/components/parameters/entityId"
}
],
"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#"
}
}
}
},
"responses": {
"204": {
"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": {
"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"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
}
}
}
}
}
}
},
"/entities/{entityId}/attrs/{attrId}": {
"patch": {
"description": "Update existing Entity attributes within an NGSI-LD system",
"operationId": "partialAttrUpdate",
"parameters": [
{
"$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#"
}
}
}
},
"responses": {
"204": {
"description": "No Content."
},
"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"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json;application/ld+json": {
"schema": {
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
}
}
}
}
}
},
"delete": {
"description": "Removes an existing Entity attribute within an NGSI-LD system",
"operationId": "removeEntityAttr",
"parameters": [
{
"$ref": "#/components/parameters/entityId"
},
{
"$ref": "#/components/parameters/attrId"
}
],
"responses": {
"204": {
"description": "No Content."
},
"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"
}
}
}
},
"404": {
"description": "Not Found",
"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