import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});
const response = await client.applications.validate({
edges: [{ from_field: 'from_field', from_node: 'from_node', to_field: 'to_field', to_node: 'to_node' }],
nodes: [{ id: 'id', application_node_schema_id: 'text_input_schema' }],
version: 'V0',
});
console.log(response);{
"errors": [
{
"error_code": "INVALID_APPLICATION_NO_INPUT_NODE",
"message": "<string>"
}
],
"sgp_error_code": "APPLICATION_BUILDER_VALIDATION_ERROR"
}import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});
const response = await client.applications.validate({
edges: [{ from_field: 'from_field', from_node: 'from_node', to_field: 'to_field', to_node: 'to_node' }],
nodes: [{ id: 'id', application_node_schema_id: 'text_input_schema' }],
version: 'V0',
});
console.log(response);{
"errors": [
{
"error_code": "INVALID_APPLICATION_NO_INPUT_NODE",
"message": "<string>"
}
],
"sgp_error_code": "APPLICATION_BUILDER_VALIDATION_ERROR"
}List of nodes in the application graph
Show child attributes
List of edges in the application graph
Show child attributes
Version of the application schema
"V0"Execution override options for agentic applications
Show child attributes
Successful Response