{
    "swagger":"2.0",
    "info":{
        "title":"REST API for Oracle Unified Directory Data Management",
        "description":"The Data Management REST API enables you to to manage directory data in Oracle Unified Directory.",
        "version":"2025.02.18",
        "x-summary":"The Data Management REST API enables you to to manage directory data in Oracle Unified Directory."
    },
    "consumes":[
        "application/json"
    ],
    "produces":[
        "application/json"
    ],
    "tags":[
        {
            "name":"Directory Entry",
            "description":"The operations from the Directory Entry category."
        }
    ],
    "paths":{
        "/rest/v1/directory":{
            "post":{
                "summary":"Add, Delete, Search, Modify or Compare an OUD entry.",
                "description":"Add, Delete, Search, Modify or Compare an entry in the directory.",
                "tags":[
                    "Directory Entry"
                ],
                "consumes":[
                    "application/json"
                ],
                "produces":[
                    "application/json"
                ],
                "parameters":[
                    {
                        "name":"POSTRequest",
                        "in":"body",
                        "description":"User that needs to be created",
                        "required":true,
                        "schema":{
                            "$ref":"#/definitions/POSTRequest"
                        }
                    }
                ],
                "responses":{
                    "200":{
                        "description":"OK",
                        "schema":{
                            "$ref":"#/definitions/SuccessResponse"
                        }
                    },
                    "201":{
                        "description":"Created",
                        "schema":{
                            "$ref":"#/definitions/ADDSuccessResponse"
                        }
                    },
                    "204":{
                        "description":"No content"
                    },
                    "406":{
                        "description":"Not Acceptable",
                        "schema":{
                            "$ref":"#/definitions/ErrorResponse"
                        }
                    }
                },
                "x-internal-id":"rest-v1-directory-post",
                "x-filename-id":"rest-v1-directory-post"
            }
        },
        "/rest/v1/directory/{dn}":{
            "get":{
                "tags":[
                    "Directory Entry"
                ],
                "summary":"Find OUD entries",
                "description":"Returns the details of the entry ",
                "produces":[
                    "application/json"
                ],
                "parameters":[
                    {
                        "name":"dn",
                        "in":"path",
                        "description":"LDAP DN of the entry to be fetched.",
                        "required":true,
                        "type":"string"
                    },
                    {
                        "name":"scope",
                        "in":"query",
                        "description":"Scope for the LDAP search operation.",
                        "type":"string",
                        "enum":[
                            "base",
                            "sub",
                            "one"
                        ]
                    },
                    {
                        "name":"filter",
                        "in":"query",
                        "description":"Search filter for the LDAP search operation. Should follow LDAP search filter syntax.",
                        "type":"string"
                    },
                    {
                        "name":"sizeLimit",
                        "in":"query",
                        "description":"Size Limit for the LDAP search operation. Contains the value of sizeLimit you want.",
                        "type":"string"
                    },
                    {
                        "name":"timeLimit",
                        "in":"query",
                        "description":"Time Limit for the LDAP search operation. Contains the value of timeLimit you want.",
                        "type":"string"
                    },
                    {
                        "name":"attributes",
                        "in":"query",
                        "description":"List of attributes to be fetched for the entry.",
                        "type":"array",
                        "collectionFormat":"multi",
                        "items":{
                            "type":"string"
                        }
                    },
                    {
                        "name":"controls",
                        "in":"query",
                        "description":"LDAP controls to be sent to server for search operation.",
                        "type":"array",
                        "collectionFormat":"multi",
                        "items":{
                            "type":"string"
                        }
                    }
                ],
                "responses":{
                    "200":{
                        "description":"OK",
                        "schema":{
                            "$ref":"#/definitions/GetSuccessResponse"
                        }
                    },
                    "406":{
                        "description":"Not Acceptable",
                        "schema":{
                            "$ref":"#/definitions/ErrorResponse"
                        }
                    }
                },
                "x-internal-id":"rest-v1-directory-{dn}-get",
                "x-filename-id":"rest-v1-directory-dn-get"
            },
            "patch":{
                "tags":[
                    "Directory Entry"
                ],
                "summary":"Modify a OUD entry",
                "description":"Modify an entry by giving the dn",
                "produces":[
                    "application/json"
                ],
                "parameters":[
                    {
                        "name":"dn",
                        "in":"path",
                        "description":"LDAP DN of the entry to be modified",
                        "required":true,
                        "type":"string"
                    },
                    {
                        "name":"PatchRequest",
                        "in":"body",
                        "description":"Entry that needs to be modified",
                        "required":true,
                        "schema":{
                            "$ref":"#/definitions/PatchRequest"
                        }
                    }
                ],
                "responses":{
                    "200":{
                        "description":"OK",
                        "schema":{
                            "$ref":"#/definitions/PatchSuccessResponse"
                        }
                    },
                    "400":{
                        "description":"ERROR"
                    },
                    "406":{
                        "description":"Not Acceptable",
                        "schema":{
                            "$ref":"#/definitions/ErrorResponse"
                        }
                    }
                },
                "x-internal-id":"rest-v1-directory-{dn}-patch",
                "x-filename-id":"rest-v1-directory-dn-patch"
            },
            "delete":{
                "tags":[
                    "Directory Entry"
                ],
                "summary":"Delete an OUD entry",
                "description":"Deletes the entry",
                "produces":[
                    "application/json"
                ],
                "parameters":[
                    {
                        "name":"dn",
                        "in":"path",
                        "description":"dn of the entry to be deleted",
                        "required":true,
                        "type":"string"
                    }
                ],
                "responses":{
                    "204":{
                        "description":"No content"
                    },
                    "406":{
                        "description":"Not Acceptable",
                        "schema":{
                            "$ref":"#/definitions/ErrorResponse"
                        }
                    }
                },
                "x-internal-id":"rest-v1-directory-{dn}-delete",
                "x-filename-id":"rest-v1-directory-dn-delete"
            }
        }
    },
    "definitions":{
        "Properties":{
            "type":"object",
            "required":[
                "objectClass",
                "cn"
            ],
            "properties":{
                "audio":{
                    "type":"array",
                    "description":"audio for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "businessCategory":{
                    "type":"array",
                    "description":"businessCategory for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "carLicense":{
                    "type":"array",
                    "description":"carLicense for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "departmentNumber":{
                    "type":"array",
                    "description":"departmentNumber for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "displayName":{
                    "type":"array",
                    "description":"displayName for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "employeeNumber":{
                    "type":"array",
                    "description":"employeeNumber for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "employeeType":{
                    "type":"array",
                    "description":"employeeType for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "givenName":{
                    "type":"array",
                    "description":"givenName for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "homePhone":{
                    "type":"array",
                    "description":"homePhone for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "homePostalAddress":{
                    "type":"array",
                    "description":"homePostalAddress for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "initials":{
                    "type":"array",
                    "description":"initials for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "jpegPhoto":{
                    "type":"array",
                    "description":"jpegPhoto for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "labeledURI":{
                    "type":"array",
                    "description":"labeledURI for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "mail":{
                    "type":"array",
                    "description":"mail for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "manager":{
                    "type":"array",
                    "description":"manager for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "mobile":{
                    "type":"array",
                    "description":"mobile for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "o":{
                    "type":"array",
                    "description":"o for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "pager":{
                    "type":"array",
                    "description":"pager for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "photo":{
                    "type":"array",
                    "description":"photo for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "roomNumber":{
                    "type":"array",
                    "description":"roomNumber for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "secretary":{
                    "type":"array",
                    "description":"secretary for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "uid":{
                    "type":"array",
                    "description":"uid for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "userCertificate":{
                    "type":"array",
                    "description":"userCertificate for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "x500UniqueIdentifier":{
                    "type":"array",
                    "description":"x500UniqueIdentifier for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "preferredLanguage":{
                    "type":"array",
                    "description":"preferredLanguage for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "userSMIMECertificate":{
                    "type":"array",
                    "description":"userSMIMECertificate for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "userPKCS12":{
                    "type":"array",
                    "description":"userPKCS12 for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "title":{
                    "type":"array",
                    "description":"title for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "x121Address":{
                    "type":"array",
                    "description":"x121Address for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "registeredAddress":{
                    "type":"array",
                    "description":"registeredAddress for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "destinationIndicator":{
                    "type":"array",
                    "description":"destinationIndicator for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "preferredDeliveryMethod":{
                    "type":"array",
                    "description":"preferredDeliveryMethod for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "telexNumber":{
                    "type":"array",
                    "description":"telexNumber for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "teletexTerminalIdentifier":{
                    "type":"array",
                    "description":"teletexTerminalIdentifier for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "telephoneNumber":{
                    "type":"array",
                    "description":"telephoneNumber for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "internationaliSDNNumber":{
                    "type":"array",
                    "description":"internationaliSDNNumber for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "facsimileTelephoneNumber":{
                    "type":"array",
                    "description":"facsimileTelephoneNumber for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "street":{
                    "type":"array",
                    "description":"street for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "postOfficeBox":{
                    "type":"array",
                    "description":"postOfficeBox for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "postalCode":{
                    "type":"array",
                    "description":"postalCode for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "postalAddress":{
                    "type":"array",
                    "description":"postalAddress for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "physicalDeliveryOfficeName":{
                    "type":"array",
                    "description":"physicalDeliveryOfficeName for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "ou":{
                    "type":"array",
                    "description":"ou for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "st":{
                    "type":"array",
                    "description":"st for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "l":{
                    "type":"array",
                    "description":"l for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "sn":{
                    "type":"array",
                    "description":"sn for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "cn":{
                    "type":"array",
                    "description":"cn for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "userPassword":{
                    "type":"array",
                    "description":"userPassword for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "seeAlso":{
                    "type":"array",
                    "description":"seeAlso for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "description":{
                    "type":"array",
                    "description":"description for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                },
                "objectClass":{
                    "type":"array",
                    "description":"objectClass for the corresponding entry",
                    "items":{
                        "type":"string"
                    }
                }
            }
        },
        "POSTRequest":{
            "type":"object",
            "required":[
                "msgType"
            ],
            "properties":{
                "msgType":{
                    "description":"The REST message type",
                    "type":"string",
                    "enum":[
                        "urn:ietf:params:rest:schemas:oracle:oud:1.0:AddRequest",
                        "urn:ietf:params:rest:schemas:oracle:oud:1.0:ModifyRequest",
                        "urn:ietf:params:rest:schemas:oracle:oud:1.0:SearchRequest",
                        "urn:ietf:params:rest:schemas:oracle:oud:1.0:DeleteRequest",
                        "urn:ietf:params:rest:schemas:oracle:oud:1.0:CompareRequest"
                    ]
                },
                "dn":{
                    "description":"LDAP DN of the entry to be created or deleted or compared. Note: To be used only while performing LDAP add, delete or compare operations, i.e, if the msgType is urn:ietf:params:rest:schemas:oracle:oud:1.0:AddRequest, urn:ietf:params:rest:schemas:oracle:oud:1.0:DeleteRequest or urn:ietf:params:rest:schemas:oracle:oud:1.0:CompareRequest.It is mandatory for such operations.",
                    "type":"string"
                },
                "attributes":{
                    "$ref":"#/definitions/Properties"
                },
                "base":{
                    "description":"Search Base DN to be used for the LDAP search operation. Note: To be used only while performing LDAP search operation using POST, i.e., if the msgType is urn:ietf:params:rest:schemas:oracle:oud:1.0:SearchRequest. It is also mandatory for such operation",
                    "type":"string"
                },
                "scope":{
                    "description":"Scope for the LDAP search operation. Note: To be used only while performing LDAP search operation using POST, i.e., if the msgType is urn:ietf:params:rest:schemas:oracle:oud:1.0:SearchRequest.",
                    "type":"string",
                    "enum":[
                        "base",
                        "sub",
                        "one"
                    ]
                },
                "filter":{
                    "description":"Search filter for the LDAP search operation. Should follow LDAP search filter syntax. Note: To be used only while performing LDAP search operation using POST request, i.e., if the msgType is urn:ietf:params:rest:schemas:oracle:oud:1.0:SearchRequest.",
                    "type":"string"
                },
                "requiredAttributes":{
                    "description":"List of attributes to be fetched for the entry. Note: To be used only while performing LDAP search operation using POST, i.e., if the msgType is urn:ietf:params:rest:schemas:oracle:oud:1.0:SearchRequest.",
                    "type":"array",
                    "items":{
                        "type":"string"
                    }
                },
                "controls":{
                    "description":"LDAP controls to be sent to server for the LDAP operation.",
                    "type":"array",
                    "items":{
                        "type":"string"
                    }
                },
                "assertion":{
                    "description":"Assertion string for the LDAP compare operation. Note: To be used only while performing LDAP compare operation using POST, i.e., if the msgType is urn:ietf:params:rest:schemas:oracle:oud:1.0:CompareRequest.",
                    "type":"string"
                }
            }
        },
        "PatchRequest":{
            "type":"object",
            "required":[
                "msgType"
            ],
            "properties":{
                "msgType":{
                    "description":"The schema for the Patch operation type",
                    "type":"string",
                    "enum":[
                        "urn:ietf:params:rest:schemas:oracle:oud:1.0:ModifyRequest",
                        "urn:ietf:params:rest:schemas:oracle:oud:1.0:ModifyDNRequest"
                    ]
                },
                "Operations":{
                    "type":"array",
                    "description":"Modifications (Patch operations) to be performed on the User.",
                    "items":{
                        "$ref":"#/definitions/PatchOperation"
                    }
                },
                "newRdn":{
                    "description":"The new Rdn value for the entry. Mandatory for ModifyDNRequest",
                    "type":"string"
                },
                "deleteOldRdn":{
                    "description":"Whether you want to delete the values of the older Rdn",
                    "type":"boolean"
                },
                "newSuperior":{
                    "description":"The new Superior attribute for the following entry",
                    "type":"string"
                }
            }
        },
        "PatchOperation":{
            "type":"object",
            "required":[
                "opType",
                "values"
            ],
            "properties":{
                "opType":{
                    "description":"The type of the Patch Operation.",
                    "type":"string",
                    "enum":[
                        "add",
                        "delete",
                        "replace",
                        "increment"
                    ]
                },
                "path":{
                    "type":"string",
                    "description":"The path of the entry attribute to be modified."
                },
                "values":{
                    "type":"array",
                    "description":"The attribute values to be updated.",
                    "items":{
                        "type":"string"
                    }
                }
            }
        },
        "GetSuccessResponse":{
            "type":"object",
            "required":[
                "msgType",
                "totalResults",
                "searchResultEntries"
            ],
            "properties":{
                "msgType":{
                    "description":"The REST message type",
                    "default":"urn:ietf:params:rest:schemas:oracle:oud:1.0:SearchResponse",
                    "type":"string"
                },
                "totalResults":{
                    "type":"integer",
                    "format":"int32",
                    "description":"Specifies the number of entries created, and returned."
                },
                "searchResultEntries":{
                    "type":"array",
                    "description":"Number of search result entries returned after the LDAP operation.",
                    "items":{
                        "$ref":"#/definitions/SearchResultEntry"
                    }
                }
            }
        },
        "ADDSuccessResponse":{
            "type":"object",
            "required":[
                "msgType",
                "totalResults",
                "searchResultEntries"
            ],
            "properties":{
                "msgType":{
                    "description":"The REST message type",
                    "default":"urn:ietf:params:rest:schemas:oracle:oud:1.0:AddResponse",
                    "type":"string"
                },
                "totalResults":{
                    "type":"integer",
                    "format":"int32",
                    "description":"Specifies the number of entries created, and returned."
                },
                "searchResultEntries":{
                    "type":"array",
                    "items":{
                        "$ref":"#/definitions/SearchResultEntry"
                    }
                }
            }
        },
        "PatchSuccessResponse":{
            "type":"object",
            "required":[
                "msgType",
                "totalResults",
                "searchResultEntries"
            ],
            "properties":{
                "msgType":{
                    "description":"The REST message type",
                    "default":"urn:ietf:params:rest:schemas:oracle:oud:1.0:ModifyResponse",
                    "type":"string"
                },
                "totalResults":{
                    "type":"integer",
                    "format":"int32",
                    "description":"Specifies the number of entries created, and returned."
                },
                "searchResultEntries":{
                    "type":"array",
                    "description":"Number of search result entries returned after the LDAP operation.",
                    "items":{
                        "$ref":"#/definitions/SearchResultEntry"
                    }
                }
            }
        },
        "SuccessResponse":{
            "type":"object",
            "required":[
                "msgType",
                "totalResults",
                "searchResultEntries"
            ],
            "properties":{
                "msgType":{
                    "description":"The REST message type",
                    "type":"string",
                    "enum":[
                        "urn:ietf:params:rest:schemas:oracle:oud:1.0:SearchResponse",
                        "urn:ietf:params:rest:schemas:oracle:oud:1.0:ModifyResponse",
                        "urn:ietf:params:rest:schemas:oracle:oud:1.0:DeleteResponse",
                        "urn:ietf:params:rest:schemas:oracle:oud:1.0:CompareResponse"
                    ]
                },
                "totalResults":{
                    "type":"integer",
                    "format":"int32",
                    "description":"Specifies the number of entries created, and returned."
                },
                "searchResultEntries":{
                    "type":"array",
                    "description":"Number of search result entries returned after the LDAP operation.",
                    "items":{
                        "$ref":"#/definitions/SearchResultEntry"
                    }
                },
                "compareResult":{
                    "description":"Indicates the result of LDAP compare operation.",
                    "type":"boolean"
                }
            }
        },
        "SearchResultEntry":{
            "type":"object",
            "required":[
                "dn",
                "attributes"
            ],
            "properties":{
                "dn":{
                    "description":"LDAP DN of the entry to be created or deleted or compared. Note: To be used only while performing LDAP add, delete or compare operations, i.e, if the msgType is urn:ietf:params:rest:schemas:oracle:oud:1.0:AddRequest, urn:ietf:params:rest:schemas:oracle:oud:1.0:DeleteRequest or urn:ietf:params:rest:schemas:oracle:oud:1.0:CompareRequest.It is mandatory for such operations.",
                    "type":"string"
                },
                "attributes":{
                    "$ref":"#/definitions/Properties"
                }
            }
        },
        "ErrorResponse":{
            "type":"object",
            "required":[
                "msgType",
                "message"
            ],
            "properties":{
                "msgType":{
                    "description":"The REST message type",
                    "default":"urn:ietf:params:rest:schemas:oracle:oud:1.0:ErrorResponse",
                    "type":"string"
                },
                "message":{
                    "description":"Error message returned returned for the operation.",
                    "type":"string"
                },
                "ldapErrorCode":{
                    "type":"integer",
                    "format":"int32",
                    "description":"Specifies the LDAP error code returned for the operation."
                }
            }
        }
    }
}