POST
/
api
/
models
/
{modelId}
/
actions
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>",
  "inputs": [
    {
      "id": "<string>",
      "name": "<string>",
      "value": "<string>",
      "unitName": "<string>",
      "prefix": "<string>",
      "lastUpdated": 123,
      "constraints": [
        "<string>"
      ],
      "isLeftAligned": true
    }
  ],
  "outputs": [
    {
      "id": "<string>",
      "name": "<string>",
      "value": "<string>",
      "unitName": "<string>",
      "prefix": "<string>",
      "lastUpdated": 123,
      "constraints": [
        "<string>"
      ],
      "isLeftAligned": true
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

modelId
string
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

201
application/json
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

inputs
object[]
required

The inputs of the action

outputs
object[]
required

The outputs of the action