Open fgalan opened 7 years ago
looks good just wondering if we can simplify and save a few operations, for instance 8 and 9.
Yes, probably 8 and 9 are the less interesing ones. Ops 1 to 7 should be priorized.
The following question at SOF has to be edited (if stills opened) once this issue gets impemented: https://stackoverflow.com/questions/46810098/update-metadata
Out of the scope of NGSIv2, althouth it is a good idea that could (potentially) be included in a later version of the API (v2.1) in a backward compatible way.
CC: @jmcanterafonseca
NGSIv2 should include operations to manage metadata in order to solve current limitations in the API, e.g. it is not possible to add a single attribute without updating the whole metadata object.
The operations will be very similar to the ones used to manage attributes:
GET /v2/entities/E/attrs/<attr>/metadata
POST /v2/entities/E/attrs/<attr>/metadata
(option:append
)PATCH /v2/entities/E/attrs/<attr>/metadata
PUT /v2/entities/E/attrs/<attr>/metadata
GET /v2/entities/E/attrs/<attr>/metadata/<metadata>
PUT /v2/entities/E/attrs/<attr>/metadata/<metadata>
DELETE /v2/entities/E/attrs/<attr>/metadata/<metadata>
GET /v2/entities/E/attrs/<attr>/metadata/<metadata>/value
PUT /v2/entities/E/attrs/<attr>/metadata/<metadata>/value
.The payload is not include for briefness, but it should be easy looking to the equivalent operation at attrs level.