Skip to content

List



GET /api/v1/workspace/{workspace_uuid}/member/list

Overview

Paginate through a Workspace's enabled members and their direct and inherited roles.

Prerequisites and Usage Steps

Requires External credentials with r or w permissions. The list includes direct members and members inherited from backend groups. It returns only accounts with status=0 whose nameSpace is empty or is in an SSO namespace configured for the Workspace. Accounts that are disabled, deleted, or have a mismatched SSO namespace are not displayed; do not conclude that the relationship no longer exists solely because it cannot be found. Returned roles include direct roles in roles, roles inherited from backend groups in mgroups, and roles inherited from teams in member_group; inherited roles are not targets for direct role replacement. Sorted in ascending order by the account's global name, not by join time; search matches the global nickname, email, and Workspace nickname at the same time, but this response structure has no separate acntWsNickname field. Pagination information is in content.pageInfo; when there are no results, data=[]; an incorrect Workspace UUID may also produce an empty list, so confirm the target Workspace first.

Path Parameters

Parameter Name Type Required Description
workspace_uuid string Y Target Workspace UUID; confirm its active status and site first.
Example: wksp_example001
How to obtain or enter: Obtain from content.data[].uuid in the Workspace List and verify the Workspace name.

Request Headers

Parameter Name Type Required Description
X-Df-SVersion string Signature version for the original path and request body; do not omit it and continue using the algorithm on this page.
Example: v20240417
How to obtain or enter: The example on this page uses this fixed version, which matches the example signature algorithm.
X-Df-Access-Key string Y Read endpoints can use r or w credentials; write endpoints require w credentials.
Example: <external-access-key>
How to obtain or enter: Assigned by the site administrator as an External API AK; do not use a Workspace OpenAPI Key.
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 enter: Compute 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 timestamp.
Example: 1785427200
How to obtain or enter: When sending, use str(int(time.time())) to generate the current Unix seconds string.
X-Df-Nonce string Y Temporary nonce; generate a new value and recompute the signature even when retrying after a failure.
Example: 97d275ee9f774315a7885ba7347acbd9
How to obtain or enter: Generate uuid.uuid4().hex anew for each request.

Query Parameters

Parameter Name Type Required Description
search string Optional; after trimming leading and trailing whitespace, performs a contains match; omit it or leave it blank to skip filtering. Does not search username.
Allow null: False
Example: 示例成员
How to obtain or enter: Enter a keyword from the member's global nickname, email, or Workspace nickname.
pageIndex integer Optional; defaults to 1, minimum 1.
Allow null: False
$minValue: 1
Example: 1
How to obtain or enter: Starts at 1; use content.pageInfo to read subsequent pages sequentially.
pageSize integer Optional; defaults to 10, maximum 100.
Allow null: False
$minValue: 1
$maxValue: 100
Example: 10
How to obtain or enter: Choose from 1 to 100 depending on the client display.

Additional Parameter Notes

For authentication, see External API Signature Authentication. The example on this page uses v20240417, which matches the signature algorithm for the original full path, Query, and request body. This module operates on member relationships or roles in the specified Workspace and does not create accounts themselves. After a write request fails, first verify the current members and roles, then decide whether to retry. The member list does not include the password, mobile, or mfaSecret fields; on-call contact information is returned in separate fields. Do not treat this list as the complete account list for the site.

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/workspace/wksp_example001/member/list'
query = {'search': '示例成员', 'pageIndex': 1, 'pageSize': 10}
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:
    print("HTTP", error.code, error.read().decode("utf-8"))  # Process according to errorCode, content, and traceId; do not output AK/SK.
    raise SystemExit(1)
except (URLError, TimeoutError):
    print('读取失败,可退避后重新签名重试,保留traceId及查询条件。')
    raise SystemExit(1)
print(json.dumps(payload, ensure_ascii=False, indent=2))

Response

HTTP 200, application/json uniform envelope; business data is located in content; External is not automatically added to declaration, and list pagination remains in content.pageInfo.

Field Type Description
content.data Array of objects Enabled members on the current page; an empty array when there are no results.
content.data[].id integer Account record sequence number within the site; returned for reference only; use uuid when calling other endpoints.
content.data[].uuid string Account UUID; use this field for subsequent queries, modifications, disabling, and deletion.
content.data[].status integer This list returns only enabled accounts with status=0.
content.data[].creator string Identity identifier of the creator; External-created accounts are usually SYS.
content.data[].updator string Identity identifier of the last modifier; may be empty if there are no modifications yet.
content.data[].createAt number Creation time, in Unix seconds.
content.data[].updateAt number Update time, in Unix seconds; may be -1 if there is no update time yet.
content.data[].deleteAt number Status operation time field, usually -1 initially; enabling/disabling also writes this value, so do not use it alone to determine deletion; use status.
content.data[].name string Display nickname.
content.data[].username string Login account name. Third-party accounts may have it empty or duplicate it with other accounts.
content.data[].email string Account contact email; if empty at creation and username is in email format, it is populated from username.
content.data[].countryCode string Country/region calling code for the mobile number as a numeric string, such as 86; empty string if not set.
content.data[].exterId string Unique ID in the third-party identity system; usually empty for local accounts.
content.data[].extend object or null Existing account extension data, which may contain the user_icon avatar URL; this endpoint only reads it and does not update it through member relationship parameters.
content.data[].extend.user_icon string Optional avatar URL or static resource file name; may appear when reading historical data and is not a writable parameter on this page.
content.data[].source string Identity source identifier, such as local, unknown, oidc, or ldap; historical internal sources such as agent may also exist.
content.data[].nameSpace string Identity namespace; empty by default for External-created accounts and cannot be set through public parameters in this module.
content.data[].isUsed integer or boolean Flag indicating whether the account has been used.
content.data[].agreeTerms integer Terms acceptance flag.
content.data[].canaryPublic boolean Canary flag.
content.data[].enableMFA boolean Whether MFA is enabled.
content.data[].language string Language identifier: zh, en, zh-hant, id, ja, ko.
content.data[].tokenHoldTime integer Account idle session duration in seconds; new accounts are initialized according to the site's secure session configuration and are not guaranteed to be fixed to the example value.
content.data[].tokenMaxValidDuration integer Maximum account session validity period in seconds; new accounts are initialized according to the site's secure session configuration.
content.data[].timezone string Time zone identifier; empty if not set.
content.data[].attributes object SSO-synchronized attribute KV object; may be overwritten by subsequent SSO logins; keys and values are agreed upon by the integrating party.
content.data[].attributes.{attribute name} Any JSON value Custom attribute value; strings are recommended, for example department=R&D.
content.data[].customAttributes object Business-maintained attribute KV object.
content.data[].customAttributes.{attribute name} Any JSON value Business-defined custom value; strings are recommended, for example costCenter=CC-1001.
content.data[].statusPageSubs integer Status page subscription flag.
content.data[].defaultWorkspace string Default Workspace UUID for the account; empty if not configured.
content.data[].brandKey string Current brand identifier for the account, determined by the set of brands allowed for the site.
content.data[].scheduleMobile string Local on-call dedicated mobile number; empty if not set.
content.data[].scheduleEmail string On-call dedicated email; empty if not set.
content.data[].ifScheduleMobileEnable boolean Whether the on-call mobile number is enabled.
content.data[].ifScheduleEmailEnable boolean Whether the on-call email is enabled.
content.data[].accountStatus string Additional account status identifier; empty if not set.
content.data[].roles Array of objects Summary of roles directly assigned to the account in this Workspace; inherited roles are in mgroups/member_group respectively.
content.data[].roles[].uuid string Role UUID or built-in role identifier.
content.data[].roles[].name string Role display name.
content.data[].enablePersonalAPIKey integer Whether personal API Key is allowed, 1 for allowed and 0 for not allowed; calculated from the Owner/administrator role and custom configuration, including inherited roles.
content.data[].mgroups Array of objects Workspace roles granted by backend groups in the management console.
content.data[].mgroups[].uuid string Backend group UUID, usually with the mgroup_ prefix.
content.data[].mgroups[].name string Backend group name.
content.data[].mgroups[].roles Array of objects Roles inherited through this backend group.
content.data[].mgroups[].roles[].uuid string Role UUID or built-in role identifier.
content.data[].mgroups[].roles[].name string Role display name.
content.data[].member_group Array of objects Teams in this Workspace to which the account belongs and the roles associated with the teams.
content.data[].member_group[].uuid string Workspace team UUID, usually with the group_ prefix.
content.data[].member_group[].name string Team name.
content.data[].member_group[].roles Array of objects Summary of roles inherited through this team.
content.data[].member_group[].roles[].uuid string Role UUID or built-in role identifier.
content.data[].member_group[].roles[].name string Role display name.
content.data[].userType string saml when nameSpace is not empty, otherwise common; this field is not the same as source and cannot be used to determine all third-party account types.
content.data[].userIconUrl string or null Avatar URL; null if there is no avatar.
content.pageInfo.pageIndex integer Current page number.
content.pageInfo.pageSize integer Number per page.
content.pageInfo.count integer Number of records selected on this page.
content.pageInfo.totalCount integer Total number of records matching the filter criteria.
{
  "code": 200,
  "content": {
    "data": [
      {
        "id": 1001,
        "uuid": "acnt_example001",
        "status": 0,
        "creator": "SYS",
        "updator": "",
        "createAt": 1785427200,
        "deleteAt": -1,
        "updateAt": -1,
        "name": "示例成员",
        "username": "xxx@guance.com",
        "email": "xxx@guance.com",
        "countryCode": "",
        "exterId": "",
        "extend": null,
        "source": "local",
        "nameSpace": "",
        "isUsed": 0,
        "agreeTerms": 0,
        "canaryPublic": false,
        "enableMFA": false,
        "language": "zh",
        "tokenHoldTime": 86400,
        "tokenMaxValidDuration": 604800,
        "timezone": "",
        "attributes": {
          "部门": "研发部"
        },
        "customAttributes": {
          "costCenter": "CC-1001"
        },
        "statusPageSubs": 0,
        "defaultWorkspace": "",
        "brandKey": "guance",
        "scheduleMobile": "",
        "scheduleEmail": "",
        "ifScheduleMobileEnable": false,
        "ifScheduleEmailEnable": false,
        "accountStatus": "",
        "roles": [
          {
            "uuid": "general",
            "name": "普通成员"
          }
        ],
        "enablePersonalAPIKey": 0,
        "mgroups": [],
        "member_group": [],
        "userType": "common",
        "userIconUrl": null
      }
    ],
    "pageInfo": {
      "pageIndex": 1,
      "pageSize": 10,
      "count": 1,
      "totalCount": 1
    }
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

When no members match:

{
  "code": 200,
  "content": {
    "data": [],
    "pageInfo": {
      "pageIndex": 1,
      "pageSize": 10,
      "count": 0,
      "totalCount": 0
    }
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Response

For authentication, rate limiting, and common request errors, see Common Error Definitions.

The following table lists verified business and request errors. Ordinary database/downstream 5xx errors or unhandled exceptions are globally wrapped as ft.InternalServerError; a failed write request is not guaranteed to have had no partial effect, so verify the current relationship state first.

HTTP Status errorCode Trigger Condition Message or Response Description Resolution
406 ft.ParameterValidationFailed Request field is missing, or the field value violates the declared validation conditions Parameter parsing failed Check the parameter location, field name, type, and value.
500 ft.InternalServerError Database, cache, cancellation of an old approval task, or an unhandled array/field exception Internal error Save the traceId and ask the administrator to check the actual relationships and cache; a write operation may have been partially committed and should not be blindly replayed.

Feedback

Is this page helpful?