{
 "openapi": "3.1.0",
 "info": {
  "title": "API Call Log (Platform)",
  "version": "20261030b",
  "description": "Every call to the published API, allowed or refused, with the reason for each refusal. A call that came with no key, or a key nobody issued, is logged refused with the Client column empty: that includes anyone probing the address and an AI app's first call before it has signed in. To see how your own integrations are doing, filter on Client. This is not the audit log — that records what the record actually did, because a published call goes through the ordinary route and the ordinary route audits itself. This records what was asked, from where, and by which key."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "api-calls": {
    "type": "object",
    "required": [],
    "properties": {
     "id": {
      "type": "string",
      "format": "decimal",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "client_id": {
      "type": "string",
      "format": "uuid",
      "description": "Client id",
      "readOnly": true
     },
     "exposure_id": {
      "type": "string",
      "format": "uuid",
      "description": "Exposure id",
      "readOnly": true
     },
     "at": {
      "type": "string",
      "format": "date-time",
      "description": "At",
      "readOnly": true
     },
     "protocol": {
      "type": "string",
      "description": "Protocol",
      "readOnly": true
     },
     "method": {
      "type": "string",
      "description": "Method",
      "readOnly": true
     },
     "path": {
      "type": "string",
      "description": "Path",
      "readOnly": true
     },
     "tool_name": {
      "type": "string",
      "description": "Tool name",
      "readOnly": true
     },
     "module_key": {
      "type": "string",
      "description": "Module key",
      "readOnly": true
     },
     "resource_key": {
      "type": "string",
      "description": "Resource key",
      "readOnly": true
     },
     "status": {
      "type": "integer",
      "description": "Status",
      "readOnly": true
     },
     "outcome": {
      "type": "string",
      "description": "Outcome",
      "readOnly": true
     },
     "refusal": {
      "type": "string",
      "description": "Refusal",
      "readOnly": true
     },
     "row_count": {
      "type": "integer",
      "description": "Row count",
      "readOnly": true
     },
     "duration_ms": {
      "type": "integer",
      "description": "Duration ms",
      "readOnly": true
     },
     "remote_ip": {
      "type": "string",
      "description": "Remote ip",
      "readOnly": true
     },
     "origin": {
      "type": "string",
      "description": "Origin",
      "readOnly": true
     },
     "user_agent": {
      "type": "string",
      "description": "User agent",
      "readOnly": true
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "created_by": {
      "type": "string",
      "format": "uuid",
      "description": "Created by",
      "readOnly": true
     },
     "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Updated at",
      "readOnly": true
     },
     "updated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Updated by",
      "readOnly": true
     },
     "xf_text_1": {
      "type": "string",
      "description": "Xf text 1",
      "readOnly": true
     },
     "xf_text_2": {
      "type": "string",
      "description": "Xf text 2",
      "readOnly": true
     },
     "xf_text_3": {
      "type": "string",
      "description": "Xf text 3",
      "readOnly": true
     },
     "xf_text_4": {
      "type": "string",
      "description": "Xf text 4",
      "readOnly": true
     },
     "xf_text_5": {
      "type": "string",
      "description": "Xf text 5",
      "readOnly": true
     },
     "xf_num_1": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 1",
      "readOnly": true
     },
     "xf_num_2": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 2",
      "readOnly": true
     },
     "xf_num_3": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 3",
      "readOnly": true
     },
     "xf_date_1": {
      "type": "string",
      "format": "date",
      "description": "Xf date 1",
      "readOnly": true
     },
     "xf_date_2": {
      "type": "string",
      "format": "date",
      "description": "Xf date 2",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/platform/api-calls": {
   "get": {
    "summary": "list api-calls",
    "operationId": "list_api_calls_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post api call log",
    "operationId": "action_api_calls_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/platform/api-calls/{id}": {
   "get": {
    "summary": "get api-calls",
    "operationId": "get_api_calls_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "Put api call log",
    "operationId": "action_api_calls_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete api call log",
    "operationId": "action_api_calls_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/platform/api-calls/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_api_calls_0_6",
    "description": "Body keys: overrides, preview, withLines",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}