Querying the User List
Function
This API is used to query users.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.
URI
GET /v1/csms/users
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
org_id |
No |
String |
Organization ID. If this parameter is left empty, all users are queried. |
|
offset |
Yes |
Integer |
Page number. Minimum value: 0. |
|
limit |
Yes |
Integer |
Number of data records on each page. Minimum value: 10. Maximum value: 100. |
|
user_info |
No |
String |
Username, which can contain at most 64 characters. Fuzzy search is supported. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API. The token is the value of X-Subject-Token in the response header. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
total |
Long |
Total number of users. |
|
users |
Array of UsersDetailsResult objects |
User list. |
|
Parameter |
Type |
Description |
|---|---|---|
|
user_id |
String |
User ID. |
|
org_id |
String |
Organization to which the user belongs. |
|
user_name |
String |
Username. |
|
name |
String |
Name. |
|
mobile |
String |
Mobile number. |
|
|
String |
Email address. |
|
pwd_must_modify |
Boolean |
Whether the password must be changed upon first login. |
|
pwd_change_at |
String |
Password change time. |
|
created_at |
String |
Creation time. |
|
updated_at |
String |
Last modification time. |
|
disabled |
String |
Disabled or not. |
|
grade |
String |
Trust level. |
|
locked |
String |
Locked or not. |
|
extension |
String |
Custom extended attribute. |
|
user_org_relation_list |
Array of UserOrgRelationListResult objects |
Relationships between users and organizations. |
|
Parameter |
Type |
Description |
|---|---|---|
|
org_id |
String |
Organization ID. |
|
relation_type |
String |
Relationship type. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error details. |
Example Requests
Query the user list of the first 10 organizations.
/api/v1/tenant/users?org_id=&offset=0&limit=10
Example Responses
Status code: 200
Request succeeded.
{
"total" : 1,
"users" : [ {
"extension" : { },
"user_name" : "zhangsan",
"mobile" : "12345678901",
"created_at" : "2022-03-31 16:46:02.964",
"pwd_must_modify" : false,
"updated_at" : "2022-03-31 16:48:44.073",
"user_id" : "20220331164602949-904C-D475B60AE",
"org_id" : "20220331135144180-0FA5-EE3B69068",
"grade" : 1,
"name" : "zhangsan",
"disabled" : false,
"pwd_change_at" : "2022-03-31 16:47:51.481",
"locked" : false,
"user_org_relation_list" : [ {
"org_id" : "20220331135144180-0FA5-EE3B69068",
"relation_type" : 1
}, {
"org_id" : "20220415103506608-AF59-5CC9081B9",
"relation_type" : 0
} ]
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Request succeeded. |
|
400 |
Request failed. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot