Manage FHIR packages with npm-style operations exposed as FHIR operations.

$fhir-package-install

Installs FHIR Implementation Guide packages from a registry or direct URL. Downloads, validates, and installs packages along with their dependencies.

The default NPM registry URL can be changed via the FHIR NPM Package registry setting.

POST /fhir/$fhir-package-install

Installation Behavior

During installation, Aidbox performs pinning and tree-shaking on canonicals:

  • The Core package (e.g., hl7.fhir.r4.core) is automatically installed if missing.
  • The Terminology (THO) package must be provided explicitly if needed.
  • Only referenced canonicals from dependency packages are included (tree-shaking).
  • Each canonical <url>|<version> pair is unique in the final result.

For details on the candidate selection algorithm and recursive pinning process, see Pinning and Tree-Shaking.

Input Parameters

NameCard.TypeDescription
package1..*stringPackage specification in one of the following formats:
  • <name>@<version> — identifier from the registry (e.g., hl7.fhir.us.core@5.0.0)
  • https:// — remote gzipped tarball URL (e.g., https://example.org/package.tgz)
  • file:// — local gzipped tarball path (e.g., file:///path/to/package.tgz)
registry0..1urlPackage registry URL used for resolving non-local packages.
Defaults to https://fs.get-ig.org/pkgs.

Output Parameters

ParameterCardinalityTypeExampleDescription
result1..1booleantrueWhether the installation succeeded.
package1..*Installed package information.
package.name1..1stringhl7.fhir.us.core@5.0.0Package identifier in <name>@<version> format.
package.installedCanonicals1..1integer194Number of canonical resources installed.
package.intention1..1stringdirect / transitiveWhether installed directly or as a dependency.
package.source.type1..1stringnpm / fileSource type from which the package was fetched.
package.source.registry0..1stringhttps://fs.get-ig.org/pkgsPackage registry URL.

Examples

Install package from default registry
POST /fhir/$fhir-package-install
Content-Type: application/json
Accept: application/json

{
  "resourceType": "Parameters",
  "parameter": [
    {
      "name": "package",
      "valueString": "hl7.fhir.us.core@5.0.0"
    }
  ]
}
Install package from specific registry
POST /fhir/$fhir-package-install
Content-Type: application/json
Accept: application/json

{
  "resourceType": "Parameters",
  "parameter": [
    {
      "name": "package",
      "valueString": "hl7.fhir.us.core@5.0.0"
    },
    {
      "name": "registry",
      "valueString": "https://packages.simplifier.net"
    }
  ]
}
Install latest version of package
POST /fhir/$fhir-package-install
Content-Type: application/json
Accept: application/json

{
  "resourceType": "Parameters",
  "parameter": [
    {
      "name": "package",
      "valueString": "hl7.fhir.us.core"
    }
  ]
}
Install package from a local file
POST /fhir/$fhir-package-install
Content-Type: application/json
Accept: application/json

{
  "resourceType": "Parameters",
  "parameter": [
    {
      "name": "package",
      "valueString": "file:///tmp/my-package.tgz"
    }
  ]
}
Install multiple packages
POST /fhir/$fhir-package-install
Content-Type: application/json
Accept: application/json

{
  "resourceType": "Parameters",
  "parameter": [
    {
      "name": "package",
      "valueString": "hl7.fhir.us.core@5.0.0"
    },
    {
      "name": "package",
      "valueString": "hl7.fhir.us.mcode@2.0.0"
    }
  ]
}

$fhir-package-uninstall

Uninstalls FHIR Implementation Guide packages from the server. Removes the specified packages and their canonical resources.

POST /fhir/$fhir-package-uninstall

Input Parameters

NameCard.TypeDescription
package1..*stringPackage identifier in <name>@<version> format (e.g., hl7.fhir.us.core@5.0.0).

Output Parameters

ParameterCardinalityTypeExampleDescription
result1..1booleantrueWhether the uninstallation succeeded.
package1..*Uninstalled package information.
package.name1..1stringhl7.fhir.us.core@5.0.0Package identifier in <name>@<version> format.
package.status1..1stringdeletedStatus of the uninstallation.

Examples

Uninstall package
POST /fhir/$fhir-package-uninstall
Content-Type: application/json
Accept: application/json

{
  "resourceType": "Parameters",
  "parameter": [
    {
      "name": "package",
      "valueString": "hl7.fhir.us.core@8.0.0"
    }
  ]
}

See also