DEVELOPMENT DOCUMENTATION
igloo
Get API Key
Docs / iglooworks / API Reference / Departments

Departments API Reference

Enterprise API endpoints for managing departments.

Get Departments

GET /departments

Responses

200 Success

Request Example

curl https://api.igloodeveloper.co/departments \
  -H "Authorization: Bearer $API_KEY"
import { Igloo } from "@igloo/sdk";

const igloo = new Igloo(process.env.IGLOO_API_KEY);
const response = await igloo.departments.getDepartments();
from igloo import Igloo
import os

igloo = Igloo(os.environ["IGLOO_API_KEY"])
response = igloo.departments.get_departments()
package main

import (
	"context"
	"os"
	"go.igloohome.co/orion/sdk"
)

func main() {
	client := sdk.NewClient(sdk.ClientOptions{
		APIKey: os.Getenv("IGLOO_API_KEY"),
	})
	err := client.GetDepartments(context.Background())
}
<?php

$client = new \Igloo\Client(getenv("IGLOO_API_KEY"));
$response = $client->getDepartments();
import co.igloo.sdk.Client

val client = Client(apiKey = System.getenv("IGLOO_API_KEY"))
val response = client.getDepartments()
import Foundation

let client = IglooClient(apiKey: ProcessInfo.processInfo.environment["IGLOO_API_KEY"] ?? "")
client.getDepartments { result in
    // handle result
}

Get Department Devices

GET /departments/{id}/devices

Path Parameters

Parameter Type Required
id string Yes

Responses

200 Success

Request Example

curl https://api.igloodeveloper.co/departments/{id}/devices \
  -H "Authorization: Bearer $API_KEY"
import { Igloo } from "@igloo/sdk";

const igloo = new Igloo(process.env.IGLOO_API_KEY);
const params = {
  id: "value",
};
const response = await igloo.departments.getDepartmentDevices(params);
from igloo import Igloo
import os

igloo = Igloo(os.environ["IGLOO_API_KEY"])
params = {
    "id": "value",
}
response = igloo.departments.get_department_devices(params)
package main

import (
	"context"
	"os"
	"go.igloohome.co/orion/sdk"
)

func main() {
	client := sdk.NewClient(sdk.ClientOptions{
		APIKey: os.Getenv("IGLOO_API_KEY"),
	})
	params := map[string]interface{}{
		"id": "value",
	}
	err := client.GetDepartmentDevices(context.Background(), params)
}
<?php

$client = new \Igloo\Client(getenv("IGLOO_API_KEY"));
$params = [
    "id" => "value",
];
$response = $client->getDepartmentDevices($params);
import co.igloo.sdk.Client

val client = Client(apiKey = System.getenv("IGLOO_API_KEY"))
val params = mapOf(
    "id" to "value",
)
val response = client.getDepartmentDevices(params)
import Foundation

let client = IglooClient(apiKey: ProcessInfo.processInfo.environment["IGLOO_API_KEY"] ?? "")
let params: [String: Any] = [
    "id": "value",
]
client.getDepartmentDevices(params) { result in
    // handle result
}

Get Department Properties

GET /departments/{department_id}/properties

Path Parameters

Parameter Type Required
department_id string Yes

Responses

200 Success

Request Example

curl https://api.igloodeveloper.co/departments/{department_id}/properties \
  -H "Authorization: Bearer $API_KEY"
import { Igloo } from "@igloo/sdk";

const igloo = new Igloo(process.env.IGLOO_API_KEY);
const params = {
  department_id: "value",
};
const response = await igloo.departments.getDepartmentProperties(params);
from igloo import Igloo
import os

igloo = Igloo(os.environ["IGLOO_API_KEY"])
params = {
    "department_id": "value",
}
response = igloo.departments.get_department_properties(params)
package main

import (
	"context"
	"os"
	"go.igloohome.co/orion/sdk"
)

func main() {
	client := sdk.NewClient(sdk.ClientOptions{
		APIKey: os.Getenv("IGLOO_API_KEY"),
	})
	params := map[string]interface{}{
		"department_id": "value",
	}
	err := client.GetDepartmentProperties(context.Background(), params)
}
<?php

$client = new \Igloo\Client(getenv("IGLOO_API_KEY"));
$params = [
    "department_id" => "value",
];
$response = $client->getDepartmentProperties($params);
import co.igloo.sdk.Client

val client = Client(apiKey = System.getenv("IGLOO_API_KEY"))
val params = mapOf(
    "department_id" to "value",
)
val response = client.getDepartmentProperties(params)
import Foundation

let client = IglooClient(apiKey: ProcessInfo.processInfo.environment["IGLOO_API_KEY"] ?? "")
let params: [String: Any] = [
    "department_id": "value",
]
client.getDepartmentProperties(params) { result in
    // handle result
}

Get Department Access

GET /departments/{id}/access

Path Parameters

Parameter Type Required
id string Yes

Responses

200 Success

Request Example

curl https://api.igloodeveloper.co/departments/{id}/access \
  -H "Authorization: Bearer $API_KEY"
import { Igloo } from "@igloo/sdk";

const igloo = new Igloo(process.env.IGLOO_API_KEY);
const params = {
  id: "value",
};
const response = await igloo.departments.getDepartmentAccess(params);
from igloo import Igloo
import os

igloo = Igloo(os.environ["IGLOO_API_KEY"])
params = {
    "id": "value",
}
response = igloo.departments.get_department_access(params)
package main

import (
	"context"
	"os"
	"go.igloohome.co/orion/sdk"
)

func main() {
	client := sdk.NewClient(sdk.ClientOptions{
		APIKey: os.Getenv("IGLOO_API_KEY"),
	})
	params := map[string]interface{}{
		"id": "value",
	}
	err := client.GetDepartmentAccess(context.Background(), params)
}
<?php

$client = new \Igloo\Client(getenv("IGLOO_API_KEY"));
$params = [
    "id" => "value",
];
$response = $client->getDepartmentAccess($params);
import co.igloo.sdk.Client

val client = Client(apiKey = System.getenv("IGLOO_API_KEY"))
val params = mapOf(
    "id" to "value",
)
val response = client.getDepartmentAccess(params)
import Foundation

let client = IglooClient(apiKey: ProcessInfo.processInfo.environment["IGLOO_API_KEY"] ?? "")
let params: [String: Any] = [
    "id": "value",
]
client.getDepartmentAccess(params) { result in
    // handle result
}