### Pagination Example Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/configuration.md Examples demonstrating how to paginate through records using limit and offset parameters in API requests. ```bash # Get records 1-25 GET /api/v3/data/{baseId}/{tableId}/records?limit=25&offset=0 # Get records 26-50 GET /api/v3/data/{baseId}/{tableId}/records?limit=25&offset=25 ``` -------------------------------- ### Pagination Example Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/configuration.md Examples demonstrating how to use `limit` and `offset` query parameters for pagination. ```APIDOC ## Pagination Example ```bash # Get records 1-25 GET /api/v3/data/{baseId}/{tableId}/records?limit=25&offset=0 # Get records 26-50 GET /api/v3/data/{baseId}/{tableId}/records?limit=25&offset=25 ``` ``` -------------------------------- ### HTTP Client Setup with Python (requests) Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/integration-patterns.md Use the requests library in Python to interact with the NocoDB API. This includes examples for getting records and creating new ones. Ensure your API token, base URL, base ID, and table ID are correctly configured. ```python import requests import json token = 'your_api_token' base_url = 'https://noco.example.com' base_id = 'pgfqcp0ocloo1j3' table_id = 'mdcjj43gx2ivq9j' headers = {'xc-token': token, 'Content-Type': 'application/json'} # Get records response = requests.get( f'{base_url}/api/v3/data/{base_id}/{table_id}/records', headers=headers ) records = response.json() # Create record data = {'title': 'New Record', 'status': 'active'} response = requests.post( f'{base_url}/api/v3/data/{base_id}/{table_id}/records', headers=headers, json=data ) created = response.json() ``` -------------------------------- ### Paginate Results - First Page Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/getting-started.md Retrieve a specific number of records starting from the beginning of the dataset. Use `limit` for the count and `offset` for the starting point. ```bash # Get first 10 records curl -H 'xc-token: YOUR_TOKEN' \ 'https://noco.example.com/api/v3/data/{baseId}/{tableId}/records?limit=10&offset=0' ``` -------------------------------- ### Hierarchical Pattern Example (Get Category with Parent/Children) Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/linked-records-guide.md Demonstrates retrieving a category record and expanding its parent category and sub-categories using the 'expand' query parameter. ```APIDOC ## GET /api/v3/data/{baseId}/categories/records/{categoryId} ### Description Retrieves a category record and expands its parent category and sub-categories. ### Method GET ### Endpoint `/api/v3/data/{baseId}/categories/records/{categoryId}` ### Query Parameters - **expand** (string) - Optional - Specifies related tables to expand. Example: `ParentCategory,SubCategories`. ``` -------------------------------- ### Command Palette Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/endpoints.md Get suggestions from the command palette. ```APIDOC ## POST /api/v1/command_palette ### Description Get command palette suggestions ### Method POST ### Endpoint /api/v1/command_palette ``` -------------------------------- ### Sorting Example Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/configuration.md Demonstrates how to sort records by one or more fields, including descending order. ```plaintext sort=created_at # Ascending by created_at sort=-created_at # Descending by created_at sort=-priority,name # Multiple fields ``` -------------------------------- ### Command Palette Endpoint Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/endpoints.md Get suggestions from the command palette. ```APIDOC ## POST /api/v1/command_palette ### Description Get command palette suggestions. ### Method POST ### Endpoint /api/v1/command_palette ``` -------------------------------- ### Filtering Example Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/configuration.md Illustrates how to filter records using a 'where' clause with comparison operators. ```plaintext where=(name,like,John) AND (age,gt,25) ``` -------------------------------- ### Master-Detail Pattern Example Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/linked-records-guide.md Demonstrates how to retrieve a master record (e.g., Customer) and its associated detail records (e.g., Orders) using the 'expand' query parameter. ```APIDOC ## GET /api/v3/data/{baseId}/customers/records/{customerId} ### Description Retrieves a customer record and expands its associated orders. ### Method GET ### Endpoint `/api/v3/data/{baseId}/customers/records/{customerId}` ### Query Parameters - **expand** (string) - Optional - Specifies related tables to expand. Example: `Orders` or `Orders.LineItems` for nested expansion. ### Response #### Success Response (200) - Returns the customer record with expanded order details if requested. ``` -------------------------------- ### Master-Detail: Get Customer with Orders Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/linked-records-guide.md Retrieve a customer record and expand its associated 'Orders' to view related order details. ```bash # Get customer GET /api/v3/data/{baseId}/customers/records/{customerId}?expand=Orders ``` -------------------------------- ### License - Get App License Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/endpoints.md Retrieves the application's license information. ```APIDOC ## GET /api/v1/license ### Description Get App License ### Method GET ### Endpoint /api/v1/license ``` -------------------------------- ### Get App Version Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/endpoints.md Retrieves the current version of the application. ```APIDOC ## GET /api/v1/version ### Description Get App Version ### Method GET ### Endpoint /api/v1/version ``` -------------------------------- ### Hierarchical Pattern Example (Link Category) Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/linked-records-guide.md Shows how to establish a parent-child relationship between records (e.g., Categories) using a PATCH request to update the parent link. ```APIDOC ## PATCH /api/v3/data/{baseId}/categories/records/{categoryId} ### Description Links a category record to a parent category. ### Method PATCH ### Endpoint `/api/v3/data/{baseId}/categories/records/{categoryId}` ### Parameters #### Request Body - **ParentCategory** (array) - Required - An array containing an object with the `id` of the parent category. - **id** (string) - Required - The ID of the parent category. ### Request Example ```json { "ParentCategory": [{"id": "parentId"}] } ``` ``` -------------------------------- ### HTTP Client Setup with JavaScript (fetch) Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/integration-patterns.md Use the fetch API in JavaScript to interact with the NocoDB API. This includes functions for fetching records and creating new ones. Ensure your API token, base URL, base ID, and table ID are correctly configured. ```javascript const token = 'your_api_token'; const baseUrl = 'https://noco.example.com'; const baseId = 'pgfqcp0ocloo1j3'; const tableId = 'mdcjj43gx2ivq9j'; // Fetch records async function getRecords() { const response = await fetch( `${baseUrl}/api/v3/data/${baseId}/${tableId}/records`, { headers: { 'xc-token': token } } ); return response.json(); } // Create record async function createRecord(data) { const response = await fetch( `${baseUrl}/api/v3/data/${baseId}/${tableId}/records`, { method: 'POST', headers': { 'xc-token': token, 'Content-Type': 'application/json' }, body: JSON.stringify(data) } ); return response.json(); } ``` -------------------------------- ### HTTP Client Setup with curl Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/integration-patterns.md Use curl to interact with the NocoDB API. Ensure your API token, base URL, base ID, and table ID are correctly configured. ```bash #!/bin/bash TOKEN="your_api_token" BASE_URL="https://noco.example.com" BASE_ID="pgfqcp0ocloo1j3" TABLE_ID="mdcjj43gx2ivq9j" # List records curl -H "xc-token: $TOKEN" \ "$BASE_URL/api/v3/data/$BASE_ID/$TABLE_ID/records" # Create record curl -X POST -H "xc-token: $TOKEN" \ -H "Content-Type: application/json" \ -d '{"Title": "New Record"}' \ "$BASE_URL/api/v3/data/$BASE_ID/$TABLE_ID/records" ``` -------------------------------- ### Get Tables Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/INDEX.md Retrieves a list of all tables within a specific base. ```APIDOC ## GET /api/v3/meta/bases/{baseId}/tables ### Description Retrieves a list of tables within a specific base. ### Method GET ### Endpoint `/api/v3/meta/bases/{baseId}/tables` ``` -------------------------------- ### Get Workspaces Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/INDEX.md Retrieves a list of all workspaces available in your NocoDB instance. ```APIDOC ## GET /api/v3/meta/workspaces/{workspaceId}/bases ### Description Retrieves a list of bases within a specific workspace. ### Method GET ### Endpoint `/api/v3/meta/workspaces/{workspaceId}/bases` ``` -------------------------------- ### List Tables in a Base Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/getting-started.md Get a list of all tables within a specified base. Replace `{baseId}` with the relevant base ID. ```bash curl -H 'xc-token: YOUR_TOKEN' \ 'https://noco.example.com/api/v3/meta/bases/{baseId}/tables' ``` -------------------------------- ### Get Fields Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/INDEX.md Retrieves a list of all fields (columns) within a specific base. ```APIDOC ## GET /api/v3/meta/bases/{baseId}/fields ### Description Retrieves a list of fields within a specific base. ### Method GET ### Endpoint `/api/v3/meta/bases/{baseId}/fields` ``` -------------------------------- ### Get OAuth Client Information Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/endpoints.md Fetches information about a specific OAuth client. ```APIDOC ## GET /api/v2/public/oauth/client/{clientId} ### Description Get OAuth Client Information ### Method GET ### Endpoint /api/v2/public/oauth/client/{clientId} ``` -------------------------------- ### Get Records from a Table Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/getting-started.md Fetch all records from a given table. Replace `{baseId}` and `{tableId}` with your specific IDs. ```bash curl -H 'xc-token: YOUR_TOKEN' \ 'https://noco.example.com/api/v3/data/{baseId}/{tableId}/records' ``` -------------------------------- ### Master-Detail: Get Customer with Nested Expanded Orders Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/linked-records-guide.md Retrieve a customer record and expand related 'Orders' as well as nested 'LineItems' within those orders. ```bash # Get customer with all related order details GET /api/v3/data/{baseId}/customers/records/{customerId}?expand=Orders.LineItems ``` -------------------------------- ### Many-to-Many: Get Student with Enrolled Courses Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/linked-records-guide.md Retrieve a student record and expand the 'Courses' to see all courses the student is enrolled in. ```bash # Get student with all enrolled courses GET /api/v3/data/{baseId}/students/records/{studentId}?expand=Courses ``` -------------------------------- ### Many-to-Many: Get Course with Enrolled Students Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/linked-records-guide.md Retrieve a course record and expand the 'Students' to see all students enrolled in that course. ```bash # Get course with all enrolled students GET /api/v3/data/{baseId}/courses/records/{courseId}?expand=Students ``` -------------------------------- ### Many-to-Many Pattern Example Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/linked-records-guide.md Illustrates retrieving records from one side of a many-to-many relationship (e.g., Students) and expanding the related records (e.g., Courses) through an intermediate table. ```APIDOC ## GET /api/v3/data/{baseId}/students/records/{studentId} ### Description Retrieves a student record and expands their enrolled courses. ### Method GET ### Endpoint `/api/v3/data/{baseId}/students/records/{studentId}` ### Query Parameters - **expand** (string) - Optional - Specifies related tables to expand. Example: `Courses`. ``` -------------------------------- ### Limit and Offset Pagination Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/advanced-querying.md Control the number of records returned and the starting point of the results using the `limit` and `offset` query parameters. ```APIDOC ## GET /api/v3/data/{baseId}/{tableId}/records ### Description Retrieves a paginated list of records from a specified table. Use `limit` to set the maximum number of records per page and `offset` to specify the starting record index. ### Method GET ### Endpoint /api/v3/data/{baseId}/{tableId}/records ### Query Parameters - **limit** (integer) - Optional - The maximum number of records to return. - **offset** (integer) - Optional - The number of records to skip from the beginning of the result set. ### Request Example ```bash # Get records 1-25 GET /api/v3/data/{baseId}/{tableId}/records?limit=25&offset=0 # Get records 26-50 GET /api/v3/data/{baseId}/{tableId}/records?limit=25&offset=25 # Get all records (limit 1000) GET /api/v3/data/{baseId}/{tableId}/records?limit=1000&offset=0 ``` ### Response #### Success Response (200) - **list** (array) - An array of records. - **count** (integer) - The total number of records matching the query. #### Response Example { "list": [ { "id": "record_id_1", "field1": "value1", "field2": "value2" } ], "count": 100 } ``` -------------------------------- ### Initialize Redoc with Filtered Meta APIs Source: https://github.com/nocodb/noco-apis-doc/blob/main/meta-apis-v3/index.html Fetches the swagger-v3.json file, filters it to include only meta APIs, and initializes Redoc to display the documentation. Ensure the swagger-v3.json file is accessible. ```javascript var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function () { if (this.readyState == 4 && this.status == 200) { const swaggerJson = this.responseText; const swagger = JSON.parse(swaggerJson); // filter meta apis swagger.paths = Object.entries(swagger.paths).reduce((pathObj, [path, pathMeta]) => { // skip non meta APIs if (/^\/api\/v3\/meta\//.test(path)) { pathObj[path] = pathMeta; } return pathObj; }, {}); swagger.info.title = 'NocoDB' swagger.info.version = null Redoc.init(swagger, {}, document.getElementById("redoc")); } }; xhttp.open("GET", "./swagger-v3.json", true); xhttp.send(); ``` -------------------------------- ### List All Workspaces Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/getting-started.md Use this endpoint to retrieve a list of all available workspaces. Requires authentication with your API token. ```bash curl -H 'xc-token: YOUR_TOKEN' \ 'https://noco.example.com/api/v3/meta/workspaces' ``` -------------------------------- ### Initialize Analytics and Event Listeners Source: https://github.com/nocodb/noco-apis-doc/blob/main/meta-apis-v3/index.html Initializes nc-analytics and sets up click and keydown event listeners for tracking user interactions. The click listener captures item clicks, and the keydown listener captures search queries. ```javascript import {init, push as _push} from "https://www.unpkg.com/nc-analytics@0.0.6/dist/index.js"; push = _push; init(); const clickListener = (e) => { if (e.nc_handled) return; e.nc_handled = true; let target = e.target; while (target && !target.getAttribute('data-item-id')) { target = target['parentElement']; } if (!target) return; push({ event: "meta/apis-v1", $current_url: location.href, path: location.pathname, hash: location.hash, item_clicked: (target.innerText.split('\n')[1] || "").trim(), }); }; const keydownListener = (e) => { const selectedElement = document.querySelector(".search-input"); if (selectedElement) { push({ event: "meta/apis-v1", $current_url: location.href, path: location.pathname, hash: location.hash, item_clicked: (selectedElement.innerText || "").trim(), search_query: selectedElement.value || "", }); } }; document.body.addEventListener("click", clickListener, true); document.body.addEventListener("keydown", keydownListener, true); ``` -------------------------------- ### Get Field Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/api-reference/data-v3-fields.md Retrieve the details of a specific field. ```APIDOC ## GET /api/v3/meta/bases/{baseId}/fields/{fieldId} ### Description Retrieve the details of a specific field. ### Method GET ### Endpoint /api/v3/meta/bases/{baseId}/fields/{fieldId} ### Parameters #### Path Parameters - **baseId** (string) - Required - Unique identifier for the base. - **fieldId** (string) - Required - Unique identifier for the field being updated. ### Responses #### Success Response (200) Field details are retrieved. ```json // See Field schema ``` #### Error Responses - **404**: Field not found. - **500**: Server error. ``` -------------------------------- ### Get table schema Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/api-reference/data-v3-tables.md Retrieve the details of a specific table. ```APIDOC ## GET /api/v3/meta/bases/{baseId}/tables/{tableId} ### Description Retrieve the details of a specific table. ### Method GET ### Endpoint /api/v3/meta/bases/{baseId}/tables/{tableId} ### Parameters #### Path Parameters - **tableId** (string) - ✓ - Unique identifier for the table. - **baseId** (string) - ✓ - Unique identifier for the base. ### Responses #### Success Response (200) - **Table details are retrieved.** #### Error Response (404) - **Table not found.** #### Error Response (500) - **Server error.** ``` -------------------------------- ### Db - Get Base Info Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/endpoints.md Retrieves information about a specific base. ```APIDOC ## GET /api/v1/db/meta/projects/{baseId}/info ### Description Get Base info ### Method GET ### Endpoint /api/v1/db/meta/projects/{baseId}/info ``` -------------------------------- ### NocoDB .env File Configuration Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/integration-patterns.md Sets up environment variables for NocoDB integration. Includes base URL, API token, base ID, table ID, request timeout, and retry settings. ```bash # .env NC_BASE_URL=https://noco.example.com NC_API_TOKEN=your_api_token_here NC_BASE_ID=pgfqcp0ocloo1j3 NC_TABLE_ID=mdcjj43gx2ivq9j NC_REQUEST_TIMEOUT=30000 NC_MAX_RETRIES=3 ``` -------------------------------- ### Tables - Get Nested Relations Rows Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/endpoints.md Retrieves related rows through a link/column. ```APIDOC ## GET /api/v2/tables/{tableId}/links/{columnId}/records/{rowId} ### Description Get Nested Relations Rows ### Method GET ### Endpoint /api/v2/tables/{tableId}/links/{columnId}/records/{rowId} ``` -------------------------------- ### Auth - User Signup Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/endpoints.md Handles user signup process. ```APIDOC ## POST /api/v1/auth/user/signup ### Description Signup ### Method POST ### Endpoint /api/v1/auth/user/signup ``` -------------------------------- ### Auth - Get User Info Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/endpoints.md Retrieves information about the currently authenticated user. ```APIDOC ## GET /api/v1/auth/user/me ### Description Get User Info ### Method GET ### Endpoint /api/v1/auth/user/me ``` -------------------------------- ### Organisation User Profile - Get Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/endpoints.md Retrieves the profile information for an organization user. ```APIDOC ## GET /api/v1/users/{userId}/profile ### Description Organisation User Profile - Get ### Method GET ### Endpoint /api/v1/users/{userId}/profile ``` -------------------------------- ### Db - Create Base Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/endpoints.md Creates a new base (project). ```APIDOC ## POST /api/v1/db/meta/projects/ ### Description Create Base ### Method POST ### Endpoint /api/v1/db/meta/projects/ ``` -------------------------------- ### Invite a User to Base Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/users-workspaces-operations.md Use this endpoint to invite a new user to a specific base by providing their email and desired role. Ensure you include your API token and set the correct content type. ```bash curl -X POST 'https://noco.example.com/api/v3/meta/bases/{baseId}/users' \ -H 'xc-token: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "roles": "editor", "email": "user@example.com" }' ``` -------------------------------- ### Aggregated Meta Info Endpoint Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/endpoints.md Endpoint to get aggregated meta information. ```APIDOC ## GET /api/v1/aggregated-meta-info ### Description Get aggregated meta information about the system. ### Method GET ### Endpoint /api/v1/aggregated-meta-info ``` -------------------------------- ### BaseCreate Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/types.md Defines the structure for creating a new base, including its title and optional metadata. ```APIDOC ## BaseCreate ### Description Defines the structure for creating a new base, including its title and optional metadata. ### Properties | Property | Type | Required | Description | |----------|------|----------|-------------| | `title` | string | ✓ | Title of the base. | | `meta` | BaseMetaReq | | | ``` -------------------------------- ### Initialize Analytics and Event Listeners Source: https://github.com/nocodb/noco-apis-doc/blob/main/data-apis-v3/index.html Initializes nc-analytics and sets up click and keydown event listeners for tracking user interactions within the API documentation. This helps in understanding user behavior and API usage patterns. ```javascript var push; const clickListener = (e) => { if (e.nc_handled) return; e.nc_handled = true; let target = e.target; while (target && !target.getAttribute('data-item-id')) { target = target['parentElement']; } if (!target) return; push({ event: "meta/apis-v1", $current_url: location.href, path: location.pathname, hash: location.hash, item_clicked: (target.innerText.split('\n')[1] || "").trim(), }); }; const keydownListener = (e) => { const selectedElement = document.querySelector(".search-input"); if (selectedElement) { push({ event: "meta/apis-v1", $current_url: location.href, path: location.pathname, hash: location.hash, item_clicked: (selectedElement.innerText || "").trim(), search_query: selectedElement.value || "", }); } }; import {init, push as _push} from "https://www.unpkg.com/nc-analytics@0.0.6/dist/index.js"; push = _push; init(); document.body.addEventListener("click", clickListener, true); document.body.addEventListener("keydown", keydownListener, true); ``` -------------------------------- ### GET /api/v3/meta/bases/{baseId}/tables/{tableId} Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/tables-operations.md Retrieve the details of a specific table. ```APIDOC ## GET /api/v3/meta/bases/{baseId}/tables/{tableId} ### Description Retrieve the details of a specific table. ### Method GET ### Endpoint /api/v3/meta/bases/{baseId}/tables/{tableId} ### Parameters #### Path Parameters - **tableId** (string) - Required - Unique identifier for the table. - **baseId** (string) - Required - Unique identifier for the base. ``` -------------------------------- ### Get Field Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/fields-operations.md Retrieve the details of a specific field. Requires baseId and fieldId. ```APIDOC ## GET /api/v3/meta/bases/{baseId}/fields/{fieldId} ### Description Retrieve the details of a specific field. ### Method GET ### Endpoint /api/v3/meta/bases/{baseId}/fields/{fieldId} ### Parameters #### Path Parameters - **baseId** (string) - Required - Unique identifier for the base. - **fieldId** (string) - Required - Unique identifier for the field being updated. ``` -------------------------------- ### Get Records Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/INDEX.md Retrieves records (rows) from a specific table within a base. ```APIDOC ## GET /api/v3/data/{baseId}/{tableId}/records ### Description Retrieves records from a specific table. ### Method GET ### Endpoint `/api/v3/data/{baseId}/{tableId}/records` ``` -------------------------------- ### Initialize Redoc with Filtered Swagger JSON Source: https://github.com/nocodb/noco-apis-doc/blob/main/data-apis-v3/index.html Fetches the swagger-v3.json file, filters out non-meta APIs, and initializes Redoc with the processed data. This is useful for customizing the API documentation display. ```javascript var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function () { if (this.readyState == 4 && this.status == 200) { const swaggerJson = this.responseText; const swagger = JSON.parse(swaggerJson); // filter data apis swagger.paths = Object.entries(swagger.paths).reduce((pathObj, [path, pathMeta]) => { // skip non meta APIs if (!/^\/api\/v3\/meta\//.test(path)) { pathObj[path] = pathMeta; } return pathObj; }, {}); swagger["x-tagGroups"] = [ { name: "DATA", tags: ["Table Records", "Linked Records"], }, { name: "DOCS", tags: ["Documents"], }, ]; swagger.info.title = 'NocoDB' swagger.info.version = null Redoc.init(swagger, {}, document.getElementById("redoc")); } }; xhttp.open("GET", "./swagger-v3.json", true); xhttp.send(); ``` -------------------------------- ### Db - List Projects Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/endpoints.md Lists all available projects (bases). ```APIDOC ## GET /api/v1/db/meta/projects/ ### Description List Projects ### Method GET ### Endpoint /api/v1/db/meta/projects/ ``` -------------------------------- ### Find Recent Active Orders with Pagination and Expansion Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/advanced-querying.md Use 'where' to filter by status and creation date, 'sort' for ordering, 'limit' for pagination, and 'expand' to include related data. Always paginate with limit/offset and filter early to reduce data transfer. ```bash curl -H 'xc-token: YOUR_TOKEN' \ 'https://noco.example.com/api/v3/data/{baseId}/orders/records' \ -G \ --data-urlencode 'where=((status,eq,active) AND (created_at,gte,2024-01-01))' \ --data-urlencode 'sort=-created_at' \ --data-urlencode 'limit=20' \ --data-urlencode 'expand=Customer,Items' ``` -------------------------------- ### GET /api/v3/meta/bases/{base_id}/tables Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/tables-operations.md Retrieve a list of all tables within the specified base. ```APIDOC ## GET /api/v3/meta/bases/{base_id}/tables ### Description Retrieve list of all tables within the specified base. ### Method GET ### Endpoint /api/v3/meta/bases/{base_id}/tables ### Parameters #### Path Parameters - **base_id** (string) - Required - Unique identifier for the base. ``` -------------------------------- ### App-Settings Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/endpoints.md Manages application settings, allowing retrieval and creation of settings. ```APIDOC ## GET /api/v1/app-settings ### Description Get App Settings ### Method GET ### Endpoint /api/v1/app-settings ``` ```APIDOC ## POST /api/v1/app-settings ### Description Create App Settings ### Method POST ### Endpoint /api/v1/app-settings ``` -------------------------------- ### GET /api/v3/meta/bases/{base_id}/users Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/api-reference/data-v3-base-users.md Retrieve a list of users associated with a specific base. ```APIDOC ## GET /api/v3/meta/bases/{base_id}/users ### Description Retrieve a list of users associated with a specific base. ### Method GET ### Endpoint /api/v3/meta/bases/{base_id}/users ### Parameters #### Path Parameters - **base_id** (string) - Required - Unique identifier for the base. ### Responses #### Success Response (200) - A list of users for the base. (See BaseUserList schema) #### Error Response (404) Base not found. #### Error Response (500) Server error. ``` -------------------------------- ### Combined Filter, Sort, and Pagination Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/advanced-querying.md Combine 'where', 'sort', 'limit', and 'offset' parameters to filter, sort, and paginate query results. ```bash # Get active customers, sorted by name, with pagination GET /api/v3/data/{baseId}/{tableId}/records \ ?where=(status,eq,active) \ &sort=name \ &limit=50 \ &offset=0 ``` -------------------------------- ### GET /api/v3/meta/bases/{base_id}/users Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/api-reference/meta-v3-base-users.md Retrieve a list of users associated with a specific base. ```APIDOC ## GET /api/v3/meta/bases/{base_id}/users ### Description Retrieve a list of users associated with a specific base. ### Method GET ### Endpoint /api/v3/meta/bases/{base_id}/users ### Parameters #### Path Parameters - **base_id** (string) - Required - Unique identifier for the base. ### Responses #### Success Response (200) A list of users for the base. #### Response Example ```json // See BaseUserList schema ``` #### Error Responses - **404**: Base not found. - **500**: Server error. ``` -------------------------------- ### Create Base Request Body Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/bases-operations.md Use this JSON structure to create a new base. Provide the title and an optional description for the base. ```json { "title": "My Base", "description": "Base description" } ``` -------------------------------- ### DB Table Filter Operations Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/endpoints.md Endpoints for getting, creating, updating, and deleting view filters. ```APIDOC ## GET /api/v1/db/meta/views/{viewId}/filters ### Description Get View Filter ### Method GET ### Endpoint /api/v1/db/meta/views/{viewId}/filters ``` ```APIDOC ## POST /api/v1/db/meta/views/{viewId}/filters ### Description Create View Filter ### Method POST ### Endpoint /api/v1/db/meta/views/{viewId}/filters ``` ```APIDOC ## GET /api/v1/db/meta/filters/{filterId} ### Description Get Filter ### Method GET ### Endpoint /api/v1/db/meta/filters/{filterId} ``` ```APIDOC ## PATCH /api/v1/db/meta/filters/{filterId} ### Description Update Filter ### Method PATCH ### Endpoint /api/v1/db/meta/filters/{filterId} ``` ```APIDOC ## DELETE /api/v1/db/meta/filters/{filterId} ### Description Delete Filter ### Method DELETE ### Endpoint /api/v1/db/meta/filters/{filterId} ``` -------------------------------- ### Update Authentication Headers: v1 to v3 Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/api-versions.md Change the authentication header from 'xc-auth' in v1 to 'xc-token' in v3. ```text # v1 xc-auth: YOUR_TOKEN # v3 xc-token: YOUR_TOKEN ``` -------------------------------- ### Health - Get Application Health Status Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/endpoints.md Retrieves the current health status of the NocoDB application. ```APIDOC ## GET /api/v1/health ### Description Get Application Health Status ### Method GET ### Endpoint /api/v1/health ``` -------------------------------- ### GET /api/v3/meta/bases/{baseId}/tables/{tableId}/views Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/tables-operations.md Retrieve a list of all views for a specific table. ```APIDOC ## GET /api/v3/meta/bases/{baseId}/tables/{tableId}/views ### Description Retrieve a list of all views for a specific table. ### Method GET ### Endpoint /api/v3/meta/bases/{baseId}/tables/{tableId}/views ### Parameters #### Path Parameters - **baseId** (string) - Required - Unique identifier for the base. - **tableId** (string) - Required - Unique identifier for the table. ``` -------------------------------- ### Search for Customers by Name or Email Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/advanced-querying.md Use 'where' with OR conditions to search across multiple fields. Specify 'fields' to select only the necessary columns, reducing data transfer. ```bash curl -H 'xc-token: YOUR_TOKEN' \ 'https://noco.example.com/api/v3/data/{baseId}/customers/records' \ -G \ --data-urlencode 'where=((name,like,john) OR (email,like,john@))' \ --data-urlencode 'sort=name' \ --data-urlencode 'fields=id,name,email,phone' ``` -------------------------------- ### NocoDB Resource Hierarchy Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/README.md Illustrates the hierarchical structure of NocoDB resources, from Workspace down to Sort. ```text # Resource Hierarchy Workspace → Base → Table → Record ├→ Field └→ View ├→ Filter └→ Sort ``` -------------------------------- ### Get base meta Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/api-reference/data-v3-bases.md Retrieve meta details of a specific base using its unique identifier. ```APIDOC ## GET /api/v3/bases/{baseId} ### Description Retrieve meta details of a specific base using its unique identifier. ### Method GET ### Endpoint /api/v3/bases/{baseId} ### Parameters #### Path Parameters - **baseId** (string) - Required - Unique identifier of the base. ### Responses #### Success Response (200) - Base meta was retrieved. - **Base schema** ``` -------------------------------- ### List All Workspaces Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/getting-started.md Retrieves a list of all available workspaces in your NocoDB instance. Requires authentication with an API token. ```APIDOC ## List All Workspaces ### Description Retrieves a list of all available workspaces. ### Method GET ### Endpoint /api/v3/meta/workspaces ### Request Headers - **xc-token** (string) - Required - Your API token ### Response #### Success Response (200) - Returns a JSON array of workspace objects. ``` -------------------------------- ### Db - Get UI ACL Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/endpoints.md Retrieves the UI Access Control List (ACL) for a specific base. ```APIDOC ## GET /api/v1/db/meta/projects/{baseId}/visibility-rules ### Description Get UI ACL ### Method GET ### Endpoint /api/v1/db/meta/projects/{baseId}/visibility-rules ``` -------------------------------- ### Get Shared View Attachment Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/endpoints.md Downloads an attachment associated with a specific row and column in a shared view. ```APIDOC ## GET /api/v2/public/shared-view/{sharedViewUuid}/downloadAttachment/{columnId}/{rowId} ### Description Get Shared View Attachment ### Method GET ### Endpoint /api/v2/public/shared-view/{sharedViewUuid}/downloadAttachment/{columnId}/{rowId} ``` -------------------------------- ### Create Organisation User Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/endpoints.md Creates a new user within the organization. ```APIDOC ## POST /api/v1/users ### Description Create Organisation User ### Method POST ### Endpoint /api/v1/users ``` -------------------------------- ### Get Count of Records Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/getting-started.md Retrieve the total number of records in a table. This is useful for pagination or summary information. ```bash curl -H 'xc-token: YOUR_TOKEN' \ 'https://noco.example.com/api/v3/data/{baseId}/{tableId}/count' ``` -------------------------------- ### DocumentCreate Interface Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/types.md Defines the structure for creating a new document. The title defaults to 'Untitled' if not provided. Content and meta are optional rich-text JSON and arbitrary metadata objects, respectively. Parent ID is used for hierarchical organization. ```typescript interface DocumentCreate { title?: string content?: object meta?: object parent_id?: string } ``` -------------------------------- ### POST /api/v3/docs/{baseId} Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/api-reference/data-v3-documents.md Create a new document in a base. If no `title` is provided, defaults to "Untitled". If no `content` is provided, defaults to an empty document. To create a child document, pass the `parent_id` of the parent document. ```APIDOC ## POST /api/v3/docs/{baseId} ### Description Create a new document in a base. If no `title` is provided, defaults to "Untitled". If no `content` is provided, defaults to an empty document. To create a child document, pass the `parent_id` of the parent document. ### Method POST ### Endpoint /api/v3/docs/{baseId} ### Parameters #### Path Parameters - **baseId** (string) - Required - Unique identifier for the base. ### Request Body ```json // See DocumentCreate schema {} ``` ### Responses #### Success Response (200) Document created successfully. #### Response Example ```json // See Document schema ``` ``` -------------------------------- ### GET /api/v3/meta/bases/{baseId}/views/{viewId}/filters Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/api-reference/data-v3-view-filters.md Retrieve a list of all filters and groups for a specific view. ```APIDOC ## GET /api/v3/meta/bases/{baseId}/views/{viewId}/filters ### Description Retrieve a list of all filters and groups for a specific view. ### Method GET ### Endpoint /api/v3/meta/bases/{baseId}/views/{viewId}/filters #### Path Parameters - **baseId** (string) - Required - Unique identifier for the base. - **viewId** (string) - Required - Unique identifier for the view. ### Responses #### Success Response (200) - **filters** (array) - List of filters and groups retrieved successfully. #### Response Example ```json // See FilterListResponse schema ``` ``` -------------------------------- ### GET /api/v3/meta/bases/{baseId}/fields/{fieldId} Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/api-reference/meta-v3-fields.md Retrieve the details of a specific field. Requires baseId and fieldId in the path. ```APIDOC ## GET /api/v3/meta/bases/{baseId}/fields/{fieldId} ### Description Retrieve the details of a specific field. ### Method GET ### Endpoint /api/v3/meta/bases/{baseId}/fields/{fieldId} #### Path Parameters - **baseId** (string) - Required - Unique identifier for the base. - **fieldId** (string) - Required - Unique identifier for the field being updated. ### Responses #### Success Response (200) Field details are retrieved. - **(See Field schema)** #### Error Responses - **404**: Field not found. - **500**: Server error. ``` -------------------------------- ### License Endpoints Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/endpoints.md Manage the application license. ```APIDOC ## GET /api/v1/license ### Description Get the application license details. ### Method GET ### Endpoint /api/v1/license ``` ```APIDOC ## POST /api/v1/license ### Description Create or update the application license. ### Method POST ### Endpoint /api/v1/license ``` -------------------------------- ### Create base Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/api-reference/data-v3-bases.md Create a new base in a specified workspace. The request requires the workspace identifier in the path and base details in the request body. ```APIDOC ## POST /api/v3/workspaces/{workspaceId}/bases ### Description Create a new base in a specified workspace. The request requires the workspace identifier in the path and base details in the request body. ### Method POST ### Endpoint /api/v3/workspaces/{workspaceId}/bases ### Parameters #### Path Parameters - **workspaceId** (string) - Required - Unique identifier for the workspace where the base will be created. ### Request Body - **BaseCreate schema** - Required - Details for creating the base. ### Responses #### Success Response (200) - Base was created. - **Base schema** ``` -------------------------------- ### API Response with Expanded Linked Records Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/linked-records-guide.md Example JSON response showing a record with its associated linked records expanded. ```json { "list": [ { "id": "rec123", "title": "Order #001", "LinkedTable": [ { "id": "rec456", "name": "John Doe" } ] } ] } ``` -------------------------------- ### TableCreate Interface Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/types.md Defines the structure for creating a new table. Includes title, optional description, metadata, source ID, and fields. ```typescript interface TableCreate { title: string description?: ['string', 'null'] meta?: TableMeta source_id?: string fields?: CreateField[] } ``` -------------------------------- ### GET /api/v3/data/{baseId}/{tableId}/records/{recordId} Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/records-operations.md Retrieves a single record identified by its Record ID from a specified table. ```APIDOC ## GET /api/v3/data/{baseId}/{tableId}/records/{recordId} ### Description This API endpoint allows you to retrieve a single record identified by Record-ID, serving as unique identifier for the record from a specified table. ### Method GET ### Endpoint /api/v3/data/{baseId}/{tableId}/records/{recordId} ### Parameters #### Path Parameters - **recordId** (string) - Required - The unique identifier of the record to retrieve. #### Query Parameters - **fields** (string) - Optional - Allows you to specify the fields that you wish to include. #### Request Body - **body** (object) - Required - No specific fields described, but the endpoint expects an object. ### Response #### Success Response (200) - **record** (object) - The requested record object. #### Response Example ```json { "record": { "field1": "value1", "field2": "value2" } } ``` ``` -------------------------------- ### Batch Create Records in JavaScript Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/integration-patterns.md Efficiently create multiple records by sending them in batches. Handles pagination and logging for each batch. ```javascript async function batchCreateRecords(records, batchSize = 100) { const results = []; for (let i = 0; i < records.length; i += batchSize) { const batch = records.slice(i, i + batchSize); console.log(`Creating batch ${i / batchSize + 1}`); const response = await fetch( `/api/v3/data/{baseId}/{tableId}/records`, { method: 'POST', headers: { 'xc-token': token, 'Content-Type': 'application/json' }, body: JSON.stringify(batch) } ); const result = await response.json(); results.push(...result.list); } return results; } ``` -------------------------------- ### Hierarchical: Get Category with Parent and Children Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/linked-records-guide.md Retrieve a category record and expand both 'ParentCategory' and 'SubCategories' to view its hierarchical context. ```bash # Get category with parent and children GET /api/v3/data/{baseId}/categories/records/{categoryId}?expand=ParentCategory,SubCategories ``` -------------------------------- ### License - Create App License Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/endpoints.md Creates or updates the application's license. ```APIDOC ## POST /api/v1/license ### Description Create App License ### Method POST ### Endpoint /api/v1/license ``` -------------------------------- ### BaseCreate Interface Definition Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/types.md Defines the structure for creating a new base, requiring a title and optionally accepting metadata for the icon color. ```typescript interface BaseCreate { title: string meta?: BaseMetaReq } ``` -------------------------------- ### Sorting Syntax Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/configuration.md How to use the `sort` query parameter for ordering records, including ascending, descending, and multiple field sorting. ```APIDOC ## Sorting Sort by field name, prefix with `-` for descending: ``` sort=created_at # Ascending by created_at sort=-created_at # Descending by created_at sort=-priority,name # Multiple fields ``` ``` -------------------------------- ### Paginate Results - Next Page Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/getting-started.md Fetch the next set of records by adjusting the `offset` parameter. This allows for sequential retrieval of data. ```bash # Get next 10 records curl -H 'xc-token: YOUR_TOKEN' \ 'https://noco.example.com/api/v3/data/{baseId}/{tableId}/records?limit=10&offset=10' ``` -------------------------------- ### Create a New Record Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/getting-started.md Add a new record to a table. Provide the `baseId`, `tableId`, and a JSON payload with the record's data. ```bash curl -X POST -H 'xc-token: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{"Title": "My Record", "Status": "Active"}' \ 'https://noco.example.com/api/v3/data/{baseId}/{tableId}/records' ``` -------------------------------- ### GET /api/v3/meta/workspaces/{workspaceId}/bases Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/api-reference/meta-v3-bases.md Retrieve a list of bases associated with a specific workspace. Requires the workspace ID as a path parameter. ```APIDOC ## GET /api/v3/meta/workspaces/{workspaceId}/bases ### Description Retrieve a list of bases associated with a specific workspace. ### Method GET ### Endpoint /api/v3/meta/workspaces/{workspaceId}/bases ### Parameters #### Path Parameters - **workspaceId** (string) - Required - Unique identifier for the workspace. ### Responses #### Success Response (200) - A list of bases is returned. #### Error Response (500) - The server encountered an unexpected error while processing the request. ``` -------------------------------- ### DB Table Column Metadata Operations Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/endpoints.md Endpoints for creating, updating, deleting, and getting table columns, as well as creating primary values. ```APIDOC ## POST /api/v1/db/meta/tables/{tableId}/columns ### Description Create Column ### Method POST ### Endpoint /api/v1/db/meta/tables/{tableId}/columns ``` ```APIDOC ## PATCH /api/v1/db/meta/columns/{columnId} ### Description Update Column ### Method PATCH ### Endpoint /api/v1/db/meta/columns/{columnId} ``` ```APIDOC ## DELETE /api/v1/db/meta/columns/{columnId} ### Description Delete Column ### Method DELETE ### Endpoint /api/v1/db/meta/columns/{columnId} ``` ```APIDOC ## GET /api/v1/db/meta/columns/{columnId} ### Description Get Column ### Method GET ### Endpoint /api/v1/db/meta/columns/{columnId} ``` ```APIDOC ## POST /api/v1/db/meta/columns/{columnId}/primary ### Description Create Primary Value ### Method POST ### Endpoint /api/v1/db/meta/columns/{columnId}/primary ``` -------------------------------- ### Get Count of Records Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/getting-started.md Retrieves the total count of records in a specific table. Requires the base ID, table ID, and your API token. ```APIDOC ## Get Count of Records ### Description Retrieves the total count of records in a specific table. ### Method GET ### Endpoint /api/v3/data/{baseId}/{tableId}/count ### Parameters #### Path Parameters - **baseId** (string) - Required - The ID of the base - **tableId** (string) - Required - The ID of the table ### Request Headers - **xc-token** (string) - Required - Your API token ### Response #### Success Response (200) - Returns a JSON object containing the record count. ``` -------------------------------- ### Workspace user invite Source: https://github.com/nocodb/noco-apis-doc/blob/main/_autodocs/endpoints.md Invites a user to join a specific workspace. ```APIDOC ## POST /api/v1/workspaces/{workspaceId}/invitations ### Description Workspace user invite ### Method POST ### Endpoint /api/v1/workspaces/{workspaceId}/invitations ```