Sites Management

This guide will highlight the steps involved in managing sites.

API endpoints in this page

What is a site?

A Site represents a high-level physical or logical unit within your organization's operational hierarchy. Think of it as a distinct location, such as a factory, plant, or a regional segment of a global enterprise.

Why Use Sites?

Organising devices into Sites is fundamental to leveraging the full power of Armis for asset inventory management. Each Site should correspond to a physical location, providing a clear, contextual view of the assets operating within it.

Example

You're an organisation with offices and factories all around the world, and you chose Armis to manage you asset inventory. A pilar of getting the most out of Armis is to organise devices into sites, where each site reflects a physical location.

Let's say you have the following physical locations in the world:

  1. San Francisco, CA, USA
  2. Reston, VA, USA
  3. Tel Aviv, Israel
  4. Melbourne, VIC, Australia
  5. London, UK

You would create five distinct Sites in Armis, one for each location.

Step 1: Create a site

The only mandatory field that a site requires is a name. You can create a bare-bones site first and configure it later, or you can set it up fully during the initial creation step for maximum efficiency.

The full list of properties you can set when creating a site can be seen here.

Repeat this steps to create multiple sites.

Perquisites:

  1. Access token with scopePERMISSION.SETTINGS.SITES_AND_SENSORS.MANAGE.SITES.

Send the request

import json
import requests

body = {
    "name": "San Francisco HQ",
}
headers = {
    "Authorization": "Bearer <access_token>",
}

response = requests.post(
    f"https://api.armis.com/v3/settings/sites",
    json=body,
    headers=headers,
)

response.raise_for_status()
print(json.dumps(response.json(), indent=2))

{
  "id": 1,
  "name": "San Francisco HQ",
  "location": null,
  "parent_id": null,
  "tier": null,
  "asq_rule": null,
  "asq_rule_description": null,
  "network_equipment_device_ids": [],
  "integration_ids": [],
  "lat": null,
  "lng": null
}

Detailed recipe

Step 2: Associate with an integration / network equipment / ASQ

Once the sites are created, the next crucial step is to ensure that the correct devices are automatically associated with the appropriate Site.

Device association is achieved by setting one or more of the following properties for each site:

  1. integration_ids: Devices ingested from the specified integrations (e.g., CrowdStrike, Active Directory, etc.) will be automatically assigned to this site.
  2. network_equipment_device_ids: Devices detected via these specific network equipment assets (e.g., Access Points) will be associated with this site.
  3. asq_rule: Any device matching the specified ASQ rule (e.g. type:Computers) will be associated with the site.

Setting these properties ensures that your device inventory is accurately mapped to your organisational structure, providing the context necessary for effective management and security.

Perquisites

  1. Access token with scopePERMISSION.SETTINGS.SITES_AND_SENSORS.MANAGE.SITES.

Send the request

import json
import requests

site_id = 1  # the id that we got when we created the site
body = {
    "integration_ids": [1],  # the id of the integration is 1
}
headers = {
    "Authorization": "Bearer <access_token>",
}

response = requests.patch(
    f"https://api.armis.com/v3/settings/sites/{site_id}",
    json=body,
    headers=headers,
)

response.raise_for_status()
print(json.dumps(response.json(), indent=2))
{
  "id": 1,
  "name": "San Francisco HQ",
  "location": null,
  "parent_id": null,
  "tier": null,
  "asq_rule": null,
  "asq_rule_description": null,
  "network_equipment_device_ids": [],
  "integration_ids": [1],
  "lat": null,
  "lng": null
}
📘

If you know all of a site's details at the time of its creation, you can provide them during the creation process itself.

Detailed recipe

More recipes