List versions for a custom FHIR profile

GET/fhir/profiles/{id}/versions

Returns retained versions for a custom profile.

RequiresBearerauthentication

Path parameters

idstringrequired

The lowercase StructureDefinition id of the custom profile.

Returns  

List of profile versions

Response fields

versionsobject[]required
idstringrequired

The lowercase StructureDefinition id, used as the profile's lookup key.

sourcestringrequired

The profile's origin. Profile management responses currently return custom (uploaded) profiles, so this is always "custom" today.

custombuiltin
resource_typestringrequired

The FHIR resource type from the StructureDefinition.

urlstringrequired

The canonical URL from the StructureDefinition.

versionstringrequired

The version from the StructureDefinition.version field.

statusstringoptional

The publication status from StructureDefinition.status. Expected FHIR values include draft, active, retired, and unknown; the server preserves authored strings.

datestringoptional

The authored publication date from StructureDefinition.date, when present. This is a FHIR dateTime string and may be less precise than a full timestamp.

canonicalstringrequired

The canonical profile reference, including the version pin when present.

fhir_versionstringrequired

The base FHIR version the StructureDefinition targets.

implementation_guidestringrequired

The implementation guide the profile belongs to.

created_atstring (date-time)required
updated_atstring (date-time)required

Last update timestamp for the profile's current StructureDefinition. For retained versions, this equals created_at.

GETRequest
# Get authentication token
PHENOML_TOKEN=$(curl -X POST "https://experiment.app.pheno.ml/v2/auth/token" \
  -u "$PHENOML_CLIENT_ID:$PHENOML_CLIENT_SECRET" \
  | jq -r '.access_token')

curl -X GET "https://experiment.app.pheno.ml/fhir/profiles/custom-patient/versions" \
  -H "Authorization: Bearer $PHENOML_TOKEN"
200 OKExample Response
{
  "versions": [
    {
      "id": "custom-patient",
      "source": "custom",
      "resource_type": "Patient",
      "url": "http://phenoml.com/fhir/StructureDefinition/custom-patient",
      "version": "2.0.0",
      "status": "active",
      "date": "2026-08-26",
      "canonical": "http://phenoml.com/fhir/StructureDefinition/custom-patient|2.0.0",
      "fhir_version": "4.0.1",
      "implementation_guide": "acme-cardiology",
      "created_at": "2026-08-26T15:04:05Z",
      "updated_at": "2026-08-26T15:04:05Z"
    },
    {
      "id": "custom-patient",
      "source": "custom",
      "resource_type": "Patient",
      "url": "http://phenoml.com/fhir/StructureDefinition/custom-patient",
      "version": "1.0.0",
      "status": "active",
      "date": "2026-08-24",
      "canonical": "http://phenoml.com/fhir/StructureDefinition/custom-patient|1.0.0",
      "fhir_version": "4.0.1",
      "implementation_guide": "acme-cardiology",
      "created_at": "2026-08-24T15:04:05Z",
      "updated_at": "2026-08-24T15:04:05Z"
    }
  ]
}