REST API Endpoints
Create User
Use this endpoint to create a new user in the active directory.
Parameters
createUser(object): All keys in this objects are mandatory to create a new user.
customAttributes(object): To set values to user AD attributes. You can add multiple attributes separated by comma.
Response
Success Response:
Status Code: 200 OK
Body: Describes the success message or the result of the request.
Error Response:
Status Code: 4xx or 5xx (depending on the type of error)
Body: Describes the error message and possibly error codes.
Example cURL Command
curl --location 'https://adweb.yourdomain.com/restapi/createuser' \
--header 'ApiKey: 1Q3HKk8s9ggN9GubbSFSBG3YHA8Ei6ZBXRd0' \
--header 'ApiSecret: 2OclwW0WjoSf00VfVDuGASH0ZpyD6n9o3' \
--header 'Content-Type: application/json' \
--data '{
"createUser":
{
"SamAccountName": "micheal",
"UserPrincipalName": "micheal@dart.org",
"Password": "dummy@assword",
"ouDN": "CN=Dart,dc=dart,dc=org",
"FQDN": "string"
},
"customAttributes": {
"pager": "some value"
}}'
Create New Organization Unit (OU)
Use this endpoint to create the new OU in the active directory.
Parameters
newOuName(string)(Required):The new OU name.
description(string)(Optional):The OU description.
city(string)(Optional):City of the OU.
state(string)(Optional):State of the OU.
street(string)(Optional):street of the OU.
postalCode(string)(Optional):Postal code of the OU.
country(string)(Optional):Country of the OU.
FQDN(string)(Required):FQDN of the domain.
Response
Success Response:
Status Code: 200 OK
Body: Describes the success message or the result of the request.
Error Response:
Status Code: 4xx or 5xx (depending on the type of error)
Body: Describes the error message and possibly error codes.
Example cURL Command
curl --location 'https://adweb3.demodooms.com/restapi/createparentou' \
--header 'ApiKey: 1Q3HKk8s9ggN9GubbSmlk1XdGI12lQkEFSBG3YHA8Ei6ZBXRd0' \
--header 'ApiSecret: 2OclwW0WjoSf00V0TRjpquFr4F7ynU4ufVDuGASH0ZpyD6n9o3' \
--header 'Content-Type: application/json' \
--data '{
"newOuName": "ABC Site",
"description": "ABC Organization",
"city": "Newyork",
"state": "Newyork",
"street": "1st avenue",
"postalCode": "54561",
"country": "United States",
"fqdn": "dart.org",
"accidentialDeletion": true
}'
Create Child Organization Unit (OU)
Use this endpoint to create the new child OU below a parent in the active directory.
Parameters
parentOuDn(string)(Required):The parent OU distinguished name.
newChildOuName(string)(Required):The new child OU name.
description(string)(Optional):The OU description.
city(string)(Optional):City of the OU.
state(string)(Optional):State of the OU.
street(string)(Optional):street of the OU.
postalCode(string)(Optional):Postal code of the OU.
country(string)(Optional):Country of the OU.
FQDN(string)(Required):FQDN of the domain.
Response
Success Response:
Status Code: 200 OK
Body: Describes the success message or the result of the request.
Error Response:
Status Code: 4xx or 5xx (depending on the type of error)
Body: Describes the error message and possibly error codes.
Example cURL Command
curl --location 'https://adweb3.demodooms.com/restapi/createchildou' \
--header 'ApiKey: 1Q3HKk8s9ggN9GubbSmlk1XdGI12lQkEFSBG3YHA8Ei6ZBXRd0' \
--header 'ApiSecret: 2OclwW0WjoSf00V0TRjpquFr4F7ynU4ufVDuGASH0ZpyD6n9o3' \
--header 'Content-Type: application/json' \
--data '{
"parentOuDn": "OU=Dart-ABC,DC=dartjaz,DC=org",
"newChildOuName": "ABC-child",
"description": "ABC Organization",
"city": "Newyork",
"state": "Newyork",
"street": "1st avenue",
"postalCode": "54561",
"country": "United States",
"fqdn": "dart.org",
"accidentialDeletion": true
}'
Move User to Organization Unit
Use this endpoint to move the AD user to another OU.
Parameters
userDN(string)(Required):Distinguished name of the user.
ouDN(string)(Required):Distinguished name of the OU.
fqdn(string)(Required):FQDN of the domain.
Response
Success Response:
Status Code: 200 OK
Body: Describes the success message or the result of the request.
Error Response:
Status Code: 4xx or 5xx (depending on the type of error)
Body: Describes the error message and possibly error codes.
Example cURL Command
curl --location 'https://adweb.yourdomain.com/restapi/moveusertoou\
--header 'ApiKey: 1Q3HKk8s9ggN9GuBG3YHA8Ei6ZBXRd0' \
--header 'ApiSecret: 2OclwW0WjoSf00V0fVDuGASH0ZpyD6n9o3' \
--header 'Content-Type: application/json' \
--data '{
"userDN": "cn=micheal,ou=abc,dc=dart,dc=org",
"ouDN": "cn=abc-child,ou=abc,dc=dart,dc=org",
"fqdn": "dart.org"
}'
Assign the user to a group
Use this endpoint to assign a user to some group.
Parameters
userDN (string)(Required):Distinguished name of the user.
groupDN(string)(Required):Distinguished name of the group.
fqdn(string)(Required):FQDN of the domain.
Response
Success Response:
Status Code: 200 OK
Body: Describes the success message or the result of the request.
Error Response:
Status Code: 4xx or 5xx (depending on the type of error)
Body: Describes the error message and possibly error codes.
Example cURL Command
curl --location --request POST 'https://adweb.yourdomain.com/restapi/assignusertogroup' \
--header 'ApiKey: 1Q3HKk8s9ggN9GubbSmlk3YHA8Ei6ZBXRd0' \
--header 'ApiSecret: 2OclwW0WjoSf00V0TRjp0ZpyD6n9o3' \
--header 'Content-Type: application/json' \
--data '{
"userDN": "cn=micheal,ou=abc,dc=dart,dc=org",
"groupDN": "cn=interfaceadmin,ou=abc,dc=dart,dc=org",
"fqdn": "dart.org"
}'
Update AD User Information
Use this endpoint to update the AD user information.
Parameters
updateUser(object):All keys in this object are nonmandatory to update a user except FQDN and userDN.
customAttributes(object):To update values of user AD attributes, you can add multiple attributes separated by a comma.
Response
Success Response:
Status Code: 200 OK
Body: Describes the success message or the result of the request.
Error Response:
Status Code: 4xx or 5xx (depending on the type of error)
Body: Describes the error message and possibly error codes.
Example cURL Command
curl --location --request PUT 'https://adweb.yourdomain.com/restapi/updateuser' \
--header 'ApiKey: Q3HKk8s9ggN9GubbSmlk3YHA8Ei6ZBXRd0' \
--header 'ApiSecret: 2OclwW0WjoSf00V0TRjp0ZpyD6n9o3'\'' ' \
--header 'Content-Type: application/json' \
--data '{
"updateUser": {
"userDN": "cn=micheal,ou=dartians,dc=dart,dc=org",
"SamAccountName": "micheal",
"UserPrincipalName": "micheal@dart.org",
"Password": "Abcd$ssw212",
"ouDN": "cn=abcsite,dc=dart,dc=org",
"FQDN": "dart.org"
},
"customAttributes": {
"mail": "user@example.com"
}
}'
Enable AD User
Use this endpoint to enable the AD user.
Parameters
userDN(string)(Required):Distinguished user name.
FQDN(string)(Required):FQDN of the domain.
notifyEmail(string)(optional):To send notify email to the user after enabling.
Response
Success Response:
Status Code: 200 OK
Body: Describes the success message or the result of the request.
Error Response:
Status Code: 4xx or 5xx (depending on the type of error)
Body: Describes the error message and possibly error codes.
Example cURL Command
curl --location 'https://adweb.yourdomain.com/restapi/enableuser \
--header 'ApiKey: 1Q3HKk8s9ggN9GuBG3YHA8Ei6ZBXRd0' \
--header 'ApiSecret: 2OclwW0WjoSf00V0fVDuGASH0ZpyD6n9o3' \
--header 'Content-Type: application/json' \
--data '{
"userDN": "cn=micheal,ou=dartians,dc=dart,dc=org",
"FQDN": "dart@org",
"notifyEmail": false
}'
Disable AD User
Use this endpoint to disable the AD user.
Parameters
userDN (string)(Required):Distinguished user name.
FQDN(string)(Required):FQDN of the domain.
notifyEmail(string)(optional):To send notify email to the user after disabling.
Response
Success Response:
Status Code: 200 OK
Body: Describes the success message or the result of the request.
Error Response:
Status Code: 4xx or 5xx (depending on the type of error)
Body: Describes the error message and possibly error codes.
Example cURL Command
curl --location 'https://adweb.yourdomain.com/restapi/disableuser \
--header 'ApiKey: 1Q3HKk8s9ggN9GuBG3YHA8Ei6ZBXRd0' \
--header 'ApiSecret: 2OclwW0WjoSf00V0fVDuGASH0ZpyD6n9o3' \
--header 'Content-Type: application/json' \
--data '{
"userDN": "cn=micheal,ou=dartians,dc=dart,dc=org",
"FQDN": "dart@org",
"notifyEmail": false
}'
Unlock AD User
Use this endpoint to enable the AD user.
Parameters
userDN (string)(Required):Distinguished user name.
FQDN(string)(Required):FQDN of the domain.
notifyEmail(string)(optional):To send notify email to the user after disabling.
Response
Success Response:
Status Code: 200 OK
Body: Describes the success message or the result of the request.
Error Response:
Status Code: 4xx or 5xx (depending on the type of error)
Body: Describes the error message and possibly error codes.
Example cURL Command
curl --location --request PUT 'https://adweb.yourdomain.com/restapi/unlockuser' \
--header 'ApiKey: Q3HKk8s9ggN9GubbSmlk3YHA8Ei6ZBXRd0' \
--header 'ApiSecret: 2OclwW0WjoSf00V0TRjp0ZpyD6n9o3'\'' ' \
--header 'Content-Type: application/json' \
--data '{
"userDN": "cn=micheal,ou=dartians,dc=dart,dc=org",
"fqdn": "dart.org",
"notifyEmail": true
}'
Reset User AD Password
Use this endpoint to reset the AD user’s password.
Parameters
userDN (string)(Required):Distinguished user name.
FQDN(string)(Required):FQDN of the domain.
notifyEmail(string)(optional):To send notify email to the user after disabling.
Response
Success Response:
Status Code: 200 OK
Body: Describes the success message or the result of the request.
Error Response:
Status Code: 4xx or 5xx (depending on the type of error)
Body: Describes the error message and possibly error codes.
Example cURL Command
curl --location --request PUT 'https://adweb.yourdomain.com/restapi/passwordreset' \
--header 'ApiKey: Q3HKk8s9ggN9GubbSmlk3YHA8Ei6ZBXRd0' \
--header 'ApiSecret: 2OclwW0WjoSf00V0TRjp0ZpyD6n9o3'\'' ' \
--header 'Content-Type: application/json' \
--data '{
"userDN": "cn=micheal,ou=dartians,dc=dart,dc=org",
"fqdn": "dart.org",
"notifyEmail": true
}'
Get Distinguished Name
Use this endpoint to get the distinguished name of the user, group, and OU.
Parameters
samAccountName(string)(Required):samaccount name of the user, group or OU.
fqdn(string)(Required):FQDN of the domain.
notifyEmail(string)(optional):To send notify email to the user after disabling.
Response
Success Response:
Status Code: 200 OK
Body: Describes the success message or the result of the request.
Error Response:
Status Code: 4xx or 5xx (depending on the type of error)
Body: Describes the error message and possibly error codes.
Example cURL Command
curl --location --request POST 'https://adweb.yourdomain.com/restapi/getdn?samAccountName=micheal&FQDN=dart.org' \
--header 'ApiKey: 1Q3HKk8s9ggN9GubbSmlk3YHA8Ei6ZBXRd0' \
--header 'ApiSecret: 2OclwW0WjoSf00V0TRjp0ZpyD6n9o3' \
Get Members of OU
Use this endpoint to get the members of the OU.
Parameters
ouDN(string)(Required):Distinguished name of the OU.
fqdn(string)(Required):FQDN of the domain.
Response
Success Response:
Status Code: 200 OK
Body: Describes the success message or the result of the request.
Error Response:
Status Code: 4xx or 5xx (depending on the type of error)
Body: Describes the error message and possibly error codes.
Example cURL Command
curl --location --request POST 'https://adweb.yourdomain.com/restapi/getoumembers?ouDN=cn=adbc-child,dc=dart,dc=org&FQDN=dart.org' \
--header 'ApiKey: 1Q3HKk8s9ggN9GubbSmlk3YHA8Ei6ZBXRd0' \
--header 'ApiSecret: 2OclwW0WjoSf00V0TRjp0ZpyD6n9o3' \
Get Members of AD Group
Use this endpoint to get the members of the group.
Parameters
ouDN(string)(Required):Distinguished name of the group.
fqdn(string)(Required):FQDN of the domain.
Response
Success Response:
Status Code: 200 OK
Body: Describes the success message or the result of the request.
Error Response:
Status Code: 4xx or 5xx (depending on the type of error)
Body: Describes the error message and possibly error codes.
Example cURL Command
curl --location --request POST 'https://adweb.yourdomain.com/restapi/getgroupmembers?groupDN=cn=interfacadmin,dc=dart,dc=org&FQDN=dart.org' \
--header 'ApiKey: 1Q3HKk8s9ggN9GubbSmlk3YHA8Ei6ZBXRd0' \
--header 'ApiSecret: 2OclwW0WjoSf00V0TRjp0ZpyD6n9o3' \
Get Group Information of the AD User
Use this endpoint to get the groups of the AD user.
Parameters
userDN(string)(Required):Distinguished user name.
fqdn(string)(Required):FQDN of the domain.
Response
Success Response:
Status Code: 200 OK
Body: Describes the success message or the result of the request.
Error Response:
Status Code: 4xx or 5xx (depending on the type of error)
Body: Describes the error message and possibly error codes.
Example cURL Command
curl --location --request POST 'https://adweb.yourdomain.com/restapi/getusergroupinfo?userDN=cn=miacheal,ou=adbc-child,dc=dart,dc=org&FQDN=dart.org' \
--header 'ApiKey: 1Q3HKk8s9ggN9GubbSmlk3YHA8Ei6ZBXRd0' \
--header 'ApiSecret: 2OclwW0WjoSf00V0TRjp0ZpyD6n9o3' \
Get Information of the AD User
Use this endpoint to get the details of the AD user.
Parameters
userDN(string)(Required):Distinguished user name.
fqdn(string)(Required):FQDN of the domain.
Response
Success Response:
Status Code: 200 OK
Body: Describes the success message or the result of the request.
Error Response:
Status Code: 4xx or 5xx (depending on the type of error)
Body: Describes the error message and possibly error codes.
Example cURL Command
curl --location --request POST 'https://adweb.yourdomain.com/restapi/getuserinfo?userDN=cn=miacheal,ou=adbc-child,dc=dart,dc=org&FQDN=dart.org' \
--header 'ApiKey: 1Q3HKk8s9ggN9GubbSmlk3YHA8Ei6ZBXRd0' \
--header 'ApiSecret: 2OclwW0WjoSf00V0TRjp0ZpyD6n9o3' \
Get All AD User’s
Use this endpoint to get the details of the AD user.
Parameters
ouDN(string)(Required):Distinguished user name of the OU or location.
fqdn(string)(Required):FQDN of the domain.
Response
Success Response:
Status Code: 200 OK
Body: Describes the success message or the result of the request.
Error Response:
Status Code: 4xx or 5xx (depending on the type of error)
Body: Describes the error message and possibly error codes.
Example cURL Command
curl --location --request POST 'https://adweb.yourdomain.com/restapi/getusers?ouDN=cn=adbc-child,dc=dart,dc=org&FQDN=dart.org' \
--header 'ApiKey: 1Q3HKk8s9ggN9GubbSmlk3YHA8Ei6ZBXRd0' \
--header 'ApiSecret: 2OclwW0WjoSf00V0TRjp0ZpyD6n9o3' \