Self-signed Server Certificate

Context

Procedure

  1. Enter and send the message string.

    curl -v -k -E client.pem:<SECRET_KEY> -H "Content-Type:application/json" -d "<ENCODED_JSON_MESSAGE>" https://<IOT_GATEWAY_IP>:8699/measures/< DEVICE_ALTERNATE_ID>

  2. Different formats are allowed, for example:
    • One with the measures specified as an array of arrays: curl -v -E client.pem:jJ3fF7dD0rR2rR3wW0eE2tT -H "Content-Type:application/json" -d "{ \"capabilityAlternateId\": \"1234\", \"sensorAlternateId\": \"4321\", \"measures\": [[\"25\"]] }" <REST_ENDPOINT>

    • Another one, specifying measures as an array of JSON objects where the name of each property defined in the capability is the key: curl -v -E client.pem:jJ3fF7dD0rR2rR3wW0eE2tT -H "Content-Type:application/json" -d "{ \"capabilityAlternateId\": \"1234\", \"sensorAlternateId\": \"4321\", \"measures\": [{\"temperature\": \"25\"}] }" <REST_ENDPOINT>

  3. Check the response code in the terminal. The message must contain the following:
    • * upload completely sent off: <xx> out of <xx> bytes

    • < HTTP/1.1 202 Accepted

    • Please refer to learn how to inspect the data received by a device.