TrillaBit User Admin API's
User APIs
Create User
Method: POST
API Path: api.trillabit.com:8000/api/analytics/user
Fields
- userName → should be a valid email address associated with the user
- firstName
- lastName
- accountPhone (Optional)
- userID (Optional) : UUID → in case you want to use the userId from your system; otherwise, don’t pass it.
- roles: []
Request
{
"userID": "e20ede86-15b8-11ee-be56-0242ac120002",
"userName": "[email protected]",
"firstName": "John",
"lastName": "Smith",
"accountPhone": "321-321-3211",
"roles": ["Role1", "Role2"]
}
Response
{"membershipID": "11eff452-0000-0000-0000-0242ac120005", "userID": "11eff452-0000-0000-0000-0242ac120005"}
Update User
Method: PUT
API Path: api.trillabit.com:8000/api/analytics/user/userID
Request
{
"firstName": "First_name",
"lastName": "Last_name",
"accountPhone": "321-321-3211",
"roles": ["Role3", "Role2"]
}
Response
HTTP 200 OK
Remove User
This removes the user from the domain. It does not delete the actual user for data consistency reasons.
Method: PUT
API Path: api.trillabit.com:8000/api/analytics/membership/membershipID
/deactivate
Request
(No request body needed)
Response
HTTP 200 OK
List Users
List of users info for the account specified in the URL
Method: GET
API Path: api.trillabit.com:8000/api/analytics/external/accountID
/users?userName=userName
Note: userName is optional
Request
(No request body needed)
Response
[
{
"domainID": "b8c5bbd0-15b8-11ee-be56-0242ac120002",
"accountID": "fcf652e2-15b8-11ee-be56-0242ac120002",
"userID": "e20ede86-15b8-11ee-be56-0242ac120002",
"membershipID": "ef511428-15b9-11ee-be56-0242ac120002",
"accountMemberID": "f735ebf0-15b9-11ee-be56-0242ac120002",
"userName": "[email protected]",
"firstName": "John",
"lastName": "Smith",
"accountPhone": "234-1111-376",
"roles": [
{
"roleID": "fd1bdc14-15b9-11ee-be56-0242ac120002",
"roleName": "REGULAR",
"roleDescription": "REGULAR"
}
]
}
]
GET
Get User by Username
Getting user information by username
Method: GET
API Path: api.trillabit.com:8000/api/analytics/user?userName=user_name_value
Request
(No request body needed)
Response
{
"userID": "ef093434-0000-0000-0000-0650b52a338d",
"firstName": "user_first",
"lastName": "user_last",
"userName": "[email protected]",
"valid": true,
"active": true
}
Account APIs
Create Account
This will associate a user with an account.
Fields
- accountName
- accountDescription
- organizationKeyValue -> get this value from TrillaBit
- accountConfig -> you can set the theme to 'light' or 'dark'
- active -> should always be true
Method: PUT
Request
{
"accountName": "accountName",
"accountDescription": "accountDescription",
"organizationKeyValue": "2",
"accountConfig": "{ \"theme\": \"light\"}"
}
Response
The response is a guid of the new account that was created.
11eff3ef-0000-0000-0000-0242ac120005
Read Account
Method: GET
API Path: api.trillabit.com:8000/api/analytics/external/account/accountID
Request
(No request body needed)
Response
HTTP 200 OK
{
"accountID": "fcf652e2-15b8-11ee-be56-0242ac120002",
"accountName": "new_account_updated",
"accountDescription": "new_account_updated",
"organizationKeyValue": "-1"
}
Update Account
Method: PUT
API Path: api.trillabit.com:8000/api/analytics/account/accountID
Request
{
"accountName": "new_account_updated",
"accountDescription": "new_account_desc_upduated",
"organizationKeyValue": "200",
"accountConfig": "{ \"theme\": \"light\"}"
}
Response
HTTP 200 OK
Deactivate Account
Method: PUT
API Path: api.trillabit.com:8000/api/analytics/account/accountID
/deactivate
Request
(No request body needed)
Response
HTTP 200 OK
List Accounts
Method: GET
API Path: api.trillabit.com:8000/api/analytics/external/account
Request
(No request body needed)
Response
HTTP 200 OK
[
{
"accountID": "fcf652e2-15b8-0000-be56-0242ac120002",
"accountName": "Account 1",
"accountDescription": "new_account_updated",
"organizationKeyValue": "-1"
},
{
"accountID": "fcf652e2-0000-11ee-0000-0242ac120002",
"accountName": "Account 2",
"accountDescription": "new_account_updated",
"organizationKeyValue": "-1"
}
]
List Domain Users
This is all users that are not assigned to an account yet.
Method: GET
API Path: api.trillabit.com:8000/api/analytics/membership?row=1000&offset=0
Request
(No request body needed)
Response
[
{
"membershipID": "00000000-0000-0000-0000-000000000000",
"accountEmail": "[email protected]",
"accountPhone": "3213213211",
"user": {
"userID": "00000000-0000-0000-0000-000000000000",
"firstName": "first",
"lastName": "last",
"userName": null,
"valid": true,
"active": true
},
"roles": [
{
"roleID": "00000000-0000-0000-0000-000000000000",
"roleName": "REGULAR",
"roleDescription": "REGULAR",
"systemRole": true
}
],
"active": true
},
{
"membershipID": "00000000-0000-0000-0000-000000000000",
"accountEmail": "[email protected]",
"accountPhone": "3213213211",
"user": {
"userID": "00000000-0000-0000-0000-000000000000",
"firstName": "first",
"lastName": "last",
"userName": null,
"valid": true,
"active": true
},
"roles": [
{
"roleID": "00000000-0000-0000-0000-000000000000",
"roleName": "REGULAR",
"roleDescription": "REGULAR",
"systemRole": true
}
],
"active": true
}
]
Account Member APIs
These api's allow you to manage account members.
Assign User To Account
Method: POST
API Path: api.trillabit.com:8000/api/analytics/account/accountID
/accountMember
Fields
- membershipID → This comes from the user details when a user is created
Request
{
"membershipID": "fcf652e2-15b8-11ee-be56-0242ac120002"
}
Response
The response is a guid of the new accountMemberID that was created.
11eff3ef-0000-0000-0000-0242ac120005
Remove User from Account
Removes the user from the account by removing the account member.
Method: DELETE
API Path: api.trillabit.com:8000/api/analytics/account/accountID
/accountMember/accountMemberID
Request
(No request body needed)
Response
HTTP 200 OK
Get Accounts Available For User
A list of all the accounts that the user is a member of.
Method: GET
API Path: api.trillabit.com:8000/api/analytics/account/MemberDomainAccount?forUserID=userId
Request
(No request body needed)
Response
[
{
"accountID": "00000000-0000-0000-0000-000000000000",
"accountName": "Account 1",
"accountDescription": "description",
"domain": {
"domainID": "00000000-0000-0000-0000-000000000000",
"domainName": "Domain",
"contactInfo": null,
"servicePlanLevel": null,
"accounts": null,
"domainTypeName": "type",
"domainTypeID": "00000000-0000-0000-0000-000000000000",
"active": true
},
"accountConfig": "{\"theme\":\"dark\"}",
"organizationKeyValue": null,
"accountMember": {
"accountMemberID": "00000000-0000-0000-0000-000000000000",
"domainID": null,
"accountID": null,
"membershipID": null,
"account": null,
"accountMemberRoles": null,
"membership": null,
"lastLoginTime": 1723647551000,
"accountMemberConfig": null,
"active": true
},
"active": true
},
{
"accountID": "00000000-0000-0000-0000-000000000000",
"accountName": "Account 2",
"accountDescription": "description",
"domain": {
"domainID": "00000000-0000-0000-0000-000000000000",
"domainName": "Domain",
"contactInfo": null,
"servicePlanLevel": null,
"accounts": null,
"domainTypeName": "type",
"domainTypeID": "00000000-0000-0000-0000-000000000000",
"active": true
},
"accountConfig": "{\"theme\":\"dark\"}",
"organizationKeyValue": null,
"accountMember": {
"accountMemberID": "00000000-0000-0000-0000-000000000000",
"domainID": null,
"accountID": null,
"membershipID": null,
"account": null,
"accountMemberRoles": null,
"membership": null,
"lastLoginTime": 1723647551000,
"accountMemberConfig": null,
"active": true
},
"active": true
}
]
Accounts Available by Account Name
You can get account information by account name.
Method: GET
API Path: api.trillabit.com:8000/api/analytics/account/getAccountByName?accountName=account_name_value
Request
(No request body needed)
Response
{
"accountID": "11efe51f-0000-0000-0000-0242ac120005",
"accountDescription": "Test description",
"accountName": "AccountName",
"organizationKeyValue": "abc",
"accountConfig": "{\"theme\":\"light\"}"
}
User Roles
Create Role
Method: POST
API Path: api.trillabit.com:8000/api/analytics/account/accountID
/role
Request
{
"roleName": "role 1",
"roleDescription": "role 1 desc"
}
Response
The response is a guid of the new role that was created.
11eff3ef-0000-0000-0000-0242ac120005
Update Role
Method: PUT
API Path: api.trillabit.com:8000/api/analytics/account/accountID
/role/roleID
Request
{
"roleName": "role 1",
"roleDescription": "role 1 desc"
}
Response
HTTP 200 OK
Remove Role
Roles are not deleted but deactivated for consistency.
Method: PUT
API Path: api.trillabit.com:8000/api/analytics/account/accountID
/role/roleID
/deActivate
Request
(No request body needed)
Response
HTTP 200 OK
Get List of Roles
All the roles associated to an account.
Method: GET
API Path: api.trillabit.com:8000/api/analytics/account/accountID
/role
Request
(No request body needed)
Response
[
{
"roleID": "00000000-0000-0000-0000-000000000000",
"roleName": "ACCOUNT_ADMIN",
"roleDescription": "ACCOUNT_ADMIN",
"systemRole": true
},
{
"roleID": "00000000-0000-0000-0000-000000000000",
"roleName": "REGULAR",
"roleDescription": "REGULAR",
"systemRole": true
}
]
Get Role
Get role based on the role ID.
Method: GET
API Path: api.trillabit.com:8000/api/analytics/account/accountID
/role/roleID
Request
(No request body needed)
Response
{
"roleID": "00000000-0000-0000-0000-000000000000",
"roleName": "ACCOUNT_ADMIN",
"roleDescription": "ACCOUNT_ADMIN",
"systemRole": true
}
User Groups
Create User Group
Method: POST
API Path: api.trillabit.com:8000/api/analytics/useraccount/accountID
/UserGroup
Request
{"userGroupName": "gp1_new", "userGroupDescription": "gp1 descp_new"}
Response
The response is a guid of the new user group that was created.
11eff3ef-0000-0000-0000-0242ac120005
Update User Group
Method: PUT
API Path: api.trillabit.com:8000/api/analytics/useraccount/accountID
/UserGroup/userGroupID
Request
{"userGroupName": "gp1_new", "userGroupDescription": "gp1 descp_new"}
Response
HTTP 200 OK
Remove User Group
Method: DELETE
API Path: api.trillabit.com:8000/api/analytics/useraccount/accountID
/UserGroup/userGroupID
Request
(No request body needed)
Response
HTTP 200 OK
Get List of User Groups
User groups can be used for sharing dashboards and managing users.
Method: POST
API Path: api.trillabit.com:8000/api/analytics/useraccount/accountID
/UserGroup
Request
(No request body needed)
Response
[
{
"domainID": null,
"accountID": null,
"userGroupID": "00000000-0000-0000-0000-000000000000",
"userGroupName": "Admin",
"userGroupDescription": "Admin User Group",
"system": true
},
{
"domainID": null,
"accountID": null,
"userGroupID": "00000000-0000-0000-0000-000000000000",
"userGroupName": "Everyone",
"userGroupDescription": "Everyone User Group",
"system": true
}
]
Add User to User Group
Method: POST
API Path: api.trillabit.com:8000/api/analytics/useraccount/accountID
/UserGroupMember
Request
{
"userGroupID": "00000000-0000-5678-0000-000000000000",
"userID": "00000000-1234-0000-0000-000000000000"
}
Response
HTTP 200 OK
Remove User from User Group
Method: DELETE
API Path: api.trillabit.com:8000/api/analytics/useraccount/accountID
/UserGroupMember/groupMemberID
Request
{
"userGroupID": "00000000-0000-5678-0000-000000000000"
}
Response
HTTP 200 OK