HomeGuidesAPI ReferenceGuidesMRT APIConfiguration API
GitHubAirheads Developer Community
Guides

Working with Scope IDs

How to find scope IDs to use with Central API

A scope ID in Central is an identifier used to manage the constructs in the Central Hierarchy. Each piece of the hierarchy has it's own unique scope ID. Understanding how to retrieve and use scope IDs is essential to working with Central APIs. In order to apply any configuration in Central via API it is required to know the scope ID of the target hierarchy construct. This guide is a walkthrough on how to retrieve a scope ID from each level of the Central hierarchy to enable configuration application via API.

Executing the APIs

To run all of the scope ID APIs we only need an access token. Please review our Generating & Managing Access Tokens guide for how to get an access token. For a refresher on how to make API calls please reference our Making API calls guide.

Site Collection ID

To retrieve a site collection scope ID use the get site collection network-config API. This API will return a list of all site collection details including the scope ID. We can identify the target collection with the 'scopeName' key and the ID with the 'scopeID' key. Here is a sample return of the API executed from the reference page.

Site Collection Example

Site ID

To retrieve a site scope ID use the get sites network-config API. This API will return a list of all sites details including the scope ID. We can identify the target site with the 'scopeName' key and the ID with the 'scopeID' key. Here is a sample return of the API executed from the reference page.

Site Example

Device ID

To retrieve a device scope ID use the device inventory monitoring API. This API will return a list of all site collection details including the scope ID. We can identify the target device with the 'deviceName' or 'serialNumber' key and the ID with the 'scopeID' key. Here is a sample return of the API executed from the reference page.

Device Example

Global ID

To retrieve the global scope ID we will be using the get hierarchy network-config API. This API will return the hierarchy details for the provided scope including the global scope ID. To use this API we will need a two step process.

  1. Acquire a scope ID of either a site or a device. Reference either site or device sections for instructions on how to do this.
  2. Once the scope ID of choice is acquired, provide the parameters 'scopeId' and 'scopeType' with the value of the acquired ID and it's respective type (site/device). Then execute the request.

We can identify the global scope ID by identifying the object in the "hierarchy" list with the 'scopeType' key with the value of "org". The global scope ID is the 'scopeID' value in that object. Here is a sample return of the API executed from the reference page.

Global Example


Using Scope ID with APIs

With a scope ID in hand we can now use them in our other API calls to perform operation like creating a local profile or assigning a library profile to a scope. These operations allow applying configuration profiles through profile assignment or local profile creation at any scope level of the hierarchy.


What’s Next

Learn how to put it all together by working with Library Profiles