Path parameters

  • id integer(int32) Required
application/json

Body Required

  • default boolean

    Whether the model is the default model

  • enabled boolean

    Whether the model should be enabled or disabled

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • success boolean
    • code integer(int32)
    • message string
    • data object
      Hide data attributes Show data attributes object
      • modelId string
      • modelName string
      • displayName string
      • enabled boolean
      • default boolean
      • modelType string

        Values are TEXT or IMAGE.

  • 404 */*

    Not Found

    Hide response attributes Show response attributes object
    • success boolean
    • code integer
    • errorCode string
    • message string
    • timestamp string(date-time)
  • 500 */*

    Internal Server Error

    Hide response attributes Show response attributes object
    • success boolean
    • code integer
    • errorCode string
    • message string
    • timestamp string(date-time)
PATCH /models
curl \
 --request PATCH 'https://api.huy-devops.site/api/models' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"default":true,"enabled":true}'
Request examples
{
  "default": true,
  "enabled": true
}
Response examples (200)
{
  "success": true,
  "code": 200,
  "message": "string",
  "data": {
    "modelId": "string",
    "modelName": "string",
    "displayName": "string",
    "enabled": true,
    "default": true,
    "modelType": "TEXT"
  }
}
Response examples (404)
{
  "success": false,
  "code": 42,
  "errorCode": "string",
  "message": "string",
  "timestamp": "2025-05-04T09:42:00Z"
}
Response examples (500)
{
  "success": false,
  "code": 42,
  "errorCode": "string",
  "message": "string",
  "timestamp": "2025-05-04T09:42:00Z"
}