Blob PUT with SAS key, works in postman but not from IBM ACE HTTP - help needed

John Carew 20 Reputation points
2024-06-11T21:08:06.6766667+00:00

I could only PUT an empty File in the AZure container as type BlockBlob with the IBM ACE HTTP Request Node...but on another system the same Ace Code code also put content.

  • also when testing using POSTMAN, I can PUT and GET with one command including content.
  • On another system when doing 'put' from postman a binary file is put directly to azure. The file is created and there is content without any other command.
  • When doing a put from a different IBM ACE system using HTTPRequest Node the binary file is created and populated without any follow up commands.

The issue is that the HttpRequest for 'Put' seems to be treated differently than that from the other systems like POSTMAN and my other IBM ACE systems.

I mean given that Postman works fine with the same SAS KEY on a PUT request, and it works on other ACE Systems with different accounts that seem to all having the same settings -

does anyone have any ideas about issues?

---A 'PUT' from POSTMAN works fine...

For example:

When doing 'put' from postman a binary file is put directly to azure. The file is created and there is content without any other command.

When doing a put from a different IBM ACE system using HTTPRequest Node the binary file is created and populated without any follow up commands so there are no PUT BLOB and PUT BLOCK LIST issues.

So there must be something else...

Solved!!!

The issue was the API Version on which I created the container.

By default the latest Azure API Version is used for the container and it behaves differently to older versions.

using postman create a container aligned to the older API....

PUT - https://<storage account>.blob.core.windows.net/oldapi?restype=container&api-version=2011-08-18&<put the SAS KEY here>

then the put works normally from ACE.

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,557 questions
0 comments No comments
{count} votes

Accepted answer
  1. Nehruji R 3,801 Reputation points Microsoft Vendor
    2024-06-19T12:51:41.96+00:00

    John, I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this!

    Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer. Accepted answers show up at the top, resulting in improved discoverability for others.

    Issue: The issue is that the HttpRequest for 'Put' seems to be treated differently than that from the other systems like POSTMAN and other IBM ACE systems.

     

    Cause: The issue was the API Version on which the container is created.

    Solution: After updating the Azure API Version used for the container creation, put works normally from ACE.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Nehruji R 3,801 Reputation points Microsoft Vendor
    2024-06-12T07:26:20.9733333+00:00

    Hello John Carew,

    Greetings! Welcome to Microsoft Q&A Platform.

    I understand that you’re encountering an issue with uploading content to a BLOB using the HTTP Request node in IBM App Connect Enterprise (ACE). Here are some common troubleshooting steps you can take to diagnose and resolve the issue:

    1. Check Azure Storage Account Configuration: Ensure that your Azure Blob Storage account is properly configured and accessible. Double-check the account name, account key, or connection string you are using in your application to access the storage account.
    2. Verify SAS Token or Shared Access Signature (SAS): If you are using a Shared Access Signature (SAS) to access the storage account, make sure that the SAS is still valid and has the necessary permissions (e.g., "write" permission) to upload files to the container.
    3. Test with Different Blob Storage Account: Create a new Blob Storage account (if possible) and try uploading a file to it using your application. This can help identify whether the issue is specific to the storage account or if it's related to your application's code or configuration.
    4. Review Changes: If the issue persists, review any recent changes you made to your application related to file uploads. Compare it with a previous version that was working correctly to identify any potential issues or regressions.
    5. Check for Network or Firewall Issues: Ensure that there are no network or firewall issues that might be preventing your application from accessing the Blob Storage account.
    6. Update SDK or Libraries: If you are using any Azure SDK or third-party libraries to interact with Azure Blob Storage, make sure you are using the latest versions. Older versions might have compatibility issues.

    When using Put Block you need to follow-up and use the Put Block List to successfully upload the file. There are some error and solutions for it in this MS Doc which you might find helpful.

    If you have checked all of these things and are still having issues, please revert with error message and you can also try using a different tool or library to upload files to your Azure Blob Storage account to see if that resolves the issue.

    Hope this answer helps! Please let us know if you have any further queries. I’m happy to assist you further.


    Please "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


  2. John Carew 20 Reputation points
    2024-06-19T12:37:57.0066667+00:00

    Solved!!!

    The issue was the API Version on which I created the container.

    By default the latest Azure API Version is used for the container and it behaves differently to older versions.

    using postman create a container aligned to the older API....

    PUT - https://<storage account>.blob.core.windows.net/oldapi?restype=container&api-version=2011-08-18&<put the SAS KEY here>

    then the put works normally from ACE.

    0 comments No comments