Read Goal Share By Id
Changed onThe published page behind the id in the OWNER's address bar (#2679).
The same page as GET /goals/shared/{share_id}, reached by the other id, and public on the same terms — no cookie, no Origin. It exists because the URL an athlete copies is the one they are looking at, and what they are looking at is /goals/{goal_id}: without this, everyone they hand it to reads a page that says the goal could not be found. Settling publishes (#3057), so this answers from the settle on.
An unpublished goal is a 404, indistinguishable from an invented id: an unsettled one or one taken down. That lives in the WHERE clause rather than here. Nothing this route answers is wider than the share link: the projection is the same one, byte for byte.
DECLARED AFTER /shared/{share_id} on purpose. Both are two-segment paths and FastAPI resolves in declaration order, so writing this one first would make /goals/shared/share this handler's.
Request
- Base URLhttps://api.imperfect.co (the document declares no server; this is the origin it was published from)
- URLhttps://api.imperfect.co/goals/{goal_id}/share
- Authnone declared
Path parameters
Response
Successful Response
Changes
- warning
removed the optional property
//from the response with the status - info
added the optional property
//to the response with the status
- warning
- info
added the optional property
to the response with the status
- info