Get User By ID API
Retrieve user details by unique ID
Users
Get User By ID API
Retrieve detailed information about a specific user using their unique ID. Access complete account details and settings.
ID Lookup
Find by user ID.
User Details
Complete profile.
Access Rights
Role and status.
Endpoint Overview
QUERY
/graphqlRetrieve user details by their unique ID.
Authentication:Bearer Token
Required scopes:admin
Request Parameters
idInt!RequiredThe unique identifier of the user to retrieve.
GraphQL Query
query getUserById($id: Int!) {
getUserById(id: $id) {
id
email
username
resellerId
role
enabled
radAccess
radAccessClear
createdAt
updatedAt
}
}Variables:
{
"id": 123
}HTTP Request:
curl -X POST https://api.orbnet.com/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"query": "query getUserById($id: Int!) { getUserById(id: $id) { id email username role enabled createdAt } }",
"variables": { "id": 123 }
}'Response
200User Retrieved Successfully
{
"data": {
"getUserById": {
"id": 123,
"email": "user@example.com",
"username": "johndoe",
"resellerId": 45,
"role": "user",
"enabled": true,
"radAccess": true,
"radAccessClear": false,
"createdAt": "2023-01-01T12:00:00Z",
"updatedAt": "2024-01-01T12:00:00Z"
}
}
}404User Not Found
{
"errors": [
{
"message": "User not found",
"path": ["getUserById"],
"extensions": {
"code": "NOT_FOUND"
}
}
],
"data": null
}Response Fields
idInt!Unique identifier for the user.
emailString!User's email address.
usernameString!User's username.
resellerIdIntID of the associated reseller.
roleString!User's role.
enabledBoolean!Whether the account is enabled.
radAccessBoolean!Whether RADIUS access is enabled.
radAccessClearBoolean!Whether RADIUS uses cleartext.
createdAtDateTime!Account creation timestamp.
updatedAtDateTime!Last update timestamp.
Related Endpoints
Sensitive Data
This endpoint returns sensitive user information. Ensure proper access controls are in place.
Edit User
Update this user's information.