> For the complete documentation index, see [llms.txt](https://documentation.astera.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.astera.com/astera-data-stack-v9/api-flows/api-consumption/consume/making-api-calls-with-the-rest-client-object-in-astera.md).

# Making API Calls with the REST Client Object in Astera

To make an API call in Astera, A *REST Client* object, along with its *REST* *Connection*, needs to be configured.

First, drag and drop a *REST Connection* object from the Toolbox and configure it in the dataflow. Alternatively, you can use a *REST Connection* object from a shared action within the scope of the project you’re working with. The connection object contains the Base URL, authentication details, and shared parameters for the API endpoint.

{% embed url="<https://youtu.be/SUGaow3tpDE>" %}

You can learn all about the configuration and usage of the *REST Connection* object [here](/astera-data-stack-v9/api-flows/api-consumption/consume/rest-connection.md).

Next, let’s configure the *REST* Client object.

1. First, drag and drop the *REST Client* object from the Toolbox onto the dataflow.

![](/files/CtJVGcTZlk0mAXquKtQB)

2. Right-click on the *REST Client* object’s header and select *Properties*.

![](/files/CPE8mm75TBk8TndFYnph)

The *REST Client* screen will now open. Here you will have to specify the following:

![](/files/yGANGgTgJIDIb9eneHw8)

* *Shared Connection:* Establish your REST Client’s connection from this drop-down that lists all shared connections from within the flow as well as from the project.
* *HTTP Method:* The HTTP request verb defines the operation you want to make on the API resource.
* *Resource:* the resource of the API from which you want to make a request. This will be appended after the Base URL from the selected shared connection to form the complete endpoint. Any URL or path parameters must be included in the resource text enclosed in curly brackets, {}.
* *Content-Type*: This is the content-type header for the request payload which is defaulted to application/JSON type. The actual request payload layout can be defined in the input layout screen.

{% hint style="info" %}
**Note:** For an unsupported type, a relevant pop-up notification will appear on-screen.
{% endhint %}

3. Click *Next*. A *Parameters* screen will appear. Here you will have to specify the following:

![](/files/IeqG6gFGLMnplrUcKT1z)

* *Override Inherited Parameter:* Check this to override any parameters previously defined in the shared connection.
* *Name:* The name of your parameter.
* *Parameter Location:* The parameter type such as Query, URI, and Header. In this example, we are using a *Query* parameter.
* *Data Type:* Specify the data type of your parameter
* *Default Value:* The parameter’s value for which you want to make a request.

{% hint style="info" %}
**Note:** Any values mapped to the input node of the object will take preference.
{% endhint %}

4. Click *Next*. A *REST Client Output Layout* screen will now open. Here we will select the *Generate Layout by Running Request* to build the response layout. Then click *OK*.

![](/files/P42r64plQ81MuFCZ8KNw)

{% hint style="info" %}
**Note:** Prior to this screen, there will be an additional screen to configure a *REST Client* input layout for the following methods: POST, PUT, and PATCH.
{% endhint %}

5. Once done, click *Next*, and you will be led to the *Pagination* *Options* screen.

Here, you can select the type of pagination that has been specified by the API providers. Astera offers the following pagination types.

![](/files/90X6uJsNjfhVfAQSyZ7b)

6. When done, click *Next*, and you will be taken to the *Service Options* screen.

![](/files/l3Xz21WaW3mxZNuGyxaE)

* *Ignore HTTP Status Codes:* Selecting this option will show the results for responses other than 2xx in the flow, which are otherwise considered an error.
* *Continue on Retry Failure:* Checking this option will let the program continue if there is a failure.
* *Use Parallelism:* Check this option to send requests in parallel.

![](/files/z5zPSQZARQUfThVyAd5a)

* *Include Content as String:* Adds a field for serialized content text in the *Response-Info* output node.
* *Include Response Headers:* Adds all response headers as a collection in the *Response-Info* output node.
* *Include Raw Bytes:* Adds a field for content in the form of raw bytes in the *Response-Info* output node

7. Click *Next*, and the *Config Parameters* screen will appear.

* *Config Parameters* can enable the deployment of flows by eliminating hardcoded values and provide a dynamic way of changing multiple configurations with a simple value change.

![](/files/UKVBkyxWiQyC0bJOv8hM)

8. Click *OK*, and the *REST Client* object will be configured.

Now, right-click on the REST Client object’s header, and select *Preview Output*.

Your request has been executed successfully, as you can see that *HTTPStatusCode* is 200 which means that the *REST Client* has successfully carried out the GET request for the provided status.

![](/files/pKnSfMRPdfmZaDw0RdNd)

This concludes our discussion on making API calls with the *REST Client* object in Astera.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://documentation.astera.com/astera-data-stack-v9/api-flows/api-consumption/consume/making-api-calls-with-the-rest-client-object-in-astera.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
