Computers API
This Computers API provides programmatic access to Active Directory computer accounts. The ADManager Plus API offers endpoints to create, update, list, and disable computers using structured requests with support for filtering, sorting, and pagination. Computer records typically include host names, operating system details, organizational placement, and group memberships, and the API enables these attributes to be managed consistently across environments.
List AD Computers
This endpoint retrieves AD computer objects based on filters, sorting, and pagination. It allows you to fetch only the required attributes, making queries efficient and tailored to your reporting needs. It is especially useful for generating inventories, auditing systems, or identifying computers that meet specific conditions.
Scope : Read computer action, All computer management actions
Delegated role : All Computers Report
Query Parameters
Example: domain1.com,domain2.com
Example: (SAM_ACCOUNT_NAME eq PC01) and (OPERATING_SYSTEM eq Windows 11)
Example: SAM_ACCOUNT_NAME,-OPERATING_SYSTEM
Headers
headers_data = Map();
headers_data.put("Accept", "application/json");
headers_data.put("X-Module", "External API");
headers_data.put("X-Date-Time-Format", "SOME_STRING_VALUE");
headers_data.put("Authorization", "REPLACE_KEY_VALUE");
response = invokeUrl
[
url: "http://admanagerplus:8080/api/v2/computers?domains=domain1.com"
type: GET
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("http://admanagerplus:8080/api/v2/computers?domains=domain1.com")
.get()
.addHeader("Accept", "application/json")
.addHeader("X-Module", "External API")
.addHeader("X-Date-Time-Format", "SOME_STRING_VALUE")
.addHeader("Authorization", "REPLACE_KEY_VALUE")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Accept: 'application/json',
'X-Module': 'External API',
'X-Date-Time-Format': 'SOME_STRING_VALUE',
Authorization: 'REPLACE_KEY_VALUE'
}
};
fetch('http://admanagerplus:8080/api/v2/computers?domains=domain1.com', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPConnection("admanagerplus:8080")
headers = {
'Accept': "application/json",
'X-Module': "External API",
'X-Date-Time-Format': "SOME_STRING_VALUE",
'Authorization': "REPLACE_KEY_VALUE"
}
conn.request("GET", "/api/v2/computers?domains=domain1.com", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("http");
const options = {
"method": "GET",
"hostname": "admanagerplus",
"port": "8080",
"path": "/api/v2/computers?domains=domain1.com",
"headers": {
"Accept": "application/json",
"X-Module": "External API",
"X-Date-Time-Format": "SOME_STRING_VALUE",
"Authorization": "REPLACE_KEY_VALUE"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request GET \
--url 'http://admanagerplus:8080/api/v2/computers?domains=domain1.com' \
--header 'Accept: application/json' \
--header 'Authorization: REPLACE_KEY_VALUE' \
--header 'X-Date-Time-Format: SOME_STRING_VALUE' \
--header 'X-Module: External API'
Create AD Computers
This endpoint creates new AD computer objects, either individually or in bulk. You can apply a default or custom template to ensure consistency in attributes such as OU placement, or naming conventions. It is typically used when onboarding new machines into the domain or automating bulk computer account creation.
Scope : Create computer action, All computer management actions
Delegated role : Create Bulk Computers
Arguments
Query Parameters
Example: domain1.com
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "REPLACE_KEY_VALUE");
response = invokeUrl
[
url: "http://admanagerplus:8080/api/v2/computers?domain=domain1.com"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("http://admanagerplus:8080/api/v2/computers?domain=domain1.com")
.post(body)
.addHeader("Authorization", "REPLACE_KEY_VALUE")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {Authorization: 'REPLACE_KEY_VALUE', 'content-type': 'application/json'},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('http://admanagerplus:8080/api/v2/computers?domain=domain1.com', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPConnection("admanagerplus:8080")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "REPLACE_KEY_VALUE",
'content-type': "application/json"
}
conn.request("POST", "/api/v2/computers?domain=domain1.com", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("http");
const options = {
"method": "POST",
"hostname": "admanagerplus",
"port": "8080",
"path": "/api/v2/computers?domain=domain1.com",
"headers": {
"Authorization": "REPLACE_KEY_VALUE",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request POST \
--url 'http://admanagerplus:8080/api/v2/computers?domain=domain1.com' \
--header 'Authorization: REPLACE_KEY_VALUE' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"template": {
"template_name": "Computer Creation Template"
},
"data": [
{
"attributes": {
"sAMAccountName": "APIComputer1$",
"name": "APIComputer1",
"OUName": "OU=Computers,DC=test,DC=com",
"description": "Computer created via API",
"memberOf": "Test Group1;Test Group2"
}
},
{
"attributes": {
"sAMAccountName": "APIComputer2$",
"name": "APIComputer2",
"OUName": "OU=Computers,DC=test,DC=com",
"description": "Computer created via API",
"memberOf": "Test Group3;Test Group4",
"managedBy": "Manager2",
"extensionAttribute1": "Test Attribute 2"
}
}
]
}
Update AD Computers
This endpoint updates existing AD computer objects with the specified payload. You can modify core properties like name, description, and OU, or update advanced details such as operating system, account control, or membership. It is commonly used during upgrades, reorganizations, or when reassigning management responsibilities.
Scope : Modify computer action, All computer management actions
Delegated role : Modify Computers using CSV, Bulk Computer Modification
Arguments
Query Parameters
Example: domain1.com
Example: (SAM_ACCOUNT_NAME eq PC01) and (OPERATING_SYSTEM eq Windows 11)
Example: SAM_ACCOUNT_NAME,-OPERATING_SYSTEM
Headers
parameters_data='{"data":{"attributes":{"name":"UpdatedComputerName","OUName":"OU=UpdatedComputers,DC=test,DC=com","description":"Updated description for the computer","memberOf":"Updated Group1;Updated Group2","managedBy":"Updated Manager","extensionAttribute1":"Updated Attribute"}}}';
headers_data = Map();
headers_data.put("Accept", "application/json");
headers_data.put("X-Module", "External API");
headers_data.put("Authorization", "REPLACE_KEY_VALUE");
response = invokeUrl
[
url: "http://admanagerplus:8080/api/v2/computers?domain=domain1.com"
type: PATCH
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"data\":{\"attributes\":{\"name\":\"UpdatedComputerName\",\"OUName\":\"OU=UpdatedComputers,DC=test,DC=com\",\"description\":\"Updated description for the computer\",\"memberOf\":\"Updated Group1;Updated Group2\",\"managedBy\":\"Updated Manager\",\"extensionAttribute1\":\"Updated Attribute\"}}}");
Request request = new Request.Builder()
.url("http://admanagerplus:8080/api/v2/computers?domain=domain1.com")
.patch(body)
.addHeader("Accept", "application/json")
.addHeader("X-Module", "External API")
.addHeader("Authorization", "REPLACE_KEY_VALUE")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PATCH',
headers: {
Accept: 'application/json',
'X-Module': 'External API',
Authorization: 'REPLACE_KEY_VALUE',
'content-type': 'application/json'
},
body: '{"data":{"attributes":{"name":"UpdatedComputerName","OUName":"OU=UpdatedComputers,DC=test,DC=com","description":"Updated description for the computer","memberOf":"Updated Group1;Updated Group2","managedBy":"Updated Manager","extensionAttribute1":"Updated Attribute"}}}'
};
fetch('http://admanagerplus:8080/api/v2/computers?domain=domain1.com', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPConnection("admanagerplus:8080")
payload = "{\"data\":{\"attributes\":{\"name\":\"UpdatedComputerName\",\"OUName\":\"OU=UpdatedComputers,DC=test,DC=com\",\"description\":\"Updated description for the computer\",\"memberOf\":\"Updated Group1;Updated Group2\",\"managedBy\":\"Updated Manager\",\"extensionAttribute1\":\"Updated Attribute\"}}}"
headers = {
'Accept': "application/json",
'X-Module': "External API",
'Authorization': "REPLACE_KEY_VALUE",
'content-type': "application/json"
}
conn.request("PATCH", "/api/v2/computers?domain=domain1.com", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("http");
const options = {
"method": "PATCH",
"hostname": "admanagerplus",
"port": "8080",
"path": "/api/v2/computers?domain=domain1.com",
"headers": {
"Accept": "application/json",
"X-Module": "External API",
"Authorization": "REPLACE_KEY_VALUE",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
data: {
attributes: {
name: 'UpdatedComputerName',
OUName: 'OU=UpdatedComputers,DC=test,DC=com',
description: 'Updated description for the computer',
memberOf: 'Updated Group1;Updated Group2',
managedBy: 'Updated Manager',
extensionAttribute1: 'Updated Attribute'
}
}
}));
req.end();
curl --request PATCH \
--url 'http://admanagerplus:8080/api/v2/computers?domain=domain1.com' \
--header 'Accept: application/json' \
--header 'Authorization: REPLACE_KEY_VALUE' \
--header 'X-Module: External API' \
--header 'content-type: application/json' \
--data '{"data":{"attributes":{"name":"UpdatedComputerName","OUName":"OU=UpdatedComputers,DC=test,DC=com","description":"Updated description for the computer","memberOf":"Updated Group1;Updated Group2","managedBy":"Updated Manager","extensionAttribute1":"Updated Attribute"}}}'
{
"data": {
"attributes": {
"name": "UpdatedComputerName",
"OUName": "OU=UpdatedComputers,DC=test,DC=com",
"description": "Updated description for the computer",
"memberOf": "Updated Group1;Updated Group2",
"managedBy": "Updated Manager",
"extensionAttribute1": "Updated Attribute"
}
}
}
Disable AD Computers
This endpoint disables one or more AD computers that match the provided filters. A disabled computer cannot authenticate to the domain but remains in AD for record-keeping and auditing. It is often used to secure decommissioned, inactive, or non-compliant machines in bulk.
Scope : Modify computer action, All computer management actions
Delegated role : Enable/Disable Computers
Query Parameters
Example: domain1.com
Example: (SAM_ACCOUNT_NAME eq PC01) and (OPERATING_SYSTEM eq Windows 11)
Example: SAM_ACCOUNT_NAME,-OPERATING_SYSTEM
Headers
headers_data = Map();
headers_data.put("Accept", "application/json");
headers_data.put("X-Module", "External API");
headers_data.put("Authorization", "REPLACE_KEY_VALUE");
response = invokeUrl
[
url: "http://admanagerplus:8080/api/v2/computers/disable?domain=domain1.com"
type: POST
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("http://admanagerplus:8080/api/v2/computers/disable?domain=domain1.com")
.post(null)
.addHeader("Accept", "application/json")
.addHeader("X-Module", "External API")
.addHeader("Authorization", "REPLACE_KEY_VALUE")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
'X-Module': 'External API',
Authorization: 'REPLACE_KEY_VALUE'
}
};
fetch('http://admanagerplus:8080/api/v2/computers/disable?domain=domain1.com', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPConnection("admanagerplus:8080")
headers = {
'Accept': "application/json",
'X-Module': "External API",
'Authorization': "REPLACE_KEY_VALUE"
}
conn.request("POST", "/api/v2/computers/disable?domain=domain1.com", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("http");
const options = {
"method": "POST",
"hostname": "admanagerplus",
"port": "8080",
"path": "/api/v2/computers/disable?domain=domain1.com",
"headers": {
"Accept": "application/json",
"X-Module": "External API",
"Authorization": "REPLACE_KEY_VALUE"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request POST \
--url 'http://admanagerplus:8080/api/v2/computers/disable?domain=domain1.com' \
--header 'Accept: application/json' \
--header 'Authorization: REPLACE_KEY_VALUE' \
--header 'X-Module: External API'