{
  "info": {
    "_postman_id": "5194507e-0b29-4eb4-858b-e3b221409a10",
    "name": "FHIR Data Lake API",
    "description": "OpenAPI contract for the **Apex FHIR Data Lake** \u2014 Parker Apex's GPID-centered longitudinal clinical store.\n\nThe lake has two public surfaces:\n\n1. **`lake.parkerapex.com`** \u2014 HAPI FHIR R4 REST API (read/write/search, bulk `$export`). Primary store for\n   resources synced from Nexus, CMS partners, Beacon, Prime, and Pulse outboxes.\n\n2. **`app.lake.parkerapex.com`** \u2014 Lake administration & analytics API (FastAPI): FHIR ingest pipeline,\n   data quality metrics, lineage tracking, dataset catalog, and GPID master search.\n\nAuthentication: Plexus OAuth bearer tokens (`HAPI_FHIR_AUTH_MODE=oauth_only` in production). Service\nintegrations may use `X-Apex-Service-Key` on ingest boundaries. All writes must include GPID and tenant\ninstance tags per the [lake contract](https://developers.parkerapex.com/lake).\n\nSource repo: [apex-data-lake](https://github.com/ParkerApex/apex-data-lake) (HAPI deploy + lake-first APIs).\n",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{access_token}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://lake.parkerapex.com/fhir/R4",
      "type": "string"
    },
    {
      "key": "access_token",
      "value": "REPLACE_WITH_TOKEN",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "FHIR R4",
      "item": [
        {
          "name": "HAPI FHIR CapabilityStatement",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/metadata",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "metadata"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Search Patient resources in the lake",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/Patient",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "Patient"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Create Patient in HAPI lake",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/Patient",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "Patient"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{}"
            }
          }
        }
      ]
    },
    {
      "name": "Bulk Export",
      "item": [
        {
          "name": "Bulk NDJSON export from lake",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/$export",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "$export"
              ]
            },
            "description": ""
          }
        }
      ]
    },
    {
      "name": "Ingest",
      "item": [
        {
          "name": "Ingest FHIR Bundle into lake pipeline",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/fhir/ingest",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "fhir",
                "ingest"
              ]
            },
            "description": "Validates resources, applies GPID + tenant contract, writes to BigQuery staging and HAPI.",
            "body": {
              "mode": "raw",
              "raw": "{}"
            }
          }
        }
      ]
    },
    {
      "name": "Quality",
      "item": [
        {
          "name": "Data quality metrics by layer",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/quality",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "quality"
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Lake platform overview",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/overview",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "overview"
              ]
            },
            "description": "Total resources, storage, layer statistics, CDC lag, freshness."
          }
        }
      ]
    },
    {
      "name": "Lineage",
      "item": [
        {
          "name": "Provenance and lineage for a lake resource",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/lineage/{resource_id}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "lineage",
                "{resource_id}"
              ]
            },
            "description": ""
          }
        }
      ]
    },
    {
      "name": "Datasets",
      "item": [
        {
          "name": "Curated dataset catalog",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/datasets",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "datasets"
              ]
            },
            "description": ""
          }
        }
      ]
    },
    {
      "name": "GPID Master",
      "item": [
        {
          "name": "GPID master index search",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/gpid-master/search",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "gpid-master",
                "search"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{}"
            }
          }
        }
      ]
    }
  ]
}