Queries the statistics of a directory.

Usage notes

This topic provides an example on how to query the statistics of a directory whose ID is d-00fc2p61****. The statistics include the number of users, quota for users, number of groups, quota for groups, number of access configurations, quota for access configurations, number of access permissions that are assigned, number of System for Cross-domain Identity Management (SCIM) credentials, number of asynchronous tasks, status of single sign-on (SSO) logon, and status of SCIM synchronization.


You can call this operation up to 100 times per second per account. This operation is globally limited to 100 times per second across all accounts. If the number of the calls per second exceeds a limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limits when you call this operation.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetDirectoryStatistics

The operation that you want to perform. Set the value to GetDirectoryStatistics.

DirectoryId String Yes d-00fc2p61****

The ID of the directory.

For more information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
RequestId String 7B7228B0-A435-5D27-A6B2-ED3571F0654B

The ID of the request.

DirectoryStatistics Object

The statistics of the directory.

UserCount Integer 16

The number of users.

GroupCount Integer 4

The number of groups.

UserQuota Integer 1000

The quota for users.

GroupQuota Integer 500

The quota for groups.

AccessConfigurationQuota Integer 1000

The quota for access configurations.

AccessAssignmentCount Integer 5

The number of access permissions that are assigned.

SCIMServerCredentialCount Integer 2

The number of SCIM credentials.

DirectoryId String d-00fc2p61****

The ID of the directory.

SSOEnabled Boolean false

Indicates whether SSO logon is enabled. Valid values:

  • true: SSO logon is enabled.
  • false: SSO logon is disabled.
Region String cn-shanghai

The region ID of the directory.

AccessConfigurationCount Integer 6

The number of access configurations.

DirectoryName String new-example

The name of the directory.

InProgressTaskCount Integer 0

The number of tasks that are being performed.

SCIMSyncEnabled Boolean true

Indicates whether SCIM synchronization is enabled. Valid values:

  • true: SCIM synchronization is enabled.
  • false: SCIM synchronization is disabled.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "RequestId" : "7B7228B0-A435-5D27-A6B2-ED3571F0654B",
  "DirectoryStatistics" : {
    "UserCount" : 16,
    "GroupCount" : 4,
    "UserQuota" : 1000,
    "GroupQuota" : 500,
    "AccessConfigurationQuota" : 1000,
    "SCIMSyncEnabled" : true,
    "AccessAssignmentCount" : 5,
    "SCIMServerCredentialCount" : 2,
    "DirectoryId" : "d-00fc2p61****",
    "SSOEnabled" : false,
    "Region" : "cn-shanghai",
    "AccessConfigurationCount" : 6,
    "DirectoryName" : "new-example",
    "InProgressTaskCount" : 0

Error codes

For a list of error codes, visit the API Error Center.