Curae Platform
API referenceSDK Observations

Search connection-scoped observations through the SDK gateway

Returns a FHIR Bundle containing Observation resources authorized by the presented APP tenant API key with observation:read scope and the request body's `connectionId`. The gateway enforces APP tenant residency, SpiceDB app-install projection, subject lifecycle capability, resource-type scope, and service-level category, LOINC, sensitivity, and time-window scope before any PHI read is returned. A read the connection's scope does not cover, or one after Curae narrowed the app's approved scope below it, is `403` `insufficient_scope`. While any of the user's records it reads is being updated, the whole read is `409` `RECORDS_REBUILDING` (retryable), never a partial bundle.

POST
/api/sdk/v1/observations:search

Returns a FHIR Bundle containing Observation resources authorized by the presented APP tenant API key with observation:read scope and the request body's connectionId. The gateway enforces APP tenant residency, SpiceDB app-install projection, subject lifecycle capability, resource-type scope, and service-level category, LOINC, sensitivity, and time-window scope before any PHI read is returned. A read the connection's scope does not cover, or one after Curae narrowed the app's approved scope below it, is 403 insufficient_scope. While any of the user's records it reads is being updated, the whole read is 409 RECORDS_REBUILDING (retryable), never a partial bundle.

Authorization

platformApiKey
headerAuthorizationBearer <token>

Curae Platform API key using the format Bearer . Keys are opaque credentials such as cae_live_..., not JWTs.

Request Body

application/json
  1. body
connectionId*string

Public SDK connection id returned by POST /api/sdk/v1/connections.

Formatuuid
loincCodes?array<>
Items1 <= items <= 256
fhirStatuses?array<>

FHIR R4 observation-status value-set codes (platform FhirObservationStatus enum). Defaults to [FINAL, AMENDED, CORRECTED] when omitted so the bundle does not surface PRELIMINARY / CANCELLED / ENTERED_IN_ERROR rows by accident.

Items1 <= items
timeWindow?
sensitivityLabels?array<>

Narrows the sensitive categories this read includes to those named; [] reads records that carry none. A category the connection does not read is refused with a 403.

Itemsitems <= 8
limit?integer
Range1 <= value <= 500

Response Body

Connection-scoped FHIR Observation search bundle.

  1. response

Top-level FHIR R4 Bundle of searchset type carrying the Curae-shaped Observation projections matched by the request scope.

resourceType*"Bundle"
Value in"Bundle"
type*"searchset"
Value in"searchset"
total?integer
Range0 <= value
entry?array<>
Example Request
curl -X POST 'https://api.curaeai.com/api/sdk/v1/observations:search' \  -H 'Content-Type: application/json' \  -d '{  "connectionId": "84b500d7-71c8-4b1f-adf4-f1eb0000973d"}'
Example Response
{  "resourceType": "Bundle",  "type": "searchset",  "total": 0,  "entry": [    {      "fullUrl": "string",      "resource": {        "resourceType": "Observation",        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "meta": {          "tag": [            {              "system": "string",              "code": "string",              "display": "string",              "version": "string",              "userSelected": true            }          ],          "security": [            {              "system": "string",              "code": "string",              "display": "string"            }          ],          "extension": [            {              "url": "string",              "valueString": "string"            }          ]        },        "status": "string",        "category": [          {            "coding": [              {                "system": "string",                "code": "string",                "display": "string",                "version": "string",                "userSelected": true              }            ],            "text": "string",            "extension": [              {                "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason",                "valueCode": "masked"              }            ]          }        ],        "code": {          "coding": [            {              "system": "string",              "code": "string",              "display": "string",              "version": "string",              "userSelected": true            }          ],          "text": "string",          "extension": [            {              "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason",              "valueCode": "masked"            }          ]        },        "subject": {          "reference": "string"        },        "performer": [          {            "reference": "string"          }        ],        "effectiveDateTime": "2019-08-24T14:15:22Z",        "issued": "2019-08-24T14:15:22Z",        "valueQuantity": {          "value": 0,          "comparator": "<",          "unit": "string",          "system": "string",          "code": "string"        },        "valueString": "string",        "dataAbsentReason": {          "coding": [            {              "system": "string",              "code": "string",              "display": "string",              "version": "string",              "userSelected": true            }          ],          "text": "string",          "extension": [            {              "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason",              "valueCode": "masked"            }          ]        },        "interpretation": [          {            "coding": [              {                "system": "string",                "code": "string",                "display": "string",                "version": "string",                "userSelected": true              }            ],            "text": "string",            "extension": [              {                "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason",                "valueCode": "masked"              }            ]          }        ],        "referenceRange": [          {            "low": {              "value": 0,              "comparator": "<",              "unit": "string",              "system": "string",              "code": "string"            },            "high": {              "value": 0,              "comparator": "<",              "unit": "string",              "system": "string",              "code": "string"            }          }        ],        "component": [          {            "code": {              "coding": [                {                  "system": "string",                  "code": "string",                  "display": "string",                  "version": "string",                  "userSelected": true                }              ],              "text": "string",              "extension": [                {                  "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason",                  "valueCode": "masked"                }              ]            },            "valueQuantity": {              "value": 0,              "comparator": "<",              "unit": "string",              "system": "string",              "code": "string"            },            "valueString": "string",            "valueBoolean": true,            "dataAbsentReason": {              "coding": [                {                  "system": "string",                  "code": "string",                  "display": "string",                  "version": "string",                  "userSelected": true                }              ],              "text": "string",              "extension": [                {                  "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason",                  "valueCode": "masked"                }              ]            },            "interpretation": [              {                "coding": [                  {                    "system": "string",                    "code": "string",                    "display": "string",                    "version": "string",                    "userSelected": true                  }                ],                "text": "string",                "extension": [                  {                    "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason",                    "valueCode": "masked"                  }                ]              }            ],            "referenceRange": [              {                "low": {                  "value": 0,                  "comparator": "<",                  "unit": "string",                  "system": "string",                  "code": "string"                },                "high": {                  "value": 0,                  "comparator": "<",                  "unit": "string",                  "system": "string",                  "code": "string"                }              }            ]          }        ]      },      "search": {        "mode": "match"      }    }  ]}