This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
wiki:interfaces:webaw [2020/04/09 16:29] mbi [End-device registration] |
wiki:interfaces:webaw [2020/09/25 14:17] (current) hch [Authentication] |
||
---|---|---|---|
Line 44: | Line 44: | ||
LOGIN_RESULT=$(curl "$URL/application/administration/login" \ | LOGIN_RESULT=$(curl "$URL/application/administration/login" \ | ||
--data-binary '{"login":"spn","password":"spnpwd"}' \ | --data-binary '{"login":"spn","password":"spnpwd"}' \ | ||
- | --insecure -s \ | ||
) | ) | ||
Line 72: | Line 71: | ||
# Download SPN gateway configuration | # Download SPN gateway configuration | ||
- | curl --insecure -s \ | + | curl -s \ |
"$URL/application/administration/configuration" \ | "$URL/application/administration/configuration" \ | ||
-H "Authorization: Bearer $TOKEN" \ | -H "Authorization: Bearer $TOKEN" \ | ||
Line 94: | Line 93: | ||
-H "Authorization: Bearer $TOKEN" \ | -H "Authorization: Bearer $TOKEN" \ | ||
-F file='@spn_config.json' \ | -F file='@spn_config.json' \ | ||
- | -i --insecure -s \ | ||
-H 'Expect:' \ | -H 'Expect:' \ | ||
| grep "204 No Content" \ | | grep "204 No Content" \ | ||
Line 117: | Line 115: | ||
# Add an end-device and search for the string "201 Created" | # Add an end-device and search for the string "201 Created" | ||
- | ADD_DEVICE_RESULT=$(curl -i --insecure -s \ | + | ADD_DEVICE_RESULT=$(curl -s \ |
"$URL/application/spn/end_devices" \ | "$URL/application/spn/end_devices" \ | ||
-H "Authorization: Bearer $TOKEN" \ | -H "Authorization: Bearer $TOKEN" \ | ||
Line 154: | Line 152: | ||
# Add an end-device and search for the string "201 Created" | # Add an end-device and search for the string "201 Created" | ||
- | ADD_DEVICE_RESULT=$(curl -i --insecure -s \ | + | ADD_DEVICE_RESULT=$(curl -s \ |
"$URL/application/spn/end_devices" \ | "$URL/application/spn/end_devices" \ | ||
-H "Authorization: Bearer $TOKEN" \ | -H "Authorization: Bearer $TOKEN" \ | ||
Line 172: | Line 170: | ||
# GET RX data for all end-devices | # GET RX data for all end-devices | ||
- | curl --insecure -s \ | + | curl -s \ |
- | "$URL/application/spn/rxdata/file" \ | + | "$URL/application/spn/rx_data/file" \ |
-H "Authorization: Bearer $TOKEN" \ | -H "Authorization: Bearer $TOKEN" \ | ||
-H "Content-Type: application/vnd.kerlink.iot-v1+json" \ | -H "Content-Type: application/vnd.kerlink.iot-v1+json" \ |