-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to PUT
or PATCH
registered attributes on CPrs entities (that does not exists locally)
#4430
Comments
After some tests using latests versions of IoTA and Orion, it is possible to put or patch when specifying the entity type as URL parameter as described here: telefonicaid/iotagent-node-lib#1464 (comment) Take as an example the following request:
@jason-fox Please, could you verify if it works for you? |
Yes that works and makes sense. curl -L -X PUT \
'http://localhost:1026/v2/entities/urn:ngsi-ld:Bell:001/attrs/ring' Fails but curl -L -X PUT \
'http://localhost:1026/v2/entities/urn:ngsi-ld:Bell:001/attrs/ring?type=Bell' Succeeds. This is because the IoT Agent registers the Bell as: [
{
"id": "65a907b164f1d24eb30ce7bd",
"dataProvided": {
"entities": [
{
"id": "urn:ngsi-ld:Bell:001",
"type": "Bell"
}
],
"attrs": [ "ring"]
}
}
] Which is for an Entity with id |
Ok, so, after this, we can close this issue and telefonicaid/iotagent-node-lib#1465. The scope of PR telefonicaid/iotagent-node-lib#1551 should change to reflect latest conclusions |
Bug description
When registering an entity provided from a Context Provider, without creating it, the entity is listed when executing
GET /v2/entities/<entityID>
but it is not possible to PUT or PATCH the registered attribute.This particular case is relevant when creating an only actuation entity. This behaviour is expected for all IoT Agents using the IoTA Node LIB version 3.4.0 or higher since no entity is created when provisioning the devices.
How to reproduce it
Steps to reproduce the behavior (as an example)
After creating a device using the IoT Agent JSON, the entity gets registered, but no entity is created after. Then, it is possible to query the entity
It returns:
But it is not possible to PUT or PATCH that entity
is returning:
Expected behavior
Allowing PATCH or PUT to registerd attributes in entities that does not exits locally on the context broker.
Additional Information
Related IoTA Issue:
telefonicaid/iotagent-node-lib#1464
The text was updated successfully, but these errors were encountered: