Summary
Create a new credential resource and stores it in either the persistent or temporary credential store.
POST /clusters/:clusterName/credentials/:alias
Response
HTTP CODE | Description |
---|---|
201 | Created |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
500 | Internal Server Error |
Examples
Create a credential with an alias of 'external.db' that is stored in the persistent credential store.
POST /clusters/c1/credentials/external.db
{
"Credential" : {
"principal" : "db_admin",
"key" : "S3cr3tK3y!",
"type" : "persisted"
}
}
201 Created
Create a credential with an alias of 'kdc.admin' that is stored in the temporary credential store.
POST /clusters/c1/credentials/kdc.admin
{
"Credential" : {
"principal" : "admin/admin@EXAMPLE.COM",
"key" : "!h4d00p!",
"type" : "temporary"
}
}
201 Created