From b711cc83dbc925f7934a0d5a5ae7aa5cee5de6b3 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 6 Nov 2026 14:36:15 +0000 Subject: [PATCH] Document the Snapshot share link endpoints (CP-9064) GET, POST and DELETE /snapshot/share_link: make, read and turn off your read-only link to an Album's or Project's Snapshot. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01F1a5xnYD9coTS5YRfB4bMR --- openapi.yaml | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++ server.js | 22 ++++++++++ 2 files changed, 141 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index c65342c..718d851 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -13258,6 +13258,112 @@ paths: "404": $ref: '#/components/responses/NotFound' + /snapshot/share_link: + parameters: + - name: album_id + in: query + required: false + schema: + type: integer + description: The Album's (Bundle's) ID. Give this or project_id. + - name: project_id + in: query + required: false + schema: + type: integer + description: The Project's ID. Give this or album_id. + get: + tags: [Snapshot] + summary: Get your share link to an Album's (Portfolio's) or Project's Snapshot + description: | + Your working read-only link to the Snapshot of one Album or Project, made with POST or the + **Share** button on Today › Snapshot. `404` when you have no working link to it, or can't see it. + operationId: getSnapshotShareLink + security: [{tokenAuth: []}] + responses: + "200": + description: Your working link + content: + application/json: + schema: + type: object + required: [share_link] + properties: + share_link: + $ref: '#/components/schemas/SnapshotShareLink' + "401": + $ref: '#/components/responses/Unauthorized' + "404": + $ref: '#/components/responses/NotFound' + post: + tags: [Snapshot] + summary: Share an Album's (Portfolio's) or Project's Snapshot + description: | + Makes a read-only link to the Snapshot of an Album or Project you can see, as the **Share** + button on Today › Snapshot does, or returns the working one you already have. Anyone with the + link can open the Snapshot without a Makerble account. It shows the numbers as you see them + (only Contacts you can view are counted, and groups below the Minimum Results Threshold stay + hidden), and it stops working when you turn it off with DELETE or can no longer see the Album + or Project. Each user has their own link to each Album or Project. Give `album_id` or + `project_id` in the query or the body. + operationId: createSnapshotShareLink + security: [{tokenAuth: []}] + requestBody: + required: false + content: + application/json: + schema: + type: object + properties: + album_id: + type: integer + project_id: + type: integer + examples: + project: + value: + project_id: 412 + responses: + "201": + description: Your working link + content: + application/json: + schema: + type: object + required: [share_link] + properties: + share_link: + $ref: '#/components/schemas/SnapshotShareLink' + "401": + $ref: '#/components/responses/Unauthorized' + "404": + $ref: '#/components/responses/NotFound' + delete: + tags: [Snapshot] + summary: Turn off your share link to an Album's (Portfolio's) or Project's Snapshot + description: | + Turns off your working link to the Snapshot of an Album or Project, as **Turn off link** on + Today › Snapshot does. Anyone who opens it afterwards is told it isn't working. Only turns off + your own link. `404` when you have no working link to it. + operationId: deleteSnapshotShareLink + security: [{tokenAuth: []}] + responses: + "200": + description: The link is turned off + content: + application/json: + schema: + type: object + required: [disabled] + properties: + disabled: + type: boolean + example: true + "401": + $ref: '#/components/responses/Unauthorized' + "404": + $ref: '#/components/responses/NotFound' + /guidance_panels: get: tags: [Guidance Panels] @@ -21518,6 +21624,19 @@ components: name: type: string example: Youth Programme 2026 + SnapshotShareLink: + type: object + required: [url, created_at, showing] + properties: + url: + type: string + description: The read-only link to send. Opens without signing in. + example: https://makerble.com/shared/snapshot/3vKq9wXbT2mYp8sLd4nR6cHf1jZa7eUo + created_at: + type: string + format: date-time + showing: + $ref: '#/components/schemas/SnapshotOwner' SnapshotTile: type: object required: [column, key, name, kind, value, unit] diff --git a/server.js b/server.js index 381027c..ca37035 100644 --- a/server.js +++ b/server.js @@ -4226,6 +4226,7 @@ function buildDocsPage() {

The Snapshot, under Today in the sidebar, puts one Album's (Portfolio's) or Project's headline numbers on one page. Who we're working with shows how its Contacts split by a Ratio Set (as on the Demographics tab), by age band and, on an Album, by Project. How the work is going shows one headline number per Results Canvas column. Workload shows up to three Workflow, Cohort or Formula Trackers.

The Album's or Project's editors choose what goes on it on the Snapshot tab of its Preferences. GET lists what it shows and every choice there is, each with a key such as age_band, ratio_set:12 or Change:31; PUT takes those keys. Until anyone chooses, customised is false and the defaults apply: Age band and the first two Ratio Sets, the first metric in each column, and no Workload tiles.

GET /snapshot gives the numbers themselves, counted by the Demographics tab's rules for the Contacts you can view, with each tile's result for the Results Canvas's current period, or all time when there are no deadlines (timeframe says which). Without an id it reads your pinned Album or Project, or else the last one you viewed; PUT /snapshot/pin pins one.

+

POST /snapshot/share_link makes your read-only link to an Album's or Project's Snapshot, as the Share button does, or returns the one you already have. Anyone with the link can open the Snapshot without a Makerble account; it shows the numbers as you see them, and stops working when you turn it off with DELETE or can no longer see the Album or Project.

Anyone in the Organisation (or who can see the Album) can read the settings. Only the Album's managers, or whoever can change a Project's Preferences, can change them. Another Organisation's records answer 404.

@@ -4247,6 +4248,27 @@ function buildDocsPage() { { code: "200", cls: "response-2xx", desc: "pinned: the Album or Project now pinned" }, { code: "404", cls: "response-4xx", desc: "An Album or Project you can't see" } ])} + ${endpointCard("GET", "/snapshot/share_link", "Get your share link to a Snapshot", true, [ + { name: "album_id", type: "integer", required: false, desc: "The Album's (Bundle's) ID" }, + { name: "project_id", type: "integer", required: false, desc: "The Project's ID. Give this or album_id" } + ], [ + { code: "200", cls: "response-2xx", desc: "share_link: url, created_at and showing" }, + { code: "404", cls: "response-4xx", desc: "No working link, or an Album or Project you can't see" } + ])} + ${endpointCard("POST", "/snapshot/share_link", "Share an Album's or Project's Snapshot", true, [ + { name: "album_id", in: "body", type: "integer", required: false, desc: "The Album's (Bundle's) ID" }, + { name: "project_id", in: "body", type: "integer", required: false, desc: "The Project's ID. Give this or album_id" } + ], [ + { code: "201", cls: "response-2xx", desc: "share_link: your working read-only link (url, created_at, showing), made or already there" }, + { code: "404", cls: "response-4xx", desc: "An Album or Project you can't see" } + ])} + ${endpointCard("DELETE", "/snapshot/share_link", "Turn off your share link to a Snapshot", true, [ + { name: "album_id", type: "integer", required: false, desc: "The Album's (Bundle's) ID" }, + { name: "project_id", type: "integer", required: false, desc: "The Project's ID. Give this or album_id" } + ], [ + { code: "200", cls: "response-2xx", desc: "{disabled: true}; the link no longer opens" }, + { code: "404", cls: "response-4xx", desc: "No working link, or an Album or Project you can't see" } + ])} ${endpointCard("GET", "/albums/{album_id}/snapshot_settings", "Get what an Album's Snapshot shows", true, [ { name: "album_id", in: "path", type: "integer", required: true, desc: "The Album's (Bundle's) ID" } ], [