Get User
Get User
GET
/api/portal/v1/admin/getUser
Description
Return a single user by id, from any account on the instance.
Authentication
This endpoint requires a Bearer token in the Authorization header.
- Authorization:
Bearer <token>. A valid Portal API session token or API token belonging to an administrator.
Query Parameters
- id: The
idof the user to retrieve. Must be a positive integer.
Response Schema
The endpoint returns a single user record.
id: The unique identifier for the user.accountId: Theidof the account the user belongs to.email: The user’s email address, which doubles as their login username.isAdmin:trueif the user has administrator privileges, otherwisefalse.createdAt: Timestamp when the user was created, in milliseconds since unix epoch.modifiedAt: Timestamp when the user record was last modified, in milliseconds since unix epoch.
Error Responses
- 400 Bad Request: The
idquery parameter is missing or is not a positive integer. - 401 Unauthorized: The
Authorizationheader is missing or the token is not valid. - 403 Forbidden: The authenticated user is not an administrator.
- 404 Not Found: No user exists with the given
id.
Example Request
GET https://<your-host>:9909/api/portal/v1/admin/getUser?id=7
Authorization: Bearer <token>
Example Response
Status Code: 200 OK
Response Body:
{
"id": 7,
"accountId": 42,
"email": "example@zydromarine.com",
"isAdmin": false,
"createdAt": 1736942400000,
"modifiedAt": 1736942400000
}