TravelAlertsCrudProviderImpl Resource

Author: Kurt Stauffer Date: 10/8/13 Time: 3:21 PM

GET /travelalertscrud/getCurrentTravelAlerts

Response Body
media type data type description
application/json array of TravelAlert (JSON)
application/xml list of travelAlert (XML)

Example

Request
GET /travelalertscrud/getCurrentTravelAlerts
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ {
  "timestamp" : 12345,
  "destination" : {
    "name" : "...",
    "countryCode" : "...",
    "country" : true,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "severity" : {
    "name" : "...",
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "start" : 12345,
  "end" : 12345,
  "description" : "...",
  "link" : "...",
  "datetime" : 12345,
  "latitude" : 12345.0,
  "longitude" : 12345.0,
  "type" : {
    "type" : "...",
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "stateCode" : "...",
  "metroCode" : "...",
  "cityName" : "...",
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
} ]
                
              

GET /travelalertscrud/getAlertsForItinerary/{itineraryId}

Get alerts for the given itinerary

Request Parameters
name type description constraints
itineraryId path itinerary Id long
Response Body
media type data type description
application/json array of TravelAlert (JSON) list of travel alert
application/xml list of travelAlert (XML)

Example

Request
GET /travelalertscrud/getAlertsForItinerary/{itineraryId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ {
  "timestamp" : 12345,
  "destination" : {
    "name" : "...",
    "countryCode" : "...",
    "country" : true,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "severity" : {
    "name" : "...",
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "start" : 12345,
  "end" : 12345,
  "description" : "...",
  "link" : "...",
  "datetime" : 12345,
  "latitude" : 12345.0,
  "longitude" : 12345.0,
  "type" : {
    "type" : "...",
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "stateCode" : "...",
  "metroCode" : "...",
  "cityName" : "...",
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
} ]
                
              

GET /travelalertscrud/getTravelAlertById/{id}

Request Parameters
name type description constraints
id path long
Response Body
media type data type description
application/json TravelAlert (JSON)
application/xml travelAlert (XML)

Example

Request
GET /travelalertscrud/getTravelAlertById/{id}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "timestamp" : 12345,
  "destination" : {
    "name" : "...",
    "countryCode" : "...",
    "country" : true,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "severity" : {
    "name" : "...",
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "start" : 12345,
  "end" : 12345,
  "description" : "...",
  "link" : "...",
  "datetime" : 12345,
  "latitude" : 12345.0,
  "longitude" : 12345.0,
  "type" : {
    "type" : "...",
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "stateCode" : "...",
  "metroCode" : "...",
  "cityName" : "...",
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
}
                
              

GET /travelalertscrud/getTravelAlertDestination/{id}

Returns the travel alert destination object, given an id

Request Parameters
name type description constraints
id path travel alert destination id long
Response Body
media type data type description
application/json TravelAlertDestination (JSON) TravelAlertDestination
application/xml travelAlertDestination (XML)

Example

Request
GET /travelalertscrud/getTravelAlertDestination/{id}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "name" : "...",
  "countryCode" : "...",
  "country" : true,
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
}
                
              

GET /travelalertscrud/getTravelAlertType/{id}

Returns the travel alert type, given an id

Request Parameters
name type description constraints
id path long
Response Body
media type data type description
application/json TravelAlertType (JSON)
application/xml travelAlertType (XML)

Example

Request
GET /travelalertscrud/getTravelAlertType/{id}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "type" : "...",
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
}