swagger: '2.0' info: version: '1.0' title: FIWARE-NGSI v2 Specification description: 'TODO: Add a description' host: orion.lab.fiware.org basePath: / schemes: - http consumes: - application/json produces: - application/json paths: /v2: get: description: "This resource does not have any attributes. Instead it offers\ \ the initial\nAPI affordances in the form of the links in the JSON body.\n\ It is recommended to follow the \u201Curl\u201D link values,\n[Link](https://tools.ietf.org/html/rfc5988)\ \ or Location headers where\napplicable to retrieve resources. Instead of\ \ constructing your own URLs,\nto keep your client decoupled from implementation\ \ details." summary: Retrieve API Resources tags: - API Entry Point operationId: Retrieve API Resources produces: - application/json parameters: [] responses: '200': description: '' schema: $ref: '#/definitions/RetrieveApiResourcesResponse' examples: application/json: entities_url: /v2/entities types_url: /v2/types subscriptions_url: /v2/subscriptions registrations_url: /v2/registrations x-unitTests: - request: method: GET uri: /v2 expectedResponse: x-allowExtraHeaders: true x-bodyMatchMode: RAW x-arrayOrderedMatching: false x-arrayCheckCount: false x-matchResponseSchema: true headers: Content-Type: application/json body: '{ "entities_url": "/v2/entities", "types_url": "/v2/types", "subscriptions_url": "/v2/subscriptions", "registrations_url": "/v2/registrations"}' x-testShouldPass: true x-testEnabled: true x-testName: Retrieve API Resources1 x-testDescription: "This resource does not have any attributes. Instead it\ \ offers the initial\nAPI affordances in the form of the links in the JSON\ \ body.\nIt is recommended to follow the \u201Curl\u201D link values,\n\ [Link](https://tools.ietf.org/html/rfc5988) or Location headers where\n\ applicable to retrieve resources. Instead of constructing your own URLs,\n\ to keep your client decoupled from implementation details." x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false /v2/entities: get: description: "Retrieves a list of entities that match different criteria by\ \ id, type, pattern matching (either id or type)\nand/or those which match\ \ a query or geographical query (see [Simple Query Language](#simple_query_language)\ \ and \n[Geographical Queries](#geographical_queries)). A given entity has\ \ to match all the criteria to be retrieved\n(i.e., the criteria is combined\ \ in a logical AND way). Note that pattern matching query parameters are incompatible\n\ (i.e. mutually exclusive) with their corresponding exact matching parameters,\ \ i.e. `idPattern` with `id` and\n`typePattern` with `type`.\nThe response\ \ payload is an array containing one object per matching entity. Each entity\ \ follows\nthe JSON entity representation format (described in \"JSON Entity\ \ Representation\" section).\nResponse code:\n* Successful operation uses\ \ 200 OK\n* Errors use a non-2xx and (optionally) an error payload. See subsection\ \ on \"Error Responses\" for\n more details." summary: List Entities tags: - Entities operationId: List Entities produces: - application/json parameters: - name: id in: query required: false type: string description: 'A comma-separated list of elements. Retrieve entities whose ID matches one of the elements in the list. Incompatible with `idPattern`.' - name: type in: query required: false type: string description: 'comma-separated list of elements. Retrieve entities whose type matches one of the elements in the list. Incompatible with `typePattern`.' - name: idPattern in: query required: false type: string description: 'A correctly formated regular expression. Retrieve entities whose ID matches the regular expression. Incompatible with `id`.' - name: typePattern in: query required: false type: string description: 'A correctly formated regular expression. Retrieve entities whose type matches the regular expression. Incompatible with `type`.' - name: q in: query required: false type: string description: 'A query expression, composed of a list of statements separated by `;`, i.e., q=statement1;statement2;statement3. See [Simple Query Language specification](#simple_query_language).' - name: mq in: query required: false type: string description: 'A query expression for attribute metadata, composed of a list of statements separated by `;`, i.e., mq=statement1;statement2;statement3. See [Simple Query Language specification](#simple_query_language).' - name: georel in: query required: false type: string description: 'Spatial relationship between matching entities and a reference shape. See [Geographical Queries](#geographical_queries).' - name: geometry in: query required: false type: string description: 'Geografical area to which the query is restricted. See [Geographical Queries](#geographical_queries).' - name: coords in: query required: false type: string description: 'List of latitude-longitude pairs of coordinates separated by '';''. See [Geographical Queries](#geographical_queries).' - name: limit in: query required: false type: number format: double exclusiveMaximum: false exclusiveMinimum: false description: Limits the number of entities to be retrieved - name: offset in: query required: false type: number format: double exclusiveMaximum: false exclusiveMinimum: false description: Establishes the offset from where entities are retrieved - name: attrs in: query required: false type: string description: 'Comma-separated list of attribute names whose data are to be included in the response. The attributes are retrieved in the order specified by this parameter. If this parameter is not included, the attributes are retrieved in arbitrary order. See "Filtering out attributes and metadata" section for more detail.' - name: metadata in: query required: false type: string description: 'A list of metadata names to include in the response. See "Filtering out attributes and metadata" section for more detail.' - name: orderBy in: query required: false type: string description: 'Criteria for ordering results. See "Ordering Results" section for details.' - name: options in: query required: false enum: - count - keyValues - values - unique x-enum-elements: - name: count description: '' - name: keyValues description: '' - name: values description: '' - name: unique description: '' type: string description: Options dictionary responses: '200': description: '' schema: type: array items: $ref: '#/definitions/ListEntitiesResponse' examples: application/json: - type: Room id: DC_S1-D41 temperature: value: 35.6 type: Number metadata: {} - type: Room id: Boe-Idearium temperature: value: 22.5 type: Number metadata: {} - type: Car id: P-9873-K speed: value: 100 type: number metadata: accuracy: value: 2 type: Number timestamp: value: '2015-06-04T07:20:27.378Z' type: DateTime x-unitTests: - request: method: GET uri: /v2/entities?id=Boe_Idearium&type=Room&idPattern=Bode_.*&typePattern=Room_.*&q=temperature>40&mq=temperature.accuracy<0.9&georel=near&geometry=point&coords=41.390205,2.154007;48.8566,2.3522&limit=20&offset=20&attrs=seatNumber&metadata=accuracy&orderBy=temperature,!speed expectedResponse: x-allowExtraHeaders: true x-bodyMatchMode: RAW x-arrayOrderedMatching: false x-arrayCheckCount: false x-matchResponseSchema: true headers: Content-Type: application/json body: '[ { "type": "Room", "id": "DC_S1-D41", "temperature": { "value": 35.6, "type": "Number", "metadata": {} } }, { "type": "Room", "id": "Boe-Idearium", "temperature": { "value": 22.5, "type": "Number", "metadata": {} } }, { "type": "Car", "id": "P-9873-K", "speed": { "value": 100, "type": "number", "metadata": { "accuracy": { "value": 2, "type": "Number" }, "timestamp": { "value": "2015-06-04T07:20:27.378Z", "type": "DateTime" } } } }]' x-testShouldPass: true x-testEnabled: true x-testName: List Entities1 x-testDescription: "Retrieves a list of entities that match different criteria\ \ by id, type, pattern matching (either id or type)\nand/or those which\ \ match a query or geographical query (see [Simple Query Language](#simple_query_language)\ \ and \n[Geographical Queries](#geographical_queries)). A given entity has\ \ to match all the criteria to be retrieved\n(i.e., the criteria is combined\ \ in a logical AND way). Note that pattern matching query parameters are\ \ incompatible\n(i.e. mutually exclusive) with their corresponding exact\ \ matching parameters, i.e. `idPattern` with `id` and\n`typePattern` with\ \ `type`.\nThe response payload is an array containing one object per matching\ \ entity. Each entity follows\nthe JSON entity representation format (described\ \ in \"JSON Entity Representation\" section).\nResponse code:\n* Successful\ \ operation uses 200 OK\n* Errors use a non-2xx and (optionally) an error\ \ payload. See subsection on \"Error Responses\" for\n more details." x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false post: description: "The payload is an object representing the entity to be created.\ \ The object follows\nthe JSON entity representation format (described in\ \ a \"JSON Entity Representation\" section).\nResponse:\n* Successful operation\ \ uses 201 Created (if upsert option is not used) or 204 No Content (if\n\ \ upsert option is used). Response includes a `Location` header with the\ \ URL of the\n created entity.\n* Errors use a non-2xx and (optionally) an\ \ error payload. See subsection on \"Error Responses\" for\n more details." summary: Create Entity tags: - Entities operationId: Create Entity produces: - application/json parameters: - name: Content-Type in: header required: true type: string description: '' - name: body in: body required: true description: '' schema: $ref: '#/definitions/CreateEntityRequest' - name: options in: query required: false enum: - keyValues - upsert x-enum-elements: - name: keyValues description: '' - name: upsert description: '' type: string description: Options dictionary responses: '204': description: '' x-unitTests: - request: method: POST uri: /v2/entities headers: Content-Type: application/json body: '{ "type": "Room", "id": "Bcn-Welt", "temperature": { "value": 21.7 }, "humidity": { "value": 60 }, "location": { "value": "41.3763726, 2.1864475", "type": "geo:point", "metadata": { "crs": { "value": "WGS84" } } }}' expectedResponse: x-allowExtraHeaders: true x-bodyMatchMode: NONE x-arrayOrderedMatching: false x-arrayCheckCount: false x-matchResponseSchema: true headers: Location: /v2/entities/Bcn-Welt?type=Room x-testShouldPass: true x-testEnabled: true x-testName: Create Entity1 x-testDescription: "The payload is an object representing the entity to be\ \ created. The object follows\nthe JSON entity representation format (described\ \ in a \"JSON Entity Representation\" section).\nResponse:\n* Successful\ \ operation uses 201 Created (if upsert option is not used) or 204 No Content\ \ (if\n upsert option is used). Response includes a `Location` header with\ \ the URL of the\n created entity.\n* Errors use a non-2xx and (optionally)\ \ an error payload. See subsection on \"Error Responses\" for\n more details." x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false /v2/entities/{entityId}: get: description: 'The response is an object representing the entity identified by the ID. The object follows the JSON entity representation format (described in "JSON Entity Representation" section). This operation must return one entity element only, but there may be more than one entity with the same ID (e.g. entities with same ID but different types). In such case, an error message is returned, with the HTTP status code set to 409 Conflict. Response: * Successful operation uses 200 OK * Errors use a non-2xx and (optionally) an error payload. See subsection on "Error Responses" for more details.' summary: Retrieve Entity tags: - Entities operationId: Retrieve Entity produces: - application/json parameters: - name: entityId in: path required: true type: string description: Id of the entity to be retrieved - name: type in: query required: false type: string description: 'Entity type, to avoid ambiguity in case there are several entities with the same entity id.' - name: attrs in: query required: false type: string description: 'Comma-separated list of attribute names whose data must be included in the response. The attributes are retrieved in the order specified by this parameter. See "Filtering out attributes and metadata" section for more detail. If this parameter is not included, the attributes are retrieved in arbitrary order, and all the attributes of the entity are included in the response.' - name: metadata in: query required: false type: string description: 'A list of metadata names to include in the response. See "Filtering out attributes and metadata" section for more detail.' - name: options in: query required: false enum: - keyValues - values - unique x-enum-elements: - name: keyValues description: '' - name: values description: '' - name: unique description: '' type: string description: Options dictionary responses: '200': description: '' schema: $ref: '#/definitions/RetrieveEntityResponse' examples: application/json: type: Room id: Bcn_Welt temperature: value: 21.7 type: Number humidity: value: 60 type: Number location: value: 41.3763726, 2.1864475 type: geo:point metadata: crs: value: WGS84 type: Text x-unitTests: [] x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false delete: description: "Delete the entity.\nResponse:\n* Successful operation uses 204\ \ No Content\n* Errors use a non-2xx and (optionally) an error payload. See\ \ subsection on \"Error Responses\" for\n more details." summary: Remove Entity tags: - Entities operationId: Remove Entity produces: - application/json parameters: - name: entityId in: path required: true type: string description: Id of the entity to be deleted - name: type in: query required: false type: string description: 'Entity type, to avoid ambiguity in case there are several entities with the same entity id.' responses: '204': description: '' x-unitTests: [] x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false /v2/entities/{entityId}/attrs: get: description: "This request is similar to retreiving the whole entity, however\ \ this one omits the `id` and `type`\nfields.\nJust like the general request\ \ of getting an entire entity, this operation must return only one\nentity\ \ element. If more than one entity with the same ID is found (e.g. entities\ \ with\nsame ID but different type), an error message is returned, with the\ \ HTTP status code set to\n409 Conflict.\nResponse:\n* Successful operation\ \ uses 200 OK\n* Errors use a non-2xx and (optionally) an error payload. See\ \ subsection on \"Error Responses\" for\n more details." summary: Retrieve Entity Attributes tags: - Entities operationId: Retrieve Entity Attributes produces: - application/json parameters: - name: entityId in: path required: true type: string description: Id of the entity to be retrieved - name: type in: query required: false type: string description: 'Entity type, to avoid ambiguity in case there are several entities with the same entity id.' - name: attrs in: query required: false type: string description: 'Comma-separated list of attribute names whose data are to be included in the response. The attributes are retrieved in the order specified by this parameter. If this parameter is not included, the attributes are retrieved in arbitrary order, and all the attributes of the entity are included in the response. See "Filtering out attributes and metadata" section for more detail.' - name: metadata in: query required: false type: string description: 'A list of metadata names to include in the response. See "Filtering out attributes and metadata" section for more detail.' - name: options in: query required: false enum: - keyValues - values - unique x-enum-elements: - name: keyValues description: '' - name: values description: '' - name: unique description: '' type: string description: Options dictionary responses: '200': description: '' schema: $ref: '#/definitions/RetrieveEntityAttributesResponse' examples: application/json: temperature: value: 21.7 type: Number humidity: value: 60 type: Number location: value: 41.3763726, 2.1864475 type: geo:point metadata: crs: value: WGS84 type: Text x-unitTests: [] x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false put: description: "The request payload is an object representing the new entity attributes.\ \ The object follows\nthe JSON entity representation format (described in\ \ a \"JSON Entity Representation\" above), except\nthat `id` and `type` are\ \ not allowed.\nThe attributes previously existing in the entity are removed\ \ and replaced by the ones in the\nrequest.\nResponse:\n* Successful operation\ \ uses 204 No Content\n* Errors use a non-2xx and (optionally) an error payload.\ \ See subsection on \"Error Responses\" for\n more details." summary: Replace all entity attributes tags: - Entities operationId: Replace all entity attributes produces: - application/json parameters: - name: entityId in: path required: true type: string description: Id of the entity in question. - name: Content-Type in: header required: true type: string description: '' - name: body in: body required: true description: '' schema: $ref: '#/definitions/ReplaceAllEntityAttributesRequest' - name: type in: query required: false type: string description: 'Entity type, to avoid ambiguity in case there are several entities with the same entity id.' - name: options in: query required: false enum: - keyValues x-enum-elements: - name: keyValues description: '' type: string description: Operations options responses: '204': description: '' x-unitTests: [] x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false post: description: "The request payload is an object representing the attributes to\ \ append or update. The object follows\nthe JSON entity representation format\ \ (described in \"JSON Entity Representation\" section), except\nthat `id`\ \ and `type` are not allowed.\nThe entity attributes are updated with the\ \ ones in the payload, depending on\nwhether the `append` operation option\ \ is used or not.\n* If `append` is not used: the entity attributes are updated\ \ (if they previously exist) or appended\n (if they don't previously exist)\ \ with the ones in the payload.\n* If `append` is used (i.e. strict append\ \ semantics): all the attributes in the payload not\n previously existing\ \ in the entity are appended. In addition to that, in case some of the\n \ \ attributes in the payload already exist in the entity, an error is returned.\n\ Response:\n* Successful operation uses 204 No Content\n* Errors use a non-2xx\ \ and (optionally) an error payload. See subsection on \"Error Responses\"\ \ for\n more details." summary: Update or Append Entity Attributes tags: - Entities operationId: Update or Append Entity Attributes produces: - application/json parameters: - name: entityId in: path required: true type: string description: Entity id to be updated - name: Content-Type in: header required: true type: string description: '' - name: body in: body required: true description: '' schema: $ref: '#/definitions/UpdateOrAppendEntityAttributesRequest' - name: type in: query required: false type: string description: 'Entity type, to avoid ambiguity in case there are several entities with the same entity id.' - name: options in: query required: false enum: - append - keyValues x-enum-elements: - name: append description: '' - name: keyValues description: '' type: string description: Operations options responses: '204': description: '' x-unitTests: [] x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false patch: description: "The request payload is an object representing the attributes to\ \ update. The object follows\nthe JSON entity representation format (described\ \ in \"JSON Entity Representation\" section), except\nthat `id` and `type`\ \ are not allowed.\nThe entity attributes are updated with the ones in the\ \ payload. In addition to that, if one or more\nattributes in the payload\ \ doesn't exist in the entity, an error is returned.\nResponse:\n* Successful\ \ operation uses 204 No Content\n* Errors use a non-2xx and (optionally) an\ \ error payload. See subsection on \"Error Responses\" for\n more details." summary: Update Existing Entity Attributes tags: - Entities operationId: Update Existing Entity Attributes produces: - application/json parameters: - name: entityId in: path required: true type: string description: Id of the entity to be updated - name: Content-Type in: header required: true type: string description: '' - name: body in: body required: true description: '' schema: $ref: '#/definitions/UpdateExistingEntityAttributesRequest' - name: type in: query required: false type: string description: 'Entity type, to avoid ambiguity in case there are several entities with the same entity id.' - name: options in: query required: false enum: - keyValues x-enum-elements: - name: keyValues description: '' type: string description: Operations options responses: '204': description: '' x-unitTests: [] x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false /v2/entities/{entityId}/attrs/{attrName}: get: description: "Returns a JSON object with the attribute data of the attribute.\ \ The object follows the JSON\nrepresentation for attributes (described in\ \ \"JSON Attribute Representation\" section).\nResponse:\n* Successful operation\ \ uses 200 OK.\n* Errors use a non-2xx and (optionally) an error payload.\ \ See subsection on \"Error Responses\" for\n more details." summary: Get attribute data tags: - Attributes operationId: Get attribute data produces: - application/json parameters: - name: entityId in: path required: true type: string description: Id of the entity - name: attrName in: path required: true type: string description: Name of the attribute to be retrieved. - name: type in: query required: false type: string description: 'Entity type, to avoid ambiguity in case there are several entities with the same entity id.' - name: metadata in: query required: false type: string description: 'A list of metadata names to include in the response. See "Filtering out attributes and metadata" section for more detail.' responses: '200': description: '' schema: $ref: '#/definitions/GetAttributeDataResponse' examples: application/json: value: 21.7 type: Number metadata: {} x-unitTests: - request: method: GET uri: /v2/entities/Bcn_Welt/attrs/temperature?metadata=accuracy expectedResponse: x-allowExtraHeaders: true x-bodyMatchMode: RAW x-arrayOrderedMatching: false x-arrayCheckCount: false x-matchResponseSchema: true headers: Content-Type: application/json body: '{ "value": 21.7, "type": "Number", "metadata": {}}' x-testShouldPass: true x-testEnabled: true x-testName: Get attribute data1 x-testDescription: "Returns a JSON object with the attribute data of the attribute.\ \ The object follows the JSON\nrepresentation for attributes (described\ \ in \"JSON Attribute Representation\" section).\nResponse:\n* Successful\ \ operation uses 200 OK.\n* Errors use a non-2xx and (optionally) an error\ \ payload. See subsection on \"Error Responses\" for\n more details." x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false put: description: "The request payload is an object representing the new attribute\ \ data. Previous attribute data\nis replaced by the one in the request. The\ \ object follows the JSON representation for attributes\n(described in \"\ JSON Attribute Representation\" section).\nResponse:\n* Successful operation\ \ uses 204 No Content\n* Errors use a non-2xx and (optionally) an error payload.\ \ See subsection on \"Error Responses\" for\n more details." summary: Update Attribute Data tags: - Attributes operationId: Update Attribute Data produces: - application/json parameters: - name: entityId in: path required: true type: string description: Id of the entity to update - name: attrName in: path required: true type: string description: Attribute name - name: Content-Type in: header required: true type: string description: '' - name: body in: body required: true description: '' schema: $ref: '#/definitions/UpdateAttributeDataRequest' - name: type in: query required: false type: string description: 'Entity type, to avoid ambiguity in case there are several entities with the same entity id.' responses: '200': description: '' x-unitTests: - request: method: PUT uri: /v2/entities/Bcn_Welt/attrs/temperature headers: Content-Type: application/json body: '{ "value": 25.0, "metadata": { "unitCode": { "value": "CEL" } }}' expectedResponse: x-allowExtraHeaders: true x-bodyMatchMode: NONE x-arrayOrderedMatching: false x-arrayCheckCount: false x-matchResponseSchema: true headers: {} x-testShouldPass: true x-testEnabled: true x-testName: Update Attribute Data1 x-testDescription: "The request payload is an object representing the new\ \ attribute data. Previous attribute data\nis replaced by the one in the\ \ request. The object follows the JSON representation for attributes\n(described\ \ in \"JSON Attribute Representation\" section).\nResponse:\n* Successful\ \ operation uses 204 No Content\n* Errors use a non-2xx and (optionally)\ \ an error payload. See subsection on \"Error Responses\" for\n more details." x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false delete: description: "Removes an entity attribute.\nResponse:\n* Successful operation\ \ uses 204 No Content\n* Errors use a non-2xx and (optionally) an error payload.\ \ See subsection on \"Error Responses\" for\n more details." summary: Remove a Single Attribute tags: - Attributes operationId: Remove a Single Attribute produces: - application/json parameters: - name: entityId in: path required: true type: string description: Id of the entity. - name: attrName in: path required: true type: string description: Attribute name. - name: type in: query required: false type: string description: 'Entity type, to avoid ambiguity in case there are several entities with the same entity id.' responses: '204': description: '' x-unitTests: - request: method: DELETE uri: /v2/entities/Bcn_Welt/attrs/temperature expectedResponse: x-allowExtraHeaders: true x-bodyMatchMode: NONE x-arrayOrderedMatching: false x-arrayCheckCount: false x-matchResponseSchema: true headers: {} x-testShouldPass: true x-testEnabled: true x-testName: Remove a Single Attribute1 x-testDescription: "Removes an entity attribute.\nResponse:\n* Successful\ \ operation uses 204 No Content\n* Errors use a non-2xx and (optionally)\ \ an error payload. See subsection on \"Error Responses\" for\n more details." x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false /v2/entities/{entityId}/attrs/{attrName}/value: get: description: "This operation returns the `value` property with the value of\ \ the attribute.\n* If attribute value is JSON Array or Object:\n * If `Accept`\ \ header can be expanded to `application/json` or `text/plain` return the\ \ value as a JSON with a\n response type of application/json or text/plain\ \ (whichever is the first in `Accept` header or\n `application/json` in\ \ case of `Accept: */*`).\n * Else return a HTTP error \"406 Not Acceptable:\ \ accepted MIME types: application/json, text/plain\"\n* If attribute value\ \ is a string, number, null or boolean:\n * If `Accept` header can be expanded\ \ to text/plain return the value as text. In case of a string, citation\n\ \ marks are used at the begining and end.\n * Else return a HTTP error\ \ \"406 Not Acceptable: accepted MIME types: text/plain\"\nResponse:\n* Successful\ \ operation uses 200 OK.\n* Errors use a non-2xx and (optionally) an error\ \ payload. See subsection on \"Error Responses\" for\n more details." summary: Get Attribute Value tags: - Attribute Value operationId: Get Attribute Value produces: - application/json parameters: - name: entityId in: path required: true type: string description: Id of the entity in question - name: attrName in: path required: true type: string description: Name of the attribute to be retrieved. - name: type in: query required: false type: string description: 'Entity type, to avoid ambiguity in case there are several entities with the same entity id.' responses: '200': description: '' schema: $ref: '#/definitions/GetAttributeValueResponse' examples: application/json: address: Ronda de la Comunicacion s/n zipCode: 28050 city: Madrid country: Spain x-unitTests: - request: method: GET uri: /v2/entities/Bcn_Welt/attrs/address/value expectedResponse: x-allowExtraHeaders: true x-bodyMatchMode: RAW x-arrayOrderedMatching: false x-arrayCheckCount: false x-matchResponseSchema: true headers: Content-Type: application/json body: '{ "address": "Ronda de la Comunicacion s/n", "zipCode": 28050, "city": "Madrid", "country": "Spain"}' x-testShouldPass: true x-testEnabled: true x-testName: Get Attribute Value1 x-testDescription: "This operation returns the `value` property with the value\ \ of the attribute.\n* If attribute value is JSON Array or Object:\n *\ \ If `Accept` header can be expanded to `application/json` or `text/plain`\ \ return the value as a JSON with a\n response type of application/json\ \ or text/plain (whichever is the first in `Accept` header or\n `application/json`\ \ in case of `Accept: */*`).\n * Else return a HTTP error \"406 Not Acceptable:\ \ accepted MIME types: application/json, text/plain\"\n* If attribute value\ \ is a string, number, null or boolean:\n * If `Accept` header can be expanded\ \ to text/plain return the value as text. In case of a string, citation\n\ \ marks are used at the begining and end.\n * Else return a HTTP error\ \ \"406 Not Acceptable: accepted MIME types: text/plain\"\nResponse:\n*\ \ Successful operation uses 200 OK.\n* Errors use a non-2xx and (optionally)\ \ an error payload. See subsection on \"Error Responses\" for\n more details." x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false put: description: "The request payload is the new attribute value.\n* If the request\ \ payload MIME type is `application/json`, then the value of the attribute\ \ is set to\n the JSON object or array coded in the payload (if the payload\ \ is not a valid JSON document,\n then an error is returned).\n* If the request\ \ payload MIME type is `text/plain`, then the following algorithm is applied\ \ to the\n payload:\n * If the payload starts and ends with citation-marks\ \ (`\"`), the value is taken as a string\n (the citation marks themselves\ \ are not considered part of the string)\n * If `true` or `false`, the value\ \ is taken as a boolean.\n * If `null`, the value is taken as null.\n *\ \ If these first three tests 'fail', the text is interpreted as a number.\n\ \ * If not a valid number, then an error is returned and the attribute's\ \ value is unchanged.\nThe payload MIME type in the request is specified in\ \ the `Content-Type` HTTP header.\nResponse:\n* Successful operation uses\ \ 204 No Content\n* Errors use a non-2xx and (optionally) an error payload.\ \ See subsection on \"Error Responses\" for\n more details." summary: Update Attribute Value tags: - Attribute Value operationId: Update Attribute Value produces: - application/json parameters: - name: entityId in: path required: true type: string description: Id of the entity to be updated. - name: attrName in: path required: true type: string description: Attribute name. - name: Content-Type in: header required: true type: string description: '' - name: body in: body required: true description: '' schema: $ref: '#/definitions/UpdateAttributeValueRequest' - name: type in: query required: false type: string description: 'Entity type, to avoid ambiguity in case there are several entities with the same entity id.' responses: '200': description: '' x-unitTests: - request: method: PUT uri: /v2/entities/Bcn_Welt/attrs/address/value headers: Content-Type: application/json body: '{ "address": "Ronda de la Comunicacion s/n", "zipCode": 28050, "city": "Madrid", "country": "Spain"}' expectedResponse: x-allowExtraHeaders: true x-bodyMatchMode: NONE x-arrayOrderedMatching: false x-arrayCheckCount: false x-matchResponseSchema: true headers: {} x-testShouldPass: true x-testEnabled: true x-testName: Update Attribute Value1 x-testDescription: "The request payload is the new attribute value.\n* If\ \ the request payload MIME type is `application/json`, then the value of\ \ the attribute is set to\n the JSON object or array coded in the payload\ \ (if the payload is not a valid JSON document,\n then an error is returned).\n\ * If the request payload MIME type is `text/plain`, then the following algorithm\ \ is applied to the\n payload:\n * If the payload starts and ends with\ \ citation-marks (`\"`), the value is taken as a string\n (the citation\ \ marks themselves are not considered part of the string)\n * If `true`\ \ or `false`, the value is taken as a boolean.\n * If `null`, the value\ \ is taken as null.\n * If these first three tests 'fail', the text is\ \ interpreted as a number.\n * If not a valid number, then an error is\ \ returned and the attribute's value is unchanged.\nThe payload MIME type\ \ in the request is specified in the `Content-Type` HTTP header.\nResponse:\n\ * Successful operation uses 204 No Content\n* Errors use a non-2xx and (optionally)\ \ an error payload. See subsection on \"Error Responses\" for\n more details." x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false /v2/types/: get: description: "If the `values` option is not in use, this operation returns a\ \ JSON array with the entity types.\nEach element is a JSON object with information\ \ about the type:\n* `type` : the entity type name.\n* `attrs` : the set of\ \ attribute names along with all the entities of such type, represented in\n\ \ a JSON object whose keys are the attribute names and whose values contain\ \ information of such\n attributes (in particular a list of the types used\ \ by attributes with that name along with all the\n entities).\n* `count`\ \ : the number of entities belonging to that type.\nIf the `values` option\ \ is used, the operation returns a JSON array with a list of entity type\n\ names as strings.\nResults are ordered by entity `type` in alphabetical order.\n\ Response code:\n* Successful operation uses 200 OK\n* Errors use a non-2xx\ \ and (optionally) an error payload. See subsection on \"Error Responses\"\ \ for\n more details." summary: List Entity Types tags: - Types operationId: List Entity Types produces: - application/json parameters: - name: limit in: query required: false type: number format: double exclusiveMaximum: false exclusiveMinimum: false description: Limit the number of types to be retrieved. - name: offset in: query required: false type: number format: double exclusiveMaximum: false exclusiveMinimum: false description: Skip a number of records. - name: options in: query required: false enum: - count - values x-enum-elements: - name: count description: '' - name: values description: '' type: string description: Options dictionary. responses: '200': description: '' schema: type: array items: $ref: '#/definitions/ListEntityTypesResponse' examples: application/json: - type: Car attrs: speed: types: - Number fuel: types: - gasoline - diesel temperature: types: - urn:phenomenum:temperature count: 12 - type: Room attrs: pressure: types: - Number humidity: types: - percentage temperature: types: - urn:phenomenum:temperature count: 7 x-unitTests: - request: method: GET uri: /v2/types/?limit=10&offset=20 expectedResponse: x-allowExtraHeaders: true x-bodyMatchMode: RAW x-arrayOrderedMatching: false x-arrayCheckCount: false x-matchResponseSchema: true headers: Content-Type: application/json body: '[ { "type": "Car", "attrs": { "speed": { "types": [ "Number" ] }, "fuel": { "types": [ "gasoline", "diesel" ] }, "temperature": { "types": [ "urn:phenomenum:temperature" ] } }, "count": 12 }, { "type": "Room", "attrs": { "pressure": { "types": [ "Number" ] }, "humidity": { "types": [ "percentage" ] }, "temperature": { "types": [ "urn:phenomenum:temperature" ] } }, "count": 7 }]' x-testShouldPass: true x-testEnabled: true x-testName: List Entity Types1 x-testDescription: "If the `values` option is not in use, this operation returns\ \ a JSON array with the entity types.\nEach element is a JSON object with\ \ information about the type:\n* `type` : the entity type name.\n* `attrs`\ \ : the set of attribute names along with all the entities of such type,\ \ represented in\n a JSON object whose keys are the attribute names and\ \ whose values contain information of such\n attributes (in particular\ \ a list of the types used by attributes with that name along with all the\n\ \ entities).\n* `count` : the number of entities belonging to that type.\n\ If the `values` option is used, the operation returns a JSON array with\ \ a list of entity type\nnames as strings.\nResults are ordered by entity\ \ `type` in alphabetical order.\nResponse code:\n* Successful operation\ \ uses 200 OK\n* Errors use a non-2xx and (optionally) an error payload.\ \ See subsection on \"Error Responses\" for\n more details." x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false /v2/types/{entityType}: get: description: "This operation returns a JSON object with information about the\ \ type:\n* `attrs` : the set of attribute names along with all the entities\ \ of such type, represented in\n a JSON object whose keys are the attribute\ \ names and whose values contain information of such\n attributes (in particular\ \ a list of the types used by attributes with that name along with all the\n\ \ entities).\n* `count` : the number of entities belonging to that type.\n\ Response code:\n* Successful operation uses 200 OK\n* Errors use a non-2xx\ \ and (optionally) an error payload. See subsection on \"Error Responses\"\ \ for\n more details." summary: Retrieve entity type tags: - Types operationId: Retrieve entity type produces: - application/json parameters: - name: entityType in: path required: true type: string description: Entity Type responses: '200': description: '' schema: $ref: '#/definitions/RetrieveEntityTypeResponse' examples: application/json: attrs: pressure: types: - Number humidity: types: - percentage temperature: types: - urn:phenomenum:temperature count: 7 x-unitTests: - request: method: GET uri: /v2/types/Room expectedResponse: x-allowExtraHeaders: true x-bodyMatchMode: RAW x-arrayOrderedMatching: false x-arrayCheckCount: false x-matchResponseSchema: true headers: Content-Type: application/json body: ' { "attrs": { "pressure": { "types": [ "Number" ] }, "humidity": { "types": [ "percentage" ] }, "temperature": { "types": [ "urn:phenomenum:temperature" ] } }, "count": 7 }' x-testShouldPass: true x-testEnabled: true x-testName: Retrieve entity type1 x-testDescription: "This operation returns a JSON object with information\ \ about the type:\n* `attrs` : the set of attribute names along with all\ \ the entities of such type, represented in\n a JSON object whose keys\ \ are the attribute names and whose values contain information of such\n\ \ attributes (in particular a list of the types used by attributes with\ \ that name along with all the\n entities).\n* `count` : the number of\ \ entities belonging to that type.\nResponse code:\n* Successful operation\ \ uses 200 OK\n* Errors use a non-2xx and (optionally) an error payload.\ \ See subsection on \"Error Responses\" for\n more details." x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false /v2/subscriptions: get: description: "Returns a list of all the subscriptions present in the system.\n\ Response:\n* Successful operation uses 200 OK\n* Errors use a non-2xx and\ \ (optionally) an error payload. See subsection on \"Error Responses\" for\n\ \ more details." summary: List Subscriptions tags: - Subscriptions operationId: List Subscriptions produces: - application/json parameters: - name: limit in: query required: false type: number format: double exclusiveMaximum: false exclusiveMinimum: false description: Limit the number of subscriptions to be retrieved - name: offset in: query required: false type: number format: double exclusiveMaximum: false exclusiveMinimum: false description: Skip a number of subscriptions - name: options in: query required: false enum: - count x-enum-elements: - name: count description: '' type: string description: Options dictionary responses: '200': description: '' schema: type: array items: $ref: '#/definitions/ListSubscriptionsResponse' examples: application/json: - id: abcdefg description: One subscription to rule them all subject: entities: - id: Bcn_Welt type: Room condition: attrs: - 'temperature ' expression: q: temperature>40 notification: httpCustom: url: http://localhost:1234 headers: X-MyHeader: foo qs: authToken: bar attrsFormat: keyValues attrs: - temperature - humidity timesSent: 12 lastNotification: '2015-10-05T16:00:00Z' lastFailure: '2015-10-06T16:00:00Z' expires: '2016-04-05T14:00:00Z' status: failed throttling: 5 x-unitTests: - request: method: GET uri: /v2/subscriptions?limit=10&offset=20 expectedResponse: x-allowExtraHeaders: true x-bodyMatchMode: RAW x-arrayOrderedMatching: false x-arrayCheckCount: false x-matchResponseSchema: true headers: {} body: '[ { "id": "abcdefg", "description": "One subscription to rule them all", "subject": { "entities": [ { "id": "Bcn_Welt", "type": "Room" } ], "condition": { "attrs": [ "temperature " ], "expression": { "q": "temperature>40" } } }, "notification": { "httpCustom": { "url": "http://localhost:1234", "headers": { "X-MyHeader": "foo" }, "qs": { "authToken": "bar" } }, "attrsFormat": "keyValues", "attrs": ["temperature", "humidity"], "timesSent": 12, "lastNotification": "2015-10-05T16:00:00.00Z", "lastFailure": "2015-10-06T16:00:00.00Z" }, "expires": "2016-04-05T14:00:00.00Z", "status": "failed", "throttling": 5 }]' x-testShouldPass: true x-testEnabled: true x-testName: List Subscriptions1 x-testDescription: "Returns a list of all the subscriptions present in the\ \ system.\nResponse:\n* Successful operation uses 200 OK\n* Errors use a\ \ non-2xx and (optionally) an error payload. See subsection on \"Error Responses\"\ \ for\n more details." x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false post: description: "Creates a new subscription.\nThe subscription is represented by\ \ a JSON object as described at the beginning of this section.\nResponse:\n\ * Successful operation uses 201 Created\n* Errors use a non-2xx and (optionally)\ \ an error payload. See subsection on \"Error Responses\" for\n more details." summary: Create Subscription tags: - Subscriptions operationId: Create Subscription produces: - application/json parameters: - name: Content-Type in: header required: true type: string description: '' - name: body in: body required: true description: '' schema: $ref: '#/definitions/CreateSubscriptionRequest' responses: '201': description: '' x-unitTests: - request: method: POST uri: /v2/subscriptions headers: Content-Type: application/json body: '{ "description": "One subscription to rule them all", "subject": { "entities": [ { "idPattern": ".*", "type": "Room" } ], "condition": { "attrs": [ "temperature" ], "expression": { "q": "temperature>40" } } }, "notification": { "http": { "url": "http://localhost:1234" }, "attrs": ["temperature", "humidity"] }, "expires": "2016-04-05T14:00:00.00Z", "throttling": 5}' expectedResponse: x-allowExtraHeaders: true x-bodyMatchMode: NONE x-arrayOrderedMatching: false x-arrayCheckCount: false x-matchResponseSchema: true headers: Location: /v2/subscriptions/abcde98765 x-testShouldPass: true x-testEnabled: true x-testName: Create Subscription1 x-testDescription: "Creates a new subscription.\nThe subscription is represented\ \ by a JSON object as described at the beginning of this section.\nResponse:\n\ * Successful operation uses 201 Created\n* Errors use a non-2xx and (optionally)\ \ an error payload. See subsection on \"Error Responses\" for\n more details." x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false /v2/subscriptions/{subscriptionId}: get: description: "The response is the subscription represented by a JSON object\ \ as described at the beginning of this\nsection.\nResponse:\n* Successful\ \ operation uses 200 OK\n* Errors use a non-2xx and (optionally) an error\ \ payload. See subsection on \"Error Responses\" for\n more details." summary: Retrieve Subscription tags: - Subscriptions operationId: Retrieve Subscription produces: - application/json parameters: - name: subscriptionId in: path required: true type: string description: subscription Id. responses: '200': description: '' schema: type: object x-unitTests: [] x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false delete: description: "Cancels subscription.\nResponse:\n* Successful operation uses\ \ 204 No Content\n* Errors use a non-2xx and (optionally) an error payload.\ \ See subsection on \"Error Responses\" for\n more details." summary: Delete subscription tags: - Subscriptions operationId: Delete subscription produces: - application/json parameters: - name: subscriptionId in: path required: true type: string description: subscription Id. responses: '204': description: '' x-unitTests: - request: method: DELETE uri: /v2/subscriptions/abcdef expectedResponse: x-allowExtraHeaders: true x-bodyMatchMode: NONE x-arrayOrderedMatching: false x-arrayCheckCount: false x-matchResponseSchema: true headers: {} x-testShouldPass: true x-testEnabled: true x-testName: Delete subscription1 x-testDescription: "Cancels subscription.\nResponse:\n* Successful operation\ \ uses 204 No Content\n* Errors use a non-2xx and (optionally) an error\ \ payload. See subsection on \"Error Responses\" for\n more details." x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false patch: description: "Only the fields included in the request are updated in the subscription.\n\ Response:\n* Successful operation uses 204 No Content\n* Errors use a non-2xx\ \ and (optionally) an error payload. See subsection on \"Error Responses\"\ \ for\n more details." summary: Update Subscription tags: - Subscriptions operationId: Update Subscription produces: - application/json parameters: - name: subscriptionId in: path required: true type: string description: subscription Id. - name: Content-Type in: header required: true type: string description: '' - name: body in: body required: true description: '' schema: $ref: '#/definitions/UpdateSubscriptionRequest' responses: '204': description: '' x-unitTests: - request: method: PATCH uri: /v2/subscriptions/abcdef headers: Content-Type: application/json body: '{ "expires": "2016-04-05T14:00:00.00Z"}' expectedResponse: x-allowExtraHeaders: true x-bodyMatchMode: NONE x-arrayOrderedMatching: false x-arrayCheckCount: false x-matchResponseSchema: true headers: {} x-testShouldPass: true x-testEnabled: true x-testName: Update Subscription1 x-testDescription: "Only the fields included in the request are updated in\ \ the subscription.\nResponse:\n* Successful operation uses 204 No Content\n\ * Errors use a non-2xx and (optionally) an error payload. See subsection\ \ on \"Error Responses\" for\n more details." x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false /v2/registrations: get: description: Lists all the context provider registrations present in the system. summary: List Registrations tags: - Registrations operationId: List Registrations produces: - application/json parameters: - name: limit in: query required: false type: number format: double exclusiveMaximum: false exclusiveMinimum: false description: Limit the number of registrations to be retrieved - name: offset in: query required: false type: number format: double exclusiveMaximum: false exclusiveMinimum: false description: Skip a number of registrations - name: options in: query required: false enum: - count x-enum-elements: - name: count description: '' type: string description: Options dictionary responses: '200': description: '' schema: type: array items: $ref: '#/definitions/ListRegistrationsResponse' examples: application/json: - id: abcdefg description: Example Context Source dataProvided: entities: - id: Bcn_Welt type: Room attrs: - temperature provider: http: url: http://contextsource.example.org supportedForwardingMode: all expires: '2017-10-31T12:00:00' status: active forwardingInformation: timesSent: 12 lastForwarding: '2017-10-06T16:00:00Z' lastSuccess: '2017-10-06T16:00:00Z' lastFailure: '2017-10-05T16:00:00Z' x-unitTests: - request: method: GET uri: /v2/registrations?limit=10&offset=20 expectedResponse: x-allowExtraHeaders: true x-bodyMatchMode: RAW x-arrayOrderedMatching: false x-arrayCheckCount: false x-matchResponseSchema: true headers: {} body: '[ { "id": "abcdefg", "description": "Example Context Source", "dataProvided": { "entities": [ { "id": "Bcn_Welt", "type": "Room" } ], "attrs": [ "temperature" ] }, "provider": { "http": { "url": "http://contextsource.example.org" }, "supportedForwardingMode": "all" }, "expires": "2017-10-31T12:00:00", "status": "active", "forwardingInformation": { "timesSent": 12, "lastForwarding": "2017-10-06T16:00:00.00Z", "lastSuccess": "2017-10-06T16:00:00.00Z", "lastFailure": "2017-10-05T16:00:00.00Z" } }]' x-testShouldPass: true x-testEnabled: true x-testName: List Registrations1 x-testDescription: Lists all the context provider registrations present in the system. x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false post: description: "Creates a new context provider registration. This is typically\ \ used for binding context sources\nas providers of certain data.\nThe registration\ \ is represented by a JSON object as described at the beginning of this section.\n\ Response:\n* Successful operation uses 201 Created\n* Errors use a non-2xx\ \ and (optionally) an error payload. See subsection on \"Error Responses\"\ \ for\n more details." summary: Create Registration tags: - Registrations operationId: Create Registration produces: - application/json parameters: - name: Content-Type in: header required: true type: string description: '' - name: body in: body required: true description: '' schema: $ref: '#/definitions/CreateRegistrationRequest' responses: '201': description: '' x-unitTests: - request: method: POST uri: /v2/registrations headers: Content-Type: application/json body: '{ "description": "Relative Humidity Context Source", "dataProvided": { "entities": [ { "id": "room2", "type": "Room" } ], "attrs": [ "relativeHumidity" ] }, "provider": { "http":{ "url": "http://localhost:1234" } }}' expectedResponse: x-allowExtraHeaders: true x-bodyMatchMode: NONE x-arrayOrderedMatching: false x-arrayCheckCount: false x-matchResponseSchema: true headers: Location: /v2/registrations/abcde98765 x-testShouldPass: true x-testEnabled: true x-testName: Create Registration1 x-testDescription: "Creates a new context provider registration. This is typically\ \ used for binding context sources\nas providers of certain data.\nThe registration\ \ is represented by a JSON object as described at the beginning of this\ \ section.\nResponse:\n* Successful operation uses 201 Created\n* Errors\ \ use a non-2xx and (optionally) an error payload. See subsection on \"\ Error Responses\" for\n more details." x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false /v2/registrations/{registrationId}: get: description: "The response is the registration represented by a JSON object\ \ as described at the beginning of this\nsection.\nResponse:\n* Successful\ \ operation uses 200 OK\n* Errors use a non-2xx and (optionally) an error\ \ payload. See subsection on \"Error Responses\" for\n more details." summary: Retrieve Registration tags: - Registrations operationId: Retrieve Registration produces: - application/json parameters: - name: registrationId in: path required: true type: string description: registration Id. responses: '200': description: '' schema: $ref: '#/definitions/RetrieveRegistrationResponse' examples: application/json: id: abcdefg description: Example Context Source dataProvided: entities: - id: Bcn_Welt type: Room attrs: - temperature provider: http: url: http://contextsource.example.org supportedForwardingMode: all expires: '2017-10-31T12:00:00' status: failed forwardingInformation: timesSent: 12 lastForwarding: '2017-10-06T16:00:00Z' lastFailure: '2017-10-06T16:00:00Z' lastSuccess: '2017-10-05T18:25:00Z' x-unitTests: - request: method: GET uri: /v2/registrations/abcdef expectedResponse: x-allowExtraHeaders: true x-bodyMatchMode: RAW x-arrayOrderedMatching: false x-arrayCheckCount: false x-matchResponseSchema: true headers: Content-Type: application/json body: ' { "id": "abcdefg", "description": "Example Context Source", "dataProvided": { "entities": [ { "id": "Bcn_Welt", "type": "Room" } ], "attrs": [ "temperature" ] }, "provider": { "http": { "url": "http://contextsource.example.org" }, "supportedForwardingMode": "all" }, "expires": "2017-10-31T12:00:00", "status": "failed", "forwardingInformation": { "timesSent": 12, "lastForwarding": "2017-10-06T16:00:00.00Z", "lastFailure": "2017-10-06T16:00:00.00Z", "lastSuccess": "2017-10-05T18:25:00.00Z", } } ' x-testShouldPass: true x-testEnabled: true x-testName: Retrieve Registration1 x-testDescription: "The response is the registration represented by a JSON\ \ object as described at the beginning of this\nsection.\nResponse:\n* Successful\ \ operation uses 200 OK\n* Errors use a non-2xx and (optionally) an error\ \ payload. See subsection on \"Error Responses\" for\n more details." x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false delete: description: "Cancels a context provider registration.\nResponse:\n* Successful\ \ operation uses 204 No Content\n* Errors use a non-2xx and (optionally) an\ \ error payload. See subsection on \"Error Responses\" for\n more details." summary: Delete Registration tags: - Registrations operationId: Delete Registration produces: - application/json parameters: - name: registrationId in: path required: true type: string description: registration Id. responses: '204': description: '' x-unitTests: - request: method: DELETE uri: /v2/registrations/abcdef expectedResponse: x-allowExtraHeaders: true x-bodyMatchMode: NONE x-arrayOrderedMatching: false x-arrayCheckCount: false x-matchResponseSchema: true headers: {} x-testShouldPass: true x-testEnabled: true x-testName: Delete Registration1 x-testDescription: "Cancels a context provider registration.\nResponse:\n\ * Successful operation uses 204 No Content\n* Errors use a non-2xx and (optionally)\ \ an error payload. See subsection on \"Error Responses\" for\n more details." x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false patch: description: "Only the fields included in the request are updated in the registration.\n\ Response:\n* Successful operation uses 204 No Content\n* Errors use a non-2xx\ \ and (optionally) an error payload. See subsection on \"Error Responses\"\ \ for\n more details." summary: Update Registration tags: - Registrations operationId: Update Registration produces: - application/json parameters: - name: registrationId in: path required: true type: string description: registration Id. - name: Content-Type in: header required: true type: string description: '' - name: body in: body required: true description: '' schema: $ref: '#/definitions/UpdateRegistrationRequest' responses: '204': description: '' x-unitTests: - request: method: PATCH uri: /v2/registrations/abcdef headers: Content-Type: application/json body: '{ "expires": "2017-10-04T00:00:00"}' expectedResponse: x-allowExtraHeaders: true x-bodyMatchMode: NONE x-arrayOrderedMatching: false x-arrayCheckCount: false x-matchResponseSchema: true headers: {} x-testShouldPass: true x-testEnabled: true x-testName: Update Registration1 x-testDescription: "Only the fields included in the request are updated in\ \ the registration.\nResponse:\n* Successful operation uses 204 No Content\n\ * Errors use a non-2xx and (optionally) an error payload. See subsection\ \ on \"Error Responses\" for\n more details." x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false /v2/op/update: post: description: "This operation allows to create, update and/or delete several\ \ entities in a single batch operation.\nThe payload is an object with two\ \ properties:\n+ `actionType`, to specify the kind of update action to do:\ \ either `append`, `appendStrict`, `update`,\n `delete`, or `replace`.\n\ + `entities`, an array of entities, each entity specified using the JSON entity\ \ representation format\n (described in the section \"JSON Entity Representation\"\ ).\nThis operation is split in as many individual operations as entities in\ \ the `entities` vector, so\nthe `actionType` is executed for each one of\ \ them. Depending on the `actionType`, a mapping with\nregular non-batch operations\ \ can be done:\n* `append`: maps to `POST /v2/entities` (if the entity does\ \ not already exist) or `POST /v2/entities//attrs`\n (if the entity already\ \ exists).\n* `appendStrict`: maps to `POST /v2/entities` (if the entity does\ \ not already exist) or\n `POST /v2/entities//attrs?options=append` (if\ \ the entity already exists).\n* `update`: maps to `PATCH /v2/entities//attrs`.\n\ * `delete`: maps to `DELETE /v2/entities//attrs/` on every attribute\ \ included in the entity or\n to `DELETE /v2/entities/` if no attribute\ \ were included in the entity.\n* `replace`: maps to `PUT /v2/entities//attrs`.\n\ Response:\n* Successful operation uses 204 No Content.\n* Errors use a non-2xx\ \ and (optionally) an error payload. See subsection on \"Error Responses\"\ \ for\n more details." summary: Update tags: - Batch Operations operationId: Update produces: - application/json parameters: - name: Content-Type in: header required: true type: string description: '' - name: body in: body required: true description: '' schema: $ref: '#/definitions/UpdateRequest' - name: options in: query required: false enum: - keyValues x-enum-elements: - name: keyValues description: '' type: string description: Options dictionary responses: '204': description: '' x-unitTests: - request: method: POST uri: /v2/op/update headers: Content-Type: application/json body: '{ "actionType": "append", "entities": [ { "type": "Room", "id": "Bcn-Welt", "temperature": { "value": 21.7 }, "humidity": { "value": 60 } }, { "type": "Room", "id": "Mad_Aud", "temperature": { "value": 22.9 }, "humidity": { "value": 85 } } ]}' expectedResponse: x-allowExtraHeaders: true x-bodyMatchMode: NONE x-arrayOrderedMatching: false x-arrayCheckCount: false x-matchResponseSchema: true headers: {} x-testShouldPass: true x-testEnabled: true x-testName: Update1 x-testDescription: "This operation allows to create, update and/or delete\ \ several entities in a single batch operation.\nThe payload is an object\ \ with two properties:\n+ `actionType`, to specify the kind of update action\ \ to do: either `append`, `appendStrict`, `update`,\n `delete`, or `replace`.\n\ + `entities`, an array of entities, each entity specified using the JSON\ \ entity representation format\n (described in the section \"JSON Entity\ \ Representation\").\nThis operation is split in as many individual operations\ \ as entities in the `entities` vector, so\nthe `actionType` is executed\ \ for each one of them. Depending on the `actionType`, a mapping with\n\ regular non-batch operations can be done:\n* `append`: maps to `POST /v2/entities`\ \ (if the entity does not already exist) or `POST /v2/entities//attrs`\n\ \ (if the entity already exists).\n* `appendStrict`: maps to `POST /v2/entities`\ \ (if the entity does not already exist) or\n `POST /v2/entities//attrs?options=append`\ \ (if the entity already exists).\n* `update`: maps to `PATCH /v2/entities//attrs`.\n\ * `delete`: maps to `DELETE /v2/entities//attrs/` on every\ \ attribute included in the entity or\n to `DELETE /v2/entities/` if\ \ no attribute were included in the entity.\n* `replace`: maps to `PUT /v2/entities//attrs`.\n\ Response:\n* Successful operation uses 204 No Content.\n* Errors use a non-2xx\ \ and (optionally) an error payload. See subsection on \"Error Responses\"\ \ for\n more details." x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false /v2/op/query: post: description: "The response payload is an Array containing one object per matching\ \ entity, or an empty array `[]` if \nno entities are found. The entities\ \ follow the JSON entity representation format\n(described in the section\ \ \"JSON Entity Representation\").\nThe payload may contain the following\ \ elements (all of them optional):\n+ `entities`: a list of entites to search\ \ for. Each element is represented by a JSON object with the\n following\ \ elements:\n + `id` or `idPattern`: Id or pattern of the affected entities.\ \ Both cannot be used at the same\n time, but one of them must be present.\n\ \ + `type` or `typePattern`: Type or type pattern of the entities to search\ \ for. Both cannot be used at\n the same time. If omitted, it means \"\ any entity type\".\n+ `attrs`: List of attributes to be provided (if not specified,\ \ all attributes).\n+ `expression`: an expression composed of `q`, `mq`, `georel`,\ \ `geometry` and `coords` (see \"List\n entities\" operation above about\ \ this field).\n+ `metadata`: a list of metadata names to include in the response.\n\ \ See \"Filtering out attributes and metadata\" section for more detail.\n\ Response code:\n* Successful operation uses 200 OK\n* Errors use a non-2xx\ \ and (optionally) an error payload. See subsection on \"Error Responses\"\ \ for\n more details." summary: Query tags: - Batch Operations operationId: Query produces: - application/json parameters: - name: Content-Type in: header required: true type: string description: '' - name: body in: body required: true description: '' schema: $ref: '#/definitions/QueryRequest' - name: limit in: query required: false type: number format: double exclusiveMaximum: false exclusiveMinimum: false description: Limit the number of entities to be retrieved. - name: offset in: query required: false type: number format: double exclusiveMaximum: false exclusiveMinimum: false description: Skip a number of records. - name: orderBy in: query required: false type: string description: 'Criteria for ordering results. See "Ordering Results" section for details.' - name: options in: query required: false enum: - count - keyValues - values - unique x-enum-elements: - name: count description: '' - name: keyValues description: '' - name: values description: '' - name: unique description: '' type: string description: Options dictionary responses: '200': description: '' schema: type: array items: $ref: '#/definitions/QueryResponse' examples: application/json: - type: Room id: DC_S1-D41 temperature: value: 35.6 type: Number - type: Room id: Boe-Idearium temperature: value: 22.5 type: Number - type: Car id: P-9873-K temperature: value: 40 type: Number accuracy: 2 timestamp: value: '2015-06-04T07:20:27.378Z' type: DateTime x-unitTests: - request: method: POST uri: /v2/op/query?limit=10&offset=20&orderBy=temperature,!speed headers: Content-Type: application/json body: '{ "entities": [ { "idPattern": ".*", "type": "Room" }, { "id": "Car", "type": "P-9873-K" } ], "attrs": [ "temperature", "humidity" ], "expression": { "q": "temperature>20" }, "metadata": [ "accuracy", "timestamp" ]}' expectedResponse: x-allowExtraHeaders: true x-bodyMatchMode: RAW x-arrayOrderedMatching: false x-arrayCheckCount: false x-matchResponseSchema: true headers: Content-Type: application/json body: '[ { "type": "Room", "id": "DC_S1-D41", "temperature": { "value": 35.6, "type": "Number" } }, { "type": "Room", "id": "Boe-Idearium", "temperature": { "value": 22.5, "type": "Number" } }, { "type": "Car", "id": "P-9873-K", "temperature": { "value": 40, "type": "Number", "accuracy": 2, "timestamp": { "value": "2015-06-04T07:20:27.378Z", "type": "DateTime" } } }]' x-testShouldPass: true x-testEnabled: true x-testName: Query1 x-testDescription: "The response payload is an Array containing one object\ \ per matching entity, or an empty array `[]` if \nno entities are found.\ \ The entities follow the JSON entity representation format\n(described\ \ in the section \"JSON Entity Representation\").\nThe payload may contain\ \ the following elements (all of them optional):\n+ `entities`: a list of\ \ entites to search for. Each element is represented by a JSON object with\ \ the\n following elements:\n + `id` or `idPattern`: Id or pattern of\ \ the affected entities. Both cannot be used at the same\n time, but\ \ one of them must be present.\n + `type` or `typePattern`: Type or type\ \ pattern of the entities to search for. Both cannot be used at\n the\ \ same time. If omitted, it means \"any entity type\".\n+ `attrs`: List\ \ of attributes to be provided (if not specified, all attributes).\n+ `expression`:\ \ an expression composed of `q`, `mq`, `georel`, `geometry` and `coords`\ \ (see \"List\n entities\" operation above about this field).\n+ `metadata`:\ \ a list of metadata names to include in the response.\n See \"Filtering\ \ out attributes and metadata\" section for more detail.\nResponse code:\n\ * Successful operation uses 200 OK\n* Errors use a non-2xx and (optionally)\ \ an error payload. See subsection on \"Error Responses\" for\n more details." x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false /v2/op/notify: post: description: "This operation is intended to consume a notification payload so\ \ that all the entity data included by such notification is persisted, overwriting\ \ if necessary.\nThis operation is useful when one NGSIv2 endpoint is subscribed\ \ to another NGSIv2 endpoint (federation scenarios). \nThe request payload\ \ must be an NGSIv2 notification payload. \nThe behaviour must be exactly\ \ the same as `POST /v2/op/update` with `actionType` equal to `append`.\n\ Response code:\n* Successful operation uses 200 OK\n* Errors use a non-2xx\ \ and (optionally) an error payload. See subsection on \"Error Responses\"\ \ for\n more details." summary: Notify tags: - Batch Operations operationId: Notify produces: - application/json parameters: - name: Content-Type in: header required: true type: string description: '' - name: body in: body required: true description: '' schema: $ref: '#/definitions/NotifyRequest' - name: options in: query required: false enum: - keyValues x-enum-elements: - name: keyValues description: '' type: string description: Options dictionary responses: '200': description: '' x-unitTests: - request: method: POST uri: /v2/op/notify headers: Content-Type: application/json body: '{ "subscriptionId": "5aeb0ee97d4ef10a12a0262f", "data": [{ "type": "Room", "id": "DC_S1-D41", "temperature": { "value": 35.6, "type": "Number" } }, { "type": "Room", "id": "Boe-Idearium", "temperature": { "value": 22.5, "type": "Number" } }]}' expectedResponse: x-allowExtraHeaders: true x-bodyMatchMode: NONE x-arrayOrderedMatching: false x-arrayCheckCount: false x-matchResponseSchema: true headers: Content-Type: application/json x-testShouldPass: true x-testEnabled: true x-testName: Notify1 x-testDescription: "This operation is intended to consume a notification payload\ \ so that all the entity data included by such notification is persisted,\ \ overwriting if necessary.\nThis operation is useful when one NGSIv2 endpoint\ \ is subscribed to another NGSIv2 endpoint (federation scenarios). \nThe\ \ request payload must be an NGSIv2 notification payload. \nThe behaviour\ \ must be exactly the same as `POST /v2/op/update` with `actionType` equal\ \ to `append`.\nResponse code:\n* Successful operation uses 200 OK\n* Errors\ \ use a non-2xx and (optionally) an error payload. See subsection on \"\ Error Responses\" for\n more details." x-operation-settings: CollectParameters: false AllowDynamicQueryParameters: false AllowDynamicFormParameters: false IsMultiContentStreaming: false definitions: RetrieveApiResourcesResponse: title: Retrieve API Resources response example: entities_url: /v2/entities types_url: /v2/types subscriptions_url: /v2/subscriptions registrations_url: /v2/registrations type: object properties: entities_url: description: URL which points to the entities resource example: /v2/entities type: string types_url: description: URL which points to the types resource example: /v2/types type: string subscriptions_url: description: 'URL which points to the subscriptions resource' example: /v2/subscriptions type: string registrations_url: description: 'URL which points to the registrations resource' example: /v2/registrations type: string required: - entities_url - types_url - subscriptions_url - registrations_url Options: title: options example: count x-enum-elements: - name: count description: '' - name: keyValues description: '' - name: values description: '' - name: unique description: '' type: string enum: - count - keyValues - values - unique ListEntitiesResponse: title: List Entities response example: type: Room id: DC_S1-D41 temperature: value: 35.6 type: Number metadata: {} type: object properties: type: description: '' example: Room type: string id: description: '' example: DC_S1-D41 type: string temperature: description: '' example: value: 35.6 type: Number metadata: {} type: object speed: description: '' example: value: 100 type: number metadata: accuracy: value: 2 type: Number timestamp: value: '2015-06-04T07:20:27.378Z' type: DateTime type: object required: - type - id Options3: title: options3 example: keyValues x-enum-elements: - name: keyValues description: '' - name: upsert description: '' type: string enum: - keyValues - upsert CreateEntityRequest: title: Create Entity request example: type: Room id: Bcn-Welt temperature: value: 21.7 humidity: value: 60 location: value: 41.3763726, 2.1864475 type: geo:point metadata: crs: value: WGS84 type: object properties: type: description: '' example: Room type: string id: description: '' example: Bcn-Welt type: string temperature: description: '' example: value: 21.7 type: object humidity: description: '' example: value: 60 type: object location: description: '' example: value: 41.3763726, 2.1864475 type: geo:point metadata: crs: value: WGS84 type: object required: - type - id - temperature - humidity - location Options6: title: options6 example: keyValues x-enum-elements: - name: keyValues description: '' - name: values description: '' - name: unique description: '' type: string enum: - keyValues - values - unique RetrieveEntityResponse: title: Retrieve Entity response example: type: Room id: Bcn_Welt temperature: value: 21.7 type: Number humidity: value: 60 type: Number location: value: 41.3763726, 2.1864475 type: geo:point metadata: crs: value: WGS84 type: Text type: object properties: type: description: '' example: Room type: string id: description: '' example: Bcn_Welt type: string temperature: description: '' example: value: 21.7 type: Number type: object humidity: description: '' example: value: 60 type: Number type: object location: description: '' example: value: 41.3763726, 2.1864475 type: geo:point metadata: crs: value: WGS84 type: Text type: object required: - type - id - temperature - humidity - location RetrieveEntityAttributesResponse: title: Retrieve Entity Attributes response example: temperature: value: 21.7 type: Number humidity: value: 60 type: Number location: value: 41.3763726, 2.1864475 type: geo:point metadata: crs: value: WGS84 type: Text type: object properties: temperature: description: '' example: value: 21.7 type: Number type: object humidity: description: '' example: value: 60 type: Number type: object location: description: '' example: value: 41.3763726, 2.1864475 type: geo:point metadata: crs: value: WGS84 type: Text type: object required: - temperature - humidity - location Options10: title: options10 example: append x-enum-elements: - name: append description: '' - name: keyValues description: '' type: string enum: - append - keyValues UpdateOrAppendEntityAttributesRequest: title: Update or Append Entity Attributes request type: object properties: ambientNoise: description: '' example: value: 31.5 type: object required: - ambientNoise Options12: title: options12 example: keyValues x-enum-elements: - name: keyValues description: '' type: string enum: - keyValues UpdateExistingEntityAttributesRequest: title: Update Existing Entity Attributes request type: object properties: temperature: description: '' example: value: 25.5 type: object seatNumber: description: '' example: value: 6 type: object required: - temperature - seatNumber ReplaceAllEntityAttributesRequest: title: Replace all entity attributes request type: object properties: temperature: description: '' example: value: 25.5 type: object seatNumber: description: '' example: value: 6 type: object required: - temperature - seatNumber GetAttributeDataResponse: title: Get attribute data response example: value: 21.7 type: Number metadata: {} type: object properties: value: description: '' example: 21.7 type: number format: double type: description: '' example: Number type: string metadata: description: '' example: {} type: object required: - value - type - metadata UpdateAttributeDataRequest: title: Update Attribute Data request example: value: 25.0 metadata: unitCode: value: CEL type: object properties: value: description: '' example: 25 type: number format: double metadata: description: '' example: unitCode: value: CEL type: object required: - value - metadata GetAttributeValueResponse: title: Get Attribute Value response example: address: Ronda de la Comunicacion s/n zipCode: 28050 city: Madrid country: Spain type: object properties: address: description: '' example: Ronda de la Comunicacion s/n type: string zipCode: description: '' example: 28050 type: integer format: int32 city: description: '' example: Madrid type: string country: description: '' example: Spain type: string required: - address - zipCode - city - country UpdateAttributeValueRequest: title: Update Attribute Value request example: address: Ronda de la Comunicacion s/n zipCode: 28050 city: Madrid country: Spain type: object properties: address: description: '' example: Ronda de la Comunicacion s/n type: string zipCode: description: '' example: 28050 type: integer format: int32 city: description: '' example: Madrid type: string country: description: '' example: Spain type: string required: - address - zipCode - city - country Options20: title: options20 example: count x-enum-elements: - name: count description: '' - name: values description: '' type: string enum: - count - values ListEntityTypesResponse: title: List Entity Types response example: type: Car attrs: speed: types: - Number fuel: types: - gasoline - diesel temperature: types: - urn:phenomenum:temperature count: 12 type: object properties: type: description: '' example: Car type: string attrs: description: '' example: speed: types: - Number fuel: types: - gasoline - diesel temperature: types: - urn:phenomenum:temperature type: object count: description: '' example: 12 type: integer format: int32 required: - type - attrs - count RetrieveEntityTypeResponse: title: Retrieve entity type response example: attrs: pressure: types: - Number humidity: types: - percentage temperature: types: - urn:phenomenum:temperature count: 7 type: object properties: attrs: description: '' example: pressure: types: - Number humidity: types: - percentage temperature: types: - urn:phenomenum:temperature type: object count: description: '' example: 7 type: integer format: int32 required: - attrs - count Options23: title: options23 example: count x-enum-elements: - name: count description: '' type: string enum: - count ListSubscriptionsResponse: title: List Subscriptions response example: id: abcdefg description: One subscription to rule them all subject: entities: - id: Bcn_Welt type: Room condition: attrs: - 'temperature ' expression: q: temperature>40 notification: httpCustom: url: http://localhost:1234 headers: X-MyHeader: foo qs: authToken: bar attrsFormat: keyValues attrs: - temperature - humidity timesSent: 12 lastNotification: '2015-10-05T16:00:00Z' lastFailure: '2015-10-06T16:00:00Z' expires: '2016-04-05T14:00:00Z' status: failed throttling: 5 type: object properties: id: description: '' example: abcdefg type: string description: description: '' example: One subscription to rule them all type: string subject: description: '' example: entities: - id: Bcn_Welt type: Room condition: attrs: - 'temperature ' expression: q: temperature>40 type: object notification: description: '' example: httpCustom: url: http://localhost:1234 headers: X-MyHeader: foo qs: authToken: bar attrsFormat: keyValues attrs: - temperature - humidity timesSent: 12 lastNotification: '2015-10-05T16:00:00Z' lastFailure: '2015-10-06T16:00:00Z' type: object expires: description: '' example: 4/5/2016 2:00:00 PM type: string status: description: '' example: failed type: string throttling: description: '' example: 5 type: integer format: int32 required: - id - description - subject - notification - expires - status - throttling CreateSubscriptionRequest: title: Create Subscription request example: description: One subscription to rule them all subject: entities: - idPattern: .* type: Room condition: attrs: - temperature expression: q: temperature>40 notification: http: url: http://localhost:1234 attrs: - temperature - humidity expires: '2016-04-05T14:00:00Z' throttling: 5 type: object properties: description: description: '' example: One subscription to rule them all type: string subject: description: '' example: entities: - idPattern: .* type: Room condition: attrs: - temperature expression: q: temperature>40 type: object notification: description: '' example: http: url: http://localhost:1234 attrs: - temperature - humidity type: object expires: description: '' example: 4/5/2016 2:00:00 PM type: string throttling: description: '' example: 5 type: integer format: int32 required: - subject - notification UpdateSubscriptionRequest: title: Update Subscription request example: expires: '2016-04-05T14:00:00Z' type: object properties: expires: description: '' example: 4/5/2016 2:00:00 PM type: string required: - expires ListRegistrationsResponse: title: List Registrations response example: id: abcdefg description: Example Context Source dataProvided: entities: - id: Bcn_Welt type: Room attrs: - temperature provider: http: url: http://contextsource.example.org supportedForwardingMode: all expires: '2017-10-31T12:00:00' status: active forwardingInformation: timesSent: 12 lastForwarding: '2017-10-06T16:00:00Z' lastSuccess: '2017-10-06T16:00:00Z' lastFailure: '2017-10-05T16:00:00Z' type: object properties: id: description: '' example: abcdefg type: string description: description: '' example: Example Context Source type: string dataProvided: description: '' example: entities: - id: Bcn_Welt type: Room attrs: - temperature type: object provider: description: '' example: http: url: http://contextsource.example.org supportedForwardingMode: all type: object expires: description: '' example: 10/31/2017 12:00:00 PM type: string status: description: '' example: active type: string forwardingInformation: description: '' example: timesSent: 12 lastForwarding: '2017-10-06T16:00:00Z' lastSuccess: '2017-10-06T16:00:00Z' lastFailure: '2017-10-05T16:00:00Z' type: object required: - id - description - dataProvided - provider - expires - status - forwardingInformation CreateRegistrationRequest: title: Create Registration request example: description: Relative Humidity Context Source dataProvided: entities: - id: room2 type: Room attrs: - relativeHumidity provider: http: url: http://localhost:1234 type: object properties: description: description: '' example: Relative Humidity Context Source type: string dataProvided: description: '' example: entities: - id: room2 type: Room attrs: - relativeHumidity type: object provider: description: '' example: http: url: http://localhost:1234 type: object required: - description - dataProvided - provider RetrieveRegistrationResponse: title: Retrieve Registration response example: id: abcdefg description: Example Context Source dataProvided: entities: - id: Bcn_Welt type: Room attrs: - temperature provider: http: url: http://contextsource.example.org supportedForwardingMode: all expires: '2017-10-31T12:00:00' status: failed forwardingInformation: timesSent: 12 lastForwarding: '2017-10-06T16:00:00Z' lastFailure: '2017-10-06T16:00:00Z' lastSuccess: '2017-10-05T18:25:00Z' type: object properties: id: description: '' example: abcdefg type: string description: description: '' example: Example Context Source type: string dataProvided: description: '' example: entities: - id: Bcn_Welt type: Room attrs: - temperature type: object provider: description: '' example: http: url: http://contextsource.example.org supportedForwardingMode: all type: object expires: description: '' example: 10/31/2017 12:00:00 PM type: string status: description: '' example: failed type: string forwardingInformation: description: '' example: timesSent: 12 lastForwarding: '2017-10-06T16:00:00Z' lastFailure: '2017-10-06T16:00:00Z' lastSuccess: '2017-10-05T18:25:00Z' type: object required: - id - description - dataProvided - provider - expires - status - forwardingInformation UpdateRegistrationRequest: title: Update Registration request example: expires: '2017-10-04T00:00:00' type: object properties: expires: description: '' example: 10/4/2017 12:00:00 AM type: string required: - expires UpdateRequest: title: Update request example: actionType: append entities: - type: Room id: Bcn-Welt temperature: value: 21.7 humidity: value: 60 - type: Room id: Mad_Aud temperature: value: 22.9 humidity: value: 85 type: object properties: actionType: description: '' example: append type: string entities: description: '' example: - type: Room id: Bcn-Welt temperature: value: 21.7 humidity: value: 60 - type: Room id: Mad_Aud temperature: value: 22.9 humidity: value: 85 type: array items: type: object required: - actionType - entities QueryRequest: title: Query request example: entities: - idPattern: .* type: Room - id: Car type: P-9873-K attrs: - temperature - humidity expression: q: temperature>20 metadata: - accuracy - timestamp type: object properties: entities: description: '' example: - idPattern: .* type: Room - id: Car type: P-9873-K type: array items: type: object attrs: description: '' example: - temperature - humidity type: array items: type: string expression: description: '' example: q: temperature>20 type: object metadata: description: '' example: - accuracy - timestamp type: array items: type: string required: - entities - attrs - expression - metadata QueryResponse: title: Query response example: type: Room id: DC_S1-D41 temperature: value: 35.6 type: Number type: object properties: type: description: '' example: Room type: string id: description: '' example: DC_S1-D41 type: string temperature: description: '' example: value: 35.6 type: Number type: object required: - type - id - temperature NotifyRequest: title: Notify request example: subscriptionId: 5aeb0ee97d4ef10a12a0262f data: - type: Room id: DC_S1-D41 temperature: value: 35.6 type: Number - type: Room id: Boe-Idearium temperature: value: 22.5 type: Number type: object properties: subscriptionId: description: '' example: 5aeb0ee97d4ef10a12a0262f type: string data: description: '' example: - type: Room id: DC_S1-D41 temperature: value: 35.6 type: Number - type: Room id: Boe-Idearium temperature: value: 22.5 type: Number type: array items: type: object required: - subscriptionId - data