Endpoints
Work with workspace records
Read and create assets, risks, controls, evidence and findings from scripts and integrations, within the permissions the token holds.
On this page
What a token can and cannot do
A token reads and writes operational records: it can list, view, create and update. It never deletes, decides, approves, publishes or administers. Those steps need a person in the browser, so what a script writes stays a draft or an open record until someone reviews it.
Every path below is relative to https://api.grchero.dev/v1 and needs the Authorization and X-Organization-ID headers. IDs are UUIDs. Records are scoped to the workspace in the header; another workspace's ID answers 404.
Assets
Needs Assets and architecture: read to list and view, write to create and update.
curl -X POST "https://api.grchero.dev/v1/assets" \
-H "Authorization: Bearer $GRCHERO_API_TOKEN" \
-H "X-Organization-ID: $GRCHERO_ORGANIZATION_ID" \
-H "Content-Type: application/json" \
-d '{"name": "Billing API", "type": "software", "criticality": 4, "lifecycle_status": "active"}'| Request | What it does |
|---|---|
GET /assets | List assets by name. Filters: query, type, lifecycle_status, criticality_min, project_id; page with limit and cursor |
GET /assets/{id} | One asset |
GET /assets/{id}/links | Its relationships and linked records |
POST /assets | Create an asset |
PATCH /assets/{id} | Change any of the fields below |
GET /relationships, POST /relationships | List or add relationships between assets |
Asset fields
| Field | Rules |
|---|---|
name | Required, up to 200 characters |
type | Required: hardware, software, infrastructure, cloud_resource, repository, endpoint, network_component or other |
description | Up to 10,000 characters |
criticality | 1 to 5, default 3 |
lifecycle_status | planned, active, maintenance or retired |
owner_id | A member's user ID |
tags, metadata | A list of labels and a JSON object of your own fields |
Risks
Needs Risks. A new risk is open unless you say mitigated or closed. Accepting a risk is a separate, approved exception made in the browser, never a status a token sets.
| Request | What it does |
|---|---|
GET /risks | List risks by title; project_id filters, limit and cursor page |
POST /risks | Create a risk: title (required, up to 200), description, status, project_id, and an optional target_type and target_id for what it concerns |
GET /risks/{id}/assessments, POST | Read or add a likelihood and impact assessment |
GET /risks/{id}/treatments, POST | Read or add a treatment |
Controls
Needs Controls and frameworks.
| Request | What it does |
|---|---|
GET /controls | List controls by code; project_id filters, limit and cursor page |
POST /controls | Create a control: code (required, up to 100), title (required, up to 300), description, owner_id, project_id |
GET /controls/{id}/evidence | Evidence linked to the control |
GET /controls/{id}/testing, POST /controls/{id}/tests | Read the testing plan or record a test result |
GET /control-mappings, POST /control-mappings | Map controls to framework requirements |
GET /frameworks, GET /frameworks/{id}/requirements | The frameworks and requirements you can map to |
Evidence
Needs Evidence. Uploaded files are scanned for malware before anyone can download them; a file still being scanned or found unsafe cannot be downloaded.
curl -X POST "https://api.grchero.dev/v1/evidence/files?filename=access-review.pdf&name=Q3%20access%20review" \
-H "Authorization: Bearer $GRCHERO_API_TOKEN" \
-H "X-Organization-ID: $GRCHERO_ORGANIZATION_ID" \
-H "Content-Type: application/pdf" \
--data-binary @access-review.pdf| Request | What it does |
|---|---|
GET /evidence | List evidence, newest first; project_id filters, limit and cursor page |
GET /evidence/search?q= | Find evidence by name |
POST /evidence/files?filename=&name= | Upload one file as the raw request body; optional expires_on and project_id |
POST /evidence/{id}/files?filename=&expected_version= | Add a new version of a file |
POST /evidence/links | Link evidence to a control: evidence_id, control_id, optional note |
GET /evidence/{id}/download | A short-lived signed link to the current file, once it is scanned clean |
GET /evidence-requests, POST /evidence-requests | List or open requests for evidence |
Findings
Needs Assessments and findings. Deciding a finding (approving a fix, accepting the risk, closing it as a duplicate) is for people in the browser.
| Request | What it does |
|---|---|
GET /findings | List findings; project_id, mine and active_only filter, cursor pages |
GET /findings/{id} | One finding with its details, evidence and history |
POST /findings | Create a finding: title (required, up to 300), severity (required: low, medium, high or critical), description, project_id, affected_asset_id |
PATCH /findings/{id} | Change its owner (required), reviewer, due date, remediation plan, test procedure or linked control; send expected_version from the last read |
POST /findings/{id}/evidence | Attach evidence to the finding |
Everything else
Tokens can also reach the other areas listed in Every area. The CLI's grchero api command calls the same paths with your own sign-in, which is often the quickest way to try one.