API

Page that describes the Datum API

Retrieve information from databases

GET https://api.jelou.ai/v2/databases

Query Parameters

Name
Type
Description

shouldPaginate

String

Paginate the results

{
  "message": [
    "Databases retrieved succesfully!"
  ],
  "statusMessage": "success",
  "status": 1,
  "data": [
    {
      "id": 123456789,
      "name": "JELOU TEST",
      "slug": "jeloutest",
      "slugInDriver": "company-135-jeloutest",
      "schemaType": "jsonschema",
      "driver": "elastic",
      "description": "JELOU TEST",
      "companyId": 135,
      "schema": {
        "type": "object",
        "required": [
          "total",
          "name"
        ],
        "properties": {
          "total": {
            "type": "string",
            "database": "text"
          },
          "name": {
            "type": "string",
            "database": "text"
          },
          "phone": {
            "type": "string",
            "database": "text"
          },
          "city": {
            "type": "string",
            "database": "text"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "database": "date"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "database": "date"
          },
          "referenceId": {
            "type": "string",
            "database": "keyword"
          }
        },
        "additionalProperties": false
      },
      "state": true,
      "isFavorite": false,
      "isVisible": true,
      "createdAt": "2023-08-02T15:08:14.000Z",
      "updatedAt": "2023-08-02T15:08:14.000Z",
      "metadata": {
        "id": 125888,
        "databaseId": 123456789,
        "databaseMetadataSyncId": 1288,
        "size": 225,
        "rowsCount": 0,
        "rowsIncrementPercentage": 0,
        "updatedAt": "2023-08-28T08:00:04.000Z",
        "createdAt": "2023-08-28T08:00:04.000Z"
      }
    }
  ]
}

Retrieve information from a database

GET https://api.jelou.ai/v2/databases/DATABASE_ID

Path Parameters

Name
Type
Description

DATABASE_ID*

String

Database ID

{
  "message": [
    "Database succesfully!"
  ],
  "statusMessage": "success",
  "status": 1,
  "data": {
    "id": 123456789,
    "name": "JELOU TEST",
    "slug": "jeloutest",
    "slugInDriver": "company-135-jeloutest",
    "schemaType": "jsonschema",
    "driver": "elastic",
    "description": "JELOU TEST",
    "companyId": 135,
    "schema": {
      "type": "object",
      "required": [
        "total",
        "name"
      ],
      "properties": {
        "total": {
          "type": "string",
          "database": "text"
        },
        "name": {
          "type": "string",
          "database": "text"
        },
        "phone": {
          "type": "string",
          "database": "text"
        },
        "city": {
          "type": "string",
          "database": "text"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "database": "date"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "database": "date"
        },
        "referenceId": {
          "type": "string",
          "database": "keyword"
        }
      },
      "additionalProperties": false
    },
    "state": true,
    "isFavorite": false,
    "isVisible": true,
    "createdAt": "2023-08-02T15:08:14.000Z",
    "updatedAt": "2023-08-02T15:08:14.000Z",
    "columns": [
      {
        "id": 1,
        "databaseId": 123,
        "name": "Total",
        "description": "Description1",
        "key": "total",
        "type": "boolean",
        "isSortable": false,
        "isRequired": false,
        "isEditable": true,
        "order": 0,
        "state": 1,
        "updatedAt": "2023-08-02T15:08:14.000Z",
        "createdAt": "2023-08-02T15:08:14.000Z",
        "isVisible": true,
        "isMetadata": false,
        "filters": []
      },
      {
        "id": 2,
        "databaseId": 123,
        "name": "Client name",
        "description": "Client name",
        "key": "name",
        "type": "text",
        "isSortable": false,
        "isRequired": false,
        "isEditable": true,
        "order": 1,
        "state": 1,
        "updatedAt": "2023-08-02T15:08:14.000Z",
        "createdAt": "2023-08-02T15:08:14.000Z",
        "isVisible": true,
        "isMetadata": false,
        "filters": []
      },
      {
        "id": 3,
        "databaseId": 123,
        "name": "Telephone",
        "description": "Telephone",
        "key": "phone",
        "type": "text",
        "isSortable": false,
        "isRequired": false,
        "isEditable": true,
        "order": 2,
        "state": 1,
        "updatedAt": "2023-08-02T15:08:14.000Z",
        "createdAt": "2023-08-02T15:08:14.000Z",
        "isVisible": true,
        "isMetadata": false,
        "filters": []
      },
      {
        "id": 4,
        "databaseId": 123,
        "name": "City",
        "description": "City",
        "key": "city",
        "type": "text",
        "isSortable": false,
        "isRequired": false,
        "isEditable": true,
        "order": 3,
        "state": 1,
        "updatedAt": "2023-08-02T15:08:14.000Z",
        "createdAt": "2023-08-02T15:08:14.000Z",
        "isVisible": true,
        "isMetadata": false,
        "filters": []
      },
      {
        "id": 5,
        "databaseId": 123,
        "name": "Created At",
        "description": "Row created at",
        "key": "createdAt",
        "type": "date-time",
        "isSortable": false,
        "isRequired": false,
        "isEditable": true,
        "order": 4,
        "state": 1,
        "updatedAt": "2023-08-02T15:08:14.000Z",
        "createdAt": "2023-08-02T15:08:14.000Z",
        "isVisible": true,
        "isMetadata": false,
        "filters": []
      },
      {
        "id": 6,
        "databaseId": 123,
        "name": "Updated At",
        "description": "Row updatedat",
        "key": "updatedAt",
        "type": "date-time",
        "isSortable": false,
        "isRequired": false,
        "isEditable": true,
        "order": 5,
        "state": 1,
        "updatedAt": "2023-08-02T15:08:14.000Z",
        "createdAt": "2023-08-02T15:08:14.000Z",
        "isVisible": true,
        "isMetadata": false,
        "filters": []
      },
      {
        "id": 7,
        "databaseId": 123,
        "name": "Client ID",
        "description": "Client ID",
        "key": "referenceId",
        "type": "text",
        "isSortable": false,
        "isRequired": false,
        "isEditable": true,
        "order": 6,
        "state": 1,
        "updatedAt": "2023-08-02T15:08:14.000Z",
        "createdAt": "2023-08-02T15:08:14.000Z",
        "isVisible": true,
        "isMetadata": false,
        "filters": []
      }
    ],
    "metadata": {
      "id": 11111,
      "databaseId": 123456789,
      "databaseMetadataSyncId": 1111,
      "size": 225,
      "rowsCount": 0,
      "rowsIncrementPercentage": 0,
      "rowLastUpdatedAt": null,
      "rowLastCreatedAt": null,
      "updatedAt": "2023-08-28T08:00:04.000Z",
      "createdAt": "2023-08-28T08:00:04.000Z"
    },
    "filters": []
  }
}

Create a record in a database

POST https://api.jelou.ai/v2/databases/DATABASE_ID/rows

Path Parameters

Name
Type
Description

DATABASE_ID*

String

Database ID

Query Parameters

Name
Type
Description

limit

Number

Number of records to retrieve

page

NUmber

Page number to retrieve

Request Body

Name
Type
Description

fields*

String

Fields that the record will have to insert

{
  "message": [
    "Row inserted successfully!"
  ],
  "statusMessage": "success",
  "status": 1,
  "data": {
    "total": "123",
    "name": "Jelou",
    "phone": "593987592790",
    "referenceId": "593987592790",
    "city": "Guayaquil",
    "createdAt": "2023-04-20T22:07:27.640Z",
    "updatedAt": "2023-04-20T22:07:27.640Z",
    "_id": "d3987f23-631b-4eeb-b5b2-3369b687e922"
  }
}

CRUD of a record in Datum

For the following requests, the record ID is necessary. The record ID is represented by the "_id" field in all operations. This ID is unique and is generated upon record creation.

Get a record by ID

GET https://api.jelou.ai/v2/databases/DATABASE_ID/rows/ROW_ID

Path Parameters

Name
Type
Description

DATABASE_ID*

String

Database ID

ROW_ID*

String

Row ID

{
  "message": [
    "Row show successfully!"
  ],
  "statusMessage": "success",
  "status": 1,
  "data": {
    "total": "123",
    "name": "Jelou",
    "phone": "593987592790",
    "referenceId": "593987592790",
    "city": "Guayaquil",
    "createdAt": "2023-04-20T22:07:27.640Z",
    "updatedAt": "2023-04-20T22:07:27.640Z",
    "_id": "d3987f23-631b-4eeb-b5b2-3369b687e922"
  }
}

Update a record by ID

PUT https://api.jelou.ai/v2/databases/DATABASE_ID/rows/ROW_ID

Path Parameters

Name
Type
Description

DATABASE_ID*

String

Database ID

ROW_ID*

String

Row ID

Request Body

Name
Type
Description

fields*

String

Fields to be updated

{
  "message": [
    "Row show successfully!"
  ],
  "statusMessage": "success",
  "status": 1,
  "data": {
    "total": "123",
    "name": "Jelou",
    "phone": "593987592790",
    "referenceId": "593987592790",
    "city": "Guayaquil",
    "createdAt": "2023-04-20T22:07:27.640Z",
    "updatedAt": "2023-04-20T22:07:27.640Z",
    "_id": "d3987f23-631b-4eeb-b5b2-3369b687e922"
  }
}

Delete a record by ID

DELETE https://api.jelou.ai/v2/databases/DATABASE_ID/rows/ROW_ID

Path Parameters

Name
Type
Description

DATABASE_ID*

String

Database ID

ROW_ID*

String

Row ID

{
    "message": [
        "Row deleted successfully!"
    ],
    "statusMessage": "success",
    "status": 1,
    "data": {
        "_id": "119853ec-82d3-4528-990b-ad2eed63b263"
    }
}

Database structure

Field
Type
Description

id

String

Database ID

name

String

Database name

description

String

Database description

schema

Object

Database schema, for more information, check schema structure.

state

Boolean

Database state. True=Active| False =Deleted

createdAt

Date

Database creation date

updatedAt

Date

Database update date

columns

Array

Database columns. Name, description, and order information to present on Datum.

metadata

Array

Database metadata. Metadata to be presented in Datum

Schema structure

Field
Type
Description

type

String

Scheme type

required

Array

Array of Strings, the fields that are mandatory to insert a record are defined.

properties

Object

Each element is a field in the database, and within each field, 'type' defines the data type of the element.

Last updated