Setup and Usage

The first thing that is needed to do to make use of an API Exporter operator is to link one into a new or existing pipeline.

https://lh3.googleusercontent.com/JdFj987ltXSen0rd_F5aL7uZNpuj6iEF_qQJC9OeLgRwkNcHDNcmYu8BpsdhiGftaipLC1beTLfPzKrRTy4Q4UdhIHXY_p8s5L4dTu30J1EAQAtrtN5dibi8UOHgqYsA62LyMbw5

The light-blue circle therein (In the top-right corner of the Sample REST API icon) means that the operator was not run. This can be solved by clicking the green "Run" button to run the entire pipeline (see the top-bottom corner of the picture) or clicking the individual "play" button while hovering over the Sample REST API operator, but first the operator needs to be configured.

In order to edit the operator's configuration, hovering over the operator also displays the option, with a clickable pencil icon (at the top-right corner, the "play" icon is also available to run the operator individually and directly).

https://lh4.googleusercontent.com/ConJDhXLLe3QOC82HByx4sAQrh50iDiY0c6gpIOz5uv3nfPGRs61L-E6HGfp8K-y0J3fmIT5kqfua7A09M2EZ7MGtGyzZHjC7ShUbO-8cN-YXu6eyMvMrafFaGRo8IMYTH8JP80b

While setting the operator up, by clicking the pencil icon, a list of datasets can be specified (as a pair of integration and chosen stream, given from the available integrations added into the pipeline and ideally one integration directly or indirectly preceding the REST API operator). The interface will look like this:

https://lh3.googleusercontent.com/iCVPoIi5l0vmSRqvHGvSk4TEz-JIpHWv_YCiLL5R70jpvHOIo0cL0G77cedcw3ymJ9aMg64n8eEV-IwtS8UtQNlGgzJCOd92UmQJt1vush4PXgGMAk6EYBMJbzDk-oQw_9MLUQmp

(multiple streams can be selected to be served by the API)

Once the API is run (either by clicking the "Play" (triangle) per-operator button or by clicking the "Run" per-pipeline button), its results are stored and available through a special API endpoint and access key.

API Querying

In the "API" section in the project, the operator will be listed by providing a special endpoint as one of the list item (in this example, listed as "Sample REST API", being the first entry):

https://lh3.googleusercontent.com/C_ckeztE5ykxRSSyov3ayXPvBPvqq3BQNzcimSqR2PSPoZhKCjAv6PRlkI4OTUcte6gue_25uQgEq1-uLvuW3zg06pgDnAYgsCyztzxR9l2HRwIjLNZOFZCW3RCzQ9MwAWz4F7HO

By clicking the per-element REST API button, this can be seen:

https://lh4.googleusercontent.com/uXOzVXgLJnQUDdcVAYXfflfu19oGTvskKEBSd9bzHBStnZup4IYMlbwkS6Az6Y6FWsjo8uBPKPDeLjcTZN0ByuSeSAu3ONvhiUTR56E-gXH07NPh5U3HSktXuzsisXRPbay77vYn

That long text (highlighted in the picture) is a sample cURL command to make use of the API. In order for this to work, the operator must have to be run in advance as detailed in the previous section.

While any HTTP API client, or even browser extension, is allowed to be used, the sample cURL command works with any curl command line already installed in the user's system (typically, this tool comes out of the box in modern Linux or Mac systems). An example of command-line usage comes below:

https://lh3.googleusercontent.com/6FDg0d19FGncj-vTh5Jn0HRlZALjlgeSN-yAkl8LP5eCx5MBLkSzSGO2TCSKUQuqz8qot8RMr_izIR5TI1_FTKHVAa5l6DiwCZxcOsEJHo97VUHlcX8aJxhwxh0fh4n3bBsrDCgs

The output comes in JSON format and can be processed by the intended consumer (the returned data will never change - when in need of a refresh, replaying the whole pipeline or the individual operator, either manually or by schedule, will solve the issue and keep the data up to date in the endpoint).

A Python example: