Skip to main content
POST
/
v2
/
{entity}
/
{project}
/
ops
Op Create
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
}

Authorizations

Authorization
string
header
required

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

Path Parameters

entity
string
required
project
string
required

Body

application/json

Request body for creating an Op object via REST API.

This model excludes project_id since it comes from the URL path in RESTful endpoints.

name
string | null

The name of this op. Ops with the same name will be versioned together.

source_code
string | null

Complete source code for this op, including imports

Response

Successful Response

Response model for creating an Op object.

digest
string
required

The digest of the created op

object_id
string
required

The ID of the created op

version_index
integer
required

The version index of the created op