Creates a new Role

post

/access-governance/access-controls/20250331/roles

Creates a new role with the specified details.

Request

Header Parameters
  • The client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.
Body ()
Details for the new Role
Root Schema : CreateRoleDetails
Type: object
The information about new Role.
Show Source
Nested Schema : accessBundles
Type: array
List of Access Bundles
Show Source
Nested Schema : customAttributes
Type: object
Metadata associated with the role
Show Source
Nested Schema : owners
Type: array
List of owner entities
Show Source
Nested Schema : tags
Type: array
List of tags attached to the Role
Show Source
Nested Schema : Info
Type: object
Generic information object.
Show Source
Nested Schema : OwnerSummary
Type: object
Owner entity object
Show Source
Back to Top

Response

Supported Media Types

200 Response

The newly created Role
Headers
  • For optimistic concurrency control. See `if-match`.
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Role
Type: object
Role object.
Show Source
Nested Schema : accessBundles
Type: array
List of Access Bundles
Show Source
Nested Schema : IdInfo
Type: object
Generic identifying information object.
Show Source
Nested Schema : customAttributes
Type: object
Metadata associated with the role
Show Source
Nested Schema : owners
Type: array
List of owner entities
Show Source
Nested Schema : tags
Type: array
List of tags attached to the Role
Show Source
Nested Schema : AccessBundle
Type: object
Access Bundle object.
Show Source
Nested Schema : AccessGuardrailDetails
Type: object
Access Guardrail object.
Show Source
Nested Schema : AccessBundleTimeLimit
Type: object
Time limit definition. Only one of daysLimit, hoursLimit, or dateTimeLimit should be specified.
Show Source
Nested Schema : customAttributes
Type: object
Metadata associated with the access bundle.
Show Source
Nested Schema : OrchestratedSystemAttributeSummary
Type: object
Account & permission attributes.
Show Source
Nested Schema : owners
Type: array
List of owner entities.
Show Source
Nested Schema : permissions
Type: array
List of permissions
Show Source
Nested Schema : tags
Type: array
List of tags attached to the Access Bundle.
Show Source
Nested Schema : AccessBundleTimeLimitDays
Type: object
Time limit definition in days.
Show Source
Nested Schema : AccessBundleTimeLimitHours
Type: object
Time limit definition in hours.
Show Source
Nested Schema : accountAttributes
Type: array
List of Orchestrated System account attributes.
Show Source
Nested Schema : permissionAttributes
Type: array
List of Orchestrated System permission attributes.
Show Source
Nested Schema : OrchestratedSystemAttributeDataSummary
Type: object
Orchestrated System Attributes
Show Source
Nested Schema : children
Type: array
nested attributes
Show Source
Nested Schema : values
Type: array
Attribute Values
Show Source
Nested Schema : NestedAttributesSummary
Type: object
Nested set of Orchestrated System attributes
Show Source
Nested Schema : items
Type: array
Orchestrated System attributes
Show Source
Nested Schema : OwnerSummary
Type: object
Owner entity object
Show Source
Nested Schema : PermissionSummary
Type: object
Description of Permission.
Show Source
Nested Schema : PermissionTypeSummary
Type: object
PermissionType Summary.
Show Source
Nested Schema : ResourceSummary
Type: object
Resource Summary.
Show Source
Nested Schema : customAttributes
Type: object
Metadata associated with the resource
Show Source

400 Response

Bad Request
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error Information.
Show Source

401 Response

Unauthorized
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error Information.
Show Source

404 Response

Not Found
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error Information.
Show Source

409 Response

Conflict
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error Information.
Show Source

429 Response

Too Many Requests
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error Information.
Show Source

500 Response

Internal Server Error
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error Information.
Show Source

Default Response

Unknown Error
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error Information.
Show Source
Back to Top

Examples

The following example shows how to create a role. Replace placeholder values with actual values before running the sample command.

Note:

Generate Access Token using grant_type = password or Authorization code.
Before creating a role, you need to run the following APIs to fetch the required data:
  • List all Approval Workflows - [GET] {BasePath}/approvalWorkflows
  • List Access Bundle - [GET] {BasePath}/accessBundles
.

cURL Request Example

curl -i -X POST \
   -H "Authorization:Bearer <your-access-token>" \
   -H "Content-Type:application/json" \
   -d \
'{
  "name": "Database Administrator",
  "description": "Responsible for managing database access and ensuring optimized SQL performance.",
  "requestableBy": "ANY",
  "approvalWorkflowId": "NO_APPROVAL_REQUIRED",
  "tags": [
    "UA Role"
  ],
  "accessBundles": [
    {
      "id": "b943f987-xxxx-4bac-bca0-6a09ded5dcad",
      "name": "DBUM Standard SQL Tuning Access UA 8",
      "displayName": "DBUM Standard SQL Tuning Access UA 8",
      "owners": [
        {
          "id": "globalId.125123c3-xxxx-4d6a-b6d4-6c0f6537bad2.18.02e36bbb4b201421b44aa046b3ceb16a",
          "name": "Bill Clark",
          "isPrimary": true
        }
      ]
    }
  ],
  "customAttributes": null,
  "displayName": "Database Administrator Role",
  "owners": [
    {
      "id": "globalId.125123c3-xxxx-4d6a-b6d4-6c0f6537bad2.18.02e36bbb4b201421b44aa046b3ceb16a",
      "name": "Bill Clark",
      "isPrimary": true
    }
  ]
}' \
 '<${service-instance-url}/access-governance/access-controls/20250331/roles>'

Example Request Payload

{
  "name": "Database Administrator",
  "description": "Responsible for managing database access and ensuring optimized SQL performance.",
  "requestableBy": "ANY",
  "approvalWorkflowId": "NO_APPROVAL_REQUIRED",
  "tags": [
    "UA Role"
  ],
  "accessBundles": [
    {
      "id": "b943f987-xxxx-4bac-bca0-6a09ded5dcad",
      "name": "DBUM Standard SQL Tuning Access UA 8",
      "displayName": "DBUM Standard SQL Tuning Access UA 8",
      "owners": [
        {
          "id": "globalId.125123c3-xxxx-4d6a-b6d4-6c0f6537bad2.18.02e36bbb4b201421b44aa046b3ceb16a",
          "name": "Bill Clark",
          "isPrimary": true
        }
      ]
    }
  ],
  "customAttributes": null,
  "displayName": "Database Administrator Role",
  "owners": [
    {
      "id": "globalId.125123c3-xxxx-4d6a-b6d4-6c0f6537bad2.18.02e36bbb4b201421b44aa046b3ceb16a",
      "name": "Bill Clark",
      "isPrimary": true
    }
  ]
}

Example of the Response Code

It may take a few seconds to create a role. Do not try to abort the request.

You'll receive 200 OK response along with the following response body:

{
    "id": "7642ff7d-xxxx-45c4-88d4-db7d2e79e85f",
    "name": "Database Administrator",
    "description": "Responsible for managing database access and ensuring optimized SQL performance.",
    "requestableBy": {
        "id": "ANY",
        "name": "Anyone",
        "displayName": "Anyone"
    },
    "status": "ACTIVE",
    "approvalWorkflowId": {
        "id": "NO_APPROVAL_REQUIRED",
        "name": "No Approval Required",
        "displayName": "No Approval Required"
    },
    "tags": [
        "Database Role"
    ],
    "accessBundles": null,
    "timeCreated": "2025-04-24T06:55:26.546Z",
    "timeUpdated": "2025-04-24T06:55:26.546Z",
    "ownershipCollectionId": "b384e140-xxxx-413f-843b-bafc38182db7",
    "owners": [
        {
            "id": "globalId.125123c3-xxxx-4d6a-b6d4-6c0f6537bad2.18.02e36bbb4b201421b44aa046b3ceb16a",
            "name": "Bill Clark",
            "isPrimary": true
        }
    ],
    "createdBy": {
        "id": "globalId.125123c3-xxxx-4d6a-b6d4-6c0f6537bad2.18.02e36bbb4b201421b44aa046b3ceb16a",
        "name": "Bill Clark",
        "displayName": "Bill Clark"
    },
    "updatedBy": {
        "id": "globalId.125123c3-xxxx-4d6a-b6d4-6c0f6537bad2.18.02e36bbb4b201421b44aa046b3ceb16a",
        "name": "Bill Clark",
        "displayName": "Bill Clark"
    },
    "customAttributes": null,
    "externalId": "ocid1.agcsgovernanceinstance.dev.dev.xxxxxxxxpzw5rdia4pv5rudpgmf5enb2yzcloj2pbd5ogxaructfrhgbuq7a",
    "displayName": "Database Admin Role"
}

    
Back to Top