# How to connect to a Web API?

**URL:** https://discourse.julialang.org/t/how-to-connect-to-a-web-api/87490
**Category:** General Usage
**Tags:** web, api
**Created:** [September 19, 2022, 8:14pm UTC](https://discourse.julialang.org/t/how-to-connect-to-a-web-api/87490 "2022-09-19T20:14:04Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Nathan\_Boyer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nathan_boyer/32/14825_2.png) [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)
#### Post date: [September 19, 2022, 8:14pm UTC](https://discourse.julialang.org/t/how-to-connect-to-a-web-api/87490/1 "2022-09-19T20:14:04Z")

</div>

TLDR: Please explain to me like I’m a child how Web API’s work.

I use project management software called ClickUp that says you can push and pull data to it through its web API. From its [documentation](https://clickup.com/api), if you click on `Lists` on the left side, then `Get List` in the middle, there are dropdown menus that show examples of how to fetch a list in many languages (except Julia). There is also a `raw` example (whatever that means), so I assume it is possible to use Julia also. I would like to read a List from ClickUp into a Julia DataFrame, manipulate, then push back. Authentication is another hurdle I will have to handle somehow. Can someone outline the general steps I need to take with Julia to interact with a web app like ClickUp?

---

<div class="post-metadata">

### Author: ![chris-b1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chris-b1/32/14165_2.png) [@chris-b1](https://discourse.julialang.org/u/chris-b1)
#### Post date: [September 19, 2022, 8:38pm UTC](https://discourse.julialang.org/t/how-to-connect-to-a-web-api/87490/2 "2022-09-19T20:38:10Z")

</div>

Using the [HTTP.jl](https://juliaweb.github.io/HTTP.jl/stable/) library you can make equivalent calls to the curl examples. Some knowledge of general HTTP verbs / requests / responses / etc would be helpful to translate.

But just as an (untested) example to get you started

```julia
# curl --include \
# --header "Authorization: "access_token"" \
# 'https://api.clickup.com/api/v2/list/{list_id}'

using HTTP
using JSON3

access_token = "...." # your api key
list_id = 1

resp = HTTP.get(
      "https://api.clickup.com/api/v2/list/$(list_id)", # url
      [
          "Authorization" => access_token # headers by pairs
      ]
)

data = JSON3.read(resp.body) # json data as a dict-like structure

```

```julia

```
