1
votes

I am a new user of the Azure platform, and am having trouble understanding how differents parts are conected. I have data in a Storage blob that I would like to use to make HTTPS POST requests to a web service. My question therfore is as follows: How can I send data from my Azure storage blob to a REST API endpoint?

1
If I understand correctly, you have an application (web application) where you want to read the contents of blobs. Is my understanding correct?Gaurav Mantri
I have a file that i want to upload to azure and use to post data to a REST API on a website that is not mine.dagrun

1 Answers

2
votes

First, let's start with a little background:

Azure Resource Manager (ARM)

ARM is the REST API that you interface with, using the Azure Portal, PowerShell module, or cross-platform (xPlat) CLI tool, in order to provision and manage cloud resources inside your Azure subscription (account). In order to provision resources, you must first create a Resource Group, essentially a management container for various cloud resource instances.

Azure Storage (Blob)

Microsoft Azure Storage offers several different services:

  • Blob (unstructured, flat data storage)
  • Files (cloud-based SMB share for Azure VMs)
  • Queue (FIFO / LIFO queues, similar to Azure Service Bus)
  • Table (NOSQL partitioned storage)

Of these types of storage, Blob storage is arguably the most common. In order to utilize any of these storage services, you must first provision a Storage Account inside an ARM Resource Group (see above). To specifically utilize blob storage, you create a Blob Container inside your Storage Account, and then create or upload blobs into this container(s). Once data is stored in an Azure Blob Container, it does not move unless a service explicitly requests the data.

Azure App Service

If you're deploying a Web App (with a front end) or a REST API App (no front end), you'll be using Microsoft Azure's App Service offering. One unique feature of Azure App Service's Web App (I know, it's a mouthful) offering is WebJobs. WebJobs essentially allow you to run arbitrary code in the cloud, kind of like a background worker process. You can trigger WebJobs when blobs are created or uploaded, using this document.

Essentially, you use the [BlobTrigger()] .NET attribute, from the Azure WebJobs SDK, to designate code that will be executed inside Azure WebJobs whenever a new blob is created. The code that executes could grab the blob data, and send it off to your REST API endpoint.