GET All Data

GET all the data coming from an entity

This API can be used to retrieve all the records belonging to a Single Entity. All the records means that the data driver scan all the Entity records to produce the resulting response JSON. This may be useful of course for small entities and in general for all the entities that don't need to be paginated.

If this API may work well for entities up to some thousands of records, it is discouraged to GET all the records of an Entity that contains millions or billions records. For this kind of entities use Pagination.

For big entities it is suggested to disable this API, in order to avoid queries that stuck the database or your system. You can disable the GET All Data API by using the Rest Entity Configuration.

Request

Endpoint

GET <base_url>/data/{entity}

{entity} is the Entity name according to the name provided in the schema

Responses

Gemini responses always contains a proper HTTP status code, and a JSON body with a status text, the data inserted and a meta object that holds metadata about the response.

Lets take a look by using some real examples and the following schema:

type: ENTITY
entity:
  name: CATEGORY
  lk: [id]
  fields:
    - name: id
      type: STRING
      required: true
    - name: description
      type: STRING

200 - Success

Success response contains the list of all the data records.

curl "http://localhost:8080/data/category/"
{
    "status": "success",
    "data": [{
        "description": "Smartphone",
        "id": "smartphone-1"
    },{
        "description":"Clothing",
        "id":"clothing-1"
    }]
}

Last updated