curl -XPOST \
-H "Content-Type: application/json" \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
-d '{ "text": "text" }' \
https://<tatHostname>:<tatPort>/message/a-topic/sub-topic
You can add labels from the creation
curl -XPOST \
-H 'Content-Type: application/json' \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
-d '{ "text": "text", "dateCreation": 11123232, "labels": [{"text": "labelA", "color": "#eeeeee"}, {"text": "labelB", "color": "#ffffff"}] }' \
https://<tatHostname>:<tatPort>/message/a-topic/sub-topic
You can add replies from the creation
curl -XPOST \
-H "Content-Type: application/json" \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
-d '{ "text": "text", "replies":["reply A", "reply B"] }' \
https://<tatHostname>:<tatPort>/message/a-topic/sub-topic
You can add replies, with labels, from the creation
curl -XPOST \
-H "Content-Type: application/json" \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
-d '{ "text": "text msg root", "messages": [{ "text": "text reply", "labels": [{"text": "labelA", "color": "#eeeeee"}] }] }' \
https://<tatHostname>:<tatPort>/message/a-topic/sub-topic
If you use a system user
, you can force message’s date
curl -XPOST \
-H 'Content-Type: application/json' \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
-d '{ "text": "text", "dateCreation": 11123232 }' \
https://<tatHostname>:<tatPort>/message/a-topic/sub-topic
Return HTTP 201 if OK
curl -XPOST \
-H "Content-Type: application/json" \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
-d '[{ "text": "text message A" },{ "text": "text message B", "labels": [{"text": "labelA", "color": "#eeeeee"}] }]' \
https://<tatHostname>:<tatPort>/messages/a-topic/sub-topic
Reply, Like, Unlike, Add Label, Remove Label, etc… use idReference but it’s possible to use :
curl -XPOST \
-H 'Content-Type: application/json' \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
-d '{ "text": "text", "startTagReference": "keyTag:", "action": "reply"}'\
https://<tatHostname>:<tatPort>/message/a-topic/sub-topic
If several messages match to your request, Tat gives you a HTTP Bad Request.
curl -XPOST \
-H 'Content-Type: application/json' \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
-d '{ "text": "text", "idReference": "9797q87KJhqsfO7Usdqd", "action": "reply"}'\
https://<tatHostname>:<tatPort>/message/a-topic/sub-topic
This request will :
the root message #aaa
#aaa
already exists, this message will be used to add replies on itreply A
and reply B
curl -XPOST \
-H "Content-Type: application/json" \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
-d '{ "text": "the root message #aaa", "replies":["reply A", "reply B"], "tagReference": "aaa"}' \
https://<tatHostname>:<tatPort>/message/a-topic/sub-topic
curl -XPUT \
-H 'Content-Type: application/json' \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
-d '{ "idReference": "9797q87KJhqsfO7Usdqd", "action": "like"}'\
https://<tatHostname>:<tatPort>/message/a-topic/sub-topic
curl -XPUT \
-H 'Content-Type: application/json' \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
-d '{ "idReference": "9797q87KJhqsfO7Usdqd", "action": "unlike"}'\
https://<tatHostname>:<tatPort>/message/a-topic/sub-topic
option is the background color of the label.
curl -XPUT \
-H 'Content-Type: application/json' \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
-d '{ "idReference": "9797q87KJhqsfO7Usdqd", "action": "label", "text": "myLabel", "option": "rgba(143,199,148,0.61)"}'\
https://<tatHostname>:<tatPort>/message/a-topic/sub-topic
curl -XPUT \
-H 'Content-Type: application/json' \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
-d '{ "idReference": "9797q87KJhqsfO7Usdqd", "action": "unlabel", "text": "myLabel"}'\
https://<tatHostname>:<tatPort>/message/a-topic/sub-topic
curl -XPUT \
-H 'Content-Type: application/json' \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
-d '{ "idReference": "9797q87KJhqsfO7Usdqd", "action": "relabel", "labels": [{"text": "labelA", "color": "#eeeeee"}, {"text": "labelB", "color": "#ffffff"}]}'\
https://<tatHostname>:<tatPort>/message/a-topic/sub-topic
Return HTTP 201 if OK
curl -XPUT \
-H 'Content-Type: application/json' \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
-d '{ "idReference": "9797q87KJhqsfO7Usdqd", "action": "relabel", "labels": [{"text": "labelA", "color": "#eeeeee"}, {"text": "labelB", "color": "#ffffff"}], "options": ["labelAToRemove", "labelAToRemove"] }'\
https://<tatHostname>:<tatPort>/message/a-topic/sub-topic
curl -XPUT \
-H 'Content-Type: application/json' \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
-d '{ "tagReference": "foo", "text": "a text with #foo" "action": "relabelorcreate", "labels": [{"text": "labelA", "color": "#eeeeee"}, {"text": "labelB", "color": "#ffffff"}]}'\
https://<tatHostname>:<tatPort>/message/a-topic/sub-topic
If a message with tag foo
already exists on topic, apply new labels. If message does not exist, a new message will be created.
curl -XPUT \
-H 'Content-Type: application/json' \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
-d '{ "tagReference": "aaa", "onlyRootReference": "false", "action": "update", "text": "my New Mesage updated"}'\
https://<tatHostname>:<tatPort>/message/a-topic/sub-topic
curl -XPUT \
-H 'Content-Type: application/json' \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
-d '{ "idReference": "9797q87KJhqsfO7Usdqd", "action": "concat", "text": " additional text"}'\
https://<tatHostname>:<tatPort>/message/a-topic/sub-topic
curl -XPUT \
-H 'Content-Type: application/json' \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
-d '{ "idReference": "9797q87KJhqsfO7Usdqd", "action": "move", "option": "/newTopic/subNewTopic"}'\
https://<tatHostname>:<tatPort>/message/oldTOpic/oldSubTopic
curl -XDELETE \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
https://<tatHostname>:<tatPort>/message/nocascade/9797q87KJhqsfO7Usdqd/topic/subTopic
curl -XDELETE \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
https://<tatHostname>:<tatPort>/message/cascade/9797q87KJhqsfO7Usdqd/topic/subTopic
curl -XDELETE \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
https://<tatHostname>:<tatPort>/message/cascadeforce/9797q87KJhqsfO7Usdqd/topic/subTopic
curl -XDELETE \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
https://<tatHostname>:<tatPort>/messages/nocascade/topic/subTopic?skip=<skip>&limit=<limit>&argName=valName&arg2Name=val2Name
see https://github.com/ovh/tat#parameters for all parameters
curl -XDELETE \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
https://<tatHostname>:<tatPort>/messages/cascade/topic/subTopic?skip=<skip>&limit=<limit>&argName=valName&arg2Name=val2Name
see https://github.com/ovh/tat#parameters for all parameters
curl -XDELETE \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
https://<tatHostname>:<tatPort>/messages/cascadeforce/topic/subTopic?skip=<skip>&limit=<limit>&argName=valName&arg2Name=val2Name
see https://github.com/ovh/tat#parameters for all parameters
Add a message to topic: /Private/username/Tasks
.
curl -XPUT \
-H 'Content-Type: application/json' \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
-d '{ "idReference": "9797q87KJhqsfO7Usdqd", "action": "task" }'\
https://<tatHostname>:<tatPort>/message/Private/username/Tasks
Remove a message from the topic: /Private/username/Tasks
curl -XPUT \
-H 'Content-Type: application/json' \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
-d '{ "idReference": "9797q87KJhqsfO7Usdqd", "action": "untask" }'\
https://<tatHostname>:<tatPort>/message/Private/username/Tasks
curl -XPUT \
-H 'Content-Type: application/json' \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
-d '{ "idReference": "9797q87KJhqsfO7Usdqd", "action": "voteup" }'\
https://<tatHostname>:<tatPort>/message/a-topic/sub-topic
curl -XPUT \
-H 'Content-Type: application/json' \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
-d '{ "idReference": "9797q87KJhqsfO7Usdqd", "action": "unvoteup" }'\
https://<tatHostname>:<tatPort>/message/a-topic/sub-topic
curl -XPUT \
-H 'Content-Type: application/json' \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
-d '{ "idReference": "9797q87KJhqsfO7Usdqd", "action": "votedown" }'\
https://<tatHostname>:<tatPort>/message/a-topic/sub-topic
curl -XPUT \
-H 'Content-Type: application/json' \
-H "Tat_username: username" \
-H "Tat_password: passwordOfUser" \
-d '{ "idReference": "9797q87KJhqsfO7Usdqd", "action": "unvotedown" }'\
https://<tatHostname>:<tatPort>/message/a-topic/sub-topic
curl -XGET https://<tatHostname>:<tatPort>/messages/<topic>?skip=<skip>&limit=<limit>
curl -XGET https://<tatHostname>:<tatPort>/messages/<topic>?skip=<skip>&limit=<limit>&argName=valName&arg2Name=val2Name
Getting messages on one Public Topic (Read Only):
curl -XGET https://<tatHostname>:<tatPort>/read/<topic>?skip=<skip>&limit=<limit>
curl -XGET https://<tatHostname>:<tatPort>/read/<topic>?skip=<skip>&limit=<limit>&argName=valName&arg2Name=val2Name
allIDMessage
Search in All ID Message (idMessage, idReply, idRoot)andLabel
Search by label (and) : could be labelA,labelBandTag
Search by tag (and) : could be tagA,tagBidMessage
Search by IDMessageinReplyOfID
Search by IDMessage InReplyinReplyOfIDRoot
Search by IDMessage IdRootlabel
Search by label: could be labelA,labelBdateMaxCreation
Search by dateCreation (timestamp), select messages where dateCreation <= dateMaxCreationdateMaxUpdate
Search by dateUpdate (timestamp), select messages where dateUpdate <= dateMaxUpdatedateMinCreation
Search by dateCreation (timestamp), select messages where dateCreation >= dateMinCreationdateMinUpdate
Search by dateUpdate (timestamp), select messages where dateUpdate >= dateMinUpdatedateRefCreation
This have to be used with dateRefDeltaMinCreation and / or dateRefDeltaMaxCreation. This could be BeginningOfMinute, BeginningOfHour, BeginningOfDay, BeginningOfWeek, BeginningOfMonth, BeginningOfQuarter, BeginningOfYeardateRefDeltaMaxCreation
Add seconds to dateRefCreation flagdateRefDeltaMaxUpdate
Add seconds to dateRefUpdate flagdateRefDeltaMinCreation
Add seconds to dateRefCreation flagdateRefDeltaMinUpdate
Add seconds to dateRefUpdate flagdateRefUpdate
This have to be used with dateRefDeltaMinUpdate and / or dateRefDeltaMaxUpdate. This could be BeginningOfMinute, BeginningOfHour, BeginningOfDay, BeginningOfWeek, BeginningOfMonth, BeginningOfQuarter, BeginningOfYearlastHourMaxCreation
Search by dateCreation, select messages where dateCreation <= Now Beginning Of Hour - (60 * lastHourMaxCreation)lastHourMaxUpdate
Search by dateUpdate, select messages where dateUpdate <= Now Beginning Of Hour - (60 * lastHourMaxCreation)lastHourMinCreation
Search by dateCreation, select messages where dateCreation >= Now Beginning Of Hour - (60 * lastHourMinCreation)lastHourMinUpdate
Search by dateUpdate, select messages where dateUpdate >= Now Beginning Of Hour - (60 * lastHourMinCreation)lastMaxCreation
Search by dateCreation (duration in second), select messages where dateCreation <= now - lastMaxCreationlastMaxCreation
Search by dateCreation (duration in second), select messages where dateCreation <= now - lastMaxCreationlastMaxUpdate
Search by dateUpdate (duration in second), select messages where dateUpdate <= now - lastMaxCreationlastMinCreation
Search by dateCreation (duration in second), select messages where dateCreation >= now - lastMinCreationlastMinUpdate
Search by dateUpdate (duration in second), select messages where dateUpdate >= now - lastMinCreationlimitMaxNbReplies
In onetree mode, filter root messages with min or equals maxNbReplieslimitMaxNbVotesDown
Search by nbVotesDownlimitMaxNbVotesUP
Search by nbVotesUPlimitMinNbReplies
In onetree mode, filter root messages with more or equals minNbReplieslimitMinNbVotesDown
Search by nbVotesDownlimitMinNbVotesUP
Search by nbVotesUPnotLabel
Search by label (exclude): could be labelA,labelBnotTag
Search by tag (exclude) : could be tagA,tagBonlyCount
onlyCount=true: only count messages, without retrieve msg. limit, skip, treeview criterias are ignored.
onlyMsgRoot string onlyMsgRoot=true: restricts to root message only (inReplyOfIDRoot empty). If treeView is used, limit search criteria to root * message
are still given, independently of search criteria.startLabel
Search by a label prefix: startLabel=‘mykey:,myKey2:’startTag
Search by a tag prefix: startTag=‘mykey:,myKey2:’tag
Search by tag : could be tagA,tagBtext
Search by texttopic
Search by topictreeView
Tree View of messages: onetree or fulltree. Default: notreeusername
Search by username : could be usernameA,usernameBsortBy
Sort message. Use ‘-’ to reverse sort. Default is –sortBy=-dateCreation. You can use: text, topic, inReplyOfID, inReplyOfIDRoot, nbLikes, labels, likers, votersUP, votersDown, nbVotesUP, nbVotesDown, userMentions, urls, tags, dateCreation, dateUpdate, author, nbRepliescurl -XGET https://<tatHostname>:<tatPort>/messages/topicA?skip=0&limit=100
This will return 100 messages created between 16/7/2014, 22:55:46 and 16/8/2014, 22:55:46
curl -XGET https://<tatHostname>:<tatPort>/messages/topicA/subTopic?skip=0&limit=100&dateMinCreation=1405544146&dateMaxCreation=1408222546
curl -XGET https://<tatHostname>:<tatPort>/messages/topicA?onlyCount=true&lastHourMinCreation=8
curl -XGET https://<tatHostname>:<tatPort>/messages/topicA?onlyCount=true&lastHourMinCreation=72
curl -XGET https://<tatHostname>:<tatPort>/messages/topicA?onlyCount=true&dateRefCreation=BeginningOfMonth
curl -XGET https://<tatHostname>:<tatPort>/messages/topicA?onlyCount=true&dateRefCreation=BeginningOfWeek&dateRefDeltaMinCreation=86400&dateRefDeltaMaxCreation=172800