Serializes the hierarchical context data from the Apex embeddedai__RecordApexRepresentation records that
are passed as input to a prompt template that generates a summary of the
data.
This action is available in API version 62.0 and later.
Supported REST HTTP Methods
URI: /services/data/vXX.X/actions/standard/serializeHierarchicalContextData
Where XX.X is the latest API version.
Formats: JSON, XML
HTTP Methods: GET
Authentication: Authorization: Bearer TOKEN
Where TOKEN is your OAuth access token.
Inputs
| Input | Type | Description |
|---|---|---|
| recordApexRepresentation | Apex type | Required A collection of Apex embeddedai__RecordApexRepresentation records that contain the details of the hierarchical data to serialize context data |
Outputs
| Output | Type | Description |
|---|---|---|
| serializedContextData | String | A JSON string of serialized hierarchical context data. |
Example
Sample Request
{
"inputs": [
{
"recordApexRepresentation": {
"relatedRecordData": [
{
"relatedRecordData": [
{
"recordData": [
{
"value": "Percentage",
"key": "UnitOfMeasureName"
},
{
"value": "Symptom Monitoring",
"key": "IndicatorDefinitionName"
}
],
"objectType": "IndicatorAssignment"
}
],
"recordData": [
{
"value": "Reduced Symptoms",
"key": "Name"
}
],
"objectType": "Outcome"
}
],
"recordData": [
{
"value": "Drug Use Satisfaction Improvement Program",
"key": "Name"
}
],
"objectType": "CareProgram"
}
}
]
}
Sample Response
{
"serializedContextData": {
"CareProgram": {
"Name": "Drug Use Satisfaction Improvement Program",
"Outcome": [
{
"Name": "Reduced Symptoms",
"IndicatorAssignment": [
{
"IndicatorDefinitionName": "Symptom Monitoring",
"UnitOfMeasureName": "Percentage"
}
]
}
]
}
}
}