Skip to content
Niu DocsNiu 牛元文档
Dashboard控制台

Provision or reset an existing member password

Generated from the checked-in source. Do not edit this reference by hand.

PUT /api/v1/operators/{operator}/password

Requires installation administration or an owner permitted to manage the target member’s scope. Admin and viewer roles cannot perform this operation. First provision omits expected_revision; resetting requires the previous returned revision. Changes revoke all previous sessions atomically and append metadata-only audit events. Hashes are never returned. Bodies are limited to 4096 bytes and all success/error responses are non-cacheable.

Operation: setMemberPassword.

Use the credential and permission scope described above. Each object below is an alternative; schemes within one object are required together.

JSON
[
{
"bearerAuth": []
}
]

Set NIU_ORIGIN to your installation origin (without /v1). Replace path, query and header placeholders with the required values. Query examples use curl 7.87 or newer to encode values with --url-query. Use the credential scope described above; a bearer token must have the authority required by this operation.

Shell
curl --fail-with-body -X PUT "$NIU_ORIGIN/api/v1/operators/{operator}/password" \
-H "Authorization: Bearer $NIU_BEARER_TOKEN" \
-H 'Content-Type: application/json' \
--data @request.json

Location: path. Required.

JSON
{
"type": "string",
"format": "uuid"
}

Location: header. Optional.

JSON
{
"type": "string"
}

Required.

JSON
{
"type": "object",
"additionalProperties": false,
"required": [
"email",
"password"
],
"properties": {
"email": {
"type": "string",
"maxLength": 254,
"description": "Unique normalized ASCII email for this member identity."
},
"password": {
"type": "string",
"minLength": 15,
"maxLength": 1024,
"description": "At most 1024 UTF-8 bytes; spaces and Unicode are preserved."
},
"expected_revision": {
"type": [
"integer",
"null"
],
"minimum": 1
}
}
}

New credential revision; no password or hash is returned.

Response headers:

JSON
{
"Cache-Control": {
"schema": {
"type": "string",
"const": "no-store"
}
}
}

Content type: application/json.

JSON
{
"type": "object",
"additionalProperties": false,
"required": [
"revision"
],
"properties": {
"revision": {
"type": "integer",
"minimum": 1
}
}
}

Invalid email, password bounds or JSON request.

Missing, expired or revoked administrative session.

Role or supplied Origin is not permitted.

Member is outside the caller’s scope.

Credential revision changed, member was revoked, or email is already assigned.

Bounded password-worker capacity reached; Retry-After is 60 seconds.

Password sign-in has not been configured.

Durable storage or credential processing is unavailable.

Requires installation administration or an owner permitted to manage the target member’s scope. Admin and viewer roles cannot perform this operation. First provision omits expected_revision; resetting requires the previous returned revision. Changes revoke all previous sessions atomically and append metadata-only audit events. Hashes are never returned. Bodies are limited to 4096 bytes and all success/error responses are non-cacheable.