Description
Return a unique appkey
for a given application name
Parameters
string version
Version of API/serveur. See history of changes.
string appname
Application name.
Return values
string status
"nok" or "ok".
string errorCode
Error code status
is "nok"
string errorMsg
Error message status
is "nok"
string appkey
Application key, if status
is "ok".
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
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
string version
Version of API/serveur. See history of changes.
string login
User login. Can be his/her userid , email address or telephone number.
string pwd
User password.
string appkey
Valid application key.
Return values
string status
"nok" or "ok".
string errorCode
Error code status
is "nok"
string errorMsg
Error message status
is "nok"
string oauthkey
User authorization key, if status
is "ok" .
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"}
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
string version
Version of API/serveur. See history of changes.
string o_u
Oauth userid, must match Session key.
string u_c
Userid (for now must be same as o_u
).
string oauthkey
Key for a give authorized (logged in) user.
Return values
string status
"nok" or "ok".
string errorCode
Error code status
is "nok"
string errorMsg
Error message status
is "nok"
string sesskey
Session key if status
is "ok".
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
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
string version
Version of API/serveur. See history of changes.
string o_u
Telephone number of sms gateway.
string appname
Application name.
(optional) string b_o
Book owner. If provided, all messages sent with that gateway will go to that b_c.b_o
book. Otherwise will use sendMsg parameters.
Note that you can leave b_o
empty and still set b_c
for example.
(optional) string b_c
Book code. If provided, all messages sent with that gateway will go to that b_c.b_o
book. Otherwise will use sendMsg parameters.
Note that you can leave b_c
empty and still set b_o
for example.
Return values
string status
"nok" or "ok".
string errorCode
Error code status
is "nok"
string errorMsg
Error message status
is "nok"
string sesskey
Session key, if status
is "ok".
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"
}
Description
Unregister sms gateway. See registerSMSGateway for more details.
Parameters
string version
Version of API/serveur. See history of changes.
string o_u
Telephone number of sms gateway.
string sesskey
Session key from Register SMS Gateway.
Return values
string status
"nok" or "ok".
string errorCode
Error code status
is "nok"
string errorMsg
Error message status
is "nok"
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"
}
(Session key is mandatory)
Description
Drop all open sessions (and oauthkeys) except the session provided in the request
Parameters
string version
Version of API/serveur. See history of changes.
string o_u
Oauth userid, must match Session key.
string u_c
Userid of person from which we are requesting to delete sessions and oauthkeys (for now must be same as o_u
).
string sesskey
Session key NOT to remove.
Return values
string status
"nok" or "ok".
string errorCode
Error code status
is "nok"
string errorMsg
Error message status
is "nok"
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"
}
(Session key is mandatory)
Description
Register or update push notification ID
Parameters
string version
Version of API/serveur. See history of changes.
string o_u
Oauth userid, must match Session key.
string u_c
Userid of person from which we are requesting to delete sessions and oauthkeys (for now must be same as o_u
).
string sesskey
Session key.
string deviceID
Device ID to update. Empty during registration (i.e. the first time it will be returned by this function).
string deviceType
Device type. Must be one of gcm_rid
, gcm_nk
, ios_dt
, ios_dt_v2
, bb_dt
or win_uri
ios_dt_v2
for TimeTonic iOS native mobile app v2string active
Active set. Default to 'TRUE'. Set to 'FALSE' to desactivate the push notifications.
string registrationID
Registration ID received by the notification provider (e.g. Apple or Google) when registering the device.
string projectID
Project ID received during getUserInfo.
Return values
string status
"nok" or "ok".
string errorCode
Error code status
is "nok"
string errorMsg
Error message status
is "nok"
string deviceID
device id number: must be given next time if push is to be updated
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"
}
(Session key is mandatory)
Description
Get user info, preferences and rights and some system preferences (colors)
Parameters
string version
Version of API/serveur. See history of changes.
string o_u
Oauth userid, must match Session key.
string u_c
Userid of person from which we are requesting user info (for now must be same as o_u
).
string sesskey
Session key.
(optional) bigint sstamp
Server stamp. If provided, api will return userInfo only if system sstamp is > stamp.
Return values
string status
"nok" or "ok".
string errorCode
Error code status
is "nok"
string errorMsg
Error message status
is "nok"
bigint sstamp
Current server stamp.
json array userInfo
User info, if status
is "ok". See below. Most parameters are self explanatory. Others are defined here:
projectID
: projectID to get notificationsExamples
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
(Session key is mandatory)
Description
Get book messages, page by page, as well as book message updates (whose sstamp
has been modified)
Parameters
string version
Version of API/serveur. See history of changes.
string o_u
Oauth userid, must match Session key.
string u_c
Userid (for now must be same as o_u
). Must have access rights to that book.
string sesskey
Session key.
string b_c
Book code.
string b_o
Book owner.
(optional) bigint sstamp
Current version of the server stamp currently in possession of the client.
Note that if set, all messages between smidFirst
and smidLast
that have a sstamp
greater than the client's sstamp
will be also be sent back (without paging!).
(optional) bigint smidFirst
First message id. If set, server will only return messages where smid > smidLast
If both smidFirst
and smidLast
are set, server will return messages where smid > sstampFirst OR smid < sstampLast
.
(optional) bigint smidLast
Last message id. If set, server will only return messages where smid < smidLast
If both smidFirst
and smidLast
are set, server will return messages where smid < smidLast OR smid > smidFirst
.
(optional) int nbMax
Max number of messages to return. If empty, server will decide (currently only 50 messages will be returned a time).
(optional) int page
Page number. If empty, server will return first nbMax
messages. If set, will return messages (page - 1) * nbMax
to (page - 1) * nbMax + nbMax
.
(optional) string search_string
Text to search for in messages.
Return values
string status
"nok" or "ok".
string errorCode
Error code status
is "nok"
string errorMsg
Error message status
is "nok"
bigint sstamp
Current server stamp.
json array messages
Book messages, if status
is "ok". See below.
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"
}
(Session key is mandatory)
Description
Get all book info for a given user
Parameters
string version
Version of API/serveur. See history of changes.
string o_u
Oauth userid, must match Session key.
string u_c
Userid of person from which we are requesting book info (for now must be same as o_u
).
string sesskey
Session key.
(optional) bigint sstamp
Server stamp. If provided, api will return books with server stamp > sstamp
.
(optional) string b_c
Book code. Default emtpy. If provided, will return info only for that book.
(optional) string b_o
Book owner. Default emtpy. If provided, will return info only for that book.
Return values
string status
"nok" or "ok".
string errorCode
Error code status
is "nok"
string errorMsg
Error message status
is "nok"
bigint sstamp
Current server stamp.
json array allBooks
Info of all books to which user is the owner or has been invited, see below.
About member rights:
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
(Session key is mandatory)
Description
Get info of a given book
Parameters
string version
Version of API/serveur. See history of changes.
string o_u
Oauth userid, must match Session key.
string u_c
Userid of person from which we are requesting book info (for now must be same as o_u
).
string sesskey
Session key.
string b_c
Book code.
string b_o
Book owner.
Return values
string status
"nok" or "ok".
string errorCode
Error code status
is "nok"
string errorMsg
Error message status
is "nok"
bigint sstamp
Current server stamp.
json array book
Info on request book, see below.
About member rights:
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
(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:
norm
For normal image (compressed to width/height of 1500 pixels).
tb
For thumbnail image (compressed to width/height of 150 pixels). For documents, this will be the image representing the extension type.
cover
For reduced image typically used for book cover (compressed to width/height of 400 pixels).
full
For original image (uncompressed).
Parameters
string version
Version of API/serveur. See history of changes.
string o_u
Oauth userid, must match Session key.
string u_c
Userid, must be same as o_u.
string b_c
Book code.
string b_o
Book owner.
string smid
Server message id.
string sesskey
Session key.
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
)
norm
, full
etc have currently no effect)/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
/dbi/ii
/(norm
| tb
| cover
| full
)/(b_o
)/(b_c
)/(imageId
)/(optional: real image name
)
norm
, full
etc have currently no effect)/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
)
norm
, full
etc have currently no effect)/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
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
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
(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
string version
Version of API/serveur. See history of changes.
string o_u
Oauth userid. Must match Session key.
string u_c
Userid of person from which we are requesting user info (for now must be same as o_u
).
string b_o
Book owner.
string b_c
Book code.
string smid
Message id to which a file will be attached.
string rowId
Row id of the cell to which the file will be attached
string fieldId
Field id of the cell to which the file will be attached
string uuid
Unique file id.
string sesskey
Session key.
Return values
string smid
Server message id to which a file has been attached.
string rowId
Row id of the cell to which the file will be attached
string fieldId
Field id of the cell to which the file will be attached
string uuid
Unique file id. Can be used later to Get images and doc via URL.
string id
Server file id. Can be used later to Get images and doc via URL.
string type
File type, e.g. media
or doc
.
string mdc
Image or document count. See Get images and doc via message id and attached image (or document) number.
string ext
File extension, e.g. png
or jpg
.
string originName
Original file name.
string internName
Internal name. Can be used later to Get images and doc via URL.
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
(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 **
HEAD request is sent to create/get an upload endpoint. If not already existing, this creates and returns a fileId that will be used to get upload meta once done. This also returns the current uploaded offset to resume where it stopped
PATCH requests uploading chunks of our file. A chunk size can be defined using the tus client (js/iOS/android). Once a patch requests ends up with an offset equal to our file size, the success callback is triggered and we can query the server to get our uploaded file meta data.
Parameters
string version
Version of API/serveur. See history of changes.
string o_u
Oauth userid. Must match Session key.
string u_c
Userid of person from which we are requesting user info (for now must be same as o_u
).
string b_o
Book owner.
string b_c
Book code.
string uuid
Unique file id.
string uuid
Unique file id.
string sesskey
Session key.
string rowId
Row id.
string fieldId
Field id.
Return values - returned by a GET to {UPLOAD_HOST}/upload_meta/{fileId}
string filesize
The total uploaded file size in bytes.
string filetype
Mime-Type of the uploaded file (i.e:"image/png")
string filelastmodified
LastModified meta of the file
string version
Current version of the API
string o_u
User code that uploaded the file
string u_c
User code that uploaded the file
string b_o
Book owner of the book where the file was uploaded
string b_c
Book code of the book where the file was uploaded
string uuid
Uuid of the uploaded file. This is assigned client side and is used by the client to flag a successful upload
string sesskey
Session key.
string status
"nok" or "ok".
bigint sstamp
Current server stamp.
bigint fieldId
Field id of the field where the file was uploaded.
bigint rowId
Row id of the row where the file was uploaded.
boolean success
boolean indicating if the upload was successful
string type
type of the uploaded file ("media" or "doc")
string id
final id of the uploaded file
string ext
extension of the uploaded file
string mdc
Image or document count. See Get images and doc via message id and attached image (or document) number.
string originName
Actual name of the uploaded file
string internName
Internal server name of the uploaded of the uploaded file once it has been encrypted
(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
string version
Version of API/serveur. See history of changes.
string o_u
Oauth userid (or telephone number of SMS Gateway). Must match Session key.
string u_c
Userid (or email or telephone number) of person sending message.
(optional) int msg_id
Id of message, used for message edition.
(optional) string b_o
Book owner. If not provided, will use u_c or analyse message, see user doc.
(optional) string b_c
Book code. If not provided, will use first word of message.
string msg
Message.
(optional) string body
Body (for emails for example).
(optional) int nbMedias
Number of Medias (images, videos, ...) that will be attached to the message via following request to fileUpload with the returned createMessageId value.
(optional) int nbDocs
Number of Documents (Excel, Word, PDF, ...) that will be attached to the message via following requestto fileUpload with the returned createMessageId value.
(optional) json event
Json object describing an event, as :
{ "eventStart":1652601600, "eventEnd":1652608800, "eventTimezone":"Europe/Paris", "eventAllDay":true, "isBusy":true, "eventParticipants":[ { "id":"participant1" }, { "id":"participant2" } ], "reminderData":{ "email":true, "sms":true, "alarmMobile":true, "time":900, "remindermember":0 } }
eventStart
and eventEnd
: UTC timestamp of the event.eventTimezone
: Timezone of the event see list here.eventAllDay
: if true the event is on the complete days between eventStart
and eventEnd
included.isBusy
: if true show user as busy on the global calendar.eventParticipants
: List of users taking part on the event (must be an array of object with the timetonic ids).reminderData
: Information on reminders to be sent (email, sms, alarm (web only), alarmMobile(mobile only)).
email
send the reminder by email if truesms
send the reminder by sms if truealarmMobile
show the reminder in the mobile application if truetime
is the number of seconds before the eventStart at which the alarm should be sent.remindermember
when set to 1 all participants will get the reminder, set to 0 only the event creator.string sesskey
Session key.
(optional) string uuid
Custom uuid for the message to be used
Return values
string status
"nok" or "ok".
string errorCode
Error code status
is "nok"
string errorMsg
Error message status
is "nok"
bigint sstamp
Current server stamp.
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
(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
string version
Version of API/serveur. See history of changes.
string o_u
Oauth userid (or telephone number of SMS Gateway). Must match Session key.
string u_c
Userid (or email or telephone number) of person sending message.
int msg_id
Id of message.
string b_o
Book owner.
string b_c
Book code.
string msg
Message.
string sesskey
Session key.
Return values
string status
"nok" or "ok".
string errorCode
Error code status
is "nok"
string errorMsg
Error message status
is "nok"
bigint sstamp
Current server stamp.
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
(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
string version
Version of API/serveur. See history of changes.
string o_u
Oauth userid
string u_c
Userid.
string sesskey
Session key.
string b_o
Book owner.
string b_c
Book code.
boolean externViews
If true, include extern view shortcuts (default is false)
string format
Possible value: "android" to return data in the format used by android app
boolean includeFields
If true, response will include fields definitions
boolean includeEnums
If true (default), response will include fields enumColors definitions
boolean getRowIds
Only used for "format"="android" and "includeFields"=true. If true, response will include view/rows associations
Return values
string status
"nok" or "ok".
string errorCode
Error code status
is "nok"
string errorMsg
Error message status
is "nok"
json array bookTables
Info on all smart tables contained in the book, except the content itself
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"
}
(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
string version
Version of API/serveur. See history of changes.
string o_u
Oauth userid
string u_c
Userid.
string sesskey
Session key.
int catId
Category (table) id.
(optional) string rowIds
A stringified array of specific rowIds to get
(optional) int pageSize
Number of rows to return, default value: 100.
Be aware that the server can reply with an error 500 when trying to retrieve very large dataset.
(optional) int page
Page number, default value: 1.
(optional) boolean getTableInfo
Flag to get table data.
returns a "table" object for the specific table asked here,
determined by catId or by the last rowId in rowIds. The object
is formatted as returned by getBookTables with
{format:android, includeFields:true, getRowIds:true}
(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
string version
Version of API/serveur. See history of changes.
string o_u
Oauth userid
string u_c
Userid.
string sesskey
Session key.
int catId
Category (table) id.
(optional) string filterRowIds
List of Filtered rows ids to extract only or to exclude. Normally a json object, e.g.
{"row_ids":[567,654],"exclude":true}
But it can also be a comma separated list of ids (use ! in front to exclude), e.g. 123, 432
or ! 567, 654
.
It is also possible to filter/order row ids using saved view filters by using a parameter applyViewFilters
e.g.
{"applyViewFilters":1256}
where "1256" is the viewId
.
Note that applyViewFilters
may also be combined with row_ids
and exclude=true
parameters to obtain
the filtered row ids except those in row_ids
.
However, setting exclude=false
will result in applyViewFilters
being ignored.
The row_ids
parameter will take precedence on the applyViewFilters
parameter in that case.
Other possible values of applyViewFilters
are:
boolean value true
to apply the filters of the last selected view for current user.
dynamically generated views (containing filters). The format is identical to the one returned by getTableValues.
See example below for further details.
(optional) string tabId
tab id. If provided, will be saved to indicate that this was the last seen tab
(optional) int offset
offset. The rows of response will start at offset and include up to maxRows.
(optional) int maxRows
maxRows. Default value: 100. Limit the number of rows returned in response.
Be aware that the server can reply with an error 500 when trying to retrieve very large dataset.
@see getTableValueSubset to see how to retrieve missing rows.
(optional) string format
The output format. The options are "columns" (the default if left empty), "rows" or "diff_ready_rows".
When the option is set to "columns", the output format looks like this:
{fields: [{id,name,...values: [{id: rowId,value: value[,text: textValue]},...]},...],...}
where values
contains the complete list of row values corresponding to that column (field)
When the option is set to "rows", the output format looks like this:
{
fields: [{id,name,...},...],
rows: [
{
id: row_id1,
fields: {"fieldName1": {value: value[,text: textValue]},"fieldName2": {value: value[,text: textValue]}, ... }
},
...
]
}
where fields
do not include the values anymore, only the column details,
and rows
is an associative array containing id (the row id) and fields (all values with field names as keys and field values as values).
When the option is set to "diff_ready_rows", the output format looks like this:
{
rows: {
"123098": {
"27839873": "value for fieldId 27839873 and rowId: 123098",
"27839874": "value for fieldId 27839874 and rowId: 123098",
...
},
"123099": {
"27839873": "value for fieldId 27839873 and rowId: 123099",
"27839874": "value for fieldId 27839874 and rowId: 123099",
...
}
}
}
(optional) int maxComments
maxComments (1-10). If provided, load the [maxComments] last comments. Otherwise only load comment summary as usual. Note that comments are ordered from oldest to newest.
When this option is set, the field will contain another property "users" containing details about the users who posted:
"users": {
"juliend": {
"n": "julien Noel Du Payrat",
"s": 330694
},
"georgesh": {
"n": "Georges holmes",
"s": 330676
}
}
And the value will contain something like this:
{
"summary": {
"sstamp": 331600,
"total": 52,
"totalUnread": 49,
"notifSubscribe": null,
"from": 884761
},
"comments": [{
"id": 884761,
"m": "Hello, georges",
"mid": 0,
"action": [
],
"uc": "juliend",
"c": 1498733916,
"s": 331599,
"ur": true
}, {
"id": 884762,
"m": "Hello, julien",
"mid": 0,
"action": [
],
"uc": "georgesh",
"c": 1498733917,
"s": 331600,
"ur": true
}]
}
(optional) boolean getAllViews
If provided, all rows will be returned (applying filterRowIds if present), but no global "rowInfos" will be provided. Instead each view definition will contain an array of the ordered row ids they contain.
(optional) boolean getDependencies
If provided, an array of all linked table ids will be returned.
Return values
string status
"nok" or "ok".
string errorCode
Error code status
is "nok"
string errorMsg
Error message status
is "nok"
json array values
All table 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:
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.
(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
string version
Version of API/serveur. See history of changes.
string o_u
Oauth userid
string u_c
Userid.
string sesskey
Session key.
string b_c
Book code.
string b_o
Book owner.
string catCode
Category (table) sync code.
(optional) string fieldCodes
Comma separated list of field sync codes. If set, the response will only contain those fields.
(optional) string filterRowIds
List of Filtered rows ids to extract only or to exclude.
(optional) string tabId
tab id. If provided, will be saved to indicate that this was the last seen tab
(optional) int offset
offset. The rows of response will start at offset and include up to maxRows.
(optional) int maxRows
maxRows. Default value: 100. Limit the number of rows returned in response.
Be aware that the server can reply with an error 500 when trying to retrieve very large dataset.
@see getTableValueSubset to see how to retrieve missing rows.
(optional) string format
The output format. The options are "columns" (the default if left empty), "rows" or "diff_ready_rows".
(optional) int maxComments
maxComments (1-10). If provided, load the [maxComments] last comments. Otherwise only load comment summary as usual. Note that comments are ordered from oldest to newest.
(optional) boolean getAllViews
If provided, all rows will be returned (applying filterRowIds if present), but no global "rowInfos" will be provided. Instead each view definition will contain an array of the ordered row ids they contain.
(optional) boolean getDependencies
If provided, an array of all linked table ids will be returned.
Return values
string status
"nok" or "ok".
string errorCode
Error code status
is "nok"
string errorMsg
Error message status
is "nok"
json array values
All table 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:
(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
string version
Version of API/serveur. See history of changes.
string o_u
Oauth userid
string u_c
Userid.
string sesskey
Session key.
int catId
Category (table) id.
string fieldIds
Comma separated list of field ids. Ex: 123,345,...
string rowIds
Comma separated list of row ids. Ex: 123,345,...
Return values
string status
"nok" or "ok".
string errorCode
Error code status
is "nok"
string errorMsg
Error message status
is "nok"
Json array tableValues
Array of rows with table values. Example of output:
[
// row 1
[fieldValue1,fieldValue2,...],
// row 2
[fieldValue1,fieldValue2,...],
...
]
Each row's field values follow the same order as the one used in parameter fieldIds
.
Similarly, the order of rows follows the same order used in parameter rowIds
.
(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
string version
Version of API/serveur. See history of changes.
string o_u
Oauth userid
string u_c
Userid.
string sesskey
Session key.
int catId
Category (table) id.
string operation
Operation type. For the time being, only "count" is supported.
(optional) string filterRowIds
See getTableValues#filterRowIds for details.
Return values
string status
"nok" or "ok".
string errorCode
Error code if status
is "nok"
string errorMsg
Error message if status
is "nok"
json array result
Result of operation (depends on the operation type)
(Session key is mandatory unless tables are public)
Description
Update a given table value
Parameters
string version
Version of API/serveur. See history of changes.
string o_u
Oauth userid
string u_c
Userid.
string sesskey
Session key.
string value
The new value : can be a string or a json object
string rowId
The row id for the updating value. If the rowId begins with 'tmp' (i.e: rowId = "tmp123"), a new row will be created in the table that contains fieldId
string fieldId
The column id for the updating value
Return values
string status
"nok" or "ok".
string errorCode
Error code status
is "nok"
string errorMsg
Error message status
is "nok"
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"
(Session key is mandatory unless tables are public)
Description
Create or update a table row with the given values
Parameters
string version
Version of API/serveur. See history of changes.
string o_u
Oauth userid
string u_c
Userid.
string sesskey
Session key.
string rowId
The id of the row to update or a uniquely identifying id starting with "tmp" for a new row.
(optional if passing catId) json object fieldValues
A json object representing each field id with the associated value, this argument is optional if using a catId value to create a row without setting up values
Example of fieldValues:
{
"fieldId123": "fieldValue123",
"fieldId456": "fieldValue456",
"fieldId789": "fieldValue789"
}
(optional if passing a fieldValues) string catId
The id of the category in which the new row must be created, this argument is optional if a fieldValues is passed
linkSeparator
Default to ','. The text separator used to separate link values.Return values
string status
"nok" or "ok".
string errorCode
Error code status
is "nok"
string errorMsg
Error message status
is "nok"
json array newRows
A json array describing the new rows. If a newRow is found with a tmpId, it should be used to mark as synced the tmp row that was created on the client
json array rows
A json array containing all changes that need to be applied to the corresponding rows (formulaes, links...)
Example of response:
{
"status": "ok",
"newRows": [{
"id": 10,
"tmpId": "tmpNEW_ROW",
"info": {
"order": 5
}
}],
"createdVNB": "dev-3.05b",
"req": "createOrUpdateTableRow"
}
(Session key is mandatory unless tables are public)
Description
Create or update multiple table row with the given values
Parameters
string version
Version of API/serveur. See history of changes.
string o_u
Oauth userid
string u_c
Userid.
string sesskey
Session key.
json object rows
A json object representing each row id with the associated fieldValues
fieldValues is a json object representing each field id with the associated value
row ids starting with 'tmp' will create a new row with the corresponding field values
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"
}
}
linkSeparator
Default to ','. The text separator used to separate link values.Return values
string status
"nok" or "ok".
string errorCode
Error code status
is "nok"
string errorMsg
Error message status
is "nok"
int modified
The number of rows that were modified
int created
The number of rows that were created
Example of response:
{
"status": "ok",
"createdVNB": "dev-3.05b",
"req": "createOrUpdateTableRows",
"modified": 1,
"created": 1
}
(Session key is mandatory unless tables are public)
Description
Update a table row with the given values
Parameters
string version
Version of API/serveur. See history of changes.
string o_u
Oauth userid
string u_c
Userid.
string sesskey
Session key.
string rowId
An existing row's rowId string
Return values
string status
"nok" or "ok".
string errorCode
Error code status
is "nok"
string errorMsg
Error message status
is "nok"
json array deletedRow
A json object describing the deleted row. deletedRow.id should be used to mark the temporary deleted row on the client (with id=deletedRow.tmpId) as synced.
Example of response:
{
"status": "ok",
"formLastModified": 1482417443,
"deletedRow": {
"id": "10"
},
"createdVNB": "dev-3.05b",
"req": "deleteTableRow"
}
(Session key is mandatory unless tables are public)
Description
Get the list of comments stored in smart table cell.
Parameters
string version
Version of API/serveur. See history of changes.
string o_u
Oauth userid
string u_c
Userid.
string sesskey
Session key.
string fieldId
An existing field's fieldId string
string rowId
An existing row's rowId string
Return values
string status
"nok" or "ok".
string errorCode
Error code status
is "nok"
string errorMsg
Error message status
is "nok"
json array data
A json object containing the comments, a comment summary, and a list of informations about posters.
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"
}
Description
Attach user (using sessionInfo) to a given user. No return info is provided
Parameters
string version
Version of API/serveur. See history of changes.
int type
Const value for diff request messages (4).
string o_u
Oauth userid, must match Session key.
string u_c
Userid, must be same as o_u.
string sesskey
Session key.
Examples
Example of post:
{
"type":7, (DATA_TYPE_ATTACH)
"o_u":"OAUTH_USER",
"u_c":"USER_CODE",
"sesskey":"OAUTH_SESSION_KEY"
}
(Session key is mandatory)
Description
Update a smart table value.
Parameters
string version
Version of API/serveur. See history of changes.
int type
Constant value for UPDATE _ TABLE __ VALUE (13).
int updatedAt
Value timestamp.
string o_u
Oauth userid, must match Session key.
Typically same as u_c
except if o_u
is authorized user to write on behalf of another user (e.g. chatbot)
string u_c
User creator of message.
Typically same as o_u
except if o_u
is authorized user to write on behalf of another user (e.g. chatbot)
string sesskey
Session key
string b_o
Book owner.
string b_c
Book code.
string value
Content of value.
string rowUuid
(not used yet) row UUID. UUID is generated from the client if it's a new row (record)
big int rowId
row (record) Id from server
string fieldUuid
(not used yet) field UUID. UUID is generated from the client if it's a new field (column).
big int fieldId
field (column) Id from server
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
}
(Session key is mandatory)
Description
Send new message to the server. Server should respond with a Ack Message.
Parameters
string version
Version of API/serveur. See history of changes.
int type
Const value for data messages (1).
int updatedAt
Message timestamp.
(optional) int nbMedias
Number of images that will be uploaded using Upload images and doc (fileUpload) (once the message ack has been received).
(optional) int nbDocs
Number of document attachements that will be uploaded Send images and doc (once the message ack has been received).
string u_c
User creator of message.
boolean del
True if it's a deletion, false otherwise.
string uuid
Message UUID. UUID is generated from the client if it's a new message.
string o_u
Oauth userid, must match Session key.
string sesskey
Session key
big int smid
Message id coming from server. Should be 0 if it's a new message.
string msg
Message content.
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 !"
}
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
int type
Const value for acknowledgement message (2).
string status
Should be "ok" if success.
string uuid
Message UUID. Should be used to identify the message.
big int smid
Message id coming from server. Must be > 0.
big int sstamp
Last server stamp. This stamp should be stored in the client for later diff request.
int created
Unix timestamp of when the message was created on the server (CET timezone).
boolean del
True if it's a deletion, false otherwise. If true then the local message has to be deleted else it's a creation or an update.
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 !"
}
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",
}
(Session key is mandatory)
Description
Send ping request to the server. Server should respond with a Ack Ping.
Parameters
string version
Version of API/serveur. See history of changes.
int type
Const value for ping (9).
string u_c
User creator of ping.
string o_u
Oauth userid, must match Session key.
string sesskey
Session key.
Examples
Example of post:
{
"type":9, (DATA_TYPE_PING)
"u_c":"CREATOR",
"o_u":"OAUTH_USER",
"sesskey":"OAUTH_SESSION_KEY"
}
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
int type
Const value for acknowledgement ping (10).
string status
Should be "ok" if success.
(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
string version
Version of API/serveur. See history of changes.
int type
Const value for system message (11).
string u_c
User creator of ping.
string o_u
Oauth userid, must match Session key.
string sesskey
Session key.
string uuid
System message UUID. UUID is generated from the client.
string msg
System Message. See below for possible values.
(not always required, depends on type of System message) string b_c
Book code.
(not always required, depends on type of System message) stringb_o
Book owner.
(not always required, depends on type of System message) string param
Parameter that has been modified.
(not always required, depends on type of System message) string value
New value of modified paramter.
System message list
acceptInvitation
User received an invitation for a given book, and accepted it. Must include additional parameters b_o
and b_c
.
clearNotRead
Clear the notification of unread messages for a given book. Must include additional parameters b_o
and b_c
.
This must be sent on a) clicking on the notification circle, b) exiting from a book, c) sending a new message from within a book.
logOpenBook
Log info that a book was opened by the user. Must include additional parameters b_o
and b_c
.
This must be sent everytime the user opens a book.
updateBookParam
User updated a book parameter. Must include additional parameters b_o
, b_c
, param
and value
.
updateUserInfo
User updated a user info parameter. Must include additional parameters param
and value
.
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"
}
A confirmation to a Send System message. Server sends back an acknowledgement if message processed
Description
{
"type":12, (ACK_TYPE_SYSTEM)
"status":"ok"
}
Parameters
int type
Const value for acknowledgement of system message (12).
string status
Should be "ok" if success.
Description
Receive a system message sent by another client. See Send System message for full details.
Parameters
int type
Const value for system message (11).
string u_c
User creator of ping.
string msg
System Message. See Send System message for possible values.
(not always present, depends on type of System message) string b_c
Book code.
(not always present, depends on type of System message) stringb_o
Book owner.
(not always present, depends on type of System message) string param
Parameter that has been modified.
(not always present, depends on type of System message) string value
New value of modified paramter.
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"
}
(Session key is mandatory unless tables are public)
Description
Get all pivot values of a given view.
Parameters
string version
Version of API/serveur. See history of changes.
string o_u
Oauth userid
string u_c
Userid.
string sesskey
Session key.
int catID
Category (table) id.
int viewId
View id.
string filterRowIds
Must provide the filterRowIds[applyViewFilters] with the same viewId as above for compatibility with non view Pivot tables
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