diff --git a/packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue b/packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue index 93287875ee..49bb750e80 100644 --- a/packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue +++ b/packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue @@ -514,7 +514,7 @@ const projectDelete = () => { @click.stop=" () => { $e('c:base:api-docs') - openLink(`/api/v1/meta/bases/${base.id}/swagger`, appInfo.ncSiteUrl) + openLink(`/api/v1/db/meta/projects/${base.id}/swagger`, appInfo.ncSiteUrl) } " > diff --git a/packages/nc-gui/components/dlg/AirtableImport.vue b/packages/nc-gui/components/dlg/AirtableImport.vue index d32565d966..769f776db2 100644 --- a/packages/nc-gui/components/dlg/AirtableImport.vue +++ b/packages/nc-gui/components/dlg/AirtableImport.vue @@ -125,14 +125,14 @@ async function createOrUpdate() { const { id, ...payload } = syncSource.value if (id !== '') { - await $fetch(`/api/v1/meta/syncs/${id}`, { + await $fetch(`/api/v1/db/meta/syncs/${id}`, { baseURL, method: 'PATCH', headers: { 'xc-auth': $state.token.value as string }, body: payload, }) } else { - syncSource.value = await $fetch(`/api/v1/meta/bases/${baseId}/syncs/${sourceId}`, { + syncSource.value = await $fetch(`/api/v1/db/meta/projects/${baseId}/syncs/${sourceId}`, { baseURL, method: 'POST', headers: { 'xc-auth': $state.token.value as string }, @@ -184,7 +184,7 @@ async function listenForUpdates() { } async function loadSyncSrc() { - const data: any = await $fetch(`/api/v1/meta/bases/${baseId}/syncs/${sourceId}`, { + const data: any = await $fetch(`/api/v1/db/meta/projects/${baseId}/syncs/${sourceId}`, { baseURL, method: 'GET', headers: { 'xc-auth': $state.token.value as string }, @@ -226,7 +226,7 @@ async function loadSyncSrc() { async function sync() { try { - await $fetch(`/api/v1/meta/syncs/${syncSource.value.id}/trigger`, { + await $fetch(`/api/v1/db/meta/syncs/${syncSource.value.id}/trigger`, { baseURL, method: 'POST', headers: { 'xc-auth': $state.token.value as string }, @@ -245,7 +245,7 @@ async function abort() { "This is a highly experimental feature and only marks job as not started, please don't abort the job unless you are sure job is stuck.", onOk: async () => { try { - await $fetch(`/api/v1/meta/syncs/${syncSource.value.id}/abort`, { + await $fetch(`/api/v1/db/meta/syncs/${syncSource.value.id}/abort`, { baseURL, method: 'POST', headers: { 'xc-auth': $state.token.value as string }, diff --git a/packages/nc-gui/components/general/HelpAndSupport.vue b/packages/nc-gui/components/general/HelpAndSupport.vue index c65e699e81..3e79d20485 100644 --- a/packages/nc-gui/components/general/HelpAndSupport.vue +++ b/packages/nc-gui/components/general/HelpAndSupport.vue @@ -10,7 +10,7 @@ const { base } = storeToRefs(useBase()) const route = useRoute() const openSwaggerLink = () => { - openLink(`./api/v1/meta/bases/${route.params.baseId}/swagger`, appInfo.value.ncSiteUrl) + openLink(`./api/v1/db/meta/projects/${route.params.baseId}/swagger`, appInfo.value.ncSiteUrl) } diff --git a/packages/nc-gui/components/smartsheet/ApiSnippet.vue b/packages/nc-gui/components/smartsheet/ApiSnippet.vue index a801d29bd4..247c97f127 100644 --- a/packages/nc-gui/components/smartsheet/ApiSnippet.vue +++ b/packages/nc-gui/components/smartsheet/ApiSnippet.vue @@ -84,7 +84,7 @@ const selectedLangName = ref(langs[0].name) const apiUrl = computed( () => new URL( - `/api/v1/data/noco/${base.value.id}/${meta.value?.title}/views/${view.value?.title}`, + `/api/v1/db/data/noco/${base.value.id}/${meta.value?.title}/views/${view.value?.title}`, (appInfo.value && appInfo.value.ncSiteUrl) || '/', ).href, ) diff --git a/packages/nc-gui/components/smartsheet/details/Api.vue b/packages/nc-gui/components/smartsheet/details/Api.vue index 8c6f688fd3..b8eeec06ce 100644 --- a/packages/nc-gui/components/smartsheet/details/Api.vue +++ b/packages/nc-gui/components/smartsheet/details/Api.vue @@ -84,7 +84,7 @@ const selectedLangName = ref(langs[0].name) const apiUrl = computed( () => new URL( - `/api/v1/data/noco/${base.value?.id}/${meta.value?.title}/views/${view.value?.title}`, + `/api/v1/db/data/noco/${base.value?.id}/${meta.value?.title}/views/${view.value?.title}`, (appInfo.value && appInfo.value.ncSiteUrl) || '/', ).href, ) diff --git a/packages/nocodb/src/controllers/api-docs/api-docs.controller.ts b/packages/nocodb/src/controllers/api-docs/api-docs.controller.ts index 6e208db8d3..bea1aadefb 100644 --- a/packages/nocodb/src/controllers/api-docs/api-docs.controller.ts +++ b/packages/nocodb/src/controllers/api-docs/api-docs.controller.ts @@ -20,7 +20,7 @@ export class ApiDocsController { @Get([ '/api/v1/db/meta/projects/:baseId/swagger.json', - '/api/v1/meta/bases/:baseId/swagger.json', + '/api/v2/meta/bases/:baseId/swagger.json', ]) @UseGuards(MetaApiLimiterGuard, GlobalGuard) @Acl('swaggerJson') @@ -34,7 +34,7 @@ export class ApiDocsController { } @Get([ - '/api/v1/meta/bases/:baseId/swagger', + '/api/v2/meta/bases/:baseId/swagger', '/api/v1/db/meta/projects/:baseId/swagger', ]) @UseGuards(PublicApiLimiterGuard) @@ -45,7 +45,7 @@ export class ApiDocsController { @UseGuards(PublicApiLimiterGuard) @Get([ '/api/v1/db/meta/projects/:baseId/redoc', - '/api/v1/meta/bases/:baseId/redoc', + '/api/v2/meta/bases/:baseId/redoc', ]) redocHtml(@Param('baseId') baseId: string, @Response() res) { res.send(getRedocHtml({ ncSiteUrl: process.env.NC_PUBLIC_URL || '' })); diff --git a/packages/nocodb/src/controllers/api-tokens.controller.ts b/packages/nocodb/src/controllers/api-tokens.controller.ts index 78f4e34e2e..2d76a190eb 100644 --- a/packages/nocodb/src/controllers/api-tokens.controller.ts +++ b/packages/nocodb/src/controllers/api-tokens.controller.ts @@ -22,7 +22,7 @@ export class ApiTokensController { @Get([ '/api/v1/db/meta/projects/:baseId/api-tokens', - '/api/v1/meta/bases/:baseId/api-tokens', + '/api/v2/meta/bases/:baseId/api-tokens', ]) @Acl('baseApiTokenList') async apiTokenList(@Request() req) { @@ -33,7 +33,7 @@ export class ApiTokensController { @Post([ '/api/v1/db/meta/projects/:baseId/api-tokens', - '/api/v1/meta/bases/:baseId/api-tokens', + '/api/v2/meta/bases/:baseId/api-tokens', ]) @HttpCode(200) @Acl('baseApiTokenCreate') @@ -46,7 +46,7 @@ export class ApiTokensController { @Delete([ '/api/v1/db/meta/projects/:baseId/api-tokens/:token', - '/api/v1/meta/bases/:baseId/api-tokens/:token', + '/api/v2/meta/bases/:baseId/api-tokens/:token', ]) @Acl('baseApiTokenDelete') async apiTokenDelete(@Request() req, @Param('token') token: string) { diff --git a/packages/nocodb/src/controllers/attachments-secure.controller.ts b/packages/nocodb/src/controllers/attachments-secure.controller.ts index 49e95821c3..dc04954946 100644 --- a/packages/nocodb/src/controllers/attachments-secure.controller.ts +++ b/packages/nocodb/src/controllers/attachments-secure.controller.ts @@ -26,7 +26,7 @@ export class AttachmentsSecureController { constructor(private readonly attachmentsService: AttachmentsService) {} @UseGuards(MetaApiLimiterGuard, GlobalGuard) - @Post(['/api/v1/db/storage/upload', '/api/v1/storage/upload']) + @Post(['/api/v1/db/storage/upload', '/api/v2/storage/upload']) @HttpCode(200) @UseInterceptors(UploadAllowedInterceptor, AnyFilesInterceptor()) async upload(@UploadedFiles() files: Array, @Request() req) { @@ -40,7 +40,7 @@ export class AttachmentsSecureController { return attachments; } - @Post(['/api/v1/db/storage/upload-by-url', '/api/v1/storage/upload-by-url']) + @Post(['/api/v1/db/storage/upload-by-url', '/api/v2/storage/upload-by-url']) @HttpCode(200) @UseInterceptors(UploadAllowedInterceptor) @UseGuards(MetaApiLimiterGuard, GlobalGuard) diff --git a/packages/nocodb/src/controllers/attachments.controller.ts b/packages/nocodb/src/controllers/attachments.controller.ts index 4c0cdc9923..8b75a228d5 100644 --- a/packages/nocodb/src/controllers/attachments.controller.ts +++ b/packages/nocodb/src/controllers/attachments.controller.ts @@ -25,7 +25,7 @@ export class AttachmentsController { constructor(private readonly attachmentsService: AttachmentsService) {} @UseGuards(MetaApiLimiterGuard, GlobalGuard) - @Post(['/api/v1/db/storage/upload', '/api/v1/storage/upload']) + @Post(['/api/v1/db/storage/upload', '/api/v2/storage/upload']) @HttpCode(200) @UseInterceptors(UploadAllowedInterceptor, AnyFilesInterceptor()) async upload( @@ -41,7 +41,7 @@ export class AttachmentsController { return attachments; } - @Post(['/api/v1/db/storage/upload-by-url', '/api/v1/storage/upload-by-url']) + @Post(['/api/v1/db/storage/upload-by-url', '/api/v2/storage/upload-by-url']) @HttpCode(200) @UseInterceptors(UploadAllowedInterceptor) @UseGuards(MetaApiLimiterGuard, GlobalGuard) diff --git a/packages/nocodb/src/controllers/audits.controller.ts b/packages/nocodb/src/controllers/audits.controller.ts index 43ef136ccd..1e21690de8 100644 --- a/packages/nocodb/src/controllers/audits.controller.ts +++ b/packages/nocodb/src/controllers/audits.controller.ts @@ -21,7 +21,7 @@ import { MetaApiLimiterGuard } from '~/guards/meta-api-limiter.guard'; export class AuditsController { constructor(private readonly auditsService: AuditsService) {} - @Post(['/api/v1/db/meta/audits/comments', '/api/v1/meta/audits/comments']) + @Post(['/api/v1/db/meta/audits/comments', '/api/v2/meta/audits/comments']) @HttpCode(200) @Acl('commentRow') async commentRow(@Request() req) { @@ -33,7 +33,7 @@ export class AuditsController { @Post([ '/api/v1/db/meta/audits/rows/:rowId/update', - '/api/v1/meta/audits/rows/:rowId/update', + '/api/v2/meta/audits/rows/:rowId/update', ]) @HttpCode(200) @Acl('auditRowUpdate') @@ -44,7 +44,7 @@ export class AuditsController { }); } - @Get(['/api/v1/db/meta/audits/comments', '/api/v1/meta/audits/comments']) + @Get(['/api/v1/db/meta/audits/comments', '/api/v2/meta/audits/comments']) @Acl('commentList') async commentList(@Request() req) { return new PagedResponseImpl( @@ -54,7 +54,7 @@ export class AuditsController { @Patch([ '/api/v1/db/meta/audits/:auditId/comment', - '/api/v1/meta/audits/:auditId/comment', + '/api/v2/meta/audits/:auditId/comment', ]) @Acl('commentUpdate') async commentUpdate( @@ -71,7 +71,7 @@ export class AuditsController { @Get([ '/api/v1/db/meta/projects/:baseId/audits/', - '/api/v1/meta/bases/:baseId/audits/', + '/api/v2/meta/bases/:baseId/audits/', ]) @Acl('auditList') async auditList(@Request() req, @Param('baseId') baseId: string) { @@ -89,7 +89,7 @@ export class AuditsController { @Get([ '/api/v1/db/meta/audits/comments/count', - '/api/v1/meta/audits/comments/count', + '/api/v2/meta/audits/comments/count', ]) @Acl('commentsCount') async commentsCount( diff --git a/packages/nocodb/src/controllers/base-users.controller.ts b/packages/nocodb/src/controllers/base-users.controller.ts index c581b379bc..b32bae2ebe 100644 --- a/packages/nocodb/src/controllers/base-users.controller.ts +++ b/packages/nocodb/src/controllers/base-users.controller.ts @@ -24,7 +24,7 @@ export class BaseUsersController { @Get([ '/api/v1/db/meta/projects/:baseId/users', - '/api/v1/meta/bases/:baseId/users', + '/api/v2/meta/bases/:baseId/users', ]) @Acl('userList') async userList(@Param('baseId') baseId: string, @Request() req) { @@ -38,7 +38,7 @@ export class BaseUsersController { @Post([ '/api/v1/db/meta/projects/:baseId/users', - '/api/v1/meta/bases/:baseId/users', + '/api/v2/meta/bases/:baseId/users', ]) @HttpCode(200) @Acl('userInvite') @@ -60,7 +60,7 @@ export class BaseUsersController { @Patch([ '/api/v1/db/meta/projects/:baseId/users/:userId', - '/api/v1/meta/bases/:baseId/users/:userId', + '/api/v2/meta/bases/:baseId/users/:userId', ]) @Acl('baseUserUpdate') async baseUserUpdate( @@ -85,7 +85,7 @@ export class BaseUsersController { @Delete([ '/api/v1/db/meta/projects/:baseId/users/:userId', - '/api/v1/meta/bases/:baseId/users/:userId', + '/api/v2/meta/bases/:baseId/users/:userId', ]) @Acl('baseUserDelete') async baseUserDelete( @@ -105,7 +105,7 @@ export class BaseUsersController { @Post([ '/api/v1/db/meta/projects/:baseId/users/:userId/resend-invite', - '/api/v1/meta/bases/:baseId/users/:userId/resend-invite', + '/api/v2/meta/bases/:baseId/users/:userId/resend-invite', ]) @HttpCode(200) @Acl('baseUserInviteResend') @@ -128,7 +128,7 @@ export class BaseUsersController { @Patch([ '/api/v1/db/meta/projects/:baseId/user', - '/api/v1/meta/bases/:baseId/user', + '/api/v2/meta/bases/:baseId/user', ]) @Acl('baseUserMetaUpdate') async baseUserMetaUpdate( diff --git a/packages/nocodb/src/controllers/bases.controller.ts b/packages/nocodb/src/controllers/bases.controller.ts index 3f3e75a2b1..d90b3dc5d2 100644 --- a/packages/nocodb/src/controllers/bases.controller.ts +++ b/packages/nocodb/src/controllers/bases.controller.ts @@ -31,7 +31,7 @@ export class BasesController { @Acl('baseList', { scope: 'org', }) - @Get(['/api/v1/db/meta/projects/', '/api/v1/meta/bases/']) + @Get(['/api/v1/db/meta/projects/', '/api/v2/meta/bases/']) async list(@Query() queryParams: Record, @Request() req) { const bases = await this.projectsService.baseList({ user: req.user, @@ -46,7 +46,7 @@ export class BasesController { @Acl('baseInfoGet') @Get([ '/api/v1/db/meta/projects/:baseId/info', - '/api/v1/meta/bases/:baseId/info', + '/api/v2/meta/bases/:baseId/info', ]) async baseInfoGet() { return { @@ -60,7 +60,7 @@ export class BasesController { } @Acl('baseGet') - @Get(['/api/v1/db/meta/projects/:baseId', '/api/v1/meta/bases/:baseId']) + @Get(['/api/v1/db/meta/projects/:baseId', '/api/v2/meta/bases/:baseId']) async baseGet(@Param('baseId') baseId: string) { const base = await this.projectsService.getProjectWithInfo({ baseId: baseId, @@ -72,7 +72,7 @@ export class BasesController { } @Acl('baseUpdate') - @Patch(['/api/v1/db/meta/projects/:baseId', '/api/v1/meta/bases/:baseId']) + @Patch(['/api/v1/db/meta/projects/:baseId', '/api/v2/meta/bases/:baseId']) async baseUpdate( @Param('baseId') baseId: string, @Body() body: Record, @@ -88,7 +88,7 @@ export class BasesController { } @Acl('baseDelete') - @Delete(['/api/v1/db/meta/projects/:baseId', '/api/v1/meta/bases/:baseId']) + @Delete(['/api/v1/db/meta/projects/:baseId', '/api/v2/meta/bases/:baseId']) async baseDelete(@Param('baseId') baseId: string, @Request() req) { const deleted = await this.projectsService.baseSoftDelete({ baseId, @@ -101,7 +101,7 @@ export class BasesController { @Acl('baseCreate', { scope: 'org', }) - @Post(['/api/v1/db/meta/projects', '/api/v1/meta/bases']) + @Post(['/api/v1/db/meta/projects', '/api/v2/meta/bases']) @HttpCode(200) async baseCreate(@Body() baseBody: ProjectReqType, @Request() req) { const base = await this.projectsService.baseCreate({ @@ -115,7 +115,7 @@ export class BasesController { @Acl('hasEmptyOrNullFilters') @Get([ '/api/v1/db/meta/projects/:baseId/has-empty-or-null-filters', - '/api/v1/meta/bases/:baseId/has-empty-or-null-filters', + '/api/v2/meta/bases/:baseId/has-empty-or-null-filters', ]) async hasEmptyOrNullFilters(@Param('baseId') baseId: string) { return await Filter.hasEmptyOrNullFilters(baseId); diff --git a/packages/nocodb/src/controllers/bulk-data-alias.controller.ts b/packages/nocodb/src/controllers/bulk-data-alias.controller.ts index 1e0c13ef50..90cbd51c28 100644 --- a/packages/nocodb/src/controllers/bulk-data-alias.controller.ts +++ b/packages/nocodb/src/controllers/bulk-data-alias.controller.ts @@ -20,10 +20,7 @@ import { DataApiLimiterGuard } from '~/guards/data-api-limiter.guard'; export class BulkDataAliasController { constructor(private bulkDataAliasService: BulkDataAliasService) {} - @Post([ - '/api/v1/db/data/bulk/:orgs/:baseName/:tableName', - '/api/v1/data/bulk/:orgs/:baseName/:tableName', - ]) + @Post(['/api/v1/db/data/bulk/:orgs/:baseName/:tableName']) @HttpCode(200) @Acl('bulkDataInsert') async bulkDataInsert( @@ -43,10 +40,7 @@ export class BulkDataAliasController { res.json(exists); } - @Patch([ - '/api/v1/db/data/bulk/:orgs/:baseName/:tableName', - '/api/v1/data/bulk/:orgs/:baseName/:tableName', - ]) + @Patch(['/api/v1/db/data/bulk/:orgs/:baseName/:tableName']) @Acl('bulkDataUpdate') async bulkDataUpdate( @Request() req, @@ -63,10 +57,7 @@ export class BulkDataAliasController { } // todo: Integrate with filterArrJson bulkDataUpdateAll - @Patch([ - '/api/v1/db/data/bulk/:orgs/:baseName/:tableName/all', - '/api/v1/data/bulk/:orgs/:baseName/:tableName/all', - ]) + @Patch(['/api/v1/db/data/bulk/:orgs/:baseName/:tableName/all']) @Acl('bulkDataUpdateAll') async bulkDataUpdateAll( @Request() req, @@ -83,10 +74,7 @@ export class BulkDataAliasController { }); } - @Delete([ - '/api/v1/db/data/bulk/:orgs/:baseName/:tableName', - '/api/v1/data/bulk/:orgs/:baseName/:tableName', - ]) + @Delete(['/api/v1/db/data/bulk/:orgs/:baseName/:tableName']) @Acl('bulkDataDelete') async bulkDataDelete( @Request() req, @@ -104,10 +92,7 @@ export class BulkDataAliasController { // todo: Integrate with filterArrJson bulkDataDeleteAll - @Delete([ - '/api/v1/db/data/bulk/:orgs/:baseName/:tableName/all', - '/api/v1/data/bulk/:orgs/:baseName/:tableName/all', - ]) + @Delete(['/api/v1/db/data/bulk/:orgs/:baseName/:tableName/all']) @Acl('bulkDataDeleteAll') async bulkDataDeleteAll( @Request() req, diff --git a/packages/nocodb/src/controllers/caches.controller.ts b/packages/nocodb/src/controllers/caches.controller.ts index 41c3ba22c0..4295b57dbe 100644 --- a/packages/nocodb/src/controllers/caches.controller.ts +++ b/packages/nocodb/src/controllers/caches.controller.ts @@ -10,7 +10,7 @@ import { MetaApiLimiterGuard } from '~/guards/meta-api-limiter.guard'; export class CachesController { constructor(private readonly cachesService: CachesService) {} - @Get(['/api/v1/db/meta/cache', '/api/v1/meta/cache']) + @Get(['/api/v1/db/meta/cache', '/api/v2/meta/cache']) @Acl('cacheGet', { scope: 'org', allowedRoles: [OrgUserRoles.SUPER_ADMIN], @@ -25,7 +25,7 @@ export class CachesController { return JSON.stringify(data); } - @Delete(['/api/v1/db/meta/cache', '/api/v1/meta/cache']) + @Delete(['/api/v1/db/meta/cache', '/api/v2/meta/cache']) @Acl('cacheDelete', { scope: 'org', allowedRoles: [OrgUserRoles.SUPER_ADMIN], diff --git a/packages/nocodb/src/controllers/columns.controller.ts b/packages/nocodb/src/controllers/columns.controller.ts index 5404c7b0ee..deccc874e9 100644 --- a/packages/nocodb/src/controllers/columns.controller.ts +++ b/packages/nocodb/src/controllers/columns.controller.ts @@ -24,7 +24,7 @@ export class ColumnsController { @Post([ '/api/v1/db/meta/tables/:tableId/columns/', - '/api/v1/meta/tables/:tableId/columns/', + '/api/v2/meta/tables/:tableId/columns/', ]) @HttpCode(200) @Acl('columnAdd') @@ -43,7 +43,7 @@ export class ColumnsController { @Patch([ '/api/v1/db/meta/columns/:columnId', - '/api/v1/meta/columns/:columnId', + '/api/v2/meta/columns/:columnId', ]) @Acl('columnUpdate') async columnUpdate( @@ -61,7 +61,7 @@ export class ColumnsController { @Delete([ '/api/v1/db/meta/columns/:columnId', - '/api/v1/meta/columns/:columnId', + '/api/v2/meta/columns/:columnId', ]) @Acl('columnDelete') async columnDelete(@Param('columnId') columnId: string, @Request() req: any) { @@ -72,7 +72,7 @@ export class ColumnsController { }); } - @Get(['/api/v1/db/meta/columns/:columnId', '/api/v1/meta/columns/:columnId']) + @Get(['/api/v1/db/meta/columns/:columnId', '/api/v2/meta/columns/:columnId']) @Acl('columnGet') async columnGet(@Param('columnId') columnId: string) { return await this.columnsService.columnGet({ columnId }); @@ -80,7 +80,7 @@ export class ColumnsController { @Post([ '/api/v1/db/meta/columns/:columnId/primary', - '/api/v1/meta/columns/:columnId/primary', + '/api/v2/meta/columns/:columnId/primary', ]) @HttpCode(200) @Acl('columnSetAsPrimary') @@ -90,7 +90,7 @@ export class ColumnsController { @Get([ '/api/v1/db/meta/tables/:tableId/columns/hash', - '/api/v1/meta/tables/:tableId/columns/hash', + '/api/v2/meta/tables/:tableId/columns/hash', ]) @Acl('columnsHash') async columnsHash(@Param('tableId') tableId: string) { @@ -99,7 +99,7 @@ export class ColumnsController { @Post([ '/api/v1/db/meta/tables/:tableId/columns/bulk', - '/api/v1/meta/tables/:tableId/columns/bulk', + '/api/v2/meta/tables/:tableId/columns/bulk', ]) @HttpCode(200) @Acl('columnBulk') diff --git a/packages/nocodb/src/controllers/data-alias-export.controller.ts b/packages/nocodb/src/controllers/data-alias-export.controller.ts index af23666678..0193b21292 100644 --- a/packages/nocodb/src/controllers/data-alias-export.controller.ts +++ b/packages/nocodb/src/controllers/data-alias-export.controller.ts @@ -15,8 +15,6 @@ export class DataAliasExportController { @Get([ '/api/v1/db/data/:orgs/:baseName/:tableName/export/excel', '/api/v1/db/data/:orgs/:baseName/:tableName/views/:viewName/export/excel', - '/api/v1/data/:orgs/:baseName/:tableName/export/excel', - '/api/v1/data/:orgs/:baseName/:tableName/views/:viewName/export/excel', ]) @Acl('exportExcel') async excelDataExport(@Request() req, @Response() res) { @@ -44,8 +42,6 @@ export class DataAliasExportController { @Get([ '/api/v1/db/data/:orgs/:baseName/:tableName/views/:viewName/export/csv', '/api/v1/db/data/:orgs/:baseName/:tableName/export/csv', - '/api/v1/data/:orgs/:baseName/:tableName/views/:viewName/export/csv', - '/api/v1/data/:orgs/:baseName/:tableName/export/csv', ]) @Acl('exportCsv') async csvDataExport(@Request() req, @Response() res) { diff --git a/packages/nocodb/src/controllers/data-alias-nested.controller.ts b/packages/nocodb/src/controllers/data-alias-nested.controller.ts index c57a2a5d4d..616ac033ee 100644 --- a/packages/nocodb/src/controllers/data-alias-nested.controller.ts +++ b/packages/nocodb/src/controllers/data-alias-nested.controller.ts @@ -19,10 +19,7 @@ export class DataAliasNestedController { constructor(private dataAliasNestedService: DataAliasNestedService) {} // todo: handle case where the given column is not ltar - @Get([ - '/api/v1/db/data/:orgs/:baseName/:tableName/:rowId/mm/:columnName', - '/api/v1/data/:orgs/:baseName/:tableName/:rowId/mm/:columnName', - ]) + @Get(['/api/v1/db/data/:orgs/:baseName/:tableName/:rowId/mm/:columnName']) @Acl('mmList') async mmList( @Request() req, @@ -42,7 +39,6 @@ export class DataAliasNestedController { @Get([ '/api/v1/db/data/:orgs/:baseName/:tableName/:rowId/mm/:columnName/exclude', - '/api/v1/data/:orgs/:baseName/:tableName/:rowId/mm/:columnName/exclude', ]) @Acl('mmExcludedList') async mmExcludedList( @@ -63,7 +59,6 @@ export class DataAliasNestedController { @Get([ '/api/v1/db/data/:orgs/:baseName/:tableName/:rowId/hm/:columnName/exclude', - '/api/v1/data/:orgs/:baseName/:tableName/:rowId/hm/:columnName/exclude', ]) @Acl('hmExcludedList') async hmExcludedList( @@ -84,7 +79,6 @@ export class DataAliasNestedController { @Get([ '/api/v1/db/data/:orgs/:baseName/:tableName/:rowId/bt/:columnName/exclude', - '/api/v1/data/:orgs/:baseName/:tableName/:rowId/bt/:columnName/exclude', ]) @Acl('btExcludedList') async btExcludedList( @@ -105,10 +99,7 @@ export class DataAliasNestedController { // todo: handle case where the given column is not ltar - @Get([ - '/api/v1/db/data/:orgs/:baseName/:tableName/:rowId/hm/:columnName', - '/api/v1/data/:orgs/:baseName/:tableName/:rowId/hm/:columnName', - ]) + @Get(['/api/v1/db/data/:orgs/:baseName/:tableName/:rowId/hm/:columnName']) @Acl('hmList') async hmList( @Request() req, @@ -128,7 +119,6 @@ export class DataAliasNestedController { @Delete([ '/api/v1/db/data/:orgs/:baseName/:tableName/:rowId/:relationType/:columnName/:refRowId', - '/api/v1/data/:orgs/:baseName/:tableName/:rowId/:relationType/:columnName/:refRowId', ]) @Acl('relationDataRemove') async relationDataRemove( @@ -154,7 +144,6 @@ export class DataAliasNestedController { // todo: Give proper error message when reference row is already related and handle duplicate ref row id in hm @Post([ '/api/v1/db/data/:orgs/:baseName/:tableName/:rowId/:relationType/:columnName/:refRowId', - '/api/v1/data/:orgs/:baseName/:tableName/:rowId/:relationType/:columnName/:refRowId', ]) @Acl('relationDataAdd') @HttpCode(200) diff --git a/packages/nocodb/src/controllers/data-alias.controller.ts b/packages/nocodb/src/controllers/data-alias.controller.ts index 35880aeed4..24f70fab92 100644 --- a/packages/nocodb/src/controllers/data-alias.controller.ts +++ b/packages/nocodb/src/controllers/data-alias.controller.ts @@ -27,8 +27,6 @@ export class DataAliasController { @Get([ '/api/v1/db/data/:orgs/:baseName/:tableName', '/api/v1/db/data/:orgs/:baseName/:tableName/views/:viewName', - '/api/v1/data/:orgs/:baseName/:tableName', - '/api/v1/data/:orgs/:baseName/:tableName/views/:viewName', ]) @Acl('dataList') async dataList( @@ -61,8 +59,6 @@ export class DataAliasController { @Get([ '/api/v1/db/data/:orgs/:baseName/:tableName/find-one', '/api/v1/db/data/:orgs/:baseName/:tableName/views/:viewName/find-one', - '/api/v1/data/:orgs/:baseName/:tableName/find-one', - '/api/v1/data/:orgs/:baseName/:tableName/views/:viewName/find-one', ]) @Acl('dataFindOne') async dataFindOne( @@ -82,8 +78,6 @@ export class DataAliasController { @Get([ '/api/v1/db/data/:orgs/:baseName/:tableName/groupby', '/api/v1/db/data/:orgs/:baseName/:tableName/views/:viewName/groupby', - '/api/v1/data/:orgs/:baseName/:tableName/groupby', - '/api/v1/data/:orgs/:baseName/:tableName/views/:viewName/groupby', ]) @Acl('dataGroupBy') async dataGroupBy( @@ -103,8 +97,6 @@ export class DataAliasController { @Get([ '/api/v1/db/data/:orgs/:baseName/:tableName/count', '/api/v1/db/data/:orgs/:baseName/:tableName/views/:viewName/count', - '/api/v1/data/:orgs/:baseName/:tableName/count', - '/api/v1/data/:orgs/:baseName/:tableName/views/:viewName/count', ]) @Acl('dataCount') async dataCount( @@ -127,8 +119,6 @@ export class DataAliasController { @Post([ '/api/v1/db/data/:orgs/:baseName/:tableName', '/api/v1/db/data/:orgs/:baseName/:tableName/views/:viewName', - '/api/v1/data/:orgs/:baseName/:tableName', - '/api/v1/data/:orgs/:baseName/:tableName/views/:viewName', ]) @HttpCode(200) @Acl('dataInsert') @@ -153,8 +143,6 @@ export class DataAliasController { @Patch([ '/api/v1/db/data/:orgs/:baseName/:tableName/:rowId', '/api/v1/db/data/:orgs/:baseName/:tableName/views/:viewName/:rowId', - '/api/v1/data/:orgs/:baseName/:tableName/:rowId', - '/api/v1/data/:orgs/:baseName/:tableName/views/:viewName/:rowId', ]) @Acl('dataUpdate') async dataUpdate( @@ -179,8 +167,6 @@ export class DataAliasController { @Delete([ '/api/v1/db/data/:orgs/:baseName/:tableName/:rowId', '/api/v1/db/data/:orgs/:baseName/:tableName/views/:viewName/:rowId', - '/api/v1/data/:orgs/:baseName/:tableName/:rowId', - '/api/v1/data/:orgs/:baseName/:tableName/views/:viewName/:rowId', ]) @Acl('dataDelete') async dataDelete( @@ -202,8 +188,6 @@ export class DataAliasController { @Get([ '/api/v1/db/data/:orgs/:baseName/:tableName/:rowId', '/api/v1/db/data/:orgs/:baseName/:tableName/views/:viewName/:rowId', - '/api/v1/data/:orgs/:baseName/:tableName/:rowId', - '/api/v1/data/:orgs/:baseName/:tableName/views/:viewName/:rowId', ]) @Acl('dataRead') async dataRead( @@ -229,8 +213,6 @@ export class DataAliasController { @Get([ '/api/v1/db/data/:orgs/:baseName/:tableName/:rowId/exist', '/api/v1/db/data/:orgs/:baseName/:tableName/views/:viewName/:rowId/exist', - '/api/v1/data/:orgs/:baseName/:tableName/:rowId/exist', - '/api/v1/data/:orgs/:baseName/:tableName/views/:viewName/:rowId/exist', ]) @Acl('dataExist') async dataExist( @@ -257,8 +239,6 @@ export class DataAliasController { @Get([ '/api/v1/db/data/:orgs/:baseName/:tableName/group/:columnId', '/api/v1/db/data/:orgs/:baseName/:tableName/views/:viewName/group/:columnId', - '/api/v1/data/:orgs/:baseName/:tableName/group/:columnId', - '/api/v1/data/:orgs/:baseName/:tableName/views/:viewName/group/:columnId', ]) @Acl('groupedDataList') async groupedDataList( diff --git a/packages/nocodb/src/controllers/filters.controller.ts b/packages/nocodb/src/controllers/filters.controller.ts index 54e1c6618c..ceac2d4ebe 100644 --- a/packages/nocodb/src/controllers/filters.controller.ts +++ b/packages/nocodb/src/controllers/filters.controller.ts @@ -24,7 +24,7 @@ export class FiltersController { @Get([ '/api/v1/db/meta/views/:viewId/filters', - '/api/v1/meta/views/:viewId/filters', + '/api/v2/meta/views/:viewId/filters', ]) @Acl('filterList') async filterList(@Param('viewId') viewId: string) { @@ -37,7 +37,7 @@ export class FiltersController { @Post([ '/api/v1/db/meta/views/:viewId/filters', - '/api/v1/meta/views/:viewId/filters', + '/api/v2/meta/views/:viewId/filters', ]) @HttpCode(200) @Acl('filterCreate') @@ -56,7 +56,7 @@ export class FiltersController { @Post([ '/api/v1/db/meta/hooks/:hookId/filters', - '/api/v1/meta/hooks/:hookId/filters', + '/api/v2/meta/hooks/:hookId/filters', ]) @HttpCode(200) @Acl('hookFilterCreate') @@ -73,7 +73,7 @@ export class FiltersController { return filter; } - @Get(['/api/v1/db/meta/filters/:filterId', '/api/v1/meta/filters/:filterId']) + @Get(['/api/v1/db/meta/filters/:filterId', '/api/v2/meta/filters/:filterId']) @Acl('filterGet') async filterGet(@Param('filterId') filterId: string) { return await this.filtersService.filterGet({ filterId }); @@ -81,7 +81,7 @@ export class FiltersController { @Get([ '/api/v1/db/meta/filters/:filterParentId/children', - '/api/v1/meta/filters/:filterParentId/children', + '/api/v2/meta/filters/:filterParentId/children', ]) @Acl('filterChildrenList') async filterChildrenRead(@Param('filterParentId') filterParentId: string) { @@ -94,7 +94,7 @@ export class FiltersController { @Patch([ '/api/v1/db/meta/filters/:filterId', - '/api/v1/meta/filters/:filterId', + '/api/v2/meta/filters/:filterId', ]) @Acl('filterUpdate') async filterUpdate( @@ -112,7 +112,7 @@ export class FiltersController { @Delete([ '/api/v1/db/meta/filters/:filterId', - '/api/v1/meta/filters/:filterId', + '/api/v2/meta/filters/:filterId', ]) @Acl('filterDelete') async filterDelete(@Param('filterId') filterId: string, @Req() _req) { @@ -124,7 +124,7 @@ export class FiltersController { @Get([ '/api/v1/db/meta/hooks/:hookId/filters', - '/api/v1/meta/hooks/:hookId/filters', + '/api/v2/meta/hooks/:hookId/filters', ]) @Acl('hookFilterList') async hookFilterList(@Param('hookId') hookId: string) { diff --git a/packages/nocodb/src/controllers/form-columns.controller.ts b/packages/nocodb/src/controllers/form-columns.controller.ts index 333fc0f602..2e2542411a 100644 --- a/packages/nocodb/src/controllers/form-columns.controller.ts +++ b/packages/nocodb/src/controllers/form-columns.controller.ts @@ -13,7 +13,7 @@ export class FormColumnsController { @Patch([ '/api/v1/db/meta/form-columns/:formViewColumnId', - '/api/v1/meta/form-columns/:formViewColumnId', + '/api/v2/meta/form-columns/:formViewColumnId', ]) @Acl('columnUpdate') async columnUpdate( diff --git a/packages/nocodb/src/controllers/forms.controller.ts b/packages/nocodb/src/controllers/forms.controller.ts index 2771c646bc..23aaa6b2f8 100644 --- a/packages/nocodb/src/controllers/forms.controller.ts +++ b/packages/nocodb/src/controllers/forms.controller.ts @@ -20,7 +20,7 @@ import { MetaApiLimiterGuard } from '~/guards/meta-api-limiter.guard'; export class FormsController { constructor(private readonly formsService: FormsService) {} - @Get(['/api/v1/db/meta/forms/:formViewId', '/api/v1/meta/forms/:formViewId']) + @Get(['/api/v1/db/meta/forms/:formViewId', '/api/v2/meta/forms/:formViewId']) @Acl('formViewGet') async formViewGet(@Param('formViewId') formViewId: string) { const formViewData = await this.formsService.formViewGet({ @@ -31,7 +31,7 @@ export class FormsController { @Post([ '/api/v1/db/meta/tables/:tableId/forms', - '/api/v1/meta/tables/:tableId/forms', + '/api/v2/meta/tables/:tableId/forms', ]) @HttpCode(200) @Acl('formViewCreate') @@ -49,7 +49,7 @@ export class FormsController { } @Patch([ '/api/v1/db/meta/forms/:formViewId', - '/api/v1/meta/forms/:formViewId', + '/api/v2/meta/forms/:formViewId', ]) @Acl('formViewUpdate') async formViewUpdate(@Param('formViewId') formViewId: string, @Body() body) { diff --git a/packages/nocodb/src/controllers/galleries.controller.ts b/packages/nocodb/src/controllers/galleries.controller.ts index e4bb438c71..4caf0c0a7a 100644 --- a/packages/nocodb/src/controllers/galleries.controller.ts +++ b/packages/nocodb/src/controllers/galleries.controller.ts @@ -22,7 +22,7 @@ export class GalleriesController { @Get([ '/api/v1/db/meta/galleries/:galleryViewId', - '/api/v1/meta/galleries/:galleryViewId', + '/api/v2/meta/galleries/:galleryViewId', ]) @Acl('galleryViewGet') async galleryViewGet(@Param('galleryViewId') galleryViewId: string) { @@ -33,7 +33,7 @@ export class GalleriesController { @Post([ '/api/v1/db/meta/tables/:tableId/galleries', - '/api/v1/meta/tables/:tableId/galleries', + '/api/v2/meta/tables/:tableId/galleries', ]) @HttpCode(200) @Acl('galleryViewCreate') @@ -52,7 +52,7 @@ export class GalleriesController { @Patch([ '/api/v1/db/meta/galleries/:galleryViewId', - '/api/v1/meta/galleries/:galleryViewId', + '/api/v2/meta/galleries/:galleryViewId', ]) @Acl('galleryViewUpdate') async galleryViewUpdate( diff --git a/packages/nocodb/src/controllers/grid-columns.controller.ts b/packages/nocodb/src/controllers/grid-columns.controller.ts index b271004a1d..c29f6db4c6 100644 --- a/packages/nocodb/src/controllers/grid-columns.controller.ts +++ b/packages/nocodb/src/controllers/grid-columns.controller.ts @@ -12,7 +12,7 @@ export class GridColumnsController { @Get([ '/api/v1/db/meta/grids/:gridViewId/grid-columns', - '/api/v1/meta/grids/:gridViewId/grid-columns', + '/api/v2/meta/grids/:gridViewId/grid-columns', ]) @Acl('columnList') async columnList(@Param('gridViewId') gridViewId: string) { @@ -22,7 +22,7 @@ export class GridColumnsController { } @Patch([ '/api/v1/db/meta/grid-columns/:gridViewColumnId', - '/api/v1/meta/grid-columns/:gridViewColumnId', + '/api/v2/meta/grid-columns/:gridViewColumnId', ]) @Acl('gridColumnUpdate') async gridColumnUpdate( diff --git a/packages/nocodb/src/controllers/grids.controller.ts b/packages/nocodb/src/controllers/grids.controller.ts index 230810c027..4b78624498 100644 --- a/packages/nocodb/src/controllers/grids.controller.ts +++ b/packages/nocodb/src/controllers/grids.controller.ts @@ -21,7 +21,7 @@ export class GridsController { @Post([ '/api/v1/db/meta/tables/:tableId/grids/', - '/api/v1/meta/tables/:tableId/grids/', + '/api/v2/meta/tables/:tableId/grids/', ]) @HttpCode(200) @Acl('gridViewCreate') @@ -36,7 +36,7 @@ export class GridsController { }); return view; } - @Patch(['/api/v1/db/meta/grids/:viewId', '/api/v1/meta/grids/:viewId']) + @Patch(['/api/v1/db/meta/grids/:viewId', '/api/v2/meta/grids/:viewId']) @Acl('gridViewUpdate') async gridViewUpdate(@Param('viewId') viewId: string, @Body() body) { return await this.gridsService.gridViewUpdate({ diff --git a/packages/nocodb/src/controllers/hooks.controller.ts b/packages/nocodb/src/controllers/hooks.controller.ts index fe807599dd..f724f53f5d 100644 --- a/packages/nocodb/src/controllers/hooks.controller.ts +++ b/packages/nocodb/src/controllers/hooks.controller.ts @@ -25,7 +25,7 @@ export class HooksController { @Get([ '/api/v1/db/meta/tables/:tableId/hooks', - '/api/v1/meta/tables/:tableId/hooks', + '/api/v2/meta/tables/:tableId/hooks', ]) @Acl('hookList') async hookList(@Param('tableId') tableId: string) { @@ -34,7 +34,7 @@ export class HooksController { @Post([ '/api/v1/db/meta/tables/:tableId/hooks', - '/api/v1/meta/tables/:tableId/hooks', + '/api/v2/meta/tables/:tableId/hooks', ]) @HttpCode(200) @Acl('hookCreate') @@ -49,13 +49,13 @@ export class HooksController { return hook; } - @Delete(['/api/v1/db/meta/hooks/:hookId', '/api/v1/meta/hooks/:hookId']) + @Delete(['/api/v1/db/meta/hooks/:hookId', '/api/v2/meta/hooks/:hookId']) @Acl('hookDelete') async hookDelete(@Param('hookId') hookId: string) { return await this.hooksService.hookDelete({ hookId }); } - @Patch(['/api/v1/db/meta/hooks/:hookId', '/api/v1/meta/hooks/:hookId']) + @Patch(['/api/v1/db/meta/hooks/:hookId', '/api/v2/meta/hooks/:hookId']) @Acl('hookUpdate') async hookUpdate(@Param('hookId') hookId: string, @Body() body: HookReqType) { return await this.hooksService.hookUpdate({ hookId, hook: body }); @@ -63,7 +63,7 @@ export class HooksController { @Post([ '/api/v1/db/meta/tables/:tableId/hooks/test', - '/api/v1/meta/tables/:tableId/hooks/test', + '/api/v2/meta/tables/:tableId/hooks/test', ]) @HttpCode(200) @Acl('hookTest') @@ -88,7 +88,7 @@ export class HooksController { @Get([ '/api/v1/db/meta/tables/:tableId/hooks/samplePayload/:operation/:version', - '/api/v1/meta/tables/:tableId/hooks/samplePayload/:operation/:version', + '/api/v2/meta/tables/:tableId/hooks/samplePayload/:operation/:version', ]) @Acl('tableSampleData') async tableSampleData( @@ -105,7 +105,7 @@ export class HooksController { @Get([ '/api/v1/db/meta/hooks/:hookId/logs', - '/api/v1/meta/hooks/:hookId/logs', + '/api/v2/meta/hooks/:hookId/logs', ]) @Acl('hookLogList') async hookLogList(@Param('hookId') hookId: string, @Request() req: any) { diff --git a/packages/nocodb/src/controllers/kanbans.controller.ts b/packages/nocodb/src/controllers/kanbans.controller.ts index d93ec9384b..b1fd2957c1 100644 --- a/packages/nocodb/src/controllers/kanbans.controller.ts +++ b/packages/nocodb/src/controllers/kanbans.controller.ts @@ -22,7 +22,7 @@ export class KanbansController { @Get([ '/api/v1/db/meta/kanbans/:kanbanViewId', - '/api/v1/meta/kanbans/:kanbanViewId', + '/api/v2/meta/kanbans/:kanbanViewId', ]) @Acl('kanbanViewGet') async kanbanViewGet(@Param('kanbanViewId') kanbanViewId: string) { @@ -33,7 +33,7 @@ export class KanbansController { @Post([ '/api/v1/db/meta/tables/:tableId/kanbans', - '/api/v1/meta/tables/:tableId/kanbans', + '/api/v2/meta/tables/:tableId/kanbans', ]) @HttpCode(200) @Acl('kanbanViewCreate') @@ -51,7 +51,7 @@ export class KanbansController { @Patch([ '/api/v1/db/meta/kanbans/:kanbanViewId', - '/api/v1/meta/kanbans/:kanbanViewId', + '/api/v2/meta/kanbans/:kanbanViewId', ]) @Acl('kanbanViewUpdate') async kanbanViewUpdate( diff --git a/packages/nocodb/src/controllers/maps.controller.ts b/packages/nocodb/src/controllers/maps.controller.ts index 2fb53f933e..b73522bc15 100644 --- a/packages/nocodb/src/controllers/maps.controller.ts +++ b/packages/nocodb/src/controllers/maps.controller.ts @@ -20,7 +20,7 @@ import { MetaApiLimiterGuard } from '~/guards/meta-api-limiter.guard'; export class MapsController { constructor(private readonly mapsService: MapsService) {} - @Get(['/api/v1/db/meta/maps/:mapViewId', '/api/v1/meta/maps/:mapViewId']) + @Get(['/api/v1/db/meta/maps/:mapViewId', '/api/v2/meta/maps/:mapViewId']) @Acl('mapViewGet') async mapViewGet(@Param('mapViewId') mapViewId: string) { return await this.mapsService.mapViewGet({ mapViewId }); @@ -28,7 +28,7 @@ export class MapsController { @Post([ '/api/v1/db/meta/tables/:tableId/maps', - '/api/v1/meta/tables/:tableId/maps', + '/api/v2/meta/tables/:tableId/maps', ]) @HttpCode(200) @Acl('mapViewCreate') @@ -45,7 +45,7 @@ export class MapsController { return view; } - @Patch(['/api/v1/db/meta/maps/:mapViewId', '/api/v1/meta/maps/:mapViewId']) + @Patch(['/api/v1/db/meta/maps/:mapViewId', '/api/v2/meta/maps/:mapViewId']) @Acl('mapViewUpdate') async mapViewUpdate( @Param('mapViewId') mapViewId: string, diff --git a/packages/nocodb/src/controllers/meta-diffs.controller.ts b/packages/nocodb/src/controllers/meta-diffs.controller.ts index f14eea238b..d974a92cb3 100644 --- a/packages/nocodb/src/controllers/meta-diffs.controller.ts +++ b/packages/nocodb/src/controllers/meta-diffs.controller.ts @@ -11,7 +11,7 @@ export class MetaDiffsController { @Get([ '/api/v1/db/meta/projects/:baseId/meta-diff', - '/api/v1/meta/bases/:baseId/meta-diff', + '/api/v2/meta/bases/:baseId/meta-diff', ]) @Acl('metaDiff') async metaDiff(@Param('baseId') baseId: string) { @@ -20,7 +20,7 @@ export class MetaDiffsController { @Get([ '/api/v1/db/meta/projects/:baseId/meta-diff/:sourceId', - '/api/v1/meta/bases/:baseId/meta-diff/:sourceId', + '/api/v2/meta/bases/:baseId/meta-diff/:sourceId', ]) @Acl('metaDiff') async baseMetaDiff( diff --git a/packages/nocodb/src/controllers/model-visibilities.controller.ts b/packages/nocodb/src/controllers/model-visibilities.controller.ts index c1ee66cbc8..67c44eb6ef 100644 --- a/packages/nocodb/src/controllers/model-visibilities.controller.ts +++ b/packages/nocodb/src/controllers/model-visibilities.controller.ts @@ -22,7 +22,7 @@ export class ModelVisibilitiesController { @Post([ '/api/v1/db/meta/projects/:baseId/visibility-rules', - '/api/v1/meta/bases/:baseId/visibility-rules', + '/api/v2/meta/bases/:baseId/visibility-rules', ]) @HttpCode(200) @Acl('modelVisibilitySet') @@ -40,7 +40,7 @@ export class ModelVisibilitiesController { @Get([ '/api/v1/db/meta/projects/:baseId/visibility-rules', - '/api/v1/meta/bases/:baseId/visibility-rules', + '/api/v2/meta/bases/:baseId/visibility-rules', ]) @Acl('modelVisibilityList') async modelVisibilityList( diff --git a/packages/nocodb/src/controllers/plugins.controller.ts b/packages/nocodb/src/controllers/plugins.controller.ts index 3e45eae250..3a8e4c4bc7 100644 --- a/packages/nocodb/src/controllers/plugins.controller.ts +++ b/packages/nocodb/src/controllers/plugins.controller.ts @@ -26,7 +26,7 @@ import { MetaApiLimiterGuard } from '~/guards/meta-api-limiter.guard'; export class PluginsController { constructor(private readonly pluginsService: PluginsService) {} - @Get(['/api/v1/db/meta/plugins', '/api/v1/meta/plugins']) + @Get(['/api/v1/db/meta/plugins', '/api/v2/meta/plugins']) @Acl('pluginList', { scope: 'org', }) @@ -34,7 +34,7 @@ export class PluginsController { return new PagedResponseImpl(await this.pluginsService.pluginList()); } - @Get(['/api/v1/db/meta/plugins/webhook', '/api/v1/meta/plugins/webhook']) + @Get(['/api/v1/db/meta/plugins/webhook', '/api/v2/meta/plugins/webhook']) @Acl('webhookPluginList', { scope: 'org', }) @@ -42,7 +42,7 @@ export class PluginsController { return new PagedResponseImpl(await this.pluginsService.webhookPluginList()); } - @Post(['/api/v1/db/meta/plugins/test', '/api/v1/meta/plugins/test']) + @Post(['/api/v1/db/meta/plugins/test', '/api/v2/meta/plugins/test']) @HttpCode(200) @Acl('pluginTest', { scope: 'org', @@ -51,7 +51,7 @@ export class PluginsController { return await this.pluginsService.pluginTest({ body: body }); } - @Get(['/api/v1/db/meta/plugins/:pluginId', '/api/v1/meta/plugins/:pluginId']) + @Get(['/api/v1/db/meta/plugins/:pluginId', '/api/v2/meta/plugins/:pluginId']) @Acl('pluginRead', { scope: 'org', }) @@ -61,7 +61,7 @@ export class PluginsController { @Patch([ '/api/v1/db/meta/plugins/:pluginId', - '/api/v1/meta/plugins/:pluginId', + '/api/v2/meta/plugins/:pluginId', ]) @Acl('pluginUpdate', { scope: 'org', @@ -76,7 +76,7 @@ export class PluginsController { @Get([ '/api/v1/db/meta/plugins/:pluginTitle/status', - '/api/v1/meta/plugins/:pluginTitle/status', + '/api/v2/meta/plugins/:pluginTitle/status', ]) @Acl('isPluginActive', { scope: 'org', diff --git a/packages/nocodb/src/controllers/public-datas-export.controller.ts b/packages/nocodb/src/controllers/public-datas-export.controller.ts index 1babc6db02..75fe13444a 100644 --- a/packages/nocodb/src/controllers/public-datas-export.controller.ts +++ b/packages/nocodb/src/controllers/public-datas-export.controller.ts @@ -27,7 +27,7 @@ export class PublicDatasExportController { @Get([ '/api/v1/db/public/shared-view/:publicDataUuid/rows/export/excel', - '/api/v1/public/shared-view/:publicDataUuid/rows/export/excel', + '/api/v2/public/shared-view/:publicDataUuid/rows/export/excel', ]) async exportExcel( @Request() req, @@ -82,7 +82,7 @@ export class PublicDatasExportController { @Get([ '/api/v1/db/public/shared-view/:publicDataUuid/rows/export/csv', - '/api/v1/public/shared-view/:publicDataUuid/rows/export/csv', + '/api/v2/public/shared-view/:publicDataUuid/rows/export/csv', ]) async exportCsv(@Request() req, @Response() res) { const view = await View.getByUUID(req.params.publicDataUuid); diff --git a/packages/nocodb/src/controllers/public-datas.controller.ts b/packages/nocodb/src/controllers/public-datas.controller.ts index fab28b0b3c..b17abc7e74 100644 --- a/packages/nocodb/src/controllers/public-datas.controller.ts +++ b/packages/nocodb/src/controllers/public-datas.controller.ts @@ -19,7 +19,7 @@ export class PublicDatasController { @Get([ '/api/v1/db/public/shared-view/:sharedViewUuid/rows', - '/api/v1/public/shared-view/:sharedViewUuid/rows', + '/api/v2/public/shared-view/:sharedViewUuid/rows', ]) async dataList( @Request() req, @@ -35,7 +35,7 @@ export class PublicDatasController { @Get([ '/api/v1/db/public/shared-view/:sharedViewUuid/groupby', - '/api/v1/public/shared-view/:sharedViewUuid/groupby', + '/api/v2/public/shared-view/:sharedViewUuid/groupby', ]) async dataGroupBy( @Request() req, @@ -50,7 +50,7 @@ export class PublicDatasController { @Get([ '/api/v1/db/public/shared-view/:sharedViewUuid/group/:columnId', - '/api/v1/public/shared-view/:sharedViewUuid/group/:columnId', + '/api/v2/public/shared-view/:sharedViewUuid/group/:columnId', ]) async groupedDataList( @Request() req, @@ -68,7 +68,7 @@ export class PublicDatasController { @Post([ '/api/v1/db/public/shared-view/:sharedViewUuid/rows', - '/api/v1/public/shared-view/:sharedViewUuid/rows', + '/api/v2/public/shared-view/:sharedViewUuid/rows', ]) @HttpCode(200) @UseInterceptors(AnyFilesInterceptor()) @@ -89,7 +89,7 @@ export class PublicDatasController { @Get([ '/api/v1/db/public/shared-view/:sharedViewUuid/nested/:columnId', - '/api/v1/public/shared-view/:sharedViewUuid/nested/:columnId', + '/api/v2/public/shared-view/:sharedViewUuid/nested/:columnId', ]) async relDataList( @Request() req, @@ -108,7 +108,7 @@ export class PublicDatasController { @Get([ '/api/v1/db/public/shared-view/:sharedViewUuid/rows/:rowId/mm/:columnId', - '/api/v1/public/shared-view/:sharedViewUuid/rows/:rowId/mm/:columnId', + '/api/v2/public/shared-view/:sharedViewUuid/rows/:rowId/mm/:columnId', ]) async publicMmList( @Request() req, @@ -128,7 +128,7 @@ export class PublicDatasController { @Get([ '/api/v1/db/public/shared-view/:sharedViewUuid/rows/:rowId/hm/:columnId', - '/api/v1/public/shared-view/:sharedViewUuid/rows/:rowId/hm/:columnId', + '/api/v2/public/shared-view/:sharedViewUuid/rows/:rowId/hm/:columnId', ]) async publicHmList( @Request() req, diff --git a/packages/nocodb/src/controllers/public-metas.controller.ts b/packages/nocodb/src/controllers/public-metas.controller.ts index 20bafc4862..1aab81d353 100644 --- a/packages/nocodb/src/controllers/public-metas.controller.ts +++ b/packages/nocodb/src/controllers/public-metas.controller.ts @@ -9,7 +9,7 @@ export class PublicMetasController { @Get([ '/api/v1/db/public/shared-view/:sharedViewUuid/meta', - '/api/v1/public/shared-view/:sharedViewUuid/meta', + '/api/v2/public/shared-view/:sharedViewUuid/meta', ]) async viewMetaGet( @Request() req, @@ -23,7 +23,7 @@ export class PublicMetasController { @Get([ '/api/v1/db/public/shared-base/:sharedBaseUuid/meta', - '/api/v1/public/shared-base/:sharedBaseUuid/meta', + '/api/v2/public/shared-base/:sharedBaseUuid/meta', ]) async publicSharedBaseGet( @Param('sharedBaseUuid') sharedBaseUuid: string, diff --git a/packages/nocodb/src/controllers/shared-bases.controller.ts b/packages/nocodb/src/controllers/shared-bases.controller.ts index 41b44fed11..8974b7a4bf 100644 --- a/packages/nocodb/src/controllers/shared-bases.controller.ts +++ b/packages/nocodb/src/controllers/shared-bases.controller.ts @@ -22,7 +22,7 @@ export class SharedBasesController { @Post([ '/api/v1/db/meta/projects/:baseId/shared', - '/api/v1/meta/bases/:baseId/shared', + '/api/v2/meta/bases/:baseId/shared', ]) @HttpCode(200) @Acl('createSharedBaseLink') @@ -43,7 +43,7 @@ export class SharedBasesController { @Patch([ '/api/v1/db/meta/projects/:baseId/shared', - '/api/v1/meta/bases/:baseId/shared', + '/api/v2/meta/bases/:baseId/shared', ]) @Acl('updateSharedBaseLink') async updateSharedBaseLink( @@ -63,7 +63,7 @@ export class SharedBasesController { @Delete([ '/api/v1/db/meta/projects/:baseId/shared', - '/api/v1/meta/bases/:baseId/shared', + '/api/v2/meta/bases/:baseId/shared', ]) @Acl('disableSharedBaseLink') async disableSharedBaseLink(@Param('baseId') baseId: string): Promise { @@ -76,7 +76,7 @@ export class SharedBasesController { @Get([ '/api/v1/db/meta/projects/:baseId/shared', - '/api/v1/meta/bases/:baseId/shared', + '/api/v2/meta/bases/:baseId/shared', ]) @Acl('getSharedBaseLink') async getSharedBaseLink( diff --git a/packages/nocodb/src/controllers/sorts.controller.ts b/packages/nocodb/src/controllers/sorts.controller.ts index 987a4601e1..3935b11589 100644 --- a/packages/nocodb/src/controllers/sorts.controller.ts +++ b/packages/nocodb/src/controllers/sorts.controller.ts @@ -24,7 +24,7 @@ export class SortsController { @Get([ '/api/v1/db/meta/views/:viewId/sorts/', - '/api/v1/meta/views/:viewId/sorts/', + '/api/v2/meta/views/:viewId/sorts/', ]) @Acl('sortList') async sortList(@Param('viewId') viewId: string) { @@ -37,7 +37,7 @@ export class SortsController { @Post([ '/api/v1/db/meta/views/:viewId/sorts/', - '/api/v1/meta/views/:viewId/sorts/', + '/api/v2/meta/views/:viewId/sorts/', ]) @HttpCode(200) @Acl('sortCreate') @@ -53,7 +53,7 @@ export class SortsController { return sort; } - @Get(['/api/v1/db/meta/sorts/:sortId', '/api/v1/meta/sorts/:sortId']) + @Get(['/api/v1/db/meta/sorts/:sortId', '/api/v2/meta/sorts/:sortId']) @Acl('sortGet') async sortGet(@Param('sortId') sortId: string) { const sort = await this.sortsService.sortGet({ @@ -62,7 +62,7 @@ export class SortsController { return sort; } - @Patch(['/api/v1/db/meta/sorts/:sortId', '/api/v1/meta/sorts/:sortId']) + @Patch(['/api/v1/db/meta/sorts/:sortId', '/api/v2/meta/sorts/:sortId']) @Acl('sortUpdate') async sortUpdate( @Param('sortId') sortId: string, @@ -76,7 +76,7 @@ export class SortsController { return sort; } - @Delete(['/api/v1/db/meta/sorts/:sortId', '/api/v1/meta/sorts/:sortId']) + @Delete(['/api/v1/db/meta/sorts/:sortId', '/api/v2/meta/sorts/:sortId']) @Acl('sortDelete') async sortDelete(@Param('sortId') sortId: string, @Req() _req) { const sort = await this.sortsService.sortDelete({ diff --git a/packages/nocodb/src/controllers/sources.controller.ts b/packages/nocodb/src/controllers/sources.controller.ts index 0b11027244..46480ba4f0 100644 --- a/packages/nocodb/src/controllers/sources.controller.ts +++ b/packages/nocodb/src/controllers/sources.controller.ts @@ -13,7 +13,7 @@ export class SourcesController { @Get([ '/api/v1/db/meta/projects/:baseId/bases/:sourceId', - '/api/v1/meta/bases/:baseId/sources/:sourceId', + '/api/v2/meta/bases/:baseId/sources/:sourceId', ]) @Acl('baseGet') async baseGet(@Param('sourceId') sourceId: string) { @@ -30,7 +30,7 @@ export class SourcesController { @Patch([ '/api/v1/db/meta/projects/:baseId/bases/:sourceId', - '/api/v1/meta/bases/:baseId/sources/:sourceId', + '/api/v2/meta/bases/:baseId/sources/:sourceId', ]) @Acl('baseUpdate') async baseUpdate( @@ -49,7 +49,7 @@ export class SourcesController { @Get([ '/api/v1/db/meta/projects/:baseId/bases', - '/api/v1/meta/bases/:baseId/sources', + '/api/v2/meta/bases/:baseId/sources', ]) @Acl('baseList') async baseList(@Param('baseId') baseId: string) { diff --git a/packages/nocodb/src/controllers/sql-views.controller.ts b/packages/nocodb/src/controllers/sql-views.controller.ts index 2cb91f64f2..dea09ae540 100644 --- a/packages/nocodb/src/controllers/sql-views.controller.ts +++ b/packages/nocodb/src/controllers/sql-views.controller.ts @@ -18,7 +18,7 @@ export class SqlViewsController { @Post([ '/api/v1/db/meta/projects/:baseId/bases/:sourceId/sqlView', - '/api/v1/meta/bases/:baseId/sources/:sourceId/sqlView', + '/api/v2/meta/bases/:baseId/sources/:sourceId/sqlView', ]) @Acl('sqlViewCreate') async sqlViewCreate( diff --git a/packages/nocodb/src/controllers/sync.controller.ts b/packages/nocodb/src/controllers/sync.controller.ts index 7a12ff76a6..2587a26510 100644 --- a/packages/nocodb/src/controllers/sync.controller.ts +++ b/packages/nocodb/src/controllers/sync.controller.ts @@ -23,8 +23,8 @@ export class SyncController { @Get([ '/api/v1/db/meta/projects/:baseId/syncs', '/api/v1/db/meta/projects/:baseId/syncs/:sourceId', - '/api/v1/meta/bases/:baseId/syncs', - '/api/v1/meta/bases/:baseId/syncs/:sourceId', + '/api/v2/meta/bases/:baseId/syncs', + '/api/v2/meta/bases/:baseId/syncs/:sourceId', ]) @Acl('syncSourceList') async syncSourceList( @@ -40,8 +40,8 @@ export class SyncController { @Post([ '/api/v1/db/meta/projects/:baseId/syncs', '/api/v1/db/meta/projects/:baseId/syncs/:sourceId', - '/api/v1/meta/bases/:baseId/syncs', - '/api/v1/meta/bases/:baseId/syncs/:sourceId', + '/api/v2/meta/bases/:baseId/syncs', + '/api/v2/meta/bases/:baseId/syncs/:sourceId', ]) @HttpCode(200) @Acl('syncSourceCreate') @@ -59,7 +59,7 @@ export class SyncController { }); } - @Delete(['/api/v1/db/meta/syncs/:syncId', '/api/v1/meta/syncs/:syncId']) + @Delete(['/api/v1/db/meta/syncs/:syncId', '/api/v2/meta/syncs/:syncId']) @Acl('syncSourceDelete') async syncDelete(@Param('syncId') syncId: string) { return await this.syncService.syncDelete({ @@ -67,7 +67,7 @@ export class SyncController { }); } - @Patch(['/api/v1/db/meta/syncs/:syncId', '/api/v1/meta/syncs/:syncId']) + @Patch(['/api/v1/db/meta/syncs/:syncId', '/api/v2/meta/syncs/:syncId']) @Acl('syncSourceUpdate') async syncUpdate(@Param('syncId') syncId: string, @Body() body: any) { return await this.syncService.syncUpdate({ diff --git a/packages/nocodb/src/controllers/tables.controller.ts b/packages/nocodb/src/controllers/tables.controller.ts index 3f6905c370..311da32a69 100644 --- a/packages/nocodb/src/controllers/tables.controller.ts +++ b/packages/nocodb/src/controllers/tables.controller.ts @@ -26,8 +26,8 @@ export class TablesController { @Get([ '/api/v1/db/meta/projects/:baseId/tables', '/api/v1/db/meta/projects/:baseId/:sourceId/tables', - '/api/v1/meta/bases/:baseId/tables', - '/api/v1/meta/bases/:baseId/:sourceId/tables', + '/api/v2/meta/bases/:baseId/tables', + '/api/v2/meta/bases/:baseId/:sourceId/tables', ]) @Acl('tableList') async tableList( @@ -49,8 +49,8 @@ export class TablesController { @Post([ '/api/v1/db/meta/projects/:baseId/tables', '/api/v1/db/meta/projects/:baseId/:sourceId/tables', - '/api/v1/meta/bases/:baseId/tables', - '/api/v1/meta/bases/:baseId/:sourceId/tables', + '/api/v2/meta/bases/:baseId/tables', + '/api/v2/meta/bases/:baseId/:sourceId/tables', ]) @HttpCode(200) @Acl('tableCreate') @@ -70,7 +70,7 @@ export class TablesController { return result; } - @Get(['/api/v1/db/meta/tables/:tableId', '/api/v1/meta/tables/:tableId']) + @Get(['/api/v1/db/meta/tables/:tableId', '/api/v2/meta/tables/:tableId']) @Acl('tableGet') async tableGet(@Param('tableId') tableId: string, @Request() req) { const table = await this.tablesService.getTableWithAccessibleViews({ @@ -81,7 +81,7 @@ export class TablesController { return table; } - @Patch(['/api/v1/db/meta/tables/:tableId', '/api/v1/meta/tables/:tableId']) + @Patch(['/api/v1/db/meta/tables/:tableId', '/api/v2/meta/tables/:tableId']) @Acl('tableUpdate') async tableUpdate( @Param('tableId') tableId: string, @@ -97,7 +97,7 @@ export class TablesController { return { msg: 'The table has been updated successfully' }; } - @Delete(['/api/v1/db/meta/tables/:tableId', '/api/v1/meta/tables/:tableId']) + @Delete(['/api/v1/db/meta/tables/:tableId', '/api/v2/meta/tables/:tableId']) @Acl('tableDelete') async tableDelete(@Param('tableId') tableId: string, @Request() req) { const result = await this.tablesService.tableDelete({ @@ -111,7 +111,7 @@ export class TablesController { @Post([ '/api/v1/db/meta/tables/:tableId/reorder', - '/api/v1/meta/tables/:tableId/reorder', + '/api/v2/meta/tables/:tableId/reorder', ]) @Acl('tableReorder') @HttpCode(200) diff --git a/packages/nocodb/src/controllers/utils.controller.ts b/packages/nocodb/src/controllers/utils.controller.ts index 2464684c72..e6d3a80198 100644 --- a/packages/nocodb/src/controllers/utils.controller.ts +++ b/packages/nocodb/src/controllers/utils.controller.ts @@ -39,7 +39,7 @@ export class UtilsController { } @UseGuards(MetaApiLimiterGuard, GlobalGuard) - @Post(['/api/v1/db/meta/connection/test', '/api/v1/meta/connection/test']) + @Post(['/api/v1/db/meta/connection/test', '/api/v2/meta/connection/test']) @Acl('testConnection', { scope: 'org', }) @@ -49,7 +49,7 @@ export class UtilsController { } @UseGuards(PublicApiLimiterGuard) - @Get(['/api/v1/db/meta/nocodb/info', '/api/v1/meta/nocodb/info']) + @Get(['/api/v1/db/meta/nocodb/info', '/api/v2/meta/nocodb/info']) async appInfo(@Request() req) { return await this.utilsService.appInfo({ req: { @@ -65,7 +65,7 @@ export class UtilsController { } @UseGuards(PublicApiLimiterGuard) - @Post(['/api/v1/db/meta/axiosRequestMake', '/api/v1/meta/axiosRequestMake']) + @Post(['/api/v1/db/meta/axiosRequestMake', '/api/v2/meta/axiosRequestMake']) @HttpCode(200) async axiosRequestMake(@Body() body: any) { return await this.utilsService.axiosRequestMake({ body }); diff --git a/packages/nocodb/src/controllers/view-columns.controller.ts b/packages/nocodb/src/controllers/view-columns.controller.ts index 5a68be90d9..4366699cd8 100644 --- a/packages/nocodb/src/controllers/view-columns.controller.ts +++ b/packages/nocodb/src/controllers/view-columns.controller.ts @@ -22,7 +22,7 @@ export class ViewColumnsController { @Get([ '/api/v1/db/meta/views/:viewId/columns/', - '/api/v1/meta/views/:viewId/columns/', + '/api/v2/meta/views/:viewId/columns/', ]) @Acl('columnList') async columnList(@Param('viewId') viewId: string) { @@ -35,7 +35,7 @@ export class ViewColumnsController { @Post([ '/api/v1/db/meta/views/:viewId/columns/', - '/api/v1/meta/views/:viewId/columns/', + '/api/v2/meta/views/:viewId/columns/', ]) @HttpCode(200) @Acl('columnAdd') @@ -52,7 +52,7 @@ export class ViewColumnsController { @Patch([ '/api/v1/db/meta/views/:viewId/columns/:columnId', - '/api/v1/meta/views/:viewId/columns/:columnId', + '/api/v2/meta/views/:viewId/columns/:columnId', ]) @Acl('columnUpdate') async columnUpdate( diff --git a/packages/nocodb/src/controllers/views.controller.ts b/packages/nocodb/src/controllers/views.controller.ts index 662fc6b3fc..cb9e1865d1 100644 --- a/packages/nocodb/src/controllers/views.controller.ts +++ b/packages/nocodb/src/controllers/views.controller.ts @@ -25,7 +25,7 @@ export class ViewsController { @Get([ '/api/v1/db/meta/tables/:tableId/views', - '/api/v1/meta/tables/:tableId/views', + '/api/v2/meta/tables/:tableId/views', ]) @Acl('viewList') async viewList(@Param('tableId') tableId: string, @Request() req) { @@ -37,7 +37,7 @@ export class ViewsController { ); } - @Patch(['/api/v1/db/meta/views/:viewId', '/api/v1/meta/views/:viewId']) + @Patch(['/api/v1/db/meta/views/:viewId', '/api/v2/meta/views/:viewId']) @Acl('viewUpdate') async viewUpdate( @Param('viewId') viewId: string, @@ -52,7 +52,7 @@ export class ViewsController { return result; } - @Delete(['/api/v1/db/meta/views/:viewId', '/api/v1/meta/views/:viewId']) + @Delete(['/api/v1/db/meta/views/:viewId', '/api/v2/meta/views/:viewId']) @Acl('viewDelete') async viewDelete(@Param('viewId') viewId: string, @Request() req) { const result = await this.viewsService.viewDelete({ @@ -64,7 +64,7 @@ export class ViewsController { @Post([ '/api/v1/db/meta/views/:viewId/show-all', - '/api/v1/meta/views/:viewId/show-all', + '/api/v2/meta/views/:viewId/show-all', ]) @HttpCode(200) @Acl('showAllColumns') @@ -79,7 +79,7 @@ export class ViewsController { } @Post([ '/api/v1/db/meta/views/:viewId/hide-all', - '/api/v1/meta/views/:viewId/hide-all', + '/api/v2/meta/views/:viewId/hide-all', ]) @HttpCode(200) @Acl('hideAllColumns') @@ -95,7 +95,7 @@ export class ViewsController { @Post([ '/api/v1/db/meta/views/:viewId/share', - '/api/v1/meta/views/:viewId/share', + '/api/v2/meta/views/:viewId/share', ]) @HttpCode(200) @Acl('shareView') @@ -105,7 +105,7 @@ export class ViewsController { @Get([ '/api/v1/db/meta/tables/:tableId/share', - '/api/v1/meta/tables/:tableId/share', + '/api/v2/meta/tables/:tableId/share', ]) @Acl('shareViewList') async shareViewList(@Param('tableId') tableId: string) { @@ -118,7 +118,7 @@ export class ViewsController { @Patch([ '/api/v1/db/meta/views/:viewId/share', - '/api/v1/meta/views/:viewId/share', + '/api/v2/meta/views/:viewId/share', ]) @Acl('shareViewUpdate') async shareViewUpdate( @@ -135,7 +135,7 @@ export class ViewsController { @Delete([ '/api/v1/db/meta/views/:viewId/share', - '/api/v1/meta/views/:viewId/share', + '/api/v2/meta/views/:viewId/share', ]) @Acl('shareViewDelete') async shareViewDelete(@Param('viewId') viewId: string, @Request() req) { diff --git a/packages/nocodb/src/middlewares/extract-ids/extract-ids.middleware.ts b/packages/nocodb/src/middlewares/extract-ids/extract-ids.middleware.ts index f05dfad75c..d6df48c906 100644 --- a/packages/nocodb/src/middlewares/extract-ids/extract-ids.middleware.ts +++ b/packages/nocodb/src/middlewares/extract-ids/extract-ids.middleware.ts @@ -128,8 +128,8 @@ export class ExtractIdsMiddleware implements NestMiddleware, CanActivate { [ '/api/v1/db/meta/audits/rows/:rowId/update', '/api/v1/db/meta/audits/comments', - '/api/v1/meta/audits/rows/:rowId/update', - '/api/v1/meta/audits/comments', + '/api/v2/meta/audits/rows/:rowId/update', + '/api/v2/meta/audits/comments', ].some( (auditInsertOrUpdatePath) => req.route.path === auditInsertOrUpdatePath, ) && @@ -146,8 +146,8 @@ export class ExtractIdsMiddleware implements NestMiddleware, CanActivate { [ '/api/v1/db/meta/audits/comments/count', '/api/v1/db/meta/audits/comments', - '/api/v1/meta/audits/comments/count', - '/api/v1/meta/audits/comments', + '/api/v2/meta/audits/comments/count', + '/api/v2/meta/audits/comments', ].some((auditReadPath) => req.route.path === auditReadPath) && req.method === 'GET' && req.query.fk_model_id @@ -163,9 +163,8 @@ export class ExtractIdsMiddleware implements NestMiddleware, CanActivate { '/auth/user/me', '/api/v1/db/auth/user/me', '/api/v1/auth/user/me', - '/api/v1/auth/user/me', '/api/v1/db/meta/plugins/webhook', - '/api/v1/meta/plugins/webhook', + '/api/v2/meta/plugins/webhook', ].some((userMePath) => req.route.path === userMePath) && req.query.base_id ) { diff --git a/packages/nocodb/src/modules/jobs/jobs/at-import/at-import.controller.ts b/packages/nocodb/src/modules/jobs/jobs/at-import/at-import.controller.ts index 5792f88de2..43ca11e6aa 100644 --- a/packages/nocodb/src/modules/jobs/jobs/at-import/at-import.controller.ts +++ b/packages/nocodb/src/modules/jobs/jobs/at-import/at-import.controller.ts @@ -20,7 +20,7 @@ export class AtImportController { @Post([ '/api/v1/db/meta/syncs/:syncId/trigger', - '/api/v1/meta/syncs/:syncId/trigger', + '/api/v2/meta/syncs/:syncId/trigger', ]) @Acl('airtableImport') @HttpCode(200) @@ -60,7 +60,7 @@ export class AtImportController { @Post([ '/api/v1/db/meta/syncs/:syncId/abort', - '/api/v1/meta/syncs/:syncId/abort', + '/api/v2/meta/syncs/:syncId/abort', ]) @Acl('airtableImport') @HttpCode(200) diff --git a/packages/nocodb/src/modules/jobs/jobs/export-import/duplicate.controller.ts b/packages/nocodb/src/modules/jobs/jobs/export-import/duplicate.controller.ts index 20a1a8df54..51da20e28a 100644 --- a/packages/nocodb/src/modules/jobs/jobs/export-import/duplicate.controller.ts +++ b/packages/nocodb/src/modules/jobs/jobs/export-import/duplicate.controller.ts @@ -94,7 +94,7 @@ export class DuplicateController { @Post([ '/api/v1/db/meta/duplicate/:baseId/:sourceId?', - '/api/v1/meta/duplicate/:baseId/:sourceId?', + '/api/v2/meta/duplicate/:baseId/:sourceId?', ]) @HttpCode(200) @Acl('duplicateBase') @@ -159,7 +159,7 @@ export class DuplicateController { @Post([ '/api/v1/db/meta/duplicate/:baseId/table/:modelId', - '/api/v1/meta/duplicate/:baseId/table/:modelId', + '/api/v2/meta/duplicate/:baseId/table/:modelId', ]) @HttpCode(200) @Acl('duplicateModel') diff --git a/packages/nocodb/src/modules/jobs/jobs/meta-sync/meta-sync.controller.ts b/packages/nocodb/src/modules/jobs/jobs/meta-sync/meta-sync.controller.ts index 7afc6dd55d..6e377ffdae 100644 --- a/packages/nocodb/src/modules/jobs/jobs/meta-sync/meta-sync.controller.ts +++ b/packages/nocodb/src/modules/jobs/jobs/meta-sync/meta-sync.controller.ts @@ -20,7 +20,7 @@ export class MetaSyncController { @Post([ '/api/v1/db/meta/projects/:baseId/meta-diff', - '/api/v1/meta/bases/:baseId/meta-diff', + '/api/v2/meta/bases/:baseId/meta-diff', ]) @HttpCode(200) @Acl('metaDiffSync') @@ -45,7 +45,7 @@ export class MetaSyncController { @Post([ '/api/v1/db/meta/projects/:baseId/meta-diff/:sourceId', - '/api/v1/meta/bases/:baseId/meta-diff/:sourceId', + '/api/v2/meta/bases/:baseId/meta-diff/:sourceId', ]) @HttpCode(200) @Acl('baseMetaDiffSync') diff --git a/packages/nocodb/src/modules/jobs/jobs/source-create/source-create.controller.ts b/packages/nocodb/src/modules/jobs/jobs/source-create/source-create.controller.ts index 67806f8303..b3f3523bfb 100644 --- a/packages/nocodb/src/modules/jobs/jobs/source-create/source-create.controller.ts +++ b/packages/nocodb/src/modules/jobs/jobs/source-create/source-create.controller.ts @@ -20,8 +20,8 @@ export class SourceCreateController { constructor(@Inject('JobsService') private readonly jobsService) {} @Post([ - '/api/v1/db/meta/projects/:baseId/sources', - '/api/v1/meta/bases/:baseId/sources', + '/api/v1/db/meta/projects/:baseId/bases', + '/api/v2/meta/bases/:baseId/sources', ]) @HttpCode(200) @Acl('baseCreate') diff --git a/packages/nocodb/src/modules/jobs/jobs/source-delete/source-delete.controller.ts b/packages/nocodb/src/modules/jobs/jobs/source-delete/source-delete.controller.ts index 8d37af1a30..ea07deebcf 100644 --- a/packages/nocodb/src/modules/jobs/jobs/source-delete/source-delete.controller.ts +++ b/packages/nocodb/src/modules/jobs/jobs/source-delete/source-delete.controller.ts @@ -16,7 +16,7 @@ export class SourceDeleteController { @Delete([ '/api/v1/db/meta/projects/:baseId/bases/:sourceId', - '/api/v1/meta/bases/:baseId/sources/:sourceId', + '/api/v2/meta/bases/:baseId/sources/:sourceId', ]) @Acl('baseDelete') async baseDelete(@Param('sourceId') sourceId: string) { diff --git a/packages/nocodb/src/schema/swagger-v2.json b/packages/nocodb/src/schema/swagger-v2.json new file mode 100644 index 0000000000..f7ed563e74 --- /dev/null +++ b/packages/nocodb/src/schema/swagger-v2.json @@ -0,0 +1,20308 @@ +{ + "openapi": "3.1.0", + "x-stoplight": { + "id": "qiz1rcfqd2jy6" + }, + "info": { + "title": "NocoDB v2", + "version": "", + "description": "NocoDB API Documentation" + }, + "x-tagGroups": [ + { + "name": "Auth APIs", + "tags": [ + "Auth", + "API Token" + ] + }, + { + "name": "Public APIs", + "tags": [ + "Public" + ] + }, + { + "name": "Data APIs", + "tags": [ + "DB Table Row", + "DB View Row", + "Storage" + ] + }, + { + "name": "Meta APIs", + "tags": [ + "Source", + "DB Table", + "DB Table Column", + "DB Table Filter", + "DB Table Sort", + "DB Table Webhook", + "DB Table Webhook Filter", + "DB View", + "DB View Column", + "DB View Share", + "Plugin", + "Base", + "Utils" + ] + }, + { + "name": "Organisation APIs", + "tags": [ + "Org App Settings", + "Org License", + "Org Tokens", + "Org Users" + ] + } + ], + "servers": [ + { + "url": "http://localhost:8080" + } + ], + "paths": { + "/api/v1/user/profile": { + "patch": { + "summary": "Update User Profile", + "operationId": "user-profile-update", + "responses": { + "200": { + "$ref": "#/components/schemas/User" + } + }, + "tags": [ + "User profile" + ], + "description": "Update User Profile", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + } + } + }, + "/api/v1/auth/user/signup": { + "post": { + "summary": "Signup", + "operationId": "auth-signup", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "token": { + "type": "string", + "description": "The signed JWT token for information exchange", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6IndAbm9jb2RiLmNvbSIsImZpcnN0bmFtZSI6bnVsbCwibGFzdG5hbWUiOm51bGwsImlkIjoidXNfYjN4bzJpNDRueDV5OWwiLCJyb2xlcyI6Im9yZy1sZXZlbC1jcmVhdG9yLHN1cGVyIiwidG9rZW5fdmVyc2lvbiI6ImJmMTc3ZGUzYjk3YjAzMjY4YjU0NGZmMjMzNGU5YjFhMGUzYzgxM2NiYzliOTJkYWMwYmM5NTRiNmUzN2ZjMTJjYmFkNDM2NmIwYzExZTdjIiwiaWF0IjoxNjc4MDc4NDMyLCJleHAiOjE2NzgxMTQ0MzJ9.gzwp_svZlbA5PV_eawYV-9UFjZVjniy-tCDce16xrkI" + } + } + }, + "examples": { + "Example 1": { + "value": { + "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6IndAbm9jb2RiLmNvbSIsImZpcnN0bmFtZSI6bnVsbCwibGFzdG5hbWUiOm51bGwsImlkIjoidXNfYjN4bzJpNDRueDV5OWwiLCJyb2xlcyI6Im9yZy1sZXZlbC1jcmVhdG9yLHN1cGVyIiwidG9rZW5fdmVyc2lvbiI6ImJmMTc3ZGUzYjk3YjAzMjY4YjU0NGZmMjMzNGU5YjFhMGUzYzgxM2NiYzliOTJkYWMwYmM5NTRiNmUzN2ZjMTJjYmFkNDM2NmIwYzExZTdjIiwiaWF0IjoxNjc4MDc4NDMyLCJleHAiOjE2NzgxMTQ0MzJ9.gzwp_svZlbA5PV_eawYV-9UFjZVjniy-tCDce16xrkI" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "msg": { + "type": "string" + } + } + }, + "examples": { + "Invalid email": { + "value": { + "msg": "Invalid email" + } + }, + "Invalid invite url": { + "value": { + "msg": "Invalid invite url" + } + }, + "Expired invite url": { + "value": { + "msg": "Expired invite url, Please contact super admin to get a new invite url" + } + }, + "User already exist": { + "value": { + "msg": "User already exist" + } + }, + "Invite only signup": { + "value": { + "msg": "Not allowed to signup, contact super admin" + } + } + } + } + } + } + }, + "tags": [ + "Auth" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignUpReq" + }, + "examples": { + "Example 1": { + "value": { + "email": "user@example.com", + "password": "password123456789", + "firstname": "Alice", + "lastname": "Smith", + "token": null, + "ignore_subscribe": 0 + } + } + } + } + } + }, + "description": "Create a new user with provided email and password and first user is marked as super admin. " + } + }, + "/api/v1/auth/user/signout": { + "post": { + "summary": "Signout", + "operationId": "auth-signout", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "msg": { + "type": "string", + "description": "Success Message", + "example": "Signed out successfully" + } + } + }, + "examples": { + "Example 1": { + "value": { + "msg": "Signed out successfully" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Auth" + ], + "description": "Clear refresh token from the database and cookie." + }, + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "/api/v1/auth/user/signin": { + "post": { + "summary": "Signin", + "operationId": "auth-signin", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "token": { + "type": "string", + "description": "The signed JWT token for information exchange", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6IndAbm9jb2RiLmNvbSIsImZpcnN0bmFtZSI6bnVsbCwibGFzdG5hbWUiOm51bGwsImlkIjoidXNfYjN4bzJpNDRueDV5OWwiLCJyb2xlcyI6Im9yZy1sZXZlbC1jcmVhdG9yLHN1cGVyIiwidG9rZW5fdmVyc2lvbiI6ImJmMTc3ZGUzYjk3YjAzMjY4YjU0NGZmMjMzNGU5YjFhMGUzYzgxM2NiYzliOTJkYWMwYmM5NTRiNmUzN2ZjMTJjYmFkNDM2NmIwYzExZTdjIiwiaWF0IjoxNjc4MDc4NDMyLCJleHAiOjE2NzgxMTQ0MzJ9.gzwp_svZlbA5PV_eawYV-9UFjZVjniy-tCDce16xrkI" + } + } + }, + "examples": { + "Example 1": { + "value": { + "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6IndAbm9jb2RiLmNvbSIsImZpcnN0bmFtZSI6bnVsbCwibGFzdG5hbWUiOm51bGwsImlkIjoidXNfYjN4bzJpNDRueDV5OWwiLCJyb2xlcyI6Im9yZy1sZXZlbC1jcmVhdG9yLHN1cGVyIiwidG9rZW5fdmVyc2lvbiI6ImJmMTc3ZGUzYjk3YjAzMjY4YjU0NGZmMjMzNGU5YjFhMGUzYzgxM2NiYzliOTJkYWMwYmM5NTRiNmUzN2ZjMTJjYmFkNDM2NmIwYzExZTdjIiwiaWF0IjoxNjc4MDc4NDMyLCJleHAiOjE2NzgxMTQ0MzJ9.gzwp_svZlbA5PV_eawYV-9UFjZVjniy-tCDce16xrkI" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Auth" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignInReq" + }, + "examples": { + "example-1": { + "value": { + "email": "user@example.com", + "password": "Password" + } + } + } + } + } + }, + "description": "Authenticate existing user with their email and password. Successful login will return a JWT access-token. " + }, + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "/api/v1/auth/user/me": { + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "get": { + "summary": "Get User Info", + "operationId": "auth-me", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserInfo" + }, + "examples": { + "example-1": { + "value": { + "id": "us_8kugj628ebjngs", + "email": "user@example.com", + "email_verified": true, + "firstname": "Alice", + "lastname": "Smith", + "roles": "org-level-viewer" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Auth" + ], + "description": "Returns authenticated user info", + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id" + }, + "in": "query", + "name": "base_id", + "description": "Pass base id to get base specific roles along with user info" + } + ] + } + }, + "/api/v1/auth/password/forgot": { + "post": { + "summary": "Forget Password", + "operationId": "auth-password-forgot", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "msg": { + "type": "string", + "x-stoplight": { + "id": "q9s5vh2i34x6c" + }, + "example": "Please check your email to reset the password", + "description": "Success Message" + } + } + }, + "examples": { + "Example 1": { + "value": { + "msg": "Please check your email to reset the password" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "Emails user with a reset url.", + "tags": [ + "Auth" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasswordForgotReq" + }, + "examples": { + "Example 1": { + "value": { + "email": "user@example.com" + } + } + } + } + }, + "description": "Pass registered user email id in request body" + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "/api/v1/auth/password/change": { + "post": { + "summary": "Change Password", + "operationId": "auth-password-change", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "msg": { + "type": "string", + "description": "Success Message" + } + } + }, + "examples": { + "Success response": { + "value": { + "msg": "Password has been updated successfully" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "Change password of authenticated user with a new one.", + "tags": [ + "Auth" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasswordChangeReq" + }, + "examples": { + "example-1": { + "value": { + "currentPassword": "currentPassword", + "newPassword": "newPassword" + } + } + } + } + }, + "description": "Old password need to be passed along with new password for changing password." + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "/api/v1/auth/token/validate/{token}": { + "post": { + "summary": "Verify Reset Token", + "operationId": "auth-password-reset-token-validate", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "msg": { + "type": "string", + "x-stoplight": { + "id": "unxdsok22kg1y" + }, + "example": "Token has been validated successfully", + "description": "Success Message" + } + } + }, + "examples": { + "Example 1": { + "value": { + "msg": "Token has been validated successfully" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "Validate password reset url token.", + "tags": [ + "Auth" + ], + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "parameters": [ + { + "schema": { + "type": "string", + "format": "uuid", + "example": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11" + }, + "name": "token", + "in": "path", + "required": true, + "description": "Reset Token" + } + ] + }, + "/api/v1/auth/email/validate/{token}": { + "post": { + "summary": "Verify Email", + "operationId": "auth-email-validate", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "msg": { + "type": "string", + "x-stoplight": { + "id": "u49sbr20s9rgf" + }, + "description": "Success Message", + "example": "Email has been verified successfully" + } + } + }, + "examples": { + "Example 1": { + "value": { + "msg": "Email has been verified successfully" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "Api for verifying email where token need to be passed which is shared to user email.", + "tags": [ + "Auth" + ], + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "parameters": [ + { + "schema": { + "type": "string", + "format": "uuid", + "example": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11" + }, + "name": "token", + "in": "path", + "required": true, + "description": "Validation Token" + } + ] + }, + "/api/v1/auth/password/reset/{token}": { + "post": { + "summary": "Reset Password", + "operationId": "auth-password-reset", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "msg": { + "type": "string", + "x-stoplight": { + "id": "2to6ro4121rfx" + }, + "description": "Success Message", + "example": "Password has been reset successfully" + } + } + }, + "examples": { + "Example 1": { + "value": { + "msg": "Password has been reset successfully" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "Update user password to new by using reset token.", + "tags": [ + "Auth" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasswordResetReq" + }, + "examples": { + "Example 1": { + "value": { + "password": "newpassword" + } + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "parameters": [ + { + "schema": { + "type": "string", + "format": "uuid", + "example": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11" + }, + "name": "token", + "in": "path", + "required": true, + "description": "Reset Password Token" + } + ] + }, + "/api/v1/auth/token/refresh": { + "post": { + "summary": "Refresh Token", + "operationId": "auth-token-refresh", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "token": { + "type": "string", + "description": "New access token for user", + "example": "96751db2d53fb834382b682268874a2ea9ee610e4d904e688d1513f11d3c30d62d36d9e05dec0d63" + } + } + }, + "examples": { + "Example 1": { + "value": { + "token": "96751db2d53fb834382b682268874a2ea9ee610e4d904e688d1513f11d3c30d62d36d9e05dec0d63" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "Regenerate user refresh token", + "tags": [ + "Auth" + ], + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "/api/v2/meta/projects/{baseId}/users": { + "get": { + "summary": "List Base Users", + "operationId": "auth-base-user-list", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "users": { + "type": "object", + "properties": { + "list": { + "type": "array", + "uniqueItems": true, + "minItems": 1, + "items": { + "$ref": "#/components/schemas/User" + } + }, + "pageInfo": { + "$ref": "#/components/schemas/Paginated" + } + }, + "required": [ + "list", + "pageInfo" + ] + } + } + }, + "examples": { + "Example 1": { + "value": { + "users": { + "list": [ + { + "email": "user@example.com", + "email_verified": true, + "firstname": "Alice", + "id": "us_8kugj628ebjngs", + "lastname": "Smith", + "roles": "org-level-viewer" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "List all users in the given base.", + "tags": [ + "Auth" + ], + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "p_124hhlkbeasewh", + "type": "string" + }, + "name": "baseId", + "in": "path", + "required": true, + "description": "Unique Base ID" + } + ], + "post": { + "summary": "Create Base User", + "operationId": "auth-base-user-add", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "msg": { + "type": "string", + "x-stoplight": { + "id": "waau9tvy75zsd" + }, + "description": "Success Message for inviting single email", + "example": "The user has been invited successfully" + }, + "invite_token": { + "type": "string", + "x-stoplight": { + "id": "yx0s35u8ds3p7" + }, + "example": "8354ddba-a769-4d64-8397-eccb2e2b3c06" + }, + "error": { + "type": "array", + "x-stoplight": { + "id": "yhfi6wzhr6zr1" + }, + "items": { + "x-stoplight": { + "id": "ce0hlv3d0f96j" + }, + "type": "object", + "properties": { + "email": { + "type": "string", + "x-stoplight": { + "id": "dgnh01j4lxvl1" + }, + "example": "w@nocodb.com" + }, + "error": { + "type": "string", + "x-stoplight": { + "id": "7dgttqiijg8no" + }, + "example": "" + } + } + } + }, + "email": { + "type": "string", + "x-stoplight": { + "id": "08pqst2q30vot" + }, + "example": "w@nocodb.com" + } + } + }, + "examples": { + "Inviting a user without any errors": { + "value": { + "msg": "The user has been invited successfully" + } + }, + "Inviting a user but invitation email failed to send": { + "value": { + "invite_token": "8354ddba-a769-4d64-8397-eccb2e2b3c06", + "email": "w@nocodb.com" + } + }, + "Inviting multiple users": { + "value": { + "invite_token": "8354ddba-a769-4d64-8397-eccb2e2b3c06", + "error": [ + { + "email": "w@nocodb.com", + "error": "" + } + ] + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectUserReq" + }, + "examples": { + "Example 1": { + "value": { + "email": "user@example.com", + "roles": "owner" + } + } + } + } + } + }, + "tags": [ + "Auth" + ], + "description": "Create a user and add it to the given base", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/projects/{baseId}/info": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "p_124hhlkbeasewh", + "type": "string" + }, + "name": "baseId", + "in": "path", + "required": true, + "description": "Unique Base ID" + } + ], + "get": { + "summary": "Get Base info", + "operationId": "base-meta-get", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "Node": { + "type": "string", + "description": "Node version", + "example": "v12.16.1" + }, + "Arch": { + "type": "string", + "description": "Architecture type", + "example": "x64" + }, + "Platform": { + "type": "string", + "description": "Platform type", + "example": "linux" + }, + "Docker": { + "type": "boolean", + "description": "Is docker", + "example": false + }, + "Database": { + "type": "string", + "description": "Database type", + "example": "postgres" + }, + "ProjectOnRootDB": { + "type": "boolean", + "description": "Is base on rootdb", + "example": false + }, + "RootDB": { + "type": "string", + "description": "Root database type", + "example": "postgres" + }, + "PackageVersion": { + "type": "string", + "description": "Package version", + "example": "1.0.0" + } + } + }, + "examples": { + "Example 1": { + "value": { + "Node": "v12.16.1", + "Arch": "x64", + "Platform": "linux", + "Docker": false, + "Database": "postgres", + "ProjectOnRootDB": false, + "RootDB": "postgres", + "PackageVersion": "1.0.0" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Base" + ], + "description": "Get info such as node version, arch, platform, is docker, rootdb and package version of a given base", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/projects/{baseId}/users/{userId}": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "p_124hhlkbeasewh", + "type": "string" + }, + "name": "baseId", + "in": "path", + "required": true, + "description": "Unique Base ID" + }, + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "us_b3xo2i44nx5y9l" + }, + "name": "userId", + "in": "path", + "required": true, + "description": "Unique User ID" + } + ], + "patch": { + "summary": "Update Base User", + "operationId": "auth-base-user-update", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "msg": { + "type": "string", + "x-stoplight": { + "id": "5a2q8as60daly" + }, + "description": "Success Message", + "example": "The user has been updated successfully" + } + } + }, + "examples": { + "Example 1": { + "value": { + "msg": "The user has been updated successfully" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectUserReq" + }, + "examples": { + "Example 1": { + "value": { + "email": "user@example.com", + "roles": "owner" + } + } + } + } + } + }, + "tags": [ + "Auth" + ], + "description": "Update a given user in a given base. Exclusive for Super Admin. Access with API Tokens will be blocked.", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "delete": { + "summary": "Delete Base User", + "operationId": "auth-base-user-remove", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "msg": { + "type": "string", + "x-stoplight": { + "id": "5h7c9lqh5ynve" + }, + "example": "The user has been updated successfully", + "description": "Success Message" + } + } + }, + "examples": { + "Example 1": { + "value": { + "msg": "The user has been updated successfully" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Auth" + ], + "description": "Delete a given user in a given base. Exclusive for Super Admin. Access with API Tokens will be blocked.", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/projects/{baseId}/visibility-rules": { + "get": { + "summary": "Get UI ACL", + "operationId": "base-model-visibility-list", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": {} + }, + "examples": { + "Example 1": { + "value": [ + { + "ptn": "nc_09gt___Sheet-1", + "_ptn": "Sheet-1", + "ptype": "table", + "tn": "Sheet-1", + "_tn": "Sheet-1", + "table_meta": null, + "id": "vw_75neroyqdye94k", + "source_id": "ds_eol59jg2l4zwev", + "base_id": "p_63b4q0qengen1x", + "fk_model_id": "md_5mipbdg6ketmv8", + "title": "Sheet-1", + "type": 3, + "is_default": true, + "show_system_fields": null, + "lock_type": "collaborative", + "uuid": "24a6d0bb-e45d-4b1a-bfef-f492d870de9f", + "password": null, + "show": true, + "order": 1, + "created_at": "2023-03-08T10:44:55.253Z", + "updated_at": "2023-03-10T07:18:44.908Z", + "meta": { + "allowCSVDownload": true + }, + "view": { + "fk_view_id": "vw_75neroyqdye94k", + "source_id": "ds_eol59jg2l4zwev", + "base_id": "p_63b4q0qengen1x", + "uuid": null, + "created_at": "2023-03-08T10:44:55.288Z", + "updated_at": "2023-03-08T10:44:55.288Z", + "meta": null, + "row_height": null + }, + "disabled": { + "owner": false, + "creator": false, + "viewer": false, + "editor": false, + "commenter": false, + "guest": false + } + } + ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "Hide / show views based on user role", + "tags": [ + "Base" + ], + "parameters": [ + { + "schema": { + "type": "boolean" + }, + "in": "query", + "name": "includeM2M" + }, + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "p_124hhlkbeasewh", + "type": "string" + }, + "name": "baseId", + "in": "path", + "required": true, + "description": "Unique Base ID" + } + ], + "post": { + "summary": "Create UI ACL", + "operationId": "base-model-visibility-set", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "msg": { + "type": "string", + "x-stoplight": { + "id": "2txh071wsodys" + }, + "example": "UI ACL has been created successfully" + } + } + }, + "examples": { + "Example 1": { + "value": { + "msg": "UI ACL has been created successfully" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VisibilityRuleReq" + } + } + } + }, + "tags": [ + "Base" + ], + "description": "Hide / show views based on user role", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/projects/": { + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "get": { + "summary": "List Projects", + "operationId": "base-list", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectList" + }, + "examples": { + "Example 1": { + "value": { + "list": [ + { + "sources": [ + { + "alias": "string", + "config": null, + "created_at": "2023-03-01 14:27:36", + "enabled": true, + "id": "string", + "inflection_column": "camelize", + "inflection_table": "camelize", + "is_meta": true, + "order": 1, + "base_id": "string", + "type": "mysql2", + "updated_at": "2023-03-01 14:27:36" + } + ], + "color": "#24716E", + "created_at": "2023-03-01 14:27:36", + "deleted": true, + "description": "This is my base description", + "id": "p_124hhlkbeasewh", + "is_meta": true, + "meta": {}, + "order": 0, + "prefix": "nc_vm5q__", + "status": "string", + "title": "my-base", + "updated_at": "2023-03-01 14:27:36" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "List all base meta data", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "tags": [ + "Base" + ] + }, + "post": { + "summary": "Create Base", + "operationId": "base-create", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Base" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ProjectReq" + }, + { + "type": "object", + "properties": { + "external": { + "type": "boolean", + "default": false, + "description": "If true, the base will us an external database else it will use the root database" + } + } + } + ] + }, + "examples": { + "Example 1": { + "value": { + "sources": [ + { + "alias": "string", + "config": null, + "enabled": true, + "id": "string", + "inflection_column": "camelize", + "inflection_table": "camelize", + "is_meta": true, + "order": 1, + "base_id": "string", + "type": "mysql2", + "updated_at": "2023-03-01 14:27:36" + } + ], + "color": "#24716E", + "created_at": "2023-03-01 14:27:36", + "deleted": true, + "description": "This is my base description", + "id": "p_124hhlkbeasewh", + "is_meta": true, + "meta": {}, + "order": 0, + "prefix": "nc_vm5q__", + "status": "string", + "title": "my-base", + "external": false + } + } + } + } + } + }, + "tags": [ + "Base" + ], + "description": "Create a new base", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/duplicate/{baseId}/{sourceId}": { + "post": { + "summary": "Duplicate Base Source", + "operationId": "base-source-duplicate", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "id": { + "type": "string" + }, + "base_id": { + "type": "string" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "options": { + "type": "object", + "properties": { + "excludeData": { + "type": "boolean", + "required": false + }, + "excludeViews": { + "type": "boolean", + "required": false + }, + "excludeHooks": { + "type": "boolean", + "required": false + } + } + }, + "base": { + "type": "object", + "required": false + } + } + }, + "examples": { + "Example 1": { + "value": { + "excludeData": true, + "excludeViews": true, + "excludeHooks": true + } + } + } + } + } + }, + "tags": [ + "Base" + ], + "description": "Duplicate a base", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + }, + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "p_124hhlkbeasewh", + "type": "string" + }, + "name": "baseId", + "in": "path", + "required": true, + "description": "Unique Base ID" + }, + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "ds_124hhlkbeasewh", + "type": "string" + }, + "name": "sourceId", + "in": "path", + "required": false, + "description": "Unique Source ID" + } + ] + } + }, + "/api/v2/meta/duplicate/{baseId}": { + "post": { + "summary": "Duplicate Base", + "operationId": "base-duplicate", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "id": { + "type": "string" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "options": { + "type": "object", + "properties": { + "excludeData": { + "type": "boolean", + "required": false + }, + "excludeViews": { + "type": "boolean", + "required": false + }, + "excludeHooks": { + "type": "boolean", + "required": false + } + } + }, + "base": { + "type": "object", + "required": false + } + } + }, + "examples": { + "Example 1": { + "value": { + "excludeData": true, + "excludeViews": true, + "excludeHooks": true + } + } + } + } + } + }, + "tags": [ + "Base" + ], + "description": "Duplicate a base", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + }, + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "p_124hhlkbeasewh", + "type": "string" + }, + "name": "baseId", + "in": "path", + "required": true, + "description": "Unique Base ID" + } + ] + } + }, + "/api/v2/meta/projects/{baseId}": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "p_124hhlkbeasewh", + "type": "string" + }, + "name": "baseId", + "in": "path", + "required": true, + "description": "Unique Base ID" + } + ], + "get": { + "summary": "Get Base", + "operationId": "base-read", + "description": "Get the info of a given base", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "tags": [ + "Base" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Base" + }, + "examples": { + "Example 1": { + "value": { + "sources": [ + { + "alias": "string", + "config": null, + "enabled": true, + "id": "string", + "inflection_column": "camelize", + "inflection_table": "camelize", + "is_meta": true, + "order": 1, + "base_id": "string", + "type": "mysql2", + "updated_at": "2023-03-01 14:27:36" + } + ], + "color": "#24716E", + "created_at": "2023-03-01 14:27:36", + "deleted": true, + "description": "This is my base description", + "id": "p_124hhlkbeasewh", + "is_meta": true, + "meta": {}, + "order": 0, + "prefix": "nc_vm5q__", + "status": "string", + "title": "my-base" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + } + }, + "delete": { + "summary": "Delete Base", + "operationId": "base-delete", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "boolean" + }, + "examples": { + "Example 1": { + "value": true + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Base" + ], + "description": "Delete the given base", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "patch": { + "summary": "Update Base", + "operationId": "base-update", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "number", + "example": 1 + }, + "examples": { + "Example 1": { + "value": 1 + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Base" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectUpdateReq" + }, + "examples": { + "Example 1": { + "value": { + "color": "#24716E", + "meta": null, + "title": "My Base" + } + } + } + } + } + }, + "description": "Update the given base", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/projects/{baseId}/user": { + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "baseId", + "in": "path", + "required": true + } + ], + "patch": { + "summary": "Base user meta update", + "operationId": "base-user-meta-update", + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "Base" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectUserMetaReq" + } + } + } + } + } + }, + "/api/v2/meta/projects/{baseId}/bases/{sourceId}": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "p_124hhlkbeasewh", + "type": "string" + }, + "name": "baseId", + "in": "path", + "required": true, + "description": "Unique Base ID" + }, + { + "schema": { + "type": "string", + "pattern": "ds_j04jmxh5xg10lu" + }, + "name": "sourceId", + "in": "path", + "required": true, + "description": "Unique Source ID" + } + ], + "get": { + "summary": "Get Source", + "operationId": "source-read", + "description": "Get the source details of a given base", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "tags": [ + "Source" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Source" + }, + "examples": { + "Example 1": { + "value": { + "alias": null, + "config": "", + "enabled": 1, + "id": "ds_krsappzu9f8vmo", + "inflection_column": "camelize", + "inflection_table": "camelize", + "is_meta": 1, + "meta": null, + "order": 1, + "base_id": "p_01clqvzik3izk6", + "type": "mysql2" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + } + }, + "delete": { + "summary": "Delete Source", + "operationId": "source-delete", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "boolean" + }, + "examples": { + "Example 1": { + "value": true + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Source" + ], + "description": "Delete the source details of a given base", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "patch": { + "summary": "Update Source", + "operationId": "source-update", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + }, + "examples": { + "Example 1": { + "value": { + "id": "ds_rrplkgy0pq1f3c", + "base_id": "p_63b4q0qengen1x", + "alias": "sakila", + "meta": null, + "is_meta": null, + "type": "mysql2", + "inflection_column": "camelize", + "inflection_table": "camelize", + "created_at": "2023-03-11T10:31:15.341Z", + "updated_at": "2023-03-11T10:32:25.763Z", + "enabled": true, + "order": 2 + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Source" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "examples": { + "Example 1": { + "value": { + "alias": "sakila", + "type": "mysql2", + "config": { + "client": "mysql2", + "connection": { + "host": "localhost", + "port": "3306", + "user": "root", + "password": "password", + "database": "sakila" + } + }, + "inflection_column": "camelize", + "inflection_table": "camelize" + } + } + } + } + } + }, + "description": "Update the source details of a given base", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/projects/:baseId/bases/:sourceId/sqlView": { + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "baseId", + "in": "path", + "required": true + }, + { + "schema": { + "type": "string" + }, + "name": "sourceId", + "in": "path", + "required": true + } + ], + "post": { + "summary": "Create sql view", + "operationId": "create-sql-view", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + } + }, + "tags": [ + "Source" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "view_name": { + "type": "string" + }, + "view_definition": { + "type": "string" + } + } + } + } + } + } + } + }, + "/api/v2/meta/projects/{baseId}/bases/": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "p_124hhlkbeasewh", + "type": "string" + }, + "name": "baseId", + "in": "path", + "required": true, + "description": "Unique Base ID" + } + ], + "get": { + "summary": "List Sources", + "operationId": "source-list", + "description": "Get base source list", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "tags": [ + "Source" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SourceList" + }, + "examples": { + "Example 1": { + "value": { + "list": [ + { + "alias": null, + "config": "", + "enabled": 1, + "id": "ds_krsappzu9f8vmo", + "inflection_column": "camelize", + "inflection_table": "camelize", + "is_meta": 1, + "meta": null, + "order": 1, + "base_id": "p_01clqvzik3izk6", + "type": "mysql2" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + } + }, + "post": { + "summary": "Create Source", + "operationId": "source-create", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Source" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/Source" + }, + { + "type": "object", + "properties": { + "external": { + "type": "boolean", + "default": false + } + } + } + ] + }, + "examples": { + "Example 1": { + "value": { + "alias": null, + "config": "", + "enabled": 1, + "id": "ds_krsappzu9f8vmo", + "inflection_column": "camelize", + "inflection_table": "camelize", + "is_meta": 1, + "meta": null, + "order": 1, + "base_id": "p_01clqvzik3izk6", + "type": "mysql2", + "external": false + } + } + } + } + } + }, + "tags": [ + "Source" + ], + "description": "Create a new source on a given base", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/projects/{baseId}/bases/{sourceId}/share/erd": { + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "baseId", + "in": "path", + "required": true + }, + { + "schema": { + "type": "string" + }, + "name": "sourceId", + "in": "path", + "required": true + } + ], + "post": { + "summary": "share ERD view", + "operationId": "source-share-erd", + "tags": [ + "Source" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Source" + } + } + } + } + } + }, + "delete": { + "summary": "", + "operationId": "source-disable-share-erd", + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "Source" + ] + } + }, + "/api/v2/meta/projects/{baseId}/shared": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "p_124hhlkbeasewh", + "type": "string" + }, + "name": "baseId", + "in": "path", + "required": true, + "description": "Unique Base ID" + } + ], + "get": { + "summary": "Get Base Shared Base", + "operationId": "base-shared-base-get", + "description": "Get Base Shared Base", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "tags": [ + "Base" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid", + "example": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11" + }, + "url": { + "type": "string", + "format": "uri" + }, + "roles": { + "type": "string", + "example": "viewer" + } + } + }, + "examples": { + "Example 1": { + "value": { + "uuid": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11", + "url": "http://example.com", + "roles": "viewer" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + } + }, + "delete": { + "summary": "Delete Base Shared Base", + "operationId": "base-shared-base-disable", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "boolean" + }, + "examples": { + "Example 1": { + "value": true + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Base" + ], + "description": "Delete Base Shared Base", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "post": { + "summary": "Create Base Shared Base", + "operationId": "base-shared-base-create", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "uuid": { + "$ref": "#/components/schemas/StringOrNull" + }, + "roles": { + "$ref": "#/components/schemas/StringOrNull" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Base" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SharedBaseReq" + }, + "examples": { + "Example 1": { + "value": { + "roles": "editor", + "password": "password123" + } + } + } + } + } + }, + "description": "Create Base Shared Base", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "patch": { + "summary": "Update Base Shared Base", + "operationId": "base-shared-base-update", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid", + "example": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11" + }, + "url": { + "type": "string", + "format": "uri" + }, + "roles": { + "type": "string", + "example": "viewer" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SharedBaseReq" + }, + "examples": { + "Example 1": { + "value": { + "password": "password123", + "roles": "editor" + } + } + } + } + } + }, + "tags": [ + "Base" + ], + "description": "Update Base Shared Base", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/projects/{baseId}/cost": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "p_124hhlkbeasewh", + "type": "string" + }, + "name": "baseId", + "in": "path", + "required": true, + "description": "Unique Base ID" + } + ], + "get": { + "summary": "Base Cost", + "operationId": "base-cost", + "description": "Calculate the Base Cost", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "tags": [ + "Base" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "x-internal": true + } + }, + "/api/v2/meta/projects/{baseId}/tables": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "p_124hhlkbeasewh", + "type": "string" + }, + "name": "baseId", + "in": "path", + "required": true, + "description": "Unique Base ID" + } + ], + "post": { + "summary": "Create Table", + "operationId": "db-table-create", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Table" + }, + "examples": { + "Example 1": { + "value": { + "source_id": "ds_g4ccx6e77h1dmi", + "columns": [ + { + "ai": 0, + "au": 0, + "source_id": "ds_g4ccx6e77h1dmi", + "cc": "", + "cdf": "CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP", + "clen": null, + "column_name": "updated_at", + "cop": "4", + "created_at": "2023-03-02 17:04:06", + "csn": null, + "ct": "timestamp", + "deleted": null, + "dt": "timestamp", + "dtx": "specificType", + "dtxp": "0", + "dtxs": null, + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "cl_m4wkaqgqqjzoeh", + "meta": null, + "np": null, + "ns": null, + "order": 4, + "pk": 0, + "base_id": "p_xm3thidrblw4n7", + "pv": null, + "rqd": 0, + "system": 0, + "title": "UpdatedAt", + "uidt": "DateTime", + "un": 0, + "unique": 0, + "updated_at": "2023-03-02 17:04:06", + "validate": null, + "virtual": null + }, + { + "ai": 0, + "au": 0, + "source_id": "ds_g4ccx6e77h1dmi", + "cc": "", + "cdf": "CURRENT_TIMESTAMP", + "clen": null, + "column_name": "created_at", + "cop": "3", + "created_at": "2023-03-02 17:04:06", + "csn": null, + "ct": "timestamp", + "deleted": null, + "dt": "timestamp", + "dtx": "specificType", + "dtxp": "0", + "dtxs": null, + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "cl_jpl0qu4gj4rexq", + "meta": null, + "np": null, + "ns": null, + "order": 3, + "pk": 0, + "base_id": "p_xm3thidrblw4n7", + "pv": null, + "rqd": 0, + "system": 0, + "title": "CreatedAt", + "uidt": "DateTime", + "un": 0, + "unique": 0, + "updated_at": "2023-03-02 17:04:06", + "validate": null, + "virtual": null + }, + { + "ai": 0, + "au": 0, + "source_id": "ds_g4ccx6e77h1dmi", + "cc": "", + "cdf": null, + "clen": "45", + "column_name": "title", + "cop": "2", + "created_at": "2023-03-02 17:04:06", + "csn": "utf8mb4", + "ct": "varchar(45)", + "deleted": null, + "dt": "varchar", + "dtx": "specificType", + "dtxp": "45", + "dtxs": null, + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "cl_c5knoi4xs4sfpt", + "meta": null, + "np": null, + "ns": null, + "order": 2, + "pk": 0, + "base_id": "p_xm3thidrblw4n7", + "pv": 1, + "rqd": 0, + "system": 0, + "title": "Title", + "uidt": "SingleLineText", + "un": 0, + "unique": 0, + "updated_at": "2023-03-02 17:04:06", + "validate": null, + "virtual": null + }, + { + "ai": 1, + "au": 0, + "source_id": "ds_g4ccx6e77h1dmi", + "cc": "", + "cdf": null, + "clen": null, + "column_name": "id", + "cop": "1", + "created_at": "2023-03-02 17:04:06", + "csn": null, + "ct": "int unsigned", + "deleted": null, + "dt": "int", + "dtx": "specificType", + "dtxp": "", + "dtxs": "0", + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "cl_phvuuwjrzcdo0g", + "meta": null, + "np": "10", + "ns": "0", + "order": 1, + "pk": 1, + "base_id": "p_xm3thidrblw4n7", + "pv": null, + "rqd": 1, + "system": 0, + "title": "Id", + "uidt": "ID", + "un": 1, + "unique": 0, + "updated_at": "2023-03-02 17:04:06", + "validate": null, + "virtual": null + } + ], + "columnsById": { + "cl_c5knoi4xs4sfpt": { + "ai": 0, + "au": 0, + "source_id": "ds_g4ccx6e77h1dmi", + "cc": "", + "cdf": null, + "clen": "45", + "column_name": "title", + "cop": "2", + "created_at": "2023-03-02 17:04:06", + "csn": "utf8mb4", + "ct": "varchar(45)", + "deleted": null, + "dt": "varchar", + "dtx": "specificType", + "dtxp": "45", + "dtxs": null, + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "cl_c5knoi4xs4sfpt", + "meta": null, + "np": null, + "ns": null, + "order": 2, + "pk": 0, + "base_id": "p_xm3thidrblw4n7", + "pv": 1, + "rqd": 0, + "system": 0, + "title": "Title", + "uidt": "SingleLineText", + "un": 0, + "unique": 0, + "updated_at": "2023-03-02 17:04:06", + "validate": null, + "virtual": null + }, + "cl_jpl0qu4gj4rexq": { + "ai": 0, + "au": 0, + "source_id": "ds_g4ccx6e77h1dmi", + "cc": "", + "cdf": "CURRENT_TIMESTAMP", + "clen": null, + "column_name": "created_at", + "cop": "3", + "created_at": "2023-03-02 17:04:06", + "csn": null, + "ct": "timestamp", + "deleted": null, + "dt": "timestamp", + "dtx": "specificType", + "dtxp": "0", + "dtxs": null, + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "cl_jpl0qu4gj4rexq", + "meta": null, + "np": null, + "ns": null, + "order": 3, + "pk": 0, + "base_id": "p_xm3thidrblw4n7", + "pv": null, + "rqd": 0, + "system": 0, + "title": "CreatedAt", + "uidt": "DateTime", + "un": 0, + "unique": 0, + "updated_at": "2023-03-02 17:04:06", + "validate": null, + "virtual": null + }, + "cl_m4wkaqgqqjzoeh": { + "ai": 0, + "au": 0, + "source_id": "ds_g4ccx6e77h1dmi", + "cc": "", + "cdf": "CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP", + "clen": null, + "column_name": "updated_at", + "cop": "4", + "created_at": "2023-03-02 17:04:06", + "csn": null, + "ct": "timestamp", + "deleted": null, + "dt": "timestamp", + "dtx": "specificType", + "dtxp": "0", + "dtxs": null, + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "cl_m4wkaqgqqjzoeh", + "meta": null, + "np": null, + "ns": null, + "order": 4, + "pk": 0, + "base_id": "p_xm3thidrblw4n7", + "pv": null, + "rqd": 0, + "system": 0, + "title": "UpdatedAt", + "uidt": "DateTime", + "un": 0, + "unique": 0, + "updated_at": "2023-03-02 17:04:06", + "validate": null, + "virtual": null + }, + "cl_phvuuwjrzcdo0g": { + "ai": 1, + "au": 0, + "source_id": "ds_g4ccx6e77h1dmi", + "cc": "", + "cdf": null, + "clen": null, + "column_name": "id", + "cop": "1", + "created_at": "2023-03-02 17:04:06", + "csn": null, + "ct": "int unsigned", + "deleted": null, + "dt": "int", + "dtx": "specificType", + "dtxp": "", + "dtxs": "0", + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "cl_phvuuwjrzcdo0g", + "meta": null, + "np": "10", + "ns": "0", + "order": 1, + "pk": 1, + "base_id": "p_xm3thidrblw4n7", + "pv": null, + "rqd": 1, + "system": 0, + "title": "Id", + "uidt": "ID", + "un": 1, + "unique": 0, + "updated_at": "2023-03-02 17:04:06", + "validate": null, + "virtual": null + } + }, + "created_at": "2023-03-02 17:04:06", + "deleted": null, + "enabled": 1, + "id": "md_rsu68aqjsbyqtl", + "meta": null, + "mm": 0, + "order": 1, + "pinned": null, + "base_id": "p_xm3thidrblw4n7", + "schema": null, + "table_name": "nc_vm5q___Table1", + "tags": null, + "title": "Table1", + "type": "table", + "updated_at": "2023-03-02 17:04:08", + "views": [ + { + "_ptn": "Table1", + "_tn": "Table1", + "source_id": "ds_g4ccx6e77h1dmi", + "created_at": "2023-03-02 17:04:06", + "disabled": { + "commenter": false, + "creator": false, + "editor": false, + "guest": false, + "owner": false, + "viewer": false + }, + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "vw_p2jcatxz4mvcfw", + "is_default": 1, + "lock_type": "collaborative", + "meta": {}, + "order": 1, + "password": null, + "base_id": "p_xm3thidrblw4n7", + "ptn": "nc_vm5q___Table1", + "ptype": "table", + "show": 1, + "show_system_fields": null, + "table_meta": null, + "title": "Table1", + "tn": "Table1", + "type": 3, + "updated_at": "2023-03-02 17:04:06", + "uuid": null, + "view": { + "source_id": "ds_g4ccx6e77h1dmi", + "created_at": "2023-03-02 17:04:06", + "fk_view_id": "vw_p2jcatxz4mvcfw", + "meta": null, + "base_id": "p_xm3thidrblw4n7", + "row_height": null, + "updated_at": "2023-03-02 17:04:06", + "uuid": null + } + } + ] + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TableReq" + } + } + } + }, + "tags": [ + "DB Table" + ], + "description": "Create a new table in a given base", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "get": { + "summary": "List Tables", + "operationId": "db-table-list", + "responses": { + "200": { + "$ref": "#/components/responses/TableList" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "page" + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "pageSize" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort" + }, + { + "schema": { + "type": "boolean" + }, + "in": "query", + "name": "includeM2M" + } + ], + "tags": [ + "DB Table" + ], + "description": "List all tables in a given base" + } + }, + "/api/v2/meta/tables/{tableId}": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "md_w9gpnaousnfss1", + "type": "string" + }, + "name": "tableId", + "in": "path", + "required": true, + "description": "Unique Table ID" + } + ], + "get": { + "summary": "Read Table", + "operationId": "db-table-read", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Table" + }, + "examples": { + "Example 1": { + "value": { + "id": "md_rsu68aqjsbyqtl", + "source_id": "ds_g4ccx6e77h1dmi", + "base_id": "p_xm3thidrblw4n7", + "table_name": "nc_vm5q___Table1", + "title": "Table1", + "type": "table", + "meta": null, + "schema": null, + "enabled": 1, + "mm": 0, + "tags": null, + "pinned": null, + "deleted": null, + "order": 1, + "created_at": "2023-03-02 17:04:06", + "updated_at": "2023-03-02 17:04:08", + "columns": [ + { + "id": "cl_phvuuwjrzcdo0g", + "source_id": "ds_g4ccx6e77h1dmi", + "base_id": "p_xm3thidrblw4n7", + "fk_model_id": "md_rsu68aqjsbyqtl", + "title": "Id", + "column_name": "id", + "uidt": "ID", + "dt": "int", + "np": "10", + "ns": "0", + "clen": null, + "cop": "1", + "pk": 1, + "pv": null, + "rqd": 1, + "un": 1, + "ct": "int unsigned", + "ai": 1, + "unique": 0, + "cdf": null, + "cc": "", + "csn": null, + "dtx": "specificType", + "dtxp": "", + "dtxs": "0", + "au": 0, + "validate": null, + "virtual": null, + "deleted": null, + "system": 0, + "order": 1, + "created_at": "2023-03-02 17:04:06", + "updated_at": "2023-03-02 17:04:06", + "meta": null + }, + { + "id": "cl_c5knoi4xs4sfpt", + "source_id": "ds_g4ccx6e77h1dmi", + "base_id": "p_xm3thidrblw4n7", + "fk_model_id": "md_rsu68aqjsbyqtl", + "title": "Title", + "column_name": "title", + "uidt": "SingleLineText", + "dt": "varchar", + "np": null, + "ns": null, + "clen": "45", + "cop": "2", + "pk": 0, + "pv": 1, + "rqd": 0, + "un": 0, + "ct": "varchar(45)", + "ai": 0, + "unique": 0, + "cdf": null, + "cc": "", + "csn": "utf8mb4", + "dtx": "specificType", + "dtxp": "45", + "dtxs": null, + "au": 0, + "validate": null, + "virtual": null, + "deleted": null, + "system": 0, + "order": 2, + "created_at": "2023-03-02 17:04:06", + "updated_at": "2023-03-02 17:04:06", + "meta": null + }, + { + "id": "cl_jpl0qu4gj4rexq", + "source_id": "ds_g4ccx6e77h1dmi", + "base_id": "p_xm3thidrblw4n7", + "fk_model_id": "md_rsu68aqjsbyqtl", + "title": "CreatedAt", + "column_name": "created_at", + "uidt": "DateTime", + "dt": "timestamp", + "np": null, + "ns": null, + "clen": null, + "cop": "3", + "pk": 0, + "pv": null, + "rqd": 0, + "un": 0, + "ct": "timestamp", + "ai": 0, + "unique": 0, + "cdf": "CURRENT_TIMESTAMP", + "cc": "", + "csn": null, + "dtx": "specificType", + "dtxp": "0", + "dtxs": null, + "au": 0, + "validate": null, + "virtual": null, + "deleted": null, + "system": 0, + "order": 3, + "created_at": "2023-03-02 17:04:06", + "updated_at": "2023-03-02 17:04:06", + "meta": null + }, + { + "id": "cl_m4wkaqgqqjzoeh", + "source_id": "ds_g4ccx6e77h1dmi", + "base_id": "p_xm3thidrblw4n7", + "fk_model_id": "md_rsu68aqjsbyqtl", + "title": "UpdatedAt", + "column_name": "updated_at", + "uidt": "DateTime", + "dt": "timestamp", + "np": null, + "ns": null, + "clen": null, + "cop": "4", + "pk": 0, + "pv": null, + "rqd": 0, + "un": 0, + "ct": "timestamp", + "ai": 0, + "unique": 0, + "cdf": "CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP", + "cc": "", + "csn": null, + "dtx": "specificType", + "dtxp": "0", + "dtxs": null, + "au": 0, + "validate": null, + "virtual": null, + "deleted": null, + "system": 0, + "order": 4, + "created_at": "2023-03-02 17:04:06", + "updated_at": "2023-03-02 17:04:06", + "meta": null + } + ], + "views": [ + { + "ptn": "nc_vm5q___Table1", + "_ptn": "Table1", + "ptype": "table", + "tn": "Table1", + "_tn": "Table1", + "table_meta": null, + "id": "vw_p2jcatxz4mvcfw", + "source_id": "ds_g4ccx6e77h1dmi", + "base_id": "p_xm3thidrblw4n7", + "fk_model_id": "md_rsu68aqjsbyqtl", + "title": "Table1", + "type": 3, + "is_default": 1, + "show_system_fields": null, + "lock_type": "collaborative", + "uuid": null, + "password": null, + "show": 1, + "order": 1, + "created_at": "2023-03-02 17:04:06", + "updated_at": "2023-03-02 17:04:06", + "meta": {}, + "view": { + "fk_view_id": "vw_p2jcatxz4mvcfw", + "source_id": "ds_g4ccx6e77h1dmi", + "base_id": "p_xm3thidrblw4n7", + "uuid": null, + "created_at": "2023-03-02 17:04:06", + "updated_at": "2023-03-02 17:04:06", + "meta": null, + "row_height": null + }, + "disabled": { + "owner": false, + "creator": false, + "viewer": false, + "editor": false, + "commenter": false, + "guest": false + } + } + ], + "columnsById": { + "cl_phvuuwjrzcdo0g": { + "id": "cl_phvuuwjrzcdo0g", + "source_id": "ds_g4ccx6e77h1dmi", + "base_id": "p_xm3thidrblw4n7", + "fk_model_id": "md_rsu68aqjsbyqtl", + "title": "Id", + "column_name": "id", + "uidt": "ID", + "dt": "int", + "np": "10", + "ns": "0", + "clen": null, + "cop": "1", + "pk": 1, + "pv": null, + "rqd": 1, + "un": 1, + "ct": "int unsigned", + "ai": 1, + "unique": 0, + "cdf": null, + "cc": "", + "csn": null, + "dtx": "specificType", + "dtxp": "", + "dtxs": "0", + "au": 0, + "validate": null, + "virtual": null, + "deleted": null, + "system": 0, + "order": 1, + "created_at": "2023-03-02 17:04:06", + "updated_at": "2023-03-02 17:04:06", + "meta": null + }, + "cl_c5knoi4xs4sfpt": { + "id": "cl_c5knoi4xs4sfpt", + "source_id": "ds_g4ccx6e77h1dmi", + "base_id": "p_xm3thidrblw4n7", + "fk_model_id": "md_rsu68aqjsbyqtl", + "title": "Title", + "column_name": "title", + "uidt": "SingleLineText", + "dt": "varchar", + "np": null, + "ns": null, + "clen": "45", + "cop": "2", + "pk": 0, + "pv": 1, + "rqd": 0, + "un": 0, + "ct": "varchar(45)", + "ai": 0, + "unique": 0, + "cdf": null, + "cc": "", + "csn": "utf8mb4", + "dtx": "specificType", + "dtxp": "45", + "dtxs": null, + "au": 0, + "validate": null, + "virtual": null, + "deleted": null, + "system": 0, + "order": 2, + "created_at": "2023-03-02 17:04:06", + "updated_at": "2023-03-02 17:04:06", + "meta": null + }, + "cl_jpl0qu4gj4rexq": { + "id": "cl_jpl0qu4gj4rexq", + "source_id": "ds_g4ccx6e77h1dmi", + "base_id": "p_xm3thidrblw4n7", + "fk_model_id": "md_rsu68aqjsbyqtl", + "title": "CreatedAt", + "column_name": "created_at", + "uidt": "DateTime", + "dt": "timestamp", + "np": null, + "ns": null, + "clen": null, + "cop": "3", + "pk": 0, + "pv": null, + "rqd": 0, + "un": 0, + "ct": "timestamp", + "ai": 0, + "unique": 0, + "cdf": "CURRENT_TIMESTAMP", + "cc": "", + "csn": null, + "dtx": "specificType", + "dtxp": "0", + "dtxs": null, + "au": 0, + "validate": null, + "virtual": null, + "deleted": null, + "system": 0, + "order": 3, + "created_at": "2023-03-02 17:04:06", + "updated_at": "2023-03-02 17:04:06", + "meta": null + }, + "cl_m4wkaqgqqjzoeh": { + "id": "cl_m4wkaqgqqjzoeh", + "source_id": "ds_g4ccx6e77h1dmi", + "base_id": "p_xm3thidrblw4n7", + "fk_model_id": "md_rsu68aqjsbyqtl", + "title": "UpdatedAt", + "column_name": "updated_at", + "uidt": "DateTime", + "dt": "timestamp", + "np": null, + "ns": null, + "clen": null, + "cop": "4", + "pk": 0, + "pv": null, + "rqd": 0, + "un": 0, + "ct": "timestamp", + "ai": 0, + "unique": 0, + "cdf": "CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP", + "cc": "", + "csn": null, + "dtx": "specificType", + "dtxp": "0", + "dtxs": null, + "au": 0, + "validate": null, + "virtual": null, + "deleted": null, + "system": 0, + "order": 4, + "created_at": "2023-03-02 17:04:06", + "updated_at": "2023-03-02 17:04:06", + "meta": null + } + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Table" + ], + "description": "Read the table meta data by the given table ID", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "patch": { + "summary": "Update Table", + "operationId": "db-table-update", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "msg": { + "type": "string", + "x-stoplight": { + "id": "5a0g9yvs4e678" + }, + "example": "The table has been updated successfully" + } + } + }, + "examples": { + "Example 1": { + "value": { + "msg": "The table has been updated successfully" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Table" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "table_name": { + "type": "string", + "description": "Table name", + "example": "users" + }, + "title": { + "type": "string", + "description": "Table title", + "example": "Users" + }, + "base_id": { + "type": "string", + "description": "Base ID", + "example": "p_124hhlkbeasewh" + }, + "meta": { + "$ref": "#/components/schemas/Meta" + } + } + }, + "examples": { + "Example 1": { + "value": { + "table_name": "users", + "title": "Users", + "base_id": "p_124hhlkbeasewh", + "meta": null + } + } + } + } + } + }, + "description": "Update the table meta data by the given table ID", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "delete": { + "summary": "Delete Table", + "operationId": "db-table-delete", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "boolean" + }, + "examples": { + "Example 1": { + "value": true + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Table" + ], + "description": "Delete the table meta data by the given table ID", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/duplicate/{baseId}/table/{tableId}": { + "post": { + "summary": "Duplicate Table", + "operationId": "db-table-duplicate", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "id": { + "type": "string" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "options": { + "type": "object", + "properties": { + "excludeData": { + "type": "boolean", + "required": false + }, + "excludeViews": { + "type": "boolean", + "required": false + }, + "excludeHooks": { + "type": "boolean", + "required": false + } + } + } + } + }, + "examples": { + "Example 1": { + "value": { + "excludeData": true, + "excludeViews": true + } + } + } + } + } + }, + "tags": [ + "DB Table" + ], + "description": "Duplicate a table", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + }, + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "p_124hhlkbeasewh", + "type": "string" + }, + "name": "baseId", + "in": "path", + "required": true, + "description": "Unique Base ID" + }, + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "md_124hhlkbeasewh", + "type": "string" + }, + "name": "tableId", + "in": "path", + "required": true, + "description": "Unique Table ID" + } + ] + } + }, + "/api/v2/meta/projects/{baseId}/{sourceId}/tables": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "p_124hhlkbeasewh", + "type": "string" + }, + "name": "baseId", + "in": "path", + "required": true, + "description": "Unique Base ID" + }, + { + "schema": { + "type": "string", + "pattern": "ds_j04jmxh5xg10lu" + }, + "name": "sourceId", + "in": "path", + "required": true, + "description": "Unique Source ID" + } + ], + "get": { + "summary": "List Tables", + "operationId": "table-list", + "responses": { + "200": { + "$ref": "#/components/responses/TableList" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "page" + }, + { + "schema": { + "type": "number" + }, + "in": "query", + "name": "pageSize" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sort" + }, + { + "schema": { + "type": "boolean" + }, + "in": "query", + "name": "includeM2M" + } + ], + "tags": [ + "Source" + ], + "description": "List all tables in a given Base and Source" + }, + "post": { + "summary": "Create Table", + "operationId": "table-create", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Table" + }, + "examples": { + "Example 1": { + "value": { + "source_id": "ds_g4ccx6e77h1dmi", + "columns": [ + { + "ai": 0, + "au": 0, + "source_id": "ds_g4ccx6e77h1dmi", + "cc": "", + "cdf": "CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP", + "clen": null, + "column_name": "updated_at", + "cop": "4", + "created_at": "2023-03-02 17:04:06", + "csn": null, + "ct": "timestamp", + "deleted": null, + "dt": "timestamp", + "dtx": "specificType", + "dtxp": "0", + "dtxs": null, + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "cl_m4wkaqgqqjzoeh", + "meta": null, + "np": null, + "ns": null, + "order": 4, + "pk": 0, + "base_id": "p_xm3thidrblw4n7", + "pv": null, + "rqd": 0, + "system": 0, + "title": "UpdatedAt", + "uidt": "DateTime", + "un": 0, + "unique": 0, + "updated_at": "2023-03-02 17:04:06", + "validate": null, + "virtual": null + }, + { + "ai": 0, + "au": 0, + "source_id": "ds_g4ccx6e77h1dmi", + "cc": "", + "cdf": "CURRENT_TIMESTAMP", + "clen": null, + "column_name": "created_at", + "cop": "3", + "created_at": "2023-03-02 17:04:06", + "csn": null, + "ct": "timestamp", + "deleted": null, + "dt": "timestamp", + "dtx": "specificType", + "dtxp": "0", + "dtxs": null, + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "cl_jpl0qu4gj4rexq", + "meta": null, + "np": null, + "ns": null, + "order": 3, + "pk": 0, + "base_id": "p_xm3thidrblw4n7", + "pv": null, + "rqd": 0, + "system": 0, + "title": "CreatedAt", + "uidt": "DateTime", + "un": 0, + "unique": 0, + "updated_at": "2023-03-02 17:04:06", + "validate": null, + "virtual": null + }, + { + "ai": 0, + "au": 0, + "source_id": "ds_g4ccx6e77h1dmi", + "cc": "", + "cdf": null, + "clen": "45", + "column_name": "title", + "cop": "2", + "created_at": "2023-03-02 17:04:06", + "csn": "utf8mb4", + "ct": "varchar(45)", + "deleted": null, + "dt": "varchar", + "dtx": "specificType", + "dtxp": "45", + "dtxs": null, + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "cl_c5knoi4xs4sfpt", + "meta": null, + "np": null, + "ns": null, + "order": 2, + "pk": 0, + "base_id": "p_xm3thidrblw4n7", + "pv": 1, + "rqd": 0, + "system": 0, + "title": "Title", + "uidt": "SingleLineText", + "un": 0, + "unique": 0, + "updated_at": "2023-03-02 17:04:06", + "validate": null, + "virtual": null + }, + { + "ai": 1, + "au": 0, + "source_id": "ds_g4ccx6e77h1dmi", + "cc": "", + "cdf": null, + "clen": null, + "column_name": "id", + "cop": "1", + "created_at": "2023-03-02 17:04:06", + "csn": null, + "ct": "int unsigned", + "deleted": null, + "dt": "int", + "dtx": "specificType", + "dtxp": "", + "dtxs": "0", + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "cl_phvuuwjrzcdo0g", + "meta": null, + "np": "10", + "ns": "0", + "order": 1, + "pk": 1, + "base_id": "p_xm3thidrblw4n7", + "pv": null, + "rqd": 1, + "system": 0, + "title": "Id", + "uidt": "ID", + "un": 1, + "unique": 0, + "updated_at": "2023-03-02 17:04:06", + "validate": null, + "virtual": null + } + ], + "columnsById": { + "cl_c5knoi4xs4sfpt": { + "ai": 0, + "au": 0, + "source_id": "ds_g4ccx6e77h1dmi", + "cc": "", + "cdf": null, + "clen": "45", + "column_name": "title", + "cop": "2", + "created_at": "2023-03-02 17:04:06", + "csn": "utf8mb4", + "ct": "varchar(45)", + "deleted": null, + "dt": "varchar", + "dtx": "specificType", + "dtxp": "45", + "dtxs": null, + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "cl_c5knoi4xs4sfpt", + "meta": null, + "np": null, + "ns": null, + "order": 2, + "pk": 0, + "base_id": "p_xm3thidrblw4n7", + "pv": 1, + "rqd": 0, + "system": 0, + "title": "Title", + "uidt": "SingleLineText", + "un": 0, + "unique": 0, + "updated_at": "2023-03-02 17:04:06", + "validate": null, + "virtual": null + }, + "cl_jpl0qu4gj4rexq": { + "ai": 0, + "au": 0, + "source_id": "ds_g4ccx6e77h1dmi", + "cc": "", + "cdf": "CURRENT_TIMESTAMP", + "clen": null, + "column_name": "created_at", + "cop": "3", + "created_at": "2023-03-02 17:04:06", + "csn": null, + "ct": "timestamp", + "deleted": null, + "dt": "timestamp", + "dtx": "specificType", + "dtxp": "0", + "dtxs": null, + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "cl_jpl0qu4gj4rexq", + "meta": null, + "np": null, + "ns": null, + "order": 3, + "pk": 0, + "base_id": "p_xm3thidrblw4n7", + "pv": null, + "rqd": 0, + "system": 0, + "title": "CreatedAt", + "uidt": "DateTime", + "un": 0, + "unique": 0, + "updated_at": "2023-03-02 17:04:06", + "validate": null, + "virtual": null + }, + "cl_m4wkaqgqqjzoeh": { + "ai": 0, + "au": 0, + "source_id": "ds_g4ccx6e77h1dmi", + "cc": "", + "cdf": "CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP", + "clen": null, + "column_name": "updated_at", + "cop": "4", + "created_at": "2023-03-02 17:04:06", + "csn": null, + "ct": "timestamp", + "deleted": null, + "dt": "timestamp", + "dtx": "specificType", + "dtxp": "0", + "dtxs": null, + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "cl_m4wkaqgqqjzoeh", + "meta": null, + "np": null, + "ns": null, + "order": 4, + "pk": 0, + "base_id": "p_xm3thidrblw4n7", + "pv": null, + "rqd": 0, + "system": 0, + "title": "UpdatedAt", + "uidt": "DateTime", + "un": 0, + "unique": 0, + "updated_at": "2023-03-02 17:04:06", + "validate": null, + "virtual": null + }, + "cl_phvuuwjrzcdo0g": { + "ai": 1, + "au": 0, + "source_id": "ds_g4ccx6e77h1dmi", + "cc": "", + "cdf": null, + "clen": null, + "column_name": "id", + "cop": "1", + "created_at": "2023-03-02 17:04:06", + "csn": null, + "ct": "int unsigned", + "deleted": null, + "dt": "int", + "dtx": "specificType", + "dtxp": "", + "dtxs": "0", + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "cl_phvuuwjrzcdo0g", + "meta": null, + "np": "10", + "ns": "0", + "order": 1, + "pk": 1, + "base_id": "p_xm3thidrblw4n7", + "pv": null, + "rqd": 1, + "system": 0, + "title": "Id", + "uidt": "ID", + "un": 1, + "unique": 0, + "updated_at": "2023-03-02 17:04:06", + "validate": null, + "virtual": null + } + }, + "created_at": "2023-03-02 17:04:06", + "deleted": null, + "enabled": 1, + "id": "md_rsu68aqjsbyqtl", + "meta": null, + "mm": 0, + "order": 1, + "pinned": null, + "base_id": "p_xm3thidrblw4n7", + "schema": null, + "table_name": "nc_vm5q___Table1", + "tags": null, + "title": "Table1", + "type": "table", + "updated_at": "2023-03-02 17:04:08", + "views": [ + { + "_ptn": "Table1", + "_tn": "Table1", + "source_id": "ds_g4ccx6e77h1dmi", + "created_at": "2023-03-02 17:04:06", + "disabled": { + "commenter": false, + "creator": false, + "editor": false, + "guest": false, + "owner": false, + "viewer": false + }, + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "vw_p2jcatxz4mvcfw", + "is_default": 1, + "lock_type": "collaborative", + "meta": {}, + "order": 1, + "password": null, + "base_id": "p_xm3thidrblw4n7", + "ptn": "nc_vm5q___Table1", + "ptype": "table", + "show": 1, + "show_system_fields": null, + "table_meta": null, + "title": "Table1", + "tn": "Table1", + "type": 3, + "updated_at": "2023-03-02 17:04:06", + "uuid": null, + "view": { + "source_id": "ds_g4ccx6e77h1dmi", + "created_at": "2023-03-02 17:04:06", + "fk_view_id": "vw_p2jcatxz4mvcfw", + "meta": null, + "base_id": "p_xm3thidrblw4n7", + "row_height": null, + "updated_at": "2023-03-02 17:04:06", + "uuid": null + } + } + ] + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TableReq" + }, + "examples": { + "Example 1": { + "value": { + "columns": [ + { + "ai": false, + "altered": 1, + "cdf": "CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP", + "ck": false, + "clen": 45, + "column_name": "updated_at", + "ct": "varchar(45)", + "dt": "timestamp", + "dtx": "specificType", + "dtxp": "", + "dtxs": "", + "np": null, + "nrqd": true, + "ns": null, + "pk": false, + "rqd": false, + "title": "UpdatedAt", + "uicn": "", + "uidt": "DateTime", + "uip": "", + "un": false + }, + { + "ai": false, + "altered": 1, + "cdf": "CURRENT_TIMESTAMP", + "ck": false, + "clen": 45, + "column_name": "created_at", + "ct": "varchar(45)", + "dt": "timestamp", + "dtx": "specificType", + "dtxp": "", + "dtxs": "", + "np": null, + "nrqd": true, + "ns": null, + "pk": false, + "rqd": false, + "title": "CreatedAt", + "uicn": "", + "uidt": "DateTime", + "uip": "", + "un": false + }, + { + "ai": false, + "altered": 1, + "cdf": null, + "ck": false, + "clen": 45, + "column_name": "title", + "ct": "varchar(45)", + "dt": "varchar", + "dtx": "specificType", + "dtxp": "45", + "dtxs": "", + "np": null, + "nrqd": true, + "ns": null, + "pk": false, + "rqd": false, + "title": "Title", + "uicn": "", + "uidt": "SingleLineText", + "uip": "", + "un": false + }, + { + "ai": true, + "altered": 1, + "cdf": null, + "ck": false, + "clen": null, + "column_name": "id", + "ct": "int(11)", + "dt": "int", + "dtx": "integer", + "dtxp": "11", + "dtxs": "", + "np": 11, + "nrqd": false, + "ns": 0, + "pk": true, + "rqd": true, + "title": "Id", + "uicn": "", + "uidt": "ID", + "uip": "", + "un": true + } + ], + "table_name": "Sheet-1", + "title": "Sheet-1" + } + } + } + } + } + }, + "tags": [ + "Source" + ], + "description": "Create a new table in a given Base and Source", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/tables/{tableId}/reorder": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "md_w9gpnaousnfss1", + "type": "string" + }, + "name": "tableId", + "in": "path", + "required": true, + "description": "Unique Table ID" + } + ], + "post": { + "summary": "Reorder Table", + "operationId": "db-table-reorder", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "boolean" + }, + "examples": { + "Example 1": { + "value": true + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "order": { + "type": "number" + } + } + }, + "examples": { + "Example 1": { + "value": { + "order": 0 + } + } + } + } + } + }, + "tags": [ + "DB Table" + ], + "description": "Update the order of the given Table", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/tables/{tableId}/columns": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "md_w9gpnaousnfss1", + "type": "string" + }, + "name": "tableId", + "in": "path", + "required": true, + "description": "Unique Table ID" + } + ], + "post": { + "summary": "Create Column", + "operationId": "db-table-column-create", + "responses": { + "200": { + "description": "OK" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ColumnReq" + }, + "examples": { + "Example 1": { + "value": { + "ai": 0, + "au": 0, + "source_id": "ds_krsappzu9f8vmo", + "cc": "", + "cdf": null, + "clen": "45", + "column_name": "title", + "cop": "2", + "csn": "utf8mb4", + "ct": "varchar(45)", + "deleted": null, + "dt": "varchar", + "dtx": "specificType", + "dtxp": "45", + "dtxs": null, + "fk_model_id": "md_yvwvbt2i78rgcm", + "id": "cl_0j9gv0oi8vjy46", + "meta": null, + "np": null, + "ns": null, + "order": 2, + "pk": 0, + "base_id": "p_01clqvzik3izk6", + "pv": 1, + "rqd": 0, + "system": 0, + "title": "Title", + "uidt": "SingleLineText", + "un": 0, + "unique": 0, + "validate": null, + "virtual": null + } + } + } + } + } + }, + "tags": [ + "DB Table Column" + ], + "description": "Create a new column in a given Table", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/columns/{columnId}": { + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "columnId", + "in": "path", + "required": true + } + ], + "patch": { + "summary": "Update Column", + "operationId": "db-table-column-update", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Column" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ColumnReq" + } + } + } + }, + "tags": [ + "DB Table Column" + ], + "description": "Update the existing column by the given column ID", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "delete": { + "summary": "Delete Column", + "operationId": "db-table-column-delete", + "responses": { + "200": { + "description": "OK" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Table Column" + ], + "description": "Delete the existing column by the given column ID", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "get": { + "summary": "Get Column", + "operationId": "db-table-column-get", + "responses": { + "200": { + "description": "OK" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Table Column" + ], + "description": "Get the existing column by the given column ID", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/columns/{columnId}/primary": { + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "columnId", + "in": "path", + "required": true + } + ], + "post": { + "summary": "Create Primary Value", + "operationId": "db-table-column-primary-column-set", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "boolean" + }, + "examples": { + "Example 1": { + "value": true + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Table Column" + ], + "description": "Set a primary value on a given column", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/tables/{tableId}/views": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "md_w9gpnaousnfss1", + "type": "string" + }, + "name": "tableId", + "in": "path", + "required": true, + "description": "Unique Table ID" + } + ], + "get": { + "summary": "List Views", + "operationId": "db-view-list", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ViewList" + }, + "examples": { + "Example 1": { + "value": { + "list": [ + { + "alias": "string", + "column": [ + { + "alias": "string", + "auto_increment": true, + "auto_update_timestamp": true, + "source_id": "string", + "character_maximum_length": "string", + "character_set_name": "string", + "colOptions": { + "deleted": "string", + "dr": "string", + "fk_child_column_id": "string", + "fk_column_id": "string", + "fk_index_name": "string", + "fk_mm_child_column_id": "string", + "fk_mm_model_id": "string", + "fk_mm_parent_column_id": "string", + "fk_parent_column_id": "string", + "id": "string", + "order": "string", + "type": "string", + "ur": "string", + "virtual": true + }, + "column_comment": "string", + "column_default": "string", + "column_ordinal_position": "string", + "column_type": "string", + "data_type": "string", + "data_type_x": "string", + "data_type_x_precision": "string", + "data_type_x_scale": "string", + "deleted": true, + "fk_model_id": "string", + "id": "string", + "numeric_precision": "string", + "numeric_scale": "string", + "order": 0, + "primary_key": true, + "primary_value": true, + "rqd": "string", + "title": "string", + "ui_data_type": "string", + "un": "string", + "unique": true, + "visible": true + } + ], + "columnByIds": {}, + "deleted": true, + "enabled": true, + "fk_base_id": "string", + "fk_project_id": "string", + "id": "string", + "order": 0, + "parent_id": "string", + "pinned": true, + "show_as": "string", + "tags": "string", + "title": "string", + "type": "string" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB View" + ], + "description": "List all views in a given Table.", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/views/{viewId}": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "vw_wtdg2meyig5l4q" + }, + "name": "viewId", + "in": "path", + "required": true, + "description": "Unique View ID" + } + ], + "patch": { + "summary": "Update View", + "operationId": "db-view-update", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/View" + }, + "examples": { + "Example 1": { + "value": { + "source_id": "ds_g4ccx6e77h1dmi", + "created_at": "2023-03-02 17:46:31", + "fk_model_id": "md_mhs9z4r2ak98x0", + "id": "vw_lg052cnc1c26kf", + "is_default": 1, + "lock_type": "collaborative", + "meta": "{\"allowCSVDownload\":true}", + "order": 1, + "password": "password123", + "base_id": "p_xm3thidrblw4n7", + "show": 1, + "show_system_fields": null, + "title": "Grid View 1", + "type": 3, + "updated_at": "2023-03-02 17:46:31", + "uuid": null + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ViewUpdateReq" + }, + "examples": { + "Example 1": { + "value": { + "title": "Grid View 1", + "uuid": "e2457bbf-e29c-4fec-866e-fe3b01dba57f", + "password": "password123", + "lock_type": "collaborative", + "meta": "{\"allowCSVDownload\":true}", + "order": 1, + "show_system_fields": 0 + } + } + } + } + } + }, + "tags": [ + "DB View" + ], + "description": "Update the view with the given view Id.", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "delete": { + "summary": "Delete View", + "operationId": "db-view-delete", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "boolean" + }, + "examples": { + "Example 1": { + "value": true + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB View" + ], + "description": "Delete the view with the given view Id.", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/views/{viewId}/show-all": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "vw_wtdg2meyig5l4q" + }, + "name": "viewId", + "in": "path", + "required": true, + "description": "Unique View ID" + } + ], + "post": { + "summary": "Show All Columns In View", + "operationId": "db-view-show-all-column", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "boolean" + }, + "examples": { + "Example 1": { + "value": true + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB View" + ], + "description": "Show All Columns in a given View", + "parameters": [ + { + "schema": { + "type": "array" + }, + "in": "query", + "name": "ignoreIds" + }, + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/views/{viewId}/hide-all": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "vw_wtdg2meyig5l4q" + }, + "name": "viewId", + "in": "path", + "required": true, + "description": "Unique View ID" + } + ], + "post": { + "summary": "Hide All Columns In View", + "operationId": "db-view-hide-all-column", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "boolean" + }, + "examples": { + "Example 1": { + "value": true + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB View" + ], + "parameters": [ + { + "schema": { + "type": "array" + }, + "in": "query", + "name": "ignoreIds" + }, + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "description": "Hide All Columns in a given View" + } + }, + "/api/v2/meta/tables/{tableId}/share": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "md_w9gpnaousnfss1", + "type": "string" + }, + "name": "tableId", + "in": "path", + "required": true, + "description": "Unique Table ID" + } + ], + "get": { + "summary": "List Shared Views", + "operationId": "db-view-share-list", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SharedViewList" + }, + "examples": { + "Example 1": { + "value": { + "list": [ + { + "source_id": "ds_g4ccx6e77h1dmi", + "created_at": "2023-03-02 17:46:31", + "fk_model_id": "md_mhs9z4r2ak98x0", + "id": "vw_lg052cnc1c26kf", + "is_default": 1, + "lock_type": "collaborative", + "meta": {}, + "order": 1, + "base_id": "p_xm3thidrblw4n7", + "show": 1, + "show_system_fields": null, + "title": "Sheet-1", + "type": 3, + "updated_at": "2023-03-02 17:46:31", + "uuid": null, + "view": { + "source_id": "ds_g4ccx6e77h1dmi", + "created_at": "2023-03-02 17:46:31", + "fk_view_id": "vw_lg052cnc1c26kf", + "meta": null, + "base_id": "p_xm3thidrblw4n7", + "row_height": null, + "updated_at": "2023-03-02 17:46:31", + "uuid": null + } + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "List all shared views in a given Table", + "tags": [ + "DB View Share" + ], + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/views/{viewId}/share": { + "parameters": [ + { + "schema": { + "type": "string", + "example": "vw_wtdg2meyig5l4q" + }, + "name": "viewId", + "in": "path", + "required": true, + "description": "Unique View ID" + } + ], + "post": { + "summary": "Create Shared View", + "operationId": "db-view-share-create", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SharedViewReq" + }, + "examples": { + "Example 1": { + "value": { + "meta": {}, + "password": "123456789" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB View Share" + ], + "description": "Create a shared view in a given View..", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "patch": { + "summary": "Update Shared View", + "operationId": "db-view-share-update", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SharedView" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SharedViewReq" + } + } + }, + "description": "" + }, + "tags": [ + "DB View Share" + ], + "description": "Update a shared view in a given View..", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "delete": { + "summary": "Delete Shared View", + "operationId": "db-view-share-delete", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "boolean" + }, + "examples": { + "Example 1": { + "value": true + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "Delete a shared view in a given View.", + "tags": [ + "DB View Share" + ], + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/views/{viewId}/columns": { + "parameters": [ + { + "schema": { + "type": "string", + "example": "vw_wtdg2meyig5l4q" + }, + "name": "viewId", + "in": "path", + "required": true, + "description": "Unique View ID" + } + ], + "get": { + "summary": "List Columns In View", + "operationId": "db-view-column-list", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ColumnList" + }, + "examples": { + "Example 1": { + "value": { + "list": [ + { + "ai": 0, + "au": 0, + "source_id": "ds_krsappzu9f8vmo", + "cc": "", + "cdf": null, + "clen": "45", + "column_name": "title", + "cop": "2", + "created_at": "2023-03-02 13:14:16", + "csn": "utf8mb4", + "ct": "varchar(45)", + "deleted": null, + "dt": "varchar", + "dtx": "specificType", + "dtxp": "45", + "dtxs": null, + "fk_model_id": "md_yvwvbt2i78rgcm", + "id": "cl_0j9gv0oi8vjy46", + "meta": null, + "np": null, + "ns": null, + "order": 2, + "pk": 0, + "base_id": "p_01clqvzik3izk6", + "pv": 1, + "rqd": 0, + "system": 0, + "title": "Title", + "uidt": "SingleLineText", + "un": 0, + "unique": 0, + "updated_at": "2023-03-02 13:14:16", + "validate": null, + "virtual": null + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB View Column" + ], + "description": "List all columns by ViewID", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "post": { + "summary": "Create Column in View", + "operationId": "db-view-column-create", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Column" + }, + "examples": { + "Example 1": { + "value": { + "ai": 0, + "au": 0, + "source_id": "ds_krsappzu9f8vmo", + "cc": "", + "cdf": null, + "clen": "45", + "column_name": "title", + "cop": "2", + "created_at": "2023-03-02 13:14:16", + "csn": "utf8mb4", + "ct": "varchar(45)", + "deleted": null, + "dt": "varchar", + "dtx": "specificType", + "dtxp": "45", + "dtxs": null, + "fk_model_id": "md_yvwvbt2i78rgcm", + "id": "cl_0j9gv0oi8vjy46", + "meta": null, + "np": null, + "ns": null, + "order": 2, + "pk": 0, + "base_id": "p_01clqvzik3izk6", + "pv": 1, + "rqd": 0, + "system": 0, + "title": "Title", + "uidt": "SingleLineText", + "un": 0, + "unique": 0, + "updated_at": "2023-03-02 13:14:16", + "validate": null, + "virtual": null + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB View Column" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ViewColumnReq" + }, + "examples": { + "Example 1": { + "value": { + "fk_column_id": "cl_m4wkaqgqqjzoeh", + "show": 0, + "order": 1 + } + } + } + } + } + }, + "description": "Create a new column in a given View", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/views/{viewId}/columns/{columnId}": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "vw_wtdg2meyig5l4q" + }, + "name": "viewId", + "in": "path", + "required": true + }, + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "cl_8iw2o4ejzvdyna", + "type": "string" + }, + "name": "columnId", + "in": "path", + "required": true, + "description": "Unique Column ID" + } + ], + "patch": { + "summary": "Update View Column", + "operationId": "db-view-column-update", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "number" + }, + "examples": { + "Example 1": { + "value": 1 + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB View Column" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ViewColumnUpdateReq" + }, + "examples": { + "Example 1": { + "value": { + "show": 0, + "order": 1 + } + } + } + } + } + }, + "description": "Update a column in a View", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/views/{viewId}/sorts": { + "parameters": [ + { + "schema": { + "type": "string", + "example": "vw_wtdg2meyig5l4q" + }, + "name": "viewId", + "in": "path", + "required": true, + "description": "Unique View ID" + } + ], + "get": { + "summary": "List View Sorts", + "operationId": "db-table-sort-list", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SortList" + }, + "examples": { + "Example 1": { + "value": { + "list": [ + { + "id": "so_xd4t51uv60ghzl", + "fk_column_id": "cl_l11b769pe2j1ce", + "fk_model_id": "md_ehn5izr99m7d45", + "source_id": "ds_3l9qx8xqksenrl", + "direction": "desc", + "order": 1, + "base_id": "p_9sx43moxhqtjm3" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Table Sort" + ], + "description": "List all the sort data in a given View", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "post": { + "summary": "Update View Sort", + "operationId": "db-table-sort-create", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "number" + }, + "examples": { + "Example 1": { + "value": 1 + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Table Sort" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SortReq" + }, + { + "type": "object", + "properties": { + "push_to_top": { + "type": "boolean", + "example": true, + "description": "Push the sort to the top of the list" + } + } + } + ] + } + } + } + }, + "description": "Update the sort data in a given View", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/sorts/{sortId}": { + "parameters": [ + { + "schema": { + "type": "string", + "example": "so_xd4t51uv60ghzl" + }, + "name": "sortId", + "in": "path", + "description": "Unique Sort ID", + "required": true + } + ], + "get": { + "summary": "Get Sort", + "operationId": "db-table-sort-get", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Sort" + }, + "examples": { + "Example 1": { + "value": { + "id": "so_xd4t51uv60ghzl", + "fk_column_id": "cl_l11b769pe2j1ce", + "fk_model_id": "md_ehn5izr99m7d45", + "source_id": "ds_3l9qx8xqksenrl", + "direction": "desc", + "order": 1, + "base_id": "p_9sx43moxhqtjm3" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Table Sort" + ], + "description": "Get the sort data by Sort ID", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "patch": { + "summary": "Update Sort", + "operationId": "db-table-sort-update", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "number", + "example": 1 + }, + "examples": { + "Example 1": { + "value": 1 + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Table Sort" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SortReq" + }, + "examples": { + "Example 1": { + "value": { + "direction": "asc", + "fk_column_id": "cl_l11b769pe2j1ce" + } + } + } + } + } + }, + "description": "Update the sort data by Sort ID", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "delete": { + "summary": "Delete Sort", + "operationId": "db-table-sort-delete", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "boolean" + }, + "examples": { + "Example 1": { + "value": true + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Table Sort" + ], + "description": "Delete the sort data by Sort ID", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/views/{viewId}/filters": { + "parameters": [ + { + "schema": { + "type": "string", + "example": "vw_wtdg2meyig5l4q" + }, + "name": "viewId", + "in": "path", + "required": true, + "description": "Unique View ID" + } + ], + "get": { + "summary": "Get View Filter", + "operationId": "db-table-filter-read", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FilterList" + }, + "examples": { + "Example 1": { + "value": { + "list": [ + { + "source_id": "ds_g4ccx6e77h1dmi", + "comparison_op": "eq", + "comparison_sub_op": null, + "created_at": "2023-03-02 18:18:05", + "fk_column_id": "cl_d7ah9n2qfupgys", + "fk_hook_id": null, + "fk_parent_id": null, + "fk_view_id": "vw_b739e29vqmrxnf", + "id": "fi_xn647tpmdq8fu8", + "is_group": null, + "logical_op": "and", + "order": 1, + "base_id": "p_xm3thidrblw4n7", + "updated_at": "2023-03-02 18:18:05", + "value": "foo" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Table Filter" + ], + "description": "Get the filter data in a given View", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "post": { + "summary": "Create View Filter", + "operationId": "db-table-filter-create", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Filter" + }, + "examples": { + "Example 1": { + "value": { + "source_id": "ds_g4ccx6e77h1dmi", + "comparison_op": "eq", + "comparison_sub_op": null, + "created_at": "2023-03-02 18:18:05", + "fk_column_id": "cl_d7ah9n2qfupgys", + "fk_hook_id": null, + "fk_parent_id": null, + "fk_view_id": "vw_b739e29vqmrxnf", + "id": "fi_xn647tpmdq8fu8", + "is_group": null, + "logical_op": "and", + "order": 1, + "base_id": "p_xm3thidrblw4n7", + "updated_at": "2023-03-02 18:18:05", + "value": "foo" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Table Filter" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FilterReq" + }, + "examples": { + "Example 1": { + "value": { + "comparison_op": "eq", + "comparison_sub_op": null, + "fk_column_id": "cl_d7ah9n2qfupgys", + "is_group": false, + "logical_op": "and", + "value": "foo" + } + } + } + } + } + }, + "description": "Update the filter data in a given View", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/hooks/{hookId}/filters": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "hk_0063k4o1frnxbr" + }, + "name": "hookId", + "in": "path", + "required": true, + "description": "Unique Hook ID" + } + ], + "get": { + "summary": "Get Hook Filter", + "operationId": "db-table-webhook-filter-read", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FilterList" + }, + "examples": { + "Example 1": { + "value": { + "list": [ + { + "source_id": "ds_g4ccx6e77h1dmi", + "comparison_op": "eq", + "comparison_sub_op": null, + "created_at": "2023-03-02 18:18:05", + "fk_column_id": "cl_d7ah9n2qfupgys", + "fk_hook_id": null, + "fk_parent_id": null, + "fk_view_id": "vw_b739e29vqmrxnf", + "id": "fi_xn647tpmdq8fu8", + "is_group": null, + "logical_op": "and", + "order": 1, + "base_id": "p_xm3thidrblw4n7", + "updated_at": "2023-03-02 18:18:05", + "value": "foo" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Table Webhook Filter" + ], + "description": "Get the filter data in a given Hook", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "post": { + "summary": "Create Hook Filter", + "operationId": "db-table-webhook-filter-create", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Filter" + }, + "examples": { + "Example 1": { + "value": { + "source_id": "ds_g4ccx6e77h1dmi", + "comparison_op": "eq", + "comparison_sub_op": null, + "created_at": "2023-03-02 18:18:05", + "fk_column_id": "cl_d7ah9n2qfupgys", + "fk_hook_id": null, + "fk_parent_id": null, + "fk_view_id": "vw_b739e29vqmrxnf", + "id": "fi_xn647tpmdq8fu8", + "is_group": null, + "logical_op": "and", + "order": 1, + "base_id": "p_xm3thidrblw4n7", + "updated_at": "2023-03-02 18:18:05", + "value": "foo" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Table Webhook Filter" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FilterReq" + }, + "examples": { + "Example 1": { + "value": { + "comparison_op": "eq", + "comparison_sub_op": null, + "fk_column_id": "cl_d7ah9n2qfupgys", + "is_group": false, + "logical_op": "and", + "value": "foo" + } + } + } + } + } + }, + "description": "Create filter(s) in a given Hook", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/hooks/{hookId}/logs": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "hk_0063k4o1frnxbr" + }, + "name": "hookId", + "in": "path", + "required": true, + "description": "Unique Hook ID" + } + ], + "get": { + "summary": "List Hook Logs", + "operationId": "db-table-webhook-logs-list", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HookLogList" + }, + "examples": { + "Example 1": { + "value": { + "list": [ + { + "source_id": "ds_jxuewivwbxeum2", + "event": "after", + "execution_time": "98", + "fk_hook_id": "hk_035ijv5qdi97y5", + "id": "string", + "notifications": "{\"type\":\"URL\",\"payload\":{\"method\":\"POST\",\"body\":\"{{ json data }}\",\"headers\":[{}],\"parameters\":[{}],\"auth\":\"\",\"path\":\"https://webhook.site/6eb45ce5-b611-4be1-8b96-c2965755662b\"}}", + "operation": "insert", + "payload": "{\"method\":\"POST\",\"body\":\"{{ json data }}\",\"headers\":[{}],\"parameters\":[{}],\"auth\":\"\",\"path\":\"https://webhook.site/6eb45ce5-b611-4be1-8b96-c2965755662b\"}", + "base_id": "p_tbhl1hnycvhe5l", + "response": "{\"status\":200,\"statusText\":\"OK\",\"headers\":{\"server\":\"nginx\",\"content-type\":\"text/plain; charset=UTF-8\",\"transfer-encoding\":\"chunked\",\"connection\":\"close\",\"vary\":\"Accept-Encoding\",\"x-request-id\":\"53844a7d-ede8-4798-adf7-8af441908a72\",\"x-token-id\":\"6eb45ce5-b611-4be1-8b96-c2965755662b\",\"cache-control\":\"no-cache, private\",\"date\":\"Fri, 24 Mar 2023 10:50:10 GMT\"},\"config\":{\"url\":\"https://webhook.site/6eb45ce5-b611-4be1-8b96-c2965755662b\",\"method\":\"post\",\"data\":\"{\\\"type\\\":\\\"records.after.insert\\\",\\\"id\\\":\\\"a77d97dc-a3e4-4719-9b46-45f93e0cc99a\\\",\\\"data\\\":{\\\"table_id\\\":\\\"md_d8v403o74mf5lf\\\",\\\"table_name\\\":\\\"Sheet-2\\\"}}\",\"headers\":{\"Accept\":\"application/json, text/plain, */*\",\"Content-Type\":\"application/x-www-form-urlencoded\",\"User-Agent\":\"axios/0.21.4\",\"Content-Length\":138},\"params\":{}}}", + "test_call": 0, + "triggered_by": "w@nocodb.com", + "type": "URL" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Table Webhook Logs" + ], + "description": "List the log data in a given Hook", + "parameters": [ + { + "schema": { + "type": "integer", + "minimum": 1 + }, + "in": "query", + "name": "limit" + }, + { + "schema": { + "type": "integer", + "minimum": 0 + }, + "in": "query", + "name": "offset" + }, + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/filters/{filterId}": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "pattern": "fi_pgfuo11uhn2xeo" + }, + "name": "filterId", + "in": "path", + "required": true, + "description": "Unique Filter ID" + } + ], + "get": { + "summary": "Get Filter", + "operationId": "db-table-filter-get", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Filter" + }, + "examples": { + "Example 1": { + "value": { + "source_id": "ds_g4ccx6e77h1dmi", + "comparison_op": "eq", + "comparison_sub_op": null, + "created_at": "2023-03-02 18:18:05", + "fk_column_id": "cl_d7ah9n2qfupgys", + "fk_hook_id": null, + "fk_parent_id": null, + "fk_view_id": "vw_b739e29vqmrxnf", + "id": "fi_xn647tpmdq8fu8", + "is_group": null, + "logical_op": "and", + "order": 1, + "base_id": "p_xm3thidrblw4n7", + "updated_at": "2023-03-02 18:18:05", + "value": "foo" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Table Filter" + ], + "description": "Get the filter data with a given Filter ID", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "patch": { + "summary": "Update Filter", + "operationId": "db-table-filter-update", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "number" + }, + "examples": { + "Example 1": { + "value": 1 + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Table Filter" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FilterReq" + }, + "examples": { + "Example 1": { + "value": { + "comparison_op": "eq", + "comparison_sub_op": null, + "fk_column_id": "cl_d7ah9n2qfupgys", + "is_group": false, + "logical_op": "and", + "value": "foo" + } + } + } + } + } + }, + "description": "Update the filter data with a given Filter ID", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "delete": { + "summary": "Delete Filter", + "operationId": "db-table-filter-delete", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "boolean" + }, + "examples": { + "Example 1": { + "value": true + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Table Filter" + ], + "description": "Delete the filter data with a given Filter ID", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/filters/{filterGroupId}/children": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "fi_pgfuo11uhn2xeo", + "description": "Filter Group ID" + }, + "name": "filterGroupId", + "in": "path", + "required": true + } + ], + "get": { + "summary": "Get Filter Group Children", + "operationId": "db-table-filter-children-read", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FilterList" + }, + "examples": { + "Example 1": { + "value": { + "list": [ + { + "source_id": "ds_g4ccx6e77h1dmi", + "comparison_op": "eq", + "comparison_sub_op": null, + "created_at": "2023-03-02 18:18:05", + "fk_column_id": "cl_d7ah9n2qfupgys", + "fk_hook_id": null, + "fk_parent_id": null, + "fk_view_id": "vw_b739e29vqmrxnf", + "id": "fi_xn647tpmdq8fu8", + "is_group": null, + "logical_op": "and", + "order": 1, + "base_id": "p_xm3thidrblw4n7", + "updated_at": "2023-03-02 18:18:05", + "value": "foo" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Table Filter" + ], + "description": "Get Filter Group Children of a given group ID", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/tables/{tableId}/grids": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "md_w9gpnaousnfss1", + "type": "string" + }, + "name": "tableId", + "in": "path", + "required": true, + "description": "Unique Table ID" + } + ], + "post": { + "summary": "Create Grid View", + "operationId": "db-view-grid-create", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/View" + }, + "examples": { + "Example 1": { + "value": { + "id": "vw_o50jiw9v2txktv", + "source_id": "ds_a95vextjl510z7", + "base_id": "p_slkm6i3v31q4bc", + "fk_model_id": "md_8hr3xndx8umuce", + "title": "Grid-1", + "type": 3, + "is_default": null, + "show_system_fields": null, + "lock_type": "collaborative", + "uuid": null, + "password": null, + "show": true, + "order": 2, + "created_at": "2023-03-13T07:29:16.610Z", + "updated_at": "2023-03-13T07:29:16.610Z", + "meta": {} + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB View" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ViewCreateReq" + }, + "examples": { + "Example 1": { + "value": { + "title": "My Grid View", + "type": 3, + "copy_from_id": null, + "fk_grp_col_id": null, + "fk_geo_data_col_id": null + } + } + } + } + } + }, + "description": "Create a new grid view in a given Table", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/tables/{tableId}/forms": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "md_w9gpnaousnfss1", + "type": "string" + }, + "name": "tableId", + "in": "path", + "required": true, + "description": "Unique Table ID" + } + ], + "post": { + "summary": "Create Form View", + "operationId": "db-view-form-create", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/View" + }, + "examples": { + "Example 1": { + "value": { + "id": "vw_a830n4bmwk8wlp", + "source_id": "ds_a95vextjl510z7", + "base_id": "p_slkm6i3v31q4bc", + "fk_model_id": "md_8hr3xndx8umuce", + "title": "Form-1", + "type": 1, + "is_default": null, + "show_system_fields": null, + "lock_type": "collaborative", + "uuid": null, + "password": null, + "show": true, + "order": 4, + "created_at": "2023-03-13T07:29:19.957Z", + "updated_at": "2023-03-13T07:29:19.957Z", + "meta": {} + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "Create a new form view in a given Table", + "tags": [ + "DB View" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ViewCreateReq" + }, + "examples": { + "Example 1": { + "value": { + "title": "My Form View", + "type": 1, + "copy_from_id": null, + "fk_grp_col_id": null, + "fk_geo_data_col_id": null + } + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/forms/{formViewId}": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "vw_6fqln9vdytdv8q" + }, + "name": "formViewId", + "in": "path", + "required": true, + "description": "Unique Form View ID" + } + ], + "patch": { + "summary": "Update Form View", + "operationId": "db-view-form-update", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "number" + }, + "examples": { + "Example 1": { + "value": 1 + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB View" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FormUpdateReq" + }, + "examples": { + "Example 1": { + "value": { + "banner_image_url": null, + "email": "user@example.com", + "heading": "My Form", + "lock_type": "collaborative", + "logo_url": null, + "meta": null, + "redirect_after_secs": null, + "redirect_url": null, + "show_blank_form": 0, + "subheading": "My Form Subheading", + "submit_another_form": 0, + "success_msg": "Thank you for the submission.", + "title": "Form View 1" + } + } + } + } + } + }, + "description": "Update the form data by Form ID", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "get": { + "summary": "Get Form", + "operationId": "db-view-form-read", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Form" + }, + "examples": { + "Example 1": { + "value": { + "source_id": "ds_g4ccx6e77h1dmi", + "banner_image_url": null, + "columns": [ + { + "id": "fvc_ugj9zo5bzocxtl", + "source_id": "ds_g4ccx6e77h1dmi", + "base_id": "p_xm3thidrblw4n7", + "fk_view_id": "vw_kdf5cr7qmhksek", + "fk_column_id": "cl_phvuuwjrzcdo0g", + "uuid": null, + "label": null, + "help": null, + "description": null, + "required": null, + "show": 0, + "order": 1, + "created_at": "2023-03-04 16:40:47", + "updated_at": "2023-03-04 16:40:47", + "meta": {} + } + ], + "email": "user@example.com", + "fk_model_id": "md_rsu68aqjsbyqtl", + "heading": "My Form", + "lock_type": "collaborative", + "logo_url": null, + "meta": null, + "redirect_after_secs": null, + "redirect_url": null, + "show_blank_form": 0, + "subheading": "My Form Subheading", + "submit_another_form": 0, + "success_msg": "Thank you for the submission.", + "title": "Form View 1" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB View" + ], + "description": "Get the form data by Form ID", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/form-columns/{formViewColumnId}": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "fvc_1m9b0aub791d4m", + "type": "string" + }, + "name": "formViewColumnId", + "in": "path", + "required": true, + "description": "Unique Form View Column ID" + } + ], + "patch": { + "summary": "Update Form Column", + "operationId": "db-view-form-column-update", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FormColumnReq" + }, + "examples": { + "Example 1": { + "value": { + "description": null, + "help": "This is a help text", + "label": "Form Label", + "meta": null, + "order": 1, + "required": 0, + "show": 0 + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB View" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FormColumnReq" + } + } + } + }, + "description": "Update the form column(s) by Form View Column ID", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/grids/{viewId}": { + "parameters": [ + { + "schema": { + "type": "string", + "example": "vw_wtdg2meyig5l4q" + }, + "name": "viewId", + "in": "path", + "required": true, + "description": "Unique View ID" + } + ], + "patch": { + "summary": "Update Grid View", + "operationId": "db-view-grid-update", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "number" + }, + "examples": { + "Example 1": { + "value": 1 + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB View" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GridUpdateReq" + }, + "examples": { + "Example 1": { + "value": { + "row_height": 1, + "meta": null + } + } + } + } + } + }, + "description": "Update Grid View", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/grids/{gridId}/grid-columns": { + "parameters": [ + { + "schema": { + "type": "string", + "example": "vw_q6k13mmygdi3yz" + }, + "name": "gridId", + "in": "path", + "required": true, + "description": "Grid View ID" + } + ], + "get": { + "summary": "List Grid Columns", + "operationId": "db-view-grid-columns-list", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GridColumn" + } + }, + "examples": { + "Example 1": { + "value": [ + { + "id": "nc_c8jz4kxe6xvh11", + "fk_view_id": "vw_p2jcatxz4mvcfw", + "fk_column_id": "cl_c5knoi4xs4sfpt", + "base_id": "p_xm3thidrblw4n7", + "source_id": "ds_g4ccx6e77h1dmi", + "show": 0, + "order": 1, + "width": "200px", + "help": null + } + ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB View" + ], + "description": "List all columns in the given Grid", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/grid-columns/{columnId}": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "cl_8iw2o4ejzvdyna", + "type": "string" + }, + "name": "columnId", + "in": "path", + "required": true, + "description": "Unique Column ID" + } + ], + "patch": { + "summary": "Update Grid Column", + "operationId": "db-view-grid-column-update", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "number" + }, + "examples": { + "Example 1": { + "value": 1 + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB View" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GridColumnReq" + }, + "examples": { + "Example 1": { + "value": { + "fk_column_id": "cl_c5knoi4xs4sfpt", + "label": "My Column", + "width": "200px" + } + } + } + } + } + }, + "description": "Update grid column(s) in the given Grid", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/tables/{tableId}/galleries": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "md_w9gpnaousnfss1" + }, + "name": "tableId", + "in": "path", + "required": true, + "description": "Unique Table ID" + } + ], + "post": { + "summary": "Create Gallery View", + "operationId": "db-view-gallery-create", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/View" + }, + "examples": { + "Example 1": { + "value": { + "id": "vw_qp94qfnvffgk5f", + "source_id": "ds_a95vextjl510z7", + "base_id": "p_slkm6i3v31q4bc", + "fk_model_id": "md_8hr3xndx8umuce", + "title": "Gallery-1", + "type": 2, + "is_default": null, + "show_system_fields": null, + "lock_type": "collaborative", + "uuid": null, + "password": null, + "show": true, + "order": 3, + "created_at": "2023-03-13T07:29:18.707Z", + "updated_at": "2023-03-13T07:29:18.707Z", + "meta": {} + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB View" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ViewCreateReq" + }, + "examples": { + "Example 1": { + "value": { + "title": "My Gallery View", + "type": 2, + "copy_from_id": null, + "fk_grp_col_id": null, + "fk_geo_data_col_id": null + } + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/galleries/{galleryViewId}": { + "parameters": [ + { + "schema": { + "type": "string", + "example": "vw_1eq2wk2xe3a9j5" + }, + "name": "galleryViewId", + "in": "path", + "required": true, + "description": "Unique Gallery View ID" + } + ], + "patch": { + "summary": "Update Gallery View", + "operationId": "db-view-gallery-update", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "number" + }, + "examples": { + "Example 1": { + "value": 1 + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB View" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GalleryUpdateReq" + }, + "examples": { + "Example 1": { + "value": { + "fk_cover_image_col_id": "cl_ib8l4j1kiu1efx", + "meta": null + } + } + } + } + } + }, + "description": "Update the Gallery View data with Gallery ID", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "get": { + "summary": "Get Gallery View", + "operationId": "db-view-gallery-read", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Gallery" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB View" + ], + "description": "Get the Gallery View data with Gallery ID", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/tables/{tableId}/kanbans": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "md_w9gpnaousnfss1", + "type": "string" + }, + "name": "tableId", + "in": "path", + "required": true, + "description": "Unique Table ID" + } + ], + "post": { + "summary": "Create Kanban View", + "operationId": "db-view-kanban-create", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/View" + }, + "examples": { + "Example 1": { + "value": { + "id": "vw_569sqsrp2vuff4", + "source_id": "ds_a95vextjl510z7", + "base_id": "p_slkm6i3v31q4bc", + "fk_model_id": "md_8hr3xndx8umuce", + "title": "Kanban-1", + "type": 4, + "is_default": null, + "show_system_fields": null, + "lock_type": "collaborative", + "uuid": null, + "password": null, + "show": true, + "order": 5, + "created_at": "2023-03-13T07:29:21.387Z", + "updated_at": "2023-03-13T07:29:21.387Z", + "meta": {} + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB View" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ViewCreateReq" + }, + "examples": { + "Example 1": { + "value": { + "title": "My Kanban View", + "type": 4, + "copy_from_id": null, + "fk_grp_col_id": "cl_g0a89q9xdry3lu", + "fk_geo_data_col_id": null + } + } + } + } + } + }, + "description": "Create a new Kanban View", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/kanbans/{kanbanViewId}": { + "parameters": [ + { + "schema": { + "type": "string", + "example": "vw_1eq2wk2xe3a9j5" + }, + "name": "kanbanViewId", + "in": "path", + "required": true, + "description": "Unique Kanban View ID" + } + ], + "patch": { + "summary": "Update Kanban View", + "operationId": "db-view-kanban-update", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "number" + }, + "examples": { + "Example 1": { + "value": 1 + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB View" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KanbanUpdateReq" + }, + "examples": { + "Example 1": { + "value": { + "fk_grp_col_id": "cl_g0a89q9xdry3lu", + "fk_cover_image_col_id": "cl_ib8l4j1kiu1efx", + "meta": { + "cl_g0a89q9xdry3lu": [ + { + "id": "uncategorized", + "title": null, + "order": 0, + "color": "#c2f5e8", + "collapsed": false + }, + { + "id": "sl_ihyva6jx6dg0fc", + "fk_column_id": "cl_g0a89q9xdry3lu", + "title": "a", + "color": "#cfdffe", + "order": 1, + "collapsed": false + }, + { + "id": "sl_gqdm5v6t8aetoa", + "fk_column_id": "cl_g0a89q9xdry3lu", + "title": "b", + "color": "#d0f1fd", + "order": 2, + "collapsed": false + }, + { + "id": "sl_eipnl0kn7a9d3c", + "fk_column_id": "cl_g0a89q9xdry3lu", + "title": "cc", + "color": "#c2f5e8", + "order": 3, + "collapsed": false + }, + { + "id": "sl_dei8p2jq0cnlv0", + "fk_column_id": "cl_g0a89q9xdry3lu", + "title": "d", + "color": "#ffdaf6", + "order": 4, + "collapsed": false + } + ] + } + } + } + } + } + } + }, + "description": "Update the Kanban View data with Kanban ID", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "get": { + "summary": "Get Kanban View", + "operationId": "db-view-kanban-read", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Kanban" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB View" + ], + "description": "Get the Kanban View data by Kanban ID", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/tables/{tableId}/maps": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "md_w9gpnaousnfss1", + "type": "string" + }, + "name": "tableId", + "in": "path", + "required": true, + "description": "Unique Table ID" + } + ], + "post": { + "summary": "Create Map View", + "operationId": "db-view-map-create", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/View" + }, + "examples": { + "Example 1": { + "value": { + "source_id": "ds_g4ccx6e77h1dmi", + "created_at": "2023-03-02 17:46:31", + "fk_model_id": "md_mhs9z4r2ak98x0", + "id": "vw_lg052cnc1c26kf", + "is_default": 1, + "lock_type": "collaborative", + "meta": {}, + "order": 1, + "password": null, + "base_id": "p_xm3thidrblw4n7", + "show": 1, + "show_system_fields": null, + "title": "Sheet-1", + "type": 3, + "updated_at": "2023-03-02 17:46:31", + "uuid": null + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB View" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ViewCreateReq" + }, + "examples": { + "Example 1": { + "value": { + "title": "My Map View", + "type": 5, + "copy_from_id": null, + "fk_grp_col_id": null, + "fk_geo_data_col_id": "cl_uu1meolj00tlrq" + } + } + } + } + }, + "description": "" + }, + "description": "Create a new Map View", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/maps/{mapViewId}": { + "parameters": [ + { + "schema": { + "type": "string", + "example": "vw_1eq2wk2xe3a9j5" + }, + "name": "mapViewId", + "in": "path", + "required": true, + "description": "Unique Map View ID" + } + ], + "patch": { + "summary": "Update Map View", + "operationId": "db-view-map-update", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "number" + }, + "examples": { + "Example 1": { + "value": 1 + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB View" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MapUpdateReq" + }, + "examples": { + "Example 1": { + "value": { + "fk_geo_data_col_id": "cl_8iw2o4ejzvdyna", + "meta": null + } + } + } + } + } + }, + "description": "Update the Map View data by Map ID", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "get": { + "summary": "Get Map View", + "operationId": "db-view-map-read", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Map" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB View" + ], + "description": "Get the Map View data by Map ID", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/projects/{baseId}/meta-diff": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "p_124hhlkbeasewh", + "type": "string" + }, + "name": "baseId", + "in": "path", + "required": true, + "description": "Unique Base ID" + } + ], + "post": { + "summary": "Sync Meta", + "operationId": "base-meta-diff-sync", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "msg": { + "type": "string", + "x-stoplight": { + "id": "la6fd99uw6eao" + }, + "example": "The meta has been synchronized successfully" + } + } + }, + "examples": { + "Example 1": { + "value": { + "msg": "The meta has been synchronized successfully" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Base" + ], + "description": "Synchronise the meta data difference between NC_DB and external data sources ", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "get": { + "summary": "Meta Diff", + "operationId": "base-meta-diff-get", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + }, + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "tags": [ + "Base" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "x-stoplight": { + "id": "awdkjwr7uultr" + }, + "type": "object", + "properties": { + "table_name": { + "type": "string", + "x-stoplight": { + "id": "jjj8ufafq1sd2" + }, + "description": "Table Name", + "example": "Table 1" + }, + "source_id": { + "type": "string", + "x-stoplight": { + "id": "smx2or6bv1xym" + }, + "description": "Source ID", + "example": "ds_rrplkgy0pq1f3c" + }, + "type": { + "type": "string", + "x-stoplight": { + "id": "zr19ahh1s6d13" + }, + "description": "Change Type", + "example": "table" + }, + "detectedChanges": { + "type": "array", + "x-stoplight": { + "id": "bptxla2y27aq6" + }, + "description": "Detected Changes", + "items": { + "x-stoplight": { + "id": "ob16o1ln7xy8o" + }, + "type": "object" + } + } + } + } + }, + "examples": { + "Example 1": { + "value": [ + { + "table_name": "_nc_m2m_uuv_xzru3m", + "source_id": "ds_rrplkgy0pq1f3c", + "type": "table", + "detectedChanges": [ + { + "type": "TABLE_NEW", + "msg": "New table" + }, + { + "type": "TABLE_RELATION_ADD", + "tn": "_nc_m2m_uuv_xzru3m", + "rtn": "Sheet-1", + "cn": "table1_id", + "rcn": "id", + "msg": "New relation added", + "relationType": "bt", + "cstn": "_nc_m2m_uuv_xzru3m_table1_id_foreign" + }, + { + "type": "TABLE_RELATION_ADD", + "tn": "_nc_m2m_uuv_xzru3m", + "rtn": "address", + "cn": "table2_id", + "rcn": "address_id", + "msg": "New relation added", + "relationType": "bt", + "cstn": "_nc_m2m_uuv_xzru3m_table2_id_foreign" + } + ] + } + ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "Get the meta data difference between NC_DB and external data sources " + } + }, + "/api/v2/meta/projects/{baseId}/meta-diff/{sourceId}": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "p_124hhlkbeasewh", + "type": "string" + }, + "name": "baseId", + "in": "path", + "required": true, + "description": "Unique Base ID" + }, + { + "schema": { + "type": "string", + "pattern": "ds_j04jmxh5xg10lu" + }, + "name": "sourceId", + "in": "path", + "required": true, + "description": "Unique Source ID" + } + ], + "post": { + "summary": "Synchronise Source Meta", + "operationId": "source-meta-diff-sync", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "msg": { + "type": "string", + "x-stoplight": { + "id": "acy7tx4rounqw" + }, + "example": "The source meta has been synchronized successfully" + } + } + }, + "examples": { + "Example 1": { + "value": { + "msg": "The source meta has been synchronized successfully" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Source" + ], + "description": "Synchronise the meta data difference between NC_DB and external data sources in a given Source", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "get": { + "summary": "Source Meta Diff", + "operationId": "source-meta-diff-get", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "tags": [ + "Source" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "x-stoplight": { + "id": "pav4jmel1ebeu" + }, + "type": "object", + "properties": { + "table_name": { + "type": "string", + "x-stoplight": { + "id": "xjw4k4httzmaf" + }, + "description": "Table Name", + "example": "Table 1" + }, + "source_id": { + "type": "string", + "x-stoplight": { + "id": "l1o3qhkgagsdl" + }, + "example": "ds_rrplkgy0pq1f3c", + "description": "Source ID" + }, + "type": { + "type": "string", + "x-stoplight": { + "id": "v5ciaygrj64uh" + }, + "description": "Change Type", + "example": "table" + }, + "detectedChanges": { + "type": "array", + "x-stoplight": { + "id": "wqn5noi0e46q8" + }, + "description": "Detected Changes", + "items": { + "x-stoplight": { + "id": "r2roo274wquvf" + }, + "type": "object" + } + } + } + } + }, + "examples": { + "Example 1": { + "value": [ + { + "table_name": "_nc_m2m_uuv_xzru3m", + "source_id": "ds_rrplkgy0pq1f3c", + "type": "table", + "detectedChanges": [ + { + "type": "TABLE_NEW", + "msg": "New table" + }, + { + "type": "TABLE_RELATION_ADD", + "tn": "_nc_m2m_uuv_xzru3m", + "rtn": "Sheet-1", + "cn": "table1_id", + "rcn": "id", + "msg": "New relation added", + "relationType": "bt", + "cstn": "_nc_m2m_uuv_xzru3m_table1_id_foreign" + }, + { + "type": "TABLE_RELATION_ADD", + "tn": "_nc_m2m_uuv_xzru3m", + "rtn": "address", + "cn": "table2_id", + "rcn": "address_id", + "msg": "New relation added", + "relationType": "bt", + "cstn": "_nc_m2m_uuv_xzru3m_table2_id_foreign" + } + ] + } + ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "Get the meta data difference between NC_DB and external data sources in a given Source" + } + }, + "/api/v2/meta/projects/{baseId}/has-empty-or-null-filters": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "p_124hhlkbeasewh", + "type": "string" + }, + "name": "baseId", + "in": "path", + "required": true, + "description": "Unique Base ID" + } + ], + "get": { + "summary": "List Empty & Null Filter", + "operationId": "base-has-empty-or-null-filters", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "tags": [ + "Base" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "Check if a base contains empty and null filters. Used in `Show NULL and EMPTY in Filter` in Base Setting.", + "x-internal": true + } + }, + "/api/v2/public/shared-view/{sharedViewUuid}/group/{columnId}": { + "parameters": [ + { + "schema": { + "type": "string", + "example": "24a6d0bb-e45d-4b1a-bfef-f492d870de9f" + }, + "name": "sharedViewUuid", + "in": "path", + "required": true, + "description": "Shared View UUID" + }, + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "cl_8iw2o4ejzvdyna", + "type": "string" + }, + "name": "columnId", + "in": "path", + "required": true, + "description": "Unique Column ID" + }, + { + "schema": { + "type": "string" + }, + "in": "header", + "name": "xc-password", + "description": "Shared view password" + } + ], + "get": { + "summary": "List Shared View Grouped Data", + "operationId": "public-grouped-data-list", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "x-stoplight": { + "id": "bldcv1pwuri5s" + }, + "type": "object", + "properties": { + "key": { + "type": "string", + "x-stoplight": { + "id": "n0ujmkbyhgsxo" + }, + "description": "The Grouped Key" + }, + "value": { + "type": "object", + "x-stoplight": { + "id": "0xsi3jvwn7duo" + }, + "description": "the paginated result of the given key", + "required": [ + "list", + "pageInfo" + ], + "properties": { + "list": { + "type": "array", + "x-stoplight": { + "id": "jw8dmo16txbjv" + }, + "description": "List of the target data", + "items": { + "x-stoplight": { + "id": "xcu8vxmf5ygyi" + }, + "type": "object" + } + }, + "pageInfo": { + "$ref": "#/components/schemas/Paginated", + "x-stoplight": { + "id": "1gsbgwi9bg8s5" + }, + "description": "Paginated Info" + } + } + } + }, + "required": [ + "key", + "value" + ] + } + }, + "examples": { + "Example 1": { + "value": [ + { + "key": "a", + "value": { + "list": [ + { + "Id": 2, + "Title": "foo", + "s": "a" + } + ], + "pageInfo": { + "totalRows": 1, + "page": 1, + "pageSize": 25, + "isFirstPage": true, + "isLastPage": true + } + } + }, + { + "key": "b", + "value": { + "list": [ + { + "Id": 3, + "Title": "bar", + "s": "b" + } + ], + "pageInfo": { + "totalRows": 1, + "page": 1, + "pageSize": 25, + "isFirstPage": true, + "isLastPage": true + } + } + }, + { + "key": null, + "value": { + "list": [ + { + "Id": 1, + "Title": "baz", + "s": null + } + ], + "pageInfo": { + "totalRows": 1, + "page": 1, + "pageSize": 25, + "isFirstPage": true, + "isLastPage": true + } + } + } + ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Public" + ], + "parameters": [ + { + "schema": { + "type": "array" + }, + "in": "query", + "name": "fields", + "description": "Which fields to be shown" + }, + { + "schema": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ] + }, + "in": "query", + "name": "sort", + "description": "The result will be sorted based on `sort` query" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "where", + "description": "Extra filtering" + }, + { + "schema": { + "type": "integer", + "minimum": 0 + }, + "in": "query", + "name": "offset", + "description": "Offset in rows" + }, + { + "schema": { + "type": "integer", + "minimum": 1 + }, + "in": "query", + "name": "limit", + "description": "Limit in rows" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sortArrJson", + "description": "Used for multiple sort queries" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "filterArrJson", + "description": "Used for multiple filter queries" + } + ], + "description": "List Shared View Grouped Data" + } + }, + "/api/v2/public/shared-view/{sharedViewUuid}/rows": { + "parameters": [ + { + "schema": { + "type": "string", + "example": "24a6d0bb-e45d-4b1a-bfef-f492d870de9f" + }, + "name": "sharedViewUuid", + "in": "path", + "required": true, + "description": "Shared View UUID" + }, + { + "schema": { + "type": "string" + }, + "in": "header", + "name": "xc-password", + "description": "Shared view password" + } + ], + "get": { + "summary": "List Shared View Rows", + "operationId": "public-data-list", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SharedViewList" + }, + "examples": { + "Example 1": { + "value": { + "list": [ + { + "source_id": "ds_g4ccx6e77h1dmi", + "created_at": "2023-03-02 17:46:31", + "fk_model_id": "md_mhs9z4r2ak98x0", + "id": "vw_lg052cnc1c26kf", + "is_default": 1, + "lock_type": "collaborative", + "meta": {}, + "order": 1, + "password": null, + "base_id": "p_xm3thidrblw4n7", + "show": 1, + "show_system_fields": null, + "title": "Sheet-1", + "type": 3, + "updated_at": "2023-03-02 17:46:31", + "uuid": null, + "view": { + "source_id": "ds_g4ccx6e77h1dmi", + "created_at": "2023-03-02 17:46:31", + "fk_view_id": "vw_lg052cnc1c26kf", + "meta": null, + "base_id": "p_xm3thidrblw4n7", + "row_height": null, + "updated_at": "2023-03-02 17:46:31", + "uuid": null + } + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Public" + ], + "parameters": [ + { + "schema": { + "type": "array" + }, + "in": "query", + "name": "fields", + "description": "Which fields to be shown" + }, + { + "schema": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ] + }, + "in": "query", + "name": "sort", + "description": "The result will be sorted based on `sort` query" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "where", + "description": "Extra filtering" + }, + { + "schema": { + "type": "integer", + "minimum": 0 + }, + "in": "query", + "name": "offset", + "description": "Offset in rows" + }, + { + "schema": { + "type": "integer", + "minimum": 1 + }, + "in": "query", + "name": "limit", + "description": "Limit in rows" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sortArrJson", + "description": "Used for multiple sort queries" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "filterArrJson", + "description": "Used for multiple filter queries" + } + ], + "description": "List all shared view rows" + }, + "post": { + "summary": "Create Share View Row", + "operationId": "public-data-create", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "examples": { + "Example 1": { + "value": { + "Id": 1, + "col1": "foo", + "col2": "bar", + "CreatedAt": "2023-03-11T08:48:25.598Z", + "UpdatedAt": "2023-03-11T08:48:25.598Z" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "requestBody": { + "content": { + "multipart/form-data": {} + }, + "description": "" + }, + "tags": [ + "Public" + ], + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "header", + "name": "xc-password", + "description": "Shared view password" + } + ], + "description": "Create a new row for the target shared view" + } + }, + "/api/v2/public/shared-view/{sharedViewUuid}/groupby": { + "parameters": [ + { + "schema": { + "type": "string", + "example": "24a6d0bb-e45d-4b1a-bfef-f492d870de9f" + }, + "name": "sharedViewUuid", + "in": "path", + "required": true, + "description": "Shared View UUID" + }, + { + "schema": { + "type": "string" + }, + "in": "header", + "name": "xc-password", + "description": "Shared view password" + } + ], + "get": { + "summary": "List Shared View Rows", + "operationId": "public-data-group-by", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SharedViewList" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Public" + ], + "parameters": [ + { + "schema": { + "type": "array" + }, + "in": "query", + "name": "fields", + "description": "Which fields to be shown" + }, + { + "schema": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ] + }, + "in": "query", + "name": "sort", + "description": "The result will be sorted based on `sort` query" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "where", + "description": "Extra filtering" + }, + { + "schema": { + "type": "integer", + "minimum": 0 + }, + "in": "query", + "name": "offset", + "description": "Offset in rows" + }, + { + "schema": { + "type": "integer", + "minimum": 1 + }, + "in": "query", + "name": "limit", + "description": "Limit in rows" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sortArrJson", + "description": "Used for multiple sort queries" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "filterArrJson", + "description": "Used for multiple filter queries" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "column_name", + "description": "Columns to group by" + } + ], + "description": "List all shared view rows grouped by a column" + } + }, + "/api/v2/public/shared-view/{sharedViewUuid}/rows/{rowId}/{relationType}/{columnName}": { + "parameters": [ + { + "schema": { + "type": "string", + "example": "24a6d0bb-e45d-4b1a-bfef-f492d870de9f" + }, + "name": "sharedViewUuid", + "in": "path", + "required": true, + "description": "Shared View UUID" + }, + { + "schema": { + "example": "1" + }, + "name": "rowId", + "in": "path", + "required": true, + "description": "Unique Row ID" + }, + { + "schema": { + "type": "string", + "enum": [ + "mm", + "hm", + "bt" + ] + }, + "name": "relationType", + "in": "path", + "required": true, + "description": "Relation Type" + }, + { + "schema": { + "type": "string" + }, + "name": "columnName", + "in": "path", + "required": true, + "description": "Column Name" + } + ], + "get": { + "summary": "List Nested List Data", + "operationId": "public-data-nested-list", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "list": { + "type": "array", + "x-stoplight": { + "id": "gvblksjzjfyg7" + }, + "description": "List of data objects", + "items": { + "x-stoplight": { + "id": "8assgoc1vtcs9" + }, + "type": "object" + } + }, + "pageInfo": { + "$ref": "#/components/schemas/Paginated", + "x-stoplight": { + "id": "if546w1yuo6fw" + }, + "description": "Paginated info" + } + }, + "required": [ + "list", + "pageInfo" + ] + }, + "examples": { + "Example 1": { + "value": { + "list": [ + { + "Id": 1, + "Title": "foo", + "CreatedAt": "2023-03-11T08:41:41.356Z", + "UpdatedAt": "2023-03-11T08:41:41.356Z" + }, + { + "Id": 2, + "Title": "bar", + "CreatedAt": "2023-03-11T08:41:45.330Z", + "UpdatedAt": "2023-03-11T08:41:45.330Z" + }, + { + "Id": 3, + "Title": "baz", + "CreatedAt": "2023-03-11T08:48:25.598Z", + "UpdatedAt": "2023-03-11T08:48:25.598Z" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "pageSize": 1, + "sort": "string", + "totalRows": 3 + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Public" + ], + "parameters": [ + { + "schema": { + "type": "array" + }, + "in": "query", + "name": "fields", + "description": "Which fields to be shown" + }, + { + "schema": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ] + }, + "in": "query", + "name": "sort", + "description": "The result will be sorted based on `sort` query" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "where", + "description": "Extra filtering" + }, + { + "schema": { + "type": "integer", + "minimum": 0 + }, + "in": "query", + "name": "offset", + "description": "Offset in rows" + }, + { + "schema": { + "type": "integer", + "minimum": 1 + }, + "in": "query", + "name": "limit", + "description": "Limit in rows" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sortArrJson", + "description": "Used for multiple sort queries" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "filterArrJson", + "description": "Used for multiple filter queries" + } + ], + "description": "List all nested list data in a given shared view" + } + }, + "/api/v2/public/shared-view/{sharedViewUuid}/rows/export/{type}": { + "parameters": [ + { + "schema": { + "type": "string", + "example": "76d44b86-bc65-4500-8956-ab512c80ab25" + }, + "name": "sharedViewUuid", + "in": "path", + "required": true, + "description": "Shared View UUID" + }, + { + "schema": { + "type": "string", + "enum": [ + "csv", + "excel" + ], + "example": "csv" + }, + "name": "type", + "in": "path", + "required": true, + "description": "Export Type" + } + ], + "get": { + "summary": "Export Rows in Share View", + "operationId": "public-csv-export", + "description": "Export all rows in Share View in a CSV / Excel Format", + "wrapped": true, + "responses": { + "200": { + "description": "OK", + "content": { + "application/octet-stream": { + "schema": {} + } + }, + "headers": { + "nc-export-offset": { + "schema": { + "type": "integer" + }, + "description": "The starting offset of the next set of rows" + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Public" + ] + } + }, + "/api/v2/public/shared-view/{sharedViewUuid}/nested/{columnName}": { + "parameters": [ + { + "schema": { + "type": "string", + "example": "24a6d0bb-e45d-4b1a-bfef-f492d870de9f" + }, + "name": "sharedViewUuid", + "in": "path", + "required": true, + "description": "Shared View UUID" + }, + { + "schema": { + "type": "string" + }, + "name": "columnName", + "in": "path", + "required": true, + "description": "Column Name" + }, + { + "schema": { + "type": "string" + }, + "in": "header", + "name": "xc-password", + "description": "Shared view password" + } + ], + "get": { + "summary": "List Nested Data Relation", + "operationId": "public-data-relation-list", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "parameters": [ + { + "schema": { + "type": "array" + }, + "in": "query", + "name": "fields", + "description": "Which fields to be shown" + }, + { + "schema": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ] + }, + "in": "query", + "name": "sort", + "description": "The result will be sorted based on `sort` query" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "where", + "description": "Extra filtering" + }, + { + "schema": { + "type": "integer", + "minimum": 0 + }, + "in": "query", + "name": "offset", + "description": "Offset in rows" + }, + { + "schema": { + "type": "integer", + "minimum": 1 + }, + "in": "query", + "name": "limit", + "description": "Limit in rows" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sortArrJson", + "description": "Used for multiple sort queries" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "filterArrJson", + "description": "Used for multiple filter queries" + } + ], + "tags": [ + "Public" + ], + "description": "List Nested Data Relation" + } + }, + "/api/v2/public/shared-base/{sharedBaseUuid}/meta": { + "parameters": [ + { + "schema": { + "type": "string", + "example": "24a6d0bb-e45d-4b1a-bfef-f492d870de9f" + }, + "name": "sharedBaseUuid", + "in": "path", + "required": true, + "description": "Shared Base UUID" + } + ], + "get": { + "summary": "Get Share Source Meta", + "operationId": "public-shared-base-get", + "description": "Get Share Source Meta", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "base_id": { + "type": "string", + "description": "Base ID" + } + } + }, + "examples": { + "Example 1": { + "value": { + "base_id": "p_63b4q0qengen1x" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Public" + ] + } + }, + "/api/v2/public/shared-view/{sharedViewUuid}/meta": { + "parameters": [ + { + "schema": { + "type": "string", + "example": "24a6d0bb-e45d-4b1a-bfef-f492d870de9f" + }, + "name": "sharedViewUuid", + "in": "path", + "required": true, + "description": "Shared View UUID" + }, + { + "schema": { + "type": "string" + }, + "in": "header", + "name": "xc-password", + "description": "Shared view password" + } + ], + "get": { + "summary": "Get Share View Meta", + "operationId": "public-shared-view-meta-get", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/View" + }, + { + "type": "object", + "properties": { + "relatedMetas": {}, + "client": { + "type": "string" + }, + "source_id": { + "type": "string" + }, + "columns": { + "allOf": [ + { + "anyOf": [ + { + "$ref": "#/components/schemas/GridColumn" + }, + { + "$ref": "#/components/schemas/FormColumn" + }, + { + "$ref": "#/components/schemas/GalleryColumn" + } + ] + }, + { + "$ref": "#/components/schemas/Column" + } + ] + }, + "model": { + "$ref": "#/components/schemas/Table" + } + } + }, + { + "type": "object", + "properties": { + "view": { + "anyOf": [ + { + "$ref": "#/components/schemas/Form" + }, + { + "$ref": "#/components/schemas/Grid" + }, + { + "$ref": "#/components/schemas/Gallery" + } + ] + } + } + } + ] + } + }, + "application/xml": { + "schema": {} + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Public" + ], + "description": "Get Share View Meta" + } + }, + "/api/v2/public/shared-erd/{sharedErdUuid}/meta": { + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "sharedErdUuid", + "in": "path", + "required": true + } + ], + "get": { + "summary": "", + "operationId": "public-shared-erd-meta-get", + "tags": [ + "Public" + ], + "description": "", + "parameters": [] + } + }, + "/api/v2/meta/audits/comments": { + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "get": { + "summary": "List Comments in Audit", + "operationId": "utils-comment-list", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "list": { + "x-stoplight": { + "id": "5zto1xohsngbu" + }, + "type": "array", + "items": { + "$ref": "#/components/schemas/Audit", + "x-stoplight": { + "id": "d22zkup0c0l80" + } + } + } + }, + "required": [ + "list" + ] + }, + "examples": { + "Example 1": { + "value": { + "list": [ + { + "id": "adt_3sii7erfwrlegb", + "user": "w@nocodb.com", + "display_name": "NocoDB", + "ip": null, + "source_id": null, + "base_id": "p_63b4q0qengen1x", + "fk_model_id": "md_5mipbdg6ketmv8", + "row_id": "1", + "op_type": "COMMENT", + "op_sub_type": null, + "status": null, + "description": "bar", + "details": null, + "created_at": "2023-03-13T09:39:14.225Z", + "updated_at": "2023-03-13T09:39:14.225Z" + }, + { + "id": "adt_fezs668qbxj8gc", + "user": "w@nocodb.com", + "display_name": "NocoDB", + "ip": null, + "source_id": null, + "base_id": "p_63b4q0qengen1x", + "fk_model_id": "md_5mipbdg6ketmv8", + "row_id": "1", + "op_type": "COMMENT", + "op_sub_type": null, + "status": null, + "description": "foo", + "details": null, + "created_at": "2023-03-13T09:39:13.321Z", + "updated_at": "2023-03-13T09:39:13.321Z" + } + ] + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "List all comments", + "parameters": [ + { + "schema": { + "type": "string", + "example": "10" + }, + "in": "query", + "name": "row_id", + "required": true, + "description": "Row ID" + }, + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "md_c6csq89tl37jm5" + }, + "in": "query", + "name": "fk_model_id", + "required": true, + "description": "Foreign Key to Model" + }, + { + "schema": { + "type": "boolean", + "example": true + }, + "in": "query", + "name": "comments_only", + "description": "Is showing comments only?" + }, + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "tags": [ + "Utils" + ] + }, + "post": { + "summary": "Comment Rows", + "operationId": "utils-comment-row", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Audit" + }, + "examples": { + "Example 1": { + "value": { + "user": "w@nocodb.com", + "row_id": "1", + "fk_model_id": "md_5mipbdg6ketmv8", + "op_type": "COMMENT", + "description": "qq", + "base_id": "p_63b4q0qengen1x", + "id": "adt_vx58jpp0loo8qy" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommentReq" + }, + "examples": { + "Example 1": { + "value": { + "description": "This is the comment for the row", + "fk_model_id": "md_ehn5izr99m7d45", + "row_id": "3" + } + } + } + } + } + }, + "tags": [ + "Utils" + ], + "description": "Create a new comment in a row. Logged in Audit.", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/audits/{auditId}/comment": { + "parameters": [ + { + "schema": { + "type": "string", + "example": "adt_zlskd6rlf3liay" + }, + "name": "auditId", + "in": "path", + "required": true, + "description": "Audit ID" + }, + { + "name": "xc-auth", + "in": "header", + "required": false, + "schema": { + "type": "string" + }, + "description": "Auth Token is a JWT Token generated based on the logged-in user. By default, the token is only valid for 10 hours. However, you can change the value by defining it using environment variable NC_JWT_EXPIRES_IN." + } + ], + "patch": { + "summary": "Update Comment in Audit", + "operationId": "utils-comment-update", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "number", + "example": 1 + }, + "examples": { + "Example 1": { + "value": 1 + } + } + } + } + } + }, + "tags": [ + "Utils" + ], + "description": "Update comment in Audit", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommentUpdateReq" + }, + "examples": { + "Example 1": { + "value": { + "description": "This is the comment for the row" + } + } + } + } + } + } + } + }, + "/api/v2/meta/audits/comments/count": { + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "get": { + "summary": "Count Comments", + "operationId": "utils-comment-count", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "x-stoplight": { + "id": "ziwcy4va5r1ao" + }, + "type": "object", + "properties": { + "count": { + "type": "string", + "x-stoplight": { + "id": "5r91gkxmaiyv4" + }, + "description": "The number of comments", + "example": "4" + }, + "row_id": { + "type": "string", + "x-stoplight": { + "id": "08sgorhq172sm" + }, + "description": "Row ID", + "example": "1" + } + }, + "required": [ + "count", + "row_id" + ] + } + }, + "examples": { + "Example 1": { + "value": [ + { + "count": "4", + "row_id": "1" + } + ] + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "Return the number of comments in the given query.", + "parameters": [ + { + "in": "query", + "name": "ids", + "required": true, + "description": "Comment IDs" + }, + { + "schema": { + "$ref": "#/components/schemas/Id" + }, + "in": "query", + "name": "fk_model_id", + "required": true, + "description": "Foreign Key to Model" + }, + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "tags": [ + "Utils" + ] + } + }, + "/api/v2/meta/projects/{baseId}/audits": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "p_124hhlkbeasewh", + "type": "string" + }, + "name": "baseId", + "in": "path", + "required": true, + "description": "Unique Base ID" + } + ], + "get": { + "summary": "List Audits in Base", + "operationId": "base-audit-list", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "list": { + "type": "array", + "uniqueItems": true, + "minItems": 1, + "items": { + "$ref": "#/components/schemas/Audit" + } + }, + "pageInfo": { + "$ref": "#/components/schemas/Paginated" + } + }, + "required": [ + "list", + "pageInfo" + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "List all audit data in the given base", + "parameters": [ + { + "schema": { + "type": "integer", + "minimum": 0 + }, + "in": "query", + "name": "offset" + }, + { + "schema": { + "type": "integer", + "maximum": 1 + }, + "in": "query", + "name": "limit" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sourceId" + }, + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "tags": [ + "Base" + ] + } + }, + "/api/v2/meta/audits/rows/{rowId}/update": { + "parameters": [ + { + "schema": { + "example": "1" + }, + "name": "rowId", + "in": "path", + "required": true, + "description": "Unique Row ID" + } + ], + "post": { + "summary": "Update Audit Row", + "operationId": "utils-audit-row-update", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Audit" + }, + "examples": { + "Example 1": { + "value": { + "user": "w@nocodb.com", + "row_id": "1", + "fk_model_id": "md_5mipbdg6ketmv8", + "op_type": "COMMENT", + "description": "Table Sheet-1 : field Column A got changed from foo to bar", + "base_id": "p_63b4q0qengen1x", + "id": "adt_vx58jpp0loo8qy" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Utils" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuditRowUpdateReq" + }, + "examples": { + "Example 1": { + "value": { + "column_name": "baz", + "fk_model_id": "md_ehn5izr99m7d45", + "row_id": "1", + "prev_value": "foo", + "value": "bar" + } + } + } + } + } + }, + "description": "Update Audit Row", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/tables/{tableId}/hooks": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "md_w9gpnaousnfss1", + "type": "string" + }, + "name": "tableId", + "in": "path", + "required": true, + "description": "Unique Table ID" + } + ], + "get": { + "summary": "List Table Hooks", + "operationId": "db-table-webhook-list", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HookList" + }, + "examples": { + "Example 1": { + "value": { + "list": [ + { + "active": 0, + "async": 0, + "description": "This is my hook description", + "env": "all", + "event": "after", + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "string", + "notification": "{\"type\":\"URL\",\"payload\":{\"method\":\"POST\",\"body\":\"{{ json data }}\",\"headers\":[{}],\"parameters\":[{}],\"auth\":\"\",\"path\":\"http://example.com\"}}", + "null": null, + "operation": "insert", + "retries": 10, + "retry_interval": 60000, + "timeout": 60000, + "title": "My Webhook" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "List all hook records in the given Table", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "tags": [ + "DB Table Webhook" + ] + }, + "post": { + "summary": "Create Table Hook", + "operationId": "db-table-webhook-create", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Hook" + }, + "examples": { + "Example 1": { + "value": { + "active": 0, + "async": 0, + "description": "This is my hook description", + "env": "all", + "event": "after", + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "string", + "notification": "{\"type\":\"URL\",\"payload\":{\"method\":\"POST\",\"body\":\"{{ json data }}\",\"headers\":[{}],\"parameters\":[{}],\"auth\":\"\",\"path\":\"http://example.com\"}}", + "null": null, + "operation": "insert", + "retries": 10, + "retry_interval": 60000, + "timeout": 60000, + "title": "My Webhook" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "Create a hook in the given table", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HookReq" + }, + "examples": { + "Example 1": { + "value": { + "active": 0, + "async": 0, + "description": "This is my hook description", + "env": "all", + "event": "after", + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "string", + "notification": "{\"type\":\"URL\",\"payload\":{\"method\":\"POST\",\"body\":\"{{ json data }}\",\"headers\":[{}],\"parameters\":[{}],\"auth\":\"\",\"path\":\"http://example.com\"}}", + "null": null, + "operation": "insert", + "retries": 10, + "retry_interval": 60000, + "timeout": 60000, + "title": "My Webhook", + "condition": false + } + } + } + } + } + }, + "tags": [ + "DB Table Webhook" + ] + } + }, + "/api/v2/meta/tables/{tableId}/hooks/test": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "md_w9gpnaousnfss1", + "type": "string" + }, + "name": "tableId", + "in": "path", + "required": true, + "description": "Unique Table ID" + } + ], + "post": { + "summary": "Test Hook", + "operationId": "db-table-webhook-test", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "msg": { + "type": "string", + "x-stoplight": { + "id": "l5k90tzuvvv1g" + }, + "example": "The hook has been tested successfully" + } + } + }, + "examples": { + "Example 1": { + "value": { + "msg": "The hook has been tested successfully" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Table Webhook" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HookTestReq" + }, + "examples": { + "Example 1": { + "value": { + "hook": { + "active": 0, + "async": 0, + "description": "This is my hook description", + "env": "all", + "event": "after", + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "string", + "notification": "{\"type\":\"URL\",\"payload\":{\"method\":\"POST\",\"body\":\"{{ json data }}\",\"headers\":[{}],\"parameters\":[{}],\"auth\":\"\",\"path\":\"http://example.com\"}}", + "null": null, + "operation": "insert", + "retries": 10, + "retry_interval": 60000, + "timeout": 60000, + "title": "My Webhook" + }, + "payload": { + "data": { + "Id": 1, + "Title": "Sample Text", + "CreatedAt": "2023-03-03T10:03:06.484Z", + "UpdatedAt": "2023-03-03T10:03:06.484Z", + "attachment": [ + { + "url": "https://nocodb.com/dummy.png", + "title": "image.png", + "mimetype": "image/png", + "size": 0 + } + ], + "f": "Sample Output" + } + } + } + } + } + } + } + }, + "description": "Test the hook in the given Table", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/tables/{tableId}/hooks/samplePayload/{operation}/{version}": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "md_w9gpnaousnfss1", + "type": "string" + }, + "name": "tableId", + "in": "path", + "required": true, + "description": "Unique Table ID" + }, + { + "schema": { + "type": "string", + "enum": [ + "insert", + "update", + "delete", + "bulkInsert", + "bulkUpdate", + "bulkDelete" + ] + }, + "name": "operation", + "in": "path", + "required": true, + "description": "Hook Operation" + }, + { + "schema": { + "type": "string", + "enum": [ + "v1", + "v2" + ] + }, + "name": "version", + "in": "path", + "required": true, + "description": "Hook Version" + } + ], + "get": { + "summary": "Get Sample Hook Payload", + "operationId": "db-table-webhook-sample-payload-get", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "x-stoplight": { + "id": "qifsikf69hqbl" + }, + "description": "Sample Payload Data" + } + } + }, + "examples": { + "Example 1": { + "value": { + "data": { + "Id": 1, + "Title": "Sample Text", + "CreatedAt": "2023-03-13T04:59:49.363Z", + "UpdatedAt": "2023-03-13T04:59:49.363Z" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "Get the sample hook payload", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "tags": [ + "DB Table Webhook" + ] + } + }, + "/api/v2/meta/hooks/{hookId}": { + "parameters": [ + { + "schema": { + "type": "string", + "example": "hk_0063k4o1frnxbr" + }, + "name": "hookId", + "in": "path", + "required": true, + "description": "Unique Hook ID" + } + ], + "patch": { + "summary": "Update Hook", + "operationId": "db-table-webhook-update", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Hook" + }, + "examples": { + "Example 1": { + "value": { + "active": 0, + "async": 0, + "description": "This is my hook description", + "env": "all", + "event": "after", + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "string", + "notification": "{\"type\":\"URL\",\"payload\":{\"method\":\"POST\",\"body\":\"{{ json data }}\",\"headers\":[{}],\"parameters\":[{}],\"auth\":\"\",\"path\":\"http://example.com\"}}", + "null": null, + "operation": "insert", + "retries": 10, + "retry_interval": 60000, + "timeout": 60000, + "title": "My Webhook" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Table Webhook" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Hook" + }, + "examples": { + "Example 1": { + "value": { + "active": 0, + "async": 0, + "description": "This is my hook description", + "env": "all", + "event": "after", + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "string", + "notification": "{\"type\":\"URL\",\"payload\":{\"method\":\"POST\",\"body\":\"{{ json data }}\",\"headers\":[{}],\"parameters\":[{}],\"auth\":\"\",\"path\":\"http://example.com\"}}", + "null": null, + "operation": "insert", + "retries": 10, + "retry_interval": 60000, + "timeout": 60000, + "title": "My Webhook" + } + } + } + } + } + }, + "description": "Update the exsiting hook by its ID", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "delete": { + "summary": "Delete Hook", + "operationId": "db-table-webhook-delete", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "boolean" + }, + "examples": { + "Example 1": { + "value": true + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Table Webhook" + ], + "description": "Delete the exsiting hook by its ID", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/plugins": { + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "get": { + "summary": "List Plugins", + "operationId": "plugin-list", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "list": { + "type": "array", + "uniqueItems": true, + "minItems": 1, + "items": { + "$ref": "#/components/schemas/Plugin" + } + }, + "pageInfo": { + "$ref": "#/components/schemas/Paginated" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "List all plugins", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "tags": [ + "Plugin" + ] + } + }, + "/api/v2/meta/plugins/webhook": { + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "get": { + "summary": "Webhook List Plugins", + "operationId": "plugin-webhook-list", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "list": { + "type": "array", + "uniqueItems": true, + "minItems": 1, + "items": { + "$ref": "#/components/schemas/Plugin" + } + }, + "pageInfo": { + "$ref": "#/components/schemas/Paginated" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "List all webhook plugins", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "tags": [ + "Plugin" + ] + } + }, + "/api/v2/meta/plugins/{pluginTitle}/status": { + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "pluginTitle", + "in": "path", + "required": true, + "description": "Plugin Title" + } + ], + "get": { + "summary": "Get Plugin Status", + "operationId": "plugin-status", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "boolean" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "Check plugin is active or not", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "tags": [ + "Plugin" + ], + "x-internal": false + } + }, + "/api/v2/meta/plugins/test": { + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "post": { + "summary": "Test Plugin", + "operationId": "plugin-test", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "Test if the plugin is working with the given configurations", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "tags": [ + "Plugin" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PluginTestReq" + }, + "examples": { + "Example 1": { + "value": { + "title": "Plugin Foo", + "input": "{\"bucket\":\"my-bucket\",\"region\":\"us-west-004\",\"access_key\":\"redacted\",\"access_secret\":\"redacted\"}", + "category": "Email" + } + } + } + } + } + } + } + }, + "/api/v2/meta/plugins/{pluginId}": { + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "pluginId", + "in": "path", + "required": true, + "description": "Plugin ID" + } + ], + "patch": { + "summary": "Update Plugin", + "operationId": "plugin-update", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Plugin" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PluginReq" + } + } + } + }, + "description": "Update the plugin data by ID", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "x-internal": false + }, + "get": { + "summary": "Get Plugin", + "operationId": "plugin-read", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Plugin" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Plugin" + ], + "description": "Get the plugin data by ID", + "x-internal": false + } + }, + "/api/v2/meta/connection/test": { + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "post": { + "summary": "Test DB Connection", + "operationId": "utils-test-connection", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "number" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "x-stoplight": { + "id": "6orbk04w97ien" + } + } + } + }, + "examples": { + "Example 1": { + "value": { + "code": 0, + "message": "", + "data": {} + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Utils" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "x-examples": { + "Example 1": { + "client": "mysql2", + "connection": { + "host": "localhost", + "port": "3306", + "user": "root", + "password": "password", + "database": null + } + } + }, + "properties": { + "client": { + "description": "DB Type", + "enum": [ + "mssql", + "mysql", + "mysql2", + "oracledb", + "pg", + "snowflake", + "sqlite3" + ], + "example": "mysql2", + "type": "string" + }, + "connection": { + "type": "object", + "properties": { + "host": { + "type": "string" + }, + "port": { + "type": "string" + }, + "user": { + "type": "string" + }, + "password": { + "type": "string" + }, + "database": { + "$ref": "#/components/schemas/StringOrNull" + } + } + } + } + }, + "examples": { + "Example 1": { + "value": { + "client": "mysql2", + "connection": { + "host": "localhost", + "port": "3306", + "user": "root", + "password": "password", + "database": null + } + } + } + } + } + } + }, + "description": "Test the DB Connection", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/connection/select": { + "parameters": [], + "post": { + "summary": "", + "operationId": "utils-select-query", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + } + }, + "tags": [ + "Utils" + ], + "requestBody": { + "content": { + "application/json": {} + } + }, + "description": "" + } + }, + "/api/v1/url_to_config": { + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "post": { + "summary": "Convert JDBC URL to Config", + "operationId": "utils-url-to-config", + "tags": [ + "Utils" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "x-stoplight": { + "id": "fgdbmcjjtkky5" + }, + "description": "JDBC URL", + "example": "jdbc:mysql://username:password@localhost:3306/sakila" + } + } + }, + "examples": { + "Example 1": { + "value": { + "url": "jdbc:mysql://username:password@localhost:3306/sakila" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "x-examples": { + "Example 1": { + "client": "mysql2", + "connection": { + "user": "username", + "password": "password", + "database": "sakila", + "host": "localhost", + "port": "3306" + } + } + }, + "properties": { + "client": { + "description": "DB Type", + "enum": [ + "mssql", + "mysql", + "mysql2", + "oracledb", + "pg", + "snowflake", + "sqlite3" + ], + "example": "mysql2", + "type": "string" + }, + "connection": { + "type": "object", + "description": "Connection Config", + "properties": { + "user": { + "type": "string", + "description": "DB User" + }, + "password": { + "type": "string", + "description": "DB Password" + }, + "database": { + "type": "string", + "description": "DB Name" + }, + "host": { + "type": "string", + "description": "DB Host" + }, + "port": { + "type": "string", + "description": "DB Host" + } + } + } + } + }, + "examples": { + "Example 1": { + "value": { + "client": "mysql2", + "connection": { + "user": "username", + "password": "password", + "database": "sakila", + "host": "localhost", + "port": "3306" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "Extract XC URL From JDBC and parse to connection config", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/nocodb/info": { + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "get": { + "summary": "Get App Info", + "operationId": "utils-app-info", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "x-examples": { + "Example 1": { + "authType": "jwt", + "baseHasAdmin": true, + "firstUser": false, + "type": "rest", + "googleAuthEnabled": false, + "githubAuthEnabled": false, + "oneClick": false, + "connectToExternalDB": true, + "version": "0.105.3", + "defaultLimit": 25, + "ncMin": false, + "teleEnabled": false, + "auditEnabled": true, + "ncSiteUrl": "http://localhost:8080", + "ee": false, + "ncAttachmentFieldSize": 20971520, + "ncMaxAttachmentsAllowed": 10 + } + }, + "properties": { + "authType": { + "type": "string" + }, + "baseHasAdmin": { + "type": "boolean" + }, + "firstUser": { + "type": "boolean" + }, + "type": { + "type": "string" + }, + "googleAuthEnabled": { + "type": "boolean" + }, + "githubAuthEnabled": { + "type": "boolean" + }, + "oneClick": { + "type": "boolean" + }, + "connectToExternalDB": { + "type": "boolean" + }, + "version": { + "type": "string" + }, + "defaultLimit": { + "type": "number" + }, + "ncMin": { + "type": "boolean" + }, + "teleEnabled": { + "type": "boolean" + }, + "auditEnabled": { + "type": "boolean" + }, + "ncSiteUrl": { + "type": "string" + }, + "ee": { + "type": "boolean" + }, + "ncAttachmentFieldSize": { + "type": "number" + }, + "ncMaxAttachmentsAllowed": { + "type": "number" + }, + "isCloud": { + "type": "boolean", + "x-stoplight": { + "id": "bstdkpky2131f" + } + }, + "automationLogLevel": { + "type": "string", + "x-stoplight": { + "id": "uc3vaotye2eu8" + }, + "enum": [ + "OFF", + "ERROR", + "ALL" + ], + "example": "OFF" + } + } + }, + "examples": { + "Example 1": { + "value": { + "authType": "jwt", + "baseHasAdmin": true, + "firstUser": false, + "type": "rest", + "googleAuthEnabled": false, + "githubAuthEnabled": false, + "oneClick": false, + "connectToExternalDB": true, + "version": "0.105.3", + "defaultLimit": 25, + "ncMin": false, + "teleEnabled": false, + "auditEnabled": true, + "ncSiteUrl": "http://localhost:8080", + "ee": false, + "ncAttachmentFieldSize": 20971520, + "ncMaxAttachmentsAllowed": 10, + "isCloud": false, + "automationLogLevel": "OFF" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Utils" + ], + "description": "Get the application info such as authType, defaultLimit, version and etc.", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/axiosRequestMake": { + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "post": { + "summary": "Axios Request", + "operationId": "utils-axios-request-make", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "Generic Axios Call", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "tags": [ + "Utils" + ], + "x-internal": true, + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v1/version": { + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "get": { + "summary": "Get App Version", + "operationId": "utils-app-version", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "x-examples": { + "Example 1": { + "currentVersion": "0.105.3", + "releaseVersion": "0.105.3" + } + }, + "properties": { + "currentVersion": { + "type": "string", + "description": "Current NocoDB Version", + "example": "0.104.0" + }, + "releaseVersion": { + "type": "string", + "description": "Latest Release Version", + "example": "0.105.3" + } + } + }, + "examples": { + "Example 1": { + "value": { + "currentVersion": "0.104.0", + "releaseVersion": "0.105.3" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Utils" + ], + "description": "Get the application version", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v1/health": { + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "get": { + "summary": "Get Application Health Status", + "operationId": "utils-app-health", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "x-examples": { + "Example 1": { + "message": "OK", + "timestamp": 1678702175755, + "uptime": 1618.996877834 + } + }, + "properties": { + "message": { + "type": "string", + "example": "OK" + }, + "timestamp": { + "type": "string", + "example": "1678702175755" + }, + "uptime": { + "type": "string", + "example": "1618.996877834" + } + } + }, + "examples": { + "Example 1": { + "value": { + "message": "OK", + "timestamp": 1678702175755, + "uptime": 1618.996877834 + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Utils" + ], + "description": "Get Application Health Status", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v1/aggregated-meta-info": { + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "get": { + "summary": "Get Aggregated Meta Info", + "operationId": "utils-aggregated-meta-info", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "baseCount": { + "type": "integer" + }, + "bases": { + "type": "array", + "items": { + "type": "object", + "properties": { + "tableCount": { + "type": "object", + "properties": { + "table": { + "type": "integer", + "description": "Table Count" + }, + "view": { + "type": "integer", + "description": "View Count" + } + } + }, + "external": { + "type": "boolean", + "description": "External Base", + "default": false + }, + "viewCount": { + "type": "object", + "properties": { + "formCount": { + "type": "integer", + "description": "Form Count" + }, + "gridCount": { + "type": "integer", + "description": "Grid Count" + }, + "galleryCount": { + "type": "integer", + "description": "Gallery Count" + }, + "kanbanCount": { + "type": "integer", + "description": "Kanban Count" + }, + "total": { + "type": "integer", + "description": "Total View Count" + }, + "sharedFormCount": { + "type": "integer", + "description": "Shared Form Count" + }, + "sharedGridCount": { + "type": "integer", + "description": "Shared Grid Count" + }, + "sharedGalleryCount": { + "type": "integer", + "description": "Shared Gallery Count" + }, + "sharedKanbanCount": { + "type": "integer", + "description": "Shared Kanban Count" + }, + "sharedTotal": { + "type": "integer", + "description": "Shared Total View Count" + }, + "sharedLockedCount": { + "type": "integer", + "description": "Shared Locked View Count" + } + } + }, + "webhookCount": { + "type": "integer", + "description": "Webhook Count" + }, + "filterCount": { + "type": "integer", + "description": "Filter Count" + }, + "sortCount": { + "type": "integer", + "description": "Sort Count" + }, + "rowCount": { + "type": "array", + "items": { + "type": "object", + "properties": { + "TotalRecords": { + "type": "string" + } + } + }, + "description": "Row Count" + }, + "userCount": { + "type": "integer", + "description": "Total base user Count" + } + } + } + }, + "userCount": { + "type": "integer", + "description": "Total user Count" + }, + "sharedBaseCount": { + "type": "integer", + "description": "Total shared base Count" + } + }, + "x-examples": { + "Example 1": { + "baseCount": 1, + "bases": [ + { + "tableCount": { + "table": 3, + "view": 0 + }, + "external": false, + "viewCount": { + "formCount": 0, + "gridCount": 3, + "galleryCount": 0, + "kanbanCount": 0, + "total": 3, + "sharedFormCount": 0, + "sharedGridCount": 0, + "sharedGalleryCount": 0, + "sharedKanbanCount": 0, + "sharedTotal": 0, + "sharedLockedCount": 0 + }, + "webhookCount": 0, + "filterCount": 0, + "sortCount": 0, + "rowCount": [ + { + "TotalRecords": "76" + } + ], + "userCount": 1 + } + ], + "userCount": 1, + "sharedBaseCount": 0 + } + } + }, + "examples": { + "example-1": { + "value": { + "baseCount": 1, + "bases": [ + { + "tableCount": { + "table": 3, + "view": 0 + }, + "external": false, + "viewCount": { + "formCount": 0, + "gridCount": 3, + "galleryCount": 0, + "kanbanCount": 0, + "total": 3, + "sharedFormCount": 0, + "sharedGridCount": 0, + "sharedGalleryCount": 0, + "sharedKanbanCount": 0, + "sharedTotal": 0, + "sharedLockedCount": 0 + }, + "webhookCount": 0, + "filterCount": 0, + "sortCount": 0, + "rowCount": [ + { + "TotalRecords": "76" + } + ], + "userCount": 1 + } + ], + "userCount": 1, + "sharedBaseCount": 0 + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Utils" + ], + "description": "Get Aggregated Meta Info such as tableCount, dbViewCount, viewCount and etc.", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/cache": { + "get": { + "summary": "Get Cache", + "tags": [ + "Utils" + ], + "responses": {}, + "operationId": "utils-cache-get", + "description": "Get All K/V pairs in NocoCache", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "delete": { + "summary": "Delete Cache", + "operationId": "utils-cache-delete", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "boolean" + }, + "examples": { + "Example 1": { + "value": true + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "description": "Delete All K/V pairs in NocoCache", + "tags": [ + "Utils" + ], + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "/api/v2/meta/projects/{baseId}/api-tokens": { + "get": { + "summary": "List API Tokens in Base", + "tags": [ + "API Token" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTokenList" + }, + "examples": { + "Example 1": { + "value": { + "list": [ + { + "id": "1", + "fk_user_id": "us_b3xo2i44nx5y9l", + "description": "This API Token is for ABC application", + "token": "DYh540o8hbWpUGdarekECKLdN5OhlgCUWutVJYX2" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "operationId": "api-token-list", + "description": "List API Tokens in the given base", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "post": { + "summary": "Create API Token", + "operationId": "api-token-create", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiToken" + }, + "examples": { + "Example 1": { + "value": { + "id": "1", + "fk_user_id": "us_b3xo2i44nx5y9l", + "description": "This API Token is for ABC application", + "token": "DYh540o8hbWpUGdarekECKLdN5OhlgCUWutVJYX2" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTokenReq" + }, + "examples": { + "Example 1": { + "value": { + "description": "This API token is for ABC application" + } + } + } + } + }, + "description": "" + }, + "tags": [ + "API Token" + ], + "description": "Create API Token in a base", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "p_124hhlkbeasewh", + "type": "string" + }, + "name": "baseId", + "in": "path", + "required": true, + "description": "Unique Base ID" + } + ] + }, + "/api/v2/meta/projects/{baseId}/api-tokens/{token}": { + "delete": { + "summary": "Delete API Token", + "operationId": "api-token-delete", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "number", + "example": 1 + }, + "examples": { + "Example 1": { + "value": 1 + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "API Token" + ], + "description": "Delete the given API Token in base", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "p_124hhlkbeasewh", + "type": "string" + }, + "name": "baseId", + "in": "path", + "required": true, + "description": "Unique Base ID" + }, + { + "schema": { + "type": "string", + "example": "DYh540o8hbWpUGdarekECKLdN5OhlgCUWutVJYX2" + }, + "name": "token", + "in": "path", + "required": true, + "description": "API Token" + } + ] + }, + "/api/v2/storage/upload": { + "post": { + "summary": "Attachment Upload", + "operationId": "storage-upload", + "responses": {}, + "tags": [ + "Storage" + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/AttachmentReq" + }, + "examples": { + "Example 1": { + "value": { + "mimetype": "image/jpeg", + "path": "download/noco/jango_fett/Table1/attachment/uVbjPVQxC_SSfs8Ctx.jpg", + "size": 13052, + "title": "22bc-kavypmq4869759 (1).jpg" + } + } + } + } + }, + "description": "" + }, + "parameters": [ + { + "schema": { + "type": "string", + "example": "download/noco/jango_fett/Table1/attachment/uVbjPVQxC_SSfs8Ctx.jpg" + }, + "name": "path", + "in": "query", + "required": true, + "description": "Target File Path" + }, + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "description": "Upload attachment" + } + }, + "/api/v2/storage/upload-by-url": { + "post": { + "summary": "Attachment Upload by URL", + "operationId": "storage-upload-by-url", + "responses": {}, + "tags": [ + "Storage" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AttachmentReq" + } + }, + "examples": {} + } + } + }, + "parameters": [ + { + "schema": { + "type": "string", + "example": "download/noco/jango_fett/Table1/attachment/c7z_UF8sZBgJUxMjpN.jpg" + }, + "name": "path", + "in": "query", + "description": "Target File Path", + "required": true + }, + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "description": "Upload attachment by URL. Used in Airtable Migration." + } + }, + "/api/v2/meta/projects/{baseId}/users/{userId}/resend-invite": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "p_124hhlkbeasewh", + "type": "string" + }, + "name": "baseId", + "in": "path", + "required": true, + "description": "Unique Base ID" + }, + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "us_b3xo2i44nx5y9l" + }, + "name": "userId", + "in": "path", + "required": true, + "description": "Unique User ID" + } + ], + "post": { + "summary": "Resend User Invitation", + "operationId": "auth-base-user-resend-invite", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "msg": { + "type": "string", + "x-stoplight": { + "id": "m570oh5j3afjt" + }, + "description": "Success Message", + "example": "The invitation has been sent to the user" + } + } + }, + "examples": { + "Example 1": { + "value": { + "msg": "The invitation has been sent to the user" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "Auth" + ], + "description": "Resend Invitation to a specific user", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v1/notifications": { + "get": { + "summary": "Notification list", + "operationId": "notification-list", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationList" + } + } + } + } + }, + "tags": [ + "Notification" + ], + "description": "List notifications", + "parameters": [ + { + "schema": { + "type": "boolean" + }, + "name": "is_read", + "in": "query", + "required": false + }, + { + "schema": { + "type": "number" + }, + "name": "limit", + "in": "query", + "required": false + }, + { + "schema": { + "type": "number" + }, + "name": "offset", + "in": "query", + "required": false + } + ] + } + }, + "/api/v1/notifications/{notificationId}": { + "patch": { + "summary": "Notification update", + "operationId": "notification-update", + "responses": { + "200": { + "description": "OK" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationUpdate" + } + } + } + }, + "tags": [ + "Notification" + ], + "description": "Notificattion update" + }, + "delete": { + "summary": "Delete notification", + "operationId": "notification-delete", + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "Notification" + ], + "description": "Delete notification" + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "notificationId", + "in": "path", + "required": true + } + ] + }, + "/api/v1/notifications/mark-all-read": { + "post": { + "summary": "Mark all notifications as read", + "operationId": "notification-mark-all-as-read", + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "Notification" + ], + "description": "Mark all notifications as read" + } + }, + "/api/v2/meta/tables/{tableId}/columns/hash": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "md_w9gpnaousnfss1", + "type": "string" + }, + "name": "tableId", + "in": "path", + "required": true, + "description": "Unique Table ID" + } + ], + "get": { + "summary": "Get columns hash for table", + "operationId": "db-table-column-hash", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "hash": { + "type": "string", + "description": "Columns hash" + } + } + } + } + } + } + }, + "tags": [ + "DB Table Column" + ], + "description": "Get columns hash for table", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/meta/tables/{tableId}/columns/bulk": { + "parameters": [ + { + "schema": { + "$ref": "#/components/schemas/Id", + "example": "md_w9gpnaousnfss1", + "type": "string" + }, + "name": "tableId", + "in": "path", + "required": true, + "description": "Unique Table ID" + } + ], + "post": { + "summary": "Bulk create-update-delete columns", + "operationId": "db-table-column-bulk", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "failedOps": { + "type": "array", + "items": { + "schema": { + "type": "object", + "properties": { + "op": { + "type": "string", + "enum": [ + "add", + "update", + "delete" + ], + "required": true + }, + "column": { + "$ref": "#/components/schemas/Column", + "required": true + }, + "error": {} + } + } + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "hash": { + "type": "string", + "description": "Columns hash" + }, + "ops": { + "type": "array", + "items": { + "schema": { + "type": "object", + "properties": { + "op": { + "type": "string" + }, + "column": { + "type": "object" + } + } + } + } + } + } + } + } + } + }, + "tags": [ + "DB Table Column" + ], + "description": "Bulk create-update-delete columns", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/tables/{tableId}/rows": { + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "tableId", + "in": "path", + "required": true, + "description": "Table ID" + }, + { + "schema": { + "type": "string" + }, + "name": "viewId", + "in": "query", + "required": true, + "description": "View ID" + } + ], + "get": { + "summary": "List Table Rows", + "operationId": "db-data-table-row-list", + "description": "List all table rows in a given table", + "tags": [ + "DB Data Table Row" + ], + "parameters": [ + { + "schema": { + "type": "array" + }, + "in": "query", + "name": "fields", + "description": "Which fields to be shown" + }, + { + "schema": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ] + }, + "in": "query", + "name": "sort", + "description": "The result will be sorted based on `sort` query" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "where", + "description": "Extra filtering" + }, + { + "schema": { + "type": "integer", + "minimum": 0 + }, + "in": "query", + "name": "offset", + "description": "Offset in rows" + }, + { + "schema": { + "type": "integer", + "minimum": 1 + }, + "in": "query", + "name": "limit", + "description": "Limit in rows" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sortArrJson", + "description": "Used for multiple sort queries" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "filterArrJson", + "description": "Used for multiple filter queries" + }, + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "list": { + "type": "array", + "description": "List of data objects", + "items": { + "type": "object" + } + }, + "pageInfo": { + "$ref": "#/components/schemas/Paginated", + "description": "Paginated Info" + } + }, + "required": [ + "list", + "pageInfo" + ] + }, + "examples": { + "Example 1": { + "value": { + "list": [ + { + "Id": 1, + "Title": "baz", + "SingleSelect": null, + "Sheet-1 List": [ + { + "Id": 1, + "Title": "baz" + } + ], + "LTAR": [ + { + "Id": 1, + "Title": "baz" + } + ] + }, + { + "Id": 2, + "Title": "foo", + "SingleSelect": "a", + "Sheet-1 List": [ + { + "Id": 2, + "Title": "foo" + } + ], + "LTAR": [ + { + "Id": 2, + "Title": "foo" + } + ] + }, + { + "Id": 3, + "Title": "bar", + "SingleSelect": "b", + "Sheet-1 List": [], + "LTAR": [] + } + ], + "pageInfo": { + "totalRows": 3, + "page": 1, + "pageSize": 25, + "isFirstPage": true, + "isLastPage": true + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + } + }, + "post": { + "summary": "Create Table Rows", + "operationId": "db-data-table-row-create", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Data Table Row" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object" + }, + { + "type": "array", + "items": { + "type": "object" + } + } + ] + }, + "examples": { + "Example 1": { + "value": { + "Id": 1, + "Title": "foo", + "CreatedAt": "2023-03-11T09:10:53.567Z", + "UpdatedAt": "2023-03-11T09:10:53.567Z" + } + } + } + } + } + }, + "description": "Create a new row in a given table and base.", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "put": { + "summary": "Update Table Rows", + "operationId": "db-data-table-row-update", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Data Table Row" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object" + }, + { + "type": "array", + "items": { + "type": "object" + } + } + ] + }, + "examples": { + "Example 1": { + "value": { + "Id": 1, + "Title": "foo", + "CreatedAt": "2023-03-11T09:10:53.567Z", + "UpdatedAt": "2023-03-11T09:10:53.567Z" + } + } + } + } + } + }, + "description": "Create a new row in a given table and base.", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "delete": { + "summary": "Delete Table Rows", + "operationId": "db-data-table-row-delete", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Data Table Row" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object" + }, + { + "type": "array", + "items": { + "type": "object" + } + } + ] + }, + "examples": { + "Example 1": { + "value": [ + { + "Id": 1 + } + ] + } + } + } + } + }, + "description": "Create a new row in a given table and base.", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + }, + "/api/v2/tables/{tableId}/records/{rowId}": { + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "tableId", + "in": "path", + "required": true, + "description": "Table ID" + }, + { + "schema": { + "type": "string" + }, + "name": "rowId", + "in": "path", + "required": true, + "description": "Row ID" + }, + { + "schema": { + "type": "string" + }, + "name": "viewId", + "in": "query", + "required": true, + "description": "View ID" + } + ], + "get": { + "summary": "Read Table Row", + "operationId": "db-data-table-row-read", + "description": "Get table row in a given table", + "tags": [ + "DB Data Table Row" + ], + "parameters": [ + { + "schema": { + "type": "array" + }, + "in": "query", + "name": "fields", + "description": "Which fields to be shown" + }, + { + "schema": { + "type": "integer", + "minimum": 0 + }, + "in": "query", + "name": "offset", + "description": "Offset in rows" + }, + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "examples": { + "Example 1": { + "value": { + "Id": 1, + "Title": "baz", + "SingleSelect": null, + "Sheet-1 List": [ + { + "Id": 1, + "Title": "baz" + } + ], + "LTAR": [ + { + "Id": 1, + "Title": "baz" + } + ] + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + } + } + }, + "/api/v2/tables/{tableId}/records/count": { + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "tableId", + "in": "path", + "required": true, + "description": "Table ID" + }, + { + "schema": { + "type": "string" + }, + "name": "viewId", + "in": "query", + "required": true, + "description": "View ID" + } + ], + "get": { + "summary": "Table Rows Count", + "operationId": "db-data-table-row-count", + "description": "Count of rows in a given table", + "tags": [ + "DB Data Table Row" + ], + "parameters": [ + { + "schema": { + "type": "array" + }, + "in": "query", + "name": "fields", + "description": "Which fields to be shown" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "where", + "description": "Extra filtering" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "filterArrJson", + "description": "Used for multiple filter queries" + }, + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + } + }, + "required": [ + "list", + "pageInfo" + ] + }, + "examples": { + "Example 1": { + "value": { + "list": [ + { + "Id": 1, + "Title": "baz", + "SingleSelect": null, + "Sheet-1 List": [ + { + "Id": 1, + "Title": "baz" + } + ], + "LTAR": [ + { + "Id": 1, + "Title": "baz" + } + ] + }, + { + "Id": 2, + "Title": "foo", + "SingleSelect": "a", + "Sheet-1 List": [ + { + "Id": 2, + "Title": "foo" + } + ], + "LTAR": [ + { + "Id": 2, + "Title": "foo" + } + ] + }, + { + "Id": 3, + "Title": "bar", + "SingleSelect": "b", + "Sheet-1 List": [], + "LTAR": [] + } + ], + "pageInfo": { + "totalRows": 3, + "page": 1, + "pageSize": 25, + "isFirstPage": true, + "isLastPage": true + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + } + } + }, + "/api/v2/tables/{tableId}/links/{columnId}/records/{rowId}": { + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "tableId", + "in": "path", + "required": true, + "description": "Table ID" + }, + { + "schema": { + "type": "string" + }, + "name": "viewId", + "in": "query", + "required": true, + "description": "View ID" + } + ], + "get": { + "summary": "Get Nested Relations Rows", + "operationId": "db-data-table-row-nested-list", + "description": "Linked rows in a given Links/LinkToAnotherRecord column", + "tags": [ + "DB Data Table Row" + ], + "parameters": [ + { + "schema": { + "type": "array" + }, + "in": "query", + "name": "fields", + "description": "Which fields to be shown" + }, + { + "schema": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ] + }, + "in": "query", + "name": "sort", + "description": "The result will be sorted based on `sort` query" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "where", + "description": "Extra filtering" + }, + { + "schema": { + "type": "integer", + "minimum": 0 + }, + "in": "query", + "name": "offset", + "description": "Offset in rows" + }, + { + "schema": { + "type": "integer", + "minimum": 1 + }, + "in": "query", + "name": "limit", + "description": "Limit in rows" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "sortArrJson", + "description": "Used for multiple sort queries" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "filterArrJson", + "description": "Used for multiple filter queries" + }, + { + "$ref": "#/components/parameters/xc-auth" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "list": { + "type": "array", + "description": "List of data objects", + "items": { + "type": "object" + } + }, + "pageInfo": { + "$ref": "#/components/schemas/Paginated", + "description": "Paginated Info" + } + }, + "required": [ + "list", + "pageInfo" + ] + }, + "examples": { + "Example 1": { + "value": { + "list": [ + { + "Id": 1, + "Title": "baz", + "SingleSelect": null, + "Sheet-1 List": [ + { + "Id": 1, + "Title": "baz" + } + ], + "LTAR": [ + { + "Id": 1, + "Title": "baz" + } + ] + }, + { + "Id": 2, + "Title": "foo", + "SingleSelect": "a", + "Sheet-1 List": [ + { + "Id": 2, + "Title": "foo" + } + ], + "LTAR": [ + { + "Id": 2, + "Title": "foo" + } + ] + }, + { + "Id": 3, + "Title": "bar", + "SingleSelect": "b", + "Sheet-1 List": [], + "LTAR": [] + } + ], + "pageInfo": { + "totalRows": 3, + "page": 1, + "pageSize": 25, + "isFirstPage": true, + "isLastPage": true + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + } + }, + "post": { + "summary": "Create Nested Relations Rows", + "operationId": "db-data-table-row-nested-link", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Data Table Row" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object" + }, + { + "type": "array", + "items": { + "type": "object" + } + } + ] + }, + "examples": { + "Example 1": { + "value": [ + { + "Id": 1 + } + ] + } + } + } + } + }, + "description": "Create a link with the row.", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + }, + "delete": { + "summary": "Delete Nested Relations Rows", + "operationId": "db-data-table-row-nested-unlink", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + } + }, + "tags": [ + "DB Data Table Row" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "object" + }, + { + "type": "array", + "items": { + "type": "object" + } + } + ] + }, + "examples": { + "Example 1": { + "value": [ + { + "Id": 1 + } + ] + } + } + } + } + }, + "description": "Create a new row in a given table and base.", + "parameters": [ + { + "$ref": "#/components/parameters/xc-auth" + } + ] + } + } + }, + "components": { + "schemas": { + "ApiToken": { + "description": "Model for API Token", + "examples": [ + { + "id": "1", + "fk_user_id": "us_b3xo2i44nx5y9l", + "description": "This API Token is for ABC application", + "token": "DYh540o8hbWpUGdarekECKLdN5OhlgCUWutVJYX2" + } + ], + "title": "API Token Model", + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/Id", + "description": "Unique API Token ID" + }, + "fk_user_id": { + "$ref": "#/components/schemas/Id", + "description": "Foreign Key to User" + }, + "description": { + "type": "string", + "description": "API Token Description", + "example": "This API Token is for ABC application" + }, + "token": { + "type": "string", + "description": "API Token", + "example": "DYh540o8hbWpUGdarekECKLdN5OhlgCUWutVJYX2" + } + }, + "x-stoplight": { + "id": "c7i7cfci4kobt" + } + }, + "ApiTokenReq": { + "description": "Model for API Token Request", + "examples": [ + { + "description": "This API token is for ABC application" + } + ], + "title": "API Token Request Model", + "type": "object", + "properties": { + "description": { + "description": "Description of the API token", + "maxLength": 255, + "type": "string", + "example": "This API Token is for ABC application" + } + }, + "x-stoplight": { + "id": "53ux6deypkuwb" + } + }, + "ApiTokenList": { + "description": "Model for API Token List", + "x-stoplight": { + "id": "t24xmch4x2o30" + }, + "examples": [ + { + "list": [ + { + "id": "1", + "fk_user_id": "us_b3xo2i44nx5y9l", + "description": "This API Token is for ABC application", + "token": "DYh540o8hbWpUGdarekECKLdN5OhlgCUWutVJYX2" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + ], + "title": "API Token List Model", + "type": "object", + "properties": { + "list": { + "type": "array", + "example": [ + { + "list": [ + { + "id": "1", + "fk_user_id": "us_b3xo2i44nx5y9l", + "description": "This API Token is for ABC application", + "token": "DYh540o8hbWpUGdarekECKLdN5OhlgCUWutVJYX2" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + ], + "x-stoplight": { + "id": "c7xu43yjgyjww" + }, + "description": "List of api token objects", + "items": { + "$ref": "#/components/schemas/ApiToken", + "x-stoplight": { + "id": "5ih4l0ix2tr5q" + } + } + }, + "pageInfo": { + "$ref": "#/components/schemas/Paginated", + "x-stoplight": { + "id": "0w8ktfnx3pusz" + }, + "description": "Model for Paginated" + } + }, + "required": [ + "list", + "pageInfo" + ] + }, + "Attachment": { + "description": "Model for Attachment", + "examples": [ + { + "data": null, + "mimetype": "image/jpeg", + "path": "download/noco/jango_fett/Table1/attachment/c7z_UF8sZBgJUxMjpN.jpg", + "size": 12345, + "title": "kavypmq4869759.jpg" + } + ], + "title": "Attachment Model", + "type": "object", + "properties": { + "data": { + "description": "Data for uploading" + }, + "mimetype": { + "type": "string", + "description": "The mimetype of the attachment" + }, + "path": { + "type": "string", + "description": "File Path" + }, + "size": { + "type": "number", + "description": "Attachment Size" + }, + "title": { + "type": "string", + "description": "The title of the attachment. Used in UI." + }, + "url": { + "type": "string", + "description": "Attachment URL" + } + }, + "x-stoplight": { + "id": "mjewsbpmazrwe" + } + }, + "AttachmentReq": { + "description": "Model for Attachment Request", + "type": "object", + "x-examples": { + "Example 1": { + "mimetype": "image/jpeg", + "path": "download/noco/jango_fett/Table1/attachment/uVbjPVQxC_SSfs8Ctx.jpg", + "size": 13052, + "title": "22bc-kavypmq4869759 (1).jpg" + } + }, + "title": "Attachment Request Model", + "properties": { + "mimetype": { + "type": "string", + "description": "The mimetype of the attachment" + }, + "path": { + "type": "string", + "description": "The file path of the attachment" + }, + "size": { + "type": "number", + "description": "The size of the attachment" + }, + "title": { + "type": "string", + "description": "The title of the attachment used in UI" + }, + "url": { + "type": "string", + "description": "Attachment URL to be uploaded via upload-by-url" + } + }, + "x-stoplight": { + "id": "6cr1iwhbyxncd" + } + }, + "Audit": { + "description": "Model for Audit", + "examples": [ + { + "id": "adt_l5we7pkx70vaao", + "user": "w@nocodb.com", + "display_name": "NocoDB", + "ip": "::ffff:127.0.0.1", + "source_id": "ds_3l9qx8xqksenrl", + "base_id": "p_9sx43moxhqtjm3", + "fk_model_id": "md_ehn5izr99m7d45", + "row_id": "rec0Adp9PMG9o7uJy", + "op_type": "AUTHENTICATION", + "op_sub_type": "UPDATE", + "status": "string", + "description": "Table nc_snms___Table_1 : field Date got changed from 2023-03-12 to ", + "details": "Date : 2023-03-12 " + } + ], + "title": "Audit Model", + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/Id", + "description": "Unique ID" + }, + "user": { + "type": "string", + "description": "The user name performing the action", + "example": "w@nocodb.com" + }, + "display_name": { + "type": "string", + "description": "The display name of user performing the action", + "example": "NocoDB" + }, + "ip": { + "type": "string", + "example": "::ffff:127.0.0.1", + "description": "IP address from the user" + }, + "source_id": { + "type": "string", + "description": "Source ID in where action is performed", + "example": "ds_3l9qx8xqksenrl" + }, + "base_id": { + "type": "string", + "description": "Base ID in where action is performed", + "example": "p_9sx43moxhqtjm3" + }, + "fk_model_id": { + "type": "string", + "description": "Model ID in where action is performed", + "example": "md_ehn5izr99m7d45" + }, + "row_id": { + "type": "string", + "description": "Row ID", + "example": "rec0Adp9PMG9o7uJy" + }, + "op_type": { + "type": "string", + "description": "Operation Type", + "example": "AUTHENTICATION", + "enum": [ + "COMMENT", + "DATA", + "PROJECT", + "VIRTUAL_RELATION", + "RELATION", + "TABLE_VIEW", + "TABLE", + "VIEW", + "META", + "WEBHOOKS", + "AUTHENTICATION", + "TABLE_COLUMN", + "ORG_USER" + ] + }, + "op_sub_type": { + "type": "string", + "description": "Operation Sub Type", + "example": "UPDATE", + "enum": [ + "UPDATE", + "INSERT", + "BULK_INSERT", + "BULK_UPDATE", + "BULK_DELETE", + "LINK_RECORD", + "UNLINK_RECORD", + "DELETE", + "CREATE", + "RENAME", + "IMPORT_FROM_ZIP", + "EXPORT_TO_FS", + "EXPORT_TO_ZIP", + "SIGNIN", + "SIGNUP", + "PASSWORD_RESET", + "PASSWORD_FORGOT", + "PASSWORD_CHANGE", + "EMAIL_VERIFICATION", + "ROLES_MANAGEMENT", + "INVITE", + "RESEND_INVITE" + ] + }, + "status": { + "type": "string", + "description": "Audit Status" + }, + "description": { + "type": "string", + "description": "Description of the action", + "example": "Table nc_snms___Table_1 : field Date got changed from 2023-03-12 to " + }, + "details": { + "type": "string", + "description": "Detail", + "example": "Date : 2023-03-12 " + } + }, + "x-stoplight": { + "id": "n44nqsmhm56c7" + } + }, + "AuditRowUpdateReq": { + "description": "Model for Audit Row Update Request", + "examples": [ + { + "column_name": "baz", + "fk_model_id": "md_ehn5izr99m7d45", + "row_id": "rec0Adp9PMG9o7uJy", + "prev_value": "foo", + "value": "bar" + } + ], + "title": "Audit Row Update Request Model", + "type": "object", + "properties": { + "column_name": { + "type": "string", + "description": "Column Name", + "example": "baz" + }, + "fk_model_id": { + "type": "string", + "description": "Foreign Key to Model", + "example": "md_ehn5izr99m7d45" + }, + "row_id": { + "type": "string", + "example": "rec0Adp9PMG9o7uJy", + "description": "Row ID" + }, + "prev_value": { + "description": "The previous value before the action" + }, + "value": { + "description": "The current value after the action" + } + }, + "x-stoplight": { + "id": "2fzwvc4m1k5or" + } + }, + "Source": { + "description": "Model for Source", + "examples": [ + { + "alias": null, + "config": "", + "enabled": 1, + "id": "ds_krsappzu9f8vmo", + "inflection_column": "camelize", + "inflection_table": "camelize", + "is_meta": 1, + "meta": null, + "order": 1, + "base_id": "p_01clqvzik3izk6", + "type": "mysql2" + } + ], + "title": "Source Model", + "type": "object", + "properties": { + "alias": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Source Name - Default BASE will be null by default" + }, + "config": { + "description": "Source Configuration" + }, + "enabled": { + "$ref": "#/components/schemas/Bool", + "description": "Is this source enabled" + }, + "id": { + "description": "Unique Source ID", + "type": "string" + }, + "inflection_column": { + "description": "Inflection for columns", + "example": "camelize", + "type": "string" + }, + "inflection_table": { + "description": "Inflection for tables", + "example": "camelize", + "type": "string" + }, + "is_meta": { + "$ref": "#/components/schemas/Bool", + "description": "Is the data source connected externally" + }, + "is_local": { + "$ref": "#/components/schemas/Bool", + "description": "Is the data source minimal db" + }, + "order": { + "description": "The order of the list of sources", + "example": 1, + "type": "number" + }, + "base_id": { + "description": "The base ID that this source belongs to", + "type": "string" + }, + "type": { + "description": "DB Type", + "enum": [ + "mssql", + "mysql", + "mysql2", + "oracledb", + "pg", + "snowflake", + "sqlite3" + ], + "example": "mysql2", + "type": "string" + } + }, + "x-stoplight": { + "id": "qyzsky82ovjiv" + } + }, + "BaseList": { + "description": "Model for Source List", + "examples": [ + { + "list": [ + { + "alias": null, + "config": "", + "enabled": 1, + "id": "ds_krsappzu9f8vmo", + "inflection_column": "camelize", + "inflection_table": "camelize", + "is_meta": 1, + "meta": null, + "order": 1, + "base_id": "p_01clqvzik3izk6", + "type": "mysql2" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + ], + "title": "Source List Model", + "type": "object", + "x-examples": { + "example-1": { + "sources": { + "list": [ + { + "alias": "sakila", + "config": "", + "created_at": "2023-03-02 11:28:17", + "enabled": 1, + "id": "ds_btbdt19zde0gj9", + "inflection_column": "camelize", + "inflection_table": "camelize", + "is_meta": null, + "meta": null, + "order": 2, + "base_id": "p_01clqvzik3izk6", + "type": "mysql2", + "updated_at": "2023-03-02 11:28:17" + }, + { + "alias": null, + "config": "", + "created_at": "2023-03-01 16:31:49", + "enabled": 1, + "id": "ds_krsappzu9f8vmo", + "inflection_column": "camelize", + "inflection_table": "camelize", + "is_meta": 1, + "meta": null, + "order": 1, + "base_id": "p_01clqvzik3izk6", + "type": "mysql2", + "updated_at": "2023-03-02 11:28:17" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 2, + "totalRows": 2 + } + } + } + }, + "properties": { + "list": { + "type": "array", + "x-stoplight": { + "id": "1q3ny60j1g4z2" + }, + "description": "List of source objects", + "items": { + "$ref": "#/components/schemas/Source", + "x-stoplight": { + "id": "udd0nrcv6pq8d" + } + } + }, + "pageInfo": { + "$ref": "#/components/schemas/Paginated", + "x-stoplight": { + "id": "xqwcniocq37hk" + }, + "description": "Paginated Info" + } + }, + "required": [ + "list", + "pageInfo" + ], + "x-stoplight": { + "id": "tty21vb01bfr0" + } + }, + "BaseReq": { + "description": "Model for Source Request", + "examples": [ + { + "alias": "My Source", + "config": null, + "inflection_column": "camelize", + "inflection_table": "camelize", + "is_meta": true, + "type": "mysql" + } + ], + "properties": { + "alias": { + "description": "Source Name - Default BASE will be null by default", + "example": "My Source", + "maxLength": 128, + "type": "string" + }, + "config": { + "description": "Source Configuration" + }, + "inflection_column": { + "description": "Inflection for columns", + "example": "camelize", + "type": "string" + }, + "inflection_table": { + "description": "Inflection for tables", + "example": "camelize", + "type": "string" + }, + "is_meta": { + "description": "Is the data source connected externally", + "type": "boolean" + }, + "is_local": { + "description": "Is the data source minimal db", + "type": "boolean" + }, + "type": { + "description": "DB Type", + "enum": [ + "mssql", + "mysql", + "mysql2", + "oracledb", + "pg", + "snowflake", + "sqlite3" + ], + "type": "string" + } + }, + "title": "Source Request", + "type": "object", + "x-stoplight": { + "id": "ky2ak9xsyl3b5" + } + }, + "Bool": { + "description": "Model for Bool", + "examples": [ + true + ], + "oneOf": [ + { + "description": "0 or 1", + "example": 0, + "type": "integer" + }, + { + "description": "true or false", + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Bool Model", + "x-stoplight": { + "id": "y0m76u8t9x2tn" + } + }, + "Column": { + "description": "Model for Column", + "examples": [ + { + "ai": 0, + "au": 0, + "source_id": "ds_krsappzu9f8vmo", + "cc": "", + "cdf": null, + "clen": "45", + "column_name": "title", + "cop": "2", + "created_at": "2023-03-02 13:14:16", + "csn": "utf8mb4", + "ct": "varchar(45)", + "deleted": null, + "dt": "varchar", + "dtx": "specificType", + "dtxp": "45", + "dtxs": null, + "fk_model_id": "md_yvwvbt2i78rgcm", + "id": "cl_0j9gv0oi8vjy46", + "meta": null, + "np": null, + "ns": null, + "order": 2, + "pk": 0, + "base_id": "p_01clqvzik3izk6", + "pv": 1, + "rqd": 0, + "system": 0, + "title": "Title", + "uidt": "SingleLineText", + "un": 0, + "unique": 0, + "updated_at": "2023-03-02 13:14:16", + "validate": null, + "virtual": null + } + ], + "title": "Column Model", + "type": "object", + "properties": { + "ai": { + "$ref": "#/components/schemas/Bool", + "description": "Is Auto-Increment?" + }, + "au": { + "$ref": "#/components/schemas/Bool", + "description": "Auto Update Timestamp" + }, + "source_id": { + "description": "Source ID that this column belongs to", + "example": "ds_krsappzu9f8vmo", + "type": "string" + }, + "cc": { + "description": "Column Comment", + "type": "string" + }, + "cdf": { + "$ref": "#/components/schemas/StringOrNullOrBooleanOrNumber", + "description": "Column Default" + }, + "clen": { + "description": "Character Maximum Length", + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "colOptions": { + "anyOf": [ + { + "$ref": "#/components/schemas/Formula" + }, + { + "$ref": "#/components/schemas/LinkToAnotherRecord" + }, + { + "$ref": "#/components/schemas/Lookup" + }, + { + "$ref": "#/components/schemas/Rollup" + }, + { + "$ref": "#/components/schemas/SelectOptions" + }, + { + "type": "object" + } + ], + "description": "Column Options" + }, + "column_name": { + "description": "Column Name", + "example": "title", + "type": "string" + }, + "cop": { + "description": "Column Ordinal Position", + "type": "string" + }, + "csn": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Character Set Name" + }, + "ct": { + "description": "Column Type", + "example": "varchar(45)", + "type": "string" + }, + "deleted": { + "$ref": "#/components/schemas/Bool", + "description": "Is Deleted?" + }, + "dt": { + "description": "Data Type in DB", + "example": "varchar", + "type": "string" + }, + "dtx": { + "description": "Data Type X", + "example": "specificType", + "type": "string" + }, + "dtxp": { + "description": "Data Type X Precision", + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "dtxs": { + "description": "Data Type X Scale", + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "fk_model_id": { + "description": "Model ID that this column belongs to", + "example": "md_yvwvbt2i78rgcm", + "type": "string" + }, + "id": { + "$ref": "#/components/schemas/Id", + "description": "Unique ID" + }, + "meta": { + "$ref": "#/components/schemas/Meta", + "description": "Meta Info" + }, + "np": { + "description": "Numeric Precision", + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "ns": { + "description": "Numeric Scale", + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "order": { + "description": "The order of the list of columns", + "type": "number" + }, + "pk": { + "$ref": "#/components/schemas/Bool", + "description": "Is Primary Key?" + }, + "pv": { + "$ref": "#/components/schemas/Bool", + "description": "Is Primary Value?" + }, + "rqd": { + "$ref": "#/components/schemas/Bool", + "description": "Is Required?" + }, + "system": { + "$ref": "#/components/schemas/Bool", + "description": "Is System Column?" + }, + "title": { + "description": "Column Title", + "example": "Title", + "type": "string" + }, + "uidt": { + "description": "The data type in UI", + "example": "SingleLineText", + "enum": [ + "Attachment", + "AutoNumber", + "Barcode", + "Button", + "Checkbox", + "Collaborator", + "Count", + "CreateTime", + "Currency", + "Date", + "DateTime", + "Decimal", + "Duration", + "Email", + "Formula", + "ForeignKey", + "GeoData", + "Geometry", + "ID", + "JSON", + "LastModifiedTime", + "LongText", + "LinkToAnotherRecord", + "Lookup", + "MultiSelect", + "Number", + "Percent", + "PhoneNumber", + "Rating", + "Rollup", + "SingleLineText", + "SingleSelect", + "SpecificDBType", + "Time", + "URL", + "Year", + "QrCode", + "Links" + ], + "type": "string" + }, + "un": { + "$ref": "#/components/schemas/Bool", + "description": "Is Unsigned?" + }, + "unique": { + "$ref": "#/components/schemas/Bool", + "description": "Is unique?" + }, + "visible": { + "$ref": "#/components/schemas/Bool", + "description": "Is Visible?" + } + }, + "x-stoplight": { + "id": "y9jx9r6o6x0h6" + } + }, + "ColumnList": { + "description": "Model for Column List", + "examples": [ + { + "list": [ + { + "ai": 0, + "au": 0, + "source_id": "ds_krsappzu9f8vmo", + "cc": "", + "cdf": null, + "clen": "45", + "column_name": "title", + "cop": "2", + "created_at": "2023-03-02 13:14:16", + "csn": "utf8mb4", + "ct": "varchar(45)", + "deleted": null, + "dt": "varchar", + "dtx": "specificType", + "dtxp": "45", + "dtxs": null, + "fk_model_id": "md_yvwvbt2i78rgcm", + "id": "cl_0j9gv0oi8vjy46", + "meta": null, + "np": null, + "ns": null, + "order": 2, + "pk": 0, + "base_id": "p_01clqvzik3izk6", + "pv": 1, + "rqd": 0, + "system": 0, + "title": "Title", + "uidt": "SingleLineText", + "un": 0, + "unique": 0, + "updated_at": "2023-03-02 13:14:16", + "validate": null, + "virtual": null + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + ], + "title": "Column List Model", + "type": "object", + "x-examples": { + "example-1": { + "sources": { + "list": [ + { + "alias": "string", + "database": "string", + "host": "string", + "id": "string", + "params": "string", + "password": "string", + "port": 0, + "base_id": "string", + "ssl": "string", + "type": "string", + "url": "string", + "username": "string" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "pageSize": 0, + "sort": "string", + "totalRows": 0 + } + } + } + }, + "properties": { + "list": { + "type": "array", + "x-stoplight": { + "id": "c6lpw8px25356" + }, + "description": "List of column objects", + "items": { + "$ref": "#/components/schemas/Column", + "x-stoplight": { + "id": "zbm89i86dr73y" + } + } + }, + "pageInfo": { + "$ref": "#/components/schemas/Paginated", + "x-stoplight": { + "id": "ko0s0z13h4hsw" + } + } + }, + "required": [ + "list", + "pageInfo" + ], + "x-stoplight": { + "id": "rsk9o5cs00wh5" + } + }, + "ColumnReq": { + "allOf": [ + { + "anyOf": [ + { + "$ref": "#/components/schemas/FormulaColumnReq" + }, + { + "$ref": "#/components/schemas/LinkToAnotherColumnReq" + }, + { + "$ref": "#/components/schemas/LookupColumnReq" + }, + { + "$ref": "#/components/schemas/NormalColumnRequest" + }, + { + "$ref": "#/components/schemas/RollupColumnReq" + } + ] + }, + { + "properties": { + "column_name": { + "type": "string" + }, + "column_order": { + "description": "Column order in a specific view", + "properties": { + "order": { + "type": "number" + }, + "view_id": { + "type": "string" + } + }, + "type": "object" + }, + "title": { + "maxLength": 255, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "title" + ] + } + ], + "description": "Model for Column Request", + "examples": [ + { + "ai": 0, + "au": 0, + "source_id": "ds_krsappzu9f8vmo", + "cc": "", + "cdf": null, + "clen": "45", + "column_name": "title", + "cop": "2", + "created_at": "2023-03-02 13:14:16", + "csn": "utf8mb4", + "ct": "varchar(45)", + "deleted": null, + "dt": "varchar", + "dtx": "specificType", + "dtxp": "45", + "dtxs": null, + "fk_model_id": "md_yvwvbt2i78rgcm", + "id": "cl_0j9gv0oi8vjy46", + "meta": null, + "np": null, + "ns": null, + "order": 2, + "pk": 0, + "base_id": "p_01clqvzik3izk6", + "pv": 1, + "rqd": 0, + "system": 0, + "title": "Title", + "uidt": "SingleLineText", + "un": 0, + "unique": 0, + "updated_at": "2023-03-02 13:14:16", + "validate": null, + "virtual": null + } + ], + "title": "Column Request Model", + "type": "object", + "x-stoplight": { + "id": "aipiq4098ocg3" + } + }, + "CommentReq": { + "description": "Model for Comment Request", + "examples": [ + { + "description": "This is the comment for the row", + "fk_model_id": "md_ehn5izr99m7d45", + "row_id": "3" + } + ], + "title": "Comment Request Model", + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Description for the target row", + "example": "This is the comment for the row" + }, + "fk_model_id": { + "type": "string", + "description": "Foreign Key to Model", + "example": "md_ehn5izr99m7d45" + }, + "row_id": { + "type": "string", + "description": "Row ID", + "example": "3" + } + }, + "required": [ + "fk_model_id", + "row_id" + ], + "x-stoplight": { + "id": "ohotsd0vq6d8w" + } + }, + "CommentUpdateReq": { + "description": "Model for Comment Update Request", + "x-stoplight": { + "id": "5shp04hfghm3a" + }, + "examples": [ + { + "description": "This is the comment for the row" + } + ], + "title": "Comment Update Request Model", + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Description for the target row", + "example": "This is the comment for the row" + } + } + }, + "Filter": { + "description": "Model for Filter", + "examples": [ + { + "source_id": "ds_g4ccx6e77h1dmi", + "comparison_op": "eq", + "comparison_sub_op": null, + "created_at": "2023-03-02 18:18:05", + "fk_column_id": "cl_d7ah9n2qfupgys", + "fk_hook_id": null, + "fk_parent_id": null, + "fk_view_id": "vw_b739e29vqmrxnf", + "id": "fi_xn647tpmdq8fu8", + "is_group": null, + "logical_op": "and", + "order": 1, + "base_id": "p_xm3thidrblw4n7", + "updated_at": "2023-03-02 18:18:05", + "value": "foo" + } + ], + "properties": { + "source_id": { + "description": "Unqiue Source ID", + "readOnly": true, + "type": "string" + }, + "children": { + "description": "Children filters. Available when the filter is grouped.", + "items": { + "$ref": "#/components/schemas/Filter" + }, + "type": "array" + }, + "comparison_op": { + "description": "Comparison Operator", + "anyOf": [ + { + "enum": [ + "allof", + "anyof", + "blank", + "btw", + "checked", + "empty", + "eq", + "ge", + "gt", + "gte", + "in", + "is", + "isWithin", + "isnot", + "le", + "like", + "lt", + "lte", + "nallof", + "nanyof", + "nbtw", + "neq", + "nlike", + "not", + "notblank", + "notchecked", + "notempty", + "notnull", + "null" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "comparison_sub_op": { + "anyOf": [ + { + "enum": [ + "daysAgo", + "daysFromNow", + "exactDate", + "nextMonth", + "nextNumberOfDays", + "nextWeek", + "nextYear", + "oneMonthAgo", + "oneMonthFromNow", + "oneWeekAgo", + "oneWeekFromNow", + "pastMonth", + "pastNumberOfDays", + "pastWeek", + "pastYear", + "today", + "tomorrow", + "yesterday" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Comparison Sub-Operator" + }, + "fk_column_id": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Foreign Key to Column" + }, + "fk_hook_id": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Foreign Key to Hook" + }, + "fk_model_id": { + "$ref": "#/components/schemas/Id", + "description": "Foreign Key to Model" + }, + "fk_parent_id": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Foreign Key to parent group." + }, + "fk_view_id": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Foreign Key to View" + }, + "id": { + "$ref": "#/components/schemas/Id", + "description": "Unique ID" + }, + "is_group": { + "description": "Is this filter grouped?", + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "logical_op": { + "description": "Logical Operator", + "enum": [ + "and", + "not", + "or" + ], + "type": "string" + }, + "base_id": { + "description": "Unique Base ID", + "readOnly": true, + "type": "string" + }, + "value": { + "description": "The filter value. Can be NULL for some operators." + } + }, + "readOnly": true, + "title": "Filter Model", + "type": "object", + "x-stoplight": { + "id": "txz3lsqh1rbsu" + } + }, + "FilterList": { + "description": "Model for Filter List", + "examples": [ + { + "list": [ + { + "source_id": "ds_g4ccx6e77h1dmi", + "comparison_op": "eq", + "comparison_sub_op": null, + "created_at": "2023-03-02 18:18:05", + "fk_column_id": "cl_d7ah9n2qfupgys", + "fk_hook_id": null, + "fk_parent_id": null, + "fk_view_id": "vw_b739e29vqmrxnf", + "id": "fi_xn647tpmdq8fu8", + "is_group": null, + "logical_op": "and", + "order": 1, + "base_id": "p_xm3thidrblw4n7", + "updated_at": "2023-03-02 18:18:05", + "value": "foo" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + ], + "title": "Filter List Model", + "type": "object", + "x-examples": { + "example-1": { + "sources": { + "list": [ + { + "alias": "string", + "database": "string", + "host": "string", + "id": "string", + "params": "string", + "password": "string", + "port": 0, + "base_id": "string", + "ssl": "string", + "type": "string", + "url": "string", + "username": "string" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "pageSize": 0, + "sort": "string", + "totalRows": 0 + } + } + } + }, + "properties": { + "list": { + "type": "array", + "x-stoplight": { + "id": "22sgv37ve9kxo" + }, + "description": "List of filter objects", + "items": { + "$ref": "#/components/schemas/Filter", + "x-stoplight": { + "id": "ttw5rxhy83k8p" + } + } + }, + "pageInfo": { + "$ref": "#/components/schemas/Paginated", + "x-stoplight": { + "id": "7cyrb1770mrzz" + } + } + }, + "required": [ + "list", + "pageInfo" + ], + "x-stoplight": { + "id": "wbc42cyev1qzt" + } + }, + "FilterLogList": { + "description": "Model for Filter Log List", + "x-stoplight": { + "id": "jbgae8q40szhc" + }, + "examples": [ + { + "list": [ + { + "source_id": "ds_g4ccx6e77h1dmi", + "comparison_op": "eq", + "comparison_sub_op": null, + "created_at": "2023-03-02 18:18:05", + "fk_column_id": "cl_d7ah9n2qfupgys", + "fk_hook_id": null, + "fk_parent_id": null, + "fk_view_id": "vw_b739e29vqmrxnf", + "id": "fi_xn647tpmdq8fu8", + "is_group": null, + "logical_op": "and", + "order": 1, + "base_id": "p_xm3thidrblw4n7", + "updated_at": "2023-03-02 18:18:05", + "value": "foo" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + ], + "title": "Filter Log List Model", + "type": "object", + "x-examples": { + "example-1": { + "sources": { + "list": [ + { + "alias": "string", + "database": "string", + "host": "string", + "id": "string", + "params": "string", + "password": "string", + "port": 0, + "base_id": "string", + "ssl": "string", + "type": "string", + "url": "string", + "username": "string" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "pageSize": 0, + "sort": "string", + "totalRows": 0 + } + } + } + }, + "properties": { + "list": { + "type": "array", + "x-stoplight": { + "id": "22sgv37ve9kxo" + }, + "description": "List of filter objects", + "items": { + "$ref": "#/components/schemas/Filter", + "x-stoplight": { + "id": "ttw5rxhy83k8p" + } + } + }, + "pageInfo": { + "$ref": "#/components/schemas/Paginated", + "x-stoplight": { + "id": "7cyrb1770mrzz" + } + } + }, + "required": [ + "list", + "pageInfo" + ] + }, + "FilterReq": { + "description": "Model for Filter Request", + "examples": [ + { + "comparison_op": "eq", + "comparison_sub_op": null, + "fk_column_id": "cl_d7ah9n2qfupgys", + "is_group": false, + "logical_op": "and", + "value": "foo" + } + ], + "title": "Filter Request Model", + "type": "object", + "x-stoplight": { + "id": "f95qy45zzlhei" + }, + "properties": { + "comparison_op": { + "description": "Comparison Operator", + "anyOf": [ + { + "enum": [ + "allof", + "anyof", + "blank", + "btw", + "checked", + "empty", + "eq", + "ge", + "gt", + "gte", + "in", + "is", + "isWithin", + "isnot", + "le", + "like", + "lt", + "lte", + "nallof", + "nanyof", + "nbtw", + "neq", + "nlike", + "not", + "notblank", + "notchecked", + "notempty", + "notnull", + "null" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "comparison_sub_op": { + "anyOf": [ + { + "enum": [ + "daysAgo", + "daysFromNow", + "exactDate", + "nextMonth", + "nextNumberOfDays", + "nextWeek", + "nextYear", + "oneMonthAgo", + "oneMonthFromNow", + "oneWeekAgo", + "oneWeekFromNow", + "pastMonth", + "pastNumberOfDays", + "pastWeek", + "pastYear", + "today", + "tomorrow", + "yesterday" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Comparison Sub-Operator" + }, + "fk_column_id": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Foreign Key to Column" + }, + "fk_parent_id": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Belong to which filter ID" + }, + "is_group": { + "$ref": "#/components/schemas/Bool", + "description": "Is this filter grouped?" + }, + "logical_op": { + "description": "Logical Operator", + "enum": [ + "and", + "not", + "or" + ], + "type": "string" + }, + "value": { + "description": "The filter value. Can be NULL for some operators." + } + }, + "readOnly": true + }, + "Follower": { + "properties": { + "fk_follower_id": { + "type": "string" + } + }, + "title": "Follower", + "type": "object", + "x-stoplight": { + "id": "a3aza5b3wavkv" + } + }, + "Form": { + "description": "Model for Form", + "examples": [ + { + "source_id": "ds_g4ccx6e77h1dmi", + "banner_image_url": null, + "columns": [ + { + "id": "fvc_ugj9zo5bzocxtl", + "source_id": "ds_g4ccx6e77h1dmi", + "base_id": "p_xm3thidrblw4n7", + "fk_view_id": "vw_kdf5cr7qmhksek", + "fk_column_id": "cl_phvuuwjrzcdo0g", + "uuid": null, + "label": null, + "help": null, + "description": null, + "required": null, + "show": 0, + "order": 1, + "created_at": "2023-03-04 16:40:47", + "updated_at": "2023-03-04 16:40:47", + "meta": {} + } + ], + "email": "user@example.com", + "fk_model_id": "md_rsu68aqjsbyqtl", + "heading": "My Form", + "lock_type": "collaborative", + "logo_url": null, + "meta": null, + "redirect_after_secs": null, + "redirect_url": null, + "show_blank_form": 0, + "subheading": "My Form Subheading", + "submit_another_form": 0, + "success_msg": "Thank you for the submission.", + "title": "Form View 1" + } + ], + "title": "Form Model", + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/Id", + "description": "Unique ID", + "x-stoplight": { + "id": "z6wjvs00d3qfk" + } + }, + "banner_image_url": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Banner Image URL. Not in use currently." + }, + "columns": { + "type": "array", + "description": "Form Columns", + "items": { + "$ref": "#/components/schemas/FormColumn" + } + }, + "email": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Email to sned after form is submitted" + }, + "fk_model_id": { + "type": "string", + "description": "Foreign Key to Model", + "example": "md_rsu68aqjsbyqtl" + }, + "source_id": { + "type": "string", + "description": "Source ID", + "example": "md_rsu68aqjsbyqtl", + "x-stoplight": { + "id": "kfz7tve8nzj6f" + } + }, + "heading": { + "type": "string", + "description": "The heading of the form", + "example": "My Form" + }, + "lock_type": { + "enum": [ + "collaborative", + "locked", + "personal" + ], + "type": "string", + "description": "Lock Type of this view", + "example": "collaborative" + }, + "logo_url": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Logo URL. Not in use currently." + }, + "meta": { + "$ref": "#/components/schemas/Meta", + "description": "Meta Info for this view" + }, + "redirect_after_secs": { + "$ref": "#/components/schemas/StringOrNull", + "description": "The numbers of seconds to redirect after form submission" + }, + "redirect_url": { + "$ref": "#/components/schemas/StringOrNull", + "description": "URL to redirect after submission" + }, + "show_blank_form": { + "$ref": "#/components/schemas/Bool", + "description": "Show `Blank Form` after 5 seconds" + }, + "subheading": { + "type": "string", + "description": "The subheading of the form", + "example": "My Form Subheading" + }, + "submit_another_form": { + "$ref": "#/components/schemas/Bool", + "description": "Show `Submit Another Form` button" + }, + "success_msg": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Custom message after the form is successfully submitted" + }, + "title": { + "type": "string", + "description": "Form View Title", + "example": "Form View 1" + } + }, + "x-stoplight": { + "id": "szw7mwcmvrj90" + } + }, + "FormUpdateReq": { + "description": "Model for Form Update Request", + "examples": [ + { + "banner_image_url": null, + "email": "user@example.com", + "heading": "My Form", + "logo_url": null, + "meta": null, + "redirect_after_secs": null, + "redirect_url": null, + "show_blank_form": 0, + "subheading": "My Form Subheading", + "submit_another_form": 0, + "success_msg": "Thank you for the submission." + } + ], + "title": "Form Update Request Model", + "type": "object", + "properties": { + "banner_image_url": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Banner Image URL. Not in use currently." + }, + "email": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Email to sned after form is submitted" + }, + "heading": { + "description": "The heading of the form", + "example": "My Form", + "maxLength": 255, + "type": "string" + }, + "logo_url": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Logo URL. Not in use currently." + }, + "meta": { + "$ref": "#/components/schemas/Meta", + "description": "Meta Info for this view" + }, + "redirect_after_secs": { + "$ref": "#/components/schemas/StringOrNull", + "description": "The numbers of seconds to redirect after form submission" + }, + "redirect_url": { + "$ref": "#/components/schemas/StringOrNull", + "description": "URL to redirect after submission" + }, + "show_blank_form": { + "$ref": "#/components/schemas/Bool", + "description": "Show `Blank Form` after 5 seconds" + }, + "subheading": { + "$ref": "#/components/schemas/StringOrNull", + "description": "The subheading of the form" + }, + "submit_another_form": { + "$ref": "#/components/schemas/Bool", + "description": "Show `Submit Another Form` button" + }, + "success_msg": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Custom message after the form is successfully submitted" + } + }, + "x-stoplight": { + "id": "gqdmtil2ni0ln" + } + }, + "FormColumn": { + "description": "Model for Form Column", + "examples": [ + { + "id": "fvc_1m9b0aub791d4m", + "description": null, + "fk_column_id": "cl_ah9zavkn25ihyd", + "fk_view_id": "vw_6fqln9vdytdv8q", + "help": "This is a help text", + "label": "Form Label", + "meta": null, + "order": 1, + "required": 0, + "show": 0, + "uuid": null + } + ], + "title": "Form Column Model", + "type": "object", + "x-examples": { + "example-1": { + "_cn": "first_name", + "alias": "first_name", + "created_at": "2022-02-15 12:39:04", + "description": "dsdsdsdsd", + "fk_column_id": "cl_yvyhsl9u81tokc", + "fk_view_id": "vw_s1pf4umdnikoyn", + "help": null, + "id": "fvc_8z1i7t8aswkqxx", + "label": "dsdsds", + "order": 1, + "required": false, + "show": 1, + "enable_scanner": true, + "updated_at": "2022-02-15 12:39:16", + "uuid": null + } + }, + "properties": { + "id": { + "$ref": "#/components/schemas/Id", + "description": "Unique ID" + }, + "description": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Form Column Description (Not in use)" + }, + "fk_column_id": { + "$ref": "#/components/schemas/Id", + "description": "Foreign Key to Column" + }, + "fk_view_id": { + "$ref": "#/components/schemas/Id", + "description": "Foreign Key to View" + }, + "help": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Form Column Help Text" + }, + "label": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Form Column Label" + }, + "meta": { + "$ref": "#/components/schemas/Meta", + "description": "Meta Info" + }, + "order": { + "type": "number", + "description": "The order among all the columns in the form", + "example": 1 + }, + "required": { + "$ref": "#/components/schemas/Bool", + "description": "Is this form column required in submission?" + }, + "show": { + "$ref": "#/components/schemas/Bool", + "description": "Is this column shown in Form?" + }, + "enable_scanner": { + "$ref": "#/components/schemas/Bool", + "description": "Indicates whether the 'Fill by scan' button is visible for this column or not.", + "example": true + }, + "uuid": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Form Column UUID (Not in use)" + } + }, + "x-stoplight": { + "id": "rs2uh5opf10q6" + } + }, + "FormColumnReq": { + "description": "Model for Form Column Request", + "examples": [ + { + "description": null, + "help": "This is a help text", + "label": "Form Label", + "meta": null, + "order": 1, + "required": 0, + "show": 0 + } + ], + "title": "Form Column Request Model", + "type": "object", + "x-examples": { + "example-1": { + "_cn": "first_name", + "alias": "first_name", + "created_at": "2022-02-15 12:39:04", + "description": "dsdsdsdsd", + "fk_column_id": "cl_yvyhsl9u81tokc", + "fk_view_id": "vw_s1pf4umdnikoyn", + "help": null, + "id": "fvc_8z1i7t8aswkqxx", + "label": "dsdsds", + "order": 1, + "required": false, + "show": 1, + "updated_at": "2022-02-15 12:39:16", + "uuid": null + } + }, + "properties": { + "description": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Form Column Description (Not in use)" + }, + "help": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Form Column Help Text" + }, + "label": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Form Column Label" + }, + "meta": { + "$ref": "#/components/schemas/Meta", + "description": "Meta Info" + }, + "order": { + "type": "number", + "description": "The order among all the columns in the form" + }, + "required": { + "$ref": "#/components/schemas/Bool", + "description": "Is this form column required in submission?" + }, + "show": { + "$ref": "#/components/schemas/Bool", + "description": "Is this column shown in Form?" + } + }, + "x-stoplight": { + "id": "a1vgymjna1ose" + } + }, + "Formula": { + "description": "Model for Formula", + "examples": [ + { + "error": "Error Message shows here", + "fk_column_id": "cl_h2micb4jdnmsh1", + "formula": "CONCAT(\"FOO\", {{cl_c5knoi4xs4sfpt}})", + "formula_raw": "CONCAT(\"FOO\", {Title})", + "id": "fm_1lo8wqtvvipdns" + } + ], + "title": "Formula Model", + "type": "object", + "properties": { + "error": { + "description": "Error Message", + "type": "string" + }, + "fk_column_id": { + "$ref": "#/components/schemas/Id", + "description": "Foreign Key to Column" + }, + "formula": { + "description": "Formula with column ID replaced", + "example": "CONCAT(\"FOO\", {{cl_c5knoi4xs4sfpt}})", + "type": "string" + }, + "formula_raw": { + "description": "Original Formula inputted in UI", + "example": "CONCAT(\"FOO\", {Title})", + "type": "string" + }, + "id": { + "$ref": "#/components/schemas/Id", + "description": "Unique ID" + } + }, + "x-stoplight": { + "id": "syn5ameyiipp7" + } + }, + "FormulaColumnReq": { + "description": "Model for Formula Column Request", + "examples": [ + { + "formula": "CONCAT(\"FOO\", {{cl_c5knoi4xs4sfpt}})", + "formula_raw": "CONCAT(\"FOO\", {Title})", + "title": "Formula", + "uidt": "Formula" + } + ], + "title": "Formula Column Request Model", + "type": "object", + "properties": { + "formula": { + "description": "Formula with column ID replaced", + "type": "string" + }, + "formula_raw": { + "description": "Original Formula inputted in UI", + "type": "string" + }, + "title": { + "description": "Formula Title", + "maxLength": 255, + "minLength": 1, + "type": "string" + }, + "uidt": { + "description": "UI Data Type", + "enum": [ + "Formula" + ], + "type": "string" + } + }, + "x-stoplight": { + "id": "tvczns7x7nj73" + } + }, + "Gallery": { + "description": "Model for Gallery", + "examples": [ + { + "alias": "string", + "columns": [ + { + "fk_col_id": "string", + "fk_gallery_id": "string", + "help": "string", + "id": "string", + "label": "string" + } + ], + "cover_image": "string", + "cover_image_idx": 0, + "deleted": true, + "fk_cover_image_col_id": "string", + "fk_model_id": "string", + "fk_view_id": "string", + "lock_type": "collaborative", + "next_enabled": true, + "order": 0, + "prev_enabled": true, + "restrict_number": "string", + "restrict_size": "string", + "restrict_types": "string", + "title": "string" + } + ], + "properties": { + "alias": { + "type": "string" + }, + "columns": { + "items": { + "$ref": "#/components/schemas/GalleryColumn" + }, + "type": "array" + }, + "cover_image": { + "type": "string" + }, + "cover_image_idx": { + "type": "integer" + }, + "deleted": { + "$ref": "#/components/schemas/Bool" + }, + "fk_cover_image_col_id": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Foreign Key to Cover Image Column" + }, + "fk_model_id": { + "type": "string", + "description": "Foreign Key to Model" + }, + "fk_view_id": { + "type": "string", + "description": "Foreign Key to View" + }, + "lock_type": { + "enum": [ + "collaborative", + "locked", + "personal" + ], + "type": "string" + }, + "next_enabled": { + "$ref": "#/components/schemas/Bool" + }, + "order": { + "type": "number", + "description": "Order of Gallery" + }, + "prev_enabled": { + "$ref": "#/components/schemas/Bool" + }, + "restrict_number": { + "type": "string" + }, + "restrict_size": { + "type": "string" + }, + "restrict_types": { + "type": "string" + }, + "title": { + "type": "string" + } + }, + "title": "Gallery Model", + "type": "object", + "x-stoplight": { + "id": "brih3mxjli606" + } + }, + "GalleryColumn": { + "description": "Model for Gallery Column", + "examples": [ + { + "fk_col_id": "string", + "fk_gallery_id": "string", + "help": "string", + "id": "string", + "label": "string" + } + ], + "properties": { + "fk_col_id": { + "type": "string" + }, + "fk_gallery_id": { + "type": "string" + }, + "help": { + "type": "string" + }, + "id": { + "$ref": "#/components/schemas/Id", + "description": "Unique ID" + }, + "label": { + "type": "string" + } + }, + "title": "Gallery Column Model", + "type": "object", + "x-stoplight": { + "id": "auloy6128iwh9" + } + }, + "GalleryUpdateReq": { + "description": "Model for Gallery View Update Request", + "x-stoplight": { + "id": "8o7b279bp9wmg" + }, + "examples": [ + { + "fk_cover_image_col_id": "cl_ib8l4j1kiu1efx", + "meta": null + } + ], + "title": "Gallery View Update Request Model", + "type": "object", + "properties": { + "fk_cover_image_col_id": { + "$ref": "#/components/schemas/StringOrNull", + "description": "The id of the column that contains the cover image" + }, + "meta": { + "$ref": "#/components/schemas/Meta", + "x-stoplight": { + "id": "zhp6jkrr54wuf" + }, + "description": "Meta Info" + } + } + }, + "GeoLocation": { + "description": "Model for Geo Location", + "examples": [ + { + "latitude": 18.52139, + "longitude": 179.87295 + } + ], + "properties": { + "latitude": { + "description": "The latitude of the location", + "example": 18.52139, + "exclusiveMaximum": 90, + "exclusiveMinimum": -90, + "format": "double", + "type": "number" + }, + "longitude": { + "description": "The longitude of the location", + "example": 179.87295, + "exclusiveMaximum": 180, + "exclusiveMinimum": -180, + "format": "double", + "type": "number" + } + }, + "title": "Geo Location Model", + "type": "object", + "x-stoplight": { + "id": "jv0zkileq99er" + } + }, + "Grid": { + "description": "Model for Grid", + "examples": [ + { + "base_id": "p_xm3thidrblw4n7", + "source_id": "ds_g4ccx6e77h1dmi", + "fk_view_id": "vw_p2jcatxz4mvcfw", + "row_height": 1, + "meta": null, + "columns": [ + { + "id": "cl_phvuuwjrzcdo0g", + "source_id": "ds_g4ccx6e77h1dmi", + "base_id": "p_xm3thidrblw4n7", + "fk_model_id": "md_rsu68aqjsbyqtl", + "title": "Id", + "column_name": "id", + "uidt": "ID", + "dt": "int", + "np": "10", + "ns": "0", + "clen": null, + "cop": "1", + "pk": 1, + "pv": null, + "rqd": 1, + "un": 1, + "ct": "int unsigned", + "ai": 1, + "unique": 0, + "cdf": null, + "cc": "", + "csn": null, + "dtx": "specificType", + "dtxp": "", + "dtxs": "0", + "au": 0, + "validate": null, + "virtual": null, + "deleted": null, + "system": 0, + "order": 1, + "created_at": "2023-03-02 17:04:06", + "updated_at": "2023-03-02 17:04:06", + "meta": null + } + ] + } + ], + "title": "Grid Model", + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/Id", + "description": "Unique ID", + "x-stoplight": { + "id": "e3ti3fc0ocjyu" + } + }, + "base_id": { + "$ref": "#/components/schemas/Id", + "description": "Base ID", + "x-stoplight": { + "id": "e3ti3fc0ocjyu" + } + }, + "source_id": { + "$ref": "#/components/schemas/Id", + "description": "Source ID", + "x-stoplight": { + "id": "m8v3iyf1tidy9" + } + }, + "fk_view_id": { + "$ref": "#/components/schemas/Id", + "description": "Foreign Key to View", + "x-stoplight": { + "id": "m8v3iyf1tidy9" + } + }, + "row_height": { + "type": "number", + "example": 1, + "description": "Row Height" + }, + "meta": { + "$ref": "#/components/schemas/Meta", + "x-stoplight": { + "id": "n8cud3jyqw5yv" + }, + "description": "Meta info for Grid Model" + }, + "columns": { + "type": "array", + "x-stoplight": { + "id": "22y0gipx2jdf8" + }, + "description": "Grid View Columns", + "items": { + "$ref": "#/components/schemas/GridColumn", + "x-stoplight": { + "id": "nmzp6w3o6b24u" + } + } + } + }, + "x-stoplight": { + "id": "wlj101286bua3" + } + }, + "Grid - copy": { + "description": "Model for Grid", + "x-stoplight": { + "id": "9hiq0xt18jao0" + }, + "examples": [ + { + "base_id": "p_xm3thidrblw4n7", + "source_id": "ds_g4ccx6e77h1dmi", + "fk_view_id": "vw_p2jcatxz4mvcfw", + "row_height": 1, + "meta": null, + "columns": [ + { + "id": "cl_phvuuwjrzcdo0g", + "source_id": "ds_g4ccx6e77h1dmi", + "base_id": "p_xm3thidrblw4n7", + "fk_model_id": "md_rsu68aqjsbyqtl", + "title": "Id", + "column_name": "id", + "uidt": "ID", + "dt": "int", + "np": "10", + "ns": "0", + "clen": null, + "cop": "1", + "pk": 1, + "pv": null, + "rqd": 1, + "un": 1, + "ct": "int unsigned", + "ai": 1, + "unique": 0, + "cdf": null, + "cc": "", + "csn": null, + "dtx": "specificType", + "dtxp": "", + "dtxs": "0", + "au": 0, + "validate": null, + "virtual": null, + "deleted": null, + "system": 0, + "order": 1, + "created_at": "2023-03-02 17:04:06", + "updated_at": "2023-03-02 17:04:06", + "meta": null + } + ] + } + ], + "title": "Grid Model", + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/Id", + "description": "Unique ID", + "x-stoplight": { + "id": "e3ti3fc0ocjyu" + } + }, + "base_id": { + "$ref": "#/components/schemas/Id", + "description": "Base ID", + "x-stoplight": { + "id": "e3ti3fc0ocjyu" + } + }, + "source_id": { + "$ref": "#/components/schemas/Id", + "description": "Source ID", + "x-stoplight": { + "id": "m8v3iyf1tidy9" + } + }, + "fk_view_id": { + "$ref": "#/components/schemas/Id", + "description": "Foreign Key to View", + "x-stoplight": { + "id": "m8v3iyf1tidy9" + } + }, + "row_height": { + "type": "number", + "example": 1, + "description": "Row Height" + }, + "meta": { + "$ref": "#/components/schemas/Meta", + "x-stoplight": { + "id": "n8cud3jyqw5yv" + }, + "description": "Meta info for Grid Model" + }, + "columns": { + "type": "array", + "x-stoplight": { + "id": "22y0gipx2jdf8" + }, + "description": "Grid View Columns", + "items": { + "$ref": "#/components/schemas/GridColumn", + "x-stoplight": { + "id": "nmzp6w3o6b24u" + } + } + } + } + }, + "GridColumn": { + "description": "Model for Grid Column", + "examples": [ + { + "id": "nc_c8jz4kxe6xvh11", + "fk_view_id": "vw_p2jcatxz4mvcfw", + "fk_column_id": "cl_c5knoi4xs4sfpt", + "base_id": "p_xm3thidrblw4n7", + "source_id": "ds_g4ccx6e77h1dmi", + "show": 0, + "order": 1, + "width": "200px", + "help": null, + "group_by": 0, + "group_by_order": null, + "group_by_sort": null + } + ], + "title": "Grid Column Model", + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/Id", + "description": "Unique ID", + "x-stoplight": { + "id": "jc14yojp52rqj" + } + }, + "fk_view_id": { + "$ref": "#/components/schemas/Id", + "description": "Foreign Key to View", + "x-stoplight": { + "id": "vl18dbt5c2r8r" + } + }, + "fk_column_id": { + "$ref": "#/components/schemas/Id", + "description": "Foreign Key to Column", + "x-stoplight": { + "id": "2drg88fmodf3v" + } + }, + "base_id": { + "$ref": "#/components/schemas/Id", + "description": "Base ID", + "x-stoplight": { + "id": "2drg88fmodf3v" + } + }, + "source_id": { + "$ref": "#/components/schemas/Id", + "description": "Source ID", + "x-stoplight": { + "id": "2drg88fmodf3v" + } + }, + "show": { + "$ref": "#/components/schemas/Bool", + "x-stoplight": { + "id": "d47eer13oa8yr" + } + }, + "order": { + "type": "number", + "x-stoplight": { + "id": "d47eer13oa8yr" + }, + "example": 1, + "description": "Grid Column Order" + }, + "width": { + "type": "string", + "description": "Column Width", + "example": "200px" + }, + "help": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Column Help Text", + "x-stoplight": { + "id": "azwh6zn37qzkc" + } + }, + "group_by": { + "$ref": "#/components/schemas/Bool", + "description": "Group By" + }, + "group_by_order": { + "type": "number", + "description": "Group By Order", + "example": 1 + }, + "group_by_sort": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Group By Sort", + "example": "asc" + } + }, + "x-stoplight": { + "id": "195gzd7s6p7nv" + } + }, + "GridColumnReq": { + "description": "Model for Grid Column Request", + "examples": [ + { + "fk_column_id": "cl_c5knoi4xs4sfpt", + "label": "My Column", + "width": "200px" + } + ], + "properties": { + "fk_column_id": { + "$ref": "#/components/schemas/Id", + "description": "Foreign Key to Column" + }, + "help": { + "maxLength": 255, + "type": "string" + }, + "label": { + "description": "The label of the column", + "example": "My Column", + "maxLength": 255, + "type": "string" + }, + "width": { + "description": "The width of the column", + "example": "200px", + "maxLength": 255, + "pattern": "^[0-9]+(px|%)$", + "type": "string" + }, + "group_by": { + "$ref": "#/components/schemas/Bool", + "description": "Group By" + }, + "group_by_order": { + "type": "number", + "description": "Group By Order", + "example": 1 + }, + "group_by_sort": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Group By Sort", + "example": "asc" + } + }, + "title": "Grid Column Request Model", + "type": "object", + "x-stoplight": { + "id": "9yhalgmix6d0m" + } + }, + "GridUpdateReq": { + "description": "Model for Grid View Update", + "x-stoplight": { + "id": "v0hz01gynll1t" + }, + "examples": [ + { + "row_height": "1", + "meta": null + } + ], + "title": "Grid View Update Model", + "type": "object", + "properties": { + "row_height": { + "type": "number", + "x-stoplight": { + "id": "m5976ax1q13cr" + }, + "description": "Row Height", + "example": 1 + }, + "meta": { + "$ref": "#/components/schemas/Meta", + "x-stoplight": { + "id": "dugbkhe9iupqu" + }, + "description": "Meta Info for grid view" + } + } + }, + "Hook": { + "description": "Model for Hook", + "examples": [ + { + "active": 0, + "async": 0, + "description": "This is my hook description", + "env": "all", + "event": "after", + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "string", + "notification": "{\"type\":\"URL\",\"payload\":{\"method\":\"POST\",\"body\":\"{{ json data }}\",\"headers\":[{}],\"parameters\":[{}],\"auth\":\"\",\"path\":\"http://example.com\"}}", + "null": null, + "operation": "insert", + "retries": 10, + "retry_interval": 60000, + "timeout": 60000, + "title": "My Webhook" + } + ], + "title": "Hook Model", + "type": "object", + "x-stoplight": { + "id": "5jvfnece2nu6w" + }, + "properties": { + "active": { + "$ref": "#/components/schemas/Bool", + "description": "Is the hook active?" + }, + "async": { + "$ref": "#/components/schemas/Bool", + "description": "Is the hook aysnc?" + }, + "description": { + "type": "string", + "description": "Hook Description", + "example": "This is my hook description" + }, + "env": { + "type": "string", + "example": "all", + "description": "Environment for the hook" + }, + "event": { + "enum": [ + "after", + "before" + ], + "type": "string", + "description": "Event Type for the operation", + "example": "after" + }, + "fk_model_id": { + "type": "string", + "description": "Foreign Key to Model", + "example": "md_rsu68aqjsbyqtl" + }, + "id": { + "$ref": "#/components/schemas/Id", + "description": "Unique ID" + }, + "notification": { + "description": "Hook Notification including info such as type, payload, method, body, and etc", + "type": [ + "object", + "string" + ] + }, + "operation": { + "enum": [ + "insert", + "update", + "delete", + "bulkInsert", + "bulkUpdate", + "bulkDelete" + ], + "type": "string", + "description": "Hook Operation", + "example": "insert" + }, + "retries": { + "type": "number", + "description": "Retry Count", + "example": 10 + }, + "retry_interval": { + "type": "number", + "description": "Retry Interval", + "example": 60000 + }, + "timeout": { + "type": "number", + "example": 60000, + "description": "Timeout" + }, + "title": { + "type": "string", + "description": "Hook Title", + "example": "My Webhook" + }, + "type": { + "type": "string", + "description": "Hook Type" + }, + "version": { + "type": "string", + "x-stoplight": { + "id": "socewqvadj91n" + }, + "example": "v2", + "description": "Hook Version", + "enum": [ + "v1", + "v2" + ] + } + } + }, + "HookReq": { + "description": "Model for Hook", + "x-stoplight": { + "id": "btj9o665l08xj" + }, + "examples": [ + { + "active": 0, + "async": 0, + "description": "This is my hook description", + "env": "all", + "event": "after", + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "string", + "notification": "{\"type\":\"URL\",\"payload\":{\"method\":\"POST\",\"body\":\"{{ json data }}\",\"headers\":[{}],\"parameters\":[{}],\"auth\":\"\",\"path\":\"http://example.com\"}}", + "null": null, + "operation": "insert", + "retries": 10, + "retry_interval": 60000, + "timeout": 60000, + "title": "My Webhook", + "condition": false + } + ], + "title": "Hook Request Model", + "type": "object", + "properties": { + "active": { + "$ref": "#/components/schemas/Bool", + "description": "Is the hook active?" + }, + "async": { + "$ref": "#/components/schemas/Bool", + "description": "Is the hook aysnc?" + }, + "description": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Hook Description" + }, + "env": { + "type": "string", + "example": "all", + "description": "Environment for the hook" + }, + "event": { + "enum": [ + "after", + "before" + ], + "type": "string", + "description": "Event Type for the operation", + "example": "after" + }, + "fk_model_id": { + "type": "string", + "description": "Foreign Key to Model", + "example": "md_rsu68aqjsbyqtl" + }, + "id": { + "$ref": "#/components/schemas/Id", + "description": "Unique ID" + }, + "notification": { + "description": "Hook Notification including info such as type, payload, method, body, and etc", + "type": [ + "object", + "string" + ] + }, + "operation": { + "enum": [ + "insert", + "update", + "delete", + "bulkInsert", + "bulkUpdate", + "bulkDelete" + ], + "type": "string", + "description": "Hook Operation", + "example": "insert" + }, + "retries": { + "type": "number", + "description": "Retry Count", + "example": 10 + }, + "retry_interval": { + "type": "number", + "description": "Retry Interval", + "example": 60000 + }, + "timeout": { + "type": "number", + "example": 60000, + "description": "Timeout" + }, + "title": { + "type": "string", + "description": "Hook Title", + "example": "My Webhook" + }, + "type": { + "type": [ + "string", + "null" + ], + "description": "Hook Type" + }, + "condition": { + "$ref": "#/components/schemas/Bool", + "x-stoplight": { + "id": "wwzoum7rrlwun" + }, + "description": "Is this hook assoicated with some filters" + } + }, + "required": [ + "event", + "notification", + "operation", + "title" + ] + }, + "HookList": { + "description": "Model for Hook List", + "examples": [ + { + "list": [ + { + "active": 0, + "async": 0, + "description": "This is my hook description", + "env": "all", + "event": "after", + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "string", + "notification": "{\"type\":\"URL\",\"payload\":{\"method\":\"POST\",\"body\":\"{{ json data }}\",\"headers\":[{}],\"parameters\":[{}],\"auth\":\"\",\"path\":\"http://example.com\"}}", + "null": null, + "operation": "insert", + "retries": 10, + "retry_interval": 60000, + "timeout": 60000, + "title": "My Webhook" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + ], + "title": "Hook List Model", + "type": "object", + "x-examples": { + "example-1": { + "sources": { + "list": [ + { + "alias": "string", + "database": "string", + "host": "string", + "id": "string", + "params": "string", + "password": "string", + "port": 0, + "base_id": "string", + "ssl": "string", + "type": "string", + "url": "string", + "username": "string" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "pageSize": 0, + "sort": "string", + "totalRows": 0 + } + } + } + }, + "properties": { + "list": { + "minItems": 1, + "type": "array", + "uniqueItems": true, + "description": "List of hook objects", + "items": { + "$ref": "#/components/schemas/Hook" + } + }, + "pageInfo": { + "$ref": "#/components/schemas/Paginated" + } + }, + "required": [ + "list", + "pageInfo" + ], + "x-stoplight": { + "id": "oza9z6dpygn29" + } + }, + "HookLog": { + "description": "Model for Hook Log", + "examples": [ + { + "source_id": "ds_jxuewivwbxeum2", + "event": "after", + "execution_time": "98", + "fk_hook_id": "hk_035ijv5qdi97y5", + "id": "string", + "notifications": "{\"type\":\"URL\",\"payload\":{\"method\":\"POST\",\"body\":\"{{ json data }}\",\"headers\":[{}],\"parameters\":[{}],\"auth\":\"\",\"path\":\"https://webhook.site/6eb45ce5-b611-4be1-8b96-c2965755662b\"}}", + "operation": "insert", + "payload": "{\"method\":\"POST\",\"body\":\"{{ json data }}\",\"headers\":[{}],\"parameters\":[{}],\"auth\":\"\",\"path\":\"https://webhook.site/6eb45ce5-b611-4be1-8b96-c2965755662b\"}", + "base_id": "p_tbhl1hnycvhe5l", + "response": "{\"status\":200,\"statusText\":\"OK\",\"headers\":{\"server\":\"nginx\",\"content-type\":\"text/plain; charset=UTF-8\",\"transfer-encoding\":\"chunked\",\"connection\":\"close\",\"vary\":\"Accept-Encoding\",\"x-request-id\":\"53844a7d-ede8-4798-adf7-8af441908a72\",\"x-token-id\":\"6eb45ce5-b611-4be1-8b96-c2965755662b\",\"cache-control\":\"no-cache, private\",\"date\":\"Fri, 24 Mar 2023 10:50:10 GMT\"},\"config\":{\"url\":\"https://webhook.site/6eb45ce5-b611-4be1-8b96-c2965755662b\",\"method\":\"post\",\"data\":\"{\\\"type\\\":\\\"records.after.insert\\\",\\\"id\\\":\\\"a77d97dc-a3e4-4719-9b46-45f93e0cc99a\\\",\\\"data\\\":{\\\"table_id\\\":\\\"md_d8v403o74mf5lf\\\",\\\"table_name\\\":\\\"Sheet-2\\\"}}\",\"headers\":{\"Accept\":\"application/json, text/plain, */*\",\"Content-Type\":\"application/x-www-form-urlencoded\",\"User-Agent\":\"axios/0.21.4\",\"Content-Length\":138},\"params\":{}}}", + "test_call": 0, + "triggered_by": "w@nocodb.com", + "type": "URL" + } + ], + "title": "Hook Log Model", + "type": "object", + "x-stoplight": { + "id": "alkb2a68ewbpz" + }, + "properties": { + "source_id": { + "type": "string", + "description": "Unique Source ID", + "example": "ds_jxuewivwbxeum2" + }, + "conditions": { + "type": "string", + "description": "Hook Conditions" + }, + "error": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Error" + }, + "error_code": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Error Code" + }, + "error_message": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Error Message" + }, + "event": { + "type": "string", + "description": "Hook Event", + "example": "after", + "enum": [ + "after", + "before" + ] + }, + "execution_time": { + "type": "string", + "description": "Execution Time in milliseconds", + "example": "98" + }, + "fk_hook_id": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Foreign Key to Hook" + }, + "id": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Unique ID" + }, + "notifications": { + "type": "string", + "description": "Hook Notification" + }, + "operation": { + "type": "string", + "description": "Hook Operation", + "enum": [ + "insert", + "update", + "delete", + "bulkInsert", + "bulkUpdate", + "bulkDelete" + ], + "example": "insert" + }, + "payload": { + "type": "string", + "description": "Hook Payload", + "example": "{\"method\":\"POST\",\"body\":\"{{ json data }}\",\"headers\":[{}],\"parameters\":[{}],\"auth\":\"\",\"path\":\"https://webhook.site/6eb45ce5-b611-4be1-8b96-c2965755662b\"}" + }, + "base_id": { + "type": "string", + "description": "Base ID", + "example": "p_tbhl1hnycvhe5l" + }, + "response": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Hook Response" + }, + "test_call": { + "$ref": "#/components/schemas/Bool", + "description": "Is this testing hook call?" + }, + "triggered_by": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Who triggered the hook?" + }, + "type": { + "type": "string", + "example": "URL", + "description": "Hook Type" + } + } + }, + "HookLogList": { + "description": "Model for Hook Log List", + "x-stoplight": { + "id": "ck3ymtqepbl7e" + }, + "examples": [], + "title": "Hook Log List Model", + "type": "object", + "x-examples": { + "example-1": { + "sources": { + "list": [ + { + "alias": "string", + "database": "string", + "host": "string", + "id": "string", + "params": "string", + "password": "string", + "port": 0, + "base_id": "string", + "ssl": "string", + "type": "string", + "url": "string", + "username": "string" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "pageSize": 0, + "sort": "string", + "totalRows": 0 + } + } + } + }, + "properties": { + "list": { + "minItems": 1, + "type": "array", + "uniqueItems": true, + "description": "List of hook objects", + "items": { + "$ref": "#/components/schemas/HookLog" + } + }, + "pageInfo": { + "$ref": "#/components/schemas/Paginated" + } + }, + "required": [ + "list", + "pageInfo" + ] + }, + "HookTestReq": { + "description": "Model for Hook Test Request", + "examples": [ + { + "hook": { + "active": 0, + "async": 0, + "description": "This is my hook description", + "env": "all", + "event": "after", + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "string", + "notification": "{\"type\":\"URL\",\"payload\":{\"method\":\"POST\",\"body\":\"{{ json data }}\",\"headers\":[{}],\"parameters\":[{}],\"auth\":\"\",\"path\":\"http://example.com\"}}", + "null": null, + "operation": "insert", + "retries": 10, + "retry_interval": 60000, + "timeout": 60000, + "title": "My Webhook" + }, + "payload": { + "data": { + "Id": 1, + "Title": "Sample Text", + "CreatedAt": "2023-03-03T10:03:06.484Z", + "UpdatedAt": "2023-03-03T10:03:06.484Z", + "attachment": [ + { + "url": "https://nocodb.com/dummy.png", + "title": "image.png", + "mimetype": "image/png", + "size": 0 + } + ], + "f": "Sample Output" + } + } + } + ], + "title": "Hook Test Request Model", + "type": "object", + "properties": { + "hook": { + "$ref": "#/components/schemas/HookReq" + }, + "payload": { + "description": "Payload to be sent" + } + }, + "required": [ + "hook", + "payload" + ], + "x-stoplight": { + "id": "fmxwekzyi46za" + } + }, + "Id": { + "description": "Model for ID", + "examples": [ + "string" + ], + "maxLength": 20, + "minLength": 0, + "title": "ID Model", + "type": "string", + "x-stoplight": { + "id": "upw7it13u2dkn" + } + }, + "Kanban": { + "description": "Model for Kanban", + "examples": [ + { + "id": "vw_wqs4zheuo5lgdy", + "fk_grp_col_id": "cl_3704cxcbqt7sj7", + "fk_view_id": "vw_wqs4zheuo5lgdy", + "fk_cover_image_col_id": null, + "columns": [ + { + "id": "kvc_2skkg5mi1eb37f", + "fk_column_id": "cl_hzos4ghyncqi4k", + "fk_view_id": "vw_wqs4zheuo5lgdy", + "source_id": "ds_hd4ojj0xpquaam", + "base_id": "p_kzfl5lb0t3tcok", + "title": "string", + "show": 0, + "order": "1" + } + ], + "meta": null, + "title": "My Kanban" + } + ], + "title": "Kanban Model", + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/Id", + "description": "Unique ID" + }, + "fk_grp_col_id": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Grouping Field Column ID" + }, + "fk_view_id": { + "$ref": "#/components/schemas/Id", + "x-stoplight": { + "id": "1kgw1w06b97nl" + }, + "description": "View ID" + }, + "fk_cover_image_col_id": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Cover Image Column ID" + }, + "columns": { + "type": "array", + "description": "Kanban Columns", + "items": { + "$ref": "#/components/schemas/KanbanColumn" + } + }, + "meta": { + "$ref": "#/components/schemas/Meta", + "description": "Meta Info for Kanban" + }, + "title": { + "type": "string", + "description": "Kanban Title", + "example": "My Kanban" + } + }, + "x-stoplight": { + "id": "gu721t0zw7jqq" + } + }, + "KanbanColumn": { + "description": "Model for Kanban Column", + "examples": [ + { + "id": "kvc_2skkg5mi1eb37f", + "fk_column_id": "cl_hzos4ghyncqi4k", + "fk_view_id": "vw_wqs4zheuo5lgdy", + "source_id": "ds_hd4ojj0xpquaam", + "base_id": "p_kzfl5lb0t3tcok", + "title": "string", + "show": 0, + "order": "1" + } + ], + "title": "Kanban Column Model", + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/Id", + "description": "Unique ID" + }, + "fk_column_id": { + "$ref": "#/components/schemas/Id", + "description": "Foreign Key to Column" + }, + "fk_view_id": { + "$ref": "#/components/schemas/Id", + "x-stoplight": { + "id": "t1fy4zy561ih8" + }, + "description": "Foreign Key to View" + }, + "source_id": { + "$ref": "#/components/schemas/Id", + "x-stoplight": { + "id": "uqq8xmyz97t1u" + }, + "description": "Baes ID\n" + }, + "base_id": { + "$ref": "#/components/schemas/Id", + "x-stoplight": { + "id": "uqq8xmyz97t1u" + }, + "description": "Base ID" + }, + "title": { + "x-stoplight": { + "id": "uqq8xmyz97t1u" + }, + "description": "Base ID", + "type": "string" + }, + "show": { + "$ref": "#/components/schemas/Bool", + "x-stoplight": { + "id": "uqq8xmyz97t1u" + }, + "description": "Is this column shown?" + }, + "order": { + "type": "number", + "x-stoplight": { + "id": "pbnchzgci5dwa" + }, + "example": 1, + "description": "Column Order" + } + }, + "x-stoplight": { + "id": "psbv6c6y9qvbu" + } + }, + "KanbanUpdateReq": { + "description": "Model for Kanban Update Request", + "examples": [ + { + "fk_grp_col_id": "cl_g0a89q9xdry3lu", + "fk_cover_image_col_id": "cl_ib8l4j1kiu1efx", + "meta": { + "cl_g0a89q9xdry3lu": [ + { + "id": "uncategorized", + "title": null, + "order": 0, + "color": "#c2f5e8", + "collapsed": false + }, + { + "id": "sl_ihyva6jx6dg0fc", + "fk_column_id": "cl_g0a89q9xdry3lu", + "title": "a", + "color": "#cfdffe", + "order": 1, + "collapsed": false + }, + { + "id": "sl_gqdm5v6t8aetoa", + "fk_column_id": "cl_g0a89q9xdry3lu", + "title": "b", + "color": "#d0f1fd", + "order": 2, + "collapsed": false + }, + { + "id": "sl_eipnl0kn7a9d3c", + "fk_column_id": "cl_g0a89q9xdry3lu", + "title": "cc", + "color": "#c2f5e8", + "order": 3, + "collapsed": false + }, + { + "id": "sl_dei8p2jq0cnlv0", + "fk_column_id": "cl_g0a89q9xdry3lu", + "title": "d", + "color": "#ffdaf6", + "order": 4, + "collapsed": false + } + ] + } + } + ], + "title": "Kanban Update Request Model", + "type": "object", + "properties": { + "fk_grp_col_id": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Foreign Key to Grouping Field Column" + }, + "fk_cover_image_col_id": { + "$ref": "#/components/schemas/StringOrNull", + "x-stoplight": { + "id": "81wn4hzj76wod" + }, + "description": "Foreign Key to Cover Image Column" + }, + "meta": { + "$ref": "#/components/schemas/Meta", + "x-stoplight": { + "id": "stsvdmkli1b0r" + }, + "description": "Meta Info" + } + }, + "x-stoplight": { + "id": "9zirjgj9k1gqa" + } + }, + "LicenseReq": { + "description": "Model for Kanban Request", + "examples": [ + { + "key": "1234567890" + } + ], + "properties": { + "key": { + "description": "The license key", + "example": "1234567890", + "maxLength": 255, + "type": "string" + } + }, + "title": "License Key Request Model", + "type": "object", + "x-stoplight": { + "id": "4vo9hms4s6uie" + } + }, + "LinkToAnotherColumnReq": { + "description": "Model for LinkToAnotherColumn Request", + "examples": [ + { + "childId": "string", + "parentId": "string", + "title": "string", + "type": "hm", + "uidt": "LinkToAnotherRecord", + "virtual": true + } + ], + "properties": { + "childId": { + "$ref": "#/components/schemas/Id", + "description": "Foreign Key to chhild column" + }, + "parentId": { + "$ref": "#/components/schemas/Id", + "description": "Foreign Key to parent column" + }, + "title": { + "maxLength": 255, + "minLength": 1, + "type": "string", + "description": "The title of the virtual column" + }, + "type": { + "enum": [ + "bt", + "hm", + "mm" + ], + "type": "string", + "description": "The type of the relationship" + }, + "uidt": { + "enum": [ + "LinkToAnotherRecord", + "Links" + ], + "type": "string", + "description": "Abstract type of the relationship" + }, + "virtual": { + "$ref": "#/components/schemas/Bool", + "description": "Is this relationship virtual?" + } + }, + "required": [ + "childId", + "parentId", + "title", + "type", + "uidt" + ], + "title": "LinkToAnotherColumn Request Model", + "type": "object", + "x-stoplight": { + "id": "ke4urwgcmt83x" + } + }, + "LinkToAnotherRecord": { + "description": "Model for LinkToAnotherRecord", + "examples": [ + { + "deleted": "string", + "dr": "string", + "fk_child_column_id": "string", + "fk_column_id": "string", + "fk_index_name": "string", + "fk_mm_child_column_id": "string", + "fk_mm_model_id": "string", + "fk_mm_parent_column_id": "string", + "fk_parent_column_id": "string", + "fk_related_model_id": "string", + "id": "string", + "order": "string", + "type": "string", + "ur": "string", + "virtual": true + } + ], + "properties": { + "deleted": { + "type": "string" + }, + "dr": { + "type": "string" + }, + "fk_child_column_id": { + "type": "string" + }, + "fk_column_id": { + "$ref": "#/components/schemas/Id", + "description": "Foreign Key to Column" + }, + "fk_index_name": { + "type": "string" + }, + "fk_mm_child_column_id": { + "type": "string" + }, + "fk_mm_model_id": { + "type": "string" + }, + "fk_mm_parent_column_id": { + "type": "string" + }, + "fk_parent_column_id": { + "type": "string" + }, + "fk_related_model_id": { + "type": "string" + }, + "id": { + "$ref": "#/components/schemas/Id", + "description": "Unique ID" + }, + "order": { + "type": "string" + }, + "type": { + "type": "string" + }, + "ur": { + "type": "string" + }, + "virtual": { + "$ref": "#/components/schemas/Bool" + } + }, + "title": "LinkToAnotherRecord Model", + "type": "object", + "x-stoplight": { + "id": "tcn1muyj67810" + } + }, + "Lookup": { + "description": "Model for Lookup", + "examples": [ + { + "id": "lk_mngsu0e45njbxr", + "fk_column_id": "cl_vdiy9bz7h11kdm", + "fk_relation_column_id": "cl_5jestblzneb649", + "fk_lookup_column_id": "cl_4cm47dtjphgqkv", + "order": 1 + } + ], + "title": "Lookup Model", + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/Id", + "description": "Unique ID" + }, + "fk_column_id": { + "$ref": "#/components/schemas/Id", + "description": "Foreign Key to Column" + }, + "fk_lookup_column_id": { + "$ref": "#/components/schemas/Id", + "description": "Foreign Key to Lookup Column" + }, + "fk_relation_column_id": { + "$ref": "#/components/schemas/Id", + "description": "Foreign Key to Relation Column" + }, + "order": { + "type": "number", + "description": "The order among the list", + "example": 1 + } + }, + "x-stoplight": { + "id": "53ff6kxwlgjrb" + } + }, + "LookupColumnReq": { + "description": "Model for Lookup Column Request", + "examples": [ + { + "fk_relation_column_id": "cl_5jestblzneb649", + "fk_lookup_column_id": "cl_4cm47dtjphgqkv", + "title": "My Lookup", + "uidt": "Lookup" + } + ], + "title": "Lookup Column Request Model", + "type": "object", + "properties": { + "fk_lookup_column_id": { + "$ref": "#/components/schemas/Id", + "description": "Foreign Key to Lookup Column" + }, + "fk_relation_column_id": { + "$ref": "#/components/schemas/Id", + "description": "Foreign Key to Relation Column" + }, + "title": { + "maxLength": 255, + "type": "string", + "description": "Lookup Title", + "example": "My Lookup" + }, + "uidt": { + "enum": [ + "Lookup" + ], + "type": "string", + "description": "UI DataType" + } + }, + "x-stoplight": { + "id": "rmmtwpsofeqo5" + } + }, + "Map": { + "description": "Model for Map", + "examples": [ + { + "source_id": "ds_g4ccx6e77h1dmi", + "columns": [ + { + "source_id": "ds_g4ccx6e77h1dmi", + "fk_column_id": "cl_8iw2o4ejzvdyna", + "fk_view_id": "vw_qjt7klod1p9kyv", + "id": "nc_46xcacqn4rc9xf", + "order": 1, + "base_id": "p_xm3thidrblw4n7", + "show": 1 + } + ], + "fk_geo_data_col_id": "cl_8iw2o4ejzvdyna", + "fk_view_id": "vw_qjt7klod1p9kyv", + "meta": {}, + "order": 0, + "base_id": "p_xm3thidrblw4n7", + "show": true, + "title": "My Map" + } + ], + "properties": { + "source_id": { + "description": "The ID of the source that this view belongs to", + "example": "ds_g4ccx6e77h1dmi", + "type": "string" + }, + "columns": { + "description": "Columns in this view", + "items": { + "$ref": "#/components/schemas/MapColumn" + }, + "type": "array" + }, + "fk_geo_data_col_id": { + "description": "Foreign Key to GeoData Column", + "example": "cl_8iw2o4ejzvdyna", + "type": "string" + }, + "fk_view_id": { + "description": "Unique ID for Map", + "example": "vw_qjt7klod1p9kyv", + "type": "string" + }, + "meta": { + "$ref": "#/components/schemas/Meta", + "description": "Meta data for this view" + }, + "order": { + "description": "The order of the map list", + "type": "number" + }, + "base_id": { + "description": "The ID of the base that this view belongs to", + "example": "p_xm3thidrblw4n7", + "type": "string" + }, + "show": { + "description": "To show this Map or not", + "type": "boolean" + }, + "title": { + "description": "Title of Map View", + "example": "My Map", + "type": "string" + } + }, + "title": "Map Model", + "type": "object", + "x-stoplight": { + "id": "bg6hvpyk90f0p" + } + }, + "MapUpdateReq": { + "description": "Model for Map", + "x-stoplight": { + "id": "2me98w8ot1e6o" + }, + "examples": [ + { + "fk_geo_data_col_id": "cl_8iw2o4ejzvdyna", + "meta": null + } + ], + "title": "Map View Update Request Model", + "type": "object", + "properties": { + "fk_geo_data_col_id": { + "description": "Foreign Key to GeoData Column", + "example": "cl_8iw2o4ejzvdyna", + "type": "string" + }, + "meta": { + "$ref": "#/components/schemas/Meta", + "description": "Meta data for this view" + } + } + }, + "MapColumn": { + "description": "Model for Map Column", + "examples": [ + { + "source_id": "ds_g4ccx6e77h1dmi", + "fk_column_id": "cl_8iw2o4ejzvdyna", + "fk_view_id": "vw_qjt7klod1p9kyv", + "id": "nc_46xcacqn4rc9xf", + "order": 1, + "base_id": "p_xm3thidrblw4n7", + "show": 1 + } + ], + "properties": { + "source_id": { + "description": "The ID of the source that this map column belongs to", + "example": "ds_g4ccx6e77h1dmi", + "type": "string" + }, + "fk_column_id": { + "description": "Foreign Key to Column", + "example": "cl_8iw2o4ejzvdyna", + "type": "string" + }, + "fk_view_id": { + "description": "Foreign Key to View", + "example": "vw_qjt7klod1p9kyv", + "type": "string" + }, + "id": { + "description": "Unique ID of Map Column", + "example": "nc_46xcacqn4rc9xf", + "type": "string" + }, + "order": { + "description": "the order in the list of map columns", + "example": 1, + "type": "number" + }, + "base_id": { + "description": "The ID of the base that this map column belongs to", + "example": "p_xm3thidrblw4n7", + "type": "string" + }, + "show": { + "description": "Whether to show this column or not", + "example": 1, + "type": "number" + } + }, + "title": "Map Column Model", + "type": "object", + "x-stoplight": { + "id": "01nfqgzhqlqoe" + } + }, + "Meta": { + "description": "Model for Meta", + "examples": [ + {} + ], + "oneOf": [ + { + "type": "null" + }, + { + "type": "object" + }, + { + "type": "string" + } + ], + "title": "Meta Model", + "x-stoplight": { + "id": "daskjldw4zldd" + } + }, + "ModelRoleVisibility": { + "description": "Model for ModelRoleVisibility", + "examples": [ + { + "source_id": "string", + "disabled": true, + "fk_model_id": "string", + "fk_view_id": "string", + "id": "string", + "base_id": "string", + "role": "string" + } + ], + "properties": { + "source_id": { + "type": "string" + }, + "disabled": { + "$ref": "#/components/schemas/Bool" + }, + "fk_model_id": { + "type": "string" + }, + "fk_view_id": { + "type": "string" + }, + "id": { + "$ref": "#/components/schemas/Id", + "description": "Unique ID" + }, + "base_id": { + "type": "string" + }, + "role": { + "type": "string" + } + }, + "title": "ModelRoleVisibility Model", + "type": "object", + "x-stoplight": { + "id": "cxh7walcnpkn0" + } + }, + "NormalColumnRequest": { + "description": "Model for Normal Column Request", + "examples": [ + { + "ai": true, + "au": true, + "cc": "string", + "cdf": "string", + "column_name": "string", + "csn": "string", + "dt": "string", + "dtx": "string", + "dtxp": 0, + "dtxs": 0, + "np": 0, + "ns": 0, + "pk": true, + "pv": true, + "rqd": true, + "title": "string", + "uidt": "ID", + "un": true, + "unique": true + } + ], + "properties": { + "ai": { + "$ref": "#/components/schemas/Bool", + "description": "Is this column auto-incremented?" + }, + "au": { + "$ref": "#/components/schemas/Bool", + "description": "Is this column auto-updated datetime field?" + }, + "cc": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Column Comment" + }, + "cdf": { + "$ref": "#/components/schemas/StringOrNullOrBooleanOrNumber", + "description": "Column Default Value" + }, + "column_name": { + "maxLength": 255, + "minLength": 1, + "type": "string", + "description": "Column Name" + }, + "csn": { + "$ref": "#/components/schemas/StringOrNull" + }, + "dt": { + "type": "string", + "description": "Data Type" + }, + "dtx": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Data Type Extra" + }, + "dtxp": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } + ], + "description": "Data Type Extra Precision" + }, + "dtxs": { + "oneOf": [ + { + "$ref": "#/components/schemas/StringOrNull" + }, + { + "type": "number" + } + ], + "description": "Data Type Extra Scale" + }, + "np": { + "oneOf": [ + { + "$ref": "#/components/schemas/StringOrNull" + }, + { + "type": "integer" + } + ], + "description": "Numeric Precision" + }, + "ns": { + "oneOf": [ + { + "$ref": "#/components/schemas/StringOrNull" + }, + { + "type": "integer" + } + ], + "description": "Numeric Scale" + }, + "pk": { + "$ref": "#/components/schemas/Bool", + "description": "Is this column a primary key?" + }, + "pv": { + "$ref": "#/components/schemas/Bool", + "description": "Is this column a primary value?" + }, + "rqd": { + "$ref": "#/components/schemas/Bool", + "description": "Is this column required?" + }, + "title": { + "maxLength": 255, + "type": "string", + "description": "Column Title" + }, + "uidt": { + "enum": [ + "Attachment", + "AutoNumber", + "Barcode", + "Button", + "Checkbox", + "Collaborator", + "Count", + "CreateTime", + "Currency", + "Date", + "DateTime", + "Decimal", + "Duration", + "Email", + "Formula", + "ForeignKey", + "GeoData", + "Geometry", + "ID", + "JSON", + "LastModifiedTime", + "LongText", + "LinkToAnotherRecord", + "Lookup", + "MultiSelect", + "Number", + "Percent", + "PhoneNumber", + "Rating", + "Rollup", + "SingleLineText", + "SingleSelect", + "SpecificDBType", + "Time", + "URL", + "Year", + "QrCode", + "Links" + ], + "type": "string", + "description": "UI Data Type" + }, + "un": { + "$ref": "#/components/schemas/Bool", + "description": "Is this column unique?" + }, + "unique": { + "$ref": "#/components/schemas/Bool", + "description": "Is this column unique?" + } + }, + "title": "Normal Column Request Model", + "type": "object", + "required": [ + "column_name" + ], + "x-stoplight": { + "id": "fn3gqmojvswv2" + } + }, + "OrgUserReq": { + "description": "Model for Organisation User Update Request", + "examples": [ + { + "email": "user@example.com", + "roles": "org-level-creator" + } + ], + "properties": { + "email": { + "format": "email", + "type": "string" + }, + "roles": { + "enum": [ + "org-level-creator", + "org-level-viewer" + ], + "type": "string", + "description": "Roles for the base user" + } + }, + "title": "Organisation User Request Model", + "type": "object", + "x-stoplight": { + "id": "n484boi6jv3up" + } + }, + "Paginated": { + "description": "Model for Paginated", + "examples": [ + { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + ], + "properties": { + "isFirstPage": { + "description": "Is the current page the first page", + "type": "boolean" + }, + "isLastPage": { + "description": "Is the current page the last page", + "type": "boolean" + }, + "page": { + "description": "The current page", + "example": 1, + "type": "number" + }, + "pageSize": { + "description": "The number of pages", + "example": 10, + "type": "number" + }, + "totalRows": { + "description": "The number of rows in the given result", + "example": 1, + "type": "number" + } + }, + "title": "Paginated Model", + "type": "object", + "x-stoplight": { + "id": "2x65v3n9xo8q3" + } + }, + "Password": { + "description": "Model for Password", + "example": "password123456789", + "examples": [ + "password123456789" + ], + "minLength": 8, + "title": "Password Model", + "type": "string", + "x-stoplight": { + "id": "s7gk265anpyc7" + } + }, + "PasswordChangeReq": { + "description": "Model for Password Change Request", + "examples": [ + { + "currentPassword": "currentpassword", + "newPassword": "newpassword" + } + ], + "properties": { + "currentPassword": { + "type": "string" + }, + "newPassword": { + "minLength": 8, + "type": "string" + } + }, + "required": [ + "currentPassword", + "newPassword" + ], + "title": "Password Change Request Model", + "type": "object", + "x-stoplight": { + "id": "wvritsht82jyy" + } + }, + "PasswordForgotReq": { + "description": "Model for Password Forgot Request", + "examples": [ + { + "email": "user@example.com" + } + ], + "properties": { + "email": { + "description": "Email address of the user", + "format": "email", + "type": "string" + } + }, + "required": [ + "email" + ], + "title": "Password Forgot Request Model", + "type": "object", + "x-stoplight": { + "id": "qj6pb0nc6dtb1" + } + }, + "PasswordResetReq": { + "description": "Model for Password Reset Request", + "examples": [ + { + "password": "newpassword" + } + ], + "properties": { + "password": { + "description": "New password", + "example": "newpassword", + "minLength": 8, + "type": "string" + } + }, + "required": [ + "password" + ], + "title": "Password Reset Request Model", + "type": "object", + "x-stoplight": { + "id": "24ig9uh9evw2p" + } + }, + "Plugin": { + "description": "Model for Plugin", + "examples": [ + { + "id": "nc_tljibbzcyjrhcc", + "title": "S3", + "description": "Amazon Simple Storage Service (Amazon S3) is an object storage service that offers industry-leading scalability, data availability, security, and performance.", + "active": true, + "rating": null, + "version": "0.0.1", + "docs": null, + "status": "install", + "status_details": null, + "logo": "plugins/s3.png", + "icon": null, + "tags": "Storage", + "category": "Storage", + "input_schema": "{\"title\":\"Configure Amazon S3\",\"items\":[{\"key\":\"bucket\",\"label\":\"Bucket Name\",\"placeholder\":\"Bucket Name\",\"type\":\"SingleLineText\",\"required\":true},{\"key\":\"region\",\"label\":\"Region\",\"placeholder\":\"Region\",\"type\":\"SingleLineText\",\"required\":true},{\"key\":\"access_key\",\"label\":\"Access Key\",\"placeholder\":\"Access Key\",\"type\":\"SingleLineText\",\"required\":true},{\"key\":\"access_secret\",\"label\":\"Access Secret\",\"placeholder\":\"Access Secret\",\"type\":\"Password\",\"required\":true}],\"actions\":[{\"label\":\"Test\",\"placeholder\":\"Test\",\"key\":\"test\",\"actionType\":\"TEST\",\"type\":\"Button\"},{\"label\":\"Save\",\"placeholder\":\"Save\",\"key\":\"save\",\"actionType\":\"SUBMIT\",\"type\":\"Button\"}],\"msgOnInstall\":\"Successfully installed and attachment will be stored in AWS S3\",\"msgOnUninstall\":\"\"}", + "input": "{\"bucket\":\"my-bucket\",\"region\":\"us-west-004\",\"access_key\":\"redacted\",\"access_secret\":\"redacted\"}", + "creator": null, + "creator_website": null, + "price": null + } + ], + "title": "Plugin Model", + "type": "object", + "properties": { + "active": { + "$ref": "#/components/schemas/Bool", + "description": "Is plguin active?" + }, + "category": { + "type": "string", + "description": "Plugin Category", + "example": "Storage" + }, + "creator": { + "type": "string", + "description": "Plugin Creator (Not in use)" + }, + "creator_website": { + "type": "string", + "description": "Plugin Creator website (Not in use)" + }, + "description": { + "type": "string", + "description": "Plugin Description", + "example": "Amazon Simple Storage Service (Amazon S3) is an object storage service that offers industry-leading scalability, data availability, security, and performance." + }, + "docs": { + "type": "string", + "description": "Documentation of plugin (Not in use)" + }, + "icon": { + "type": "string", + "description": "Plugin Icon (Not in use)" + }, + "id": { + "$ref": "#/components/schemas/Id", + "description": "Unique ID" + }, + "input": { + "oneOf": [ + { + "$ref": "#/components/schemas/StringOrNull" + }, + { + "type": "integer" + } + ], + "description": "Plugin Input" + }, + "input_schema": { + "type": "string", + "description": "Plugin Input Schema\n" + }, + "logo": { + "type": "string", + "description": "Plugin logo", + "example": "plugins/s3.png" + }, + "price": { + "type": "string", + "description": "Plugin Price (Not in use)" + }, + "rating": { + "type": "number", + "description": "Plugin Rating (Not in use)" + }, + "status": { + "type": "string", + "description": "Plugin Status", + "example": "install" + }, + "status_details": { + "type": "string", + "description": "Not in use" + }, + "tags": { + "type": "string", + "description": "Plugin tags", + "example": "Storage" + }, + "title": { + "type": "string", + "description": "Plugin Title" + }, + "version": { + "type": "string", + "description": "Plugin Version", + "example": "0.0.1" + } + }, + "x-stoplight": { + "id": "xxoy0oe5kab93" + } + }, + "PluginReq": { + "description": "Model for Plugin Request", + "examples": [ + { + "active": 0, + "input": "{\"bucket\":\"my-bucket\",\"region\":\"us-west-004\",\"access_key\":\"redacted\",\"access_secret\":\"redacted\"}" + } + ], + "title": "Plugin Reqeust", + "type": "object", + "x-stoplight": { + "id": "qcriv4xl88hyu" + }, + "properties": { + "active": { + "$ref": "#/components/schemas/Bool", + "description": "Is Plugin Active?" + }, + "input": { + "description": "Plugin Input", + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + } + }, + "PluginTestReq": { + "description": "Model for Plugin Test Request", + "examples": [ + { + "title": "Plugin Foo", + "input": "{\"bucket\":\"my-bucket\",\"region\":\"us-west-004\",\"access_key\":\"redacted\",\"access_secret\":\"redacted\"}", + "category": "Email" + } + ], + "title": "Plugin Test Request Model", + "type": "object", + "properties": { + "title": { + "maxLength": 45, + "type": "string", + "description": "Plugin Title" + }, + "input": { + "oneOf": [ + { + "type": "string", + "description": "Plugin Input as JSON string" + }, + { + "description": "Plugin Input", + "type": "object" + } + ] + }, + "category": { + "x-stoplight": { + "id": "rg3i3ov9rs6d0" + }, + "type": "string", + "example": "Email" + } + }, + "required": [ + "title", + "input", + "category" + ], + "x-stoplight": { + "id": "zrvjtpfx9wc54" + } + }, + "Base": { + "description": "Model for Base", + "examples": [ + { + "sources": [ + { + "alias": "string", + "config": null, + "enabled": true, + "id": "string", + "inflection_column": "camelize", + "inflection_table": "camelize", + "is_meta": true, + "order": 1, + "base_id": "string", + "type": "mysql2", + "updated_at": "2023-03-01 14:27:36" + } + ], + "color": "#24716E", + "created_at": "2023-03-01 14:27:36", + "deleted": true, + "description": "This is my base description", + "id": "p_124hhlkbeasewh", + "is_meta": true, + "meta": {}, + "order": 0, + "prefix": "nc_vm5q__", + "status": "string", + "title": "my-base" + } + ], + "title": "Base Model", + "type": "object", + "properties": { + "sources": { + "description": "List of source models", + "type": "array", + "items": { + "$ref": "#/components/schemas/Source" + } + }, + "color": { + "description": "Primary Theme Color", + "example": "#24716E", + "type": "string" + }, + "deleted": { + "$ref": "#/components/schemas/Bool", + "description": "Is the base deleted" + }, + "description": { + "description": "Base Description", + "example": "This is my base description", + "type": "string" + }, + "id": { + "description": "Unique Base ID", + "example": "p_124hhlkbeasewh", + "type": "string" + }, + "is_meta": { + "$ref": "#/components/schemas/Bool" + }, + "meta": { + "$ref": "#/components/schemas/Meta", + "description": "Meta Info such as theme colors" + }, + "order": { + "description": "The order in base list", + "type": "number" + }, + "prefix": { + "description": "Base prefix. Used in XCDB only.", + "example": "nc_vm5q__", + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "database", + "documentation", + "dashboard" + ] + }, + "linked_db_projects": { + "description": "List of linked Database Projects that this base has access to (only used in Dashboard bases so far)", + "type": "array", + "items": { + "$ref": "#/components/schemas/Base" + } + }, + "status": { + "type": "string" + }, + "title": { + "description": "Base Title", + "example": "my-base", + "type": "string" + } + }, + "x-stoplight": { + "id": "t8uouhop01ndi" + } + }, + "ProjectList": { + "description": "Model for Base List", + "examples": [ + { + "list": [ + { + "sources": [ + { + "alias": "string", + "config": null, + "created_at": "2023-03-01 14:27:36", + "enabled": true, + "id": "string", + "inflection_column": "camelize", + "inflection_table": "camelize", + "is_meta": true, + "order": 1, + "base_id": "string", + "type": "mysql2", + "updated_at": "2023-03-01 14:27:36" + } + ], + "color": "#24716E", + "created_at": "2023-03-01 14:27:36", + "deleted": true, + "description": "This is my base description", + "id": "p_124hhlkbeasewh", + "is_meta": true, + "meta": {}, + "order": 0, + "prefix": "nc_vm5q__", + "status": "string", + "title": "my-base", + "updated_at": "2023-03-01 14:27:36" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + ], + "title": "Base List Model", + "type": "object", + "x-examples": { + "example-1": { + "sources": { + "list": [ + { + "alias": "string", + "database": "string", + "host": "string", + "id": "string", + "params": "string", + "password": "string", + "port": 0, + "base_id": "string", + "ssl": "string", + "type": "string", + "url": "string", + "username": "string" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "pageSize": 0, + "sort": "string", + "totalRows": 0 + } + } + } + }, + "properties": { + "list": { + "description": "List of Base Models", + "minItems": 1, + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/components/schemas/Base" + } + }, + "pageInfo": { + "$ref": "#/components/schemas/Paginated", + "description": "Pagination Info" + } + }, + "required": [ + "list", + "pageInfo" + ], + "x-stoplight": { + "id": "fr75wwwzt951h" + } + }, + "ProjectReq": { + "description": "Model for Base Request", + "examples": [ + { + "sources": [ + { + "alias": "My Source", + "config": null, + "inflection_column": "camelize", + "inflection_table": "camelize", + "is_meta": true, + "type": "mysql" + } + ], + "color": "#24716E", + "description": "This is my base description", + "title": "My Base" + } + ], + "properties": { + "sources": { + "description": "Array of Bases", + "items": { + "$ref": "#/components/schemas/BaseReq" + }, + "type": "array" + }, + "color": { + "description": "Primary Theme Color", + "example": "#24716E", + "maxLength": 50, + "type": "string" + }, + "description": { + "description": "Base Description", + "example": "This is my base description", + "type": "string" + }, + "title": { + "description": "Base Title", + "example": "My Base", + "maxLength": 128, + "minLength": 1, + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Base Status", + "example": "locked" + }, + "type": { + "type": "string", + "enum": [ + "database", + "documentation", + "dashboard" + ] + }, + "linked_db_project_ids": { + "description": "List of Linked Database Base IDs (only used for Dashboard Projects so far)", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "title" + ], + "title": "Base Request Model", + "type": "object", + "x-stoplight": { + "id": "f5k929rrvfy92" + } + }, + "ProjectUpdateReq": { + "description": "Model for Base Update Request", + "x-stoplight": { + "id": "0fq3a94qjgb5f" + }, + "examples": [ + { + "color": "#24716E", + "meta": null, + "title": "My Base" + } + ], + "title": "Base Update Request Model", + "type": "object", + "properties": { + "color": { + "description": "Primary Theme Color", + "example": "#24716E", + "maxLength": 50, + "type": "string" + }, + "meta": { + "$ref": "#/components/schemas/Meta", + "description": "Base Meta", + "x-stoplight": { + "id": "m05w9sbwqgul3" + } + }, + "title": { + "description": "Base Title", + "example": "My Base", + "maxLength": 128, + "minLength": 1, + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Base Status", + "example": "locked" + }, + "linked_db_project_ids": { + "description": "List of Linked Database Base IDs (only used for Dashboard Projects so far)", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ProjectUserReq": { + "description": "Model for Base User Request", + "examples": [ + { + "email": "user@example.com", + "roles": "owner" + } + ], + "title": "Base User Request Model", + "type": "object", + "properties": { + "email": { + "format": "email", + "type": "string", + "description": "Base User Email" + }, + "roles": { + "enum": [ + "no-access", + "commenter", + "editor", + "guest", + "owner", + "viewer", + "creator" + ], + "type": "string", + "description": "Base User Role" + } + }, + "required": [ + "email", + "roles" + ], + "x-stoplight": { + "id": "3bvgqk9tn16ur" + } + }, + "ProjectUserMetaReq": { + "description": "Model for Base User Meta Request", + "examples": [ + { + "starred": true, + "order": 1, + "hidden": true + } + ], + "title": "Base User Meta Request Model", + "type": "object", + "properties": { + "starred": { + "$ref": "#/components/schemas/Bool", + "description": "Star Base" + }, + "order": { + "type": "number", + "description": "The order among the bases", + "example": 1 + }, + "hidden": { + "$ref": "#/components/schemas/Bool" + } + } + }, + "Rollup": { + "description": "Model for Rollup", + "examples": [ + { + "id": "rl_kc19pbdkij8wly", + "fk_column_id": "cl_588b63mneri2yi", + "fk_relation_column_id": "cl_c09q6eu6hsvn4s", + "fk_rollup_column_id": "cl_m62i1vyl23n8co", + "rollup_function": "count" + } + ], + "title": "Rollup Model", + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/Id", + "description": "Unique ID" + }, + "fk_column_id": { + "$ref": "#/components/schemas/Id", + "description": "Foreign Key to Column" + }, + "fk_relation_column_id": { + "$ref": "#/components/schemas/Id", + "description": "Foreign to Relation Column" + }, + "fk_rollup_column_id": { + "$ref": "#/components/schemas/Id", + "description": "Foreign to Rollup Column" + }, + "rollup_function": { + "type": "string", + "description": "Rollup Function", + "example": "count", + "enum": [ + "count", + "min", + "max", + "avg", + "countDistinct", + "sumDistinct", + "avgDistinct" + ] + } + }, + "x-stoplight": { + "id": "imknmkksc8bqk" + } + }, + "RollupColumnReq": { + "description": "Model for Rollup Column Request", + "examples": [ + { + "fk_relation_column_id": "cl_c09q6eu6hsvn4s", + "fk_rollup_column_id": "cl_m62i1vyl23n8co", + "title": "Rollup Column", + "rollup_function": "avg", + "uidt": "Rollup" + } + ], + "title": "Rollup Column Request Model", + "type": "object", + "properties": { + "fk_relation_column_id": { + "$ref": "#/components/schemas/Id", + "description": "Foreign Key to Relation Column" + }, + "fk_rollup_column_id": { + "$ref": "#/components/schemas/Id", + "description": "Foreign Key to Rollup Column" + }, + "title": { + "maxLength": 255, + "type": "string", + "description": "Rollup Column Title" + }, + "rollup_function": { + "enum": [ + "avg", + "avgDistinct", + "count", + "countDistinct", + "max", + "min", + "sum", + "sumDistinct" + ], + "type": "string", + "description": "Rollup Function" + }, + "uidt": { + "enum": [ + "Rollup" + ], + "type": "string", + "description": "UI DataType" + } + }, + "x-stoplight": { + "id": "ayjjv1pfxmvlv" + } + }, + "SelectOption": { + "description": "Model for SelectOption", + "examples": [ + { + "id": "sl_hvfeuagqtlzzbk", + "title": "Option A", + "fk_column_id": "cl_35zmvi2tezfipw", + "color": "#cfdffe", + "order": 1 + } + ], + "title": "SelectOption Model", + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/Id", + "description": "Unique ID" + }, + "title": { + "type": "string", + "description": "Option Title\n", + "example": "Option A" + }, + "fk_column_id": { + "$ref": "#/components/schemas/Id", + "description": "Foreign Key to Column" + }, + "color": { + "type": "string", + "description": "Option Color", + "example": "#cfdffe" + }, + "order": { + "type": "number", + "description": "The order among the options", + "example": 1 + } + }, + "x-stoplight": { + "id": "y9gglydcl3zjr" + } + }, + "SelectOptions": { + "description": "Model for SelectOptions", + "examples": [ + { + "options": [ + { + "id": "sl_hvfeuagqtlzzbk", + "title": "Option A", + "fk_column_id": "cl_35zmvi2tezfipw", + "color": "#cfdffe", + "order": 1 + } + ] + } + ], + "title": "SelectOptions Model", + "type": "object", + "properties": { + "options": { + "type": "array", + "description": "Array of select options", + "items": { + "$ref": "#/components/schemas/SelectOption" + } + } + }, + "required": [ + "options" + ], + "x-stoplight": { + "id": "3rx8jyy2ufbc3" + } + }, + "SharedBaseReq": { + "description": "Model for Shared Base Request", + "examples": [ + { + "password": "password123", + "roles": "editor" + } + ], + "title": "Shared Base Request Model", + "type": "object", + "properties": { + "password": { + "minLength": 8, + "type": "string", + "description": "Password to protect the base", + "example": "password123" + }, + "roles": { + "enum": [ + "commenter", + "editor", + "viewer" + ], + "type": "string", + "description": "The role given the target user", + "example": "editor" + } + }, + "x-stoplight": { + "id": "4jvab8fa8ibxv" + } + }, + "SharedView": { + "$ref": "#/components/schemas/View", + "description": "Model for Shared View", + "title": "SharedView", + "examples": [ + { + "source_id": "ds_g4ccx6e77h1dmi", + "created_at": "2023-03-02 17:46:31", + "fk_model_id": "md_mhs9z4r2ak98x0", + "id": "vw_lg052cnc1c26kf", + "is_default": 1, + "lock_type": "collaborative", + "meta": {}, + "order": 1, + "password": null, + "base_id": "p_xm3thidrblw4n7", + "show": 1, + "show_system_fields": null, + "title": "Sheet-1", + "type": 3, + "updated_at": "2023-03-02 17:46:31", + "uuid": null, + "view": { + "source_id": "ds_g4ccx6e77h1dmi", + "created_at": "2023-03-02 17:46:31", + "fk_view_id": "vw_lg052cnc1c26kf", + "meta": null, + "base_id": "p_xm3thidrblw4n7", + "row_height": null, + "updated_at": "2023-03-02 17:46:31", + "uuid": null + } + } + ], + "x-stoplight": { + "id": "gagdto3i3c0fb" + } + }, + "SharedViewList": { + "description": "Model for Shared View List", + "examples": [ + { + "list": [ + { + "source_id": "ds_g4ccx6e77h1dmi", + "created_at": "2023-03-02 17:46:31", + "fk_model_id": "md_mhs9z4r2ak98x0", + "id": "vw_lg052cnc1c26kf", + "is_default": 1, + "lock_type": "collaborative", + "meta": {}, + "order": 1, + "password": null, + "base_id": "p_xm3thidrblw4n7", + "show": 1, + "show_system_fields": null, + "title": "Sheet-1", + "type": 3, + "updated_at": "2023-03-02 17:46:31", + "uuid": null, + "view": { + "source_id": "ds_g4ccx6e77h1dmi", + "created_at": "2023-03-02 17:46:31", + "fk_view_id": "vw_lg052cnc1c26kf", + "meta": null, + "base_id": "p_xm3thidrblw4n7", + "row_height": null, + "updated_at": "2023-03-02 17:46:31", + "uuid": null + } + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + ], + "title": "Shared View List Model", + "type": "object", + "x-examples": { + "example-1": { + "sources": { + "list": [ + { + "alias": "string", + "database": "string", + "host": "string", + "id": "string", + "params": "string", + "password": "string", + "port": 0, + "base_id": "string", + "ssl": "string", + "type": "string", + "url": "string", + "username": "string" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "pageSize": 0, + "sort": "string", + "totalRows": 0 + } + } + } + }, + "properties": { + "list": { + "minItems": 1, + "type": "array", + "uniqueItems": true, + "description": "List of shared view objects", + "items": { + "$ref": "#/components/schemas/SharedView" + } + }, + "pageInfo": { + "$ref": "#/components/schemas/Paginated", + "description": "Paginated Info" + } + }, + "required": [ + "list", + "pageInfo" + ], + "x-stoplight": { + "id": "5gnbbmgal3om3" + } + }, + "SharedViewReq": { + "description": "Model for Shared View Request", + "examples": [ + { + "meta": {}, + "password": "123456789" + } + ], + "title": "Shared View Request Model", + "type": "object", + "properties": { + "meta": { + "$ref": "#/components/schemas/Meta", + "description": "Meta data passing to Shared View such as if download is allowed or not." + }, + "password": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Password to restrict access" + } + }, + "x-stoplight": { + "id": "hbj6j87gyi7ap" + } + }, + "SignInReq": { + "description": "Model for Signin Request", + "examples": [ + { + "email": "user@example.com", + "password": "string" + } + ], + "properties": { + "email": { + "description": "Email address of the user", + "format": "email", + "type": "string" + }, + "password": { + "description": "Password of the user", + "type": "string" + } + }, + "required": [ + "email", + "password" + ], + "title": "Signin Request Model", + "type": "object", + "x-stoplight": { + "id": "efb2gvnypydy9" + } + }, + "SignUpReq": { + "description": "Model for Signup Request", + "examples": [ + { + "email": "user@example.com", + "password": "password123456789", + "firstname": "Alice", + "lastname": "Smith", + "token": null, + "ignore_subscribe": 0 + } + ], + "title": "Signup Request Model", + "type": "object", + "properties": { + "email": { + "description": "Email address of the user", + "example": "user@example.com", + "format": "email", + "type": "string" + }, + "password": { + "description": "Password of the user", + "example": "password123456789", + "minLength": 8, + "type": "string" + }, + "firstname": { + "$ref": "#/components/schemas/StringOrNull", + "x-stoplight": { + "id": "lblivgs8wcsm1" + } + }, + "lastname": { + "$ref": "#/components/schemas/StringOrNull", + "x-stoplight": { + "id": "d4341r35tucq3" + } + }, + "token": { + "$ref": "#/components/schemas/StringOrNull", + "x-stoplight": { + "id": "otw9jgnr9n7c4" + }, + "description": "Sign Up Token. Used for invitation." + }, + "ignore_subscribe": { + "$ref": "#/components/schemas/Bool", + "x-stoplight": { + "id": "g7ge6mc6vdsds" + }, + "description": "Ignore Subscription" + } + }, + "required": [ + "email", + "password" + ], + "x-stoplight": { + "id": "6ia1chyii9w48" + } + }, + "Sort": { + "description": "Model for Sort", + "examples": [ + { + "id": "so_xd4t51uv60ghzl", + "fk_column_id": "cl_l11b769pe2j1ce", + "fk_model_id": "md_ehn5izr99m7d45", + "source_id": "ds_3l9qx8xqksenrl", + "direction": "desc", + "order": 1, + "base_id": "p_9sx43moxhqtjm3" + } + ], + "title": "Sort Model", + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/Id", + "description": "Unique ID" + }, + "fk_column_id": { + "$ref": "#/components/schemas/Id" + }, + "fk_model_id": { + "$ref": "#/components/schemas/Id" + }, + "source_id": { + "type": "string", + "description": "Source ID", + "example": "ds_3l9qx8xqksenrl", + "readOnly": true + }, + "direction": { + "type": "string", + "description": "Sort direction", + "enum": [ + "asc", + "desc" + ], + "example": "desc" + }, + "order": { + "type": "number", + "example": 1 + }, + "base_id": { + "type": "string", + "description": "Base ID", + "example": "p_9sx43moxhqtjm3", + "readOnly": true + } + }, + "x-stoplight": { + "id": "25fm97zsmwf6h" + } + }, + "SortList": { + "description": "Model for Sort List", + "examples": [ + { + "list": [ + { + "id": "so_xd4t51uv60ghzl", + "fk_column_id": "cl_l11b769pe2j1ce", + "fk_model_id": "md_ehn5izr99m7d45", + "source_id": "ds_3l9qx8xqksenrl", + "direction": "desc", + "order": 1, + "base_id": "p_9sx43moxhqtjm3" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + ], + "title": "Sort List Model", + "type": "object", + "x-examples": { + "example-1": { + "sources": { + "list": [ + { + "alias": "string", + "database": "string", + "host": "string", + "id": "string", + "params": "string", + "password": "string", + "port": 0, + "base_id": "string", + "ssl": "string", + "type": "string", + "url": "string", + "username": "string" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "pageSize": 0, + "sort": "string", + "totalRows": 0 + } + } + } + }, + "properties": { + "list": { + "type": "array", + "x-stoplight": { + "id": "gjqqc8ciqg947" + }, + "description": "List of Sort Objects", + "items": { + "$ref": "#/components/schemas/Sort", + "x-stoplight": { + "id": "usnfa1kbovpmb" + } + } + }, + "pageInfo": { + "$ref": "#/components/schemas/Paginated", + "x-stoplight": { + "id": "i75wcejfp5mnq" + } + } + }, + "required": [ + "list", + "pageInfo" + ], + "x-stoplight": { + "id": "us9qfo1go142f" + } + }, + "SortReq": { + "description": "Model for Sort Request", + "examples": [ + { + "direction": "asc", + "fk_column_id": "cl_l11b769pe2j1ce" + } + ], + "minProperties": 1, + "title": "Sort Request Model", + "type": "object", + "properties": { + "fk_column_id": { + "$ref": "#/components/schemas/Id", + "description": "Foreign Key to Column" + }, + "direction": { + "description": "Sort direction", + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + "x-stoplight": { + "id": "8v8qzwm3w4v11" + } + }, + "StringOrNull": { + "description": "Model for StringOrNull", + "examples": [ + "string" + ], + "oneOf": [ + { + "maxLength": 255, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "StringOrNull Model", + "x-stoplight": { + "id": "p1g7xrgdsn540" + } + }, + "StringOrNullOrBooleanOrNumber": { + "description": "Model for StringOrNullOrBooleanOrNumber", + "examples": [ + "string" + ], + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ], + "title": "StringOrNullOrBooleanOrNumber Model" + }, + "Table": { + "description": "Model for Table", + "examples": [ + { + "source_id": "ds_g4ccx6e77h1dmi", + "columns": [ + { + "ai": 0, + "au": 0, + "source_id": "ds_g4ccx6e77h1dmi", + "cc": "", + "cdf": "CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP", + "clen": null, + "column_name": "updated_at", + "cop": "4", + "created_at": "2023-03-02 17:04:06", + "csn": null, + "ct": "timestamp", + "deleted": null, + "dt": "timestamp", + "dtx": "specificType", + "dtxp": "0", + "dtxs": null, + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "cl_m4wkaqgqqjzoeh", + "meta": null, + "np": null, + "ns": null, + "order": 4, + "pk": 0, + "base_id": "p_xm3thidrblw4n7", + "pv": null, + "rqd": 0, + "system": 0, + "title": "UpdatedAt", + "uidt": "DateTime", + "un": 0, + "unique": 0, + "updated_at": "2023-03-02 17:04:06", + "validate": null, + "virtual": null + }, + { + "ai": 0, + "au": 0, + "source_id": "ds_g4ccx6e77h1dmi", + "cc": "", + "cdf": "CURRENT_TIMESTAMP", + "clen": null, + "column_name": "created_at", + "cop": "3", + "created_at": "2023-03-02 17:04:06", + "csn": null, + "ct": "timestamp", + "deleted": null, + "dt": "timestamp", + "dtx": "specificType", + "dtxp": "0", + "dtxs": null, + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "cl_jpl0qu4gj4rexq", + "meta": null, + "np": null, + "ns": null, + "order": 3, + "pk": 0, + "base_id": "p_xm3thidrblw4n7", + "pv": null, + "rqd": 0, + "system": 0, + "title": "CreatedAt", + "uidt": "DateTime", + "un": 0, + "unique": 0, + "updated_at": "2023-03-02 17:04:06", + "validate": null, + "virtual": null + }, + { + "ai": 0, + "au": 0, + "source_id": "ds_g4ccx6e77h1dmi", + "cc": "", + "cdf": null, + "clen": "45", + "column_name": "title", + "cop": "2", + "created_at": "2023-03-02 17:04:06", + "csn": "utf8mb4", + "ct": "varchar(45)", + "deleted": null, + "dt": "varchar", + "dtx": "specificType", + "dtxp": "45", + "dtxs": null, + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "cl_c5knoi4xs4sfpt", + "meta": null, + "np": null, + "ns": null, + "order": 2, + "pk": 0, + "base_id": "p_xm3thidrblw4n7", + "pv": 1, + "rqd": 0, + "system": 0, + "title": "Title", + "uidt": "SingleLineText", + "un": 0, + "unique": 0, + "updated_at": "2023-03-02 17:04:06", + "validate": null, + "virtual": null + }, + { + "ai": 1, + "au": 0, + "source_id": "ds_g4ccx6e77h1dmi", + "cc": "", + "cdf": null, + "clen": null, + "column_name": "id", + "cop": "1", + "created_at": "2023-03-02 17:04:06", + "csn": null, + "ct": "int unsigned", + "deleted": null, + "dt": "int", + "dtx": "specificType", + "dtxp": "", + "dtxs": "0", + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "cl_phvuuwjrzcdo0g", + "meta": null, + "np": "10", + "ns": "0", + "order": 1, + "pk": 1, + "base_id": "p_xm3thidrblw4n7", + "pv": null, + "rqd": 1, + "system": 0, + "title": "Id", + "uidt": "ID", + "un": 1, + "unique": 0, + "updated_at": "2023-03-02 17:04:06", + "validate": null, + "virtual": null + } + ], + "columnsById": { + "cl_c5knoi4xs4sfpt": { + "ai": 0, + "au": 0, + "source_id": "ds_g4ccx6e77h1dmi", + "cc": "", + "cdf": null, + "clen": "45", + "column_name": "title", + "cop": "2", + "created_at": "2023-03-02 17:04:06", + "csn": "utf8mb4", + "ct": "varchar(45)", + "deleted": null, + "dt": "varchar", + "dtx": "specificType", + "dtxp": "45", + "dtxs": null, + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "cl_c5knoi4xs4sfpt", + "meta": null, + "np": null, + "ns": null, + "order": 2, + "pk": 0, + "base_id": "p_xm3thidrblw4n7", + "pv": 1, + "rqd": 0, + "system": 0, + "title": "Title", + "uidt": "SingleLineText", + "un": 0, + "unique": 0, + "updated_at": "2023-03-02 17:04:06", + "validate": null, + "virtual": null + }, + "cl_jpl0qu4gj4rexq": { + "ai": 0, + "au": 0, + "source_id": "ds_g4ccx6e77h1dmi", + "cc": "", + "cdf": "CURRENT_TIMESTAMP", + "clen": null, + "column_name": "created_at", + "cop": "3", + "created_at": "2023-03-02 17:04:06", + "csn": null, + "ct": "timestamp", + "deleted": null, + "dt": "timestamp", + "dtx": "specificType", + "dtxp": "0", + "dtxs": null, + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "cl_jpl0qu4gj4rexq", + "meta": null, + "np": null, + "ns": null, + "order": 3, + "pk": 0, + "base_id": "p_xm3thidrblw4n7", + "pv": null, + "rqd": 0, + "system": 0, + "title": "CreatedAt", + "uidt": "DateTime", + "un": 0, + "unique": 0, + "updated_at": "2023-03-02 17:04:06", + "validate": null, + "virtual": null + }, + "cl_m4wkaqgqqjzoeh": { + "ai": 0, + "au": 0, + "source_id": "ds_g4ccx6e77h1dmi", + "cc": "", + "cdf": "CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP", + "clen": null, + "column_name": "updated_at", + "cop": "4", + "created_at": "2023-03-02 17:04:06", + "csn": null, + "ct": "timestamp", + "deleted": null, + "dt": "timestamp", + "dtx": "specificType", + "dtxp": "0", + "dtxs": null, + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "cl_m4wkaqgqqjzoeh", + "meta": null, + "np": null, + "ns": null, + "order": 4, + "pk": 0, + "base_id": "p_xm3thidrblw4n7", + "pv": null, + "rqd": 0, + "system": 0, + "title": "UpdatedAt", + "uidt": "DateTime", + "un": 0, + "unique": 0, + "updated_at": "2023-03-02 17:04:06", + "validate": null, + "virtual": null + }, + "cl_phvuuwjrzcdo0g": { + "ai": 1, + "au": 0, + "source_id": "ds_g4ccx6e77h1dmi", + "cc": "", + "cdf": null, + "clen": null, + "column_name": "id", + "cop": "1", + "created_at": "2023-03-02 17:04:06", + "csn": null, + "ct": "int unsigned", + "deleted": null, + "dt": "int", + "dtx": "specificType", + "dtxp": "", + "dtxs": "0", + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "cl_phvuuwjrzcdo0g", + "meta": null, + "np": "10", + "ns": "0", + "order": 1, + "pk": 1, + "base_id": "p_xm3thidrblw4n7", + "pv": null, + "rqd": 1, + "system": 0, + "title": "Id", + "uidt": "ID", + "un": 1, + "unique": 0, + "updated_at": "2023-03-02 17:04:06", + "validate": null, + "virtual": null + } + }, + "created_at": "2023-03-02 17:04:06", + "deleted": null, + "enabled": 1, + "id": "md_rsu68aqjsbyqtl", + "meta": null, + "mm": 0, + "order": 1, + "pinned": null, + "base_id": "p_xm3thidrblw4n7", + "schema": null, + "table_name": "nc_vm5q___Table1", + "tags": null, + "title": "Table1", + "type": "table", + "updated_at": "2023-03-02 17:04:08", + "views": [ + { + "_ptn": "Table1", + "_tn": "Table1", + "source_id": "ds_g4ccx6e77h1dmi", + "created_at": "2023-03-02 17:04:06", + "disabled": { + "commenter": false, + "creator": false, + "editor": false, + "guest": false, + "owner": false, + "viewer": false + }, + "fk_model_id": "md_rsu68aqjsbyqtl", + "id": "vw_p2jcatxz4mvcfw", + "is_default": 1, + "lock_type": "collaborative", + "meta": {}, + "order": 1, + "password": null, + "base_id": "p_xm3thidrblw4n7", + "ptn": "nc_vm5q___Table1", + "ptype": "table", + "show": 1, + "show_system_fields": null, + "table_meta": null, + "title": "Table1", + "tn": "Table1", + "type": 3, + "updated_at": "2023-03-02 17:04:06", + "uuid": null, + "view": { + "source_id": "ds_g4ccx6e77h1dmi", + "created_at": "2023-03-02 17:04:06", + "fk_view_id": "vw_p2jcatxz4mvcfw", + "meta": null, + "base_id": "p_xm3thidrblw4n7", + "row_height": null, + "updated_at": "2023-03-02 17:04:06", + "uuid": null + } + } + ] + } + ], + "title": "Table Model", + "type": "object", + "properties": { + "source_id": { + "description": "Unique Source ID", + "type": "string" + }, + "columns": { + "description": "The columns included in this table", + "type": "array", + "items": { + "$ref": "#/components/schemas/Column" + } + }, + "columnsById": { + "description": "Column Models grouped by IDs", + "type": "object" + }, + "deleted": { + "$ref": "#/components/schemas/Bool" + }, + "enabled": { + "$ref": "#/components/schemas/Bool", + "description": "Is this table enabled?" + }, + "id": { + "description": "Unique Table ID", + "type": "string" + }, + "meta": { + "$ref": "#/components/schemas/Meta", + "description": "Meta Data" + }, + "mm": { + "$ref": "#/components/schemas/Bool", + "description": "Is this table used for M2M" + }, + "order": { + "description": "The order of the list of tables", + "type": "number" + }, + "pinned": { + "$ref": "#/components/schemas/Bool", + "description": "Currently not in use" + }, + "base_id": { + "description": "Unique Base ID", + "type": "string" + }, + "table_name": { + "description": "Table Name. Prefix will be added for XCDB bases.", + "type": "string" + }, + "tags": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Currently not in use" + }, + "title": { + "description": "Table Title", + "type": "string" + }, + "type": { + "description": "Table Type", + "type": "string" + } + }, + "required": [ + "table_name", + "title" + ], + "x-stoplight": { + "id": "dkfoyjcny5am9" + } + }, + "TableList": { + "description": "Model for Table List", + "examples": [ + { + "list": [ + { + "alias": "string", + "source_id": "string", + "column": [ + { + "alias": "string", + "auto_increment": true, + "auto_update_timestamp": true, + "source_id": "string", + "character_maximum_length": "string", + "character_set_name": "string", + "colOptions": { + "deleted": "string", + "dr": "string", + "fk_child_column_id": "string", + "fk_column_id": "string", + "fk_index_name": "string", + "fk_mm_child_column_id": "string", + "fk_mm_model_id": "string", + "fk_mm_parent_column_id": "string", + "fk_parent_column_id": "string", + "id": "string", + "order": "string", + "type": "string", + "ur": "string", + "virtual": true + }, + "column_comment": "string", + "column_default": "string", + "column_ordinal_position": "string", + "column_type": "string", + "data_type": "string", + "data_type_x": "string", + "data_type_x_precision": "string", + "data_type_x_scale": "string", + "deleted": true, + "fk_model_id": "string", + "id": "string", + "numeric_precision": "string", + "numeric_scale": "string", + "order": 0, + "primary_key": true, + "primary_value": true, + "rqd": "string", + "title": "string", + "ui_data_type": "string", + "un": "string", + "unique": true, + "visible": true + } + ], + "columnByIds": {}, + "deleted": true, + "enabled": true, + "id": "string", + "order": 0, + "parent_id": "string", + "pinned": true, + "base_id": "string", + "show_as": "string", + "tags": "string", + "title": "string", + "type": "string" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + ], + "title": "Table List Model", + "type": "object", + "x-examples": { + "example-1": { + "sources": { + "list": [ + { + "alias": "string", + "database": "string", + "host": "string", + "id": "string", + "params": "string", + "password": "string", + "port": 0, + "base_id": "string", + "ssl": "string", + "type": "string", + "url": "string", + "username": "string" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "pageSize": 0, + "sort": "string", + "totalRows": 0 + } + } + } + }, + "properties": { + "list": { + "minItems": 1, + "type": "array", + "uniqueItems": true, + "description": "List of table objects", + "items": { + "$ref": "#/components/schemas/Table" + } + }, + "pageInfo": { + "$ref": "#/components/schemas/Paginated", + "description": "Paginated Info" + } + }, + "required": [ + "list", + "pageInfo" + ], + "x-stoplight": { + "id": "urwk2euatlkjl" + } + }, + "TableReq": { + "description": "Model for Table Request", + "examples": [ + { + "columns": [ + { + "ai": false, + "altered": 1, + "cdf": "CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP", + "ck": false, + "clen": 45, + "column_name": "updated_at", + "ct": "varchar(45)", + "dt": "timestamp", + "dtx": "specificType", + "dtxp": "", + "dtxs": "", + "np": null, + "nrqd": true, + "ns": null, + "pk": false, + "rqd": false, + "title": "UpdatedAt", + "uicn": "", + "uidt": "DateTime", + "uip": "", + "un": false + }, + { + "ai": false, + "altered": 1, + "cdf": "CURRENT_TIMESTAMP", + "ck": false, + "clen": 45, + "column_name": "created_at", + "ct": "varchar(45)", + "dt": "timestamp", + "dtx": "specificType", + "dtxp": "", + "dtxs": "", + "np": null, + "nrqd": true, + "ns": null, + "pk": false, + "rqd": false, + "title": "CreatedAt", + "uicn": "", + "uidt": "DateTime", + "uip": "", + "un": false + }, + { + "ai": false, + "altered": 1, + "cdf": null, + "ck": false, + "clen": 45, + "column_name": "title", + "ct": "varchar(45)", + "dt": "varchar", + "dtx": "specificType", + "dtxp": "45", + "dtxs": "", + "np": null, + "nrqd": true, + "ns": null, + "pk": false, + "rqd": false, + "title": "Title", + "uicn": "", + "uidt": "SingleLineText", + "uip": "", + "un": false + }, + { + "ai": true, + "altered": 1, + "cdf": null, + "ck": false, + "clen": null, + "column_name": "id", + "ct": "int(11)", + "dt": "int", + "dtx": "integer", + "dtxp": "11", + "dtxs": "", + "np": 11, + "nrqd": false, + "ns": 0, + "pk": true, + "rqd": true, + "title": "Id", + "uicn": "", + "uidt": "ID", + "uip": "", + "un": true + } + ], + "table_name": "Sheet-1", + "title": "Sheet-1" + } + ], + "properties": { + "columns": { + "description": "The column models in this table", + "items": { + "$ref": "#/components/schemas/NormalColumnRequest" + }, + "type": "array" + }, + "meta": { + "$ref": "#/components/schemas/Meta", + "description": "the meta data for this table" + }, + "order": { + "description": "The order of table list", + "example": 1, + "type": "number" + }, + "table_name": { + "description": "Table name", + "example": "my_table", + "maxLength": 255, + "minLength": 1, + "type": "string" + }, + "title": { + "description": "Table title", + "example": "My Table", + "maxLength": 255, + "minLength": 0, + "type": "string" + } + }, + "required": [ + "columns", + "table_name" + ], + "title": "Table Request Model", + "type": "object", + "x-stoplight": { + "id": "sv3junrrevn31" + } + }, + "User": { + "description": "Model for User", + "examples": [ + { + "id": "142", + "user_name": "jaysmith", + "display_name": "Jay Smith", + "email": "jay.smith@gmail.com", + "emailVerified": true, + "roles": "org-level-creator,super", + "bio": "foo", + "location": "Istanbul", + "created_at": "2019-08-24", + "avatar": "https://dummyimage.com/300.png" + } + ], + "title": "User Model", + "type": "object", + "x-internal": false, + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the given user." + }, + "email": { + "type": "string", + "format": "email" + }, + "roles": { + "type": "string" + }, + "email_verified": { + "type": "boolean", + "description": "Set to true if the user's email has been verified." + }, + "created_at": { + "type": "string", + "format": "date", + "description": "The date that the user was created." + }, + "updated_at": { + "type": "string", + "format": "date", + "description": "The date that the user was created." + }, + "display_name": { + "type": "string" + }, + "user_name": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "location": { + "type": "string" + }, + "website": { + "type": "string" + }, + "avatar": { + "type": "string" + }, + "token_version": { + "description": "Access token version", + "type": "string" + } + }, + "required": [ + "id", + "email", + "email_verified" + ], + "x-stoplight": { + "id": "hcruzlenrwb2x" + } + }, + "UserInfo": { + "description": "Model for User Info", + "examples": [ + { + "email": "user@example.com", + "email_verified": true, + "firstname": "string", + "id": "string", + "lastname": "string", + "roles": null + } + ], + "properties": { + "email": { + "description": "User Email", + "format": "email", + "type": "string" + }, + "email_verified": { + "description": "Set to true if the user's email has been verified.", + "type": "boolean" + }, + "firstname": { + "description": "The firstname of the user", + "type": "string" + }, + "id": { + "description": "User ID", + "type": "string" + }, + "lastname": { + "description": "The lastname of the user", + "type": "string" + }, + "roles": { + "description": "The roles of the user" + }, + "base_roles": { + "description": "The base roles of the user" + }, + "workspace_roles": { + "description": "The workspace roles of the user" + } + }, + "title": "User Info Model", + "type": "object", + "x-stoplight": { + "id": "mzqg7tcf4hglo" + } + }, + "UserList": { + "description": "Model for User List", + "examples": [ + { + "list": [ + { + "email": "user@example.com", + "email_verified": true, + "firstname": "Alice", + "id": "us_8kugj628ebjngs", + "lastname": "Smith", + "roles": "org-level-viewer" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + ], + "title": "User List Model", + "type": "object", + "x-examples": { + "example-1": { + "sources": { + "list": [ + { + "alias": "string", + "database": "string", + "host": "string", + "id": "string", + "params": "string", + "password": "string", + "port": 0, + "base_id": "string", + "ssl": "string", + "type": "string", + "url": "string", + "username": "string" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "pageSize": 0, + "sort": "string", + "totalRows": 0 + } + } + } + }, + "properties": { + "list": { + "type": "array", + "x-stoplight": { + "id": "8o7v47q3e67ef" + }, + "description": "List of user objects", + "items": { + "$ref": "#/components/schemas/User", + "x-stoplight": { + "id": "kwqzxwea9r5er" + } + } + }, + "pageInfo": { + "$ref": "#/components/schemas/Paginated", + "x-stoplight": { + "id": "0d98n6sfxfvft" + }, + "description": "Paginated Info" + } + }, + "required": [ + "list", + "pageInfo" + ], + "x-stoplight": { + "id": "32mz06s4tgptq" + } + }, + "View": { + "description": "Model for View", + "examples": [ + { + "source_id": "ds_g4ccx6e77h1dmi", + "created_at": "2023-03-02 17:46:31", + "fk_model_id": "md_mhs9z4r2ak98x0", + "id": "vw_lg052cnc1c26kf", + "is_default": 1, + "lock_type": "collaborative", + "meta": {}, + "order": 1, + "password": null, + "base_id": "p_xm3thidrblw4n7", + "show": 1, + "show_system_fields": null, + "title": "Sheet-1", + "type": 3, + "updated_at": "2023-03-02 17:46:31", + "uuid": null, + "view": { + "source_id": "ds_g4ccx6e77h1dmi", + "created_at": "2023-03-02 17:46:31", + "fk_view_id": "vw_lg052cnc1c26kf", + "meta": null, + "base_id": "p_xm3thidrblw4n7", + "row_height": null, + "updated_at": "2023-03-02 17:46:31", + "uuid": null + } + } + ], + "title": "View Model", + "type": "object", + "properties": { + "source_id": { + "$ref": "#/components/schemas/Id", + "description": "Unique Source ID" + }, + "fk_model_id": { + "$ref": "#/components/schemas/Id", + "description": "Unique Model ID" + }, + "id": { + "$ref": "#/components/schemas/Id", + "description": "Unique ID for View" + }, + "lock_type": { + "description": "Lock Type of the view", + "enum": [ + "collaborative", + "locked", + "personal" + ], + "type": "string" + }, + "meta": { + "$ref": "#/components/schemas/Meta", + "description": "Meta data for this view" + }, + "order": { + "description": "The rder of the list of views", + "type": "number" + }, + "password": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Password for protecting the view" + }, + "base_id": { + "$ref": "#/components/schemas/Id", + "description": "Unique Base ID" + }, + "show": { + "$ref": "#/components/schemas/Bool", + "description": "If this view is shown?" + }, + "show_system_fields": { + "$ref": "#/components/schemas/Bool", + "description": "Should show system fields in this view?" + }, + "is_default": { + "$ref": "#/components/schemas/Bool", + "description": "Is this view default view for the model?" + }, + "title": { + "description": "View Title", + "type": "string" + }, + "type": { + "description": "View Type", + "type": "number" + }, + "uuid": { + "$ref": "#/components/schemas/StringOrNull", + "description": "UUID of the view" + }, + "view": { + "anyOf": [ + { + "$ref": "#/components/schemas/Form" + }, + { + "$ref": "#/components/schemas/Gallery" + }, + { + "$ref": "#/components/schemas/Grid" + }, + { + "$ref": "#/components/schemas/Kanban" + }, + { + "$ref": "#/components/schemas/Map" + } + ], + "description": "Associated View Model" + } + }, + "required": [ + "fk_model_id", + "show", + "title", + "type" + ], + "x-stoplight": { + "id": "nobjewdlhxrkq" + } + }, + "ViewList": { + "description": "Model for View List", + "examples": [ + { + "list": [ + { + "alias": "string", + "column": [ + { + "alias": "string", + "auto_increment": true, + "auto_update_timestamp": true, + "source_id": "string", + "character_maximum_length": "string", + "character_set_name": "string", + "colOptions": { + "deleted": "string", + "dr": "string", + "fk_child_column_id": "string", + "fk_column_id": "string", + "fk_index_name": "string", + "fk_mm_child_column_id": "string", + "fk_mm_model_id": "string", + "fk_mm_parent_column_id": "string", + "fk_parent_column_id": "string", + "id": "string", + "order": "string", + "type": "string", + "ur": "string", + "virtual": true + }, + "column_comment": "string", + "column_default": "string", + "column_ordinal_position": "string", + "column_type": "string", + "data_type": "string", + "data_type_x": "string", + "data_type_x_precision": "string", + "data_type_x_scale": "string", + "deleted": true, + "fk_model_id": "string", + "id": "string", + "numeric_precision": "string", + "numeric_scale": "string", + "order": 0, + "primary_key": true, + "primary_value": true, + "rqd": "string", + "title": "string", + "ui_data_type": "string", + "un": "string", + "unique": true, + "visible": true + } + ], + "columnByIds": {}, + "deleted": true, + "enabled": true, + "fk_base_id": "string", + "fk_project_id": "string", + "id": "string", + "order": 0, + "parent_id": "string", + "pinned": true, + "show_as": "string", + "tags": "string", + "title": "string", + "type": "string" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + ], + "title": "View List Model", + "type": "object", + "x-examples": { + "example-1": { + "sources": { + "list": [ + { + "alias": "string", + "database": "string", + "host": "string", + "id": "string", + "params": "string", + "password": "string", + "port": 0, + "base_id": "string", + "ssl": "string", + "type": "string", + "url": "string", + "username": "string" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "pageSize": 0, + "sort": "string", + "totalRows": 0 + } + } + } + }, + "properties": { + "list": { + "type": "array", + "description": "List of view objects", + "items": { + "$ref": "#/components/schemas/View" + } + }, + "pageInfo": { + "$ref": "#/components/schemas/Paginated", + "description": "Paginated Info" + } + }, + "required": [ + "list", + "pageInfo" + ], + "x-stoplight": { + "id": "a1f99jvpiuugl" + } + }, + "ViewCreateReq": { + "type": "object", + "x-stoplight": { + "id": "zvdo4i7c70jmo" + }, + "title": "ViewCreateReq", + "description": "Model for View Create Request", + "examples": [ + { + "title": "My Grid View", + "type": 3, + "copy_from_id": null, + "fk_grp_col_id": null, + "fk_geo_data_col_id": null + }, + { + "title": "My Gallery View", + "type": 2, + "copy_from_id": null, + "fk_grp_col_id": null, + "fk_geo_data_col_id": null + }, + { + "title": "My Form View", + "type": 1, + "copy_from_id": null, + "fk_grp_col_id": null, + "fk_geo_data_col_id": null + }, + { + "title": "My Kanban View", + "type": 4, + "copy_from_id": null, + "fk_grp_col_id": "cl_g0a89q9xdry3lu", + "fk_geo_data_col_id": null + }, + { + "title": "My Map View", + "type": 5, + "copy_from_id": null, + "fk_grp_col_id": null, + "fk_geo_data_col_id": "cl_uu1meolj00tlrq" + } + ], + "properties": { + "title": { + "type": "string", + "description": "View Title", + "example": "My View" + }, + "type": { + "type": "number", + "description": "View Type" + }, + "copy_from_id": { + "$ref": "#/components/schemas/StringOrNull", + "description": "ID of view to be copied from. Used in Copy View." + }, + "fk_grp_col_id": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Foreign Key to Grouping Column. Used in creating Kanban View." + }, + "fk_geo_data_col_id": { + "$ref": "#/components/schemas/StringOrNull", + "description": "Foreign Key to Geo Data Column. Used in creating Map View." + } + }, + "required": [ + "title" + ] + }, + "ViewUpdateReq": { + "description": "Model for View Update Request", + "x-stoplight": { + "id": "7inf594lhs8mh" + }, + "examples": [ + { + "title": "Grid View 1", + "uuid": "e2457bbf-e29c-4fec-866e-fe3b01dba57f", + "password": "password123", + "lock_type": "collaborative", + "meta": "{\"allowCSVDownload\":true}", + "order": 1, + "show_system_fields": 0 + } + ], + "title": "View Update Request Model", + "type": "object", + "properties": { + "title": { + "maxLength": 255, + "type": "string", + "description": "View Title", + "example": "Grid View 1" + }, + "uuid": { + "maxLength": 255, + "type": "string", + "x-stoplight": { + "id": "vlhs7xs644u8l" + }, + "description": "View UUID. Used in Shared View.", + "example": "e2457bbf-e29c-4fec-866e-fe3b01dba57f" + }, + "password": { + "maxLength": 255, + "type": "string", + "x-stoplight": { + "id": "vlhs7xs644u8l" + }, + "description": "View Password. Used in Shared View.", + "example": "password123" + }, + "lock_type": { + "enum": [ + "collaborative", + "locked", + "personal" + ], + "type": "string", + "description": "Lock type of View.", + "example": "collaborative" + }, + "meta": { + "$ref": "#/components/schemas/Meta", + "description": "Meta info used in View." + }, + "order": { + "type": "number", + "description": "The order of the list of views.", + "example": 1, + "minimum": 0 + }, + "show_system_fields": { + "$ref": "#/components/schemas/Bool", + "description": "Should this view show system fields?" + } + } + }, + "ViewColumnUpdateReq": { + "description": "Model for View Column Update Request", + "x-stoplight": { + "id": "7xso36z6hvh43" + }, + "examples": [ + { + "show": 0, + "order": 1 + } + ], + "title": "View Column Update Request Model", + "type": "object", + "properties": { + "show": { + "$ref": "#/components/schemas/Bool", + "description": "View Title", + "x-stoplight": { + "id": "coxius73ejq5x" + } + }, + "order": { + "type": "number", + "description": "The order of the list of views.", + "example": 1, + "minimum": 0 + } + } + }, + "ViewColumnReq": { + "description": "Model for View Column Request", + "x-stoplight": { + "id": "ofapz0gzl35z2" + }, + "examples": [ + { + "fk_column_id": "cl_5jestblzneb649", + "show": 0, + "order": 1 + } + ], + "title": "View Column Request Model", + "type": "object", + "properties": { + "fk_column_id": { + "$ref": "#/components/schemas/Id", + "x-stoplight": { + "id": "rxd07wvp9hf6s" + }, + "description": "Foreign Key to Column" + }, + "show": { + "$ref": "#/components/schemas/Bool", + "description": "View Title", + "x-stoplight": { + "id": "coxius73ejq5x" + } + }, + "order": { + "type": "number", + "description": "The order of the list of views.", + "example": 1, + "minimum": 0 + } + } + }, + "VisibilityRuleReq": { + "description": "Model for Visibility Rule Request", + "examples": [ + [ + { + "disabled": { + "commenter": true, + "creator": true, + "editor": true, + "guest": true, + "owner": true, + "viewer": true + } + } + ] + ], + "items": { + "properties": { + "id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "disabled": { + "properties": { + "commenter": { + "$ref": "#/components/schemas/Bool" + }, + "creator": { + "$ref": "#/components/schemas/Bool" + }, + "editor": { + "$ref": "#/components/schemas/Bool" + }, + "guest": { + "$ref": "#/components/schemas/Bool" + }, + "owner": { + "$ref": "#/components/schemas/Bool" + }, + "viewer": { + "$ref": "#/components/schemas/Bool" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "title": "Visibility Rule Request Model", + "type": "array", + "x-stoplight": { + "id": "xu5zgt0fc3ms9" + } + }, + "Webhook": { + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "title": "Webhook", + "type": "object" + }, + "ProjectInviteEvent": { + "type": "object", + "properties": { + "fk_user_id": { + "type": "string", + "description": "The ID of the user who receives the base invite" + }, + "type": { + "type": "string", + "description": "The type of event, which should be set to 'PROJECT_INVITE'" + }, + "body": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the base being invited to" + }, + "title": { + "type": "string", + "description": "The title of the base being invited to" + }, + "type": { + "type": "string", + "description": "The type of the base being invited to" + }, + "invited_by": { + "type": "string", + "description": "The email address of the user who invited the recipient" + } + }, + "required": [ + "id", + "title", + "type", + "invited_by" + ] + } + }, + "required": [ + "fk_user_id", + "type", + "body" + ] + }, + "ProjectEvent": { + "type": "object", + "properties": { + "fk_user_id": { + "type": "string", + "description": "The ID of the user" + }, + "type": { + "type": "string" + }, + "body": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the base" + }, + "title": { + "type": "string", + "description": "The title of the base" + }, + "type": { + "type": "string", + "description": "The type of the base" + } + }, + "required": [ + "id", + "title", + "type" + ] + } + }, + "required": [ + "fk_user_id", + "type", + "body" + ] + }, + "WelcomeEvent": { + "type": "object", + "properties": { + "fk_user_id": { + "type": "string", + "description": "The ID of the user receiving the welcome message" + }, + "type": { + "type": "string", + "description": "The type of event, which should be set to 'WELCOME'" + }, + "body": { + "type": "object", + "description": "An empty object" + } + }, + "required": [ + "fk_user_id", + "type", + "body" + ] + }, + "SortEvent": { + "type": "object", + "properties": { + "fk_user_id": { + "type": "string", + "description": "The ID of the user who created sort" + }, + "type": { + "type": "string" + }, + "body": { + "type": "object" + } + }, + "required": [ + "fk_user_id", + "type", + "body" + ] + }, + "FilterEvent": { + "type": "object", + "properties": { + "fk_user_id": { + "type": "string", + "description": "The ID of the user who created filter" + }, + "type": { + "type": "string" + }, + "body": { + "type": "object" + } + }, + "required": [ + "fk_user_id", + "type", + "body" + ] + }, + "TableEvent": { + "type": "object", + "properties": { + "fk_user_id": { + "type": "string", + "description": "The ID of the user who triggered the event" + }, + "type": { + "type": "string", + "description": "The type of the event" + }, + "body": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "The title of the table associated with the event" + }, + "base_id": { + "type": "string", + "description": "The ID of the base that the table belongs to" + }, + "source_id": { + "type": "string", + "description": "The ID of the source that the table belongs to" + }, + "id": { + "type": "string", + "description": "The ID of the table associated with the event" + } + }, + "required": [ + "title", + "base_id", + "source_id", + "id" + ] + } + }, + "required": [ + "fk_user_id", + "type", + "body" + ] + }, + "ViewEvent": { + "type": "object", + "properties": { + "fk_user_id": { + "type": "string", + "description": "The ID of the user who triggered the event" + }, + "type": { + "type": "string", + "description": "The type of the event" + }, + "body": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "The title of the view associated with the event" + }, + "base_id": { + "type": "string", + "description": "The ID of the base that the view belongs to" + }, + "source_id": { + "type": "string", + "description": "The ID of the source that the view belongs to" + }, + "id": { + "type": "string", + "description": "The ID of the view associated with the event" + }, + "fk_model_id": { + "type": "string", + "description": "The ID of the model that the view is based on" + } + }, + "required": [ + "title", + "base_id", + "source_id", + "id", + "fk_model_id" + ] + } + }, + "required": [ + "fk_user_id", + "type", + "body" + ] + }, + "ColumnEvent": { + "type": "object", + "properties": { + "fk_user_id": { + "type": "string", + "description": "The ID of the user who triggered the event" + }, + "type": { + "type": "string", + "description": "The type of the event" + }, + "body": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "The title of the column associated with the event" + }, + "base_id": { + "type": "string", + "description": "The ID of the base that the column belongs to" + }, + "source_id": { + "type": "string", + "description": "The ID of the source that the column belongs to" + }, + "id": { + "type": "string", + "description": "The ID of the column associated with the event" + }, + "fk_model_id": { + "type": "string", + "description": "The ID of the model that the column belongs to" + } + }, + "required": [ + "title", + "base_id", + "source_id", + "id", + "fk_model_id" + ] + } + }, + "required": [ + "fk_user_id", + "type", + "body" + ] + }, + "Notification": { + "allOf": [ + { + "description": "", + "properties": { + "id": { + "$ref": "#/components/schemas/Id", + "description": "Unique ID" + }, + "is_read": { + "type": "boolean", + "description": "Whether the notification has been read by the user" + }, + "is_deleted": { + "type": "boolean", + "description": "Whether the notification has been deleted by the user" + }, + "type": { + "type": "string", + "description": "Type of notification" + }, + "updated_at": {}, + "created_at": {} + }, + "title": "Notification", + "type": "object" + }, + { + "oneOf": [ + { + "$ref": "#/components/schemas/ProjectInviteEvent" + }, + { + "$ref": "#/components/schemas/ProjectEvent" + }, + { + "$ref": "#/components/schemas/TableEvent" + }, + { + "$ref": "#/components/schemas/ViewEvent" + }, + { + "$ref": "#/components/schemas/ColumnEvent" + }, + { + "$ref": "#/components/schemas/WelcomeEvent" + }, + { + "$ref": "#/components/schemas/SortEvent" + }, + { + "$ref": "#/components/schemas/FilterEvent" + } + ] + } + ] + }, + "NotificationList": { + "description": "Model for Notification List", + "examples": [ + { + "list": [ + { + "body": { + }, + "type": "invite", + "is_read": false, + "is_deleted": false, + "id": "1", + "updated_at": "2020-05-20T12:00:00.000000Z", + "created_at": "2020-05-20T12:00:00.000000Z", + "fk_user_id": "us_b3xo2i44nx5y9l" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + ], + "title": "API Token List Model", + "type": "object", + "properties": { + "list": { + "type": "array", + "description": "List of notification objects", + "items": { + "$ref": "#/components/schemas/Notification" + } + }, + "pageInfo": { + "$ref": "#/components/schemas/Paginated", + "description": "Model for Paginated" + } + }, + "required": [ + "list", + "pageInfo" + ] + }, + "NotificationUpdate": { + "type": "object", + "properties": { + "is_read": { + "type": "boolean" + } + } + } + }, + "responses": { + "ProjectList": { + "description": "Example response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectList" + }, + "examples": { + "example-1": { + "value": { + "list": [ + { + "sources": [ + { + "alias": "string", + "config": null, + "created_at": "2023-03-01 14:27:36", + "enabled": true, + "id": "string", + "inflection_column": "camelize", + "inflection_table": "camelize", + "is_meta": true, + "order": 1, + "base_id": "string", + "type": "mysql2", + "updated_at": "2023-03-01 14:27:36" + } + ], + "color": "#24716E", + "created_at": "2023-03-01 14:27:36", + "deleted": true, + "description": "This is my base description", + "id": "p_124hhlkbeasewh", + "is_meta": true, + "meta": {}, + "order": 0, + "prefix": "nc_vm5q__", + "status": "string", + "title": "my-base", + "updated_at": "2023-03-01 14:27:36" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + } + } + } + } + }, + "BaseList": { + "description": "Example response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseList" + }, + "examples": { + "example-1": { + "value": { + "list": [ + { + "id": "ds_krsappzu9f8vmo", + "base_id": "p_01clqvzik3izk6", + "alias": null, + "config": "", + "meta": null, + "is_meta": 1, + "type": "mysql2", + "inflection_column": "camelize", + "inflection_table": "camelize", + "created_at": "2023-03-01 16:31:49", + "updated_at": "2023-03-02 11:28:17", + "enabled": 1, + "order": 1 + }, + { + "id": "ds_btbdt19zde0gj9", + "base_id": "p_01clqvzik3izk6", + "alias": "sakila", + "config": "", + "meta": null, + "is_meta": null, + "type": "mysql2", + "inflection_column": "camelize", + "inflection_table": "camelize", + "created_at": "2023-03-02 11:28:17", + "updated_at": "2023-03-02 11:28:17", + "enabled": 1, + "order": 2 + } + ], + "pageInfo": { + "totalRows": 2, + "page": 1, + "pageSize": 2, + "isFirstPage": true, + "isLastPage": true + } + } + } + } + } + } + }, + "TableList": { + "description": "Example response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TableList" + }, + "examples": { + "Example 1": { + "value": { + "list": [ + { + "id": "md_5hua2iqloqirhd", + "source_id": "ds_jxuewivwbxeum2", + "base_id": "p_tbhl1hnycvhe5l", + "table_name": "nc_b84e___Sheet-1", + "title": "Sheet-1", + "type": "table", + "meta": null, + "schema": null, + "enabled": true, + "mm": false, + "tags": null, + "pinned": null, + "deleted": null, + "order": 1, + "created_at": "2023-03-11T09:11:45.907Z", + "updated_at": "2023-03-11T09:11:45.907Z" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + } + } + } + } + }, + "ColumnList": { + "description": "Example response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ColumnList" + } + } + } + }, + "FilterList": { + "description": "Example response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FilterList" + } + } + } + }, + "SortList": { + "description": "Example response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SortList" + }, + "examples": {} + } + } + }, + "ViewList": { + "description": "Example response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ViewList" + }, + "examples": { + "Example 1": { + "value": { + "list": [ + { + "alias": "string", + "column": [ + { + "alias": "string", + "auto_increment": true, + "auto_update_timestamp": true, + "source_id": "string", + "character_maximum_length": "string", + "character_set_name": "string", + "colOptions": { + "deleted": "string", + "dr": "string", + "fk_child_column_id": "string", + "fk_column_id": "string", + "fk_index_name": "string", + "fk_mm_child_column_id": "string", + "fk_mm_model_id": "string", + "fk_mm_parent_column_id": "string", + "fk_parent_column_id": "string", + "id": "string", + "order": "string", + "type": "string", + "ur": "string", + "virtual": true + }, + "column_comment": "string", + "column_default": "string", + "column_ordinal_position": "string", + "column_type": "string", + "data_type": "string", + "data_type_x": "string", + "data_type_x_precision": "string", + "data_type_x_scale": "string", + "deleted": true, + "fk_model_id": "string", + "id": "string", + "numeric_precision": "string", + "numeric_scale": "string", + "order": 0, + "primary_key": true, + "primary_value": true, + "rqd": "string", + "title": "string", + "ui_data_type": "string", + "un": "string", + "unique": true, + "visible": true + } + ], + "columnByIds": {}, + "deleted": true, + "enabled": true, + "fk_base_id": "string", + "fk_project_id": "string", + "id": "string", + "order": 0, + "parent_id": "string", + "pinned": true, + "show_as": "string", + "tags": "string", + "title": "string", + "type": "string" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + } + } + } + } + }, + "SharedViewList": { + "description": "Example response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SharedViewList" + }, + "examples": { + "Example 1": { + "value": { + "list": [ + { + "source_id": "ds_g4ccx6e77h1dmi", + "created_at": "2023-03-02 17:46:31", + "fk_model_id": "md_mhs9z4r2ak98x0", + "id": "vw_lg052cnc1c26kf", + "is_default": 1, + "lock_type": "collaborative", + "meta": {}, + "order": 1, + "password": null, + "base_id": "p_xm3thidrblw4n7", + "show": 1, + "show_system_fields": null, + "title": "Sheet-1", + "type": 3, + "updated_at": "2023-03-02 17:46:31", + "uuid": null, + "view": { + "source_id": "ds_g4ccx6e77h1dmi", + "created_at": "2023-03-02 17:46:31", + "fk_view_id": "vw_lg052cnc1c26kf", + "meta": null, + "base_id": "p_xm3thidrblw4n7", + "row_height": null, + "updated_at": "2023-03-02 17:46:31", + "uuid": null + } + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + } + } + } + } + }, + "HookList": { + "description": "Example response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HookList" + } + } + } + }, + "UserList": { + "description": "Example response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserList" + }, + "examples": { + "Example 1": { + "value": { + "list": [ + { + "email": "user@example.com", + "email_verified": true, + "firstname": "Alice", + "id": "us_8kugj628ebjngs", + "lastname": "Smith", + "roles": "org-level-viewer" + } + ], + "pageInfo": { + "isFirstPage": true, + "isLastPage": true, + "page": 1, + "pageSize": 10, + "totalRows": 1 + } + } + } + } + } + } + }, + "APITokenList": { + "description": "Example response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTokenList" + }, + "examples": {} + } + }, + "type": "object", + "properties": { + "list": { + "type": "array", + "x-stoplight": { + "id": "uukp6v55zfp7i" + }, + "items": { + "$ref": "#/components/schemas/ApiToken", + "x-stoplight": { + "id": "9zqpoqfkdxy0y" + } + } + }, + "pageInfo": { + "$ref": "#/components/schemas/Paginated", + "x-stoplight": { + "id": "6unr17jyisial" + } + } + } + }, + "BadRequest": { + "description": "BadReqeust", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "msg": { + "type": "string", + "x-stoplight": { + "id": "p9mk4oi0hbihm" + }, + "example": "BadRequest [Error]: " + } + }, + "required": [ + "msg" + ] + }, + "examples": { + "Example 1": { + "value": { + "msg": "BadRequest [Error]: " + } + } + } + } + }, + "headers": {} + } + }, + "securitySchemes": { + "xc-auth": { + "name": "Auth Token ", + "type": "apiKey", + "in": "header", + "description": "Auth Token is a JWT Token generated based on the logged-in user. By default, the token is only valid for 10 hours. However, you can change the value by defining it using environment variable `NC_JWT_EXPIRES_IN`." + }, + "xc-shared-base-id": { + "name": "Shared Base ID", + "type": "apiKey", + "in": "header", + "description": "Shared base uuid" + }, + "xc-shared-erd-id": { + "name": "Shared ERD ID", + "type": "apiKey", + "in": "header", + "description": "Shared ERD uuid" + } + }, + "parameters": { + "xc-auth": { + "name": "xc-auth", + "in": "header", + "required": false, + "schema": { + "type": "string" + }, + "description": "Auth Token is a JWT Token generated based on the logged-in user. By default, the token is only valid for 10 hours. However, you can change the value by defining it using environment variable NC_JWT_EXPIRES_IN." + } + } + } +} diff --git a/packages/nocodb/src/schema/swagger.json b/packages/nocodb/src/schema/swagger.json index bdc8c5c1a8..8c059f78d9 100644 --- a/packages/nocodb/src/schema/swagger.json +++ b/packages/nocodb/src/schema/swagger.json @@ -1686,7 +1686,7 @@ ] } }, - "/api/v1/meta/bases/{baseId}/users": { + "/api/v1/db/meta/projects/{baseId}/users": { "get": { "summary": "List Base Users", "operationId": "auth-base-user-list", @@ -1897,7 +1897,7 @@ ] } }, - "/api/v1/meta/bases/{baseId}/info": { + "/api/v1/db/meta/projects/{baseId}/info": { "parameters": [ { "schema": { @@ -1996,7 +1996,7 @@ ] } }, - "/api/v1/meta/bases/{baseId}/users/{userId}": { + "/api/v1/db/meta/projects/{baseId}/users/{userId}": { "parameters": [ { "schema": { @@ -2128,7 +2128,7 @@ ] } }, - "/api/v1/meta/bases/{baseId}/visibility-rules": { + "/api/v1/db/meta/projects/{baseId}/visibility-rules": { "get": { "summary": "Get UI ACL", "operationId": "base-model-visibility-list", @@ -2282,7 +2282,7 @@ ] } }, - "/api/v1/meta/bases/": { + "/api/v1/db/meta/projects/": { "parameters": [ { "$ref": "#/components/parameters/xc-auth" @@ -2446,7 +2446,7 @@ ] } }, - "/api/v1/meta/duplicate/{baseId}/{sourceId}": { + "/api/v1/db/meta/duplicate/{baseId}/{sourceId}": { "post": { "summary": "Duplicate Base Source", "operationId": "base-source-duplicate", @@ -2550,7 +2550,7 @@ ] } }, - "/api/v1/meta/duplicate/{baseId}": { + "/api/v1/db/meta/duplicate/{baseId}": { "post": { "summary": "Duplicate Base", "operationId": "base-duplicate", @@ -2640,7 +2640,7 @@ ] } }, - "/api/v1/meta/bases/{baseId}": { + "/api/v1/db/meta/projects/{baseId}": { "parameters": [ { "schema": { @@ -2800,7 +2800,7 @@ ] } }, - "/api/v1/meta/bases/{baseId}/user": { + "/api/v1/db/meta/projects/{baseId}/user": { "parameters": [ { "schema": { @@ -2833,7 +2833,7 @@ } } }, - "/api/v1/meta/bases/{baseId}/sources/{sourceId}": { + "/api/v1/db/meta/projects/{baseId}/bases/{sourceId}": { "parameters": [ { "schema": { @@ -3012,7 +3012,7 @@ ] } }, - "/api/v1/meta/bases/:baseId/sources/:sourceId/sqlView": { + "/api/v1/db/meta/projects/:baseId/bases/:sourceId/sqlView": { "parameters": [ { "schema": { @@ -3069,7 +3069,7 @@ } } }, - "/api/v1/meta/bases/{baseId}/sources/": { + "/api/v1/db/meta/projects/{baseId}/bases/": { "parameters": [ { "schema": { @@ -3208,7 +3208,7 @@ ] } }, - "/api/v1/meta/bases/{baseId}/sources/{sourceId}/share/erd": { + "/api/v1/db/meta/projects/{baseId}/bases/{sourceId}/share/erd": { "parameters": [ { "schema": { @@ -3259,7 +3259,7 @@ ] } }, - "/api/v1/meta/bases/{baseId}/shared": { + "/api/v1/db/meta/projects/{baseId}/shared": { "parameters": [ { "schema": { @@ -3472,7 +3472,7 @@ ] } }, - "/api/v1/meta/bases/{baseId}/cost": { + "/api/v1/db/meta/projects/{baseId}/cost": { "parameters": [ { "schema": { @@ -3517,7 +3517,7 @@ "x-internal": true } }, - "/api/v1/meta/bases/{baseId}/tables": { + "/api/v1/db/meta/projects/{baseId}/tables": { "parameters": [ { "schema": { @@ -3976,7 +3976,7 @@ "description": "List all tables in a given base" } }, - "/api/v1/meta/tables/{tableId}": { + "/api/v1/db/meta/tables/{tableId}": { "parameters": [ { "schema": { @@ -4493,7 +4493,7 @@ ] } }, - "/api/v1/meta/duplicate/{baseId}/table/{tableId}": { + "/api/v1/db/meta/duplicate/{baseId}/table/{tableId}": { "post": { "summary": "Duplicate Table", "operationId": "db-table-duplicate", @@ -4589,7 +4589,7 @@ ] } }, - "/api/v1/meta/bases/{baseId}/{sourceId}/tables": { + "/api/v1/db/meta/projects/{baseId}/{sourceId}/tables": { "parameters": [ { "schema": { @@ -5160,7 +5160,7 @@ ] } }, - "/api/v1/meta/tables/{tableId}/reorder": { + "/api/v1/db/meta/tables/{tableId}/reorder": { "parameters": [ { "schema": { @@ -5229,7 +5229,7 @@ ] } }, - "/api/v1/meta/tables/{tableId}/columns": { + "/api/v1/db/meta/tables/{tableId}/columns": { "parameters": [ { "schema": { @@ -5312,7 +5312,7 @@ ] } }, - "/api/v1/meta/columns/{columnId}": { + "/api/v1/db/meta/columns/{columnId}": { "parameters": [ { "schema": { @@ -5403,7 +5403,7 @@ ] } }, - "/api/v1/meta/columns/{columnId}/primary": { + "/api/v1/db/meta/columns/{columnId}/primary": { "parameters": [ { "schema": { @@ -5448,7 +5448,7 @@ ] } }, - "/api/v1/meta/tables/{tableId}/views": { + "/api/v1/db/meta/tables/{tableId}/views": { "parameters": [ { "schema": { @@ -5570,7 +5570,7 @@ ] } }, - "/api/v1/meta/views/{viewId}": { + "/api/v1/db/meta/views/{viewId}": { "parameters": [ { "schema": { @@ -5689,7 +5689,7 @@ ] } }, - "/api/v1/meta/views/{viewId}/show-all": { + "/api/v1/db/meta/views/{viewId}/show-all": { "parameters": [ { "schema": { @@ -5743,7 +5743,7 @@ ] } }, - "/api/v1/meta/views/{viewId}/hide-all": { + "/api/v1/db/meta/views/{viewId}/hide-all": { "parameters": [ { "schema": { @@ -5797,7 +5797,7 @@ "description": "Hide All Columns in a given View" } }, - "/api/v1/meta/tables/{tableId}/share": { + "/api/v1/db/meta/tables/{tableId}/share": { "parameters": [ { "schema": { @@ -5882,7 +5882,7 @@ ] } }, - "/api/v1/meta/views/{viewId}/share": { + "/api/v1/db/meta/views/{viewId}/share": { "parameters": [ { "schema": { @@ -6003,7 +6003,7 @@ ] } }, - "/api/v1/meta/views/{viewId}/columns": { + "/api/v1/db/meta/views/{viewId}/columns": { "parameters": [ { "schema": { @@ -6182,7 +6182,7 @@ ] } }, - "/api/v1/meta/views/{viewId}/columns/{columnId}": { + "/api/v1/db/meta/views/{viewId}/columns/{columnId}": { "parameters": [ { "schema": { @@ -6256,7 +6256,7 @@ ] } }, - "/api/v1/meta/views/{viewId}/sorts": { + "/api/v1/db/meta/views/{viewId}/sorts": { "parameters": [ { "schema": { @@ -6378,7 +6378,7 @@ ] } }, - "/api/v1/meta/sorts/{sortId}": { + "/api/v1/db/meta/sorts/{sortId}": { "parameters": [ { "schema": { @@ -6517,7 +6517,7 @@ ] } }, - "/api/v1/meta/views/{viewId}/filters": { + "/api/v1/db/meta/views/{viewId}/filters": { "parameters": [ { "schema": { @@ -6661,7 +6661,7 @@ ] } }, - "/api/v1/meta/hooks/{hookId}/filters": { + "/api/v1/db/meta/hooks/{hookId}/filters": { "parameters": [ { "schema": { @@ -6805,7 +6805,7 @@ ] } }, - "/api/v1/meta/hooks/{hookId}/logs": { + "/api/v1/db/meta/hooks/{hookId}/logs": { "parameters": [ { "schema": { @@ -6893,7 +6893,7 @@ ] } }, - "/api/v1/meta/filters/{filterId}": { + "/api/v1/db/meta/filters/{filterId}": { "parameters": [ { "schema": { @@ -7043,7 +7043,7 @@ ] } }, - "/api/v1/meta/filters/{filterGroupId}/children": { + "/api/v1/db/meta/filters/{filterGroupId}/children": { "parameters": [ { "schema": { @@ -7117,7 +7117,7 @@ ] } }, - "/api/v1/meta/tables/{tableId}/grids": { + "/api/v1/db/meta/tables/{tableId}/grids": { "parameters": [ { "schema": { @@ -7202,7 +7202,7 @@ ] } }, - "/api/v1/meta/tables/{tableId}/forms": { + "/api/v1/db/meta/tables/{tableId}/forms": { "parameters": [ { "schema": { @@ -7287,7 +7287,7 @@ ] } }, - "/api/v1/meta/forms/{formViewId}": { + "/api/v1/db/meta/forms/{formViewId}": { "parameters": [ { "schema": { @@ -7430,7 +7430,7 @@ ] } }, - "/api/v1/meta/form-columns/{formViewColumnId}": { + "/api/v1/db/meta/form-columns/{formViewColumnId}": { "parameters": [ { "schema": { @@ -7495,7 +7495,7 @@ ] } }, - "/api/v1/meta/grids/{viewId}": { + "/api/v1/db/meta/grids/{viewId}": { "parameters": [ { "schema": { @@ -7559,7 +7559,7 @@ ] } }, - "/api/v1/meta/grids/{gridId}/grid-columns": { + "/api/v1/db/meta/grids/{gridId}/grid-columns": { "parameters": [ { "schema": { @@ -7621,7 +7621,7 @@ ] } }, - "/api/v1/meta/grid-columns/{columnId}": { + "/api/v1/db/meta/grid-columns/{columnId}": { "parameters": [ { "schema": { @@ -7687,7 +7687,7 @@ ] } }, - "/api/v1/meta/tables/{tableId}/galleries": { + "/api/v1/db/meta/tables/{tableId}/galleries": { "parameters": [ { "schema": { @@ -7770,7 +7770,7 @@ ] } }, - "/api/v1/meta/galleries/{galleryViewId}": { + "/api/v1/db/meta/galleries/{galleryViewId}": { "parameters": [ { "schema": { @@ -7862,7 +7862,7 @@ ] } }, - "/api/v1/meta/tables/{tableId}/kanbans": { + "/api/v1/db/meta/tables/{tableId}/kanbans": { "parameters": [ { "schema": { @@ -7947,7 +7947,7 @@ ] } }, - "/api/v1/meta/kanbans/{kanbanViewId}": { + "/api/v1/db/meta/kanbans/{kanbanViewId}": { "parameters": [ { "schema": { @@ -8082,7 +8082,7 @@ ] } }, - "/api/v1/meta/tables/{tableId}/maps": { + "/api/v1/db/meta/tables/{tableId}/maps": { "parameters": [ { "schema": { @@ -8168,7 +8168,7 @@ ] } }, - "/api/v1/meta/maps/{mapViewId}": { + "/api/v1/db/meta/maps/{mapViewId}": { "parameters": [ { "schema": { @@ -8260,7 +8260,7 @@ ] } }, - "/api/v1/meta/bases/{baseId}/meta-diff": { + "/api/v1/db/meta/projects/{baseId}/meta-diff": { "parameters": [ { "schema": { @@ -8432,7 +8432,7 @@ "description": "Get the meta data difference between NC_DB and external data sources " } }, - "/api/v1/meta/bases/{baseId}/meta-diff/{sourceId}": { + "/api/v1/db/meta/projects/{baseId}/meta-diff/{sourceId}": { "parameters": [ { "schema": { @@ -8611,7 +8611,7 @@ "description": "Get the meta data difference between NC_DB and external data sources in a given Source" } }, - "/api/v1/meta/bases/{baseId}/has-empty-or-null-filters": { + "/api/v1/db/meta/projects/{baseId}/has-empty-or-null-filters": { "parameters": [ { "schema": { @@ -8653,7 +8653,7 @@ "x-internal": true } }, - "/api/v1/data/{orgs}/{baseName}/{tableName}": { + "/api/v1/db/data/{orgs}/{baseName}/{tableName}": { "parameters": [ { "schema": { @@ -8907,7 +8907,7 @@ ] } }, - "/api/v1/data/{orgs}/{baseName}/{tableName}/find-one": { + "/api/v1/db/data/{orgs}/{baseName}/{tableName}/find-one": { "parameters": [ { "schema": { @@ -8997,7 +8997,7 @@ } } }, - "/api/v1/data/{orgs}/{baseName}/{tableName}/groupby": { + "/api/v1/db/data/{orgs}/{baseName}/{tableName}/groupby": { "parameters": [ { "schema": { @@ -9089,7 +9089,7 @@ } } }, - "/api/v1/data/{orgs}/{baseName}/{tableName}/views/{viewName}/group/{columnId}": { + "/api/v1/db/data/{orgs}/{baseName}/{tableName}/views/{viewName}/group/{columnId}": { "parameters": [ { "schema": { @@ -9267,7 +9267,7 @@ } } }, - "/api/v1/data/{orgs}/{baseName}/{tableName}/group/{columnId}": { + "/api/v1/db/data/{orgs}/{baseName}/{tableName}/group/{columnId}": { "parameters": [ { "schema": { @@ -9435,7 +9435,7 @@ } } }, - "/api/v1/data/{orgs}/{baseName}/{tableName}/views/{viewName}": { + "/api/v1/db/data/{orgs}/{baseName}/{tableName}/views/{viewName}": { "parameters": [ { "schema": { @@ -9669,7 +9669,7 @@ "description": "Create a new row in the given Table View" } }, - "/api/v1/data/{orgs}/{baseName}/{tableName}/views/{viewName}/find-one": { + "/api/v1/db/data/{orgs}/{baseName}/{tableName}/views/{viewName}/find-one": { "parameters": [ { "schema": { @@ -9773,7 +9773,7 @@ } } }, - "/api/v1/data/{orgs}/{baseName}/{tableName}/views/{viewName}/groupby": { + "/api/v1/db/data/{orgs}/{baseName}/{tableName}/views/{viewName}/groupby": { "parameters": [ { "schema": { @@ -9876,7 +9876,7 @@ } } }, - "/api/v1/data/{orgs}/{baseName}/{tableName}/views/{viewName}/count": { + "/api/v1/db/data/{orgs}/{baseName}/{tableName}/views/{viewName}/count": { "parameters": [ { "schema": { @@ -9970,7 +9970,7 @@ } } }, - "/api/v1/data/{orgs}/{baseName}/{tableName}/views/{viewName}/{rowId}": { + "/api/v1/db/data/{orgs}/{baseName}/{tableName}/views/{viewName}/{rowId}": { "parameters": [ { "schema": { @@ -10146,7 +10146,7 @@ ] } }, - "/api/v1/data/{orgs}/{baseName}/{tableName}/views/{viewName}/{rowId}/exist": { + "/api/v1/db/data/{orgs}/{baseName}/{tableName}/views/{viewName}/{rowId}/exist": { "parameters": [ { "schema": { @@ -10227,7 +10227,7 @@ ] } }, - "/api/v1/data/{orgs}/{baseName}/{tableName}/{rowId}": { + "/api/v1/db/data/{orgs}/{baseName}/{tableName}/{rowId}": { "parameters": [ { "schema": { @@ -10402,7 +10402,7 @@ ] } }, - "/api/v1/data/{orgs}/{baseName}/{tableName}/{rowId}/exist": { + "/api/v1/db/data/{orgs}/{baseName}/{tableName}/{rowId}/exist": { "parameters": [ { "schema": { @@ -10475,7 +10475,7 @@ ] } }, - "/api/v1/data/bulk/{orgs}/{baseName}/{tableName}": { + "/api/v1/db/data/bulk/{orgs}/{baseName}/{tableName}": { "parameters": [ { "schema": { @@ -10733,7 +10733,7 @@ ] } }, - "/api/v1/data/bulk/{orgs}/{baseName}/{tableName}/all": { + "/api/v1/db/data/bulk/{orgs}/{baseName}/{tableName}/all": { "parameters": [ { "schema": { @@ -10890,7 +10890,7 @@ ] } }, - "/api/v1/data/{orgs}/{baseName}/{tableName}/views/{viewName}/export/{type}": { + "/api/v1/db/data/{orgs}/{baseName}/{tableName}/views/{viewName}/export/{type}": { "parameters": [ { "schema": { @@ -10976,7 +10976,7 @@ ] } }, - "/api/v1/data/{orgs}/{baseName}/{tableName}/export/{type}": { + "/api/v1/db/data/{orgs}/{baseName}/{tableName}/export/{type}": { "parameters": [ { "schema": { @@ -11054,7 +11054,7 @@ ] } }, - "/api/v1/data/{orgs}/{baseName}/{tableName}/{rowId}/{relationType}/{columnName}": { + "/api/v1/db/data/{orgs}/{baseName}/{tableName}/{rowId}/{relationType}/{columnName}": { "parameters": [ { "schema": { @@ -11166,7 +11166,7 @@ "description": "List all nested relations rows" } }, - "/api/v1/data/{orgs}/{baseName}/{tableName}/{rowId}/{relationType}/{columnName}/{refRowId}": { + "/api/v1/db/data/{orgs}/{baseName}/{tableName}/{rowId}/{relationType}/{columnName}/{refRowId}": { "parameters": [ { "schema": { @@ -11391,7 +11391,7 @@ ] } }, - "/api/v1/data/{orgs}/{baseName}/{tableName}/{rowId}/{relationType}/{columnName}/exclude": { + "/api/v1/db/data/{orgs}/{baseName}/{tableName}/{rowId}/{relationType}/{columnName}/exclude": { "parameters": [ { "schema": { @@ -11501,7 +11501,7 @@ "description": "Get the table rows but exculding the current record's children and parent" } }, - "/api/v1/public/shared-view/{sharedViewUuid}/group/{columnId}": { + "/api/v1/db/public/shared-view/{sharedViewUuid}/group/{columnId}": { "parameters": [ { "schema": { @@ -11742,7 +11742,7 @@ "description": "List Shared View Grouped Data" } }, - "/api/v1/public/shared-view/{sharedViewUuid}/rows": { + "/api/v1/db/public/shared-view/{sharedViewUuid}/rows": { "parameters": [ { "schema": { @@ -11950,7 +11950,7 @@ "description": "Create a new row for the target shared view" } }, - "/api/v1/public/shared-view/{sharedViewUuid}/groupby": { + "/api/v1/db/public/shared-view/{sharedViewUuid}/groupby": { "parameters": [ { "schema": { @@ -12073,7 +12073,7 @@ "description": "List all shared view rows grouped by a column" } }, - "/api/v1/public/shared-view/{sharedViewUuid}/rows/{rowId}/{relationType}/{columnName}": { + "/api/v1/db/public/shared-view/{sharedViewUuid}/rows/{rowId}/{relationType}/{columnName}": { "parameters": [ { "schema": { @@ -12271,7 +12271,7 @@ "description": "List all nested list data in a given shared view" } }, - "/api/v1/public/shared-view/{sharedViewUuid}/rows/export/{type}": { + "/api/v1/db/public/shared-view/{sharedViewUuid}/rows/export/{type}": { "parameters": [ { "schema": { @@ -12329,7 +12329,7 @@ ] } }, - "/api/v1/public/shared-view/{sharedViewUuid}/nested/{columnName}": { + "/api/v1/db/public/shared-view/{sharedViewUuid}/nested/{columnName}": { "parameters": [ { "schema": { @@ -12451,7 +12451,7 @@ "description": "List Nested Data Relation" } }, - "/api/v1/public/shared-base/{sharedBaseUuid}/meta": { + "/api/v1/db/public/shared-base/{sharedBaseUuid}/meta": { "parameters": [ { "schema": { @@ -12506,7 +12506,7 @@ ] } }, - "/api/v1/public/shared-view/{sharedViewUuid}/meta": { + "/api/v1/db/public/shared-view/{sharedViewUuid}/meta": { "parameters": [ { "schema": { @@ -12611,7 +12611,7 @@ "description": "Get Share View Meta" } }, - "/api/v1/public/shared-erd/{sharedErdUuid}/meta": { + "/api/v1/db/public/shared-erd/{sharedErdUuid}/meta": { "parameters": [ { "schema": { @@ -12632,7 +12632,7 @@ "parameters": [] } }, - "/api/v1/meta/audits/comments": { + "/api/v1/db/meta/audits/comments": { "parameters": [ { "$ref": "#/components/parameters/xc-auth" @@ -12814,7 +12814,7 @@ ] } }, - "/api/v1/meta/audits/{auditId}/comment": { + "/api/v1/db/meta/audits/{auditId}/comment": { "parameters": [ { "schema": { @@ -12879,7 +12879,7 @@ } } }, - "/api/v1/meta/audits/comments/count": { + "/api/v1/db/meta/audits/comments/count": { "parameters": [ { "$ref": "#/components/parameters/xc-auth" @@ -12967,7 +12967,7 @@ ] } }, - "/api/v1/meta/bases/{baseId}/audits": { + "/api/v1/db/meta/projects/{baseId}/audits": { "parameters": [ { "schema": { @@ -13050,7 +13050,7 @@ ] } }, - "/api/v1/meta/audits/rows/{rowId}/update": { + "/api/v1/db/meta/audits/rows/{rowId}/update": { "parameters": [ { "schema": { @@ -13124,7 +13124,7 @@ ] } }, - "/api/v1/meta/tables/{tableId}/hooks": { + "/api/v1/db/meta/tables/{tableId}/hooks": { "parameters": [ { "schema": { @@ -13271,7 +13271,7 @@ ] } }, - "/api/v1/meta/tables/{tableId}/hooks/test": { + "/api/v1/db/meta/tables/{tableId}/hooks/test": { "parameters": [ { "schema": { @@ -13378,7 +13378,7 @@ ] } }, - "/api/v1/meta/tables/{tableId}/hooks/samplePayload/{operation}/{version}": { + "/api/v1/db/meta/tables/{tableId}/hooks/samplePayload/{operation}/{version}": { "parameters": [ { "schema": { @@ -13472,7 +13472,7 @@ ] } }, - "/api/v1/meta/hooks/{hookId}": { + "/api/v1/db/meta/hooks/{hookId}": { "parameters": [ { "schema": { @@ -13596,7 +13596,7 @@ ] } }, - "/api/v1/meta/plugins": { + "/api/v1/db/meta/plugins": { "parameters": [ { "$ref": "#/components/parameters/xc-auth" @@ -13644,7 +13644,7 @@ ] } }, - "/api/v1/meta/plugins/webhook": { + "/api/v1/db/meta/plugins/webhook": { "parameters": [ { "$ref": "#/components/parameters/xc-auth" @@ -13692,7 +13692,7 @@ ] } }, - "/api/v1/meta/plugins/{pluginTitle}/status": { + "/api/v1/db/meta/plugins/{pluginTitle}/status": { "parameters": [ { "schema": { @@ -13734,7 +13734,7 @@ "x-internal": false } }, - "/api/v1/meta/plugins/test": { + "/api/v1/db/meta/plugins/test": { "parameters": [ { "$ref": "#/components/parameters/xc-auth" @@ -13785,7 +13785,7 @@ } } }, - "/api/v1/meta/plugins/{pluginId}": { + "/api/v1/db/meta/plugins/{pluginId}": { "parameters": [ { "schema": { @@ -13858,7 +13858,7 @@ "x-internal": false } }, - "/api/v1/meta/connection/test": { + "/api/v1/db/meta/connection/test": { "parameters": [ { "$ref": "#/components/parameters/xc-auth" @@ -13987,7 +13987,7 @@ ] } }, - "/api/v1/meta/connection/select": { + "/api/v1/db/meta/connection/select": { "parameters": [], "post": { "summary": "", @@ -14142,7 +14142,7 @@ ] } }, - "/api/v1/meta/nocodb/info": { + "/api/v1/db/meta/nocodb/info": { "parameters": [ { "$ref": "#/components/parameters/xc-auth" @@ -14294,7 +14294,7 @@ ] } }, - "/api/v1/meta/axiosRequestMake": { + "/api/v1/db/meta/axiosRequestMake": { "parameters": [ { "$ref": "#/components/parameters/xc-auth" @@ -14695,7 +14695,7 @@ ] } }, - "/api/v1/meta/cache": { + "/api/v1/db/meta/cache": { "get": { "summary": "Get Cache", "tags": [ @@ -14749,7 +14749,7 @@ } ] }, - "/api/v1/meta/bases/{baseId}/api-tokens": { + "/api/v1/db/meta/projects/{baseId}/api-tokens": { "get": { "summary": "List API Tokens in Base", "tags": [ @@ -14868,7 +14868,7 @@ } ] }, - "/api/v1/meta/bases/{baseId}/api-tokens/{token}": { + "/api/v1/db/meta/projects/{baseId}/api-tokens/{token}": { "delete": { "summary": "Delete API Token", "operationId": "api-token-delete", @@ -14927,7 +14927,7 @@ } ] }, - "/api/v1/storage/upload": { + "/api/v1/db/storage/upload": { "post": { "summary": "Attachment Upload", "operationId": "storage-upload", @@ -14973,7 +14973,7 @@ "description": "Upload attachment" } }, - "/api/v1/storage/upload-by-url": { + "/api/v1/db/storage/upload-by-url": { "post": { "summary": "Attachment Upload by URL", "operationId": "storage-upload-by-url", @@ -15012,7 +15012,7 @@ "description": "Upload attachment by URL. Used in Airtable Migration." } }, - "/api/v1/meta/bases/{baseId}/users/{userId}/resend-invite": { + "/api/v1/db/meta/projects/{baseId}/users/{userId}/resend-invite": { "parameters": [ { "schema": { @@ -15192,7 +15192,7 @@ "description": "Mark all notifications as read" } }, - "/api/v1/meta/tables/{tableId}/columns/hash": { + "/api/v1/db/meta/tables/{tableId}/columns/hash": { "parameters": [ { "schema": { @@ -15238,7 +15238,7 @@ ] } }, - "/api/v1/meta/tables/{tableId}/columns/bulk": { + "/api/v1/db/meta/tables/{tableId}/columns/bulk": { "parameters": [ { "schema": { diff --git a/packages/nocodb/src/services/api-docs/swagger/templates/paths.ts b/packages/nocodb/src/services/api-docs/swagger/templates/paths.ts index d30d90101c..c7cd06ec3e 100644 --- a/packages/nocodb/src/services/api-docs/swagger/templates/paths.ts +++ b/packages/nocodb/src/services/api-docs/swagger/templates/paths.ts @@ -25,7 +25,7 @@ export const getModelPaths = async (ctx: { columns: SwaggerColumn[]; baseName: string; }): Promise<{ [path: string]: any }> => ({ - [`/api/v1/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}`]: { + [`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}`]: { get: { summary: `${ctx.tableName} list`, operationId: `${ctx.tableName.toLowerCase()}-db-table-row-list`, @@ -84,7 +84,7 @@ export const getModelPaths = async (ctx: { } : {}), }, - [`/api/v1/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/{rowId}`]: { + [`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/{rowId}`]: { parameters: [rowIdParam], ...(ctx.type === ModelTypes.TABLE ? { @@ -149,7 +149,7 @@ export const getModelPaths = async (ctx: { } : {}), }, - [`/api/v1/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/count`]: { + [`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/count`]: { get: { summary: `${ctx.tableName} count`, operationId: `${ctx.tableName.toLowerCase()}-count`, @@ -168,7 +168,7 @@ export const getModelPaths = async (ctx: { }, }, }, - [`/api/v1/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/find-one`]: { + [`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/find-one`]: { get: { summary: `${ctx.tableName} find-one`, operationId: `${ctx.tableName.toLowerCase()}-db-table-row-find-one`, @@ -189,7 +189,7 @@ export const getModelPaths = async (ctx: { }, }, }, - [`/api/v1/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/groupby`]: { + [`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/groupby`]: { get: { summary: `${ctx.tableName} groupby`, operationId: `${ctx.tableName.toLowerCase()}-groupby`, @@ -230,7 +230,7 @@ export const getModelPaths = async (ctx: { }, ...(ctx.type === ModelTypes.TABLE ? { - [`/api/v1/data/bulk/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}`]: { + [`/api/v1/db/data/bulk/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}`]: { post: { summary: `${ctx.tableName} bulk insert`, description: @@ -304,7 +304,7 @@ export const getModelPaths = async (ctx: { }, }, }, - [`/api/v1/data/bulk/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/all`]: + [`/api/v1/db/data/bulk/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/all`]: { parameters: [whereParam], patch: { @@ -352,7 +352,7 @@ export const getModelPaths = async (ctx: { ...(isRelationExist(ctx.columns) ? { - [`/api/v1/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/{rowId}/{relationType}/{columnName}`]: + [`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/{rowId}/{relationType}/{columnName}`]: { parameters: [ rowIdParam, @@ -376,7 +376,7 @@ export const getModelPaths = async (ctx: { parameters: [limitParam, offsetParam], }, }, - [`/api/v1/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/{rowId}/{relationType}/{columnName}/{refRowId}`]: + [`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/{rowId}/{relationType}/{columnName}/{refRowId}`]: { parameters: [ rowIdParam, @@ -417,7 +417,7 @@ export const getModelPaths = async (ctx: { tags: [ctx.tableName], }, }, - [`/api/v1/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/{rowId}/{relationType}/{columnName}/exclude`]: + [`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/{rowId}/{relationType}/{columnName}/exclude`]: { parameters: [ rowIdParam, @@ -446,28 +446,29 @@ export const getModelPaths = async (ctx: { : {}), } : {}), - [`/api/v1/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/export/{type}`]: { - parameters: [exportTypeParam], - get: { - summary: 'Rows export', - operationId: `${ctx.tableName.toLowerCase()}-csv-export`, - description: - 'Export all the records from a table.Currently we are only supports `csv` export.', - tags: [ctx.tableName], - responses: { - '200': { - description: 'OK', - content: { - 'application/octet-stream': { - schema: {}, + [`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/export/{type}`]: + { + parameters: [exportTypeParam], + get: { + summary: 'Rows export', + operationId: `${ctx.tableName.toLowerCase()}-csv-export`, + description: + 'Export all the records from a table.Currently we are only supports `csv` export.', + tags: [ctx.tableName], + responses: { + '200': { + description: 'OK', + content: { + 'application/octet-stream': { + schema: {}, + }, }, + headers: csvExportResponseHeader, }, - headers: csvExportResponseHeader, }, + parameters: [csvExportOffsetParam], }, - parameters: [csvExportOffsetParam], }, - }, }); export const getViewPaths = async (ctx: { @@ -478,7 +479,7 @@ export const getViewPaths = async (ctx: { baseName: string; columns: SwaggerColumn[]; }): Promise => ({ - [`/api/v1/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/views/${ctx.viewName}`]: + [`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/views/${ctx.viewName}`]: { get: { summary: `${ctx.viewName} list`, @@ -535,7 +536,7 @@ export const getViewPaths = async (ctx: { } : {}), }, - [`/api/v1/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/views/${ctx.viewName}/count`]: + [`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/views/${ctx.viewName}/count`]: { get: { summary: `${ctx.viewName} count`, @@ -562,7 +563,7 @@ export const getViewPaths = async (ctx: { }, ...(ctx.type === ModelTypes.TABLE ? { - [`/api/v1/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/views/${ctx.viewName}/{rowId}`]: + [`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/views/${ctx.viewName}/{rowId}`]: { parameters: [rowIdParam], get: { @@ -625,7 +626,7 @@ export const getViewPaths = async (ctx: { }, } : {}), - [`/api/v1/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/views/${ctx.viewName}/export/{type}`]: + [`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/views/${ctx.viewName}/export/{type}`]: { parameters: [exportTypeParam], get: { diff --git a/packages/nocodb/tests/unit/factory/base.ts b/packages/nocodb/tests/unit/factory/base.ts index b7aaea7b02..99e8b3e8c5 100644 --- a/packages/nocodb/tests/unit/factory/base.ts +++ b/packages/nocodb/tests/unit/factory/base.ts @@ -59,7 +59,7 @@ const defaultSharedBaseValue = { const createSharedBase = async (app, token, base, sharedBaseArgs = {}) => { await request(app) - .post(`/api/v1/meta/bases/${base.id}/shared`) + .post(`/api/v1/db/meta/projects/${base.id}/shared`) .set('xc-auth', token) .send({ ...defaultSharedBaseValue, @@ -69,7 +69,7 @@ const createSharedBase = async (app, token, base, sharedBaseArgs = {}) => { const createSakilaProject = async (context) => { const response = await request(context.app) - .post('/api/v1/meta/bases/') + .post('/api/v1/db/meta/projects/') .set('xc-auth', context.token) .send(sakilaProjectConfig(context)); @@ -81,7 +81,7 @@ const createProject = async ( baseArgs: ProjectArgs = defaultProjectValue, ) => { const response = await request(context.app) - .post('/api/v1/meta/bases/') + .post('/api/v1/db/meta/projects/') .set('xc-auth', context.token) .send({ ...baseArgs, diff --git a/packages/nocodb/tests/unit/factory/column.ts b/packages/nocodb/tests/unit/factory/column.ts index c41ef956ac..a65fa3fc69 100644 --- a/packages/nocodb/tests/unit/factory/column.ts +++ b/packages/nocodb/tests/unit/factory/column.ts @@ -164,7 +164,7 @@ const customColumns = function (type: string, options: any = {}) { const createColumn = async (context, table, columnAttr) => { await request(context.app) - .post(`/api/v1/meta/tables/${table.id}/columns`) + .post(`/api/v1/db/meta/tables/${table.id}/columns`) .set('xc-auth', context.token) .send({ ...columnAttr, @@ -373,7 +373,7 @@ const updateViewColumn = async ( { view, column, attr }: { column: Column; view: View; attr: any }, ) => { const res = await request(context.app) - .patch(`/api/v1/meta/views/${view.id}/columns/${column.id}`) + .patch(`/api/v1/db/meta/views/${view.id}/columns/${column.id}`) .set('xc-auth', context.token) .send({ ...attr, diff --git a/packages/nocodb/tests/unit/factory/row.ts b/packages/nocodb/tests/unit/factory/row.ts index e0c8b048c1..286c0bed9f 100644 --- a/packages/nocodb/tests/unit/factory/row.ts +++ b/packages/nocodb/tests/unit/factory/row.ts @@ -200,7 +200,7 @@ const rowMixedValue = (column: ColumnType, index: number) => { const getRow = async (context, { base, table, id }) => { const response = await request(context.app) - .get(`/api/v1/data/noco/${base.id}/${table.id}/${id}`) + .get(`/api/v1/db/data/noco/${base.id}/${table.id}/${id}`) .set('xc-auth', context.token); if (response.status !== 200) { @@ -240,7 +240,7 @@ const getOneRow = async ( { base, table }: { base: Base; table: Model }, ) => { const response = await request(context.app) - .get(`/api/v1/data/noco/${base.id}/${table.id}/find-one`) + .get(`/api/v1/db/data/noco/${base.id}/${table.id}/find-one`) .set('xc-auth', context.token); return response.body; @@ -281,7 +281,7 @@ const createRow = async ( const rowData = generateDefaultRowAttributes({ columns, index }); const response = await request(context.app) - .post(`/api/v1/data/noco/${base.id}/${table.id}`) + .post(`/api/v1/db/data/noco/${base.id}/${table.id}`) .set('xc-auth', context.token) .send(rowData); @@ -301,7 +301,7 @@ const createBulkRows = async ( }, ) => { await request(context.app) - .post(`/api/v1/data/bulk/noco/${base.id}/${table.id}`) + .post(`/api/v1/db/data/bulk/noco/${base.id}/${table.id}`) .set('xc-auth', context.token) .send(values) .expect(200); @@ -340,7 +340,7 @@ const createChildRow = async ( await request(context.app) .post( - `/api/v1/data/noco/${base.id}/${table.id}/${rowId}/${type}/${column.title}/${childRowId}`, + `/api/v1/db/data/noco/${base.id}/${table.id}/${rowId}/${type}/${column.title}/${childRowId}`, ) .set('xc-auth', context.token); diff --git a/packages/nocodb/tests/unit/factory/table.ts b/packages/nocodb/tests/unit/factory/table.ts index a2b26572b7..9ccd7232ba 100644 --- a/packages/nocodb/tests/unit/factory/table.ts +++ b/packages/nocodb/tests/unit/factory/table.ts @@ -12,7 +12,7 @@ const defaultTableValue = (context) => ({ const createTable = async (context, base, args = {}) => { const defaultValue = defaultTableValue(context); const response = await request(context.app) - .post(`/api/v1/meta/bases/${base.id}/tables`) + .post(`/api/v1/db/meta/projects/${base.id}/tables`) .set('xc-auth', context.token) .send({ ...defaultValue, ...args }); diff --git a/packages/nocodb/tests/unit/factory/view.ts b/packages/nocodb/tests/unit/factory/view.ts index 4148467e5d..a0945b0666 100644 --- a/packages/nocodb/tests/unit/factory/view.ts +++ b/packages/nocodb/tests/unit/factory/view.ts @@ -31,7 +31,7 @@ const createView = async ( }; const response = await request(context.app) - .post(`/api/v1/meta/tables/${table.id}/${viewTypeStr(type)}`) + .post(`/api/v1/db/meta/tables/${table.id}/${viewTypeStr(type)}`) .set('xc-auth', context.token) .send({ title, @@ -53,7 +53,7 @@ const getView = async ( { table, name }: { table: Model; name: string }, ) => { const response = await request(context.app) - .get(`/api/v1/meta/tables/${table.id}/views`) + .get(`/api/v1/db/meta/tables/${table.id}/views`) .set('xc-auth', context.token); if (response.status !== 200) { throw new Error('List Views', response.body.message); @@ -85,7 +85,7 @@ const updateView = async ( if (filter.length) { for (let i = 0; i < filter.length; i++) { await request(context.app) - .post(`/api/v1/meta/views/${view.id}/filters`) + .post(`/api/v1/db/meta/views/${view.id}/filters`) .set('xc-auth', context.token) .send(filter[i]) .expect(200); @@ -95,7 +95,7 @@ const updateView = async ( if (sort.length) { for (let i = 0; i < sort.length; i++) { await request(context.app) - .post(`/api/v1/meta/views/${view.id}/sorts`) + .post(`/api/v1/db/meta/views/${view.id}/sorts`) .set('xc-auth', context.token) .send(sort[i]) .expect(200); @@ -113,7 +113,7 @@ const updateView = async ( ).id; // configure view to hide selected fields await request(context.app) - .patch(`/api/v1/meta/views/${view.id}/columns/${viewColumnId}`) + .patch(`/api/v1/db/meta/views/${view.id}/columns/${viewColumnId}`) .set('xc-auth', context.token) .send({ show: false }) .expect(200); diff --git a/packages/nocodb/tests/unit/rest/tests/attachment.test.ts b/packages/nocodb/tests/unit/rest/tests/attachment.test.ts index b6c0858ea1..a336f0294f 100644 --- a/packages/nocodb/tests/unit/rest/tests/attachment.test.ts +++ b/packages/nocodb/tests/unit/rest/tests/attachment.test.ts @@ -25,7 +25,7 @@ function attachmentTests() { it('Upload file - Super admin', async () => { const response = await request(context.app) - .post('/api/v1/storage/upload') + .post('/api/v1/db/storage/upload') .attach('files', FILE_PATH) .set('xc-auth', context.token) .expect(200); @@ -37,7 +37,7 @@ function attachmentTests() { it('Upload file - Without token', async () => { const response = await request(context.app) - .post('/api/v1/storage/upload') + .post('/api/v1/db/storage/upload') .attach('files', FILE_PATH) .expect(401); @@ -58,7 +58,7 @@ function attachmentTests() { .expect(200); const response = await request(context.app) - .post('/api/v1/storage/upload') + .post('/api/v1/db/storage/upload') .attach('files', FILE_PATH) .set('xc-auth', signupResponse.body.token) .expect(400); @@ -81,7 +81,7 @@ function attachmentTests() { // update user role to creator const usersListResponse = await request(context.app) - .get('/api/v1/users') + .get('/api/v1/db/users') .set('xc-auth', context.token) .expect(200); @@ -92,7 +92,7 @@ function attachmentTests() { expect(user).to.have.property('roles').to.be.equal(OrgUserRoles.VIEWER); await request(context.app) - .patch('/api/v1/users/' + user.id) + .patch('/api/v1/db/users/' + user.id) .set('xc-auth', context.token) .send({ roles: OrgUserRoles.CREATOR }) .expect(200); @@ -104,7 +104,7 @@ function attachmentTests() { .expect(200); const response = await request(context.app) - .post('/api/v1/storage/upload') + .post('/api/v1/db/storage/upload') .attach('files', FILE_PATH) .set('xc-auth', signinResponse.body.token) .expect(200); @@ -134,7 +134,7 @@ function attachmentTests() { // invite user to base with editor role await request(context.app) - .post(`/api/v1/meta/bases/${newProject.id}/users`) + .post(`/api/v1/db/meta/projects/${newProject.id}/users`) .set('xc-auth', context.token) .send({ roles: ProjectRoles.EDITOR, @@ -152,7 +152,7 @@ function attachmentTests() { .expect(200); const response = await request(context.app) - .post('/api/v1/storage/upload') + .post('/api/v1/db/storage/upload') .attach('files', FILE_PATH) .set('xc-auth', signinResponse.body.token) .expect(200); diff --git a/packages/nocodb/tests/unit/rest/tests/base.test.ts b/packages/nocodb/tests/unit/rest/tests/base.test.ts index cac61c924c..8783f4dc2f 100644 --- a/packages/nocodb/tests/unit/rest/tests/base.test.ts +++ b/packages/nocodb/tests/unit/rest/tests/base.test.ts @@ -39,7 +39,7 @@ function baseTest() { it('Get base info', async () => { await request(context.app) - .get(`/api/v1/meta/bases/${base.id}/info`) + .get(`/api/v1/db/meta/projects/${base.id}/info`) .set('xc-auth', context.token) .send({}) .expect(200); @@ -48,18 +48,18 @@ function baseTest() { // todo: Test by creating models under base and check if the UCL is working it('UI ACL', async () => { await request(context.app) - .get(`/api/v1/meta/bases/${base.id}/visibility-rules`) + .get(`/api/v1/db/meta/projects/${base.id}/visibility-rules`) .set('xc-auth', context.token) .send({}) .expect(200); }); // todo: Test creating visibility set - it('List bases', async () => { + it('List projects', async () => { let response; if (process.env.EE !== 'true') { response = await request(context.app) - .get('/api/v1/meta/bases/') + .get('/api/v1/db/meta/projects/') .set('xc-auth', context.token) .send({}) .expect(200); @@ -71,14 +71,13 @@ function baseTest() { .expect(200); } - if (response.body.list.length !== 1) - new Error('Should list only 1 base'); + if (response.body.list.length !== 1) new Error('Should list only 1 base'); if (!response.body.pageInfo) new Error('Should have pagination info'); }); it('Create base', async () => { const response = await request(context.app) - .post('/api/v1/meta/bases/') + .post('/api/v1/db/meta/projects/') .set('xc-auth', context.token) .send({ title: 'Title1', @@ -92,9 +91,9 @@ function baseTest() { if (!newProject) return new Error('Base not created'); }); - it('Create bases with existing title', async () => { + it('Create projects with existing title', async () => { await request(context.app) - .post(`/api/v1/meta/bases/`) + .post(`/api/v1/db/meta/projects/`) .set('xc-auth', context.token) .send({ title: base.title, @@ -111,7 +110,7 @@ function baseTest() { // title: 'deletedTitle', // }); // await request(app) - // .delete('/api/v1/meta/bases/${toBeDeletedProject.id}') + // .delete('/api/v1/db/meta/projects/${toBeDeletedProject.id}') // .set('xc-auth', token) // .send({ // title: 'Title1', @@ -131,18 +130,17 @@ function baseTest() { it('Read base', async () => { const response = await request(context.app) - .get(`/api/v1/meta/bases/${base.id}`) + .get(`/api/v1/db/meta/projects/${base.id}`) .set('xc-auth', context.token) .send() .expect(200); - if (response.body.id !== base.id) - return new Error('Got the wrong base'); + if (response.body.id !== base.id) return new Error('Got the wrong base'); }); - it('Update bases', async () => { + it('Update projects', async () => { await request(context.app) - .patch(`/api/v1/meta/bases/${base.id}`) + .patch(`/api/v1/db/meta/projects/${base.id}`) .set('xc-auth', context.token) .send({ title: 'NewTitle', @@ -155,7 +153,7 @@ function baseTest() { } }); - it('Update bases with existing title', async function () { + it('Update projects with existing title', async function () { if (process.env.EE !== 'true') { const newProject = await createProject(context, { title: 'NewTitle1', @@ -163,7 +161,7 @@ function baseTest() { // Allow base rename to be replaced with same title await request(context.app) - .patch(`/api/v1/meta/bases/${base.id}`) + .patch(`/api/v1/db/meta/projects/${base.id}`) .set('xc-auth', context.token) .send({ title: newProject.title, @@ -174,7 +172,7 @@ function baseTest() { it('Create base shared base', async () => { await request(context.app) - .post(`/api/v1/meta/bases/${base.id}/shared`) + .post(`/api/v1/db/meta/projects/${base.id}/shared`) .set('xc-auth', context.token) .send({ roles: 'viewer', @@ -195,7 +193,7 @@ function baseTest() { it('Created base shared base should have only editor or viewer role', async () => { await request(context.app) - .post(`/api/v1/meta/bases/${base.id}/shared`) + .post(`/api/v1/db/meta/projects/${base.id}/shared`) .set('xc-auth', context.token) .send({ roles: 'commenter', @@ -214,7 +212,7 @@ function baseTest() { await createSharedBase(context.app, context.token, base); await request(context.app) - .patch(`/api/v1/meta/bases/${base.id}/shared`) + .patch(`/api/v1/db/meta/projects/${base.id}/shared`) .set('xc-auth', context.token) .send({ roles: 'commenter', @@ -233,7 +231,7 @@ function baseTest() { await createSharedBase(context.app, context.token, base); await request(context.app) - .patch(`/api/v1/meta/bases/${base.id}/shared`) + .patch(`/api/v1/db/meta/projects/${base.id}/shared`) .set('xc-auth', context.token) .send({ roles: 'editor', @@ -251,7 +249,7 @@ function baseTest() { await createSharedBase(context.app, context.token, base); await request(context.app) - .get(`/api/v1/meta/bases/${base.id}/shared`) + .get(`/api/v1/db/meta/projects/${base.id}/shared`) .set('xc-auth', context.token) .send() .expect(200); @@ -266,7 +264,7 @@ function baseTest() { await createSharedBase(context.app, context.token, base); await request(context.app) - .delete(`/api/v1/meta/bases/${base.id}/shared`) + .delete(`/api/v1/db/meta/projects/${base.id}/shared`) .set('xc-auth', context.token) .send() .expect(200); @@ -280,7 +278,7 @@ function baseTest() { it('Meta diff sync', async () => { await request(context.app) - .get(`/api/v1/meta/bases/${base.id}/meta-diff`) + .get(`/api/v1/db/meta/projects/${base.id}/meta-diff`) .set('xc-auth', context.token) .send() .expect(200); @@ -288,7 +286,7 @@ function baseTest() { it('Meta diff sync', async () => { await request(context.app) - .post(`/api/v1/meta/bases/${base.id}/meta-diff`) + .post(`/api/v1/db/meta/projects/${base.id}/meta-diff`) .set('xc-auth', context.token) .send() .expect(200); @@ -297,7 +295,7 @@ function baseTest() { // todo: improve test. Check whether the all the actions are present in the response and correct as well it('Meta diff sync', async () => { await request(context.app) - .get(`/api/v1/meta/bases/${base.id}/audits`) + .get(`/api/v1/db/meta/projects/${base.id}/audits`) .set('xc-auth', context.token) .send() .expect(200); diff --git a/packages/nocodb/tests/unit/rest/tests/columnTypeSpecific.test.ts b/packages/nocodb/tests/unit/rest/tests/columnTypeSpecific.test.ts index 29429b0768..1457c89fbe 100644 --- a/packages/nocodb/tests/unit/rest/tests/columnTypeSpecific.test.ts +++ b/packages/nocodb/tests/unit/rest/tests/columnTypeSpecific.test.ts @@ -57,7 +57,7 @@ function columnTypeSpecificTests() { describe('Qr Code Column', () => { it('delivers the same cell values as the referenced column', async () => { const resp = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}`) .set('xc-auth', context.token) .expect(200); expect(resp.body.list[0][qrValueReferenceColumnTitle]).to.eql( @@ -80,7 +80,7 @@ function columnTypeSpecificTests() { ).to.eq(true); const response = await request(context.app) - .delete(`/api/v1/meta/columns/${qrValueReferenceColumn.id}`) + .delete(`/api/v1/db/meta/columns/${qrValueReferenceColumn.id}`) .set('xc-auth', context.token) .send({}); diff --git a/packages/nocodb/tests/unit/rest/tests/filter.test.ts b/packages/nocodb/tests/unit/rest/tests/filter.test.ts index fd833341bb..e9144aee4f 100644 --- a/packages/nocodb/tests/unit/rest/tests/filter.test.ts +++ b/packages/nocodb/tests/unit/rest/tests/filter.test.ts @@ -147,7 +147,7 @@ async function retrieveRecordsAndValidate( // retrieve filtered records const response = await request(context.app) - .get(`/api/v1/data/noco/${base.id}/${table.id}`) + .get(`/api/v1/db/data/noco/${base.id}/${table.id}`) .set('xc-auth', context.token) .query({ filterArrJson: JSON.stringify([filter]), @@ -586,7 +586,7 @@ function filterSelectBased() { async function applyDateFilter(filterParams, expectedRecords) { const response = await request(context.app) - .get(`/api/v1/data/noco/${base.id}/${table.id}`) + .get(`/api/v1/db/data/noco/${base.id}/${table.id}`) .set('xc-auth', context.token) .query({ filterArrJson: JSON.stringify([filterParams]), diff --git a/packages/nocodb/tests/unit/rest/tests/groupby.test.ts b/packages/nocodb/tests/unit/rest/tests/groupby.test.ts index 37abe9fe74..b4bf578603 100644 --- a/packages/nocodb/tests/unit/rest/tests/groupby.test.ts +++ b/packages/nocodb/tests/unit/rest/tests/groupby.test.ts @@ -34,7 +34,7 @@ function groupByTests() { const columns = ( await request(context.app) - .get(`/api/v1/meta/views/${filmView.id}/columns`) + .get(`/api/v1/db/meta/views/${filmView.id}/columns`) .set('xc-auth', context.token) .expect(200) ).body.list; @@ -45,7 +45,7 @@ function groupByTests() { it('Check One GroupBy Column Ascending', async function () { const lengthColumn = filmColumns.find((c) => c.column_name === 'length'); const response = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${filmTable.id}/groupby`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${filmTable.id}/groupby`) .set('xc-auth', context.token) .query({ column_name: lengthColumn.column_name, @@ -65,7 +65,7 @@ function groupByTests() { ); const filterCondition = '(Length,eq,46)'; const response = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${filmTable.id}/groupby`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${filmTable.id}/groupby`) .set('xc-auth', context.token) .query({ column_name: rentalDurationColumn.column_name, @@ -84,7 +84,7 @@ function groupByTests() { const titleColumn = filmColumns.find((c) => c.column_name === 'title'); const filterCondition = '(Length,eq,46)~and(RentalDuration,eq,5)'; const response = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${filmTable.id}/groupby`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${filmTable.id}/groupby`) .set('xc-auth', context.token) .query({ column_name: titleColumn.column_name, @@ -102,7 +102,7 @@ function groupByTests() { it('Check One GroupBy Column With Descending', async function () { const lengthColumn = filmColumns.find((c) => c.column_name === 'length'); const response = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${filmTable.id}/groupby`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${filmTable.id}/groupby`) .set('xc-auth', context.token) .query({ column_name: lengthColumn.column_name, @@ -122,7 +122,7 @@ function groupByTests() { ); const filterCondition = '(Length,eq,46)'; const response = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${filmTable.id}/groupby`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${filmTable.id}/groupby`) .set('xc-auth', context.token) .query({ column_name: rentalDurationColumn.column_name, @@ -141,7 +141,7 @@ function groupByTests() { const titleColumn = filmColumns.find((c) => c.column_name === 'title'); const filterCondition = '(Length,eq,46)~and(RentalDuration,eq,5)'; const response = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${filmTable.id}/groupby`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${filmTable.id}/groupby`) .set('xc-auth', context.token) .query({ column_name: titleColumn.column_name, @@ -172,7 +172,7 @@ function groupByTests() { // Group By Length Column Ascending Order await request(context.app) - .patch(`/api/v1/meta/grid-columns/${lengthColumn.id}`) + .patch(`/api/v1/db/meta/grid-columns/${lengthColumn.id}`) .set('xc-auth', context.token) .send({ group_by: true, @@ -182,7 +182,7 @@ function groupByTests() { .expect(200); // Group By RentalDuration Column Descending await request(context.app) - .patch(`/api/v1/meta/grid-columns/${rentalColumn.id}`) + .patch(`/api/v1/db/meta/grid-columns/${rentalColumn.id}`) .set('xc-auth', context.token) .send({ group_by: true, @@ -192,7 +192,7 @@ function groupByTests() { .expect(200); const columns = ( await request(context.app) - .get(`/api/v1/meta/views/${filmView.id}/columns`) + .get(`/api/v1/db/meta/views/${filmView.id}/columns`) .set('xc-auth', context.token) .expect(200) ).body.list; @@ -226,7 +226,7 @@ function groupByTests() { ], }); const response = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${filmTable.id}/groupby`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${filmTable.id}/groupby`) .set('xc-auth', context.token) .query({ column_name: _lengthColumn.column_name, @@ -243,7 +243,7 @@ function groupByTests() { it('Check One GroupBy Column with Links/Rollup', async function () { const actorsColumn = filmColumns.find((c) => c.title === 'Actors'); const response = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${filmTable.id}/groupby`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${filmTable.id}/groupby`) .set('xc-auth', context.token) .query({ column_name: actorsColumn.title, @@ -285,7 +285,7 @@ function groupByTests() { }); const response = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${filmTable.id}/groupby`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${filmTable.id}/groupby`) .set('xc-auth', context.token) .query({ column_name: 'LanguageName', @@ -307,7 +307,7 @@ function groupByTests() { }); const res = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${filmTable.id}/groupby`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${filmTable.id}/groupby`) .set('xc-auth', context.token) .query({ column_name: 'ActorNames', @@ -326,7 +326,7 @@ function groupByTests() { }); const res = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${filmTable.id}/groupby`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${filmTable.id}/groupby`) .set('xc-auth', context.token) .query({ column_name: formulaColumnTitle, @@ -349,7 +349,7 @@ function groupByTests() { }); const res1 = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${filmTable.id}/groupby`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${filmTable.id}/groupby`) .set('xc-auth', context.token) .query({ column_name: nestedFormulaColumnTitle, diff --git a/packages/nocodb/tests/unit/rest/tests/org.test.ts b/packages/nocodb/tests/unit/rest/tests/org.test.ts index 5368e13813..b6d6a34f6c 100644 --- a/packages/nocodb/tests/unit/rest/tests/org.test.ts +++ b/packages/nocodb/tests/unit/rest/tests/org.test.ts @@ -25,7 +25,7 @@ function authTests() { it('Get users list', async () => { const response = await request(context.app) - .get('/api/v1/users') + .get('/api/v1/db/users') .set('xc-auth', context.token) .expect(200); @@ -35,7 +35,7 @@ function authTests() { it('Invite a new user', async () => { const response = await request(context.app) - .post('/api/v1/users') + .post('/api/v1/db/users') .set('xc-auth', context.token) .send({ email: 'a@nocodb.com' }) .expect(200); @@ -50,12 +50,12 @@ function authTests() { const email = 'a@nocodb.com'; // invite a user await request(context.app) - .post('/api/v1/users') + .post('/api/v1/db/users') .set('xc-auth', context.token) .send({ email }) .expect(200); const response = await request(context.app) - .get('/api/v1/users') + .get('/api/v1/db/users') .set('xc-auth', context.token) .expect(200); expect(response.body.list).to.have.length(2); @@ -65,13 +65,13 @@ function authTests() { expect(user).to.have.property('roles').to.be.equal(OrgUserRoles.VIEWER); await request(context.app) - .patch('/api/v1/users/' + user.id) + .patch('/api/v1/db/users/' + user.id) .set('xc-auth', context.token) .send({ roles: OrgUserRoles.CREATOR }) .expect(200); const response2 = await request(context.app) - .get('/api/v1/users') + .get('/api/v1/db/users') .set('xc-auth', context.token) .expect(200); expect(response2.body.list).to.have.length(2); @@ -85,13 +85,13 @@ function authTests() { const email = 'a@nocodb.com'; // invite a user await request(context.app) - .post('/api/v1/users') + .post('/api/v1/db/users') .set('xc-auth', context.token) .send({ email }) .expect(200); const response = await request(context.app) - .get('/api/v1/users') + .get('/api/v1/db/users') .set('xc-auth', context.token) .expect(200); expect(response.body.list).to.have.length(2); @@ -101,12 +101,12 @@ function authTests() { expect(user).to.have.property('roles').to.be.equal(OrgUserRoles.VIEWER); await request(context.app) - .delete('/api/v1/users/' + user.id) + .delete('/api/v1/db/users/' + user.id) .set('xc-auth', context.token) .expect(200); const response2 = await request(context.app) - .get('/api/v1/users') + .get('/api/v1/db/users') .set('xc-auth', context.token) .expect(200); expect(response2.body.list).to.have.length(1); @@ -114,7 +114,7 @@ function authTests() { it('Get token list', async () => { const response = await request(context.app) - .get('/api/v1/tokens') + .get('/api/v1/db/tokens') .set('xc-auth', context.token) .expect(200); @@ -124,13 +124,13 @@ function authTests() { it('Generate token', async () => { const r = await request(context.app) - .post('/api/v1/tokens') + .post('/api/v1/db/tokens') .set('xc-auth', context.token) .send({ description: 'test' }) .expect(200); const response = await request(context.app) - .get('/api/v1/tokens') + .get('/api/v1/db/tokens') .set('xc-auth', context.token) .expect(200); @@ -145,13 +145,13 @@ function authTests() { it('Delete token', async () => { const r = await request(context.app) - .post('/api/v1/tokens') + .post('/api/v1/db/tokens') .set('xc-auth', context.token) .send({ description: 'test' }) .expect(200); let response = await request(context.app) - .get('/api/v1/tokens') + .get('/api/v1/db/tokens') .set('xc-auth', context.token) .expect(200); @@ -159,12 +159,12 @@ function authTests() { expect(response.body.list).to.have.length(1); await request(context.app) - .delete('/api/v1/tokens/' + r.body.token) + .delete('/api/v1/db/tokens/' + r.body.token) .set('xc-auth', context.token) .expect(200); response = await request(context.app) - .get('/api/v1/tokens') + .get('/api/v1/db/tokens') .set('xc-auth', context.token) .expect(200); diff --git a/packages/nocodb/tests/unit/rest/tests/table.test.ts b/packages/nocodb/tests/unit/rest/tests/table.test.ts index dfb1a4f25d..76cc042ff1 100644 --- a/packages/nocodb/tests/unit/rest/tests/table.test.ts +++ b/packages/nocodb/tests/unit/rest/tests/table.test.ts @@ -40,7 +40,7 @@ function tableStaticTests() { it('Get table list', async function () { const response = await request(context.app) - .get(`/api/v1/meta/bases/${base.id}/tables`) + .get(`/api/v1/db/meta/projects/${base.id}/tables`) .set('xc-auth', context.token) .send({}) .expect(200); @@ -50,7 +50,7 @@ function tableStaticTests() { it('Create table with no table name', async function () { const response = await request(context.app) - .post(`/api/v1/meta/bases/${base.id}/tables`) + .post(`/api/v1/db/meta/projects/${base.id}/tables`) .set('xc-auth', context.token) .send({ table_name: undefined, @@ -79,7 +79,7 @@ function tableStaticTests() { it('Create table with same table name', async function () { const response = await request(context.app) - .post(`/api/v1/meta/bases/${base.id}/tables`) + .post(`/api/v1/db/meta/projects/${base.id}/tables`) .set('xc-auth', context.token) .send({ table_name: table.table_name, @@ -101,7 +101,7 @@ function tableStaticTests() { it('Create table with same title', async function () { const response = await request(context.app) - .post(`/api/v1/meta/bases/${base.id}/tables`) + .post(`/api/v1/db/meta/projects/${base.id}/tables`) .set('xc-auth', context.token) .send({ table_name: 'New_table_name', @@ -123,7 +123,7 @@ function tableStaticTests() { it('Create table with title length more than the limit', async function () { const response = await request(context.app) - .post(`/api/v1/meta/bases/${base.id}/tables`) + .post(`/api/v1/db/meta/projects/${base.id}/tables`) .set('xc-auth', context.token) .send({ table_name: 'a'.repeat(256), @@ -145,7 +145,7 @@ function tableStaticTests() { it('Create table with title having leading white space', async function () { const response = await request(context.app) - .post(`/api/v1/meta/bases/${base.id}/tables`) + .post(`/api/v1/db/meta/projects/${base.id}/tables`) .set('xc-auth', context.token) .send({ table_name: 'table_name_with_whitespace ', @@ -186,7 +186,7 @@ function tableTest() { it('Create table', async function () { const response = await request(context.app) - .post(`/api/v1/meta/bases/${base.id}/tables`) + .post(`/api/v1/db/meta/projects/${base.id}/tables`) .set('xc-auth', context.token) .send({ table_name: 'table2', @@ -216,7 +216,7 @@ function tableTest() { it('Update table', async function () { const response = await request(context.app) - .patch(`/api/v1/meta/tables/${table.id}`) + .patch(`/api/v1/db/meta/tables/${table.id}`) .set('xc-auth', context.token) .send({ base_id: base.id, @@ -232,7 +232,7 @@ function tableTest() { it('Delete table', async function () { const response = await request(context.app) - .delete(`/api/v1/meta/tables/${table.id}`) + .delete(`/api/v1/db/meta/tables/${table.id}`) .set('xc-auth', context.token) .send({}) .expect(200); @@ -249,7 +249,7 @@ function tableTest() { it('Get table', async function () { const response = await request(context.app) - .get(`/api/v1/meta/tables/${table.id}`) + .get(`/api/v1/db/meta/tables/${table.id}`) .set('xc-auth', context.token) .send({}) .expect(200); @@ -261,7 +261,7 @@ function tableTest() { it('Reorder table', async function () { const newOrder = table.order === 0 ? 1 : 0; const response = await request(context.app) - .post(`/api/v1/meta/tables/${table.id}/reorder`) + .post(`/api/v1/db/meta/tables/${table.id}/reorder`) .set('xc-auth', context.token) .send({ order: newOrder, @@ -282,7 +282,7 @@ function tableTest() { it('Add and delete view should update hasNonDefaultViews', async () => { let response = await request(context.app) - .get(`/api/v1/meta/bases/${base.id}/tables`) + .get(`/api/v1/db/meta/projects/${base.id}/tables`) .set('xc-auth', context.token) .send({}) .expect(200); @@ -296,7 +296,7 @@ function tableTest() { }); response = await request(context.app) - .get(`/api/v1/meta/bases/${base.id}/tables`) + .get(`/api/v1/db/meta/projects/${base.id}/tables`) .set('xc-auth', context.token) .send({}) .expect(200); @@ -306,7 +306,7 @@ function tableTest() { await deleteView(context, { viewId: view.id }); response = await request(context.app) - .get(`/api/v1/meta/bases/${base.id}/tables`) + .get(`/api/v1/db/meta/projects/${base.id}/tables`) .set('xc-auth', context.token) .send({}) .expect(200); @@ -316,7 +316,7 @@ function tableTest() { it('Project with empty meta should update hasNonDefaultViews', async () => { let response = await request(context.app) - .get(`/api/v1/meta/bases/${base.id}/tables`) + .get(`/api/v1/db/meta/projects/${base.id}/tables`) .set('xc-auth', context.token) .send({}) .expect(200); @@ -337,7 +337,7 @@ function tableTest() { }); response = await request(context.app) - .get(`/api/v1/meta/bases/${base.id}/tables`) + .get(`/api/v1/db/meta/projects/${base.id}/tables`) .set('xc-auth', context.token) .send({}) .expect(200); @@ -347,7 +347,7 @@ function tableTest() { await deleteView(context, { viewId: view.id }); response = await request(context.app) - .get(`/api/v1/meta/bases/${base.id}/tables`) + .get(`/api/v1/db/meta/projects/${base.id}/tables`) .set('xc-auth', context.token) .send({}) .expect(200); diff --git a/packages/nocodb/tests/unit/rest/tests/tableRow.test.ts b/packages/nocodb/tests/unit/rest/tests/tableRow.test.ts index 3e89daaef7..09fb83cc27 100644 --- a/packages/nocodb/tests/unit/rest/tests/tableRow.test.ts +++ b/packages/nocodb/tests/unit/rest/tests/tableRow.test.ts @@ -60,7 +60,7 @@ function tableStaticTest() { it('Get table data list', async function () { const response = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}`) .set('xc-auth', context.token) .send({}) .expect(200); @@ -79,7 +79,7 @@ function tableStaticTest() { const requiredColumns = customerColumns.filter((_, index) => index < 3); const response = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}`) .set('xc-auth', context.token) .query({ fields: requiredColumns.map((c) => c.title), @@ -104,7 +104,7 @@ function tableStaticTest() { const sortInfo = [{ fk_column_id: firstNameColumn.id, direction: 'desc' }]; const response = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}`) .set('xc-auth', context.token) .query({ fields: visibleColumns.map((c) => c.title), @@ -131,7 +131,7 @@ function tableStaticTest() { const lastPageOffset = Math.trunc(pageInfo.totalRows / pageInfo.pageSize) * pageInfo.pageSize; const lastPageResponse = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}`) .set('xc-auth', context.token) .query({ fields: visibleColumns.map((c) => c.title), @@ -157,7 +157,7 @@ function tableStaticTest() { const sortInfo = [{ fk_column_id: firstNameColumn.id, direction: 'asc' }]; const response = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}`) .set('xc-auth', context.token) .query({ fields: visibleColumns.map((c) => c.title), @@ -184,7 +184,7 @@ function tableStaticTest() { const lastPageOffset = Math.trunc(pageInfo.totalRows / pageInfo.pageSize) * pageInfo.pageSize; const lastPageResponse = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}`) .set('xc-auth', context.token) .query({ fields: visibleColumns.map((c) => c.title), @@ -204,7 +204,7 @@ function tableStaticTest() { }); it('Create table row with wrong table id', async function () { const response = await request(context.app) - .post(`/api/v1/data/noco/${base.id}/wrong-table-id`) + .post(`/api/v1/db/data/noco/${base.id}/wrong-table-id`) .set('xc-auth', context.token) .send({ title: 'Test', @@ -222,7 +222,7 @@ function tableStaticTest() { let response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/find-one`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/find-one`, ) .set('xc-auth', context.token) .query({ @@ -243,7 +243,7 @@ function tableStaticTest() { response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/find-one`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/find-one`, ) .set('xc-auth', context.token) .query({ @@ -264,7 +264,7 @@ function tableStaticTest() { }); it('Read table row', async function () { const listResponse = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}`) .set('xc-auth', context.token) .expect(200); @@ -272,7 +272,7 @@ function tableStaticTest() { const readResponse = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/${row['CustomerId']}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${row['CustomerId']}`, ) .set('xc-auth', context.token) .expect(200); @@ -292,7 +292,7 @@ function tableStaticTest() { }); const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/`, + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/`, ) .set('xc-auth', context.token) .query({ @@ -311,7 +311,7 @@ function tableStaticTest() { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/${row['CustomerId']}/exist`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${row['CustomerId']}/exist`, ) .set('xc-auth', context.token) .expect(200); @@ -323,7 +323,7 @@ function tableStaticTest() { it('Exist should be false table row when it does not exists', async function () { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/998546/exist`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/998546/exist`, ) .set('xc-auth', context.token) .expect(200); @@ -336,7 +336,7 @@ function tableStaticTest() { it('Export csv', async () => { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.title}/export/csv`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.title}/export/csv`, ) .set('xc-auth', context.token) .expect(200); @@ -354,7 +354,7 @@ function tableStaticTest() { it('Export excel', async () => { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.title}/export/excel`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.title}/export/excel`, ) .set('xc-auth', context.token) .expect(200); @@ -378,7 +378,7 @@ function tableStaticTest() { )!; const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}`, ) .set('xc-auth', context.token) .expect(200); @@ -396,7 +396,7 @@ function tableStaticTest() { )!; const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}`, ) .set('xc-auth', context.token) .query({ @@ -421,7 +421,7 @@ function tableStaticTest() { )!; const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/wrong-id/${rowId}/hm/${rentalListColumn.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/wrong-id/${rowId}/hm/${rentalListColumn.id}`, ) .set('xc-auth', context.token) .expect(404); @@ -442,7 +442,7 @@ function tableStaticTest() { )!; const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}`, ) .set('xc-auth', context.token) .expect(200); @@ -465,7 +465,7 @@ function tableStaticTest() { )!; const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}`, ) .set('xc-auth', context.token) .query({ @@ -495,7 +495,7 @@ function tableStaticTest() { )!; const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/invalid-table-id/${rowId}/mm/${filmListColumn.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/invalid-table-id/${rowId}/mm/${filmListColumn.id}`, ) .set('xc-auth', context.token) .expect(404); @@ -513,7 +513,7 @@ function tableStaticTest() { const refId = 1; const response = await request(context.app) .post( - `/api/v1/data/noco/${sakilaProject.id}/invalid-table-id/${rowId}/hm/${rentalListColumn.id}/${refId}`, + `/api/v1/db/data/noco/${sakilaProject.id}/invalid-table-id/${rowId}/hm/${rentalListColumn.id}/${refId}`, ) .set('xc-auth', context.token) .expect(404); @@ -530,7 +530,7 @@ function tableStaticTest() { const refId = 1; const response = await request(context.app) .post( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${firstNameColumn.id}/${refId}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${firstNameColumn.id}/${refId}`, ) .set('xc-auth', context.token) .expect(404); @@ -546,7 +546,7 @@ function tableStaticTest() { const response = await request(context.app) .post( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/invalid-column/${refId}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/invalid-column/${refId}`, ) .set('xc-auth', context.token) .expect(404); @@ -566,7 +566,7 @@ function tableStaticTest() { await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${firstNameColumn.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${firstNameColumn.id}`, ) .set('xc-auth', context.token) .expect(400); @@ -579,7 +579,7 @@ function tableStaticTest() { await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/mm/${firstNameColumn.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/mm/${firstNameColumn.id}`, ) .set('xc-auth', context.token) .expect(400); @@ -592,7 +592,7 @@ function tableStaticTest() { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}/exclude`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}/exclude`, ) .set('xc-auth', context.token) .expect(200); @@ -610,7 +610,7 @@ function tableStaticTest() { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}/exclude`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}/exclude`, ) .set('xc-auth', context.token) .query({ @@ -641,7 +641,7 @@ function tableStaticTest() { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}/exclude`, + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}/exclude`, ) .set('xc-auth', context.token) .expect(200); @@ -663,7 +663,7 @@ function tableStaticTest() { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}/exclude`, + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}/exclude`, ) .set('xc-auth', context.token) .query({ @@ -694,7 +694,7 @@ function tableStaticTest() { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${addressTable.id}/${rowId}/bt/${cityColumn.id}/exclude`, + `/api/v1/db/data/noco/${sakilaProject.id}/${addressTable.id}/${rowId}/bt/${cityColumn.id}/exclude`, ) .set('xc-auth', context.token) .expect(200); @@ -714,7 +714,7 @@ function tableStaticTest() { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${addressTable.id}/${rowId}/bt/${cityColumn.id}/exclude`, + `/api/v1/db/data/noco/${sakilaProject.id}/${addressTable.id}/${rowId}/bt/${cityColumn.id}/exclude`, ) .set('xc-auth', context.token) .query({ @@ -735,7 +735,7 @@ function tableStaticTest() { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/Film/group/${ratingColumn.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/Film/group/${ratingColumn.id}`, ) .set('xc-auth', context.token) .expect(200); @@ -792,7 +792,7 @@ function tableTest() { }); const ascResponse = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}`) .set('xc-auth', context.token) .query({ sortArrJson: JSON.stringify([ @@ -804,7 +804,7 @@ function tableTest() { throw new Error('Wrong sort'); const descResponse = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}`) .set('xc-auth', context.token) .query({ sortArrJson: JSON.stringify([ @@ -831,7 +831,7 @@ function tableTest() { }); const ascResponse = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${rentalTable.id}`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${rentalTable.id}`) .set('xc-auth', context.token) .query({ sortArrJson: JSON.stringify([ @@ -844,7 +844,7 @@ function tableTest() { throw new Error('Wrong sort'); const descResponse = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${rentalTable.id}`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${rentalTable.id}`) .set('xc-auth', context.token) .query({ sortArrJson: JSON.stringify([ @@ -879,7 +879,7 @@ function tableTest() { }; const response = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${rentalTable.id}`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${rentalTable.id}`) .set('xc-auth', context.token) .query({ filterArrJson: JSON.stringify([filter]), @@ -914,7 +914,7 @@ function tableTest() { }; const response = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}`) .set('xc-auth', context.token) .query({ filterArrJson: JSON.stringify([filter]), @@ -957,7 +957,7 @@ function tableTest() { }; const response = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${rentalTable.id}`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${rentalTable.id}`) .set('xc-auth', context.token) .query({ filterArrJson: JSON.stringify([nestedFilter]), @@ -967,7 +967,7 @@ function tableTest() { expect(response.body.pageInfo.totalRows).equal(9558); const ascResponse = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${rentalTable.id}`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${rentalTable.id}`) .set('xc-auth', context.token) .query({ filterArrJson: JSON.stringify([nestedFilter]), @@ -984,7 +984,7 @@ function tableTest() { expect(ascResponse.body.list[0][lookupColumn.title]).equal('AARON'); const descResponse = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${rentalTable.id}`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${rentalTable.id}`) .set('xc-auth', context.token) .query({ filterArrJson: JSON.stringify([nestedFilter]), @@ -1051,7 +1051,7 @@ function tableTest() { }; const response = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${rentalTable.id}`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${rentalTable.id}`) .set('xc-auth', context.token) .query({ filterArrJson: JSON.stringify([nestedFilter]), @@ -1067,7 +1067,7 @@ function tableTest() { throw new Error('Wrong filter'); const ascResponse = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${rentalTable.id}`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${rentalTable.id}`) .set('xc-auth', context.token) .query({ filterArrJson: JSON.stringify([nestedFilter]), @@ -1091,7 +1091,7 @@ function tableTest() { } const descResponse = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${rentalTable.id}`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${rentalTable.id}`) .set('xc-auth', context.token) .query({ filterArrJson: JSON.stringify([nestedFilter]), @@ -1180,7 +1180,7 @@ function tableTest() { ]; const response = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}`) .set('xc-auth', context.token) .query({ filterArrJson: JSON.stringify([nestedFilter]), @@ -1198,7 +1198,7 @@ function tableTest() { } const ascResponse = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}`) .set('xc-auth', context.token) .query({ filterArrJson: JSON.stringify([nestedFilter]), @@ -1234,7 +1234,7 @@ function tableTest() { } const descResponse = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}`) .set('xc-auth', context.token) .query({ filterArrJson: JSON.stringify([nestedFilter]), @@ -1327,7 +1327,7 @@ function tableTest() { ]; const ascResponse = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}`) .set('xc-auth', context.token) .query({ nested: nestedFields, @@ -1383,7 +1383,7 @@ function tableTest() { }); const response = await request(context.app) - .get(`/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}`) + .get(`/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}`) .set('xc-auth', context.token) .query({ sortArrJson: JSON.stringify([ @@ -1440,7 +1440,7 @@ function tableTest() { // console.log(formulaColumn); // const response = await request(context.app) - // .get(`/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}`) + // .get(`/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}`) // .set('xc-auth', context.token) // .query({ // sortArrJson: JSON.stringify([ @@ -1459,7 +1459,7 @@ function tableTest() { const table = await createTable(context, base); const response = await request(context.app) - .post(`/api/v1/data/noco/${base.id}/${table.id}`) + .post(`/api/v1/db/data/noco/${base.id}/${table.id}`) .set('xc-auth', context.token) .send({ title: 'Test', @@ -1489,7 +1489,7 @@ function tableTest() { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/find-one`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/find-one`, ) .set('xc-auth', context.token) .query({ @@ -1569,7 +1569,7 @@ function tableTest() { const ascResponse = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/find-one`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/find-one`, ) .set('xc-auth', context.token) .query({ @@ -1613,7 +1613,7 @@ function tableTest() { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/groupby`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/groupby`, ) .set('xc-auth', context.token) .query({ @@ -1649,7 +1649,7 @@ function tableTest() { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/groupby`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/groupby`, ) .set('xc-auth', context.token) .query({ @@ -1672,7 +1672,7 @@ function tableTest() { const row = await createRow(context, { base, table }); const updateResponse = await request(context.app) - .patch(`/api/v1/data/noco/${base.id}/${table.id}/${row['Id']}`) + .patch(`/api/v1/db/data/noco/${base.id}/${table.id}/${row['Id']}`) .set('xc-auth', context.token) .send({ title: 'Updated', @@ -1697,7 +1697,7 @@ function tableTest() { const row = await createRow(context, { base, table }); await request(context.app) - .patch(`/api/v1/data/noco/${base.id}/${table.id}/${row['Id']}`) + .patch(`/api/v1/db/data/noco/${base.id}/${table.id}/${row['Id']}`) .set('xc-auth', context.token) .send({ [emailColumn.column_name]: 'invalidemail', @@ -1721,7 +1721,7 @@ function tableTest() { const row = await createRow(context, { base, table }); const response = await request(context.app) - .patch(`/api/v1/data/noco/${base.id}/${table.id}/${row['Id']}`) + .patch(`/api/v1/db/data/noco/${base.id}/${table.id}/${row['Id']}`) .set('xc-auth', context.token) .send({ [emailColumn.column_name]: 'valid@example.com', @@ -1743,7 +1743,7 @@ function tableTest() { const row = await createRow(context, { base, table }); await request(context.app) - .delete(`/api/v1/data/noco/${base.id}/${table.id}/${row['Id']}`) + .delete(`/api/v1/db/data/noco/${base.id}/${table.id}/${row['Id']}`) .set('xc-auth', context.token) .expect(200); @@ -1779,7 +1779,7 @@ function tableTest() { }); await request(context.app) - .delete(`/api/v1/data/noco/${base.id}/${table.id}/${row['Id']}`) + .delete(`/api/v1/db/data/noco/${base.id}/${table.id}/${row['Id']}`) .set('xc-auth', context.token) .expect(200); @@ -1798,7 +1798,7 @@ function tableTest() { .map((index) => generateDefaultRowAttributes({ columns, index })); const response = await request(context.app) - .post(`/api/v1/data/bulk/noco/${base.id}/${table.id}`) + .post(`/api/v1/db/data/bulk/noco/${base.id}/${table.id}`) .set('xc-auth', context.token) .send(rowAttributes) .expect(200); @@ -1835,7 +1835,7 @@ function tableTest() { .map((index) => generateDefaultRowAttributes({ columns, index })); const response = await request(context.app) - .post(`/api/v1/data/bulk/noco/${base.id}/${table.id}`) + .post(`/api/v1/db/data/bulk/noco/${base.id}/${table.id}`) .set('xc-auth', context.token) .send(rowAttributes) .expect(200); @@ -1883,7 +1883,7 @@ function tableTest() { const rows = await listRow({ base, table }); await request(context.app) - .patch(`/api/v1/data/bulk/noco/${base.id}/${table.id}`) + .patch(`/api/v1/db/data/bulk/noco/${base.id}/${table.id}`) .set('xc-auth', context.token) .send( rows.map((row) => ({ title: `new-${row['Title']}`, id: row['Id'] })), @@ -1912,7 +1912,7 @@ function tableTest() { const rows = await listRow({ base, table }); await request(context.app) - .delete(`/api/v1/data/bulk/noco/${base.id}/${table.id}`) + .delete(`/api/v1/db/data/bulk/noco/${base.id}/${table.id}`) .set('xc-auth', context.token) .send(rows.map((row) => ({ id: row['Id'] }))) .expect(200); @@ -1939,7 +1939,7 @@ function tableTest() { // const rows = await listRow({ base, table }); // await request(context.app) - // .delete(`/api/v1/data/bulk/noco/${base.id}/${table.id}/all`) + // .delete(`/api/v1/db/data/bulk/noco/${base.id}/${table.id}/all`) // .set('xc-auth', context.token) // .query({ filterArr: [ // { @@ -1976,7 +1976,7 @@ function tableTest() { // (column) => column.title === 'Rentals' // )!; // const response = await request(context.app) - // .get(`/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}`) + // .get(`/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}`) // .query({ // fields: visibleColumns.map((c) => c.title), // }) @@ -2002,12 +2002,12 @@ function tableTest() { // const refId = 1; // await request(context.app) - // .post(`/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}/${refId}`) + // .post(`/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}/${refId}`) // .set('xc-auth', context.token) // .expect(400) // await request(context.app) - // .post(`/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}/${refId}`) + // .post(`/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}/${refId}`) // .set('xc-auth', context.token) // .expect(400) // }) @@ -2021,14 +2021,14 @@ function tableTest() { const lisResponseBeforeUpdate = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}`, ) .set('xc-auth', context.token) .expect(200); await request(context.app) .post( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}/${refId}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}/${refId}`, ) .set('xc-auth', context.token) .expect(200); @@ -2036,7 +2036,7 @@ function tableTest() { const lisResponseAfterUpdate = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}`, ) .set('xc-auth', context.token) .expect(200); @@ -2059,7 +2059,7 @@ function tableTest() { const response = await request(context.app) .post( - `/api/v1/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/invalid-column/${refId}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/invalid-column/${refId}`, ) .set('xc-auth', context.token) .expect(404); @@ -2084,7 +2084,7 @@ function tableTest() { const refId = 1; const response = await request(context.app) .post( - `/api/v1/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${firstNameColumn.id}/${refId}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${firstNameColumn.id}/${refId}`, ) .set('xc-auth', context.token) .expect(404); @@ -2108,7 +2108,7 @@ function tableTest() { await request(context.app) .post( - `/api/v1/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}/${refId}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}/${refId}`, ) .set('xc-auth', context.token) .expect(400); @@ -2130,14 +2130,14 @@ function tableTest() { const lisResponseBeforeUpdate = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}`, ) .set('xc-auth', context.token) .expect(200); await request(context.app) .post( - `/api/v1/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}/${refId}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}/${refId}`, ) .set('xc-auth', context.token) .expect(200); @@ -2145,7 +2145,7 @@ function tableTest() { const lisResponseAfterUpdate = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}`, ) .set('xc-auth', context.token) .expect(200); @@ -2171,14 +2171,14 @@ function tableTest() { const lisResponseBeforeDelete = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}`, ) .set('xc-auth', context.token) .expect(200); await request(context.app) .delete( - `/api/v1/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}/${refId}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}/${refId}`, ) .set('xc-auth', context.token) .expect(200); @@ -2186,7 +2186,7 @@ function tableTest() { const lisResponseAfterDelete = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${actorTable.id}/${rowId}/mm/${filmListColumn.id}`, ) .set('xc-auth', context.token) .expect(200); @@ -2211,7 +2211,7 @@ function tableTest() { const response = await request(context.app) .delete( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}/${refId}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/${rowId}/hm/${rentalListColumn.id}/${refId}`, ) .set('xc-auth', context.token) .expect(400); @@ -2259,7 +2259,7 @@ function tableTest() { const childRow = (await listRow({ base, table: relatedTable }))[0]; const response = await request(context.app) .delete( - `/api/v1/data/noco/${base.id}/${table.id}/${row['Id']}/hm/${ltarColumn.id}/${childRow['Id']}`, + `/api/v1/db/data/noco/${base.id}/${table.id}/${row['Id']}/hm/${ltarColumn.id}/${childRow['Id']}`, ) .set('xc-auth', context.token) .expect(200); @@ -2286,7 +2286,7 @@ function tableTest() { const response = await request(context.app) .post( - `/api/v1/data/noco/${sakilaProject.id}/invalid-table-id/${rowId}/hm/${rentalListColumn.id}/exclude`, + `/api/v1/db/data/noco/${sakilaProject.id}/invalid-table-id/${rowId}/hm/${rentalListColumn.id}/exclude`, ) .set('xc-auth', context.token) .expect(404); @@ -2308,7 +2308,7 @@ function tableTest() { )!; const response = await request(context.app) .post( - `/api/v1/data/noco/${sakilaProject.id}/invalid-table-id/${rowId}/mm/${filmListColumn.id}/exclude`, + `/api/v1/db/data/noco/${sakilaProject.id}/invalid-table-id/${rowId}/mm/${filmListColumn.id}/exclude`, ) .set('xc-auth', context.token) .expect(404); diff --git a/packages/nocodb/tests/unit/rest/tests/viewRow.test.ts b/packages/nocodb/tests/unit/rest/tests/viewRow.test.ts index f6c9476be3..293fece88a 100644 --- a/packages/nocodb/tests/unit/rest/tests/viewRow.test.ts +++ b/packages/nocodb/tests/unit/rest/tests/viewRow.test.ts @@ -56,7 +56,7 @@ let filmKanbanView: View; const testGetViewRowList = async (view: View) => { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}`, ) .set('xc-auth', context.token) .expect(200); @@ -72,7 +72,7 @@ const testGetViewRowListKanban = async (view: View) => { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${filmTable.id}/views/${view.id}/group/${ratingColumn.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${filmTable.id}/views/${view.id}/group/${ratingColumn.id}`, ) .set('xc-auth', context.token) .expect(200); @@ -155,7 +155,7 @@ function viewRowStaticTests() { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}`, ) .set('xc-auth', context.token) .query({ @@ -198,7 +198,7 @@ function viewRowStaticTests() { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${filmTable.id}/views/${view.id}/group/${ratingColumn.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${filmTable.id}/views/${view.id}/group/${ratingColumn.id}`, ) .set('xc-auth', context.token) .query({ @@ -230,7 +230,7 @@ function viewRowStaticTests() { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}`, ) .set('xc-auth', context.token) .query({ @@ -258,7 +258,7 @@ function viewRowStaticTests() { Math.trunc(pageInfo.totalRows / pageInfo.pageSize) * pageInfo.pageSize; const lastPageResponse = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}`, ) .set('xc-auth', context.token) .query({ @@ -298,7 +298,7 @@ function viewRowStaticTests() { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${filmTable.id}/views/${view.id}/group/${ratingColumn.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${filmTable.id}/views/${view.id}/group/${ratingColumn.id}`, ) .set('xc-auth', context.token) .query({ @@ -329,7 +329,7 @@ function viewRowStaticTests() { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}`, ) .set('xc-auth', context.token) .query({ @@ -357,7 +357,7 @@ function viewRowStaticTests() { Math.trunc(pageInfo.totalRows / pageInfo.pageSize) * pageInfo.pageSize; const lastPageResponse = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}`, ) .set('xc-auth', context.token) .query({ @@ -397,7 +397,7 @@ function viewRowStaticTests() { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${filmTable.id}/views/${view.id}/group/${ratingColumn.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${filmTable.id}/views/${view.id}/group/${ratingColumn.id}`, ) .set('xc-auth', context.token) .query({ @@ -498,7 +498,7 @@ function viewRowTests() { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${rentalTable.id}/views/${view.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${rentalTable.id}/views/${view.id}`, ) .set('xc-auth', context.token) .query({ @@ -509,7 +509,7 @@ function viewRowTests() { const ascResponse = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${rentalTable.id}/views/${view.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${rentalTable.id}/views/${view.id}`, ) .set('xc-auth', context.token) .query({ @@ -528,7 +528,7 @@ function viewRowTests() { const descResponse = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${rentalTable.id}/views/${view.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${rentalTable.id}/views/${view.id}`, ) .set('xc-auth', context.token) .query({ @@ -620,7 +620,7 @@ function viewRowTests() { const ascResponse = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}`, ) .set('xc-auth', context.token) .query({ @@ -664,7 +664,7 @@ function viewRowTests() { }); const response = await request(context.app) - .post(`/api/v1/data/noco/${base.id}/${table.id}/views/${view.id}`) + .post(`/api/v1/db/data/noco/${base.id}/${table.id}/views/${view.id}`) .set('xc-auth', context.token) .send({ title: 'Test', @@ -701,7 +701,7 @@ function viewRowTests() { await request(context.app) .post( - `/api/v1/data/noco/${base.id}/${table.id}/views/${nonRelatedView.id}`, + `/api/v1/db/data/noco/${base.id}/${table.id}/views/${nonRelatedView.id}`, ) .set('xc-auth', context.token) .send({ @@ -743,7 +743,7 @@ function viewRowTests() { let response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}/find-one`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}/find-one`, ) .set('xc-auth', context.token) .query({ @@ -764,7 +764,7 @@ function viewRowTests() { response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}/find-one`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}/find-one`, ) .set('xc-auth', context.token) .query({ @@ -867,7 +867,7 @@ function viewRowTests() { const ascResponse = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}/find-one`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}/find-one`, ) .set('xc-auth', context.token) .query({ @@ -929,7 +929,7 @@ function viewRowTests() { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}/groupby`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}/groupby`, ) .set('xc-auth', context.token) .query({ @@ -980,7 +980,7 @@ function viewRowTests() { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}/groupby`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}/groupby`, ) .set('xc-auth', context.token) .query({ @@ -1016,7 +1016,7 @@ function viewRowTests() { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}/count`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}/count`, ) .set('xc-auth', context.token) .expect(200); @@ -1040,7 +1040,7 @@ function viewRowTests() { const listResponse = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}`, ) .set('xc-auth', context.token) .expect(200); @@ -1049,7 +1049,7 @@ function viewRowTests() { const readResponse = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}/${row['CustomerId']}`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}/${row['CustomerId']}`, ) .set('xc-auth', context.token) .expect(200); @@ -1078,7 +1078,7 @@ function viewRowTests() { const updateResponse = await request(context.app) .patch( - `/api/v1/data/noco/${base.id}/${table.id}/views/${view.id}/${row['Id']}`, + `/api/v1/db/data/noco/${base.id}/${table.id}/views/${view.id}/${row['Id']}`, ) .set('xc-auth', context.token) .send({ @@ -1122,7 +1122,7 @@ function viewRowTests() { await request(context.app) .patch( - `/api/v1/data/noco/${base.id}/${table.id}/views/${view.id}/${row['Id']}`, + `/api/v1/db/data/noco/${base.id}/${table.id}/views/${view.id}/${row['Id']}`, ) .set('xc-auth', context.token) .send({ @@ -1164,7 +1164,7 @@ function viewRowTests() { const response = await request(context.app) .patch( - `/api/v1/data/noco/${base.id}/${table.id}/views/${view.id}/${row['Id']}`, + `/api/v1/db/data/noco/${base.id}/${table.id}/views/${view.id}/${row['Id']}`, ) .set('xc-auth', context.token) .send({ @@ -1202,7 +1202,7 @@ function viewRowTests() { await request(context.app) .delete( - `/api/v1/data/noco/${base.id}/${table.id}/views/${view.id}/${row['Id']}`, + `/api/v1/db/data/noco/${base.id}/${table.id}/views/${view.id}/${row['Id']}`, ) .set('xc-auth', context.token) .expect(200); @@ -1256,7 +1256,7 @@ function viewRowTests() { await request(context.app) .delete( - `/api/v1/data/noco/${base.id}/${table.id}/views/${view.id}/${row['Id']}`, + `/api/v1/db/data/noco/${base.id}/${table.id}/views/${view.id}/${row['Id']}`, ) .set('xc-auth', context.token) .expect(200); @@ -1289,7 +1289,7 @@ function viewRowTests() { const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}/${row['CustomerId']}/exist`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}/${row['CustomerId']}/exist`, ) .set('xc-auth', context.token) .expect(200); @@ -1312,7 +1312,7 @@ function viewRowTests() { }); const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}/999999/exist`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.id}/views/${view.id}/999999/exist`, ) .set('xc-auth', context.token) .expect(200); @@ -1335,7 +1335,7 @@ function viewRowTests() { }); const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.title}/views/${view.id}/export/csv`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.title}/views/${view.id}/export/csv`, ) .set('xc-auth', context.token) .expect(200); @@ -1359,7 +1359,7 @@ function viewRowTests() { }); const response = await request(context.app) .get( - `/api/v1/data/noco/${sakilaProject.id}/${customerTable.title}/views/${view.id}/export/excel`, + `/api/v1/db/data/noco/${sakilaProject.id}/${customerTable.title}/views/${view.id}/export/excel`, ) .set('xc-auth', context.token) .expect(200); diff --git a/tests/playwright/pages/Account/AppStore.ts b/tests/playwright/pages/Account/AppStore.ts index 6935ee82a3..ac72c0823a 100644 --- a/tests/playwright/pages/Account/AppStore.ts +++ b/tests/playwright/pages/Account/AppStore.ts @@ -13,7 +13,7 @@ export class AccountAppStorePage extends BasePage { await this.waitForResponse({ uiAction: () => this.rootPage.goto('/#/account/apps', { waitUntil: 'networkidle' }), httpMethodsToMatch: ['GET'], - requestUrlPathToMatch: 'api/v1/meta/plugins', + requestUrlPathToMatch: '/api/v1/db/meta/plugins', }); } diff --git a/tests/playwright/pages/Account/ChangePassword.ts b/tests/playwright/pages/Account/ChangePassword.ts index af414c4c25..b4a976b5d5 100644 --- a/tests/playwright/pages/Account/ChangePassword.ts +++ b/tests/playwright/pages/Account/ChangePassword.ts @@ -43,7 +43,7 @@ export class ChangePasswordPage extends BasePage { await this.waitForResponse({ uiAction: submitChangePassword, httpMethodsToMatch: ['POST'], - requestUrlPathToMatch: 'api/v1/auth/password/change', + requestUrlPathToMatch: 'api/v1/db/auth/password/change', }); } else { await submitChangePassword(); diff --git a/tests/playwright/pages/Dashboard/BulkUpdate/index.ts b/tests/playwright/pages/Dashboard/BulkUpdate/index.ts index b271581721..f48865a894 100644 --- a/tests/playwright/pages/Dashboard/BulkUpdate/index.ts +++ b/tests/playwright/pages/Dashboard/BulkUpdate/index.ts @@ -181,7 +181,7 @@ export class BulkUpdatePage extends BasePage { } else { await this.waitForResponse({ uiAction: saveRowAction, - requestUrlPathToMatch: 'api/v1/data/noco/', + requestUrlPathToMatch: 'api/v1/db/data/noco/', httpMethodsToMatch: ['GET'], responseJsonMatcher: json => json['pageInfo'], }); diff --git a/tests/playwright/pages/Dashboard/ExpandedForm/index.ts b/tests/playwright/pages/Dashboard/ExpandedForm/index.ts index d875a8e014..bcc92d406b 100644 --- a/tests/playwright/pages/Dashboard/ExpandedForm/index.ts +++ b/tests/playwright/pages/Dashboard/ExpandedForm/index.ts @@ -113,14 +113,14 @@ export class ExpandedFormPage extends BasePage { if (waitForRowsData) { await this.waitForResponse({ uiAction: saveRowAction, - requestUrlPathToMatch: 'api/v1/data/noco/', + requestUrlPathToMatch: 'api/v1/db/data/noco/', httpMethodsToMatch: ['GET'], responseJsonMatcher: json => json['pageInfo'], }); } else { await this.waitForResponse({ uiAction: saveRowAction, - requestUrlPathToMatch: 'api/v1/data/noco/', + requestUrlPathToMatch: 'api/v1/db/data/noco/', httpMethodsToMatch: ['POST'], }); } diff --git a/tests/playwright/pages/Dashboard/Form/index.ts b/tests/playwright/pages/Dashboard/Form/index.ts index d01e716c2f..c288acfafb 100644 --- a/tests/playwright/pages/Dashboard/Form/index.ts +++ b/tests/playwright/pages/Dashboard/Form/index.ts @@ -164,7 +164,7 @@ export class FormPage extends BasePage { await this.formHeading.fill(param.title); await this.formSubHeading.click(); }, - requestUrlPathToMatch: 'api/v1/meta/forms', + requestUrlPathToMatch: '/api/v1/db/meta/forms', httpMethodsToMatch: ['PATCH'], }); await this.waitForResponse({ @@ -173,7 +173,7 @@ export class FormPage extends BasePage { await this.formSubHeading.fill(param.subtitle); await this.formHeading.click(); }, - requestUrlPathToMatch: 'api/v1/meta/forms', + requestUrlPathToMatch: '/api/v1/db/meta/forms', httpMethodsToMatch: ['PATCH'], }); } @@ -208,7 +208,7 @@ export class FormPage extends BasePage { const waitForResponse = async (action: () => Promise) => await this.waitForResponse({ uiAction: action, - requestUrlPathToMatch: 'api/v1/meta/form-columns', + requestUrlPathToMatch: '/api/v1/db/meta/form-columns', httpMethodsToMatch: ['PATCH'], }); @@ -272,7 +272,7 @@ export class FormPage extends BasePage { await this.afterSubmitMsg.click(); await this.afterSubmitMsg.fill(param.message); }, - requestUrlPathToMatch: 'api/v1/meta/forms', + requestUrlPathToMatch: '/api/v1/db/meta/forms', httpMethodsToMatch: ['PATCH'], }); } diff --git a/tests/playwright/pages/Dashboard/Grid/Column/index.ts b/tests/playwright/pages/Dashboard/Grid/Column/index.ts index 876e7b348d..e8741556ed 100644 --- a/tests/playwright/pages/Dashboard/Grid/Column/index.ts +++ b/tests/playwright/pages/Dashboard/Grid/Column/index.ts @@ -337,7 +337,7 @@ export class ColumnPageObject extends BasePage { await this.waitForResponse({ uiAction: async () => await this.rootPage.locator('li[role="menuitem"]:has-text("Hide Field"):visible').click(), - requestUrlPathToMatch: 'api/v1/meta/views', + requestUrlPathToMatch: '/api/v1/db/meta/views', httpMethodsToMatch: ['PATCH'], }); @@ -347,7 +347,7 @@ export class ColumnPageObject extends BasePage { async save({ isUpdated }: { isUpdated?: boolean } = {}) { await this.waitForResponse({ uiAction: async () => await this.get().locator('button:has-text("Save")').click(), - requestUrlPathToMatch: 'api/v1/data/noco/', + requestUrlPathToMatch: 'api/v1/db/data/noco/', httpMethodsToMatch: ['GET'], responseJsonMatcher: json => json['pageInfo'], }); diff --git a/tests/playwright/pages/Dashboard/Grid/index.ts b/tests/playwright/pages/Dashboard/Grid/index.ts index 86341c4e2e..901c852c92 100644 --- a/tests/playwright/pages/Dashboard/Grid/index.ts +++ b/tests/playwright/pages/Dashboard/Grid/index.ts @@ -134,7 +134,7 @@ export class GridPage extends BasePage { if (networkValidation) { await this.waitForResponse({ uiAction: clickOnColumnHeaderToSave, - requestUrlPathToMatch: 'api/v1/data/noco', + requestUrlPathToMatch: 'api/v1/db/data/noco', httpMethodsToMatch: ['POST'], // numerical types are returned in number format from the server responseJsonMatcher: resJson => String(resJson?.[columnHeader]) === String(rowValue), @@ -166,7 +166,7 @@ export class GridPage extends BasePage { if (networkValidation) { await this.waitForResponse({ uiAction: clickOnColumnHeaderToSave, - requestUrlPathToMatch: 'api/v1/data/noco', + requestUrlPathToMatch: 'api/v1/db/data/noco', httpMethodsToMatch: [ 'PATCH', // since edit row on an empty row will emit POST request diff --git a/tests/playwright/pages/Dashboard/Import/ImportTemplate.ts b/tests/playwright/pages/Dashboard/Import/ImportTemplate.ts index 731c991c5e..0a71a30048 100644 --- a/tests/playwright/pages/Dashboard/Import/ImportTemplate.ts +++ b/tests/playwright/pages/Dashboard/Import/ImportTemplate.ts @@ -61,7 +61,7 @@ export class ImportTemplatePage extends BasePage { await this.get().locator('button:has-text("Back"):visible').waitFor(); await this.waitForResponse({ - requestUrlPathToMatch: '/api/v1/data/bulk/', + requestUrlPathToMatch: '/api/v1/db/data/bulk/', httpMethodsToMatch: ['POST'], uiAction: () => this.get().locator('button:has-text("Import"):visible').click(), }); diff --git a/tests/playwright/pages/Dashboard/Settings/Miscellaneous.ts b/tests/playwright/pages/Dashboard/Settings/Miscellaneous.ts index 407c017d06..7896a36e9a 100644 --- a/tests/playwright/pages/Dashboard/Settings/Miscellaneous.ts +++ b/tests/playwright/pages/Dashboard/Settings/Miscellaneous.ts @@ -25,7 +25,7 @@ export class MiscSettingsPage extends BasePage { async clickShowNullEmptyFilters() { await this.waitForResponse({ uiAction: () => this.get().locator('input[type="checkbox"]').last().click(), - requestUrlPathToMatch: 'api/v1/meta/bases', + requestUrlPathToMatch: '/api/v1/db/meta/projects', httpMethodsToMatch: ['PATCH'], }); } diff --git a/tests/playwright/pages/Dashboard/ShareProjectButton/index.ts b/tests/playwright/pages/Dashboard/ShareProjectButton/index.ts index bbd794e14f..7e306ae874 100644 --- a/tests/playwright/pages/Dashboard/ShareProjectButton/index.ts +++ b/tests/playwright/pages/Dashboard/ShareProjectButton/index.ts @@ -108,7 +108,7 @@ export class ShareProjectButtonPage extends BasePage { await this.waitForResponse({ uiAction: () => this.rootPage.getByTestId('docs-base-share-public-toggle').click(), httpMethodsToMatch: ['PATCH'], - requestUrlPathToMatch: `/api/v1/meta/bases`, + requestUrlPathToMatch: `/api/v1/db/meta/projects`, }); } diff --git a/tests/playwright/pages/Dashboard/Sidebar/index.ts b/tests/playwright/pages/Dashboard/Sidebar/index.ts index 2bdb278453..c3db7f8bca 100644 --- a/tests/playwright/pages/Dashboard/Sidebar/index.ts +++ b/tests/playwright/pages/Dashboard/Sidebar/index.ts @@ -74,7 +74,7 @@ export class SidebarPage extends BasePage { await this.waitForResponse({ uiAction: () => this.dashboard.get().getByTestId('docs-create-proj-dlg-create-btn').click(), httpMethodsToMatch: ['POST'], - requestUrlPathToMatch: `api/v1/meta/bases/`, + requestUrlPathToMatch: `/api/v1/db/meta/projects/`, }); if (type === ProjectTypes.DOCUMENTATION) { @@ -121,7 +121,7 @@ export class SidebarPage extends BasePage { this.rootPage.locator('.ant-modal-content').locator('button.ant-btn.ant-btn-primary').click(); await this.waitForResponse({ httpMethodsToMatch: ['POST'], - requestUrlPathToMatch: '/api/v1/meta/tables/', + requestUrlPathToMatch: '/api/v1/db/meta/tables/', uiAction: submitAction, responseJsonMatcher: json => json.title === title, }); diff --git a/tests/playwright/pages/Dashboard/TreeView.ts b/tests/playwright/pages/Dashboard/TreeView.ts index 7c61ca6d56..71db1e245b 100644 --- a/tests/playwright/pages/Dashboard/TreeView.ts +++ b/tests/playwright/pages/Dashboard/TreeView.ts @@ -109,7 +109,7 @@ export class TreeViewPage extends BasePage { }, }), httpMethodsToMatch: ['GET'], - requestUrlPathToMatch: `/api/v1/data/noco/`, + requestUrlPathToMatch: `/api/v1/db/data/noco`, responseJsonMatcher: json => json.pageInfo, }); await this.dashboard.waitForTabRender({ title, mode }); @@ -143,7 +143,7 @@ export class TreeViewPage extends BasePage { await this.waitForResponse({ uiAction: () => this.dashboard.get().locator('button:has-text("Create Table")').click(), httpMethodsToMatch: ['POST'], - requestUrlPathToMatch: `/api/v1/meta/bases/`, + requestUrlPathToMatch: `/api/v1/db/meta/projects/`, responseJsonMatcher: json => json.title === title && json.type === 'table', }); @@ -179,7 +179,7 @@ export class TreeViewPage extends BasePage { return await this.dashboard.get().locator('button:has-text("Delete Table")').click(); }, httpMethodsToMatch: ['DELETE'], - requestUrlPathToMatch: `/api/v1/meta/tables/`, + requestUrlPathToMatch: `/api/v1/db/meta/tables/`, }); await (await this.rootPage.locator('.nc-container').last().elementHandle())?.waitForElementState('stable'); @@ -253,7 +253,7 @@ export class TreeViewPage extends BasePage { await this.waitForResponse({ uiAction: async () => await this.rootPage.getByRole('button', { name: 'Confirm' }).click(), httpMethodsToMatch: ['POST'], - requestUrlPathToMatch: `/api/v1/meta/duplicate/`, + requestUrlPathToMatch: `/api/v1/db/meta/duplicate/`, }); await this.get().locator(`[data-testid="nc-tbl-title-${title} copy"]`).waitFor(); } diff --git a/tests/playwright/pages/Dashboard/ViewSidebar/index.ts b/tests/playwright/pages/Dashboard/ViewSidebar/index.ts index f3bca207bc..fcea5c7e05 100644 --- a/tests/playwright/pages/Dashboard/ViewSidebar/index.ts +++ b/tests/playwright/pages/Dashboard/ViewSidebar/index.ts @@ -163,7 +163,7 @@ export class ViewSidebarPage extends BasePage { this.rootPage.locator('.ant-modal-content').locator('button:has-text("Create a View"):visible').click(); await this.waitForResponse({ httpMethodsToMatch: ['POST'], - requestUrlPathToMatch: '/api/v1/meta/tables/', + requestUrlPathToMatch: '/api/v1/db/meta/tables/', uiAction: submitAction, }); // await this.verifyToast({ message: 'View created successfully' }); diff --git a/tests/playwright/pages/Dashboard/common/Cell/RatingCell.ts b/tests/playwright/pages/Dashboard/common/Cell/RatingCell.ts index 366faa6844..363a71a2e5 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/RatingCell.ts +++ b/tests/playwright/pages/Dashboard/common/Cell/RatingCell.ts @@ -19,7 +19,7 @@ export class RatingCellPageObject extends BasePage { await this.waitForResponse({ uiAction: async () => await this.get({ index, columnHeader }).locator('.ant-rate-star > div').nth(rating).click(), httpMethodsToMatch: ['POST', 'PATCH'], - requestUrlPathToMatch: 'api/v1/data/noco/', + requestUrlPathToMatch: 'api/v1/db/data/noco/', }); } diff --git a/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts b/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts index 4213c6430f..8ce4a2f27e 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts +++ b/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts @@ -159,7 +159,7 @@ export class SelectOptionCellPageObject extends BasePage { const saveRowAction = () => selectCell.locator('.ant-select-selection-search-input').press('Enter'); await this.waitForResponse({ uiAction: saveRowAction, - requestUrlPathToMatch: 'api/v1/data/noco/', + requestUrlPathToMatch: 'api/v1/db/data/noco/', httpMethodsToMatch: ['PATCH'], responseJsonMatcher: resJson => String(resJson?.[columnHeader]).includes(String(option)), }); diff --git a/tests/playwright/pages/Dashboard/common/Cell/index.ts b/tests/playwright/pages/Dashboard/common/Cell/index.ts index 6c06bd2572..c24c5da97e 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/index.ts +++ b/tests/playwright/pages/Dashboard/common/Cell/index.ts @@ -90,7 +90,7 @@ export class CellPageObject extends BasePage { // await this.get({ index, columnHeader }).hover(); await this.waitForResponse({ uiAction: () => this.get({ index, columnHeader }).locator('.nc-datatype-link').click(), - requestUrlPathToMatch: '/api/v1/data/noco/', + requestUrlPathToMatch: '/api/v1/db/data/noco', httpMethodsToMatch: ['GET'], }); } @@ -371,7 +371,7 @@ export class CellPageObject extends BasePage { await this.waitForResponse({ uiAction: () => this.rootPage.locator(`[data-testid="nc-child-list-item"]`).last().click({ force: true, timeout: 3000 }), - requestUrlPathToMatch: '/api/v1/data/noco/', + requestUrlPathToMatch: '/api/v1/db/data/noco', httpMethodsToMatch: ['GET'], }); diff --git a/tests/playwright/pages/Dashboard/common/Toolbar/Fields.ts b/tests/playwright/pages/Dashboard/common/Toolbar/Fields.ts index 6b986a5b61..edf4a07531 100644 --- a/tests/playwright/pages/Dashboard/common/Toolbar/Fields.ts +++ b/tests/playwright/pages/Dashboard/common/Toolbar/Fields.ts @@ -35,7 +35,7 @@ export class ToolbarFieldsPage extends BasePage { if (validateResponse) { await this.waitForResponse({ uiAction: toggleColumn, - requestUrlPathToMatch: isLocallySaved ? '/api/v1/public/' : '/api/v1/data/noco/', + requestUrlPathToMatch: isLocallySaved ? '/api/v1/db/public/' : '/api/v1/db/data/noco/', httpMethodsToMatch: ['GET'], }); } else { @@ -59,7 +59,7 @@ export class ToolbarFieldsPage extends BasePage { async click({ title, isLocallySaved }: { title: string; isLocallySaved?: boolean }) { await this.waitForResponse({ uiAction: () => this.get().locator(`[data-testid="nc-fields-menu-${title}"]`).locator('.nc-switch').click(), - requestUrlPathToMatch: isLocallySaved ? '/api/v1/public/' : '/api/v1/data/noco/', + requestUrlPathToMatch: isLocallySaved ? '/api/v1/db/public/' : '/api/v1/db/data/noco/', httpMethodsToMatch: ['GET'], }); await this.toolbar.parent.waitLoading(); @@ -69,7 +69,7 @@ export class ToolbarFieldsPage extends BasePage { await this.toolbar.clickFields(); await this.waitForResponse({ uiAction: () => this.get().locator(`.nc-fields-show-all-fields`).click(), - requestUrlPathToMatch: isLocallySaved ? '/api/v1/public/' : '/api/v1/data/noco/', + requestUrlPathToMatch: isLocallySaved ? '/api/v1/db/public/' : '/api/v1/db/data/noco/', httpMethodsToMatch: ['GET'], timeout: 10000, }); @@ -80,7 +80,7 @@ export class ToolbarFieldsPage extends BasePage { // await this.toolbar.clickFields(); // await this.waitForResponse({ // uiAction: () => this.get().locator(`button.nc-switch`).first().click(), - // requestUrlPathToMatch: isLocallySaved ? '/api/v1/public/' : '/api/v1/data/noco/', + // requestUrlPathToMatch: isLocallySaved ? '/api/v1/db/public/' : '/api/v1/db/data/noco/', // httpMethodsToMatch: ['GET'], // }); // await this.toolbar.clickFields(); @@ -90,7 +90,7 @@ export class ToolbarFieldsPage extends BasePage { await this.toolbar.clickFields(); await this.waitForResponse({ uiAction: async () => await this.get().locator(`.nc-fields-show-system-fields`).click(), - requestUrlPathToMatch: isLocallySaved ? '/api/v1/public/' : '/api/v1/data/noco/', + requestUrlPathToMatch: isLocallySaved ? '/api/v1/db/public/' : '/api/v1/db/data/noco/', httpMethodsToMatch: ['GET'], }); await this.toolbar.clickFields(); diff --git a/tests/playwright/pages/Dashboard/common/Toolbar/Filter.ts b/tests/playwright/pages/Dashboard/common/Toolbar/Filter.ts index 5d3441639a..fd34caef00 100644 --- a/tests/playwright/pages/Dashboard/common/Toolbar/Filter.ts +++ b/tests/playwright/pages/Dashboard/common/Toolbar/Filter.ts @@ -151,7 +151,7 @@ export class ToolbarFilterPage extends BasePage { .locator(`div[label="${title}"]:visible`) .click(), httpMethodsToMatch: ['GET'], - requestUrlPathToMatch: locallySaved ? `/api/v1/public/` : `/api/v1/data/noco/`, + requestUrlPathToMatch: locallySaved ? `/api/v1/db/public/` : `/api/v1/db/data/noco/`, }); } } @@ -178,7 +178,7 @@ export class ToolbarFilterPage extends BasePage { .first() .click(), httpMethodsToMatch: ['GET'], - requestUrlPathToMatch: locallySaved ? `/api/v1/public/` : `/api/v1/data/noco/`, + requestUrlPathToMatch: locallySaved ? `/api/v1/db/public/` : `/api/v1/db/data/noco/`, }); } } @@ -206,7 +206,7 @@ export class ToolbarFilterPage extends BasePage { .first() .click(), httpMethodsToMatch: ['GET'], - requestUrlPathToMatch: locallySaved ? `/api/v1/public/` : `/api/v1/data/noco/`, + requestUrlPathToMatch: locallySaved ? `/api/v1/db/public/` : `/api/v1/db/data/noco/`, }); } } @@ -249,7 +249,7 @@ export class ToolbarFilterPage extends BasePage { uiAction: async () => await this.rootPage.locator(`.ant-picker-cell-inner:has-text("${value}")`).click(), httpMethodsToMatch: ['GET'], - requestUrlPathToMatch: locallySaved ? `/api/v1/public/` : `/api/v1/data/noco/`, + requestUrlPathToMatch: locallySaved ? `/api/v1/db/public/` : `/api/v1/db/data/noco/`, }); } } else { @@ -261,7 +261,7 @@ export class ToolbarFilterPage extends BasePage { await this.waitForResponse({ uiAction: fillFilter, httpMethodsToMatch: ['GET'], - requestUrlPathToMatch: locallySaved ? `/api/v1/public/` : `/api/v1/data/noco/`, + requestUrlPathToMatch: locallySaved ? `/api/v1/db/public/` : `/api/v1/db/data/noco/`, }); } await this.toolbar.parent.dashboard.waitForLoaderToDisappear(); @@ -277,7 +277,7 @@ export class ToolbarFilterPage extends BasePage { await this.waitForResponse({ uiAction: async () => await this.get().locator('.nc-filter-value-select').locator('input').fill(value), httpMethodsToMatch: ['GET'], - requestUrlPathToMatch: locallySaved ? `/api/v1/public/` : `/api/v1/data/noco/`, + requestUrlPathToMatch: locallySaved ? `/api/v1/db/public/` : `/api/v1/db/data/noco/`, }); } break; @@ -336,7 +336,7 @@ export class ToolbarFilterPage extends BasePage { await this.waitForResponse({ uiAction: fillFilter, httpMethodsToMatch: ['GET'], - requestUrlPathToMatch: locallySaved ? `/api/v1/public/` : `/api/v1/data/noco/`, + requestUrlPathToMatch: locallySaved ? `/api/v1/db/public/` : `/api/v1/db/data/noco/`, }); await this.toolbar.parent.dashboard.waitForLoaderToDisappear(); await this.toolbar.parent.waitLoading(); @@ -351,7 +351,7 @@ export class ToolbarFilterPage extends BasePage { await this.waitForResponse({ uiAction: async () => await this.get().locator('.nc-filter-item-remove-btn').click(), httpMethodsToMatch: ['DELETE'], - requestUrlPathToMatch: '/api/v1/meta/filters/', + requestUrlPathToMatch: '/api/v1/db/meta/filters/', }); } else { await this.get().locator('.nc-filter-item-remove-btn').click(); @@ -367,7 +367,7 @@ export class ToolbarFilterPage extends BasePage { await this.waitForResponse({ uiAction: async () => await this.get().locator('.nc-filter-item-remove-btn').click(), httpMethodsToMatch: ['DELETE'], - requestUrlPathToMatch: '/api/v1/meta/filters/', + requestUrlPathToMatch: '/api/v1/db/meta/filters/', }); } else { await this.get().locator('.nc-filter-item-remove-btn').click(); diff --git a/tests/playwright/pages/Dashboard/common/Toolbar/Groupby.ts b/tests/playwright/pages/Dashboard/common/Toolbar/Groupby.ts index a4378e2818..a65b634849 100644 --- a/tests/playwright/pages/Dashboard/common/Toolbar/Groupby.ts +++ b/tests/playwright/pages/Dashboard/common/Toolbar/Groupby.ts @@ -77,7 +77,7 @@ export class ToolbarGroupByPage extends BasePage { await this.waitForResponse({ uiAction: selectSortDirection, httpMethodsToMatch: ['GET'], - requestUrlPathToMatch: locallySaved ? `/api/v1/public/` : `/api/v1/data/noco/`, + requestUrlPathToMatch: locallySaved ? `/api/v1/db/public/` : `/api/v1/db/data/noco/`, }); } diff --git a/tests/playwright/pages/Dashboard/common/Toolbar/Sort.ts b/tests/playwright/pages/Dashboard/common/Toolbar/Sort.ts index 4832ed9de6..f739ec4b39 100644 --- a/tests/playwright/pages/Dashboard/common/Toolbar/Sort.ts +++ b/tests/playwright/pages/Dashboard/common/Toolbar/Sort.ts @@ -68,7 +68,7 @@ export class ToolbarSortPage extends BasePage { await this.waitForResponse({ uiAction: selectSortDirection, httpMethodsToMatch: ['GET'], - requestUrlPathToMatch: locallySaved ? `/api/v1/public/` : `/api/v1/data/noco/`, + requestUrlPathToMatch: locallySaved ? `/api/v1/db/public/` : `/api/v1/db/data/noco/`, }); await this.toolbar.parent.dashboard.waitForLoaderToDisappear(); // close sort menu @@ -119,7 +119,7 @@ export class ToolbarSortPage extends BasePage { await this.waitForResponse({ uiAction: selectColumn, httpMethodsToMatch: ['GET'], - requestUrlPathToMatch: locallySaved ? `/api/v1/public/` : `/api/v1/data/noco/`, + requestUrlPathToMatch: locallySaved ? `/api/v1/db/public/` : `/api/v1/db/data/noco/`, }); // read content of the dropdown @@ -159,7 +159,7 @@ export class ToolbarSortPage extends BasePage { await this.waitForResponse({ uiAction: selectSortDirection, httpMethodsToMatch: ['GET'], - requestUrlPathToMatch: locallySaved ? `/api/v1/public/` : `/api/v1/data/noco/`, + requestUrlPathToMatch: locallySaved ? `/api/v1/db/public/` : `/api/v1/db/data/noco/`, }); await this.toolbar.parent.dashboard.waitForLoaderToDisappear(); // close sort menu diff --git a/tests/playwright/pages/ProjectsPage/index.ts b/tests/playwright/pages/ProjectsPage/index.ts index d2037d9bd2..fb4d96d00f 100644 --- a/tests/playwright/pages/ProjectsPage/index.ts +++ b/tests/playwright/pages/ProjectsPage/index.ts @@ -41,7 +41,7 @@ export class ProjectsPage extends BasePage { await this.waitForResponse({ uiAction: createProjectSubmitAction, httpMethodsToMatch: ['POST'], - requestUrlPathToMatch: '/api/v1/meta/bases/', + requestUrlPathToMatch: '/api/v1/db/meta/projects/', }); // wait for dashboard to render @@ -89,7 +89,7 @@ export class ProjectsPage extends BasePage { await this.waitForResponse({ uiAction: dupeProjectSubmitAction, httpMethodsToMatch: ['POST'], - requestUrlPathToMatch: 'api/v1/meta/duplicate/', + requestUrlPathToMatch: '/api/v1/db/meta/duplicate/', }); // wait for duplicate create completed and render kebab await this.get().locator(`[data-testid="p-three-dot-${name} copy"]`).waitFor(); @@ -103,7 +103,7 @@ export class ProjectsPage extends BasePage { const reloadUiAction = () => this.get().locator('[data-testid="bases-reload-button"]').click(); await this.waitForResponse({ uiAction: reloadUiAction, - requestUrlPathToMatch: '/api/v1/meta/bases', + requestUrlPathToMatch: '/api/v1/db/meta/projects', httpMethodsToMatch: ['GET'], }); } @@ -145,7 +145,7 @@ export class ProjectsPage extends BasePage { } const isRequiredResponse = - res.request().url().includes('/api/v1/meta/bases') && + res.request().url().includes('/api/v1/db/meta/projects') && ['GET'].includes(res.request().method()) && json?.title === title; @@ -180,7 +180,7 @@ export class ProjectsPage extends BasePage { await this.waitForResponse({ uiAction: deleteProjectAction, httpMethodsToMatch: ['DELETE'], - requestUrlPathToMatch: '/api/v1/meta/bases/', + requestUrlPathToMatch: '/api/v1/db/meta/projects/', }); await this.get().locator('.ant-table-row', { hasText: title }).waitFor({ state: 'hidden' }); @@ -212,7 +212,7 @@ export class ProjectsPage extends BasePage { const submitAction = () => base.locator('input.nc-metadb-base-name').press('Enter'); await this.waitForResponse({ uiAction: submitAction, - requestUrlPathToMatch: 'api/v1/meta/bases/', + requestUrlPathToMatch: '/api/v1/db/meta/projects/', httpMethodsToMatch: ['PATCH'], }); } diff --git a/tests/playwright/pages/WorkspacePage/ContainerPage.ts b/tests/playwright/pages/WorkspacePage/ContainerPage.ts index 7974db69df..9ee3c664a5 100644 --- a/tests/playwright/pages/WorkspacePage/ContainerPage.ts +++ b/tests/playwright/pages/WorkspacePage/ContainerPage.ts @@ -140,7 +140,7 @@ export class ContainerPage extends BasePage { await this.waitForResponse({ uiAction: () => this.rootPage.locator('.nc-metadb-base-name').press('Enter'), httpMethodsToMatch: ['POST'], - requestUrlPathToMatch: `api/v1/meta/bases`, + requestUrlPathToMatch: `/api/v1/db/meta/projects`, }); } @@ -154,7 +154,7 @@ export class ContainerPage extends BasePage { await this.waitForResponse({ uiAction: () => row.locator('td.ant-table-cell').nth(0).locator('input').press('Enter'), httpMethodsToMatch: ['PATCH'], - requestUrlPathToMatch: `api/v1/meta/bases/`, + requestUrlPathToMatch: `/api/v1/db/meta/projects/`, }); } @@ -185,7 +185,7 @@ export class ContainerPage extends BasePage { await this.waitForResponse({ uiAction: () => this.rootPage.locator('.ant-modal-content').locator('button:has-text("Delete")').click(), httpMethodsToMatch: ['DELETE'], - requestUrlPathToMatch: `api/v1/meta/bases/`, + requestUrlPathToMatch: `/api/v1/db/meta/projects/`, }); } diff --git a/tests/playwright/tests/db/features/swagger.spec.ts b/tests/playwright/tests/db/features/swagger.spec.ts index c3cb8e7764..3da2f4697b 100644 --- a/tests/playwright/tests/db/features/swagger.spec.ts +++ b/tests/playwright/tests/db/features/swagger.spec.ts @@ -17,7 +17,7 @@ test.describe('Swagger', () => { test('Create column', async () => { // access swagger link - const link = `http://localhost:8080/api/v1/meta/bases/${context.base.id}/swagger`; + const link = `http://localhost:8080/api/v1/db/meta/projects/${context.base.id}/swagger`; await dashboard.rootPage.goto(link); const swagger = dashboard.rootPage; diff --git a/tests/playwright/tests/db/features/undo-redo.spec.ts b/tests/playwright/tests/db/features/undo-redo.spec.ts index 40acb40f45..bb0e805b86 100644 --- a/tests/playwright/tests/db/features/undo-redo.spec.ts +++ b/tests/playwright/tests/db/features/undo-redo.spec.ts @@ -32,7 +32,7 @@ async function undo({ page, dashboard }: { page: Page; dashboard: DashboardPage await dashboard.grid.waitForResponse({ uiAction: async () => await page.keyboard.press(isMac ? 'Meta+z' : 'Control+z'), httpMethodsToMatch: ['GET'], - requestUrlPathToMatch: `/api/v1/data/noco/`, + requestUrlPathToMatch: `/api/v1/db/data/noco`, responseJsonMatcher: json => json.pageInfo, }); } else { @@ -593,7 +593,7 @@ test.describe('Undo Redo - LTAR', () => { await dashboard.grid.waitForResponse({ uiAction: async () => await page.keyboard.press(isMac ? 'Meta+z' : 'Control+z'), httpMethodsToMatch: ['GET'], - requestUrlPathToMatch: `/api/v1/data/noco/`, + requestUrlPathToMatch: `/api/v1/db/data/noco`, responseJsonMatcher: json => json.pageInfo, }); await verifyRecords(values); diff --git a/tests/playwright/tests/db/general/groupCRUD.spec.ts b/tests/playwright/tests/db/general/groupCRUD.spec.ts index 03f3e6331a..0e7a3ad308 100644 --- a/tests/playwright/tests/db/general/groupCRUD.spec.ts +++ b/tests/playwright/tests/db/general/groupCRUD.spec.ts @@ -15,7 +15,7 @@ async function undo({ page, dashboard }: { page: Page; dashboard: DashboardPage await dashboard.grid.waitForResponse({ uiAction: () => page.keyboard.press(isMac ? 'Meta+z' : 'Control+z'), httpMethodsToMatch: ['GET'], - requestUrlPathToMatch: `/api/v1/data/noco/`, + requestUrlPathToMatch: `/api/v1/db/data/noco/`, responseJsonMatcher: json => json.pageInfo, }); } else {