Endpoints

List oracles

Every oracle this key may call. Free.

GEThttps://api.formalogic.io/v1/oracles

What this caller can ask, in the vocabulary they ask it in.

curl https://api.formalogic.io/v1/oracles \
  -H "Authorization: Bearer $FORMA_API_KEY"

Response 200

Every oracle this key may call.

oraclesobject[]Every oracle this key may call
oracles[].namestringWhat you put in the ask URL
oracles[].descriptionstringOne line, safe to show a user
oracles[].formatsstring[]Every value format accepts, sorted
oracles[].default_formatstringUsed when you send no format
oracles[].drawable_formatsstring[]The formats POST /v1/figures/render can draw. An answer in any other format is source only
oracles[].viewsobjectFormat to the views you can ask for beside its answer, such as {"lookup": ["summary"]}. Empty for an oracle with none

Errors

401KEY_MISSINGKEY_UNKNOWNKEY_REVOKEDKEY_EXPIREDThe key is missing, unknown, revoked or expired — see Authentication
403ORG_DISABLEDThe key is fine and its organisation is not active — see Authentication

Every code, and what to do about it, is on Errors.

The request is generated from the API's OpenAPI document; the response and errors are held to real responses and to the Errors page.

Response

json
{
  "oracles": [
    {
      "name": "chart",
      "description": "Describe a chart in plain language and get back a chart specification that has been checked against versioned rules before you see it.",
      "formats": ["chartjs", "echarts", "gnuplot", "plotly", "vega-lite"],
      "default_format": "vega-lite",
      "drawable_formats": ["gnuplot", "vega-lite"],
      "views": {}
    },
    {
      "name": "vector-graphics",
      "description": "Describe a drawing in plain language and get back vector source that has been checked against versioned rules before you see it.",
      "formats": ["metapost", "pictex", "tikz"],
      "default_format": "tikz",
      "drawable_formats": ["metapost", "pictex", "tikz"],
      "views": {}
    },
    {
      "name": "coverage-policy",
      "description": "Ask a question about the Medicare knee replacement policy (LCD L36575) and get back the rules, conditions and statements that answer it as JSON, each with the policy passage it comes from, checked against versioned rules before you see it.",
      "formats": ["lookup"],
      "default_format": "lookup",
      "drawable_formats": [],
      "views": { "lookup": ["summary"] }
    }
  ]
}

Notes

Listing costs no credits.

drawable_formats are the formats Draw a figure can draw. An answer in any other format comes back as source only, so pick one of these when the result has to be looked at. It is empty for coverage-policy, whose answers are JSON documents.

views names, per format, what you can ask for beside an answer by sending views with the ask: today a summary of a coverage-policy lookup. It is empty for an oracle with none.

The response describes what you can ask for and what it costs — nothing about how an answer is produced. That part is ours, and it changes.

The catalogue is the contract. An oracle absent from this list is not available to your key and asking it answers 404; a format absent from formats is refused with 422 and the response names the ones that would work.

Read this at start-up rather than hardcoding names, and a new oracle becomes available to your integration without a deploy.

What you actually have

The console shows the same list for your organisation, with a playground for each oracle.