Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

In order to communicate with the Holiday Web Service via REST, the url of the web method must be according to these guidelines.

The base url for the REST controller (on the test server) is [https://www.test.hawaii.edu/its/ws/holiday/rest]

From there the name of the method is appended onto the url Ex. /exists, /closest, /inMonth, /inYear, /inRange

The name of the method is followed by a '?' and then the parameters separated by '&'.

Ex. https://www.test.hawaii.edu/its/ws/holiday/rest/closest?date=2012-01-01&isObserved=true

Supported methods:

For all methods that require the full date the format must be yyyy-MM-dd, even if the day or month is a single digit it must be preceded by a 0, Ex. 01, 02, etc.

Only the parameters concerning the date are necessary all other parameters are optional, however any boolean values will default to true if not specified.

  • boolean isObserved - Used to indicate if the user is referring to the date the holiday is observed (true), or the official date (false).
  • boolean searchForward - Used by closest method to search forward if true or backwards if false.
  • boolean includeStartAndEnd - Used by inRange method to decide if the search should include the start and end dates.
  • String type - An optional parameter through which the user can select which type of Holiday should be returned (Federal, Bank, UH, State)

exists(date, isObserved, type) - Returns whether the given date is a holiday or not.
Ex. https://www.test.hawaii.edu/its/ws/holiday/rest/exists?date=2012-01-02&isObserved=true&type=Federal

closest(date, searchForward, isObserved, type) - Returns the closest holiday to the given date.
Ex. https://www.test.hawaii.edu/its/ws/holiday/rest/closest?date=2012-01-10&searchForward=true

inMonth(month, year, isObserved, type) - Returns all holidays within the given month. The year parameter is optional and will default to the current year if not specified.
Ex. https://www.test.hawaii.edu/its/ws/holiday/rest/inMonth?month=03&type=state

inYear(year, isObserved, type) - Returns all holidays within the given year.
Ex. https://www.test.hawaii.edu/its/ws/holiday/rest/inYear?year=2012

inRange(beginDate, endDate, includeStartAndEnd, isObserved, type) - Returns all holidays within the range.
Ex. https://www.test.hawaii.edu/its/ws/holiday/rest/inRange?beginDate=2012-01-27&endDate=2012-06-29&includeStartAndEnd=true

  • No labels