Create or update a service model assignment by key
const url = 'https://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: '{"assignment_key":"example","model_id":"example","model_version":"example","status":"active","role":"example","settings":{},"metadata":{}}'};
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://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 '{ "assignment_key": "example", "model_id": "example", "model_version": "example", "status": "active", "role": "example", "settings": {}, "metadata": {} }'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.
New assignment revisions are active by default. Use archived to retire a capability without launching new jobs from it.
object
object
Responses
Section titled “ Responses ”Service assignment upserted
object
Unique revision identifier for this assignment row.
Stable capability key within the domain or service scope. Updating the same key archives the previous active assignment and creates a new active revision.
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}