Filter

Triple filter

query filter_dyn($manufacturer_id: [Int!], $management_id: [Int!], $device_id: [Int!]) {
  __typename
  stm_dev_typ(where: {dev_typ_id: {_in: $manufacturer_id}}) {
    dev_typ_name
    dev_typ_version
    dev_typ_id
    management(where: {mgm_id: {_in: $management_id}}) {
      mgm_id
      mgm_name
      devices(where: {dev_id: {_in: $device_id}}) {
        dev_id
        dev_name
      }
    }
  }
}

Flat management filter

query filter_dyn_management($manufacturer_id: [Int!], $management_id: [Int!], $device_id: [Int!]) {
  management(where: {_and: {mgm_id: {_in: $management_id}, dev_typ_id:{_in: $manufacturer_id}, devices: {dev_id: {_in: $device_id}}}}) {
    mgm_id
    mgm_name
  }
}

Reporting Queries

listRules

query listRules($management_id: [Int!], $device_id: [Int!], $rule_src_name: [String!], $rule_src_ip: [String!]) {
  management(where: {mgm_id: {_in: $management_id}}) {
    mgm_id
    mgm_name
    devices(where: {dev_id: {_in: $device_id}}) {
      dev_id
      dev_name
      rules(where: {active: {_eq: true}, rule_src: {_in: $rule_src_name}, rule_disabled: {_eq: false}}, order_by: {rule_num: asc, rule_froms_aggregate: {}}) {
        rule_num
        rule_src
        rule_froms {
          object {
            obj_ip
          }
        }
        rule_dst
        rule_svc
        rule_action
        rule_track
      }
    }
  }
}

Lists

showDevice

query show_devices {
  device {
    dev_id
    dev_name
    stm_dev_typ {
      dev_typ_name
      dev_typ_version
    }
  }
}