none
List created disks via API REST (ARM)

    Question

  • Hi all,

    I am facing a problem with datadisks with the new ARM API. I would like to list the available disks in a storage account.

    I checked the documentation (https://msdn.microsoft.com/en-us/library/azure/mt163683.aspx) but I have not been able to solve my problem.

    Do you have any idea on how I can achieve this?

    Thank you in advance!

    Louis

    Wednesday, October 7, 2015 3:17 PM

Answers

  • Hi Louis,

    The official documentation for Azure Storage authentication does state that you'll need to use the account key. It states "To authenticate a request, you must sign the request with the key for the account that is making the request and pass that signature as part of the request."

    Also, the operation you're looking for is the List Blobs operation which will list all objects within the container you specify.   

    Friday, October 16, 2015 9:02 PM
    Moderator

All replies

  • Hi Louis,

    I suggest you to check this article to list the containers in the storage account. Hope this helps you.

    https://msdn.microsoft.com/en-us/library/dd179352.aspx

    Ref: http://geekswithblogs.net/gotchas/archive/2011/10/03/windows-azure-storage-rest-api.aspx

    I believe this is for Azure service management. For ARM I am searching for documentation.

    I guess, we do not have the List containers operation for ARM yet. Let me check and get back to you at the earliest.

    Girish Prajwal

    Thursday, October 8, 2015 2:40 PM
    Moderator
  • Hi Girish,

    Thanks for your help!

    The links you provided are really interesting. I assume now that a dedicated API is available for the object placed within a storage account.

    However, I tried to follow the guide, and I am really confused about the authentication process. They say that you have to encrypt some fields from the HTTP header to sign the request, but no indication is given about the authentication for non-public storage account.

    I have seen that keys are available in the storage account, what are they used for? Are they only relevant with the old API (ie ASM)?

    Thanks for your response.

    Best regards

    Louis

    Tuesday, October 13, 2015 7:03 AM
  • Ok, I somehow manage to get what I want.

    From my point of view, I assume that a dedicated API exists for objects within a storage account. I believe it was already the case for the ASM REST API.

    In the doc given by Girish, information is missing:

    1. You need one of the storage account key to sign the request.
    2. The given key is encoded in base64, you need to decode it before you can use it.
    3. Encrypt the signature with the decoded key using SHA256.
    4. Encode in base64 the result: you have your signature.

    Hence, you can follow the guide to form requests and body.

    So,  Girish, do you have any further information about an update of the storage API? Now, the response is in an XML format, just like ASM does. So maybe some changes will be done, like a storage API v2.

    Thank you for your help!

    Best regards,

    Louis

    EDIT: the usage of storage account's keys is not mentionned in the official doc neither (https://msdn.microsoft.com/en-us/library/dd179428.aspx), is it possible to update it with the information I given?

    • Edited by louis.dv Thursday, October 15, 2015 1:36 PM
    Thursday, October 15, 2015 1:33 PM
  • Hi Louis,

    Thank you for your wonderful peace of information.

    I would provide these details to our content writers to modify the document after they test and verify it.

    Girish Prajwal

    Thursday, October 15, 2015 5:21 PM
    Moderator
  • Hi Louis,

    The official documentation for Azure Storage authentication does state that you'll need to use the account key. It states "To authenticate a request, you must sign the request with the key for the account that is making the request and pass that signature as part of the request."

    Also, the operation you're looking for is the List Blobs operation which will list all objects within the container you specify.   

    Friday, October 16, 2015 9:02 PM
    Moderator
  • Hi Michael,

    I do agree with you, I have seen this, but I think this information is not clear enough for newbie like me ;)

    Furthermore, at the end of the documentation, you can see: "Signature=Base64(HMAC-SHA256(UTF8(StringToSign)))", that can be misleading. And, in the storage account reference (https://msdn.microsoft.com/en-us/library/azure/mt163589.aspx), you do not specify that the keys are encoded in base64. Maybe this is a classic convention, but writing this information may be worth.

    Best regards,

    Louis

    Monday, October 19, 2015 8:26 AM