メインコンテンツへスキップ
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
必須

このモデルの名前。同じ名前のモデルは同一のバージョン系列として扱われます。

source_code
string
必須

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

description
string | null

このモデルの説明。

attributes
Attributes · object

モデルと共に保存する追加属性。

レスポンス

成功レスポンス

digest
string
必須

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

object_id
string
必須

作成されたモデルの ID。

version_index
integer
必須

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

model_ref
string
必須

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