Skip to content

Get the staging copy's password

GET /v1/sites/{siteId}/staging/password-protection

Returns the username and password visitors enter to see the staging copy while its password protection is on (settings.protect). It isn't the WordPress login: the copy's WordPress users and passwords are the live site's. Change them with PUT /sites/{siteId}/staging/settings. Every call is written to the token's activity.

Scopes

The token needs this scope. Without it, the request is refused with insufficient_scope (see Scopes).

sites:files
Files and logins. File Manager, WordPress logins, cron jobs, backup downloads and backup storage. Full access to the sites' code and data.

Path parameters

FieldType and description
siteId Required

string

The live site's id (never the staging copy's).

Example request

curl "https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d/staging/password-protection" \
  -H "Authorization: Bearer $RABBITFLARE_TOKEN"

Response

200 OK Returns the StagingPasswordProtection object in data.

The StagingPasswordProtection object's fields 2 fields
FieldType and description
username

string

The username.

password

string

The password.

Example response

200 OK
{
  "data": {
    "username": "staging",
    "password": "k7Qm2vXc9RtLp4Wz8NbY"
  }
}

Errors

The errors this request can answer besides those every request can (a missing token, a missing scope, the rate limits). Each answer is an Error object (see Errors).

Status and codeWhen, and what to do
404 not_found

The resource doesn't exist, or isn't this account's.

Check the id. Ids of other accounts' resources answer the same way.

409 staging_copy

This site is a staging copy, which can't do this.

Do it on the live site. A staging copy is managed through its live site's staging operations.

409 no_staging

The site has no staging copy.

Create one first: POST /v1/sites/{siteId}/staging.

409 staging_unavailable

The staging copy can't be used for this now: it's still being created, or it's being removed.

Check copy.status in GET /v1/sites/{siteId}/staging, and try again once it's active.

Rate limit

Read requests: 120 a minute per token, 240 per account. More in Rate limits.

Added on .

Popular

API docs