diff --git a/packages/server/specs/openapi.json b/packages/server/specs/openapi.json index 37c636590b..09657d3f02 100644 --- a/packages/server/specs/openapi.json +++ b/packages/server/specs/openapi.json @@ -1792,7 +1792,7 @@ "paths": { "/applications": { "post": { - "operationId": "createApplication", + "operationId": "create", "summary": "Create an application", "tags": [ "applications" @@ -1833,7 +1833,7 @@ }, "/applications/{appId}": { "put": { - "operationId": "updateApplication", + "operationId": "update", "summary": "Update an application", "tags": [ "applications" @@ -1872,7 +1872,7 @@ } }, "delete": { - "operationId": "deleteApplication", + "operationId": "delete", "summary": "Delete an application", "tags": [ "applications" @@ -1901,7 +1901,7 @@ } }, "get": { - "operationId": "getApplicationById", + "operationId": "getById", "summary": "Retrieve an application", "tags": [ "applications" @@ -1932,7 +1932,7 @@ }, "/applications/search": { "post": { - "operationId": "searchApplications", + "operationId": "search", "summary": "Search for applications", "description": "Based on application properties (currently only name) search for applications.", "tags": [ @@ -1969,7 +1969,7 @@ }, "/queries/{queryId}": { "post": { - "operationId": "executeQuery", + "operationId": "execute", "summary": "Execute a query", "description": "Queries which have been created within a Budibase app can be executed using this,", "tags": [ @@ -2017,7 +2017,7 @@ }, "/queries/search": { "post": { - "operationId": "searchQueries", + "operationId": "search", "summary": "Search for queries", "description": "Based on query properties (currently only name) search for queries.", "tags": [ @@ -2059,7 +2059,7 @@ }, "/tables/{tableId}/rows": { "post": { - "operationId": "createRow", + "operationId": "create", "summary": "Create a row", "description": "Creates a row within the specified table.", "tags": [ @@ -2109,7 +2109,7 @@ }, "/tables/{tableId}/rows/{rowId}": { "put": { - "operationId": "updateRow", + "operationId": "update", "summary": "Update a row", "description": "Updates a row within the specified table.", "tags": [ @@ -2160,7 +2160,7 @@ } }, "delete": { - "operationId": "deleteRow", + "operationId": "delete", "summary": "Delete a row", "description": "Deletes a row within the specified table.", "tags": [ @@ -2196,7 +2196,7 @@ } }, "get": { - "operationId": "getRowById", + "operationId": "getById", "summary": "Retrieve a row", "description": "This gets a single row, it will be enriched with the full related rows, rather than the squashed \"primaryDisplay\" format returned by the search endpoint.", "tags": [ @@ -2234,7 +2234,7 @@ }, "/tables/{tableId}/rows/search": { "post": { - "operationId": "searchRows", + "operationId": "search", "summary": "Search for rows", "tags": [ "rows" @@ -2278,7 +2278,7 @@ }, "/tables": { "post": { - "operationId": "createTable", + "operationId": "create", "summary": "Create a table", "description": "Create a table, this could be internal or external.", "tags": [ @@ -2324,7 +2324,7 @@ }, "/tables/{tableId}": { "put": { - "operationId": "updateTable", + "operationId": "update", "summary": "Update a table", "description": "Update a table, this could be internal or external.", "tags": [ @@ -2371,7 +2371,7 @@ } }, "delete": { - "operationId": "deleteTable", + "operationId": "delete", "summary": "Delete a table", "description": "Delete a table, this could be internal or external.", "tags": [ @@ -2404,7 +2404,7 @@ } }, "get": { - "operationId": "getTableById", + "operationId": "getById", "summary": "Retrieve a table", "description": "Lookup a table, this could be internal or external.", "tags": [ @@ -2439,7 +2439,7 @@ }, "/tables/search": { "post": { - "operationId": "searchTables", + "operationId": "search", "summary": "Search for tables", "description": "Based on table properties (currently only name) search for tables. This could be an internal or an external table.", "tags": [ @@ -2481,7 +2481,7 @@ }, "/users": { "post": { - "operationId": "createUser", + "operationId": "create", "summary": "Create a user", "tags": [ "users" @@ -2517,7 +2517,7 @@ }, "/users/{userId}": { "put": { - "operationId": "updateUser", + "operationId": "update", "summary": "Update a user", "tags": [ "users" @@ -2556,7 +2556,7 @@ } }, "delete": { - "operationId": "deleteUser", + "operationId": "delete", "summary": "Delete a user", "tags": [ "users" @@ -2585,7 +2585,7 @@ } }, "get": { - "operationId": "getUserById", + "operationId": "getById", "summary": "Retrieve a user", "tags": [ "users" @@ -2616,7 +2616,7 @@ }, "/users/search": { "post": { - "operationId": "searchUsers", + "operationId": "search", "summary": "Search for users", "description": "Based on user properties (currently only name) search for users.", "tags": [ diff --git a/packages/server/specs/openapi.yaml b/packages/server/specs/openapi.yaml index 46a6e387e3..64a3df1f48 100644 --- a/packages/server/specs/openapi.yaml +++ b/packages/server/specs/openapi.yaml @@ -1370,7 +1370,7 @@ security: paths: /applications: post: - operationId: createApplication + operationId: create summary: Create an application tags: - applications @@ -1394,7 +1394,7 @@ paths: $ref: "#/components/examples/application" "/applications/{appId}": put: - operationId: updateApplication + operationId: update summary: Update an application tags: - applications @@ -1417,7 +1417,7 @@ paths: application: $ref: "#/components/examples/application" delete: - operationId: deleteApplication + operationId: delete summary: Delete an application tags: - applications @@ -1434,7 +1434,7 @@ paths: application: $ref: "#/components/examples/application" get: - operationId: getApplicationById + operationId: getById summary: Retrieve an application tags: - applications @@ -1452,7 +1452,7 @@ paths: $ref: "#/components/examples/application" /applications/search: post: - operationId: searchApplications + operationId: search summary: Search for applications description: Based on application properties (currently only name) search for applications. @@ -1477,7 +1477,7 @@ paths: $ref: "#/components/examples/applications" "/queries/{queryId}": post: - operationId: executeQuery + operationId: execute summary: Execute a query description: Queries which have been created within a Budibase app can be executed using this, @@ -1506,7 +1506,7 @@ paths: $ref: "#/components/examples/sqlResponse" /queries/search: post: - operationId: searchQueries + operationId: search summary: Search for queries description: Based on query properties (currently only name) search for queries. tags: @@ -1531,7 +1531,7 @@ paths: $ref: "#/components/examples/queries" "/tables/{tableId}/rows": post: - operationId: createRow + operationId: create summary: Create a row description: Creates a row within the specified table. tags: @@ -1562,7 +1562,7 @@ paths: $ref: "#/components/examples/row" "/tables/{tableId}/rows/{rowId}": put: - operationId: updateRow + operationId: update summary: Update a row description: Updates a row within the specified table. tags: @@ -1592,7 +1592,7 @@ paths: row: $ref: "#/components/examples/row" delete: - operationId: deleteRow + operationId: delete summary: Delete a row description: Deletes a row within the specified table. tags: @@ -1613,7 +1613,7 @@ paths: row: $ref: "#/components/examples/row" get: - operationId: getRowById + operationId: getById summary: Retrieve a row description: This gets a single row, it will be enriched with the full related rows, rather than the squashed "primaryDisplay" format returned by the @@ -1636,7 +1636,7 @@ paths: $ref: "#/components/examples/enrichedRow" "/tables/{tableId}/rows/search": post: - operationId: searchRows + operationId: search summary: Search for rows tags: - rows @@ -1662,7 +1662,7 @@ paths: $ref: "#/components/examples/rows" /tables: post: - operationId: createTable + operationId: create summary: Create a table description: Create a table, this could be internal or external. tags: @@ -1690,7 +1690,7 @@ paths: $ref: "#/components/examples/table" "/tables/{tableId}": put: - operationId: updateTable + operationId: update summary: Update a table description: Update a table, this could be internal or external. tags: @@ -1717,7 +1717,7 @@ paths: table: $ref: "#/components/examples/table" delete: - operationId: deleteTable + operationId: delete summary: Delete a table description: Delete a table, this could be internal or external. tags: @@ -1736,7 +1736,7 @@ paths: table: $ref: "#/components/examples/table" get: - operationId: getTableById + operationId: getById summary: Retrieve a table description: Lookup a table, this could be internal or external. tags: @@ -1756,7 +1756,7 @@ paths: $ref: "#/components/examples/table" /tables/search: post: - operationId: searchTables + operationId: search summary: Search for tables description: Based on table properties (currently only name) search for tables. This could be an internal or an external table. @@ -1782,7 +1782,7 @@ paths: $ref: "#/components/examples/tables" /users: post: - operationId: createUser + operationId: create summary: Create a user tags: - users @@ -1804,7 +1804,7 @@ paths: $ref: "#/components/examples/user" "/users/{userId}": put: - operationId: updateUser + operationId: update summary: Update a user tags: - users @@ -1827,7 +1827,7 @@ paths: user: $ref: "#/components/examples/user" delete: - operationId: deleteUser + operationId: delete summary: Delete a user tags: - users @@ -1844,7 +1844,7 @@ paths: user: $ref: "#/components/examples/user" get: - operationId: getUserById + operationId: getById summary: Retrieve a user tags: - users @@ -1862,7 +1862,7 @@ paths: $ref: "#/components/examples/user" /users/search: post: - operationId: searchUsers + operationId: search summary: Search for users description: Based on user properties (currently only name) search for users. tags: diff --git a/packages/server/src/api/controllers/plugin/index.ts b/packages/server/src/api/controllers/plugin/index.ts index 868d2689fd..7d1b1291ab 100644 --- a/packages/server/src/api/controllers/plugin/index.ts +++ b/packages/server/src/api/controllers/plugin/index.ts @@ -129,6 +129,6 @@ export async function processUploadedPlugin( } const doc = await plugins.storePlugin(metadata, directory, source) - ClientAppSocket.emit("plugins-update", { name: doc.name, hash: doc.hash }) + ClientAppSocket.emit("plugin-update", { name: doc.name, hash: doc.hash }) return doc } diff --git a/packages/server/src/api/routes/public/applications.ts b/packages/server/src/api/routes/public/applications.ts index c407156caf..b8dad05507 100644 --- a/packages/server/src/api/routes/public/applications.ts +++ b/packages/server/src/api/routes/public/applications.ts @@ -9,7 +9,7 @@ const read = [], * @openapi * /applications: * post: - * operationId: createApplication + * operationId: create * summary: Create an application * tags: * - applications @@ -42,7 +42,7 @@ write.push( * @openapi * /applications/{appId}: * put: - * operationId: updateApplication + * operationId: update * summary: Update an application * tags: * - applications @@ -75,7 +75,7 @@ write.push( * @openapi * /applications/{appId}: * delete: - * operationId: deleteApplication + * operationId: delete * summary: Delete an application * tags: * - applications @@ -98,7 +98,7 @@ write.push(new Endpoint("delete", "/applications/:appId", controller.destroy)) * @openapi * /applications/{appId}: * get: - * operationId: getApplicationById + * operationId: getById * summary: Retrieve an application * tags: * - applications @@ -121,7 +121,7 @@ read.push(new Endpoint("get", "/applications/:appId", controller.read)) * @openapi * /applications/search: * post: - * operationId: searchApplications + * operationId: search * summary: Search for applications * description: Based on application properties (currently only name) search for applications. * tags: diff --git a/packages/server/src/api/routes/public/queries.ts b/packages/server/src/api/routes/public/queries.ts index b325c40a52..dc18fb91ac 100644 --- a/packages/server/src/api/routes/public/queries.ts +++ b/packages/server/src/api/routes/public/queries.ts @@ -9,7 +9,7 @@ const read = [], * @openapi * /queries/{queryId}: * post: - * operationId: executeQuery + * operationId: execute * summary: Execute a query * description: Queries which have been created within a Budibase app can be executed using this, * tags: @@ -43,7 +43,7 @@ write.push(new Endpoint("post", "/queries/:queryId", controller.execute)) * @openapi * /queries/search: * post: - * operationId: searchQueries + * operationId: search * summary: Search for queries * description: Based on query properties (currently only name) search for queries. * tags: diff --git a/packages/server/src/api/routes/public/rows.ts b/packages/server/src/api/routes/public/rows.ts index 78dfbba6fd..16364a196d 100644 --- a/packages/server/src/api/routes/public/rows.ts +++ b/packages/server/src/api/routes/public/rows.ts @@ -9,7 +9,7 @@ const read = [], * @openapi * /tables/{tableId}/rows: * post: - * operationId: createRow + * operationId: create * summary: Create a row * description: Creates a row within the specified table. * tags: @@ -44,7 +44,7 @@ write.push(new Endpoint("post", "/tables/:tableId/rows", controller.create)) * @openapi * /tables/{tableId}/rows/{rowId}: * put: - * operationId: updateRow + * operationId: update * summary: Update a row * description: Updates a row within the specified table. * tags: @@ -81,7 +81,7 @@ write.push( * @openapi * /tables/{tableId}/rows/{rowId}: * delete: - * operationId: deleteRow + * operationId: delete * summary: Delete a row * description: Deletes a row within the specified table. * tags: @@ -109,7 +109,7 @@ write.push( * @openapi * /tables/{tableId}/rows/{rowId}: * get: - * operationId: getRowById + * operationId: getById * summary: Retrieve a row * description: This gets a single row, it will be enriched with the full related rows, rather than * the squashed "primaryDisplay" format returned by the search endpoint. @@ -136,7 +136,7 @@ read.push(new Endpoint("get", "/tables/:tableId/rows/:rowId", controller.read)) * @openapi * /tables/{tableId}/rows/search: * post: - * operationId: searchRows + * operationId: search * summary: Search for rows * tags: * - rows diff --git a/packages/server/src/api/routes/public/tables.ts b/packages/server/src/api/routes/public/tables.ts index cc6408681e..a40c8ab83c 100644 --- a/packages/server/src/api/routes/public/tables.ts +++ b/packages/server/src/api/routes/public/tables.ts @@ -9,7 +9,7 @@ const read = [], * @openapi * /tables: * post: - * operationId: createTable + * operationId: create * summary: Create a table * description: Create a table, this could be internal or external. * tags: @@ -46,7 +46,7 @@ write.push( * @openapi * /tables/{tableId}: * put: - * operationId: updateTable + * operationId: update * summary: Update a table * description: Update a table, this could be internal or external. * tags: @@ -83,7 +83,7 @@ write.push( * @openapi * /tables/{tableId}: * delete: - * operationId: deleteTable + * operationId: delete * summary: Delete a table * description: Delete a table, this could be internal or external. * tags: @@ -108,7 +108,7 @@ write.push(new Endpoint("delete", "/tables/:tableId", controller.destroy)) * @openapi * /tables/{tableId}: * get: - * operationId: getTableById + * operationId: getById * summary: Retrieve a table * description: Lookup a table, this could be internal or external. * tags: @@ -133,7 +133,7 @@ read.push(new Endpoint("get", "/tables/:tableId", controller.read)) * @openapi * /tables/search: * post: - * operationId: searchTables + * operationId: search * summary: Search for tables * description: Based on table properties (currently only name) search for tables. This could be * an internal or an external table. diff --git a/packages/server/src/api/routes/public/users.ts b/packages/server/src/api/routes/public/users.ts index 2be31b43d7..ee23ff7f7f 100644 --- a/packages/server/src/api/routes/public/users.ts +++ b/packages/server/src/api/routes/public/users.ts @@ -9,7 +9,7 @@ const read = [], * @openapi * /users: * post: - * operationId: createUser + * operationId: create * summary: Create a user * tags: * - users @@ -36,7 +36,7 @@ write.push(new Endpoint("post", "/users", controller.create)) * @openapi * /users/{userId}: * put: - * operationId: updateUser + * operationId: update * summary: Update a user * tags: * - users @@ -65,7 +65,7 @@ write.push(new Endpoint("put", "/users/:userId", controller.update)) * @openapi * /users/{userId}: * delete: - * operationId: deleteUser + * operationId: delete * summary: Delete a user * tags: * - users @@ -88,7 +88,7 @@ write.push(new Endpoint("delete", "/users/:userId", controller.destroy)) * @openapi * /users/{userId}: * get: - * operationId: getUserById + * operationId: getById * summary: Retrieve a user * tags: * - users @@ -111,7 +111,7 @@ read.push(new Endpoint("get", "/users/:userId", controller.read)) * @openapi * /users/search: * post: - * operationId: searchUsers + * operationId: search * summary: Search for users * description: Based on user properties (currently only name) search for users. * tags: diff --git a/packages/server/src/definitions/openapi.ts b/packages/server/src/definitions/openapi.ts index 166ff9570e..9644bebc19 100644 --- a/packages/server/src/definitions/openapi.ts +++ b/packages/server/src/definitions/openapi.ts @@ -5,67 +5,67 @@ export interface paths { "/applications": { - post: operations["createApplication"]; + post: operations["create"]; }; "/applications/{appId}": { - get: operations["getApplicationById"]; - put: operations["updateApplication"]; - delete: operations["deleteApplication"]; + get: operations["getById"]; + put: operations["update"]; + delete: operations["delete"]; }; "/applications/search": { /** Based on application properties (currently only name) search for applications. */ - post: operations["searchApplications"]; + post: operations["search"]; }; "/queries/{queryId}": { /** Queries which have been created within a Budibase app can be executed using this, */ - post: operations["executeQuery"]; + post: operations["execute"]; }; "/queries/search": { /** Based on query properties (currently only name) search for queries. */ - post: operations["searchQueries"]; + post: operations["search"]; }; "/tables/{tableId}/rows": { /** Creates a row within the specified table. */ - post: operations["createRow"]; + post: operations["create"]; }; "/tables/{tableId}/rows/{rowId}": { /** This gets a single row, it will be enriched with the full related rows, rather than the squashed "primaryDisplay" format returned by the search endpoint. */ - get: operations["getRowById"]; + get: operations["getById"]; /** Updates a row within the specified table. */ - put: operations["updateRow"]; + put: operations["update"]; /** Deletes a row within the specified table. */ - delete: operations["deleteRow"]; + delete: operations["delete"]; }; "/tables/{tableId}/rows/search": { - post: operations["searchRows"]; + post: operations["search"]; }; "/tables": { /** Create a table, this could be internal or external. */ - post: operations["createTable"]; + post: operations["create"]; }; "/tables/{tableId}": { /** Lookup a table, this could be internal or external. */ - get: operations["getTableById"]; + get: operations["getById"]; /** Update a table, this could be internal or external. */ - put: operations["updateTable"]; + put: operations["update"]; /** Delete a table, this could be internal or external. */ - delete: operations["deleteTable"]; + delete: operations["delete"]; }; "/tables/search": { /** Based on table properties (currently only name) search for tables. This could be an internal or an external table. */ - post: operations["searchTables"]; + post: operations["search"]; }; "/users": { - post: operations["createUser"]; + post: operations["create"]; }; "/users/{userId}": { - get: operations["getUserById"]; - put: operations["updateUser"]; - delete: operations["deleteUser"]; + get: operations["getById"]; + put: operations["update"]; + delete: operations["delete"]; }; "/users/search": { /** Based on user properties (currently only name) search for users. */ - post: operations["searchUsers"]; + post: operations["search"]; }; } @@ -704,87 +704,81 @@ export interface components { } export interface operations { - createApplication: { - parameters: { - header: { - /** The ID of the app which this request is targeting. */ - "x-budibase-app-id": components["parameters"]["appId"]; - }; - }; + create: { responses: { - /** Returns the created application. */ + /** Returns the created user. */ 200: { content: { - "application/json": components["schemas"]["applicationOutput"]; + "application/json": components["schemas"]["userOutput"]; }; }; }; requestBody: { content: { - "application/json": components["schemas"]["application"]; + "application/json": components["schemas"]["user"]; }; }; }; - getApplicationById: { + getById: { parameters: { path: { - /** The ID of the app which this request is targeting. */ - appId: components["parameters"]["appIdUrl"]; + /** The ID of the user which this request is targeting. */ + userId: components["parameters"]["userId"]; }; }; responses: { - /** Returns the retrieved application. */ + /** Returns the retrieved user. */ 200: { content: { - "application/json": components["schemas"]["applicationOutput"]; + "application/json": components["schemas"]["userOutput"]; }; }; }; }; - updateApplication: { + update: { parameters: { path: { - /** The ID of the app which this request is targeting. */ - appId: components["parameters"]["appIdUrl"]; + /** The ID of the user which this request is targeting. */ + userId: components["parameters"]["userId"]; }; }; responses: { - /** Returns the updated application. */ + /** Returns the updated user. */ 200: { content: { - "application/json": components["schemas"]["applicationOutput"]; + "application/json": components["schemas"]["userOutput"]; }; }; }; requestBody: { content: { - "application/json": components["schemas"]["application"]; + "application/json": components["schemas"]["user"]; }; }; }; - deleteApplication: { + delete: { parameters: { path: { - /** The ID of the app which this request is targeting. */ - appId: components["parameters"]["appIdUrl"]; + /** The ID of the user which this request is targeting. */ + userId: components["parameters"]["userId"]; }; }; responses: { - /** Returns the deleted application. */ + /** Returns the deleted user. */ 200: { content: { - "application/json": components["schemas"]["applicationOutput"]; + "application/json": components["schemas"]["userOutput"]; }; }; }; }; - /** Based on application properties (currently only name) search for applications. */ - searchApplications: { + /** Based on user properties (currently only name) search for users. */ + search: { responses: { - /** Returns the applications that were found based on the search parameters. */ + /** Returns the found users based on search parameters. */ 200: { content: { - "application/json": components["schemas"]["applicationSearch"]; + "application/json": components["schemas"]["userSearch"]; }; }; }; @@ -795,7 +789,7 @@ export interface operations { }; }; /** Queries which have been created within a Budibase app can be executed using this, */ - executeQuery: { + execute: { parameters: { path: { /** The ID of the query which this request is targeting. */ @@ -820,349 +814,6 @@ export interface operations { }; }; }; - /** Based on query properties (currently only name) search for queries. */ - searchQueries: { - parameters: { - header: { - /** The ID of the app which this request is targeting. */ - "x-budibase-app-id": components["parameters"]["appId"]; - }; - }; - responses: { - /** Returns the queries found based on the search parameters. */ - 200: { - content: { - "application/json": components["schemas"]["querySearch"]; - }; - }; - }; - requestBody: { - content: { - "application/json": components["schemas"]["nameSearch"]; - }; - }; - }; - /** Creates a row within the specified table. */ - createRow: { - parameters: { - path: { - /** The ID of the table which this request is targeting. */ - tableId: components["parameters"]["tableId"]; - }; - header: { - /** The ID of the app which this request is targeting. */ - "x-budibase-app-id": components["parameters"]["appId"]; - }; - }; - responses: { - /** Returns the created row, including the ID which has been generated for it. This can be found in the Budibase portal, viewed under the developer information. */ - 200: { - content: { - "application/json": components["schemas"]["rowOutput"]; - }; - }; - }; - requestBody: { - content: { - "application/json": components["schemas"]["row"]; - }; - }; - }; - /** This gets a single row, it will be enriched with the full related rows, rather than the squashed "primaryDisplay" format returned by the search endpoint. */ - getRowById: { - parameters: { - path: { - /** The ID of the table which this request is targeting. */ - tableId: components["parameters"]["tableId"]; - /** The ID of the row which this request is targeting. */ - rowId: components["parameters"]["rowId"]; - }; - header: { - /** The ID of the app which this request is targeting. */ - "x-budibase-app-id": components["parameters"]["appId"]; - }; - }; - responses: { - /** Returns the retrieved row. */ - 200: { - content: { - "application/json": components["schemas"]["rowOutput"]; - }; - }; - }; - }; - /** Updates a row within the specified table. */ - updateRow: { - parameters: { - path: { - /** The ID of the table which this request is targeting. */ - tableId: components["parameters"]["tableId"]; - /** The ID of the row which this request is targeting. */ - rowId: components["parameters"]["rowId"]; - }; - header: { - /** The ID of the app which this request is targeting. */ - "x-budibase-app-id": components["parameters"]["appId"]; - }; - }; - responses: { - /** Returns the created row, including the ID which has been generated for it. */ - 200: { - content: { - "application/json": components["schemas"]["rowOutput"]; - }; - }; - }; - requestBody: { - content: { - "application/json": components["schemas"]["row"]; - }; - }; - }; - /** Deletes a row within the specified table. */ - deleteRow: { - parameters: { - path: { - /** The ID of the table which this request is targeting. */ - tableId: components["parameters"]["tableId"]; - /** The ID of the row which this request is targeting. */ - rowId: components["parameters"]["rowId"]; - }; - header: { - /** The ID of the app which this request is targeting. */ - "x-budibase-app-id": components["parameters"]["appId"]; - }; - }; - responses: { - /** Returns the deleted row, including the ID which has been generated for it. */ - 200: { - content: { - "application/json": components["schemas"]["rowOutput"]; - }; - }; - }; - }; - searchRows: { - parameters: { - path: { - /** The ID of the table which this request is targeting. */ - tableId: components["parameters"]["tableId"]; - }; - header: { - /** The ID of the app which this request is targeting. */ - "x-budibase-app-id": components["parameters"]["appId"]; - }; - }; - responses: { - /** The response will contain an array of rows that match the search parameters. */ - 200: { - content: { - "application/json": components["schemas"]["searchOutput"]; - }; - }; - }; - requestBody: { - content: { - "application/json": components["schemas"]["rowSearch"]; - }; - }; - }; - /** Create a table, this could be internal or external. */ - createTable: { - parameters: { - header: { - /** The ID of the app which this request is targeting. */ - "x-budibase-app-id": components["parameters"]["appId"]; - }; - }; - responses: { - /** Returns the created table, including the ID which has been generated for it. This can be internal or external datasources. */ - 200: { - content: { - "application/json": components["schemas"]["tableOutput"]; - }; - }; - }; - requestBody: { - content: { - "application/json": components["schemas"]["table"]; - }; - }; - }; - /** Lookup a table, this could be internal or external. */ - getTableById: { - parameters: { - path: { - /** The ID of the table which this request is targeting. */ - tableId: components["parameters"]["tableId"]; - }; - header: { - /** The ID of the app which this request is targeting. */ - "x-budibase-app-id": components["parameters"]["appId"]; - }; - }; - responses: { - /** Returns the retrieved table. */ - 200: { - content: { - "application/json": components["schemas"]["tableOutput"]; - }; - }; - }; - }; - /** Update a table, this could be internal or external. */ - updateTable: { - parameters: { - path: { - /** The ID of the table which this request is targeting. */ - tableId: components["parameters"]["tableId"]; - }; - header: { - /** The ID of the app which this request is targeting. */ - "x-budibase-app-id": components["parameters"]["appId"]; - }; - }; - responses: { - /** Returns the updated table. */ - 200: { - content: { - "application/json": components["schemas"]["tableOutput"]; - }; - }; - }; - requestBody: { - content: { - "application/json": components["schemas"]["table"]; - }; - }; - }; - /** Delete a table, this could be internal or external. */ - deleteTable: { - parameters: { - path: { - /** The ID of the table which this request is targeting. */ - tableId: components["parameters"]["tableId"]; - }; - header: { - /** The ID of the app which this request is targeting. */ - "x-budibase-app-id": components["parameters"]["appId"]; - }; - }; - responses: { - /** Returns the deleted table. */ - 200: { - content: { - "application/json": components["schemas"]["tableOutput"]; - }; - }; - }; - }; - /** Based on table properties (currently only name) search for tables. This could be an internal or an external table. */ - searchTables: { - parameters: { - header: { - /** The ID of the app which this request is targeting. */ - "x-budibase-app-id": components["parameters"]["appId"]; - }; - }; - responses: { - /** Returns the found tables, based on the search parameters. */ - 200: { - content: { - "application/json": components["schemas"]["tableSearch"]; - }; - }; - }; - requestBody: { - content: { - "application/json": components["schemas"]["nameSearch"]; - }; - }; - }; - createUser: { - responses: { - /** Returns the created user. */ - 200: { - content: { - "application/json": components["schemas"]["userOutput"]; - }; - }; - }; - requestBody: { - content: { - "application/json": components["schemas"]["user"]; - }; - }; - }; - getUserById: { - parameters: { - path: { - /** The ID of the user which this request is targeting. */ - userId: components["parameters"]["userId"]; - }; - }; - responses: { - /** Returns the retrieved user. */ - 200: { - content: { - "application/json": components["schemas"]["userOutput"]; - }; - }; - }; - }; - updateUser: { - parameters: { - path: { - /** The ID of the user which this request is targeting. */ - userId: components["parameters"]["userId"]; - }; - }; - responses: { - /** Returns the updated user. */ - 200: { - content: { - "application/json": components["schemas"]["userOutput"]; - }; - }; - }; - requestBody: { - content: { - "application/json": components["schemas"]["user"]; - }; - }; - }; - deleteUser: { - parameters: { - path: { - /** The ID of the user which this request is targeting. */ - userId: components["parameters"]["userId"]; - }; - }; - responses: { - /** Returns the deleted user. */ - 200: { - content: { - "application/json": components["schemas"]["userOutput"]; - }; - }; - }; - }; - /** Based on user properties (currently only name) search for users. */ - searchUsers: { - responses: { - /** Returns the found users based on search parameters. */ - 200: { - content: { - "application/json": components["schemas"]["userSearch"]; - }; - }; - }; - requestBody: { - content: { - "application/json": components["schemas"]["nameSearch"]; - }; - }; - }; } export interface external {}