When you create a new table, CRUD API for it is automatically accessible via API, with no line of code.

API Service Usage:

1. GET: equivalent with SQL SELECT from entity

Example: GET https://{host}/seed/api/?table={entity name}&limit={number of records to be returned}
or: GET https://{host}/seed/api/?table={entity name}&id={value of PK to be selected}

Parameters:
table = entity name. To return all tables use *
id = the value of the PK to be returned
whereAttr = where clause attribute
whereValue = where clause value
whereClause = where clause: default is EQUAL, but it can be LIKE
limit = the number of records to be returned (no default)
scope = scope: select (default), create (returns CREATE TABLE statement)


2. POST: equivalent with INSERT, for one or more records

Example: POST https://{host}/seed/api/?table={entity name}
with a request body containig a JSON with the structure returned by GET method.

Parameters:
table = entity name (MANDATORY)
body = JSON with the structure returned by GET method


3. PUT: equivalent with UPDATE, for one or more records

Same parameterization like POST


4. DELETE:

Example: DELETE https://{host}/seed/api/?table={entity name}&id={value of PK to be selected}
or it can be called by sending a JSON body containing the PK values that should be deleted.

Parameters:
table = Entity name. To return all tables use *
id = The value of the PK to be returned




NEXT STEPS:


🌱 INSTALL DATA-SEED → 🌾 CREATE FIRST APP → 🎓 LEARN FROM TUTORIAL








Home  |  Terms of use  |  Why DATA-SEED?  |  🕮 The Story