Identify which Azure Reservation Orders are derived using CloudHealth API
search cancel

Identify which Azure Reservation Orders are derived using CloudHealth API

book

Article ID: 284456

calendar_today

Updated On: 04-14-2025

Products

CloudHealth

Issue/Introduction

You can use the Assets API to search for Azure Reservation Orders where the is_derived field has a value of TRUE.

Resolution

Here's an example REST API command: 
 
https://chapi.cloudhealthtech.com/api/search?api_key={{apiKey}}&name=AzureReservationOrder&query=is_derived=true
 
You will need to replace {{apiKey}} with your own API key. 
 
Automating detection of derived Azure Reservation Orders 
 
This could easily be added to a scheduled script that runs hourly or daily to ensure that CloudHealth has the correct permissions to read all Azure Reservation Orders. 
 
Step 1:  Query CloudHealth API to identify Reservation IDs for any Reservation Orders that are derived
Step 2:  Use the Azure API to add the correct permissions for each of those Reservation Orders 
 
Assumptions:  The user running the scheduled script has view permissions on the CloudHealth Assets API and also has an Azure API key with the ability to add Read permissions on Reservation Orders.