Quick Start

Set up your environment and use the REST API to create your first API by performing these tasks.

Prerequisites

Prerequisite More Information

Install cURL

Use cURL

Set up authentication

Authenticate

The installation of OUD

See Oracle Fusion Middleware Installing Oracle Unified Directory

An OUD account

An OUD Admin User account is required to use the Admin REST APIs. See Configuring Root Users

HTTP Administration Connector

Configuration of an Administration Connector on OUD for supporting HTTP based communication. Use dsconfig to enable or manage this connector.

Task 1: Obtain Account Information

From your account administrator, obtain the appropriate account credentials to enable you to perform tasks. Specifically you will need:
  • Credentials for Administering OUD (cn=Directory Manager) which needs to be passed with REST request in HTTP Header. For example, to pass credentials through cURL command, use:

    -u "cn=Directory Manager:********" --header "Content-Type:application/json"
  • HTTP Administration Connector Host and Port

  • HTTP URI: /rest/v1/admin

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, suppose you want to fetch the server details. You can use the following request:

{ 
	"msgType" : "urn:ietf:params:rest:schemas:oracle:oud:1.0:SearchRequest", 
	"scope" : "base",
 	"filter" : "(objectclass=*)",  
	"requiredAttributes" : [ "vendorName", "vendorVersion", "ds-private-naming-contexts", "subschemaSubentry" ], 
	"base" : ""}

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": "",        
   "attributes": {     
     "vendorName": "Oracle Corporation",         
      "vendorVersion": "Oracle Unified Directory 19.1.0.0.0",   
      "ds-private-naming-contexts": [          
    		"cn=admin data",              
    		"cn=ads-truststore",            
    		"cn=backups",                 
   		"cn=config",                
   			"cn=monitor",                 
   		"cn=schema",                
   			"cn=tasks",                 
  			"cn=virtual acis"               ],  
   "subschemaSubentry": "cn=schema"        
   }   
    } 
  ]
}