Update data source rest api docs#211
Conversation
Added the endpoint to delete an entry Added the documentation for aggregation queries
WalkthroughDocumentation update to the REST API datasources reference file that adds deletion endpoint details, expands query sections with pagination metadata examples, introduces Delete Query subsections with request/response examples, and enhances Aggregation Queries documentation with detailed operator examples. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
docs/REST-API/fliplet-datasources.md(4 hunks)
🧰 Additional context used
🪛 Gitleaks (8.30.0)
docs/REST-API/fliplet-datasources.md
[high] 714-714: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
🪛 LanguageTool
docs/REST-API/fliplet-datasources.md
[uncategorized] ~507-~507: Possible missing comma found.
Context: ...iled information on all available query operators including MongoDB-style operators and F...
(AI_HYDRA_LEO_MISSING_COMMA)
🪛 markdownlint-cli2 (0.18.1)
docs/REST-API/fliplet-datasources.md
46-46: Unordered list indentation
Expected: 6; Actual: 4
(MD007, ul-indent)
47-47: Unordered list indentation
Expected: 8; Actual: 6
(MD007, ul-indent)
420-420: Unordered list indentation
Expected: 2; Actual: 0
(MD007, ul-indent)
421-421: Unordered list indentation
Expected: 2; Actual: 0
(MD007, ul-indent)
422-422: Unordered list indentation
Expected: 2; Actual: 0
(MD007, ul-indent)
423-423: Unordered list indentation
Expected: 2; Actual: 0
(MD007, ul-indent)
424-424: Unordered list indentation
Expected: 2; Actual: 0
(MD007, ul-indent)
425-425: Unordered list indentation
Expected: 2; Actual: 0
(MD007, ul-indent)
426-426: Unordered list indentation
Expected: 2; Actual: 0
(MD007, ul-indent)
427-427: Unordered list indentation
Expected: 2; Actual: 0
(MD007, ul-indent)
603-603: Unordered list indentation
Expected: 2; Actual: 0
(MD007, ul-indent)
604-604: Unordered list indentation
Expected: 2; Actual: 0
(MD007, ul-indent)
605-605: Unordered list indentation
Expected: 2; Actual: 0
(MD007, ul-indent)
711-711: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (6)
docs/REST-API/fliplet-datasources.md (6)
462-504: Excellent addition of pagination metadata documentation.The new "Query with Pagination Metadata" subsection provides clear examples showing how to request and interpret pagination data. The request and response examples effectively demonstrate the
includePaginationparameter and the resulting metadata structure.
505-537: Good coverage of advanced query operators.The "Advanced Query with Complex Filters" section comprehensively demonstrates MongoDB-style operators (
$and,$gte) alongside Fliplet's custom$filtersoperator. The example is realistic and well-commented with the request attributes.
539-562: Well-documented delete query functionality.The "Delete Query" subsection clearly explains the
type: "delete"syntax and demonstrates practical usage. The response example showingdeletedCountis helpful, and the explanatory text is concise.
564-607: Comprehensive aggregation queries documentation.The expanded "Aggregation Queries" section provides good structure with a practical group-and-count example followed by a clear list of supported operators. The note on
$convertToNumberis particularly valuable for users performing numeric aggregations on string data.
701-724: Clear and complete delete entry endpoint documentation.The new "Delete an entry from a data source" section provides excellent coverage including HTTP method, endpoint path, practical cURL example, response format, and an important operational note about permanent deletion. The soft-delete pattern recommendation is a helpful best practice tip for users.
714-714: Dismiss static analysis false positive.The security alert on this line flags the auth token placeholder as a "generic-api-key", but this is expected in documentation examples and not a genuine security concern. The placeholder format (
eu--abcdef123456) makes it obvious this is example data.
| - [Delete an entry from a data source](#delete-an-entry-from-a-data-source) | ||
| - [`DELETE v1/data-sources/<dataSourceId>/data/<entryId>`](#delete-v1data-sourcesdatasourceiddataentryid) |
There was a problem hiding this comment.
Fix markdown list indentation in table of contents.
Markdownlint flags these TOC entries as having inconsistent indentation. They should align with the surrounding list items.
- [Update an existing entry in a data source](#update-an-existing-entry-in-a-data-source)
- [`PUT v1/data-sources/<dataSourceId>/data/<entryId>`](#put-v1data-sourcesdatasourceiddataentryid)
- - [Delete an entry from a data source](#delete-an-entry-from-a-data-source)
- - [`DELETE v1/data-sources/<dataSourceId>/data/<entryId>`](#delete-v1data-sourcesdatasourceiddataentryid)
+ - [Delete an entry from a data source](#delete-an-entry-from-a-data-source)
+ - [`DELETE v1/data-sources/<dataSourceId>/data/<entryId>`](#delete-v1data-sourcesdatasourceiddataentryid)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - [Delete an entry from a data source](#delete-an-entry-from-a-data-source) | |
| - [`DELETE v1/data-sources/<dataSourceId>/data/<entryId>`](#delete-v1data-sourcesdatasourceiddataentryid) | |
| - [Update an existing entry in a data source](#update-an-existing-entry-in-a-data-source) | |
| - [`PUT v1/data-sources/<dataSourceId>/data/<entryId>`](#put-v1data-sourcesdatasourceiddataentryid) | |
| - [Delete an entry from a data source](#delete-an-entry-from-a-data-source) | |
| - [`DELETE v1/data-sources/<dataSourceId>/data/<entryId>`](#delete-v1data-sourcesdatasourceiddataentryid) |
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
46-46: Unordered list indentation
Expected: 6; Actual: 4
(MD007, ul-indent)
47-47: Unordered list indentation
Expected: 8; Actual: 6
(MD007, ul-indent)
🤖 Prompt for AI Agents
In docs/REST-API/fliplet-datasources.md around lines 46 to 47, the two TOC list
entries are indented inconsistently causing markdownlint warnings; adjust their
leading spaces so they align with the surrounding list items (use the same
indentation level as adjacent sibling items) and ensure nested bullets use
consistent indentation and dash/space formatting to match the file's existing
list style.
| - [where](https://developers.fliplet.com/API/fliplet-datasources.html#fetch-records-from-a-data-source) - Filter records using query operators (see [Query Operators Reference](../API/datasources/query-operators.html)) | ||
| - [aggregate](https://developers.fliplet.com/API/fliplet-datasources.html#run-aggregation-queries) - Run aggregation queries | ||
| - [join](https://developers.fliplet.com/API/datasources/joins.html) - Join data from multiple data sources | ||
| - [attributes](https://developers.fliplet.com/API/fliplet-datasources.html#filter-the-columns-returned-when-finding-records) - Select specific columns | ||
| - [order](https://developers.fliplet.com/API/fliplet-datasources.html#sort--order-the-results) - Sort results | ||
| - [limit](https://developers.fliplet.com/API/fliplet-datasources.html#fetch-records-with-pagination) - Limit number of results | ||
| - [offset](https://developers.fliplet.com/API/fliplet-datasources.html#fetch-records-with-pagination) - Skip records for pagination | ||
| - [includePagination](https://developers.fliplet.com/API/fliplet-datasources.html#pagination-and-performance) - Include pagination metadata |
There was a problem hiding this comment.
Fix list indentation for operator documentation links.
These bullet points should be indented consistently with the rest of the list. They are currently at root indentation (0 spaces) instead of being nested under the paragraph context.
All operators of the [Data Source "find" JS API](https://developers.fliplet.com/API/fliplet-datasources.html#fetch-records-from-a-data-source) are supported, including:
-- [where](https://developers.fliplet.com/API/fliplet-datasources.html#fetch-records-from-a-data-source) - Filter records using query operators (see [Query Operators Reference](../API/datasources/query-operators.html))
-- [aggregate](https://developers.fliplet.com/API/fliplet-datasources.html#run-aggregation-queries) - Run aggregation queries
-- [join](https://developers.fliplet.com/API/datasources/joins.html) - Join data from multiple data sources
-- [attributes](https://developers.fliplet.com/API/fliplet-datasources.html#filter-the-columns-returned-when-finding-records) - Select specific columns
-- [order](https://developers.fliplet.com/API/fliplet-datasources.html#sort--order-the-results) - Sort results
-- [limit](https://developers.fliplet.com/API/fliplet-datasources.html#fetch-records-with-pagination) - Limit number of results
-- [offset](https://developers.fliplet.com/API/fliplet-datasources.html#fetch-records-with-pagination) - Skip records for pagination
-- [includePagination](https://developers.fliplet.com/API/fliplet-datasources.html#pagination-and-performance) - Include pagination metadata
+- [where](https://developers.fliplet.com/API/fliplet-datasources.html#fetch-records-from-a-data-source) - Filter records using query operators (see [Query Operators Reference](../API/datasources/query-operators.html))
+- [aggregate](https://developers.fliplet.com/API/fliplet-datasources.html#run-aggregation-queries) - Run aggregation queries
+- [join](https://developers.fliplet.com/API/datasources/joins.html) - Join data from multiple data sources
+- [attributes](https://developers.fliplet.com/API/fliplet-datasources.html#filter-the-columns-returned-when-finding-records) - Select specific columns
+- [order](https://developers.fliplet.com/API/fliplet-datasources.html#sort--order-the-results) - Sort results
+- [limit](https://developers.fliplet.com/API/fliplet-datasources.html#fetch-records-with-pagination) - Limit number of results
+- [offset](https://developers.fliplet.com/API/fliplet-datasources.html#fetch-records-with-pagination) - Skip records for pagination
+- [includePagination](https://developers.fliplet.com/API/fliplet-datasources.html#pagination-and-performance) - Include pagination metadataCommittable suggestion skipped: line range outside the PR's diff.
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
420-420: Unordered list indentation
Expected: 2; Actual: 0
(MD007, ul-indent)
421-421: Unordered list indentation
Expected: 2; Actual: 0
(MD007, ul-indent)
422-422: Unordered list indentation
Expected: 2; Actual: 0
(MD007, ul-indent)
423-423: Unordered list indentation
Expected: 2; Actual: 0
(MD007, ul-indent)
424-424: Unordered list indentation
Expected: 2; Actual: 0
(MD007, ul-indent)
425-425: Unordered list indentation
Expected: 2; Actual: 0
(MD007, ul-indent)
426-426: Unordered list indentation
Expected: 2; Actual: 0
(MD007, ul-indent)
427-427: Unordered list indentation
Expected: 2; Actual: 0
(MD007, ul-indent)
🤖 Prompt for AI Agents
In docs/REST-API/fliplet-datasources.md around lines 420 to 427, the operator
bullet points are at root indentation instead of being nested under the
surrounding paragraph; indent each of these lines the same amount as the other
nested list items (e.g., add two spaces before each "-" so they align as a
sub-list), ensuring consistent spacing and nesting with the surrounding list
structure.
|
|
||
| #### Advanced Query with Complex Filters | ||
|
|
||
| For detailed information on all available query operators including MongoDB-style operators and Fliplet's custom `$filters` operator, see the [Query Operators Reference](../API/datasources/query-operators.html). |
There was a problem hiding this comment.
Add missing comma in sentence.
The sentence requires a comma for proper grammar between "MongoDB-style operators" and the conjunction.
-For detailed information on all available query operators including MongoDB-style operators and Fliplet's custom `$filters` operator, see the [Query Operators Reference](../API/datasources/query-operators.html).
+For detailed information on all available query operators, including MongoDB-style operators and Fliplet's custom `$filters` operator, see the [Query Operators Reference](../API/datasources/query-operators.html).📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| For detailed information on all available query operators including MongoDB-style operators and Fliplet's custom `$filters` operator, see the [Query Operators Reference](../API/datasources/query-operators.html). | |
| For detailed information on all available query operators, including MongoDB-style operators and Fliplet's custom `$filters` operator, see the [Query Operators Reference](../API/datasources/query-operators.html). |
🧰 Tools
🪛 LanguageTool
[uncategorized] ~507-~507: Possible missing comma found.
Context: ...iled information on all available query operators including MongoDB-style operators and F...
(AI_HYDRA_LEO_MISSING_COMMA)
🤖 Prompt for AI Agents
In docs/REST-API/fliplet-datasources.md around line 507, the sentence linking to
the Query Operators Reference is missing a comma before the conjunction; edit
the sentence to insert a comma after "MongoDB-style operators" so it reads
"...including MongoDB-style operators, and Fliplet's custom `$filters`
operator..." to correct the grammar.
| - **Pipeline Stages**: `$project`, `$group`, `$sort` | ||
| - **Group Operators**: `$sum`, `$avg`, `$min`, `$max` | ||
| - **Type Conversion**: `$convertToNumber` (Fliplet-specific - converts strings to numbers before aggregation) |
There was a problem hiding this comment.
Fix list indentation for aggregation operators.
These list items should be indented consistently as a nested list under "Supported Aggregation Operators".
**Supported Aggregation Operators:**
-- **Pipeline Stages**: `$project`, `$group`, `$sort`
-- **Group Operators**: `$sum`, `$avg`, `$min`, `$max`
-- **Type Conversion**: `$convertToNumber` (Fliplet-specific - converts strings to numbers before aggregation)
+- **Pipeline Stages**: `$project`, `$group`, `$sort`
+- **Group Operators**: `$sum`, `$avg`, `$min`, `$max`
+- **Type Conversion**: `$convertToNumber` (Fliplet-specific - converts strings to numbers before aggregation)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - **Pipeline Stages**: `$project`, `$group`, `$sort` | |
| - **Group Operators**: `$sum`, `$avg`, `$min`, `$max` | |
| - **Type Conversion**: `$convertToNumber` (Fliplet-specific - converts strings to numbers before aggregation) | |
| - **Pipeline Stages**: `$project`, `$group`, `$sort` | |
| - **Group Operators**: `$sum`, `$avg`, `$min`, `$max` | |
| - **Type Conversion**: `$convertToNumber` (Fliplet-specific - converts strings to numbers before aggregation) |
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
603-603: Unordered list indentation
Expected: 2; Actual: 0
(MD007, ul-indent)
604-604: Unordered list indentation
Expected: 2; Actual: 0
(MD007, ul-indent)
605-605: Unordered list indentation
Expected: 2; Actual: 0
(MD007, ul-indent)
🤖 Prompt for AI Agents
In docs/REST-API/fliplet-datasources.md around lines 603-605, the three list
items for Pipeline Stages, Group Operators, and Type Conversion need to be
indented as a nested list under the "Supported Aggregation Operators" heading;
move those lines so they are nested (consistent indentation) beneath that
heading and ensure list markers align with other nested lists in the document
for proper rendering.
|
|
||
| Sample cURL request: | ||
|
|
||
| ``` |
There was a problem hiding this comment.
Specify language for fenced code block.
The cURL request example should include a language identifier for proper syntax highlighting.
-```
+```bash
curl -X DELETE \
"https://api.fliplet.com/v1/data-sources/123/data/456" \
-H "Auth-token: eu--abcdef123456"
-```
+```🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
711-711: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
In docs/REST-API/fliplet-datasources.md around line 711, the closing/opening
fenced code block lacks a language identifier; update the triple-backtick that
starts the cURL example to use a language tag (e.g., change ``` to ```bash) so
the block becomes ```bash and leave the closing ``` as-is to enable proper
syntax highlighting for the cURL snippet.
Added the endpoint to delete an entry
Added the documentation for aggregation queries
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.