Skip to main content

Sources: APIs & integrations

The station's tools: the tenant's APIs. Convoy keeps no catalogue: the station shows what its skills' invoke return, at the tenant, at each call.

The APIs​

apis:
- name: cuisine
openapi_url: https://api.teranga.example.sn/openapi.json
base_url: https://api.teranga.example.sn
auth: {type: api_key, key_name: X-API-Key, key_location: header, key_env: TERANGA_KEY}
operations:
- {id: getMenu, access: read}
- {id: getDeliveryOptions, access: read}
- {id: checkDeliverable, access: read}
- {id: getDeliveryPrice, access: read}
- {id: placeOrder, access: write}
- {id: createDelivery, access: write, reversible: false}
- {id: deleteCustomer, access: write, exposed: false}
  • operations is an allowlist. An operation that is not in it cannot be reached, even if the OpenAPI describes it. The list is required and never empty. Do not list a write that nothing uses, except as exposed: false to document it.
attributeeffect
idthe OpenAPI operationId. The same operation declared twice is refused.
accessrequired. read changes nothing at the tenant and runs at once. write changes something and is reserved: only a submit, the submit guard (submit_guard.validate) or the sign-in (to send and check a code) calls it. Declared, never guessed from the HTTP verb: a search is often a POST.
reversibleon a write only: the operation of the same API that undoes it, or false. false on an operation a submit calls: the MCP door announces the submit as destructive, and the call runs after the others (Execution). Nothing calls the undoing operation yet.
exposed: falselisted, checked against the OpenAPI at provisioning, but never reachable. Naming it elsewhere is refused.
  • Core refuses the contradictions at load. A write called at once (by a skill's invoke, a check or update guard) would change the tenant's record with no submit and no person to confirm. A submit that goes through a read files nothing, and the receipt would say otherwise.
  • The key never appears in the file. key_env names an environment variable. The model does not see it and does not send it: so it cannot widen what the key allows. Every parameter Core fills itself (the key's name, Authorization for bearer and basic, the header of the signed-in person's token) is removed from the operation's schema: no call owes it (What the operation requires).
  • Where the key lives. You give its value once to Convoy, outside the config, with the hosts it is allowed to go to: every base_url that receives it must be on one of them. Only this station's servers receive it; the value is never in a response, the journal or the logs. A variable named without a value, a value nothing reads, a base_url on another host, a known production key (sk_live_, rk_live_): the publish is refused, and nothing starts (Your APIs' keys). Public stations run on test accounts (Product stations).
  • Your API's address. base_url and openapi_url name your API by its public address (a domain name), or by a private address the platform's operator admits. A local or private address, or the name of a machine of the Convoy platform (another station, its services), is refused at the check and at publication, naming the API.
  • A vendor's spec. openapi_url may be a vendor's official spec, pinned to a version, even one of several megabytes: Core keeps only the declared operations, each inlined as deep as its size allows; past that, a referenced schema becomes an open object. An operationId is named as the spec writes it, / and spaces included (repos/get). An operation that takes only a form (application/x-www-form-urlencoded, as at Stripe) is sent a form; every other one, JSON.
  • Separate reads and writes into two entries when the tenant has two keys, or simply so that the boundary shows in the config:
apis:
- name: rh-lecture
operations:
- {id: getTimesheets, access: read}
- {id: getOvertimeReport, access: read}
auth: {type: api_key, key_name: X-RH-Key, key_location: header, key_env: RH_READ_KEY}
# …
- name: rh-ecriture
operations:
- {id: approveTimesheets, access: write}
auth: {type: api_key, key_name: X-RH-Key, key_location: header, key_env: RH_WRITE_KEY}
# …
One identity per key

Today, an API's key is the station's key: everyone talks to the tenant under the same identity. Two managers using the same station are, for the HR tool, the same manager. Per-person identity comes with the target version (on_behalf_of: identity).

What it looks like​

Terre & Table. A customer asks for fruit and vegetables. The customer's agent calls searchProducts, an operation of the grocery's API declared as a read: the names, prices and photos come from that API, nothing is invented.

apis:
- name: catalogue
openapi_url: "https://…/openapi.json"
operations:
- {id: searchProducts, access: read}
- {id: getDeliveryWindows, access: read}
auth: {type: none}