openapi: 3.1.0 info: title: Caspio REST API description: | The Caspio Bridge REST API (v3) provides programmatic access to tables, views, records, files, users, applications, and tasks in a Caspio account. The base URL is account-specific (per-tenant integration URL) and authentication uses an OAuth 2.0 client credentials flow to obtain a bearer access token. This best-effort OpenAPI is derived from the public help documentation at https://howto.caspio.com/web-services-api/rest-api/ and the demo Swagger at https://demo.caspio.com/integrations/rest/swagger. version: "3.0.0" contact: name: Caspio url: https://www.caspio.com/ servers: - url: https://{account}.caspio.com/rest/v3 description: Per-account Caspio Bridge REST endpoint variables: account: default: demo description: Caspio account subdomain security: - bearerAuth: [] tags: - name: Authentication description: OAuth 2.0 token endpoint - name: Tables description: Table schema and record operations - name: Views description: View record operations - name: Files description: File management - name: Users description: Application user management - name: Applications description: Caspio applications - name: Tasks description: Scheduled tasks paths: /oauth/token: post: tags: [Authentication] summary: Obtain an OAuth 2.0 access token (client credentials) operationId: getAccessToken security: [] requestBody: required: true content: application/x-www-form-urlencoded: schema: type: object required: [grant_type, client_id, client_secret] properties: grant_type: type: string enum: [client_credentials] client_id: type: string client_secret: type: string responses: '200': description: Access token response content: application/json: schema: type: object properties: access_token: type: string token_type: type: string example: bearer expires_in: type: integer /tables: get: tags: [Tables] summary: List all tables in the account operationId: listTables responses: '200': description: A list of table names content: application/json: schema: type: object properties: Result: type: array items: type: string /tables/{tableName}: get: tags: [Tables] summary: Get a table's metadata operationId: getTable parameters: - $ref: '#/components/parameters/TableName' responses: '200': description: Table metadata /tables/{tableName}/fields: get: tags: [Tables] summary: List fields (columns) for a table operationId: listTableFields parameters: - $ref: '#/components/parameters/TableName' responses: '200': description: Field definitions /tables/{tableName}/records: get: tags: [Tables] summary: Query table records operationId: queryTableRecords parameters: - $ref: '#/components/parameters/TableName' - in: query name: q.select schema: type: string - in: query name: q.where schema: type: string - in: query name: q.orderBy schema: type: string - in: query name: q.groupBy schema: type: string - in: query name: q.limit schema: type: integer - in: query name: q.pageNumber schema: type: integer - in: query name: q.pageSize schema: type: integer responses: '200': description: Records page content: application/json: schema: $ref: '#/components/schemas/RecordsPage' post: tags: [Tables] summary: Insert one record into a table operationId: insertTableRecord parameters: - $ref: '#/components/parameters/TableName' - in: query name: response schema: type: string enum: [rows] requestBody: required: true content: application/json: schema: type: object responses: '201': description: Record created put: tags: [Tables] summary: Update table records matching a where clause operationId: updateTableRecords parameters: - $ref: '#/components/parameters/TableName' - in: query name: q.where required: true schema: type: string requestBody: required: true content: application/json: schema: type: object responses: '200': description: Records updated delete: tags: [Tables] summary: Delete table records matching a where clause operationId: deleteTableRecords parameters: - $ref: '#/components/parameters/TableName' - in: query name: q.where required: true schema: type: string responses: '200': description: Records deleted /views: get: tags: [Views] summary: List all views in the account operationId: listViews responses: '200': description: View names /views/{viewName}/records: get: tags: [Views] summary: Query view records operationId: queryViewRecords parameters: - in: path name: viewName required: true schema: type: string - in: query name: q.where schema: type: string - in: query name: q.limit schema: type: integer responses: '200': description: Records page content: application/json: schema: $ref: '#/components/schemas/RecordsPage' /files: get: tags: [Files] summary: List files in the account file structure operationId: listFiles parameters: - in: query name: filePath schema: type: string responses: '200': description: File and folder list put: tags: [Files] summary: Upload a file to the account file structure operationId: uploadFile requestBody: content: multipart/form-data: schema: type: object properties: File: type: string format: binary responses: '200': description: Upload result /files/{externalKey}: get: tags: [Files] summary: Download a file by its external key operationId: downloadFile parameters: - in: path name: externalKey required: true schema: type: string responses: '200': description: File content content: application/octet-stream: schema: type: string format: binary delete: tags: [Files] summary: Delete a file operationId: deleteFile parameters: - in: path name: externalKey required: true schema: type: string responses: '200': description: File deleted /users: get: tags: [Users] summary: List application users operationId: listUsers responses: '200': description: User list post: tags: [Users] summary: Create a new application user operationId: createUser requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/User' responses: '201': description: User created /users/{username}: get: tags: [Users] summary: Get a single application user operationId: getUser parameters: - in: path name: username required: true schema: type: string responses: '200': description: User put: tags: [Users] summary: Update a user operationId: updateUser parameters: - in: path name: username required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/User' responses: '200': description: User updated delete: tags: [Users] summary: Delete a user operationId: deleteUser parameters: - in: path name: username required: true schema: type: string responses: '200': description: User deleted /applications: get: tags: [Applications] summary: List Caspio applications operationId: listApplications responses: '200': description: Application list /tasks: get: tags: [Tasks] summary: List scheduled tasks operationId: listTasks responses: '200': description: Task list /tasks/{taskName}/run: post: tags: [Tasks] summary: Run a scheduled task on demand operationId: runTask parameters: - in: path name: taskName required: true schema: type: string responses: '200': description: Task run accepted components: parameters: TableName: in: path name: tableName required: true schema: type: string securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT schemas: RecordsPage: type: object properties: Result: type: array items: type: object User: type: object properties: Username: type: string Password: type: string Email: type: string Role: type: string