创建用户
curl --request POST \
--url https://api.lmm.best/api/user/ \
--header 'Content-Type: application/json' \
--data '
{
"id": 123,
"username": "<string>",
"display_name": "<string>",
"role": 123,
"status": 123,
"email": "<string>",
"group": "<string>",
"quota": 123,
"used_quota": 123,
"request_count": 123
}
'import requests
url = "https://api.lmm.best/api/user/"
payload = {
"id": 123,
"username": "<string>",
"display_name": "<string>",
"role": 123,
"status": 123,
"email": "<string>",
"group": "<string>",
"quota": 123,
"used_quota": 123,
"request_count": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: 123,
username: '<string>',
display_name: '<string>',
role: 123,
status: 123,
email: '<string>',
group: '<string>',
quota: 123,
used_quota: 123,
request_count: 123
})
};
fetch('https://api.lmm.best/api/user/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lmm.best/api/user/"
payload := strings.NewReader("{\n \"id\": 123,\n \"username\": \"<string>\",\n \"display_name\": \"<string>\",\n \"role\": 123,\n \"status\": 123,\n \"email\": \"<string>\",\n \"group\": \"<string>\",\n \"quota\": 123,\n \"used_quota\": 123,\n \"request_count\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}用户管理
创建用户
👨💼 需要管理员权限(Admin)
POST
/
api
/
user
/
创建用户
curl --request POST \
--url https://api.lmm.best/api/user/ \
--header 'Content-Type: application/json' \
--data '
{
"id": 123,
"username": "<string>",
"display_name": "<string>",
"role": 123,
"status": 123,
"email": "<string>",
"group": "<string>",
"quota": 123,
"used_quota": 123,
"request_count": 123
}
'import requests
url = "https://api.lmm.best/api/user/"
payload = {
"id": 123,
"username": "<string>",
"display_name": "<string>",
"role": 123,
"status": 123,
"email": "<string>",
"group": "<string>",
"quota": 123,
"used_quota": 123,
"request_count": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: 123,
username: '<string>',
display_name: '<string>',
role: 123,
status: 123,
email: '<string>',
group: '<string>',
quota: 123,
used_quota: 123,
request_count: 123
})
};
fetch('https://api.lmm.best/api/user/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lmm.best/api/user/"
payload := strings.NewReader("{\n \"id\": 123,\n \"username\": \"<string>\",\n \"display_name\": \"<string>\",\n \"role\": 123,\n \"status\": 123,\n \"email\": \"<string>\",\n \"group\": \"<string>\",\n \"quota\": 123,\n \"used_quota\": 123,\n \"request_count\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}最后修改于 2026年9月23日
⌘I