证书文档
社区
我的证书
Method and URL Structure
Method |
Method Resource URL |
Descriptions |
Authentications Required |
GET |
/server/certificate/list_mycertificate/ |
我的证书列表 |
YES |
cURL Example
curl -X GET http://127.0.0.1:8000/server/certificate/list_mycertificate/?user_id=367 -H 'Content-Type: application/json' -H 'Authorization: Token f5d99e3acf2b3e76d63d4a8a8a2389d86e43d9cc'
按条件过滤列表释义如下 :
1. user_id
用户 id:
/server/certificate/list_mycertificate/?user_id=1
Response
{
"count": 2,
"next": null,
"previous": null,
"results": [{
"id": 4,
"deleted": false,
"create_time": "2020-05-06T18:20:13.359527",
"order_index": 1000,
"url": "https://static1.bcjiaoyu.com/league_d127aed6ee413146b558313db972a8e7_367.png",
"name": "Python Level 1",
"owner": 367
}]
}
发证书
Method and URL Structure
Method |
Method Resource URL |
Descriptions |
Authentications Required |
PUT |
/server/certificate/send_certificate/ |
补发联赛证书 |
YES |
cURL Example
curl -X PUT http://127.0.0.1:8000/server/certificate/send_certificate/ -H 'Content-Type: application/json' -H 'Authorization: Token f5d99e3acf2b3e76d63d4a8a8a2389d86e43d9cc' --data '{"username":"15201052252", "category":1}'
Request Parameters
Name |
Description |
Required |
Default |
username |
用户的账号 |
YES |
|
category |
联赛分类 id |
YES |
|
Request
{
"category":1
}