Create an event subscription with this model as the source
const url = 'https://pie.streamline.enterprises/v2/models/model_price_reco_v1/event-subscriptions';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"trigger_event":"training_complete","target_model_id":"model_infer_v1","target_action":"inference","input_source":"stored","input":{"route":"Adelaide to Sydney"},"label":"replay after retrain"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://pie.streamline.enterprises/v2/models/model_price_reco_v1/event-subscriptions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "trigger_event": "training_complete", "target_model_id": "model_infer_v1", "target_action": "inference", "input_source": "stored", "input": { "route": "Adelaide to Sydney" }, "label": "replay after retrain" }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Example
model_price_reco_v1Request Body required
Section titled “Request Body required ”object
Stored input payload for the target action (required when input_source is stored)
object
Example
{ "trigger_event": "training_complete", "target_model_id": "model_infer_v1", "target_action": "inference", "input_source": "stored", "input": { "route": "Adelaide to Sydney" }, "label": "replay after retrain"}Responses
Section titled “ Responses ”Event subscription created
object
object
Present when the server detected issues that did not block the operation (e.g. stored subscription input did not validate against the target model’s handler input_schema). Omitted or empty when there are no warnings.
Example
{ "trigger_event": "training_complete", "target_action": "inference", "input_source": "stored", "status": "active"}Validation error — malformed input, invalid path parameters, or request that fails syntactic validation.
object
Human-readable error message
Example
{ "success": false}Missing or invalid Authorization bearer token, expired token, or token rejected by the
authorization layer (e.g. API Gateway JWT authorizer or application validation).
object
Human-readable error message
Example
{ "success": false}Authenticated caller lacks the permission required for this operation.
object
Human-readable error message
Example
{ "success": false}Requested resource was not found.
object
Human-readable error message
Example
{ "success": false}Semantically invalid request — e.g. domain not active, no model assigned, feature contract mismatch, or invalid feature definitions.
object
Human-readable error message
Example
{ "success": false}