{ "swagger": "2.0", "info": { "description": "This swagger 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": "0.0.11", "title": "ETSI ISG CIM / NGSI-LD API", "termsOfService": "http://tbd.tbd/tbd/", "contact": { "email": "NGSI-LD@etsi.org" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "externalDocs": { "description": "Find out more about the ETSI ISG Context Information Management", "url": "https://portal.etsi.org/tb.aspx?tbid=854&SubTB=854" }, "host": "tbd.tbd.tbd", "basePath": "/v1", "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": "OMA", "description": "Open Mobile Alliance", "externalDocs": { "description": "Find out more", "url": "http://openmobilealliance.org" } }, { "name": "NSGI", "description": "Next Generation Service Interfaces", "externalDocs": { "description": "Find out more", "url": "http://www.openmobilealliance.org/release/NGSI/V1_0-20120529-A/OMA-AD-NGSI-V1_0-20120529-A.pdf" } }, { "name": "FIWARE NSGI v2", "description": "FIWARE Next Generation Service Interfaces v2", "externalDocs": { "description": "Find out more", "url": "https://orioncontextbroker.docs.apiary.io/#" } }, { "name": "JSON-LD", "description": "JSON for Linking 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": "Find out more", "url": "http://www.etsi.org/deliver/etsi_gs/CIM/001_099/004/01.01.01_60/gs_CIM004v010101p.pdf" } } ], "schemes": [ "http", "https" ], "paths": { "/entities": { "get": { "description": "Retrieve a set of entities which matches a specific query from an NGSI-LD system", "operationId": "queryEntities", "parameters": [ { "name": "id", "description": "Comma separated list of URIs to be retrieved", "in": "query", "required": false, "type": "string" }, { "name": "type", "description": "Comma separated list of Entity type names to be retrieved", "in": "query", "required": false, "type": "string" }, { "name": "idPattern", "description": "Regular expression that must be matched by Entity ids", "in": "query", "required": false, "type": "string" }, { "name": "attrs", "description": "Comma separated list of attribute names (properties or relationships) to be retrieved", "in": "query", "required": false, "type": "string" }, { "name": "q", "description": "Query", "in": "query", "required": false, "type": "string" }, { "name": "georel", "description": "Geo-relationship", "in": "query", "required": false, "type": "string" }, { "name": "geometry", "description": "Geometry", "in": "query", "required": false, "type": "string" }, { "name": "coordinates", "description": "Coordinates serialized as a string", "in": "query", "required": false, "type": "string" }, { "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, "type": "string" } ], "produces": [ "application/json", "application/ld+json" ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/200/schema" } } }, "400": { "description": "Bad request", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } } } }, "post": { "description": "Create a new Entity within an NGSI-LD system", "operationId": "createEntity", "parameters": [ { "name": "EntityDescription", "description": "Payload body in the request contains a JSON-LD object which represents the Entity that is to be created", "in": "body", "required": true, "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "format": "uri" } } }, { "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs/post/parameters/2/schema/allOf/1" }, { "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs/post/parameters/2/schema/allOf/2" } ] } } ], "consumes": [ "application/json", "application/ld+json" ], "responses": { "201": { "description": "Created. Contains the resource URI of the created Entity", "schema": { "type": "string" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } }, "409": { "description": "Already exists", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } }, "422": { "description": "Unprocessable Entity", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/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", "parameters": [ { "name": "entityId", "description": "Id (URI) of the Entity to be retrieved", "in": "path", "required": true, "type": "string" }, { "name": "attrs", "description": "Comma separated list of attribute names (properties or relationships) to be included in the response", "in": "query", "required": false, "type": "string" } ], "produces": [ "application/json", "application/ld+json" ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "string", "format": "uri" } } }, { "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs/post/parameters/2/schema/allOf/1" }, { "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs/post/parameters/2/schema/allOf/2" }, { "$ref": "#/paths/~1csources~1%7BregistrationId%7D/get/responses/200/schema/allOf/1" } ] } }, "400": { "description": "Bad Request", "schema": { "type": "object", "properties": { "type": { "type": "string", "format": "uri" }, "title": { "type": "string" }, "detail": { "type": "string" } } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } } } }, "delete": { "description": "Removes an specific Entity from an NGSI-LD system", "operationId": "removeEntityById", "parameters": [ { "name": "entityId", "description": "Id (URI) of the Entity to be removed", "in": "path", "required": true, "type": "string" } ], "responses": { "204": { "description": "No Content. The entity was removed successfully" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } } } } }, "/entities/{entityId}/attrs": { "post": { "description": "Append new Entity attributes to an existing Entity within an NGSI-LD system", "operationId": "appendEntityAttrs", "parameters": [ { "name": "entityId", "description": "Id (URI) of the Entity where to append new attributes", "in": "path", "required": true, "type": "string" }, { "name": "noOverwrite", "description": "Indicates that no attribute overwrite shall be performed", "in": "query", "required": false, "type": "string" }, { "name": "EntityFragment", "description": "Entity Fragment containing a complete representation of the attributes to be added", "in": "body", "required": true, "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs/patch/parameters/1/schema" } } ], "consumes": [ "application/json", "application/ld+json" ], "responses": { "204": { "description": "No Content. All the attributes were appended successfully" }, "207": { "description": "Multi-Status. Only the attributes included in the response payload were successfully appended", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs/patch/responses/207/schema" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } } } }, "patch": { "description": "Update existing Entity attributes within an NGSI-LD system", "operationId": "updateEntityAttrs", "parameters": [ { "name": "entityId", "description": "Id (URI) of the Entity where to update the specified attributes", "in": "path", "required": true, "type": "string" }, { "name": "EntityFragment", "description": "Entity Fragment containing a complete representation of the attributes to be updated", "in": "body", "required": true, "schema": { "allOf": [ { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "string", "format": "uri" } } }, { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "minLength": 1 } } }, { "allOf": [ { "type": "object", "properties": { "location": { "$ref": "#/paths/~1entities/post/parameters/0/schema/allOf/2/allOf/0/properties/observationSpace" }, "observationSpace": { "allOf": [ { "type": "object", "required": [ "type", "value" ], "properties": { "type": { "type": "string", "enum": [ "GeoProperty" ] }, "value": { "$ref": "#/paths/~1csources/post/parameters/0/schema/allOf/1/allOf/0/properties/location" } } }, { "type": "object", "properties": { "observedAt": { "type": "string", "format": "date-time" } } } ] }, "operationSpace": { "$ref": "#/paths/~1entities/post/parameters/0/schema/allOf/2/allOf/0/properties/observationSpace" } } }, { "type": "object", "properties": { "@context": { "type": [ "string", "object", "array" ] } } } ] } ] } } ], "consumes": [ "application/json", "application/ld+json" ], "responses": { "204": { "description": "No Content. All the attributes were appended successfully" }, "207": { "description": "Multi-Status. Only the attributes included in the response payload were successfully appended", "schema": { "allOf": [ { "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs/post/parameters/2/schema/allOf/1" }, { "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs/post/parameters/2/schema/allOf/2" } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } } } } }, "/entities/{entityId}/attrs/{attrId}": { "patch": { "description": "Update existing Entity attributes within an NGSI-LD system", "operationId": "partialAttrUpdate", "parameters": [ { "name": "entityId", "description": "Id (URI) of the Entity where to update the specified attribute", "in": "path", "required": true, "type": "string" }, { "name": "attrId", "description": "Attribute name (property or relationship) to be updated", "in": "path", "required": true, "type": "string" }, { "name": "EntityFragment", "description": "Entity Fragment containing the elements of the attribute to be updated", "in": "body", "required": true, "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs/patch/parameters/1/schema" } } ], "consumes": [ "application/json", "application/ld+json" ], "responses": { "204": { "description": "No Content. The attribute was updated successfully" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } } } }, "delete": { "description": "Removes an existing Entity attribute within an NGSI-LD system", "operationId": "removeEntityAttr", "parameters": [ { "name": "entityId", "description": "Id (URI) of the Entity where to remove the specified attribute", "in": "path", "required": true, "type": "string" }, { "name": "attrId", "description": "Attribute name (property or relationship) to be removed", "in": "path", "required": true, "type": "string" } ], "responses": { "204": { "description": "No Content. The attribute was removed successfully" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } } } } }, "/csources": { "post": { "description": "Registers a new context source within an NGSI-LD system", "operationId": "registerCsource", "parameters": [ { "name": "CsourceRegistrationDescription", "description": "Payload body in the request contains a JSON-LD object which represents the context source registration that is to be created", "in": "body", "required": true, "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "format": "uri" } } }, { "$ref": "#/paths/~1csources~1%7BregistrationId%7D/patch/parameters/1/schema/allOf/1" }, { "type": "object", "required": [ "endpoint", "type", "information" ], "properties": { "endpoint": { "type": "string", "format": "uri" }, "type": { "type": "string", "enum": [ "ContextSourceRegistration" ] }, "information": { "type": "array", "minItems": 1, "items": { "$ref": "#/paths/~1csources~1%7BregistrationId%7D/patch/parameters/1/schema/allOf/0/properties/information/items" } } } } ] } } ], "consumes": [ "application/json", "application/ld+json" ], "responses": { "201": { "description": "Created. Contains the resource URI of the created context source registration resource", "schema": { "type": "string" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } }, "409": { "description": "Already exists", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } }, "422": { "description": "Unprocessable Context Source Registration", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } } } }, "get": { "description": "Retrieve a set of context sources which matches a specific query from an NGSI-LD system", "operationId": "queryCsources", "parameters": [ { "name": "id", "description": "Comma separated list of URIs to be retrieved", "in": "query", "required": false, "type": "string" }, { "name": "type", "description": "Comma separated list of context sources type names to be retrieved", "in": "query", "required": false, "type": "string" }, { "name": "idPattern", "description": "Regular expression that must be matched by context source ids", "in": "query", "required": false, "type": "string" }, { "name": "attrs", "description": "Comma separated list of attribute names (properties or relationships) to be retrieved", "in": "query", "required": false, "type": "string" }, { "name": "q", "description": "Query", "in": "query", "required": false, "type": "string" }, { "name": "georel", "description": "Geo-relationship", "in": "query", "required": false, "type": "string" }, { "name": "geometry", "description": "Geometry", "in": "query", "required": false, "type": "string" }, { "name": "coordinates", "description": "Coordinates serialized as a string", "in": "query", "required": false, "type": "string" }, { "name": "geoproperty", "description": "The name of the property that contains the geo-spatial data that will be used to resolve the geo-query", "in": "query", "required": false, "type": "string" } ], "produces": [ "application/json", "application/ld+json" ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/paths/~1csources~1%7BregistrationId%7D/get/responses/200/schema" } } }, "400": { "description": "Bad request", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } } } } }, "/csources/{registrationId}": { "get": { "description": "Retrieves a specific context source registration from an NGSI-LD system", "operationId": "retrieveCsource", "parameters": [ { "name": "registrationId", "description": "Id (URI) of the context source registration to be retrieved", "in": "path", "required": true, "type": "string" } ], "produces": [ "application/json", "application/ld+json" ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "string", "format": "uri" } } }, { "type": "object", "properties": { "createdAt": { "type": "string", "format": "date-time" }, "modifiedAt": { "type": "string", "format": "date-time" } } }, { "$ref": "#/paths/~1csources~1%7BregistrationId%7D/patch/parameters/1/schema/allOf/1" }, { "$ref": "#/paths/~1csources/post/parameters/0/schema/allOf/2" } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } } } }, "delete": { "description": "Removes an specific context source registration within an NGSI-LD system", "operationId": "removeCsource", "parameters": [ { "name": "registrationId", "description": "Id (URI) of the context source registration to be removed", "in": "path", "required": true, "type": "string" } ], "responses": { "204": { "description": "No Content. The context source registration was removed successfully" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } } } }, "patch": { "description": "Updates a specific context source registration within an NGSI-LD system", "operationId": "updateCsource", "parameters": [ { "name": "registrationId", "description": "Id (URI) of the context source registration to be updated", "in": "path", "required": true, "type": "string" }, { "name": "CsourceRegistrationFragment", "description": "Payload body in the request contains a JSON-LD object which represents the context source registration that is to be updated", "in": "body", "required": true, "schema": { "allOf": [ { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "string", "format": "uri" }, "endpoint": { "type": "string", "format": "uri" }, "type": { "type": "string", "enum": [ "ContextSourceRegistration" ] }, "information": { "type": "array", "minItems": 1, "items": { "type": "object", "required": [ "entities" ], "properties": { "entities": { "type": "array", "minItems": 1, "items": { "$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/patch/parameters/1/schema/allOf/0/properties/entities/items" } }, "properties": { "type": "array", "minItems": 1, "items": { "type": "string" }, "uniqueItems": true }, "relationships": { "type": "array", "minItems": 1, "items": { "type": "string" }, "uniqueItems": true } } } } } }, { "allOf": [ { "type": "object", "properties": { "timestamp": { "type": "array", "minItems": 1, "items": { "type": "object", "required": [ "start" ], "properties": { "start": { "type": "string", "format": "date-time" }, "end": { "type": "string", "format": "date-time" } } } }, "location": { "title": "Geometry", "description": "A geometry is a GeoJSON object where the type member's value is one of the following strings: `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, or `GeometryCollection`.", "properties": { "type": { "enum": [ "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon", "GeometryCollection" ] } } }, "expires": { "type": "string", "format": "date-time" }, "name": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 } } }, { "$ref": "#/paths/~1entities/post/parameters/0/schema/allOf/2/allOf/1" } ] } ] } } ], "consumes": [ "application/json", "application/ld+json" ], "responses": { "204": { "description": "No Content. The context source registration was successfully updated" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } } } } }, "/subscriptions": { "post": { "description": "Creates a new Subscription within an NGSI-LD system", "operationId": "createSubscription", "parameters": [ { "name": "SubscriptionDescription", "description": "Payload body in the request contains a JSON-LD object which represents the Subscription that is to be created", "in": "body", "required": true, "schema": { "allOf": [ { "type": "object", "properties": { "id": { "type": "string", "format": "uri" } } }, { "allOf": [ { "type": "object", "properties": { "name": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 }, "watchedAttributes": { "type": "array", "minItems": 1, "items": { "type": "string" }, "uniqueItems": true }, "timeInterval": { "type": "number", "minimum": 0 }, "geoQ": { "type": "object", "required": [ "geometry", "coordinates", "georel" ], "properties": { "geometry": { "type": "string" }, "coordinates": { "type": "array", "minItems": 1, "items": { "type": "number" } }, "georel": { "type": "string" } } }, "notification": { "type": "object", "required": [ "endpoint" ], "properties": { "attributes": { "type": "array", "minItems": 1, "items": { "type": "string" } }, "format": { "type": "string" }, "endpoint": { "type": "object", "required": [ "uri" ], "properties": { "uri": { "type": "string", "format": "uri" }, "accept": { "type": "string", "enum": [ "application/json", "application/ld+json" ] } } }, "timesSent": { "type": "number", "minimum": 1 }, "lastNotification": { "type": "string", "format": "date-time" }, "lastFailure": { "type": "string", "format": "date-time" }, "lastSuccess": { "type": "string", "format": "date-time" } } }, "expires": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": [ "active", "inactive", "failed", "expired" ] }, "throttling": { "type": "number", "minimum": 1 }, "q": { "type": "string", "minLength": 1 } } }, { "$ref": "#/paths/~1entities/post/parameters/0/schema/allOf/2/allOf/1" } ] }, { "$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/get/responses/200/schema/allOf/3" } ] } } ], "consumes": [ "application/json", "application/ld+json" ], "responses": { "201": { "description": "Created. Contains the resource URI of the created Entity resource", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } }, "409": { "description": "Already exists", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } } } }, "get": { "description": "Retrieves the subscriptions available in an NGSI-LD system", "operationId": "retrieveSubscriptions", "parameters": [ { "name": "limit", "description": "Maximum number of subscriptions to be retrieved", "in": "query", "required": false, "type": "string" } ], "produces": [ "application/json", "application/ld+json" ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/get/responses/200/schema" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } } } } }, "/subscriptions/{subscriptionId}": { "get": { "description": "Retrieves a specific Subscription from an NGSI-LD system", "operationId": "retrieveSubscription", "parameters": [ { "name": "subscriptionId", "description": "Id (URI) of the Subscription to be retrieved", "in": "path", "required": true, "type": "string" } ], "produces": [ "application/json", "application/ld+json" ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "string", "format": "uri" } } }, { "$ref": "#/paths/~1csources~1%7BregistrationId%7D/get/responses/200/schema/allOf/1" }, { "$ref": "#/paths/~1subscriptions/post/parameters/0/schema/allOf/1" }, { "type": "object", "required": [ "type", "entities" ], "properties": { "type": { "type": "string", "enum": [ "Subscription" ] }, "entities": { "type": "array", "minItems": 1, "items": { "$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/patch/parameters/1/schema/allOf/0/properties/entities/items" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } } } }, "delete": { "description": "Removes a specific Subscription from an NGSI-LD system", "operationId": "removeSubscription", "parameters": [ { "name": "subscriptionId", "description": "Id (URI) of the Subscription to be removed", "in": "path", "required": true, "type": "string" } ], "responses": { "204": { "description": "No Content. The Subscription was removed successfully" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } } } }, "patch": { "description": "Updates a specific Subscription within an NGSI-LD system", "operationId": "updateSubscription", "parameters": [ { "name": "subscriptionId", "description": "Id (URI) of the Subscription to be updated", "in": "path", "required": true, "type": "string" }, { "name": "SubscriptionFragment", "description": "Subscription Fragment including id, type and any other Subscription field to be updated", "in": "body", "required": true, "schema": { "$ref": "#/paths/~1csourceSubscriptions~1%7BsubscriptionId%7D/patch/parameters/1/schema" } } ], "consumes": [ "application/json", "application/ld+json" ], "responses": { "204": { "description": "No Content. The Subscription was updated successfully" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } } } } }, "/csourceSubscriptions": { "post": { "description": "Creates a context source discovery Subscription within an NGSI-LD system", "operationId": "createCSourceSubscription", "parameters": [ { "name": "SubscriptionDescription", "description": "Payload body in the request contains a JSON-LD object which represents the context source discovery Subscription that is to be created", "in": "body", "required": true, "schema": { "$ref": "#/paths/~1subscriptions/post/parameters/0/schema" } } ], "consumes": [ "application/json", "application/ld+json" ], "responses": { "201": { "description": "Created. Contains the resource URI of the created context source discovery Subscription resource", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } }, "409": { "description": "Already exists", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } } } }, "get": { "description": "Retrieves the context source discovery subscriptions available in an NGSI-LD system", "operationId": "retrieveCSourceSubscriptions", "parameters": [ { "name": "limit", "description": "Maximum number of subscriptions to be retrieved", "in": "query", "required": false, "type": "string" } ], "produces": [ "application/json", "application/ld+json" ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/paths/~1subscriptions/get/responses/200/schema" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } } } } }, "/csourceSubscriptions/{subscriptionId}": { "get": { "description": "Retrieves a specific context source discovery Subscription from an NGSI-LD system", "operationId": "retrieveCSourceSubscription", "parameters": [ { "name": "subscriptionId", "description": "Id (URI) context source discovery Subscription to be retrieved", "in": "path", "required": true, "type": "string" } ], "produces": [ "application/json", "application/ld+json" ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/get/responses/200/schema" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } } } }, "delete": { "description": "Removes a specific context source discovery Subscription from an NGSI-LD system", "operationId": "removeCSourceSubscription", "parameters": [ { "name": "subscriptionId", "description": "Id (URI) context source discovery Subscription to be removed", "in": "path", "required": true, "type": "string" } ], "responses": { "204": { "description": "No Content. The context source discovery Subscription was removed successfully" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } } } }, "patch": { "description": "Updates a specific context source discovery Subscription within an NGSI-LD system", "operationId": "updateCSourceSubscription", "parameters": [ { "name": "subscriptionId", "description": "Id (URI) context source discovery Subscription to be updated", "in": "path", "required": true, "type": "string" }, { "name": "SubscriptionFragment", "description": "Subscription Fragment including id, type and any other Subscription field to be updated", "in": "body", "required": true, "schema": { "allOf": [ { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "string", "format": "uri" }, "type": { "type": "string", "enum": [ "Subscription" ] }, "entities": { "type": "array", "minItems": 1, "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "string" }, "idPattern": { "type": "string" }, "type": { "type": "string" } } } } } }, { "$ref": "#/paths/~1subscriptions/post/parameters/0/schema/allOf/1" } ] } } ], "consumes": [ "application/json", "application/ld+json" ], "responses": { "204": { "description": "No Content. The context source discovery Subscription was updated successfully" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/paths/~1entities~1%7BentityId%7D/get/responses/400/schema" } } } } } } }