cURL을 사용하여 Azure Health Data Services에 액세스

이 문서에서는 cURL을 사용하여 Azure Health Data Services에 액세스하는 방법을 알아봅니다.

필수 조건

PowerShell

CLI

Azure 액세스 토큰 가져오기

Azure Health Data Services에 액세스하기 전에 사용자 또는 클라이언트 앱에 적절한 권한을 부여해야 합니다. 권한을 부여하는 방법에 대한 자세한 내용은 Azure Health Data Services 권한 부여를 참조하세요.

Azure Health Data Services에 대한 Azure 액세스 토큰을 가져오는 방법에는 여러 가지가 있습니다.

참고 항목

Azure에 로그인했고 Azure Health Data Services 인스턴스를 배포한 Azure 구독 및 테넌트에 있는지 확인합니다.

### check Azure environment and PowerShell versions
Get-AzContext 
Set-AzContext -Subscription <subscriptionid>
$PSVersionTable.PSVersion
Get-InstalledModule -Name Az -AllVersions
curl --version

### get access token for the FHIR service
$fhirservice="https://<fhirservice>.fhir.azurehealthcareapis.com"
$token=(Get-AzAccessToken -ResourceUrl $fhirservice).Token

### Get access token for the DICOM service
$dicomtokenurl= "https://dicom.healthcareapis.azure.com/"
$token=$( Get-AzAccessToken -ResourceUrl $dicomtokenurl).Token

참고 항목

FHIR 서비스 대상 그룹 매개 변수가 FHIR 서비스 엔드포인트 URL에 매핑되지 않는 시나리오에서 리소스 매개 변수 값은 FHIR 서비스 인증 블레이드의 대상 그룹 값에 매핑되어야 합니다.

FHIR 서비스의 데이터 액세스

$fhirservice="https://<fhirservice>.fhir.azurehealthcareapis.com"

curl -X GET --header "Authorization: Bearer $token" $fhirservice/Patient

Access data in the FHIR service with curl script.

DICOM 서비스의 데이터 액세스

$dicomservice="https://<dicomservice>.dicom.azurehealthcareapis.com"

curl -X GET --header "Authorization: Bearer $token" $dicomservice/changefeed?includemetadata=false

Access data in the DICOM service with curl script.

다음 단계

이 문서에서는 cURL을 사용하여 Azure Health Data Services 데이터에 액세스하는 방법을 알아보았습니다.

Visual Studio Code에서 REST 클라이언트 확장을 사용하여 Azure Health Data Services 데이터에 액세스하는 방법에 대한 자세한 내용은 다음을 참조하세요.

FHIR®은 HL7의 등록 상표이며, HL7의 사용 허가 하에 사용됩니다.