summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/api-json-rpc.markdown1
-rw-r--r--doc/api-tags-procedures.markdown195
2 files changed, 196 insertions, 0 deletions
diff --git a/doc/api-json-rpc.markdown b/doc/api-json-rpc.markdown
index fc612682..fad19466 100644
--- a/doc/api-json-rpc.markdown
+++ b/doc/api-json-rpc.markdown
@@ -63,6 +63,7 @@ Usage
- [Task Files](api-task-file-procedures.markdown)
- [Project Files](api-project-file-procedures.markdown)
- [Links](api-link-procedures.markdown)
+- [Tags](api-tags-procedures.markdown)
- [Internal Task Links](api-internal-task-link-procedures.markdown)
- [External Task Links](api-external-task-link-procedures.markdown)
- [Comments](api-comment-procedures.markdown)
diff --git a/doc/api-tags-procedures.markdown b/doc/api-tags-procedures.markdown
new file mode 100644
index 00000000..8d69430c
--- /dev/null
+++ b/doc/api-tags-procedures.markdown
@@ -0,0 +1,195 @@
+API Tags Procedures
+===================
+
+getAllTags
+----------
+
+- Purpose: **Get all tags**
+- Parameters: none
+- Result on success: **List of tags**
+- Result on failure: **false|null**
+
+Request example:
+
+```json
+{"jsonrpc":"2.0","method":"getAllTags","id":45253426}
+```
+
+Response example:
+
+```json
+{
+ "jsonrpc": "2.0",
+ "result": [
+ {
+ "id": "1",
+ "name": "another tag",
+ "project_id": "33"
+ }
+ ],
+ "id": 45253426
+}
+```
+
+getTagsByProject
+----------------
+
+- Purpose: **Get all tags for a given project**
+- Parameters:
+ - **project_id** (integer)
+- Result on success: **List of tags**
+- Result on failure: **false|null**
+
+Request example:
+
+```json
+{"jsonrpc":"2.0","method":"getTagsByProject","id":1217591720,"params":[33]}
+```
+
+Response example:
+
+```json
+{
+ "jsonrpc": "2.0",
+ "result": [
+ {
+ "id": "1",
+ "name": "some tag",
+ "project_id": "33"
+ }
+ ],
+ "id": 1217591720
+}
+```
+
+createTag
+---------
+
+- Purpose: **Create a new tag**
+- Parameters:
+ - **project_id** (integer)
+ - **tag** (string)
+- Result on success: **tag_id**
+- Result on failure: **false**
+
+Request example:
+
+```json
+{"jsonrpc":"2.0","method":"createTag","id":1775436017,"params":[33,"some tag"]}
+```
+
+Response example:
+
+```json
+{
+ "jsonrpc": "2.0",
+ "result": 1,
+ "id": 1775436017
+}
+```
+
+updateTag
+---------
+
+- Purpose: **Rename a tag**
+- Parameters:
+ - **tag_id** (integer)
+ - **tag** (string)
+- Result on success: **true**
+- Result on failure: **false**
+
+Request example:
+
+```json
+{"jsonrpc":"2.0","method":"updateTag","id":2037516512,"params":["1","another tag"]}
+```
+
+Response example:
+
+```json
+{
+ "jsonrpc": "2.0",
+ "result": true,
+ "id": 2037516512
+}
+```
+
+removeTag
+---------
+
+- Purpose: **removeTag**
+- Parameters:
+ - **tag_id** (integer)
+- Result on success: **true**
+- Result on failure: **false**
+
+Request example:
+
+```json
+{"jsonrpc":"2.0","method":"removeTag","id":907581298,"params":["1"]}
+```
+
+Response example:
+
+```json
+{
+ "jsonrpc": "2.0",
+ "result": true,
+ "id": 907581298
+}
+```
+
+setTaskTags
+-----------
+
+- Purpose: **Assign/Create/Update tags for a task**
+- Parameters:
+ - **project_id** (integer)
+ - **task_id** (integer)
+ - **tags** List of tags ([]string)
+- Result on success: **true**
+- Result on failure: **false**
+
+Request example:
+
+```json
+{"jsonrpc":"2.0","method":"setTaskTags","id":1524522873,"params":[39,17,["tag1","tag2"]]}
+```
+
+Response example:
+
+```json
+{
+ "jsonrpc": "2.0",
+ "result": true,
+ "id": 1524522873
+}
+```
+
+getTaskTags
+-----------
+
+- Purpose: **Get assigned tags to a task**
+- Parameters:
+ - **task_id** (integer)
+- Result on success: **Dictionary of tags**
+- Result on failure: **false|null**
+
+Request example:
+
+```json
+{"jsonrpc":"2.0","method":"getTaskTags","id":1667157705,"params":[17]}
+```
+
+Response example:
+
+```json
+{
+ "jsonrpc": "2.0",
+ "result": {
+ "1": "tag1",
+ "2": "tag2"
+ },
+ "id": 1667157705
+}
+```