Warning: The Notifications API is deprecated and will be shutdown soon.

Orgunits: list

Retrieves a list of all organizational units for an account.

Request

HTTP request

GET https://www.googleapis.com/admin/directory/v1/customer/customerId/orgunits

Parameters

Parameter name Value Description
Path parameters
customerId string The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.
Optional query parameters
orgUnitPath string The full path to the organizational unit or its unique ID. Returns the children of the specified organizational unit.
type string Whether to return all sub-organizations or just immediate children.

Acceptable values are:
  • "all": All sub-organizational units.
  • "children": Immediate children only (default).

Authorization

This request requires authorization with at least one of the following scopes:

Scope
https://www.googleapis.com/auth/admin.directory.orgunit.readonly
https://www.googleapis.com/auth/admin.directory.orgunit

For more information, see the authentication and authorization page.

Request body

In the request body, supply an Orgunits resource.

Response

If successful, this method returns a response body with the following structure:

{
  "kind": "admin#directory#orgUnits",
  "etag": etag,
  "organizationUnits": [
    orgunits Resource
  ]
}
Property name Value Description Notes
kind string The type of the API resource. For Org Unit resources, the type is admin#directory#orgUnits.
organizationUnits[] list List of organizational unit objects.
etag etag ETag of the resource.