Save AI Actions config

Save AI Actions config

post

Store an AI Actions config. Use createAIActionsJob to run the job. Post the full AI Action here w/ all parameters.

Authorizations
Path parameters
projectIdintegerrequired

Project ID

actionIdintegerrequired

AI Action ID

Body
namestringoptional

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

stepsobject[]required

dataCategorystring · enumrequired

Type of data to run this AI action on.

Options: allData, unlabeledData, enabledData, dataWithoutMetadataKey, dataWithMetadata
dataMetadataKeystringoptional

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

dataMetadataValuestringoptional

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

setMetadataAfterRunningobject[]required

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

sortOrderintegeroptional

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).

Responses
curl -L \
  --request POST \
  --url 'https://studio.edgeimpulse.com/v1/api/{projectId}/ai-actions/{actionId}' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "text",
    "steps": [
      {
        "transformationBlockId": 1,
        "parameters": {
          "ANY_ADDITIONAL_PROPERTY": "text"
        }
      }
    ],
    "dataCategory": "allData",
    "dataMetadataKey": "text",
    "dataMetadataValue": "text",
    "setMetadataAfterRunning": [
      {
        "key": "text",
        "value": "text"
      }
    ],
    "sortOrder": 1
  }'
{
  "success": true,
  "error": "text"
}

Last updated

Was this helpful?