API reference
Every endpoint of the JSON API, generated from GovWren's OpenAPI document for version 0.10.0. For conventions, sign-in, and examples, see The API. A running instance serves the same reference at /api/docs and the document itself at /api/openapi.json.
System#
GET /api/v1/health/live#
Is the server process running?
GET /api/v1/health/ready#
Can the server do its work?
The database answers and its schema is the one this version expects.
GET /api/v1/jobs#
Scheduled work, and how its recent runs went
PUT /api/v1/jobs/{key}#
Pause or resume one job
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
key | path | string | yes |
POST /api/v1/jobs/{key}/run#
Run one job now
Runs the job at once, whether or not it is due, and says what it did. If another process is running it at this moment, nothing is run and the answer says so.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
key | path | string | yes |
GET /api/v1/mail#
How email is set up, and how it is doing
POST /api/v1/mail/test#
Send yourself a test message
Sends one message to your own address, now, and says whether the mail server took it.
GET /api/v1/meta#
The product's name, version, and branding
What the web app needs before anyone signs in.
GET /api/v1/operations#
How the installation is running
One page for whoever keeps the server: the checks `govwren doctor --production` makes, with scheduled work, email, webhooks, the last backup, and the size of things.
Signing in#
DELETE /api/v1/session#
Sign out
GET /api/v1/session#
Who is signed in
POST /api/v1/session#
Sign in with an email address and password
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
email | string | yes | |
password | string | yes |
POST /api/v1/session/demo#
Sign in as a sample person (demo installations only)
Only a demo organization has this, only for the sample people it names, and only from the machine it runs on unless the server was started with ``--demo-on-network``.
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
email | string | yes |
POST /api/v1/session/password#
Change your own password
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
current_password | string | ||
new_password | string | yes |
Single sign-on#
GET /api/v1/sso#
How single sign-on is set up
GET /api/v1/sso/callback#
Finish single sign-on
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
code | query | string | ||
state | query | string | ||
error | query | string |
PUT /api/v1/sso/mappings#
Say which groups give which roles
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
mappings | list of MappingIn | yes |
GET /api/v1/sso/start#
Begin single sign-on
Sends the browser to the identity provider. It comes back to ``/sso/callback``.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
next | query | string |
People and units#
GET /api/v1/accounts#
Find people
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
q | query | string | Default: "". | |
status | query | string |
POST /api/v1/accounts#
Add a person
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
display_name | string | yes | |
email | string | yes | |
password | string | ||
roles | list of GrantBody | ||
title | string | ||
unit_ids | list of integer |
GET /api/v1/accounts/{account_id}#
One person
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
account_id | path | integer | yes |
PATCH /api/v1/accounts/{account_id}#
Change a person's details
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
account_id | path | integer | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
display_name | string | ||
email_notices | string | immediate, digest (a daily summary), or none | |
status | string | ||
time_zone | string | ||
title | string |
POST /api/v1/accounts/{account_id}/password#
Give a person a new password
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
account_id | path | integer | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
new_password | string | yes |
PUT /api/v1/accounts/{account_id}/roles#
Set a person's roles
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
account_id | path | integer | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
roles | list of GrantBody | yes |
PUT /api/v1/accounts/{account_id}/units#
Set the units a person works in
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
account_id | path | integer | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
unit_ids | list of integer | yes |
POST /api/v1/imports/people#
Import people from CSV
Send the CSV as the request body. With ``dry_run`` (the default) nothing is changed.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
dry_run | query | boolean | Default: true. |
POST /api/v1/imports/units#
Import units from CSV
Send the CSV as the request body. With ``dry_run`` (the default) nothing is changed.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
dry_run | query | boolean | Default: true. |
GET /api/v1/roles#
The roles and what each allows
GET /api/v1/units#
The organization's units, as a list and as a tree
POST /api/v1/units#
Add a unit
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
code | string | ||
kind | string | yes | |
name | string | yes | |
parent_id | integer |
GET /api/v1/units/{unit_id}#
One unit, with the units above it
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
unit_id | path | integer | yes |
PATCH /api/v1/units/{unit_id}#
Rename, move, or close a unit
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
unit_id | path | integer | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
code | string | ||
kind | string | ||
name | string | ||
parent_id | integer | ||
status | string |
Appearance#
GET /api/v1/admin/branding#
The branding, for editing
PUT /api/v1/admin/branding#
Change the product name, palette, and accent
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
accent | string | ||
accent_dark | string | ||
email_footer | string | ||
footer_links | list of object | ||
organization_name | string | ||
palette | string | yes | |
product_name | string | yes | |
show_powered_by | boolean | ||
sign_in_message | string | ||
terms | object |
POST /api/v1/admin/branding/check#
How an accent color would read, before saving it
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
accent | string | yes | |
accent_dark | string |
DELETE /api/v1/admin/branding/images/{kind}#
Remove a logo or tab icon
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
kind | path | string | yes |
POST /api/v1/admin/branding/images/{kind}#
Upload a logo or tab icon
Send the image as the request body: PNG, JPEG, WebP, or SVG, up to 2 MB.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
kind | path | string | yes |
Inventory#
GET /api/v1/admin/inventory#
How much of the inventory everyone can see
PUT /api/v1/admin/inventory#
Change how much of the inventory everyone can see
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
health_agreement_rule | boolean | Whether a use of health information needs every AI system it uses to be covered by an agreement before it is approved | |
visibility | string |
DELETE /api/v1/agreements/{agreement_id}#
Remove an agreement
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
agreement_id | path | integer | yes |
PATCH /api/v1/agreements/{agreement_id}#
Change an agreement
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
agreement_id | path | integer | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
auto_renews | boolean | ||
covers | list of string | References of the vendor's AI systems this agreement covers | |
effective_on | string | ||
expires_on | string | ||
kind | string | ||
notes | string | ||
notice_days | integer | ||
owner_id | integer | ||
reference | string | ||
scope_note | string | The edition or configuration it applies to | |
title | string |
GET /api/v1/catalog#
The AI systems the organization has evaluated
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
q | query | string | Words to look for in the name, reference, and summary Default: "". |
GET /api/v1/catalog/requests#
Tools people have asked to have evaluated
Every open request for those who keep the catalog; your own otherwise.
POST /api/v1/catalog/requests#
Ask for a tool to be evaluated
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
name | string | yes | The tool you would like looked at |
reason | string | yes | What you want to use it for |
summary | string | ||
url | string |
POST /api/v1/catalog/{ref}/register#
Register a use of a catalog system
Approved at once if the use fits what the system is permitted for. If not, a request is begun with what was entered carried forward.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
data_categories | list of string | ||
data_class | string | ||
everyday | boolean | It only produces output for a person to check: no decisions about people, no actions of its own | |
name | string | yes | What you will use it for |
org_unit_id | integer | ||
purpose | string |
GET /api/v1/dashboard#
Where the program stands
GET /api/v1/datasets#
Find datasets
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
q | query | string | Words to look for in the name, reference, and summary Default: "". | |
unit | query | integer | ||
status | query | string | ||
data_class | query | string | ||
identifiability | query | string | ||
owner | query | integer | ||
mine | query | boolean | Default: false. | |
sort | query | string | A field to sort by; put - in front for descending Default: "-updated_at". | |
limit | query | integer | ||
cursor | query | string |
POST /api/v1/datasets#
Add a dataset
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
name | string | ||
version | integer |
GET /api/v1/datasets/{ref}#
One dataset
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
PATCH /api/v1/datasets/{ref}#
Change a dataset
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
name | string | ||
version | integer |
GET /api/v1/datasets/{ref}/history#
Everything that has happened to a dataset
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
PUT /api/v1/datasets/{ref}/owners#
Set a dataset's owners
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
owners | list of object | yes |
GET /api/v1/duplicates#
Records that look like the same thing entered twice
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
type | query | string | system, model, dataset, or vendor Default: "system". |
GET /api/v1/exports/{kind}#
Export a list as CSV or JSON
``kind`` is ``use-cases``, ``systems``, ``models``, ``datasets``, or ``vendors``. Give the same filters as the list itself. The file holds only what you may see, and its first line (or its ``export`` field) records the filters that produced it.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
kind | path | string | yes | |
format | query | string | csv or json Default: "csv". |
POST /api/v1/imports/records/{kind}#
Import records from CSV
Send the CSV as the request body. ``kind`` is ``systems``, ``models``, ``datasets``, or ``vendors``. With ``dry_run`` (the default) nothing is changed; without it, nothing is changed unless every row is good.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
kind | path | string | yes | |
dry_run | query | boolean | Default: true. | |
mapping | query | string | JSON: which column is which field, as {column: field}. Left out, GovWren guesses by name and returns its guess. |
POST /api/v1/links#
Link one record to another
The relation must be one that makes sense between the two kinds of record: ``GET /record-types`` lists them.
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
note | string | ||
relation | string | yes | |
source | string | yes | The reference of the record the link starts from |
target | string | yes | The reference of the record it points to |
DELETE /api/v1/links/{link_id}#
Remove a link
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
link_id | path | integer | yes |
GET /api/v1/models#
Find models
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
q | query | string | Words to look for in the name, reference, and summary Default: "". | |
unit | query | integer | ||
status | query | string | ||
kind | query | string | ||
origin | query | string | ||
catalog_status | query | string | ||
data_class | query | string | ||
vendor | query | string | ||
owner | query | integer | ||
mine | query | boolean | Default: false. | |
sort | query | string | A field to sort by; put - in front for descending Default: "-updated_at". | |
limit | query | integer | ||
cursor | query | string |
POST /api/v1/models#
Add a model
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
name | string | ||
version | integer |
GET /api/v1/models/{ref}#
One model
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
PATCH /api/v1/models/{ref}#
Change a model
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
name | string | ||
version | integer |
GET /api/v1/models/{ref}/history#
Everything that has happened to a model
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
PUT /api/v1/models/{ref}/owners#
Set a model's owners
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
owners | list of object | yes |
GET /api/v1/record-types#
The fields of models, datasets, and agent profiles
What the described record types are made of, for anything that draws or fills them.
PUT /api/v1/record-types/{kind}/custom-fields#
Set the fields added to a kind of record
Each field has a ``label``, a ``kind`` (text, long, choice, date, yes_no, or number), optional ``help``, and for a choice its ``options``. ``kind`` in the address is use_case, system, model, dataset, or vendor. The fields are listed by ``GET /record-types``.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
kind | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
fields | list of object | yes |
GET /api/v1/records/{ref}/graph#
What a record relies on, and what relies on it
The records connected to this one in either direction, with the links between them. Records you may not see are counted, not shown.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes | |
depth | query | integer | How many steps out Default: 3. |
POST /api/v1/records/{ref}/merge#
Fold one record into another
Everything that pointed to this record points to the other from now on, and this record's reference leads there. It cannot be undone, and it is in both histories.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
into | string | yes | The reference of the record that stays |
PUT /api/v1/records/{ref}/references#
Set a record's pointers to other systems
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
references | list of object | yes |
GET /api/v1/search#
Find any record
Use cases, AI systems, models, datasets, vendors, and evidence that match, each as far as you may see it. A whole reference, such as ``MDL-0048``, comes first.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
q | query | string | A reference, or words Default: "". |
GET /api/v1/systems#
Find AI systems
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
q | query | string | Words to look for in the name, reference, and summary Default: "". | |
unit | query | integer | ||
status | query | string | ||
kind | query | string | ||
catalog_status | query | string | ||
vendor | query | string | ||
owner | query | integer | ||
mine | query | boolean | Default: false. | |
sort | query | string | A field to sort by; put - in front for descending Default: "-updated_at". | |
limit | query | integer | ||
cursor | query | string |
POST /api/v1/systems#
Add an AI system
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
access_path | string | ||
agent_profile | object | For a system that acts: send only the fields that change | |
catalog_status | string | ||
custom | object | Answers to the fields your organization has added, by key | |
data_handling | object | ||
edition | string | ||
embedded_in | string | ||
excluded_data_categories | list of string | ||
hosting | string | ||
kind | string | ||
name | string | ||
org_unit_id | integer | ||
permitted_data_class | string | ||
regulatory_status | string | ||
restricted | boolean | ||
status | string | ||
summary | string | ||
tags | list of string | ||
terms | string | ||
url | string | ||
vendor | string | The vendor's reference, such as VND-0003 | |
version | integer | ||
version_label | string |
GET /api/v1/systems/{ref}#
One AI system
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
PATCH /api/v1/systems/{ref}#
Change an AI system
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
access_path | string | ||
agent_profile | object | For a system that acts: send only the fields that change | |
catalog_status | string | ||
custom | object | Answers to the fields your organization has added, by key | |
data_handling | object | ||
edition | string | ||
embedded_in | string | ||
excluded_data_categories | list of string | ||
hosting | string | ||
kind | string | ||
name | string | ||
org_unit_id | integer | ||
permitted_data_class | string | ||
regulatory_status | string | ||
restricted | boolean | ||
status | string | ||
summary | string | ||
tags | list of string | ||
terms | string | ||
url | string | ||
vendor | string | The vendor's reference, such as VND-0003 | |
version | integer | ||
version_label | string |
GET /api/v1/systems/{ref}/history#
Everything that has happened to an AI system
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
PUT /api/v1/systems/{ref}/owners#
Set an AI system's owners
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
owners | list of object | yes |
GET /api/v1/use-cases#
Find use cases
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
q | query | string | Words to look for in the name, reference, and summary Default: "". | |
unit | query | integer | ||
status | query | string | ||
tier | query | integer | ||
domain | query | string | ||
stage | query | string | ||
data_class | query | string | ||
owner | query | integer | ||
mine | query | boolean | Default: false. | |
sort | query | string | A field to sort by; put - in front for descending Default: "-updated_at". | |
limit | query | integer | ||
cursor | query | string |
POST /api/v1/use-cases#
Add a use case, as a draft
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
affected_groups | list of string | ||
custom | object | Answers to the fields your organization has added, by key | |
data_categories | list of string | ||
data_class | string | ||
decision_role | string | ||
domain | string | ||
human_oversight | string | ||
name | string | ||
org_unit_id | integer | ||
outputs_used_for | list of string | ||
purpose | string | ||
restricted | boolean | ||
stage | string | ||
summary | string | ||
tags | list of string | ||
version | integer |
GET /api/v1/use-cases/{ref}#
One use case
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
PATCH /api/v1/use-cases/{ref}#
Change a use case
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
affected_groups | list of string | ||
custom | object | Answers to the fields your organization has added, by key | |
data_categories | list of string | ||
data_class | string | ||
decision_role | string | ||
domain | string | ||
human_oversight | string | ||
name | string | ||
org_unit_id | integer | ||
outputs_used_for | list of string | ||
purpose | string | ||
restricted | boolean | ||
stage | string | ||
summary | string | ||
tags | list of string | ||
version | integer |
GET /api/v1/use-cases/{ref}/history#
Everything that has happened to a use case
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
PUT /api/v1/use-cases/{ref}/owners#
Set a use case's owners
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
owners | list of object | yes |
PUT /api/v1/use-cases/{ref}/systems#
Set the AI systems a use case uses
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
systems | list of string | yes | References of the AI systems the use case uses |
GET /api/v1/vendors#
Find vendors
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
q | query | string | Words to look for in the name, reference, and summary Default: "". | |
status | query | string | ||
sort | query | string | A field to sort by; put - in front for descending Default: "-updated_at". | |
limit | query | integer | ||
cursor | query | string |
POST /api/v1/vendors#
Add a vendor
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
contacts | list of object | ||
custom | object | Answers to the fields your organization has added, by key | |
due_diligence_status | string | ||
name | string | ||
notes | string | ||
signs_health_agreement | string | Whether it will sign an agreement covering health information: yes, no, unknown | |
status | string | ||
summary | string | ||
tags | list of string | ||
version | integer | ||
website | string |
GET /api/v1/vendors/{ref}#
One vendor
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
PATCH /api/v1/vendors/{ref}#
Change a vendor
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
contacts | list of object | ||
custom | object | Answers to the fields your organization has added, by key | |
due_diligence_status | string | ||
name | string | ||
notes | string | ||
signs_health_agreement | string | Whether it will sign an agreement covering health information: yes, no, unknown | |
status | string | ||
summary | string | ||
tags | list of string | ||
version | integer | ||
website | string |
POST /api/v1/vendors/{ref}/agreements#
Add an agreement
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
auto_renews | boolean | ||
covers | list of string | References of the vendor's AI systems this agreement covers | |
effective_on | string | ||
expires_on | string | ||
kind | string | ||
notes | string | ||
notice_days | integer | ||
owner_id | integer | ||
reference | string | ||
scope_note | string | The edition or configuration it applies to | |
title | string |
GET /api/v1/vendors/{ref}/history#
Everything that has happened to a vendor
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
GET /api/v1/views#
Your saved views
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
list | query | string |
POST /api/v1/views#
Save a list's filters under a name
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
list | string | yes | Which list: use_case, system, model, dataset, vendor, evidence |
name | string | yes | |
params | object | yes | The list's filters and sort, as in its address |
DELETE /api/v1/views/{view_id}#
Remove a saved view
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
view_id | path | integer | yes |
GET /api/v1/vocabularies#
The lists of values records choose from
Evidence#
GET /api/v1/evidence#
Find evidence
Those who read everything see all evidence. Everyone else sees what they own or added; evidence on a record is shown on that record.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
q | query | string | Default: "". | |
kind | query | string | ||
state | query | string | current, expiring, expired, or withdrawn | |
limit | query | integer | ||
cursor | query | string |
POST /api/v1/evidence#
Add evidence
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
dated_on | string | ||
description | string | ||
expires_on | string | ||
file_id | integer | From POST /evidence/files | |
file_name | string | ||
kind | string | ||
owner_id | integer | ||
status | string | ||
supports | list of string | What it supports: record references such as UC-0012, or condition:7, review_task:3, agreement:5 | |
title | string | ||
url | string |
POST /api/v1/evidence/files#
Send a file to attach as evidence
Send the file as the request body. PDF, images, office documents, plain text, CSV, and JSON, up to 25 MB. The answer carries a ``file_id`` to give to ``POST /evidence``. The same content sent twice is kept once.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
name | query | string | yes | The file's name |
GET /api/v1/evidence/{ref}#
One piece of evidence
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
PATCH /api/v1/evidence/{ref}#
Change evidence, or withdraw it
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
dated_on | string | ||
description | string | ||
expires_on | string | ||
file_id | integer | From POST /evidence/files | |
file_name | string | ||
kind | string | ||
owner_id | integer | ||
status | string | ||
supports | list of string | What it supports: record references such as UC-0012, or condition:7, review_task:3, agreement:5 | |
title | string | ||
url | string |
GET /api/v1/evidence/{ref}/file#
Download the file
Always a download, never shown in the page, with the type GovWren judged it to be.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
Requests and tiers#
GET /api/v1/intake#
The intake form and scoring model in force
POST /api/v1/intake#
Begin a request
Needs only what the request is for and which unit it belongs to. The rest can follow.
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
answers | object | yes | Answers by question key |
GET /api/v1/use-cases/{ref}/intake#
A request's form and answers
The draft being written, or what was submitted, with the version of the form it was answered on.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
PUT /api/v1/use-cases/{ref}/intake#
Save a draft's answers
Saves whatever has been answered so far. Nothing needs to be complete.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
answers | object | yes | Answers by question key |
POST /api/v1/use-cases/{ref}/submit#
Submit a request
Checks the answers are complete, fills the record from them, and works out the tier.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
GET /api/v1/use-cases/{ref}/tier#
Why a use case has the tier it has
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
POST /api/v1/use-cases/{ref}/tier#
Change a tier, with a reason
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
reason | string | yes | |
tier | integer | yes |
Reviews and decisions#
POST /api/v1/conditions/{condition_id}/close#
Mark a condition as met, or waive it
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
condition_id | path | integer | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
note | string | yes | |
status | string | yes | met or waived |
GET /api/v1/me/work#
What is waiting on you
GET /api/v1/notifications#
Your notices
POST /api/v1/notifications/read#
Mark notices as read
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
ids | list of integer |
GET /api/v1/reviews#
Reviews you have a part in
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
scope | query | string | Default: "open". |
GET /api/v1/reviews/{ref}#
One review: the decision packet
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
POST /api/v1/reviews/{ref}/acceptance#
Ask a named person to accept the risk
Where the rules require it, a request cannot be approved until a named person has accepted its risk. Asking someone new replaces whoever was asked before.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
account_id | integer |
POST /api/v1/reviews/{ref}/acceptance/answer#
Accept the risk, or decline to
For the person who was asked, in their own words.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
accept | boolean | yes | |
statement | string |
POST /api/v1/reviews/{ref}/comments#
Add to the discussion
A question to the requester pauses the review's clock until they reply.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
body | string | yes | |
question | boolean | Ask the requester, and pause the clock until they reply | |
visibility | string | requester or internal |
POST /api/v1/reviews/{ref}/decision#
Approve, decline, or return a request
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
conditions | list of object | ||
outcome | string | yes | approved, declined, or returned |
rationale | string | yes | |
session | string | The committee session it is made in |
POST /api/v1/reviews/{ref}/tasks/{task_id}/assign#
Give a review task to someone
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes | |
task_id | path | integer | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
account_id | integer |
POST /api/v1/reviews/{ref}/tasks/{task_id}/claim#
Take a review task
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes | |
task_id | path | integer | yes |
POST /api/v1/reviews/{ref}/tasks/{task_id}/complete#
Record a finding
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes | |
task_id | path | integer | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
conditions | list of object | ||
finding | string | yes | no_concerns, conditions, or objection |
notes | string |
POST /api/v1/reviews/{ref}/triage#
Confirm or adjust the reviews required, and start them
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
add | list of string | Review functions to require as well | |
reason | string | ||
remove | list of string | Review functions the rules required that are not needed |
POST /api/v1/reviews/{ref}/withdraw#
Take a request back
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
reason | string |
GET /api/v1/sessions#
Committee sessions
POST /api/v1/sessions#
Plan a committee session
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
held_on | string | ||
reviews | list of string | ||
title | string | yes |
GET /api/v1/sessions/{ref}#
One session: its agenda, decisions, and minutes
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
PUT /api/v1/sessions/{ref}#
Record attendance and minutes, or close a session
Closing needs attendance and minutes. A closed session cannot be changed.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
attendees | string | ||
close | boolean | ||
minutes | string |
PUT /api/v1/sessions/{ref}/agenda#
Set a session's agenda
The reviews to consider, in order. A decision made with ``session`` set to this session is recorded as made in it; the review must be on the agenda.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
reviews | list of string | yes |
GET /api/v1/spot-checks#
Spot checks of automatic approvals
POST /api/v1/spot-checks#
Draw a sample to check
Draws at random from the approvals rules made in the last four months that have not been drawn before. The scheduler also draws about one in ten by itself.
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
count | integer |
POST /api/v1/spot-checks/{check_id}#
Record a spot check
Agree with the rule, or disagree and say why. Disagreeing opens a review of the use.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
check_id | path | integer | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
agree | boolean | yes | |
note | string |
GET /api/v1/use-cases/{ref}/review#
The latest review of a use case
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
Keeping watch#
GET /api/v1/actions#
Everything someone must do, in one list
Actions set after incidents, and the conditions of decisions that have a date or must be met before use. ``scope=all`` is for those who see everything; ``status=all`` includes what is finished. A condition is closed through its own route.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
scope | query | string | Default: "mine". | |
status | query | string | Default: "open". |
POST /api/v1/actions/{ref}/close#
Say an action is done, or cancel it
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
note | string | ||
status | string |
GET /api/v1/campaigns#
Attestation campaigns
Governance, auditors, and administrators see every campaign. Anyone else sees the campaigns that ask something of them.
POST /api/v1/campaigns#
Start a campaign
An owner confirmation asks the owners of each record in scope whether it is still true. A unit completeness campaign asks each unit's steward whether its list is whole.
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
due_on | string | ||
kind | string | yes | |
note | string | ||
record_types | list of string | ||
scope_unit_id | integer | ||
title | string | yes |
GET /api/v1/campaigns/{ref}#
One campaign: coverage, and what is yours to answer
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
POST /api/v1/campaigns/{ref}/answers#
Answer some of a campaign's questions
For a record: ``confirmed``, ``changed``, or ``retired``; the last two need a note. For a unit: ``attested``. Several can be answered at once; all are recorded, or none.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
items | list of Answer | yes |
POST /api/v1/campaigns/{ref}/close#
Close a campaign
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
GET /api/v1/exceptions#
The exception register
Every exception you may see: all of them for governance, auditors, and administrators; otherwise those you asked for and those on records you see in full. ``status=open`` gives the ones waiting for a decision or in force. ``record`` limits it to one record.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
status | query | string | ||
record | query | string |
POST /api/v1/exceptions#
Ask for an exception
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
ends_on | string | ||
justification | string | ||
measures | string | ||
record | string | yes | |
requirement | string | ||
rule | string | A rule of GovWren's own the exception departs from: health_agreement | |
title | string | yes |
GET /api/v1/exceptions/{ref}#
One exception
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
POST /api/v1/exceptions/{ref}/decision#
Approve or decline an exception
``ends_on`` may bring the end date forward. An exception runs for a year at most.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
ends_on | string | ||
note | string | ||
outcome | string | yes |
POST /api/v1/exceptions/{ref}/end#
Withdraw a request, or revoke an exception
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
reason | string |
POST /api/v1/exceptions/{ref}/renewal#
Ask for more time
A renewal is a new request, decided afresh, that points to the exception it renews.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
ends_on | string | ||
justification | string |
GET /api/v1/incidents#
The incident register
Every incident you may see: all of them for governance, auditors, and administrators; otherwise those you reported and those that involve a record you are responsible for.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
status | query | string |
POST /api/v1/incidents#
Report an incident or a near miss
Anyone signed in may report. Describe what happened; do not paste sensitive data.
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
description | string | ||
occurred_on | string | ||
org_unit_id | integer | ||
records | list of string | ||
title | string | yes |
GET /api/v1/incidents/{ref}#
One incident
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
POST /api/v1/incidents/{ref}/actions#
Set an action
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
due_on | string | ||
owner_id | integer | ||
record | string | ||
title | string | yes |
POST /api/v1/incidents/{ref}/lift#
Lift a suspension
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
reason | string | ||
record | string | yes |
POST /api/v1/incidents/{ref}/progress#
Mark an incident contained, or close it
Closing needs the cause and what was learned, and no approval still suspended.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
cause | string | ||
containment | string | ||
lessons | string | ||
status | string | yes |
POST /api/v1/incidents/{ref}/review#
Open a review of a use it involves
The review goes to triage with the reviews the rules require. Approving it lifts any suspension; it does not restart the approval period.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
reason | string | ||
record | string | yes |
POST /api/v1/incidents/{ref}/suspend#
Suspend the approval of a use it involves
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
reason | string | ||
record | string | yes |
POST /api/v1/incidents/{ref}/triage#
Triage an incident, or dismiss it
Sets the category, the severity, who leads, and the records involved. May be sent again to correct them. ``dismiss`` closes a report that is not an incident, with why.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
category | string | ||
dismiss | string | ||
lead_id | integer | ||
records | list of string | ||
severity | string |
GET /api/v1/records/{ref}/findings#
What to know before relying on a record
The record's own findings, and those inherited from everything it relies on, each with the record it comes from. Records you may not see contribute nothing.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
POST /api/v1/records/{ref}/retire#
Retire a record
The record stays in the inventory with its history, marked as no longer in use. The owners of the records that rely on it are told.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
reason | string |
POST /api/v1/use-cases/{ref}/change#
Declare a change to an approved use
Opens a change review that waits on the owner. The answers given last time become a draft to correct through the intake routes; submitting them lets the rules judge whether the change is material. Until then, withdrawing the review drops the change.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
summary | string |
Assurance#
GET /api/v1/assessments/{ref}/{template}#
An assessment of a record
The questions of the template and the latest answers. ``template`` is ``impact_assessment`` for a use case or ``vendor_due_diligence`` for a vendor.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes | |
template | path | string | yes |
PUT /api/v1/assessments/{ref}/{template}#
Save or submit an assessment
Saved as a draft unless ``submit`` is set, which needs every required answer.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes | |
template | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
answers | object | yes | |
submit | boolean |
POST /api/v1/assessments/{ref}/{template}/review#
Record that an assessment was reviewed
For a vendor, this completes its due diligence.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes | |
template | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
note | string |
GET /api/v1/controls#
The control library, or the controls of one record
With no ``record``: every control, with how it stands for the program or how many of the records it applies to have it in place. With one: the controls that apply to that record, each with how it stands there.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
record | query | string |
GET /api/v1/controls/{key}#
One control, and where it stands
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
key | path | string | yes |
PUT /api/v1/controls/{key}/standing#
Say how a control stands
For the program, or for one ``record`` the control applies to. ``status`` is ``not_started``, ``in_progress``, ``implemented``, or ``not_applicable``; the last needs a note saying why, and is governance's to give. ``checked`` records that a control in place was checked today, and sets the date of the next check.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
key | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
checked | boolean | ||
note | string | ||
owner_id | integer | ||
record | string | ||
status | string | yes |
GET /api/v1/frameworks#
Frameworks: those loaded, and those that can be
A framework is optional. Nothing else in GovWren needs one to be loaded.
POST /api/v1/frameworks#
Load a framework
Give the ``key`` of a built-in framework, or a whole ``pack``: a document of kind ``framework`` with its requirements and a crosswalk from requirement codes to control keys. A pack that fails its checks is refused whole. Loading again brings it up to date.
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
key | string | ||
pack | object |
DELETE /api/v1/frameworks/{key}#
Remove a framework
Controls, their standing, and their evidence are not touched.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
key | path | string | yes |
GET /api/v1/frameworks/{key}#
Readiness against one framework
Each requirement as covered, partly covered, a gap, not mapped, or not applicable, with the controls behind it. It is worked out from how the controls stand.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
key | path | string | yes |
PUT /api/v1/frameworks/{key}/applicability#
Say whether a requirement applies
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
key | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
applies | boolean | yes | |
code | string | yes | |
justification | string |
GET /api/v1/policies#
Policies
Policies in force, each with whether you have been asked to acknowledge it. Governance, auditors, and administrators also see drafts and retired policies.
POST /api/v1/policies#
Start a policy
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
body | string | ||
control_keys | list of string | ||
owner_id | integer | ||
review_on | string | ||
summary | string | ||
title | string | yes |
GET /api/v1/policies/{ref}#
One policy: its text, versions, and controls
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
PATCH /api/v1/policies/{ref}#
Change a policy's name, owner, review date, or controls
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
control_keys | list of string | ||
owner_id | integer | ||
review_on | string | ||
summary | string | ||
title | string |
POST /api/v1/policies/{ref}/acknowledge#
Say you have read a policy
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
POST /api/v1/policies/{ref}/ask#
Ask people to acknowledge a policy
Everyone in ``unit_id`` and the units beneath it, or everyone when it is left out, is asked to acknowledge the version in force by ``due_on``.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
due_on | string | ||
unit_id | integer |
PUT /api/v1/policies/{ref}/draft#
Write the next version of a policy
The version in force is not touched until the draft is published.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
body | string | yes | |
change_note | string |
POST /api/v1/policies/{ref}/publish#
Put the draft in force
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
POST /api/v1/policies/{ref}/retire#
Retire a policy
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
GET /api/v1/risk-library#
Reusable risk statements to draw from
GET /api/v1/risks#
The risk register
Every risk you may see, highest first, with a count for each cell of the grid of likelihood against impact. ``status`` is ``live``, ``all``, or one standing. ``record`` limits it to one record; ``mine`` to the risks you own.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
status | query | string | Default: "live". | |
record | query | string | ||
mine | query | boolean | Default: false. |
POST /api/v1/risks#
Record a risk
On a record, on the use a review is about, or on the organization when neither is given. ``library_key`` draws the wording from the risk library. A reviewer may record a risk from a review they have a part in; it goes to the use's accountable owner.
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
category | string | ||
description | string | ||
inherent_impact | integer | ||
inherent_likelihood | integer | ||
library_key | string | ||
owner_id | integer | ||
record | string | ||
review | string | ||
review_on | string | ||
title | string |
GET /api/v1/risks/{ref}#
One risk
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
PATCH /api/v1/risks/{ref}#
Rescore a risk, treat it, or pass it on
Send only what changes. Scores run from 1 to 5. Giving a treatment and both residual scores marks the risk as treated; the treatment ``accept`` is governance's to give.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
category | string | ||
description | string | ||
inherent_impact | integer | ||
inherent_likelihood | integer | ||
owner_id | integer | ||
residual_impact | integer | ||
residual_likelihood | integer | ||
review_on | string | ||
title | string | ||
treatment | string | ||
treatment_note | string |
POST /api/v1/risks/{ref}/close#
Close a risk that no longer applies
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
reason | string |
GET /api/v1/statement-of-applicability#
Every control, with whether it applies and how it stands
The control library as one list: applicability, justification, status, owner, and evidence for each control. It needs no framework to be loaded. Name a loaded framework and the list is that framework's requirements instead: whether each applies, why not if it does not, how it stands, and the controls that answer it.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
format | query | string | csv or json Default: "csv". | |
framework | query | string | A loaded framework's key, to list its requirements instead |
Insight#
GET /api/v1/bill-of-materials#
The models as a bill of materials
CycloneDX 1.6 JSON: each model you may see in full as a machine-learning component with its supplier, license, checksum, and model card, the datasets it was trained or evaluated on, and what depends on what.
GET /api/v1/inventory/as-of#
The use cases on the record on a date
Every use that had been submitted by the end of that day, with its standing, tier, and unit as they were then, and how many have changed standing since.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
on | query | string | The day, as year-month-day |
GET /api/v1/measures#
The program's measures, each with its definition
Turnaround, throughput, coverage, currency, and completeness over a period, which is the last ninety days unless given. Each comes with the sentence that defines it, the cohort it counts, and its trend from the snapshots taken each day.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
from | query | string | The first day of the period, as year-month-day | |
to | query | string | The last day of the period, as year-month-day |
GET /api/v1/models/{ref}/card#
A model card, in Markdown
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
GET /api/v1/portfolio#
The portfolio, grouped one way
Uses in the inventory grouped by ``unit``, ``tier``, ``domain``, ``data_class``, or ``vendor``. Each group says how many uses it holds and how they stand now, and what was decided for it in the period, with the address of the list that shows them.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
by | query | string | Default: "unit". | |
from | query | string | The first day of the period, as year-month-day | |
to | query | string | The last day of the period, as year-month-day |
GET /api/v1/records/{ref}/as-of#
A record as it stood on a date
The record at the end of that day, beside how it stands now: each field then and now, its owners, what it relied on, and its conditions. Worked out from the history. For those who see the whole record.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes | |
on | query | string | The day, as year-month-day |
GET /api/v1/records/{ref}/dossier#
Everything about one record
The record with its answers, reviews, decisions, conditions, findings, risks, controls, exceptions, incidents, assessments, evidence, and history, cut to what you may see. For those who see the whole record.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
GET /api/v1/records/{ref}/dossier/package#
The dossier as a package with a manifest
A zip holding the dossier as data and as a page to print, each evidence file, and ``manifest.json``, which lists every file with its SHA-256 and names the event the history ended at. ``govwren dossier verify`` checks a package against its manifest.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
GET /api/v1/register#
What is on the transparency register
GET /api/v1/register/pages#
The register as static pages
A zip of plain pages with no script: an index, a page for each use on the register whose approval is in force, and a stylesheet. Put them on any web server.
GET /api/v1/register/preview/{name}#
One page of the register, as it would be published
The same files the download holds, served one at a time so that the register can be read before it is published. Start at ``index.html``.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
name | path | string | yes |
GET /api/v1/reports#
The leadership reports made so far
POST /api/v1/reports#
Make a leadership report and freeze it
Works the report out for the period and stores it whole. It never changes afterwards: opening it reads what was stored, with the SHA-256 it was stored under.
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
commentary | string | ||
from | string | ||
title | string | ||
to | string |
GET /api/v1/reports/{ref}#
One leadership report, as it was frozen
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
GET /api/v1/units/{unit_id}/report#
One unit on a page
The unit and the units beneath it: its uses and how they stand, and what is waiting on someone there. For the unit's stewards, and for those who see everything.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
unit_id | path | integer | yes |
DELETE /api/v1/use-cases/{ref}/register#
Take a use off the register
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
PUT /api/v1/use-cases/{ref}/register#
Put a use on the register, or reword it
The title and description are what readers of the published pages see. Only a use with an approval in force can be added.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
description | string | ||
show_unit | boolean | ||
title | string |
The program#
GET /api/v1/program#
The program as it is published
The form, scoring model, routing rules, and vocabularies in force, with the versions each has been through.
PUT /api/v1/program#
Publish a change to the program
Each part that differs from what is published becomes a new version. Earlier versions are kept, and a request already decided keeps the version it was decided under.
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
forms | list of object | ||
review | object | ||
scoring_model | object | ||
vocabularies | object |
POST /api/v1/program/check#
Check a change to the program before publishing it
Says what is wrong with the proposed program, if anything, and what it would have done to the requests already submitted: how many would have had a different tier, different reviews, or a different route to approval. Nothing is changed.
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
forms | list of object | ||
review | object | ||
scoring_model | object | ||
vocabularies | object |
integration#
GET /api/v1/admin/assistant#
The assistant as configured, and Ask GovWren's switch
PUT /api/v1/admin/assistant#
Turn Ask GovWren on or off, or change who may ask
``audience`` is ``everyone`` or ``staff``: governance, reviewers, auditors, and administrators. Ask GovWren does nothing unless an assistant is configured.
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
audience | string | ||
enabled | boolean |
GET /api/v1/admin/tokens#
Everyone's API tokens
GET /api/v1/admin/webhooks#
The webhooks, and how their deliveries are going
POST /api/v1/admin/webhooks#
Add a webhook
The answer holds ``secret``, shown this once. Each delivery is signed with it: the ``X-GovWren-Signature`` header is ``sha256=`` and the HMAC-SHA256 of the ``X-GovWren-Timestamp`` header, a dot, and the body.
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
active | boolean | ||
name | string | ||
topics | list of string | ||
url | string |
DELETE /api/v1/admin/webhooks/{webhook_id}#
Remove a webhook
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
webhook_id | path | integer | yes |
PATCH /api/v1/admin/webhooks/{webhook_id}#
Change a webhook, or switch it off or on
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
webhook_id | path | integer | yes |
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
active | boolean | ||
name | string | ||
topics | list of string | ||
url | string |
POST /api/v1/admin/webhooks/{webhook_id}/test#
Send a test delivery now
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
webhook_id | path | integer | yes |
POST /api/v1/ask#
Ask GovWren a question
Only where an assistant is configured and an administrator has turned Ask GovWren on; otherwise 404. GovWren finds the records and policies that bear on the question, among those the person may see, and the assistant answers from them. The answer cites its sources as [1], [2], and ``sources`` lists them with where each can be read. Nothing is changed but the record that the question was asked.
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
question | string | yes | The question, in the person's own words |
POST /api/v1/assistant/draft#
Suggested answers to the request form
Only where an assistant is configured; otherwise 404. From a few sentences in the person's own words, suggests answers the form would accept. Nothing is saved: the answers are for the person to read, correct, and submit.
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
description | string | yes |
GET /api/v1/assistant/exchanges#
What has been asked of the assistant
GET /api/v1/checkpoint/{ref}#
Is this reference approved, for what data, until when?
For a system that is given a GovWren reference and must decide whether to proceed. The answer is the record's standing: ``approved``, ``status``, ``approved_until``, and the data class it covers. With ``data_class``, ``allowed`` says whether the record is approved and covers data that sensitive. Nothing about the record's content is given, so any signed-in person or token may ask about any reference. ``name`` is null unless the asker may see the record, and someone else's draft answers 404.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes | |
data_class | query | string | A data class: is the record approved for data this sensitive? |
GET /api/v1/records/{ref}/suggestions#
What a connected registry suggests for a record
Each suggestion names a field, what the record says now, and what the registry says. Nothing changes until someone who can edit the record accepts one.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
POST /api/v1/reviews/{ref}/summary#
The assistant's summary of a review
Only where an assistant is configured; otherwise 404. For the people reviewing and deciding. A request above the configured data class is never sent.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
ref | path | string | yes |
POST /api/v1/signals#
Push a result onto a record as evidence
For another tool to hand in what it found: an evaluation result, a monitoring report, a scan. It is kept as evidence on the record, and the record's owners are told if the result is ``warn`` or ``fail``. Send a summary, never data. The answer gives the reference of the evidence and nothing about the record. Use a token with the ``signal`` scope, which can do nothing else. It pushes onto a record its account can see in full, or onto any record if its account reads everything (an auditor, governance, or an administrator). A record it may not push onto is answered exactly as one that does not exist.
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
dated_on | string | ||
good_until | string | ||
kind | string | evaluation, monitoring, scan, or other | |
ref | string | yes | The record the result is about, such as MDL-0007 or UC-0042 |
result | string | pass, warn, fail, or info | |
source | string | yes | The tool sending it |
summary | string | ||
title | string | yes | What was checked |
url | string | Where the full result can be read |
POST /api/v1/suggestions/{suggestion_id}/accept#
Make the change a suggestion proposes
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
suggestion_id | path | integer | yes |
POST /api/v1/suggestions/{suggestion_id}/dismiss#
Leave the record as it is
The same suggestion is not made again.
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
suggestion_id | path | integer | yes |
GET /api/v1/tokens#
Your API tokens
POST /api/v1/tokens#
Make an API token
The answer holds ``token``, the secret itself. It is shown this once and cannot be read again: only its hash is kept. Send it as ``Authorization: Bearer <token>``.
JSON body:
| Field | Type | Required | Meaning |
|---|---|---|---|
expires_on | string | ||
name | string | ||
scope | string |
DELETE /api/v1/tokens/{token_id}#
Revoke an API token
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
token_id | path | integer | yes |