If you have used Confluence Server REST APIs before then you are well on your way to using the Flow Board REST APIs. For those who have not used Confluence REST APIs, or for those who want a refresher, these resources will get you started:
Confluence REST API Documentation
Confluence Server REST API Examples
We like to use curl to exercise REST APIs from the command line. There are also many REST client GUI tools that may be easier than the command line for some scenarios. Insomnia is an example of one that we like.
When you think you are ready to try a Flow Board REST API invocation you can start with a simple Confluence REST API invocation to verify the plumbing is hooked up correctly. This will invoke a GET request to browse the content of your site:
curl --user <my username>:<my password> <http://<my> Base URL>/rest/api/content
base URL is something like: localhost:1990/confluence
username is something like: admin
When you start testing you usage of the Flow Board REST APIs and you are viewing the board in a browser to verify results remember to refresh the page after you operate on an object using the API from curl or your REST client tool. The refresh could be necessary to reload the JSON for the object you have modified.
Flow Board REST APIs
There is no REST API to create a Board. A create API may be included as part of the work for Flow Board import/copy operations, eg:
https://artemis.atlassian.net/browse/FB-111 "Import JSON to a single board"
https://artemis.atlassian.net/browse/FB-85 "Copy board"
Feel free to add your vote or comments to any of our Jira items for Flow Board (https://artemis.atlassian.net/wiki/spaces/SUP/pages/454590476/Vote+on+Jira+Issues)
Security
The REST APIs verify access is permitted to the resources being operated upon by the caller. Some APIs are admin-only and those are identified as such.
Version
Notice that there is an API version in the REST resource URLs. This is the version of the REST API, not the version of the Flow Board application. The REST API will work with any Flow Board version after 2.3.1, the version at the time this API document was created (Flow Board REST API version 1.0).
It is planned that the REST API will always be backwards compatible so that your custom solutions which use the REST API will continue to work for future versions of the API.
Board APIs
get Board
GET flowboard/1.0/boards/{boardId}
query parameters:
expand - string - comma delimited list of properties to expand
archived - boolean - default=false
download - boolean - default=false
format - string - default=json (other format support in the future like xml, xls, csv)
example:
curl --user <username>:<password> <http://<base URL>/rest/flowboard/1.0/boards/1
example output:
{"id":1,"name":"FB1","title":"Flow Board 1","description":"here is a description", "pageId":917508,"created":1578614191438,"updated":1586193242938, "lists":[{"id":5,"title":"My List 1","position":0,"created":1586193350939,"updated":1586193350939,"isArchived":false,"autoDueDateClear":false,"autoDueDateOffset":0,"autoDueDateOffsetUnits":null,"autoDueDateCompletion":"none","autoUnassign":null,"autoAssign":null, "cards":[{"id":9,"title":"card 1:1","hasDescription":true,"position":0,"due":0,"completed":false,"created":1586193355063,"updated":1586193380581,"isArchived":false,"commentsCount":1, "assignees":[{"id":"ff808081660a117f01660a129c2c0000","name":"admin","fullName":"admin","avatarUrl":"/images/icons/profilepics/default.svg"}]}]}], "activities":[]}
get Boards
GET <base URL>/rest/flowboard/1.0/boards
query parameters:
in - string - required: a comma delimited list of board IDs
expand - string - comma delimited list of properties to expand
archived - boolean - default=false
example:
curl --user <username>:<password> http://<base URL/rest/flowboard/1.0/boards?in=1,2
export Boards (admin)
GET <base URL>/rest/flowboard/1.0/admin/boards
Requires user to be admin.
query parameters:
download - boolean - default=true
format - string - default=json (other format support in the future like xml, xls, csv)
update Board (admin)
POST <base URL>/rest/flowboard/1.0/admin/boards/{boardId}
Requires user to be admin.
Limited functionality: can only update PROPERTIES of the board (name, title, pageId, description). See APIs for lists and cards to update content of a Board
example:
curl --user <username>:<password> -X POST -H "Content-Type: application/json" -d"{"pageId":123456}" <http://<base URL>/rest/flowboard/1.0/admin/boards/1
delete Board (admin)
DELETE <base URL>/rest/flowboard/1.0/admin/boards/{boardId}
Requires user to be admin.
List APIs
get List
GET <base URL>/rest/flowboard/1.0/lists/{listId}
create List
POST <base URL>/rest/flowboard/1.0/lists
update List
PUT <base URL>/rest/flowboard/1.0/lists/{listId}
order Lists
PUT <base URL>/rest/flowboard/1.0/lists/order
archive List
DELETE <base URL>/rest/flowboard/1.0/lists/{listId}
get archived Lists
GET<base URL>/rest/flowboard/1.0/boards/{boardId}/archived-lists
query parameters:
offset - int - default=0 pagination starting index
limit - int - default=10
unarchive List
POST <base URL>/rest/flowboard/1.0/boards/{boardId}/archived-lists/{listId}
delete archived List
DELETE <base URL>/rest/flowboard/1.0/boards/{boardId}/archived-lists/{listId}
Card APIs
get Card
GET <base URL>/rest/flowboard/1.0/cards/{cardId}
create Card
POST <base URL>/rest/flowboard/1.0/cards
update Card
PUT <base URL>/rest/flowboard/1.0/cards/{cardId}
archive Card
DELETE <base URL>/rest/flowboard/1.0/cards/{cardId}
order Cards
PUT <base URL>/rest/flowboard/1.0/cards/order
get archived Cards
GET <base URL>/rest/flowboard/1.0/boards/{boardId}/archived-cards
query parameters:
offset - int - default=0
limit - int - default=10
unarchive Card
POST <base URL>/rest/flowboard/1.0/boards/{boardId}/archived-cards/{cardId}
delete archived Card
DELETE <base URL>/rest/flowboard/1.0/boards/{boardId}/archived-cards/{cardId}