goals

Read Goal Share By Id

Changed on

The 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.

get/goals/{goal_id}/share

Request

  • Base URL
    https://api.imperfect.co (the document declares no server; this is the origin it was published from)
  • URL
    https://api.imperfect.co/goals/{goal_id}/share
  • Auth
    none declared

Path parameters

goal_idstring required

Response

Successful Response

namestring required
linestring nullable
localestring required
kind'destination' | 'practice' required
sportstring nullable
set_atstring date-time required
anchor_kind'event' | 'route' nullable
factorsobject[]
page_expected_untilstring date-time nullable
share_idstring required
slugstring required
target_datestring date required
target_precision'day' | 'month' | 'quarter' | 'season' required

Changes

    • warning

      removed the optional property // from the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property to the response with the status