Get Context Data Action

Retrieves the context data that is passed as an 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/v64.0/actions/standard/getContextData
Formats
JSON, XML
HTTP Methods
GET
Authentication
Authorization: Bearer token

Inputs

Input Details
contextInputRepresentation
Type
List<Apex>
Description
Required
A collection of Apex embeddedai__ContextInputRep records that contain details of the hierarchical data of the sObjects to get the context data for.
contextDefinitionName
Type
String
Description
Required
The name of the context definition to use to get the context data.

Outputs

Output Details
recordApexRepresentation
Type
List<Apex>
Description
A collection of Apex embeddedai__RecordApexRepresentationrecords that contain the context data.

Example

Sample Request

{
    "inputs": [
        {
            "contextInputRepresentation": [
                {
                    "mappingName": "OutcomeSummaryMapping",
                    "ids": [
                        "9OCxx0000004C92GAE"
                    ],
                    "objectName": "Outcome",
                    "nodeName": "SummaryContext"
                }
            ],
            "contextDefinitionName": "CareProgramOutcomeSummary__stdctx"
        }
    ]
}

Sample Response

[
    {
        "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"
            }
        ]
    }
]