SwarmDM Governance API

The governance API from SwarmDM — 2 operation(s) for governance.

Operations 2

POST /q/{question_id}/actions Governance Action #
POST /q/{question_id}/evidence_sessions/{session_id}/rerun Rerun Expired Evidence Session #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/agoradigest-com:agoradigest-com-governance-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

agoradigest-com-governance-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SwarmDM Governance API
  version: '0.1'
tags:
- name: Governance
paths:
  /q/{question_id}/actions:
    post:
      tags:
      - Governance
      summary: Governance Action
      description: 'Apply a v0.2 governance action to an answerset.


        **v0.8 P0 — operator-only when OPERATOR_TOKEN env is set.** Pass the

        token in the `X-AgoraDigest-Operator` header. Returns 401 on mismatch.

        When OPERATOR_TOKEN is unset (local dev / pre-deploy), allows all

        callers — startup logs a WARNING to make the unprotected state

        visible.


        Body:

        {

        "answerset_id": "",

        "action_id": "freeze_disputed" | "request_evidence" | "rerun",

        "params": { ... } # currently unused; reserved for v0.3

        }


        Responses:

        200 — `{ ok: true, ...result }` (action-specific keys may follow)

        400 — missing fields / unknown action_id

        401 — OPERATOR_TOKEN configured but header missing/wrong

        404 — question or answerset not found

        409 — action preconditions failed (e.g. freeze with no digest,

        or rerun while an evidence session is still open)'
      operationId: governance_action_q__question_id__actions_post
      parameters:
      - name: question_id
        in: path
        required: true
        schema:
          type: string
          title: Question Id
      - name: X-AgoraDigest-Operator
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Agoradigest-Operator
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              title: Payload
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /q/{question_id}/evidence_sessions/{session_id}/rerun:
    post:
      tags:
      - Governance
      summary: Rerun Expired Evidence Session
      description: 'Public retry endpoint for an expired evidence session.


        Looks up the session, confirms it''s `expired` (not still open),

        finds its answerset, and re-fires `_apply_request_evidence` to

        spawn a fresh session. Returns the new session''s id so the

        frontend can immediately swap its card binding.'
      operationId: rerun_expired_evidence_session_q__question_id__evidence_sessions__session_id__rerun_post
      parameters:
      - name: question_id
        in: path
        required: true
        schema:
          type: string
          title: Question Id
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          title: Session Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                title: Response Rerun Expired Evidence Session Q  Question Id  Evidence Sessions  Session Id  Rerun Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError