Create a new role

post

https://EM_HOST:EM_CONSOLE_HTTPS_PORT/em/api/roles

The API creates a new role.

Request

There are no request parameters for this operation.

Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Input for creating a Role
Show Source
Match All
Show Source
Nested Schema : grantees
Type: array
List of Users whom the role has been granted
Show Source
Nested Schema : privilegeGrants
Type: array
List of Privileges given to the Role
Show Source
Nested Schema : roleGrants
Type: array
List of Roles granted to the Role
Show Source
Nested Schema : type
Type: array
Type of Role. Default is "EM Role".
Show Source
  • Allowed Values: [ "EM Role", "External Role", "Oracle Defined Role" ]
    This is the representation of types of Roles.
Example:
EM Role
Nested Schema : RoleCommonDetails
Type: object
It represents some information of a Role
Show Source
  • Description about the Role
    Example: Role has privileges to perform Enterprise Manager administrative operations
  • Private Role has WITH_ADMIN or not. This attribute exists only for Private Roles.
    Example: true
Nested Schema : GranteeSummary
Type: object
It represents User or Role to whom a Role is granted
Show Source
Nested Schema : type
Type: array
Type of Grantee
Show Source
  • Allowed Values: [ "User", "Role" ]
    This is the representation of types of Grantees.
Example:
User
Nested Schema : PrivilegeGrantDetails
Type: object
Privilege Grant details for createing/modifying a User or a Role
Show Source
Nested Schema : secureResources
Type: array
List of SecureResources on which the Privilege is applicable
Show Source
Nested Schema : SecureResourceDetails
Type: object
It represents Secure Resource details for creating/modifying a User or a Role.
Show Source
Nested Schema : propagationPolicy
Type: array
Scope where the privilege is applicable to. This is applicable only for Secure Resource Type called TARGET.
Show Source
  • Allowed Values: [ "ALL", "SELF", "MEMBERS" ]
    This gives type where a privilege is applicable to which part of composite resource. - ALL means the privilege is given for composite resource and its members. - SELF means the privilege is given only for composite resource. - MEMBERS means the privilege is given only for members of composite resource.
Example:
MEMBERS
Nested Schema : RoleGrantSummary
Type: object
Info about Role granted to a User or to an another Role
Show Source
  • Read Only: true
    Description about the Role
    Example: This Role is an Test Role
  • Read Only: true
    Unique identifier for a Role Grant
    Example: B0F9D83F6E313B03E0537013790ACA39
  • Read Only: true
    Flag says whether grant Role is a private role or not.
    Example: true
  • Read Only: true
    Flag says whether Private Role is granted as WITH_ADMIN, This is shown if the Role is a private role
    Example: true
  • links
  • Name of a Role
    Example: EM_ALL_ADMINISTRATOR
  • Read Only: true
    Owner / Creator of the Role
    Example: SYSMAN
  • Read Only: true
    Type of Role like EM Role, Oracle Defined Role, External Role
    Example: Oracle Defined Role
Back to Top

Response

Supported Media Types

201 Response

Role created successfully
Headers
Body ()
Root Schema : Role
Type: object
It represents a Role
Show Source
Match All
Show Source
Nested Schema : grantees
Type: array
List of Users whom the role has been granted
Show Source
Nested Schema : privilegeGrants
Type: array
List of Privileges given to the Role
Show Source
Nested Schema : roleGrants
Type: array
List of Roles granted to the Role
Show Source
Nested Schema : RoleDetails
Type: object
It represents a Role
Show Source
Match All
Show Source
Nested Schema : RoleCommonDetails
Type: object
It represents some information of a Role
Show Source
  • Description about the Role
    Example: Role has privileges to perform Enterprise Manager administrative operations
  • Private Role has WITH_ADMIN or not. This attribute exists only for Private Roles.
    Example: true
Nested Schema : GranteeSummary
Type: object
It represents User or Role to whom a Role is granted
Show Source
Nested Schema : type
Type: array
Type of Grantee
Show Source
  • Allowed Values: [ "User", "Role" ]
    This is the representation of types of Grantees.
Example:
User
Nested Schema : PrivilegeGrantSummary
Type: object
Privilege Grant to a User or to a Role
Show Source
Nested Schema : scope
Type: array
Read Only: true
Scope of the Privilege
Show Source
  • Allowed Values: [ "INSTANCE", "CLASS", "SYSTEM", "SET" ]
    This is the representation of scopes of privileges.
Example:
INSTANCE
Nested Schema : RoleGrantSummary
Type: object
Info about Role granted to a User or to an another Role
Show Source
  • Read Only: true
    Description about the Role
    Example: This Role is an Test Role
  • Read Only: true
    Unique identifier for a Role Grant
    Example: B0F9D83F6E313B03E0537013790ACA39
  • Read Only: true
    Flag says whether grant Role is a private role or not.
    Example: true
  • Read Only: true
    Flag says whether Private Role is granted as WITH_ADMIN, This is shown if the Role is a private role
    Example: true
  • links
  • Name of a Role
    Example: EM_ALL_ADMINISTRATOR
  • Read Only: true
    Owner / Creator of the Role
    Example: SYSMAN
  • Read Only: true
    Type of Role like EM Role, Oracle Defined Role, External Role
    Example: Oracle Defined Role

400 Response

Bad Request
Body ()
Root Schema : ErrorResponse
Type: object
Error response
Show Source

401 Response

Unauthorized
Body ()
Root Schema : ErrorResponse
Type: object
Error response
Show Source

409 Response

Duplicate Resource
Body ()
Root Schema : ErrorResponse
Type: object
Error response
Show Source

500 Response

Internal Server Error
Body ()
Root Schema : ErrorResponse
Type: object
Error response
Show Source

503 Response

Service Unavailable
Body ()
Root Schema : ErrorResponse
Type: object
Error response
Show Source

Default Response

Unexpected Error
Body ()
Root Schema : ErrorResponse
Type: object
Error response
Show Source
Back to Top