Administrator

PATCH /oneaster/v1/admin/channels/{id}/config

Administrator · PATCH /oneaster/v1/admin/channels/{id}/config

Explicit allowlisted structured fields only; omitted fields and unknown native settings are retained. Native read-merge-write is not CAS and provides no cross-instance atomic protection. Sensitive and plugin fields require their corresponding caller permissions and PAT scopes. Native HTTP 200 success=false or a failed readback can mean partial or uncertain writes (409 channel_result_unknown); reread and inspect manually, do not automatically retry.

PATCH/oneaster/v1/admin/channels/{id}/config

Authorizations

Authorizationstringrequired

Use a native login access_token (or a scoped PAT where supported); required access: Administrator.

Authorization: Bearer $ONEASTER_ACCESS_TOKEN

Parameters

idintegerrequired

path

Body · application/json

channelobject

Creation requires type/name/key/models/group. Credentials are write-only. Structured configuration is separate; status uses its dedicated route.

settingobject
settingsobject
headersobject

Write-only changes restricted to accept, content-type, user-agent, x-request-id, x-client-version, anthropic-version, anthropic-beta, openai-beta. Other headers are retained.

paramsobject

Write-only flat primitive values; unknown and complex existing overrides are retained.

JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "channel": {
      "type": "object",
      "description": "Creation requires type/name/key/models/group. Credentials are write-only. Structured configuration is separate; status uses its dedicated route.",
      "properties": {
        "name": {
          "type": "string",
          "writeOnly": false
        },
        "key": {
          "type": "string",
          "writeOnly": true
        },
        "models": {
          "type": "string",
          "writeOnly": false
        },
        "group": {
          "type": "string",
          "writeOnly": false
        },
        "base_url": {
          "type": [
            "string",
            "null"
          ],
          "writeOnly": true
        },
        "tag": {
          "type": "string",
          "writeOnly": false
        },
        "remark": {
          "type": "string",
          "writeOnly": false
        },
        "test_model": {
          "type": "string",
          "writeOnly": false
        },
        "type": {
          "type": "integer"
        },
        "weight": {
          "type": "integer"
        },
        "priority": {
          "type": "integer"
        },
        "auto_ban": {
          "type": "integer"
        },
        "model_mapping": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "status_code_mapping": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "openai_organization": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "setting": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "pass_through_body_enabled": {
          "type": "boolean"
        },
        "responses_websocket_enabled": {
          "type": "boolean"
        },
        "task_plugin_key": {
          "type": "string"
        },
        "task_extend_plugin_keys": {
          "type": "array",
          "maxItems": 512,
          "uniqueItems": true,
          "items": {
            "type": "string"
          }
        }
      }
    },
    "settings": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "upstream_model_update_check_enabled": {
          "type": "boolean"
        },
        "upstream_model_update_auto_sync_enabled": {
          "type": "boolean"
        }
      }
    },
    "headers": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "set",
        "remove"
      ],
      "properties": {
        "set": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "remove": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "maxItems": 64,
          "uniqueItems": true
        }
      },
      "description": "Write-only changes restricted to accept, content-type, user-agent, x-request-id, x-client-version, anthropic-version, anthropic-beta, openai-beta. Other headers are retained."
    },
    "params": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "set",
        "remove"
      ],
      "properties": {
        "set": {
          "type": "object",
          "additionalProperties": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "remove": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "maxItems": 64,
          "uniqueItems": true
        }
      },
      "description": "Write-only flat primitive values; unknown and complex existing overrides are retained."
    }
  }
}