Skip to navigation

Create Or Update BMC Credential

View as Markdown

Create or update a site-wide or per-BMC root credential. Equivalent to nico-admin-cli credential add-bmc.

When kind is SiteWideRoot and Core uses bmc_site_wide_root_source = "local", Core rejects the write with 412; before any managed device uses version 0, supply or correct it through the configured local environment or credential file. After ingestion, leave the local value unchanged and use BMC credential rotation to advance to a backend-managed version. This source policy does not block BMCRoot writes.

User must have authorization role with PROVIDER_ADMIN suffix.

Authentication

AuthorizationBearer
export JWT_BEARER_TOKEN="<jwt-bearer-token>"

# Example org name: "acme-inc
export ORG_NAME=<org-name>

# Use the JWT bearer token in your API request auth header:
curl -v -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $JWT_BEARER_TOKEN" https://nico-rest-api.nico.svc.cluster.local/v2/org/$ORG_NAME/nico/user/current

Path parameters

orgstringRequired
Name of the Org

Request

This endpoint expects an object.
siteIdstringRequiredformat: "uuid"
ID of the Site where the credential is stored.
kindenumRequired
Which BMC credential to store.
Allowed values:
passwordstringRequired>=1 character
Credential password.
usernamestringOptional

Optional username; Core defaults to “root” for BMCRoot when omitted.

macAddressstringOptional
BMC MAC address. Required for kind BMCRoot, ignored for SiteWideRoot.

Response

BMC credential was created or updated
siteIdstringformat: "uuid"
ID of the Site where the credential is stored.
kindenum
Which BMC credential was stored.
Allowed values:
usernamestringOptional

Optional username; Core defaults to “root” for BMCRoot when omitted.

macAddressstringOptional
BMC MAC address. Required for kind BMCRoot, ignored for SiteWideRoot.

Errors

400
Bad Request Error
403
Forbidden Error
412
Precondition Failed Error