Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Invoke DatabricksAPI

Simon D'Morias edited this page Oct 18, 2019 · 1 revision

external help file: azure.databricks.cicd.tools-help.xml Module Name: azure.databricks.cicd.tools online version: schema: 2.0.0

Invoke-DatabricksAPI

SYNOPSIS

Execute any Databricks API directly, it will authenticate for you. Useful where a PowerShell command has not been created yet

SYNTAX

Bearer

Invoke-DatabricksAPI -BearerToken <String> [-Region <String>] -API <String> [-Body <Hashtable>]
 [-Method <String>] [<CommonParameters>]

AAD

Invoke-DatabricksAPI [-Region <String>] -API <String> [-Body <Hashtable>] [-Method <String>]
 [<CommonParameters>]

DESCRIPTION

Execute any Databricks API directly, it will authenticate for you. Useful where a PowerShell command has not been created yet

EXAMPLES

EXAMPLE 1

Invoke-DatabricksAPI -BearerToken $BearerToken -Region $Region -API "api/2.0/clusters/list" -Method GET

Returns all clusters

PARAMETERS

-BearerToken

Your Databricks Bearer token to authenticate to your workspace (see User Settings in Datatbricks WebUI)

Type: String
Parameter Sets: Bearer
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Region

Azure Region - must match the URL of your Databricks workspace, example northeurope

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-API

Databricks REST API to Call

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Body

Hashtable to pass: For example @{clusterId="abc-123";name="bob"}

Type: Hashtable
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Method

{{ Fill Method Description }}

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: GET
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

Author: Simon D'Morias / Data Thirst Ltd

RELATED LINKS

Clone this wiki locally