docs(public-api): document per-post analytics caveats and TikTok interim release values - #246
Open
giladresisi wants to merge 1 commit into
Open
docs(public-api): document per-post analytics caveats and TikTok interim release values#246giladresisi wants to merge 1 commit into
giladresisi wants to merge 1 commit into
Conversation
…rim release values Adds "Which platforms return data" and "Common errors" prose to the Post Analytics API page, tightens the operation description, adds the undocumented releaseId field to the Post schema and documents the TikTok interim releaseId / releaseURL values that hold until the video ID is resolved on the first per-post analytics request after moderation. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Roikk7Asuuix92LqWmpNop
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
Warning Review limit reachedNext included review available in 53 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR describes the app's behaviour after that deployment: the lazy resolution of the TikTok video ID on the first per-post analytics request does not exist in production yet.
What
Adds prose to the Post Analytics API page: which platforms return data (linking to the per-post list in the Analytics guide) and why the endpoint returns an empty array (platform without per-post metrics, post without a platform ID, or a TikTok post whose video ID is not resolved yet). Tightens the operation description in
openapi.jsonaccordingly.Adds
releaseIdto the Post schema returned byGET /posts(it was already returned but undocumented) and documents the TikTok interim values onreleaseIdandreleaseURL: until the video ID is resolved they hold TikTok's publish handle and the channel's profile URL.Why
A customer using the public API reported that per-post analytics returned an empty array for their TikTok posts, and that the posts'
releaseURLpointed at their profile rather than the video. Nothing in the docs explained either. TikTok only exposes the public video ID after its moderation pass, which can outlast the ~100 seconds Postiz polls after publishing, so the interim publish handle and profile URL were stored and per-post analytics stayed empty. With gitroomhq/postiz-app#2007 Postiz resolves the ID lazily on the next per-post analytics request; until then the interim values remain, and this needs to be visible in the API docs.The same customer's third complaint, the docs sending them in a loop when asking which platforms have per-post metrics, is handled in #245.
Depends on #245 for the
/general/analytics#per-post-metricsanchor (text dependency only, the branch is not stacked on it).Testing
Rendered the Post Analytics and List Posts pages locally with
mint devin a real browser: the new sections, the operation description and thereleaseId/releaseURLfield docs render correctly with no overflow.node scripts/check-prose.mjs --changedpasses;node scripts/check-docs.mjs --changedreports only the anchor that lands with #245.🤖 Generated with Claude Code
https://claude.ai/code/session_01Roikk7Asuuix92LqWmpNop