Skip to content

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.

Terminal
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"}'
RequestWhat it does
GET /assetsList 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}/linksIts relationships and linked records
POST /assetsCreate an asset
PATCH /assets/{id}Change any of the fields below
GET /relationships, POST /relationshipsList or add relationships between assets

Asset fields

FieldRules
nameRequired, up to 200 characters
typeRequired: hardware, software, infrastructure, cloud_resource, repository, endpoint, network_component or other
descriptionUp to 10,000 characters
criticality1 to 5, default 3
lifecycle_statusplanned, active, maintenance or retired
owner_idA member's user ID
tags, metadataA 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.

RequestWhat it does
GET /risksList risks by title; project_id filters, limit and cursor page
POST /risksCreate 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, POSTRead or add a likelihood and impact assessment
GET /risks/{id}/treatments, POSTRead or add a treatment

Controls

Needs Controls and frameworks.

RequestWhat it does
GET /controlsList controls by code; project_id filters, limit and cursor page
POST /controlsCreate a control: code (required, up to 100), title (required, up to 300), description, owner_id, project_id
GET /controls/{id}/evidenceEvidence linked to the control
GET /controls/{id}/testing, POST /controls/{id}/testsRead the testing plan or record a test result
GET /control-mappings, POST /control-mappingsMap controls to framework requirements
GET /frameworks, GET /frameworks/{id}/requirementsThe 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.

Terminal
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
RequestWhat it does
GET /evidenceList 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/linksLink evidence to a control: evidence_id, control_id, optional note
GET /evidence/{id}/downloadA short-lived signed link to the current file, once it is scanned clean
GET /evidence-requests, POST /evidence-requestsList 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.

RequestWhat it does
GET /findingsList findings; project_id, mine and active_only filter, cursor pages
GET /findings/{id}One finding with its details, evidence and history
POST /findingsCreate 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}/evidenceAttach 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.

grcHero API. Authenticated, rate limited, attributed to your token.