Create or update a service model assignment by key
const url = 'https://test-pie.streamline.enterprises/v2/clients/client-1/domains/south_australia/service/service-1/assignments/default';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"model_id":"example-model","model_version":"2.0.0","service_updates":[{"service_id":"svc-001","static_features":{"route":"route-a"}}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://test-pie.streamline.enterprises/v2/clients/client-1/domains/south_australia/service/service-1/assignments/default \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model_id": "example-model", "model_version": "2.0.0", "service_updates": [ { "service_id": "svc-001", "static_features": { "route": "route-a" } } ] }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Example
client-1Example
south_australiaExample
service-1Example
defaultRequest Body required
Section titled “Request Body required ”object
Required on collection POST routes; omitted on keyed PUT routes.
Model registry identifier.
Model version string within the registry.
New assignment revisions are active by default. Use archived to retire a capability without launching new jobs from it.
object
object
Optional patches for non-departed services on domain default assignment upsert only; incompatible services still yield 422 with blocking_services.
Patch provided_features for one service during domain default assignment upsert (validated against the target version freeze).
object
Service identifier within a domain.
Feature key-value pairs. Mandatory features without defaults must be provided.
object
Example
{ "model_id": "example-model", "model_version": "2.0.0", "service_updates": [ { "service_id": "svc-001", "static_features": { "route": "route-a" } } ]}Responses
Section titled “ Responses ”Service assignment upserted
object
Unique revision identifier for this assignment row.
Domain identifier within a client.
Stable capability key within the domain or service scope. Updating the same key archives the previous active assignment and creates a new active revision.
Model registry identifier.
Model version string within the registry.
Active assignments are runnable. Archived assignments are retained as historical revisions for jobs that used them.
object
object
Example
{ "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}