Guide - Extract All Portfolio Data
Objective
To extract/pull (on a semi-regular basis) all data from your Incentify credits and incentives portfolio to ingest it into your own database to support your internal applications, such as an analytics/BI dashboard.
The basic idea is to configure your script/system to loop over each data resource and then each paginated set of data within each resource until you have ingested all of the data.
Key Portfolio Resources:
- Projects
- Credits
- Utilizations
Steps to Implement
Projects contain Credits and Credits contain Utilizations - so the basic idea is to fetch each resource in a paginated fashion, map the data together via their hierarchical relationship and save them in your internal database.
Step 1 - Get List of All Projects
- Get list of Projects via Projects - List (GET)
- Check for pagination in the API response and loop
links > next- this returns the endpoint for the next page - or empty if no further pages
- Insert desired Project data into your internal database
Step 2 - Get List of All Credits and Map to Projects
- Get list of Credits via Credits - List (GET)
- Check for pagination in the API response and loop
links > next- this returns the endpoint for the next page - or empty if no further pages
- Insert desired Credit data into your internal database
- Credits are connected to Projects by the "Project ID"
Step 3 - Get List of All Utilizations and Map to Credits
- Get list of Utilizations via Utilizations - List (GET)
- Check for pagination in the API response and loop
links > next- this returns the endpoint for the next page - or empty if no further pages
- Insert desired Utilization data into your internal database
- Utilizations are connected to Credits by the "Credit ID"
- Utilizations are also connected to Projects by the "Project ID"