All URIs are relative to https://looker.buffer.com:19999/api/3.0
Method | HTTP request | Description |
---|---|---|
all_uploads | GET /uploads | get all uploads |
create_upload | POST /uploads | Upload a csv file and return the inferred table definition |
delete_upload | DELETE /uploads/{upload_id} | Delete UploadTable and drop upload created table if exists |
get_upload | GET /uploads/{upload_id} | Get table definition for an upload |
get_upload_lookml | GET /uploads/{upload_id}/lookml | Get the generated lookml for a table created via upload |
load_upload | POST /uploads/{upload_id} | Upload contents of a file to create and load a table in the DB |
update_upload | PUT /uploads/{upload_id} | Update upload table definition and create/load the DB table |
list[UploadTable] all_uploads()
get all uploads
import time
import lookerpy
from lookerpy.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = lookerpy.UploadApi()
try:
# get all uploads
api_response = api_instance.all_uploads()
pprint(api_response)
except ApiException as e:
print "Exception when calling UploadApi->all_uploads: %s\n" % e
This endpoint does not need any parameter.
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UploadTable create_upload(body)
Upload a csv file and return the inferred table definition
import time
import lookerpy
from lookerpy.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = lookerpy.UploadApi()
body = lookerpy.UploadTable() # UploadTable | UploadTable
try:
# Upload a csv file and return the inferred table definition
api_response = api_instance.create_upload(body)
pprint(api_response)
except ApiException as e:
print "Exception when calling UploadApi->create_upload: %s\n" % e
Name | Type | Description | Notes |
---|---|---|---|
body | UploadTable | UploadTable |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bool delete_upload(upload_id)
Delete UploadTable and drop upload created table if exists
import time
import lookerpy
from lookerpy.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = lookerpy.UploadApi()
upload_id = 789 # int | Id of uploaded table
try:
# Delete UploadTable and drop upload created table if exists
api_response = api_instance.delete_upload(upload_id)
pprint(api_response)
except ApiException as e:
print "Exception when calling UploadApi->delete_upload: %s\n" % e
Name | Type | Description | Notes |
---|---|---|---|
upload_id | int | Id of uploaded table |
bool
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UploadTable get_upload(upload_id)
Get table definition for an upload
import time
import lookerpy
from lookerpy.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = lookerpy.UploadApi()
upload_id = 789 # int | Id of uploaded table
try:
# Get table definition for an upload
api_response = api_instance.get_upload(upload_id)
pprint(api_response)
except ApiException as e:
print "Exception when calling UploadApi->get_upload: %s\n" % e
Name | Type | Description | Notes |
---|---|---|---|
upload_id | int | Id of uploaded table |
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 get_upload_lookml(upload_id)
Get the generated lookml for a table created via upload
Get the generated lookML for an uploaded table License feature may not be available on your Looker Beta feature not frozen
import time
import lookerpy
from lookerpy.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = lookerpy.UploadApi()
upload_id = 789 # int | Id of uploaded table
try:
# Get the generated lookml for a table created via upload
api_response = api_instance.get_upload_lookml(upload_id)
pprint(api_response)
except ApiException as e:
print "Exception when calling UploadApi->get_upload_lookml: %s\n" % e
Name | Type | Description | Notes |
---|---|---|---|
upload_id | int | Id of uploaded table |
str
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UploadTable load_upload(upload_id, body)
Upload contents of a file to create and load a table in the DB
import time
import lookerpy
from lookerpy.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = lookerpy.UploadApi()
upload_id = 789 # int | Id of upload table
body = 'body_example' # str | File contents
try:
# Upload contents of a file to create and load a table in the DB
api_response = api_instance.load_upload(upload_id, body)
pprint(api_response)
except ApiException as e:
print "Exception when calling UploadApi->load_upload: %s\n" % e
Name | Type | Description | Notes |
---|---|---|---|
upload_id | int | Id of upload table | |
body | str | File contents |
No authorization required
- Content-Type: text/plain, text/csv
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UploadTable update_upload(upload_id, body)
Update upload table definition and create/load the DB table
import time
import lookerpy
from lookerpy.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = lookerpy.UploadApi()
upload_id = 789 # int | Id of upload table
body = lookerpy.UploadTable() # UploadTable | Specified upload table
try:
# Update upload table definition and create/load the DB table
api_response = api_instance.update_upload(upload_id, body)
pprint(api_response)
except ApiException as e:
print "Exception when calling UploadApi->update_upload: %s\n" % e
Name | Type | Description | Notes |
---|---|---|---|
upload_id | int | Id of upload table | |
body | UploadTable | Specified upload table |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]