It is possible to expose our GraphQL API to integrations that only handle REST by moving everything into the query parameters of the URL. The documentation here is made public to Factbird customers.


You will talk to the Factbird API, much like Power BI and Excel does in Power Query, and make various API calls depending on what data you are interested in. In the following we will outline what our API expects and the various queries you can perform.

API call to Factbird

The following outlines the connection details to the Factbird API:

IP Addresses

Our API is deployed globally and we cannot provide a static set of IP addresses. The best alternative is to list a number of possible subnets: http://d7uri8nf7uskq.cloudfront.net/tools/list-cloudfront-ips - for a more detailed list, refer to https://ip-ranges.amazonaws.com/ip-ranges.json , the service of interest is the one listed as CLOUDFRONT. These two links contain the most up-to-date address scopes. Which subnet you need to whitelist depends on where you make the request from. The region codes correspond to the geographical areas listed here: https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints

The Authorization token is provided by sending a request to [email protected].

Forming a Query

From this we can start making queries for specific data. We'll do this by extending the URL from above to contain the specific data we want along with the parameters for this data (from, to, which line, etc).

These queries will look a bit long, but that's because we are essentially converting a GraphQL request (which our API is set up as) to a REST compatible request by putting the request into the GET parameter of the URL along with URL encoding it.

To replicate how we present something in the application, you can check the network request in the browser Developer Tools, i.e.:

inspect-10.gif

The following table gives an overview of the query and variables pieces that are needed to form the final query:

Query Parts