< Back

Invoke-DatabricksAPI

Sat Jan 11, 2020 10:00 am

NAME Invoke-DatabricksAPI



SYNOPSIS

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

created yet





SYNTAX

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

[<CommonParameters>]



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





PARAMETERS

-BearerToken <String>

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



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Region <String>

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



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-API <String>

Databricks REST API to Call



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Body <Hashtable>

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



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Method <String>



Required? false

Position? named

Default value GET

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES





Author: Simon D'Morias / Data Thirst Ltd



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Invoke-DatabricksAPI -BearerToken $BearerToken -Region $Region -API "api/2.0/clusters/list" -Method GET



Returns all clusters











RELATED LINKS