身份要求
管理员. 会话/管理写操作不在公共 Playground 执行。
接口
curl --request POST 'https://api.oneaster.ai/core/v1/admin/model-names/revisions' \ --header 'Authorization: Bearer '"$ONEASTER_SESSION_TOKEN" \ --header 'Idempotency-Key: '"$ONEASTER_INTENT" \ --header 'Content-Type: application/json' \ --data "$REQUEST_BODY_JSON"
参数
- Idempotency-Key (header, 必填): {"type":"string","minLength":1,"maxLength":100}
请求 JSON Schema
application/json
{
"schema": {
"type": "object",
"additionalProperties": false,
"properties": {
"model_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"model_name": {
"type": "string",
"maxLength": 200,
"description": "公开名称,空字符串重置为原ID;不接受null或省略。"
},
"expected_version": {
"type": "integer",
"minimum": 0,
"maximum": 2147483646
},
"reference": {
"type": "string",
"minLength": 1,
"maxLength": 300
}
},
"required": [
"model_id",
"model_name",
"expected_version",
"reference"
]
}
}
响应
200
成功或幂等重放
{
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"properties": {
"success": {
"type": "boolean"
},
"data": {
"type": "object",
"additionalProperties": false,
"properties": {
"version": {
"type": "integer",
"minimum": 0
},
"reused": {
"type": "boolean"
},
"model_id": {
"type": "string"
},
"model_name": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "管理员配置的公开调用名称;默认沿用现有型号。C端使用该名称,内部身份仅管理员可见。"
}
},
"required": [
"version",
"reused"
]
},
"error": {
"anyOf": [
{},
{
"type": "null"
}
]
}
},
"required": [
"success",
"data",
"error"
]
}
}
},
"headers": {}
}
201
新名称修订已提交
{
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"properties": {
"success": {
"type": "boolean"
},
"data": {
"type": "object",
"additionalProperties": false,
"properties": {
"version": {
"type": "integer",
"minimum": 0
},
"reused": {
"type": "boolean"
},
"model_id": {
"type": "string"
},
"model_name": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "管理员配置的公开调用名称;默认沿用现有型号。C端使用该名称,内部身份仅管理员可见。"
}
},
"required": [
"version",
"reused"
]
},
"error": {
"anyOf": [
{},
{
"type": "null"
}
]
}
},
"required": [
"success",
"data",
"error"
]
}
}
},
"headers": {}
}