> For the complete documentation index, see [llms.txt](https://digis.gitbook.io/lowcode/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://digis.gitbook.io/lowcode/unified-data-fetching.md).

# Unified Data Fetching

## Unified Data Fetching

<mark style="color:green;">`POST`</mark> `https://api.digis.io/data`

This endpoint allows you to retrieve any data combination from the CRUD. It also does many requests in one endpoint (similar to GraphQL)

#### Request Body

| Name    | Type   | Description                                                          |
| ------- | ------ | -------------------------------------------------------------------- |
| entityN | string | you can cadd as many entities as you wish, an example is given below |

{% tabs %}
{% tab title="200 The API returns an object with the same shape as the payload that contains the requested data" %}

```
{
  "entity1": [],
  "entity2": [],
  "entity3": [],
  ...
  "entityN": []
}
```

{% endtab %}
{% endtabs %}

### Request Example

{% tabs %}
{% tab title="First Tab" %}
Query Example

* projections
* joins
* filters
  * equality
  * less than `$lt`
  * greater than `$gt`&#x20;
  * IN operator `$in`&#x20;
  * Reg expressions `$regex`&#x20;
* inverted joins `references`&#x20;
* order by `order`&#x20;
* limit `take` and `skip`&#x20;

```javascript
{
	"imt": {
		"references": {
			"country": {
				"params": {
					"projection": {
						"short": false,
						"name": false
					}
				}
			}
		},
		"filters": {
			"description": {
				"$regex": "BEN*"
			}
		},
		"take": 2,
		"skip": 0
	},
	"marketing_plan": {
		"filters": {
			"year": {
				"$in": [2016, 2017]
			},
			"halfYear": 2,
			"revenueActual": {
				"$gt": 1000
			}
		},
		"projection": {
			"ownInvestment": false,
			"businessPartner": {},
			"statusId": false,
			"ownInvestmentActual": false,
			"revenue": false
		},
		"skip": 0,
		"order": {
			"by": "year",
			"desc": false
		},
		"params": {},
		"take": 2
	}
}
```

{% endtab %}

{% tab title="Second Tab" %}

```
fghjkl
ghjkl;
```

{% endtab %}
{% endtabs %}
