Miscellaneous
This page describes some interesting services provided by the API.
Authentication credentials for a web page
The API returns the LOGIN and PASSWORD based upon an URL sent in entry.
<url to teampass>/api/index.php/auth/<PROTOCOL>/<URL>/<user login>/<user password>?apikey=<VALID API KEY>
With:
< PROTOCOL >: is the protocol used for the URL (example: http|https|ftp|...)< URL >: is the URL without the protocol (example: http://www.teampass.net becomes www.teampass.net)< user login >: user's login< user password >: user clear password< VALID API KEY >: api key for access validation
Example: https://127.0.0.1/teampass/api/index.php/auth/http/www.zadig-tge.adp.com/U1/test?apikey=chahthait5Aidood6johh6Avufieb6ohpaixain
The response format is JSON. If several entries exist for one URL then all possibilities will be sent back.
Example: {
"<item_id>":{
"label":"<pass#1>",
"login":"<login#1>",
"pw":"<pwd#1>"
},
"<item_id>":{
"label":"<pass#2>",
"login":"<login#2>",
"pw":"<pwd#2>"
}
}
Add new User
Adding a new User is done through URL:
<url to teampass>/api/index.php/add/user/<LOGIN>;<NAME>;<LASTNAME>;<PASSWORD>;<EMAIL>;<ADMINISTRATEDBY>;<READ_ONLY>;<ROLE1,ROLE2,...>;<IS_ADMIN>;<ISMANAGER>;<PERSONAL_FOLDER>?apikey=<VALID API KEY>
<LOGIN>;<NAME>;<LASTNAME>;<PASSWORD>;<EMAIL>;<ADMINISTRATEDBY>;<READ_ONLY>;<ROLE1,ROLE2,...>;<IS_ADMIN>;<ISMANAGER>;<PERSONAL_FOLDER> has to be sent as a base64 encoded string. The separator symbol is the semicolon ;.
Some limitations:
ADMINISTRATEDBY,READ_ONLY,IS_ADMIN,ISMANAGER,PERSONAL_FOLDERare booleans and accept value1forTRUEand value0forFALSE.
Generate a password
Generating a new password is done through URL:
<url to teampass>/api/index.php/new_password/<size>;<secure>;<numerals>;<capitalize>;<ambiguous>;<symbols>;<base64 encoded string>?apikey=<VALID API KEY>
With:
<size>an integer taken from 4 to 50<secure>takes1if secure password is expected, else it takes0<numerals>takes1if password can contain numerals, else it takes0<capitalize>takes1if password can contain capital letters, else it takes0<ambiguous>takes1if password can contain ambiguous letters, else it takes0<symbols>takes1if password can contain symbols, else it takes0<base64 encoded string>takes1if you want the password to be sent back in base64 encoding string. This is mandatory if you ask for symbols.
The response format is JSON.
Example: {"password" : "Chohcee7phahTooThoh"}
If symbols are asked then password is base64 encoded
Example: {"password" : "Y3VlM0hhaHlhaDlvaWomYWU0bw=="}
Get the list of Complexity levels
The list is sent back through URL:
<url to teampass>/api/index.php/info/complexicity_levels_list?apikey=<VALID API KEY>
The response format is JSON.
{
"0": "Very weak",
"25": "Weak",
"50": "Medium",
"60": "Strong",
"70": "Very strong",
"80": "Heavy",
"90": "Very heavy"
}
Return Folder information
The Folder information is obtained through URL:
<url to teampass>/api/index.php/info/folder/<folder_id>?apikey=<VALID API KEY>
The response format is JSON.
{
"title": "Sub folder name",
"personal_folder": "0",
"renewal_period": "0",
"parent_id": "1",
"path": "Folder #1 > Sub folder name"
}
API version
Get API version through URL:
<url to teampass>/api/index.php/info/version?apikey=<VALID API KEY>
The response format is JSON.
{
"api-version": "2.0"
}