diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2e0e51c6d0ea7f0f78a3532d0fe1b312c25dc618..5faabfb7668b2d10dece16a1065f63c5ae363d0a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,24 +1,29 @@ -# This file is a template, and might need editing before it works on your project. -# Official framework image. Look for the different tagged releases at: -# https://hub.docker.com/r/library/node/tags/ -image: node::13.7-alpine - -# This folder is cached between builds -# http://docs.rep.com/ce/ci/yaml/README.html#cache -cache: - paths: - - node_modules/ before_script: - - yarn + - docker info stages: + - prepare - test +build: + stage: prepare + image: docker:19.03.12 + script: + - scripts/setBasePath.sh https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master http://localhost:8080 + - docker build -t ngsi-local -f docker/Dockerfile . + allow_failure: false + test: stage: test + image: docker:19.03.12 + services: + - ngsi-local script: - - echo "Running tests..." - - yarn test - allow_failure: true + - echo ${TEST} + - scripts/setBasePath.sh https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master http://localhost:9090 + - docker run --network host -i -v ${PWD}/:/data wistefan/redocly-openapi-cli bundle /data/spec/updated/ngsi-ld-spec-open-api.json -o /data/spec/updated/generated/full_api.json + - docker run --network host --rm -v ${PWD}/:/local openapitools/openapi-generator-cli validate -i /local/spec/updated/generated/full_api.json + allow_failure: false +# TODO: after gitlab update, the ci should publish the bundled api diff --git a/README.md b/README.md index 3d02808f6ee59cb056e80c35524e7728b45b1b1c..68c243d0628a0b8f680cf533ec3774a07a759a97 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,29 @@ This repository contains OpenAPI descriptions for the NGSI-LD interface defined To get an account on ETSI Forge and to learn how to contribute visit the [Forge Getting started wiki](https://forge.etsi.org/wiki/index.php/Get_started). -More info @ [CONTIBUTE](./CONTRIBUTE.md) +More info @ [CONTRIBUTE](./CONTRIBUTE.md) Change requests are managed using [Gerrit](https://forge.etsi.org/gerrit). +### Local editing +>:warning: The described setup requires [docker](https://docs.docker.com/engine/install/) to be installed. + +In order to edit the api locally, the script [runLocalDevEnv.sh](scripts/runLocalDevEnv.sh) can be used. When executed from the root of this repository, +it replaces all paths to the master branch inside [spec](spec) and [schema](schema) and serves them through a local file-server. Without that, all +references are resolved with 'https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master' and therefore changes will not be present locally. + +With the local file-server still running, you can build the bundled api via: + +``` +docker run --network host -it -v ${PWD}/:/data wistefan/redocly-openapi-cli bundle /data/spec/updated/ngsi-ld-spec-open-api.json -o /data/spec/updated/generated/full_api.json +``` +And validate it with: +``` +docker run --network host --rm -v ${PWD}/:/local openapitools/openapi-generator-cli validate -i /local/spec/updated/generated/full_api.json +``` + +When editing is finished, hit the enter button on your local dev env and push. + ## Report issues To report issues, bugs or requests please fill in a bug [at this location](https://forge.etsi.org/bugzilla/enter_bug.cgi?product=NGSI-LD). diff --git a/bundle/ngsild_swagger_combined.json b/bundle/ngsild_swagger_combined.json deleted file mode 100644 index 4c94a6ff513e05b778388110388ecd866b25f442..0000000000000000000000000000000000000000 --- a/bundle/ngsild_swagger_combined.json +++ /dev/null @@ -1,3052 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "description": "This OAS file describes the NGSI-LD API defined by the ETSI ISG CIM group. This Cross-domain Context Information Management API allows to provide, consume and subscribe to context information in multiple scenarios and involving multiple stakeholders", - "version": "latest", - "title": "ETSI ISG CIM / NGSI-LD API", - "contact": { - "email": "NGSI-LD@etsi.org" - } - }, - "externalDocs": { - "description": "Find out more about the ETSI ISG Context Information Management", - "url": "https://portal.etsi.org/tb.aspx?tbid=854&SubTB=854" - }, - "tags": [ - { - "name": "ETSI", - "description": "European Telecommunications Standards Institute", - "externalDocs": { - "description": "Find out more", - "url": "http://www.etsi.org" - } - }, - { - "name": "CIM", - "description": "Context Information Management", - "externalDocs": { - "description": "Find out more", - "url": "https://portal.etsi.org/tb.aspx?tbid=854&SubTB=854" - } - }, - { - "name": "JSON-LD", - "description": "JSON for Linked Data", - "externalDocs": { - "description": "Find out more", - "url": "https://json-ld.org/" - } - }, - { - "name": "NGSI-LD API", - "description": "API defined by the ETSI ISG CIM", - "externalDocs": { - "description": "Preliminary Specification", - "url": "http://www.etsi.org/deliver/etsi_gs/CIM/001_099/004/01.01.01_60/gs_CIM004v010101p.pdf" - } - } - ], - "paths": { - "/entities/": { - "get": { - "description": "Retrieve a set of entities which matches a specific query from an NGSI-LD system", - "operationId": "queryEntities", - "tags": [ - "Context Information" - ], - "parameters": [ - { - "name": "id", - "description": "Comma separated list of URIs to be retrieved", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "uri" - } - }, - { - "name": "idPattern", - "description": "Regular expression that must be matched by Entity ids", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "regexp" - } - }, - { - "name": "type", - "description": "Comma separated list of Entity type names to be retrieved", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "attrs", - "description": "Comma separated list of attribute names (properties or relationships) to be retrieved", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "q", - "description": "Query", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "georel", - "description": "Geo-relationship", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "enum": [ - "equals", - "disjoint", - "intersects", - "within", - "contains", - "overlaps" - ] - }, - { - "type": "string", - "pattern": "^near;((maxDistance==\\d+)|(minDistance==\\d+))$" - } - ] - } - }, - { - "name": "geometry", - "description": "Geometry", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "Point", - "MultiPoint", - "LineString", - "MultiLineString", - "Polygon", - "MultiPolygon" - ] - } - }, - { - "name": "coordinates", - "description": "Coordinates serialized as a string", - "in": "query", - "required": false, - "schema": { - "oneOf": [ - { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/position" - }, - { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/positionArray" - }, - { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/lineString" - }, - { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/polygon" - } - ] - } - }, - { - "name": "geoproperty", - "description": "The name of the property that contains the geo-spatial data that will be used to resolve the geoquery", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "csf", - "description": "Context Source Filter", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "limit", - "description": "Pagination limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1 - } - }, - { - "name": "options", - "description": "Options dictionary", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "keyValues", - "sysAttrs" - ] - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entityOperations~1create/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/EntityList-example.json" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "object", - "properties": { - "type": { - "type": "string", - "format": "uri" - }, - "title": { - "type": "string" - }, - "detail": { - "type": "string" - } - }, - "required": [ - "type" - ] - } - } - } - } - } - }, - "post": { - "description": "Create a new Entity within an NGSI-LD system", - "operationId": "createEntity", - "tags": [ - "Context Information" - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "allOf": [ - { - "required": [ - "id", - "type" - ] - }, - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - ] - } - } - } - }, - "responses": { - "201": { - "description": "Created. Contains the resource URI of the created Entity" - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "409": { - "description": "Already exists", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/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", - "tags": [ - "Context Information" - ], - "parameters": [ - { - "name": "entityId", - "description": "Entity Id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - }, - { - "name": "attrs", - "description": "Comma separated list of attribute names (properties or relationships) to be retrieved", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "type", - "description": "Entity Type", - "in": "query", - "required": false, - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - } - }, - { - "name": "options", - "description": "Options dictionary", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "keyValues", - "sysAttrs" - ] - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - }, - "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": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "delete": { - "description": "Removes an specific Entity from an NGSI-LD system", - "operationId": "removeEntityById", - "tags": [ - "Context Information" - ], - "parameters": [ - { - "$ref": "#/paths/~1entities~1%7BentityId%7D/get/parameters/0" - }, - { - "$ref": "#/paths/~1entities~1%7BentityId%7D/get/parameters/2" - } - ], - "responses": { - "204": { - "description": "No Content. The entity was removed successfully" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/entities/{entityId}/attrs/": { - "post": { - "description": "Append new Entity attributes to an existing Entity within an NGSI-LD system", - "operationId": "appendEntityAttrs", - "tags": [ - "Context Information" - ], - "parameters": [ - { - "name": "entityId", - "description": "Entity Id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - }, - { - "name": "options", - "description": "Indicates that no attribute overwrite shall be performed", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "noOverwrite" - ] - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "object", - "properties": { - "@context": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "string", - "format": "uri" - }, - { - "type": "array", - "minItems": 1, - "items": { - "anyOf": [ - { - "type": "string", - "format": "uri" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "location": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "GeoProperty" - }, - "value": { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location" - }, - "observedAt": { - "type": "string", - "format": "date-time" - }, - "createdAt": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/createdAt" - }, - "modifiedAt": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/modifiedAt" - }, - "datasetId": { - "type": "string", - "format": "uri" - }, - "instanceId": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "type", - "value" - ], - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/0" - }, - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/1" - } - ] - } - }, - "observationSpace": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location" - }, - "operationSpace": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location" - }, - "id": { - "type": "string", - "format": "uri" - }, - "type": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "modifiedAt": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": { - "anyOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "Property" - }, - "value": { - "type": [ - "string", - "number", - "boolean", - "array", - "object" - ] - }, - "observedAt": { - "$ref": "#/paths/~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/1/properties/location/properties/observedAt" - }, - "createdAt": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/createdAt" - }, - "modifiedAt": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/modifiedAt" - }, - "datasetId": { - "$ref": "#/paths/~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/1/properties/location/properties/datasetId" - }, - "instanceId": { - "$ref": "#/paths/~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/1/properties/location/properties/instanceId" - } - }, - "required": [ - "type", - "value" - ], - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/0" - }, - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/1" - } - ] - } - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "Relationship" - }, - "object": { - "type": "string", - "format": "uri" - }, - "observedAt": { - "$ref": "#/paths/~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/1/properties/location/properties/observedAt" - }, - "createdAt": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/createdAt" - }, - "modifiedAt": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/modifiedAt" - }, - "datasetId": { - "$ref": "#/paths/~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/1/properties/location/properties/datasetId" - }, - "instanceId": { - "$ref": "#/paths/~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/1/properties/location/properties/instanceId" - } - }, - "required": [ - "type", - "object" - ], - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/0" - }, - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/1" - } - ] - } - }, - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location" - } - ] - }, - "propertyNames": { - "type": "string", - "pattern": "^((\\d|[a-zA-Z]|_)+(:(\\d|[a-zA-Z]|_)+)?(#\\d+)?)$|^(@context)$" - } - } - } - } - }, - "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": { - "$schema": "http://json-schema.org/schema#", - "$id": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/UpdateResult.json", - "title": "NGSI-LD Update Result", - "description": "NGSI-LD Update Result", - "definitions": { - "NotUpdatedDetails": { - "attributeName": { - "type": "string", - "pattern": "" - }, - "reason": { - "type": "string", - "minLenght": 1 - } - }, - "UpdateResult": { - "type": "object", - "properties": { - "updated": { - "type": "array", - "items": { - "type": "string", - "pattern": "" - } - }, - "notUpdated": { - "type": "array", - "items": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/responses/207/content/application~1json%3Bapplication~1ld%2Bjson/schema/definitions/NotUpdatedDetails" - } - } - } - } - }, - "allOf": [ - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/responses/207/content/application~1json%3Bapplication~1ld%2Bjson/schema/definitions/UpdateResult" - } - ] - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "patch": { - "description": "Update existing Entity attributes within an NGSI-LD system", - "operationId": "updateEntityAttrs", - "tags": [ - "Context Information" - ], - "parameters": [ - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "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": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/responses/207/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/entities/{entityId}/attrs/{attrId}": { - "patch": { - "description": "Update existing Entity attributes within an NGSI-LD system", - "operationId": "partialAttrUpdate", - "tags": [ - "Context Information" - ], - "parameters": [ - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0" - }, - { - "name": "attrId", - "description": "Attribute Id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "responses": { - "204": { - "description": "No Content." - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "delete": { - "description": "Removes an existing Entity attribute within an NGSI-LD system", - "operationId": "removeEntityAttr", - "tags": [ - "Context Information" - ], - "parameters": [ - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0" - }, - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1%7BattrId%7D/patch/parameters/1" - } - ], - "responses": { - "204": { - "description": "No Content." - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/subscriptions/": { - "get": { - "description": "Retrieves the subscriptions available in an NGSI-LD system", - "operationId": "retrieveSubscriptions", - "tags": [ - "Context Subscription" - ], - "parameters": [ - { - "name": "limit", - "description": "Pagination limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1 - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/paths/~1subscriptions~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/SubscriptionList-example.json" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "post": { - "description": "Creates a new Subscription within an NGSI-LD system", - "operationId": "createSubscription", - "tags": [ - "Context Subscription" - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "allOf": [ - { - "$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/patch/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uri" - }, - "type": { - "type": "string", - "const": "Subscription" - }, - "notification": { - "type": "object", - "properties": { - "attributes": { - "type": "array", - "minItems": 1, - "items": { - "type": "string", - "minLength": 1 - }, - "uniqueItems": true - }, - "format": { - "type": "string" - }, - "endpoint": { - "type": "object", - "required": [ - "uri" - ], - "properties": { - "uri": { - "type": "string", - "format": "uri" - }, - "accept": { - "type": "string", - "enum": [ - "application/json", - "application/ld+json" - ] - } - } - }, - "status": { - "type": "string", - "enum": [ - "ok", - "failed" - ] - }, - "timesSent": { - "type": "number", - "minimum": 1 - }, - "lastNotification": { - "type": "string", - "format": "date-time" - }, - "lastFailure": { - "type": "string", - "format": "date-time" - }, - "lastSuccess": { - "type": "string", - "format": "date-time" - } - }, - "required": [ - "endpoint" - ] - }, - "status": { - "type": "string", - "enum": [ - "active", - "paused", - "expired" - ] - }, - "createdAt": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/createdAt" - }, - "modifiedAt": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/modifiedAt" - } - }, - "allOf": [ - { - "required": [ - "id", - "type", - "notification" - ] - }, - { - "anyOf": [ - { - "required": [ - "entities" - ] - }, - { - "required": [ - "watchedAttributes" - ] - } - ] - } - ] - } - ] - } - } - } - }, - "responses": { - "201": { - "description": "Created. Contains the resource URI of the created Subscription" - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "409": { - "description": "Already exists", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/subscriptions/{subscriptionId}": { - "get": { - "description": "Retrieves a specific Subscription from an NGSI-LD system", - "operationId": "retrieveSubscription", - "tags": [ - "Context Subscription" - ], - "parameters": [ - { - "name": "subscriptionId", - "description": "Subscription Id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1subscriptions~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/Subscription-example_C.4.json" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "patch": { - "description": "Updates a specific Subscription within an NGSI-LD system", - "operationId": "updateSubscription", - "tags": [ - "Context Subscription" - ], - "parameters": [ - { - "$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/get/parameters/0" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "object", - "properties": { - "@context": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/%40context" - }, - "entities": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uri" - }, - "type": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - }, - "idPattern": { - "type": "string", - "format": "regex" - } - }, - "required": [ - "type" - ] - }, - "minItems": 1 - }, - "name": { - "type": "string", - "minLength": 1 - }, - "description": { - "type": "string", - "minLength": 1 - }, - "watchedAttributes": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - }, - "uniqueItems": true - }, - "timeInterval": { - "type": "number", - "minimum": 0 - }, - "expires": { - "type": "string", - "format": "date-time" - }, - "isActive": { - "type": "boolean" - }, - "throttling": { - "type": "number", - "minimum": 1 - }, - "q": { - "type": "string" - }, - "geoQ": { - "type": "object", - "required": [ - "geometry", - "coordinates", - "georel" - ], - "properties": { - "georel": { - "$ref": "#/paths/~1entities~1/get/parameters/5/schema" - }, - "coordinates": { - "$ref": "#/paths/~1entities~1/get/parameters/7/schema" - }, - "geometry": { - "$ref": "#/paths/~1entities~1/get/parameters/6/schema" - } - } - }, - "csf": { - "type": "string" - } - } - } - } - } - }, - "responses": { - "204": { - "description": "No Content. The Subscription was updated successfully" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "delete": { - "description": "Removes a specific Subscription from an NGSI-LD system", - "operationId": "removeSubscription", - "tags": [ - "Context Subscription" - ], - "parameters": [ - { - "$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/get/parameters/0" - } - ], - "responses": { - "204": { - "description": "No Content. The Subscription was removed successfully" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/csourceRegistrations/": { - "get": { - "description": "Retrieve a set of context sources which matches a specific query from an NGSI-LD system", - "operationId": "queryCsources", - "tags": [ - "Context Sources" - ], - "parameters": [ - { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/0" - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/1" - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/2" - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/3" - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/4" - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/5" - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/6" - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/7" - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/8" - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/14" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/ContextSourceRegistrationList-example.json" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "post": { - "description": "Registers a new context source within an NGSI-LD system", - "operationId": "registerCsource", - "tags": [ - "Context Sources" - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "allOf": [ - { - "type": "object", - "properties": { - "@context": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/%40context" - }, - "information": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "anyOf": [ - { - "required": [ - "entities" - ] - }, - { - "required": [ - "properties" - ] - }, - { - "required": [ - "relationships" - ] - } - ], - "properties": { - "entities": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/patch/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/entities/items" - } - }, - "properties": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - }, - "uniqueItems": true - }, - "relationships": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - }, - "uniqueItems": true - } - } - } - }, - "observationInterval": { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/managementInterval" - }, - "managementInterval": { - "type": "object", - "required": [ - "start" - ], - "properties": { - "start": { - "type": "string", - "format": "date-time" - }, - "end": { - "type": "string", - "format": "date-time" - } - } - }, - "location": { - "$schema": "http://json-schema.org/draft-04/schema#", - "$id": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json", - "title": "geometry", - "description": "One geometry as defined by GeoJSON. Licensed as per original source is https://github.com/fge/sample-json-schemas/blob/master/geojson/geometry.json", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "oneOf": [ - { - "title": "Point", - "properties": { - "type": { - "enum": [ - "Point" - ] - }, - "coordinates": { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/position" - } - } - }, - { - "title": "MultiPoint", - "properties": { - "type": { - "enum": [ - "MultiPoint" - ] - }, - "coordinates": { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/positionArray" - } - } - }, - { - "title": "LineString", - "properties": { - "type": { - "enum": [ - "LineString" - ] - }, - "coordinates": { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/lineString" - } - } - }, - { - "title": "MultiLineString", - "properties": { - "type": { - "enum": [ - "MultiLineString" - ] - }, - "coordinates": { - "type": "array", - "items": { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/lineString" - } - } - } - }, - { - "title": "Polygon", - "properties": { - "type": { - "enum": [ - "Polygon" - ] - }, - "coordinates": { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/polygon" - } - } - }, - { - "title": "MultiPolygon", - "properties": { - "type": { - "enum": [ - "MultiPolygon" - ] - }, - "coordinates": { - "type": "array", - "items": { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/polygon" - } - } - } - } - ], - "definitions": { - "position": { - "description": "A single position", - "type": "array", - "minItems": 2, - "items": [ - { - "type": "number" - }, - { - "type": "number" - } - ], - "additionalItems": false - }, - "positionArray": { - "description": "An array of positions", - "type": "array", - "items": { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/position" - } - }, - "lineString": { - "description": "An array of two or more positions", - "allOf": [ - { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/positionArray" - }, - { - "minItems": 2 - } - ] - }, - "linearRing": { - "description": "An array of four positions where the first equals the last", - "allOf": [ - { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/positionArray" - }, - { - "minItems": 4 - } - ] - }, - "polygon": { - "description": "An array of linear rings", - "type": "array", - "items": { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/linearRing" - } - } - } - }, - "observationSpace": { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location" - }, - "operationSpace": { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location" - }, - "expires": { - "type": "string", - "format": "date-time" - }, - "name": { - "type": "string", - "minLength": 1 - }, - "description": { - "type": "string", - "minLength": 1 - }, - "endpoint": { - "type": "string", - "format": "uri" - } - }, - "additionalProperties": { - "type": [ - "string", - "number", - "boolean", - "array", - "object" - ] - } - }, - { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uri" - }, - "type": { - "type": "string", - "const": "ContextSourceRegistration" - }, - "createdAt": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/createdAt" - }, - "modifiedAt": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/modifiedAt" - } - }, - "required": [ - "id", - "type", - "endpoint", - "information" - ] - } - ] - } - } - } - }, - "responses": { - "201": { - "description": "Created. Contains the resource URI of the created Registration" - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "409": { - "description": "Already exists", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/csourceRegistrations/{registrationId}": { - "get": { - "description": "Retrieves a specific context source registration from an NGSI-LD system", - "operationId": "retrieveCsource", - "tags": [ - "Context Sources" - ], - "parameters": [ - { - "name": "registrationId", - "description": "Registration Id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "delete": { - "description": "Removes an specific context source registration within an NGSI-LD system", - "operationId": "removeCsource", - "tags": [ - "Context Sources" - ], - "parameters": [ - { - "$ref": "#/paths/~1csourceRegistrations~1%7BregistrationId%7D/get/parameters/0" - } - ], - "responses": { - "204": { - "description": "No Content. The Registration was removed successfully" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/csourceSubscriptions/": { - "get": { - "description": "Retrieves the context source discovery subscriptions available in an NGSI-LD system", - "operationId": "retrieveCSourceSubscriptions", - "tags": [ - "Context Sources" - ], - "parameters": [ - { - "name": "limit", - "description": "Pagination limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1 - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1subscriptions~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema" - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/SubscriptionList-example.json" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "post": { - "description": "Creates a context source discovery Subscription within an NGSI-LD system", - "operationId": "createCSourceSubscription", - "tags": [ - "Context Sources" - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1subscriptions~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "responses": { - "201": { - "description": "Created. Contains the resource URI of the created Subscription" - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "409": { - "description": "Already exists", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/csourceSubscriptions/{subscriptionId}": { - "get": { - "description": "Retrieves a specific Subscription from an NGSI-LD system", - "operationId": "retrieveSubscription", - "tags": [ - "Context Sources" - ], - "parameters": [ - { - "name": "subscriptionId", - "description": "Subscription Id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1subscriptions~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/Subscription-example_C.4.json" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "patch": { - "description": "Updates a specific context source discovery Subscription within an NGSI-LD system", - "operationId": "updateCSourceSubscription", - "tags": [ - "Context Sources" - ], - "parameters": [ - { - "$ref": "#/paths/~1csourceSubscriptions~1%7BsubscriptionId%7D/get/parameters/0" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/patch/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "responses": { - "204": { - "description": "No Content. The Subscription was updated successfully" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "delete": { - "description": "Removes a specific Context Source Subscription from an NGSI-LD system", - "operationId": "removeCSourceSubscription", - "tags": [ - "Context Sources" - ], - "parameters": [ - { - "$ref": "#/paths/~1csourceSubscriptions~1%7BsubscriptionId%7D/get/parameters/0" - } - ], - "responses": { - "204": { - "description": "No Content. The Subscription was removed successfully" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/entityOperations/create": { - "post": { - "description": "Batch Entity creation", - "operationId": "batchEntityCreation", - "tags": [ - "Batch Operations" - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "array", - "items": { - "type": "string", - "format": "uri" - } - }, - "error": { - "type": "array", - "items": { - "entityId": { - "type": "string", - "format": "uri" - }, - "error": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/entityOperations/update": { - "post": { - "description": "Batch Entity update", - "operationId": "batchEntityUpdate", - "tags": [ - "Batch Operations" - ], - "parameters": [ - { - "name": "options", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "noOverwrite" - ] - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entityOperations~1create/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entityOperations~1create/post/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/entityOperations/upsert": { - "post": { - "description": "Batch Entity upsert", - "operationId": "batchEntityUpsert", - "tags": [ - "Batch Operations" - ], - "parameters": [ - { - "name": "options", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "replace", - "update" - ] - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entityOperations~1create/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entityOperations~1create/post/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/entityOperations/delete": { - "post": { - "description": "Batch Entity delete", - "operationId": "batchEntityDelete", - "tags": [ - "Batch Operations" - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uri" - }, - "minItems": 1 - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entityOperations~1create/post/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/temporal/entities/": { - "get": { - "description": "Query temporal evolution of Entities from an NGSI-LD system", - "operationId": "queryTemporalEntities", - "tags": [ - "Temporal Evolution" - ], - "parameters": [ - { - "name": "id", - "description": "Comma separated list of URIs to be retrieved", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "uri" - } - }, - { - "name": "idPattern", - "description": "Regular expression that must be matched by Entity ids", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "regexp" - } - }, - { - "name": "type", - "description": "Comma separated list of Entity type names to be retrieved", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "attrs", - "description": "Comma separated list of attribute names (properties or relationships) to be retrieved", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "q", - "description": "Query", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "georel", - "description": "Geo-relationship", - "in": "query", - "required": false, - "schema": { - "$ref": "#/paths/~1entities~1/get/parameters/5/schema" - } - }, - { - "name": "geometry", - "description": "Geometry", - "in": "query", - "required": false, - "schema": { - "$ref": "#/paths/~1entities~1/get/parameters/6/schema" - } - }, - { - "name": "coordinates", - "description": "Coordinates serialized as a string", - "in": "query", - "required": false, - "schema": { - "$ref": "#/paths/~1entities~1/get/parameters/7/schema" - } - }, - { - "name": "geoproperty", - "description": "The name of the property that contains the geo-spatial data that will be used to resolve the geoquery", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "timerel", - "description": "Time relationship", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "before", - "after", - "between" - ] - } - }, - { - "name": "timeproperty", - "description": "The name of the property that contains the temporal data that will be used to resolve the temporal query", - "in": "query", - "required": false, - "schema": { - "type": "string", - "pattern": "^((\\d|[a-zA-Z]|_)+(:(\\d|[a-zA-Z]|_)+)?(#\\d+)?)$", - "minLength": 1, - "description": "NGSI-LD Name" - } - }, - { - "name": "time", - "description": "start time for temporal query", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "endTime", - "description": "end time for temporal query", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "csf", - "description": "Context Source Filter", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "limit", - "description": "Pagination limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1 - } - }, - { - "name": "options", - "description": "Options dictionary", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "temporalValues", - "sysAttrs" - ] - } - }, - { - "name": "lastN", - "description": "Only retrieve last N instances", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1 - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "array", - "items": { - "$schema": "http://json-schema.org/schema#", - "$id": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/temporal/EntityTemporal.json", - "title": "NGSI-LD Entity", - "description": "NGSI-LD Temporal Representation of an Entity", - "definitions": { - "EntityTemporalFragment": { - "type": "object", - "properties": { - "@context": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/%40context" - }, - "location": { - "type": "array", - "items": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location" - }, - "minItems": 1 - }, - "observationSpace": { - "type": "array", - "items": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location" - }, - "minItems": 1 - }, - "operationSpace": { - "type": "array", - "items": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location" - }, - "minItems": 1 - }, - "id": { - "type": "string", - "format": "uri" - }, - "type": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - }, - "createdAt": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/createdAt" - }, - "modifiedAt": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/modifiedAt" - } - }, - "additionalProperties": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/0" - }, - "minItems": 1 - }, - { - "type": "array", - "items": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/1" - }, - "minItems": 1 - }, - { - "type": "array", - "items": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location" - }, - "minItems": 1 - } - ] - }, - "propertyNames": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/propertyNames" - } - }, - "EntityTemporal": { - "allOf": [ - { - "type": "object", - "required": [ - "id", - "type" - ] - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/definitions/EntityTemporalFragment" - } - ] - } - }, - "allOf": [ - { - "$ref": "#/paths/~1temporal~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/definitions/EntityTemporal" - } - ] - } - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/EntityTemporalList-example.json" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "post": { - "description": "Create or update temporal representation of an Entity within an NGSI-LD system", - "operationId": "createUpdateEntityTemporal", - "tags": [ - "Temporal Evolution" - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/definitions/EntityTemporal" - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/EntityTemporal-example_C5.5.3.json" - } - } - } - } - }, - "responses": { - "201": { - "description": "Created. Contains the resource URI of the created Entity" - }, - "204": { - "description": "Updated. No Content" - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "409": { - "description": "Already exists", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/temporal/entities/{entityId}": { - "get": { - "description": "Retrieve the temporal representation of an specific Entity from an NGSI-LD system. It's possible to specify the Entity attributes to be retrieved by using query parameters", - "operationId": "retrieveEntityTemporalById", - "tags": [ - "Temporal Evolution" - ], - "parameters": [ - { - "name": "entityId", - "description": "Entity Id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - }, - { - "name": "attrs", - "description": "Comma separated list of attribute names (properties or relationships) to be retrieved", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "type", - "description": "Entity Type", - "in": "query", - "required": false, - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - } - }, - { - "name": "options", - "description": "Options dictionary", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "temporalValues", - "sysAttrs" - ] - } - }, - { - "name": "timerel", - "description": "Time relationship", - "in": "query", - "required": false, - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/9/schema" - } - }, - { - "name": "timeproperty", - "description": "The name of the property that contains the temporal data that will be used to resolve the temporal query", - "in": "query", - "required": false, - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - } - }, - { - "name": "time", - "description": "start time for temporal query", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "endTime", - "description": "end time for temporal query", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "lastN", - "description": "Only retrieve last N instances", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1 - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/definitions/EntityTemporal" - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/EntityTemporal-example_C5.5.3.json" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "delete": { - "description": "Removes the temporal representation of an Entity from an NGSI-LD system", - "operationId": "removeEntityTemporalById", - "tags": [ - "Temporal Evolution" - ], - "parameters": [ - { - "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D/get/parameters/0" - }, - { - "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D/get/parameters/2" - } - ], - "responses": { - "204": { - "description": "No Content. The entity was removed successfully" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/temporal/entities/{entityId}/attrs/": { - "post": { - "description": "Add new attributes to an existing Temporal Entity within an NGSI-LD system", - "operationId": "addTemporalEntityAttrs", - "tags": [ - "Temporal Evolution" - ], - "parameters": [ - { - "name": "entityId", - "description": "Entity Id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/definitions/EntityTemporalFragment" - } - } - } - }, - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/temporal/entities/{entityId}/attrs/{attrId}": { - "delete": { - "description": "Attribute from Temporal Representation of Entity deletion", - "operationId": "removeEntityTemporalAttr", - "tags": [ - "Temporal Evolution" - ], - "parameters": [ - { - "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0" - }, - { - "name": "attrId", - "description": "Attribute Id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - } - } - ], - "responses": { - "204": { - "description": "No Content." - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/temporal/entities/{entityId}/attrs/{attrId}/{instanceId}": { - "patch": { - "description": "Allows modifying a specific Attribute (Property or Relationship) instance, identified by its instanceId, of a Temporal Representation of an Entity.", - "operationId": "modifyEntityTemporalAttrInstance", - "tags": [ - "Temporal Evolution" - ], - "parameters": [ - { - "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0" - }, - { - "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D~1attrs~1%7BattrId%7D/delete/parameters/1" - }, - { - "name": "instanceId", - "description": "Instance Id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/definitions/EntityTemporalFragment" - } - } - } - }, - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "delete": { - "description": "Attribute Instance deletion by instance id.", - "operationId": "removeEntityTemporalAttrInstance", - "tags": [ - "Temporal Evolution" - ], - "parameters": [ - { - "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0" - }, - { - "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D~1attrs~1%7BattrId%7D/delete/parameters/1" - }, - { - "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D~1attrs~1%7BattrId%7D~1%7BinstanceId%7D/patch/parameters/2" - } - ], - "responses": { - "204": { - "description": "No Content." - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - } - } -} diff --git a/bundle/ngsild_swagger_combined_dereferenced.json b/bundle/ngsild_swagger_combined_dereferenced.json deleted file mode 100644 index 4c94a6ff513e05b778388110388ecd866b25f442..0000000000000000000000000000000000000000 --- a/bundle/ngsild_swagger_combined_dereferenced.json +++ /dev/null @@ -1,3052 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "description": "This OAS file describes the NGSI-LD API defined by the ETSI ISG CIM group. This Cross-domain Context Information Management API allows to provide, consume and subscribe to context information in multiple scenarios and involving multiple stakeholders", - "version": "latest", - "title": "ETSI ISG CIM / NGSI-LD API", - "contact": { - "email": "NGSI-LD@etsi.org" - } - }, - "externalDocs": { - "description": "Find out more about the ETSI ISG Context Information Management", - "url": "https://portal.etsi.org/tb.aspx?tbid=854&SubTB=854" - }, - "tags": [ - { - "name": "ETSI", - "description": "European Telecommunications Standards Institute", - "externalDocs": { - "description": "Find out more", - "url": "http://www.etsi.org" - } - }, - { - "name": "CIM", - "description": "Context Information Management", - "externalDocs": { - "description": "Find out more", - "url": "https://portal.etsi.org/tb.aspx?tbid=854&SubTB=854" - } - }, - { - "name": "JSON-LD", - "description": "JSON for Linked Data", - "externalDocs": { - "description": "Find out more", - "url": "https://json-ld.org/" - } - }, - { - "name": "NGSI-LD API", - "description": "API defined by the ETSI ISG CIM", - "externalDocs": { - "description": "Preliminary Specification", - "url": "http://www.etsi.org/deliver/etsi_gs/CIM/001_099/004/01.01.01_60/gs_CIM004v010101p.pdf" - } - } - ], - "paths": { - "/entities/": { - "get": { - "description": "Retrieve a set of entities which matches a specific query from an NGSI-LD system", - "operationId": "queryEntities", - "tags": [ - "Context Information" - ], - "parameters": [ - { - "name": "id", - "description": "Comma separated list of URIs to be retrieved", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "uri" - } - }, - { - "name": "idPattern", - "description": "Regular expression that must be matched by Entity ids", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "regexp" - } - }, - { - "name": "type", - "description": "Comma separated list of Entity type names to be retrieved", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "attrs", - "description": "Comma separated list of attribute names (properties or relationships) to be retrieved", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "q", - "description": "Query", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "georel", - "description": "Geo-relationship", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "enum": [ - "equals", - "disjoint", - "intersects", - "within", - "contains", - "overlaps" - ] - }, - { - "type": "string", - "pattern": "^near;((maxDistance==\\d+)|(minDistance==\\d+))$" - } - ] - } - }, - { - "name": "geometry", - "description": "Geometry", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "Point", - "MultiPoint", - "LineString", - "MultiLineString", - "Polygon", - "MultiPolygon" - ] - } - }, - { - "name": "coordinates", - "description": "Coordinates serialized as a string", - "in": "query", - "required": false, - "schema": { - "oneOf": [ - { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/position" - }, - { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/positionArray" - }, - { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/lineString" - }, - { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/polygon" - } - ] - } - }, - { - "name": "geoproperty", - "description": "The name of the property that contains the geo-spatial data that will be used to resolve the geoquery", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "csf", - "description": "Context Source Filter", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "limit", - "description": "Pagination limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1 - } - }, - { - "name": "options", - "description": "Options dictionary", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "keyValues", - "sysAttrs" - ] - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entityOperations~1create/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/EntityList-example.json" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "object", - "properties": { - "type": { - "type": "string", - "format": "uri" - }, - "title": { - "type": "string" - }, - "detail": { - "type": "string" - } - }, - "required": [ - "type" - ] - } - } - } - } - } - }, - "post": { - "description": "Create a new Entity within an NGSI-LD system", - "operationId": "createEntity", - "tags": [ - "Context Information" - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "allOf": [ - { - "required": [ - "id", - "type" - ] - }, - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - ] - } - } - } - }, - "responses": { - "201": { - "description": "Created. Contains the resource URI of the created Entity" - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "409": { - "description": "Already exists", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/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", - "tags": [ - "Context Information" - ], - "parameters": [ - { - "name": "entityId", - "description": "Entity Id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - }, - { - "name": "attrs", - "description": "Comma separated list of attribute names (properties or relationships) to be retrieved", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "type", - "description": "Entity Type", - "in": "query", - "required": false, - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - } - }, - { - "name": "options", - "description": "Options dictionary", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "keyValues", - "sysAttrs" - ] - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - }, - "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": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "delete": { - "description": "Removes an specific Entity from an NGSI-LD system", - "operationId": "removeEntityById", - "tags": [ - "Context Information" - ], - "parameters": [ - { - "$ref": "#/paths/~1entities~1%7BentityId%7D/get/parameters/0" - }, - { - "$ref": "#/paths/~1entities~1%7BentityId%7D/get/parameters/2" - } - ], - "responses": { - "204": { - "description": "No Content. The entity was removed successfully" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/entities/{entityId}/attrs/": { - "post": { - "description": "Append new Entity attributes to an existing Entity within an NGSI-LD system", - "operationId": "appendEntityAttrs", - "tags": [ - "Context Information" - ], - "parameters": [ - { - "name": "entityId", - "description": "Entity Id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - }, - { - "name": "options", - "description": "Indicates that no attribute overwrite shall be performed", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "noOverwrite" - ] - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "object", - "properties": { - "@context": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "string", - "format": "uri" - }, - { - "type": "array", - "minItems": 1, - "items": { - "anyOf": [ - { - "type": "string", - "format": "uri" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "location": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "GeoProperty" - }, - "value": { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location" - }, - "observedAt": { - "type": "string", - "format": "date-time" - }, - "createdAt": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/createdAt" - }, - "modifiedAt": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/modifiedAt" - }, - "datasetId": { - "type": "string", - "format": "uri" - }, - "instanceId": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "type", - "value" - ], - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/0" - }, - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/1" - } - ] - } - }, - "observationSpace": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location" - }, - "operationSpace": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location" - }, - "id": { - "type": "string", - "format": "uri" - }, - "type": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "modifiedAt": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": { - "anyOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "Property" - }, - "value": { - "type": [ - "string", - "number", - "boolean", - "array", - "object" - ] - }, - "observedAt": { - "$ref": "#/paths/~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/1/properties/location/properties/observedAt" - }, - "createdAt": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/createdAt" - }, - "modifiedAt": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/modifiedAt" - }, - "datasetId": { - "$ref": "#/paths/~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/1/properties/location/properties/datasetId" - }, - "instanceId": { - "$ref": "#/paths/~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/1/properties/location/properties/instanceId" - } - }, - "required": [ - "type", - "value" - ], - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/0" - }, - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/1" - } - ] - } - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "Relationship" - }, - "object": { - "type": "string", - "format": "uri" - }, - "observedAt": { - "$ref": "#/paths/~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/1/properties/location/properties/observedAt" - }, - "createdAt": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/createdAt" - }, - "modifiedAt": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/modifiedAt" - }, - "datasetId": { - "$ref": "#/paths/~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/1/properties/location/properties/datasetId" - }, - "instanceId": { - "$ref": "#/paths/~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/1/properties/location/properties/instanceId" - } - }, - "required": [ - "type", - "object" - ], - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/0" - }, - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/1" - } - ] - } - }, - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location" - } - ] - }, - "propertyNames": { - "type": "string", - "pattern": "^((\\d|[a-zA-Z]|_)+(:(\\d|[a-zA-Z]|_)+)?(#\\d+)?)$|^(@context)$" - } - } - } - } - }, - "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": { - "$schema": "http://json-schema.org/schema#", - "$id": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/UpdateResult.json", - "title": "NGSI-LD Update Result", - "description": "NGSI-LD Update Result", - "definitions": { - "NotUpdatedDetails": { - "attributeName": { - "type": "string", - "pattern": "" - }, - "reason": { - "type": "string", - "minLenght": 1 - } - }, - "UpdateResult": { - "type": "object", - "properties": { - "updated": { - "type": "array", - "items": { - "type": "string", - "pattern": "" - } - }, - "notUpdated": { - "type": "array", - "items": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/responses/207/content/application~1json%3Bapplication~1ld%2Bjson/schema/definitions/NotUpdatedDetails" - } - } - } - } - }, - "allOf": [ - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/responses/207/content/application~1json%3Bapplication~1ld%2Bjson/schema/definitions/UpdateResult" - } - ] - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "patch": { - "description": "Update existing Entity attributes within an NGSI-LD system", - "operationId": "updateEntityAttrs", - "tags": [ - "Context Information" - ], - "parameters": [ - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "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": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/responses/207/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/entities/{entityId}/attrs/{attrId}": { - "patch": { - "description": "Update existing Entity attributes within an NGSI-LD system", - "operationId": "partialAttrUpdate", - "tags": [ - "Context Information" - ], - "parameters": [ - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0" - }, - { - "name": "attrId", - "description": "Attribute Id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "responses": { - "204": { - "description": "No Content." - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "delete": { - "description": "Removes an existing Entity attribute within an NGSI-LD system", - "operationId": "removeEntityAttr", - "tags": [ - "Context Information" - ], - "parameters": [ - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0" - }, - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1%7BattrId%7D/patch/parameters/1" - } - ], - "responses": { - "204": { - "description": "No Content." - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/subscriptions/": { - "get": { - "description": "Retrieves the subscriptions available in an NGSI-LD system", - "operationId": "retrieveSubscriptions", - "tags": [ - "Context Subscription" - ], - "parameters": [ - { - "name": "limit", - "description": "Pagination limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1 - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/paths/~1subscriptions~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/SubscriptionList-example.json" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "post": { - "description": "Creates a new Subscription within an NGSI-LD system", - "operationId": "createSubscription", - "tags": [ - "Context Subscription" - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "allOf": [ - { - "$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/patch/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uri" - }, - "type": { - "type": "string", - "const": "Subscription" - }, - "notification": { - "type": "object", - "properties": { - "attributes": { - "type": "array", - "minItems": 1, - "items": { - "type": "string", - "minLength": 1 - }, - "uniqueItems": true - }, - "format": { - "type": "string" - }, - "endpoint": { - "type": "object", - "required": [ - "uri" - ], - "properties": { - "uri": { - "type": "string", - "format": "uri" - }, - "accept": { - "type": "string", - "enum": [ - "application/json", - "application/ld+json" - ] - } - } - }, - "status": { - "type": "string", - "enum": [ - "ok", - "failed" - ] - }, - "timesSent": { - "type": "number", - "minimum": 1 - }, - "lastNotification": { - "type": "string", - "format": "date-time" - }, - "lastFailure": { - "type": "string", - "format": "date-time" - }, - "lastSuccess": { - "type": "string", - "format": "date-time" - } - }, - "required": [ - "endpoint" - ] - }, - "status": { - "type": "string", - "enum": [ - "active", - "paused", - "expired" - ] - }, - "createdAt": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/createdAt" - }, - "modifiedAt": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/modifiedAt" - } - }, - "allOf": [ - { - "required": [ - "id", - "type", - "notification" - ] - }, - { - "anyOf": [ - { - "required": [ - "entities" - ] - }, - { - "required": [ - "watchedAttributes" - ] - } - ] - } - ] - } - ] - } - } - } - }, - "responses": { - "201": { - "description": "Created. Contains the resource URI of the created Subscription" - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "409": { - "description": "Already exists", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/subscriptions/{subscriptionId}": { - "get": { - "description": "Retrieves a specific Subscription from an NGSI-LD system", - "operationId": "retrieveSubscription", - "tags": [ - "Context Subscription" - ], - "parameters": [ - { - "name": "subscriptionId", - "description": "Subscription Id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1subscriptions~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/Subscription-example_C.4.json" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "patch": { - "description": "Updates a specific Subscription within an NGSI-LD system", - "operationId": "updateSubscription", - "tags": [ - "Context Subscription" - ], - "parameters": [ - { - "$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/get/parameters/0" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "object", - "properties": { - "@context": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/%40context" - }, - "entities": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uri" - }, - "type": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - }, - "idPattern": { - "type": "string", - "format": "regex" - } - }, - "required": [ - "type" - ] - }, - "minItems": 1 - }, - "name": { - "type": "string", - "minLength": 1 - }, - "description": { - "type": "string", - "minLength": 1 - }, - "watchedAttributes": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - }, - "uniqueItems": true - }, - "timeInterval": { - "type": "number", - "minimum": 0 - }, - "expires": { - "type": "string", - "format": "date-time" - }, - "isActive": { - "type": "boolean" - }, - "throttling": { - "type": "number", - "minimum": 1 - }, - "q": { - "type": "string" - }, - "geoQ": { - "type": "object", - "required": [ - "geometry", - "coordinates", - "georel" - ], - "properties": { - "georel": { - "$ref": "#/paths/~1entities~1/get/parameters/5/schema" - }, - "coordinates": { - "$ref": "#/paths/~1entities~1/get/parameters/7/schema" - }, - "geometry": { - "$ref": "#/paths/~1entities~1/get/parameters/6/schema" - } - } - }, - "csf": { - "type": "string" - } - } - } - } - } - }, - "responses": { - "204": { - "description": "No Content. The Subscription was updated successfully" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "delete": { - "description": "Removes a specific Subscription from an NGSI-LD system", - "operationId": "removeSubscription", - "tags": [ - "Context Subscription" - ], - "parameters": [ - { - "$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/get/parameters/0" - } - ], - "responses": { - "204": { - "description": "No Content. The Subscription was removed successfully" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/csourceRegistrations/": { - "get": { - "description": "Retrieve a set of context sources which matches a specific query from an NGSI-LD system", - "operationId": "queryCsources", - "tags": [ - "Context Sources" - ], - "parameters": [ - { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/0" - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/1" - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/2" - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/3" - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/4" - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/5" - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/6" - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/7" - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/8" - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/14" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/ContextSourceRegistrationList-example.json" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "post": { - "description": "Registers a new context source within an NGSI-LD system", - "operationId": "registerCsource", - "tags": [ - "Context Sources" - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "allOf": [ - { - "type": "object", - "properties": { - "@context": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/%40context" - }, - "information": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "anyOf": [ - { - "required": [ - "entities" - ] - }, - { - "required": [ - "properties" - ] - }, - { - "required": [ - "relationships" - ] - } - ], - "properties": { - "entities": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/patch/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/entities/items" - } - }, - "properties": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - }, - "uniqueItems": true - }, - "relationships": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - }, - "uniqueItems": true - } - } - } - }, - "observationInterval": { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/managementInterval" - }, - "managementInterval": { - "type": "object", - "required": [ - "start" - ], - "properties": { - "start": { - "type": "string", - "format": "date-time" - }, - "end": { - "type": "string", - "format": "date-time" - } - } - }, - "location": { - "$schema": "http://json-schema.org/draft-04/schema#", - "$id": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json", - "title": "geometry", - "description": "One geometry as defined by GeoJSON. Licensed as per original source is https://github.com/fge/sample-json-schemas/blob/master/geojson/geometry.json", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "oneOf": [ - { - "title": "Point", - "properties": { - "type": { - "enum": [ - "Point" - ] - }, - "coordinates": { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/position" - } - } - }, - { - "title": "MultiPoint", - "properties": { - "type": { - "enum": [ - "MultiPoint" - ] - }, - "coordinates": { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/positionArray" - } - } - }, - { - "title": "LineString", - "properties": { - "type": { - "enum": [ - "LineString" - ] - }, - "coordinates": { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/lineString" - } - } - }, - { - "title": "MultiLineString", - "properties": { - "type": { - "enum": [ - "MultiLineString" - ] - }, - "coordinates": { - "type": "array", - "items": { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/lineString" - } - } - } - }, - { - "title": "Polygon", - "properties": { - "type": { - "enum": [ - "Polygon" - ] - }, - "coordinates": { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/polygon" - } - } - }, - { - "title": "MultiPolygon", - "properties": { - "type": { - "enum": [ - "MultiPolygon" - ] - }, - "coordinates": { - "type": "array", - "items": { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/polygon" - } - } - } - } - ], - "definitions": { - "position": { - "description": "A single position", - "type": "array", - "minItems": 2, - "items": [ - { - "type": "number" - }, - { - "type": "number" - } - ], - "additionalItems": false - }, - "positionArray": { - "description": "An array of positions", - "type": "array", - "items": { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/position" - } - }, - "lineString": { - "description": "An array of two or more positions", - "allOf": [ - { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/positionArray" - }, - { - "minItems": 2 - } - ] - }, - "linearRing": { - "description": "An array of four positions where the first equals the last", - "allOf": [ - { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/positionArray" - }, - { - "minItems": 4 - } - ] - }, - "polygon": { - "description": "An array of linear rings", - "type": "array", - "items": { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location/definitions/linearRing" - } - } - } - }, - "observationSpace": { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location" - }, - "operationSpace": { - "$ref": "#/paths/~1csourceRegistrations~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/allOf/0/properties/location" - }, - "expires": { - "type": "string", - "format": "date-time" - }, - "name": { - "type": "string", - "minLength": 1 - }, - "description": { - "type": "string", - "minLength": 1 - }, - "endpoint": { - "type": "string", - "format": "uri" - } - }, - "additionalProperties": { - "type": [ - "string", - "number", - "boolean", - "array", - "object" - ] - } - }, - { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uri" - }, - "type": { - "type": "string", - "const": "ContextSourceRegistration" - }, - "createdAt": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/createdAt" - }, - "modifiedAt": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/modifiedAt" - } - }, - "required": [ - "id", - "type", - "endpoint", - "information" - ] - } - ] - } - } - } - }, - "responses": { - "201": { - "description": "Created. Contains the resource URI of the created Registration" - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "409": { - "description": "Already exists", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/csourceRegistrations/{registrationId}": { - "get": { - "description": "Retrieves a specific context source registration from an NGSI-LD system", - "operationId": "retrieveCsource", - "tags": [ - "Context Sources" - ], - "parameters": [ - { - "name": "registrationId", - "description": "Registration Id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "delete": { - "description": "Removes an specific context source registration within an NGSI-LD system", - "operationId": "removeCsource", - "tags": [ - "Context Sources" - ], - "parameters": [ - { - "$ref": "#/paths/~1csourceRegistrations~1%7BregistrationId%7D/get/parameters/0" - } - ], - "responses": { - "204": { - "description": "No Content. The Registration was removed successfully" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/csourceSubscriptions/": { - "get": { - "description": "Retrieves the context source discovery subscriptions available in an NGSI-LD system", - "operationId": "retrieveCSourceSubscriptions", - "tags": [ - "Context Sources" - ], - "parameters": [ - { - "name": "limit", - "description": "Pagination limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1 - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1subscriptions~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema" - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/SubscriptionList-example.json" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "post": { - "description": "Creates a context source discovery Subscription within an NGSI-LD system", - "operationId": "createCSourceSubscription", - "tags": [ - "Context Sources" - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1subscriptions~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "responses": { - "201": { - "description": "Created. Contains the resource URI of the created Subscription" - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "409": { - "description": "Already exists", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/csourceSubscriptions/{subscriptionId}": { - "get": { - "description": "Retrieves a specific Subscription from an NGSI-LD system", - "operationId": "retrieveSubscription", - "tags": [ - "Context Sources" - ], - "parameters": [ - { - "name": "subscriptionId", - "description": "Subscription Id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1subscriptions~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/Subscription-example_C.4.json" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "patch": { - "description": "Updates a specific context source discovery Subscription within an NGSI-LD system", - "operationId": "updateCSourceSubscription", - "tags": [ - "Context Sources" - ], - "parameters": [ - { - "$ref": "#/paths/~1csourceSubscriptions~1%7BsubscriptionId%7D/get/parameters/0" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/patch/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "responses": { - "204": { - "description": "No Content. The Subscription was updated successfully" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "delete": { - "description": "Removes a specific Context Source Subscription from an NGSI-LD system", - "operationId": "removeCSourceSubscription", - "tags": [ - "Context Sources" - ], - "parameters": [ - { - "$ref": "#/paths/~1csourceSubscriptions~1%7BsubscriptionId%7D/get/parameters/0" - } - ], - "responses": { - "204": { - "description": "No Content. The Subscription was removed successfully" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/entityOperations/create": { - "post": { - "description": "Batch Entity creation", - "operationId": "batchEntityCreation", - "tags": [ - "Batch Operations" - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "array", - "items": { - "type": "string", - "format": "uri" - } - }, - "error": { - "type": "array", - "items": { - "entityId": { - "type": "string", - "format": "uri" - }, - "error": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/entityOperations/update": { - "post": { - "description": "Batch Entity update", - "operationId": "batchEntityUpdate", - "tags": [ - "Batch Operations" - ], - "parameters": [ - { - "name": "options", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "noOverwrite" - ] - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entityOperations~1create/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entityOperations~1create/post/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/entityOperations/upsert": { - "post": { - "description": "Batch Entity upsert", - "operationId": "batchEntityUpsert", - "tags": [ - "Batch Operations" - ], - "parameters": [ - { - "name": "options", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "replace", - "update" - ] - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entityOperations~1create/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entityOperations~1create/post/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/entityOperations/delete": { - "post": { - "description": "Batch Entity delete", - "operationId": "batchEntityDelete", - "tags": [ - "Batch Operations" - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uri" - }, - "minItems": 1 - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entityOperations~1create/post/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/temporal/entities/": { - "get": { - "description": "Query temporal evolution of Entities from an NGSI-LD system", - "operationId": "queryTemporalEntities", - "tags": [ - "Temporal Evolution" - ], - "parameters": [ - { - "name": "id", - "description": "Comma separated list of URIs to be retrieved", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "uri" - } - }, - { - "name": "idPattern", - "description": "Regular expression that must be matched by Entity ids", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "regexp" - } - }, - { - "name": "type", - "description": "Comma separated list of Entity type names to be retrieved", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "attrs", - "description": "Comma separated list of attribute names (properties or relationships) to be retrieved", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "q", - "description": "Query", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "georel", - "description": "Geo-relationship", - "in": "query", - "required": false, - "schema": { - "$ref": "#/paths/~1entities~1/get/parameters/5/schema" - } - }, - { - "name": "geometry", - "description": "Geometry", - "in": "query", - "required": false, - "schema": { - "$ref": "#/paths/~1entities~1/get/parameters/6/schema" - } - }, - { - "name": "coordinates", - "description": "Coordinates serialized as a string", - "in": "query", - "required": false, - "schema": { - "$ref": "#/paths/~1entities~1/get/parameters/7/schema" - } - }, - { - "name": "geoproperty", - "description": "The name of the property that contains the geo-spatial data that will be used to resolve the geoquery", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "timerel", - "description": "Time relationship", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "before", - "after", - "between" - ] - } - }, - { - "name": "timeproperty", - "description": "The name of the property that contains the temporal data that will be used to resolve the temporal query", - "in": "query", - "required": false, - "schema": { - "type": "string", - "pattern": "^((\\d|[a-zA-Z]|_)+(:(\\d|[a-zA-Z]|_)+)?(#\\d+)?)$", - "minLength": 1, - "description": "NGSI-LD Name" - } - }, - { - "name": "time", - "description": "start time for temporal query", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "endTime", - "description": "end time for temporal query", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "csf", - "description": "Context Source Filter", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "limit", - "description": "Pagination limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1 - } - }, - { - "name": "options", - "description": "Options dictionary", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "temporalValues", - "sysAttrs" - ] - } - }, - { - "name": "lastN", - "description": "Only retrieve last N instances", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1 - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "array", - "items": { - "$schema": "http://json-schema.org/schema#", - "$id": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/temporal/EntityTemporal.json", - "title": "NGSI-LD Entity", - "description": "NGSI-LD Temporal Representation of an Entity", - "definitions": { - "EntityTemporalFragment": { - "type": "object", - "properties": { - "@context": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/%40context" - }, - "location": { - "type": "array", - "items": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location" - }, - "minItems": 1 - }, - "observationSpace": { - "type": "array", - "items": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location" - }, - "minItems": 1 - }, - "operationSpace": { - "type": "array", - "items": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location" - }, - "minItems": 1 - }, - "id": { - "type": "string", - "format": "uri" - }, - "type": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - }, - "createdAt": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/createdAt" - }, - "modifiedAt": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/modifiedAt" - } - }, - "additionalProperties": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/0" - }, - "minItems": 1 - }, - { - "type": "array", - "items": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/1" - }, - "minItems": 1 - }, - { - "type": "array", - "items": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location" - }, - "minItems": 1 - } - ] - }, - "propertyNames": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/propertyNames" - } - }, - "EntityTemporal": { - "allOf": [ - { - "type": "object", - "required": [ - "id", - "type" - ] - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/definitions/EntityTemporalFragment" - } - ] - } - }, - "allOf": [ - { - "$ref": "#/paths/~1temporal~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/definitions/EntityTemporal" - } - ] - } - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/EntityTemporalList-example.json" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "post": { - "description": "Create or update temporal representation of an Entity within an NGSI-LD system", - "operationId": "createUpdateEntityTemporal", - "tags": [ - "Temporal Evolution" - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/definitions/EntityTemporal" - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/EntityTemporal-example_C5.5.3.json" - } - } - } - } - }, - "responses": { - "201": { - "description": "Created. Contains the resource URI of the created Entity" - }, - "204": { - "description": "Updated. No Content" - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "409": { - "description": "Already exists", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/temporal/entities/{entityId}": { - "get": { - "description": "Retrieve the temporal representation of an specific Entity from an NGSI-LD system. It's possible to specify the Entity attributes to be retrieved by using query parameters", - "operationId": "retrieveEntityTemporalById", - "tags": [ - "Temporal Evolution" - ], - "parameters": [ - { - "name": "entityId", - "description": "Entity Id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - }, - { - "name": "attrs", - "description": "Comma separated list of attribute names (properties or relationships) to be retrieved", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "type", - "description": "Entity Type", - "in": "query", - "required": false, - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - } - }, - { - "name": "options", - "description": "Options dictionary", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "temporalValues", - "sysAttrs" - ] - } - }, - { - "name": "timerel", - "description": "Time relationship", - "in": "query", - "required": false, - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/9/schema" - } - }, - { - "name": "timeproperty", - "description": "The name of the property that contains the temporal data that will be used to resolve the temporal query", - "in": "query", - "required": false, - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - } - }, - { - "name": "time", - "description": "start time for temporal query", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "endTime", - "description": "end time for temporal query", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "lastN", - "description": "Only retrieve last N instances", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1 - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/definitions/EntityTemporal" - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/EntityTemporal-example_C5.5.3.json" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "delete": { - "description": "Removes the temporal representation of an Entity from an NGSI-LD system", - "operationId": "removeEntityTemporalById", - "tags": [ - "Temporal Evolution" - ], - "parameters": [ - { - "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D/get/parameters/0" - }, - { - "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D/get/parameters/2" - } - ], - "responses": { - "204": { - "description": "No Content. The entity was removed successfully" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/temporal/entities/{entityId}/attrs/": { - "post": { - "description": "Add new attributes to an existing Temporal Entity within an NGSI-LD system", - "operationId": "addTemporalEntityAttrs", - "tags": [ - "Temporal Evolution" - ], - "parameters": [ - { - "name": "entityId", - "description": "Entity Id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/definitions/EntityTemporalFragment" - } - } - } - }, - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/temporal/entities/{entityId}/attrs/{attrId}": { - "delete": { - "description": "Attribute from Temporal Representation of Entity deletion", - "operationId": "removeEntityTemporalAttr", - "tags": [ - "Temporal Evolution" - ], - "parameters": [ - { - "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0" - }, - { - "name": "attrId", - "description": "Attribute Id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - } - } - ], - "responses": { - "204": { - "description": "No Content." - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/temporal/entities/{entityId}/attrs/{attrId}/{instanceId}": { - "patch": { - "description": "Allows modifying a specific Attribute (Property or Relationship) instance, identified by its instanceId, of a Temporal Representation of an Entity.", - "operationId": "modifyEntityTemporalAttrInstance", - "tags": [ - "Temporal Evolution" - ], - "parameters": [ - { - "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0" - }, - { - "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D~1attrs~1%7BattrId%7D/delete/parameters/1" - }, - { - "name": "instanceId", - "description": "Instance Id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/definitions/EntityTemporalFragment" - } - } - } - }, - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "delete": { - "description": "Attribute Instance deletion by instance id.", - "operationId": "removeEntityTemporalAttrInstance", - "tags": [ - "Temporal Evolution" - ], - "parameters": [ - { - "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0" - }, - { - "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D~1attrs~1%7BattrId%7D/delete/parameters/1" - }, - { - "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D~1attrs~1%7BattrId%7D~1%7BinstanceId%7D/patch/parameters/2" - } - ], - "responses": { - "204": { - "description": "No Content." - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - } - } -} diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..ade0699460dc7fbc866e5313132a00fb61608933 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,2 @@ +FROM halverneus/static-file-server +ADD . /web \ No newline at end of file diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index ecb77d62ffb49a039f1517fedcdbec74904e8237..0000000000000000000000000000000000000000 --- a/package-lock.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "ngsi-ld", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "ajv": { - "version": "6.5.5", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.5.tgz", - "integrity": "sha512-7q7gtRQDJSyuEHjuVgHoUa2VuemFiCMrfQc9Tc08XTAc4Zj/5U1buQJ0HU6i7fKjXU09SVgSmxa4sLvuvS8Iyg==", - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "requires": { - "punycode": "^2.1.0" - } - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index c81614277ed11597179bf075bc97dc966f75f854..0000000000000000000000000000000000000000 --- a/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "ngsi-ld", - "version": "1.0.1", - "description": "NGSI-LD Schema Compilation", - "main": "index.js", - "scripts": { - "test": "./scripts/validate_all.sh", - "validate-examples": "./scripts/validate_examples.sh", - "validate-locally": "./scripts/validate_locally.sh", - "validate-online": "./scripts/validate_online.sh", - "validate-schema": "./scripts/validate_schema.sh", - "combine-files": "./scripts/combine_files.sh" - }, - "repository": { - "type": "git", - "url": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD" - }, - "keywords": [ - "NGSI-LD" - ], - "author": "Jose Manuel Cantera", - "license": "ISC", - "dependencies": { - "ajv": "^6.12.5", - "swagger-cli": "^4.0.4" - } -} diff --git a/schema/BatchOperationResult.json b/schema/BatchOperationResult.json index bbc1c358f129077174fa4c73da106db6f9acd695..04fba472bb960a8e439d636e006df1fd6053d094 100644 --- a/schema/BatchOperationResult.json +++ b/schema/BatchOperationResult.json @@ -1,16 +1,17 @@ { - "$schema": "http://json-schema.org/schema#", - "$id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/BatchOperationResult.json", "title": "NGSI-LD Batch Operation Result", "description": "NGSI-LD Batch Operation Result", "definitions": { "BatchEntityError": { - "entityId": { - "type": "string", - "format": "uri" - }, - "error": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails" + "type": "object", + "properties": { + "entityId": { + "type": "string", + "format": "uri" + }, + "error": { + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails" + } } }, "BatchOperationResult": { @@ -37,4 +38,4 @@ "$ref": "#/definitions/BatchOperationResult" } ] -} +} \ No newline at end of file diff --git a/schema/Entity.json b/schema/Entity.json index f04c32cfaf9e58eacaef3af43ef89b3d2c0a2883..24782155d0cd373895d1fc9581ae33408b97c009 100644 --- a/schema/Entity.json +++ b/schema/Entity.json @@ -1,6 +1,4 @@ { - "$schema": "http://json-schema.org/schema#", - "$id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json", "title": "NGSI-LD Entity", "description": "NGSI-LD Entity", "definitions": { @@ -17,10 +15,10 @@ "properties": { "type": { "type": "string", - "const": "Property" + "enum": ["Property"] }, "value": { - "type": [ + "oneOf": [ "string", "number", "boolean", @@ -49,7 +47,7 @@ "value" ], "additionalProperties": { - "anyOf": [ + "oneOf": [ { "$ref": "#/definitions/Property" }, @@ -64,7 +62,7 @@ "properties": { "type": { "type": "string", - "const": "Relationship" + "enum": ["Relationship"] }, "object": { "type": "string", @@ -91,7 +89,7 @@ "object" ], "additionalProperties": { - "anyOf": [ + "oneOf": [ { "$ref": "#/definitions/Property" }, @@ -106,10 +104,10 @@ "properties": { "type": { "type": "string", - "const": "GeoProperty" + "enum": ["GeoProperty"] }, "value": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/Geometry.json#/definitions/Geometry" }, "observedAt": { "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/observedAt" @@ -132,7 +130,7 @@ "value" ], "additionalProperties": { - "anyOf": [ + "oneOf": [ { "$ref": "#/definitions/Property" }, @@ -172,7 +170,7 @@ } }, "additionalProperties": { - "anyOf": [ + "oneOf": [ { "$ref": "#/definitions/Property" }, @@ -183,9 +181,6 @@ "$ref": "#/definitions/GeoProperty" } ] - }, - "propertyNames": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/PropertyNames" } }, "Entity": { diff --git a/schema/EntityList.json b/schema/EntityList.json index bbe3817b5596621064bcb809eeefad24106a554a..a3fca8401b581dfe2ad2c41d6448f19a2a1a3493 100644 --- a/schema/EntityList.json +++ b/schema/EntityList.json @@ -1,6 +1,4 @@ { - "$schema": "http://json-schema.org/schema#", - "$id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/EntityList.json", "title": "NGSI-LD EntityList", "description": "NGSI-LD EntityList", "definitions": { @@ -11,7 +9,9 @@ } } }, - "allOf": [{ - "$ref": "#/definitions/EntityList" - }] -} + "allOf": [ + { + "$ref": "#/definitions/EntityList" + } + ] +} \ No newline at end of file diff --git a/schema/Entity_keyValues.json b/schema/Entity_keyValues.json deleted file mode 100644 index c9a0342d13b5f219ff38206378a81f7f984dceb0..0000000000000000000000000000000000000000 --- a/schema/Entity_keyValues.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema#", - "$id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/Entity_keyValues.json", - "title": "NGSI-LD Entity Key Values", - "description": "NGSI-LD Entity Simplified Representation", - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uri" - }, - "type": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Name" - }, - "@context": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/LdContext" - }, - "location": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#" - }, - "observationSpace": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#" - }, - "operationSpace": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#" - }, - "createdAt": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/createdAt" - }, - "modifiedAt": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/modifiedAt" - } - }, - "required": [ - "type", - "id" - ], - "additionalProperties": { - "type": [ - "string", - "number", - "boolean", - "array", - "object" - ] - }, - "propertyNames": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/PropertyNames" - } -} diff --git a/schema/Geometry.json b/schema/Geometry.json new file mode 100644 index 0000000000000000000000000000000000000000..f9bcda7b6637ac3ac58775e3b569eac1f53567ed --- /dev/null +++ b/schema/Geometry.json @@ -0,0 +1,175 @@ +{ + "title": "Geometry", + "description": "One geometry as defined by GeoJSON. Licensed as per original source is https://github.com/fge/sample-json-schemas/blob/master/geojson/geometry.json", + "type": "object", + "required": [ + "type", + "coordinates" + ], + "allOf": [ + { + "$ref": "#/definitions/Geometry" + } + ], + "definitions": { + "position": { + "description": "A single position", + "type": "array", + "minItems": 2, + "maxItems": 2, + "items": { + "type": "number" + }, + "additionalProperties": false + }, + "positionArray": { + "description": "An array of positions", + "type": "array", + "items": { + "$ref": "#/definitions/position" + } + }, + "lineString": { + "description": "An array of two or more positions", + "allOf": [ + { + "$ref": "#/definitions/positionArray" + }, + { + "minItems": 2 + } + ] + }, + "linearRing": { + "description": "An array of four positions where the first equals the last", + "allOf": [ + { + "$ref": "#/definitions/positionArray" + }, + { + "minItems": 4 + } + ] + }, + "polygon": { + "description": "An array of linear rings", + "type": "array", + "items": { + "$ref": "#/definitions/linearRing" + } + }, + "Point": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Point" + ] + }, + "coordinates": { + "$ref": "#/definitions/position" + } + } + }, + "MultiPoint": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + }, + "coordinates": { + "$ref": "#/definitions/positionArray" + } + } + }, + "Polygon": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + }, + "coordinates": { + "$ref": "#/definitions/polygon" + } + } + }, + "LineString": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "LineString" + ] + }, + "coordinates": { + "$ref": "#/definitions/lineString" + } + } + }, + "MultiLineString": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + }, + "coordinates": { + "type": "array", + "items": { + "$ref": "#/definitions/lineString" + } + } + } + }, + "MultiPolygon": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + }, + "coordinates": { + "type": "array", + "items": { + "$ref": "#/definitions/polygon" + } + } + } + }, + "Geometry": { + "description": " Avalid GeoJSON geometry object", + "oneOf": [ + { + "$ref": "#/definitions/Point" + }, + { + "$ref": "#/definitions/MultiPoint" + }, + { + "$ref": "#/definitions/Polygon" + }, + { + "$ref": "#/definitions/LineString" + }, + { + "$ref": "#/definitions/MultiLineString" + }, + { + "$ref": "#/definitions/MultiPolygon" + } + ] + } + } +} \ No newline at end of file diff --git a/schema/UpdateResult.json b/schema/UpdateResult.json index db692eba54284ed4908e2f7ad21e1ab366ae4631..193ef5839ce8857c452716ce65286560c5ca84fe 100644 --- a/schema/UpdateResult.json +++ b/schema/UpdateResult.json @@ -1,17 +1,18 @@ { - "$schema": "http://json-schema.org/schema#", - "$id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/UpdateResult.json", "title": "NGSI-LD Update Result", "description": "NGSI-LD Update Result", "definitions": { "NotUpdatedDetails": { - "attributeName": { - "type": "string", - "pattern": "" - }, - "reason": { - "type": "string", - "minLenght": 1 + "type": "object", + "properties": { + "attributeName": { + "type": "string", + "pattern": "" + }, + "reason": { + "type": "string", + "minLength": 1 + } } }, "UpdateResult": { @@ -38,4 +39,4 @@ "$ref": "#/definitions/UpdateResult" } ] -} +} \ No newline at end of file diff --git a/schema/common.json b/schema/common.json index 29ea54cab84e3e68e67e7bbfc86b961afe434e4d..a3214d7e251fa808a56d44f4c1e59e9ea0c3ed9d 100644 --- a/schema/common.json +++ b/schema/common.json @@ -1,6 +1,4 @@ { - "$schema": "http://json-schema.org/schema#", - "$id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json", "title": "NGSI-LD Common Definitions", "description": "NGSI-LD Common", "definitions": { @@ -27,7 +25,7 @@ "format": "date-time" }, "LdContext": { - "anyOf": [ + "oneOf": [ { "type": "object" }, @@ -39,7 +37,7 @@ "type": "array", "minItems": 1, "items": { - "anyOf": [ + "oneOf": [ { "type": "string", "format": "uri" @@ -109,7 +107,7 @@ ] }, "georel": { - "anyOf": [ + "oneOf": [ { "type": "string", "enum": [ @@ -130,16 +128,16 @@ "coordinates": { "oneOf": [ { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/position" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/Geometry.json#/definitions/position" }, { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/positionArray" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/Geometry.json#/definitions/positionArray" }, { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/lineString" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/Geometry.json#/definitions/lineString" }, { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#/definitions/polygon" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/Geometry.json#/definitions/polygon" } ] }, @@ -163,4 +161,4 @@ ] } } -} +} \ No newline at end of file diff --git a/schema/geometry-schema.json b/schema/geometry-schema.json deleted file mode 100644 index ef23a8b42c904cf497d9b27088f4bcd7e08e626b..0000000000000000000000000000000000000000 --- a/schema/geometry-schema.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "$id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json", - "title": "geometry", - "description": "One geometry as defined by GeoJSON. Licensed as per original source is https://github.com/fge/sample-json-schemas/blob/master/geojson/geometry.json", - "type": "object", - "required": [ "type", "coordinates" ], - "oneOf": [ - { - "title": "Point", - "properties": { - "type": { "enum": [ "Point" ] }, - "coordinates": { "$ref": "#/definitions/position" } - } - }, - { - "title": "MultiPoint", - "properties": { - "type": { "enum": [ "MultiPoint" ] }, - "coordinates": { "$ref": "#/definitions/positionArray" } - } - }, - { - "title": "LineString", - "properties": { - "type": { "enum": [ "LineString" ] }, - "coordinates": { "$ref": "#/definitions/lineString" } - } - }, - { - "title": "MultiLineString", - "properties": { - "type": { "enum": [ "MultiLineString" ] }, - "coordinates": { - "type": "array", - "items": { "$ref": "#/definitions/lineString" } - } - } - }, - { - "title": "Polygon", - "properties": { - "type": { "enum": [ "Polygon" ] }, - "coordinates": { "$ref": "#/definitions/polygon" } - } - }, - { - "title": "MultiPolygon", - "properties": { - "type": { "enum": [ "MultiPolygon" ] }, - "coordinates": { - "type": "array", - "items": { "$ref": "#/definitions/polygon" } - } - } - } - ], - "definitions": { - "position": { - "description": "A single position", - "type": "array", - "minItems": 2, - "items": [ { "type": "number" }, { "type": "number" } ], - "additionalItems": false - }, - "positionArray": { - "description": "An array of positions", - "type": "array", - "items": { "$ref": "#/definitions/position" } - }, - "lineString": { - "description": "An array of two or more positions", - "allOf": [ - { "$ref": "#/definitions/positionArray" }, - { "minItems": 2 } - ] - }, - "linearRing": { - "description": "An array of four positions where the first equals the last", - "allOf": [ - { "$ref": "#/definitions/positionArray" }, - { "minItems": 4 } - ] - }, - "polygon": { - "description": "An array of linear rings", - "type": "array", - "items": { "$ref": "#/definitions/linearRing" } - } - } -} diff --git a/schema/registrations/.gitkeep b/schema/registrations/.gitkeep deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/schema/registrations/ContextSourceRegistration.json b/schema/registrations/ContextSourceRegistration.json index 02680210d403f5a757e7f744a243249caae07bb7..aaae651eb0c5be102590a7615657abf537c9c447 100644 --- a/schema/registrations/ContextSourceRegistration.json +++ b/schema/registrations/ContextSourceRegistration.json @@ -6,11 +6,6 @@ "definitions": { "RegistrationInfo": { "type": "object", - "anyOf": [ - {"required": ["entities"]}, - {"required": ["properties"]}, - {"required": ["relationships"]} - ], "properties": { "entities": { "type": "array", @@ -73,13 +68,13 @@ "$ref": "#/definitions/TimeInterval" }, "location": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/Geometry.json#/definitions/Geometry" }, "observationSpace": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/Geometry.json#/definitions/Geometry" }, "operationSpace": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/Geometry.json#/definitions/Geometry" }, "expires": { "type": "string", @@ -98,15 +93,7 @@ "format": "uri" } }, - "additionalProperties": { - "type": [ - "string", - "number", - "boolean", - "array", - "object" - ] - } + "additionalProperties": true }, "ContextSourceRegistration": { "allOf": [ @@ -122,7 +109,7 @@ }, "type": { "type": "string", - "const": "ContextSourceRegistration" + "enum": ["ContextSourceRegistration"] }, "createdAt": { "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/createdAt" diff --git a/schema/subscriptions/Notification.json b/schema/subscriptions/Notification.json index dd16e7f3a441151aad9eb7bf6dd5c69b854f29fa..a0ad339d4a00fc59b7834d431280c1ad01c7a028 100644 --- a/schema/subscriptions/Notification.json +++ b/schema/subscriptions/Notification.json @@ -1,6 +1,4 @@ { - "$schema": "http://json-schema.org/schema#", - "$id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/subscriptions/Notification.json", "title": "NGSI-LD Notification", "description": "NGSI-LD Notification", "type": "object", @@ -11,7 +9,9 @@ }, "type": { "type": "string", - "const": "Notification" + "enum": [ + "Notification" + ] }, "subscriptionId": { "type": "string", @@ -38,4 +38,4 @@ "notifiedAt", "data" ] -} +} \ No newline at end of file diff --git a/schema/subscriptions/Subscription.json b/schema/subscriptions/Subscription.json index 794bf16a3dc10e3c5da0ab70d6ecbcb7ced1dcc0..49ac3a85f3902b6ae71d1c0beb6597a4d1a2c797 100644 --- a/schema/subscriptions/Subscription.json +++ b/schema/subscriptions/Subscription.json @@ -1,6 +1,4 @@ { - "$schema": "http://json-schema.org/schema#", - "$id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/subscriptions/Subscription.json", "title": "NGSI-LD Subscription", "description": "NGSI-LD Subscription", "definitions": { @@ -138,7 +136,7 @@ }, "type": { "type": "string", - "const": "Subscription" + "enum": ["Subscription"] }, "notification": { "$ref": "#/definitions/NotificationParams" @@ -190,4 +188,4 @@ "$ref": "#/definitions/Subscription" } ] -} +} \ No newline at end of file diff --git a/schema/subscriptions/SubscriptionList.json b/schema/subscriptions/SubscriptionList.json index 750ab3ea83b7287b3bd68fcecfd8ff05dccaf6c7..21a4143b6fc007e3dedcc36aad80ec1bc57eea5f 100644 --- a/schema/subscriptions/SubscriptionList.json +++ b/schema/subscriptions/SubscriptionList.json @@ -1,6 +1,4 @@ { - "$schema": "http://json-schema.org/schema#", - "$id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/subscriptions/SubscriptionList.json", "title": "NGSI-LD Subscription List", "description": "NGSI-LD Subscription List", "definitions": { @@ -11,7 +9,9 @@ } } }, - "allOf": [{ - "$ref": "#/definitions/SubscriptionList" - }] -} + "allOf": [ + { + "$ref": "#/definitions/SubscriptionList" + } + ] +} \ No newline at end of file diff --git a/schema/temporal/EntityTemporal.json b/schema/temporal/EntityTemporal.json index 0cb176dd49fbaf40416f4d3e29932552e481f21e..3d951d04bfbe05dab78199156c496afe5f93cb87 100644 --- a/schema/temporal/EntityTemporal.json +++ b/schema/temporal/EntityTemporal.json @@ -1,6 +1,4 @@ { - "$schema": "http://json-schema.org/schema#", - "$id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/temporal/EntityTemporal.json", "title": "NGSI-LD Entity", "description": "NGSI-LD Temporal Representation of an Entity", "definitions": { @@ -46,7 +44,7 @@ } }, "additionalProperties": { - "anyOf": [ + "oneOf": [ { "type": "array", "items": { @@ -69,22 +67,19 @@ "minItems": 1 } ] - }, - "propertyNames": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/PropertyNames" } }, "EntityTemporal": { "allOf": [ + { + "$ref": "#/definitions/EntityTemporalFragment" + }, { "type": "object", "required": [ - "id", - "type" + "type", + "id" ] - }, - { - "$ref": "#/definitions/EntityTemporalFragment" } ] } @@ -94,4 +89,4 @@ "$ref": "#/definitions/EntityTemporal" } ] -} +} \ No newline at end of file diff --git a/schema/temporal/EntityTemporalList.json b/schema/temporal/EntityTemporalList.json index 0b92be8d45f8f7b36b23bfaee07334851ef9a39c..4ed93d7fae77ededd792c9ef81a7ad17cdb86a7b 100644 --- a/schema/temporal/EntityTemporalList.json +++ b/schema/temporal/EntityTemporalList.json @@ -1,13 +1,11 @@ { - "$schema": "http://json-schema.org/schema#", - "$id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/temporal/EntityTemporalList.json", "title": "NGSI-LD Entity", "description": "NGSI-LD Temporal Representation List", "definitions": { "EntityTemporalList": { "type": "array", "items": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/temporal/EntityTemporal.json#" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/temporal/EntityTemporal.json#/definitions/EntityTemporal" } } }, @@ -16,4 +14,4 @@ "$ref": "#/definitions/EntityTemporalList" } ] -} +} \ No newline at end of file diff --git a/schema/temporal/Entity_temporalValues.json b/schema/temporal/Entity_temporalValues.json index 30909c35112834598158534cbe7c8f3ddd9f3f61..6a2a98f4210ea9868716104605827baa1bac18f2 100644 --- a/schema/temporal/Entity_temporalValues.json +++ b/schema/temporal/Entity_temporalValues.json @@ -1,6 +1,4 @@ { - "$schema": "http://json-schema.org/schema#", - "$id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/temporal/Entity_temporalValues.json", "title": "NGSI-LD Entity Temporal Values", "description": "NGSI-LD Simplified Temporal Representation of Entities", "definitions": { @@ -105,7 +103,7 @@ "id" ], "additionalProperties": { - "anyOf": [ + "oneOf": [ { "$ref": "#/definitions/PropertyTemporalValues" }, @@ -113,8 +111,5 @@ "$ref": "#/definitions/RelationshipTemporalValues" } ] - }, - "propertyNames": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/PropertyNames" } -} +} \ No newline at end of file diff --git a/scripts/combine_files.sh b/scripts/combine_files.sh deleted file mode 100755 index ae9443846a9a293d56209d5d832d1c209e2373c4..0000000000000000000000000000000000000000 --- a/scripts/combine_files.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -# -# Requires install swagger-cli: npm install -g swagger-cli -# - -# Generate a file which combines all the spec files into a unique swagger definition file (maintains references) -swagger-cli bundle ./spec/updated/ngsi-ld-spec-open-api.json -o ./bundle/ngsild_swagger_combined.json - -# Generate a file which combines all the spec files into a unique swagger definition file (removes references) -# working with modified swagger-cli.js to avoid circular ref problem -swagger-cli -d bundle --dereference ./spec/updated/ngsi-ld-spec-open-api.json -o ./bundle/ngsild_swagger_combined_dereferenced.json -# modified version to allow circular ref -# swagger-cli bundle --dereference="ignore" ./spec/updated/ngsi-ld-spec-open-api.json -o ./bundle/ngsild_swagger_combined.json \ No newline at end of file diff --git a/scripts/runLocalDevEnv.sh b/scripts/runLocalDevEnv.sh new file mode 100755 index 0000000000000000000000000000000000000000..88b67f71862dac32d7ab114f7ed5924e36b6911a --- /dev/null +++ b/scripts/runLocalDevEnv.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +scripts/setBasePath.sh https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master http://localhost:8090 +docker run --name spec-server --rm -d -v ${PWD}/:/ngsi -e FOLDER=/ngsi -p 8090:8080 halverneus/static-file-server +read -p "Press enter to finish editing" +docker stop spec-server +scripts/setBasePath.sh http://localhost:8090 https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master diff --git a/scripts/setBasePath.sh b/scripts/setBasePath.sh new file mode 100755 index 0000000000000000000000000000000000000000..d15255af36bee46a57b4b4953a8a96f5d59cf65e --- /dev/null +++ b/scripts/setBasePath.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +toBeReplaced=$1 +replacement=$2 + +for i in $(find spec -type f -print) +do + sed -i s,${toBeReplaced},${replacement},g "${i}" +done + +for i in $(find schema -type f -print) +do + sed -i s,${toBeReplaced},${replacement},g "${i}" +done \ No newline at end of file diff --git a/spec/updated/csource-registration-by-id-spec.json b/spec/updated/csourceRegistrations/csource-registration-by-id-spec.json similarity index 96% rename from spec/updated/csource-registration-by-id-spec.json rename to spec/updated/csourceRegistrations/csource-registration-by-id-spec.json index e15d27307bda2359a1c92d51ad0e8799c0c1ac64..47f386e39238ea0b0ed0c9d2a54e265a73291514 100644 --- a/spec/updated/csource-registration-by-id-spec.json +++ b/spec/updated/csourceRegistrations/csource-registration-by-id-spec.json @@ -23,7 +23,7 @@ "get": { "description": "Retrieves a specific context source registration from an NGSI-LD system", "operationId": "retrieveCsource", - "tags": ["Context Sources"], + "tags": ["Context Sources", "CSourceRegistrations"], "parameters": [ { "$ref": "#/components/parameters/registrationId" @@ -70,7 +70,7 @@ "delete": { "description": "Removes an specific context source registration within an NGSI-LD system", "operationId": "removeCsource", - "tags": ["Context Sources"], + "tags": ["Context Sources", "CSourceRegistrations"], "parameters": [ { "$ref": "#/components/parameters/registrationId" diff --git a/spec/updated/csource-registrations-spec.json b/spec/updated/csourceRegistrations/csource-registrations-spec.json similarity index 79% rename from spec/updated/csource-registrations-spec.json rename to spec/updated/csourceRegistrations/csource-registrations-spec.json index 6e43c300e1bb4e843bcd0c3cf7aaeef6565d8e46..b4221a3e19ef918d411e9c996eeca3aad42c8536 100644 --- a/spec/updated/csource-registrations-spec.json +++ b/spec/updated/csourceRegistrations/csource-registrations-spec.json @@ -13,37 +13,37 @@ "get": { "description": "Retrieve a set of context sources which matches a specific query from an NGSI-LD system", "operationId": "queryCsources", - "tags": ["Context Sources"], + "tags": ["Context Sources", "CSourceRegistrations"], "parameters": [ { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/id" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/id" }, { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/idPattern" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/idPattern" }, { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/type" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/type" }, { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/attrs" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/attrs" }, { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/q" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/q" }, { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/georel" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/georel" }, { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/geometry" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/geometry" }, { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/coordinates" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/coordinates" }, { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/geoproperty" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/geoproperty" }, { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/limit" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/limit" } ], "responses": { @@ -77,7 +77,7 @@ "post": { "description": "Registers a new context source within an NGSI-LD system", "operationId": "registerCsource", - "tags": ["Context Sources"], + "tags": ["Context Sources", "CSourceRegistrations"], "requestBody": { "required": true, "content": { diff --git a/spec/updated/csource-subscription-by-id-spec.json b/spec/updated/csourceSubscriptions/csource-subscription-by-id-spec.json similarity index 95% rename from spec/updated/csource-subscription-by-id-spec.json rename to spec/updated/csourceSubscriptions/csource-subscription-by-id-spec.json index 5b1b595cc2bc5d4a3f26443490cff0c6902582b9..eaff1bf1e3c3489788cfbe9c6bf0c4bca84e0793 100644 --- a/spec/updated/csource-subscription-by-id-spec.json +++ b/spec/updated/csourceSubscriptions/csource-subscription-by-id-spec.json @@ -22,8 +22,8 @@ "/csourceSubscriptions/{subscriptionId}": { "get": { "description": "Retrieves a specific Subscription from an NGSI-LD system", - "operationId": "retrieveSubscription", - "tags": ["Context Sources"], + "operationId": "retrieveCSourceSubscriptionsById", + "tags": ["Context Sources", "CSourceSubscriptions"], "parameters": [ { "$ref": "#/components/parameters/subscriptionId" @@ -70,7 +70,7 @@ "patch": { "description": "Updates a specific context source discovery Subscription within an NGSI-LD system", "operationId": "updateCSourceSubscription", - "tags": ["Context Sources"], + "tags": ["Context Sources", "CSourceSubscriptions"], "parameters": [ { "$ref": "#/components/parameters/subscriptionId" @@ -115,7 +115,7 @@ "delete": { "description": "Removes a specific Context Source Subscription from an NGSI-LD system", "operationId": "removeCSourceSubscription", - "tags": ["Context Sources"], + "tags": ["Context Sources", "CSourceSubscriptions"], "parameters": [ { "$ref": "#/components/parameters/subscriptionId" diff --git a/spec/updated/csource-subscriptions-spec.json b/spec/updated/csourceSubscriptions/csource-subscriptions-spec.json similarity index 96% rename from spec/updated/csource-subscriptions-spec.json rename to spec/updated/csourceSubscriptions/csource-subscriptions-spec.json index e15218648e681843c8cfe8f97391c956b8602794..350aefe8a6cea516ff9107069790b31727448481 100644 --- a/spec/updated/csource-subscriptions-spec.json +++ b/spec/updated/csourceSubscriptions/csource-subscriptions-spec.json @@ -23,7 +23,7 @@ "get": { "description": "Retrieves the context source discovery subscriptions available in an NGSI-LD system", "operationId": "retrieveCSourceSubscriptions", - "tags": ["Context Sources"], + "tags": ["Context Sources", "CSourceSubscriptions"], "parameters": [ { "$ref": "#/components/parameters/limit" @@ -60,7 +60,7 @@ "post": { "description": "Creates a context source discovery Subscription within an NGSI-LD system", "operationId": "createCSourceSubscription", - "tags": ["Context Sources"], + "tags": ["Context Sources", "CSourceSubscriptions"], "requestBody": { "required": true, "content": { diff --git a/spec/updated/entities-spec.json b/spec/updated/entities/entities-spec.json similarity index 98% rename from spec/updated/entities-spec.json rename to spec/updated/entities/entities-spec.json index a55bfe81334e6631d57453dd0d3e2a13a9eabae8..6fe923bc1a862ac8a67fa772dd1084c092124922 100644 --- a/spec/updated/entities-spec.json +++ b/spec/updated/entities/entities-spec.json @@ -130,7 +130,7 @@ "get": { "description": "Retrieve a set of entities which matches a specific query from an NGSI-LD system", "operationId": "queryEntities", - "tags": ["Context Information"], + "tags": ["Context Information", "Entities"], "parameters": [ { "$ref": "#/components/parameters/id" @@ -200,7 +200,7 @@ "post": { "description": "Create a new Entity within an NGSI-LD system", "operationId": "createEntity", - "tags": ["Context Information"], + "tags": ["Context Information", "Entities"], "requestBody": { "required": true, "content": { diff --git a/spec/updated/entity-attrs-spec.json b/spec/updated/entities/entity-attrs-spec.json similarity index 95% rename from spec/updated/entity-attrs-spec.json rename to spec/updated/entities/entity-attrs-spec.json index 0a80b518d65956788f7b0d796dabab6b70a2dcc5..8cc6028953fbb5dcfeb3ecb5c58f6acd4be64d22 100644 --- a/spec/updated/entity-attrs-spec.json +++ b/spec/updated/entities/entity-attrs-spec.json @@ -44,7 +44,7 @@ "post": { "description": "Append new Entity attributes to an existing Entity within an NGSI-LD system", "operationId": "appendEntityAttrs", - "tags": ["Context Information"], + "tags": ["Context Information", "Entities"], "parameters": [ { "$ref": "#/components/parameters/entityId" @@ -72,7 +72,7 @@ "content": { "application/json;application/ld+json": { "schema": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/UpdateResult.json#" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/UpdateResult.json#/definitions/UpdateResult" } } } @@ -102,7 +102,7 @@ "patch": { "description": "Update existing Entity attributes within an NGSI-LD system", "operationId": "updateEntityAttrs", - "tags": ["Context Information"], + "tags": ["Context Information", "Entities"], "parameters": [ { "$ref": "#/components/parameters/entityId" @@ -127,7 +127,7 @@ "content": { "application/json;application/ld+json": { "schema": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/UpdateResult.json#" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/UpdateResult.json#/definitions/UpdateResult" } } } @@ -159,7 +159,7 @@ "patch": { "description": "Update existing Entity attributes within an NGSI-LD system", "operationId": "partialAttrUpdate", - "tags": ["Context Information"], + "tags": ["Context Information", "Entities"], "parameters": [ { "$ref": "#/components/parameters/entityId" @@ -207,7 +207,7 @@ "delete": { "description": "Removes an existing Entity attribute within an NGSI-LD system", "operationId": "removeEntityAttr", - "tags": ["Context Information"], + "tags": ["Context Information", "Entities"], "parameters": [ { "$ref": "#/components/parameters/entityId" diff --git a/spec/updated/entity-by-id-spec.json b/spec/updated/entities/entity-by-id-spec.json similarity index 95% rename from spec/updated/entity-by-id-spec.json rename to spec/updated/entities/entity-by-id-spec.json index 3c97881b2021f83d1ef4c7f6fb74c940837eb3fd..2890992e79cfc9315dcd41dc6e8219e87d0a0bc1 100644 --- a/spec/updated/entity-by-id-spec.json +++ b/spec/updated/entities/entity-by-id-spec.json @@ -42,7 +42,7 @@ "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", - "tags": ["Context Information"], + "tags": ["Context Information", "Entities"], "parameters": [ { "$ref": "#/components/parameters/entityId" @@ -54,7 +54,7 @@ "$ref": "#/components/parameters/type" }, { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/options" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/options" } ], "responses": { @@ -98,7 +98,7 @@ "delete": { "description": "Removes an specific Entity from an NGSI-LD system", "operationId": "removeEntityById", - "tags": ["Context Information"], + "tags": ["Context Information", "Entities"], "parameters": [ { "$ref": "#/components/parameters/entityId" diff --git a/spec/updated/entity-operations-spec.json b/spec/updated/entities/entity-operations-spec.json similarity index 94% rename from spec/updated/entity-operations-spec.json rename to spec/updated/entities/entity-operations-spec.json index 923aed8da9a814cb3e3aa56b781223a7bd05cdb7..2dc6ab2cfcd6f966969b96e2cd3613d629b90464 100644 --- a/spec/updated/entity-operations-spec.json +++ b/spec/updated/entities/entity-operations-spec.json @@ -6,11 +6,11 @@ }, "components": {}, "paths": { - "/entityOperations/create/": { + "/entityOperations/create": { "post": { "description": "Batch Entity creation", "operationId": "batchEntityCreation", - "tags": ["Batch Operations"], + "tags": ["Batch Operations", "Entities"], "requestBody": { "required": true, "content": { @@ -45,11 +45,11 @@ } } }, - "/entityOperations/update/": { + "/entityOperations/update": { "post": { "description": "Batch Entity update", "operationId": "batchEntityUpdate", - "tags": ["Batch Operations"], + "tags": ["Batch Operations", "Entities"], "parameters": [ { "name": "options", @@ -97,11 +97,11 @@ } } }, - "/entityOperations/upsert/": { + "/entityOperations/upsert": { "post": { "description": "Batch Entity upsert", "operationId": "batchEntityUpsert", - "tags": ["Batch Operations"], + "tags": ["Batch Operations", "Entities"], "parameters": [ { "name": "options", @@ -150,11 +150,11 @@ } } }, - "/entityOperations/delete/": { + "/entityOperations/delete": { "post": { "description": "Batch Entity delete", "operationId": "batchEntityDelete", - "tags": ["Batch Operations"], + "tags": ["Batch Operations", "Entities"], "requestBody": { "required": true, "content": { diff --git a/spec/updated/full_api.json b/spec/updated/full_api.json deleted file mode 100644 index ffae24bfee10bd2b4602c28bb77549226dd86d05..0000000000000000000000000000000000000000 --- a/spec/updated/full_api.json +++ /dev/null @@ -1,2892 +0,0 @@ -{ - "openapi": "3.0.1", - "info": { - "description": "This OAS file describes the NGSI-LD API defined by the ETSI ISG CIM group. This Cross-domain Context Information Management API allows to provide, consume and subscribe to context information in multiple scenarios and involving multiple stakeholders", - "version": "latest", - "title": "ETSI ISG CIM / NGSI-LD API", - "contact": { - "email": "NGSI-LD@etsi.org" - } - }, - "externalDocs": { - "description": "Find out more about the ETSI ISG Context Information Management", - "url": "https://portal.etsi.org/tb.aspx?tbid=854&SubTB=854" - }, - "tags": [ - { - "name": "ETSI", - "description": "European Telecommunications Standards Institute", - "externalDocs": { - "description": "Find out more", - "url": "http://www.etsi.org" - } - }, - { - "name": "CIM", - "description": "Context Information Management", - "externalDocs": { - "description": "Find out more", - "url": "https://portal.etsi.org/tb.aspx?tbid=854&SubTB=854" - } - }, - { - "name": "JSON-LD", - "description": "JSON for Linked Data", - "externalDocs": { - "description": "Find out more", - "url": "https://json-ld.org/" - } - }, - { - "name": "NGSI-LD API", - "description": "API defined by the ETSI ISG CIM", - "externalDocs": { - "description": "Preliminary Specification", - "url": "http://www.etsi.org/deliver/etsi_gs/CIM/001_099/004/01.01.01_60/gs_CIM004v010101p.pdf" - } - } - ], - "paths": { - "/entities/": { - "get": { - "description": "Retrieve a set of entities which matches a specific query from an NGSI-LD system", - "operationId": "queryEntities", - "tags": [ - "Context Information" - ], - "parameters": [ - { - "name": "id", - "description": "Comma separated list of URIs to be retrieved", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "uri" - } - }, - { - "name": "idPattern", - "description": "Regular expression that must be matched by Entity ids", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "regexp" - } - }, - { - "name": "type", - "description": "Comma separated list of Entity type names to be retrieved", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "attrs", - "description": "Comma separated list of attribute names (properties or relationships) to be retrieved", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "q", - "description": "Query", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "georel", - "description": "Geo-relationship", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "enum": [ - "equals", - "disjoint", - "intersects", - "within", - "contains", - "overlaps" - ] - }, - { - "type": "string", - "pattern": "^near;((maxDistance==\\d+)|(minDistance==\\d+))$" - } - ] - } - }, - { - "name": "geometry", - "description": "Geometry", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "Point", - "MultiPoint", - "LineString", - "MultiLineString", - "Polygon", - "MultiPolygon" - ] - } - }, - { - "name": "coordinates", - "description": "Coordinates serialized as a string", - "in": "query", - "required": false, - "schema": { - "oneOf": [ - { - "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/position" - }, - { - "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/positionArray" - }, - { - "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/lineString" - }, - { - "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/polygon" - } - ] - } - }, - { - "name": "geoproperty", - "description": "The name of the property that contains the geo-spatial data that will be used to resolve the geoquery", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "csf", - "description": "Context Source Filter", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "limit", - "description": "Pagination limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1 - } - }, - { - "name": "options", - "description": "Options dictionary", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "keyValues", - "sysAttrs" - ] - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entityOperations~1update/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/EntityList-example.json" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "object", - "properties": { - "type": { - "type": "string", - "format": "uri" - }, - "title": { - "type": "string" - }, - "detail": { - "type": "string" - } - }, - "required": [ - "type" - ] - } - } - } - } - } - }, - "post": { - "description": "Create a new Entity within an NGSI-LD system", - "operationId": "createEntity", - "tags": [ - "Context Information" - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "allOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uri" - }, - "type": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "modifiedAt": { - "type": "string", - "format": "date-time" - } - } - }, - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - ] - } - } - } - }, - "responses": { - "201": { - "description": "Created. Contains the resource URI of the created Entity" - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "409": { - "description": "Already exists", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/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", - "tags": [ - "Context Information" - ], - "parameters": [ - { - "name": "entityId", - "description": "Entity Id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - }, - { - "name": "attrs", - "description": "Comma separated list of attribute names (properties or relationships) to be retrieved", - "in": "query", - "required": false, - "schema": { - "type": "string", - "minLength": 1 - } - }, - { - "name": "type", - "description": "Entity Type", - "in": "query", - "required": false, - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - } - }, - { - "$ref": "#/paths/~1entities~1/get/parameters/11" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/Entity-example.json" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "delete": { - "description": "Removes an specific Entity from an NGSI-LD system", - "operationId": "removeEntityById", - "tags": [ - "Context Information" - ], - "parameters": [ - { - "$ref": "#/paths/~1entities~1%7BentityId%7D/get/parameters/0" - }, - { - "$ref": "#/paths/~1entities~1%7BentityId%7D/get/parameters/2" - } - ], - "responses": { - "204": { - "description": "No Content. The entity was removed successfully" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/entities/{entityId}/attrs/": { - "post": { - "description": "Append new Entity attributes to an existing Entity within an NGSI-LD system", - "operationId": "appendEntityAttrs", - "tags": [ - "Context Information" - ], - "parameters": [ - { - "name": "entityId", - "description": "Entity Id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - }, - { - "name": "options", - "description": "Indicates that no attribute overwrite shall be performed", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "noOverwrite" - ] - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "object", - "properties": { - "@context": { - "anyOf": [ - { - "type": "object" - }, - { - "type": "string", - "format": "uri" - }, - { - "type": "array", - "minItems": 1, - "items": { - "anyOf": [ - { - "type": "string", - "format": "uri" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "location": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "GeoProperty" - }, - "value": { - "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location" - }, - "observedAt": { - "type": "string", - "format": "date-time" - }, - "createdAt": { - "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/createdAt" - }, - "modifiedAt": { - "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/modifiedAt" - }, - "datasetId": { - "type": "string", - "format": "uri" - }, - "instanceId": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "type", - "value" - ], - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/0" - }, - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/1" - } - ] - } - }, - "observationSpace": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location" - }, - "operationSpace": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location" - } - }, - "required": [ - "id", - "type" - ], - "additionalProperties": { - "anyOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "Property" - }, - "value": { - "type": [ - "string", - "number", - "boolean", - "array", - "object" - ] - }, - "observedAt": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/observedAt" - }, - "createdAt": { - "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/createdAt" - }, - "modifiedAt": { - "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/modifiedAt" - }, - "datasetId": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/datasetId" - }, - "instanceId": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/instanceId" - } - }, - "required": [ - "type", - "value" - ], - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/0" - }, - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/1" - } - ] - } - }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "Relationship" - }, - "object": { - "type": "string", - "format": "uri" - }, - "observedAt": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/observedAt" - }, - "createdAt": { - "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/createdAt" - }, - "modifiedAt": { - "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/modifiedAt" - }, - "datasetId": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/datasetId" - }, - "instanceId": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/instanceId" - } - }, - "required": [ - "type", - "object" - ], - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/0" - }, - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/1" - } - ] - } - }, - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location" - } - ] - }, - "propertyNames": { - "type": "string", - "pattern": "^((\\d|[a-zA-Z]|_)+(#\\d+)?)$|^(@context)$" - } - } - } - } - }, - "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": { - "$schema": "http://json-schema.org/schema#", - "id": "https://uri.etsi.org/ngsi-ld/schema/UpdateResult.json", - "title": "NGSI-LD Update Result", - "description": "NGSI-LD Update Result", - "definitions": { - "UnchangedDetails": { - "attributeName": { - "type": "string", - "pattern": "" - }, - "reason": { - "type": "string", - "minLenght": 1 - } - }, - "UpdateResult": { - "type": "object", - "properties": { - "updated": { - "type": "array", - "items": { - "type": "string", - "pattern": "" - } - }, - "unchanged": { - "type": "array", - "items": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/responses/207/content/application~1json%3Bapplication~1ld%2Bjson/schema/definitions/UnchangedDetails" - } - } - } - } - }, - "allOf": [ - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/responses/207/content/application~1json%3Bapplication~1ld%2Bjson/schema/definitions/UpdateResult" - } - ] - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "patch": { - "description": "Update existing Entity attributes within an NGSI-LD system", - "operationId": "updateEntityAttrs", - "tags": [ - "Context Information" - ], - "parameters": [ - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "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": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/responses/207/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/entities/{entityId}/attrs/{attrId}": { - "patch": { - "description": "Update existing Entity attributes within an NGSI-LD system", - "operationId": "partialAttrUpdate", - "tags": [ - "Context Information" - ], - "parameters": [ - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0" - }, - { - "name": "attrId", - "description": "Attribute Id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "responses": { - "204": { - "description": "No Content." - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "delete": { - "description": "Removes an existing Entity attribute within an NGSI-LD system", - "operationId": "removeEntityAttr", - "tags": [ - "Context Information" - ], - "parameters": [ - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0" - }, - { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1%7BattrId%7D/patch/parameters/1" - } - ], - "responses": { - "204": { - "description": "No Content." - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/subscriptions/": { - "get": { - "description": "Retrieves the subscriptions available in an NGSI-LD system", - "operationId": "retrieveSubscriptions", - "tags": [ - "Context Subscription" - ], - "parameters": [ - { - "name": "limit", - "description": "Pagination limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1 - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/paths/~1subscriptions~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/SubscriptionList-example.json" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "post": { - "description": "Creates a new Subscription within an NGSI-LD system", - "operationId": "createSubscription", - "tags": [ - "Context Subscription" - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "allOf": [ - { - "$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/patch/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uri" - }, - "type": { - "type": "string", - "const": "Subscription" - }, - "notification": { - "type": "object", - "properties": { - "attributes": { - "type": "array", - "minItems": 1, - "items": { - "type": "string", - "minLength": 1 - }, - "uniqueItems": true - }, - "format": { - "type": "string" - }, - "endpoint": { - "type": "object", - "required": [ - "uri" - ], - "properties": { - "uri": { - "type": "string", - "format": "uri" - }, - "accept": { - "type": "string", - "enum": [ - "application/json", - "application/ld+json" - ] - } - } - }, - "status": { - "type": "string", - "enum": [ - "ok", - "failed" - ] - }, - "timesSent": { - "type": "number", - "minimum": 1 - }, - "lastNotification": { - "type": "string", - "format": "date-time" - }, - "lastFailure": { - "type": "string", - "format": "date-time" - }, - "lastSuccess": { - "type": "string", - "format": "date-time" - } - }, - "required": [ - "endpoint" - ] - }, - "status": { - "type": "string", - "enum": [ - "active", - "paused", - "expired" - ] - }, - "createdAt": { - "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/createdAt" - }, - "modifiedAt": { - "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/modifiedAt" - } - }, - "allOf": [ - { - "required": [ - "id", - "type" - ] - }, - { - "anyOf": [ - { - "required": [ - "entities" - ] - }, - { - "required": [ - "watchedAttributes" - ] - } - ] - } - ] - } - ] - } - } - } - }, - "responses": { - "201": { - "description": "Created. Contains the resource URI of the created Subscription" - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "409": { - "description": "Already exists", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/subscriptions/{subscriptionId}": { - "get": { - "description": "Retrieves a specific Subscription from an NGSI-LD system", - "operationId": "retrieveSubscription", - "tags": [ - "Context Subscription" - ], - "parameters": [ - { - "name": "subscriptionId", - "description": "Subscription Id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1subscriptions~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/Subscription-example_C.4.json" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "patch": { - "description": "Updates a specific Subscription within an NGSI-LD system", - "operationId": "updateSubscription", - "tags": [ - "Context Subscription" - ], - "parameters": [ - { - "$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/get/parameters/0" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "object", - "properties": { - "@context": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/%40context" - }, - "entities": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uri" - }, - "type": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - }, - "idPattern": { - "type": "string", - "format": "regex" - } - }, - "required": [ - "type" - ] - }, - "minItems": 1 - }, - "name": { - "type": "string", - "minLength": 1 - }, - "description": { - "type": "string", - "minLength": 1 - }, - "watchedAttributes": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - }, - "uniqueItems": true - }, - "timeInterval": { - "type": "number", - "minimum": 0 - }, - "expires": { - "type": "string", - "format": "date-time" - }, - "isActive": { - "type": "boolean" - }, - "throttling": { - "type": "number", - "minimum": 1 - }, - "q": { - "type": "string" - }, - "geoQ": { - "type": "object", - "required": [ - "geometry", - "coordinates", - "georel" - ], - "properties": { - "georel": { - "$ref": "#/paths/~1entities~1/get/parameters/5/schema" - }, - "coordinates": { - "$ref": "#/paths/~1entities~1/get/parameters/7/schema" - }, - "geometry": { - "$ref": "#/paths/~1entities~1/get/parameters/6/schema" - } - } - }, - "csf": { - "type": "string" - } - } - } - } - } - }, - "responses": { - "204": { - "description": "No Content. The Subscription was updated successfully" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "delete": { - "description": "Removes a specific Subscription from an NGSI-LD system", - "operationId": "removeSubscription", - "tags": [ - "Context Subscription" - ], - "parameters": [ - { - "$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/get/parameters/0" - } - ], - "responses": { - "204": { - "description": "No Content. The Subscription was removed successfully" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/csourceRegistrations/": { - "get": { - "description": "Retrieve a set of context sources which matches a specific query from an NGSI-LD system", - "operationId": "queryCsources", - "tags": [ - "Context Sources" - ], - "parameters": [ - { - "$ref": "#/paths/~1entities~1/get/parameters/0" - }, - { - "$ref": "#/paths/~1entities~1/get/parameters/1" - }, - { - "$ref": "#/paths/~1entities~1/get/parameters/2" - }, - { - "$ref": "#/paths/~1entities~1/get/parameters/3" - }, - { - "$ref": "#/paths/~1entities~1/get/parameters/4" - }, - { - "$ref": "#/paths/~1entities~1/get/parameters/5" - }, - { - "$ref": "#/paths/~1entities~1/get/parameters/6" - }, - { - "$ref": "#/paths/~1entities~1/get/parameters/7" - }, - { - "$ref": "#/paths/~1entities~1/get/parameters/8" - }, - { - "$ref": "#/paths/~1entities~1/get/parameters/10" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/ContextSourceRegistrationList-example.json" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "post": { - "description": "Registers a new context source within an NGSI-LD system", - "operationId": "registerCsource", - "tags": [ - "Context Sources" - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "allOf": [ - { - "type": "object", - "properties": { - "@context": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/%40context" - }, - "information": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "entities" - ], - "properties": { - "entities": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/patch/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/entities/items" - } - }, - "properties": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - }, - "uniqueItems": true - }, - "relationships": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - }, - "uniqueItems": true - } - } - } - }, - "timestamp": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "start" - ], - "properties": { - "start": { - "type": "string", - "format": "date-time" - }, - "end": { - "type": "string", - "format": "date-time" - } - } - } - }, - "location": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json", - "title": "geometry", - "description": "One geometry as defined by GeoJSON. Licensed as per original source is https://github.com/fge/sample-json-schemas/blob/master/geojson/geometry.json", - "type": "object", - "required": [ - "type", - "coordinates" - ], - "oneOf": [ - { - "title": "Point", - "properties": { - "type": { - "enum": [ - "Point" - ] - }, - "coordinates": { - "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/position" - } - } - }, - { - "title": "MultiPoint", - "properties": { - "type": { - "enum": [ - "MultiPoint" - ] - }, - "coordinates": { - "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/positionArray" - } - } - }, - { - "title": "LineString", - "properties": { - "type": { - "enum": [ - "LineString" - ] - }, - "coordinates": { - "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/lineString" - } - } - }, - { - "title": "MultiLineString", - "properties": { - "type": { - "enum": [ - "MultiLineString" - ] - }, - "coordinates": { - "type": "array", - "items": { - "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/lineString" - } - } - } - }, - { - "title": "Polygon", - "properties": { - "type": { - "enum": [ - "Polygon" - ] - }, - "coordinates": { - "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/polygon" - } - } - }, - { - "title": "MultiPolygon", - "properties": { - "type": { - "enum": [ - "MultiPolygon" - ] - }, - "coordinates": { - "type": "array", - "items": { - "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/polygon" - } - } - } - } - ], - "definitions": { - "position": { - "description": "A single position", - "type": "array", - "minItems": 2, - "items": [ - { - "type": "number" - }, - { - "type": "number" - } - ], - "additionalItems": false - }, - "positionArray": { - "description": "An array of positions", - "type": "array", - "items": { - "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/position" - } - }, - "lineString": { - "description": "An array of two or more positions", - "allOf": [ - { - "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/positionArray" - }, - { - "minItems": 2 - } - ] - }, - "linearRing": { - "description": "An array of four positions where the first equals the last", - "allOf": [ - { - "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/positionArray" - }, - { - "minItems": 4 - } - ] - }, - "polygon": { - "description": "An array of linear rings", - "type": "array", - "items": { - "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/linearRing" - } - } - } - }, - "expires": { - "type": "string", - "format": "date-time" - }, - "name": { - "type": "string", - "minLength": 1 - }, - "description": { - "type": "string", - "minLength": 1 - }, - "endpoint": { - "type": "string", - "format": "uri" - } - }, - "additionalProperties": { - "type": [ - "string", - "number", - "boolean", - "array", - "object" - ] - } - }, - { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uri" - }, - "type": { - "type": "string", - "const": "ContextSourceRegistration" - }, - "createdAt": { - "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/createdAt" - }, - "modifiedAt": { - "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/modifiedAt" - } - }, - "required": [ - "id", - "type", - "endpoint", - "information" - ] - } - ] - } - } - } - }, - "responses": { - "201": { - "description": "Created. Contains the resource URI of the created Registration" - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "409": { - "description": "Already exists", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/csourceRegistrations/{registrationId}": { - "get": { - "description": "Retrieves a specific context source registration from an NGSI-LD system", - "operationId": "retrieveCsource", - "tags": [ - "Context Sources" - ], - "parameters": [ - { - "name": "registrationId", - "description": "Registration Id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "delete": { - "description": "Removes an specific context source registration within an NGSI-LD system", - "operationId": "removeCsource", - "tags": [ - "Context Sources" - ], - "parameters": [ - { - "$ref": "#/paths/~1csourceRegistrations~1%7BregistrationId%7D/get/parameters/0" - } - ], - "responses": { - "204": { - "description": "No Content. The Registration was removed successfully" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/csourceSubscriptions/": { - "get": { - "description": "Retrieves the context source discovery subscriptions available in an NGSI-LD system", - "operationId": "retrieveCSourceSubscriptions", - "tags": [ - "Context Sources" - ], - "parameters": [ - { - "name": "limit", - "description": "Pagination limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1 - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1subscriptions~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema" - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/SubscriptionList-example.json" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "post": { - "description": "Creates a context source discovery Subscription within an NGSI-LD system", - "operationId": "createCSourceSubscription", - "tags": [ - "Context Sources" - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1subscriptions~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "responses": { - "201": { - "description": "Created. Contains the resource URI of the created Subscription" - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "409": { - "description": "Already exists", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/csourceSubscriptions/{subscriptionId}": { - "get": { - "description": "Retrieves a specific Subscription from an NGSI-LD system", - "operationId": "retrieveSubscription", - "tags": [ - "Context Sources" - ], - "parameters": [ - { - "name": "subscriptionId", - "description": "Subscription Id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1subscriptions~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/Subscription-example_C.4.json" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "patch": { - "description": "Updates a specific context source discovery Subscription within an NGSI-LD system", - "operationId": "updateCSourceSubscription", - "tags": [ - "Context Sources" - ], - "parameters": [ - { - "$ref": "#/paths/~1csourceSubscriptions~1%7BsubscriptionId%7D/get/parameters/0" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/patch/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "responses": { - "204": { - "description": "No Content. The Subscription was updated successfully" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "delete": { - "description": "Removes a specific Context Source Subscription from an NGSI-LD system", - "operationId": "removeCSourceSubscription", - "tags": [ - "Context Sources" - ], - "parameters": [ - { - "$ref": "#/paths/~1csourceSubscriptions~1%7BsubscriptionId%7D/get/parameters/0" - } - ], - "responses": { - "204": { - "description": "No Content. The Subscription was removed successfully" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/entityOperations/create": { - "post": { - "description": "Batch Entity creation", - "operationId": "batchEntityCreation", - "tags": [ - "Batch Operations" - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entityOperations~1update/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entityOperations~1upsert/post/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/entityOperations/update": { - "post": { - "description": "Batch Entity update", - "operationId": "batchEntityUpdate", - "tags": [ - "Batch Operations" - ], - "parameters": [ - { - "name": "options", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "noOverwrite" - ] - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entityOperations~1upsert/post/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/entityOperations/upsert": { - "post": { - "description": "Batch Entity upsert", - "operationId": "batchEntityUpsert", - "tags": [ - "Batch Operations" - ], - "parameters": [ - { - "name": "options", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "replace", - "update" - ] - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entityOperations~1update/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "array", - "items": { - "type": "string", - "format": "uri" - } - }, - "error": { - "type": "array", - "items": { - "entityId": { - "type": "string", - "format": "uri" - }, - "error": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/entityOperations/delete": { - "post": { - "description": "Batch Entity delete", - "operationId": "batchEntityDelete", - "tags": [ - "Batch Operations" - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uri" - }, - "minItems": 1 - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entityOperations~1upsert/post/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/temporal/entities/": { - "get": { - "description": "Query temporal evolution of Entities from an NGSI-LD system", - "operationId": "queryTemporalEntities", - "tags": [ - "Temporal Evolution" - ], - "parameters": [ - { - "$ref": "#/paths/~1entities~1/get/parameters/0" - }, - { - "$ref": "#/paths/~1entities~1/get/parameters/1" - }, - { - "$ref": "#/paths/~1entities~1/get/parameters/2" - }, - { - "$ref": "#/paths/~1entities~1/get/parameters/3" - }, - { - "$ref": "#/paths/~1entities~1/get/parameters/4" - }, - { - "$ref": "#/paths/~1entities~1/get/parameters/5" - }, - { - "$ref": "#/paths/~1entities~1/get/parameters/6" - }, - { - "$ref": "#/paths/~1entities~1/get/parameters/7" - }, - { - "$ref": "#/paths/~1entities~1/get/parameters/8" - }, - { - "name": "timerel", - "description": "Time relationship", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "before", - "after", - "between" - ] - } - }, - { - "name": "timeproperty", - "description": "The name of the property that contains the temporal data that will be used to resolve the temporal query", - "in": "query", - "required": false, - "schema": { - "type": "string", - "pattern": "^(\\d|[a-zA-Z]|_)+$", - "minLength": 1, - "description": "NGSI-LD Name" - } - }, - { - "name": "time", - "description": "start time for temporal query", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "endTime", - "description": "end time for temporal query", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "$ref": "#/paths/~1entities~1/get/parameters/9" - }, - { - "$ref": "#/paths/~1entities~1/get/parameters/10" - }, - { - "name": "options", - "description": "Options dictionary", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "temporalValues", - "sysAttrs" - ] - } - }, - { - "name": "lastN", - "description": "Only retrieve last N instances", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1 - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "type": "array", - "items": { - "$schema": "http://json-schema.org/schema#", - "id": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/temporal/EntityTemporal.json", - "title": "NGSI-LD Entity", - "description": "NGSI-LD Temporal Representation of an Entity", - "definitions": { - "EntityTemporalFragment": { - "type": "object", - "properties": { - "@context": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/%40context" - }, - "location": { - "type": "array", - "items": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location" - }, - "minItems": 1 - }, - "observationSpace": { - "type": "array", - "items": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location" - }, - "minItems": 1 - }, - "operationSpace": { - "type": "array", - "items": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location" - }, - "minItems": 1 - } - }, - "additionalProperties": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/0" - }, - "minItems": 1 - }, - { - "type": "array", - "items": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/1" - }, - "minItems": 1 - }, - { - "type": "array", - "items": { - "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location" - }, - "minItems": 1 - } - ] - }, - "propertyNames": { - "type": "string", - "pattern": "^((\\d|[a-zA-Z]|_)+(#\\d+)?)$|^(@context)$" - } - }, - "EntityTemporal": { - "allOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uri" - }, - "type": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - }, - "createdAt": { - "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/createdAt" - }, - "modifiedAt": { - "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/modifiedAt" - } - }, - "required": [ - "id", - "type" - ] - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/definitions/EntityTemporalFragment" - } - ] - } - }, - "allOf": [ - { - "$ref": "#/paths/~1temporal~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/definitions/EntityTemporal" - } - ] - } - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/EntityTemporalList-example.json" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "post": { - "description": "Create or update temporal representation of an Entity within an NGSI-LD system", - "operationId": "createUpdateEntityTemporal", - "tags": [ - "Temporal Evolution" - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/definitions/EntityTemporal" - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/EntityTemporal-example_C5.5.3.json" - } - } - } - } - }, - "responses": { - "201": { - "description": "Created. Contains the resource URI of the created Entity" - }, - "204": { - "description": "Updated. No Content" - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "409": { - "description": "Already exists", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/temporal/entities/{entityId}": { - "get": { - "description": "Retrieve the temporal representation of an specific Entity from an NGSI-LD system. It's possible to specify the Entity attributes to be retrieved by using query parameters", - "operationId": "retrieveEntityTemporalById", - "tags": [ - "Temporal Evolution" - ], - "parameters": [ - { - "$ref": "#/paths/~1entities~1%7BentityId%7D/get/parameters/0" - }, - { - "$ref": "#/paths/~1entities~1%7BentityId%7D/get/parameters/1" - }, - { - "$ref": "#/paths/~1entities~1%7BentityId%7D/get/parameters/2" - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/15" - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/9" - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10" - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/11" - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/12" - }, - { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/16" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/definitions/EntityTemporal" - }, - "examples": { - "simple": { - "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/EntityTemporal-example_C5.5.3.json" - } - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "delete": { - "description": "Removes the temporal representation of an Entity from an NGSI-LD system", - "operationId": "removeEntityTemporalById", - "tags": [ - "Temporal Evolution" - ], - "parameters": [ - { - "$ref": "#/paths/~1entities~1%7BentityId%7D/get/parameters/0" - }, - { - "$ref": "#/paths/~1entities~1%7BentityId%7D/get/parameters/2" - } - ], - "responses": { - "204": { - "description": "No Content. The entity was removed successfully" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/temporal/entities/{entityId}/attrs/": { - "post": { - "description": "Add new attributes to an existing Temporal Entity within an NGSI-LD system", - "operationId": "addTemporalEntityAttrs", - "tags": [ - "Temporal Evolution" - ], - "parameters": [ - { - "name": "entityId", - "description": "Entity Id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/definitions/EntityTemporalFragment" - } - } - } - }, - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/temporal/entities/{entityId}/attrs/{attrId}": { - "delete": { - "description": "Attribute from Temporal Representation of Entity deletion", - "operationId": "removeEntityTemporalAttr", - "tags": [ - "Temporal Evolution" - ], - "parameters": [ - { - "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0" - }, - { - "name": "attrId", - "description": "Attribute Id", - "in": "path", - "required": true, - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema" - } - } - ], - "responses": { - "204": { - "description": "No Content." - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - }, - "/temporal/entities/{entityId}/attrs/{attrId}/{instanceId}": { - "patch": { - "description": "Allows modifying a specific Attribute (Property or Relationship) instance, identified by its instanceId, of a Temporal Representation of an Entity.", - "operationId": "modifyEntityTemporalAttrInstance", - "tags": [ - "Temporal Evolution" - ], - "parameters": [ - { - "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0" - }, - { - "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D~1attrs~1%7BattrId%7D/delete/parameters/1" - }, - { - "name": "instanceId", - "description": "Instance Id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1temporal~1entities~1/get/responses/200/content/application~1json%3Bapplication~1ld%2Bjson/schema/items/definitions/EntityTemporalFragment" - } - } - } - }, - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - }, - "delete": { - "description": "Attribute Instance deletion by instance id.", - "operationId": "removeEntityTemporalAttrInstance", - "tags": [ - "Temporal Evolution" - ], - "parameters": [ - { - "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0" - }, - { - "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D~1attrs~1%7BattrId%7D/delete/parameters/1" - }, - { - "$ref": "#/paths/~1temporal~1entities~1%7BentityId%7D~1attrs~1%7BattrId%7D~1%7BinstanceId%7D/patch/parameters/2" - } - ], - "responses": { - "204": { - "description": "No Content." - }, - "400": { - "description": "Bad Request", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json;application/ld+json": { - "schema": { - "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema" - } - } - } - } - } - } - } - } -} - diff --git a/spec/updated/generated/README.md b/spec/updated/generated/README.md new file mode 100644 index 0000000000000000000000000000000000000000..fc6b767466df9a3e02ceafeeefe46a7f301c94a1 --- /dev/null +++ b/spec/updated/generated/README.md @@ -0,0 +1 @@ +>:warning: **Don't edit files in this folder, they are automatically generated and will be overwritten.** \ No newline at end of file diff --git a/spec/updated/generated/full_api.json b/spec/updated/generated/full_api.json new file mode 100644 index 0000000000000000000000000000000000000000..baa9baa5d00c749f4e81e32e8dc94d60c9bacf35 --- /dev/null +++ b/spec/updated/generated/full_api.json @@ -0,0 +1,3048 @@ +{ + "openapi": "3.0.3", + "info": { + "description": "This OAS file describes the NGSI-LD API defined by the ETSI ISG CIM group. This Cross-domain Context Information Management API allows to provide, consume and subscribe to context information in multiple scenarios and involving multiple stakeholders", + "version": "latest", + "title": "ETSI ISG CIM / NGSI-LD API", + "contact": { + "email": "NGSI-LD@etsi.org" + } + }, + "externalDocs": { + "description": "Find out more about the ETSI ISG Context Information Management", + "url": "https://portal.etsi.org/tb.aspx?tbid=854&SubTB=854" + }, + "tags": [ + { + "name": "ETSI", + "description": "European Telecommunications Standards Institute", + "externalDocs": { + "description": "Find out more", + "url": "http://www.etsi.org" + } + }, + { + "name": "CIM", + "description": "Context Information Management", + "externalDocs": { + "description": "Find out more", + "url": "https://portal.etsi.org/tb.aspx?tbid=854&SubTB=854" + } + }, + { + "name": "JSON-LD", + "description": "JSON for Linked Data", + "externalDocs": { + "description": "Find out more", + "url": "https://json-ld.org/" + } + }, + { + "name": "NGSI-LD API", + "description": "API defined by the ETSI ISG CIM", + "externalDocs": { + "description": "Preliminary Specification", + "url": "http://www.etsi.org/deliver/etsi_gs/CIM/001_099/004/01.01.01_60/gs_CIM004v010101p.pdf" + } + } + ], + "paths": { + "/entities/": { + "get": { + "description": "Retrieve a set of entities which matches a specific query from an NGSI-LD system", + "operationId": "queryEntities", + "tags": [ + "Context Information", + "Entities" + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/idPattern" + }, + { + "$ref": "#/components/parameters/type" + }, + { + "$ref": "#/components/parameters/attrs" + }, + { + "$ref": "#/components/parameters/q" + }, + { + "$ref": "#/components/parameters/georel" + }, + { + "$ref": "#/components/parameters/geometry" + }, + { + "$ref": "#/components/parameters/coordinates" + }, + { + "$ref": "#/components/parameters/geoproperty" + }, + { + "$ref": "#/components/parameters/csf" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/options" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/EntityList" + }, + "examples": { + "simple": { + "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/EntityList-example.json" + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "post": { + "description": "Create a new Entity within an NGSI-LD system", + "operationId": "createEntity", + "tags": [ + "Context Information", + "Entities" + ], + "requestBody": { + "required": true, + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/Entity" + } + } + } + }, + "responses": { + "201": { + "description": "Created. Contains the resource URI of the created Entity" + }, + "400": { + "description": "Bad request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "409": { + "description": "Already exists", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/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", + "tags": [ + "Context Information", + "Entities" + ], + "parameters": [ + { + "$ref": "#/components/parameters/entityId" + }, + { + "$ref": "#/components/parameters/attrs" + }, + { + "$ref": "#/components/parameters/parameters-type" + }, + { + "$ref": "#/components/parameters/options" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/Entity" + }, + "examples": { + "simple": { + "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/Entity-example.json" + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "delete": { + "description": "Removes an specific Entity from an NGSI-LD system", + "operationId": "removeEntityById", + "tags": [ + "Context Information", + "Entities" + ], + "parameters": [ + { + "$ref": "#/components/parameters/entityId" + }, + { + "$ref": "#/components/parameters/parameters-type" + } + ], + "responses": { + "204": { + "description": "No Content. The entity was removed successfully" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/entities/{entityId}/attrs/": { + "post": { + "description": "Append new Entity attributes to an existing Entity within an NGSI-LD system", + "operationId": "appendEntityAttrs", + "tags": [ + "Context Information", + "Entities" + ], + "parameters": [ + { + "$ref": "#/components/parameters/entityId" + }, + { + "$ref": "#/components/parameters/parameters-options" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/EntityFragment" + } + } + } + }, + "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": "#/components/schemas/UpdateResult" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "patch": { + "description": "Update existing Entity attributes within an NGSI-LD system", + "operationId": "updateEntityAttrs", + "tags": [ + "Context Information", + "Entities" + ], + "parameters": [ + { + "$ref": "#/components/parameters/entityId" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/EntityFragment" + } + } + } + }, + "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": "#/components/schemas/UpdateResult" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/entities/{entityId}/attrs/{attrId}": { + "patch": { + "description": "Update existing Entity attributes within an NGSI-LD system", + "operationId": "partialAttrUpdate", + "tags": [ + "Context Information", + "Entities" + ], + "parameters": [ + { + "$ref": "#/components/parameters/entityId" + }, + { + "$ref": "#/components/parameters/attrId" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/EntityFragment" + } + } + } + }, + "responses": { + "204": { + "description": "No Content." + }, + "400": { + "description": "Bad Request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "delete": { + "description": "Removes an existing Entity attribute within an NGSI-LD system", + "operationId": "removeEntityAttr", + "tags": [ + "Context Information", + "Entities" + ], + "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": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/subscriptions/": { + "get": { + "description": "Retrieves the subscriptions available in an NGSI-LD system", + "operationId": "retrieveSubscriptions", + "tags": [ + "Context Subscription", + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/limit" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionList" + }, + "examples": { + "simple": { + "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/SubscriptionList-example.json" + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "post": { + "description": "Creates a new Subscription within an NGSI-LD system", + "operationId": "createSubscription", + "tags": [ + "Context Subscription", + "Subscriptions" + ], + "requestBody": { + "required": true, + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/Subscription" + } + } + } + }, + "responses": { + "201": { + "description": "Created. Contains the resource URI of the created Subscription" + }, + "400": { + "description": "Bad request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "409": { + "description": "Already exists", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/subscriptions/{subscriptionId}": { + "get": { + "description": "Retrieves a specific Subscription from an NGSI-LD system", + "operationId": "retrieveSubscriptionById", + "tags": [ + "Context Subscription", + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionId" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/Subscription" + }, + "examples": { + "simple": { + "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/Subscription-example_C.4.json" + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "patch": { + "description": "Updates a specific Subscription within an NGSI-LD system", + "operationId": "updateSubscription", + "tags": [ + "Context Subscription", + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionId" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionFragment" + } + } + } + }, + "responses": { + "204": { + "description": "No Content. The Subscription was updated successfully" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "delete": { + "description": "Removes a specific Subscription from an NGSI-LD system", + "operationId": "removeSubscription", + "tags": [ + "Context Subscription", + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionId" + } + ], + "responses": { + "204": { + "description": "No Content. The Subscription was removed successfully" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/csourceRegistrations/": { + "get": { + "description": "Retrieve a set of context sources which matches a specific query from an NGSI-LD system", + "operationId": "queryCsources", + "tags": [ + "Context Sources", + "CSourceRegistrations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/idPattern" + }, + { + "$ref": "#/components/parameters/type" + }, + { + "$ref": "#/components/parameters/attrs" + }, + { + "$ref": "#/components/parameters/q" + }, + { + "$ref": "#/components/parameters/georel" + }, + { + "$ref": "#/components/parameters/geometry" + }, + { + "$ref": "#/components/parameters/coordinates" + }, + { + "$ref": "#/components/parameters/geoproperty" + }, + { + "$ref": "#/components/parameters/limit" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ContextSourceRegistrationList" + }, + "examples": { + "simple": { + "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/ContextSourceRegistrationList-example.json" + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "post": { + "description": "Registers a new context source within an NGSI-LD system", + "operationId": "registerCsource", + "tags": [ + "Context Sources", + "CSourceRegistrations" + ], + "requestBody": { + "required": true, + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ContextSourceRegistration" + } + } + } + }, + "responses": { + "201": { + "description": "Created. Contains the resource URI of the created Registration" + }, + "400": { + "description": "Bad request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "409": { + "description": "Already exists", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/csourceRegistrations/{registrationId}": { + "get": { + "description": "Retrieves a specific context source registration from an NGSI-LD system", + "operationId": "retrieveCsource", + "tags": [ + "Context Sources", + "CSourceRegistrations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/registrationId" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ContextSourceRegistration" + }, + "examples": { + "simple": { + "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/" + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "delete": { + "description": "Removes an specific context source registration within an NGSI-LD system", + "operationId": "removeCsource", + "tags": [ + "Context Sources", + "CSourceRegistrations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/registrationId" + } + ], + "responses": { + "204": { + "description": "No Content. The Registration was removed successfully" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/csourceSubscriptions/": { + "get": { + "description": "Retrieves the context source discovery subscriptions available in an NGSI-LD system", + "operationId": "retrieveCSourceSubscriptions", + "tags": [ + "Context Sources", + "CSourceSubscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/limit" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionList" + }, + "examples": { + "simple": { + "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/SubscriptionList-example.json" + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "post": { + "description": "Creates a context source discovery Subscription within an NGSI-LD system", + "operationId": "createCSourceSubscription", + "tags": [ + "Context Sources", + "CSourceSubscriptions" + ], + "requestBody": { + "required": true, + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/Subscription" + } + } + } + }, + "responses": { + "201": { + "description": "Created. Contains the resource URI of the created Subscription" + }, + "400": { + "description": "Bad request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "409": { + "description": "Already exists", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/csourceSubscriptions/{subscriptionId}": { + "get": { + "description": "Retrieves a specific Subscription from an NGSI-LD system", + "operationId": "retrieveCSourceSubscriptionsById", + "tags": [ + "Context Sources", + "CSourceSubscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionId" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/Subscription" + }, + "examples": { + "simple": { + "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/Subscription-example_C.4.json" + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "patch": { + "description": "Updates a specific context source discovery Subscription within an NGSI-LD system", + "operationId": "updateCSourceSubscription", + "tags": [ + "Context Sources", + "CSourceSubscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionId" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionFragment" + } + } + } + }, + "responses": { + "204": { + "description": "No Content. The Subscription was updated successfully" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "delete": { + "description": "Removes a specific Context Source Subscription from an NGSI-LD system", + "operationId": "removeCSourceSubscription", + "tags": [ + "Context Sources", + "CSourceSubscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionId" + } + ], + "responses": { + "204": { + "description": "No Content. The Subscription was removed successfully" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/entityOperations/create": { + "post": { + "description": "Batch Entity creation", + "operationId": "batchEntityCreation", + "tags": [ + "Batch Operations", + "Entities" + ], + "requestBody": { + "required": true, + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/EntityList" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/BatchOperationResult" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/entityOperations/update": { + "post": { + "description": "Batch Entity update", + "operationId": "batchEntityUpdate", + "tags": [ + "Batch Operations", + "Entities" + ], + "parameters": [ + { + "name": "options", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "noOverwrite" + ] + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/EntityList" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/BatchOperationResult" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/entityOperations/upsert": { + "post": { + "description": "Batch Entity upsert", + "operationId": "batchEntityUpsert", + "tags": [ + "Batch Operations", + "Entities" + ], + "parameters": [ + { + "name": "options", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "replace", + "update" + ] + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/EntityList" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/BatchOperationResult" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/entityOperations/delete": { + "post": { + "description": "Batch Entity delete", + "operationId": "batchEntityDelete", + "tags": [ + "Batch Operations", + "Entities" + ], + "requestBody": { + "required": true, + "content": { + "application/json;application/ld+json": { + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uri" + }, + "minItems": 1 + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/BatchOperationResult" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/temporal/entities/": { + "get": { + "description": "Query temporal evolution of Entities from an NGSI-LD system", + "operationId": "queryTemporalEntities", + "tags": [ + "Temporal Evolution", + "Temporal" + ], + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/idPattern" + }, + { + "$ref": "#/components/parameters/type" + }, + { + "$ref": "#/components/parameters/attrs" + }, + { + "$ref": "#/components/parameters/q" + }, + { + "$ref": "#/components/parameters/georel" + }, + { + "$ref": "#/components/parameters/geometry" + }, + { + "$ref": "#/components/parameters/coordinates" + }, + { + "$ref": "#/components/parameters/geoproperty" + }, + { + "$ref": "#/components/parameters/timerel" + }, + { + "$ref": "#/components/parameters/timeproperty" + }, + { + "$ref": "#/components/parameters/time" + }, + { + "$ref": "#/components/parameters/endTime" + }, + { + "$ref": "#/components/parameters/csf" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/components-parameters-options" + }, + { + "$ref": "#/components/parameters/lastN" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/EntityTemporalList" + }, + "examples": { + "simple": { + "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/EntityTemporalList-example.json" + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "post": { + "description": "Create or update temporal representation of an Entity within an NGSI-LD system", + "operationId": "createUpdateEntityTemporal", + "tags": [ + "Temporal Evolution", + "Temporal" + ], + "requestBody": { + "required": true, + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/EntityTemporal" + }, + "examples": { + "simple": { + "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/EntityTemporal-example_C5.5.3.json" + } + } + } + } + }, + "responses": { + "201": { + "description": "Created. Contains the resource URI of the created Entity" + }, + "204": { + "description": "Updated. No Content" + }, + "400": { + "description": "Bad request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "409": { + "description": "Already exists", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/temporal/entities/{entityId}": { + "get": { + "description": "Retrieve the temporal representation of an specific Entity from an NGSI-LD system. It's possible to specify the Entity attributes to be retrieved by using query parameters", + "operationId": "retrieveEntityTemporalById", + "tags": [ + "Temporal Evolution", + "Temporal" + ], + "parameters": [ + { + "$ref": "#/components/parameters/entityId" + }, + { + "$ref": "#/components/parameters/attrs" + }, + { + "$ref": "#/components/parameters/parameters-type" + }, + { + "$ref": "#/components/parameters/components-parameters-options" + }, + { + "$ref": "#/components/parameters/timerel" + }, + { + "$ref": "#/components/parameters/timeproperty" + }, + { + "$ref": "#/components/parameters/time" + }, + { + "$ref": "#/components/parameters/endTime" + }, + { + "$ref": "#/components/parameters/lastN" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/EntityTemporal" + }, + "examples": { + "simple": { + "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/EntityTemporal-example_C5.5.3.json" + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "delete": { + "description": "Removes the temporal representation of an Entity from an NGSI-LD system", + "operationId": "removeEntityTemporalById", + "tags": [ + "Temporal Evolution", + "Temporal" + ], + "parameters": [ + { + "$ref": "#/components/parameters/entityId" + }, + { + "$ref": "#/components/parameters/parameters-type" + } + ], + "responses": { + "204": { + "description": "No Content. The entity was removed successfully" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/temporal/entities/{entityId}/attrs/": { + "post": { + "description": "Add new attributes to an existing Temporal Entity within an NGSI-LD system", + "operationId": "addTemporalEntityAttrs", + "tags": [ + "Temporal Evolution", + "Temporal" + ], + "parameters": [ + { + "$ref": "#/components/parameters/entityId" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/EntityTemporalFragment" + } + } + } + }, + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/temporal/entities/{entityId}/attrs/{attrId}": { + "delete": { + "description": "Attribute from Temporal Representation of Entity deletion", + "operationId": "removeEntityTemporalAttr", + "tags": [ + "Temporal Evolution", + "Temporal" + ], + "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": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/temporal/entities/{entityId}/attrs/{attrId}/{instanceId}": { + "patch": { + "description": "Allows modifying a specific Attribute (Property or Relationship) instance, identified by its instanceId, of a Temporal Representation of an Entity.", + "operationId": "modifyEntityTemporalAttrInstance", + "tags": [ + "Temporal Evolution", + "Temporal" + ], + "parameters": [ + { + "$ref": "#/components/parameters/entityId" + }, + { + "$ref": "#/components/parameters/attrId" + }, + { + "$ref": "#/components/parameters/instanceId" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/EntityTemporalFragment" + } + } + } + }, + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "delete": { + "description": "Attribute Instance deletion by instance id.", + "operationId": "removeEntityTemporalAttrInstance", + "tags": [ + "Temporal Evolution", + "Temporal" + ], + "parameters": [ + { + "$ref": "#/components/parameters/entityId" + }, + { + "$ref": "#/components/parameters/attrId" + }, + { + "$ref": "#/components/parameters/instanceId" + } + ], + "responses": { + "204": { + "description": "No Content." + }, + "400": { + "description": "Bad Request", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json;application/ld+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + } + }, + "components": { + "parameters": { + "id": { + "name": "id", + "description": "Comma separated list of URIs to be retrieved", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uri" + } + }, + "idPattern": { + "name": "idPattern", + "description": "Regular expression that must be matched by Entity ids", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "regexp" + } + }, + "type": { + "name": "type", + "description": "Comma separated list of Entity type names to be retrieved", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1 + } + }, + "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 + } + }, + "q": { + "name": "q", + "description": "Query", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1 + } + }, + "georel": { + "name": "georel", + "description": "Geo-relationship", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/georel" + } + }, + "geometry": { + "name": "geometry", + "description": "Geometry", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/geometry" + } + }, + "coordinates": { + "name": "coordinates", + "description": "Coordinates serialized as a string", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/coordinates" + } + }, + "geoproperty": { + "name": "geoproperty", + "description": "The name of the property that contains the geo-spatial data that will be used to resolve the geoquery", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1 + } + }, + "csf": { + "name": "csf", + "description": "Context Source Filter", + "in": "query", + "required": false, + "schema": { + "type": "string", + "minLength": 1 + } + }, + "limit": { + "name": "limit", + "description": "Pagination limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + "options": { + "name": "options", + "description": "Options dictionary", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "keyValues", + "sysAttrs" + ] + } + }, + "entityId": { + "name": "entityId", + "description": "Entity Id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uri" + } + }, + "parameters-type": { + "name": "type", + "description": "Entity Type", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/Name" + } + }, + "parameters-options": { + "name": "options", + "description": "Indicates that no attribute overwrite shall be performed", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "noOverwrite" + ] + } + }, + "attrId": { + "name": "attrId", + "description": "Attribute Id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/Name" + } + }, + "subscriptionId": { + "name": "subscriptionId", + "description": "Subscription Id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uri" + } + }, + "registrationId": { + "name": "registrationId", + "description": "Registration Id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uri" + } + }, + "timerel": { + "name": "timerel", + "description": "Time relationship", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/timerel" + } + }, + "timeproperty": { + "name": "timeproperty", + "description": "The name of the property that contains the temporal data that will be used to resolve the temporal query", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/Name" + } + }, + "time": { + "name": "time", + "description": "start time for temporal query", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + } + }, + "endTime": { + "name": "endTime", + "description": "end time for temporal query", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + } + }, + "components-parameters-options": { + "name": "options", + "description": "Options dictionary", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "temporalValues", + "sysAttrs" + ] + } + }, + "lastN": { + "name": "lastN", + "description": "Only retrieve last N instances", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + "instanceId": { + "name": "instanceId", + "description": "Instance Id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uri" + } + } + }, + "schemas": { + "georel": { + "oneOf": [ + { + "type": "string", + "enum": [ + "equals", + "disjoint", + "intersects", + "within", + "contains", + "overlaps" + ] + }, + { + "type": "string", + "pattern": "^near;((maxDistance==\\d+)|(minDistance==\\d+))$" + } + ] + }, + "geometry": { + "type": "string", + "enum": [ + "Point", + "MultiPoint", + "LineString", + "MultiLineString", + "Polygon", + "MultiPolygon" + ] + }, + "position": { + "description": "A single position", + "type": "array", + "minItems": 2, + "maxItems": 2, + "items": { + "type": "number" + }, + "additionalProperties": false + }, + "positionArray": { + "description": "An array of positions", + "type": "array", + "items": { + "$ref": "#/components/schemas/position" + } + }, + "lineString": { + "description": "An array of two or more positions", + "allOf": [ + { + "$ref": "#/components/schemas/positionArray" + }, + { + "minItems": 2 + } + ] + }, + "linearRing": { + "description": "An array of four positions where the first equals the last", + "allOf": [ + { + "$ref": "#/components/schemas/positionArray" + }, + { + "minItems": 4 + } + ] + }, + "polygon": { + "description": "An array of linear rings", + "type": "array", + "items": { + "$ref": "#/components/schemas/linearRing" + } + }, + "coordinates": { + "oneOf": [ + { + "$ref": "#/components/schemas/position" + }, + { + "$ref": "#/components/schemas/positionArray" + }, + { + "$ref": "#/components/schemas/lineString" + }, + { + "$ref": "#/components/schemas/polygon" + } + ] + }, + "LdContext": { + "oneOf": [ + { + "type": "object" + }, + { + "type": "string", + "format": "uri" + }, + { + "type": "array", + "minItems": 1, + "items": { + "oneOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "object" + } + ] + } + } + ] + }, + "Point": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Point" + ] + }, + "coordinates": { + "$ref": "#/components/schemas/position" + } + } + }, + "MultiPoint": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "MultiPoint" + ] + }, + "coordinates": { + "$ref": "#/components/schemas/positionArray" + } + } + }, + "Polygon": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Polygon" + ] + }, + "coordinates": { + "$ref": "#/components/schemas/polygon" + } + } + }, + "LineString": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "LineString" + ] + }, + "coordinates": { + "$ref": "#/components/schemas/lineString" + } + } + }, + "MultiLineString": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "MultiLineString" + ] + }, + "coordinates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/lineString" + } + } + } + }, + "MultiPolygon": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + }, + "coordinates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/polygon" + } + } + } + }, + "Geometry": { + "description": " Avalid GeoJSON geometry object", + "oneOf": [ + { + "$ref": "#/components/schemas/Point" + }, + { + "$ref": "#/components/schemas/MultiPoint" + }, + { + "$ref": "#/components/schemas/Polygon" + }, + { + "$ref": "#/components/schemas/LineString" + }, + { + "$ref": "#/components/schemas/MultiLineString" + }, + { + "$ref": "#/components/schemas/MultiPolygon" + } + ] + }, + "observedAt": { + "type": "string", + "format": "date-time" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "modifiedAt": { + "type": "string", + "format": "date-time" + }, + "datasetId": { + "type": "string", + "format": "uri" + }, + "instanceId": { + "type": "string", + "format": "uri" + }, + "Property": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Property" + ] + }, + "value": { + "oneOf": [ + "string", + "number", + "boolean", + "array", + "object" + ] + }, + "observedAt": { + "$ref": "#/components/schemas/observedAt" + }, + "createdAt": { + "$ref": "#/components/schemas/createdAt" + }, + "modifiedAt": { + "$ref": "#/components/schemas/modifiedAt" + }, + "datasetId": { + "$ref": "#/components/schemas/datasetId" + }, + "instanceId": { + "$ref": "#/components/schemas/instanceId" + } + }, + "required": [ + "type", + "value" + ], + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/Property" + }, + { + "$ref": "#/components/schemas/Relationship" + } + ] + } + }, + "Relationship": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Relationship" + ] + }, + "object": { + "type": "string", + "format": "uri" + }, + "observedAt": { + "$ref": "#/components/schemas/observedAt" + }, + "createdAt": { + "$ref": "#/components/schemas/createdAt" + }, + "modifiedAt": { + "$ref": "#/components/schemas/modifiedAt" + }, + "datasetId": { + "$ref": "#/components/schemas/datasetId" + }, + "instanceId": { + "$ref": "#/components/schemas/instanceId" + } + }, + "required": [ + "type", + "object" + ], + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/Property" + }, + { + "$ref": "#/components/schemas/Relationship" + } + ] + } + }, + "GeoProperty": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "GeoProperty" + ] + }, + "value": { + "$ref": "#/components/schemas/Geometry" + }, + "observedAt": { + "$ref": "#/components/schemas/observedAt" + }, + "createdAt": { + "$ref": "#/components/schemas/createdAt" + }, + "modifiedAt": { + "$ref": "#/components/schemas/modifiedAt" + }, + "datasetId": { + "$ref": "#/components/schemas/datasetId" + }, + "instanceId": { + "$ref": "#/components/schemas/instanceId" + } + }, + "required": [ + "type", + "value" + ], + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/Property" + }, + { + "$ref": "#/components/schemas/Relationship" + } + ] + } + }, + "Name": { + "type": "string", + "pattern": "^((\\d|[a-zA-Z]|_)+(:(\\d|[a-zA-Z]|_)+)?(#\\d+)?)$", + "minLength": 1, + "description": "NGSI-LD Name" + }, + "EntityFragment": { + "type": "object", + "properties": { + "@context": { + "$ref": "#/components/schemas/LdContext" + }, + "location": { + "$ref": "#/components/schemas/GeoProperty" + }, + "observationSpace": { + "$ref": "#/components/schemas/GeoProperty" + }, + "operationSpace": { + "$ref": "#/components/schemas/GeoProperty" + }, + "id": { + "type": "string", + "format": "uri" + }, + "type": { + "$ref": "#/components/schemas/Name" + }, + "createdAt": { + "$ref": "#/components/schemas/createdAt" + }, + "modifiedAt": { + "$ref": "#/components/schemas/modifiedAt" + } + }, + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/Property" + }, + { + "$ref": "#/components/schemas/Relationship" + }, + { + "$ref": "#/components/schemas/GeoProperty" + } + ] + } + }, + "Entity": { + "allOf": [ + { + "required": [ + "id", + "type" + ] + }, + { + "$ref": "#/components/schemas/EntityFragment" + } + ] + }, + "EntityList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Entity" + } + }, + "ProblemDetails": { + "type": "object", + "properties": { + "type": { + "type": "string", + "format": "uri" + }, + "title": { + "type": "string" + }, + "detail": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "NotUpdatedDetails": { + "type": "object", + "properties": { + "attributeName": { + "type": "string", + "pattern": "" + }, + "reason": { + "type": "string", + "minLength": 1 + } + } + }, + "UpdateResult": { + "type": "object", + "properties": { + "updated": { + "type": "array", + "items": { + "type": "string", + "pattern": "" + } + }, + "notUpdated": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotUpdatedDetails" + } + } + } + }, + "EntityInfo": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uri" + }, + "type": { + "$ref": "#/components/schemas/Name" + }, + "idPattern": { + "type": "string", + "format": "regex" + } + }, + "required": [ + "type" + ] + }, + "GeoQuery": { + "type": "object", + "required": [ + "geometry", + "coordinates", + "georel" + ], + "properties": { + "georel": { + "$ref": "#/components/schemas/georel" + }, + "coordinates": { + "$ref": "#/components/schemas/coordinates" + }, + "geometry": { + "$ref": "#/components/schemas/geometry" + } + } + }, + "SubscriptionFragment": { + "type": "object", + "properties": { + "@context": { + "$ref": "#/components/schemas/LdContext" + }, + "entities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityInfo" + }, + "minItems": 1 + }, + "name": { + "type": "string", + "minLength": 1 + }, + "description": { + "type": "string", + "minLength": 1 + }, + "watchedAttributes": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/Name" + }, + "uniqueItems": true + }, + "timeInterval": { + "type": "number", + "minimum": 0 + }, + "expires": { + "type": "string", + "format": "date-time" + }, + "isActive": { + "type": "boolean" + }, + "throttling": { + "type": "number", + "minimum": 1 + }, + "q": { + "type": "string" + }, + "geoQ": { + "$ref": "#/components/schemas/GeoQuery" + }, + "csf": { + "type": "string" + } + } + }, + "Endpoint": { + "type": "object", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string", + "format": "uri" + }, + "accept": { + "type": "string", + "enum": [ + "application/json", + "application/ld+json" + ] + } + } + }, + "NotificationParams": { + "type": "object", + "properties": { + "attributes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "minLength": 1 + }, + "uniqueItems": true + }, + "format": { + "type": "string" + }, + "endpoint": { + "$ref": "#/components/schemas/Endpoint" + }, + "status": { + "type": "string", + "enum": [ + "ok", + "failed" + ] + }, + "timesSent": { + "type": "number", + "minimum": 1 + }, + "lastNotification": { + "type": "string", + "format": "date-time" + }, + "lastFailure": { + "type": "string", + "format": "date-time" + }, + "lastSuccess": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "endpoint" + ] + }, + "Subscription": { + "allOf": [ + { + "$ref": "#/components/schemas/SubscriptionFragment" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uri" + }, + "type": { + "type": "string", + "enum": [ + "Subscription" + ] + }, + "notification": { + "$ref": "#/components/schemas/NotificationParams" + }, + "status": { + "type": "string", + "enum": [ + "active", + "paused", + "expired" + ] + }, + "createdAt": { + "$ref": "#/components/schemas/createdAt" + }, + "modifiedAt": { + "$ref": "#/components/schemas/modifiedAt" + } + }, + "allOf": [ + { + "required": [ + "id", + "type", + "notification" + ] + }, + { + "anyOf": [ + { + "required": [ + "entities" + ] + }, + { + "required": [ + "watchedAttributes" + ] + } + ] + } + ] + } + ] + }, + "SubscriptionList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Subscription" + } + }, + "RegistrationInfo": { + "type": "object", + "properties": { + "entities": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/EntityInfo" + } + }, + "properties": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/Name" + }, + "uniqueItems": true + }, + "relationships": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/Name" + }, + "uniqueItems": true + } + } + }, + "TimeInterval": { + "type": "object", + "required": [ + "start" + ], + "properties": { + "start": { + "type": "string", + "format": "date-time" + }, + "end": { + "type": "string", + "format": "date-time" + } + } + }, + "ContextSourceRegistrationFragment": { + "type": "object", + "properties": { + "@context": { + "$ref": "#/components/schemas/LdContext" + }, + "information": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/RegistrationInfo" + } + }, + "observationInterval": { + "$ref": "#/components/schemas/TimeInterval" + }, + "managementInterval": { + "$ref": "#/components/schemas/TimeInterval" + }, + "location": { + "$ref": "#/components/schemas/Geometry" + }, + "observationSpace": { + "$ref": "#/components/schemas/Geometry" + }, + "operationSpace": { + "$ref": "#/components/schemas/Geometry" + }, + "expires": { + "type": "string", + "format": "date-time" + }, + "name": { + "type": "string", + "minLength": 1 + }, + "description": { + "type": "string", + "minLength": 1 + }, + "endpoint": { + "type": "string", + "format": "uri" + } + }, + "additionalProperties": true + }, + "ContextSourceRegistration": { + "allOf": [ + { + "$ref": "#/components/schemas/ContextSourceRegistrationFragment" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uri" + }, + "type": { + "type": "string", + "enum": [ + "ContextSourceRegistration" + ] + }, + "createdAt": { + "$ref": "#/components/schemas/createdAt" + }, + "modifiedAt": { + "$ref": "#/components/schemas/modifiedAt" + } + }, + "required": [ + "id", + "type", + "endpoint", + "information" + ] + } + ] + }, + "ContextSourceRegistrationList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContextSourceRegistration" + } + }, + "BatchEntityError": { + "type": "object", + "properties": { + "entityId": { + "type": "string", + "format": "uri" + }, + "error": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "BatchOperationResult": { + "type": "object", + "properties": { + "success": { + "type": "array", + "items": { + "type": "string", + "format": "uri" + } + }, + "error": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BatchEntityError" + } + } + } + }, + "timerel": { + "type": "string", + "enum": [ + "before", + "after", + "between" + ] + }, + "EntityTemporalFragment": { + "type": "object", + "properties": { + "@context": { + "$ref": "#/components/schemas/LdContext" + }, + "location": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoProperty" + }, + "minItems": 1 + }, + "observationSpace": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoProperty" + }, + "minItems": 1 + }, + "operationSpace": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoProperty" + }, + "minItems": 1 + }, + "id": { + "type": "string", + "format": "uri" + }, + "type": { + "$ref": "#/components/schemas/Name" + }, + "createdAt": { + "$ref": "#/components/schemas/createdAt" + }, + "modifiedAt": { + "$ref": "#/components/schemas/modifiedAt" + } + }, + "additionalProperties": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Property" + }, + "minItems": 1 + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Relationship" + }, + "minItems": 1 + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeoProperty" + }, + "minItems": 1 + } + ] + } + }, + "EntityTemporal": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityTemporalFragment" + }, + { + "type": "object", + "required": [ + "type", + "id" + ] + } + ] + }, + "EntityTemporalList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityTemporal" + } + } + } + } +} \ No newline at end of file diff --git a/spec/updated/ngsi-ld-spec-open-api.json b/spec/updated/ngsi-ld-spec-open-api.json index c518c58896012dd4bf874bb1c7dc69574ac388ec..23c91b466f19a5fa7381d5d358be868afa42c9a2 100644 --- a/spec/updated/ngsi-ld-spec-open-api.json +++ b/spec/updated/ngsi-ld-spec-open-api.json @@ -48,46 +48,46 @@ ], "paths": { "/entities/": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/paths/%2Fentities%2F" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/paths/%2Fentities%2F" }, "/entities/{entityId}": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entity-by-id-spec.json#/paths/%2Fentities%2F%7BentityId%7D" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entity-by-id-spec.json#/paths/%2Fentities%2F%7BentityId%7D" }, "/entities/{entityId}/attrs/": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entity-attrs-spec.json#/paths/%2Fentities%2F%7BentityId%7D%2Fattrs%2F" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entity-attrs-spec.json#/paths/%2Fentities%2F%7BentityId%7D%2Fattrs%2F" }, "/entities/{entityId}/attrs/{attrId}": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entity-attrs-spec.json#/paths/%2Fentities%2F%7BentityId%7D%2Fattrs%2F%7BattrId%7D" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entity-attrs-spec.json#/paths/%2Fentities%2F%7BentityId%7D%2Fattrs%2F%7BattrId%7D" }, "/subscriptions/": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/subscriptions-spec.json#/paths/%2Fsubscriptions%2F" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/subscriptions/subscriptions-spec.json#/paths/%2Fsubscriptions%2F" }, "/subscriptions/{subscriptionId}": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/subscription-by-id-spec.json#/paths/%2Fsubscriptions%2F%7BsubscriptionId%7D" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/subscriptions/subscription-by-id-spec.json#/paths/%2Fsubscriptions%2F%7BsubscriptionId%7D" }, "/csourceRegistrations/": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/csource-registrations-spec.json#/paths/%2FcsourceRegistrations%2F" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/csourceRegistrations/csource-registrations-spec.json#/paths/%2FcsourceRegistrations%2F" }, "/csourceRegistrations/{registrationId}": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/csource-registration-by-id-spec.json#/paths/%2FcsourceRegistrations%2F%7BregistrationId%7D" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/csourceRegistrations/csource-registration-by-id-spec.json#/paths/%2FcsourceRegistrations%2F%7BregistrationId%7D" }, "/csourceSubscriptions/": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/csource-subscriptions-spec.json#/paths/%2FcsourceSubscriptions%2F" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/csourceSubscriptions/csource-subscriptions-spec.json#/paths/%2FcsourceSubscriptions%2F" }, "/csourceSubscriptions/{subscriptionId}": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/csource-subscription-by-id-spec.json#/paths/%2FcsourceSubscriptions%2F%7BsubscriptionId%7D" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/csourceSubscriptions/csource-subscription-by-id-spec.json#/paths/%2FcsourceSubscriptions%2F%7BsubscriptionId%7D" }, "/entityOperations/create": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entity-operations-spec.json#/paths/%2FentityOperations%2Fcreate" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entity-operations-spec.json#/paths/%2FentityOperations%2Fcreate" }, "/entityOperations/update": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entity-operations-spec.json#/paths/%2FentityOperations%2Fupdate" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entity-operations-spec.json#/paths/%2FentityOperations%2Fupdate" }, "/entityOperations/upsert": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entity-operations-spec.json#/paths/%2FentityOperations%2Fupsert" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entity-operations-spec.json#/paths/%2FentityOperations%2Fupsert" }, "/entityOperations/delete": { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entity-operations-spec.json#/paths/%2FentityOperations%2Fdelete" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entity-operations-spec.json#/paths/%2FentityOperations%2Fdelete" }, "/temporal/entities/": { "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/temporal/temporal-entities-spec.json#/paths/%2Ftemporal%2Fentities%2F" diff --git a/spec/updated/subscription-by-id-spec.json b/spec/updated/subscriptions/subscription-by-id-spec.json similarity index 95% rename from spec/updated/subscription-by-id-spec.json rename to spec/updated/subscriptions/subscription-by-id-spec.json index ffcc76d66d7cbea91174060e6baa282dc9d19e97..614f951fec9d0c1f9ea4e0a880dba4e40ec3a9d4 100644 --- a/spec/updated/subscription-by-id-spec.json +++ b/spec/updated/subscriptions/subscription-by-id-spec.json @@ -22,8 +22,8 @@ "/subscriptions/{subscriptionId}": { "get": { "description": "Retrieves a specific Subscription from an NGSI-LD system", - "operationId": "retrieveSubscription", - "tags": ["Context Subscription"], + "operationId": "retrieveSubscriptionById", + "tags": ["Context Subscription", "Subscriptions"], "parameters": [ { "$ref": "#/components/parameters/subscriptionId" @@ -70,7 +70,7 @@ "patch": { "description": "Updates a specific Subscription within an NGSI-LD system", "operationId": "updateSubscription", - "tags": ["Context Subscription"], + "tags": ["Context Subscription", "Subscriptions"], "parameters": [ { "$ref": "#/components/parameters/subscriptionId" @@ -115,7 +115,7 @@ "delete": { "description": "Removes a specific Subscription from an NGSI-LD system", "operationId": "removeSubscription", - "tags": ["Context Subscription"], + "tags": ["Context Subscription", "Subscriptions"], "parameters": [ { "$ref": "#/components/parameters/subscriptionId" diff --git a/spec/updated/subscriptions-spec.json b/spec/updated/subscriptions/subscriptions-spec.json similarity index 95% rename from spec/updated/subscriptions-spec.json rename to spec/updated/subscriptions/subscriptions-spec.json index e8a79d474b56db194dbb7b245faae11dd836cc18..b4f935b1ead928e2c26bf6cf60bda1ce3cf43c39 100644 --- a/spec/updated/subscriptions-spec.json +++ b/spec/updated/subscriptions/subscriptions-spec.json @@ -23,8 +23,9 @@ "get": { "description": "Retrieves the subscriptions available in an NGSI-LD system", "operationId": "retrieveSubscriptions", - "tags":[ - "Context Subscription" + "tags": [ + "Context Subscription", + "Subscriptions" ], "parameters": [ { @@ -62,8 +63,9 @@ "post": { "description": "Creates a new Subscription within an NGSI-LD system", "operationId": "createSubscription", - "tags":[ - "Context Subscription" + "tags": [ + "Context Subscription", + "Subscriptions" ], "requestBody": { "required": true, diff --git a/spec/updated/temporal/temporal-entities-spec.json b/spec/updated/temporal/temporal-entities-spec.json index 2f21aceae581a67f6ea4b3ba384286db5e211ca6..dbf525730db43a229d34eef59e39f6444fb1852d 100644 --- a/spec/updated/temporal/temporal-entities-spec.json +++ b/spec/updated/temporal/temporal-entities-spec.json @@ -74,34 +74,34 @@ "get": { "description": "Query temporal evolution of Entities from an NGSI-LD system", "operationId": "queryTemporalEntities", - "tags": ["Temporal Evolution"], + "tags": ["Temporal Evolution", "Temporal"], "parameters": [ { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/id" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/id" }, { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/idPattern" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/idPattern" }, { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/type" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/type" }, { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/attrs" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/attrs" }, { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/q" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/q" }, { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/georel" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/georel" }, { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/geometry" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/geometry" }, { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/coordinates" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/coordinates" }, { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/geoproperty" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/geoproperty" }, { "$ref": "#/components/parameters/timerel" @@ -116,10 +116,10 @@ "$ref": "#/components/parameters/endTime" }, { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/csf" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/csf" }, { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/limit" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/limit" }, { "$ref": "#/components/parameters/options" @@ -159,7 +159,7 @@ "post": { "description": "Create or update temporal representation of an Entity within an NGSI-LD system", "operationId": "createUpdateEntityTemporal", - "tags": ["Temporal Evolution"], + "tags": ["Temporal Evolution", "Temporal"], "requestBody": { "required": true, "content": { diff --git a/spec/updated/temporal/temporal-entity-attrs-spec.json b/spec/updated/temporal/temporal-entity-attrs-spec.json index 8533bd91c9a942549ec57496f9d960e58994a057..e345169b6524d84993f5c21c8570b3f861be95ef 100644 --- a/spec/updated/temporal/temporal-entity-attrs-spec.json +++ b/spec/updated/temporal/temporal-entity-attrs-spec.json @@ -42,7 +42,7 @@ "post": { "description": "Add new attributes to an existing Temporal Entity within an NGSI-LD system", "operationId": "addTemporalEntityAttrs", - "tags": ["Temporal Evolution"], + "tags": ["Temporal Evolution", "Temporal"], "parameters": [ { "$ref": "#/components/parameters/entityId" @@ -89,7 +89,7 @@ "delete": { "description": "Attribute from Temporal Representation of Entity deletion", "operationId": "removeEntityTemporalAttr", - "tags": ["Temporal Evolution"], + "tags": ["Temporal Evolution", "Temporal"], "parameters": [ { "$ref": "#/components/parameters/entityId" @@ -129,7 +129,7 @@ "patch": { "description": "Allows modifying a specific Attribute (Property or Relationship) instance, identified by its instanceId, of a Temporal Representation of an Entity.", "operationId": "modifyEntityTemporalAttrInstance", - "tags": ["Temporal Evolution"], + "tags": ["Temporal Evolution", "Temporal"], "parameters": [ { "$ref": "#/components/parameters/entityId" @@ -180,7 +180,7 @@ "delete": { "description": "Attribute Instance deletion by instance id.", "operationId": "removeEntityTemporalAttrInstance", - "tags": ["Temporal Evolution"], + "tags": ["Temporal Evolution", "Temporal"], "parameters": [ { "$ref": "#/components/parameters/entityId" diff --git a/spec/updated/temporal/temporal-entity-by-id-spec.json b/spec/updated/temporal/temporal-entity-by-id-spec.json index 71e0b256478606b50766699d4b1a9934213b586d..80336f8a376835ee43cf57403eaa7ae6e6bb9808 100644 --- a/spec/updated/temporal/temporal-entity-by-id-spec.json +++ b/spec/updated/temporal/temporal-entity-by-id-spec.json @@ -11,16 +11,16 @@ "get": { "description": "Retrieve the temporal representation of an specific Entity from an NGSI-LD system. It's possible to specify the Entity attributes to be retrieved by using query parameters", "operationId": "retrieveEntityTemporalById", - "tags": ["Temporal Evolution"], + "tags": ["Temporal Evolution", "Temporal"], "parameters": [ { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entity-by-id-spec.json#/components/parameters/entityId" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entity-by-id-spec.json#/components/parameters/entityId" }, { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entity-by-id-spec.json#/components/parameters/attrs" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entity-by-id-spec.json#/components/parameters/attrs" }, { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entity-by-id-spec.json#/components/parameters/type" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entity-by-id-spec.json#/components/parameters/type" }, { "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/temporal/temporal-entities-spec.json#/components/parameters/options" @@ -82,13 +82,13 @@ "delete": { "description": "Removes the temporal representation of an Entity from an NGSI-LD system", "operationId": "removeEntityTemporalById", - "tags": ["Temporal Evolution"], + "tags": ["Temporal Evolution", "Temporal"], "parameters": [ { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entity-by-id-spec.json#/components/parameters/entityId" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entity-by-id-spec.json#/components/parameters/entityId" }, { - "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entity-by-id-spec.json#/components/parameters/type" + "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entity-by-id-spec.json#/components/parameters/type" } ], "responses": {