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.

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