Get Admin Console Account List¶
GET /api/v1/super-account/list
Overview¶
Query site admin console accounts and their MFA binding status with pagination.
Before Calling and Usage Steps¶
Query all non-deleted admin accounts, including disabled accounts, in descending order by id. search performs contains matching on login name, nickname, or email and trims leading and trailing whitespace. Defaults are pageIndex=1/pageSize=20; the maximum is 100. The list removes the internal mfaSecret; creatorAccount is the creator login name that can be resolved, and it is usually empty for sys-created accounts. Only the id=1 record additionally returns isSuperAdministrator=true; this field is omitted for other records. enableMFA is calculated based on the current MFA configuration and binding status. If a custom MFA service check fails, this field may be omitted and must not be treated as false.
Request Headers¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| X-Df-SVersion | string | Signature version for the original path and request body; do not omit it while continuing to use this page's algorithm. Example: v20240417How to obtain or fill in: This page's example uses this fixed version, which matches the example signing algorithm. |
|
| X-Df-Access-Key | string | Y | Read endpoints accept r or w credentials; write endpoints require w credentials. Example: <external-access-key>How to obtain or fill in: Assigned by the site administrator as External API AK; workspace OpenAPI Key cannot be used. |
| X-Df-Signature | string | Y | Concatenate the uppercase method, nonce, original full path, timestamp, and original UTF-8 request body with spaces, then compute HMAC-SHA256 and take the hex digest. Example: <hmac-sha256-hex>How to obtain or fill in: Calculate using the matching SK according to External API Signature Authentication; see the complete runnable template below. |
| X-Df-Timestamp | string | Y | Must be within the signature validity window configured for the site; do not reuse the example time. Example: 1785427200How to obtain or fill in: When sending, generate the current Unix seconds string with str(int(time.time())). |
| X-Df-Nonce | string | Y | Temporary serial number; when resending after a failure, also generate a new value and recalculate the signature. Example: 97d275ee9f774315a7885ba7347acbd9How to obtain or fill in: Regenerate uuid.uuid4().hex for each request. |
Query Request Parameters¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| search | string | Optional; no filtering is applied when omitted or blank; does not search by mobile number. Null allowed: False Example: api-docHow to obtain or fill in: Use a keyword from the login name, nickname, or email. |
|
| pageIndex | integer | Default 1; minimum 1. Null allowed: False $minValue: 1 Example: 1How to obtain or fill in: Start from 1 for the first request, and advance subsequent pages according to content.pageInfo. |
|
| pageSize | integer | Default 20; maximum 100. Null allowed: False $minValue: 1 $maxValue: 100 Example: 20How to obtain or fill in: Choose 1 to 100 as needed by the client; custom MFA checks may run per account, so avoid unintentionally increasing the work per request. |
Additional Parameter Notes¶
For authentication, see External API Signature Authentication. This module manages site admin console accounts; UUIDs usually start with mact_; they are not workspace business members acnt_, nor workspace Owners. List/detail operations can use r or w permissions; all other operations require w permission. External executes as sys and does not apply the normal admin console account restrictions on the initial super administrator; before operating, verify the target account and an admin account that can still log in. Exceptions from custom MFA checks are usually captured per account and do not necessarily cause the entire list request to fail.
Request Example¶
import hashlib
import hmac
import json
import time
import uuid
from urllib.parse import urlencode
from urllib.request import Request, urlopen
from urllib.error import HTTPError, URLError
# Replace with the target site address and the External API AK/SK assigned by the administrator.
server = "https://external-api.guance.com"
access_key = "<external-access-key>"
secret_key = "<external-secret-key>"
method = 'GET'
path = '/api/v1/super-account/list'
query = {'search': 'api-doc', 'pageIndex': 1, 'pageSize': 20}
data = None
full_path = path + ("?" + urlencode(query) if query else "")
body = "" if data is None else json.dumps(data, ensure_ascii=False, separators=(",", ":"))
timestamp = str(int(time.time()))
nonce = uuid.uuid4().hex
string_to_sign = " ".join([method, nonce, full_path, timestamp, body])
signature = hmac.new(secret_key.encode("utf-8"), string_to_sign.encode("utf-8"), hashlib.sha256).hexdigest()
headers = {
"X-Df-Access-Key": access_key,
"X-Df-Timestamp": timestamp,
"X-Df-Nonce": nonce,
"X-Df-Signature": signature,
"X-Df-SVersion": "v20240417",
}
if data is not None:
headers["Content-Type"] = "application/json"
request = Request(server + full_path, data=None if data is None else body.encode("utf-8"), headers=headers, method=method)
try:
with urlopen(request, timeout=30) as result:
payload = json.loads(result.read().decode("utf-8"))
except HTTPError as error:
detail = error.read().decode("utf-8")
print("HTTP", error.code, detail) # Check errorCode, message, content, and traceId; do not print AK/SK.
raise SystemExit(1)
except (URLError, TimeoutError):
print("The request result is unknown; for write operations, query the current account status first, confirm it, and then decide whether to retry.")
raise SystemExit(1)
print(json.dumps(payload, ensure_ascii=False, indent=2))
Response¶
HTTP 200, application/json unified envelope; External does not automatically add a declaration. The account list is in content.data, and pagination is in content.pageInfo.
| Field | Type | Description |
|---|---|---|
| content.data | Object array | Non-deleted admin accounts on the current page. |
| content.data[].id | integer or null | Admin account record sequence number; id=1 is the initial super administrator. The snapshot returned by the create operation may be null; calls use uuid. |
| content.data[].uuid | string | Admin account UUID, usually prefixed with mact_. |
| content.data[].status | integer | Account status: 0 enabled, 2 disabled, 3 deleted; list and details exclude 3 but can still return 2. |
| content.data[].creator | string | Creator identity; for External, usually sys. |
| content.data[].updator | string | Most recent updater identity; may be empty if never updated. |
| content.data[].createAt | integer | Creation Unix seconds. |
| content.data[].deleteAt | number | Deletion Unix seconds; usually -1 if not deleted. |
| content.data[].updateAt | number | Update Unix seconds; some modifications update only updator, so this value alone cannot determine whether profile data has changed. |
| content.data[].name | string | Display nickname. |
| content.data[].username | string | Admin console login name. |
| content.data[].email | string | Email; may be empty if not configured. |
| content.data[].mobile | string | Admin account mobile number displayed after decryption; empty if not set; there is no separate countryCode field. |
| content.data[].role | string | Admin console role identifier; the defined usages are admin/dev; dev is rejected by the standard admin console account/password login flow and must not be treated as an ordinary read-only role. |
| content.data[].resetPasswordAt | integer or null | Most recent password reset Unix seconds; creation snapshot may be null; the persisted initial value is usually -1, which triggers the standard admin console first-reset prompt. |
| content.data[].creatorAccount | string | Login name of the creator's admin account; usually empty if not found or if the identity is sys. |
| content.data[].enableMFA | boolean | MFA binding status; may be omitted if calculation fails, and a missing value should not be interpreted as false. |
| content.data[].isSuperAdministrator | boolean | true is returned only for the initial super administrator id=1; usually omitted for other accounts. |
| content.pageInfo | object | Pagination summary for this list query. |
| content.pageInfo.pageIndex | integer | Current page number. |
| content.pageInfo.pageSize | integer | Number of entries per page. |
| content.pageInfo.count | integer | Number of entries on this page. |
| content.pageInfo.totalCount | integer | Total number of non-deleted accounts that match the search criteria. |
{
"code": 200,
"content": {
"data": [
{
"id": 1001,
"uuid": "mact_example001",
"status": 0,
"creator": "sys",
"updator": "",
"createAt": 1785427200,
"deleteAt": -1,
"updateAt": -1,
"name": "Example Administrator",
"username": "api-doc-admin",
"email": "xxx@guance.com",
"mobile": "",
"role": "admin",
"resetPasswordAt": -1,
"creatorAccount": "",
"enableMFA": false
}
],
"pageInfo": {
"pageIndex": 1,
"pageSize": 20,
"count": 1,
"totalCount": 1
}
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}
Error Response¶
For authentication, rate limiting, and common request errors, see Common Error Definitions.
This table only guarantees business errors reachable from the current External SYS branch; self-protection errors for real standard admin console accounts are not directly copied. This endpoint only reads account profiles; ordinary unhandled exceptions are returned as ft.InternalServerError, and it does not create, modify, or delete accounts.
| HTTP Status | errorCode | Trigger Condition | Message or Response Description | Handling |
|---|---|---|---|---|
| 406 | ft.ParameterValidationFailed | Request field missing, or field value violates the declared validation conditions | Parameter parsing failed | Check the parameter location, field name, type, and value. |
| 500 | ft.InternalServerError | Database, cache, audit, or unhandled field exceptions | Internal error | Retain the traceId and query conditions, and check account data and service status; this endpoint is read-only, so you can retry with backoff. |