@@ -33,7 +33,7 @@ you can still use it to pass a security context.
3333
3434### <--{"id" : " Prerequisites" }--> Example request
3535
36- ``` bash
36+ ``` bash{promptUser: user}
3737curl -H "Authorization: EXAMPLE-API-TOKEN" https://example.com/cubejs-api/v1/sql
3838```
3939
@@ -129,13 +129,13 @@ Response
129129
130130Example request:
131131
132- ``` bash
132+ ``` bash{outputLines: 1,3-9,11-15}
133133# Request with http method GET
134134curl \
135- -H " Authorization: EXAMPLE-API-TOKEN" \
136- -G \
137- --data-urlencode ' query={"measures":["Users.count"]}' \
138- http://localhost:4000/cubejs-api/v1/load
135+ -H "Authorization: EXAMPLE-API-TOKEN" \
136+ -G \
137+ --data-urlencode 'query={"measures":["Users.count"]}' \
138+ http://localhost:4000/cubejs-api/v1/load
139139
140140# Request with http method POST
141141# Use POST to fix problem with query length limits
@@ -208,13 +208,13 @@ Response
208208
209209Example request:
210210
211- ``` bash
211+ ``` bash{outputLines: 2-6}
212212curl \
213- -H " Authorization: EXAMPLE-API-TOKEN" \
214- -G \
215- --data-urlencode ' query={"measures":["Users.count"],
216- "timeDimensions":[{"dimension": "Users.createdAt","granularity":"day","dateRange":["2019-03-01","2019-03-31"]}]}' \
217- http://localhost:4000/cubejs-api/v1/sql
213+ -H "Authorization: EXAMPLE-API-TOKEN" \
214+ -G \
215+ --data-urlencode 'query={"measures":["Users.count"],
216+ "timeDimensions":[{"dimension": "Users.createdAt","granularity":"day","dateRange":["2019-03-01","2019-03-31"]}]}' \
217+ http://localhost:4000/cubejs-api/v1/sql
218218```
219219
220220Example response:
@@ -268,11 +268,11 @@ Response
268268
269269Example request:
270270
271- ``` bash
271+ ``` bash{outputLines: 2-4}
272272curl \
273- -H " Authorization: EXAMPLE-API-TOKEN" \
274- -G \
275- http://localhost:4000/cubejs-api/v1/meta
273+ -H "Authorization: EXAMPLE-API-TOKEN" \
274+ -G \
275+ http://localhost:4000/cubejs-api/v1/meta
276276```
277277
278278Example response:
@@ -335,12 +335,12 @@ Empty object response if scheduled successfully.
335335
336336Example request:
337337
338- ``` bash
338+ ``` bash{outputLines: 2-5}
339339curl \
340- -H " Authorization: EXAMPLE-API-TOKEN" \
341- -G \
342- --data-urlencode ' queryingOptions={"timezone":"UTC"}' \
343- http://localhost:4000/cubejs-api/v1/run-scheduled-refresh
340+ -H "Authorization: EXAMPLE-API-TOKEN" \
341+ -G \
342+ --data-urlencode 'queryingOptions={"timezone":"UTC"}' \
343+ http://localhost:4000/cubejs-api/v1/run-scheduled-refresh
344344```
345345
346346### <--{"id" : " API Reference" }--> /cubejs-system/v1/pre-aggregations/jobs
@@ -364,12 +364,12 @@ job.
364364
365365Example request:
366366
367- ``` bash
367+ ``` bash{outputLines: 2-5}
368368curl \
369- -d ' {"action": "post", "selector": { "preAggregations": ["Orders.ordersByStatus"]}}' \
370- -H " Authorization: EXAMPLE-API-TOKEN" \
371- -X POST \
372- https://localhost:4000/cubejs-system/v1/pre-aggregations/jobs
369+ -d '{"action": "post", "selector": { "preAggregations": ["Orders.ordersByStatus"]}}' \
370+ -H "Authorization: EXAMPLE-API-TOKEN" \
371+ -X POST \
372+ https://localhost:4000/cubejs-system/v1/pre-aggregations/jobs
373373```
374374
375375Example response:
@@ -396,12 +396,12 @@ a `tokens` property.
396396
397397Example request:
398398
399- ``` bash
399+ ``` bash{outputLines: 2-5}
400400curl \
401- -d ' {"action": "get", "tokens": ["e9a6a0c55885cea5371348500ce7d7dc","d1329b6c8d152e734fc4dcf7307b1b58","6f4ea38373663fffc4334a576574845b","ea903b10634b2f3141b35a2529870e89"]}' \
402- -H " Authorization: EXAMPLE-API-TOKEN" \
403- -X POST \
404- https://localhost:4000/cubejs-system/v1/pre-aggregations/jobs
401+ -d '{"action": "get", "tokens": ["e9a6a0c55885cea5371348500ce7d7dc","d1329b6c8d152e734fc4dcf7307b1b58","6f4ea38373663fffc4334a576574845b","ea903b10634b2f3141b35a2529870e89"]}' \
402+ -H "Authorization: EXAMPLE-API-TOKEN" \
403+ -X POST \
404+ https://localhost:4000/cubejs-system/v1/pre-aggregations/jobs
405405```
406406
407407Example response:
@@ -485,12 +485,12 @@ Example response:
485485
486486Example request with ` resType: object ` :
487487
488- ``` bash
488+ ``` bash{outputLines: 2-5}
489489curl \
490- -d ' {"action": "get", "resType": "object", "tokens": ["e9a6a0c55885cea5371348500ce7d7dc","d1329b6c8d152e734fc4dcf7307b1b58","6f4ea38373663fffc4334a576574845b","ea903b10634b2f3141b35a2529870e89"]}' \
491- -H " Authorization: EXAMPLE-API-TOKEN" \
492- -X POST \
493- https://localhost:4000/cubejs-system/v1/pre-aggregations/jobs
490+ -d '{"action": "get", "resType": "object", "tokens": ["e9a6a0c55885cea5371348500ce7d7dc","d1329b6c8d152e734fc4dcf7307b1b58","6f4ea38373663fffc4334a576574845b","ea903b10634b2f3141b35a2529870e89"]}' \
491+ -H "Authorization: EXAMPLE-API-TOKEN" \
492+ -X POST \
493+ https://localhost:4000/cubejs-system/v1/pre-aggregations/jobs
494494```
495495
496496Example response with ` resType: object ` :
@@ -578,15 +578,10 @@ connection to the default `dataSource`.
578578** Multi-tenant:** Tests connections per-tenant. If no connections exist, it will
579579report as successful.
580580
581- Example request:
581+ Example of a successful request:
582582
583- ``` bash
583+ ``` bash{outputLines: 2-12}
584584curl -i http://localhost:4000/readyz
585- ```
586-
587- Successful example response:
588-
589- ``` bash
590585HTTP/1.1 200 OK
591586X-Powered-By: Express
592587Access-Control-Allow-Origin: *
@@ -600,9 +595,10 @@ Keep-Alive: timeout=5
600595{"health":"HEALTH"}
601596```
602597
603- Failure example response:
598+ Example of a failed response:
604599
605- ``` bash
600+ ``` bash{outputLines: 2-12}
601+ curl -i http://localhost:4000/readyz
606602HTTP/1.1 500 Internal Server Error
607603X-Powered-By: Express
608604Access-Control-Allow-Origin: *
@@ -622,13 +618,10 @@ Returns the liveness state of the deployment. This is confirmed by testing any
622618existing connections to ` dataSource ` . If no connections exist, it will report as
623619successful.
624620
625- ``` bash
626- curl -i http://localhost:4000/livez
627- ```
628-
629- Successful example response:
621+ Example of a successful response:
630622
631- ``` bash
623+ ``` bash{outputLines: 2-12}
624+ curl -i http://localhost:4000/livez
632625HTTP/1.1 200 OK
633626X-Powered-By: Express
634627Access-Control-Allow-Origin: *
@@ -642,9 +635,10 @@ Keep-Alive: timeout=5
642635{"health":"HEALTH"}
643636```
644637
645- Failure example response:
638+ Example of a failed response:
646639
647- ``` bash
640+ ``` bash{outputLines: 2-12}
641+ curl -i http://localhost:4000/livez
648642HTTP/1.1 500 Internal Server Error
649643X-Powered-By: Express
650644Access-Control-Allow-Origin: *
0 commit comments