본문으로 건너뛰기
사용자

Cernium/ACLGroup/api(비교)

r6 vs r7
......
99
1010
https://theseed.io/internal/admin/thread/YummyGiganticBrashDistribution/hide
1111
12
== 추가 ==
12
== 기본 ==
1313
{{{#!syntax python
14
import requests
15
import json
16
1417
headers = {
1518
'Authorization': 'Bearer API_TOKEN_HERE'
1619
}
20
}}}
21
22
== 목록 ==
23
24
== 추가 ==
25
{{{#!syntax python
1726
data = {
18
'group': '경고-테스트',
19
'username': 'Cernium',
20
'note': 'api test',
21
'expire': '20',
22
'mode': 'username'
27
'group': '로그인 허용 차단', #ACLGroup 이름
28
'username': 'Cernium', #사용자 이름; mode=ip이면 'ip'로
29
'note': 'api test', #사유
30
'expire': '20', #추가할 시간(초)
31
'mode': 'username' #ip OR username
2332
}
2433
response = requests.post('https://theseed.io/api/v0/aclgroup', headers=headers, data=data)
2534
}}}
35
36
== 제거 ==
37
{{{#!syntax python
38
data = {
39
'group': '경고-테스트', #ACLGroup 이름
40
'id': '14559', #차단 id
41
'note': 'api test' #사유
42
}
43
response = requests.delete('https://theseed.io/api/v0/aclgroup', headers=headers, data=data)
44
}}}