Published Class APIs

The server automatically publishes API for each table. These APIs are secure and published using security policies. For example, an API may or may not be permitted to be called by a UI client (or any other internet client).

We will now describe these APIs below for the following class "class1" whose data source is a "ds1".

{
    "name" : "class1",
    "attributes" : [
      {
        "name" : "id",
        "type" : "biginteger",
        "persistent" : true,
        "primaryKey" : true,
        "systemAttr" : true
      },
      {
        "name" : "name",
        "type" : "string",
        "persistent" : true
      },
      {
        "name" : "createdAt",
        "type" : "biginteger",
        "persistent" : true,
        "systemAttr" : true
      },
      {
        "name" : "updatedAt",
        "type" : "biginteger",
        "persistent" : true,
        "systemAttr" : true
      },
      {
        "name" : "deleted",
        "type" : "boolean",
        "persistent" : true,
        "systemAttr" : true
      },
      {
        "name" : "deletedAt",
        "type" : "biginteger",
        "persistent" : true,
        "systemAttr" : true
      }
    ],
    "displayName" : "Class for My Objects",
    "nameInDS" : "class1_tbl",
    "primaryKeyGenerator" : "serial",
    "tableCreateable" : true
  }

DELETE /ds/delete/app1/ds1/class1

Delete Object

Parameters
Name Located in Description Required Schema
id query id Yes string
permanent query permanent No string

POST /ds/deleteAll/app1/ds1/class1

Delete All

Parameters
Name Located in Description Required Schema
permanent query permanent No string
ids body ids Yes string

DELETE /ds/deleteByQuery/app1/ds1/class1

Delete By Query

Parameters
Name Located in Description Required Schema
query query query No string
permanent query permanent No string

GET /ds/object/app1/ds1/class1

Get Object

Parameters
Name Located in Description Required Schema
id query id No string

GET /ds/objectwithassociation/app1/ds1/class1

Get Object With Association

Parameters
Name Located in Description Required Schema
id query id No string
assocName query association Name No string

POST /ds/objects/app1/ds1/class1

Get Objects

Parameters
Name Located in Description Required Schema
ids body ids Yes string

GET /ds/objectsbyquery/app1/ds1/class1

Get Objects By Query

Parameters
Name Located in Description Required Schema
query query query No string

GET /ds/objectsbyquerywithassociation/app1/ds1/class1

Get Objects By Query With Association

Parameters
Name Located in Description Required Schema
query query query No string
assocName query association Name No string

POST /ds/page/app1/ds1

Get Page

Parameters
Name Located in Description Required Schema
request body request Yes DataRequest

POST /ds/save/app1/ds1/class1

Save Object

Parameters
Name Located in Description Required Schema
obj body obj Yes object

POST /ds/saveAll/app1/ds1/class1

Save All

Parameters
Name Located in Description Required Schema
objs body objs Yes object

POST /ds/update/app1/ds1/class1

Update Object

Parameters
Name Located in Description Required Schema
params body params Yes UpdateRequest

POST /ds/updateOne/app1/ds1/class1

Update One Attribute of an Object

Parameters
Name Located in Description Required Schema
params body params Yes UpdateOneRequest

POST /ds/saveObjectWithAssociation/app1/ds1/class1

Save an object with specific association

Parameters
Name Located in Description Required Schema
assocName query association Name Yes string
deleteOld query delete old associated data No string
obj body obj Yes object

POST /ds/saveObjectsWithAssociation/app1/ds1/class1

Save Multiple Objects with Association

Parameters
Name Located in Description Required Schema
assocName query association name Yes string
deleteOld query delete old associated data No string
obj body obj Yes object

POST /ds/saveSnapshot/app1/ds1/class1

Summary:

Save Object's Snapshot

Parameters
Name Located in Description Required Schema
obj body obj Yes SnapshotRequest

GET /ds/snapshot/app1/ds1/class1

Summary:

Get Snapshot of Object

Parameters
Name Located in Description Required Schema
snapKey query snapKey Yes string
sourceId query sourceId No string

POST /ds/sqltemplate/app1/ds1

Summary:

Execute SQL using its Template

Parameters
Name Located in Description Required Schema
request body request Yes SQLTemplateRequest

POST /ds/objectgraph/app1/ds1

Summary:

Retrieve Object Graph

Parameters
Name Located in Description Required Schema
request body request Yes ObjectGraphRequest

Responses

Code Description Schema
200 OK object
201 Created
401 Unauthorized
403 Forbidden
404 Not Found

Models

DataRequest

Name Type Description Required
className string No
groupBy string No
having string No
orderBy string No
size integer No
start integer No
where string No

UpdateRequest

Name Type Description Required
attrName string No
attrValue object No
ids string No

UpdateOneRequest

Name Type Description Required
attrName string No
attrValue object No
id string No

SQLTemplateRequest

Name Type Description Required
className string No
sqlTemplate string No
size integer No
start integer No

SnapshotRequest

Name Type Description Required
sourceId string No
snapKey string No
sourceObject object No

ObjectGraphRequest

Name Type Description Required
className string No
children object No
id string No
query string No