Overview
This guide demonstrates how to extract user information (name, email, roles, permissions) for each project using Cintoo API. This can be achieved by making two separate API calls and joining the results based on user IDs.
Prerequisites
- a valid Cintoo API access token
- access to the Cintoo Cloud API, with necessary permissions to fetch project and user data
- familiarity with Python and REST API calls
Workflow
To retrieve user information from individual projects, you will need to:
- Call the
/projects
endpoint to get user IDs and their roles within projects. - Call the
/users
endpoint to get detailed user information. - Join the results based on user IDs to get complete user details, including project-specific roles and permissions.
Python Script
How the code works
- Get Project Users:
- Uses the
/projects
endpoint to get user IDs and roles for each project.
- Uses the
- Get User Details:
- Uses the
/users
endpoint to fetch user information (name, email, etc.).
- Uses the
- Join Results:
- Combines project user roles with user details, resulting in a complete user dataset for each project.
Requirements
- Install the
requests
library:pip install requests
- Replace placeholders (
YOUR_ACCESS_TOKEN
,YOUR_ACCOUNT_ID
) with actual values.
Notes
- The Cintoo API uses JWT tokens for authentication, which must be passed in the request headers.
- Ensure your access token is valid and has the necessary permissions to fetch user and project data.
Best Practices
- Use a sandbox environment to test the API calls before running them in production.
- Implement error handling to manage API call failures or token expiration.
Additional Information
For more details on Cintoo API endpoints, please take a look at the Cintoo API Documentation.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article