GetUserInfo
This operation retrieves user information from Codeup.
Try it now
Test
RAM authorization
Request syntax
GET /users/current HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| organizationId |
string |
No |
The organization ID. You can obtain this string from the Alibaba Cloud DevOps URL, for example, Important This parameter is optional. If you do not specify an organization ID, the name field in the response contains the name from the user's personal settings. If you specify an organization ID, the field contains the user's name within that organization. |
61e54b0e0bb300d827e1ae27 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response data. |
||
| requestId |
string |
The request ID. |
F7B85D1B-D1C2-140F-A039-341859F130B9 |
| errorCode |
string |
The error code. |
SYSTEM_UNKNOWN_ERROR |
| errorMessage |
string |
The error message. |
"" |
| success |
boolean |
Indicates whether the request was successful. |
true |
| result |
object |
The returned data. |
|
| id |
integer |
The Codeup user ID. |
4205 |
| name |
string |
The display name of the user. This name corresponds to the user's name within the specified organization, or to their personal display name if no organization is specified. |
云效Codeup |
| username |
string |
The username. |
my-codeup-login-account |
|
string |
The user's email address. |
username@example.com |
|
| avatarUrl |
string |
The avatar URL. |
https://tcs-devops.aliyuncs.com/thumbnail/112afcb7a6a35c3f67f1bea827c4/w/100/h/100 |
Examples
Success response
JSON format
{
"requestId": "F7B85D1B-D1C2-140F-A039-341859F130B9",
"errorCode": "SYSTEM_UNKNOWN_ERROR",
"errorMessage": "\"\"",
"success": true,
"result": {
"id": 4205,
"name": "云效Codeup",
"username": "my-codeup-login-account",
"email": "username@example.com",
"avatarUrl": "https://tcs-devops.aliyuncs.com/thumbnail/112afcb7a6a35c3f67f1bea827c4/w/100/h/100"
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 403 | Forbidden.AccessDenied | The user is not authorized to perform the operation. | The user is not authorized to perform the operation. |
| 403 | Forbidden.UserNotInCurrentOrganization | The user is not in the organization and is not authorized to perform the operation. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.