GoodMemGoodMem
ReferenceAPIREST APIDecision Models

Update a decision model

PUT /v1/decision-models/{id}: Changes only the fields supplied in the request.

PUT
/v1/decision-models/{id}

Changes only the fields supplied in the request. Requires UPDATE_DECISION_MODEL. Send an empty string to clear description, version, or monitoringEndpoint. A supplied configuration replaces all existing settings; use {} to reset them to defaults. The provider and owner cannot be changed. Credentials are omitted from the response.

Authorization

ApiKeyAuth
headerx-api-key<token>

Path Parameters

id*string

UUID of the decision model

Header Parameters

GoodMem-Timeout-Ms?integer

Optional waiting budget in milliseconds, measured from REST servlet ingress and shared across all internal gRPC calls. Supply one decimal integer from 1 to 86400000. Omission adds no deadline. Existing shorter deadlines still apply. Expiry returns HTTP 504 before streaming starts; after streaming starts, no successful completion event is sent. Use SSE or opt into GoodMem-Stream-Terminal for an explicit terminal outcome. Retrieval work is cooperatively cancelled. An accepted mutation may still commit after timeout or disconnect; a failed response does not imply rollback.

Formatint64
Range1 <= value <= 86400000

Request Body

application/json
  1. body

Changes only the supplied fields. Omitted fields keep their current values. A supplied configuration replaces all existing provider settings.

displayName?|

Name shown in the console and CLI.

description?|

Description of the model. Send an empty string to clear it, or omit it to keep the current value.

endpointUrl?|

Base URL of the provider, starting with http:// or https://. Do not include a query string, fragment, or username and password.

apiPath?|

Path appended to endpointUrl when sending a request. Omit it to keep the current path. An empty string resets Jev and Laya to /v1/systemone; Clef requires the path for your account and model.

modelIdentifier?|

Model identifier accepted by the provider.

credentials?||

Replacement API key for the provider, supplied in credentials.apiKey.inlineSecret with kind set to CREDENTIAL_KIND_API_KEY. Omit credentials to keep the current key.

Example
{  "apiKey": {    "inlineSecret": "sk-1234567890abcdef",    "secretRef": {      "uri": "vault://path/to/secret"    },    "headerName": "Authorization",    "prefix": "Bearer "  },  "gcpAdc": {    "scopes": [      "https://www.googleapis.com/auth/cloud-platform"    ],    "quotaProjectId": "my-quota-project"  }}
configuration?|

Replacement provider settings. Supported keys are image_preview (Jev only), timeout_millis, and max_response_bytes. Send {} to reset all settings to defaults, or omit configuration to keep the current settings.

version?|

Version label. Send an empty string to clear it, or omit it to keep the current value.

monitoringEndpoint?|

URL for the provider health or metrics endpoint. Must start with http:// or https://. Send an empty string to clear it, or omit it to keep the current value.

replaceLabels?|

Replace all labels with this map. Send {} to remove all labels. Do not combine with mergeLabels.

mergeLabels?|

Add labels and replace the values of matching keys. Other labels are unchanged. Do not combine with replaceLabels.

Response Body

Success

application/json
  1. response

Connection settings and supported features of a registered decision model.

decisionModelId*string

UUID of the decision model.

Formatuuid
displayName*string

Name shown in the console and CLI.

description?|

Optional description.

providerType*DecisionModelProviderType

Provider used by this model.

Value in"JEV""LAYA""CLEF"
endpointUrl*string

Provider base URL.

apiPath*string

Inference path appended to the base URL.

modelIdentifier*string

Configured model identifier.

credentials?||

Stored credentials. Returned only by get when includeCredentials=true and you have READ_DECISION_MODEL_CREDENTIALS permission.

Example
{  "apiKey": {    "inlineSecret": "sk-1234567890abcdef",    "secretRef": {      "uri": "vault://path/to/secret"    },    "headerName": "Authorization",    "prefix": "Bearer "  },  "gcpAdc": {    "scopes": [      "https://www.googleapis.com/auth/cloud-platform"    ],    "quotaProjectId": "my-quota-project"  }}
configuration*

Settings used when calling the provider. These do not change which features the model supports.

labels*

Labels for filtering and organization.

version?|

Optional version label.

monitoringEndpoint?|

Optional HTTP(S) health or metrics URL.

ownerId*string

UUID of the principal that owns this model.

Formatuuid
capabilities*

Supported questions and media, known limits, and the meaning of each answer type.

createdAt*integer

Creation time in milliseconds since epoch.

Formatint64
updatedAt*integer

Last update time in milliseconds since epoch.

Formatint64
createdById*string

UUID of the principal or API key that created this model.

Formatuuid
updatedById*string

UUID of the principal or API key that last updated this model.

Formatuuid
Example Request
curl -X PUT 'https://your-goodmem-server.example.com/v1/decision-models/550e8400-e29b-41d4-a716-446655440000' \  -H 'GoodMem-Timeout-Ms: 30000' \  -H 'Content-Type: application/json' \  -d '{  "credentials": {    "apiKey": {      "inlineSecret": "sk-1234567890abcdef",      "secretRef": {        "uri": "vault://path/to/secret"      },      "headerName": "Authorization",      "prefix": "Bearer "    }  }}'
Example Response
{  "decisionModelId": "a426a8bc-ce04-41fc-a635-cb0d9e15bae3",  "displayName": "string",  "description": "string",  "providerType": "JEV",  "endpointUrl": "string",  "apiPath": "string",  "modelIdentifier": "string",  "credentials": {    "apiKey": {      "inlineSecret": "sk-1234567890abcdef",      "secretRef": {        "uri": "vault://path/to/secret"      },      "headerName": "Authorization",      "prefix": "Bearer "    },    "gcpAdc": {      "scopes": [        "https://www.googleapis.com/auth/cloud-platform"      ],      "quotaProjectId": "my-quota-project"    }  },  "configuration": {},  "labels": {    "property1": "string",    "property2": "string"  },  "version": "string",  "monitoringEndpoint": "string",  "ownerId": "4d206909-730f-409a-88f6-dcfaa8fc28cc",  "capabilities": {    "questionTypes": [      "string"    ],    "media": [      {        "kind": "IMAGE",        "mimeTypes": [          "string"        ],        "placements": [          "string"        ],        "limits": [          {            "type": "MAX_ITEMS",            "value": 0          }        ]      }    ],    "limits": [      {        "type": "MAX_QUESTIONS",        "value": 0      }    ],    "contextBoundLimits": [      "string"    ],    "semantics": [      {        "questionType": "CHOICE",        "confidence": "ADJUSTED_TOP_PROBABILITY",        "output": "CANDIDATE_IDENTIFIER"      }    ],    "inputOverflow": "REJECTS"  },  "createdAt": 0,  "updatedAt": 0,  "createdById": "e13e432a-5323-4484-a91d-b5969bc564d9",  "updatedById": "d8bc6076-4141-4a88-80b9-0eb31643066f"}