Set active authentication configuration

PATCH/fhir-provider/{fhir_provider_id}/set-active-auth-config

Sets which authentication configuration should be active for a FHIR provider. Only one auth config can be active at a time.

If the specified auth config is already active, the request succeeds without making any changes and returns a message indicating the config is already active.

Note: Sandbox providers cannot be modified.

RequiresBearerauthentication

Path parameters

fhir_provider_idstringrequired

ID of the FHIR provider

Body parameters

auth_config_idstringrequired

ID of the auth configuration to set as active

Returns  

Active auth configuration set successfully, or the config was already active. Check the message field to determine which case occurred.

Response fields

successbooleanoptional
messagestringoptional
dataoneOfoptional

Provider details. Sandbox providers return FhirProviderSandboxInfo.

PATCHRequest
curl -X PATCH 'https://experiment.app.pheno.ml/fhir-provider/%7Bfhir_provider_id%7D/set-active-auth-config' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "auth_config_id": "auth-config-123"
}'
200 OKResponse
{
  "success": true,
  "message": "Active auth configuration set successfully, or the config was already active.\nCheck the message field to determine which case occurred.",
  "data": {
    "id": "1716d214-de93-43a4-aa6b-a878d864e2ad",
    "name": "Epic Sandbox",
    "description": "Epic sandbox environment for testing",
    "provider": "epic",
    "base_url": "https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4",
    "client_id": "your-client-id",
    "auth_configs": {},
    "last_updated": "2024-01-15T10:30:00Z"
  }
}