This API allows to list user information.
The user must be authenticated. Customer admin can list all users for the customer.
Request
A request with no fields will return the user's own information. For customer admin (?customerAdmin=true) all users for the customer will be listed.
Response
The response object has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
Array of Object |
Array of user objects. |
A regular user object has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
String |
User name. |
|
|
Array of Object |
Array of feature objects. |
|
|
String |
The api key. This field is only shown if feature |
|
|
String |
The creation time. Only available for customer admin ( |
|
|
String |
User name of person who created user. Only available for customer admin ( |
|
|
String |
The last changing time. Only available for customer admin ( |
|
|
String |
User name of last person who modified user. Only available for customer admin ( |
|
|
String |
The last login time. Only available for customer admin ( |
|
|
String |
The last time the user accessed an API. Only available for customer admin ( |
|
|
Integer |
The current user role id |
|
|
String |
The current user role name |
See /user/update for details about the feature object.
Examples
$ cx.py /user/read
{
"users": [
{
"username": "some.user@example.com",
"enabledFeatures": [
{
"feature": "apiKeyOwner",
"enabled": true
}
],
"apiKey": "api&user&tm/aBcDeFg123=="
}
]
}
$ cx.py /user/read?customerAdmin=true
{
"users": [
{
"username": "some.user@example.com",
"enabledFeatures": [
{
"feature": "apiKeyOwner",
"enabled": true
}
],
"createdTime": "2014-05-17T06:00:00.000Z",
"createdBy": "foo@bar.com",
"lastChangedAt": "2014-05-17T06:00:00.000Z",
"lastUpdatedBy": "foo@bar.com"
},
{
"username": "some.admin@example.com",
"enabledFeatures": [
{
"feature": "customerAdmin",
"enabled": true
}
],
"createdTime": "2019-11-25T16:21:58.029Z",
"createdBy": "foo@bar.com",
"lastChangedAt": "2019-11-26T16:22:58.029Z",
"lastUpdatedBy": "example@bar.com"
}
]
}