A delete of identifiable data such as a sleep carries the deleted record's recordId.
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$anchor": "google-health-delete-identifiable",
"title": "Google Health API webhook: Delete (identifiable data)",
"description": "Built from the fields Google Health API documents at https://developers.google.com/health/webhooks. JSON body.",
"oneOf": [
{
"type": "object",
"properties": {
"data": {
"description": "One notification.",
"type": "object",
"x-type-from": "example",
"properties": {
"version": {
"type": "string",
"x-type-from": "example"
},
"clientProvidedSubscriptionName": {
"description": "Your manual subscription's name, or auto-<project-number>-<subscriber-id>-<WEBHOOK_DATA_TYPE_TOKEN> for automatic subscriptions.",
"type": "string",
"x-type-from": "documented"
},
"healthUserId": {
"description": "The Google Health API identifier for the user whose data has changed.",
"type": "string",
"x-type-from": "documented"
},
"operation": {
"description": "UPSERT for any data addition or modification; DELETE when a user explicitly deletes data.",
"type": "string",
"enum": [
"UPSERT",
"DELETE"
],
"x-type-from": "documented"
},
"dataType": {
"type": "string",
"x-type-from": "example"
},
"intervals": {
"description": "One or more time intervals of the modified data.",
"type": "array",
"x-type-from": "documented",
"items": {
"description": "One time interval of the modified data.",
"type": "object",
"properties": {
"physicalTimeInterval": {
"description": "The UTC physical time interval of the modified data. Populated for intraday metrics; omitted for daily rollups and full-day activities.",
"type": "object",
"x-type-from": "documented",
"properties": {
"startTime": {
"type": "string",
"x-type-from": "example"
},
"endTime": {
"type": "string",
"x-type-from": "example"
}
},
"additionalProperties": true
},
"civilDateTimeInterval": {
"description": "The civil (local) calendar date and time interval of the modified data, without UTC or timezone offsets. Google's field table marks it required, but its own delete examples omit it, so this schema does not require it.",
"type": "object",
"x-type-from": "documented",
"properties": {
"startDateTime": {
"type": "object",
"x-type-from": "example"
},
"endDateTime": {
"type": "object",
"x-type-from": "example"
}
},
"additionalProperties": true
},
"civilIso8601TimeInterval": {
"description": "The civil (local) time interval represented as an ISO 8601 string without UTC or timezone offsets.",
"type": "object",
"x-type-from": "documented",
"properties": {
"startTime": {
"type": "string",
"x-type-from": "example"
},
"endTime": {
"type": "string",
"x-type-from": "example"
}
},
"additionalProperties": true
}
},
"required": [
"civilIso8601TimeInterval"
],
"additionalProperties": true,
"x-type-from": "documented"
}
},
"recordId": {
"type": "string",
"x-type-from": "example"
}
},
"additionalProperties": true
}
},
"additionalProperties": true
},
{
"type": "array",
"items": {
"type": "object",
"properties": {
"data": {
"description": "One notification.",
"type": "object",
"x-type-from": "example",
"properties": {
"version": {
"type": "string",
"x-type-from": "example"
},
"clientProvidedSubscriptionName": {
"description": "Your manual subscription's name, or auto-<project-number>-<subscriber-id>-<WEBHOOK_DATA_TYPE_TOKEN> for automatic subscriptions.",
"type": "string",
"x-type-from": "documented"
},
"healthUserId": {
"description": "The Google Health API identifier for the user whose data has changed.",
"type": "string",
"x-type-from": "documented"
},
"operation": {
"description": "UPSERT for any data addition or modification; DELETE when a user explicitly deletes data.",
"type": "string",
"enum": [
"UPSERT",
"DELETE"
],
"x-type-from": "documented"
},
"dataType": {
"type": "string",
"x-type-from": "example"
},
"intervals": {
"description": "One or more time intervals of the modified data.",
"type": "array",
"x-type-from": "documented",
"items": {
"description": "One time interval of the modified data.",
"type": "object",
"properties": {
"physicalTimeInterval": {
"description": "The UTC physical time interval of the modified data. Populated for intraday metrics; omitted for daily rollups and full-day activities.",
"type": "object",
"x-type-from": "documented",
"properties": {
"startTime": {
"type": "string",
"x-type-from": "example"
},
"endTime": {
"type": "string",
"x-type-from": "example"
}
},
"additionalProperties": true
},
"civilDateTimeInterval": {
"description": "The civil (local) calendar date and time interval of the modified data, without UTC or timezone offsets. Google's field table marks it required, but its own delete examples omit it, so this schema does not require it.",
"type": "object",
"x-type-from": "documented",
"properties": {
"startDateTime": {
"type": "object",
"x-type-from": "example"
},
"endDateTime": {
"type": "object",
"x-type-from": "example"
}
},
"additionalProperties": true
},
"civilIso8601TimeInterval": {
"description": "The civil (local) time interval represented as an ISO 8601 string without UTC or timezone offsets.",
"type": "object",
"x-type-from": "documented",
"properties": {
"startTime": {
"type": "string",
"x-type-from": "example"
},
"endTime": {
"type": "string",
"x-type-from": "example"
}
},
"additionalProperties": true
}
},
"required": [
"civilIso8601TimeInterval"
],
"additionalProperties": true,
"x-type-from": "documented"
}
},
"recordId": {
"type": "string",
"x-type-from": "example"
}
},
"additionalProperties": true
}
},
"additionalProperties": true
}
}
]
}