@host = http://localhost:3310/v1 @token = eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjEsImV4cCI6MTczMzQ4OTEzN30.c_Q6opb9H3INx0T3IYNg9GJeFWyFt86isQlgJ71ztcw @contentType = application/json
### @name login POST {{host}}/user/signin HTTP/1.1 Content-Type: {{contentType}}
- {
- "username": "admin", "password": "Abc@1234"
} ### @name createUser
POST {{host}}/user/create HTTP/1.1 Content-Type: {{contentType}} Authorization: Bearer {{token}}
} ### 添加一个DNSpod的应用 uid 字段为归属用户的ID ### @name createApp POST {{host}}/app HTTP/1.1 Content-Type: {{contentType}} Authorization: Bearer {{token}}
- {
- "uid": 1, "title": "test app", "secret_id": "test_secret_id", "secret_key": "test_secret_key"
}
### @name createRecord POST {{host}}/record HTTP/1.1 Content-Type: {{contentType}} Authorization: Bearer {{token}}
- {
- "appid": 1, "host": "itd", "domain": "guoran.cn", "ip":null, "ip_type":"A", "weight": 1, "record_id":null, "ttl": 600
}
### @name updateRecord PUT {{host}}/record/3 HTTP/1.1 Content-Type: {{contentType}} Authorization: Bearer {{token}}
- {
- "appid": 1, "host": "itd", "domain": "guoran.cn", "ip":null, "ip_type":"A", "weight": 1, "record_id":1904088010, "ttl": 600
}
### @name deleteRecord DELETE {{host}}/record/3 HTTP/1.1 Content-Type: {{contentType}} Authorization: Bearer {{token}}
### @name listRecord GET {{host}}/records HTTP/1.1 Content-Type: {{contentType}} Authorization: Bearer {{token}}