Skip to content

ffl_core.api.connector

Source: apps/ffl_core/ffl_core/api/connector.py · 2 endpoint(s)

Generated by make api-docs — do not edit by hand.

connector_identity

GET /api/method/ffl_core.api.connector.connector_identity

Auth (derived from code): Any authenticated user — no explicit role gate at function entry (deliberate open reads document this in Permissions).

Who this bearer token belongs to, and whether it was issued to a connector.

arg type required default description
surface string | null no None "cpa", "full" or "web_ro" — the connector asking.

Returns: {user, full_name, client_id, client_name, connector, enabled, web_access, expires_at} — connector is true only for a client created by dynamic registration; enabled says whether that surface is switched on (answered, not refused: a switched-off server must not look like a bad token, or clients would loop on sign-in); web_access is the user's level on a website surface ("manager", "viewer" or "", by role alone; always "" for cpa and full); expires_at is the token's expiry as a Unix timestamp.

apps/ffl_core/ffl_core/api/connector.py:101

log_connector_call

POST /api/method/ffl_core.api.connector.log_connector_call

Auth (derived from code): Any authenticated user — no explicit role gate at function entry (deliberate open reads document this in Permissions).

Record one connector tool call in Connector Audit Log.

Called before the tool runs (phase "started" — the connector refuses to run the tool if this fails, so nothing happens unrecorded) and once after it (phase "ok" / "failed", with the log name returned by the first call). A row moves from Started to its outcome exactly once; it cannot be rewritten. On the website surface a call refused here (switch off, no website role) is still recorded, as Failed with the reason, before the refusal.

arg type required default description
tool string yes — Tool name.
surface string yes — "cpa", "full" or "web_ro".
phase string no 'started' "started", "ok" or "failed".
arguments string | null no None The tool arguments as JSON; secret-looking keys are masked.
log string | null no None The Connector Audit Log returned by the "started" call (for "ok"/"failed").
error string | null no None The error text, for "failed".

Returns: {log} — the Connector Audit Log name.

apps/ffl_core/ffl_core/api/connector.py:130