All URIs are relative to https://looker.buffer.com:19999/api/3.0
Method | HTTP request | Description |
---|---|---|
all_looks | GET /looks | get all looks |
create_look_prefetch | POST /looks/{look_id}/prefetch | create a prefetch |
look | GET /looks/{look_id} | get look |
look_prefetch | GET /looks/{look_id}/prefetch | get a prefetch |
run_look | GET /looks/{look_id}/run/{format} | run look |
list[Look] all_looks(fields=fields)
get all looks
import time
import lookerpy
from lookerpy.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = lookerpy.LookApi()
fields = 'fields_example' # str | Requested fields. (optional)
try:
# get all looks
api_response = api_instance.all_looks(fields=fields)
pprint(api_response)
except ApiException as e:
print "Exception when calling LookApi->all_looks: %s\n" % e
Name | Type | Description | Notes |
---|---|---|---|
fields | str | Requested fields. | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PrefetchLookRequestMapper create_look_prefetch(look_id, body=body)
create a prefetch
import time
import lookerpy
from lookerpy.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = lookerpy.LookApi()
look_id = 'look_id_example' # str | Id of dashboard
body = lookerpy.PrefetchLookRequestMapper() # PrefetchLookRequestMapper | Parameters for prefetch request (optional)
try:
# create a prefetch
api_response = api_instance.create_look_prefetch(look_id, body=body)
pprint(api_response)
except ApiException as e:
print "Exception when calling LookApi->create_look_prefetch: %s\n" % e
Name | Type | Description | Notes |
---|---|---|---|
look_id | str | Id of dashboard | |
body | PrefetchLookRequestMapper | Parameters for prefetch request | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
LookWithQuery look(look_id, fields=fields)
get look
import time
import lookerpy
from lookerpy.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = lookerpy.LookApi()
look_id = 789 # int | Id of look
fields = 'fields_example' # str | Requested fields. (optional)
try:
# get look
api_response = api_instance.look(look_id, fields=fields)
pprint(api_response)
except ApiException as e:
print "Exception when calling LookApi->look: %s\n" % e
Name | Type | Description | Notes |
---|---|---|---|
look_id | int | Id of look | |
fields | str | Requested fields. | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PrefetchMapper look_prefetch(look_id)
get a prefetch
import time
import lookerpy
from lookerpy.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = lookerpy.LookApi()
look_id = 'look_id_example' # str | Id of look
try:
# get a prefetch
api_response = api_instance.look_prefetch(look_id)
pprint(api_response)
except ApiException as e:
print "Exception when calling LookApi->look_prefetch: %s\n" % e
Name | Type | Description | Notes |
---|---|---|---|
look_id | str | Id of look |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str run_look(look_id, format, limit=limit, apply_formatting=apply_formatting, cache=cache, image_width=image_width, image_height=image_height, generate_drill_links=generate_drill_links, force_production=force_production)
run look
Run a Look. Given a look id and a format, this will run the look's query and return the results. Suported formats: - json - plain json - csv - comma separated values with a header - txt - tab separated values with a header - html - simple html - md - simple markdown - sql - shows the generated SQL rather than running the query - png - a PNG image of the visualization of the query - jpg - a JPG image of the visualization of the query - unified - json that is annotated with additional metadata as used by the Looker web application
import time
import lookerpy
from lookerpy.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = lookerpy.LookApi()
look_id = 789 # int | Id of look
format = 'format_example' # str | Format of result
limit = 789 # int | Row limit (may override the limit in the saved query). (optional)
apply_formatting = true # bool | Apply model-specified formatting to each result. (optional)
cache = true # bool | Get results from cache if available. (optional)
image_width = 789 # int | Render width for image formats. (optional)
image_height = 789 # int | Render height for image formats. (optional)
generate_drill_links = true # bool | Generate drill links (only applicable to 'unified' format. (optional)
force_production = true # bool | Force use of production models even if the user is in developer mode. (optional)
try:
# run look
api_response = api_instance.run_look(look_id, format, limit=limit, apply_formatting=apply_formatting, cache=cache, image_width=image_width, image_height=image_height, generate_drill_links=generate_drill_links, force_production=force_production)
pprint(api_response)
except ApiException as e:
print "Exception when calling LookApi->run_look: %s\n" % e
Name | Type | Description | Notes |
---|---|---|---|
look_id | int | Id of look | |
format | str | Format of result | |
limit | int | Row limit (may override the limit in the saved query). | [optional] |
apply_formatting | bool | Apply model-specified formatting to each result. | [optional] |
cache | bool | Get results from cache if available. | [optional] |
image_width | int | Render width for image formats. | [optional] |
image_height | int | Render height for image formats. | [optional] |
generate_drill_links | bool | Generate drill links (only applicable to 'unified' format. | [optional] |
force_production | bool | Force use of production models even if the user is in developer mode. | [optional] |
str
No authorization required
- Content-Type: application/json
- Accept: text, application/json, image/png, image/jpg
[Back to top] [Back to API list] [Back to Model list] [Back to README]