All API resources
API reference

Extensions

Outbound requests made through an extension's connections, with the credential attached server-side.

Base URL https://app.prosaic.works/api/public/v1. Every request needs an API key or access token; see the overview.

Make an outbound request through an extension connection

POST/api/public/v1/extensions/{extensionId}/http

SDK: prosaic.extensions.request(extensionId, params)

Performs one guarded HTTP request to a third party on behalf of an extension. The credential for the named connection is attached server-side — the caller never supplies or receives it.

Requires a token minted for the extension named in the path. API keys and ordinary user tokens are rejected.

Requires an extension-scoped token whose ext_id matches extensionId. Ordinary API keys and user OAuth tokens cannot call this endpoint. The embedded status/ok describe the upstream response, which can fail inside HTTP 200.

Path parameters

  • extensionIdstringrequired

Request body

application/json

  • connectionstringrequired
  • pathstringrequired
  • methodstring
  • headersobject
  • bodyany
  • timeoutMsnumber
  • entityIdstring

Responses

200 Successful response

  • statusnumberrequired
  • okbooleanrequired
  • headersobjectrequired
  • bodyanyrequired
  • 403 The token is not for this extension, or the host is not allowed
  • 409 The connection is not connected
Node SDK
const result = await prosaic.extensions.request(extensionId, {
  connection: 'string',
  path: 'string',
});
curl
curl -X POST https://app.prosaic.works/api/public/v1/extensions/$EXTENSION_ID/http \
  -H "Authorization: Bearer $PROSAIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connection": "string",
    "path": "string"
  }'