Skip to content

Create or update a service model assignment by key

PUT
/v2/clients/{client_id}/domains/{domain_id}/service/{service_id}/assignments/{assignment_key}
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" } } ] }'
client_id
required
string
Example
client-1
domain_id
required
string
Example
south_australia
service_id
required
string
Example
service-1
assignment_key
required
string
Example
default
Media type application/json
object
assignment_key

Required on collection POST routes; omitted on keyed PUT routes.

string
model_id
required

Model registry identifier.

string
model_version
required

Model version string within the registry.

string
status

New assignment revisions are active by default. Use archived to retire a capability without launching new jobs from it.

string
default: active
Allowed values: active archived
role
string
nullable
settings
object
metadata
object
service_updates

Optional patches for non-departed services on domain default assignment upsert only; incompatible services still yield 422 with blocking_services.

Array<object>

Patch provided_features for one service during domain default assignment upsert (validated against the target version freeze).

object
service_id
required

Service identifier within a domain.

string
static_features
required

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"
}
}
]
}

Service assignment upserted

Media type application/json
object
assignment_id
required

Unique revision identifier for this assignment row.

string format: uuid
domain_id
required

Domain identifier within a client.

string
service_id
string
assignment_key
required

Stable capability key within the domain or service scope. Updating the same key archives the previous active assignment and creates a new active revision.

string
model_id
required

Model registry identifier.

string
model_version
required

Model version string within the registry.

string
status
required

Active assignments are runnable. Archived assignments are retained as historical revisions for jobs that used them.

string
Allowed values: active archived
role
string
nullable
settings
required
object
metadata
required
object
created_at
required
string format: date-time
updated_at
required
string format: date-time
Example
{
"status": "active"
}

Validation error — malformed input, invalid path parameters, or request that fails syntactic validation.

Media type application/json
object
success
required
boolean
message
required

Human-readable error message

string
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).

Media type application/json
object
success
required
boolean
message
required

Human-readable error message

string
Example
{
"success": false
}

Authenticated caller lacks the permission required for this operation.

Media type application/json
object
success
required
boolean
message
required

Human-readable error message

string
Example
{
"success": false
}

Requested resource was not found.

Media type application/json
object
success
required
boolean
message
required

Human-readable error message

string
Example
{
"success": false
}

Semantically invalid request — e.g. domain not active, no model assigned, feature contract mismatch, or invalid feature definitions.

Media type application/json
object
success
required
boolean
message
required

Human-readable error message

string
Example
{
"success": false
}