用户(原始 API)
用户:基于 10 个固定用户(ID 101-110)的原始 JSON CRUD,以及 Admin 端点使用的 JWT 登录。
你的账号已解锁这些端点。在每个端点的页面上用 Try it 发送请求。
- POST
https://api.testingapis.com/api/User/addUserAdd a userAdd a user. - DELETE
https://api.testingapis.com/api/User/delete/{id}Delete a userDelete a user. - GET
https://api.testingapis.com/api/User/getAllUsersList all usersList all users. - POST
https://api.testingapis.com/api/User/LoginLog in and receive a JWT for the Admin endpointLog in and receive a JWT for the Admin endpoint. - PUT
https://api.testingapis.com/api/User/update/{id}Update a user's name, email, job and cityUpdate a user's name, email, job and city. - GET
https://api.testingapis.com/api/User/user/{id}Get a user by IDGet a user by ID.
请求示例
List all users. 完整参考和 Send 按钮(英文).
cURL
curl -X GET "https://api.testingapis.com/api/User/getAllUsers"响应 · 200 OK
[
{
"userId": 101,
"name": "Michael Thompson",
"email": "michael.thompson@company.com",
"job": "Senior Software Engineer",
"city": "New York"
},
{
"userId": 102,
"name": "Emma Johnson",
"email": "emma.johnson@company.com",
"job": "Product Manager",
"city": "San Francisco"
… (3 more lines)