{ "swagger": "2.0", "host": "management.azure.com", "info": { "version": "2017-08-31-preview", "title": "Management Groups API", "description": "The Azure Management Groups API enables consolidation of multiple \nsubscriptions/resources into an organizational hierarchy and centrally \nmanage access control, policies, alerting and reporting for those resources.\n" }, "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "flow": "implicit", "description": "Azure Active Directory OAuth2 Flow.", "scopes": { "user_impersonation": "impersonate your user account" } } }, "tags": [ { "name": "ManagementGroups", "description": "A Management Group is a customer defined scope (grouping mechanism) that \nprovides access control (authorization), policy management and reporting. \nManagement Groups are organized in a strictly tree-based hierarchy.\n" } ], "paths": { "/providers/Microsoft.Management/managementGroups": { "get": { "tags": [ "ManagementGroups" ], "operationId": "ManagementGroups_List", "description": "List management groups for the authenticated user.\n", "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" }, { "name": "$skiptoken", "in": "query", "required": false, "type": "string", "description": "Page continuation token is only used if a previous operation returned a partial result. \nIf a previous response contains a nextLink element, the value of the nextLink element will include a token parameter that specifies a starting point to use for subsequent calls.\n" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/ManagementGroupListResult" } }, "default": { "description": "Error", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-examples": { "GetManagementGroups": { "$ref": "./examples/GetGroups.json" } } } }, "/providers/Microsoft.Management/managementGroups/{groupId}": { "get": { "tags": [ "ManagementGroups" ], "operationId": "ManagementGroups_Get", "description": "Get the details of the management group.\n", "parameters": [ { "$ref": "#/parameters/GroupIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/ExpandParameter" }, { "$ref": "#/parameters/RecurseParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/ManagementGroupWithHierarchy" } }, "default": { "description": "Error", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-examples": { "GetManagementGroup": { "$ref": "./examples/GetManagementGroup.json" }, "GetManagementGroupWithExpand": { "$ref": "./examples/GetManagementGroupWithExpand.json" }, "GetManagementGroupsWithExpandAndRecurse": { "$ref": "./examples/GetManagementGroupWithExpandAndRecurse.json" } } } }, "/providers/Microsoft.Management/operations": { "get": { "tags": [ "Operations" ], "operationId": "Operations_List", "description": "Lists all of the available management REST API operations.", "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK. The request has succeeded.", "schema": { "$ref": "#/definitions/OperationListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } } }, "definitions": { "ErrorResponse": { "description": "The error object.", "properties": { "error": { "title": "Error", "$ref": "#/definitions/ErrorDetails" } } }, "ErrorDetails": { "description": "The details of the error.", "properties": { "code": { "description": "One of a server-defined set of error codes.", "type": "string" }, "message": { "description": "A human-readable representation of the error.", "type": "string" }, "target": { "description": "(Optional) The target of the error.", "type": "string" } } }, "Operation": { "description": "A Management REST API operation.", "type": "object", "properties": { "name": { "description": "Operation name: {provider}/{resource}/{operation}.", "type": "string", "readOnly": true }, "display": { "description": "The object that represents the operation.", "properties": { "provider": { "description": "Service provider: Microsoft.Management.", "type": "string", "readOnly": true }, "resource": { "description": "Resource on which the operation is performed: Invoice, etc.", "type": "string", "readOnly": true }, "operation": { "description": "Operation type: Read, write, delete, etc.", "type": "string", "readOnly": true } } } } }, "OperationListResult": { "description": "Result listing operations. It contains a list of operations and a URL link to get the next set of results.", "properties": { "value": { "description": "List of management operations supported by the Microsoft.Management resource provider.", "type": "array", "readOnly": true, "items": { "$ref": "#/definitions/Operation" } }, "nextLink": { "description": "URL to get the next set of operation list results if there are any.", "type": "string", "readOnly": true } } }, "ManagementGroupListResult": { "description": "The result of listing management groups.", "properties": { "value": { "description": "The list of management groups.", "type": "array", "items": { "$ref": "#/definitions/ManagementGroupInfo" } }, "nextLink": { "description": "The URL to the next page of results.", "type": "string", "readOnly": true } } }, "ManagementGroupInfo": { "description": "The management group.", "properties": { "id": { "type": "string", "description": "The ID of the management group. E.g. /providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000", "readOnly": true }, "type": { "type": "string", "description": "The type of the resource. E.g. /providers/Microsoft.Management/managementGroups", "readOnly": true }, "name": { "type": "string", "format": "uuid", "description": "The name of the management group. E.g. 20000000-0000-0000-0000-000000000000", "readOnly": true }, "properties": { "title": "Properties", "x-ms-client-flatten": true, "$ref": "#/definitions/ManagementGroupInfoProperties" } } }, "ManagementGroupInfoProperties": { "description": "The generic properties of a management group.", "type": "object", "properties": { "tenantId": { "type": "string", "format": "uuid", "description": "The AAD Tenant ID associated with the management group. E.g. 10000000-0000-0000-0000-000000000000" }, "displayName": { "type": "string", "description": "The friendly name of the management group." } } }, "ManagementGroup": { "description": "The management group details.", "properties": { "id": { "type": "string", "description": "The ID of the management group. E.g. /providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000", "readOnly": true }, "type": { "type": "string", "description": "The type of the resource. E.g. /providers/Microsoft.Management/managementGroups", "readOnly": true }, "name": { "type": "string", "format": "uuid", "description": "The name of the management group. E.g. 20000000-0000-0000-0000-000000000000", "readOnly": true }, "properties": { "title": "Properties", "x-ms-client-flatten": true, "$ref": "#/definitions/ManagementGroupProperties" } } }, "ManagementGroupProperties": { "description": "The generic properties of a management group.", "type": "object", "properties": { "tenantId": { "type": "string", "format": "uuid", "description": "The AAD Tenant ID associated with the management group. E.g. 10000000-0000-0000-0000-000000000000" }, "displayName": { "type": "string", "description": "The friendly name of the management group." }, "details": { "title": "Details", "$ref": "#/definitions/ManagementGroupDetailsProperties" } } }, "ManagementGroupDetailsProperties": { "description": "The details properties of a management group.", "type": "object", "properties": { "version": { "type": "number", "format": "int32", "description": "The version number of the object." }, "updatedTime": { "type": "string", "format": "date-time", "description": "The date and time when this object was last updated." }, "updatedBy": { "type": "string", "description": "The identity of the principal or process that updated the object." }, "parent": { "title": "Parent", "$ref": "#/definitions/ParentGroupInfo" }, "managementGroupType": { "title": "Management Group Type", "$ref": "#/definitions/ManagementGroupType" } } }, "ParentGroupInfo": { "description": "(Optional) The ID of the parent management group.", "properties": { "parentId": { "type": "string", "description": "The ID of the parent management group. E.g. /providers/Microsoft.Management/managementGroups/30000000-0000-0000-0000-000000000000" }, "displayName": { "type": "string", "description": "The friendly name of the management group." } } }, "ManagementGroupType": { "type": "string", "enum": [ "Enrollment", "Department", "Account", "Subscription" ], "description": "(Optional) The type of the management group." }, "ManagementGroupWithChildren": { "description": "The management group details.", "properties": { "id": { "type": "string", "description": "The ID of the management group. E.g. /providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000", "readOnly": true }, "type": { "type": "string", "description": "The type of the resource. E.g. /providers/Microsoft.Management/managementGroups", "readOnly": true }, "name": { "type": "string", "format": "uuid", "description": "The name of the management group. E.g. 20000000-0000-0000-0000-000000000000", "readOnly": true }, "properties": { "title": "Properties", "x-ms-client-flatten": true, "$ref": "#/definitions/ManagementGroupPropertiesWithChildren" } } }, "ManagementGroupPropertiesWithChildren": { "description": "The generic properties of a management group.", "type": "object", "properties": { "tenantId": { "type": "string", "format": "uuid", "description": "The AAD Tenant ID associated with the management group. E.g. 10000000-0000-0000-0000-000000000000" }, "displayName": { "type": "string", "description": "The friendly name of the management group." }, "details": { "title": "Details", "$ref": "#/definitions/ManagementGroupDetailsProperties" }, "children": { "description": "The list of children.", "type": "array", "items": { "$ref": "#/definitions/ManagementGroupChildInfo" } } } }, "ManagementGroupChildInfo": { "description": "The unique identifier (ID) of a management group.", "properties": { "childType": { "title": "Management Group Child Info", "$ref": "#/definitions/ManagementGroupType" }, "childId": { "type": "string", "description": "The ID of the child resource (management group or subscription). E.g. /providers/Microsoft.Management/managementGroups/40000000-0000-0000-0000-000000000000" }, "displayName": { "type": "string", "description": "The friendly name of the child resource." }, "tenantId": { "type": "string", "format": "uuid", "description": "(Optional) The AAD Tenant ID associated with the child resource." } } }, "ManagementGroupWithHierarchy": { "description": "The management group details.", "properties": { "id": { "type": "string", "description": "The ID of the management group. E.g. /providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000", "readOnly": true }, "type": { "type": "string", "description": "The type of the resource. E.g. /providers/Microsoft.Management/managementGroups", "readOnly": true }, "name": { "type": "string", "format": "uuid", "description": "The name of the management group. E.g. 20000000-0000-0000-0000-000000000000", "readOnly": true }, "properties": { "title": "Properties", "x-ms-client-flatten": true, "$ref": "#/definitions/ManagementGroupPropertiesWithHierarchy" } } }, "ManagementGroupPropertiesWithHierarchy": { "description": "The generic properties of a management group.", "type": "object", "properties": { "tenantId": { "type": "string", "format": "uuid", "description": "The AAD Tenant ID associated with the management group. E.g. 10000000-0000-0000-0000-000000000000" }, "displayName": { "type": "string", "description": "The friendly name of the management group." }, "details": { "title": "Details", "$ref": "#/definitions/ManagementGroupDetailsProperties" }, "children": { "description": "The list of children.", "type": "array", "items": { "$ref": "#/definitions/ManagementGroupRecursiveChildInfo" } } } }, "ManagementGroupRecursiveChildInfo": { "description": "The unique identifier (ID) of a management group.", "properties": { "childType": { "title": "Management Group Recursive Child Info", "$ref": "#/definitions/ManagementGroupType" }, "childId": { "type": "string", "description": "The ID of the child resource (management group or subscription). E.g. /providers/Microsoft.Management/managementGroups/40000000-0000-0000-0000-000000000000" }, "displayName": { "type": "string", "description": "The friendly name of the child resource." }, "tenantId": { "type": "string", "format": "uuid", "description": "(Optional) The AAD Tenant ID associated with the child resource." }, "children": { "description": "The list of children.", "type": "array", "items": { "$ref": "#/definitions/ManagementGroupRecursiveChildInfo" } } } } }, "parameters": { "GroupIdParameter": { "name": "groupId", "in": "path", "required": true, "type": "string", "format": "uuid", "description": "Management Group ID.", "x-ms-parameter-location": "client" }, "ApiVersionParameter": { "name": "api-version", "in": "query", "required": true, "type": "string", "description": "Version of the API to be used with the client request. The current version is 2017-08-31-preview." }, "ExpandParameter": { "name": "$expand", "in": "query", "required": false, "type": "string", "enum": [ "children" ], "x-ms-parameter-location": "method", "description": "The $expand=children query string parameter allows clients to request inclusion of children in the response payload." }, "RecurseParameter": { "name": "$recurse", "in": "query", "required": false, "type": "boolean", "x-ms-parameter-location": "method", "description": "The $recurse=true query string parameter allows clients to request inclusion of entire hierarchy in the response payload." } } }