메인 콘텐츠로 건너뛰기
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
필수

생성된 모델에 대한 전체 참조입니다.