The Web API supplies a number of HTTP endpoints that expose ways to create and modify users, groups, memberships, permissions, user activation, budgets and todos.
This documentation is written for developers who will be implementing an API connection for user provisioning with the TinQwise learning platform.
Where to start
Read the two setup articles first, then go to the endpoint you need.
Setup
Interactive documentation and test environment (below on this page)
Endpoints
Interactive documentation
To explore the available endpoints, use the interactive documentation.
It can be accessed at https://<platform name>.platform.co.nl/api/v3/public/docs/, for example https://tinqwise.platform.co.nl/api/v3/public/docs/.
Testing on QA
We recommend testing integrations on the QA environment.
You can find the API for QA at https://<platform name>.qa.platform.co.nl/api/v3/public/docs/, for example https://tinqwise.qa.platform.co.nl/api/v3/public/docs/.
đ§ Be careful
Any changes you make on QA will be reset periodically. The data on QA is refreshed on the Monday of every odd week.
Caveats and limitations
It is currently not possible to give users sub-admin permissions through the API. This must be done manually through Control, see Create an Admin (restricted access) group in TinQwise Control.
It is currently not possible to manage group type details through the API, such as whether a group type shows in profiles and can be selected in a report.
Creating a todo does not grant the user access to the module or journey it points to. This must be arranged separately, for example through an automation. See Todos via the API.
Example API usage with Python and the requests library
Don't forget to replace the base url, client id and client secret with the credentials for the acceptance (QA) environment you received.
import requestsbase_url = 'https://<<your platform name>>.qa.platform.co.nl'# login
payload = {
"grant_type": "client_credentials",
"client_id": "<<your client id>>",
"client_secret": "<<your client secret>>",
"scope": "v3:users:read v3:users:write",
}
response = requests.post(f"{base_url}/o/token/", data=payload).json()
token = response["access_token"]
print("token:", token)# list users
headers = {"Authorization": f"Bearer {token}"}
response = requests.get(f"{base_url}/api/v3/public/users/",
headers=headers).json()
print("Retrieved", response["count"], "users.")
first_user = response["results"][0]
print(first_user["first_name"], "is on the platform")