Sample code for 30+ languages & platforms
Rust

Bluzone Get List of Beacons

See more Bluzone Examples

Get beacons for a project.

Chilkat Rust Downloads

Rust

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

let 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");

let sb_response_body = chilkat::StringBuilder::new();
if http.quick_get_sb("https://bluzone.io/portal/papis/v1/projects/YOUR_PROJECT_ID_HERE/devices/beacons", &sb_response_body).is_err() {
    println!("{}", http.last_error_text());
    return;
}

println!("Response body:");
println!("{}", sb_response_body.get_as_string().unwrap_or_default());