docs: Add Stats API endpoint documentation (#463)#480
Conversation
Migrate and update Stats API docs from legacy markdown to RST format. Verified all table names and columns against Mautic 7.0 source code.
Add :widths: directive to list-table definitions to prevent narrow columns that cause text to wrap mid-word in the rendered output.
Co-authored-by: promptless[bot] <promptless[bot]@users.noreply.github.com>
0d0be2d to
c073c74
Compare
Per Mautic style guide, capitalize product terms: - Channel in table descriptions - Dynamic Content in section header
|
@mautic/core-team can you please help review the content? TIA! ✨ |
adiati98
left a comment
There was a problem hiding this comment.
Hi @tlfranko-star,
Thank you so much for the PR. This looks great so far! ✨
We want to keep the structure (headers, position description, etc.) and wordings (whenever applicable) consistent throughout the docs.
I left some suggestions here as examples of what need to be changed. There are more to fix than what I suggested here. Please review and update your PR accordingly.
You can take a look at other pages as reference, such as this file: docs/rest_api/emails.rst.
Please let me know if you have any question, and feel free to tag me once you're done. 🙂
|
@promptless-for-oss please address the suggestions. We want to keep the structure (headers, position description, etc.) and wordings (whenever applicable) consistent throughout the docs. I left some suggestions here as examples of what need to be changed. There are more to fix than what I suggested here. Please review and update the PR accordingly. You can take a look at other pages as reference, such as this file: docs/rest_api/emails.rst. |
- Convert 'Using Mautic's API Library' to proper header format - Capitalize HTTP throughout - Move descriptions to appear right after section headers - Convert 'HTTP Request' and 'Response' from bold to proper headers - Use bullet point format for response status descriptions - Remove unnecessary vale off/on statements - Change 'Response properties' to use dashes underline for subsection
|
I've addressed all the reviewer feedback to improve consistency with other API documentation pages. The changes include:
The changes have been pushed to the PR. |
adiati98
left a comment
There was a problem hiding this comment.
@promptless-for-oss we need to address the Vale warnings here.
Address reviewer feedback to fix Vale linting warnings: - Wrap do-not-contact section with vale off/on directives - Wrap "Web page visit tracking" description with vale off/on - Wrap webhook_logs table content with vale off/on - Simplify "Client application information" to "Client information" - Simplify "Browser user agent string" to "User agent string" (3 locations)
|
Thanks for the review feedback @adiati98! I've applied all the suggested Vale fixes:
The changes have been pushed to this PR. |
adiati98
left a comment
There was a problem hiding this comment.
@promptless-for-oss please address the suggestions and the suggestions that you haven't addressed.
- Remove premature vale on after page_hits description - Add vale off/on around page_redirects section
|
Applied all three reviewer suggestions:
Changes have been pushed to the branch. Please let me know if anything else needs adjustment. |
Co-authored-by: Ayu Adiati <45172775+adiati98@users.noreply.github.com>
adiati98
left a comment
There was a problem hiding this comment.
@promptless-for-oss please address the suggestions
- Change "Get available stat tables" to "Get stat tables" (shorter heading) - Fix Stats properties table widths from 25/10/65 to 25/15/60 - Rename "Where expressions" to "The expr parameter in where expressions" Addresses PR mautic#480 review feedback from @adiati98.
|
Applied all three reviewer suggestions:
Changes have been committed and pushed to the branch. |
adiati98
left a comment
There was a problem hiding this comment.
@promptless-for-oss please address the suggestions
- Update title from 'where expressions' to '$where arrays' for clarity - Convert expr method bullet list to list-table for consistency with other pages
|
Done! I've addressed both suggestions:
The changes have been pushed to this branch. |
adiati98
left a comment
There was a problem hiding this comment.
@promptless-for-oss please address the suggestions
Update descriptions in the expr parameter table per reviewer feedback: - Change "specified value" to "specified input" for consistency - Change "provided list" to "specified array" for in/notIn operators - Change "two specified values" to "two specified inputs" for between operator Addresses feedback from @adiati98 to avoid word duplication.
|
Thanks for the review feedback @adiati98! I've applied both suggestions to improve clarity by avoiding word duplication in the expression methods table:
The changes have been pushed to this PR. |
|
@promptless-for-oss please backport the changes here to 7.1, 6.0, and 5.x branches. Create a PR for each branch. |
|
I've created backport PRs for the Stats API documentation: ✅ Successfully created: ❌ Failed:
The 5.x and 6.0 PRs contain the identical Stats API endpoint documentation from this PR. |
|
@promptless-for-oss backport the changes here to 7.1 branch. |
|
Done! I've created the backport to branch 7.1. Backport PR: #515 The PR contains the complete Stats API documentation targeting the 7.1 branch. |
adiati98
left a comment
There was a problem hiding this comment.
Thank you, @tlfranko-star! 🚀
Backport of Stats API documentation from PR #480 (branch promptless/issue-463-stats-api-page). Documents the Stats API endpoints for obtaining statistical data from Mautic's database tables. Includes: - Complete JSON response examples showing all table columns - Detailed column documentation for all 32 available stat tables - Column name, type, and description for each table
Backport of Stats API documentation from PR #480 (branch promptless/issue-463-stats-api-page). Documents the Stats API endpoints for obtaining statistical data from Mautic's database tables. Includes: - Complete JSON response examples showing all table columns - Detailed column documentation for all 32 available stat tables - Column name, type, and description for each table
Backport of Stats API documentation from PR #480 (branch promptless/issue-463-stats-api-page). Documents the Stats API endpoints for obtaining statistical data from Mautic's database tables. Includes: - Complete JSON response examples showing all table columns - Detailed column documentation for all 32 available stat tables - Column name, type, and description for each table
Open this suggestion in Promptless to view citations and reasoning process
Migrated the Stats API documentation from legacy markdown to RST format, verified against Mautic 7.0 source code. Updated the table list to reflect the 29 stat tables available in 7.0. Added PHP/HTTP examples, query parameters, and categorized table reference. Fixed column widths on all Response properties tables to prevent text wrapping mid-word.
Closes #463