TimeTonic API for version 6.49q/6.49

See History of changes

Authentication via POST
Function Demo
Register Application (createAppkey) createAppkey
User Login (createOauthkey) createOauthkey
Create session key (createSesskey) createSesskey
Drop All Sessions (dropAllSessions) dropAllSessions
Register/Update push notification (updatePushId) updatePushId


Access / Change Information via POST
Function Demo
Get User Info (getUserInfo) getUserInfo
Get user session key (getOrCreateSessKey) getOrCreateSessKey
Get All Books Info (getAllBooks) getAllBooks
Get info on one given book (getBookInfo) getBookInfo
Get book messages (getBookMessages) getBookMessages
Get (or open or play) images, media files and documents from URL
Upload images and documents (fileUpload)
Upload / resume upload where it left for images and documents (resumableUpload) resumableUpload
Send Message (sendMsg) sendMsg
Delete Message (deleteMsg) deleteMsg
Get info & list of smart tables in a given book (getBookTables) getBookTables
Get list of events in a given book (getBookEvents) getBookEvents
Get smart table values (getTableValues) getTableValues
Get smart table values by sync codes (getNamedTableValues) getNamedTableValues
Get smart table value subset (getTableValueSubset) getTableValueSubset
Get smart table reference field values (getReferenceFieldValues) getReferenceFieldValues
Compute an operation on a smart table (computeTableOperation) computeTableOperation
Get table rows (getTableRows) getTableRows
Render Smart Text Field (renderSmartTextField) renderSmartTextField
Update smart table value (updateTableValue) updateTableValue
Create or update table row (createOrUpdateTableRow) createOrUpdateTableRow
Create or update multiple table rows (createOrUpdateTableRows) createOrUpdateTableRows
Delete an existing table row (deleteTableRow) deleteTableRow
Get comments stored in smart table value (getTableValueComments) getTableValueComments
Edit comments stored in smart table value (editTableValueComments) editTableValueComments
Delete comments stored in smart table value (deleteTableValueComments) deleteTableValueComments
Get table row by token(getTableRowByToken) getTableRowByToken
Get new table row template by view token(getNewTableRowByViewToken) getNewTableRowByViewToken
Get new table row template by view token(addNewTableRowByViewToken) addNewTableRowByViewToken
Update table row by token(updateTableRowByToken) updateTableRowByToken
List table rows by id(listTableRowsById) listTableRowsById
Mark books message as read (markBooksMessagesAsRead) markBooksMessagesAsRead
Copy or move message (copyOrMoveMessage) copyOrMoveMessage
Rollback change on a row (rollBackBeforeChange) rollBackBeforeChange
Get smart table pivot values (getTablePivotValues) getTablePivotValues


Access / Change Information via Sockets
Function
Attach user to socket
Update smart table value
Send Message
(NEW / UPDATE / DELETE)
Ack Message: Receive Send message acknowledgement
Receive message
Book updates ready
Send Ping request
Ack Ping: Receive Ping request acknowledgement
Send System message
Ack System: Receive System message acknowledgement
Receive System message

Note: Use &JSON_PRETTY_PRINT for nice display.




TimeTonic API Demonstration

createAppkey

See Documentation
POST /live/api.php PARAMETERS req=createAppkey&appname=api
version:

appname:


createOauthkey

See Documentation
POST /live/api.php PARAMETERS req=createOauthkey&login=demo&pwd=test&appkey=Liqr-Wpcc-m4AU-pyV9-zwgj-4vLf-2bWk
version:

login:

pwd:

appkey:


createSesskey

See Documentation
POST /live/api.php PARAMETERS req=createSesskey&o_u=demo&oauthkey=TaWK-Bknb-eKxd-eY2M-nuXg-qCWt-A6Mk&restrictions=
version:

oauth_user (o_u):

user (u_c):

oauthkey:

restrictions:


dropAllSessions

See Documentation
POST /live/api.php PARAMETERS req=dropAllSessions&o_u=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR
version:

oauth_user (o_u):

user (u_c):

session (sesskey):


updatePushId

See Documentation
POST /live/api.php PARAMETERS req=updatePushId&o_u=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR
version:

oauth_user (o_u):

user (u_c):

session (sesskey):

deviceID:

deviceType:

active:

registrationID:

projectID:


getUserInfo

See Documentation
POST /live/api.php PARAMETERS req=getUserInfo&o_u=demo&u_c=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR
version:

oauth_user (o_u):

user (u_c):

sstamp (optional):

session (sesskey):


getOrCreateSessKey

See Documentation
POST /live/api.php PARAMETERS req=getOrCreateSessKey
version:

getAllBooks

See Documentation
POST /live/api.php PARAMETERS req=getAllBooks&o_u=demo&u_c=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR
version:

oauth_user (o_u):

user (u_c):

sstamp (optional):

session (sesskey):

(optional) book code (b_c):

(optional) book owner (b_o):


getBookInfo

See Documentation
POST /live/api.php PARAMETERS req=getBookInfo&o_u=demo&u_c=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR&b_c=test&b_o=demo
version:

oauth_user (o_u):

user (u_c):

sstamp (optional):

session (sesskey):

book code (b_c):

book owner (b_o):


getBookMessages

See Documentation
POST /live/api.php PARAMETERS req=getBookMessages&o_u=demo&u_c=demo&b_c=test&b_o=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR
version:

oauth_user (o_u):

user (u_c):

book code (b_c):

book owner (b_o):

(optional) sstamp:

(optional) smidFirst:

(optional) smidLast :

(optional) nbMax :

(optional) page :

(optional) search_string :

session (sesskey):


resumableUpload

Click here to test resumable uploads

sendMsg

See Documentation
POST /live/api.php PARAMETERS req=sendMsg&o_u=demo&u_c=demo&msg=newMessage&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR
version:

oauth_user (or telephone number of gateway) (o_u):

user (or email or telephone number) (u_c):

(optional, for edition) message id (msg_id):

(optional) book code (b_c):

(optional) book owner (b_o):

message (msg):

(optional) body (body):

session (sesskey):

event (event):

uuid (uid):


deleteMsg

See Documentation
POST /live/api.php PARAMETERS req=deleteMsg&o_u=demo&u_c=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR
version:

oauth_user (or telephone number of gateway) (o_u):

user (or email or telephone number) (u_c):

message id (msg_id):

book code (b_c):

book owner (b_o):


getBookTables

See Documentation
POST /live/api.php PARAMETERS req=getBookTables&o_u=demo&u_c=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR&b_c=test&b_o=demo
version:

oauth_user (o_u):

user (u_c):

session (sesskey):

book code (b_c):

book owner (b_o):

include extern views (externViews):

format (accepted value "android") (format):

include fields (includeFields):

include enums in fields (includeEnums):

include view/rows associations (only if format="android" and "includeFields"=true) (getRowIds):


getBookEvents

See Documentation
POST /live/api.php PARAMETERS req=getBookEvents&o_u=demo&u_c=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR&b_c=test&b_o=demo
version:

oauth_user (o_u):

user (u_c):

session (sesskey):

book code (b_c):

book owner (b_o):

(optional) date mini (dateMin aaaa-mm-dd):

(optional) date maxi (dateMax aaaa-mm-dd):

(optional) limit (limit):

(optional) page (page):

(optional) events ids (events_ids):

(optional) participants (participants):


getTableValues

See Documentation
POST /live/api.php PARAMETERS req=getTableValues&o_u=demo&u_c=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR&o_u_sesskey=&b_o=demo&catId=&tabId=
version:

oauth_user (o_u):

user (u_c):

session (sesskey):

o_u_session (o_u_sesskey):

book owner (b_o):

category/table id (catId):

(optional) filtered rows (filterRowIds):

(optional) tab id (tabId):

(optional) offset (offset):

(default: 100) max rows (maxRows):

(optional) format of response (format):

(optional) max comments (maxComments):

(optional) get all views (getAllViews):

(optional) get dependencies (getDependencies):

(optional) field from which linked table is accessed (fromFieldId):

(optional) json {"fieldId": "password"} to unlock encrypted field (encryptedFieldPasswords):


getNamedTableValues

See Documentation
POST /live/api.php PARAMETERS req=getNamedTableValues&o_u=demo&u_c=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR&b_c=test&b_o=demo&catCode=&tabId=
version:

oauth_user (o_u):

user (u_c):

session (sesskey):

book code (b_c):

book owner (b_o):

category/table sync code (catCode):

(optional) List of field sync codes (fieldCodes):

(optional) filtered rows (filterRowIds):

(optional) tab id (tabId):

(optional) offset (offset):

(default: 100) max rows (maxRows):

(optional) format of response (format):

(optional) max comments (maxComments):

(optional) get all views (getAllViews):

(optional) get dependencies (getDependencies):


getTableValueSubset

See Documentation
POST /live/api.php PARAMETERS req=getTableValueSubset&o_u=demo&u_c=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR&b_o=demo&catId=&fieldIds=&rowIds=
version:

oauth_user (o_u):

user (u_c):

session (sesskey):

book owner (b_o):

category/table id (catId):

fieldIds (fieldIds):

rowIds (rowIds):



getReferenceFieldValues

See Documentation
POST /live/api.php PARAMETERS req=getReferenceFieldValues&o_u=demo&u_c=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR&b_o=demo&fieldId=&viewId=&offset=&maxRows=
version:

oauth_user (o_u):

user (u_c):

session (sesskey):

book owner (b_o):

field id (fieldId):

(optional) tab id (tabId):

(optional) field from which linked table is accessed (fromFieldId):

(optional) offset (offset):

(optional) maxRows (maxRows):



computeTableOperation

See Documentation
POST /live/api.php PARAMETERS req=computeTableOperation&o_u=demo&u_c=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR&operation=count&b_o=demo&catId=&tabId=
version:

oauth_user (o_u):

user (u_c):

session (sesskey):

book owner (b_o):

category/table id (catId):

operation (operation):

(optional) filtered rows (filterRowIds):


getTableRows (deprecated since 6.47)

See Documentation
POST /live/api.php PARAMETERS req=getTableRows&o_u=demo&u_c=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR&b_o=demo&catId=&tabId=
version:

oauth_user (o_u):

user (u_c):

session (sesskey):

book owner (b_o):

category/table id (catId):

(optional) specific row ids (rowIds):

(default: 100) page size (pageSize):

(default: 1) page number (page):

(optional) flag to get table info (getTableInfo):


updateTableValue

See Documentation
POST /live/api.php PARAMETERS req=updateTableValue&o_u=demo&u_c=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR&b_o=demo&value=&rowId=&fieldId=
version:

oauth_user (o_u):

user (u_c):

session (sesskey):

book owner (b_o):

value (value):

row id (rowId):

field id (fieldId):

(optional) Disable Webhooks (bypassUrlTrigger):


renderSmartTextField

See Documentation
POST /live/api.php PARAMETERS req=renderSmartTextField&o_u=demo&u_c=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR&b_o=demo&catId=&rowId=&fieldId=
version:

oauth_user (o_u):

user (u_c):

session (sesskey):

book owner (b_o):

category id (value):

row id (rowId):

field id (fieldId):

(optional) Disable Webhooks (bypassUrlTrigger):


createOrUpdateTableRow

See Documentation
POST /live/api.php PARAMETERS req=createOrUpdateTableRow&o_u=demo&u_c=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR&b_o=demo&view_id=&tab_id=&rowId=tmpNEW_ROW&fieldValues=""
version:

oauth_user (o_u):

user (u_c):

session (sesskey):

book owner (b_o):

row id (rowId):

field values (fieldValues):

(optional) view id:

(optional) tab id:

(optional) link separator (linkSeparator):

(optional) Disable Webhooks (bypassUrlTrigger):



createOrUpdateTableRows

See Documentation
POST /live/api.php PARAMETERS req=createOrUpdateTableRows&o_u=demo&u_c=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR&b_o=demo&view_id=&tab_id=&rows=
version:

oauth_user (o_u):

user (u_c):

session (sesskey):

book owner (b_o):

rows (rows):

(optional) view id:

(optional) tab id:

(optional) link separator (linkSeparator):



deleteTableRow

See Documentation
POST /live/api.php PARAMETERS req=deleteTableRow&o_u=demo&u_c=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR&b_o=demo&catId=&rowId=
version:

oauth_user (o_u):

user (u_c):

session (sesskey):

book owner (b_o):

category/table id (catId):
row id (rowId):



getTableValueComments

See Documentation
POST /live/api.php PARAMETERS req=getTableValueComments&o_u=demo&u_c=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR&b_o=demo&fieldId=&rowId=
version:

oauth_user (o_u):

user (u_c):

session (sesskey):

book owner (b_o):

field id (fieldId):

row id (rowId):



editTableValueComments

See Documentation
POST /live/api.php PARAMETERS req=editTableValueComments&o_u=demo&u_c=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR&b_o=demo&commentId=
version:

oauth_user (o_u):

user (u_c):

session (sesskey):

book owner (b_o):

comment id (commentId):

value:


deleteTableValueComments

See Documentation
POST /live/api.php PARAMETERS req=deleteTableValueComments&o_u=demo&u_c=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR&b_o=demo&commentId=
version:

oauth_user (o_u):

user (u_c):

session (sesskey):

book owner (b_o):

comment id (commentId):



getTableRowByToken

See Documentation
POST /live/api.php PARAMETERS req=getTableRowByToken&b_o=demo&token=
version:

book owner (b_o):

token (token):



getNewTableRowByViewToken

See Documentation
POST /live/api.php PARAMETERS req=getNewTableRowByViewToken&b_o=demo&token=
version:

book owner (b_o):

token (token):



addNewTableRowByViewToken

See Documentation
POST /live/api.php PARAMETERS req=addNewTableRowByViewToken&b_o=demo&token=&changes=
version:

book owner (b_o):

token (token):

changes (changes):

(optional) Disable Webhooks (bypassUrlTrigger):



updateTableRowByToken

See Documentation
POST /live/api.php PARAMETERS req=updateTableRowByToken&b_o=demo&token=&changes=
version:

book owner (b_o):

token (token):

changes (changes):

(optional) Disable Webhooks (bypassUrlTrigger):



listTableRowsById

See Documentation
POST /live/api.php PARAMETERS req=listTableRowsById&o_u=demo&u_c=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR&b_o=demo&catId=
version:

oauth_user (o_u):

user (u_c):

session (sesskey):

book owner (b_o):

category/table id (catId):

(optional) view id (viewId):

(optional) format (format):

(optional) maxRows (maxRows):

(optional) (deprecated) lastHour (lastHour):

(optional) last modified after (lastModifiedAfter):


markBooksMessagesAsRead

See Documentation
POST /live/api.php PARAMETERS req=markBooksMessagesAsRead&o_u=demo&u_c=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR
version:

oauth_user (o_u):

user (u_c):

session (sesskey):

(optional) books (books):

(optional) all (all):

copyOrMoveMessage

See Documentation
POST /live/api.php PARAMETERS req=copyOrMoveMessage&o_u=demo&u_c=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR&messageId=&b_c=test&b_o=demo&move=
version:

oauth_user (o_u):

user (u_c):

session (sesskey):

Message ID (messageId):

Destination book code (b_c):

Destination book owner (b_o):

(optional) all (move):

rollBackBeforeChange

See Documentation
POST /live/api.php PARAMETERS req=rollBackBeforeChange&o_u=demo&u_c=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR&b_o=demo&catId=&tabId=&rowId=&changeId=
version:

oauth_user (o_u):

user (u_c):

session (sesskey):

Book owner (b_o):

Category ID (catId):

Tab ID (tabId):

Row ID (rowId):

First change ID to revert, from history field (changeId):

getTablePivotValues

See Documentation
POST /live/api.php PARAMETERS req=getTablePivotValues&o_u=demo&u_c=demo&sesskey=EneF-PNZF-FKdy-Xpz7-YFtz-ITYB-UNVR&o_u_sesskey=&b_o=demo&catId=&tabId=
version:

oauth_user (o_u):

user (u_c):

session (sesskey):

o_u_session (o_u_sesskey):

book owner (b_o):

filtered rows (filterRowIds):

view Id (viewID):



TimeTonic API Documentation

TimeTonic API Documentation

Authentication (custom Oauth)

Register application (createAppkey)

Description

Return a unique appkey for a given application name

Parameters

Return values

Examples

Example of query:

POST https://timetonic.com/live/api.php
PARAMETERS version=1.47&req=createAppkey&appname=android

Examples of json returned:

{
	"status":"ok",
	"appkey":"lB3N-55xw-iRmm-dFrd-1PBS-0",
	`id`:"2",
	"createdVNB":"dev-1.030c",
	"req":"createAppkey"
}

ps: don't use the id, just there for debugging for now

User Login (createOauthkey)

Description

Application has an appkey, requests and receives oauthkey for a given user, must be authorized by user (e.g. the application must request login and password info to the user).

Note that when asking the user for its credentials, the application should NOT save the user's login or pwd, but only the oauthkey received from the API

Parameters

Return values

Examples

Example of query:

POST https://timetonic.com/live/api.php
PARAMETERS version=1.47&req=createOauthkey&login=zo&pwd=zo&appkey=wrFE-5Ysw-b2vq-uebz-F6gD-0

Examples of json returned:

{"status":"ok","oauthkey":"kN4W-Tn1S-wP4H-ALGD-bggI-0",`id`:"4","o_u":"zo","createdVNB":"dev-1.030c","req":"createOauthkey"}
{"status":"nok","error":"apiProcess91: invalid appkey","createdVNB":"dev-1.030c","req":"createOauthkey"}

Create session key (createSesskey)

Description

Create a sessions key

Application sends oauthkey and o_u, server generates and sends back sesskey to be used on each future api requests for that user.

Parameters

Return values

Examples

Example of query:

POST https://timetonic.com/live/api.php
PARAMETERS version=1.47&req=createSesskey&o_u=zo&u_c=zo&oauthkey=lhww-v3S7-zPQZ-SCR1-VjVP-0

Examples of json returned:

{"status":"ok","sesskey":"JQri-DSRj-VAsR-7dr8-l9hW-0",`id`:"4","createdVNB":"dev-1.030c","req":"createSesskey"}
{"status":"nok","error":"apiProcess164: invalid oauthkey or o_u","createdVNB":"dev-1.030c","req":"createSesskey"}

ps: don't use the id, just there for debugging for now

Register sms gateway

Description

Register sms gateway (e.g. phone with a sim card and the ttc sms gateway android app that will forward smss to timetonic via sendMsg).

Parameters

Return values

Examples

Example of query:

POST https://timetonic.com/live/api.php
PARAMETERS version=1.50&req=registerSMSGateway&o_u=+33134455666&appname=androidApp

Examples of json returned:

{
	"status":"ok",
	"sesskey":"lB3N-55xw-iRmm-dFrd-1PBS-0",
	"createdVNB":"dev-1.030c",
	"req":"registerSMSGateway"
}

Unregister sms gateway

Description

Unregister sms gateway. See registerSMSGateway for more details.

Parameters

Return values

Examples

Example of query:

POST https://timetonic.com/live/api.php
PARAMETERS version=1.50&req=unregisterSMSGateway&o_u=+33134455666&sesskey=lB3N-55xw-iRmm-dFrd-1PBS-0

Examples of json returned:

{
	"status":"ok",
	"createdVNB":"dev-1.030c",
	"req":"unregisterSMSGateway"
}

dropAllSessions

(Session key is mandatory)

Description

Drop all open sessions (and oauthkeys) except the session provided in the request

Parameters

Return values

Examples

Example of query:

POST https://timetonic.com/live/api.php
PARAMETERS version=1.47&req=dropAllSessions&u_c=zo&o_u=zo&sesskey=gm7q-NqRH-aByq-e6Kh-DwGQ-0

Examples of json returned:

{
	"status":"ok",
	"createdVNB":"live-1.051"
}

updatePushId

(Session key is mandatory)

Description

Register or update push notification ID

Parameters

Return values

Examples

Example of query:

POST https://timetonic.com/live/api.php
PARAMETERS version=1.47&req=updatePushId&u_c=zo&o_u=zo&sesskey=gm7q-NqRH-aByq-e6Kh-DwGQ-0

Examples of json returned:

{
	"status": "ok",
	"deviceID": 12435,
	"createdVNB": "live-2.43f"
}

Information

User info

(Session key is mandatory)

Description

Get user info, preferences and rights and some system preferences (colors)

Parameters

Return values

Examples

Example of query:

POST https://timetonic.com/live/api.php
PARAMETERS version=1.47&r=getUserInfo&u_c=zo&o_u=zo&sesskey=gm7q-NqRH-aByq-e6Kh-DwGQ-0

Examples of json returned:

{
    "status": "ok",
    "sstamp": 80436,
    "userInfo": {
        "firstTime": true,
        "uimgStamp": 1428068689,
        "sstamp": 63743,
        "nbBooks": 1,
        "u_c": "zo",
        "userPrefs": {
            "mail1": "zo@omailey.com",
            "mail1_toConfirm": "",
            "mob1": "",
            "sex": "",
            "country": "",
            "fname": "zo",
            "lname": "",
            "lang": "EN",
            "UCREATEDON": "2015-05-01",
            "birthd": "",
            "mail2": "",
            "mail2_toConfirm": "",
            "mob2": "",
            "address": "",
            "zip": "",
            "city": "",
            "cie": "",
            "vatn": "",
            "account": "Free",
            "until": "",
            "slashd": true,
            "regiondf": "EU",
            "sdate": "",
            "method": "MANUAL",
            "openGrand": true,
            "NotifMobile": "VibNotif",
            "nbCol": 3,
            "lastConnection": "",
            "secondsSincePreviousConnection": "",
            "tz": "",
            "syncWithHubic": false
        },
        "rights": {
            "form-pro": true
        },
        "colors": {
            "defaut": "#9FA8AD",
            "bleu-violet": "#a366a6",
            "gray": "#909090",
            "bleu-turquoise": "#51a5bC",
            "red": "#FF3B47",
            "green": "#7cc300",
            "orange": "#ff8400",
            "pink": "#ff0078",
            "bleu-nuit": "#5780A5",
            "noir": "#2c3f49",
            "rose-bois": "#E84D5B",
            "orange-pastel": "FFB80D",
            "vert-pastel": "#bAe24A",
            "jaune-indien": "#ffdf23",
            "lilas": "#d76db6"
        },	        
        "projectID": 7845287998512	        
    },
    "createdVNB": "dev-1.43c",
    "req": "getUserInfo"
}

ps: don't use the id, just there for debugging for now

Information

getBookMessages

(Session key is mandatory)

Description

Get book messages, page by page, as well as book message updates (whose sstamp has been modified)

Parameters

Return values

Examples

Example of query:

POST https://timetonic.com/live/api.php
PARAMETERS version=1.47&r=getBookMessages&u_c=zo&o_u=zo&b_c=test&b_o=zo&nbMax=3&sesskey=gm7q-NqRH-aByq-e6Kh-DwGQ-0

Examples of json returned:

{
    "status": "ok",
    "sstamp": 352644,
    "b_c": "test",
    "b_o": "zo",
    "bookMessages": [
        {
            "del": false,
            "u_c": "jmd",
            "created": 1444986252,
            "lastModified": 1444986252,
            "uuid": "MTQ0NDk4NjI1MmFsd2F5c2RhdGEuY29tKkB0dGMubWVSWktDQjNtOUlGWVZtaW9BbS8xbTdBam1kdGVzdC56b0B0dGMubWU",
            "sstamp": 352635,
            "pid": 0,
            "msgBody": "Read more",
            "msgBodyHTML": "",
            "msgType": "m",
            "msgMethod": "_mail",
            "msgColor": "",
            "nbComments": 0,
            "lastCommentId": 346914,
            "medias": [
                {
                    "id": 18168,
                    "ext": "jpeg",
                    "originName": "chat poussin.jpg",
                    "internName": "09lZUhUuja.jpg",
                    "uuid": "mFsd2F5c2RhdGEuY",
                    "size": 0,
                    "type": "media",
                    "emailCid": "",
                    "del": false
                },
                {
                    "id": 18169,
                    "ext": "jpg",
                    "originName": "cougar 4.jpg",
                    "internName": "mTFSzwyKoL.jpg",
                    "uuid": "mFsd2F5c2RhdGEuY",
                    "size": 0,
                    "type": "media",
                    "emailCid": "",
                    "del": false
                },
                {
                    "id": 18170,
                    "ext": "jpeg",
                    "originName": "cougar 9.jpeg",
                    "internName": "pQSFT8mrVN.jpeg",
                    "uuid": "mFsd2F5c2RhdGEuY",
                    "size": 0,
                    "type": "media",
                    "emailCid": "",
                    "del": false
                }
            ],
            "nbMedias": 3,
            "nbEmailCids": 0,
            "nbDocs": 0,
            "msg": "Test with email and attachments",
            "smid": 346914
        },
        {
            "del": false,
            "u_c": "jmd",
            "created": 1444920593,
            "lastModified": 1444920602,
            "uuid": "MTQ0NDkyMDU5M2Fsd2F5c2RhdGEuY29tKkB0dGMubWVMZE10RmZPN0gxYkRMQ0FBbS8xbTdBam1kdGVzdC56b0B0dGMubWU",
            "sstamp": 351691,
            "pid": 0,
            "msgBody": "Read more",
            "msgBodyHTML": "",
            "msgType": "m",
            "msgMethod": "_mail",
            "msgColor": "",
            "nbComments": 0,
            "lastCommentId": 346029,
            "nbMedias": 0,
            "nbEmailCids": 0,
            "nbDocs": 0,
            "msg": "bis non lu TR: 1 nouvelle annonce : Paris 11e, Paris 13e",
            "smid": 346029
        }
    ],
    "createdVNB": "dev-1.70f",
    "req": "getBookMessages"
}

getAllBooks

(Session key is mandatory)

Description

Get all book info for a given user

Parameters

Return values

Examples

Example of query:

POST https://timetonic.com/live/api.php
PARAMETERS version=1.47&req=getAllBooks&u_c=zo&o_u=zo&sesskey=gm7q-NqRH-aByq-e6Kh-DwGQ-0

Examples of json returned:

{
    "status": "ok",
    "sstamp": 352651,
    "allBooks": {
        "nbBooks": 14,
        "nbContacts": 3,
        "contacts": [
            {
                "u_c": "amallo",
                "lastName": "mallogia",
                "firstName": "audie",
                "sstamp": 0,
                "isConfirmed": true
            },
            {
                "u_c": "jeanplouin",
                "lastName": "Plouin",
                "firstName": "Jean",
                "sstamp": 0,
                "isConfirmed": true
            },
            {
                "u_c": "jmd",
                "lastName": "Durocher",
                "firstName": "Jean-Michel",
                "sstamp": 105466,
                "isConfirmed": true
            }
        ],
        "books": [
            {
                "accepted": true,
                "archived": false,
                "sstamp": 352651,
                "del": false,
                "b_c": "ws_messages",
                "b_o": "ttc",
                "contact_u_c": null,
                "nbNotRead": 24,
                "nbMembers": 7,
                "members": [
                    {
                        "u_c": "ttc",
                        "invite": "accepted",
                        "right": 3
                    },
                    {
                        "u_c": "amallo",
                        "invite": "accepted",
                        "right": 2
                    },
                    {
                        "u_c": "jmd",
                        "invite": "accepted",
                        "right": 3
                    },
                    {
                        "u_c": "juliend",
                        "invite": "accepted",
                        "right": 2
                    },
                    {
                        "u_c": "jeanplouin",
                        "invite": "accepted",
                        "right": 2
                    },
                    {
                        "u_c": "demo",
                        "invite": "accepted",
                        "right": 2
                    },
                    {
                        "u_c": "zo",
                        "invite": "accepted",
                        "right": 2
                    }
                ],
                "fpForm": {
                    "sfpid": 6391,
                    "name": "ws_messages.ttc",
                    "lastModified": 1439558309
                },
                "lastMsg": {
                    "smid": 346928,
                    "uuid": "MTQ0NDk4NjQ3MmFsd2F5c2RhdGEuY29tKkB0dGMubWVlY2piT1NHK0lGYk5vU29BbS8xbTdBam1kd3NfbWVzc2FnZXMudHRjQHR0Yy5tZQ",
                    "sstamp": 352651,
                    "lastCommentId": 346928,
                    "msgBody": "Read more",
                    "msgBodyHtml": "",
                    "msgType": "m",
                    "msgMethod": "_mail",
                    "msgColor": "",
                    "nbComments": 0,
                    "pid": 0,
                    "nbMedias": 3,
                    "nbEmailCids": 0,
                    "nbDocs": 0,
                    "b_c": "ws_messages",
                    "b_o": "ttc",
                    "u_c": "jmd",
                    "msg": "TR: Test with email and attachments",
                    "del": false,
                    "created": 1444986472,
                    "lastModified": 1444986481,
                    "medias": [
                        {
                            "id": 18171,
                            "ext": "jpeg",
                            "originName": "chat poussin.jpg",
                            "internName": "a2Y11h3VEl.jpg",
                            "size": 0,
                            "type": "media",
                            "emailCid": "",
                            "del": false
                        }
                    ]
                },
                "userPrefs": {
                	"maxMsgsOffline": 20,
                    "syncWithHubic": false,
                    "uCoverLetOwnerDecide": false,
                    "uCoverColor": "green",
                    "uCoverUseLastImg": false,
                    "uCoverImg": null,
                    "uCoverType": "color",
                    "inGlobalSearch": true,
                    "inGlobalTasks": true,
                    "notifyEmailCopy": false,
                    "notifySmsCopy": false,
                    "notifyMobile": true,
                    "notifyWhenMsgInArchivedBook": true
                },
                "ownerPrefs": {
                    "oCoverColor": "gray",
                    "oCoverUseLastImg": true,
                    "oCoverImg": null,
                    "oCoverType": "image",
                    "authorizeMemberBroadcast": true,
                    "acceptExternalMsg": true,
                    "title": "ws_messages",
                    "notifyMobileConfidential": false
                },
                "sbid": 6959,
                "lastMsgRead": 346404,
                "lastMedia": 17486,
                "favorite": true,
                "order": 0
            }
        }
     ),
    "createdVNB": "dev-1.36c",
    "req": "getAllBooks"
}

ps: don't use the id, just there for debugging for now

getBookInfo

(Session key is mandatory)

Description

Get info of a given book

Parameters

Return values

Examples

Example of query:

POST https://timetonic.com/live/api.php
PARAMETERS version=1.47&req=getBookInfo&u_c=zo&o_u=zo&sesskey=gm7q-NqRH-aByq-e6Kh-DwGQ-0&b_c=test&b_o=zo

Examples of json returned:

{
    "status": "ok",
    "sstamp": 352651,
    "book": {
            "accepted": true,
            "archived": false,
            "sstamp": 352651,
            "del": false,
            "b_c": "ws_messages",
            "b_o": "ttc",
            "contact_u_c": null,
            "nbNotRead": 24,
            "nbMembers": 7,
            "members": [
                {
                    "u_c": "ttc",
                    "invite": "accepted",
                    "right": 3
                },
                {
                    "u_c": "amallo",
                    "invite": "accepted",
                    "right": 2
                },
                {
                    "u_c": "jmd",
                    "invite": "accepted",
                    "right": 3
                },
                {
                    "u_c": "juliend",
                    "invite": "sent",
                    "right": 2
                },
                {
                    "u_c": "jeanplouin",
                    "invite": "accepted",
                    "right": 2
                },
                {
                    "u_c": "demo",
                    "invite": "accepted",
                    "right": 2
                },
                {
                    "u_c": "zo",
                    "invite": "accepted",
                    "right": 2
                }
            ],
            "fpForm": {
                "sfpid": 6391,
                "name": "ws_messages.ttc",
                "lastModified": 1439558309
            },
            "lastMsg": {
                "smid": 346928,
                "uuid": "MTQ0NDk4NjQ3MmFsd2F5c2RhdGEuY29tKkB0dGMubWVlY2piT1NHK0lGYk5vU29BbS8xbTdBam1kd3NfbWVzc2FnZXMudHRjQHR0Yy5tZQ",
                "sstamp": 352651,
                "lastCommentId": 346928,
                "msgBody": "Read more",
                "msgBodyHtml": "",
                "msgType": "m",
                "msgMethod": "_mail",
                "msgColor": "",
                "nbComments": 0,
                "pid": 0,
                "nbMedias": 3,
                "nbEmailCids": 0,
                "nbDocs": 0,
                "b_c": "ws_messages",
                "b_o": "ttc",
                "u_c": "jmd",
                "msg": "TR: Test with email and attachments",
                "del": false,
                "created": 1444986472,
                "lastModified": 1444986481,
                "medias": [
                    {
                        "id": 18171,
                        "ext": "jpeg",
                        "originName": "chat poussin.jpg",
                        "internName": "a2Y11h3VEl.jpg",
                        "size": 0,
                        "type": "media",
                        "emailCid": "",
                        "del": false
                    }
                ]
            },
            "userPrefs": {
            	"maxMsgsOffline": 20,
                "syncWithHubic": false,
                "uCoverLetOwnerDecide": false,
                "uCoverColor": "green",
                "uCoverUseLastImg": false,
                "uCoverImg": null,
                "uCoverType": "color",
                "inGlobalSearch": true,
                "inGlobalTasks": true,
                "notifyEmailCopy": false,
                "notifySmsCopy": false,
                "notifyMobile": true,
                "notifyWhenMsgInArchivedBook": true
            },
            "ownerPrefs": {
                "oCoverColor": "gray",
                "oCoverUseLastImg": true,
                "oCoverImg": null,
                "oCoverType": "image",
                "authorizeMemberBroadcast": true,
                "acceptExternalMsg": true,
                "title": "ws_messages",
                "notifyMobileConfidential": false
            },
            "sbid": 6959,
            "lastMsgRead": 346404,
            "lastMedia": 17486,
            "favorite": true,
            "order": 0
     	}
     ),
    "createdVNB": "dev-1.36c",
    "req": "getAllBooks"
}

ps: don't use the id, just there for debugging for now

Get (or open or play) Images, media files and documents from URL

(Session key is mandatory EXCEPT for images from internal names or uuid)

Description

Get (or open or play) image, media file or document from database via its URL.

Note: the URL for the request is NOT the URL of the API, it is the URL of the image, media file or document. But the parameters must still be passed as POST.

The URL specifies the size of the image or image represenation of a document, what to do it with it (e.g. show or play it) and the way to reference it in the database.

Image (or media file or document) URL types are:

The size info can be:

Parameters

Via message id and attached image (or media file or document) number

/dbi/ic/(norm | tb | cover| full)/(b_o)/(b_c)/(smid)/(mdc:image count)/(optional: real image name)

/dbi/oic/(norm | tb | cover| full)/(b_o)/(b_c)/(smid)/(mdc:media count)/(optional: real media name)

Example (image):

https://timetonic.com/live/dbi/ic/norm/zo/testing/317482/0/dolphing.jpg
PARAMETERS version=1.47 & o_u=zo & u_c=zo & sesskey=Xyae-YWJ3-amm7-NGlb-tz9s-0

Example (music) https://timetonic.com/live/dbi/oic/norm/zo/testing/499133/0/SampleAudio_0.5mb.mp3:

https://timetonic.com/live/dbi/oic/norm/zo/testing/499133/0/SampleAudio_0.5mb.mp3
PARAMETERS version=1.47 & o_u=zo & u_c=zo & sesskey=Xyae-YWJ3-amm7-NGlb-tz9s-0

/dbi/dc/tb/(b_o)/(b_c)/(smid)/(mdc:document count)/(optional: real document name)

/dbi/odc/full/(b_o)/(b_c)/(smid)/(mdc:document count)/(optional: real document name)

Example:

https://timetonic.com/live/dbi/odc/tb/zo/ttc-tips/256371/0/test.pdf
PARAMETERS version=1.47 & o_u=zo & u_c=zo & sesskey=Xyae-YWJ3-amm7-NGlb-tz9s-0

Via image (or document) id

/dbi/ii/(norm | tb | cover| full)/(b_o)/(b_c)/(imageId)/(optional: real image name)

/dbi/oii/(norm | tb | cover| full)/(b_o)/(b_c)/(mediaId)/(optional: real media name)

/dbi/di/tb/(b_o)/(b_c)/(docId)/(optional: real document name)

/dbi/odi/full/(b_c)/(b_c)/(docId)/(optional: real document name)

Via image (or document) internal name or uuid

This is the only format that does not require a valid session key, and thus can be opened by anyone

/dbi/in/(norm | tb | cover| full)/(imageInternalName or uuid)/(optional: real image name)

/dbi/oin/(norm | tb | cover| full)/(mediaInternalName or uuid)/(optional: real media name)

/dbi/dn/tb/(docInternalName or uuid)/(optional: real document name)

/dbi/odn/full/(docInternalName or uuid)/(optional: real document name)

Example: https://timetonic.com/live/dbi/in/norm/34s96Bm9c8/

https://timetonic.com/live/dbi/in/norm/34s96Bm9c8/

Example: https://timetonic.com/live/dbi/in/norm/FU-1452006602-568bdccaa0ab6/rosetta.png

https://timetonic.com/live/dbi/in/norm/FU-1452006602-568bdccaa0ab6/rosetta.png

Example (music) https://timetonic.com/live/dbi/oin/norm/zo/testing/FU-1453733561-56a636b988c7c/SampleAudio_0.5mb.mp3:

https://timetonic.com/live/dbi/oin/norm/zo/testing/FU-1453733561-56a636b988c7c/SampleAudio_0.5mb.mp3
PARAMETERS version=1.47 & o_u=zo & u_c=zo & sesskey=Xyae-YWJ3-amm7-NGlb-tz9s-0

Last book image

This will return the last image of the book, for example to always show the last image as the cover

The format is

/dbi/last/(norm | tb | cover| full)/(b_o)/(b_c)/

It is recommended to add the actual image id at the end of the request, e.g.:

/dbi/last/(norm | tb | cover| full)/(b_o)/(b_c)/(imageID)

Example:

https://timetonic.com/live/dbi/last/tb/zo/ttc-tips/
PARAMETERS version=1.47 & o_u=zo & u_c=zo & sesskey=Xyae-YWJ3-amm7-NGlb-tz9s-0

or

https://timetonic.com/live/dbi/last/cover/zo/ttc-tips/124444
PARAMETERS version=1.47 & o_u=zo & u_c=zo & sesskey=Xyae-YWJ3-amm7-NGlb-tz9s-0

User profile image

This will return the user's image from his / her profile to be used for example to display the user's photo in chats. If the requesting user is not a direct contact, a default 'head' icon will be returned instead

The format is

/dbi/ui/(tb |full)/(userID)/(sstamp)

Make sure to add the user sstamp to get the last version of the user's profile image.

Note. Only tb and full formats are currently supported for the user's image. All other formats will return the tb image.

Example:

https://timetonic.com/live/dbi/ui/tb/zo/34556
PARAMETERS version=1.47 & o_u=zo & u_c=zo & sesskey=Xyae-YWJ3-amm7-NGlb-tz9s-0	

fileUpload

(Session key is mandatory)

Description

Upload an image or document file to the server via a regular POST FORM. Uses $_FILES array (file parameter name: "qqfile").

You either specify the smid (message ID) to which the file will be attached (as received from the Socket Ack Message that follows the Socket Send Message), or the rowId and fieldId of the cell to which the file will be attached (the table id will be infered from those)

Parameters

Return values

Examples

Example of post:

POST https://timetonic.com/live/api.php
PARAMETERS version=1.47&req=fileUpload&u_c=zo&o_u=zo&b_o=zo&b_c=test&uuid=LKJQDF887S8F&smid=3421&sesskey=gm7q-NqRH-aByq-e6Kh-DwGQ-0
FILE DATA IN POST FORM FORMAT

resumableUpload

(Session key is mandatory)

Description

Upload an image or document file to the server via a resumable upload implementing the TUS protocol.

You must specify the fieldId and rowId defining the cell to which the file will be attached.

When your success callback is called, your file is done uploading and you need to ask for

uploaded file metadata if you need them. Do so with a GET to {UPLOAD_HOST}/upload_meta/{fileId}

** Short overview of the TUS protocol **

Parameters

Return values - returned by a GET to {UPLOAD_HOST}/upload_meta/{fileId}

sendMsg (via http)

(Session key is mandatory)

Description

Send message via http post request. Also used by ttc SMS Gateways. See registerSMSGateway

Note: prefered method is to use the socket version Send Message

Parameters

Return values

Examples

Example of post:

POST https://timetonic.com/live/api.php
PARAMETERS version=1.47&req=sendMsg&u_c=zo&o_u=zo&b_o=zo&b_c=test&msg=Hello&sesskey=gm7q-NqRH-aByq-e6Kh-DwGQ-0

deleteMsg (via http)

(Session key is mandatory)

Description

Send message via http post request. Also used by ttc SMS Gateways. See registerSMSGateway

Note: prefered method is to use the socket version Send Message

Parameters

Return values

Examples

Example of post:

POST https://timetonic.com/live/api.php
PARAMETERS version=1.47&req=deleteMsg&u_c=zo&o_u=zo&b_o=zo&b_c=test&msg_id=1234567&sesskey=gm7q-NqRH-aByq-e6Kh-DwGQ-0

getBookTables

(Session key is mandatory unless tables are public)

Description

Get all smart tables info (categories, views, filters, etc) of a given book.

Does not include the actual content of any category (table).

See getTableValues to get the table values, one category (table) at a time.

Parameters

Return values

Examples

Example of post:

POST https://timetonic.com/live/api.php
PARAMETERS version=1.47&req=getBookTables&u_c=zo&o_u=zo&b_o=zo&b_c=test&sesskey=gm7q-NqRH-aByq-e6Kh-DwGQ-0

Example of json returned:

{
    "status": "ok",
    "sstamp": 980949,
    "bookTables": {
        "id": 6525,
        "name": "test.zo",
        "description": null,
        "creator": "zo",
        "timetonic": false,
        "system": false,
        "public": false,
        "lastModified": 1459344370,
        "rights": {
            "modify": true,
            "select": 1
        },
        "right": 3,
        "tabs": [
            {
                "id": 1114,
                "category_id": 7403,
                "view_id": null,
                "order": -1,
                "hidden": false,
                "lastModified": 1455811478
            },
            {
                "id": 2115,
                "category_id": 8912,
                "view_id": null,
                "order": 0,
                "hidden": false,
                "lastModified": 1456248536
            }
        ],
        "categories": [
            {
                "id": 7403,
                "name": "values",
                "description": null,
                "order": -1,
                "fpAutoExport": 1,
                "mobLargeColNb": 4,
                "mobSmallColNb": 3,
                "pivot_id": null,
                "p_catid": null,
                "locked": false,
                "lastModified": "2015-10-01 16:15:15",
                "pivot_catid": null,
                "p_field_hz": null,
                "p_field_vt": null,
                "p_field_va": null,
                "p_field_co": null,
                "prefs": {
                    "link_presentation": 1
                },
                "views": [
                    {
                        "id": 7731,
                        "name": "Default view",
                        "description": null,
                        "presentation": 1,
                        "locked": false,
                        "filterGroup": {
                            "id": 10686,
                            "operator": "or",
                            "lastModified": "2015-10-01 16:15:15",
                            "filters": []
                        },
                        "card": {
                            "hz_field_id": 65203,
                            "layout": 1,
                            "title_field_id": 65204
                        },
                        "calendar": {
                            "display_field_id": 65203,
                            "start_field_id": 65207,
                            "end_field_id": null,
                            "co_field_id": null
                        }
                    },
                    {
                        "id": 11731,
                        "name": "cat 1b",
                        "description": "",
                        "presentation": 1,
                        "locked": false,
                        "filterGroup": {
                            "id": 18126,
                            "operator": "or",
                            "lastModified": "2016-03-30 15:26:10",
                            "filters": [
                                {
                                    "id": 20730,
                                    "field_id": 65203,
                                    "filter_type": "text",
                                    "json": {
                                        "predicate": "contains",
                                        "operand": 1
                                    },
                                    "lastModified": "2016-03-30 15:26:10"
                                },
                                {
                                    "id": 20731,
                                    "field_id": 65203,
                                    "filter_type": "text",
                                    "json": {
                                        "predicate": "contains",
                                        "operand": 2
                                    },
                                    "lastModified": "2016-03-30 15:26:10"
                                }
                            ]
                        },
                        "card": {
                            "hz_field_id": 65203,
                            "layout": 1,
                            "title_field_id": 65204
                        },
                        "calendar": {
                            "display_field_id": 65203,
                            "start_field_id": 65207,
                            "end_field_id": null,
                            "co_field_id": null
                        }
                    }
                ],
                "selectedViewId": 11731,
                "fields": null
            },
            {
                "id": 8912,
                "name": "sqdf",
                "description": "",
                "order": 0,
                "fpAutoExport": 1,
                "mobLargeColNb": 4,
                "mobSmallColNb": 3,
                "pivot_id": null,
                "p_catid": null,
                "locked": false,
                "lastModified": "2016-02-23 18:28:56",
                "pivot_catid": null,
                "p_field_hz": null,
                "p_field_vt": null,
                "p_field_va": null,
                "p_field_co": null,
                "prefs": {
                    "link_presentation": 1
                },
                "views": [
                    {
                        "id": 10679,
                        "name": "Default view",
                        "description": null,
                        "presentation": 1,
                        "locked": false,
                        "filterGroup": null,
                        "card": {
                            "hz_field_id": 80510,
                            "layout": 1,
                            "title_field_id": 80511
                        },
                        "calendar": {
                            "display_field_id": 80510,
                            "start_field_id": 80514,
                            "end_field_id": 80514,
                            "co_field_id": null
                        }
                    }
                ],
                "selectedViewId": 10679,
                "fields": null
            }
        ],
        "lastTabId": 1114
    },
    "createdVNB": "dev-2.53f",
    "req": "getBookTables"
}

getTableRows

(Session key is mandatory unless tables are public)

Description

Get complete table rows (with hidden fields if accessible to user). Rows returned here are not dependant of table views filter / masks. Rows will for now be formmatted as android app needs them to be. Use with paging for large datasets.

Parameters

getTableValues

(Session key is mandatory unless tables are public)

Description

Get all values of a given category (table).

See getBookTables to get the description of tables, views and filters.

Parameters

Return values

Examples

Example of post:

POST https://timetonic.com/live/api.php
PARAMETERS version=1.47&req=getTableValues&u_c=zo&o_u=zo&sesskey=gm7q-NqRH-aByq-e6Kh-DwGQ-0&b_c=test&b_o=zo&catId=3582

Example of post:

POST https://timetonic.com/live/api.php
PARAMETERS 
req:getTableValues
version:3.29b
o_u:zo
u_c:zo
sesskey:fHeW-qUBJ-EduM-q5Sv-2hWP-0
catId:2217
filterRowIds:{"applyViewFilters" : 4150}
tabId:

Example of post:

POST https://timetonic.com/live/api.php
PARAMETERS 
req:getTableValues
version:3.29b
o_u:zo
u_c:zo
sesskey:fHeW-qUBJ-EduM-q5Sv-2hWP-0
catId:2217
filterRowIds:{"applyViewFilters" : true}
tabId:

Example of post:

POST https://timetonic.com/live/api.php
PARAMETERS 
req:getTableValues
version:3.29b
o_u:zo
u_c:zo
sesskey:fHeW-qUBJ-EduM-q5Sv-2hWP-0
catId:2217
filterRowIds: {
	"applyViewFilters": {
		"filterGroup": {
			"operator": "and", 
			"filters": [{
				"id": "tmpId", 
				"json": {
					"predicate": "desc", 
					"operand": ""
					}, 
				"field_id": "30891", 
				"filter_type": "groupby"
				}, {
				"id": "tmpId", 
				"json": {
					"predicate": "desc", 
					"operand": ""
					}, 
				"field_id": "22536", 
				"filter_type": "groupby"
				}, {
				"id": "tmpId", 
				"json": {
					"predicate": "contains", 
					"operand": "value"
					}, 
				"field_id": "22534", 
				"filter_type": "text"
				}] 
			} 
		}
	}
tabId:

Notes: - Only field filterGroup of view property is necessary - the tmpId is here to indicate a non saved filter (not present in TimeTonic db). Any non numeric filter id is considered as unsaved by TimeTonic so you may pass any string you want.

getNamedTableValues

(Session key is mandatory unless tables are public)

Description

Similar to getTableValues but takes a table sync code instead of a table id as input parameter. Also accepts a list of field sync codes to only retrieve a subset of fields.

See getTableValues to get more informations.

Parameters

Return values

Examples

Example of post:

POST https://timetonic.com/live/api.php
PARAMETERS version=1.47&req=getNamedTableValues&u_c=zo&o_u=zo&sesskey=gm7q-NqRH-aByq-e6Kh-DwGQ-0&b_c=test&b_o=zo&catCode=myCatCode

Example of post:

POST https://timetonic.com/live/api.php
PARAMETERS 
req:getNamedTableValues
version:3.29b
o_u:zo
u_c:zo
sesskey:fHeW-qUBJ-EduM-q5Sv-2hWP-0
b_c:test
b_o:zo
catCode:myCatCode
filterRowIds:{"applyViewFilters" : 4150}
tabId:

Example of post:

POST https://timetonic.com/live/api.php
PARAMETERS 
req:getNamedTableValues
version:3.29b
o_u:zo
u_c:zo
sesskey:fHeW-qUBJ-EduM-q5Sv-2hWP-0
b_c:test
b_o:zo
catCode:myCatCode
fieldCodes:myFieldCode,myOtherFieldCode
filterRowIds:{"applyViewFilters" : true}
tabId:

getTableValueSubset

(Session key is mandatory unless tables are public)

Description

Compute an operation on the values of a category (table).

See getTableValues to get the table values

Parameters

Return values

computeTableOperation

(Session key is mandatory unless tables are public)

Description

Compute an operation on the values of a category (table).

See getTableValues to get the table values

Parameters

Return values

updateTableValue

(Session key is mandatory unless tables are public)

Description

Update a given table value

Parameters

Return values

Examples

Example of post:

POST https://timetonic.com/live/api.php
PARAMETERS version=1.47&req=updateTableValue&u_c=zo&o_u=zo&sesskey=gm7q-NqRH-aByq-e6Kh-DwGQ-0&value="newValue"&rowId="2"&fieldId="134933"

createOrUpdateTableRow

(Session key is mandatory unless tables are public)

Description

Create or update a table row with the given values

Parameters

Example of fieldValues:

{
	"fieldId123": "fieldValue123",
	"fieldId456": "fieldValue456",
	"fieldId789": "fieldValue789"
}

Return values

Example of response:

{
	"status": "ok",
	"newRows": [{
		"id": 10,
		"tmpId": "tmpNEW_ROW",
		"info": {
			"order": 5
		}
	}],
	"createdVNB": "dev-3.05b",
	"req": "createOrUpdateTableRow"
}

createOrUpdateTableRows

(Session key is mandatory unless tables are public)

Description

Create or update multiple table row with the given values

Parameters

Example of fieldValues:

{
	"117829": {
		"39487893": "fieldValue for fieldId=39487893 and rowId=117829",
		"39487894": "fieldValue for fieldId 39487894 and rowId=117829",
		"39487895": "fieldValue for fieldId 39487895 and rowId=117829"
	},
	"tmpNEW_ROW": {
		"39487893": "fieldValue for fieldId 39487893 for the row to be created",
		"39487894": "fieldValue for fieldId 39487894 for the row to be created",
		"39487895": "fieldValue for fieldId 39487895 for the row to be created"
	}
}

Return values

Example of response:

{
	"status": "ok",
	"createdVNB": "dev-3.05b",
	"req": "createOrUpdateTableRows",
	"modified": 1,
	"created": 1
}

deleteTableRow

(Session key is mandatory unless tables are public)

Description

Update a table row with the given values

Parameters

Return values

Example of response:

{
	"status": "ok",
	"formLastModified": 1482417443,
	"deletedRow": {
		"id": "10"
	},
	"createdVNB": "dev-3.05b",
	"req": "deleteTableRow"
}

getTableValueComments

(Session key is mandatory unless tables are public)

Description

Get the list of comments stored in smart table cell.

Parameters

Return values

Example of response:

{
	"status": "ok",
	"sstamp": 331528,
	"fieldId": 22547,
	"rowId": 212024,
	"data": {
		"status": "ok",
		"formLastModified": 1497862748,
		"users": {
			"juliend": {
				"n": "julien Noel Du Payrat",
				"s": 330694
			},
			"georgesh": {
				"n": "Georges holmes",
				"s": 330676
			}
		},
		"summary": {
			"sstamp": 330651,
			"total": 2,
			"totalUnread": 0,
			"notifSubscribe": null,
			"from": 879360
		},
		"comments": [{
			"id": 879360,
			"m": "yo man !",
			"mid": 0,
			"action": [],
			"uc": "juliend",
			"c": 1495386158,
			"s": 330650
		}, {
			"id": 879361,
			"m": "Cool",
			"mid": 0,
			"action": [],
			"uc": "georgesh",
			"c": 1495386181,
			"s": 330651
		}]
	},
	"createdVNB": "dev-3.71",
	"req": "getTableValueComments"
}

Socket: Attach user to socket

Description

Attach user (using sessionInfo) to a given user. No return info is provided

Parameters

Examples

Example of post:

{
	"type":7, (DATA_TYPE_ATTACH)
	"o_u":"OAUTH_USER",
	"u_c":"USER_CODE",
	"sesskey":"OAUTH_SESSION_KEY"
}

Socket: updateTableValue

(Session key is mandatory)

Description

Update a smart table value.

Parameters

Examples

Example of post:

{
	"type":13,	(UPDATE _ TABLE __ VALUE)
	"updatedAt":1431509017,
	"u_c":"sam",
	"o_u":"sam",
	"obo_u":"alexis",
	"b_o":"zo",
	"b_c":"test",
	"sesskey":"3Yzy-m1vL-TqN7-qpGd-M6C4-0",
	"value":"2016-07-17",
	"fieldId":32645,
	"rowId":34124
}

Socket: Send Message (NEW / UPDATE / DELETE)

(Session key is mandatory)

Description

Send new message to the server. Server should respond with a Ack Message.

Parameters

Examples

Example of post:

{
	"type":1,	(DATA_TYPE)
	"updatedAt":1431509017,
	"nbMedias":2,
	"nbDocs":0,
	"u_c":"zo",
	"del":false,
	"uuid":"1235-23UJ-IDJ6",
	"o_u":"zo",
	"sesskey":"3Yzy-m1vL-TqN7-qpGd-M6C4-0",
	"smid":32645,
	"msg":"I am happy to be here !"
}

Socket: Ack Message: Receive Send message acknowledgement

A confirmation to a Send Message. Server sends back an acknowledgement when it successfully received and stored a message.

Description

{
	"type":2,	(ACK_TYPE)
	"status":"ok",
	"uuid":"MESSAGE-UUID",
	"smid": MESSAGE_SMID,
	"sstamp": SERVER_STAMP,
	"created":UNIX_TIMESTAMP,
	"del":0
}

Parameters

Socket: Receive message

Description

Receive a message sent by another client.

Examples

Example of response:

{
	"type":1,	(DATA_TYPE)
	"u_c":"CREATOR",
	"uuid":"MESSAGE_UUID",
	"smid": MESSAGE_SMID,
	"del":true|false,
	"created":UNIX_TIMESTAMP,
	"msg":"Hello guys !"
}

Socket: Book updates ready

Description

Receive info from server that new book updates are ready.

Client should then perform a getAllBooks with its current sstamp

Examples

Example of response:

{
	"type":8,	(DATA_TYPE_BROADCAST_BOOKUPDATES)
	"u_c":"CREATOR",
}

Socket: Send Ping request

(Session key is mandatory)

Description

Send ping request to the server. Server should respond with a Ack Ping.

Parameters

Examples

Example of post:

{
	"type":9,	(DATA_TYPE_PING)
	"u_c":"CREATOR",
	"o_u":"OAUTH_USER",
	"sesskey":"OAUTH_SESSION_KEY"
}

Socket: Ack Ping: Receive Ping request acknowledgement

A confirmation to a Send Ping request. Server sends back an acknowledgement if user is connected.

Description

{
	"type":10,	(ACK_TYPE_PING)
	"status":"ok"
}

Parameters

Socket: Send System message

(Session key is mandatory)

Description

Send system message to the server. Server should respond with a Ack System, and eventually broadcast to other concerned clients that will get Receive System message.

Parameters

System message list

Examples

Example of post:

{
	"type":11,	(DATA_TYPE_SYSTEM)
	"u_c":"CREATOR",
	"o_u":"OAUTH_USER",
	"sesskey":"OAUTH_SESSION_KEY"
	"uuid":"MESSAGE-UUID",
	"msg":"clearNotRead",
	"b_c":"test",
	"b_o":"zo"
}

Socket: Ack System: Receive System message acknowledgement

A confirmation to a Send System message. Server sends back an acknowledgement if message processed

Description

{
	"type":12,	(ACK_TYPE_SYSTEM)
	"status":"ok"
}

Parameters

Socket: Receive System message

Description

Receive a system message sent by another client. See Send System message for full details.

Parameters

System message list

See Send System message for full list.

Examples

Example:

{
	"type":11,	(DATA_TYPE_SYSTEM)
	"u_c":"CREATOR",
	"msg":"clearNotRead",
	"b_c":"test",
	"b_o":"zo"
}

getTablePivotValues

(Session key is mandatory unless tables are public)

Description

Get all pivot values of a given view.

Parameters

History of changes

Description

History of changes in the API or in the server that may affect clients that use the API

Releases

2019-10-31 version 6.41

getTableValues, getNamedTableValues and getTableRows return now a maximum of 100 rows by default.

2019-06-13 version 6.28

New optional parameter offset in getTableValues to enable paging.

2019-02-01 version 5.81

New option 'createUserAccount' : contact us for more details

2018-12-30 version 5.71

API demo site: Now checks if user is logged in and if yes will use user's u_c API demo site: Now keeps in memory the last used most common parameters

2018-04-27 version 4.95

New option 'linkSeparator' for requests createOrUpdateTableRow and createOrUpdateTableRows

2018-04-17 version 4.94

New request getNamedTableValues that accepts sync codes as input

2018-03-30 version 4.86

New request createOrUpdateTableRows to handle multiple rows at once New response format 'diff_ready_rows' for getTableValues (use case: table sync with external source)

2018-02-15 version 4.61

New resumableUpload method implementing TUS protocol

2018-01-11 version 4.57

Option catId for getTableRows is now mandatory

2018-01-09 version 4.55

New getTableRows Get rows in a mobile friendly format to be used in the android app without any client post treatment.

2017-12-11 version 4.46

New option for getBookTables, 'format' to format the output Only option is for now "android" (default: empty), and formats the response to be used in the android app without any client post treatment.

New option for getBookTables, 'includeFields' to include fields definition in response.

New option for getBookTables, 'getRowIds' to include view/rows association in response Only used if 'format' = 'android' and 'includeFields' = true for now.

2017-12-05 version 4.43

New options for getTableValues, 'getAllViews' to get all table rows with all views / line associations 'getDependencies' to get an array of tableValues, continaing all linked tables and their content

2017-05-01 version 3.61

Now standard errorMsg and errorCode output in case of error in getTableValues, createOauthkey and createSesskey

2017-04-28 version 3.53

New optional parameter format in getTableValues to format the output. Options are "columns" (the default value if empty) or "rows".

New optional parameter maxRows in getTableValues to limit the number of rows returned.

New API function getTableValueSubset to return additional rows when maxRows is used in getTableValues

New API function computeTableOperation to compute various operations. For now only "count" is supported.

2017-03-09 version 3.31

API function getTableValues now supports dynamic filters in its field applyViewFilters, i.e. it is possible to apply filter rules to this API call (prior to this change only filters created and named via the user interface could be used)

2017-03-03 version 3.23 Change in user rights. New RIGHT_READWRITEDELETE and new value for RIGHT_ADMIN. See getBookInfo and getAllBooks

2017-01-17 version 3.08

New createOrUpdateTableRow Create or update a table row with the given values

2016-10-02 version 2.87

Accept getBookTables and getTableValues requests without sesskey if form is public

2016-09-07 version 2.82b

Added catId in return values of getTableValues and changed status return code to 'nok' in case of error

2016-07-17 version 2.76b

Added Socket updateTableValue

2016-04-30 version 2.59f

For u_c replace "name_at_domain_dot_ext" by "name@domain.ext"

2016-03-30 version 2.53

Added getBookTables and getTableValues

2016-03-25 version 2.49

Added book member rights in getAllBooks and getBookInfo

2016-03-17 version 2.44

Added new updatePushId to register and update push notifications to mobile devices

2016-02-12 version 2.25d

Added new System message, Receive System message and Ack System to send, receive and acknowledge receipt of System messages

2016-02-11 version 2.25c

Added new Send Ping request and Ack Ping to test socket connectivity

2016-01-25 version 2.21c

Added support and description for playing media files (audio/music, video). See Get (or open or play) images, media files or documents from URL

2016-01-22 version 2.20d

Now include email info in getBookMessages

2016-01-07 version 2.15

Updated fileUpload to upload images and docs

Now include email body (text and html version) in getBookMessages (but not in the last message from getAllBooks).

2016-01-05 2.14g

Updated Send images and doc (now support uuid for internal images and corrected bug.

2015-12-24 version 2.12

New fileUpload to upload images and docs

2015-12-18 version 2.11g

socket SendMessage now includes optional nbMedias and nbDocs parameters to inform server of the upcoming number of images or docs to upload

2015-10-28 version 1.80

New socket receive message socketBookUpdates informing clients that new book(s) info is available.

2015-10-16 version 1.72

Now getAllBooks also includes maxMsgsOffline in the book's userPrefs, indicating the maximum number of messages each book should keep in local db. When new messages arrive, that should push the end messages above that limit out of the phone's db (first in first out).

When scrolling beyond that limit (when online), messages should only be displayed, not saved in DB.

2015-10-16 version 1.71

Now getAllBooks also includes nbMsgs with total number of non deleted messages.

Now getBookMessages also includes the deleted messages since last sstamp (if sstamp is provided).

2015-10-08 version 1.69

New message formating with media and doc files in getBookMessages, getAllBooks and socketReceiveMessage.

New getBookMessages now with sstamp, smidFirst and smidLast, and without sstampFirst and sstampLast.

2015-10-08 version 1.62

New getBookMessages to get messages of a book page by page.

2015-10-02 version 1.54

New unregisterSMSGateway to unregister gateway.

New appname now in registerSMSGateway.

2015-10-01 version 1.50

New registerSMSGateway to register gateway (e.g. phone with TimeTonic sms gateway app to forward smms to TimeTonic)

New sendMsg POST function to send messages in a book via the api.

2015-09-24 version 1.47

getAllBooks now includes contacts info, and members section of books are now arrays instead of associative arrays:

2015-09-14 version 1.44

getUserInfo now includes colors:

	"colors": {
        "defaut": "#9FA8AD",
        "bleu-violet": "#a366a6",
        "gray": "#909090",
        "bleu-turquoise": "#51a5bC",
        "red": "#FF3B47",
        "green": "#7cc300",
        "orange": "#ff8400",
        "pink": "#ff0078",
        "bleu-nuit": "#5780A5",
        "noir": "#2c3f49",
        "rose-bois": "#E84D5B",
        "orange-pastel": "FFB80D",
        "vert-pastel": "#bAe24A",
        "jaune-indien": "#ffdf23",
        "lilas": "#d76db6"
    }

2015-09-11 Version 1.42

Added lastMedia to getAllBooks to support last image in book cover image requests

Added support for images

2015-08-19 Version 1.37

Now uses version number