diff --git a/openapi.yaml b/openapi.yaml
index 0dd61ad..afa1fae 100644
--- a/openapi.yaml
+++ b/openapi.yaml
@@ -14367,6 +14367,192 @@ paths:
"422":
$ref: '#/components/responses/UnprocessableEntity'
+ /impact_frameworks/{id}/measurement_plan:
+ get:
+ tags: [Library]
+ summary: Get an Impact Framework's Measurement Plan
+ operationId: getImpactFrameworkMeasurementPlan
+ description: |
+ The Measurement Plan of an Impact Framework (Template): for each metric on it, why it is measured,
+ how it is collected and how often. It is what the framework page's **Measurement plan** view shows.
+ A metric can sit on many frameworks, so the plan belongs to the framework, not the metric.
+
+ Rows come in the framework's order: stage by stage (`stage`), with an Outcome's Indicators together
+ under that Outcome (`outcome`). `kind` says what the metric counts: `count` (an Activity or Engagement
+ tracker), `achievement`, `scale` or `quantity` (an Indicator), or `tracker` (a Cohort, Workflow or
+ Formula Tracker). `description` is the framework's own reason for measuring the metric, or the
+ metric's description until the framework gives one. `frequency` and `methods` are empty until someone
+ plans them.
+
+ A `survey` method names the Survey (Story Category) used. The other methods are `timeline` (posts on
+ a contact's timeline or the Newsfeed), `event_register`, `spreadsheet` (an import) and `integration`.
+
+ You must be able to view the framework. For a project's Theory of Change, use
+ `GET /projects/{project_id}/measurement_plan`. Anything else answers `404`.
+ security: [{tokenAuth: []}]
+ parameters:
+ - name: id
+ in: path
+ required: true
+ description: The id of the Impact Framework (Template)
+ schema:
+ type: integer
+ example: 7174
+ - $ref: '#/components/parameters/Page'
+ - $ref: '#/components/parameters/PerPage'
+ responses:
+ "200":
+ $ref: '#/components/responses/MeasurementPlan'
+ "401":
+ $ref: '#/components/responses/Unauthorized'
+ "404":
+ $ref: '#/components/responses/NotFound'
+
+ patch:
+ tags: [Library]
+ summary: Change a metric on an Impact Framework's Measurement Plan
+ operationId: updateImpactFrameworkMeasurementPlan
+ description: |
+ Changes the plan for one metric on an Impact Framework: why it is measured (`description`), how often (`frequency`,
+ with `custom_frequency` when it is `custom`), how it is collected (`methods`). Give only
+ the parts to change; the others stay as they are. All of them are saved, or none.
+
+ `methods` replaces the metric's methods. `methods.survey_ids` must be Surveys (Story Categories) that
+ already ask about the metric and are yours, your organisation's, or already chosen. To add
+ the metric to a Survey first, use [Add metric to](#add-metric-to). Trackers can't be asked in a Survey.
+ Colleagues are assigned on each project's plan, so `assignee_user_ids` answers `422` here.
+
+ You need to be able to edit the plan: the framework's creator, or an Organisation Editor of its organisation. Someone who can read the plan but not edit it gets `403`.
+ security: [{tokenAuth: []}]
+ parameters:
+ - name: id
+ in: path
+ required: true
+ description: The id of the Impact Framework (Template)
+ schema:
+ type: integer
+ example: 7174
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MeasurementPlanChange'
+ example:
+ metric_type: Indicator
+ metric_id: 9921
+ description: Shows whether the sessions build confidence
+ frequency: start_and_end
+ methods: { survey_ids: [812], types: [event_register] }
+ responses:
+ "200":
+ description: The metric's plan as it now stands
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ impact_framework: { $ref: '#/components/schemas/MeasurementPlanFramework' }
+ data: { $ref: '#/components/schemas/MeasurementPlanRow' }
+ "401":
+ $ref: '#/components/responses/Unauthorized'
+ "403":
+ $ref: '#/components/responses/Forbidden'
+ "404":
+ $ref: '#/components/responses/NotFound'
+ "422":
+ $ref: '#/components/responses/UnprocessableEntity'
+
+ /projects/{project_id}/measurement_plan:
+ get:
+ tags: [Library, Projects]
+ summary: Get a project's Measurement Plan
+ operationId: getProjectMeasurementPlan
+ description: |
+ The Measurement Plan of a project's Theory of Change: the Impact Framework that holds the project's
+ own metrics. It is what the project's Results Canvas shows in its **Measurement plan** view. The
+ response is the same as `GET /impact_frameworks/{id}/measurement_plan`, with
+ `impact_framework.project_id` set.
+
+ You must be on the project, or in its organisation. Anything else answers `404`.
+ security: [{tokenAuth: []}]
+ parameters:
+ - name: project_id
+ in: path
+ required: true
+ description: The id of the project
+ schema:
+ type: integer
+ example: 2210
+ - $ref: '#/components/parameters/Page'
+ - $ref: '#/components/parameters/PerPage'
+ responses:
+ "200":
+ $ref: '#/components/responses/MeasurementPlan'
+ "401":
+ $ref: '#/components/responses/Unauthorized'
+ "404":
+ $ref: '#/components/responses/NotFound'
+
+ patch:
+ tags: [Library]
+ summary: Change a metric on a project's Measurement Plan
+ operationId: updateProjectMeasurementPlan
+ description: |
+ Changes the plan for one metric on a project's Theory of Change: why it is measured (`description`), how often (`frequency`,
+ with `custom_frequency` when it is `custom`), how it is collected (`methods`) and who measures it (`assignee_user_ids`). Give only
+ the parts to change; the others stay as they are. All of them are saved, or none.
+
+ `methods` replaces the metric's methods. `methods.survey_ids` must be Surveys (Story Categories) that
+ already ask about the metric and are yours, your organisation's, the project's, or already chosen. To add
+ the metric to a Survey first, use [Add metric to](#add-metric-to). Trackers can't be asked in a Survey.
+
+ `assignee_user_ids` replaces who measures the metric, from the project's editors and reporters. A
+ reporter assigned or unassigned here is assigned or unassigned on the project's Assign Metrics page too,
+ so an unassigned reporter can no longer record that metric.
+
+ You need to be able to edit the plan: a Project Editor of the project, or an Organisation Editor of its organisation. Someone who can read the plan but not edit it gets `403`.
+ security: [{tokenAuth: []}]
+ parameters:
+ - name: project_id
+ in: path
+ required: true
+ description: The id of the project
+ schema:
+ type: integer
+ example: 2210
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MeasurementPlanChange'
+ example:
+ metric_type: Indicator
+ metric_id: 9921
+ description: Shows whether the sessions build confidence
+ frequency: start_and_end
+ methods: { survey_ids: [812], types: [event_register] }
+ assignee_user_ids: [4410]
+ responses:
+ "200":
+ description: The metric's plan as it now stands
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ impact_framework: { $ref: '#/components/schemas/MeasurementPlanFramework' }
+ data: { $ref: '#/components/schemas/MeasurementPlanRow' }
+ "401":
+ $ref: '#/components/responses/Unauthorized'
+ "403":
+ $ref: '#/components/responses/Forbidden'
+ "404":
+ $ref: '#/components/responses/NotFound'
+ "422":
+ $ref: '#/components/responses/UnprocessableEntity'
+
/impact_frameworks/{id}/additions:
get:
tags: [Library]
@@ -22332,6 +22518,40 @@ components:
description: Also include Indicators or Outcomes from the public library shared by all organisations (default false)
responses:
+ MeasurementPlan:
+ description: The Measurement Plan's rows, in the framework's order
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ impact_framework: { $ref: '#/components/schemas/MeasurementPlanFramework' }
+ page: { type: integer }
+ page_size: { type: integer }
+ page_count: { type: integer }
+ total_count: { type: integer }
+ data:
+ type: array
+ items: { $ref: '#/components/schemas/MeasurementPlanRow' }
+ example:
+ impact_framework: { id: 7174, name: Youth Club Theory of Change, project_id: 2210, can_edit: true }
+ page: 1
+ page_size: 1
+ page_count: 1
+ total_count: 1
+ data:
+ - metric: { type: Indicator, id: 9921, name: Feels confident speaking up }
+ stage: { id: 3, name: Short-term outcomes }
+ outcome: { id: 5521, title: Improved confidence }
+ kind: scale
+ description: Shows whether the sessions build confidence
+ frequency: start_and_end
+ custom_frequency: null
+ methods:
+ - { type: survey, survey: { id: 812, name: Confidence check-in } }
+ - { type: event_register, survey: null }
+ assignees:
+ - { id: 4410, name: Thandi Mokoena }
EventFormatAdminOnly:
description: You are not an Organisation Admin of the organisation that owns the Event Format
@@ -22565,6 +22785,89 @@ components:
error: "Webhooks are not turned on for this organisation"
schemas:
+ MeasurementPlanFramework:
+ type: object
+ properties:
+ id: { type: integer }
+ name: { type: string }
+ project_id: { type: integer, nullable: true, description: The project whose Theory of Change this is, or null for a framework }
+ can_edit: { type: boolean, description: Whether you may change this plan }
+ MeasurementPlanRow:
+ type: object
+ properties:
+ metric:
+ type: object
+ properties:
+ type: { type: string, enum: [Change, Indicator, CohortTracker, WorkflowTracker, FormulaTracker] }
+ id: { type: integer }
+ name: { type: string }
+ stage:
+ type: object
+ nullable: true
+ description: The Impact Scorecard column the framework puts the metric in
+ properties:
+ id: { type: integer }
+ name: { type: string }
+ outcome:
+ type: object
+ nullable: true
+ description: The Outcome an Indicator is measured under; null for other metrics
+ properties:
+ id: { type: integer }
+ title: { type: string }
+ kind: { type: string, enum: [count, achievement, scale, quantity, indicator, tracker] }
+ description: { type: string, nullable: true, description: Why the framework measures this metric }
+ frequency:
+ type: string
+ nullable: true
+ enum: [every_occasion, start_and_end, start, end, weekly, monthly, quarterly, yearly, custom, null]
+ custom_frequency: { type: string, nullable: true, description: The frequency in the plan's own words, when frequency is custom }
+ methods:
+ type: array
+ items:
+ type: object
+ properties:
+ type: { type: string, enum: [survey, timeline, event_register, spreadsheet, integration] }
+ survey:
+ type: object
+ nullable: true
+ description: The Survey (Story Category) used, for a survey method
+ properties:
+ id: { type: integer }
+ name: { type: string }
+ assignees:
+ type: array
+ description: Who measures the metric, on a project's plan. Always empty on a framework, whose colleagues are assigned on each project.
+ items:
+ type: object
+ properties:
+ id: { type: integer }
+ name: { type: string }
+ MeasurementPlanChange:
+ type: object
+ required: [metric_type, metric_id]
+ properties:
+ metric_type: { type: string, enum: [Change, Indicator, CohortTracker, WorkflowTracker, FormulaTracker] }
+ metric_id: { type: integer }
+ description: { type: string, nullable: true, maxLength: 2000, description: Why the framework measures the metric. Empty clears it. }
+ frequency:
+ type: string
+ nullable: true
+ enum: [every_occasion, start_and_end, start, end, weekly, monthly, quarterly, yearly, custom, null]
+ description: Empty clears it
+ custom_frequency: { type: string, maxLength: 255, description: Required when frequency is custom }
+ methods:
+ type: object
+ description: Replaces how the metric is collected
+ properties:
+ survey_ids: { type: array, items: { type: integer } }
+ types:
+ type: array
+ items: { type: string, enum: [timeline, event_register, spreadsheet, integration] }
+ assignee_user_ids:
+ type: array
+ description: Replaces who measures the metric (a project's plan only)
+ items: { type: integer }
OnboardingJourney:
type: object
properties:
diff --git a/server.js b/server.js
index d988877..c53aa2c 100644
--- a/server.js
+++ b/server.js
@@ -2976,6 +2976,55 @@ function buildDocsPage() {
{ code: "404", cls: "response-4xx", desc: "A project or album you can't see, or an Impact Framework its canvas doesn't offer you" },
{ code: "422", cls: "response-4xx", desc: "Neither project_id nor album_id was given" }
], "The list behind the Results Canvas's \"metrics aren't shown\" popup. Add a metric with Add a metric to a destination (destination projects).")}
+ ${endpointCard("GET", "/impact_frameworks/{id}/measurement_plan", "Get an Impact Framework's Measurement Plan", true, [
+ { name: "id", in: "path", type: "integer", required: true, desc: "The Impact Framework (Template): one you can view" },
+ { name: "page", in: "query", type: "integer", required: false, desc: "Page number (default 1)" },
+ { name: "per_page", in: "query", type: "integer", required: false, desc: "Rows per page (default 10, max 200)" }
+ ], [
+ { code: "200", cls: "response-2xx", desc: "impact_framework {id, name, project_id (null for a framework), can_edit} and the paged rows in data, in the framework's order. Each row has metric {type, id, name}, stage {id, name}, outcome {id, title} (null except for an Indicator), kind (count, achievement, scale, quantity, indicator or tracker), description (why it is measured), frequency, custom_frequency, methods (each with type survey, timeline, event_register, spreadsheet or integration, and survey {id, name} for a Survey) and assignees (always empty on a framework)" },
+ { code: "401", cls: "response-4xx", desc: "Missing or invalid token" },
+ { code: "404", cls: "response-4xx", desc: "No Impact Framework with that id that you can view" }
+ ], "What the framework page's Measurement plan view shows: for each metric, why it is measured, how it is collected and how often. A metric can sit on many frameworks, so the plan belongs to the framework, not the metric. For a project's Theory of Change, use Get a project's Measurement Plan.")}
+ ${endpointCard("PATCH", "/impact_frameworks/{id}/measurement_plan", "Change a metric on an Impact Framework's Measurement Plan", true, [
+ { name: "id", in: "path", type: "integer", required: true, desc: "The Impact Framework (Template)" },
+ { name: "metric_type", in: "body", type: "string", required: true, desc: "Change, Indicator, CohortTracker, WorkflowTracker or FormulaTracker" },
+ { name: "metric_id", in: "body", type: "integer", required: true, desc: "The metric's id, as in the plan's metric.id" },
+ { name: "description", in: "body", type: "string", required: false, desc: "Why the framework measures the metric (at most 2,000 characters). Empty clears it" },
+ { name: "frequency", in: "body", type: "string", required: false, desc: "every_occasion, start_and_end, start, end, weekly, monthly, quarterly, yearly or custom. Empty clears it" },
+ { name: "custom_frequency", in: "body", type: "string", required: false, desc: "The frequency in your own words; required when frequency is custom" },
+ { name: "methods", in: "body", type: "object", required: false, desc: "Replaces how the metric is collected: survey_ids (Surveys that already ask about the metric and are yours, your organisation's or already chosen) and types (timeline, event_register, spreadsheet, integration)" }
+ ], [
+ { code: "200", cls: "response-2xx", desc: "impact_framework and data: the metric's row as it now stands" },
+ { code: "401", cls: "response-4xx", desc: "Missing or invalid token" },
+ { code: "403", cls: "response-4xx", desc: "You can read the plan but not edit it" },
+ { code: "404", cls: "response-4xx", desc: "No Impact Framework with that id that you can view, or no metric with that metric_type and metric_id" },
+ { code: "422", cls: "response-4xx", desc: "Invalid input, e.g. a Survey that doesn't ask about the metric, a tracker with a Survey, or assignee_user_ids (colleagues are assigned on each project's plan). Nothing is saved" }
+ ], "Give only the parts to change; the others stay as they are. All of them are saved, or none. To add the metric to a Survey first, use Add metric to. You need to be the framework's creator or an Organisation Editor of its organisation.")}
+ ${endpointCard("GET", "/projects/{project_id}/measurement_plan", "Get a project's Measurement Plan", true, [
+ { name: "project_id", in: "path", type: "integer", required: true, desc: "The project: one you are on, or in the organisation of" },
+ { name: "page", in: "query", type: "integer", required: false, desc: "Page number (default 1)" },
+ { name: "per_page", in: "query", type: "integer", required: false, desc: "Rows per page (default 10, max 200)" }
+ ], [
+ { code: "200", cls: "response-2xx", desc: "The same as Get an Impact Framework's Measurement Plan, with impact_framework.project_id set and each row's assignees {id, name}: who measures the metric" },
+ { code: "401", cls: "response-4xx", desc: "Missing or invalid token" },
+ { code: "404", cls: "response-4xx", desc: "A project you aren't on and whose organisation you aren't in" }
+ ], "The Measurement Plan of the project's Theory of Change, the Impact Framework that holds the project's own metrics. It is what the project's Results Canvas shows in its Measurement plan view.")}
+ ${endpointCard("PATCH", "/projects/{project_id}/measurement_plan", "Change a metric on a project's Measurement Plan", true, [
+ { name: "project_id", in: "path", type: "integer", required: true, desc: "The project" },
+ { name: "metric_type", in: "body", type: "string", required: true, desc: "Change, Indicator, CohortTracker, WorkflowTracker or FormulaTracker" },
+ { name: "metric_id", in: "body", type: "integer", required: true, desc: "The metric's id, as in the plan's metric.id" },
+ { name: "description", in: "body", type: "string", required: false, desc: "Why the project measures the metric (at most 2,000 characters). Empty clears it" },
+ { name: "frequency", in: "body", type: "string", required: false, desc: "every_occasion, start_and_end, start, end, weekly, monthly, quarterly, yearly or custom. Empty clears it" },
+ { name: "custom_frequency", in: "body", type: "string", required: false, desc: "The frequency in your own words; required when frequency is custom" },
+ { name: "methods", in: "body", type: "object", required: false, desc: "Replaces how the metric is collected: survey_ids (Surveys that already ask about the metric and are yours, your organisation's, the project's or already chosen) and types (timeline, event_register, spreadsheet, integration)" },
+ { name: "assignee_user_ids", in: "body", type: "array", required: false, desc: "Replaces who measures the metric, from the project's editors and reporters" }
+ ], [
+ { code: "200", cls: "response-2xx", desc: "impact_framework and data: the metric's row as it now stands" },
+ { code: "401", cls: "response-4xx", desc: "Missing or invalid token" },
+ { code: "403", cls: "response-4xx", desc: "You can read the plan but not edit it" },
+ { code: "404", cls: "response-4xx", desc: "A project you can't see, or no metric with that metric_type and metric_id" },
+ { code: "422", cls: "response-4xx", desc: "Invalid input, e.g. a Survey that doesn't ask about the metric, a tracker with a Survey, or someone who isn't one of the project's editors or reporters. Nothing is saved" }
+ ], "Give only the parts to change; the others stay as they are. All of them are saved, or none. A reporter assigned or unassigned here is assigned or unassigned on the project's Assign Metrics page too, so an unassigned reporter can no longer record that metric. You need to be a Project Editor of the project or an Organisation Editor of its organisation.")}