Log API


Log API


List Account Logs

Get a list of account logs for an account.

Request

POST https://cloud.cdata.com/api/log/query/list

Query Parameters

Name Description
queryType (Optional) Query type.
startTime Timestamp in UTC.
endTime Timestamp in UTC.

Response

{
"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"
        },
    ]
}

Fields

Name Description
credential User credential.
duration The duration of the query.
drivers The driver used for the query.
errorCode In the case of an error, the error code.
errorMessage The error message, if applicable.
logVerbosity The verbosity of the log.
query The contents of the query.
queryId The unique identifier for the query.
queryType The query type.
rowsReturned The number of rows returned by the query.
timestamp Timestamp of the query.

Download Query Logs

Download a query log for a Powered by CData child account for troubleshooting.

Request

GET https://cloud.cdata.com/api/log/query/get/{queryId}

Path Parameters

Name Description
queryId The query for which the logs need to be downloaded.

Response

HTTP 200 OK and the zipped log file.