Query builder
Call URL:
Dynamic field:
EndpointformatWelcome to the Endpoints doc!
- All calls are made either with a session token, or with the session's current rights. API results are here called within your own session and are thus displayed with your own rights. To test in your environment, you will find this guide on your own custoware, in your preferences, menu 'endpoints'.
- You can pass the token as a GET/POST variable (token) or in headers (Authorization Bearer or Authorization Basic).
- You can obtain the data in JSON, XML or HTML format.
- For POST actions, you can send the data either as POST variables (using dot notation var.subvar for sub-variables and array [] for arrays), or as a JSON object.
- When called within a doc with the dynamic variable, the data is processed server-side and included into the HMTL sent to the browser, with positive consequences: an HTML result can be indexed by robots (you can then hide the raw HTML and process it with javascript or directly style it with CSS); a JSON or XML output can be immediately processed without a 2nd query. Example use: build your own 1-page website and use Custoware as headless server.
- PRO TIPS (aka 'less is more'):
- You can group queries; example: /json/doc,answers,chat,kb/30 will give you all document info, all knowledgebase elements, all survey answers and all chats from doc 30 in one call.
- You can group docs; example: /json/doc/30,31,32,33 will give you all document infos for these 4 docs.
- You can mix both: /json/doc,answers,chat,kb/30,31,32,33
- For performance reasons, all queries are dynamically cached at session level. For public data, the cache is common to all unidentified sessions. To force refresh, add forcecache=1 to the variables. (Don't hardcode your queries with forcecache=1 unless you want to ruin performance, use it only when necessary.)
Endpoint list
| Endpoint | Usage | Result | Arguments |
|---|
| Get account elements | account | like_accounts: (todo)from: dateto: date | Get dates from agenda. Public dates if no token. Id is groupid | agenda | id: Group id | get analysis for a survey | results | id: doc idsubid: question ididinscription: inscription ididgens: contactidnumreponse: answer id | Get my answers to question(s) | q#ID | id: question id[,question id...] or [:question id...] to concat | Get answers to question(s) by all contacts | q#ID | id: question id[,question id...] or [:question id...] to concat | get contact data. If login/pass sent, returns contact id. If ID sent, returns a json_contact object. | contact | id: contact idlogin: contact loginpass: contact passanswer: question id[,question id...] | Export database contents | | id: doc id[,doc id]subid: line idaction: flat,norel,noexpand,fullchilds,fieldname(=fullchilds for this field only) | | | | | | | | | | | | | | | | Get contacts related to me | contacts | id: 'hierarchy' or search string (email/ name/ idcontact(,s)) | Get groups | groups | id: category | Get contact hierarchy for a survey, registration or analysis document | | id: doc id | Knowledgebase | | id: doc idsubid: kb idsearch: search terms | Register a user. Send login to ask if exists (needs public token). | | json[login]: Object containing: firstname,name,group,folder,zone, | Get contacts in a list | contacts | id: list id[,list id...] | Get logs | logs | contact: contact ids: sid: doc idsubid: doc subidsincedays: since days0: sincedate1: since date | Welcome! Send login to ask if exists. Send login/pass, USER/PW credits, or token to login. | login,token | login: loginpass: passtoken: tokenanswer: question id[,question id...] | Goodbye! (don't try the API result, you'd be disconnected) | login | | Get emails | mails | contact: contact idgroup: group idsincedays: since days0: sincedate1: since datesearch: search query string | Get my answers to a survey | | id: doc id (empty: all my qualification answers) | Get survey questions | questions | id: doc id | Get tags | | | | | | Get publication zones | zones | POST chatedit | | updated | POST contactedit | c | c | POST dbedit | d | d | POST docedit | d | d | POST docimageedit | d | d | POST friend | f | f | POST ilike | i | i | POST idislike | i | i | POST unfriend | u | u | POST storeanswer | s | s | POST storeanswers | s | s | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |