OBJECT

Event

Event list

link GraphQL Schema definition

Accessing Events

To communicate with the GraphQL server, you'll need an Authentication token with the right scopes. How to require authentication token can be found here.

By default, the query should always have event_type sent along the query, other fields are optional.


Sample CURL Request

            curl 'http://stage.reach24.net/graphql' \
              -H 'Content-Type: application/json' \
              -H 'Authorization: {token}' \
              -d '{
                "query": "query Event(  $eventType: String!, 
                                        $driverName: String, 
                                        $equipmentNumber: String, 
                                        $equipmentType: String, 
                                        $eventFrom: String, 
                                        $eventTo: String) 
                            { events (event_type: $eventType, 
                                      driver_name: $driverName, 
                                      equipment_number: $equipmentNumber, 
                                      equipment_type: $equipmentType,
                                      event_from: $eventFrom, 
                                      event_to: $eventTo) 
                                { 
                                  address {
                                      city_and_state
                                      coordinates{
                                        latitude
                                        longitude
                                      }
                                      full_address
                                  }
                                  driver {
                                      name
                                      email
                                  }
                                  service_center
                                  truck_dispatch
                                } 
                            }", 
                "variables" : 
                    { 
                                "eventType": "Service Event",
                                "driverName": "John Doe",
                                "equipmentNumber": "TEST444444",
                                "equipmentType": "chassis",
                                "eventFrom": "01/01/2017",
                                "eventTo": "01/01/2018",
                                "page": 1
                    } 
            }'
        

Based on the Event Schema nodes can be requested.
By default the server returns only 10 records per query. Increment the page count and make subsequest requests.