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
- application/json
Root Schema : schema
Type:
objectInput for creating a Role
Show Source
-
grantees: array
grantees
List of Users whom the role has been granted
-
isPrivate: boolean
Role is a private role or notExample:
false -
name(required): string
Name of the RoleExample:
CLOUD_ADMIN_ROLE -
privilegeGrants: array
privilegeGrants
List of Privileges given to the Role
-
roleGrants: array
roleGrants
List of Roles granted to the Role
-
type: array
type
Type of Role. Default is "EM Role".
Match All
Input for creating a Role
Show Source
-
object
RoleCommonDetails
It represents some information of a Role
Nested Schema : grantees
Type:
arrayList of Users whom the role has been granted
Show Source
-
Array of:
object GranteeSummary
It represents User or Role to whom a Role is granted
Nested Schema : privilegeGrants
Type:
arrayList of Privileges given to the Role
Show Source
-
Array of:
object PrivilegeGrantDetails
Privilege Grant details for createing/modifying a User or a Role
Nested Schema : roleGrants
Type:
arrayList of Roles granted to the Role
Show Source
-
Array of:
object RoleGrantSummary
Info about Role granted to a User or to an another Role
Nested Schema : type
Type:
arrayType of Role. Default is "EM Role".
Show Source
-
Array of:
string
Allowed Values:
[ "EM Role", "External Role", "Oracle Defined Role" ]This is the representation of types of Roles.
Example:
EM RoleNested Schema : RoleCommonDetails
Type:
objectIt represents some information of a Role
Show Source
-
description: string
Description about the RoleExample:
Role has privileges to perform Enterprise Manager administrative operations -
isWithAdmin: boolean
Private Role has WITH_ADMIN or not. This attribute exists only for Private Roles.Example:
true
Nested Schema : GranteeSummary
Type:
objectIt represents User or Role to whom a Role is granted
Show Source
-
id: string
Read Only:
trueUnique identifier for a Grantee (User or Role)Example:B0F9D83F6E313B03E0537013790ACA39 -
isWithAdmin: boolean
If a Grantee is a User, this flag says whether the Private Role has been granted as WITH_ADMINExample:
true -
links: object
links
Read Only:
trueThe Grantee related links -
name: string
Name of a GranteeExample:
TEST_SUPER_ADMIN -
type: array
type
Type of Grantee
Nested Schema : links
Type:
objectRead Only:
trueThe Grantee related links
Show Source
-
self: object
Link
A link referencing a REST API.
Nested Schema : type
Type:
arrayType of Grantee
Show Source
-
Array of:
string
Allowed Values:
[ "User", "Role" ]This is the representation of types of Grantees.
Example:
UserNested Schema : PrivilegeGrantDetails
Type:
objectPrivilege Grant details for createing/modifying a User or a Role
Show Source
-
name: string
Name of a PrivilegeExample:
VIEW_TARGET -
secureResources: array
secureResources
List of SecureResources on which the Privilege is applicable
Nested Schema : secureResources
Type:
arrayList of SecureResources on which the Privilege is applicable
Show Source
-
Array of:
object SecureResourceDetails
It represents Secure Resource details for creating/modifying a User or a Role.
Nested Schema : SecureResourceDetails
Type:
objectIt represents Secure Resource details for creating/modifying a User or a Role.
Show Source
-
id: string
Id of the ResourceExample:
DE5CD14CE9D0C0EBEFFFDDEBAA83DA33 -
propagationPolicy: array
propagationPolicy
Scope where the privilege is applicable to. This is applicable only for Secure Resource Type called TARGET.
Nested Schema : propagationPolicy
Type:
arrayScope where the privilege is applicable to. This is applicable only for Secure Resource Type called TARGET.
Show Source
-
Array of:
string
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:
MEMBERSNested Schema : RoleGrantSummary
Type:
objectInfo about Role granted to a User or to an another Role
Show Source
-
description: string
Read Only:
trueDescription about the RoleExample:This Role is an Test Role -
id: string
Read Only:
trueUnique identifier for a Role GrantExample:B0F9D83F6E313B03E0537013790ACA39 -
isPrivate: boolean
Read Only:
trueFlag says whether grant Role is a private role or not.Example:true -
isWithAdmin: boolean
Read Only:
trueFlag says whether Private Role is granted as WITH_ADMIN, This is shown if the Role is a private roleExample:true -
links: object
links
Read Only:
trueThe Role related links -
name: string
Name of a RoleExample:
EM_ALL_ADMINISTRATOR -
owner: string
Read Only:
trueOwner / Creator of the RoleExample:SYSMAN -
type: string
Read Only:
trueType of Role like EM Role, Oracle Defined Role, External RoleExample:Oracle Defined Role
Nested Schema : links
Type:
objectRead Only:
trueThe Role related links
Show Source
-
roleLink: object
Link
A link referencing a REST API.
Response
Supported Media Types
- application/json
201 Response
Role created successfully
Headers
-
Location:
URL to get the Role got created.
Root Schema : Role
Type:
objectIt represents a Role
Show Source
-
grantees: array
grantees
List of Users whom the role has been granted
-
privilegeGrants: array
privilegeGrants
List of Privileges given to the Role
-
roleGrants: array
roleGrants
List of Roles granted to the Role
Match All
It represents a Role
Show Source
-
object
allOf
RoleDetails
It represents a Role
Nested Schema : grantees
Type:
arrayList of Users whom the role has been granted
Show Source
-
Array of:
object GranteeSummary
It represents User or Role to whom a Role is granted
Nested Schema : privilegeGrants
Type:
arrayList of Privileges given to the Role
Show Source
-
Array of:
object PrivilegeGrantSummary
Privilege Grant to a User or to a Role
Nested Schema : roleGrants
Type:
arrayList of Roles granted to the Role
Show Source
-
Array of:
object RoleGrantSummary
Info about Role granted to a User or to an another Role
Nested Schema : RoleDetails
Type:
objectIt represents a Role
Show Source
-
id: string
Read Only:
trueUnique identifier for a RoleExample:B0F9D83F6E313B03E0537013790ACA39 -
isPrivate: boolean
Role is a private role or notExample:
false -
links: object
links
Read Only:
truethe Role related links -
name: string
Name of a RoleExample:
EM_ALL_ADMINISTRATOR -
owner: string
Read Only:
trueUser who owns the RoleExample:SYSMAN -
type: array
type
Type of Role
Match All
It represents a Role
Show Source
-
object
RoleCommonDetails
It represents some information of a Role
Nested Schema : RoleCommonDetails
Type:
objectIt represents some information of a Role
Show Source
-
description: string
Description about the RoleExample:
Role has privileges to perform Enterprise Manager administrative operations -
isWithAdmin: boolean
Private Role has WITH_ADMIN or not. This attribute exists only for Private Roles.Example:
true
Nested Schema : GranteeSummary
Type:
objectIt represents User or Role to whom a Role is granted
Show Source
-
id: string
Read Only:
trueUnique identifier for a Grantee (User or Role)Example:B0F9D83F6E313B03E0537013790ACA39 -
isWithAdmin: boolean
If a Grantee is a User, this flag says whether the Private Role has been granted as WITH_ADMINExample:
true -
links: object
links
Read Only:
trueThe Grantee related links -
name: string
Name of a GranteeExample:
TEST_SUPER_ADMIN -
type: array
type
Type of Grantee
Nested Schema : links
Type:
objectRead Only:
trueThe Grantee related links
Show Source
-
self: object
Link
A link referencing a REST API.
Nested Schema : type
Type:
arrayType of Grantee
Show Source
-
Array of:
string
Allowed Values:
[ "User", "Role" ]This is the representation of types of Grantees.
Example:
UserNested Schema : PrivilegeGrantSummary
Type:
objectPrivilege Grant to a User or to a Role
Show Source
-
description: string
Read Only:
trueDescription about the PrivilegeExample:Ability to view Jobs -
displayName: string
Read Only:
trueDisplay name of the PrivilegeExample:View Report -
links: object
links
links related to the privilege grant
-
name: string
Name of a PrivilegeExample:
VIEW_TARGET -
scope: array
scope
Read Only:
trueScope of the Privilege -
secureResourceType: string
Read Only:
trueSecureResource Type of the PrivilegeExample:JOB
Nested Schema : links
Type:
objectlinks related to the privilege grant
Show Source
-
privilege: object
Link
A link referencing a REST API.
-
secureResources: object
Link
A link referencing a REST API.
Nested Schema : scope
Type:
arrayRead Only:
trueScope of the Privilege
Show Source
-
Array of:
string
Allowed Values:
[ "INSTANCE", "CLASS", "SYSTEM", "SET" ]This is the representation of scopes of privileges.
Example:
INSTANCENested Schema : RoleGrantSummary
Type:
objectInfo about Role granted to a User or to an another Role
Show Source
-
description: string
Read Only:
trueDescription about the RoleExample:This Role is an Test Role -
id: string
Read Only:
trueUnique identifier for a Role GrantExample:B0F9D83F6E313B03E0537013790ACA39 -
isPrivate: boolean
Read Only:
trueFlag says whether grant Role is a private role or not.Example:true -
isWithAdmin: boolean
Read Only:
trueFlag says whether Private Role is granted as WITH_ADMIN, This is shown if the Role is a private roleExample:true -
links: object
links
Read Only:
trueThe Role related links -
name: string
Name of a RoleExample:
EM_ALL_ADMINISTRATOR -
owner: string
Read Only:
trueOwner / Creator of the RoleExample:SYSMAN -
type: string
Read Only:
trueType of Role like EM Role, Oracle Defined Role, External RoleExample:Oracle Defined Role
Nested Schema : links
Type:
objectRead Only:
trueThe Role related links
Show Source
-
roleLink: object
Link
A link referencing a REST API.
400 Response
Bad Request
Root Schema : ErrorResponse
Type:
objectResponse sent back in the case of an error.
Show Source
-
code: string
Status code of the error.Example:
IllegalArgument -
message: string
A descriptive error message.Example:
argument given is not supported
401 Response
Unauthorized
Root Schema : ErrorResponse
Type:
objectResponse sent back in the case of an error.
Show Source
-
code: string
Status code of the error.Example:
IllegalArgument -
message: string
A descriptive error message.Example:
argument given is not supported
409 Response
Duplicate Resource
Root Schema : ErrorResponse
Type:
objectResponse sent back in the case of an error.
Show Source
-
code: string
Status code of the error.Example:
IllegalArgument -
message: string
A descriptive error message.Example:
argument given is not supported
500 Response
Internal Server Error
Root Schema : ErrorResponse
Type:
objectResponse sent back in the case of an error.
Show Source
-
code: string
Status code of the error.Example:
IllegalArgument -
message: string
A descriptive error message.Example:
argument given is not supported
503 Response
Service Unavailable
Root Schema : ErrorResponse
Type:
objectResponse sent back in the case of an error.
Show Source
-
code: string
Status code of the error.Example:
IllegalArgument -
message: string
A descriptive error message.Example:
argument given is not supported
Default Response
Unexpected Error
Root Schema : ErrorResponse
Type:
objectResponse sent back in the case of an error.
Show Source
-
code: string
Status code of the error.Example:
IllegalArgument -
message: string
A descriptive error message.Example:
argument given is not supported