メインコンテンツへスキップ
POST
/
v2
/
{entity}
/
{project}
/
models
モデルの作成
curl --request POST \
  --url https://api.example.com/v2/{entity}/{project}/models \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "source_code": "<string>",
  "description": "<string>",
  "attributes": {}
}
'
{
  "digest": "<string>",
  "object_id": "<string>",
  "version_index": 123,
  "model_ref": "<string>"
}

承認

Authorization
string
header
必須

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

パスパラメータ

entity
string
必須
project
string
必須

ボディ

application/json
name
string
必須

このモデルの名。同じ名のModelsはまとめてバージョン管理されます。

source_code
string
必須

import を含む Model クラスの完全なソースコード

description
string | null

このモデルの説明

attributes
Attributes · object

モデルとともに保存される追加属性

レスポンス

正常なレスポンス

digest
string
必須

作成されたモデルのダイジェスト

object_id
string
必須

作成されたモデルのID

version_index
integer
必須

作成されたモデルのバージョンインデックス

model_ref
string
必須

作成されたモデルへの完全な参照