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
customer facing error code
-
details: array
details
(Optional) List of additional details for the errors found.
-
message(required): string
customer facing error description
Nested Schema : details
Type:
array(Optional) List of additional details for the errors found.
Show Source
-
Array of:
object ErrorDetail
listed as part of ErrorResponse
Nested Schema : ErrorDetail
Type:
objectlisted as part of ErrorResponse
Show Source
-
message(required): string
specific error description
401 Response
Client is not authenticated
Root Schema : ErrorResponse
Type:
objectResponse sent back in the case of an Error
Show Source
-
code(required): string
customer facing error code
-
details: array
details
(Optional) List of additional details for the errors found.
-
message(required): string
customer facing error description
Nested Schema : details
Type:
array(Optional) List of additional details for the errors found.
Show Source
-
Array of:
object ErrorDetail
listed as part of ErrorResponse
Nested Schema : ErrorDetail
Type:
objectlisted as part of ErrorResponse
Show Source
-
message(required): string
specific error description
403 Response
Forbidden. The user is forbidden to perform the requested operation
Root Schema : ErrorResponse
Type:
objectResponse sent back in the case of an Error
Show Source
-
code(required): string
customer facing error code
-
details: array
details
(Optional) List of additional details for the errors found.
-
message(required): string
customer facing error description
Nested Schema : details
Type:
array(Optional) List of additional details for the errors found.
Show Source
-
Array of:
object ErrorDetail
listed as part of ErrorResponse
Nested Schema : ErrorDetail
Type:
objectlisted as part of ErrorResponse
Show Source
-
message(required): string
specific error description
409 Response
Conflict
Root Schema : ErrorResponse
Type:
objectResponse sent back in the case of an Error
Show Source
-
code(required): string
customer facing error code
-
details: array
details
(Optional) List of additional details for the errors found.
-
message(required): string
customer facing error description
Nested Schema : details
Type:
array(Optional) List of additional details for the errors found.
Show Source
-
Array of:
object ErrorDetail
listed as part of ErrorResponse
Nested Schema : ErrorDetail
Type:
objectlisted as part of ErrorResponse
Show Source
-
message(required): string
specific error description
500 Response
Internal Server Error
Root Schema : ErrorResponse
Type:
objectResponse sent back in the case of an Error
Show Source
-
code(required): string
customer facing error code
-
details: array
details
(Optional) List of additional details for the errors found.
-
message(required): string
customer facing error description
Nested Schema : details
Type:
array(Optional) List of additional details for the errors found.
Show Source
-
Array of:
object ErrorDetail
listed as part of ErrorResponse
Nested Schema : ErrorDetail
Type:
objectlisted as part of ErrorResponse
Show Source
-
message(required): string
specific error description
503 Response
Indicates that a required service is not available
Root Schema : ErrorResponse
Type:
objectResponse sent back in the case of an Error
Show Source
-
code(required): string
customer facing error code
-
details: array
details
(Optional) List of additional details for the errors found.
-
message(required): string
customer facing error description
Nested Schema : details
Type:
array(Optional) List of additional details for the errors found.
Show Source
-
Array of:
object ErrorDetail
listed as part of ErrorResponse
Nested Schema : ErrorDetail
Type:
objectlisted as part of ErrorResponse
Show Source
-
message(required): string
specific error description