# Table of Contents - [RunReveal Docs](#runreveal-docs) - [Email Protection | Cloudflare](#email-protection-cloudflare) - [404: This page could not be found](#404-this-page-could-not-be-found) --- # RunReveal Docs [Reference](https://docs.runreveal.com/reference "Reference") Logs API Logs API ======== Authentication[](https://docs.runreveal.com/reference/logs-api#authentication) ------------------------------------------------------------------------------- Authentication is done via basic auth with your API token. Get your token by clicking “New API Token” on the page: [https://app.runreveal.com/dash/workspace/api-tokens](https://app.runreveal.com/dash/workspace/api-tokens) . e.g. with cURL, set the authorization header like so: `$ curl -H 'Authorization: Basic ' https://api.runreveal.com/...` Logs Query Endpoint[](https://docs.runreveal.com/reference/logs-api#logs-query-endpoint) ----------------------------------------------------------------------------------------- https://api.runreveal.com/logs/query/v2 The first endpoint is the query endpoint where you can submit queries of any format. Currently the supported formats are: pql, sql, or natural language. Set the `useAI` and `usePQL` flags to query using natural language and PQL, respectively. The arguments are mutually exclusive, and setting both is invalid but if useAI is set, it will take precedence. The query will be converted into the corresponding SQL before being submitted to the database backend. This endpoint will kick off the query and return up to `limit` results. The query will continue running in the background. Here’s a full example using cURL: curl 'https://api.runreveal.com/logs/query/v2?workspaceid=' \ -H 'authorization: Basic ' \ -H 'content-type: application/json' \ --data-raw '{"query":"SELECT receivedAt, workspaceID, sourceType, id, eventName FROM runreveal.logs LIMIT 2;","useAI":false,"usePQL":false,"source":"ui-query","parameters":{"a":"b"},"limit":1000}' { "success": true, "result": { "queryID": "2e2GQkLQiZNUyDIZXnvGHssbRIH", "canceled": false, "query": "SELECT receivedAt, workspaceID, sourceType, id, eventName FROM runreveal.logs LIMIT 2;", "aiText": "", "pqlText": "", "parameters": { "a": "b" }, "error": "", "resultCount": 2, "totalResults": 2, "startedAt": "2024-03-22T08:14:05.958701794Z", "runTime": "38.836527ms", "runTimeMs": 38, "limit": 0, "offset": 0, "columns": [\ "receivedAt",\ "workspaceID",\ "sourceType",\ "id",\ "eventName"\ ], "columnTypes": [\ "DateTime",\ "String",\ "LowCardinality(String)",\ "String",\ "String"\ ], "rows": [\ [\ "2024-02-08T23:18:45Z",\ "",\ "gcplogs",\ "2c6a8tdYFRWa7oqVudOrGTIP3B7",\ "google.identity.oauth2.GetTokenInfo"\ ],\ [\ "2024-02-08T23:18:55Z",\ "",\ "gcplogs",\ "2c6aA74bB5VCJVesecPRD9cv2ul",\ "google.identity.oauth2.GetTokenInfo"\ ]\ ] } } Results Endpoint[](https://docs.runreveal.com/reference/logs-api#results-endpoint) ----------------------------------------------------------------------------------- If the query has completed, you can query it using the results endpoint. You can pass in a limit and offset parameter to page through the results. The queryID is used to load the results, and is returned upon querying using the above endpoint. If the query has not yet completed, totalResults will be `-1`. curl 'https://api.runreveal.com/logs/query/v2/results?workspaceid=' \ -H 'authorization: Basic ' \ -H 'content-type: application/json' \ --data-raw '{"queryID":"2e2GQkLQiZNUyDIZXnvGHssbRIH","limit":50,"offset":0}' { "success": true, "result": { "queryID": "2e2GQkLQiZNUyDIZXnvGHssbRIH", "canceled": false, "query": "SELECT receivedAt, workspaceID, sourceType, id, eventName FROM runreveal.logs LIMIT 2;", "aiText": "", "pqlText": "", "parameters": { "a": "b" }, "error": "", "resultCount": 2, "totalResults": 2, "startedAt": "2024-03-22T08:14:05.958702Z", "runTime": "38.836527ms", "runTimeMs": 38, "limit": 50, "offset": 0, "columns": [\ "receivedAt",\ "workspaceID",\ "sourceType",\ "id",\ "eventName"\ ], "columnTypes": [\ "DateTime",\ "String",\ "LowCardinality(String)",\ "String",\ "String"\ ], "rows": [\ [\ "2024-02-08T23:18:45Z",\ "2KUOdhvRReF5RZfQX8ILneT4fSd",\ "gcplogs",\ "2c6a8tdYFRWa7oqVudOrGTIP3B7",\ "google.identity.oauth2.GetTokenInfo"\ ],\ [\ "2024-02-08T23:18:55Z",\ "2KUOdhvRReF5RZfQX8ILneT4fSd",\ "gcplogs",\ "2c6aA74bB5VCJVesecPRD9cv2ul",\ "google.identity.oauth2.GetTokenInfo"\ ]\ ] } } Cancellation Endpoint[](https://docs.runreveal.com/reference/logs-api#cancellation-endpoint) --------------------------------------------------------------------------------------------- This cancels an inflight query given by the queryID. curl 'https://api.runreveal.com/logs/query/v2/cancel?workspaceid=&queryID=' \ -H 'authorization: Basic ' { "success": true } [Reference](https://docs.runreveal.com/reference "Reference") [Using the CLI](https://docs.runreveal.com/reference/using-the-cli "Using the CLI") --- # Email Protection | Cloudflare Please enable cookies. Email Protection ================ You are unable to access this email address runreveal.com --------------------------------------------------------- The website from which you got to this page is protected by Cloudflare. Email addresses on that page have been hidden in order to keep them from being accessed by malicious bots. **You must enable Javascript in your browser in order to decode the e-mail address**. If you have a website and are interested in protecting it in a similar way, you can [sign up for Cloudflare](https://www.cloudflare.com/sign-up?utm_source=email_protection) . * [How does Cloudflare protect email addresses on website from spammers?](https://developers.cloudflare.com/waf/tools/scrape-shield/email-address-obfuscation/) * [Can I sign up for Cloudflare?](https://developers.cloudflare.com/fundamentals/setup/account/create-account/) Cloudflare Ray ID: **9715fb766bb0e615** • Your IP: Click to reveal 54.237.218.47 • Performance & security by [Cloudflare](https://www.cloudflare.com/5xx-error-landing) --- # 404: This page could not be found 404 === This page could not be found. ----------------------------- ---