Account Management APIs
Get My Account Model (GET)
Returns account model for the current user.
Route
|
URI |
/api/v1/home/myaccountmodel |
|
Method |
GET |
|
Result |
JSON – AccountModel |
Parameters
None
Example
GET http://localhost/api/v1/home/myaccountmodel
{
"$type": "libExternalInterface.model.AccountModel, libExternalInterface",
"resourceTypeGuid": "00000000-0000-0000-0000-000000000000",
"serializedAccountId": null,
"uriKey": "guid://lab.protected-networks.local/ad/",
"displayName": "Admin ",
"provider": {
"$type": "libExternalInterface.model.TechnologyProvider, libExternalInterface",
"technologyKey": "ad",
"technologyDisplayName": "Active Directory",
"providerName": "lab.protected.local"
},
"isGroup": false,
"sid": "",
"guid": "",
"typeId": 11100
}
Get Account (GET)
Returns account information.
Route
|
URI |
/api/v1/home/getAccount |
|
Method |
GET |
|
Result |
JSON – AccountModel |
Parameters
Query parameters for account identification.
Example
GET http://localhost/api/v1/home/getAccount?accountId=guid
{
"$type": "libExternalInterface.model.AccountModel, libExternalInterface",
"resourceTypeGuid": "00000000-0000-0000-0000-000000000000",
"serializedAccountId": null,
"uriKey": "guid://lab.protected-networks.local/ad/",
"displayName": "Admin ",
"provider": {
"$type": "libExternalInterface.model.TechnologyProvider, libExternalInterface",
"technologyKey": "ad",
"technologyDisplayName": "Active Directory",
"providerName": "lab.protected.local"
},
"isGroup": false,
"sid": "",
"guid": "",
"typeId": 11100
}
Get All Accounts For Provider (GET)
Returns all accounts for a specific provider.
Route
|
URI |
/api/v1/account/all |
|
Method |
GET |
|
Result |
JSON – Array of AccountModel |
Parameters
Query parameters for provider identification.
Example
GET http://localhost/api/v1/account/all?provider=AD
[
{
"$type": "libExternalInterface.model.AccountModel, libExternalInterface",
"resourceTypeGuid": "00000000-0000-0000-0000-000000000000",
"serializedAccountId": null,
"uriKey": "guid://lab.protected-networks.local/ad/",
"displayName": "Admin ",
"provider": {
"$type": "libExternalInterface.model.TechnologyProvider, libExternalInterface",
"technologyKey": "ad",
"technologyDisplayName": "Active Directory",
"providerName": "lab.protected.local"
},
"isGroup": false,
"sid": "",
"guid": "",
"typeId": 11100
}
]
Get Account With Relations (GET)
Returns account information with parent relationships.
Route
|
URI |
/api/v1/account/parents |
|
Method |
GET |
|
Result |
JSON – AccountWithRelationsModel |
Parameters
Query parameters for account identification.
Example
GET http://localhost/api/v1/account/parents?accountId=guid
Get Accounts By URI Key (GET)
Returns accounts by their URI keys.
Route
|
URI |
/api/v1/account/AccountRead/GetAccounts |
|
Method |
GET |
|
Result |
JSON – Array of AccountModel |
Parameters
Query parameters with URI keys.
Example
GET http://localhost/api/v1/account/AccountRead/GetAccounts?uriKeys=key1,key2
Delete Account (POST)
Deletes a user account.
Route
|
URI |
/api/v1/deleteAccount |
|
Method |
POST |
|
Result |
ChangeResult |
Parameter
|
Name |
Type |
Mandatory |
Default |
Description |
|
accountDn |
Text |
Yes |
|
The DN of the account to be deleted. |
|
Comment |
Text |
Yes |
|
Comment |
|
ExecutionDate |
Text (ISO 8601 date/time) |
No |
immediate |
The time at which the action is to be executed. From version 9.0.18x. |
Example
POST /api/v1/deleteAccount HTTP/1.1
Content-Type: application/json
{
"accountDn": "CN=MMTestUser004,OU=TestUsers,DC=lab,DC=DEMO-COMPANY,DC=local",
"comment": "My comment",
"executionDate": "2018-12-31T18:20Z"
}
Result
{
"Success": true
}
Deactivate User (POST)
Deactivates a user account and optionally moves it to the recycle bin OU configured in the ARM (“Soft-Delete“).
Route
|
URI |
/api/v1/account/deactivateuser |
|
Method |
POST |
|
Result |
ChangeResult |
Parameter
|
Name |
Type |
Mandatory |
Default |
Description |
|
userAccountDn |
Text |
Yes |
|
The Distinguished Name (DN) of the user account to be deactivated. |
|
moveToRecyclingOu |
Bool |
No |
false |
Specifies if the account should be moved to the recycle bin OU. |
|
Comment |
Text |
Yes |
|
Comment for the ARM logbook |
|
ExecutionDate |
Text (ISO 8601 Date /Time) |
No |
immediate |
The time at which the action is to be executed. From version 9.0.18x. |
Example
POST /api/v1/account/deactivateuser HTTP/1.1
Content-Type: application/json
{
"userAccountDn": "CN=Will Lachen,OU=Erkner,DC=lab,DC=demo-company,DC=local",
"moveToRecyclingOu": true,
"comment": "Ticket number 123456"
}
Result
{
"Success": true
}
Activate User (POST)
Activates a deactivated user account. If it was previously soft-deleted by ARM (i.e. moved to the Recycle Bin OU), it is automatically moved back to the original OU.
Route
|
URI |
/api/v1/account/activateuser |
|
Method |
POST |
|
Result |
ChangeResult |
Parameter
|
Name |
Type |
Mandatory |
Default |
Description |
|---|---|---|---|---|
|
userAccountDn |
Text |
Yes |
|
The Distinguished Name (DN) of the user account to be activated. |
|
Comment |
Text |
Yes |
|
Comment for the ARM logbook |
|
ExecutionDate |
Text (ISO 8601 date/time) |
No |
immediate |
The time at which the action is to be executed. From version 9.0.18x.
|
Example
POST /api/v1/account/activateuser HTTP/1.1
Content-Type: application/json
{
"userAccountDn": "CN=Will Lachen,OU=Erkner,DC=lab,DC=demo-company,DC=local",
"comment": "Ticket number 123456"
}
Result
{
"Success": true
}