CorefinityCorefinityDocs
Open the Control PanelControl Panel
Database · 1 of 11

Reveal a site's own database login

Answers the login the site's application uses for its database: the host and port as the site itself reaches them, the database name, the username and the password. It needs the exec scope, the answer is never cached, and every reveal is recorded with the person who asked. Nothing is changed: the request has no body.

POST/api/corestack/sites/{site}/credentials/database

Path parameters

siteintegerRequired

The id of a site row. A website's production site and each of its environments has its own id. Digits only. At least 1.

Returns

200 The login. Keep it out of logs and tickets.

Fields of the 200 answer
hoststringRequired

The database's address as the site itself reaches it. It is not reachable from outside the site.

namestringRequired

The database's name.

passwordstringRequired

The password, in plain text.

portintegerRequired
revealed_atstringRequired

Format: date-time.

usernamestringRequired

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403company_unavailableYour company is unavailable.
403scope_requiredUse a token with the scope named in scope.
403two_factor_requiredTurn on two-factor on your account, then send again.
404noneCheck the id. You see only what your account can reach.
429rate_limitedWait for the seconds in Retry-After.
502upstream_unavailableA service the action depends on did not answer. Try again later.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl -X POST https://manage.corefinity.com/api/corestack/sites/1042/credentials/database \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "host": "127.0.0.1",
  "name": "wordpress",
  "password": "example-password-not-a-secret",
  "port": 3306,
  "revealed_at": "2026-11-03T09:16:40Z",
  "username": "application"
}
Try it

Try it is off for this endpointIt reveals a secret. Copy the request and run it yourself when you are sure.

Was this helpful?
Open in ClaudeOpen in ChatGPT