Create an event subscription with this model as the source
const url = 'https://test-pie.streamline.enterprises/v2/models/example-model/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://test-pie.streamline.enterprises/v2/models/example-model/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
example-modelRequest Body required
Section titled “Request Body required ”object
Model registry identifier.
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
Model registry identifier.
Model registry identifier.
object
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}