1
votes

Reading FIWARE-NGSI v2 Specification (http://telefonicaid.github.io/fiware-orion/api/v2/latest/)

In section Simplified Entity Representation I couldn't test values mode as recomend. My test fail:

values mode. This mode represents the entity as an array of attribute values. Information about id and type is left out. See example below. The order of the attributes in the array is specified by the attrs URI param (e.g. attrs=branch,colour,engine). If attrs is not used, the order is arbitrary.

[ 'Ford', 'black', 78.3 ]

Where and how I referenced an entityID?

POST /v2/entities/Room1?options=values&attrs=branch,colour,engine

payload:

[ 'Ford', 'black', 78.3 ]

Answer:

{
    "error": "MethodNotAllowed",
    "description": "method not allowed"
}

POST /v2/entities?options=values

payload:

[ 'Ford', 'black', 78.3 ]

Answer:

{
    "error": "ParseError",
    "description": "Errors found in incoming JSON buffer"
}

Version: GET /version

{
    "orion": {
        "version": "1.10.0-next",
        "uptime": "0 d, 0 h, 1 m, 34 s",
        "git_hash": "0f92803495a8b6c145547e19f35e8f633dec92e0",
        "compile_time": "Fri Feb 2 09:45:41 UTC 2018",
        "compiled_by": "root",
        "compiled_in": "77ff7f334a88",
        "release_date": "Fri Feb 2 09:45:41 UTC 2018",
        "doc": "https://fiware-orion.readthedocs.org/en/master/"
    }
}
1

1 Answers

2
votes

"options=values" is a representation format for querying data not for posting new entity data for obvious reasons, when you are creating new entities you have to specify the entity id and the entity type and with the values representation format you can't ...