Skip to main content
POST
/
api
/
models
/
{modelId}
/
actions
Create a new action
curl --request POST \
  --url http://localhost:3000/api/models/{modelId}/actions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "<string>",
  "name": "<string>",
  "description": "<string>",
  "metadata": {}
}'
{
  "label": "<string>",
  "scriptName": "<string>",
  "inputIds": [
    "<string>"
  ],
  "outputIds": [
    "<string>"
  ],
  "variableOrder": [
    "<string>"
  ],
  "successCriteria": [
    "<string>"
  ],
  "failureModes": [
    "<string>"
  ],
  "notes": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

modelId
string<uuid>
required

ID of the model

Body

application/json
type
string
required

Type of action

name
string
required

Name of the action

description
string

Description of the action

metadata
object

Additional metadata for the action

Response

Action created successfully

An action in the model that can be executed

label
string
required

The label of the action

scriptName
string
required

The name of the script file

inputIds
string[]
required

The IDs of the inputs of the action

outputIds
string[]
required

The IDs of the outputs of the action

variableOrder
string[]

The combined ordering of input and output variable IDs

successCriteria
string[]

Array of success criteria for the action

failureModes
string[]

Array of potential failure modes for the action

notes
string

Additional notes about the action