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

Issue an additional one-time operator session token

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

POST /api/v1/operators/{operator}/sessions

Operation: adminIssueOperatorSession.

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

JSON
[
{
"adminBearerAuth": []
}
]

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 POST "$NIU_ORIGIN/api/v1/operators/{operator}/sessions" \
-H "Authorization: Bearer $NIU_ADMIN_TOKEN" \
-H 'Content-Type: application/json' \
--data @request.json

Location: path. Required.

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

Required.

JSON
{
"type": "object",
"additionalProperties": false,
"required": [
"expires_in_seconds"
],
"properties": {
"expires_in_seconds": {
"type": "integer",
"minimum": 60,
"maximum": 31536000
}
}
}

Session created; response includes Cache-Control no-store and the token is shown once.

Session lifetime is outside the supported range.

Missing, invalid, expired or revoked credentials.

The authenticated operator is not an owner.

Operator is unavailable.