Function getAutomations

  • Retrieves a list of the automations that the requesting user has access to.

    Parameters

    • query: {
          fields?: string;
          filter?: string;
          limit?: number;
          listAll?: boolean;
          sort?:
              | "state"
              | "id"
              | "name"
              | "-name"
              | "+name"
              | "+createdAt"
              | "-createdAt"
              | "+updatedAt"
              | "-updatedAt"
              | "createdAt"
              | "updatedAt"
              | "+id"
              | "-id"
              | "runMode"
              | "lastRunAt"
              | "lastRunStatus"
              | "duration"
              | "+runMode"
              | "+state"
              | "+lastRunAt"
              | "+lastRunStatus"
              | "-runMode"
              | "-state"
              | "-lastRunAt"
              | "-lastRunStatus"
              | "+duration"
              | "-duration";
      }

      an object with query parameters

      • Optionalfields?: string

        Allows to select the actual fields to be returned. When no fields are defined, all are returned.

      • Optionalfilter?: string

        Allowed filters: name, runMode, lastRunStatus, ownerId, spaceId

      • Optionallimit?: number

        The number of automations to retrieve.

      • OptionallistAll?: boolean

        When true, list all automations. Restricted to tenant admins and analytics admins.

      • Optionalsort?:
            | "state"
            | "id"
            | "name"
            | "-name"
            | "+name"
            | "+createdAt"
            | "-createdAt"
            | "+updatedAt"
            | "-updatedAt"
            | "createdAt"
            | "updatedAt"
            | "+id"
            | "-id"
            | "runMode"
            | "lastRunAt"
            | "lastRunStatus"
            | "duration"
            | "+runMode"
            | "+state"
            | "+lastRunAt"
            | "+lastRunStatus"
            | "-runMode"
            | "-state"
            | "-lastRunAt"
            | "-lastRunStatus"
            | "+duration"
            | "-duration"

        The field to sort by, with +- prefix indicating sort order. (?query=-name => sort on the name field using descending order)

    • Optionaloptions: ApiCallOptions

    Returns Promise<GetAutomationsHttpResponse>

    getAutomations(
    {
    fields: "lastRun,lastRunStatus,runMode,createdAt,updatedAt"
    }
    )

    GetAutomationsHttpError