Retrieving AD Computers
From DreamFactory
Contents
- 1 Tutorial
- 2 API Endpoints
- 3 Example - Getting list of all Active Directory Computers with all fields.
- 4 Example - Getting list of all Active Directory Computers with a specific fields.
- 5 Example - Getting a specific Computer information.
- 6 Example - Getting a list of Computers by LDAP query filter.
Tutorial
DreamFactory 2.0 Active Directory service allows you to retrieve your Active Directory Computers using the 'computer' resource.
This tutorial focuses on retrieving Active Directory Computers using an existing DreamFactory Active Directory service. To learn how to setup an Active Directory service see Using Active Directory.
API Endpoints
- To get a list of all Active Directory Computers and their details.
GET http://{url}/api/v2/{ad_service}/computer
- To get details about a specific Computer.
GET http://{url}/api/v2/{ad_service}/computer/{computer_name}
Example - Getting list of all Active Directory Computers with all fields.
- Service name: ad
- Request URL:
GET http://foo.com/api/v2/ad/computer
Example - Getting list of all Active Directory Computers with a specific fields.
- Service name: ad
- Fields to retrieve: cn,dn
- Request URL:
GET http://foo.com/api/v2/ad/computer?fields=cn,dn
Example - Getting a specific Computer information.
- Service name: ad
- Username to retrieve: MSSQL
- Request URL:
GET http://foo.com/api/v2/ad/computer/MSSQL
Example - Getting a list of Computers by LDAP query filter.
- Service name: ad
- LDAP Query: (cn=*server) [List computers where the cn ends with server]
- Request URL:
GET http://foo.com/api/v2/ad/computer?filter=(cn=*server)