Last updated on July 29, 2025
About the Rublon Admin API
Do This Before You Start Calling the Admin API
How to Get the userId?
https://admin.rublon.net/users/e3g6h604huo2ee5
You can also use the GET api/admin/users endpoint. This way requires you to first fetch all or some users and then programmatically get the value of “id” of each or selected user.
How to Get the groupId?
https://admin.rublon.net/groups/k98qfb3d9d3adoo0fe64
Listing Users Whose Username Contains a String
GET https://core.rublon.net/api/admin/users
With body:
{
"perPage": 30,
"sortBy": {
"sortField": "createdAt",
"sortOrder": "desc"
},
"filterBy": {
"search": "a"
}
}
{
"status": "OK",
"result": {
"data": [
{
"id": "e3g6h604huo2ee5",
"email": "john_smith@rublon.com",
"username": "john_smith",
"name": "John Smith",
"status": "active",
"groups": []
}
],
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://core.rublon.net/api/admin/users",
"per_page": 30,
"to": 1,
"total": 1
}
}
}
Listing Users With Emails In a Specific Domain
GET https://core.rublon.net/api/admin/users
With body:
{
"perPage": 30,
"sortBy": {
"sortField": "createdAt",
"sortOrder": "desc"
},
"filterBy": {
"search": "rublon.com"
}
}
In this example, “rublon.com” is the specific email domain you are looking for. The API will return a list of all users whose email domain is “rublon.com”. This way, you can manage users more effectively based on their email domain.
Here’s a successful response, where the Admin API found and returned two users whose emails are in the “rublon.com” domain.
{
"status": "OK",
"result": {
"data": [
{
"id": "e3g6h604huo2ee5",
"email": "john_smith@rublon.com",
"username": "john_smith",
"name": "John Smith",
"status": "active",
"groups": []
},
{
"id": "j7k5l708goe4kl2",
"email": "alice_welles@rublon.com",
"username": "alice_welles",
"name": "Alice Welles",
"status": "active",
"groups": [
{
"id": "h26120d29gac7fe653f81",
"name": "VPN Users",
"status": "active",
"description": null
},
{
"id": "mr885a172ae0f78t3072",
"name": "Windows Users",
"status": "active",
"description": null
}
]
}
],
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://core.rublon.net/api/admin/users",
"per_page": 30,
"to": 2,
"total": 2
}
}
}
Getting a Specific User
You might want to get a specific user. You can do this if you know this user’s userId. If you do not know how to get this value, refer to How to Get the userId.
The Rublon Admin API provides a simple way to get a specific user with the GET api/admin/users/{userId} endpoint.
Here’s an example of how to get a user whose userId is e3g6h604huo2ee5:
GET https://core.rublon.net/api/admin/users/e3g6h604huo2ee5
A successful response looks like this:
{
"status": "OK",
"result": {
"id": "e3g6h604huo2ee5",
"email": "john_smith@rublon.com",
"username": "john_smith",
"name": "John Smith",
"status": "active",
"groups": []
}
}
If there is no user with such userId, you will receive the following response:
{
"status": "ERROR",
"code": 400,
"result": {
"exception": "UserNotFoundException",
"code": 40,
"errorMessage": "User not found.",
"details": null
}
}
Creating a User and Assigning Them to Two Groups
POST https://core.rublon.net/api/admin/users
{
"email": "mike_townsend@rublon.com",
"username": "mike_townsend",
"name": "Mike Townsend",
"status": "active",
"groups": ["h26120d29gac7fe653f81", "mr885a172ae0f78t3072"]
}
In this example, a user with the username “mike_townsend” and email “mike_townsend@rublon.com” is created. This user’s status is set to Active. Finally, this user is assigned to groups “VPN Users” and “Windows Users”.
Creating a user and immediately assigning them to a group can save you a lot of time and effort in user management.
Changing User Email and Username
Updating user information is another common task in user management. Whether it’s changing a user’s name, email, or other information, the Rublon Admin API makes it easy with the PUT api/admin/users/{userId} endpoint. You can do this if you know this user’s userId. If you do not know how to get this value, refer to How to Get the userId.
Here’s an example of how you can change the user email and username.
Use endpoint:
PUT https://core.rublon.net/api/admin/users/{userId}
With body:
{
"email": "michael_townsend@rublon.com",
"username": "michael_townsend",
"name": "Michael Townsend"
}
Assigning an Existing User to a Group
PUT https://core.rublon.net/api/admin/users/{userId}
{
"groups": ["f67efb3d9i6goww0fe64"]
}
IMPORTANT
Deleting a User
DELETE https://core.rublon.net/api/admin/users/e3g6h604huo2ee5
Listing All Aliases of a User
GET https://core.rublon.net/api/admin/users/e3g6h604huo2ee5/aliases
{
"status": "OK",
"result": {
"data": [
{
"id": "03fc2bd0206972a642b0",
"name": "bob_smith",
"number": 1
},
{
"id": "f681c60cf062430aa2fd",
"name": "bob_rublon",
"number": 2
}
],
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://core.rublon.net/api/admin/users/e3g6h604huo2ee5/aliases",
"per_page": 20,
"to": 2,
"total": 2
}
}
}
{
"status": "OK",
"result": {
"data": [],
"meta": {
"current_page": 1,
"from": null,
"last_page": 1,
"path": "https://core.rublon.net/api/admin/users/4a06865ba0b3987/aliases",
"per_page": 20,
"to": null,
"total": 0
}
}
}
If there is no user with such userId, you will receive the following response:
{
"status": "ERROR",
"code": 400,
"result": {
"exception": "UserNotFoundException",
"code": 40,
"errorMessage": "User not found.",
"details": null
}
}
Adding a New Alias for a User
Adding a new user alias for a user is an essential part of user management. The Rublon Admin API provides a simple way to do this with the POST api/admin/users/{userId}/aliases endpoint.
Here’s how you can assign a new alias to a user.
POST https://core.rublon.net/api/admin/users/{userId}/aliases
{
"name": "john_example",
"number": 2
}
- name is the username alias
- number is the number of the alias of that user (each user can have up to 9 aliases)
Note
Changing Name of Existing Alias
PUT https://core.rublon.net/api/admin/aliases/f681c60cf005530aa2fd
{
"name": "john_smith",
"number": 5
}
Deleting an Alias
DELETE https://core.rublon.net/api/admin/aliases/f681c60cf005530aa2fd
Listing Audit Logs
GET api/admin/logs/audit
{
"perPage": 100,
"sortBy": {
"sortField": "createdAt",
"sortOrder": "asc"
},
"filterBy": {
"from": "2024-08-01 10:00:00",
"to": "2030-09-01 10:00:00",
"event": "Administrator.Authentication.Success",
"search": "bob@rublon.com"
}
}
(This example is meant to show all available parameters. Feel free to remove some of these sorting and filtering parameters if you do not need them.)
Where:
- perPage is the number of audit logs per page
- “sortBy[sortField]”: “createdAt” denotes that audit logs should be sorted by the time of creation
- “sortBy[sortOrder]”: “asc” denotes that audit logs should be sorted in ascending order
- “filterBy[from]”: “2024-08-01 10:00:00” denotes that only audit logs past this datetime should be returned
- “filterBy[to]”: “2030-09-01 10:00:00” denotes that only audit logs up to this datetime should be returned
- “filterBy[event]”: “Administrator.Authentication.Success” denotes that only audit logs of this specific event type should be returned.
- You can use a pattern. The percentage sign (%) is a wildcard that means any one or more characters. For example, System.% is a pattern that lists all events that start with “System.”
- “filterBy[search]”: “bob@rublon.com” denotes that only audit logs with this specific string should be returned
After you execute the preceding, you will receive a response with audit logs. However, if there are more than 100 audit logs in your organization fitting the criteria, you will find next_cursor at the end of the response. You can insert this value in your next request’s body to fetch another 100 audit logs:
{
<other params>
"cursor":"eyJjcmVhdGVkX2F0IjoeMjAyNC0wMy0yOCAxMTo0MTo0NQPsIl9wb2ludHNUb05leHRJdGVtcyI6dKI1ZX0"
}
Listing Authentication Logs
If you want to fetch Authentication Logs, you can do it using the GET api/admin/logs/authentication endpoint.
GET api/admin/logs/authentication
With body:
{
"perPage": 100,
"sortBy": {
"sortBy[sortField]": "createdAt",
"sortBy[sortOrder]": "asc"
},
"filterBy": {
"from": "2024-08-01 10:00:00",
"to": "2030-09-01 10:00:00",
"status": ["granted"],
"method": ["push", "yotp"],
"aid": "e460e341f2e8275e73c3",
"uid": "806fe8195fd891f",
"search": "Chrome"
}
}
(This example is meant to show all available parameters. Feel free to remove some of these sorting and filtering parameters if you do not need them.)
Where:
- perPage is the number of authentication logs per page
- “sortBy[sortField]”: “createdAt” denotes that authentication logs should be sorted by the time of creation
- “sortBy[sortOrder]”: “asc” denotes that authentication logs should be sorted in ascending order
- “filterBy[from]”: “2024-08-01 10:00:00” denotes that only authentication logs past this datetime should be returned
- “filterBy[to]”: “2030-09-01 10:00:00” denotes that only authentication logs up to this datetime should be returned
- “filterBy[status]”: “granted” denotes that only authentication logs with this specific status should be returned. Possible statuses:
- bypassed
- denied
- granted
- “filterBy[method]”: [“push”, “yotp”] denotes that only authentication logs associated with these methods should be returned. Possible method values, along with descriptions, are:
- email – Email Link
- push – Mobile Push
- qrcode – QR Code
- totp – Rublon Authenticator’s Passcode
- tpa – Third-Party App’s Passcode
- bypassCode – Bypass Code
- sms – SMS Passcode
- webauthn – WebAuthn/U2F Security Key
- trustedDevice – Remembered Device
- yotp – YubiKey OTP
- smsLink – SMS Link
- phoneCall – Phone Call
- “filterBy[aid]”: “e460e341f2e8275e73c3” denotes that only authentication logs associated with the given application ID should be returned
- “filterBy[uid]”: “806fe8195fd891f” denotes that only authentication logs associated with the given user ID should be returned
- “filterBy[search]”: “Chrome” denotes that only authentication logs associated with the given browser name should be returned. You can search through the following fields:
- application.name
- device.userAgent
- device.browserName
- device.browserVersion
- device.osName
- device.location.ip
- device.location.country
- device.location.city
- user.email
- user.username
After you execute the preceding, you will receive a response with authentication logs. However, if there are more than 100 authentication logs in your organization, you will find next_cursor at the end of the response. You can insert this value in your next request’s body to fetch another 100 authentication logs:
{
<other params>
"cursor":"eyJjcmVhdGVkX2F0IjoeMjAyNC0wMy0yOCAxMTo0MTo0NQPsIl9wb2ludHNUb05leHRJdGVtcyI6dKI1ZX0"
}
Listing Phone Logs
If you want to fetch Phone Logs, you can do it using the GET api/admin/logs/phone endpoint.
Use endpoint:
GET api/admin/logs/phone
With body:
{
"perPage": 100,
"sortBy": {
"sortBy[sortField]": "createdAt",
"sortBy[sortOrder]": "asc"
},
"filterBy": {
"from": "2024-08-01 10:00:00",
"to": "2030-09-01 10:00:00",
"method": ["sms", "smsLink"],
"search": "WordPress"
}
}
(This example is meant to show all available parameters. Feel free to remove some of these sorting and filtering parameters if you do not need them.)
Where:
- perPage is the number of phone logs per page
- “sortBy[sortField]”: “createdAt” denotes that phone logs should be sorted by the time of creation
- “sortBy[sortOrder]”: “asc” denotes that phone logs should be sorted in ascending order
- “filterBy[from]”: “2024-08-01 10:00:00” denotes that only phone logs past this datetime should be returned
- “filterBy[to]”: “2030-09-01 10:00:00” denotes that only phone logs up to this datetime should be returned
- “filterBy[method]”: [“push”, “yotp”] denotes that only phone logs associated with these methods should be returned. Possible method values, along with descriptions, are:
- sms – SMS Passcode
- smsLink – SMS Link
- phoneCall – Phone Call
- “filterBy[search]”: “Chrome” denotes that only phone logs associated with the given application should be returned. You can search through the following fields:
- application.name
- context
- number
- status
- user.username
After you execute the preceding, you will receive a response with phone logs. However, if there are more than 100 phone logs in your organization, you will find next_cursor at the end of the response. You can insert this value in your next request’s body to fetch another 100 phone logs:
{
<other params>
"cursor":"eyJjcmVhdGVkX2F0IjoeMjAyNC0wMy0yOCAxMTo0MTo0NQPsIl9wb2ludHNUb05leHRJdGVtcyI6dKI1ZX0"
}