Skip to main content
POST
/
api
/
{projectId}
/
ai-actions
/
{actionId}
Save AI Actions config
curl --request POST \
  --url https://studio.edgeimpulse.com/v1/api/{projectId}/ai-actions/{actionId} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "name": "<string>",
  "steps": [
    {
      "transformationBlockId": 123,
      "parameters": {}
    }
  ],
  "dataCategory": "allData",
  "dataMetadataKey": "<string>",
  "dataMetadataValue": "<string>",
  "setMetadataAfterRunning": [
    {
      "key": "<string>",
      "value": "<string>"
    }
  ],
  "sortOrder": 123
}'
{
  "success": true,
  "error": "<string>"
}

Authorizations

x-api-key
string
header
required

Path Parameters

projectId
integer
required

Project ID

actionId
integer
required

AI Action ID

Body

application/json
steps
object[]
required
dataCategory
enum<string>
required

Type of data to run this AI action on.

Available options:
allData,
unlabeledData,
enabledData,
dataWithoutMetadataKey,
dataWithMetadata
setMetadataAfterRunning
object[]
required

After the action runs, add this key/value pair as metadata on the affected samples.

name
string

User-provided name. If no name is set then displayName on the action will be automatically configured based on the transformation block.

dataMetadataKey
string

Metadata key to filter on. Required if dataCategory is equal to "dataWithoutMetadataKey" or "dataWithMetadata".

dataMetadataValue
string

Metadata value to filter on. Required if dataCategory is equal to "dataWithMetadata".

sortOrder
integer

Numeric value (1..n) where this action should be shown in the action list (and in which order the actions should run when started from a data source).

Response

200 - application/json

OK

success
boolean
required

Whether the operation succeeded

error
string

Optional error description (set if 'success' was false)

I