Enapso REST API
npm install @marcelbraun/enapso-api``json``
{
"meta": {
"schema": "Test",
"cls": "Test"
},
"records": [
{
"rid": 1,
"text": "This is a new record!"
}
]
}
In case of success:
{
"status": 200,
"op": "create",
"count": 1,
"message": "ok",
"success": true
}
To read individuals from the api, your application needs to pass the `schema` and the `class`.`
Th read the data in pages, you optionally can pass an offset` and a `limit` parameter.
`json``
{
"meta": {
"schema": "Test",
"cls": "Test",
"offset": 0,
"limit": 2
}
}
actionMethods:
{
"create": "POST",
"read": "POST",
"update": "POST",
"destroy": "POST"
}
headers:
{
"Content-Type": "application/json"
}
api:
{
read: 'http://localhost:3000/read',
update: 'http://localhost:300/update',
create: 'http://localhost:300/create',
destroy: 'http://localhost:3000/delete'
}
extraParams:
{
"meta": {
"schema": "Test",
"cls": "Test"
}
}
rootProperty: 'records'
rootProperty: 'records'