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

承認

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

REST API 経由で Op オブジェクトを作成するためのリクエストボディ。

このモデルには project_id は含まれません。project_id は RESTful エンドポイントの URL パスから与えられるためです。

name
string | null

この op の名前。同じ名前を持つ Ops は同一のものとしてバージョン管理されます。

source_code
string | null

インポートを含む、この op の完全なソースコード

レスポンス

成功レスポンス

Op オブジェクト作成時のレスポンスモデル。

digest
string
必須

作成された op のダイジェスト

object_id
string
必須

作成された op の ID

version_index
integer
必須

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