It’s a generated password by Tat, allowing username to communicate with Tat. User creates an account, a mail is send to verify account and user has to go on a Tat URL to validate account and get password. Password is encrypted in Tat Database (sha512 Sum).
First user created is an administrator.
Return a mail to user, with instruction to validate his account.
curl -XPOST \
-H "Content-Type: application/json" \
-d '{"username": "userA", "fullname": "User AA", "email": "usera@foo.net", "callback": " Click on scheme://:host::port/user/verify/:username/:token to validate your account"}' \
https://<tatHostname>:<tatPort>/user
Callback is a string sent by mail, indicating to the user how to validate his account. Available fields (automatically filled by Tat ):
:scheme -> http of https
:host -> ip or hostname of Tat Engine
:port -> port of Tat Engine
:username -> username
:token -> tokenVerify of user
curl -XGET \
https://<tatHostname>:<tatPort>/user/verify/yourUsername/tokenVerifyReceivedByMail
This url can be called only once per password and expired 30 minutes after querying create user with POST on /user
Returns: tokenVerify by email
curl -XPOST \
-H "Content-Type: application/json" \
-d '{"username": "userA", "email": "usera@foo.net"}' \
https://<tatHostname>:<tatPort>/user/reset
curl -XGET \
-H "Content-Type: application/json" \
-H "Tat_username: userA" \
-H "Tat_password: password" \
https://<tatHostname>:<tatPort>/user/me
Retrieves contacts presences since n seconds
Example since 15 seconds :
curl -XPOST \
-H "Content-Type: application/json" \
-H "Tat_username: userA" \
-H "Tat_password: password" \
https://<tatHostname>:<tatPort>/user/me/contacts/15
curl -XPOST \
-H "Content-Type: application/json" \
-H "Tat_username: userA" \
-H "Tat_password: password" \
https://<tatHostname>:<tatPort>/user/me/contact/username
curl -XDELETE \
-H "Content-Type: application/json" \
-H "Tat_username: userA" \
-H "Tat_password: password" \
https://<tatHostname>:<tatPort>/user/me/contacts/username
curl -XPOST \
-H "Content-Type: application/json" \
-H "Tat_username: userA \
-H "Tat_password: password" \
https://<tatHostname>:<tatPort>/user/me/topics/myTopic/sub-topic
curl -XDELETE \
-H "Content-Type: application/json" \
-H "Tat_username: userA" \
-H "Tat_password: password" \
https://<tatHostname>:<tatPort>/user/me/topics/myTopic/sub-topic
curl -XPOST \
-H "Content-Type: application/json" \
-H "Tat_username: userA \
-H "Tat_password: password" \
https://<tatHostname>:<tatPort>/user/me/enable/notifications/topics/myTopic/sub-topic
curl -XPOST \
-H "Content-Type: application/json" \
-H "Tat_username: userA" \
-H "Tat_password: password" \
https://<tatHostname>:<tatPort>/user/me/disable/notifications/topics/myTopic/sub-topic
curl -XPOST \
-H "Content-Type: application/json" \
-H "Tat_username: userA" \
-H "Tat_password: password" \
https://<tatHostname>:<tatPort>/user/me/enable/notifications/alltopics
curl -XPOST \
-H "Content-Type: application/json" \
-H "Tat_username: userA" \
-H "Tat_password: password" \
https://<tatHostname>:<tatPort>/user/me/disable/notifications/alltopics
curl -XPOST \
-H "Content-Type: application/json" \
-H "Tat_username: userA" \
-H "Tat_password: password" \
https://<tatHostname>:<tatPort>/user/me/tags/myTag
curl -XDELETE \
-H "Content-Type: application/json" \
-H "Tat_username: userA" \
-H "Tat_password: password" \
https://<tatHostname>:<tatPort>/user/me/tags/myTag
curl -XGET https://<tatHostname>:<tatPort>/users?skip=<skip>&limit=<limit> | python -m json.tool
curl -XGET https://<tatHostname>:<tatPort>/users?skip=<skip>&limit=<limit>&argName=valName&arg2Name=val2Name | python -m json.tool
Users list with groups (admin only)
curl -XGET https://<tatHostname>:<tatPort>/users?skip=<skip>&limit=<limit>&withGroups=true
curl -XGET https://<tatHostname>:<tatPort>/users?skip=0&limit=100 | python -m json.tool
Only for Tat Admin: convert a normal user
to a system user
.
A system user must have a username starting with tat.system
.
Remove email and set user attribute IsSystem to true.
This action returns a new password for this user.
Warning: it is an irreversible action.
Flag canListUsersAsAdmin
allows this system user
to view all user’s fields (email, etc…)
curl -XPUT \
-H "Content-Type: application/json" \
-H "Tat_username: userAdmin" \
-H "Tat_password: passwordAdmin" \
-d '{ "username": "usernameToConvert", "canListUsersAsAdmin": "true" }' \
https://<tatHostname>:<tatPort>/user/convert
Only for Tat Admin.
curl -XPUT \
-H "Content-Type: application/json" \
-H "Tat_username: userAdmin" \
-H "Tat_password: passwordAdmin" \
-d '{ "username": "userSystem", "canListUsersAsAdmin": "true" }' \
https://<tatHostname>:<tatPort>/user/updatesystem
Only for Tat Admin.
A system user
must have a username starting with tat.system
.
This action returns a new password for this user.
curl -XPUT \
-H "Content-Type: application/json" \
-H "Tat_username: userAdmin" \
-H "Tat_password: passwordAdmin" \
-d '{ "username": "userameSystemToReset" }' \
https://<tatHostname>:<tatPort>/user/resetsystem
Only for Tat Admin: convert a normal user
to an admin user
.
curl -XPUT \
-H "Content-Type: application/json" \
-H "Tat_username: userAdmin" \
-H "Tat_password: passwordAdmin" \
-d '{ "username": "usernameToGrant" }' \
https://<tatHostname>:<tatPort>/user/setadmin
Only for Tat Admin: rename the username of a user. This action updates all Private topics of the user.
curl -XPUT \
-H "Content-Type: application/json" \
-H "Tat_username: userAdmin" \
-H "Tat_password: passwordAdmin" \
-d '{ "username": "usernameToRename", "newUsername": "NewUsername" }' \
https://<tatHostname>:<tatPort>/user/rename
Only for Tat Admin: update fullname and email of a user.
curl -XPUT \
-H "Content-Type: application/json" \
-H "Tat_username: userAdmin" \
-H "Tat_password: passwordAdmin" \
-d '{ "username": "usernameToRename", "newFullname": "NewFullname", "newEmail": "NewEmail" }' \
https://<tatHostname>:<tatPort>/user/update
Only for Tat Admin
curl -XPUT \
-H "Content-Type: application/json" \
-H "Tat_username: userAdmin" \
-H "Tat_password: passwordAdmin" \
-d '{ "username": "usernameToRename" }' \
https://<tatHostname>:<tatPort>/user/archive
Only for Tat Admin
curl -XPUT \
-H "Content-Type: application/json" \
-H "Tat_username: userAdmin" \
-H "Tat_password: passwordAdmin" \
-d '{ "username": "usernameToRename", "fixPrivateTopics": true, "fixDefaultGroup": true }' \
https://<tatHostname>:<tatPort>/user/check