VarisDocs
Dashboard

varis.json reference

Every field in varis.json, the file that describes your project's services to Varis.

varis.json describes your project and its services. The CLI publishes what's in it, so it's the source of truth for your services.

If you use an SDK, varis build writes the services list for you, and varis init writes the other fields. If you don't, you write the whole file by hand.

You can commit varis.json to version control. It never contains a credential.

Example

varis.json
{
  "owner_id": "var_ownr_LOqdTCny9lP7CR",
  "base_url": "https://api.example.com",
  "test_base_url": "http://localhost:3000",
  "services": [
    {
      "slug": "convert-currency",
      "name": "Convert currency",
      "description": "Converts an amount from one currency to another at the current exchange rate.",
      "service_type": "data",
      "categories": ["finance", "forex"],
      "endpoint_url": "https://api.example.com/currency/convert",
      "method": "GET",
      "price_cents": 10,
      "version": "1.0.0",
      "status": "published",
      "input_schema": {
        "type": "object",
        "properties": {
          "from": { "type": "string" },
          "to": { "type": "string" },
          "amount": { "type": "number" }
        },
        "required": ["from", "to", "amount"]
      },
      "output_schema": {
        "type": "object",
        "properties": {
          "rate": { "type": "number" },
          "converted": { "type": "number" }
        },
        "required": ["rate", "converted"]
      }
    }
  ]
}

Project fields

FieldSet byDescription
owner_idvaris initThe owner your services belong to. It's an ID, not a secret.
base_urlvaris init --base-urlYour production address. Varis joins each service's path to it. Must use https.
test_base_urlvaris init --test-base-urlWhere varis test sends requests. It's never sent when you publish.
servicesvaris buildThe list of services to publish.

Service fields

FieldRequiredDescription
slugYesA permanent ID, unique within an owner. Lowercase letters, numbers, and single hyphens, up to 64 characters.
nameYesA readable name, up to 128 characters.
descriptionYesWhat the service does, in 20 to 1,024 characters.
instructionsNoHow agents should use the service, up to 2,000 characters.
service_typeYesOne of data, content, tool, skill, compute, memory, storage, model, or messaging.
categoriesYesOne or more categories from the list of categoriesAPI.
endpoint_urlYesThe full https address Varis calls. No query string or fragment.
methodNoGET or POST. The default is GET.
price_centsNoThe price per call in whole US cents. You receive all of it. The default is 0, which is free.
versionNoThe service's version. The default is 1.0.0.
statusNopublished or disabled. The default is published.
input_schemaNoA JSON Schema for the input. If you leave it out, the service takes no input. For a GET service, it must be a flat object.
output_schemaYesA JSON Schema for the output. Varis checks every response against it.

In code, you can set path instead of endpoint_url. varis build joins it to base_url and writes the full endpoint_url to varis.json.

Rules

  • Publishing is declarative. Varis sets each service to exactly what's in the file. A field you leave out goes back to its default.
  • Each slug is one service. Changing a slug publishes a new service. It doesn't rename the old one.
  • The file never holds a credential. Your sign-in lives on your machine. For more information, see varis login.

What's next