mirror of
https://github.com/wekan/wekan.git
synced 2025-12-17 07:50:12 +01:00
Added API documentation on how to update a card. For API URL /api/boards/:boardId/lists/:fromListId/cards/:cardId
parent
89aee7d0a3
commit
a931c7f2ed
1 changed files with 26 additions and 2 deletions
26
REST-API.md
26
REST-API.md
|
|
@ -44,6 +44,7 @@ When calling a production Wekan server, ensure it is running via HTTPS and has a
|
||||||
| HTTP Method | Url | Short Description |
|
| HTTP Method | Url | Short Description |
|
||||||
| :--- | :--- | :--- |
|
| :--- | :--- | :--- |
|
||||||
| `POST` | `/api/boards/:boardId/lists/:listId/cards` | [Add a card to a list, board, and swimlane.](#add-card-to-list-board-swimlane) |
|
| `POST` | `/api/boards/:boardId/lists/:listId/cards` | [Add a card to a list, board, and swimlane.](#add-card-to-list-board-swimlane) |
|
||||||
|
| `PUT` | `/api/boards/:boardId/lists/:fromListId/cards/:cardId` | [Update a card.](#update-a-card) |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -464,7 +465,7 @@ curl -H "Authorization: Bearer t7iYB86mXoLfP_XsMegxF41oKT7iiA9lDYiKVtXcctl" \
|
||||||
|
|
||||||
# Add Card to List-Board-Swimlane
|
# Add Card to List-Board-Swimlane
|
||||||
|
|
||||||
| URL / Code Link | Requires Admin Auth | HTTP Method |
|
| API URL / Code Link | Requires Admin Auth | HTTP Method |
|
||||||
| :--- | :--- | :--- |
|
| :--- | :--- | :--- |
|
||||||
| [/api/boards/:boardId/lists/:listId/cards](https://github.com/wekan/wekan/blob/c115046a7c86b30ab5deb8762d3ef7a5ea3f4f90/models/cards.js#L487) | `yes` | `POST` |
|
| [/api/boards/:boardId/lists/:listId/cards](https://github.com/wekan/wekan/blob/c115046a7c86b30ab5deb8762d3ef7a5ea3f4f90/models/cards.js#L487) | `yes` | `POST` |
|
||||||
|
|
||||||
|
|
@ -481,3 +482,26 @@ The new card's ID is returned in the format:
|
||||||
{
|
{
|
||||||
"_id": "W9m9YxQKT6zZrKzRW"
|
"_id": "W9m9YxQKT6zZrKzRW"
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
# Update a card
|
||||||
|
You can change (any of) the card's title, list, and description.
|
||||||
|
|
||||||
|
| API URL / Code Link | Requires Admin Auth | HTTP Method |
|
||||||
|
| :--- | :--- | :--- |
|
||||||
|
| [/api/boards/:boardId/lists/:fromListId/cards/:cardId](https://github.com/wekan/wekan/blob/c115046a7c86b30ab5deb8762d3ef7a5ea3f4f90/models/cards.js#L520) | `yes` | `PUT` |
|
||||||
|
|
||||||
|
```shell
|
||||||
|
curl -H "Authorization: Bearer t7iYB86mXoLfP_XsMegxF41oKT7iiA9lDYiKVtXcctl" \
|
||||||
|
-H "Content-type:application/json" \
|
||||||
|
-X PUT \
|
||||||
|
http://localhost:3000/api/boards/YRgy7Ku6uLFv2pYwZ/lists/PgTuf6sFJsaxto5dC/cards:cardId \
|
||||||
|
-d '{ "title": "New title text", "listId": "New destination listId", "description": "New description text" }'
|
||||||
|
```
|
||||||
|
## Result example
|
||||||
|
The card's ID is returned in the format:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"_id": "W9m9YxQKT6zZrKzRW"
|
||||||
|
}
|
||||||
|
```
|
||||||
Loading…
Add table
Add a link
Reference in a new issue