Skip to content

Latest commit

 

History

History
76 lines (55 loc) · 3.87 KB

data-lake-store-get-started-rest-api.md

File metadata and controls

76 lines (55 loc) · 3.87 KB
title description services documentationcenter author manager editor ms.assetid ms.service ms.devlang ms.topic ms.date ms.author
REST API: Account management operations on Azure Data Lake Store | Microsoft Docs
Use Azure Data Lake Store and WebHDFS REST API to perform account management operations in the Data Lake Store
data-lake-store
nitinme
jhubbard
cgronlun
57ac6501-cb71-4f75-82c2-acc07c562889
data-lake-store
na
conceptual
05/29/2018
nitinme

Account management operations on Azure Data Lake Store using REST API

[!div class="op_single_selector"]

In this article, you learn how to perform account management operations on Data Lake Store using the REST API. Account management operations include creating a Data Lake Store account, deleting a Data Lake Store account, etc. For instructions on how to perform filesystem operations on Data Lake Store using REST API, see Filesystem operations on Data Lake Store using REST API.

Prerequisites

  • An Azure subscription. See Get Azure free trial.

  • cURL. This article uses cURL to demonstrate how to make REST API calls against a Data Lake Store account.

How do I authenticate using Azure Active Directory?

You can use two approaches to authenticate using Azure Active Directory.

Create a Data Lake Store account

This operation is based on the REST API call defined here.

Use the following cURL command. Replace <yourstorename> with your Data Lake Store name.

curl -i -X PUT -H "Authorization: Bearer <REDACTED>" -H "Content-Type: application/json" https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.DataLakeStore/accounts/<yourstorename>?api-version=2015-10-01-preview -d@"C:\temp\input.json"

In the above command, replace <REDACTED> with the authorization token you retrieved earlier. The request payload for this command is contained in the input.json file that is provided for the -d parameter above. The contents of the input.json file resemble the following snippet:

{
"location": "eastus2",
"tags": {
    "department": "finance"
    },
"properties": {}
}    

Delete a Data Lake Store account

This operation is based on the REST API call defined here.

Use the following cURL command to delete a Data Lake Store account. Replace <yourstorename> with your Data Lake Store name.

curl -i -X DELETE -H "Authorization: Bearer <REDACTED>" https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.DataLakeStore/accounts/<yourstorename>?api-version=2015-10-01-preview

You should see an output like the following snippet:

HTTP/1.1 200 OK
...
...

Next steps

See also