Riksdagsmonitor Intelligence Platform โ€” API Documentation - v1.0.30
    Preparing search index...

    Function resolveSdmxSubscriptionKey

    • Resolve the IMF SDMX subscription key.

      Resolution order:

      1. Explicit override (constructor / CLI argument)
      2. process.env.IMF_SDMX_SUBSCRIPTION_KEY (primary, required)
      3. Empty string โ€” caller sends no Ocp-Apim-Subscription-Key header, which IMF Azure APIM masks as HTTP 404 on /data/... endpoints. The ImfHttpError message disambiguates.

      IMF_SDMX_SUBSCRIPTION_KEY_SECONDARY is intentionally not read here. It is the cold rotation key, stored only โ€” see analysis/imf/agentic-integration.md ยง"Pre-warm gate" โ†’ "Key rotation".

      Parameters

      • Optionaloverride: string

        Optional explicit key (test fixtures / programmatic).

      Returns string

      Empty string when no key configured; never throws.