Quickstart: Deploy Azure API for FHIR using Azure CLI
Important
Azure API for FHIR will be retired on September 30, 2026. Follow the migration strategies to transition to Azure Health Data Services FHIR® service by that date. Due to the retirement of Azure API for FHIR, new deployments won't be allowed beginning April 1, 2025. Azure Health Data Services FHIR service is the evolved version of Azure API for FHIR that enables customers to manage FHIR, DICOM, and MedTech services with integrations into other Azure services.
In this quickstart, you learn how to deploy Azure API for FHIR in Azure using the Azure CLI.
If you don't have an Azure subscription, create an Azure free account before you begin.
Prerequisites
Use the Bash environment in Azure Cloud Shell. For more information, see Quickstart for Bash in Azure Cloud Shell.
If you prefer to run CLI reference commands locally, install the Azure CLI. If you're running on Windows or macOS, consider running Azure CLI in a Docker container. For more information, see How to run the Azure CLI in a Docker container.
If you're using a local installation, sign in to the Azure CLI by using the az login command. To finish the authentication process, follow the steps displayed in your terminal. For other sign-in options, see Sign in with the Azure CLI.
When you're prompted, install the Azure CLI extension on first use. For more information about extensions, see Use extensions with the Azure CLI.
Run az version to find the version and dependent libraries that are installed. To upgrade to the latest version, run az upgrade.
Add Azure Health Data Services (for example, HealthcareAPIs) extension
az extension add --name healthcareapis
To get a list of commands for HealthcareAPIs:
az healthcareapis --help
Create Azure Resource Group
Pick a name for the resource group that contains the Azure API for FHIR and create it:
az group create --name "myResourceGroup" --location westus2
Deploy the Azure API for FHIR
az healthcareapis create --resource-group myResourceGroup --name nameoffhiraccount --kind fhir-r4 --location westus2
Fetch FHIR API capability statement
Obtain a capability statement from the FHIR API with the following command:
curl --url "https://nameoffhiraccount.azurehealthcareapis.com/metadata"
Clean up resources
If you're not going to continue to use this application, delete the resource group with the following steps.
az group delete --name "myResourceGroup"
Next steps
In this quickstart guide, you deployed the Azure API for FHIR into your subscription. For information about how to register applications, and the Azure API for FHIR configuration settings, see the following.
Note
FHIR® is a registered trademark of HL7 and is used with the permission of HL7.