Projects

Preview samples for AI Actions

Get a number of random samples to show in the AI Actions screen. If saveConfig is passed in, then a valid actionId is required in the URL. If you don't need to save the config (e.g. when creating a new action), you can use -1.

post/api/{projectId}/ai-actions/{actionId}/preview-samples

Request

Path parameters

projectIdinteger required

Project ID

actionIdinteger required

AI Action ID

Request body

saveConfigboolean required

If this is passed in, the previewConfig of the AI action is overwritten (requires actionId to be a valid action).

dataCategory'allData' | 'unlabeledData' | 'enabledData' | 'dataWithoutMetadataKey' | 'dataWithMetadata' required
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".

maxDataPreviewCountinteger required

Max. amount of data items to return.

Response

OK

successboolean required

Whether the operation succeeded

errorstring

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

totalCountinteger required

Example response

{
  "samples": [
    {
      "id": 2,
      "filename": "idle01.d8Ae",
      "signatureValidate": true,
      "signatureMethod": "HS256",
      "label": "healthy-machine",
      "intervalMs": 16,
      "frequency": 62.5,
      "originalIntervalMs": 16,
      "originalFrequency": 62.5,
      "sensors": [
        {
          "name": "accX"
        }
      ],
      "datastreams": [
        {
          "sensors": [
            {
              "name": "accX"
            }
          ]
        }
      ]
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.