Tcl
Tcl
Bluzone Get List of Beacons
See more Bluzone Examples
Get beacons for a project.Chilkat Tcl Downloads
load ./chilkat.dll
set success 0
# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.
set http [new_CkHttp]
# Implements the following CURL command:
# curl -X GET \
# https://bluzone.io/portal/papis/v1/projects/YOUR_PROJECT_ID_HERE/devices/beacons \
# -H 'bzid: YOUR_API_KEY_HERE'
CkHttp_SetRequestHeader $http "bzid" "YOUR_API_KEY_HERE"
set sbResponseBody [new_CkStringBuilder]
set success [CkHttp_QuickGetSb $http "https://bluzone.io/portal/papis/v1/projects/YOUR_PROJECT_ID_HERE/devices/beacons" $sbResponseBody]
if {$success == 0} then {
puts [CkHttp_lastErrorText $http]
delete_CkHttp $http
delete_CkStringBuilder $sbResponseBody
exit
}
puts "Response body:"
puts [CkStringBuilder_getAsString $sbResponseBody]
delete_CkHttp $http
delete_CkStringBuilder $sbResponseBody