Azure / azure-rest-api-specs

The source for REST API specifications for Microsoft Azure.
MIT License
2.7k stars 5.12k forks source link

[Subscription] $expand=ancestors is missing in the specs #15935

Open scratch85 opened 3 years ago

scratch85 commented 3 years ago

Hi,

I opened this issue as recommended from azure-powershell#12391. Azure Portal uses a very helpful parameter and value "$expand=ancestors" to add to the output on where a subscription is located in the management group tree. This parameter and its values sadly is not part of the specs.

Sample API Call with the parameter $expand (managementGroupAncestors is included in the results): https://management.azure.com/subscriptions/{SubscriptionId}?api-version=2020-01-01&$expand=ancestors

{
  "id": "/subscriptions/....",
  "authorizationSource": "....",
  "managementGroupAncestors": [
    "management-group-level-2",
    "management-group-level-1",
    "{myTenantId}"
  ],
  "managedByTenants": [],
  "subscriptionId": "*****",
  "tenantId": "*****",
  "displayName": "MySubscription",
  "state": "Enabled",
  "subscriptionPolicies": {
    "locationPlacementId": "....",
    "quotaId": "....",
    "spendingLimit": "Off"
  }
}

Sample API Call without the parameter $expand (managementGroupAncestors is not included in the results): https://management.azure.com/subscriptions/{SubscriptionId}?api-version=2020-01-01

{
  "id": "/subscriptions/....",
  "authorizationSource": "....",
  "managedByTenants": [],
  "subscriptionId": "*****",
  "tenantId": "*****",
  "displayName": "MySubscription",
  "state": "Enabled",
  "subscriptionPolicies": {
    "locationPlacementId": "....",
    "quotaId": "....",
    "spendingLimit": "Off"
  }
}

Would be awesome if this parameter could be officially added and described in the specs: https://github.com/Azure/azure-rest-api-specs/blob/2cd7c6eacc5430d8956885e8d19b87ce3f3ebd6e/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/subscriptions.json#L95

Many Thanks!

scratch85 commented 3 years ago

up

ghost commented 3 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @anuragdalmia, @shilpigautam, @ramaganesan-rg.

Issue Details
Hi, I opened this issue as recommended from [azure-powershell#12391](https://github.com/Azure/azure-powershell/issues/12391). Azure Portal uses a very helpful parameter and value "$expand=ancestors" to add to the output on where a subscription is located in the management group tree. This parameter and its values sadly is not part of the specs. Sample API Call with the parameter $expand (managementGroupAncestors is included in the results): `https://management.azure.com/subscriptions/{SubscriptionId}?api-version=2020-01-01&$expand=ancestors` ```json { "id": "/subscriptions/....", "authorizationSource": "....", "managementGroupAncestors": [ "management-group-level-2", "management-group-level-1", "{myTenantId}" ], "managedByTenants": [], "subscriptionId": "*****", "tenantId": "*****", "displayName": "MySubscription", "state": "Enabled", "subscriptionPolicies": { "locationPlacementId": "....", "quotaId": "....", "spendingLimit": "Off" } } ``` Sample API Call without the parameter $expand (managementGroupAncestors is not included in the results): `https://management.azure.com/subscriptions/{SubscriptionId}?api-version=2020-01-01` ```json { "id": "/subscriptions/....", "authorizationSource": "....", "managedByTenants": [], "subscriptionId": "*****", "tenantId": "*****", "displayName": "MySubscription", "state": "Enabled", "subscriptionPolicies": { "locationPlacementId": "....", "quotaId": "....", "spendingLimit": "Off" } } ``` Would be awesome if this parameter could be officially added and described in the specs: https://github.com/Azure/azure-rest-api-specs/blob/2cd7c6eacc5430d8956885e8d19b87ce3f3ebd6e/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/subscriptions.json#L95 Many Thanks!
Author: scratch85
Assignees: -
Labels: `Service Attention`, `Subscription`
Milestone: -
anuragdalmia commented 3 years ago

Can the ARM team please take a look at this request for the subscriptions public API ?

ghost commented 3 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @armleads-azure.

Issue Details
Hi, I opened this issue as recommended from [azure-powershell#12391](https://github.com/Azure/azure-powershell/issues/12391). Azure Portal uses a very helpful parameter and value "$expand=ancestors" to add to the output on where a subscription is located in the management group tree. This parameter and its values sadly is not part of the specs. Sample API Call with the parameter $expand (managementGroupAncestors is included in the results): `https://management.azure.com/subscriptions/{SubscriptionId}?api-version=2020-01-01&$expand=ancestors` ```json { "id": "/subscriptions/....", "authorizationSource": "....", "managementGroupAncestors": [ "management-group-level-2", "management-group-level-1", "{myTenantId}" ], "managedByTenants": [], "subscriptionId": "*****", "tenantId": "*****", "displayName": "MySubscription", "state": "Enabled", "subscriptionPolicies": { "locationPlacementId": "....", "quotaId": "....", "spendingLimit": "Off" } } ``` Sample API Call without the parameter $expand (managementGroupAncestors is not included in the results): `https://management.azure.com/subscriptions/{SubscriptionId}?api-version=2020-01-01` ```json { "id": "/subscriptions/....", "authorizationSource": "....", "managedByTenants": [], "subscriptionId": "*****", "tenantId": "*****", "displayName": "MySubscription", "state": "Enabled", "subscriptionPolicies": { "locationPlacementId": "....", "quotaId": "....", "spendingLimit": "Off" } } ``` Would be awesome if this parameter could be officially added and described in the specs: https://github.com/Azure/azure-rest-api-specs/blob/2cd7c6eacc5430d8956885e8d19b87ce3f3ebd6e/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/subscriptions.json#L95 Many Thanks!
Author: scratch85
Assignees: -
Labels: `Service Attention`, `Subscription`, `ARM - Core`
Milestone: -
ShilpiGautam commented 3 years ago

Based on @anuragdalmia suggestion can ARM team pls look at this request? Have removed subscriptions tag and applied arm one for the ask to be routed.

scratch85 commented 2 years ago

any update here?

scratch85 commented 2 years ago

any updates here?

scratch85 commented 1 year ago

Any news here?