Skip to content

Latest commit

 

History

History
391 lines (280 loc) · 13.3 KB

notebook.md

File metadata and controls

391 lines (280 loc) · 13.3 KB

Notebook Actions

Details on the various actions that can be performed on the Notebook resource, including the expected parameters and the potential responses.

Contents

Cancel Execution

Marks a specific notebook execution for cancellation

result = client.notebook.cancel_execution(
    applicationId=my_application_id,
    notebookId=my_notebook_id,
    executionId=my_execution_id)

print(result)

Authentication

The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Application, all.Organization, all.User, notebook.*, or notebook.execute.

Available Parameters

Name Type Required Description Default Example
applicationId string Y ID associated with the application 575ec8687ae143cd83dc4a97
notebookId string Y ID associated with the notebook 575ed78e7ae143cd83dc4aab
executionId undefined Y The ID of the execution to cancel 632e18632f59592e773a4153
losantdomain string N Domain scope of request (rarely needed) example.com

Successful Responses

Code Type Description
200 Success If the execution was successfully marked for cancellation

Error Responses

Code Type Description
400 Error Error if malformed request
404 Error Error if execution was not found

Delete

Deletes a notebook

result = client.notebook.delete(
    applicationId=my_application_id,
    notebookId=my_notebook_id)

print(result)

Authentication

The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Application, all.Organization, all.User, notebook.*, or notebook.delete.

Available Parameters

Name Type Required Description Default Example
applicationId string Y ID associated with the application 575ec8687ae143cd83dc4a97
notebookId string Y ID associated with the notebook 575ed78e7ae143cd83dc4aab
losantdomain string N Domain scope of request (rarely needed) example.com

Successful Responses

Code Type Description
200 Success If notebook was successfully deleted

Error Responses

Code Type Description
400 Error Error if malformed request
404 Error Error if notebook was not found

Execute

Triggers the execution of a notebook

result = client.notebook.execute(
    applicationId=my_application_id,
    notebookId=my_notebook_id,
    executionOptions=my_execution_options)

print(result)

Authentication

The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Application, all.Organization, all.User, notebook.*, or notebook.execute.

Available Parameters

Name Type Required Description Default Example
applicationId string Y ID associated with the application 575ec8687ae143cd83dc4a97
notebookId string Y ID associated with the notebook 575ed78e7ae143cd83dc4aab
executionOptions Notebook Execution Options Y The options for the execution Notebook Execution Options Example
losantdomain string N Domain scope of request (rarely needed) example.com

Successful Responses

Code Type Description
200 Success With Execution ID If execution request was accepted and successfully queued

Error Responses

Code Type Description
400 Error Error if malformed request
404 Error Error if notebook was not found

Get

Retrieves information on a notebook

result = client.notebook.get(
    applicationId=my_application_id,
    notebookId=my_notebook_id)

print(result)

Authentication

The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, notebook.*, or notebook.get.

Available Parameters

Name Type Required Description Default Example
applicationId string Y ID associated with the application 575ec8687ae143cd83dc4a97
notebookId string Y ID associated with the notebook 575ed78e7ae143cd83dc4aab
losantdomain string N Domain scope of request (rarely needed) example.com

Successful Responses

Code Type Description
200 Notebook notebook information

Error Responses

Code Type Description
400 Error Error if malformed request
404 Error Error if notebook was not found

Logs

Retrieves information on notebook executions

result = client.notebook.logs(
    applicationId=my_application_id,
    notebookId=my_notebook_id)

print(result)

Authentication

The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, notebook.*, or notebook.logs.

Available Parameters

Name Type Required Description Default Example
applicationId string Y ID associated with the application 575ec8687ae143cd83dc4a97
notebookId string Y ID associated with the notebook 575ed78e7ae143cd83dc4aab
limit string N Max log entries to return (ordered by time descending) 1 10
since string N Look for log entries since this time (ms since epoch) 1465790400000
losantdomain string N Domain scope of request (rarely needed) example.com

Successful Responses

Code Type Description
200 Notebook Execution Logs notebook execution information

Error Responses

Code Type Description
400 Error Error if malformed request
404 Error Error if notebook was not found

Notebook Minute Counts

Returns notebook execution usage by day for the time range specified for this notebook

result = client.notebook.notebook_minute_counts(
    applicationId=my_application_id,
    notebookId=my_notebook_id)

print(result)

Authentication

The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, notebook.*, or notebook.notebookMinuteCounts.

Available Parameters

Name Type Required Description Default Example
applicationId string Y ID associated with the application 575ec8687ae143cd83dc4a97
notebookId string Y ID associated with the notebook 575ed78e7ae143cd83dc4aab
start string N Start of range for notebook execution query (ms since epoch) 0
end string N End of range for notebook execution query (ms since epoch) 1465790400000
losantdomain string N Domain scope of request (rarely needed) example.com

Successful Responses

Code Type Description
200 Notebook Minute Counts Notebook usage information

Error Responses

Code Type Description
400 Error Error if malformed request
404 Error Error if notebook was not found

Patch

Updates information about a notebook

result = client.notebook.patch(
    applicationId=my_application_id,
    notebookId=my_notebook_id,
    notebook=my_notebook)

print(result)

Authentication

The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Application, all.Organization, all.User, notebook.*, or notebook.patch.

Available Parameters

Name Type Required Description Default Example
applicationId string Y ID associated with the application 575ec8687ae143cd83dc4a97
notebookId string Y ID associated with the notebook 575ed78e7ae143cd83dc4aab
notebook Notebook Patch Y Object containing new properties of the notebook Notebook Patch Example
losantdomain string N Domain scope of request (rarely needed) example.com

Successful Responses

Code Type Description
200 Notebook Updated notebook information

Error Responses

Code Type Description
400 Error Error if malformed request
404 Error Error if notebook was not found

Request Input Data Export

Requests a combined zip file of the potential input data for a notebook execution

result = client.notebook.request_input_data_export(
    applicationId=my_application_id,
    notebookId=my_notebook_id,
    exportOptions=my_export_options)

print(result)

Authentication

The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, notebook.*, or notebook.requestInputDataExport.

Available Parameters

Name Type Required Description Default Example
applicationId string Y ID associated with the application 575ec8687ae143cd83dc4a97
notebookId string Y ID associated with the notebook 575ed78e7ae143cd83dc4aab
exportOptions Notebook Data Export Options Y The options for the export Notebook Data Export Options Example
losantdomain string N Domain scope of request (rarely needed) example.com

Successful Responses

Code Type Description
202 Job Enqueued API Result If export request was accepted and successfully queued

Error Responses

Code Type Description
400 Error Error if malformed request
404 Error Error if notebook was not found

Upload

Uploads the jupyter notebook file

result = client.notebook.upload(
    applicationId=my_application_id,
    notebookId=my_notebook_id,
    jupyterFile=my_jupyter_file)

print(result)

Authentication

The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Application, all.Organization, all.User, notebook.*, or notebook.upload.

Available Parameters

Name Type Required Description Default Example
applicationId string Y ID associated with the application 575ec8687ae143cd83dc4a97
notebookId string Y ID associated with the notebook 575ed78e7ae143cd83dc4aab
jupyterFile file Y The jupyter notebook file undefined
losantdomain string N Domain scope of request (rarely needed) example.com

Successful Responses

Code Type Description
200 Notebook Updated notebook information

Error Responses

Code Type Description
400 Error Error if malformed request
404 Error Error if notebook was not found