Get Automation Initial Values

Before You Begin

🔗 Use the GraphQL Playground to execute the queries in this guide.

Prerequisites

  1. Authentication: Use a Service Account token.
  2. Permissions: Ensure your token has permissions to view automations.
  3. Action ID: Identify the action to retrieve initial values for.

Step 1: Find the Action ID

Setp 2: Query Automation Initial Values

Use the automationInitialValues query to retrieve initial values for a given action. For now, the only action that has default initial values is the apply_sla_rules action.

{
  automationInitialValues(actionId: "apply_sla_rules") {
    action_params {
      slaParams {
        monday {
          startHour
          endHour
          enabled
        }
        tuesday {
          startHour
          endHour
          enabled
        }
        wednesday {
          startHour
          endHour
          enabled
        }
        thursday {
          startHour
          endHour
          enabled
        }
        friday {
          startHour
          endHour
          enabled
        }
        saturday {
          startHour
          endHour
          enabled
        }
        sunday {
          startHour
          endHour
          enabled
        }
        timezone
      }
    }
  }
}
  • actionId: (Required) The action to retrieve initial values for.

Key Fields Explained

  • action_params: A json with the initial values for the action configuration.

Example Response

{
  "data": {
    "automationInitialValues": {
      "action_id": "apply_sla_rules",
      "action_params": {
        "slaParams": {
          "monday": { "startHour": "09:00", "endHour": "18:00", "enabled": true },
          "tuesday": { "startHour": "09:00", "endHour": "18:00", "enabled": true },
          "wednesday": { "startHour": "09:00", "endHour": "18:00", "enabled": true },
          "thursday": { "startHour": "09:00", "endHour": "18:00", "enabled": true },
          "friday": { "startHour": "09:00", "endHour": "18:00", "enabled": true },
          "saturday": { "startHour": "00:00", "endHour": "00:00", "enabled": false },
          "sunday": { "startHour": "00:00", "endHour": "00:00", "enabled": false },
          "timezone": "America/Sao_Paulo"
        }
      }
    }
  }
}