We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I create three Data Entities:
curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/entityOperations/create' \ -H 'Content-Type: application/json' \ -H 'Link: <http://context-provider:3000/data-models/ngsi-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Accept: application/ld+json' \ -H 'Cookie: _csrf=MAPTGFPcoPnewsGCWklHi4Mq' \ --data-raw '[ { "id": "urn:ngsi-ld:TemperatureSensor:002", "type": "TemperatureSensor", "category": { "type": "Property", "value": "sensor" }, "temperature": { "type": "Property", "value": 20, "unitCode": "CEL" } }, { "id": "urn:ngsi-ld:TemperatureSensor:003", "type": "TemperatureSensor", "category": { "type": "Property", "value": "sensor" }, "temperature": { "type": "Property", "value": 2, "unitCode": "CEL" } }, { "id": "urn:ngsi-ld:TemperatureSensor:004", "type": "TemperatureSensor", "category": { "type": "Property", "value": "sensor" }, "temperature": { "type": "Property", "value": 100, "unitCode": "CEL" } } ]'
I then update two of them using an update operation as shown:
update
curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/entityOperations/update?options=replace' \ -H 'Content-Type: application/json' \ -H 'Link: <http://context-provider:3000/data-models/ngsi-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \ -H 'Cookie: _csrf=MAPTGFPcoPnewsGCWklHi4Mq' \ --data-raw '[ { "id": "urn:ngsi-ld:TemperatureSensor:003", "type": "https://uri.fiware.org/ns/data-models#TemperatureSensor", "category": { "type": "Property", "value": [ "actuator", "sensor" ] } }, { "id": "urn:ngsi-ld:TemperatureSensor:004", "type": "TemperatureSensor", "temperature": { "type": "Property", "value": [ "actuator", "sensor" ] } } ]'
Both TemperatureSensor:003 and TemperatureSensor:004 exist so the expected result is 200 Success, but the actual response is: 207 Multi Status
TemperatureSensor:003
TemperatureSensor:004
{ "@context": "http://context-provider:3000/data-models/ngsi-context.jsonld", "success": [ "urn:ngsi-ld:TemperatureSensor:003" ], "errors": [ { "entityId": "urn:ngsi-ld:TemperatureSensor:004", "error": { "type": "https://uri.etsi.org/ngsi-ld/errors/BadRequestData", "title": "non-matching entity type", "detail": "TemperatureSensor", "status": 400 } } ] }
"git_hash": "db891a72a531ef4cc037caed5b04f8fe71da6814", "compile_time": "Thu Jul 30 13:13:23 UTC 2020"
The text was updated successfully, but these errors were encountered:
The @context used in the example can be found here.
@context
Sorry, something went wrong.
The same operation as an upsert works as expected - 204 No Content
upsert
POST http://localhost:1026/ngsi-ld/v1/entityOperations/upsert?options=replace
http://localhost:1026/ngsi-ld/v1/entityOperations/upsert?options=replace
Although no body is found in the response - see #502
Fixed issue #507
8ce573e
Merge pull request #513 from FIWARE/bug/issue507
5247f6e
Fixed by PR #513
Verified: eddd375
kzangeli
No branches or pull requests
I create three Data Entities:
I then update two of them using an
update
operation as shown:Both
TemperatureSensor:003
andTemperatureSensor:004
exist so the expected result is 200 Success, but the actual response is: 207 Multi StatusThe text was updated successfully, but these errors were encountered: