Sample code for 30+ languages & platforms
Lua

Bluzone Get List of Beacons

See more Bluzone Examples

Get beacons for a project.

Chilkat Lua Downloads

Lua
local chilkat = require("chilkat")

-- This example assumes the Chilkat API to have been previously unlocked.
-- See Global Unlock Sample for sample code.

local http = chilkat.Http.new()

-- 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'

http:set_request_header("bzid", "YOUR_API_KEY_HERE")

local sbResponseBody = chilkat.StringBuilder.new()
local success = http:quick_get_sb("https://bluzone.io/portal/papis/v1/projects/YOUR_PROJECT_ID_HERE/devices/beacons", sbResponseBody)
if not success then
    print(http.last_error_text)
    return
end

print("Response body:")
print(sbResponseBody:get_as_string())