- b2evolution CMS User Manual
- Advanced Topics
- Using the APIs
- REST API or RESTful API
- Retrieve a User (REST)
Retrieve a User (REST)
GET <baseurl>/api/v1/users/<id>
This is the API equivalent of disp = user.
Response
Name |
Type |
Description |
||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer |
User ID |
||||||||||||||||||||||||||||||||||||||||||||||
picture |
string |
URL of main user profile picture |
||||||||||||||||||||||||||||||||||||||||||||||
pictures |
array |
Array of URLs of other user profile pictures |
||||||||||||||||||||||||||||||||||||||||||||||
login |
string |
Login |
||||||||||||||||||||||||||||||||||||||||||||||
firstname |
string |
First name |
||||||||||||||||||||||||||||||||||||||||||||||
lastname |
string |
Last name |
||||||||||||||||||||||||||||||||||||||||||||||
gender |
string/null |
|
||||||||||||||||||||||||||||||||||||||||||||||
location |
array |
|
||||||||||||||||||||||||||||||||||||||||||||||
organizations |
array |
Array of user organizations, each array item is array:
|
||||||||||||||||||||||||||||||||||||||||||||||
userfields |
array |
Array of userfields, each array item is a grouped array with key as userfield group name:
|
Errors
Error code |
HTTP response |
Message |
---|---|---|
no_access |
403 |
You must log in to view this user profile. |
no_access |
403 |
You must activate your account before you can view this user profile. |
no_access |
403 |
Your account status currently does not permit to view this user profile. |
no_access |
403 |
The requested user does not exist! |
no_access |
403 |
The requested user account is closed! |
no_access |
403 |
Please specify your country before attempting to contact other users. |
no_access |
403 |
You don’t have permission to view this user profile. |
user_invalid_id |
404 |
Invalid user ID |