# ExternalAccountsResource Resource

Manage external accounts used by various Cloudera Manager features, for performing external tasks.

### POST /externalAccounts/create

Create a new external account. Account names and display names must be unique, i.e. they must not share names or display names with an existing account. Server generates an account ID for the requested account.

Request Body
media type | data type
--- | ---
application/json | ApiExternalAccount (JSON)

Response Body
media type | data type | description
--- | --- | ---
application/json | ApiExternalAccount (JSON) |

### GET /externalAccounts/supportedCategories

List of external account categories supported by this Cloudera Manager.

Response Body
media type | data type | description
--- | --- | ---
application/json | ApiExternalAccountCategoryList (JSON) | external account categories

### PUT /externalAccounts/update

Update an external account.

Request Body
media type | data type
--- | ---
application/json | ApiExternalAccount (JSON)

Response Body
media type | data type | description
--- | --- | ---
application/json | ApiExternalAccount (JSON) |

### GET /externalAccounts/account/{name}

Get a single external account by account name.

Request Parameters
name | type | description | default
--- | --- | --- | ---
name | path |  | n/a
view | query |  | n/a

Response Body
media type | data type | description
--- | --- | ---
application/json | ApiExternalAccount (JSON) |

### GET /externalAccounts/accountByDisplayName/{displayName}

Get a single external account by display name.

Request Parameters
name | type | description | default
--- | --- | --- | ---
displayName | path |  | n/a
view | query |  | n/a

Response Body
media type | data type | description
--- | --- | ---
application/json | ApiExternalAccount (JSON) |

### DELETE /externalAccounts/delete/{name}

Delete an external account, specifying its name.

Request Parameters
name | type | description | default
--- | --- | --- | ---
name | path |  | n/a

Response Body
media type | data type | description
--- | --- | ---
application/json | ApiExternalAccount (JSON) |

### GET /externalAccounts/supportedTypes/{categoryName}

List of external account types supported by this Cloudera Manager by category.

Request Parameters
name | type | description | default
--- | --- | --- | ---
categoryName | path |  | n/a

Response Body
media type | data type | description
--- | --- | ---
application/json | ApiExternalAccountTypeList (JSON) |

### GET /externalAccounts/type/{typeName}

Get a list of external accounts for a specific account type.

Request Parameters
name | type | description | default
--- | --- | --- | ---
typeName | path |  | n/a
view | query |  | n/a

Response Body
media type | data type | description
--- | --- | ---
application/json | ApiExternalAccountList (JSON) |

### GET /externalAccounts/account/{name}/config

Get configs of external account for the given account name.

Request Parameters
name | type | description | default
--- | --- | --- | ---
name | path | The external account name | n/a
view | query | The view to materialize, either "summary" or "full". | summary

Response Body
media type | data type | description
--- | --- | ---
application/json | ApiConfigList (JSON) | the current external account configurations.

### PUT /externalAccounts/account/{name}/config

Upadate configs of external account for the given account name.

Request Parameters
name | type | description | default
--- | --- | --- | ---
name | path | The external account name | n/a
message | query | Optional message describing the changes. | n/a

Request Body
media type | data type | description
--- | --- | ---
application/json | ApiConfigList (JSON) | Settings to update.

Response Body
media type | data type | description
--- | --- | ---
application/json | ApiConfigList (JSON) | The updated configuration.

### GET /externalAccounts/account/{name}/credentials

Get un-redacted credentials of an external account for the given account name, currently supported only for ALTUS accounts.

Request Parameters
name | type | description | default
--- | --- | --- | ---
name | path | The external account name | n/a

Response Body
media type | data type | description
--- | --- | ---
application/json | ApiConfigList (JSON) | the current external account credentials without redaction

### GET /externalAccounts/typeInfo/{typeName}/commandsByName

Lists all the commands that can be executed by name on the provided external account type.

Available since API v16.

Request Parameters
name | type | description | default
--- | --- | --- | ---
typeName | path | The external account type name | n/a

Response Body
media type | data type | description
--- | --- | ---
application/json | ApiCommandMetadataList (JSON) | a list of command metadata objects

### POST /externalAccounts/account/{name}/commands/{commandName}

Executes a command on the external account specified by name.

Available since API v16.

Request Parameters
name | type | description | default
--- | --- | --- | ---
commandName | path | The command name. | n/a
name | path | The external account name. | n/a

Response Body
media type | data type | description
--- | --- | ---
application/json | ApiCommand (JSON) | Information about the submitted command.