GET /api/v2/policies/{id}/projections#
A policy’s projections, newest first, each with its status, progress and summary. Needs policies:read and submissions:read.
Authentication: Bearer token
Parameters
| Name | In | Type | Description |
|---|
id required | path | string | |
Responses
200 OK
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
data required | array<object> | |
type required | string one of impact_projections | |
id required | string | |
attributes required | object | |
relationships | object | |
meta | object | |
meta | object | |
401 Missing or invalid user identity
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
404 Not found
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
POST /api/v2/policies/{id}/projections#
Start a dry run of a target policy version over existing submissions. Nothing about any submission changes. Answers 202 with the projection; a projection already queued or running for the same target is returned instead of a second one (`meta.reused`). Needs policies:read and submissions:work.
Authentication: Bearer token
Parameters
| Name | In | Type | Description |
|---|
id required | path | string | |
Request body application/json
| Field | Type | Description |
|---|
target required | object | |
scope | object | |
flow_ids | array<string (uuid)> | |
statuses | array<string> | |
created_from | string | null | |
created_to | string | null | |
cap | integer | |
Responses
202 Queued
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
data required | object | |
type required | string one of impact_projections | |
id required | string | |
attributes required | object | |
relationships | object | |
meta | object | |
included | array<object> | |
type required | string | |
id required | string | |
attributes required | object | |
meta | object | |
401 Missing or invalid user identity
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
404 Not found
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
409 NOT_COMPOSED or NO_ACTIVE_VERSION: a virtual target needs a composed version in force
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
422 Validation error, or INVALID_SCOPE when a flow is not one of this policy’s
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
GET /api/v2/policies/{id}/projections/{projection_id}#
One projection: status, progress, the frozen target, and its summary once complete. `meta.stale` is true when the target version or a flow version it was run against has changed since. Needs policies:read and submissions:read.
Authentication: Bearer token
Parameters
| Name | In | Type | Description |
|---|
id required | path | string | |
projection_id required | path | string | |
Responses
200 OK
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
data required | object | |
type required | string one of impact_projections | |
id required | string | |
attributes required | object | |
relationships | object | |
meta | object | |
included | array<object> | |
type required | string | |
id required | string | |
attributes required | object | |
meta | object | |
401 Missing or invalid user identity
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
404 Not found
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
POST /api/v2/policies/{id}/projections/{projection_id}/cancel#
Stop a queued or running projection. Needs policies:read and submissions:work.
Authentication: Bearer token
Parameters
| Name | In | Type | Description |
|---|
id required | path | string | |
projection_id required | path | string | |
Responses
200 OK
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
data required | object | |
type required | string one of impact_projections | |
id required | string | |
attributes required | object | |
relationships | object | |
meta | object | |
included | array<object> | |
type required | string | |
id required | string | |
attributes required | object | |
meta | object | |
401 Missing or invalid user identity
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
404 Not found
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
409 PROJECTION_NOT_RUNNING: it has already finished
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
GET /api/v2/policies/{id}/projections/{projection_id}/export.csv#
The results as CSV (text/csv, as an attachment): one row per submission and item, with the applicant’s name and email, outcome, item, reason and remedy. No document contents or answers. Recorded in the activity log. Needs policies:read and submissions:work.
Authentication: Bearer token
Parameters
| Name | In | Type | Description |
|---|
id required | path | string | |
projection_id required | path | string | |
Responses
200 OK
No body.
401 Missing or invalid user identity
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
404 Not found
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
409 PROJECTION_NOT_COMPLETE
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
GET /api/v2/policies/{id}/projections/{projection_id}/results#
A projection’s results, one per submission, with the items that would fall short, why, and what the applicant could do. Needs policies:read and submissions:read.
Authentication: Bearer token
Parameters
| Name | In | Type | Description |
|---|
id required | path | string | |
projection_id required | path | string | |
outcome | query | string | One outcome (unaffected, drifted_fixable, drifted_ineligible, drifted_review, already_short, cannot_assess), or `drifted` for the three drift outcomes. |
item | query | string | An item ref, for example `document:address_proof`. |
flow | query | string | A flow id. |
page | query | integer | Default 1. |
per_page | query | integer | Default 25, at most 100. |
Responses
200 OK
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
data required | array<object> | |
type required | string one of impact_projection_results | |
id required | string | |
attributes required | object | |
relationships | object | |
meta | object | |
meta | object | |
401 Missing or invalid user identity
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |
404 Not found
| Field | Type | Description |
|---|
jsonapi required | object | |
version required | string | |
errors required | array<object> | |
status required | string | |
code required | string | |
title required | string | |
detail | string | |
source | object | |
pointer | string | |
parameter | string | |
meta | object | |