Quick Start
Set up your environment and use the Oracle Unified Directory Data Management REST API to add, modify, remove, and search data in the directory server and manage users and groups.
Prerequisites
Prerequisite | More Information |
Install cURL |
|
Set up authentication |
|
The installation of OUD |
See Oracle Fusion Middleware Installing Oracle Unified Directory. |
OUD User account and Access control instructions (ACIs) are added. |
Data Management REST API interface supports ACIs configured in OUD. By default, ACIs are restrictive in OUD owing to security reasons. You need to update or configure the ACIs according to your data access requirement designed for your use case. See Controlling Access To Data in Oracle Fusion Middleware Administrator's Guide for Oracle Unified Directory |
Connection handlers are configured. |
You must configure the connection handlers to support HTTP-based communication for Data Management REST API. Run the |
JKS keystore and JKS Trust Manager Provider is configured |
If the LDAPS connection handler is not configured for the OUD instance then you must configure
|
Task 1: Obtain Account Information
From your account administrator, obtain the appropriate account credentials to enable you to perform tasks. Specifically you will need:
-
Username and password
-
Host name and port number
-
HTTP URI:
/rest/v1/directory
Task 2: Send a Request
After you set up your REST client, you can send a request to ensure that your connection works. For example, you want to search details about an existing entry in the directory using the POST
method. You can use the following example of the request body in JSON format:
{
"msgType": "urn:ietf:params:rest:schemas:oracle:oud:1.0:SearchRequest",
"base": "ou=People,dc=example,dc=com",
"scope": "sub",
"filter": "(&(objectclass=*)(mail=user.1*))"
}
If the request is successful, then you should receive a 200 response with a body such as the following:
{
"msgType": "urn:ietf:params:rest:schemas:oracle:oud:1.0:SearchResponse",
"totalResults": 1,
"searchResultEntries": [
{
"dn": "uid=user.1,ou=People,dc=example,dc=com",
"attributes": {
"mail": "user.1@example.com",
"initials": "ALA",
"homePhone": "+1 280 375 4325",
"pager": "+1 850 883 8888",
"givenName": "Aaren",
"employeeNumber": "1",
"telephoneNumber": "+1 390 103 6917",
"mobile": "+1 680 734 6300",
"sn": "Atp",
"cn": "Aaren Atp",
"userPassword": "{SSHA512}Sa/password",
"description": "This is the description for Aaren Atp.",
"street": "70110 Fourth Street",
"st": "OH",
"postalAddress": "Aaren Atp$70110 Fourth Street$New Haven, OH 93694",
"l": "New Haven",
"postalCode": "93694",
"uid": "user.1",
"objectClass": [
"top",
"inetorgperson",
"organizationalperson",
"person"
]
}
}
]
}