export information from json view using API

Glenn Maxwell 11,621 Reputation points
2024-11-23T02:53:11.67+00:00

Hi All,

I have an Azure Compute Gallery in Azure with VM image definitions for Windows Server 2022/2019.Initially, I created a VM from the Azure Marketplace and converted it into an image. I am using a KMS server for activation. I use the following settings when creating new VMs from the image.

licensetype After creating a VM from the image, when I check the JSON view and search for the word offer, I don't find any value for it. Is this expected? I would like to fetch the offer value using an API. Is there any API available for this? If the offer is not present in the JSON view, I would like to consider it as null.

Additionally, I want to fetch the imageReference information using an API. For the VM I built, I see the below value in the JSON view. I need to export 3 values**(offer, imageReference & licenseType**) using an API and import them into one of my other applications. please guide me with the APIs

licensetype2

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,067 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,377 questions
Microsoft Entra
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.