End-to-end workflow
This page shows the shape of a typical flow. Use the API reference for exact schemas and required fields.
1. Export your token
Section titled “1. Export your token”export TOKEN="<access_token>"export API="https://pie.streamline.enterprises"export CLIENT_ID="client-1"export DOMAIN_ID="pricing"export SERVICE_ID="service-1"2. Confirm model registry access
Section titled “2. Confirm model registry access”curl "${API}/v2/models" \ -H "Authorization: Bearer ${TOKEN}"3. Create or inspect a domain
Section titled “3. Create or inspect a domain”curl "${API}/v2/clients/${CLIENT_ID}/domains/${DOMAIN_ID}" \ -H "Authorization: Bearer ${TOKEN}"Domain features define the inputs needed when services are initialized.
4. Initialize a service
Section titled “4. Initialize a service”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”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.
6. Poll the job
Section titled “6. Poll the job”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.
7. Keep the workflow assignment-based
Section titled “7. Keep the workflow assignment-based”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.