### Example Response for Listing Installations Source: https://docs.databricks.com/api/azure/workspace/consumerinstallations/list Illustrates the structure of a successful response when listing consumer installations, including details about each installation and pagination information. ```json { "installations": [ { "catalog_name": "string", "error_message": "string", "id": "string", "installed_on": 0, "listing_id": "string", "listing_name": "string", "recipient_type": "DELTA_SHARING_RECIPIENT_TYPE_DATABRICKS", "repo_name": "string", "repo_path": "string", "share_name": "string", "status": "INSTALLED", "token_detail": { "bearerToken": "string", "endpoint": "string", "expirationTime": "string", "shareCredentialsVersion": 0 }, "tokens": [ { "activation_url": "string", "created_at": 0, "created_by": "string", "expiration_time": 0, "id": "string", "updated_at": 0, "updated_by": "string" } ] } ], "next_page_token": "string" } ``` -------------------------------- ### Get an example from a Supervisor Agent Source: https://docs.databricks.com/api/azure/workspace/supervisoragents/getexample Retrieves a specific example associated with a Supervisor Agent. Requires the full resource name of the example. ```bash GET /api/2.1/{name=supervisor-agents/*/examples/*} ``` -------------------------------- ### Response Sample for Get Example Source: https://docs.databricks.com/api/azure/workspace/knowledgeassistants/getexample This is a sample JSON response for successfully retrieving an example from a Knowledge Assistant. ```json { "create_time": "2019-08-24T14:15:22Z", "example_id": "string", "guidelines": [ "string" ], "name": "string", "question": "string", "update_time": "2019-08-24T14:15:22Z" } ``` -------------------------------- ### Get an example from a Knowledge Assistant Source: https://docs.databricks.com/api/azure/workspace/knowledgeassistants/getexample Retrieves a specific example from a Knowledge Assistant using its resource name. Requires the 'knowledge-assistants' API scope. ```bash GET /api/2.1/{name=knowledge-assistants/*/examples/*} ``` -------------------------------- ### Get an example from a Knowledge Assistant Source: https://docs.databricks.com/api/azure/workspace/knowledgeassistants/getknowledgeassistant Retrieves a specific example from a knowledge assistant. ```APIDOC ## GET /api/2.0/knowledge-assistants/{knowledge_assistant_id}/examples/{example_id} ### Description Retrieves a specific example from a knowledge assistant. ### Method GET ### Endpoint /api/2.0/knowledge-assistants/{knowledge_assistant_id}/examples/{example_id} ### Parameters #### Path Parameters - **knowledge_assistant_id** (string) - Required - The ID of the knowledge assistant. - **example_id** (string) - Required - The ID of the example. ### Response #### Success Response (200) - **id** (string) - The ID of the example. - **prompt** (string) - The prompt of the example. - **response** (string) - The response of the example. #### Response Example { "id": "example_id_1", "prompt": "What is Databricks?", "response": "Databricks is a cloud-based platform..." } ``` -------------------------------- ### Get an example from a Knowledge Assistant Source: https://docs.databricks.com/api/azure/workspace/knowledgeassistants/getexample Retrieves a specific example from a Knowledge Assistant. This is useful for fetching example questions and their associated guidelines. ```APIDOC ## Get an example from a Knowledge Assistant Beta ` GET /api/2.1/{name=knowledge-assistants/*/examples/*}` Gets an example from a Knowledge Assistant. API scopes:`knowledge-assistants` ### Path parameters `name`requiredstring The resource name of the example. Format: knowledge-assistants/{knowledge_assistant_id}/examples/{example_id} ### Responses **200** Request completed successfully. Request completed successfully. `create_time`date-time Timestamp when this example was created. `example_id`string The universally unique identifier (UUID) of the example. `guidelines`Array of string Guidelines for answering the question. Optional — examples may be created with just a question; the front-end form does not require guidelines. `name`stringIDImmutable Full resource name: knowledge-assistants/{knowledge_assistant_id}/examples/{example_id} `question`string The example question. `update_time`date-time Timestamp when this example was last updated. # Response samples 200 { "create_time": "2019-08-24T14:15:22Z", "example_id": "string", "guidelines": [ "string" ], "name": "string", "question": "string", "update_time": "2019-08-24T14:15:22Z" } ``` -------------------------------- ### List Quality Monitors API Request Example Source: https://docs.databricks.com/api/azure/workspace/qualitymonitorv2/listqualitymonitor Example of a GET request to list quality monitors with query parameters for pagination. ```bash GET /api/2.0/quality-monitors?page_token=&page_size=20 ``` -------------------------------- ### Get an example from a Supervisor Agent Source: https://docs.databricks.com/api/azure/workspace/supervisoragents/getexample Retrieves a specific example associated with a supervisor agent. ```APIDOC ## GET /api/2.1/{name=supervisor-agents/*/examples/*} ### Description Gets an example from a Supervisor Agent. API scopes:`supervisor-agents` ### Method GET ### Endpoint /api/2.1/{name=supervisor-agents/*/examples/*} ### Parameters #### Path Parameters - **name** (string) - Required - The resource name of the example. Format: supervisor-agents/{supervisor_agent_id}/examples/{example_id} ### Responses #### Success Response (200) - **example_id** (string) - The universally unique identifier (UUID) of the example. - **guidelines** (Array of string) - Guidelines for answering the question. - **name** (string) - IDImmutable - Full resource name: supervisor-agents/{supervisor_agent_id}/examples/{example_id} - **question** (string) - The example question. #### Response Example ```json { "example_id": "string", "guidelines": [ "string" ], "name": "string", "question": "string" } ``` ``` -------------------------------- ### Example Response for Library Statuses Source: https://docs.databricks.com/api/azure/workspace/libraries/allclusterstatuses This sample response shows the structure of the data returned when querying the status of libraries on clusters. It includes cluster IDs and the status of each library installed on them. ```json { "statuses": [ { "cluster_id": "1234-56789-abcde", "library_statuses": [ { "is_library_for_all_clusters": false, "library": { "pypi": { "package": "numpy", "repo": "http://my-pypi-repo.com" } }, "status": "INSTALLED" }, { "is_library_for_all_clusters": false, "library": { "jar": "/Workspace/path/to/library.jar" }, "status": "INSTALLED" } ] }, { "cluster_id": "234-567890-fghij", "library_statuses": [ { "is_library_for_all_clusters": false, "library": { "whl": "/Workspace/path/to/library.whl" }, "status": "PENDING" } ] } ] } ``` -------------------------------- ### Batch Get Providers API Request Example Source: https://docs.databricks.com/api/azure/workspace/consumerproviders/batchget Example of how to make a GET request to the batchGet providers API endpoint, specifying an array of provider IDs. ```bash curl -X GET \ 'https:///api/2.1/marketplace-consumer/providers:batchGet?ids=provider_id_1&ids=provider_id_2' \ -H 'Authorization: Bearer ' ``` -------------------------------- ### Install from a listing Source: https://docs.databricks.com/api/azure/workspace/consumerinstallations Creates a new consumer installation for a specified Marketplace listing. This allows a consumer to install a product or service offered on the Marketplace. ```APIDOC ## POST /consumer/installations ### Description Installs a listing for a consumer. ### Method POST ### Endpoint /consumer/installations ### Parameters #### Request Body - **listing_id** (string) - Required - The ID of the listing to install. - **consumer_principal_id** (string) - Optional - The ID of the consumer principal to install for. Defaults to the current user. ### Request Example { "listing_id": "listing_xyz", "consumer_principal_id": "user_abc" } ### Response #### Success Response (200) - **installation_id** (string) - The unique identifier for the newly created installation. - **listing_id** (string) - The ID of the listing that was installed. - **consumer_principal_id** (string) - The ID of the consumer principal. - **created_at** (string) - The timestamp when the installation was created. - **updated_at** (string) - The timestamp when the installation was last updated. #### Response Example { "installation_id": "inst_789", "listing_id": "listing_xyz", "consumer_principal_id": "user_abc", "created_at": "2023-10-27T12:00:00Z", "updated_at": "2023-10-27T12:00:00Z" } ``` -------------------------------- ### Response Sample for Consumer Installation (200 OK) Source: https://docs.databricks.com/api/azure/workspace/consumerinstallations/update This JSON object represents a successful response (200 OK) for a consumer installation request. It mirrors the installation details provided in the request, excluding the rotate_token field. ```json { "installation": { "catalog_name": "string", "error_message": "string", "id": "string", "installed_on": 0, "listing_id": "string", "listing_name": "string", "recipient_type": "DELTA_SHARING_RECIPIENT_TYPE_DATABRICKS", "repo_name": "string", "repo_path": "string", "share_name": "string", "status": "INSTALLED", "token_detail": { "bearerToken": "string", "endpoint": "string", "expirationTime": "string", "shareCredentialsVersion": 0 }, "tokens": [ { "activation_url": "string", "created_at": 0, "created_by": "string", "expiration_time": 0, "id": "string", "updated_at": 0, "updated_by": "string" } ] } } ``` -------------------------------- ### List Budget Policies with Pagination Source: https://docs.databricks.com/api/azure/account/budgetpolicy/list Demonstrates how to list budget policies with specific pagination parameters. This example shows how to request a specific page size and use a page token to retrieve subsequent pages of results. ```bash curl -v -X GET \ -H "Authorization: Bearer " \ https:///api/2.1/accounts//budget-policies?page_size=100&page_token= ``` -------------------------------- ### List Installations for a Listing Source: https://docs.databricks.com/api/azure/workspace/consumerinstallations/listlistinginstallations Use this endpoint to retrieve all installations for a specific marketplace listing. It supports pagination to handle large result sets. ```bash curl -X GET \ -H "Authorization: Bearer " \ "https:///api/2.1/marketplace-consumer/listings/{listing_id}/installations?page_token=&page_size=" ``` -------------------------------- ### List all installations Source: https://docs.databricks.com/api/azure/workspace/consumerinstallations Retrieves a list of all consumer installations available in the Databricks Marketplace. This endpoint is useful for getting an overview of all active installations. ```APIDOC ## GET /consumer/installations ### Description Retrieves a list of all consumer installations. ### Method GET ### Endpoint /consumer/installations ### Parameters #### Query Parameters - **listing_id** (string) - Optional - Filter installations by listing ID. ### Response #### Success Response (200) - **installations** (array) - A list of installation objects. - **installation_id** (string) - The unique identifier for the installation. - **listing_id** (string) - The ID of the listing associated with the installation. - **consumer_principal_id** (string) - The ID of the consumer principal. - **created_at** (string) - The timestamp when the installation was created. - **updated_at** (string) - The timestamp when the installation was last updated. #### Response Example { "installations": [ { "installation_id": "inst_123", "listing_id": "listing_abc", "consumer_principal_id": "user_xyz", "created_at": "2023-10-27T10:00:00Z", "updated_at": "2023-10-27T10:00:00Z" } ] } ``` -------------------------------- ### Filter Users by Display Name (Starts With) Source: https://docs.databricks.com/api/azure/account/accountusers/list Example of filtering users where the displayName starts with 'jo'. ```bash filter=displayName sw "jo" ``` -------------------------------- ### Create an example for a Knowledge Assistant Source: https://docs.databricks.com/api/azure/workspace/knowledgeassistants/createexample Creates a new example for a specified Knowledge Assistant. Examples include a question and optional guidelines for the assistant's response. ```APIDOC ## POST /api/2.1/{parent=knowledge-assistants/*}/examples ### Description Creates an example for a Knowledge Assistant. Examples include a question and guidelines for how the assistant should respond. ### Method POST ### Endpoint /api/2.1/{parent=knowledge-assistants/*}/examples ### Parameters #### Path Parameters - **parent** (string) - Required - Parent resource where this example will be created. Format: knowledge-assistants/{knowledge_assistant_id} #### Request Body An example associated with a Knowledge Assistant. Contains a question and guidelines for how the assistant should respond. - **guidelines** (Array of string) - Optional - Guidelines for answering the question. Optional — examples may be created with just a question; the front-end form does not require guidelines. - **question** (string) - Required - The example question. ### Responses #### Success Response (200) Request completed successfully. - **create_time** (date-time) - Timestamp when this example was created. - **example_id** (string) - The universally unique identifier (UUID) of the example. - **guidelines** (Array of string) - Guidelines for answering the question. Optional — examples may be created with just a question; the front-end form does not require guidelines. - **name** (string) - Full resource name: knowledge-assistants/{knowledge_assistant_id}/examples/{example_id} - **question** (string) - The example question. - **update_time** (date-time) - Timestamp when this example was last updated. ``` -------------------------------- ### Filter Groups by Display Name (Starts With) Source: https://docs.databricks.com/api/azure/account/accountgroups/list Example of filtering groups where the displayName starts with 'bar'. ```bash GET /api/2.0/accounts/{account_id}/scim/v2/Groups?filter=displayName sw "bar" ``` -------------------------------- ### List Examples Source: https://docs.databricks.com/api/azure/workspace/knowledgeassistants/listexamples Lists examples under a Knowledge Assistant. This is a beta endpoint. ```APIDOC ## GET /api/2.1/{parent=knowledge-assistants/*}/examples ### Description Lists examples under a Knowledge Assistant. ### Method GET ### Endpoint /api/2.1/{parent=knowledge-assistants/*}/examples ### Parameters #### Path Parameters - **parent** (string) - Required - Parent resource to list from. Format: knowledge-assistants/{knowledge_assistant_id} #### Query Parameters - **page_size** (int32) - Optional - The maximum number of examples to return. If unspecified, at most 100 examples will be returned. The maximum value is 100; values above 100 will be coerced to 100. - **page_token** (string) - Optional - A page token, received from a previous `ListExamples` call. Provide this to retrieve the subsequent page. If unspecified, the first page will be returned. ### Responses #### Success Response (200) Request completed successfully. The response includes a list of items and pagination information. If `next_page_token` is set, there are more results. - **examples** (Array of object) - Array of example objects. - **create_time** (date-time) - Timestamp when this example was created. - **example_id** (string) - The universally unique identifier (UUID) of the example. - **guidelines** (Array of string) - Guidelines for answering the question. Optional — examples may be created with just a question; the front-end form does not require guidelines. - **name** (string) - Full resource name: knowledge-assistants/{knowledge_assistant_id}/examples/{example_id} - **question** (string) - The example question. - **update_time** (date-time) - Timestamp when this example was last updated. - **next_page_token** (string) - A token to retrieve the next page of results. ``` -------------------------------- ### Get Cluster Library Status Source: https://docs.databricks.com/api/azure/workspace/libraries/clusterstatus Retrieves the installation status of all libraries on a specified Databricks cluster. This includes libraries pending installation, currently installing, installed, failed, or marked for uninstallation. ```bash GET /api/2.0/libraries/cluster-status ``` -------------------------------- ### List examples for a Supervisor Agent Source: https://docs.databricks.com/api/azure/workspace/supervisoragents/listexamples Lists examples under a Supervisor Agent. This API is in Beta. ```APIDOC ## List examples for a Supervisor Agent Beta ` GET /api/2.1/{parent=supervisor-agents/*}/examples` Lists examples under a Supervisor Agent. API scopes:`supervisor-agents` ### Path parameters `parent`requiredstring Parent resource to list from. Format: supervisor-agents/{supervisor_agent_id} ### Query parameters `page_size`int32 [ 1 .. 100 ] Optional The maximum number of examples to return. If unspecified, at most 100 examples will be returned. The maximum value is 100; values above 100 will be coerced to 100. `page_token`stringOptional A page token, received from a previous `ListExamples` call. Provide this to retrieve the subsequent page. If unspecified, the first page will be returned. ### Responses **200** Request completed successfully. The response includes a list of items and pagination information. If `next_page_token` is set, there are more results. Request completed successfully. The response includes a list of items and pagination information. If `next_page_token` is set, there are more results. `examples`Array of object Array [ `example_id`string The universally unique identifier (UUID) of the example. `guidelines`Array of string Guidelines for answering the question. `name`stringIDImmutable Full resource name: supervisor-agents/{supervisor_agent_id}/examples/{example_id} `question`string The example question. ] `next_page_token`string # Response samples 200 { "examples": [ { "example_id": "string", "guidelines": [ "string" ], "name": "string", "question": "string" } ], "next_page_token": "string" } ``` -------------------------------- ### Get cluster library status Source: https://docs.databricks.com/api/azure/workspace/libraries/clusterstatus Retrieves the installation status of all libraries on a given Databricks cluster. This includes libraries currently being installed, already installed, or marked for removal. ```APIDOC ## GET /api/2.0/libraries/cluster-status ### Description Get the status of libraries on a cluster. A status is returned for all libraries installed on this cluster via the API or the libraries UI. The order of returned libraries is as follows: 1. Libraries set to be installed on this cluster, in the order that the libraries were added to the cluster, are returned first. 2. Libraries that were previously requested to be installed on this cluster or, but are now marked for removal, in no particular order, are returned last. API scopes:`libraries` ### Query parameters #### `cluster_id` (string) - Required Unique identifier of the cluster whose status should be retrieved. ### Responses #### Success Response (200) Request completed successfully. - **`cluster_id`** (string) - Unique identifier for the cluster. - **`library_statuses`** (Array of object) - Status of all libraries on the cluster. - **`is_library_for_all_clusters`** (boolean) - Whether the library was set to be installed on all clusters via the libraries UI. - **`library`** (object) - Unique identifier for the library. - **`messages`** (Array of string) - All the info and warning messages that have occurred so far for this library. - **`status`** (string) - Enum: `PENDING | RESOLVING | INSTALLING | INSTALLED | FAILED | UNINSTALL_ON_RESTART | SKIPPED | RESTORED` - Status of installing the library on the cluster. #### Error Responses - **400**: Bad Request - **401**: Unauthorized - **403**: Forbidden - **404**: Not Found - **429**: Too Many Requests - **500**: Internal Server Error Error responses are returned in the following format: { "error_code": "Error code", "message": "Human-readable error message." } ``` -------------------------------- ### Create an example for a Knowledge Assistant Source: https://docs.databricks.com/api/azure/workspace/knowledgeassistants/listknowledgeassistants Creates a new example for a Knowledge Assistant. ```APIDOC ## POST /api/2.0/workspace/knowledge-assistants/{assistant_id}/examples ### Description Creates a new example for a Knowledge Assistant. ### Method POST ### Endpoint /api/2.0/workspace/knowledge-assistants/{assistant_id}/examples ### Parameters #### Path Parameters - **assistant_id** (string) - Required - The ID of the Knowledge Assistant. ### Request Body - **prompt** (string) - Required - The prompt for the example. - **response** (string) - Required - The expected response for the example. ### Response #### Success Response (200) - **example_id** (string) - The ID of the newly created example. ``` -------------------------------- ### Create an example for a Knowledge Assistant Source: https://docs.databricks.com/api/azure/workspace/knowledgeassistants/getknowledgeassistant Creates a new example for a specific knowledge assistant. ```APIDOC ## POST /api/2.0/knowledge-assistants/{knowledge_assistant_id}/examples ### Description Creates a new example for a specific knowledge assistant. ### Method POST ### Endpoint /api/2.0/knowledge-assistants/{knowledge_assistant_id}/examples ### Parameters #### Path Parameters - **knowledge_assistant_id** (string) - Required - The ID of the knowledge assistant. #### Request Body - **prompt** (string) - Required - The prompt for the example. - **response** (string) - Required - The response for the example. ### Request Example { "prompt": "What are Databricks SQL Warehouses?", "response": "SQL Warehouses are compute resources for running SQL queries..." } ### Response #### Success Response (200) - **id** (string) - The ID of the newly created example. - **prompt** (string) - The prompt of the new example. - **response** (string) - The response of the new example. #### Response Example { "id": "new_example_id", "prompt": "What are Databricks SQL Warehouses?", "response": "SQL Warehouses are compute resources for running SQL queries..." } ``` -------------------------------- ### Get all statuses Source: https://docs.databricks.com/api/azure/workspace/libraries/allclusterstatuses Retrieves the status of all libraries installed on all clusters. This includes libraries installed via the API or the libraries UI. ```APIDOC ## GET /api/2.0/libraries/all-cluster-statuses ### Description Get the status of all libraries on all clusters. A status is returned for all libraries installed on this cluster via the API or the libraries UI. ### Method GET ### Endpoint /api/2.0/libraries/all-cluster-statuses ### Parameters #### Query Parameters This endpoint does not accept any query parameters. ### Request Body This endpoint does not accept a request body. ### Response #### Success Response (200) - **statuses** (Array of object) - A list of cluster statuses. Each object contains: - **cluster_id** (string) - Unique identifier for the cluster. - **library_statuses** (Array of object) - Status of all libraries on the cluster. Each object contains: - **is_library_for_all_clusters** (boolean) - Indicates if the library is set for all clusters. - **library** (object) - Details about the library (e.g., pypi, jar, whl). - **status** (string) - The current status of the library (e.g., INSTALLED, PENDING). ``` -------------------------------- ### Consumer Installation Request Sample Source: https://docs.databricks.com/api/azure/workspace/consumerinstallations/create This JSON payload represents a sample request to create a consumer installation. It includes details about the accepted terms, catalog, recipient type, repository, and share name. ```json { "accepted_consumer_terms": { "version": "string" }, "catalog_name": "string", "recipient_type": "DELTA_SHARING_RECIPIENT_TYPE_DATABRICKS", "repo_detail": { "repo_name": "string", "repo_path": "string" }, "share_name": "string" } ``` -------------------------------- ### ETag Examples for Versioning Source: https://docs.databricks.com/api/azure/account/accountaccesscontrol/getruleset Examples of the 'etag' parameter used for optimistic concurrency control. An empty etag can be used for GET requests with no freshness requirements. ```text etag= ``` ```text etag=RENUAAABhSweA4NvVmmUYdiU717H3Tgy0UJdor3gE4a+mq/oj9NjAf8ZsQ== ``` -------------------------------- ### List Budget Policies with Filters Source: https://docs.databricks.com/api/azure/account/budgetpolicy/list This example shows how to filter the list of budget policies by policy name and creator user name. Ensure that the filter parameters match the exact criteria you want to apply. ```bash curl -v -X GET \ -H "Authorization: Bearer " \ https:///api/2.1/accounts//budget-policies?filter_by.policy_name=my_policy_name&filter_by.creator_user_name=user@example.com ``` -------------------------------- ### Successful Consumer Installation Response Sample (200) Source: https://docs.databricks.com/api/azure/workspace/consumerinstallations/create This JSON payload is a sample response for a successful consumer installation. It contains details about the installation, including catalog name, ID, status, and token information. ```json { "installation": { "catalog_name": "string", "error_message": "string", "id": "string", "installed_on": 0, "listing_id": "string", "listing_name": "string", "recipient_type": "DELTA_SHARING_RECIPIENT_TYPE_DATABRICKS", "repo_name": "string", "repo_path": "string", "share_name": "string", "status": "INSTALLED", "token_detail": { "bearerToken": "string", "endpoint": "string", "expirationTime": "string", "shareCredentialsVersion": 0 }, "tokens": [ { "activation_url": "string", "created_at": 0, "created_by": "string", "expiration_time": 0, "id": "string", "updated_at": 0, "updated_by": "string" } ] } } ``` -------------------------------- ### Get Assignable Roles for Tag Policy Resource Source: https://docs.databricks.com/api/azure/workspace/accountaccesscontrolproxy/getassignablerolesforresource This example shows how to get assignable roles for a tag policy. Ensure that `` and `` are correctly specified. ```bash curl -X GET \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ "https:///api/2.0/preview/accounts/access-control/assignable-roles?resource=accounts//tagPolicies/" ``` -------------------------------- ### Get Run Details Source: https://docs.databricks.com/api/azure/workspace/jobs_21/getrun This endpoint retrieves detailed information about a specific job run. It includes timing information like setup duration, execution duration, and cleanup duration. It also provides the start time, current state, result state, and a list of tasks associated with the run. For runs with more than 100 tasks, pagination is supported using the `next_page_token`. ```APIDOC ## GET /api/2.0/jobs/runs/get ### Description Retrieves detailed information about a specific job run. ### Endpoint `/api/2.0/jobs/runs/get` ### Parameters #### Query Parameters - **run_id** (long) - Required - The ID of the run to retrieve. - **next_page_token** (string) - Optional - A token to retrieve the next page of task results. If more than 100 tasks are available, this field will be present in the response. ### Response #### Success Response (200) - **setup_duration** (long) - The time in milliseconds it took to set up the cluster. For runs on new clusters, this is the cluster creation time. For runs on existing clusters, this time should be very short. The `setup_duration` field is set to 0 for multitask job runs. - **start_time** (long) - The time at which this run was started in epoch milliseconds (milliseconds since 1/1/1970 UTC). This may not be the time when the job task starts executing, for example, if the job is scheduled to run on a new cluster, this is the time the cluster creation call is issued. - **life_cycle_state** (string) - Enum: `PENDING | RUNNING | TERMINATING | TERMINATED | SKIPPED | INTERNAL_ERROR | BLOCKED | WAITING_FOR_RETRY | QUEUED`. A value indicating the run's current lifecycle state. This field is always available in the response. - **queue_reason** (string) - The reason indicating why the run was queued. - **result_state** (string) - Enum: `SUCCESS | FAILED | TIMEDOUT | CANCELED | MAXIMUM_CONCURRENT_RUNS_REACHED | UPSTREAM_CANCELED | UPSTREAM_FAILED | EXCLUDED | SUCCESS_WITH_FAILURES | DISABLED`. A value indicating the run's result. This field is only available for terminal lifecycle states. - **state_message** (string) - A descriptive message for the current state. - **user_cancelled_or_timedout** (boolean) - A value indicating whether a run was canceled manually by a user or by the scheduler because the run timed out. - **status** (object) - The current status of the run. - **queue_details** (object) - If the run was queued, details about the reason for queuing the run. - **termination_details** (object) - If the run is in a TERMINATING or TERMINATED state, details about the reason for terminating the run. - **tasks** (Array of object) - The list of tasks performed by the run. Each task has its own `run_id` which you can use to call `JobsGetOutput` to retrieve the run results. If more than 100 tasks are available, you can paginate through them using jobs/getrun. Use the `next_page_token` field at the object root to determine if more results are available. - **alert_task** (object) - Public preview. The task evaluates an Azure Databricks alert and sends notifications to subscribers when the `alert_task` field is present. - **attempt_number** (integer) - The sequence number of this run attempt for a triggered job run. The initial attempt of a run has an `attempt_number` of 0. If the initial run attempt fails, and the job has a retry policy (`max_retries` > 0), subsequent runs are created with an `original_attempt_run_id` of the original attempt’s ID and an incrementing `attempt_number`. Runs are retried only until they succeed, and the maximum `attempt_number` is the same as the `max_retries` value for the job. - **clean_rooms_notebook_task** (object) - The task runs a clean rooms notebook when the `clean_rooms_notebook_task` field is present. - **cleanup_duration** (long) - The time in milliseconds it took to terminate the cluster and clean up any associated artifacts. The duration of a task run is the sum of the `setup_duration`, `execution_duration`, and the `cleanup_duration`. The `cleanup_duration` field is set to 0 for multitask job runs. - **cluster_instance** (object) - The cluster used for this run. If the run is specified to use a new cluster, this field is set once the Jobs service has requested a cluster for the run. - **condition_task** (object) - The task evaluates a condition that can be used to control the execution of other tasks when the `condition_task` field is present. The condition task does not require a cluster to execute and does not support retries or notifications. - **dashboard_task** (object) - The task refreshes a dashboard and sends a snapshot to subscribers. - **dbt_task** (object) - The task runs one or more dbt commands when the `dbt_task` field is present. The dbt task requires both Databricks SQL and the ability to use a serverless or a pro SQL warehouse. - **depends_on** (Array of object) - An optional array of objects specifying the dependency graph of the task. All tasks specified in this field must complete successfully before executing this task. The key is `task_key`, and the value is the name assigned to the dependent task. - **description** (string) - <= 1000 characters. This is the description for this task. #### Response Example { "setup_duration": 12345, "start_time": 1625060460483, "life_cycle_state": "RUNNING", "queue_reason": "", "result_state": "", "state_message": "Run is executing.", "user_cancelled_or_timedout": false, "status": { "state": "RUNNING" }, "queue_details": {}, "termination_details": {}, "tasks": [ { "task_key": "Task 1", "attempt_number": 0, "cleanup_duration": 5000, "description": "This is the first task.", "depends_on": [], "run_id": 123456789, "setup_duration": 7345, "execution_duration": 10000, "start_time": 1625060465483, "end_time": 1625060482828, "state": "SUCCESS", "result_state": "SUCCESS" } ], "run_id": 987654321, "run_page_url": "https://#job/123/run/456", "run_duration": 20000, "job_id": 123, "creator_user_name": "user@example.com", "user_type": "ADMIN", "schedule": { "quartz_cron_expression": "0 0 10 * * ?", "timezone_id": "UTC" }, "is_completed": false, "cluster_instance": { "cluster_id": "0123-456789-abcdefg", "spark_version": "11.3.x-scala2.12", "node_type_id": "Standard_DS3_v2" }, "next_page_token": "" } ``` -------------------------------- ### Example Request Parameters Source: https://docs.databricks.com/api/azure/workspace/jobs/exportrun Example of how to specify the `run_id` and `views_to_export` parameters for the export run API. ```bash run_id=455644833 views_to_export=CODE ``` -------------------------------- ### Create an example for a Knowledge Assistant Source: https://docs.databricks.com/api/azure/workspace/knowledgeassistants/listexamples Creates a new example within a specified knowledge assistant. This allows users to add new content or data points to enhance the assistant's knowledge base. ```APIDOC ## POST /api/2.0/knowledge-assistants/{assistant_id}/examples ### Description Creates a new example for a given knowledge assistant. ### Method POST ### Endpoint /api/2.0/knowledge-assistants/{assistant_id}/examples ### Parameters #### Path Parameters - **assistant_id** (string) - Required - The unique identifier of the knowledge assistant. #### Request Body - **content** (string) - Required - The content of the example to be created. - **metadata** (object) - Optional - Additional metadata for the example. ``` -------------------------------- ### Example Response for Get App Permission Levels Source: https://docs.databricks.com/api/azure/workspace/apps/getpermissionlevels This is an example of a successful response when retrieving app permission levels. It lists the descriptions and the specific permission levels available. ```json { "permission_levels": [ { "description": "string", "permission_level": "CAN_MANAGE" } ] } ``` -------------------------------- ### Install Libraries with Databricks API Source: https://docs.databricks.com/api/azure/workspace/libraries/install Example JSON payload for installing various types of libraries on a Databricks cluster. Includes PyPI, JAR, Wheel, Maven, CRAN, and requirements.txt. ```json { "cluster_id": "1234-56789-abcde", "libraries": [ { "pypi": { "package": "numpy", "repo": "http://my-pypi-repo.com" } }, { "jar": "/Workspace/path/to/library.jar" }, { "whl": "/Workspace/path/to/library.whl" }, { "maven": { "coordinates": "com.databricks:spark-csv_2.11:1.5.0", "exclusions": [ "org.slf4j:slf4j-log4j12" ], "repo": "http://my-maven-repo.com" } }, { "cran": { "package": "ggplot2", "repo": "http://cran.us.r-project.org" } }, { "requirements": "/Workspace/path/to/requirements.txt" } ] } ``` -------------------------------- ### Install from a Databricks Marketplace Listing Source: https://docs.databricks.com/api/azure/workspace/consumerinstallations/create Use this endpoint to install a Databricks Marketplace listing. You need to provide the listing ID and details about the installation, such as the catalog name and recipient type. For Git repo installations, specify the repo name and path. ```bash POST /api/2.1/marketplace-consumer/listings/{listing_id}/installations { "accepted_consumer_terms": { "version": "string" }, "catalog_name": "string", "recipient_type": "DELTA_SHARING_RECIPIENT_TYPE_DATABRICKS | DELTA_SHARING_RECIPIENT_TYPE_OPEN", "repo_detail": { "repo_name": "string", "repo_path": "string" }, "share_name": "string" } ```