{
  "opencollection": "1.0.0",
  "info": {
    "name": "ReasonBlocks Billing Monitor Telemetry API",
    "version": "0.1.0"
  },
  "items": [
    {
      "info": {
        "name": "Monitor Telemetry",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Me",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/v1/monitor/me",
            "params": [
              {
                "name": "token",
                "value": "",
                "type": "query",
                "description": "API key (EventSource fallback)"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Return the caller's identity + superuser flag. The website's\nruns page hides the cross-org filter UI from non-superusers based\non this response."
        },
        {
          "info": {
            "name": "List Runs",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/v1/monitor/runs",
            "params": [
              {
                "name": "limit",
                "value": "",
                "type": "query"
              },
              {
                "name": "offset",
                "value": "",
                "type": "query"
              },
              {
                "name": "org_id",
                "value": "",
                "type": "query"
              },
              {
                "name": "project_id",
                "value": "",
                "type": "query"
              },
              {
                "name": "api_key_name",
                "value": "",
                "type": "query"
              },
              {
                "name": "org_name",
                "value": "",
                "type": "query"
              },
              {
                "name": "token",
                "value": "",
                "type": "query",
                "description": "API key (EventSource fallback)"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "List Runs"
        },
        {
          "info": {
            "name": "Start Run",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/v1/monitor/runs",
            "params": [
              {
                "name": "token",
                "value": "",
                "type": "query",
                "description": "API key (EventSource fallback)"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Start Run"
        },
        {
          "info": {
            "name": "Finish Run",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/v1/monitor/runs/:run_id/finish",
            "params": [
              {
                "name": "run_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "token",
                "value": "",
                "type": "query",
                "description": "API key (EventSource fallback)"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Finish Run"
        },
        {
          "info": {
            "name": "Log Step",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/v1/monitor/runs/:run_id/steps",
            "params": [
              {
                "name": "run_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "token",
                "value": "",
                "type": "query",
                "description": "API key (EventSource fallback)"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Log Step"
        },
        {
          "info": {
            "name": "Run Detail",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/v1/monitor/runs/:run_id",
            "params": [
              {
                "name": "run_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "token",
                "value": "",
                "type": "query",
                "description": "API key (EventSource fallback)"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Run Detail"
        },
        {
          "info": {
            "name": "Monitor Health Summary",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/v1/monitor/health-summary",
            "params": [
              {
                "name": "org_id",
                "value": "",
                "type": "query"
              },
              {
                "name": "project_id",
                "value": "",
                "type": "query"
              },
              {
                "name": "token",
                "value": "",
                "type": "query",
                "description": "API key (EventSource fallback)"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Monitor Health Summary"
        },
        {
          "info": {
            "name": "Experiment Report",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/v1/monitor/experiments/:experiment_id/report",
            "params": [
              {
                "name": "experiment_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "org_id",
                "value": "",
                "type": "query"
              },
              {
                "name": "project_id",
                "value": "",
                "type": "query"
              },
              {
                "name": "on_fraction",
                "value": "",
                "type": "query"
              },
              {
                "name": "token",
                "value": "",
                "type": "query",
                "description": "API key (EventSource fallback)"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Per-arm A/B report for one experiment: cost/token deltas (primary),\naccuracy non-inferiority with CI (guardrail), reasoning health\n(secondary), SRM, and a per-day learning curve. ``on_fraction`` is the\ncoin's configured ON probability, used only for the SRM check.\n\nScope rules match the rest of the dashboard: JWT (dashboard) callers\nmust name an org; per-customer keys are pinned to their own org."
        },
        {
          "info": {
            "name": "List Profiles",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/v1/monitor/profiles",
            "params": [
              {
                "name": "org_id",
                "value": "",
                "type": "query"
              },
              {
                "name": "project_id",
                "value": "",
                "type": "query"
              },
              {
                "name": "token",
                "value": "",
                "type": "query",
                "description": "API key (EventSource fallback)"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Every monitor profile visible at this scope. Built-ins always\nappear; customs are merged in from Postgres for the org (and the\nproject-scoped subset, when ``project_id`` is supplied). Per-customer\nkeys see only their own org's customs regardless of query."
        },
        {
          "info": {
            "name": "Create Profile",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/v1/monitor/profiles",
            "params": [
              {
                "name": "token",
                "value": "",
                "type": "query",
                "description": "API key (EventSource fallback)"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Create a custom profile. Profile IDs that collide with a built-in\nare rejected. The same profile_id can exist once org-wide AND once\nper project; the resolver prefers project-scoped. The org_id /\nproject_id authority comes from the API key when it's per-customer\n-- the body's values are ignored to prevent cross-tenant writes."
        },
        {
          "info": {
            "name": "Get Profile",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/v1/monitor/profiles/:profile_id",
            "params": [
              {
                "name": "profile_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "org_id",
                "value": "",
                "type": "query"
              },
              {
                "name": "project_id",
                "value": "",
                "type": "query"
              },
              {
                "name": "token",
                "value": "",
                "type": "query",
                "description": "API key (EventSource fallback)"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Get Profile"
        },
        {
          "info": {
            "name": "Update Profile",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "{{baseUrl}}/v1/monitor/profiles/:profile_id",
            "params": [
              {
                "name": "profile_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "token",
                "value": "",
                "type": "query",
                "description": "API key (EventSource fallback)"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Update an existing custom profile. Built-ins cannot be patched.\nPer-customer keys can only patch profiles in their own org."
        },
        {
          "info": {
            "name": "Remove Profile",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "{{baseUrl}}/v1/monitor/profiles/:profile_id",
            "params": [
              {
                "name": "profile_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "org_id",
                "value": "",
                "type": "query"
              },
              {
                "name": "project_id",
                "value": "",
                "type": "query"
              },
              {
                "name": "token",
                "value": "",
                "type": "query",
                "description": "API key (EventSource fallback)"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Delete a custom profile. Built-ins cannot be deleted. project_id\nselects between the org-wide ('') and project-scoped row.\n\nPer-customer keys can only delete profiles in their own org.\nStatic principals MUST pass an explicit ``org_id`` -- otherwise we\nrefuse rather than fall through to \"default\", which historically\nlet admin keys destroy any tenant's profile by URL hacking.\nJWT principals must have ``org_id`` in their allowed_orgs."
        },
        {
          "info": {
            "name": "List Scorers",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/v1/monitor/scorers",
            "params": [
              {
                "name": "token",
                "value": "",
                "type": "query",
                "description": "API key (EventSource fallback)"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "The closed scorer registry the upstream pipeline understands.\nCustom profiles can only reference these names. Each entry carries\nthe default weight under the ``coding`` profile so the editor can\npre-fill sensible numbers when a customer first picks the scorer."
        },
        {
          "info": {
            "name": "Monitor Stream",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/v1/monitor/stream",
            "params": [
              {
                "name": "org_id",
                "value": "",
                "type": "query"
              },
              {
                "name": "project_id",
                "value": "",
                "type": "query"
              },
              {
                "name": "token",
                "value": "",
                "type": "query",
                "description": "API key (EventSource fallback)"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "SSE stream of ``monitor_steps`` writes. Filter via ``org_id`` /\n``project_id`` to match the dashboard's current scope.\n\nEvent types:\n  * ``ready`` -- empty payload, sent on connect\n  * ``step``  -- ``{run_id, step_index, org_id, project_id, total_score, fired}``\n                 payload (matches the NOTIFY trigger envelope)."
        }
      ]
    }
  ],
  "bundled": true
}