Querying the User List
Function
This API is used to query the user list.
Constraints
null
URI
GET /api/v2/tenant/users
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
org_id |
Yes |
String |
Organization ID. The value can be null, which means querying all users. |
offset |
Yes |
Integer |
Page number. |
limit |
Yes |
Integer |
Number of data records on each page. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Authorization |
Yes |
String |
Authentication credential. The value is "Bearer {access_token}". access_token is obtained by calling the API for obtaining an access credential. |
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 |
Real name. |
mobile |
String |
Mobile number. |
|
String |
Email address. |
pwd_must_modify |
Boolean |
Whether the password must be changed upon the first login. |
pwd_change_at |
String |
Password change time. |
created_at |
String |
Creation time. |
updated_at |
String |
Last modification time. |
disabled |
Boolean |
Whether disabled. |
grade |
Integer |
Trust level. |
locked |
String |
Whether locked. |
extension |
Object |
Custom extended attribute. |
user_org_relation_list |
Array of UserOrgRelationListResult objects |
User organization relationship set. |
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 first 10 users for all organizations.
GET https://{domain_name}/api/v2/tenant/users?org_id=&offset=0&limit=10 Authorization: Bearer 334963fc-1e4a-473b-9096-52a929140...
Example Responses
Status code: 200
Request successful.
{ "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 successful. |
400 |
Invalid parameter. |
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