GQL to send to Major Tom from your Script

*1*query CommandStates($missionId: ID!) {
*2*  mission(id: $missionId){
*3*    commands(first: 20){
*4*      nodes {
*5*        id
*6*        state
*7*        commandType
*8*        updatedAt
*9*        system {
*10*          id
*11*          name
*12*        }
*13*        gateway {
*14*          id
*15*          name
*16*        }
*17*      }
*18*    }
*19*  }
*20*}

Example response from our Demo mission, Space Oddity (cut down to 5 for brevity)

*1*{
*2*  "data": {
*3*    "mission": {
*4*      "commands": {
*5*        "nodes": [
*6*          {
*7*            "id": "407345",
*8*            "state": "completed",
*9*            "commandType": "downlink_file",
*10*            "updatedAt": 1587750423859,
*11*            "system": {
*12*              "id": "294",
*13*              "name": "Space Oddity"
*14*            },
*15*            "gateway": {
*16*              "id": "22",
*17*              "name": "Demo"
*18*            }
*19*          },
*20*          {
*21*            "id": "407344",
*22*            "state": "completed",
*23*            "commandType": "update_file_list",
*24*            "updatedAt": 1587750349318,
*25*            "system": {
*26*              "id": "294",
*27*              "name": "Space Oddity"
*28*            },
*29*            "gateway": {
*30*              "id": "22",
*31*              "name": "Demo"
*32*            }
*33*          },
*34*          {
*35*            "id": "407343",
*36*            "state": "completed",
*37*            "commandType": "uplink_file",
*38*            "updatedAt": 1587750337839,
*39*            "system": {
*40*              "id": "294",
*41*              "name": "Space Oddity"
*42*            },
*43*            "gateway": {
*44*              "id": "22",
*45*              "name": "Demo"
*46*            }
*47*          },
*48*          {
*49*            "id": "407342",
*50*            "state": "completed",
*51*            "commandType": "telemetry",
*52*            "updatedAt": 1587750285794,
*53*            "system": {
*54*              "id": "294",
*55*              "name": "Space Oddity"
*56*            },
*57*            "gateway": {
*58*              "id": "22",
*59*              "name": "Demo"
*60*            }
*61*          },
*62*          {
*63*            "id": "407341",
*64*            "state": "completed",
*65*            "commandType": "connect",
*66*            "updatedAt": 1587750276634,
*67*            "system": {
*68*              "id": "294",
*69*              "name": "Space Oddity"
*70*            },
*71*            "gateway": {
*72*              "id": "22",
*73*              "name": "Demo"
*74*            }
*75*          }
*76*        ]
*77*      }
*78*    }
*79*  }
*80*}