Set a named credential as preferred credential
post
https://EM_HOST:EM_CONSOLE_HTTPS_PORT/em/api/namedCredentials/actions/setPreferredCredential
Sets an existing named credential as preferred for the target type/target instance and set name provided in the payload.
Request
There are no request parameters for this operation.
Supported Media Types
- application/json
Root Schema : schema
Type:
objectSchema object to hold Preferred Credential data required in the setPreferredCredential action. credGuid can be passed or credName and credOwner combination in order to find the named credential to set as preferred.
Show Source
-
authenticationTargetType: string
The authenticating target type. Defaults to targetTypeNameExample:
host -
credGuid: string
Unique identifier for a named credentialExample:
B0FBBE587FD201E2E0537013790A7D03 -
credName: string
Name for a named credentialExample:
NAMEDCRED1 -
credOwner: string
User owner of the named credentialExample:
SYSMAN -
forUser: string
User for which preferred credential is being setExample:
SYSMAN -
isAuthenticationRequired: boolean
true if authentication is required before saving credentialExample:
false
Match All
Schema object to hold Preferred Credential data required in the setPreferredCredential action. credGuid can be passed or credName and credOwner combination in order to find the named credential to set as preferred.
Show Source
-
object
PreferredCredentialCommon
Common schema object to hold Preferred Credential data
Nested Schema : PreferredCredentialCommon
Type:
objectCommon schema object to hold Preferred Credential data
Show Source
-
isDefault(required): boolean
true when preferred credential is target type level. false when it is target instance levelExample:
false -
isGlobal(required): boolean
true when preferred credential is global scope. false when it is User scope.Example:
true -
setName(required): string
Name for a credential setExample:
HostCredsNormal -
targetGuid: string
Target instance id of a preferred credential.Example:
A3CDDE587FD221E2F3539013290B7F05 -
targetName: string
Target instance name for which named credential is authenticated toExample:
host.us.oracle.com -
targetTypeName: string
Name of the target typeExample:
host
Examples
Back to Top
Response
Supported Media Types
- application/json
200 Response
Preferred credential set successfully
Root Schema : PreferredCredential
Type:
objectSchema object to hold Preferred Credential data returned from the search action
Show Source
-
credGuid: string
Unique identifier for a named credentialExample:
B0FBBE587FD201E2E0537013790A7D03 -
isCredSetConfigured: boolean
true when preferred credential is configured for given case and link to NC is available. when effective value is there and not configured set as false but NC link is available. If no Preferred set at all then false and no link to NC.Example:
false -
links: object
links
Read Only:
truethe credential name and target links associated to the preferred credentials -
targetTypeGuid: string
Unique identifier for target typeExample:
DD395385F69A25570431A719EEA45030
Match All
Schema object to hold Preferred Credential data returned from the search action
Show Source
-
object
PreferredCredentialCommon
Common schema object to hold Preferred Credential data
Nested Schema : links
Type:
objectRead Only:
truethe credential name and target links associated to the preferred credentials
Show Source
Nested Schema : PreferredCredentialCommon
Type:
objectCommon schema object to hold Preferred Credential data
Show Source
-
isDefault(required): boolean
true when preferred credential is target type level. false when it is target instance levelExample:
false -
isGlobal(required): boolean
true when preferred credential is global scope. false when it is User scope.Example:
true -
setName(required): string
Name for a credential setExample:
HostCredsNormal -
targetGuid: string
Target instance id of a preferred credential.Example:
A3CDDE587FD221E2F3539013290B7F05 -
targetName: string
Target instance name for which named credential is authenticated toExample:
host.us.oracle.com -
targetTypeName: string
Name of the target typeExample:
host
400 Response
Bad Request
Root Schema : ErrorResponse
Type:
objectResponse sent back in the case of an Error
Show Source
-
code(required): string
The status code of the error
-
message(required): string
A descriptive error message
401 Response
Unauthorized
Root Schema : ErrorResponse
Type:
objectResponse sent back in the case of an Error
Show Source
-
code(required): string
The status code of the error
-
message(required): string
A descriptive error message
403 Response
Forbidden
Root Schema : MissingPrivErrorResponse
Type:
objectResponse sent back as an Error in case required privileges are missing
Show Source
-
missingPrivileges: array
missingPrivileges
Privileges which are missing due to that the Error is occurred. This will have privilege internal name and display name only in the Privilege object
Match All
Response sent back as an Error in case required privileges are missing
Show Source
-
object
ErrorResponse
Response sent back in the case of an Error
Nested Schema : missingPrivileges
Type:
arrayPrivileges which are missing due to that the Error is occurred. This will have privilege internal name and display name only in the Privilege object
Show Source
-
Array of:
object MissingPrivilegeSummary
It represents a Privilege which is missing on a Resource to view or manage it.
Nested Schema : ErrorResponse
Type:
objectResponse sent back in the case of an Error
Show Source
-
code(required): string
The status code of the error
-
message(required): string
A descriptive error message
Nested Schema : MissingPrivilegeSummary
Type:
objectIt represents a Privilege which is missing on a Resource to view or manage it.
Show Source
-
displayName: string
Display Name of PrivilegeExample:
Manage -
name: string
Name of PrivilegeExample:
MANAGE_JOB
409 Response
Duplicate Resource
Root Schema : ErrorResponse
Type:
objectResponse sent back in the case of an Error
Show Source
-
code(required): string
The status code of the error
-
message(required): string
A descriptive error message
500 Response
Internal Server Error
Root Schema : ErrorResponse
Type:
objectResponse sent back in the case of an Error
Show Source
-
code(required): string
The status code of the error
-
message(required): string
A descriptive error message
503 Response
Service Unavailable
Root Schema : ErrorResponse
Type:
objectResponse sent back in the case of an Error
Show Source
-
code(required): string
The status code of the error
-
message(required): string
A descriptive error message