summaryrefslogtreecommitdiff
path: root/docs/api-json-rpc.markdown
diff options
context:
space:
mode:
Diffstat (limited to 'docs/api-json-rpc.markdown')
-rw-r--r--docs/api-json-rpc.markdown310
1 files changed, 257 insertions, 53 deletions
diff --git a/docs/api-json-rpc.markdown b/docs/api-json-rpc.markdown
index d32da9af..61ea9d85 100644
--- a/docs/api-json-rpc.markdown
+++ b/docs/api-json-rpc.markdown
@@ -431,14 +431,12 @@ Response example:
}
```
+### getAllowedUsers
-
-### getBoard
-
-- Purpose: **Get all necessary information to display a board**
+- Purpose: **Get allowed users for a given project**
- Parameters: **project_id** (integer)
-- Result on success: **board properties**
-- Result on failure: **null**
+- Result on success: Key/value pair of user_id and username
+- Result on failure: **false**
Request example:
@@ -452,12 +450,12 @@ Response example:
```
-### getColumns
+### revokeUser
-- Purpose: **Get all columns information for a given project**
-- Parameters: **project_id** (integer)
-- Result on success: **columns properties**
-- Result on failure: **null**
+- Purpose: **Revoke user access for a given project**
+- Parameters: **project_id** (integer), **user_id** (integer)
+- Result on success: **true**
+- Result on failure: **false**
Request example:
@@ -471,10 +469,10 @@ Response example:
```
-### moveColumnUp
+### allowUser
-- Purpose: **Move up the column position**
-- Parameters: **project_id** (integer), **column_id** (integer)
+- Purpose: **Grant user access for a given project**
+- Parameters: **project_id** (integer), **user_id** (integer)
- Result on success: **true**
- Result on failure: **false**
@@ -490,137 +488,343 @@ Response example:
```
-### moveColumnDown
-- Purpose: **Move down the column position**
-- Parameters: **project_id** (integer), **column_id** (integer)
-- Result on success: **true**
-- Result on failure: **false**
+### getBoard
+
+- Purpose: **Get all necessary information to display a board**
+- Parameters:
+ - **project_id** (integer, required)
+- Result on success: **board properties**
+- Result on failure: **empty list**
Request example:
```json
-
+{
+ "jsonrpc": "2.0",
+ "method": "getBoard",
+ "id": 1627282648,
+ "params": [
+ 1
+ ]
+}
```
Response example:
```json
-
+{
+ "jsonrpc": "2.0",
+ "id": 1627282648,
+ "result": [
+ {
+ "id": "1",
+ "title": "Backlog",
+ "position": "1",
+ "project_id": "1",
+ "task_limit": "0",
+ "tasks": []
+ },
+ {
+ "id": "2",
+ "title": "Ready",
+ "position": "2",
+ "project_id": "1",
+ "task_limit": "0",
+ "tasks": []
+ },
+ {
+ "id": "3",
+ "title": "Work in progress",
+ "position": "3",
+ "project_id": "1",
+ "task_limit": "0",
+ "tasks": [
+ {
+ "nb_comments": "0",
+ "nb_files": "0",
+ "nb_subtasks": "1",
+ "nb_completed_subtasks": "0",
+ "id": "1",
+ "title": "Task with comment",
+ "description": "",
+ "date_creation": "1410952872",
+ "date_modification": "1410952872",
+ "date_completed": null,
+ "date_due": "0",
+ "color_id": "red",
+ "project_id": "1",
+ "column_id": "3",
+ "owner_id": "1",
+ "creator_id": "0",
+ "position": "1",
+ "is_active": "1",
+ "score": "0",
+ "category_id": "0",
+ "assignee_username": "admin",
+ "assignee_name": null
+ }
+ ]
+ },
+ ...
+ ]
+}
```
-### updateColumn
+### getColumns
-- Purpose: **Update column properties**
-- Parameters: **column_id** (integer), **values** (**title** string, **task_limit** integer)
-- Result on success: **true**
-- Result on failure: **false**
+- Purpose: **Get all columns information for a given project**
+- Parameters:
+ - **project_id** (integer, required)
+- Result on success: **columns properties**
+- Result on failure: **empty list**
Request example:
```json
-
+{
+ "jsonrpc": "2.0",
+ "method": "getColumns",
+ "id": 887036325,
+ "params": [
+ 1
+ ]
+}
```
Response example:
```json
+{
+ "jsonrpc": "2.0",
+ "id": 887036325,
+ "result": [
+ {
+ "id": "1",
+ "title": "Backlog",
+ "position": "1",
+ "project_id": "1",
+ "task_limit": "0"
+ },
+ {
+ "id": "2",
+ "title": "Ready",
+ "position": "2",
+ "project_id": "1",
+ "task_limit": "0"
+ },
+ {
+ "id": "3",
+ "title": "Work in progress",
+ "position": "3",
+ "project_id": "1",
+ "task_limit": "0"
+ }
+ ]
+}
+```
+### getColumn
+
+- Purpose: **Get a single column**
+- Parameters:
+ - **column_id** (integer, required)
+- Result on success: **column properties**
+- Result on failure: **null**
+
+Request example:
+
+```json
+{
+ "jsonrpc": "2.0",
+ "method": "getColumn",
+ "id": 1242049935,
+ "params": [
+ 2
+ ]
+}
```
-### addColumn
+Response example:
-- Purpose: **Add a new column**
-- Parameters: **project_id** (integer), **values** (**title** string, **task_limit** integer)
+```json
+{
+ "jsonrpc": "2.0",
+ "id": 1242049935,
+ "result": {
+ "id": "2",
+ "title": "Youpi",
+ "position": "2",
+ "project_id": "1",
+ "task_limit": "5"
+ }
+}
+```
+
+### moveColumnUp
+
+- Purpose: **Move up the column position**
+- Parameters:
+ - **project_id** (integer, required)
+ - **column_id** (integer, required)
- Result on success: **true**
- Result on failure: **false**
Request example:
```json
-
+{
+ "jsonrpc": "2.0",
+ "method": "moveColumnUp",
+ "id": 99275573,
+ "params": [
+ 1,
+ 2
+ ]
+}
```
Response example:
```json
-
+{
+ "jsonrpc": "2.0",
+ "id": 99275573,
+ "result": true
+}
```
-### removeColumn
+### moveColumnDown
-- Purpose: **Remove a column**
-- Parameters: **column_id** (integer)
+- Purpose: **Move down the column position**
+- Parameters:
+ - **project_id** (integer, required)
+ - **column_id** (integer, required)
- Result on success: **true**
- Result on failure: **false**
Request example:
```json
-
+{
+ "jsonrpc": "2.0",
+ "method": "moveColumnDown",
+ "id": 957090649,
+ "params": {
+ "project_id": 1,
+ "column_id": 2
+ }
+}
```
Response example:
```json
-
+{
+ "jsonrpc": "2.0",
+ "id": 957090649,
+ "result": true
+}
```
-### getAllowedUsers
+### updateColumn
-- Purpose: **Get allowed users for a given project**
-- Parameters: **project_id** (integer)
-- Result on success: Key/value pair of user_id and username
+- Purpose: **Update column properties**
+- Parameters:
+ - **column_id** (integer, required)
+ - **title** (string, required)
+ - **task_limit** (integer, optional)
+- Result on success: **true**
- Result on failure: **false**
Request example:
```json
-
+{
+ "jsonrpc": "2.0",
+ "method": "updateColumn",
+ "id": 480740641,
+ "params": [
+ 2,
+ "Boo",
+ 5
+ ]
+}
```
Response example:
```json
-
+{
+ "jsonrpc": "2.0",
+ "id": 480740641,
+ "result": true
+}
```
-### revokeUser
+### addColumn
-- Purpose: **Revoke user access for a given project**
-- Parameters: **project_id** (integer), **user_id** (integer)
+- Purpose: **Add a new column**
+- Parameters:
+ - **project_id** (integer, required)
+ - **title** (string, required)
+ - **task_limit** (integer, optional)
- Result on success: **true**
- Result on failure: **false**
Request example:
```json
-
+{
+ "jsonrpc": "2.0",
+ "method": "addColumn",
+ "id": 638544704,
+ "params": [
+ 1,
+ "Boo"
+ ]
+}
```
Response example:
```json
-
+{
+ "jsonrpc": "2.0",
+ "id": 638544704,
+ "result": true
+}
```
-### allowUser
+### removeColumn
-- Purpose: **Grant user access for a given project**
-- Parameters: **project_id** (integer), **user_id** (integer)
+- Purpose: **Remove a column**
+- Parameters:
+ - **column_id** (integer, required)
- Result on success: **true**
- Result on failure: **false**
Request example:
```json
-
+{
+ "jsonrpc": "2.0",
+ "method": "removeColumn",
+ "id": 1433237746,
+ "params": [
+ 1
+ ]
+}
```
Response example:
```json
-
+{
+ "jsonrpc": "2.0",
+ "id": 1433237746,
+ "result": true
+}
```