Browse Source

refactor: update docs and swagger

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5747/head
Pranav C 1 year ago
parent
commit
dd5bd7c060
  1. 6
      packages/noco-docs/content/en/developer-resources/rest-apis.md
  2. 345
      packages/nocodb/src/schema/swagger.json

6
packages/noco-docs/content/en/developer-resources/rest-apis.md

@ -74,12 +74,6 @@ Currently, the default value for {orgs} is <b>noco</b>. Users will be able to ch
| Data | Delete| dbViewRow | delete | /api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}/{rowId} | | Data | Delete| dbViewRow | delete | /api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}/{rowId} |
| Data | Get | dbViewRow | count | /api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}/count | | Data | Get | dbViewRow | count | /api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}/count |
| Data | Get | dbViewRow | groupedDataList | /api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}/group/{columnId} | | Data | Get | dbViewRow | groupedDataList | /api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}/group/{columnId} |
| Data | Get | dbTableRow | tableRowList | /api/v1/tables/{tableId} |
| Data | Post | dbTableRow | tableRowCreate | /api/v1/tables/{tableId} |
| Data | Get | dbTableRow | tableRowRead | /api/v1/tables/{tableId}/rows/{rowId} |
| Data | Patch | dbTableRow | tableRowUpdate | /api/v1/tables/{tableId}/rows |
| Data | Delete| dbTableRow | tableRowDelete | /api/v1/tables/{tableId}/rows |
| Data | Get | dbTableRow | tableRowCount | /api/v1/tables/{tableId}/rows/count |
### Meta APIs ### Meta APIs

345
packages/nocodb/src/schema/swagger.json

@ -13990,351 +13990,6 @@
} }
] ]
} }
},
"/api/v1/tables/{tableId}/rows": {
"parameters": [
{
"schema": {
"type": "string"
},
"name": "tableId",
"in": "path",
"required": true,
"description": "Table Id"
},
{
"schema": {
"type": "string"
},
"name": "viewId",
"in": "query"
}
],
"get": {
"summary": "List Table View Rows",
"operationId": "table-row-list",
"description": "List all table view rows",
"tags": ["DB Table Row"],
"parameters": [
{
"schema": {
"type": "array"
},
"in": "query",
"name": "fields"
},
{
"schema": {
"type": "array"
},
"in": "query",
"name": "sort"
},
{
"schema": {
"type": "string"
},
"in": "query",
"name": "where"
},
{
"schema": {},
"in": "query",
"name": "nested",
"description": "Query params for nested data"
},
{
"schema": {
"type": "number"
},
"in": "query",
"name": "offset"
},
{
"$ref": "#/components/parameters/xc-auth"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"list": {
"type": "array",
"x-stoplight": {
"id": "okd8utzm9xqet"
},
"description": "List of table view rows",
"items": {
"x-stoplight": {
"id": "j758lsjv53o4q"
},
"type": "object"
}
},
"pageInfo": {
"$ref": "#/components/schemas/Paginated",
"x-stoplight": {
"id": "hylgqzgm8yhye"
},
"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 View Row",
"operationId": "table-row-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"
}
},
"tags": ["DB Table Row"],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object"
},
"examples": {
"Example 1": {
"value": {
"col1": "foo",
"col2": "bar"
}
}
}
}
}
},
"description": "Create a new row in the given Table View"
}
},
"/api/v1/tables/{tableId}/rows/count": {
"parameters": [
{
"schema": {
"type": "string"
},
"name": "tableId",
"in": "path",
"required": true,
"description": "Table Id"
},
{
"schema": {
"type": "string"
},
"name": "viewId",
"in": "query"
}
],
"get": {
"summary": "Count Table View Rows",
"operationId": "table-row-count",
"description": "Count how many rows in the given Table View",
"tags": ["DB Table Row"],
"parameters": [
{
"schema": {
"type": "string"
},
"in": "query",
"name": "where"
},
{
"schema": {},
"in": "query",
"name": "nested",
"description": "Query params for nested data"
},
{
"$ref": "#/components/parameters/xc-auth"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"count": {
"type": "number",
"x-stoplight": {
"id": "hwq29x70rcipi"
}
}
}
},
"examples": {
"Example 1": {
"value": {
"count": 25
}
}
}
}
}
}
}
}
},
"/api/v1/tables/{tableId}/rows/{rowId}": {
"parameters": [
{
"schema": {
"type": "string"
},
"name": "tableId",
"in": "path",
"required": true,
"description": "Table Id"
},
{
"schema": {
"type": "string"
},
"name": "viewId",
"in": "query"
},
{
"schema": {
"example": "1"
},
"name": "rowId",
"in": "path",
"required": true,
"description": "Unique Row ID"
}
],
"get": {
"summary": "Get Table View Row",
"operationId": "db-view-row-read",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {}
},
"examples": {
"Example 1": {
"value": {
"Id": 1,
"Title": "foo",
"CreatedAt": "2023-03-11T09:11:47.437Z",
"UpdatedAt": "2023-03-11T09:11:47.784Z"
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
}
},
"description": "Get the target Table View Row",
"tags": ["DB Table Row"],
"parameters": [
{
"$ref": "#/components/parameters/xc-auth"
}
]
}
} }
}, },
"components": { "components": {

Loading…
Cancel
Save