Browse Source

feat: add table row count api

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/1716/head
Pranav C 3 years ago
parent
commit
602439254c
  1. 14
      packages/nocodb/src/lib/noco/meta/api/dataApis/dataAliasApis.ts
  2. 61
      scripts/sdk/swagger.json

14
packages/nocodb/src/lib/noco/meta/api/dataApis/dataAliasApis.ts

@ -134,6 +134,16 @@ router.get(
'/api/v1/db/data/:orgs/:projectName/:tableName',
ncMetaAclMw(dataList, 'dataList')
);
router.get(
'/api/v1/db/data/:orgs/:projectName/:tableName/count',
ncMetaAclMw(dataCount, 'dataCount')
);
router.get(
'/api/v1/db/data/:orgs/:projectName/:tableName/views/:viewName/count',
ncMetaAclMw(dataCount, 'dataCount')
);
router.get(
'/api/v1/db/data/:orgs/:projectName/:tableName/:rowId',
ncMetaAclMw(dataRead, 'dataRead')
@ -157,10 +167,6 @@ router.get(
'/api/v1/db/data/:orgs/:projectName/:tableName/views/:viewName',
ncMetaAclMw(dataList, 'dataList')
);
router.get(
'/api/v1/db/data/:orgs/:projectName/:tableName/views/:viewName/count',
ncMetaAclMw(dataCount, 'dataCount')
);
router.post(
'/api/v1/db/data/:orgs/:projectName/:tableName',

61
scripts/sdk/swagger.json

@ -2521,6 +2521,67 @@
}
}
},
"/api/v1/db/data/{orgs}/{projectName}/{tableName}/count": {
"parameters": [
{
"schema": {
"type": "string"
},
"name": "orgs",
"in": "path",
"required": true
},
{
"schema": {
"type": "string"
},
"name": "projectName",
"in": "path",
"required": true
},
{
"schema": {
"type": "string"
},
"name": "tableName",
"in": "path",
"required": true
}
],
"get": {
"summary": "",
"operationId": "db-table-row-count",
"description": "",
"tags": [
"DB table row"
],
"parameters": [
{
"schema": {
"type": "string"
},
"in": "query",
"name": "where"
},
{
"schema": {},
"in": "query",
"name": "nested",
"description": "Query params for nested data"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {}
}
}
}
}
}
},
"/api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}": {
"parameters": [
{

Loading…
Cancel
Save