Example of creating or modifying a row in a table
{
"info": {
"_postman_id": "2b518691-8359-4790-97cd-69c3040e1b7a",
"name": "Support ttc-api",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "createOrUpdateTableRow example",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/x-www-form-urlencoded",
"type": "text"
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "req",
"value": "createOrUpdateTableRow",
"description": "request name",
"type": "text"
},
{
"key": "version",
"value": "6.49n",
"description": "API target version ",
"type": "text"
},
{
"key": "u_c",
"value": "",
"description": "UserID corresponding to the SESSKEY",
"type": "text"
},
{
"key": "o_u",
"value": "",
"description": "user code corresponding to the sesskey, used in some cases where you want to write on behalf of another user (not covered by this example)",
"type": "text"
},
{
"key": "sesskey",
"value": "",
"description": "session key retrieved from the user profile",
"type": "text"
},
{
"key": "rowId",
"value": "12345678",
"description": "id of the row to be modified, tmp followed by a virtual uuid to indicate a row creation (i.e: tmp321-4654-9A645-BCT5K). In the case of a line creation the rowId generated by the server will be returned in the response.",
"type": "text"
},
{
"key": "tabId",
"value": "217434",
"description": "Used in mirror view only, authenticates the o_u on passed fieldValues and rowId",
"type": "text",
"disabled": true
},
{
"key": "bypassUrlTrigger",
"value": "false",
"description": "default: true, pass false if you want to trigger automations following the modifications you make here (url triggers / excel automations for example). By default, for performance reasons, automations will not be triggered via the api.",
"type": "text",
"disabled": true
},
{
"key": "includeContextChanges",
"value": "true",
"description": "default: false, allows you to retrieve the modifications resulting from those made here (formulas / lookups / changes of order, view etc)",
"type": "text",
"disabled": true
},
{
"key": "fieldValues",
"value": "{\"123456\":\"Assigné\",\"7891011\":\"Lien 1, Lien 2\"}",
"description": "Key value fieldId : value to be modified. We treat the links as a string concatenating the values of the first column of the linked elements, separated by commas (or by what we put in linkSeparator below)",
"type": "text"
},
{
"key": "linkSeparator",
"value": "|",
"type": "text",
"disabled": true
}
]
},
"url": {
"raw": "https://timetonic.com/live/api.php",
"protocol": "https",
"host": [
"timetonic",
"com"
],
"path": [
"live",
"api.php"
]
}
},
"response": []
},
Example of searching for values in a table
{
"name": "getTableValues Example",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/x-www-form-urlencoded"
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "req",
"value": "getTableValues",
"description": "request name",
"type": "text"
},
{
"key": "version",
"value": "6.49n",
"description": "API target version",
"type": "text"
},
{
"key": "o_u",
"value": "",
"description": "user code corresponding to the sesskey",
"type": "text"
},
{
"key": "u_c",
"value": "",
"description": "user code corresponding to the sesskey, used in some cases where you want to write on behalf of another user (not covered by this example)",
"type": "text"
},
{
"key": "sesskey",
"value": "",
"description": "session key retrieved from the user profile",
"type": "text"
},
{
"key": "catId",
"value": "123456",
"description": "id of the table (formerly "category") whose data we want to recover (we obtain it for the moment by inspecting in the browser the result of the request getCarnetFormCategory which occurs when we open the tab which interests us)",
"type": "text"
},
{
"key": "filterRowIds",
"value": "{\n \"applyViewFilters\": {\n \"filterGroup\": {\n \"operator\": \"and\", \n \"filters\": [{\n \"id\": \"tmpId\", \n \"json\": {\n \"predicate\": \"after\", \n \"operand\": \"2020-05-01\"\n }, \n \"field_id\": \"1735324\", \n \"filter_type\": \"date\"\n }]\n }\n }\n}",
"description": "object describing the dynamic filter that we wish to apply to restrict the results of this query",
"type": "text"
},
{
"key": "format",
"value": "rows",
"description": "By default the results of this query are returned by column, passing format: rows allows to retrieve rows of values (the response to the query is heavier in this case)",
"type": "text",
"disabled": true
},
{
"key": "tabId",
"value": "654321",
"description": "Used in mirror view only, authenticates the o_u on the passed catId ",
"type": "text"
},
{
"key": "offset",
"value": "1",
"description": "When you want to page the results, page number",
"type": "text"
},
{
"key": "maxRows",
"value": "100",
"description": "When you want to page the results, number of records per page",
"type": "text"
}
]
},
"url": {
"raw": "https://timetonic.com/live/api.php",
"protocol": "https",
"host": [
"timetonic",
"com"
],
"path": [
"live",
"api.php"
]
}
},
"response": []
}
]
}
Comments
0 comments
Please sign in to leave a comment.