自動化建立這些
https://developer.atlassian.com/cloud/trello/rest/api-group-actions/


Type: POST
URL: https://api.trello.com/1/boards/
Params:
<your api key>
<your token>
Key 和 token可以從以下網站取得
https://trello.com/power-ups/admin

New
Create
Generate a new API key
只有14天的有效期



URL: https://api.trello.com/1/boards/


| Category | Requests | Dependency | Priority |
|---|---|---|---|
| Board | Create board | None | Critical |
| Update board | Create board | Hight | |
| Read board | Create board | Medium | |
| Delete board | Create board, Update board | Low | |
| List | Create list | Create board | Critical |
| Update list | Create list | Hight | |
| Get list | Create list | Medium | |
| Delete list | Create list, Update list | Low | |
| Card | Create card | Create list | Critical |
| Update card | Create card | Hight | |
| Get card | Create card | Medium | |
| Delete card | Create card , Update card | Low | |
| Checklist | Create checklist | Create card | Low |
| Update checklist | Create checklist | Low | |
| Get checklist | Create checklist | Low | |
| Delete checklist | Create checklist, Update checklist | Low |
| Order | |
|---|---|
| 1 | Create board |
| 2 | Create list |
| 3 | Create card |
| 4 | Update board |
| 5 | Update list |
| 6 | Update ard |
| 7 | Read board |
| 8 | Read list |
| 9 | Read card |
| 10 | Create checklist |
| 11 | Update checklist |
| 12 | Get checklist |
| 13 | Delete checklist |
| 14 | Delete card |
| 15 | Delete list |
| 16 | Delete board |

Delete change to use board_id variable
Run collection

Create
var jsonData = pm.response.json()
// pm.globals.set("variable_key", "variable_value")
pm.globals.set("board_id", jsonData.id)
pm.test("Board created successfully", function() {
pm.response.to.have.status(200)
} )
pm.test("Reasonable response time", function (){
pm.expect(pm.response.responseTime).to.be.below(3000)
})
pm.test("Correct board name", function() {
var jsonData = pm.response.json()
pm.expect(jsonData.name).to.eql("Bootcamp_test1")
})
Delete
pm.test("Board deleted successfully", function() {
pm.response.to.have.status(200)
} )
pm.test("Reasonable response time", function (){
pm.expect(pm.response.responseTime).to.be.below(3000)
})

直接點選資料夾 -> Scripts -> Post-response

本文章同步發布於個人blogger。