Reporting data from ClickUp (or any) API in F#

ClickUp is a feature-rich, fast growing project management app we use at Bitrise. However, for reporting, we had to create a workaround using their API. Read on for the details.


Naturally, the mid-term solution for the problem is building pipelines collecting data from each endpoint of ClickUp's extensive API, then transforming, flattening and merging these datasets with an ETL tool of your taste (in our case Xplenty).

For ad-hoc reports or exploratory analysis, you can write your own script in any language since we are communicating with ClickUp via regular HTTP requests.

One of the reasons I prefer F# over other languages is F# Interactive which lets you evaluate and run your script or specific parts, modules, functions of it within your editor. Type providers of F# Data Library further facilitate our job. Let me share how we can use JSON Type Provider and HTTP Utilities to process ClickUp Tasks.


We need the team id and access token to authenticate. When running compiled exe you can use FSharp.Configuration to manage secrets. Here we are simplifying the process to run the code by F# Interactive.

To limit the dataset we are adding a start date to our query which should be in epoch format. ClickUp API starts counting pages from 0.

We will need F# Data Library to process responses from the API. JSON Type Provider lets us define type by an example document. Since we are interested in processing tasks, this is the body of the response from Task endpoint.

To paginate the requested pages we are looping over URLs constructed by amending our original one with the page number. Let us introduce a helper function converting our integer page numbers to strings.

ClickUp API presents all datetime attributes in epoch. We need to write another function if we would like to see them in local time.

Finally, we can collect tasks from the API. System.Collections.Generic is needed to use List constructor.

We are making the request by RequestString method of Http type in F# Data HTTP Utilities.

Let us check how many tasks we collected. Linq namespace is required here to count tasks we unloaded.

A bit more sophisticated queries

We can filter for specific tasks using query expressions. For example, a specific user's tasks are listed in the following way.

This way we can also group data by attributes nested at a deeper level. For example top tags on open tasks:

Plotting with Plotly

Xplot is a package that can draw charts with both Google Charts and Plotly APIs. Plotly is broader and has a higher number of chart types and options.

You can define the representation of data and some options by piping members of Chart type. Naming speaks for itself:

Top Tags on Open Tasks

We cannot follow the way of aggregation in the query to draw a more complex chart. All the values must be there to let Plotly find statistics for box-plot.

Id can be captured from URL of your list of tasks: it is the id after "&s=". The query listing estimations in Data Backlog:

We have to convert JsonValues to floats. Since the API passes estimation figures in milliseconds, we are applying another function as well to report in hours.

We can see that the most typical task is estimated to last 5 hours, 3 quarter of them is within 10 hours, the largest task is planned for 15 hours.

Stay tuned for the next article on data wizardry titled Ad-hoc reports from GitHub in F# coming soon.

ClickUp is a feature-rich, fast growing project management app we use at Bitrise. As with any other application, developers there focused on the core features of their product at first, and though we see new features released each month, reporting has unfortunately not been among them yet. Read on to see how we created a workaround using their API.

No items found.
The Mobile DevOps Newsletter

Explore more topics

App Development

Learn how to optimize your mobile app deployment processes for iOS, Android, Flutter, ReactNative, and more

Bitrise & Community

Check out the latest from Bitrise and the community. Learn about the upcoming mobile events, employee spotlights, women in tech, and more

Mobile App Releases

Learn how to release faster, better apps on the App Store, Google Play Store, Huawei AppGallery, and other app stores

Mobile DevOps

Learn Mobile DevOps best practices such as DevOps for iOS, Android, and industry-specific DevOps tips for mobile engineers

Mobile Testing & Security

Learn how to optimize mobile testing and security — from automated security checks to robust mobile testing and more.

Product Updates

Check out the latest product updates from Bitrise — Build Insights updates, product news, and more.

The Mobile DevOps Newsletter

Join 1000s of your peers. Sign up to receive Mobile DevOps tips, news, and best practice guides once every two weeks.