Create or update a domain model assignment
const url = 'https://test-pie.streamline.enterprises/v2/clients/client-1/domains/south_australia/assignments';const options = { method: 'POST', 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 POST \ --url https://test-pie.streamline.enterprises/v2/clients/client-1/domains/south_australia/assignments \ --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_australiaRequest 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 ”Domain 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}Invalid domain assignment; incompatible provided_features return AssignBlockedErrorResponse, other failures return ErrorResponse.
object
Human-readable error message
Assignment blocked by incompatible non-departed service provided_features for the target model version.
object
Summary of why assignment was blocked.
Service whose provided_features fail the target model version freeze.
object
Service identifier within a domain.
Feature that failed validation.
Stored value for feature in provided_features.
Example
{ "error": "cannot assign model version 3: 2 service(s) have incompatible provided_features", "blocking_services": [ { "service_id": "svc-abc", "feature": "cabin_category", "value": "unknown" } ]}