Create Api Key
API キー発行。平文キーはこのレスポンスでのみ返す(保存はハッシュ)。
POST
/api-keysHeader parameters
authorizationstring | anyX-Api-Keystring | anyRequest body
requiredapplication/jsonnamestringrequiredrolestringdefault: "viewer"
Responses
200Successful Response
any422Validation Error
detailValidationError[]Show propertiesHide properties
Array of
ValidationErrorlocstring | integer[]requiredShow propertiesHide properties
Array of
string | integerAny of:
string
stringinteger
integermsgstringrequiredtypestringrequiredRequest
curl -X POST "/api-keys" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"role": "viewer"
}'const response = await fetch("/api-keys", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "string",
"role": "viewer"
})
});import requests
response = requests.post(
"/api-keys",
headers={
"Content-Type": "application/json"
},
json={
"name": "string",
"role": "viewer"
},
)Response
"string"{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}