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/vXX.X/actions/standard/getContextData

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
contextInputRepresentation List<Apex> 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 String Required

The name of the context definition to use to get the context data.

Outputs

Output Type Description
recordApexRepresentation List<Apex> 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"
            }
        ]
    }
]