Create Credential

Back to Credential Resources

Summary

Create a new credential resource and stores it in either the persistent or temporary credential store.

POST /clusters/:clusterName/credentials/:alias

Response

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