router/api-router.go:292。controller.UpdateToken,controller/token.go:402。api_key:write。同时需要满足接口的角色和业务要求。Authorization: Bearer ********************curl --location --request PUT '/api/token/?status_only=' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"id": 0,
"user_id": 0,
"key": "string",
"status": 0,
"name": "string",
"created_time": 0,
"accessed_time": 0,
"expired_time": 0,
"remain_quota": 0,
"unlimited_quota": true,
"model_limits_enabled": true,
"model_limits": "string",
"allow_ips": "string",
"used_quota": 0,
"group": "string",
"cross_group_retry": true,
"DeletedAt": null,
"allow_user_quota_query": true,
"auto_groups": {
"Set": true,
"Groups": [
"string"
],
"property1": "string",
"property2": "string"
},
"property1": "string",
"property2": "string"
}'{
"data": {
"id": 0,
"user_id": 0,
"key": "string",
"status": 0,
"name": "string",
"created_time": 0,
"accessed_time": 0,
"expired_time": 0,
"remain_quota": 0,
"unlimited_quota": true,
"model_limits_enabled": true,
"model_limits": "string",
"allow_ips": "string",
"used_quota": 0,
"group": "string",
"cross_group_retry": true,
"DeletedAt": null,
"allow_user_quota_query": true,
"auto_groups": [
"string"
],
"property1": "string",
"property2": "string"
},
"message": "string",
"success": true,
"property1": "string",
"property2": "string"
}