router/api-router.go:410。controller.CreateModelMeta,controller/model_meta.go:107。model:write。同时需要满足接口的角色和业务要求。Authorization: Bearer ********************curl --location '/api/models/' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"id": 0,
"model_name": "string",
"description": "string",
"icon": "string",
"tags": "string",
"vendor_id": 0,
"endpoints": "string",
"supported_endpoints": [
"string"
],
"status": 0,
"sync_official": 0,
"created_time": 0,
"updated_time": 0,
"bound_channels": [
{
"name": "string",
"type": 0,
"property1": "string",
"property2": "string"
}
],
"enable_groups": [
"string"
],
"quota_types": [
0
],
"name_rule": 0,
"matched_models": [
"string"
],
"matched_count": 0,
"has_metadata": true,
"configured_channel_count": 0,
"square_state": "string",
"property1": "string",
"property2": "string"
}'{
"success": true,
"message": "string",
"data": {
"id": 0,
"model_name": "string",
"description": "string",
"icon": "string",
"tags": "string",
"vendor_id": 0,
"endpoints": "string",
"supported_endpoints": [
"string"
],
"status": 0,
"sync_official": 0,
"created_time": 0,
"updated_time": 0,
"bound_channels": [
{
"name": "string",
"type": 0,
"property1": "string",
"property2": "string"
}
],
"enable_groups": [
"string"
],
"quota_types": [
0
],
"name_rule": 0,
"matched_models": [
"string"
],
"matched_count": 0,
"has_metadata": true,
"configured_channel_count": 0,
"square_state": "string",
"property1": "string",
"property2": "string"
},
"property1": "string",
"property2": "string"
}