> ## Documentation Index
> Fetch the complete documentation index at: https://www.integrate.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# ETL: CCurl

> Makes a REST API call and returns the response received from the server. Requests are authenticated using an Integrate.io ETL connection.

## Description

Makes a REST API call and returns the response received from the server. Requests are authenticated using an Integrate.io ETL connection.

## Syntax

`CCurl(url, [method, [headers, [request_body, [connection_id]]]])`

## Arguments

*url* (string) - HTTP or HTTPS url for the request.

*method* (string) - HTTP method, such as GET, POST, PUT, DELETE, PATCH.

*headers* (optional string) - A json string that identifies the request headers key and value in the following manner: `'{"header1" : "value1" , "header2" : "value2"}'`.

*request\_body* (optional string) - The string body of the request (most relevant in the case of POST)

*connection\_id* (optional string) - The unique identifier of the connection to use to execute the query. You can find it in the connection's page.

## Examples

```bash theme={null}
CCurl('http://api.myapp.com/users/','POST','{"Accept":"text/json"}','{"name":"John","age":34}','myapp_83')
```

```bash theme={null}
CCurl('http://api.myapp.com/users/','GET','')
```

## Notes

This function only executes in job runtime. When validating a package with variables that use the function or in X-console, the function returns null.

## Return value datatype

The returned value is a map object that contains the following keys:

* status - response code (integer)
* body - the body of the response (string)
* headers - map object of response headers

## Impact of null value

The url and method arguments are required. The rest are optional and default to null.
