Add JSON response format to entropy endpoints (#2673)
* Add JSON response format to entropy endpoints Add account settings JSON endpoint returning account info including auto_postpone_period. Add auto_postpone_period to board JSON responses. Add JSON update support to both account and board entropy controllers. * Add auto_postpone_period to all board response examples in API docs * Use auto_postpone_period_in_days in JSON responses and API docs * Use valid period values in permission tests
This commit is contained in:
+75
-3
@@ -434,6 +434,7 @@ __Response:__
|
||||
"name": "Fizzy",
|
||||
"all_access": true,
|
||||
"created_at": "2025-12-05T19:36:35.534Z",
|
||||
"auto_postpone_period_in_days": 30,
|
||||
"url": "http://fizzy.localhost:3006/897362094/boards/03f5v9zkft4hj9qq0lsn9ohcm",
|
||||
"creator": {
|
||||
"id": "03f5v9zjw7pz8717a4no1h8a7",
|
||||
@@ -460,6 +461,7 @@ __Response:__
|
||||
"name": "Fizzy",
|
||||
"all_access": true,
|
||||
"created_at": "2025-12-05T19:36:35.534Z",
|
||||
"auto_postpone_period_in_days": 30,
|
||||
"url": "http://fizzy.localhost:3006/897362094/boards/03f5v9zkft4hj9qq0lsn9ohcm",
|
||||
"creator": {
|
||||
"id": "03f5v9zjw7pz8717a4no1h8a7",
|
||||
@@ -484,7 +486,7 @@ Creates a new Board in the account.
|
||||
|-----------|------|----------|-------------|
|
||||
| `name` | string | Yes | The name of the board |
|
||||
| `all_access` | boolean | No | Whether any user in the account can access this board. Defaults to `true` |
|
||||
| `auto_postpone_period` | integer | No | Number of days of inactivity before cards are automatically postponed |
|
||||
| `auto_postpone_period_in_days` | integer | No | Number of days of inactivity before cards are automatically postponed (e.g. `30`) |
|
||||
| `public_description` | string | No | Rich text description shown on the public board page |
|
||||
|
||||
__Request:__
|
||||
@@ -514,7 +516,7 @@ Updates a Board. Only board administrators can update a board.
|
||||
|-----------|------|----------|-------------|
|
||||
| `name` | string | No | The name of the board |
|
||||
| `all_access` | boolean | No | Whether any user in the account can access this board |
|
||||
| `auto_postpone_period` | integer | No | Number of days of inactivity before cards are automatically postponed |
|
||||
| `auto_postpone_period_in_days` | integer | No | Number of days of inactivity before cards are automatically postponed (e.g. `30`) |
|
||||
| `public_description` | string | No | Rich text description shown on the public board page |
|
||||
| `user_ids` | array | No | Array of *all* user IDs who should have access to this board (only applicable when `all_access` is `false`) |
|
||||
|
||||
@@ -524,7 +526,7 @@ __Request:__
|
||||
{
|
||||
"board": {
|
||||
"name": "Updated board name",
|
||||
"auto_postpone_period": 14,
|
||||
"auto_postpone_period_in_days": 30,
|
||||
"public_description": "This is a **public** description of the board.",
|
||||
"all_access": false,
|
||||
"user_ids": [
|
||||
@@ -567,6 +569,7 @@ HTTP/1.1 201 Created
|
||||
"name": "Fizzy",
|
||||
"all_access": true,
|
||||
"created_at": "2025-12-05T19:36:35.534Z",
|
||||
"auto_postpone_period_in_days": 30,
|
||||
"url": "http://fizzy.localhost:3006/897362094/boards/03f5v9zkft4hj9qq0lsn9ohcm",
|
||||
"creator": {
|
||||
"id": "03f5v9zjw7pz8717a4no1h8a7",
|
||||
@@ -591,6 +594,72 @@ __Response:__
|
||||
|
||||
Returns `204 No Content` on success.
|
||||
|
||||
## Account
|
||||
|
||||
### `GET /account/settings`
|
||||
|
||||
Returns the current account.
|
||||
|
||||
__Response:__
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "03f5v9zjvypwh0t0e2rfh0h7k",
|
||||
"name": "37signals",
|
||||
"cards_count": 5,
|
||||
"created_at": "2025-12-05T19:36:35.401Z",
|
||||
"auto_postpone_period_in_days": 30
|
||||
}
|
||||
```
|
||||
|
||||
The `auto_postpone_period_in_days` is the account-level default in days (e.g. `30`). Cards are automatically moved to "Not Now" after this period of inactivity. Each board can override this with its own value.
|
||||
|
||||
### `PUT /account/entropy`
|
||||
|
||||
Updates the account-level default auto close period. Requires admin role.
|
||||
|
||||
__Request:__
|
||||
|
||||
```json
|
||||
{
|
||||
"entropy": {
|
||||
"auto_postpone_period_in_days": 30
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
__Response:__
|
||||
|
||||
Returns the account object:
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "03f5v9zjvypwh0t0e2rfh0h7k",
|
||||
"name": "37signals",
|
||||
"cards_count": 5,
|
||||
"created_at": "2025-12-05T19:36:35.401Z",
|
||||
"auto_postpone_period_in_days": 30
|
||||
}
|
||||
```
|
||||
|
||||
### `PUT /:account_slug/boards/:board_id/entropy`
|
||||
|
||||
Updates the auto close period for a specific board. Requires board admin permission.
|
||||
|
||||
__Request:__
|
||||
|
||||
```json
|
||||
{
|
||||
"board": {
|
||||
"auto_postpone_period_in_days": 90
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
__Response:__
|
||||
|
||||
Returns the board object.
|
||||
|
||||
## Webhooks
|
||||
|
||||
Webhooks notify another application when something happens on a board. Only account admins can list, view, create, update, delete, or reactivate webhooks.
|
||||
@@ -757,6 +826,7 @@ __Response:__
|
||||
"name": "Fizzy",
|
||||
"all_access": true,
|
||||
"created_at": "2025-12-05T19:36:35.534Z",
|
||||
"auto_postpone_period_in_days": 30,
|
||||
"url": "http://fizzy.localhost:3006/897362094/boards/03f5v9zkft4hj9qq0lsn9ohcm",
|
||||
"creator": {
|
||||
"id": "03f5v9zjw7pz8717a4no1h8a7",
|
||||
@@ -810,6 +880,7 @@ __Response:__
|
||||
"name": "Fizzy",
|
||||
"all_access": true,
|
||||
"created_at": "2025-12-05T19:36:35.534Z",
|
||||
"auto_postpone_period_in_days": 30,
|
||||
"url": "http://fizzy.localhost:3006/897362094/boards/03f5v9zkft4hj9qq0lsn9ohcm",
|
||||
"creator": {
|
||||
"id": "03f5v9zjw7pz8717a4no1h8a7",
|
||||
@@ -1077,6 +1148,7 @@ __Response:__
|
||||
"name": "Fizzy",
|
||||
"all_access": true,
|
||||
"created_at": "2025-12-05T19:36:35.534Z",
|
||||
"auto_postpone_period_in_days": 30,
|
||||
"url": "http://fizzy.localhost:3006/897362094/boards/03f5v9zkft4hj9qq0lsn9ohcm",
|
||||
"creator": {
|
||||
"id": "03f5v9zjw7pz8717a4no1h8a7",
|
||||
|
||||
Reference in New Issue
Block a user