tollara.ai

Sync vs async invocation

The gateway supports both synchronous and asynchronous invocation of service endpoints.

Synchronous

The client sends a request to the gateway; the gateway forwards it to your backend and waits for the response. The response from your backend is returned to the client. Use this when the work completes quickly (e.g. within request timeout limits).

Path: /api/service/{serviceId}/endpoint/{endpointId}/invoke (method matches the client: GET, POST, PUT, DELETE, etc.).

Asynchronous

The client sends a request to the gateway using GET | POST | PUT | DELETE /api/service/{serviceId}/endpoint/{endpointId}/invoke/async (or your deployment's equivalent prefix). The gateway may return immediately with a requestId, progressUrl, and callbackUrl. The caller polls progressUrl for status, while your backend processes the job and:

  • Optionally POSTs progress updates to the usage progress endpoint for that request
  • POSTs completion (status, result, units used) to callbackUrl

All outbound calls (progress, completion) must be signed with HMAC using the service secret. See Usage API and SDK overview for exact request bodies, URLs, and signing rules.