Hi,
The post call for a creation of a new TD is working, but it is not generating any _id to assign at the TD.
Below is a curl example of CREATE (using the authentication, pls replace the Bearer token):
curl --location --request POST 'http://localhost:3000/things' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEsImlhdCI6MTY1NzAyMTE4MiwiZXhwIjoxNjU3MDIyMDgyfQ.kxCnnuJLVWVVtOKChcoBw7THXqmiv2onaFtRMQcNd5c' \
--header 'Content-Type: application/json' \
--data-raw '{"@context":["http://www.w3.org/ns/td","https://context.dasibreaker.vaimee.it/context.jsonld",{"@language":"en"}],"@type":["Sensor"],"title":"temp_02","securityDefinitions":{"no_sec":{"scheme":"nosec"}},"security":"no_sec","properties":{"latitude":{"title":"Latitude","description":"Latitude of the sensor","@type":"xsd:float","readOnly":false,"writeOnly":false,"observable":false,"forms":[{"href":"http://15.0.0.2:8080/temp_02/properties/latitude","contentType":"application/json","op":["readproperty","writeproperty"]},{"href":"http://192.168.80.1:8080/temp_02/properties/latitude","contentType":"application/json","op":["readproperty","writeproperty"]},{"href":"coap://15.0.0.2:5683/temp_02/properties/latitude","contentType":"application/json","op":["readproperty","writeproperty"]},{"href":"coap://192.168.80.1:5683/temp_02/properties/latitude","contentType":"application/json","op":["readproperty","writeproperty"]}]},"longitude":{"title":"Longitude","description":"Longitude of the sensor","@type":"xsd:float","readOnly":false,"writeOnly":false,"observable":false,"forms":[{"href":"http://15.0.0.2:8080/temp_02/properties/longitude","contentType":"application/json","op":["readproperty","writeproperty"]},{"href":"http://192.168.80.1:8080/temp_02/properties/longitude","contentType":"application/json","op":["readproperty","writeproperty"]},{"href":"coap://15.0.0.2:5683/temp_02/properties/longitude","contentType":"application/json","op":["readproperty","writeproperty"]},{"href":"coap://192.168.80.1:5683/temp_02/properties/longitude","contentType":"application/json","op":["readproperty","writeproperty"]}]},"value":{"title":"Sensor value","description":"Sensor value","@type":"xsd:float","readOnly":false,"writeOnly":false,"observable":false,"forms":[{"href":"http://15.0.0.2:8080/temp_02/properties/value","contentType":"application/json","op":["readproperty","writeproperty"]},{"href":"http://192.168.80.1:8080/temp_02/properties/value","contentType":"application/json","op":["readproperty","writeproperty"]},{"href":"coap://15.0.0.2:5683/temp_02/properties/value","contentType":"application/json","op":["readproperty","writeproperty"]},{"href":"coap://192.168.80.1:5683/temp_02/properties/value","contentType":"application/json","op":["readproperty","writeproperty"]}]}},"forms":[{"href":"http://15.0.0.2:8080/temp_02/all/properties","contentType":"application/json","op":["writeallproperties","writemultipleproperties"]},{"href":"http://192.168.80.1:8080/temp_02/all/properties","contentType":"application/json","op":["writeallproperties","writemultipleproperties"]}]}'
That request has a response: 201 created
Then if I ask for a get-all like that:
curl --location --request GET 'http://localhost:3000/things'
The TD exists but with not _id:
Hi, The post call for a creation of a new TD is working, but it is not generating any _id to assign at the TD. Below is a curl example of CREATE (using the authentication, pls replace the Bearer token):
That request has a response:
201 created
Then if I ask for a get-all like that:curl --location --request GET 'http://localhost:3000/things'
The TD exists but with not _id:Thx :)