# API client

Canonical page: https://datalens.flazetech.in/api

Publisher: DataLens by Flazetech (https://datalens.flazetech.in/about).

Send a request, inspect the response, and take a cURL command back to your terminal.

## How to test an API request

1. Enter an HTTP or HTTPS URL and select a method.
2. Add request headers, query parameters, and a body if needed.
3. Select Send and inspect the response. The destination must allow browser requests through CORS.

## Common questions

### Why does an API request fail in the browser but work in cURL?

Browsers enforce cross-origin resource sharing (CORS). The API server must allow this site’s origin and request headers. Use Copy cURL to test from your own terminal when the endpoint does not support browser access.

### Where is my API request sent?

Requests go directly from your browser to the URL you enter. Request history stores the method and URL on this device. Sharing a request includes its configured headers, query, and body; remove tokens before sharing.

### How do I send a JSON request body?

Choose a method that accepts a body, such as POST or PUT. Enter valid JSON in the body editor and set the Content-Type header to application/json. The server controls which methods and fields it accepts.

### Can I use the request outside the browser?

Use Copy cURL to export the configured request for your terminal. Review the URL, headers and body before running it. A terminal request is not subject to browser CORS, but it still needs the endpoint's normal authorization.

## Related guides

- [Compare JSON objects without key-order noise](https://datalens.flazetech.in/guides/compare-json-objects)

## Data handling

[Processing and privacy](https://datalens.flazetech.in/privacy). Formatting and conversion run in the browser. Optional sharing and API requests can transmit supplied data. The interactive tools require JavaScript; this reference does not.
