Skip to content

End-to-end workflow

This page shows the shape of a typical flow. Use the API reference for exact schemas and required fields.

Terminal window
export TOKEN="<access_token>"
export API="https://pie.streamline.enterprises"
export CLIENT_ID="client-1"
export DOMAIN_ID="pricing"
export SERVICE_ID="service-1"
Terminal window
curl "${API}/v2/models" \
-H "Authorization: Bearer ${TOKEN}"
Terminal window
curl "${API}/v2/clients/${CLIENT_ID}/domains/${DOMAIN_ID}" \
-H "Authorization: Bearer ${TOKEN}"

Domain features define the inputs needed when services are initialized.

Terminal window
curl -X POST "${API}/v2/clients/${CLIENT_ID}/domains/${DOMAIN_ID}/service/init" \
-H "Authorization: Bearer ${TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"service_id": "'"${SERVICE_ID}"'",
"static_features": {
"route": "Adelaide to Sydney",
"day_of_week": 3
}
}'

The response can include a job_id for work triggered by the domain assignment. Poll the job before assuming model output is ready.

5. Run inference through a service assignment

Section titled “5. Run inference through a service assignment”
Terminal window
curl -X POST "${API}/v2/clients/${CLIENT_ID}/domains/${DOMAIN_ID}/service/${SERVICE_ID}/assignments/forecast/jobs" \
-H "Authorization: Bearer ${TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"input": {
"route": "Adelaide to Sydney",
"day_of_week": 3
}
}'

Store the returned job_id.

Terminal window
curl "${API}/v2/jobs/<job_id>" \
-H "Authorization: Bearer ${TOKEN}"

When status becomes success, read output. When it becomes failure, read error. The shape of these fields is model-specific.

Avoid hardcoding model versions in business integrations. Assignment keys are the stable integration surface; the platform can update the active model version behind a key without changing your route.