Save AI Actions config

Save AI Actions config

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

POSThttps://studio.edgeimpulse.com/v1/api/{projectId}/ai-actions/{actionId}
Path parameters
projectId*integer

Project ID

actionId*integer

AI Action ID

Body
namestring

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

steps*array of AIActionsConfigStep (object)
dataCategory*AIActionsDataCategory (enum)
allDataunlabeledDatadataWithoutMetadataKeydataWithMetadata
dataMetadataKeystring

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

dataMetadataValuestring

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

setMetadataAfterRunning*array of object

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

sortOrderinteger

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

OK

Body
success*boolean

Whether the operation succeeded

errorstring

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

Request
const response = await fetch('https://studio.edgeimpulse.com/v1/api/{projectId}/ai-actions/{actionId}', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "steps": [
        {
          "transformationBlockId": 0
        }
      ],
      "dataCategory": "allData",
      "setMetadataAfterRunning": [
        {
          "key": "text",
          "value": "text"
        }
      ]
    }),
});
const data = await response.json();
Response
{
  "success": false,
  "error": "text"
}

Last updated