Deployments.ai Docs
Models

Update a model policy

PATCH /v1/model-policies/{id} · SDK updateModelPolicy · CLI deployments model-policy update

PATCH
/v1/model-policies/{id}

Requires models:write.

Authorization

platformBearer
headerAuthorizationBearer <token>

Platform bearer credential accepted as an opaque API key or JWT.

Path Parameters

id*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Header Parameters

x-deployments-environment*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
idempotency-key*string
Length1 <= length <= 512

Request Body

application/json
  1. body
description?string
Lengthlength <= 2000
expectedVersion*integer
Range0 <= value
includeCuratedModels?boolean
models?array<>
Itemsitems <= 256
name?string
Match^\S[\s\S]*\S$|^\S$|^$
Length1 <= length <= 120

Response Body

ModelPolicyResponse

application/json
  1. response
archivedAt?string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
createdAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
description?string
id*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
includeCuratedModels*boolean
models*array<string>
name*string
status*string
Value in"active""archived"
updatedAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
version*integer
Range0 <= value
curl -X PATCH "https://example.com/v1/model-policies/string" \  -H "x-deployments-environment: string" \  -H "idempotency-key: string" \  -H "Content-Type: application/json" \  -d '{    "expectedVersion": 0  }'
{  "archivedAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "description": "string",  "id": "string",  "includeCuratedModels": true,  "models": [    "string"  ],  "name": "string",  "status": "active",  "updatedAt": "2019-08-24T14:15:22Z",  "version": 0}