CData Audit API
The CData Cloud Audit API tracks system activities and administrative events, supporting compliance and security monitoring requirements such as SOC 2 and GDPR.
The CData Cloud Audit API tracks system activities and administrative events, supporting compliance and security monitoring requirements such as SOC 2 and GDPR.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/audit-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.1.0
info:
title: CData Connect AI REST API
version: v1
servers:
- url: https://cloud.cdata.com/api
description: Production base URL
paths:
/log/query/list:
post:
summary: List Query Log
tags:
- Log
operationId: listQueryLog
description: >
Retrieves a list of query logs for an account.
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/QuerySearchCriteria"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/QuerySearchResult"
example:
queries:
- credential: "prat8897@gmail.com"
duration: 308
drivers: "PostgreSQL"
errorCode: "QUERY_FAILED"
errorMessage: "The stored procedure execution failed with the following error:\r\n[500] Could not execute the specified command: Unknown stored function/procedure transferdata\r\n<Query ID: e1af1260-4045-45e4-882b-96fe2575e37b>"
logFileKey: "x41GvdkvWlJsaEdQrzI2+t7M+TSbimW8iJIfQPv9mK1PqurO1/pzPW3D2ObewKfK6w51T7ui8yecrEYV3JpW9WmsAU+yVv4Vke1D2lB8EeKsv3ab6w2ZXrNZxPBAgaKAZLoRf8zbuHGWDGSQQ9gDJg=="
logVerbosity: 1
query: "PostgreSQL1.public.transferdata"
queryId: "e1af1260-4045-45e4-882b-96fe2575e37b"
queryType: 203
rowsAffected: -1
rowsInput: 1
rowsReturned: 0
timestamp: "2024-03-19T18:55:34.837Z"
userAgent: "PostmanRuntime/7.37.0"
/log/query/get/{queryId}:
get:
summary: Get Query Log
tags:
- Log
operationId: getQueryLog
description: >
Download a query log file for troubleshooting.
parameters:
- name: queryId
in: path
required: true
description: The unique Id of the query for which to download the log file.
schema:
type: string
responses:
"200":
description: OK and the zipped log file.
/log/audit/list:
post:
summary: List Audit Log
tags:
- Log
operationId: listAuditLog
description: >
Retrieves a list of audit logs for an account.
parameters:
- name: startTime
in: query
description: 'Timestamp in UTC (ISO 8601 format). Example: "2025-08-18T00:00:00Z"'
schema:
type: string
format: date-time
- name: endTime
in: query
description: 'Timestamp in UTC (ISO 8601 format). Example: "2025-08-18T23:59:59Z"'
schema:
type: string
format: date-time
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/AuditSearchResult"
example:
events:
- eventType: 1003
timestamp: "2025-08-18T17:07:07.3673862Z"
targetId: "aaa96669-74c8-480f-a8c1-7956979cbee9"
targetName: "PostgreSQL1"
targetType: 1
userId: "6b8d5c25-cdc1-4b0c-b9f1-5b26647a8240"
userName: "User1"
userType: 0
- eventType: 1107
timestamp: "2025-08-13T21:20:08.4380865Z"
relatedId: "4780a367-2ba0-4b73-b086-b0d964323032"
relatedName: "Mcp"
relatedType: 4
targetId: "a41dd9b5-1ed6-54d9-b5e5-2754e4a29deb"
targetName: "test@cdata.com"
targetType: 2
userId: "a41dd9b5-1ed6-54d9-b5e5-2754e4a29deb"
userName: "User2"
userType: 0
/catalogs:
get:
tags:
- Metadata
summary: List Catalogs
description: >
This operation returns information about available catalogs. Catalogs are connections that the user has set up in their account.
parameters:
- name: workspace
description: "Restricts results to the specified workspace."
in: query
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/QueryResult"
example:
results:
- affectedRows: -1
schema:
- catalogName: CData
columnLabel: TABLE_CATALOG
columnName: TABLE_CATALOG
dataType: 5
dataTypeName: VARCHAR
length: 255
nullable: true
ordinal: 0
precision: 255
scale: 0
schemaName: QueryFederation
tableName: sys_catalogs
rows:
- - Salesforce1
/schemas:
get:
tags:
- Metadata
summary: List Schemas
description: >
This operation returns a list of schemas for a given catalog.
parameters:
- name: workspace
description: "Restricts results to the specified workspace."
in: query
schema:
type: string
- name: catalogName
description: "Restricts results to the specified catalog."
in: query
schema:
type: string
- name: schemaName
description: "Restricts results to the specified schema."
in: query
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/QueryResult"
/tables:
get:
tags:
- Metadata
summary: List Tables
description: >
This operation returns a list of tables and views for a given schema.
parameters:
- name: workspace
description: "Restricts results to the specified workspace."
in: query
schema:
type: string
- name: catalogName
description: "Restricts results to the specified catalog."
in: query
schema:
type: string
- name: schemaName
description: "Restricts results to the specified schema."
in: query
schema:
type: string
- name: tableName
description: "Restricts results to the specified table."
in: query
schema:
type: string
- name: tableType
description: "Restricts results to the specified table type(s)."
in: query
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/QueryResult"
/columns:
get:
tags:
- Metadata
summary: List Columns
description: >
This operation returns a list of columns for a given table or view.
parameters:
- name: workspace
description: "Restricts results to the specified workspace."
in: query
schema:
type: string
- name: catalogName
description: "Restricts results to the specified catalog."
in: query
schema:
type: string
- name: schemaName
description: "Restricts results to the specified schema."
in: query
schema:
type: string
- name: tableName
description: "Restricts results to the specified table."
in: query
schema:
type: string
- name: columnName
description: "Restricts results to the specified column."
in: query
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/QueryResult"
/primaryKeys:
get:
tags:
- Metadata
summary: List Primary Keys
description: >
This operation returns information about a table's primary keys.
parameters:
- name: workspace
description: "Restricts results to the specified workspace."
in: query
schema:
type: string
- name: catalogName
description: "Restricts results to the specified catalog."
in: query
schema:
type: string
- name: schemaName
description: "Restricts results to the specified schema."
in: query
schema:
type: string
- name: tableName
description: "Restricts results to the specified table."
in: query
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/QueryResult"
/importedKeys:
get:
tags:
- Metadata
summary: List Imported Keys
description: >
This operation returns information about primary keys referenced by a table's foreign keys.
parameters:
- name: workspace
description: "Restricts results to the specified workspace."
in: query
schema:
type: string
- name: catalogName
description: "Restricts results to the specified catalog."
in: query
schema:
type: string
- name: schemaName
description: "Restricts results to the specified schema."
in: query
schema:
type: string
- name: tableName
description: "Restricts results to the specified table."
in: query
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/QueryResult"
/exportedKeys:
get:
tags:
- Metadata
summary: List Exported Keys
description: >
This operation returns information about foreign keys referenced by a table's primary keys.
parameters:
- name: workspace
description: "Restricts results to the specified workspace."
in: query
schema:
type: string
- name: catalogName
description: "Restricts results to the specified catalog."
in: query
schema:
type: string
- name: schemaName
description: "Restricts results to the specified schema."
in: query
schema:
type: string
- name: tableName
description: "Restricts results to the specified table."
in: query
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/QueryResult"
/indexes:
get:
tags:
- Metadata
summary: List Indexes
description: >
This operation returns information about available indexes for a given table.
parameters:
- name: workspace
description: "Restricts results to the specified workspace."
in: query
schema:
type: string
- name: catalogName
description: "Restricts results to the specified catalog."
in: query
schema:
type: string
- name: schemaName
description: "Restricts results to the specified schema."
in: query
schema:
type: string
- name: tableName
description: "Restricts results to the specified table."
in: query
schema:
type: string
- name: indexName
description: "Restricts results to the specified index."
in: query
schema:
type: string
- name: unique
description: "If true, only return unique indexes. If false, only return non-unique indexes. The default value is to return all indexes."
in: query
schema:
type: boolean
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/QueryResult"
/procedures:
get:
tags:
- Metadata
summary: List Procedures
description: >
This operation returns information about available stored procedures for a given schema.
parameters:
- name: workspace
in: query
schema:
type: string
- name: catalogName
description: "Restricts results to the specified catalog."
in: query
schema:
type: string
- name: schemaName
description: "Restricts results to the specified schema."
in: query
schema:
type: string
- name: procedureName
description: "Restricts results to the specified procedure."
in: query
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/QueryResult"
/procedureParameters:
get:
tags:
- Metadata
summary: List Procedure Parameters
description: >
This operation returns information about a stored procedure's parameters.
parameters:
- name: workspace
description: "Restricts results to the specified workspace."
in: query
schema:
type: string
- name: catalogName
description: "Restricts results to the specified catalog."
in: query
schema:
type: string
- name: schemaName
description: "Restricts results to the specified schema."
in: query
schema:
type: string
- name: procedureName
description: "Restricts results to the specified procedure."
in: query
schema:
type: string
- name: paramName
description: "Restricts results to the specified procedure parameter."
in: query
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/QueryResult"
/query:
post:
tags:
- Query
summary: Execute Query
description: >
The query operation allows you to execute a SQL query against one or more data sources configured in your Connect AI account. SELECT, INSERT, UPDATE, DELETE, and EXEC statements are all supported (though the /exec operation should be preferred for the latter).
parameters:
- name: workspace
in: query
schema:
type: string
description: "If your query contains a workspace, the workspace name must be specified here."
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/QueryRequest"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/QueryResult"
/batch:
post:
tags:
- Query
summary: Execute Batch Query
description: >
The batch operation allows you to execute batch INSERTs, UPDATEs, and DELETEs against your data sources using a single request.
parameters:
- name: workspace
in: query
schema:
type: string
description: "If your query contains a workspace, the workspace name must be specified here."
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/BatchRequest"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/QueryResult"
/exec:
post:
tags:
- Query
summary: Execute Procedure
description: >
The execute operation allows you to execute stored procedures for any of the data sources configured in your Connect AI account.
parameters:
- name: workspace
in: query
schema:
type: string
description: "If your query contains a workspace, the workspace name must be specified here."
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/ExecRequest"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/QueryResult"
components:
schemas:
AuditEvent:
type: object
properties:
eventType:
$ref: "#/components/schemas/AuditEventType"
description: The audit event type, such as user login, user PAT created, or permission created.
timestamp:
type: string
format: date-time
description: The timestamp of the audit event.
relatedId:
type: string
nullable: true
description: The Id of the related entity, if applicable.
relatedName:
type: string
nullable: true
description: The name of the related entity, if applicable.
relatedType:
type: integer
format: int32
nullable: true
description: The type of the related entity, if applicable.
targetId:
type: string
nullable: true
description: The Id of the event target, such as the Query Id.
targetName:
type: string
nullable: true
description: The target resource name, such as a user's email or a connection name.
targetType:
type: integer
format: int32
nullable: true
description: The type of the event target, such as a query or connection change.
userId:
type: string
nullable: true
description: The Id of user who performed the event.
userName:
type: string
nullable: true
description: The name of user who performed the event.
userType:
type: integer
format: int32
nullable: true
description: The type of user who performed the event.
additionalProperties: false
AuditEventSearchCriteria:
type: object
properties:
endTime:
type: string
format: date-time
nullable: true
startTime:
type: string
format: date-time
nullable: true
additionalProperties: false
AuditEventType:
enum:
- 0
- 500
- 501
- 502
- 1000
- 1001
- 1002
- 1003
- 1004
- 1005
- 1050
- 1051
- 1052
- 1060
- 1061
- 1062
- 1063
- 1070
- 1071
- 1072
- 1073
- 1080
- 1081
- 1082
- 1083
- 1084
- 1085
- 1090
- 1091
- 1092
- 1093
- 1094
- 1100
- 1101
- 1102
- 1103
- 1105
- 1106
- 1107
- 1108
- 1109
- 1110
- 1111
- 1112
- 1113
- 1114
- 1115
- 1116
- 1200
- 1201
- 1202
- 1220
- 1221
- 1222
- 1223
- 1224
- 1230
- 1231
type: integer
format: int32
BatchRequest:
required:
- query
type: object
properties:
defaultCatalog:
type: string
nullable: true
defaultSchema:
type: string
nullable: true
parameters:
type: array
items:
type: object
additionalProperties:
$ref: "#/components/schemas/Parameter"
nullable: true
query:
description: "The SQL query to execute. Must be a valid SQL query."
minLength: 1
type: string
timeout:
maximum: 300
minimum: 1
type: integer
format: int32
additionalProperties: false
BillingStatus:
enum:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
type: integer
format: int32
ColumnInfo:
type: object
properties:
catalogName:
type: string
nullable: true
description: The name of the catalog containing the column.
columnLabel:
type: string
nullable: true
description: The label of the column.
columnName:
type: string
nullable: true
description: The name of the column.
dataType:
$ref: "#/components/schemas/DataType"
dataTypeName:
type: string
nullable: true
description: The data type name of the column.
length:
type: integer
format: int32
description: The length of the column.
nullable:
type: boolean
description: Whether the column is nullable.
ordinal:
type: integer
format: int32
description: The ordinal position of the column.
precision:
type: integer
format: int32
nullable: true
description: The precision of the column.
scale:
type: integer
format: int32
nullable: true
description: The scale of the column.
schemaName:
type: string
nullable: true
description: The name of the schema containing the column.
tableName:
type: string
nullable: true
description: The name of the table containing the column.
additionalProperties: false
DataType:
enum:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
type: integer
description: "The parameter's [data type](/en/API/REST-API#data-types)."
format: int32
Direction:
enum:
- 1
- 2
- 4
- 5
type: integer
format: int32
ErrorCode:
enum:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
type: integer
format: int32
ErrorDetail:
type: object
properties:
code:
$ref: "#/components/schemas/ErrorCode"
message:
type: string
nullable: true
description: The error message.
additionalProperties: false
ExecParameter:
type: object
properties:
direction:
$ref: "#/components/schemas/Direction"
dataType:
$ref: "#/components/schemas/DataType"
value:
nullable: true
additionalProperties: false
ExecRequest:
required:
- procedure
type: object
properties:
defaultCatalog:
type: string
nullable: true
defaultSchema:
type: string
nullable: true
parameters:
type: object
additionalProperties:
$ref: "#/components/schemas/ExecParameter"
nullable: true
procedure:
description: "The name of the stored procedure to execute. Must be a valid stored procedure name."
minLength: 1
type: string
timeout:
maximum: 300
minimum: 1
type: integer
format: int32
additionalProperties: false
Parameter:
type: object
properties:
dataType:
$ref: "#/components/schemas/DataType"
value:
nullable: true
additionalProperties: false
QueryRecord:
type: object
properties:
credential:
type: string
nullable: true
description: The user's credential used to execute the query.
duration:
type: integer
format: int64
description: The duration of the query in milliseconds.
drivers:
type: string
nullable: true
description: The driver used to execute the query.
errorCode:
type: string
nullable: true
description: In the case of an error, the error code.
errorMessage:
type: string
nullable: true
description: The error message of the query, if applicable.
logVerbosity:
type: integer
format: int32
nullable: true
description: The verbosity level of the query log.
query:
type: string
nullable: true
description: The contents of the query.
queryId:
type: string
format: uuid
description: The unique Id of the query.
queryType:
$ref: "#/components/schemas/QueryType"
description: The type of query.
rowsAffected:
type: integer
format: int64
description: The number of rows affected by the query.
rowsReturned:
type: integer
format: int64
description: The number of rows returned by the query as a result set.
timestamp:
type: string
format: date-time
description: The timestamp of the query.
userAgent:
type: string
nullable: true
description: The user agent used to execute the query.
additionalProperties: false
QueryRequest:
required:
- query
type: object
properties:
defaultCatalog:
type: string
nullable: true
description: "The default catalog to use for the query if none is specified in the query itself."
defaultSchema:
type: string
nullable: true
description: "The default schema to use for the query if none is specified in the query itself."
parameters:
type: object
additionalProperties:
$ref: "#/components/schemas/Parameter"
nullable: true
query:
description: "The SQL query to execute. Must be a valid SQL query."
minLength: 1
type: string
schemaOnly:
type: boolean
description: "If true, only the schema of the result set is returned without any data rows. The default value is false."
timeout:
maximum: 300
minimum: 1
type: integer
format: int32
additionalProperties: false
QueryResult:
type: object
properties:
results:
type: array
items:
$ref: "#/components/schemas/ResultSet"
nullable: true
error:
$ref: "#/components/schemas/ErrorDetail"
additionalProperties: false
QuerySearchCriteria:
type: object
properties:
endTime:
type: string
format: date-time
nullable: true
description: The end time of the query.
queryType:
type: array
items:
$ref: "#/components/schemas/QueryType"
nullable: true
default: 2
description: The type of query.
startTime:
type: string
format: date-time
nullable: true
description: The start time of the query.
additionalProperties: false
QuerySearchResult:
type: object
properties:
queries:
type: array
items:
$ref: "#/components/schemas/QueryRecord"
nullable: true
additionalProperties: false
AuditSearchResult:
type: object
properties:
events:
type: array
items:
$ref: "#/components/schemas/AuditEvent"
nullable: true
additionalProperties: false
QueryType:
enum:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 20
- 100
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 108
- 109
- 200
- 201
- 202
- 203
- 204
- 205
- 210
- 211
- 212
- 220
- 230
- 231
- 232
type: integer
format: int32
description: |
| Value | Name |
|-------|------|
| 0 | Drivers |
| 1 | DriverInfo |
| 2 | TestConnection |
| 3 | GetOAuthAuthorizationUrl |
| 4 | GetOAuthAccessToken |
| 5 | CustomReportInfo |
| 6 | GenerateCustomReport |
| 7 | GetAPIRootPaths |
| 8 | GetAPIColumns |
| 9 | GetAPIRows |
| 10 | GetTimeCheckColumns |
| 11 | GetDynamicPropValues |
| 20 | DisconnectOAuthAccessToken |
| 100 | Catalogs |
| 101 | Schemas |
| 102 | Tables |
| 103 | Columns |
| 104 | PrimaryKeys |
| 105 | ImportedKeys |
| 106 | ExportedKeys |
| 107 | Procedures |
| 108 | ProcedureParameters |
| 109 | Indexes |
| 200 | Query |
| 201 | QuerySchemaOnly |
| 202 | Batch |
| 203 | Exec |
| 204 | Caching |
| 205 | ScheduledQuery |
| 210 | ODataServiceDocument |
| 211 | ODataMetadata |
| 212 | ODataQuery |
| 220 | OpenAPIDocument |
| 230 | CreateDerivedView |
| 231 | AlterDerivedView |
| 232 | DropDerivedView |
QueryUserInfo:
type: object
properties:
accountName:
type: string
nullable: true
email:
type: string
nullable: true
firstName:
type: string
nullable: true
lastName:
type: string
nullable: true
usage:
$ref: "#/components/schemas/QueryUserUsageLimits"
additionalProperties: false
QueryUserUsageLimits:
type: object
properties:
connectionsOverLimit:
type: boolean
dataSourcesOverLimit:
type: boolean
usersOverLimit:
type: boolean
isSpreadsheetsPlan:
type: boolean
bill
# --- truncated at 32 KB (34 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/cdata/refs/heads/main/openapi/cdata-rest-api-openapi.yml