API Access Example
Select an endpoint to view details.
Get Tiki OAuth server public key
Get Tiki OAuth server public key used to verify JWT access tokens
https://example.com/api/oauth/public-key
curl -X 'GET' \ 'https://example.com/api/oauth/public-key' \ -H 'accept: application/json'
<?php $url = 'https://example.com/api/oauth/public-key'; $headers = [ 'Accept: application/json' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if (curl_errno($ch)) { $error_msg = curl_error($ch); echo 'Error: ' . $error_msg; } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
fetch('https://example.com/api/oauth/public-key', { method: 'GET', headers: { 'Accept': 'application/json' } }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1dFZXhXcEbNxGN4QkkzL\njYkSLyt5c/Jx/V9DvkxOha3A5dJVAtgwExGqA5A3r1A1KmCrqr9OyuVmdjaDM1Vj\nayR8HaZH5g0Ih0n1tUlvHwuCAX+myWkTcEs+tpZ71xcoxo/B9k/FihW5iie4SNCB\nFDMNU9cYToXRjVeOPRHD9nqzHt706WCgSD9mHZnMBSR7sJ1tMjBXrrKzUjcGwPwF\nokoK0JbqRIceewV/ceKBSpR0le502ys88X16G/7gMxxkbRKUDmrEr6draMDiT3S8\nsv7zUDqgnXf76nzeemtjjAYmXFxIV4XPgZLEq1YA5u2no9WijLrNePttORNf4djx\nJwIDAQAB\n-----END PUBLIC KEY-----\n" }
Parameters
No parameters.
Authorize endpoint used with Authorization Code Grant flow
Authorize endpoint used with Authorization Code Grant flow. Send your target users here to start the authorization flow - this will request users to authenticate in Tiki and then send back a short-lived code to the redirect uri that you can exchange then for an access token.
https://example.com/api/oauth/authorize
curl -X 'GET' \ 'http://example.com/api/oauth/authorize?response_type=code&client_id=4bad4fe93f6b4b49a5d97947473857a4&redirect_uri=http://example.com/tracker4' \ -H 'accept: application/json'
<?php $url = 'https://example.com/api/oauth/authorize?' . http_build_query([ 'response_type' => 'code', 'client_id' => '4bad4fe93f6b4b49a5d97947473857a4', 'redirect_uri' => 'https://example.com/tracker4', ]); $headers = ['Accept: application/json']; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); $php_output = ''; if (curl_errno($ch)) { $error_msg = curl_error($ch); echo 'Error: ' . $error_msg; } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
const params = new URLSearchParams({ response_type: 'code', client_id: '4bad4fe93f6b4b49a5d97947473857a4', redirect_uri: 'https://example.com/tracker4' }); fetch('http://example.com/api/oauth/authorize?' + params.toString(), { method: 'GET', headers: { 'Accept': 'application/json' } }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "code": "string", "state": "string" }
Parameters
- response_type string *: Should always be: code
- client_id string *: Your application client id generated by the Tiki OAuth server.
- redirect_uri string *: Where should the user be redirected back when they authorize in Tiki. This should be an URL on your site to read back the generated code and exchange it for an access token.
- scope string Optional: A space delimited list of scopes. This is optional.
- state string Optional: Random string used as a CSRF value. You should compare the state value retrieved with the access token to this one.
Get Tiki Access Token
Retrieve a fresh access token for API access. Depending on the grant type you use, different parameters are required. Client Credentials grant type requires you to send a client secret. Authorization Code grant type requires you to send a code generated by the authorize endpoint. Refresh Token grant type requires you to send your valid refresh token.
https://example.com/api/oauth/access_token
curl -X 'GET' \ 'http://example.com/api/oauth/access_token? grant_type=client_credentials&client_id=4bad4fe93f6b4b49a5d97947473857a4&client_secret=312104ad686. 1eed0f6fc4647be1ba31cf2b5722521246d3705233ce5e1b82784' \ -H 'accept: application/json'
<?php $url = 'http://example.com/api/oauth/access_token?' . http_build_query([ 'grant_type' => 'client_credentials', 'client_id' => '4bad4fe93f6b4b49a5d97947473857a4', 'client_secret' => '312104ad6861eed0f6fc4647be1ba31cf2b5722521246d3705233ce5e1b82784' ]); $headers = ['Accept: application/json']; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if (curl_errno($ch)) { $error_msg = curl_error($ch); echo 'Error: ' . $error_msg; } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
const params = new URLSearchParams({ grant_type: 'client_credentials', client_id: '4bad4fe93f6b4b49a5d97947473857a4', client_secret: '312104ad6861eed0f6fc4647be1ba31cf2b5722521246d3705233ce5e1b82784' }); fetch('http://example.com/api/oauth/access_token?' + params.toString(), { method: 'GET', headers: { 'Accept': 'application/json' } }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "token_type": "Bearer", "expires_in": 3600, "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI0YmFkNGZlOTNmNmI0YjQ5YTVkOTc5NDc0NzM4NTdhNCIsImp0aSI6ImQzZmM3ZGE2NmQ5MjQ5MzNjNWNmODJmNzg3YjdkYmQ3NTE1YTMwYTA3ZDA5ZjE2ODkxZThhMGM1NDE1MDIzZjViYjEwOGFjZmIyMjQzM2I3IiwiaWF0IjoxNzU0MDc5NjY2LjQ4MDIzLCJuYmYiOjE3NTQwNzk2NjYuNDgwMjM0LCJleHAiOjE3NTQwODMyNjYuNDc3NjYxLCJzdWIiOiIiLCJzY29wZXMiOltdfQ.PUBuLfJcpLCNxzqifrJ6CAUFTdRDXkmW9X3QqSuFadGX6UNNXnVIk7fx6zhG-uMDs-tIH4Sk0HEav6sBKzi-c4stMMBcTl-3hUt5I2iy3eMlT27w7x1ExScXnn5NBHr-JtIwnng6b91uoMsfd9RQb5PuMVyL7GMQoLqk_ox5mqOnFYSyLxEoNdQE4OFY7stbwPB8x_w0vPx43gb46iFWygJtpVJNmWjQ4DQJUHgz-Mkwl-2fIO6_apmTcRXmCbMfSThbs3lqe-5nhkSCnKTQUcWNHBL-Jxt5r70Y-pht9hqT-GItzPvIDMGP8rXhf2a2IxlWmlIKLEX4rotDjb32UA" }
Parameters
- grant_type string *: One of: client_credentials, authorization_code, refresh_token
- client_id string *: Your application client id generated by the Tiki OAuth server.
- client_secret string *: Your application client secret generated by the Tiki OAuth server.
- scope string Optional: A space delimited list of scopes. Valid with client_credentials or refresh_token grant type.
- refresh_token string Optional: Your refresh token. Use to renew an expired access token and get a new refresh token.
- code string Optional: Required if authorization_code grant is used. Retrive this code by sending the user to authorize endpoint first.
- redirect_uri string Optional: Should be the same redirect uri you used in authorize endpoint.
Get current Tiki API version
https://example.com/api/version
curl -X 'GET' \ 'https://example.com/api/version' \ -H 'accept: application/json'
<?php $url = 'https://example.com/api/version'; $headers = ['Accept: application/json']; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if (curl_errno($ch)) { $error_msg = curl_error($ch); echo 'Error: ' . $error_msg; } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
fetch('https://example.com/api/version', { method: 'GET', headers: { 'Accept': 'application/json' } }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "version": "30.0vcs" }
Parameters
No parameters.
Get all categories
https://example.com/api/categories
curl -X 'GET' \ 'https://example.com/api/categories?parentId=1&descends=1&type=all' \ -H 'accept: application/json' \ -H 'Authorization: Bearer xxxxx'
<?php $url = 'https://example.com/api/categories?' . http_build_query([ 'parentId' => 1, 'descends' => 1, 'type' => 'all' ]); $headers = [ 'Accept: application/json', 'Authorization: Bearer xxxxx' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if (curl_errno($ch)) { $error_msg = curl_error($ch); echo 'Error: ' . $error_msg; } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
const params = new URLSearchParams({ parentId: '1', descends: '1', type: 'all' }); fetch('https://example.com/api/categories?' + params.toString(), { method: 'GET', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer xxxxx' } }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "1": { "categId": 1, "name": "Super Admin", "description": "", "parentId": 0, "rootId": 0, "hits": 0, "tplGroupContainerId": 0, "tplGroupPattern": null, "num_roles": 0, "objects": 0, "children": [ 2, 3 ], "descendants": [ 2, 3, 4, 5, 6, 7 ], "tepath": { "1": "Super Admin" }, "categpath": "Super Admin", "relativePathString": "Super Admin" }, "2": { "categId": 2, "name": "Contributers", "description": "", "parentId": 1, "rootId": 1, "hits": 0, "tplGroupContainerId": 0, "tplGroupPattern": null, "num_roles": 0, "objects": 0, "children": [ 6, 7 ], "descendants": [ 6, 7 ], "tepath": { "1": "Super Admin", "2": "Contributers" }, "categpath": "Super Admin::Contributers", "relativePathString": "Super Admin::Contributers" }, "3": { "categId": 3, "name": "Translators", "description": "", "parentId": 1, "rootId": 1, "hits": 0, "tplGroupContainerId": 0, "tplGroupPattern": null, "num_roles": 0, "objects": 0, "children": [ 4, 5 ], "descendants": [ 4, 5 ], "tepath": { "1": "Super Admin", "3": "Translators" }, "categpath": "Super Admin::Translators", "relativePathString": "Super Admin::Translators" }, "4": { "categId": 4, "name": "French Translators", "description": "", "parentId": 3, "rootId": 1, "hits": 0, "tplGroupContainerId": 0, "tplGroupPattern": null, "num_roles": 0, "objects": 0, "children": [], "descendants": [], "tepath": { "1": "Super Admin", "3": "Translators", "4": "French Translators" }, "categpath": "Super Admin::Translators::French Translators", "relativePathString": "Super Admin::Translators::French Translators" }, "5": { "categId": 5, "name": "Chinese Translators", "description": "", "parentId": 3, "rootId": 1, "hits": 0, "tplGroupContainerId": 0, "tplGroupPattern": null, "num_roles": 0, "objects": 0, "children": [], "descendants": [], "tepath": { "1": "Super Admin", "3": "Translators", "5": "Chinese Translators" }, "categpath": "Super Admin::Translators::Chinese Translators", "relativePathString": "Super Admin::Translators::Chinese Translators" }, "6": { "categId": 6, "name": "Developers", "description": "", "parentId": 2, "rootId": 1, "hits": 0, "tplGroupContainerId": 0, "tplGroupPattern": null, "num_roles": 0, "objects": 0, "children": [], "descendants": [], "tepath": { "1": "Super Admin", "2": "Contributers", "6": "Developers" }, "categpath": "Super Admin::Contributers::Developers", "relativePathString": "Super Admin::Contributers::Developers" }, "7": { "categId": 7, "name": "DevOps", "description": "", "parentId": 2, "rootId": 1, "hits": 0, "tplGroupContainerId": 0, "tplGroupPattern": null, "num_roles": 0, "objects": 0, "children": [], "descendants": [], "tepath": { "1": "Super Admin", "2": "Contributers", "7": "DevOps" }, "categpath": "Super Admin::Contributers::DevOps", "relativePathString": "Super Admin::Contributers::DevOps" } }
Parameters
- parentId integer Optional: The ID of the parent category to return children or descendants of.
- descends integer Optional: Return descendants of a category. Possible values are:
- 0: Return children of a category
- 1: Return descendants of a category
- type string Optional: Possible values are
- roots: return root level categories
- all: return all categories
- everything else return descendants of a category
Create a new category
https://example.com/api/categories
curl -X 'POST' \ 'https://example.com/api/categories' \ -H 'accept: application/json' \ -H 'Content-Type: application/x-www-form-urlencoded' \ -H 'Authorization: Bearer xxxxx' \ -d 'parentId=1&name=test%20category&description=description&parentPerms=true'
<?php $url = 'https://example.com/api/categories'; $data = http_build_query([ 'parentId' => 1, 'name' => 'test category', 'description' => 'description', 'parentPerms' => true ]); $headers = [ 'Accept: application/json', 'Content-Type: application/x-www-form-urlencoded', 'Authorization: Bearer xxxxx' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $response = curl_exec($ch); if (curl_errno($ch)) { $error_msg = curl_error($ch); echo 'Error: ' . $error_msg; } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
const formData = new URLSearchParams({ parentId: '1', name: 'test category', description: 'description', parentPerms: true }); fetch('https://example.com/api/categories', { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded', 'Authorization': 'Bearer xxxxx' }, body: formData.toString() }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "categId": 11, "name": "test category", "description": "description", "parentId": 1, "rootId": 1, "hits": 0, "tplGroupContainerId": 0, "tplGroupPattern": "", "num_roles": 0, "objects": 0, "children": [], "descendants": [], "tepath": { "1": "Super Admin", "11": "test category" }, "categpath": "Super Admin::test category", "relativePathString": "Super Admin::test category" }
Parameters
- parentId integer Optional: The ID of the parent category
- name string *: The name of the category
- description string Optional: The description of the category
- tplGroupContainerId integer Optional: The ID of the template group container
- tplGroupPattern string Optional: The template group pattern
- true: Copy parent category permissions
- false: Do not copy parent category permissions
Update a category
https://example.com/api/categories/{categId}
curl -X 'POST' \ 'https://example.com/api/categories/11' \ -H 'accept: application/json' \ -H 'Content-Type: application/x-www-form-urlencoded' \ -H 'Authorization: Bearer xxxxx' \ -d 'parentId=1&name=test%20category%20updated&description=description%20updated&parentPerms=true'
<?php $url = 'https://example.com/api/categories/11'; $data = http_build_query([ 'parentId' => 1, 'name' => 'test category updated', 'description' => 'description updated', 'parentPerms' => true ]); $headers = [ 'Accept: application/json', 'Content-Type: application/x-www-form-urlencoded', 'Authorization: Bearer xxxxx' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $response = curl_exec($ch); if (curl_errno($ch)) { $error_msg = curl_error($ch); echo 'Error: ' . $error_msg; } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
const formData = new URLSearchParams({ parentId: '1', name: 'test category updated', description: 'description updated', parentPerms: true }); fetch('https://example.com/api/categories/11', { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded', 'Authorization': 'Bearer xxxxx' }, body: formData.toString() }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "categId": 11, "name": "test category updated", "description": "description updated", "parentId": 1, "rootId": 1, "hits": 0, "tplGroupContainerId": 0, "tplGroupPattern": "", "num_roles": 0, "objects": 0, "children": [], "descendants": [], "tepath": { "1": "Super Admin", "11": "test category updated" }, "categpath": "Super Admin::test category updated", "relativePathString": "Super Admin::test category updated" }
Parameters
- parentId integer Optional: The ID of the parent category
- name string *: The name of the category
- description string Optional: The description of the category
- tplGroupContainerId integer Optional: The ID of the template group container
- tplGroupPattern string Optional: The template group pattern
- true: Copy parent category permissions
- false: Do not copy parent category permissions
Delete a category
https://example.com/api/categories/{categId}
curl -X 'DELETE' \ 'https://example.com/api/categories/11' \ -H 'accept: application/json' \ -H 'Authorization: Bearer xxxxx'
<?php $url = 'https://example.com/api/categories/11'; $headers = [ 'Accept: application/json', 'Authorization: Bearer xxxxx' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE"); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if (curl_errno($ch)) { $error_msg = curl_error($ch); echo 'Error: ' . $error_msg; } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
fetch('https://example.com/api/categories/11', { method: 'DELETE', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer xxxxx' } }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "categId": 11, "name": "test category updated", "description": "description updated", "parentId": 1, "rootId": 1, "hits": 0, "tplGroupContainerId": 0, "tplGroupPattern": "", "num_roles": 0, "objects": 0, "children": [], "descendants": [], "tepath": { "1": "Super Admin", "11": "test category updated" }, "categpath": "Super Admin::test category updated", "relativePathString": "Super Admin::test category updated" }
Parameters
- categId string *: The category ID to be deleted
Categorize
Categorize one or more objects under a specific category
https://example.com/api/categorize
curl -X 'POST' \ 'https://example.com/api/categorize' \ -H 'accept: application/json' \ -H 'Content-Type: application/x-www-form-urlencoded' \ -H 'Authorization: Bearer xxxxx' \ -d 'categId=1&objects[]=wiki page:quiz' \ -d 'categId=1&objects[]=file gallery:1' \ -d 'categId=1&objects[]=trackeritem:1003'
<?php $url = 'https://example.com/api/categorize'; $data = [ ['categId' => 1, 'objects[]' => 'wiki page:quiz'], ['categId' => 1, 'objects[]' => 'file gallery:1'], ['categId' => 1, 'objects[]' => 'trackeritem:1003'] ]; $postFields = []; foreach ($data as $pair) { foreach ($pair as $key => $value) { $postFields[] = urlencode($key) . '=' . urlencode($value); } } $body = implode('&', $postFields); $headers = [ 'Accept: application/json', 'Content-Type: application/x-www-form-urlencoded', 'Authorization: Bearer xxxxx' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POSTFIELDS, $body); $response = curl_exec($ch); if (curl_errno($ch)) { $error_msg = curl_error($ch); echo 'Error: ' . $error_msg; } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
const formData = new URLSearchParams(); formData.append('categId', '1'); formData.append('objects[]', 'wiki page:quiz'); formData.append('categId', '1'); formData.append('objects[]', 'file gallery:1'); formData.append('categId', '1'); formData.append('objects[]', 'trackeritem:1003'); fetch('https://example.com/api/categorize', { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded', 'Authorization': 'Bearer xxxxx' }, body: formData.toString() }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "categId": 1, "count": 3, "objects": [ { "type": "wiki page", "id": "quiz", "catObjectId": 3 }, { "type": "file gallery", "id": "1", "catObjectId": 4 }, { "type": "trackeritem", "id": "1003", "catObjectId": 5 } ] }
Request body
- categId integer *: The ID of the category to categorize the objects under
- objects[] array *: Tiki object use format Type:ID where type is trackeritem, page, etc. and ID is the object identifier based on type.
- eg. trackeritem:1, wiki page:homePage, file:3, blog:4, forum:5, file gallery:6, quiz:7, poll:8, calendar:9, tracker:10
Uncategorize
Uncategorize one or more objects from a specific category
https://example.com/api/uncategorize
curl -X 'POST' \ 'https://example.com/api/uncategorize' \ -H 'accept: application/json' \ -H 'Content-Type: application/x-www-form-urlencoded' \ -H 'Authorization: Bearer xxxxx' \ -d 'categId=1&objects[]=wiki page:quiz' \ -d 'categId=1&objects[]=file gallery:1' \ -d 'categId=1&objects[]=trackeritem:1003'
<?php $url = 'https://example.com/api/uncategorize'; $data = [ ['categId' => 1, 'objects[]' => 'wiki page:quiz'], ['categId' => 1, 'objects[]' => 'file gallery:1'], ['categId' => 1, 'objects[]' => 'trackeritem:1003'] ]; $postFields = []; foreach ($data as $pair) { foreach ($pair as $key => $value) { $postFields[] = urlencode($key) . '=' . urlencode($value); } } $body = implode('&', $postFields); $headers = [ 'Accept: application/json', 'Content-Type: application/x-www-form-urlencoded', 'Authorization: Bearer xxxxx' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POSTFIELDS, $body); $response = curl_exec($ch); if (curl_errno($ch)) { $error_msg = curl_error($ch); echo 'Error: ' . $error_msg; } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
const formData = new URLSearchParams(); formData.append('categId', '1'); formData.append('objects[]', 'wiki page:quiz'); formData.append('categId', '1'); formData.append('objects[]', 'file gallery:1'); formData.append('categId', '1'); formData.append('objects[]', 'trackeritem:1003'); fetch('https://example.com/api/uncategorize', { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded', 'Authorization': 'Bearer xxxxx' }, body: formData.toString() }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "categId": "1", "count": 0, "objects": [ { "type": "wiki page", "id": "quiz", "catObjectId": 3 }, { "type": "file gallery", "id": "1", "catObjectId": 4 }, { "type": "trackeritem", "id": "1003", "catObjectId": 5 } ] }
Request body
- categId integer *: The ID of the category to categorize the objects under
- objects[] array *: Tiki object use format Type:ID where type is trackeritem, page, etc. and ID is the object identifier based on type.
- eg. trackeritem:1, wiki page:homePage, file:3, blog:4, forum:5, file gallery:6, quiz:7, poll:8, calendar:9, tracker:10
Get all comments
https://example.com/api/comments
curl -X 'GET' \ 'https://example.com/api/comments?type=article&objectId=1&offset=0&maxRecords=5' \ -H 'accept: application/json' \ -H 'Authorization: Bearer xxxxx'
<?php $url = 'https://example.com/api/comments?type=article&objectId=1&offset=0&maxRecords=5'; $headers = [ 'Accept: application/json', 'Authorization: Bearer xxxxx' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if (curl_errno($ch)) { $error_msg = curl_error($ch); echo 'Error: ' . $error_msg; } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
const url = 'https://example.com/api/comments?type=article&objectId=1&offset=0&maxRecords=5'; fetch(url, { method: 'GET', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer xxxxx' } }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "title": "Comments", "comments": [ { "threadId": 7, "object": "1", "objectType": "article", "parentId": 0, "userName": "admin", "commentDate": 1754168128, "hits": 0, "type": "n", "points": "0.00", "votes": 0, "average": "0.0000", "title": "Untitled", "data": "Hey, first comment", "email": "", "website": "", "user_ip": "::1", "summary": "", "smiley": null, "message_id": "admin-0-333ff4a0b7@localhost", "in_reply_to": "", "comment_rating": null, "archived": null, "approved": "y", "locked": "n", "grandFather": 0, "replies_info": { "replies": [ { "threadId": 8, "object": "1", "objectType": "article", "parentId": 7, "userName": "admin", "commentDate": 1754168138, "hits": 0, "type": "n", "points": "0.00", "votes": 0, "average": "0.0000", "title": "Untitled", "data": "Good", "email": "", "website": "", "user_ip": "::1", "summary": "", "smiley": null, "message_id": "admin-7-f5b8fc3444@localhost", "in_reply_to": "admin-0-333ff4a0b7@localhost", "comment_rating": null, "archived": null, "approved": "y", "locked": "n", "parsed": "Good", "user_posts": 9, "user_level": 5, "user_email": "", "attachments": [], "is_reported": 0, "user_online": "n", "user_exists": 1, "replies_info": { "replies": [], "numReplies": 0, "totalReplies": 0 }, "level": 0, "can_edit": true } ], "numReplies": 1, "totalReplies": 1 }, "isEmpty": "n", "version": 0, "diffInfo": [], "replies_flat": [ { "threadId": 8, "object": "1", "objectType": "article", "parentId": 7, "userName": "admin", "commentDate": 1754168138, "hits": 0, "type": "n", "points": "0.00", "votes": 0, "average": "0.0000", "title": "Untitled", "data": "Good", "email": "", "website": "", "user_ip": "::1", "summary": "", "smiley": null, "message_id": "admin-7-f5b8fc3444@localhost", "in_reply_to": "admin-0-333ff4a0b7@localhost", "comment_rating": null, "archived": null, "approved": "y", "locked": "n", "parsed": "Good", "user_posts": 9, "user_level": 5, "user_email": "", "attachments": [], "is_reported": 0, "user_online": "n", "user_exists": 1, "replies_info": { "replies": [], "numReplies": 0, "totalReplies": 0 }, "level": 0, "can_edit": true } ], "parsed": "Hey, first comment", "user_posts": 9, "user_level": 5, "user_email": "", "attachments": [], "is_reported": 0, "user_online": "n", "user_exists": 1, "can_edit": true }, { "threadId": 9, "object": "1", "objectType": "article", "parentId": 0, "userName": "admin", "commentDate": 1754168149, "hits": 0, "type": "n", "points": "0.00", "votes": 0, "average": "0.0000", "title": "Untitled", "data": "Second comment", "email": "", "website": "", "user_ip": "::1", "summary": "", "smiley": null, "message_id": "admin-0-b45ea10f1f@localhost", "in_reply_to": "", "comment_rating": null, "archived": null, "approved": "y", "locked": "n", "grandFather": 0, "replies_info": { "replies": [], "numReplies": 0, "totalReplies": 0 }, "isEmpty": "n", "version": 0, "diffInfo": [], "replies_flat": [], "parsed": "Second comment", "user_posts": 9, "user_level": 5, "user_email": "", "attachments": [], "is_reported": 0, "user_online": "n", "user_exists": 1, "can_edit": true } ], "type": "article", "objectId": "1", "parentId": 0, "count": 3, "offset": 0, "maxRecords": 5, "sortMode": "commentDate_asc", "allow_post": true, "allow_remove": true, "allow_lock": true, "allow_unlock": false, "allow_archive": true, "allow_moderate": true, "allow_vote": false }
Parameters
- type string *: Object type to get comments from. Possible values are:
- wiki page, file gallery, poll, faq, blog post, trackeritem, article, activity
- objectId integer *: Object ID to get comments from
- offset integer *: Offset to start from
- maxRecords integer *: Maximum number of records to return
Create a new comment.
https://example.com/api/comments
curl -X 'POST' \ 'https://example.com/api/comments' \ -H 'accept: application/json' \ -H 'Content-Type: application/x-www-form-urlencoded' \ -H 'Authorization: Bearer xxxxx' \ -d 'parentId=9' \ -d 'title=My Reply' \ -d 'data=Hello test' \ -d 'objectId=1' \ -d 'type=article'
<?php $url = 'https://example.com/api/comments'; $data = http_build_query([ 'parentId' => 9, 'title' => 'My Reply', 'data' => 'Hello test', 'objectId' => 1, 'type' => 'article' ]); $headers = [ 'Accept: application/json', 'Content-Type: application/x-www-form-urlencoded', 'Authorization: Bearer xxxxx' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $response = curl_exec($ch); if (curl_errno($ch)) { $error_msg = curl_error($ch); echo 'Error: ' . $error_msg; } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
const formData = new URLSearchParams(); formData.append('parentId', '9'); formData.append('title', 'My Reply'); formData.append('data', 'Hello test'); formData.append('objectId', '1'); formData.append('type', 'article'); fetch('https://example.com/api/comments', { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded', 'Authorization': 'Bearer xxxxx' }, body: formData.toString() }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "threadId": "13", "parentId": 9, "type": "article", "objectId": "1", "feedback": [] }
Request body
- type string *: Object type on which to create the comment. Possible values are:
- wiki page, file gallery, poll, faq, blog post, trackeritem, article, activity
- objectId integer *: Object ID on which to create the comment
- offset integer *: Offset to start from
- parentId integer Optional: Parent comment ID
- version integer Optional: Comment version. By default, it is 0
- title string Optional: Comment title
- data string Optional: Comment wiki content
- watch string Optional: Tiki boolean use format y/n
- anonymous_name string Optional: Anonymous user name
- anonymous_email string Optional: Anonymous user email
- anonymous_website string Optional: Anonymous user website
Create a new comment.
https://example.com/api/comments/{threadId}
curl -X 'POST' \ 'https://example.com/api/comments/14' \ -H 'accept: application/json' \ -H 'Content-Type: application/x-www-form-urlencoded' \ -H 'Authorization: Bearer xxxxx' \ -d 'title=Updated Title' \ -d 'data=Updated content'
<?php $url = 'https://example.com/api/comments/14'; $data = http_build_query([ 'title' => 'Updated Title', 'data' => 'Updated content', ]); $headers = [ 'Accept: application/json', 'Content-Type: application/x-www-form-urlencoded', 'Authorization: Bearer xxxxx' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $response = curl_exec($ch); if (curl_errno($ch)) { $error_msg = curl_error($ch); echo 'Error: ' . $error_msg; } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
const formData = new URLSearchParams(); formData.append('title', 'Updated title'); formData.append('data', 'Updated content'); fetch('https://example.com/api/comments/14', { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded', 'Authorization': 'Bearer xxxxx' }, body: formData.toString() }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "threadId": 14, "comment": { "threadId": 14, "object": "1", "objectType": "article", "parentId": 9, "userName": "admin", "commentDate": 1754173243, "hits": 0, "type": "n", "points": "0.00", "votes": 0, "average": "0.0000", "title": "Updated title", "data": "Updated content", "email": "", "website": "", "user_ip": "::1", "summary": "", "smiley": "", "message_id": "admin-9-a2d3a35adf@localhost", "in_reply_to": "admin-0-b45ea10f1f@localhost", "comment_rating": 0, "archived": null, "approved": "y", "locked": "n", "parsed": "Hello test Updated", "user_posts": 14, "user_level": 5, "user_email": "", "attachments": [], "is_reported": 0, "user_online": "n", "user_exists": 1 } }
Request body
- title string Optional: Comment title
- data string Optional: Comment wiki content
Remove a comment.
https://example.com/api/comments/{threadId}
curl -X 'DELETE' \ 'https://example.com/api/comments/14' \ -H 'Authorization: Bearer xxxxx' \ -H 'accept: application/json'
<?php $url = 'https://example.com/api/comments/14'; $headers = [ 'Accept: application/json', 'Authorization: Bearer xxxxx' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE'); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if (curl_errno($ch)) { $error_msg = curl_error($ch); echo 'Error: ' . $error_msg; } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
fetch('https://example.com/api/comments/14', { method: 'DELETE', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer xxxxx' } }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "threadId": 14, "status": "DONE", "objectType": "article", "objectId": "1", "parsed": "Content test" }
Parameters
- threadId string *: Comment thread ID
Lock a comment thread.
https://example.com/api/comments/{threadId}/lock
curl -X 'POST' \ 'https://example.com/api/comments/23/lock' \ -H 'accept: application/json' \ -H 'Authorization: Bearer xxxxx' \ -H 'Content-Type: application/x-www-form-urlencoded' \ -d 'type=wiki%20page&objectId=test-page'
<?php $url = 'https://example.com/api/comments/23/lock'; $data = http_build_query([ 'type' => 'wiki page', 'objectId' => 'test-page' ]); $headers = [ 'Accept: application/json', 'Content-Type: application/x-www-form-urlencoded', 'Authorization: Bearer xxxxx' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($status === 200) { $data = json_decode($response, true); print_r($data); } else { echo "Error: HTTP status code $status\n"; echo $response; } } curl_close($ch); ?>
const formData = new URLSearchParams(); formData.append('type', 'wiki page'); formData.append('objectId', 'test-page'); fetch('https://example.com/api/comments/23/lock', { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded', 'Authorization': 'Bearer xxxxx' }, body: formData.toString() }) .then(response => { if (!response.ok) throw new Error("HTTP " + response.status); return response.json(); }) .then(data => console.log(data)) .catch(error => console.error("Fetch error:", error));
{ "title": "Lock comments", "type": "wiki page", "objectId": "test-page", "status": "DONE" }
Parameters
- threadId integer *: The comment thread ID.
- type string *: The type of the object (wiki page, file gallery, poll, faq, blog post, trackeritem, article, activity)
- objectId string *: The object ID associated with the comment thread.
Unlock a comment thread.
https://example.com/api/comments/{threadId}/unlock
curl -X 'POST' \ 'https://example.com/api/comments/23/unlock' \ -H 'accept: application/json' \ -H 'Authorization: Bearer xxxxx' \ -H 'Content-Type: application/x-www-form-urlencoded' \ -d 'type=wiki%20page&objectId=test-page'
<?php $url = 'https://example.com/api/comments/23/unlock'; $data = http_build_query([ 'type' => 'wiki page', 'objectId' => 'test-page' ]); $headers = [ 'Accept: application/json', 'Content-Type: application/x-www-form-urlencoded', 'Authorization: Bearer xxxxx' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($status === 200) { $data = json_decode($response, true); print_r($data); } else { echo "Error: HTTP status code $status\n"; echo $response; } } curl_close($ch); ?>
const formData = new URLSearchParams(); formData.append('type', 'wiki page'); formData.append('objectId', 'test-page'); fetch('https://example.com/api/comments/23/unlock', { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded', 'Authorization': 'Bearer xxxxx' }, body: formData.toString() }) .then(response => { if (!response.ok) throw new Error("HTTP " + response.status); return response.json(); }) .then(data => console.log(data)) .catch(error => console.error("Fetch error:", error));
{ "title": "Unlock comments", "type": "wiki page", "objectId": "test-page", "status": "DONE" }
Parameters
- threadId integer *: The comment thread ID.
- type string *: The type of the object (wiki page, file gallery, poll, faq, blog post, trackeritem, article, activity)
- objectId string *: The object ID associated with the comment thread.
Moderate comment - approve
https://example.com/api/comments/{threadId}/approve
curl -X 'POST' \ 'https://example.com/api/comments/23/approve' \ -H 'accept: application/json' \ -H 'Authorization: Bearer xxxxx'
<?php $url = 'https://example.com/api/comments/23/approve'; $headers = [ 'Accept: application/json', 'Authorization: Bearer xxxxx' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POSTFIELDS, ''); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($status === 200) { $data = json_decode($response, true); print_r($data); } else { echo "Error: HTTP status code $status\n"; echo $response; } } curl_close($ch); ?>
fetch('https://example.com/api/comments/23/approve', { method: 'POST', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer xxxxx' } }) .then(response => { if (!response.ok) throw new Error("HTTP " + response.status); return response.json(); }) .then(data => console.log(data)) .catch(error => console.error("Fetch error:", error));
{ "threadId": 23, "type": "wiki page", "objectId": "test-page", "status": "DONE", "do": "APPROVE" }
Parameters
- threadId integer *: The comment thread ID.
Moderate comment - reject
https://example.com/api/comments/{threadId}/reject
curl -X 'POST' \ 'https://example.com/api/comments/23/reject' \ -H 'accept: application/json' \ -H 'Authorization: Bearer xxxxx'
<?php $url = 'https://example.com/api/comments/23/reject'; $headers = [ 'Accept: application/json', 'Authorization: Bearer xxxxx' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POSTFIELDS, ''); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($status === 200) { $data = json_decode($response, true); print_r($data); } else { echo "Error: HTTP status code $status\n"; echo $response; } } curl_close($ch); ?>
fetch('https://example.com/api/comments/23/reject', { method: 'POST', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer xxxxx' } }) .then(response => { if (!response.ok) throw new Error("HTTP " + response.status); return response.json(); }) .then(data => console.log(data)) .catch(error => console.error("Fetch error:", error));
{ "threadId": 23, "type": "wiki page", "objectId": "test-page", "status": "DONE", "do": "REJECT" }
Parameters
- threadId integer *: The comment thread ID.
Archive comment
https://example.com/api/comments/{threadId}/archive
curl -X 'POST' \ 'https://example.com/api/comments/23/archive' \ -H 'accept: application/json' \ -H 'Authorization: Bearer xxxxx'
<?php $url = 'https://example.com/api/comments/23/archive'; $headers = [ 'Accept: application/json', 'Authorization: Bearer xxxxx' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POSTFIELDS, ''); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($status === 200) { $data = json_decode($response, true); print_r($data); } else { echo "Error: HTTP status code $status\n"; echo $response; } } curl_close($ch); ?>
fetch('https://example.com/api/comments/23/archive', { method: 'POST', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer xxxxx' } }) .then(response => { if (!response.ok) throw new Error("HTTP " + response.status); return response.json(); }) .then(data => console.log(data)) .catch(error => console.error("Fetch error:", error));
{ "threadId": 23, "type": "wiki page", "objectId": "test-page", "status": "DONE", "do": "archive" }
Parameters
- threadId integer *: The comment thread ID.
Unarchive comment
https://example.com/api/comments/{threadId}/unarchive
curl -X 'POST' \ 'https://example.com/api/comments/23/unarchive' \ -H 'accept: application/json' \ -H 'Authorization: Bearer xxxxx'
<?php $url = 'https://example.com/api/comments/23/unarchive'; $headers = [ 'Accept: application/json', 'Authorization: Bearer xxxxx' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POSTFIELDS, ''); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($status === 200) { $data = json_decode($response, true); print_r($data); } else { echo "Error: HTTP status code $status\n"; echo $response; } } curl_close($ch); ?>
fetch('https://example.com/api/comments/23/unarchive', { method: 'POST', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer xxxxx' } }) .then(response => { if (!response.ok) throw new Error("HTTP " + response.status); return response.json(); }) .then(data => console.log(data)) .catch(error => console.error("Fetch error:", error));
{ "threadId": 23, "type": "wiki page", "objectId": "test-page", "status": "DONE", "do": "unarchive" }
Parameters
- threadId integer *: The comment thread ID.
Get all galleries.
Retrieve all galleries with optional filters and pagination.
https://example.com/api/galleries
curl --request GET \ --url "https://example.com/api/galleries" \ --header "Authorization: Bearer <API_TOKEN>" \ --header "accept: application/json" \ --data-urlencode "galleryId=1" \ --data-urlencode "maxRecords=2" \ --data-urlencode "sort_mode=created_desc" \ --data-urlencode "user=admin"
<?php $url = 'https://example.com/api/galleries?' . http_build_query([ 'galleryId' => 1, 'maxRecords' => 2, 'sort_mode' => 'created_desc', 'user' => 'admin' ]); $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($status === 200) { $data = json_decode($response, true); print_r($data); } else { echo "Error: HTTP status code $status\n"; echo $response; } } curl_close($ch); ?>
const params = new URLSearchParams({ galleryId: 1, maxRecords: 2, sort_mode: 'created_desc', user: 'admin' }); fetch('https://example.com/api/galleries?' + params.toString(), { method: 'GET', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>' } }) .then(response => { if (!response.ok) throw new Error("HTTP " + response.status); return response.json(); }) .then(data => console.log(data)) .catch(error => console.error("Fetch error:", error));
{ "title": "List Galleries", "parentId": 1, "offset": 0, "maxRecords": 2, "count": 3, "result": [ { "isgal": 1, "id": 7, "parentId": 1, "name": "TestArchive", "description": "", "size": 0, "created": 1752861115, "filename": "TestArchive", "type": "default", "creator": "admin", "author": "", "hits": null, "lastDownload": 0, "votes": null, "points": null, "path": "", "reference_url": "", "is_reference": "", "hash": "", "search_data": "TestArchive", "metadata": "", "lastModif": 1754752642, "last_user": "", "lockedby": "", "comment": "", "deleteAfter": "", "maxhits": "", "archiveId": 0, "ocr_state": "", "visible": "y", "public": "y", "show_source": "o", "files": 8, "fileId": 7, "galleryId": 1, "filesize": 0, "filetype": "default", "user": "admin", "lastModifUser": "", "icon_fileId": null, "parentName": "File Galleries", "perms": { "tiki_p_admin_file_galleries": "y", "tiki_p_download_files": "y", "tiki_p_upload_files": "y", "tiki_p_remove_files": "y", "tiki_p_list_file_galleries": "y", "tiki_p_view_file_gallery": "y", "tiki_p_create_file_galleries": "y", "tiki_p_edit_gallery_file": "y", "tiki_p_assign_perm_file_gallery": "y", "tiki_p_batch_upload_file_dir": "y", "tiki_p_batch_upload_files": "y", "tiki_p_view_fgal_explorer": "y", "tiki_p_view_fgal_path": "y", "tiki_p_upload_javascript": "y", "tiki_p_upload_svg": "y" }, "podcast_filename": "" }, { "isgal": 1, "id": 6, "parentId": 1, "name": "Test Gallery Archives", "description": "", "size": 0, "created": 1752859250, "filename": "Test Gallery Archives", "type": "default", "creator": "admin", "author": "", "hits": null, "lastDownload": 0, "votes": null, "points": null, "path": "", "reference_url": "", "is_reference": "", "hash": "", "search_data": "Test Gallery Archives", "metadata": "", "lastModif": 1752880273, "last_user": "", "lockedby": "", "comment": "", "deleteAfter": "", "maxhits": "", "archiveId": 0, "ocr_state": "", "visible": "y", "public": "y", "show_source": "o", "files": 4, "fileId": 6, "galleryId": 1, "filesize": 0, "filetype": "default", "user": "admin", "lastModifUser": "", "icon_fileId": null, "parentName": "File Galleries", "perms": { "tiki_p_admin_file_galleries": "y", "tiki_p_download_files": "y", "tiki_p_upload_files": "y", "tiki_p_remove_files": "y", "tiki_p_list_file_galleries": "y", "tiki_p_view_file_gallery": "y", "tiki_p_create_file_galleries": "y", "tiki_p_edit_gallery_file": "y", "tiki_p_assign_perm_file_gallery": "y", "tiki_p_batch_upload_file_dir": "y", "tiki_p_batch_upload_files": "y", "tiki_p_view_fgal_explorer": "y", "tiki_p_view_fgal_path": "y", "tiki_p_upload_javascript": "y", "tiki_p_upload_svg": "y" }, "podcast_filename": "" } ] }
Parameters
- galleryId integer Optional: The gallery ID to filter by
- offset integer Optional: The offset to start from
- maxRecords integer Optional: The maximum number of records to return
- sort_mode string Optional: The sort mode. Possible values are:
- created_desc, created_asc, name_desc, name_asc
- user string Optional: The user (username) who created the gallery
- find string Optional: The search string to find galleries
Create a new Gallery.
Create a new gallery.
https://example.com/api/galleries
curl --request POST \ --url "https://example.com/api/galleries" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --header "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "name=Test Gallery" \ --data-urlencode "type=default" \ --data-urlencode "description=Test Gallery Description" \ --data-urlencode "parentId=0"
<?php $url = 'https://example.com/api/galleries'; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>', 'Content-Type: application/x-www-form-urlencoded' ]; $data = http_build_query([ 'name' => 'Test Gallery', 'type' => 'default', 'description' => 'Test Gallery Description', 'parentId' => 0 ]); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
const formData = new URLSearchParams(); formData.append("name", "Test Gallery"); formData.append("type", "default"); formData.append("description", "Test Gallery Description"); formData.append("parentId", "0"); fetch("https://example.com/api/galleries", { method: "POST", headers: { "Accept": "application/json", "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/x-www-form-urlencoded" }, body: formData }) .then(response => { if (!response.ok) throw new Error("HTTP " + response.status); return response.json(); }) .then(data => console.log(data)) .catch(error => console.error("Fetch error:", error));
{ "info": { "galleryId": 11, "name": "Test Gallery", "type": "default", "direct": null, "template": null, "description": "Test Gallery Description", "created": 1760288475, "visible": "y", "lastModif": 1760288475, "user": "admin", "hits": null, "votes": null, "points": null, "maxRows": 10, "public": "y", "show_id": "o", "show_icon": "y", "show_name": "n", "show_size": "y", "show_description": "o", "max_desc": 0, "show_created": "o", "show_hits": "o", "show_lastDownload": "n", "parentId": 1, "lockable": "n", "show_lockedby": "a", "archives": 0, "sort_mode": null, "show_modified": "y", "show_author": "o", "show_creator": "o", "subgal_conf": "", "show_last_user": "o", "show_comment": "o", "show_files": "o", "show_explorer": "y", "show_path": "y", "show_slideshow": "n", "show_ocr_state": "n", "default_view": "list", "quota": 0, "size": null, "wiki_syntax": "", "backlinkPerms": "n", "show_backlinks": "n", "show_deleteAfter": "n", "show_checked": "y", "show_share": "n", "image_max_size_x": 0, "image_max_size_y": 0, "show_source": "o", "icon_fileId": null, "ocr_lang": "", "display_name_generation": null } }
Request Body
- name string *: The name of the gallery
- type string optional: The type of the gallery. Possible values are:
- default, podcast, vidcast, direct
- description string optional: The description of the gallery
- parentId integer optional: The parent ID of the gallery
Retrieve gallery information.
Retrieve detailed information about a specific gallery.
https://example.com/api/galleries/{galleryId}
curl --request GET \ --url "https://example.com/api/galleries/11" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>"
<?php $url = 'https://example.com/api/galleries/11'; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
fetch("https://example.com/api/galleries/11", { method: "GET", headers: { "Accept": "application/json", "Authorization": "Bearer <API_TOKEN>" } }) .then(response => { if (!response.ok) throw new Error("HTTP " + response.status); return response.json(); }) .then(data => console.log(data)) .catch(error => console.error("Fetch error:", error));
{ "galleryId": 11, "name": "Test Gallery", "type": "default", "direct": null, "template": null, "description": "Test Gallery Description", "created": 1760288475, "visible": "y", "lastModif": 1760288475, "user": "admin", "hits": null, "votes": null, "points": null, "maxRows": 10, "public": "y", "show_id": "o", "show_icon": "y", "show_name": "n", "show_size": "y", "show_description": "o", "max_desc": 0, "show_created": "o", "show_hits": "o", "show_lastDownload": "n", "parentId": 1, "lockable": "n", "show_lockedby": "a", "archives": 0, "sort_mode": null, "show_modified": "y", "show_author": "o", "show_creator": "o", "subgal_conf": "", "show_last_user": "o", "show_comment": "o", "show_files": "o", "show_explorer": "y", "show_path": "y", "show_slideshow": "n", "show_ocr_state": "n", "default_view": "list", "quota": 0, "size": null, "wiki_syntax": "", "backlinkPerms": "n", "show_backlinks": "n", "show_deleteAfter": "n", "show_checked": "y", "show_share": "n", "image_max_size_x": 0, "image_max_size_y": 0, "show_source": "o", "icon_fileId": null, "ocr_lang": "", "display_name_generation": null }
Parameters
- galleryId integer *: The ID of the gallery to retrieve
Update an existing gallery.
Update an existing gallery.
https://example.com/api/galleries/{galleryId}/update
curl --request POST \ --url "https://example.com/api/galleries/11/update" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --header "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "name=Test Gallery Updated" \ --data-urlencode "type=default" \ --data-urlencode "description=Test Gallery Updated Description"
<?php $url = 'https://example.com/api/galleries/11/update'; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>', 'Content-Type: application/x-www-form-urlencoded' ]; $data = http_build_query([ 'name' => 'Test Gallery Updated', 'type' => 'default', 'description' => 'Test Gallery Updated Description' ]); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
const formData = new URLSearchParams(); formData.append("name", "Test Gallery Updated"); formData.append("type", "default"); formData.append("description", "Test Gallery Updated Description"); fetch("https://example.com/api/galleries/11/update", { method: "POST", headers: { "Accept": "application/json", "Authorization": "Bearer xxxx", "Content-Type": "application/x-www-form-urlencoded" }, body: formData }) .then(response => { if (!response.ok) throw new Error("HTTP " + response.status); return response.json(); }) .then(data => console.log(data)) .catch(error => console.error("Fetch error:", error));
{ "info": { "galleryId": 11, "name": "Test Gallery Updated", "type": "default", "direct": null, "template": null, "description": "Test Gallery Updated Description", "created": 1760288475, "visible": "y", "lastModif": 1760292310, "user": "admin", "hits": null, "votes": null, "points": null, "maxRows": 10, "public": "y", "show_id": "o", "show_icon": "y", "show_name": "n", "show_size": "y", "show_description": "o", "max_desc": 0, "show_created": "o", "show_hits": "o", "show_lastDownload": "n", "parentId": 1, "lockable": "n", "show_lockedby": "a", "archives": 0, "sort_mode": null, "show_modified": "y", "show_author": "o", "show_creator": "o", "subgal_conf": "", "show_last_user": "o", "show_comment": "o", "show_files": "o", "show_explorer": "y", "show_path": "y", "show_slideshow": "n", "show_ocr_state": "n", "default_view": "list", "quota": 0, "size": null, "wiki_syntax": "", "backlinkPerms": "n", "show_backlinks": "n", "show_deleteAfter": "n", "show_checked": "y", "show_share": "n", "image_max_size_x": 0, "image_max_size_y": 0, "show_source": "o", "icon_fileId": null, "ocr_lang": "", "display_name_generation": null } }
Parameters
- galleryId integer *: The ID of the gallery to update
Request Body
- name string *: The name of the gallery
- type string optional: The type of the gallery. Possible values are:
- default, podcast, vidcast, direct
- description string optional: The description of the gallery
Move a gallery.
Move a gallery to a different parent gallery.
https://example.com/api/galleries/{galleryId}/move
curl --request POST \ --url "https://example.com/api/galleries/11/move" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --header "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "newParentId=7"
<?php $url = 'https://example.com/api/galleries/11/move'; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>', 'Content-Type: application/x-www-form-urlencoded' ]; $data = http_build_query([ 'newParentId' => 7 ]); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
const formData = new URLSearchParams(); formData.append("newParentId", "7"); fetch("https://example.com/api/galleries/11/move", { method: "POST", headers: { "Accept": "application/json", "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/x-www-form-urlencoded" }, body: formData }) .then(response => { if (!response.ok) throw new Error("HTTP " + response.status); return response.json(); }) .then(data => console.log(data)) .catch(error => console.error("Fetch error:", error));
{ "title": "Move File Gallery", "message": "The file gallery 11 has been moved" }
Parameters
- galleryId integer *: The ID of the gallery to move
Request Body
- newParentId integer *: The destination gallery ID to which the gallery will be moved
Create a duplicate of an existing gallery.
Create a duplicate of an existing gallery.
https://example.com/api/galleries/{galleryId}/duplicate
curl --request POST \ --url "https://example.com/api/galleries/11/duplicate" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --header "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "name=Test Gallery Duplicated" \ --data-urlencode "description=Test Gallery Duplicated Description"
<?php $url = 'https://example.com/api/galleries/11/duplicate'; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>', 'Content-Type: application/x-www-form-urlencoded' ]; $data = http_build_query([ 'name' => 'Test Gallery Duplicated', 'description' => 'Test Gallery Duplicated Description' ]); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
const formData = new URLSearchParams(); formData.append("name", "Test Gallery Duplicated"); formData.append("description", "Test Gallery Duplicated Description"); fetch("https://example.com/api/galleries/11/duplicate", { method: "POST", headers: { "Accept": "application/json", "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/x-www-form-urlencoded" }, body: formData }) .then(response => { if (!response.ok) throw new Error("HTTP " + response.status); return response.json(); }) .then(data => console.log(data)) .catch(error => console.error("Fetch error:", error));
{ "title": "Duplicate File Gallery", "message": "File Gallery duplicated successfully", "id": "13" }
Parameters
- galleryId integer *: The ID of the gallery to duplicate
Request Body
- name string *: The name of the new duplicated gallery
- description string *: The description of the duplicated gallery
Delete a gallery
Delete a gallery.
https://example.com/api/galleries/{id}/delete
curl --request DELETE \ --url "https://example.com/api/galleries/13/delete" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --header "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "galleryId=7" \ --data-urlencode "recurse=true"
<?php $url = 'https://example.com/api/galleries/13/delete'; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>', 'Content-Type: application/x-www-form-urlencoded' ]; $data = http_build_query([ 'galleryId' => 7, 'recurse' => true ]); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE'); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
const formData = new URLSearchParams(); formData.append("galleryId", "7"); formData.append("recurse", "true"); fetch("https://example.com/api/galleries/13/delete", { method: "DELETE", headers: { "Accept": "application/json", "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/x-www-form-urlencoded" }, body: formData }) .then(response => { if (!response.ok) throw new Error("HTTP " + response.status); return response.json(); }) .then(data => console.log(data)) .catch(error => console.error("Fetch error:", error));
{ "title": "Delete File Gallery", "message": "The file gallery 13 has been deleted" }
Parameters
- id integer *: The ID of the gallery to delete
Request Body
- galleryId integer *: The parent gallery ID of the gallery being removed
- recurse boolean optional: Whether to also remove sub-galleries and files (true as default). Possible values are:
- true : remove all
- false : only this gallery
Upload a file into a gallery
Upload a file into a gallery or update an existing file.
https://example.com/api/galleries/upload
curl --request POST \ --url "https://example.com/api/galleries/upload" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --header "Content-Type: multipart/form-data" \ --form "galleryId=11" \ --form "fileId=" \ --form "data=@Wiki_Syntax.pdf;type=application/pdf" \ --form "user=admin" \ --form "title=Wiki Syntax Title" \ --form "name=Wiki Syntax" \ --form "description=Wiki Syntax Description"
<?php $url = 'https://example.com/api/galleries/upload'; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>' ]; $postFields = [ 'galleryId' => 11, 'fileId' => '', 'data' => new CURLFile('/path/to/Wiki_Syntax.pdf', 'application/pdf', 'Wiki_Syntax.pdf'), 'user' => 'admin', 'title' => 'Wiki Syntax Title', 'name' => 'Wiki Syntax', 'description' => 'Wiki Syntax Description' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
const formData = new FormData(); formData.append("galleryId", "11"); formData.append("fileId", ""); formData.append("data", new File([""], "Wiki_Syntax.pdf", { type: "application/pdf" })); formData.append("user", "admin"); formData.append("title", "Wiki Syntax Title"); formData.append("name", "Wiki Syntax"); formData.append("description", "Wiki Syntax Description"); fetch("https://example.com/api/galleries/upload", { method: "POST", headers: { "Accept": "application/json", "Authorization": "Bearer <API_TOKEN>" }, body: formData }) .then(response => { if (!response.ok) throw new Error("HTTP " + response.status); return response.json(); }) .then(data => console.log(data)) .catch(error => console.error("Upload error:", error));
{ "size": 91735, "name": "Wiki_Syntax.pdf", "title": "Wiki Syntax Title", "description": "Wiki Syntax Description", "type": "application/pdf", "fileId": "36", "galleryId": 11, "md5sum": "fa7e725936a48fe1c484e92fe394ddf2", "ticket": "9GKE_wo037vq-dwfF6uOYXUsF4VA_g8qqH7cqOcbPU0", "syntax": "{file type=\"gallery\" fileId=\"36\" showicon=\"y\"}", "info": { "fileId": 36, "galleryId": 11, "name": "Wiki Syntax Title", "description": "Wiki Syntax Description", "created": 1760298353, "filename": "Wiki_Syntax.pdf", "filesize": 91735, "filetype": "application/pdf", "user": "admin", "hash": "fa7e725936a48fe1c484e92fe394ddf2", "lastModif": 1760298353, "lastModifUser": "admin" } }
Request body
- galleryId integer : The gallery ID where the file will be uploaded
- fileId integer optional: The file ID to update — if provided, replaces the existing file
- data file *: File path to upload
- user string optional: The user uploading the file
- title string optional: The title of the file
- name string optional: The name of the file
- description string optional: The description of the file
Download a file
Download a file by its file ID.
https://example.com/api/galleries/{fileId}/download
curl --request GET \ --url "https://example.com/api/galleries/36/download" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --output "Wiki_Syntax.pdf"
<?php $url = 'https://example.com/api/galleries/36/download'; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $filePath = __DIR__ . '/Wiki_Syntax.pdf'; file_put_contents($filePath, $response); echo "File downloaded successfully to: $filePath\n"; } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
import fs from "fs"; import fetch from "node-fetch"; const url = "https://example.com/api/galleries/36/download"; const headers = { "Accept": "application/json", "Authorization": "Bearer <API_TOKEN>" }; fetch(url, { method: "GET", headers }) .then(response => { if (!response.ok) throw new Error("HTTP " + response.status); return response.arrayBuffer(); }) .then(buffer => { const filePath = "./Wiki_Syntax.pdf"; fs.writeFileSync(filePath, Buffer.from(buffer)); console.log("File downloaded successfully:", filePath); }) .catch(error => console.error("Download error:", error));
Binary file response (application/pdf or other file type)
Parameters
- fileId integer *: The ID of the file to download
Retrieve All Files of a Gallery
Retrieve all files belonging to a specific gallery.
https://example.com/api/galleries/{galleryId}/list_files
curl --request GET \ --url "https://example.com/api/galleries/11/list_files" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --data-urlencode "maxRecords=5" \ --data-urlencode "sort_mode=name_asc" \ --data-urlencode "user=admin"
<?php $base_url = 'https://example.com/api/galleries/11/list_files'; $params = [ 'maxRecords' => 5, 'sort_mode' => 'name_asc', 'user' => 'admin' ]; $url = $base_url . '?' . http_build_query($params); $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
const params = new URLSearchParams({ maxRecords: '5', sort_mode: 'name_asc', user: 'admin' }); fetch('https://example.com/api/galleries/11/list_files?' + params.toString(), { method: 'GET', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>' } }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "title": "List files", "galleryId": 11, "offset": -1, "maxRecords": 5, "count": 1, "result": [ { "isgal": 0, "id": 36, "parentId": 11, "name": "Wiki Syntax Title", "description": "Wiki Syntax Description", "size": 91735, "created": 1760298353, "filename": "Wiki_Syntax.pdf", "type": "application/pdf", "creator": "admin", "author": "", "hits": 0, "lastDownload": 0, "votes": 0, "points": "0.00", "path": null, "reference_url": "", "is_reference": "", "hash": "fa7e725936a48fe1c484e92fe394ddf2", "search_data": "", "metadata": "{\"basiconly\":true,\"Basic Information\":{\"File Data\":{\"size\":{\"newval\":91735,\"label\":\"File Size\",\"suffix\":\"bytes\"},\"type\":{\"newval\":\"application\\/pdf\",\"label\":\"File Type\"},\"charset\":{\"newval\":\"charset=binary\",\"label\":\"Character Set\"},\"devices\":{\"newval\":\"PDF document, version 1.4, 5 pages\",\"label\":\"Devices\"}}}}", "lastModif": 1760298353, "last_user": "admin", "lockedby": "", "comment": "", "deleteAfter": 0, "maxhits": 0, "archiveId": 0, "ocr_state": null, "visible": "", "public": "", "source": "", "files": "", "fileId": 36, "galleryId": 11, "filesize": 91735, "filetype": "application/pdf", "user": "admin", "lastModifUser": "admin", "icon_fileId": 0, "perms": { "tiki_p_admin_file_galleries": "y", "tiki_p_download_files": "y", "tiki_p_upload_files": "y", "tiki_p_remove_files": "y", "tiki_p_list_file_galleries": "y", "tiki_p_view_file_gallery": "y", "tiki_p_create_file_galleries": "y", "tiki_p_edit_gallery_file": "y", "tiki_p_assign_perm_file_gallery": "y", "tiki_p_batch_upload_file_dir": "y", "tiki_p_batch_upload_files": "y", "tiki_p_view_fgal_explorer": "y", "tiki_p_view_fgal_path": "y", "tiki_p_upload_javascript": "y", "tiki_p_upload_svg": "y" }, "wiki_syntax": "", "share": null, "podcast_filename": null } ] }
Parameters
- galleryId integer *: The gallery ID to retrieve files from
- offset integer optional : Start offset for the number of records to return
- maxRecords integer optional : Maximum number of records to return
- sort_mode string optional : The sort mode. Possible values are:
- created_desc, created_asc, name_desc, name_asc
- user string optional : Username who created the gallery
- find string optional : Search string to find files
Retrieve file information
Retrieve detailed information about a specific file stored in a gallery.
https://example.com/api/galleries/files/{fileId}
curl --request GET \ --url "https://example.com/api/galleries/files/36" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>"
<?php $url = 'https://example.com/api/galleries/files/36'; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
fetch('https://example.com/api/galleries/files/36', { method: 'GET', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>' } }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "title": "File Info", "fileId": 36, "info": { "fileId": 36, "galleryId": 11, "name": "Wiki Syntax Title", "description": "Wiki Syntax Description", "created": 1760298353, "filename": "Wiki_Syntax.pdf", "filesize": 91735, "filetype": "application/pdf", "user": "admin", "author": "", "hits": 0, "maxhits": 0, "lastDownload": 0, "votes": 0, "points": "0.00", "path": null, "reference_url": "", "is_reference": "", "hash": "fa7e725936a48fe1c484e92fe394ddf2", "metadata": "{\"basiconly\":true,\"Basic Information\":{\"File Data\":{\"size\":{\"newval\":91735,\"label\":\"File Size\",\"suffix\":\"bytes\"},\"type\":{\"newval\":\"application/pdf\",\"label\":\"File Type\"}}}}", "lastModif": 1760298353, "lastModifUser": "admin" } }
Parameters
- fileId integer *: The file ID to retrieve information for
Update file
Update file information or upload a new version of an existing file in a gallery.
https://example.com/api/galleries/files/{fileId}/update
curl --request POST \ --url "https://example.com/api/galleries/files/36/update" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --header "Content-Type: multipart/form-data" \ --form "data=@Basic_Data_types.pdf;type=application/pdf" \ --form "user=admin" \ --form "title=Data Types Title" \ --form "name=Data Types Name" \ --form "description=Data Types Description"
<?php $url = 'https://example.com/api/galleries/files/36/update'; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>' ]; $postFields = [ 'data' => new CURLFile('Basic_Data_types.pdf', 'application/pdf'), 'user' => 'admin', 'title' => 'Data Types Title', 'name' => 'Data Types Name', 'description' => 'Data Types Description' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
const formData = new FormData(); formData.append('data', new File([''], 'Basic_Data_types.pdf', { type: 'application/pdf' })); formData.append('user', 'admin'); formData.append('title', 'Data Types Title'); formData.append('name', 'Data Types Name'); formData.append('description', 'Data Types Description'); fetch('https://example.com/api/galleries/files/36/update', { method: 'POST', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>' }, body: formData }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "size": 74379, "name": "Basic_Data_types.pdf", "title": "Data Types Title", "description": "Data Types Description", "type": "application/pdf", "fileId": 36, "galleryId": 11, "md5sum": "85e3fb25232dc91a7bd14b6a3b2ff86d", "ticket": "9GKE_wo037vq-dwfF6uOYXUsF4VA_g8qqH7cqOcbPU0", "syntax": "{file type=\"gallery\" fileId=\"36\" showicon=\"y\"}", "info": { "fileId": 36, "galleryId": 11, "name": "Data Types Title", "description": "Data Types Description", "created": 1760298353, "filename": "Basic_Data_types.pdf", "filesize": 74379, "filetype": "application/pdf", "user": "admin", "author": "", "hits": 0, "maxhits": 0, "lastDownload": 0, "votes": 0, "points": "0.00", "path": null, "reference_url": "", "is_reference": "", "hash": "85e3fb25232dc91a7bd14b6a3b2ff86d", "search_data": "", "metadata": "{\"basiconly\":true,\"Basic Information\":{\"File Data\":{\"size\":{\"newval\":74379,\"label\":\"File Size\",\"suffix\":\"bytes\"},\"type\":{\"newval\":\"application\\/pdf\",\"label\":\"File Type\"},\"charset\":{\"newval\":\"charset=binary\",\"label\":\"Character Set\"},\"devices\":{\"newval\":\"PDF document, version 1.4, 2 pages\",\"label\":\"Devices\"}}}}", "lastModif": 1760384759, "lastModifUser": "admin", "lockedby": "", "comment": "", "archiveId": 0, "deleteAfter": 0, "ocr_state": null, "ocr_lang": null, "ocr_data": null } }
Parameters
- fileId integer *: The file ID to update
Request body
- data file optional: File to upload (omit to keep current file unchanged)
- user string optional: The user who uploaded the file
- title string optional: The title of the file
- name string optional: The name of the file
- description string optional: The description of the file
Duplicate an existing file
Duplicate an existing file to a new location or with a new name/description.
https://example.com/api/galleries/files/{fileId}/duplicate
curl --request POST \ --url "https://example.com/api/galleries/files/36/duplicate" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --header "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "newName=Duplicated Data Types Name" \ --data-urlencode "description=Duplicated Data Types Description"
<?php $url = 'https://example.com/api/galleries/files/36/duplicate'; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>', 'Content-Type: application/x-www-form-urlencoded' ]; $postFields = http_build_query([ 'newName' => 'Duplicated Data Types Name', 'description' => 'Duplicated Data Types Description' ]); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
const params = new URLSearchParams({ newName: 'Duplicated Data Types Name', description: 'Duplicated Data Types Description' }); fetch('https://example.com/api/galleries/files/36/duplicate', { method: 'POST', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>', 'Content-Type': 'application/x-www-form-urlencoded' }, body: params.toString() }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "title": "Duplicate file", "message": "File duplicated successfully", "id": "45" }
Parameters
- fileId integer *: The ID of the file to duplicate
Request body
- galleryId integer optional: Destination gallery ID for the duplicated file (defaults to current gallery if omitted)
- newName string optional: New name for the duplicated file
- description string optional: New description for the duplicated file
Lock one or multiple files
Lock one or multiple files to prevent updating or deletion.
https://example.com/api/galleries/files/lock
curl --request POST \ --url "https://example.com/api/galleries/files/lock" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --header "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "items[]=36" \ --data-urlencode "items[]=45"
<?php $url = 'https://example.com/api/galleries/files/lock'; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>', 'Content-Type: application/x-www-form-urlencoded' ]; $postFields = http_build_query([ 'items' => [36, 45] ]); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
const params = new URLSearchParams(); params.append('items[]', '36'); params.append('items[]', '45'); fetch('https://example.com/api/galleries/files/lock', { method: 'POST', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>', 'Content-Type': 'application/x-www-form-urlencoded' }, body: params.toString() }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "title": "Lock files", "count": 2, "locked": [ "36", "45" ] }
Request body
- items[] array *: Array of file IDs to lock
Unlock one or multiple files
Unlock one or multiple files to allow updating or deletion.
https://example.com/api/galleries/files/unlock
curl --request POST \ --url "https://example.com/api/galleries/files/unlock" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --header "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "items[]=36" \ --data-urlencode "items[]=45"
<?php $url = 'https://example.com/api/galleries/files/unlock'; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>', 'Content-Type: application/x-www-form-urlencoded' ]; $postFields = http_build_query([ 'items' => [36, 45] ]); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
const params = new URLSearchParams(); params.append('items[]', '36'); params.append('items[]', '45'); fetch('https://example.com/api/galleries/files/unlock', { method: 'POST', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>', 'Content-Type': 'application/x-www-form-urlencoded' }, body: params.toString() }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "title": "Unlock files", "count": 2, "unlocked": [ "36", "45" ] }
Request body
- items[] array *: Array of file IDs to unlock
Remove a specific file from a gallery.
Remove a specific file from a gallery.
https://example.com/api/galleries/files/{fileId}/delete
curl --request DELETE \ --url "https://example.com/api/galleries/files/45/delete" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>"
<?php $url = 'https://example.com/api/galleries/files/45/delete'; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE'); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
fetch('https://example.com/api/galleries/files/45/delete', { method: 'DELETE', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>' } }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "title": "Delete File", "message": "The file 45 has been deleted" }
Parameters
- fileId integer *: The ID of the file to delete
Retrieve groups.
Retrieve a list of user groups with pagination and optional filtering.
https://example.com/api/groups
curl --request GET \ --url "https://example.com/api/groups" \ --data-urlencode "offset=-1" \ --data-urlencode "maxRecords=3" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>"
<?php $base_url = 'https://example.com/api/groups'; $params = [ 'offset' => -1, 'maxRecords' => 3 ]; $url = $base_url . '?' . http_build_query($params); $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
const params = new URLSearchParams({ offset: '-1', maxRecords: '3' }); fetch('https://example.com/api/groups?' + params.toString(), { method: 'GET', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>' } }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "data": [ { "id": 1, "groupName": "Anonymous", "groupDesc": "Public users not logged", "groupHome": null, "usersTrackerId": null, "groupTrackerId": null, "usersFieldId": null, "groupFieldId": null, "registrationChoice": null, "registrationUsersFieldIds": null, "userChoice": null, "groupDefCat": 0, "groupTheme": "", "groupColor": "", "isExternal": "n", "expireAfter": 0, "emailPattern": "", "anniversary": "", "prorateInterval": "", "isRole": "n", "isTplGroup": "n", "perms": [ "tiki_p_admin_tikitests", "tiki_p_download_files", "tiki_p_edit_tikitests", "tiki_p_export_pdf", "tiki_p_play_tikitests", "tiki_p_print", "tiki_p_search", "tiki_p_view" ], "permCount": 8, "included": [], "included_direct": [] }, { "id": 2, "groupName": "Registered", "groupDesc": "Users logged into the system", "groupHome": null, "usersTrackerId": null, "groupTrackerId": null, "usersFieldId": null, "groupFieldId": null, "registrationChoice": null, "registrationUsersFieldIds": null, "userChoice": null, "groupDefCat": 0, "groupTheme": "", "groupColor": "", "isExternal": "n", "expireAfter": 0, "emailPattern": "", "anniversary": "", "prorateInterval": "", "isRole": "n", "isTplGroup": "n", "perms": [ "tiki_p_admin_tikitests", "tiki_p_edit_tikitests", "tiki_p_export_pdf", "tiki_p_play_tikitests", "tiki_p_print", "tiki_p_view_category" ], "permCount": 6, "included": [ "Anonymous" ], "included_direct": [ "Anonymous" ] }, { "id": 3, "groupName": "Admins", "groupDesc": "Administrator and accounts managers.", "groupHome": null, "usersTrackerId": null, "groupTrackerId": null, "usersFieldId": null, "groupFieldId": null, "registrationChoice": null, "registrationUsersFieldIds": null, "userChoice": null, "groupDefCat": 0, "groupTheme": "", "groupColor": "", "isExternal": "n", "expireAfter": 0, "emailPattern": "", "anniversary": "", "prorateInterval": "", "isRole": "n", "isTplGroup": "n", "perms": [ "tiki_p_admin", "tiki_p_admin_tikitests", "tiki_p_edit_tikitests", "tiki_p_export_pdf", "tiki_p_play_tikitests", "tiki_p_print", "tiki_p_remove_share", "tiki_p_view_category" ], "permCount": 8, "included": [], "included_direct": [] } ], "count": 5 }
Parameters
- offset integer optional : Offset to start from
- maxRecords integer optional : Maximum number of records to return
- find string optional : Search string to filter groups
- initial string optional : Initial string to match group names
Create a new user group
Create a new user group with optional configuration parameters.
https://example.com/api/groups
curl --request POST \ --url "https://example.com/api/groups" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --header "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "name=Test Group" \ --data-urlencode "userChoice=y" \ --data-urlencode "desc=Test Group Description"
<?php $url = 'https://example.com/api/groups'; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>', 'Content-Type: application/x-www-form-urlencoded' ]; $postFields = http_build_query([ 'name' => 'Test Group', 'userChoice' => 'y', 'desc' => 'Test Group Description' ]); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
const params = new URLSearchParams({ name: 'Test Group', userChoice: 'y', desc: 'Test Group Description' }); fetch('https://example.com/api/groups', { method: 'POST', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>', 'Content-Type': 'application/x-www-form-urlencoded' }, body: params.toString() }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "feedback": { "action": [ { "type": "feedback", "icon": "success", "title": "Success", "mes": [ "Group Test Group (ID 6) successfully created" ] } ] } }
Request body
- name string *: The name of the group
- desc string optional : The description of the group
- home string optional : The home page of the group
- userstracker integer optional : The tracker ID for the users. Choose a user tracker to provide fields for a new user to complete upon registration.
- usersfield integer optional : The field ID for the users. Select the user selector field from the above tracker (userstracker) to link a tracker item to the user upon registration.
- groupstracker integer optional : The tracker ID for the group.
- groupfield integer optional : The field ID for the group. Select the group selector field from the above tracker (groupstracker) to link a tracker item to the group upon registration.
- registrationUsersFieldIds string optional : If either a group information tracker or user registration tracker has been selected above, enter colon-separated field ID numbers for the tracker fields in the above tracker to include on the registration form for a new user to complete.
- userChoice string optional : User can assign himself or herself to the group. Possible values are:
- y : Yes. User can assign himself or herself to the group
- n : No. User cannot assign himself or herself to the group.
- defcat integer optional : The Default category assigned to uncategorized objects edited by a user with this default group.
- theme string optional : The theme of the group. Possible values are:
- default : Default theme.
- custom_url : Custom theme by specifying URL
- amelia : Amelia theme.
- cerulean : Cerulean theme.
- cosmo : Cosmo theme.
- cyborg : Cyborg theme.
- darkly : Darkly theme.
- flatly : Flatly theme.
- etc. (see https://bootswatch.com/
for more themes)
- expireAfter integer optional : Number of days after which all users will be unassigned from the group.
- emailPattern string optional : Users are automatically assigned at registration in the group if their emails match the pattern.
- Example: /@(tw.org$)|(tw.com$)/
- anniversary string optional : Use MMDD to specify an annual date as of which all users will be unassigned from the group, or DD to specify a monthly date.
- prorateInterval string optional : The Payment for membership extension is prorated at a minimum interval. Possible values are:
- day : Daily prorate interval.
- month : Monthly prorate interval.
- year : Yearly prorate interval.
- color string optional : The Default color to use when plotting values for this group in charts. Use HEX notation, e.g. #FF0000 for red color.
- isRole string optional : The group is a role. Possible values are:
- y : Yes. The group is a role.
- n : No. The group is not a role.
- Note: If the group is a role, it will be used to assign permissions to users. Role groups can't have users.
- isTplGroup string optional : The group is a template group. Possible values are:
- y : Yes. The group is a template group.
- n : No. The group is not a template group.
- include_groups[] array optional : The groups to include in this group. Consider it as a parent group, the group from which this group inherits permissions.
Update an existing user group
Update an existing user group’s configuration, description, or name.
https://example.com/api/groups/{olgroup}
curl --request POST \ --url "https://example.com/api/groups/Test%20Group" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --header "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "isRole=y" \ --data-urlencode "name=Test Group Updated" \ --data-urlencode "userChoice=n" \ --data-urlencode "desc=Test Group Description Updated"
<?php $url = 'https://example.com/api/groups/Test%20Group'; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>', 'Content-Type: application/x-www-form-urlencoded' ]; $postFields = http_build_query([ 'isRole' => 'y', 'name' => 'Test Group Updated', 'userChoice' => 'n', 'desc' => 'Test Group Description Updated' ]); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
const params = new URLSearchParams({ isRole: 'y', name: 'Test Group Updated', userChoice: 'n', desc: 'Test Group Description Updated' }); fetch('https://example.com/api/groups/Test%20Group', { method: 'POST', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>', 'Content-Type': 'application/x-www-form-urlencoded' }, body: params.toString() }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "feedback": { "action": [ { "type": "feedback", "icon": "success", "title": "Success", "mes": [ "Group Test Group Updated successfully modified" ] } ] } }
Parameters
- olgroup string *: The original name of the group to update
Request body
- name string optional : The name of the group
- desc string optional : The description of the group
- home string optional : The home page of the group
- userstracker integer optional : The tracker ID for the users. Choose a user tracker to provide fields for a new user to complete upon registration.
- usersfield integer optional : The field ID for the users. Select the user selector field from the above tracker (userstracker) to link a tracker item to the user upon registration.
- groupstracker integer optional : The tracker ID for the group.
- groupfield integer optional : The field ID for the group. Select the group selector field from the above tracker (groupstracker) to link a tracker item to the group upon registration.
- registrationUsersFieldIds string optional : If either a group information tracker or user registration tracker has been selected above, enter colon-separated field ID numbers for the tracker fields in the above tracker to include on the registration form for a new user to complete.
- userChoice string optional : User can assign himself or herself to the group. Possible values are:
- y : Yes. User can assign himself or herself to the group
- n : No. User cannot assign himself or herself to the group.
- defcat integer optional : The Default category assigned to uncategorized objects edited by a user with this default group.
- theme string optional : The theme of the group. Possible values are:
- default : Default theme.
- custom_url : Custom theme by specifying URL
- amelia : Amelia theme.
- cerulean : Cerulean theme.
- cosmo : Cosmo theme.
- cyborg : Cyborg theme.
- darkly : Darkly theme.
- flatly : Flatly theme.
- etc. (see https://bootswatch.com/
for more themes)
- expireAfter integer optional : Number of days after which all users will be unassigned from the group.
- emailPattern string optional : Users are automatically assigned at registration in the group if their emails match the pattern.
- Example: /@(tw.org$)|(tw.com$)/
- anniversary string optional : Use MMDD to specify an annual date as of which all users will be unassigned from the group, or DD to specify a monthly date.
- prorateInterval string optional : The Payment for membership extension is prorated at a minimum interval. Possible values are:
- day : Daily prorate interval.
- month : Monthly prorate interval.
- year : Yearly prorate interval.
- color string optional : The Default color to use when plotting values for this group in charts. Use HEX notation, e.g. #FF0000 for red color.
- isRole string optional : The group is a role. Possible values are:
- y : Yes. The group is a role.
- n : No. The group is not a role.
- Note: If the group is a role, it will be used to assign permissions to users. Role groups can't have users.
- isTplGroup string optional : The group is a template group. Possible values are:
- y : Yes. The group is a template group.
- n : No. The group is not a template group.
- include_groups[] array optional : The groups to include in this group. Consider it as a parent group, the group from which this group inherits permissions.
Add one or more users to a specified group.
Add one or more users to a specified group.
https://example.com/api/groups/add_users
curl --request POST \ --url "https://example.com/api/groups/add_users" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --header "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "group=Test Group Updated" \ --data-urlencode "items[]=test-user" \ --data-urlencode "items[]=test-user-2"
<?php $url = 'https://example.com/api/groups/add_users'; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>', 'Content-Type: application/x-www-form-urlencoded' ]; $postFields = http_build_query([ 'group' => 'Test Group Updated', 'items' => ['test-user', 'test-user-2'] ]); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($status === 200) { echo json_encode(json_decode($response, true), JSON_PRETTY_PRINT); } else { echo "Error: HTTP $status"; } } curl_close($ch); ?>
const params = new URLSearchParams({ group: 'Test Group Updated', 'items[]': 'test-user', 'items[]': 'test-user-2' }); fetch('https://example.com/api/groups/add_users', { method: 'POST', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>', 'Content-Type': 'application/x-www-form-urlencoded' }, body: params.toString() }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.error('Fetch error: ' + err.message); });
{ "feedback": { "action": [ { "type": "feedback", "icon": "success", "title": "Success", "mes": [ "The following user was added to group Test Group Updated:" ], "items": [ "test-user", "test-user-2" ] } ] } }
Request body
- group string *: The name of the group to which users will be added
- items[] array *: The usernames of the users to add
Ban one or more users from a specified group.
Ban one or more users from a specified group.
https://example.com/api/groups/ban_users
curl --request POST \ --url "https://example.com/api/groups/ban_users" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --header "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "group=Test Group Updated" \ --data-urlencode "items[]=test-user" \ --data-urlencode "items[]=test-user-2"
<?php $url = 'https://example.com/api/groups/ban_users'; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>', 'Content-Type: application/x-www-form-urlencoded' ]; $postFields = http_build_query([ 'group' => 'Test Group Updated', 'items' => ['test-user', 'test-user-2'] ]); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($status === 200) { echo json_encode(json_decode($response, true), JSON_PRETTY_PRINT); } else { echo "Error: HTTP $status"; } } curl_close($ch); ?>
const params = new URLSearchParams({ group: 'Test Group Updated', 'items[]': 'test-user', 'items[]': 'test-user-2' }); fetch('https://example.com/api/groups/ban_users', { method: 'POST', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>', 'Content-Type': 'application/x-www-form-urlencoded' }, body: params.toString() }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.error('Fetch error: ' + err.message); });
{ "feedback": { "action": [ { "type": "feedback", "icon": "success", "title": "Success", "mes": [ "The following user was banned from group Test Group Updated:" ], "items": [ "test-user", "test-user-2" ] } ] } }
Request body
- group string *: The name of the group from which users will be banned
- items[] array *: The usernames of the users to ban
Delete one or more groups from the system.
Delete one or more groups from the system.
https://example.com/api/groups/delete
curl --request POST \ --url "https://example.com/api/groups/delete" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --header "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "items[]=Test Group Updated" \ --data-urlencode "items[]=Translators Group"
<?php $url = 'https://example.com/api/groups/delete'; $data = http_build_query([ 'items' => ['Test Group Updated', 'Translators Group'] ]); $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>', 'Content-Type: application/x-www-form-urlencoded' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } curl_close($ch); ?>
const formData = new URLSearchParams(); formData.append('items[]', 'Test Group Updated'); formData.append('items[]', 'Translators Group'); fetch('https://example.com/api/groups/delete', { method: 'POST', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>', 'Content-Type': 'application/x-www-form-urlencoded' }, body: formData.toString() }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "feedback": { "action": [ { "type": "feedback", "icon": "success", "title": "Success", "mes": [ "The following group has been deleted:" ], "items": [ "Test Group Updated", "Translators Group" ] } ] } }
Request body
- items[] array *: The list of group names to delete
Perform a lookup in the search index
Perform a lookup in the search index to find objects matching specific filters and sorting options.
https://example.com/api/search/lookup
curl --request GET \ --url "https://example.com/api/search/lookup" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --data-urlencode "filter=filter[title]=plugin" \ --data-urlencode "format={object_id} {title}" \ --data-urlencode "sort_order=title_desc" \ --data-urlencode "maxRecords=5"
<?php $baseUrl = 'https://example.com/api/search/lookup'; $params = [ 'filter' => 'filter[title]=plugin', 'format' => '{object_id} {title}', 'sort_order' => 'title_desc', 'maxRecords' => 5 ]; $url = $baseUrl . '?' . http_build_query($params); $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } curl_close($ch); ?>
const params = new URLSearchParams({ filter: 'filter[title]=plugin', format: '{object_id} {title}', sort_order: 'title_desc', maxRecords: '5' }); fetch('https://example.com/api/search/lookup?' + params.toString(), { method: 'GET', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>' } }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "title": "Lookup Result", "resultset": { "count": 4, "offset": 0, "maxRecords": 5, "result": [ { "object_type": "file gallery", "object_id": "10", "parent_id": "3", "title": "10 <b class=\"highlight_word highlight_word_0\">plugin</b> error" }, { "object_type": "wiki page", "object_id": "plugin error", "parent_id": null, "title": "<b class=\"highlight_word highlight_word_0\">plugin</b> error <b class=\"highlight_word highlight_word_0\">plugin</b> error" }, { "object_type": "wiki page", "object_id": "plugin-test", "parent_id": null, "title": "<b class=\"highlight_word highlight_word_0\">plugin</b>-test <b class=\"highlight_word highlight_word_0\">plugin</b>-test" }, { "object_type": "wiki page", "object_id": "test-plugin-argument", "parent_id": null, "title": "test-<b class=\"highlight_word highlight_word_0\">plugin</b>-argument test-<b class=\"highlight_word highlight_word_0\">plugin</b>-argument" } ] } }
Parameters
- filter[] array *: Filter index fields and content.
- format string optional : The format of the response data. e.g. {object_id} {title}
- sort_order string optional: The sort order of the results. Possible values are:
- title_asc : Sort by title, A to Z.
- title_desc : Sort by title, Z to A.
- offset integer optional : The record offset to start returning results from.
- maxRecords integer optional : The maximum number of records to return.
Process incremental index queue update
Process incremental index queue update
https://example.com/api/search/process-queue
curl --request POST \ --url "https://example.com/api/search/process-queue" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --data-urlencode "batch=10"
<?php $baseUrl = 'https://example.com/api/search/process-queue'; $params = ['batch' => 10]; $url = $baseUrl . '?' . http_build_query($params); $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } curl_close($ch); ?>
const params = new URLSearchParams({ batch: '10' }); fetch('https://example.com/api/search/process-queue?' + params.toString(), { method: 'POST', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>' } }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "title": "Process Update Queue", "stat": null, "queue_count": 0, "batch": 10 }
Parameters
- batch integer *: The number of records to process.
Run search index rebuild
Run search index rebuild
https://example.com/api/search/rebuild
curl --request POST \ --url "https://example.com/api/search/rebuild" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --data-urlencode "loggit=2"
<?php $baseUrl = 'https://example.com/api/search/rebuild'; $params = ['loggit' => 2]; $url = $baseUrl . '?' . http_build_query($params); $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } curl_close($ch); ?>
const params = new URLSearchParams({ loggit: '2' }); fetch('https://example.com/api/search/rebuild?' + params.toString(), { method: 'POST', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>' } }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "title": "Rebuild Index", "formattedStats": null, "search_engine": "MySQL", "search_version": "8.0.40", "search_index": "index_68f4e5c8c4ea5", "fallback_search_engine": "", "fallback_search_version": "", "fallback_search_index": "", "queue_count": 0, "log_file_browser": "/temp/Search_Indexer_mysql_tiki.log", "fallback_log_file_browser": "/temp/Search_Indexer_mysql_tiki.log", "log_file_console": "/temp/Search_Indexer_mysql_tiki_console.log", "fallback_log_file_console": "/temp/Search_Indexer_mysql_tiki_console.log", "lastLogItemWeb": "2025-05-19T21:48:04+00:00 INFO (6): Execution time: < 1 sec\n", "lastLogItemConsole": "[2025-10-19T13:21:25.804120+00:00] indexer.INFO: total fields used in the mysql search index: 231 [] []\n", "isAjax": false, "showForm": false, "unified_last_rebuild": 1760880072 }
Parameters
- loggit integer *: Log index rebuild process to file. Possible values are:
- 0 : no logging
- 1 : log to Search_Indexer.log
- 2 : log to Search_Indexer_console.log
Get All Tracker Import-Export Formats
Get All Tracker Import-Export Formats
https://example.com/api/tabulars
curl --request GET \ --url "https://example.com/api/tabulars" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>"
<?php $url = 'https://example.com/api/tabulars'; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } curl_close($ch); ?>
fetch('https://example.com/api/tabulars', { method: 'GET', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>' } }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "title": "Import-Export Formats", "formatList": [ { "tabularId": 1, "name": "orders", "trackerId": 3 }, { "tabularId": 2, "name": "Contacts", "trackerId": 4 }, { "tabularId": 3, "name": "Deals", "trackerId": 6 } ] }
Parameters
No parameters.
Retrieve Tracker Import-Export Information
Retrieves detailed configuration information for a specific tracker import-export format.
https://example.com/api/tabulars/{tabularId}
curl --request GET \ --url "https://example.com/api/tabulars/2" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>"
<?php $tabularId = 2; $url = "https://example.com/api/tabulars/{$tabularId}"; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } curl_close($ch); ?>
const tabularId = 2; fetch('https://example.com/api/tabulars/' + tabularId, { method: 'GET', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>' } }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "title": "Edit Format: Contacts", "tabularId": 2, "trackerId": 4, "name": "Contacts", "config": { "simple_headers": 1, "import_update": 1, "ignore_blanks": 0, "import_transaction": 0, "bulk_import": 0, "skip_unmodified": 0, "encoding": "", "format": "", "mapping": "" }, "odbc_config": [], "api_config": [], "columns": [ { "label": "ContactID", "field": "contactContactID", "mode": "default", "displayAlign": "left", "isPrimary": false, "isReadOnly": false, "isExportOnly": false, "isUniqueKey": false }, { "label": "FirstName", "field": "contactFirstName", "mode": "default", "displayAlign": "left", "isPrimary": false, "isReadOnly": false, "isExportOnly": false, "isUniqueKey": false }, { "label": "LastName", "field": "contactLastName", "mode": "default", "displayAlign": "left", "isPrimary": false, "isReadOnly": false, "isExportOnly": false, "isUniqueKey": false }, { "label": "Email", "field": "contactEmail", "mode": "default", "displayAlign": "left", "isPrimary": false, "isReadOnly": false, "isExportOnly": false, "isUniqueKey": false }, { "label": "Phone", "field": "contactPhone", "mode": "default", "displayAlign": "left", "isPrimary": false, "isReadOnly": false, "isExportOnly": false, "isUniqueKey": false }, { "label": "CreatedAt", "field": "contactCreatedAt", "mode": "unix", "displayAlign": "left", "isPrimary": false, "isReadOnly": false, "isExportOnly": false, "isUniqueKey": false } ], "filters": [], "schema": {}, "filterCollection": {}, "has_odbc": false, "encodings": [ "BASE64", "UUENCODE", "HTML-ENTITIES", "Quoted-Printable", "7bit", "8bit", "UCS-4", "UCS-4BE", "UCS-4LE", "UCS-2", "UCS-2BE", "UCS-2LE", "UTF-32", "UTF-32BE", "UTF-32LE", "UTF-16", "UTF-16BE", "UTF-16LE", "UTF-8", "UTF-7", "UTF7-IMAP", "ASCII", "EUC-JP", "SJIS", "eucJP-win", "EUC-JP-2004", "SJIS-Mobile#DOCOMO", "SJIS-Mobile#KDDI", "SJIS-Mobile#SOFTBANK", "SJIS-mac", "SJIS-2004", "UTF-8-Mobile#DOCOMO", "UTF-8-Mobile#KDDI-A", "UTF-8-Mobile#KDDI-B", "UTF-8-Mobile#SOFTBANK", "CP932", "SJIS-win", "CP51932", "JIS", "ISO-2022-JP", "ISO-2022-JP-MS", "GB18030", "Windows-1252", "Windows-1254", "ISO-8859-1", "ISO-8859-2", "ISO-8859-3", "ISO-8859-4", "ISO-8859-5", "ISO-8859-6", "ISO-8859-7", "ISO-8859-8", "ISO-8859-9", "ISO-8859-10", "ISO-8859-13", "ISO-8859-14", "ISO-8859-15", "ISO-8859-16", "EUC-CN", "CP936", "HZ", "EUC-TW", "BIG-5", "CP950", "EUC-KR", "UHC", "ISO-2022-KR", "Windows-1251", "CP866", "KOI8-R", "KOI8-U", "ArmSCII-8", "CP850", "ISO-2022-JP-2004", "ISO-2022-JP-MOBILE#KDDI", "CP50220", "CP50221", "CP50222" ] }
Parameters
- tabularId integer *: The ID of the Tracker Tabular
Export Tracker Import-Export Format
Retrieves the complete export of a tracker import-export format in its configured format
https://example.com/api/tabulars/{tabularId}/export
curl --request GET \ --url "https://example.com/api/tabulars/2/export" \ --header "accept: */*" \ --header "Authorization: Bearer <API_TOKEN>"
<?php $tabularId = 2; $url = "https://example.com/api/tabulars/{$tabularId}/export"; $headers = [ 'Accept: */*', 'Authorization: Bearer <API_TOKEN>' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { // If the server returned CSV, print as raw $contentType = curl_getinfo($ch, CURLINFO_CONTENT_TYPE); if (strpos($contentType, 'application/json') !== false) { $data = json_decode($response, true); print_r($data); } else { // Likely CSV or another text format echo $response; } } else { echo 'Error: HTTP status code ' . $http_code; } curl_close($ch); ?>
const tabularId = 2; fetch('https://example.com/api/tabulars/' + tabularId + '/export', { method: 'GET', headers: { 'Accept': '*/*', 'Authorization': 'Bearer <API_TOKEN>' } }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); const contentType = res.headers.get('content-type'); if (contentType && contentType.includes('application/json')) { return res.json(); } else { return res.text(); // Handle CSV or other text formats } }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
Example (CSV): id,name,email 1,John Doe,john@example.com 2,Jane Smith,jane@example.com Example (JSON): [ { "id": 1, "name": "John Doe", "email": "john@example.com" }, { "id": 2, "name": "Jane Smith", "email": "jane@example.com" } ]
Parameters
- tabularId integer *: The ID of the Tracker Tabular
Import Data via Import-Export Format
Imports data into a tracker using the specified import-export configuration.
https://example.com/api/tabulars/{tabularId}/import
curl --request POST \ --url "https://example.com/api/tabulars/2/import" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --header "Content-Type: multipart/form-data" \ --form "file=@contact_tabulars.csv;type=text/csv"
<?php $tabularId = 2; $url = "https://example.com/api/tabulars/{$tabularId}/import"; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>' ]; $postFields = [ 'file' => new CURLFile('contact_tabulars.csv', 'text/csv') ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields); $response = curl_exec($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } curl_close($ch); ?>
const tabularId = 2; const formData = new FormData(); formData.append('file', new File([''], 'contact_tabulars.csv', { type: 'text/csv' })); fetch('https://example.com/api/tabulars/' + tabularId + '/import', { method: 'POST', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>' }, body: formData }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
[ { "itemId": 1572, "contactContactID": 4, "contactFirstName": "jobs", "contactLastName": "bernard", "contactEmail": "jobs@example.com", "contactPhone": "7654320", "contactCreatedAt": 1104526800 } ]
Parameters
- tabularId integer *: The ID of the Tracker Tabular
Delete Data by Primary Keys (Tabular Import-Export)
Deletes records by their primary keys using the configuration defined in the specified import-export format. The data to delete is provided as a file (e.g., CSV) that matches the configured import-export structure.
https://example.com/api/tabulars/{tabularId}/delete
curl --request POST \ --url "https://example.com/api/tabulars/2/delete" \ --header "accept: */*" \ --header "Authorization: Bearer <API_TOKEN>" \ --header "Content-Type: multipart/form-data" \ --form "file=@contact_tabulars.csv;type=text/csv"
<?php $tabularId = 2; $url = "https://example.com/api/tabulars/{$tabularId}/delete"; $headers = [ 'Accept: */*', 'Authorization: Bearer <API_TOKEN>' ]; $postFields = [ 'file' => new CURLFile('contact_tabulars.csv', 'text/csv') ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields); $response = curl_exec($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } curl_close($ch); ?>
const tabularId = 2; const formData = new FormData(); formData.append('file', new File([''], 'contact_tabulars.csv', { type: 'text/csv' })); fetch('https://example.com/api/tabulars/' + tabularId + '/delete', { method: 'POST', headers: { 'Accept': '*/*', 'Authorization': 'Bearer <API_TOKEN>' }, body: formData }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "feedback": "Your delete request was completed successfully." }
Parameters
- tabularId integer *: The ID of the Tracker Tabular
Retrieve all trackers that the current user has permission to see
Retrieve all trackers that the current user has permission to see.
https://example.com/api/trackers
curl --request GET \ --url "https://example.com/api/trackers" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>"
<?php $url = 'https://example.com/api/trackers'; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } curl_close($ch); ?>
fetch('https://example.com/api/trackers', { method: 'GET', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>' } }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "list": { "1": "quiz", "2": "minical", "3": "orders", "4": "Contacts" }, "data": [ { "trackerId": 1, "name": "quiz", "description": "", "descriptionIsParsed": "n", "created": 1747130522, "lastModif": 1758616579, "items": 4, "fieldsCount": 1, "system_tracker": false }, { "trackerId": 2, "name": "minical", "description": "This aims to hold minical data", "descriptionIsParsed": "n", "created": 1751811300, "lastModif": 1751813241, "items": 2, "fieldsCount": 2, "system_tracker": false }, { "trackerId": 3, "name": "orders", "description": "", "descriptionIsParsed": "n", "created": 1752248918, "lastModif": 1759332937, "items": 1002, "fieldsCount": 7, "system_tracker": false }, { "trackerId": 4, "name": "Contacts", "description": "", "descriptionIsParsed": "n", "created": 1752252712, "lastModif": 1760905623, "items": 4, "fieldsCount": 11, "system_tracker": false } ], "count": 4 }
Parameters
No parameters.
Create a new tracker
Create a new tracker with the provided configuration options.
https://example.com/api/trackers
curl --request POST \ --url "https://example.com/api/trackers" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --header "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "name=TrackerTest" \ --data-urlencode "description=TrackerTest Description" \ --data-urlencode "descriptionIsParsed=0" \ --data-urlencode "useComments=1" \ --data-urlencode "showCreated=1" \ --data-urlencode "showLastModif=1" \ --data-urlencode "showStatus=1" \ --data-urlencode "showPopup=1"
<?php $url = 'https://example.com/api/trackers'; $data = [ 'name' => 'TrackerTest', 'description' => 'TrackerTest Description', 'descriptionIsParsed' => 0, 'useComments' => 1, 'showCreated' => 1, 'showLastModif' => 1, 'showStatus' => 1, 'showPopup' => 1 ]; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>', 'Content-Type: application/x-www-form-urlencoded' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); $response = curl_exec($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } curl_close($ch); ?>
const formData = new URLSearchParams({ name: 'TrackerTest', description: 'TrackerTest Description', descriptionIsParsed: '0', useComments: '1', showCreated: '1', showLastModif: '1', showStatus: '1', showPopup: '1' }); fetch('https://example.com/api/trackers', { method: 'POST', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>', 'Content-Type': 'application/x-www-form-urlencoded' }, body: formData.toString() }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "accordion_pos": 1, "title": "Edit TrackerTest", "trackerId": "16", "info": { "adminOnlyViewEditItem": "n", "allowChooseFieldsToDisplay": "n", "allowInlineEditing": "n", "allowOffline": "n", "altClosedStatus": "", "altOpenStatus": "", "altPendingStatus": "", "autoAssignCreatorGroup": "n", "autoAssignCreatorGroupDefault": "n", "autoAssignGroupItem": "n", "autoCopyGroup": "n", "autoCreateCategories": "n", "autoCreateGroup": "n", "autoCreateGroupInc": "", "defaultOrderDir": "string", "defaultOrderKey": "-1", "defaultStatus": "o", "doNotShowEmptyField": "n", "editItemPretty": "", "end": "0", "fieldPrefix": "", "formClasses": "", "groupCanSeeOwn": "n", "logo": "", "modItemStatus": "", "newItemStatus": "o", "notifyOn": "both", "oneUserItem": "n", "orderAttachments": "", "outboundEmail": "", "permName": "", "publishRSS": "n", "ratingOptions": "", "relationshipBehaviour": "", "saveAndComment": "n", "sectionFormat": "flat", "showAttachments": "n", "showComments": "y", "showCreated": "y", "showCreatedBy": "y", "showCreatedFormat": "%c", "showCreatedView": "y", "showLastComment": "n", "showLastModif": "y", "showLastModifBy": "y", "showLastModifFormat": "%c", "showLastModifView": "y", "showPopup": "1", "showRatings": "n", "showStatus": "y", "showStatusAdminOnly": "n", "simpleEmail": "n", "start": "0", "tabularSync": "", "tabularSyncLastImport": "0", "tabularSyncLastImportSkipUpdate": "n", "tabularSyncModifiedField": "0", "useAttachments": "n", "useComments": "y", "useFormClasses": "n", "useRatings": "n", "userCanSeeOwn": "n", "userCanTakeOwnership": "n", "viewItemPretty": "", "writerCanModify": "n", "writerCanRemove": "n", "writerGroupCanModify": "n", "writerGroupCanRemove": "n", "trackerId": 16, "name": "TrackerTest", "description": "TrackerTest Description", "descriptionIsParsed": "n", "created": 1761481261, "lastModif": 1761481261, "items": 0 }, "statusTypes": { "o": { "name": "open", "label": "Open", "perm": "tiki_p_view_trackers", "image": "img/icons/status_open.gif", "iconname": "status-open" }, "p": { "name": "pending", "label": "Pending", "perm": "tiki_p_view_trackers_pending", "image": "img/icons/status_pending.gif", "iconname": "status-pending" }, "c": { "name": "closed", "label": "Closed", "perm": "tiki_p_view_trackers_closed", "image": "img/icons/status_closed.gif", "iconname": "status-closed" } }, "statusList": [ "o" ], "sortFields": { "-1": "Last Modification", "-2": "Creation Date", "-3": "Item ID" }, "attachmentAttributes": { "filename": { "label": "Filename", "selected": false }, "created": { "label": "Creation date", "selected": false }, "hits": { "label": "Views", "selected": false }, "comment": { "label": "Comment", "selected": false }, "filesize": { "label": "File size", "selected": false }, "version": { "label": "Version", "selected": false }, "filetype": { "label": "File type", "selected": false }, "longdesc": { "label": "Long description", "selected": false }, "user": { "label": "User", "selected": false } }, "startDate": null, "startTime": null, "endDate": null, "endTime": null, "groupList": [ "Admins", "Anonymous", "Registered", "sysAdmins", "Translators" ], "groupforAlert": false, "showeachuser": false, "sectionFormats": { "flat": "Flat", "tab": "Tabs", "config": "Configured" }, "remoteTabulars": [], "relationshipBehaviourList": [ "GENERIC_DIRECTIONAL", "GENERIC_NON_DIRECTIONAL", "GENERIC_ONE_TO_MANY" ], "displayTimezone": "Africa/Nairobi" }
Parameters
- name string *: The name of the tracker
- description string Optional: The description of the tracker
- descriptionIsParsed integer Optional: Whether the description is parsed. Possible values are:
- 0 : Not parsed
- 1 : Parsed
- fieldPrefix string Optional: Short string prepended by default to all fields in the tracker.
- permName string Optional: The permanent name of the tracker
- showStatus integer Optional: Whether to show the status of the tracker. Possible values are:
- 0 : Do not show
- 1 : Show
- showStatusAdminOnly integer Optional: Whether to show the status only to the admin. Possible values are:
- 0 : Show the status to all users.
- 1 : Show the status only to the admin.
- showCreated integer Optional: Whether to show the created date when listing items. Possible values are:
- 0 : Do not show the created date.
- 1 : Show the created date.
- showCreatedView integer Optional: Whether to show the created date when viewing items. Possible values are:
- 0 : Do not show the created date.
- 1 : Show the created date.
- showCreatedBy integer Optional: Whether to show the creator when listing items. Possible values are:
- 0 : Do not show the creator.
- 1 : Show the creator.
- showCreatedFormat string Optional: The format of the created date. For more info about Tiki date and time format please check: https://doc.tiki.org/Date-and-Time-Features
- showLastModif integer Optional: Whether to show the last modification date when listing items. Possible values are:
- 0 : Do not show the last modification date.
- 1 : Show the last modification date.
- showLastModifView integer Optional: Whether to show the last modification date when viewing items. Possible values are:
- 0 : Do not show the last modification date.
- 1 : Show the last modification date.
- showLastModifBy integer Optional: Whether to show the last modifier when listing items. Possible values are:
- 0 : Do not show the last modifier.
- 1 : Show the last modifier.
- showLastModifFormat string Optional: The format of the last modification date. For more info about Tiki date and time format please check: https://doc.tiki.org/Date-and-Time-Features
- defaultOrderKey integer Optional: The default sort order when listing items. Possible values are:
- -1 : Last Modification
- -2 : Creation Date
- -3 : Item ID
- defaultOrderDir string Optional: The default sort direction when listing items. Possible values are:
- asc : Ascending
- desc : Descending
- doNotShowEmptyField integer Optional: Whether to show empty fields when listing items. Possible values are:
- 0 : Show empty fields.
- 1 : Do not show empty fields.
- showPopup integer Optional: Whether to show a popup with item details when hovering over an item link. Possible values are:
- 0 : Do not show popup.
- 1 : Show popup.
- defaultStatus String[] Optional: The default status of the tracker. Possible values are:
- o : open
- p : pending
- c : closed
- newItemStatus string[] Optional: The status assigned to new items. Possible values are:
- o : open
- p : pending
- c : closed
- altOpenStatus string Optional: The alternative open status of the tracker.
- altPendingStatus string Optional: The alternative pending status of the tracker.
- altClosedStatus string Optional: The alternative closed status of the tracker.
- modItemStatus string Optional: The status of a modified item. Possible values are:
- o : open
- p : pending
- c : closed
- outboundEmail string Optional: The outbound email address used for notifications. You can add several email addresses by separating them with commas.
- simpleEmail integer Optional: Whether to send simple email notifications. Possible values are:
- 0 : Do not send simple email notifications.
- 1 : Send simple email notifications.
- userCanSeeOwn integer Optional: Whether a user can see their own items. Possible values are:
- 0 : Users cannot see their own items.
- 1 : Users can see their own items.
- groupCanSeeOwn integer Optional: Whether a group can see their own items. Possible values are:
- 0 : Groups cannot see their own items.
- 1 : Groups can see their own items.
- writerCanModify integer Optional: Whether the writer can modify their own items. Possible values are:
- 0 : Writers cannot modify their own items.
- 1 : Writers can modify their own items.
- writerCanRemove integer Optional: Whether the writer can remove their own items. Possible values are:
- 0 : Writers cannot remove their own items.
- 1 : Writers can remove their own items.
- userCanTakeOwnership integer Optional: Whether a user can take ownership of an item created by anonymous. Possible values are:
- 0 : A user cannot take ownership of an item created by anonymous.
- 1 : Users can take ownership of an item created by anonymous.
- oneUserItem integer Optional: Whether a user can only have one item. Possible values are:
- 0 : A user can have multiple items.
- 1 : A user can only have one item.
- writerGroupCanModify integer Optional: Whether a writer group can modify items. Possible values are:
- 0 : A writer group cannot modify items.
- 1 : A writer group can modify items.
- writerGroupCanRemove integer Optional: Whether a writer group can remove items. Possible values are:
- 0 : A writer group cannot remove items.
- 1 : A writer group can remove items.
- allowOffline integer Optional: Whether to allow offline usage. Possible values are:
- 0 : Do not allow offline usage.
- 1 : Allow offline usage.
- useRatings integer Optional: Whether to enable ratings. Possible values are:
- 0 : Do not enable ratings.
- 1 : Enable ratings.
- showRatings integer Optional: Whether to show ratings. Possible values are:
- 0 : Do not show ratings.
- 1 : Show ratings.
- ratingOptions string Optional: The rating options. Possible values are:
- 0 : 0 score
- 1 : 1 score
- 2 : 2 score
- 3 : 3 score
- 4 : 4 score
- 5 : 5 score
- useComments integer Optional: Whether to allow comments. Possible values are:
- 0 : Do not allow comments.
- 1 : Allow comments.
- showComments integer Optional: Whether to show comments. Possible values are:
- 0 : Do not show comments.
- 1 : Show comments.
- showLastComment integer Optional: Whether to show the last comment. Possible values are:
- 0 : Do not show the last comment.
- 1 : Show the last comment.
- saveAndComment integer Optional: Whether to save and comment. Possible values are:
- 0 : Do not save and comment.
- 1 : Save and comment.
- useAttachments integer Optional: Whether to allow attachments. Possible values are:
- 0 : Do not allow attachments.
- 1 : Allow attachments.
- showAttachments integer Optional: Whether to show attachments. Possible values are:
- 0 : Do not show attachments.
- 1 : Show attachments.
- orderAttachments string Optional: The order of attachments. Possible values are:
- filename : Filename
- created : Creation date
- filesize : File size
- hits : Hits
- desc : Description
- start integer Optional: The start date of the tracker
- end integer Optional: The end date of the tracker
- autoCreateGroup integer Optional: Whether to automatically create group. Possible values are:
- 0 : Do not automatically create group.
- 1 : Automatically create group.
- autoCreateGroupInc string Optional: The groups to include when automatically creating a group.
- autoAssignCreatorGroup integer Optional: Whether to automatically assign the creator to the default group. Possible values are:
- 0 : Do not automatically assign the creator to the default group.
- 1 : Automatically assign the creator to the default group.
- autoAssignGroupItem integer Optional: Whether to automatically assign a group to an item. Possible values are:
- 0 : Do not automatically assign a group to an item.
- 1 : Automatically assign a group to an item.
- autoCopyGroup integer Optional: Whether to automatically copy the group. Possible values are:
- 0 : Do not automatically copy the group.
- 1 : Automatically copy the group.
- viewItemPretty string Optional: The view item pretty
- editItemPretty string Optional: The edit item pretty
- autoCreateCategories integer Optional: Whether to automatically create categories. Possible values are:
- 0 : Do not automatically create categories.
- 1 : Automatically create categories.
- publishRSS integer Optional: Whether to publish RSS. Possible values are:
- 0 : Do not publish RSS.
- 1 : Publish RSS.
- sectionFormat string Optional: The section format. Possible values are:
- flat : Flat
- tab : Tabs
- adminOnlyViewEditItem integer Optional: Whether only admin can view/edit item. Possible values are:
- 0 : All users can view/edit item.
- 1 : Only admin can view/edit item.
- logo string Optional: The logo of the tracker
- useFormClasses integer Optional: Whether to use form classes. Possible values are:
- 0 : Do not use form classes.
- 1 : Use form classes.
- formClasses string Optional: Sets classes for form to be used in Tracker Plugin (e.g., col-md-9).
- tabularSync string Optional: Comma-separated list of import-export formats to synchronize the tracker data with.
- tabularSyncModifiedField integer Optional: Choose one of the tracker fields if remote items update its value every time a change happens. This will ensure only updated items get synchronized when importing from remote source.
- tabularSyncLastImport integer Optional: This tracks the last date/time when this tracker was synchronized with remote source. Subsequent import-export imports will only fetch content newer than this date. Reset to something in the past if you want to re-import.
- tabularSyncLastImportSkipUpdate string Optional: By default, last import time gets reset every time an import happens. Check this option if you want the last import time to be static and kept what is entered above. Possible values:
- y : skip resetting the last import time
- n : don't skip resetting the last import time
Create a new field within the specified tracker.
Create a new field within the specified tracker.
https://example.com/api/trackers/{trackerId}/fields
curl --request POST \ --url "https://example.com/api/trackers/16/fields" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --header "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "name=Title" \ --data-urlencode "permName=trackertestTitle" \ --data-urlencode "description=Title Description" \ --data-urlencode "description_parse=0" \ --data-urlencode "type=t" \ --data-urlencode "adminOnly=false"
<?php $url = 'https://example.com/api/trackers/16/fields'; $data = [ 'name' => 'Title', 'permName' => 'trackertestTitle', 'description' => 'Title Description', 'description_parse' => 0, 'type' => 't', 'adminOnly' => 'false' ]; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>', 'Content-Type: application/x-www-form-urlencoded' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); $response = curl_exec($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } curl_close($ch); ?>
const formData = new URLSearchParams({ name: 'Title', permName: 'trackertestTitle', description: 'Title Description', description_parse: '0', type: 't', adminOnly: 'false' }); fetch('https://example.com/api/trackers/16/fields', { method: 'POST', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>', 'Content-Type': 'application/x-www-form-urlencoded' }, body: formData.toString() }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "title": "Add Field", "trackerId": 16, "fieldId": 99, "name": "Title", "permName": "trackertestTitle", "type": "t", "types": {}, "description": "Title Description", "descriptionIsParsed": 0, "modal": null, "fieldPrefix": "" }
Parameters
- trackerId integer *: The ID of the tracker where the field will be created.
Request body
- name string *: The name of the field
- permName string *: The permanent name of the field
- description string Optional: The description of the field
- description_parse integer Optional: Whether to parse the description. Possible values are:
- 0 : Do not parse the description
- 1 : Parse the description
- type string *: The type of the field. Possible values are:
- articles : Articles
- q : Auto-Increment
- e : Categorize tracker item
- c : Checkbox
- C : Computed
- y : Country Selector
- b : Currency
- f : Date and Time
- j : Date and Time (Date Picker)
- d : Dropdown
- D : Dropdown selector with "Other" field
- DUR : Duration
- w : Dynamic Items List
- m : Email
- EF : Email Folder
- FG : Files
- g : Group Selector
- h : Heading
- icon : Icon
- r : Item Link
- l : Items List
- kaltura : Kaltura Video
- LANG : Language
- G : Location
- M : Multiselect
- n : Numeric
- k : Page Selector
- R : Radio Buttons
- STARS : Rating
- REL : Relations
- S : Static Text
- F : Tags
- a : Text Area
- t : Text Field
- L : URL
- u : User Selector
- wiki : Wiki Page
- adminOnly boolean Optional : Whether the field is only visible to administrators. Possible values are:
- true : The field is only visible to administrators
- false : The field is visible to all users
Update a tracker.
Update an existing tracker with the provided configuration options.
https://example.com/api/trackers/{trackerId}
curl --request POST \ --url "https://example.com/api/trackers/16" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --header "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "name=TrackerTestUpdated" \ --data-urlencode "description=TrackerTestUpdated Description"
<?php $url = 'https://example.com/api/trackers/16'; $data = [ 'name' => 'TrackerTestUpdated', 'description' => 'TrackerTestUpdated Description' ]; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>', 'Content-Type: application/x-www-form-urlencoded' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); $response = curl_exec($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } curl_close($ch); ?>
const formData = new URLSearchParams({ name: 'TrackerTestUpdated', description: 'TrackerTestUpdated Description' }); fetch('https://example.com/api/trackers/16', { method: 'POST', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>', 'Content-Type': 'application/x-www-form-urlencoded' }, body: formData.toString() }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "accordion_pos": 1, "title": "Edit TrackerTestUpdated", "trackerId": 16, "info": { "adminOnlyViewEditItem": "n", "allowChooseFieldsToDisplay": "n", "allowInlineEditing": "n", "allowOffline": "n", "altClosedStatus": "", "altOpenStatus": "", "altPendingStatus": "", "autoAssignCreatorGroup": "n", "autoAssignCreatorGroupDefault": "n", "autoAssignGroupItem": "n", "autoCopyGroup": "n", "autoCreateCategories": "n", "autoCreateGroup": "n", "autoCreateGroupInc": "", "defaultOrderDir": "asc", "defaultOrderKey": "-1", "defaultStatus": "", "doNotShowEmptyField": "n", "editItemPretty": "", "end": "0", "fieldPrefix": "", "formClasses": "", "groupCanSeeOwn": "n", "logo": "", "modItemStatus": "", "newItemStatus": "o", "notifyOn": "both", "oneUserItem": "n", "orderAttachments": "", "outboundEmail": "", "permName": "", "publishRSS": "n", "ratingOptions": "", "relationshipBehaviour": "", "saveAndComment": "n", "sectionFormat": "flat", "showAttachments": "n", "showComments": "n", "showCreated": "n", "showCreatedBy": "n", "showCreatedFormat": "", "showCreatedView": "n", "showLastComment": "n", "showLastModif": "n", "showLastModifBy": "n", "showLastModifFormat": "", "showLastModifView": "n", "showPopup": "", "showRatings": "n", "showStatus": "n", "showStatusAdminOnly": "n", "simpleEmail": "n", "start": "0", "tabularSync": "", "tabularSyncLastImport": "0", "tabularSyncLastImportSkipUpdate": "n", "tabularSyncModifiedField": "0", "useAttachments": "n", "useComments": "n", "useFormClasses": "n", "useRatings": "n", "userCanSeeOwn": "n", "userCanTakeOwnership": "n", "viewItemPretty": "", "writerCanModify": "n", "writerCanRemove": "n", "writerGroupCanModify": "n", "writerGroupCanRemove": "n", "trackerId": 16, "name": "TrackerTestUpdated", "description": "TrackerTestUpdated Description ", "descriptionIsParsed": "n", "created": 1761481261, "lastModif": 1761490898, "items": 0 }, "statusTypes": { "o": { "name": "open", "label": "Open", "perm": "tiki_p_view_trackers", "image": "img/icons/status_open.gif", "iconname": "status-open" }, "p": { "name": "pending", "label": "Pending", "perm": "tiki_p_view_trackers_pending", "image": "img/icons/status_pending.gif", "iconname": "status-pending" }, "c": { "name": "closed", "label": "Closed", "perm": "tiki_p_view_trackers_closed", "image": "img/icons/status_closed.gif", "iconname": "status-closed" } }, "statusList": [], "sortFields": { "99": "Title", "-1": "Last Modification", "-2": "Creation Date", "-3": "Item ID" }, "attachmentAttributes": { "filename": { "label": "Filename", "selected": false }, "created": { "label": "Creation date", "selected": false }, "hits": { "label": "Views", "selected": false }, "comment": { "label": "Comment", "selected": false }, "filesize": { "label": "File size", "selected": false }, "version": { "label": "Version", "selected": false }, "filetype": { "label": "File type", "selected": false }, "longdesc": { "label": "Long description", "selected": false }, "user": { "label": "User", "selected": false } }, "startDate": null, "startTime": null, "endDate": null, "endTime": null, "groupList": [ "Admins", "Anonymous", "Registered", "sysAdmins", "Translators" ], "groupforAlert": false, "showeachuser": false, "sectionFormats": { "flat": "Flat", "tab": "Tabs", "config": "Configured" }, "remoteTabulars": [], "relationshipBehaviourList": [ "GENERIC_DIRECTIONAL", "GENERIC_NON_DIRECTIONAL", "GENERIC_ONE_TO_MANY" ], "displayTimezone": "Africa/Nairobi" }
Parameters
- trackerId integer *: The ID of the tracker to be updated.
Request body
- name string *: The name of the tracker
- description string Optional: The description of the tracker
- descriptionIsParsed integer Optional: Whether the description is parsed. Possible values are:
- 0 : Not parsed
- 1 : Parsed
- fieldPrefix string Optional: Short string prepended by default to all fields in the tracker.
- permName string Optional: The permanent name of the tracker
- showStatus integer Optional: Whether to show the status of the tracker. Possible values are:
- 0 : Do not show
- 1 : Show
- showStatusAdminOnly integer Optional: Whether to show the status only to the admin. Possible values are:
- 0 : Show the status to all users.
- 1 : Show the status only to the admin.
- showCreated integer Optional: Whether to show the created date when listing items. Possible values are:
- 0 : Do not show the created date.
- 1 : Show the created date.
- showCreatedView integer Optional: Whether to show the created date when viewing items. Possible values are:
- 0 : Do not show the created date.
- 1 : Show the created date.
- showCreatedBy integer Optional: Whether to show the creator when listing items. Possible values are:
- 0 : Do not show the creator.
- 1 : Show the creator.
- showCreatedFormat string Optional: The format of the created date. For more info about Tiki date and time format please check: https://doc.tiki.org/Date-and-Time-Features
- showLastModif integer Optional: Whether to show the last modification date when listing items. Possible values are:
- 0 : Do not show the last modification date.
- 1 : Show the last modification date.
- showLastModifView integer Optional: Whether to show the last modification date when viewing items. Possible values are:
- 0 : Do not show the last modification date.
- 1 : Show the last modification date.
- showLastModifBy integer Optional: Whether to show the last modifier when listing items. Possible values are:
- 0 : Do not show the last modifier.
- 1 : Show the last modifier.
- showLastModifFormat string Optional: The format of the last modification date. For more info about Tiki date and time format please check: https://doc.tiki.org/Date-and-Time-Features
- defaultOrderKey integer Optional: The default sort order when listing items. Possible values are:
- -1 : Last Modification
- -2 : Creation Date
- -3 : Item ID
- defaultOrderDir string Optional: The default sort direction when listing items. Possible values are:
- asc : Ascending
- desc : Descending
- doNotShowEmptyField integer Optional: Whether to show empty fields when listing items. Possible values are:
- 0 : Show empty fields.
- 1 : Do not show empty fields.
- showPopup integer Optional: Whether to show a popup with item details when hovering over an item link. Possible values are:
- 0 : Do not show popup.
- 1 : Show popup.
- defaultStatus String[] Optional: The default status of the tracker. Possible values are:
- o : open
- p : pending
- c : closed
- newItemStatus string[] Optional: The status assigned to new items. Possible values are:
- o : open
- p : pending
- c : closed
- altOpenStatus string Optional: The alternative open status of the tracker.
- altPendingStatus string Optional: The alternative pending status of the tracker.
- altClosedStatus string Optional: The alternative closed status of the tracker.
- modItemStatus string Optional: The status of a modified item. Possible values are:
- o : open
- p : pending
- c : closed
- outboundEmail string Optional: The outbound email address used for notifications. You can add several email addresses by separating them with commas.
- simpleEmail integer Optional: Whether to send simple email notifications. Possible values are:
- 0 : Do not send simple email notifications.
- 1 : Send simple email notifications.
- userCanSeeOwn integer Optional: Whether a user can see their own items. Possible values are:
- 0 : Users cannot see their own items.
- 1 : Users can see their own items.
- groupCanSeeOwn integer Optional: Whether a group can see their own items. Possible values are:
- 0 : Groups cannot see their own items.
- 1 : Groups can see their own items.
- writerCanModify integer Optional: Whether the writer can modify their own items. Possible values are:
- 0 : Writers cannot modify their own items.
- 1 : Writers can modify their own items.
- writerCanRemove integer Optional: Whether the writer can remove their own items. Possible values are:
- 0 : Writers cannot remove their own items.
- 1 : Writers can remove their own items.
- userCanTakeOwnership integer Optional: Whether a user can take ownership of an item created by anonymous. Possible values are:
- 0 : A user cannot take ownership of an item created by anonymous.
- 1 : Users can take ownership of an item created by anonymous.
- oneUserItem integer Optional: Whether a user can only have one item. Possible values are:
- 0 : A user can have multiple items.
- 1 : A user can only have one item.
- writerGroupCanModify integer Optional: Whether a writer group can modify items. Possible values are:
- 0 : A writer group cannot modify items.
- 1 : A writer group can modify items.
- writerGroupCanRemove integer Optional: Whether a writer group can remove items. Possible values are:
- 0 : A writer group cannot remove items.
- 1 : A writer group can remove items.
- allowOffline integer Optional: Whether to allow offline usage. Possible values are:
- 0 : Do not allow offline usage.
- 1 : Allow offline usage.
- useRatings integer Optional: Whether to enable ratings. Possible values are:
- 0 : Do not enable ratings.
- 1 : Enable ratings.
- showRatings integer Optional: Whether to show ratings. Possible values are:
- 0 : Do not show ratings.
- 1 : Show ratings.
- ratingOptions string Optional: The rating options. Possible values are:
- 0 : 0 score
- 1 : 1 score
- 2 : 2 score
- 3 : 3 score
- 4 : 4 score
- 5 : 5 score
- useComments integer Optional: Whether to allow comments. Possible values are:
- 0 : Do not allow comments.
- 1 : Allow comments.
- showComments integer Optional: Whether to show comments. Possible values are:
- 0 : Do not show comments.
- 1 : Show comments.
- showLastComment integer Optional: Whether to show the last comment. Possible values are:
- 0 : Do not show the last comment.
- 1 : Show the last comment.
- saveAndComment integer Optional: Whether to save and comment. Possible values are:
- 0 : Do not save and comment.
- 1 : Save and comment.
- useAttachments integer Optional: Whether to allow attachments. Possible values are:
- 0 : Do not allow attachments.
- 1 : Allow attachments.
- showAttachments integer Optional: Whether to show attachments. Possible values are:
- 0 : Do not show attachments.
- 1 : Show attachments.
- orderAttachments string Optional: The order of attachments. Possible values are:
- filename : Filename
- created : Creation date
- filesize : File size
- hits : Hits
- desc : Description
- start integer Optional: The start date of the tracker
- end integer Optional: The end date of the tracker
- autoCreateGroup integer Optional: Whether to automatically create group. Possible values are:
- 0 : Do not automatically create group.
- 1 : Automatically create group.
- autoCreateGroupInc string Optional: The groups to include when automatically creating a group.
- autoAssignCreatorGroup integer Optional: Whether to automatically assign the creator to the default group. Possible values are:
- 0 : Do not automatically assign the creator to the default group.
- 1 : Automatically assign the creator to the default group.
- autoAssignGroupItem integer Optional: Whether to automatically assign a group to an item. Possible values are:
- 0 : Do not automatically assign a group to an item.
- 1 : Automatically assign a group to an item.
- autoCopyGroup integer Optional: Whether to automatically copy the group. Possible values are:
- 0 : Do not automatically copy the group.
- 1 : Automatically copy the group.
- viewItemPretty string Optional: The view item pretty
- editItemPretty string Optional: The edit item pretty
- autoCreateCategories integer Optional: Whether to automatically create categories. Possible values are:
- 0 : Do not automatically create categories.
- 1 : Automatically create categories.
- publishRSS integer Optional: Whether to publish RSS. Possible values are:
- 0 : Do not publish RSS.
- 1 : Publish RSS.
- sectionFormat string Optional: The section format. Possible values are:
- flat : Flat
- tab : Tabs
- adminOnlyViewEditItem integer Optional: Whether only admin can view/edit item. Possible values are:
- 0 : All users can view/edit item.
- 1 : Only admin can view/edit item.
- logo string Optional: The logo of the tracker
- useFormClasses integer Optional: Whether to use form classes. Possible values are:
- 0 : Do not use form classes.
- 1 : Use form classes.
- formClasses string Optional: Sets classes for form to be used in Tracker Plugin (e.g., col-md-9).
- tabularSync string Optional: Comma-separated list of import-export formats to synchronize the tracker data with.
- tabularSyncModifiedField integer Optional: Choose one of the tracker fields if remote items update its value every time a change happens. This will ensure only updated items get synchronized when importing from remote source.
- tabularSyncLastImport integer Optional: This tracks the last date/time when this tracker was synchronized with remote source. Subsequent import-export imports will only fetch content newer than this date. Reset to something in the past if you want to re-import.
- tabularSyncLastImportSkipUpdate string Optional: By default, last import time gets reset every time an import happens. Check this option if you want the last import time to be static and kept what is entered above. Possible values:
- y : skip resetting the last import time
- n : don't skip resetting the last import time
Create a tracker item.
Create a new item in the specified tracker with the provided field values.
https://example.com/api/trackers/{trackerId}/items
curl --request POST \ --url "https://example.com/api/trackers/16/items" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --header "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "fields[trackertestTitle]=Title One"
<?php $url = 'https://example.com/api/trackers/16/items'; $data = [ 'fields[trackertestTitle]' => 'Title One' ]; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>', 'Content-Type: application/x-www-form-urlencoded' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); $response = curl_exec($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } curl_close($ch); ?>
const formData = new URLSearchParams({ 'fields[trackertestTitle]': 'Title One' }); fetch('https://example.com/api/trackers/16/items', { method: 'POST', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>', 'Content-Type': 'application/x-www-form-urlencoded' }, body: formData.toString() }) .then(res => { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.log('Fetch error: ' + err.message); });
{ "itemId":1576, "status":"o", "fields": { "trackertestTitle":"Title One" }, "itemTitle":"Title One", "processedFields": { "trackertestTitle":"Title One" }, "nextTicket":"cRjNNrBioLzcYxqwmrU-ywGuq-VDwyTHPjnqQsPDpLM" }
Parameters
- trackerId integer *: The tracker ID in which to create the new item.
Request body
Each field value should be provided using the format fields[permanentName]=value (permanent names as keys or ins_FID keys can be used). eg. fields[trackertestTitle]=My Item Title
- fields[fieldPermanentName1] string *: Value for the field with permanent name fieldPermanentName1
- fields[fieldPermanentName2] string *: Value for the field with permanent name fieldPermanentName2
Retrieve items from a specified tracker
Retrieve items from a specified tracker, including each item’s ID, status, and field data.
https://example.com/api/trackers/{trackerId}
curl --request GET \ --url "https://example.com/api/trackers/16" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --data-urlencode "maxRecords=5" \ --data-urlencode "status=o"
<?php $url = 'https://example.com/api/trackers/16'; $params = [ 'maxRecords' => '5', 'status' => 'o' ]; $url .= '?' . http_build_query($params); $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
const params = new URLSearchParams({ maxRecords: '5', status: 'o' }); fetch('https://example.com/api/trackers/16' + '?' + params.toString(), { method: 'GET', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>' } }) .then(res => { if (!res.ok) throw new Error('HTTP ' + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.error('Fetch error:', err.message); });
{ "trackerId": 16, "offset": -1, "maxRecords": 5, "result": [ { "itemId": 1576, "status": "o", "fields": { "trackertestTitle": "Title One" } } ] }
Parameters
- trackerId integer *: The ID of the tracker from which to retrieve items.
- offset integer Optional: The offset for pagination. Default is -1 (no offset).
- maxRecords integer Optional: The maximum number of records to return.
- modifiedSince string Optional: Return only records newer than the specified timestamp.
- status string Optional: Return only records with specific status. Possible values are:
- o : open
- p : pending
- c : closed
- format string Optional: Specify raw to return raw item values without any field processing.
Duplicate an existing tracker.
Duplicate an existing tracker.
https://example.com/api/trackers/{trackerId}/duplicate
curl --request POST \ --url "https://example.com/api/trackers/16/duplicate" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>" \ --header "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "name=TestTrackerDuplicated" \ --data-urlencode "dupPerms=testtrackerduplicated"
<?php $url = 'https://example.com/api/trackers/16/duplicate'; $data = [ 'name' => 'TestTrackerDuplicated', 'dupPerms' => 'testtrackerduplicated' ]; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>', 'Content-Type: application/x-www-form-urlencoded' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
const params = new URLSearchParams({ name: 'TestTrackerDuplicated', dupPerms: 'testtrackerduplicated' }); fetch('https://example.com/api/trackers/16/duplicate', { method: 'POST', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>', 'Content-Type': 'application/x-www-form-urlencoded' }, body: params.toString() }) .then(res => { if (!res.ok) throw new Error('HTTP ' + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.error('Fetch error:', err.message); });
{ "trackerId": "17", "name": "TestTrackerDuplicated", "message": "Tracker 16 has been successfully duplicated." }
Parameters
- trackerId integer * : The ID of the tracker to duplicate.
Request body
- name string * : The name for the duplicated tracker.
- dupCateg ''string Optional The category of the new duplicated tracker
- dupPerms ''string Optional : The permanent name of the new duplicated tracker
Remove all items from a tracker.
Remove all items from a tracker.
https://example.com/api/trackers/{trackerId}/clear
curl --request POST \ --url "https://example.com/api/trackers/17/clear" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>"
<?php $url = 'https://example.com/api/trackers/17/clear'; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, ''); // No body curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
fetch('https://example.com/api/trackers/17/clear', { method: 'POST', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>' } }) .then(res => { if (!res.ok) throw new Error('HTTP ' + res.status); return res.json(); }) .then(data => { console.log(data); }) .catch(err => { console.error('Fetch error:', err.message); });
{ "trackerId": 17, "name": "TestTrackerDuplicated", "message": "Tracker 17 has been successfully cleared." }
Parameters
- trackerId integer * : The ID of the tracker whose items should be removed.
Dump all tracker items in a CSV format.
Dump all tracker items in a CSV format.
https://example.com/api/trackers/{trackerId}/dump
curl --request GET \ --url "https://example.com/api/trackers/16/dump" \ --header "accept: text/csv" \ --header "Authorization: Bearer <API_TOKEN>"
<?php $url = 'https://example.com/api/trackers/16/dump'; $headers = [ 'Accept: text/csv', 'Authorization: Bearer <API_TOKEN>' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { // Save response as CSV file file_put_contents('tracker_dump.csv', $response); echo "CSV file saved as tracker_dump.csv\n"; } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
fetch('https://example.com/api/trackers/16/dump', { method: 'GET', headers: { 'Accept': 'text/csv', 'Authorization': 'Bearer <API_TOKEN>' } }) .then(res => { if (!res.ok) throw new Error('HTTP ' + res.status); return res.blob(); // Receive as CSV blob }) .then(blob => { // Save CSV file locally const file = new File([blob], 'tracker_dump.csv', { type: 'text/csv' }); console.log('CSV file ready:', file); }) .catch(err => { console.error('Fetch error:', err.message); });
itemId,status,created,lastModif,"Title -- 99", 1576,o,1761493369,1761493369,"Title One", 1578,o,1761502423,1761502423,"Title Two",
Parameters
- trackerId integer * : The ID of the tracker to dump.
Export the tracker YAML profile.
Export the tracker YAML profile.
https://example.com/api/trackers/{trackerId}/export
curl --request GET \ --url "https://example.com/api/trackers/16/export" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>"
<?php $url = 'https://example.com/api/trackers/16/export'; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
fetch('https://example.com/api/trackers/16/export', { method: 'GET', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>' } }) .then(res => { if (!res.ok) throw new Error('HTTP ' + res.status); return res.json(); }) .then(data => { console.log('YAML Export:', data); }) .catch(err => { console.error('Fetch error:', err.message); });
{ "trackerId": 16, "yaml": "<div class=\"codecaption\">YAML</div><div class=\"codelisting_container\"><div class=\"icon_copy_code far fa-clipboard\" tabindex=\"0\" data-clipboard-target=\"#codebox1\" ><span class=\"copy_code_tooltiptext\">Copy to clipboard</span></div><pre class=\"codelisting\" data-theme=\"off\" data-syntax=\"yaml\" data-wrap=\"1\" dir=\"ltr\" style=\"white-space:pre-wrap; overflow-wrap: break-word; word-wrap: break-word;\" id=\"codebox1\" ><div class=\"code\">permissions: { }\npreferences: { }\nobjects:\n -\n type: tracker\n ref: trackertestupdated\n data:\n name: TrackerTestUpdated\n description: 'TrackerTestUpdated Description '\n alt_closed_status: ''\n alt_open_status: ''\n alt_pending_status: ''\n list_default_status: ''\n restrict_end: '0'\n form_classes: ''\n restrict_start: '0'\n -\n type: tracker_field\n ref: trackertestupdated_trackertestTitle\n data:\n name: Title\n permname: trackertestTitle\n tracker: '$profileobject:trackertestupdated$'\n options:\n samerow: 1\n type: text_field\n order: 10\n description: 'Title Description'\n visby: { }\n editby: { }\n flags:\n - link\n - list\n - public\n - mandatory\n -\n type: tracker_option\n ref: trackertestupdated_sort_default_field\n data:\n tracker: '$profileobject:trackertestupdated$'\n name: sort_default_field\n value: modification</div></pre></div>" }
Parameters
- trackerId integer * : The ID of the tracker to export.
Retrieve all fields of a tracker.
Retrieve all fields of a tracker.
https://example.com/api/trackers/{trackerId}/fields
curl --request GET \ --url "https://example.com/api/trackers/16/fields" \ --header "accept: application/json" \ --header "Authorization: Bearer <API_TOKEN>"
<?php $url = 'https://example.com/api/trackers/16/fields'; $headers = [ 'Accept: application/json', 'Authorization: Bearer <API_TOKEN>' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error: ' . curl_error($ch); } else { $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_code === 200) { $data = json_decode($response, true); print_r($data); } else { echo 'Error: HTTP status code ' . $http_code; } } curl_close($ch); ?>
fetch('https://example.com/api/trackers/16/fields', { method: 'GET', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer <API_TOKEN>' } }) .then(res => { if (!res.ok) throw new Error('HTTP ' + res.status); return res.json(); }) .then(data => { console.log('Tracker Fields:', data); }) .catch(err => { console.error('Fetch error:', err.message); });
{ "fields": [ { "fieldId": 99, "trackerId": 16, "name": "Title", "permName": "trackertestTitle", "options": "", "type": "t", "isMain": "y", "isTblVisible": "y", "position": 10, "isSearchable": "n", "isPublic": "y", "isHidden": "n", "isMandatory": "y", "description": "Title Description", "isMultilingual": "", "itemChoices": [], "errorMsg": "", "visibleBy": [], "editableBy": [], "descriptionIsParsed": "n", "validation": "", "validationParam": "", "validationMessage": "", "rules": null, "encryptionKeyId": null, "excludeFromNotification": "", "visibleInViewMode": "y", "visibleInEditMode": "y", "visibleInHistoryMode": "y", "options_array": [ 1, false, false, false, false, false, false ], "options_map": { "samerow": 1, "size": false, "prepend": false, "append": false, "max": false, "autocomplete": false, "exact": false, "labelasplaceholder": 0, "is_password": 0 } } ], "types": {}, "typesDisabled": {}, "duplicates": [] }
Parameters
- trackerId integer * : The ID of the tracker to retrieve fields from.