Work with APIs

Pull from an API

API screenshot
Method: Chose the http method to pull data from an API endpoint. Currently we only support the GET and POST methods, though we will add more. Please check your API reference to decide which method you want to use.
API url: Type in the url and full path of the API endpoint, including all parameters. Parameters are usually used to pass in API keys for simple authentication methods.
For example: https://mydata.com/api/v2/dataset1?para1=value1&api_key=keyvalue
Headers Headers let you pass additional information with the API request. Request headers can be used in the request to provide information about the request context to help the server tailor the response. You can use, for example, the Authorization header to provide authentication credentials.
If the server responded with a 401 Unauthorized status, usually you should provide credentials to authenticate the request. To do so, you will need to use the Authorization header.
The value of the the Authorization header should be :
1
<type> <credentials>
Copied!
Common types:
  • Basic: Base64-encoded credentials.
  • Bearer: Bearer tokens to access OAuth 2.0-protected resources
Path: If provided, the funtion will only retrieve data that is located in the path. For example, You can enter key1.key2[1].key3 to retrieve to value of key3 of the second object of array key2 of the object key1.
If the JSON response looks like this:
1
{
2
"id": 1001,
3
"person": [
4
{
5
"name": "John",
6
"age": 45,
7
"city": "New York"
8
},
9
{
10
"name": "Rich",
11
"age": 34,
12
"city": "London"
13
}
14
]
15
}
Copied!
the path person[1].name will return “Rich”, while the path person[0] will return all information about John.
Request body: Enter the JSON format request body. This will only apply to the POST method. For example, when creating a resource using POST, the request body usually contains the representation of the resource to be created.

Enrich with an API

Column number: Type in the number of column of the data to be processed. For example, column C should be 3.
Start row: Type in the number of the start row of the data to be processed.
This function will only process a column of data, so you have to choose which column and from which row you want the data to be processed. This is an example:
example of a data column
Method: Chose the http method to send data to an API endpoint. Currently we only support the GET and POST methods, though we will add more. Please check your API reference to decide which method you want to use.
API url: Type in the url and full path of the API endpoint, including all parameters. Parameters are usually used to pass in API keys for simple authentication methods.
You can also include {{merge_tag}} in the url parameters to represent data from the sheet to be sent to the API endpoint.
For example: https://mydata.com/api/v2/dataset1?api_key=keyvalye&data={{merge_tag}}
Headers Headers let you pass additional information with the API request. Request headers can be used in the request to provide information about the request context to help the server tailor the response. You can use, for example, the Authorization header to provide authentication credentials.
If the server responded with a 401 Unauthorized status, usually you should provide credentials to authenticate the request. To do so, you will need to use the Authorization header.
The value of the the Authorization header should be :
1
<type> <credentials>
Copied!
Common types:
  • Basic: Base64-encoded credentials.
  • Bearer: Bearer tokens to access OAuth 2.0-protected resources
Path: If provided, the funtion will only retrieve data that is located in the path. For example, You can enter key1.key2[1].key3 to retrieve to value of key3 of the second object of array key2 of the object key1.
If the JSON response looks like this:
1
{
2
"id": 1001,
3
"person": [
4
{
5
"name": "John",
6
"age": 45,
7
"city": "New York"
8
},
9
{
10
"name": "Rich",
11
"age": 34,
12
"city": "London"
13
}
14
]
15
}
Copied!
the path person[1].name will return “Rich”, while the path person[0] will return all information about John.
Request body: Enter the JSON format request body. This will only apply to the POST method. For example, when creating a resource using POST, the request body usually contains the representation of the resource to be created. use {{merge_tag}} to represent data from the sheet to be sent to the API endpoint.
For example:
1
{
2
"data": {{merge_tag}},
3
"process": true
4
}
Copied!