A night's sleep
Your watch tracked a night's sleep. The SleepAction spans the night from startTime to endTime, and its result is the SleepSession. Each stage of the night is a SleepStage that isStageOf this one.
The action is keyed by its start and end and the name of the device. The session has no times of its own, so its key reads them from the action it is the result of, with paths that start at resultOf, the inverse of result.
{
"@type": "SleepAction",
"@key": ["@type", "source", "startTime", "endTime", "instrument[*].handle"],
"source": "apple-health",
"startTime": "2026-05-09T03:12:00.000Z",
"endTime": "2026-05-09T10:41:00.000Z",
"agent": {
"@type": "Person",
"@key": ["@type", "source", "sourceId"],
"source": "icloud",
"sourceId": "1234567890",
"handle": "you@example.com",
"sameAs": ["@me"]
},
"instrument": [
{
"@type": "Device",
"@key": ["@type", "source", "handle"],
"source": "apple-health",
"handle": "Sam’s Apple Watch",
"name": "Sam’s Apple Watch",
"model": "Watch7,1"
}
],
"result": {
"@type": "SleepSession",
"@key": [
"@type",
"source",
"resultOf.startTime",
"resultOf.endTime",
"resultOf.instrument[*].handle"
],
"source": "apple-health"
}
}{
"@context": {
"@vocab": "https://schema.chronicle.app/",
"doc": "https://schema.chronicle.app/docs/"
},
"@type": "SleepAction",
"doc:key": {
"@list": ["@type", "source", "startTime", "endTime", "instrument[*].handle"]
},
"source": "apple-health",
"startTime": {
"@value": "2026-05-09T03:12:00.000Z",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"endTime": {
"@value": "2026-05-09T10:41:00.000Z",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"agent": {
"@type": "Person",
"doc:key": {
"@list": ["@type", "source", "sourceId"]
},
"source": "icloud",
"sourceId": "1234567890",
"handle": "you@example.com",
"sameAs": ["@me"]
},
"instrument": [
{
"@type": "Device",
"doc:key": {
"@list": ["@type", "source", "handle"]
},
"source": "apple-health",
"handle": "Sam’s Apple Watch",
"name": "Sam’s Apple Watch",
"model": "Watch7,1"
}
],
"result": {
"@type": "SleepSession",
"doc:key": {
"@list": [
"@type",
"source",
"resultOf.startTime",
"resultOf.endTime",
"resultOf.instrument[*].handle"
]
},
"source": "apple-health"
}
}@prefix : <https://schema.chronicle.app/> .
@prefix doc: <https://schema.chronicle.app/docs/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[
a :SleepAction;
doc:key ("@type" "source" "startTime" "endTime" "instrument[*].handle");
:source "apple-health";
:startTime "2026-05-09T03:12:00.000Z"^^xsd:dateTime;
:endTime "2026-05-09T10:41:00.000Z"^^xsd:dateTime;
:agent [
a :Person;
doc:key ("@type" "source" "sourceId");
:source "icloud";
:sourceId "1234567890";
:handle "you@example.com";
:sameAs "@me"
];
:instrument [
a :Device;
doc:key ("@type" "source" "handle");
:source "apple-health";
:handle "Sam’s Apple Watch";
:name "Sam’s Apple Watch";
:model "Watch7,1"
];
:result [
a :SleepSession;
doc:key ("@type" "source" "resultOf.startTime" "resultOf.endTime" "resultOf.instrument[*].handle");
:source "apple-health"
]
] .