{
  "opencollection": "1.0.0",
  "info": {
    "name": "SMART Health IT Sandbox FHIR APIs Bulk Data API",
    "version": "1.0"
  },
  "request": {
    "auth": {
      "type": "oauth2",
      "flow": "client_credentials",
      "accessTokenUrl": "https://launch.smarthealthit.org/v/r4/auth/token",
      "credentials": {
        "clientId": "{{clientId}}",
        "clientSecret": "{{clientSecret}}"
      }
    }
  },
  "items": [
    {
      "info": {
        "name": "Bulk Data",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Start a system-level bulk export (Bulk Data server only)",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://r4.smarthealthit.org/$export",
            "params": [
              {
                "name": "_outputFormat",
                "value": "",
                "type": "query",
                "description": "Requested bulk output format; defaults to application/fhir+ndjson."
              },
              {
                "name": "_type",
                "value": "",
                "type": "query",
                "description": "Comma-separated FHIR resource types to include in the export."
              },
              {
                "name": "_since",
                "value": "",
                "type": "query",
                "description": "Only include resources modified after this instant."
              }
            ]
          },
          "docs": "Kicks off an asynchronous export of all resources on the reference Bulk Data server (https://bulk-data.smarthealthit.org/fhir). Requires the Prefer respond-async header and a SMART Backend Services access token. Responds 202 with a Content-Location status URL to poll (honor Retry-After); when complete, the status endpoint returns a manifest of NDJSON file URLs to download."
        },
        {
          "info": {
            "name": "Start a patient-level bulk export (Bulk Data server only)",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://r4.smarthealthit.org/Patient/$export",
            "params": [
              {
                "name": "_outputFormat",
                "value": "",
                "type": "query",
                "description": "Requested bulk output format; defaults to application/fhir+ndjson."
              },
              {
                "name": "_type",
                "value": "",
                "type": "query",
                "description": "Comma-separated FHIR resource types to include in the export."
              },
              {
                "name": "_since",
                "value": "",
                "type": "query",
                "description": "Only include resources modified after this instant."
              }
            ]
          },
          "docs": "Kicks off an asynchronous export of all data for all patients on the reference Bulk Data server, following the same async-request pattern as the system-level export."
        },
        {
          "info": {
            "name": "Start a group-level bulk export (Bulk Data server only)",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://r4.smarthealthit.org/Group/:id/$export",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The logical id of the resource."
              },
              {
                "name": "_outputFormat",
                "value": "",
                "type": "query",
                "description": "Requested bulk output format; defaults to application/fhir+ndjson."
              },
              {
                "name": "_type",
                "value": "",
                "type": "query",
                "description": "Comma-separated FHIR resource types to include in the export."
              },
              {
                "name": "_since",
                "value": "",
                "type": "query",
                "description": "Only include resources modified after this instant."
              }
            ]
          },
          "docs": "Kicks off an asynchronous export of all data for the patients in a Group on the reference Bulk Data server."
        }
      ]
    }
  ],
  "bundled": true
}