REST API - Properties Missing From Resources - List Response

Dustin 11 Reputation points
2021-05-21T13:36:49.087+00:00

Hi,

I am using the REST API Resources - List endpoint to pull information about client azure resources. The GET request is working successfully, but the GenericResourceExpanded.properties object is missing from the response. I am only seeing id, name, type, location, and tags. Is there something I need to enable or configure in order to get the resource properties?

Thanks,
Dustin

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,081 questions
Azure Disk Storage
Azure Disk Storage
A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.
570 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 68,391 Reputation points
    2021-07-19T06:12:22.093+00:00

    Hi @Dustin

    I see that you have added the 'azure-api-management' tag and the issue is not related to APIM service.
    But looking into the document for the Resource - List API the you can use the $expand in the query parameter with and specify the property that you want to retrieves all with the default properties.

    As you want the GenericResourceExpanded.properties then you can specify the property name listed under GenericResourceExpanded in the $expand query parameter

    The Request URL will be :
    https://management.azure.com/subscriptions/{subscriptionID}/resources?$expand=createdTime,changedTime,provisioningState&api-version=2021-04-01

    The above will return the createdTime, changedTime and provisioningState under the GenericResourceExpanded object.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.