1. API Reference
  2. Get started
  3. API quickstart
Website
  • API overview
  • API quickstart
  • Authentication
  • Project scoping
  • Requests and responses
  • Pagination and filtering
  • Errors
  • GETList supported database engines
  • POSTList projects
  • POSTCreate a project
  • GETGet a project
  • DELETEDelete a project
  • PATCHUpdate a project
  • POSTCreate a source
  • POSTList sources
  • GETGet source details
  • DELETEDelete a source
  • PATCHUpdate a source
  • POSTCreate secret metadata
  • POSTList secret metadata
  • GETGet secret metadata
  • DELETEDelete secret metadata
  • PATCHUpdate secret metadata
  • POSTCreate a schedule
  • POSTList schedules
  • POSTSummarize schedule statuses
  • GETGet a schedule
  • DELETEDelete a schedule
  • PATCHUpdate a schedule
  • DELETERemove a schedule gate
  • POSTActivate or pause a schedule
  • POSTQueue a manual check
  • POSTCreate an immutable report
  • POSTList reports
  • GETGet report details
  • DELETEDelete a report
  • POSTDownload a report
  • POSTGet the API-key scope catalog
  • POSTCreate an API key
  • POSTList API-key metadata
  • GETGet API-key metadata
  • DELETEDelete an API key
  • PATCHUpdate API-key metadata
  • POSTCreate a notification channel
  • POSTList notification channels
  • POSTResolve notification channels by ID
  • GETGet notification channel details
  • DELETEDelete a notification channel
  • PATCHUpdate a notification channel
  • POSTSend a test notification
  • POSTCreate a project worker
  • POSTList project workers
  • GETGet worker details
  • DELETEDelete a worker
  • PATCHUpdate a worker
  • POSTRead live worker agent logs
  • POSTList checks
  • POSTSummarize check statuses
  • GETGet check details
  • POSTGet check log sections
  • POSTDownload a check log
  • POSTDownload check audit evidence
  • POSTList notification messages
  • GETGet notification message details

API quickstart

Create a project-scoped API key and make your first authenticated RestoreTrust API request.

Loading documentation…

API overview< PreviousAuthenticationNext >

Powered by heyo

On this page

Next request

Make a read-only request to list recent checks in an existing project.

  1. 1

    Create a least-privilege API key

    In the RestoreTrust console, open the project, create an API key, and grant v1.checks:read.

    Copy the secret now

    The plaintext key is returned once. Store it in a secret manager and create a replacement if it is lost. Never commit it to source control or place it in a URL.

  2. 2

    Set local variables

    Use the API origin supplied for your deployment and your project ID. These values are fake:

    bash
    export RESTORETRUST_API_ORIGIN="https://api.restoretrust.example"export RESTORETRUST_API_KEY="rtk_REPLACE_WITH_YOUR_KEY"export RESTORETRUST_PROJECT_ID="65f0c7a9a7d6b4e2c1234567"
  3. 3

    List recent checks

    List endpoints use POST so pagination and filters can be sent as JSON.

    bash
    curl --fail-with-body \  --request POST \  --url "$RESTORETRUST_API_ORIGIN/v1/checks/list" \  --header "Content-Type: application/json" \  --header "X-API-Key: $RESTORETRUST_API_KEY" \  --data '{    "project_id": "'"$RESTORETRUST_PROJECT_ID"'",    "sort": "created-desc",    "pagination": { "limit": 10 },    "filters": {}  }'
  4. 4

    Read the response

    A successful list response includes rows and cursor metadata:

    json
    {  "status": "success",  "sort": "created-desc",  "filters": {},  "pagination": {    "limit": 10,    "has_more": false  },  "data": {    "checks": []  }}

Next request

Use a returned check ID with Get check details. Do not add project_id to an item request; the API derives and authorizes the owning project from the check.

Related topics

  • Choose API-key scopes
  • Continue paginated lists
  • Inspect checks and evidence