Design of REST API for LocalPublic Transportation Information Services in Malang City

Utilization of information technology in the field of public transportation has been proven in improving the quality of public transportation services. The availability of information technology that supports public transportation in Malang city is still limited. An effort is required to encourage the availability of information technology that support public transportation in Malang city. This research attempts to propose a draft proposal of REST API designed for supporting information about public transportation services in Malang city. The result of this research showed that the REST API should provide a search facility to find proper service mode of transportation, cost estimation, time estimation, calling or booking a public transportation, a list of all the modes of transportation that exist, as well as detailed information on a mode of transport in which includes the name of public transportation, index of comfortability, index of security, index of safety, index of privacy, index of availability, index of accessibility


Introduction
Internet usage in Indonesia increased significantly since 2009 [1]. Based on data from the World Bank, the percentage of Internet users in Indonesia has increased from 6.9% in 2009 to 17.1% in 2014 [1]. It showed an increase of more than double in 5 years. This increase cannot be separated from the ever-expanding reach of the Internet in the Indonesian region in 2013 and estimated to have covered 22% of Indonesia at that time [2]. Thus, the use of Internet technology in Indonesia is becoming increasingly promising in the future. Internet as an important part of information technology has been utilized in various fields, including transportation. For example, use of information technology in the field of public transportation has been proven in improving the quality of public transportation, it can be known through the state of transportation in London city, England [3].
Malang as the second largest city in East Java after Surabaya has a lot of potential in economic growth. Various studies have been carried out with the conclusion that the means of transportation has an influence on economic growth. One study that addressed this is research on the influence of the city's transportation to the city's economic growth [4]. Currently the public transportation in Malang city is dominated by "Angkutan Kota" or "Angkot" (public transportation) or local citizens in Malang city is often called it as "Mikrolet". The existence of local public transportation has been perceived benefits for the citizens, but due to several factors, among others, related to the decline in economic conditions of citizens and the quality of transport services to the city and the availability of alternative transportation more affordable, resulting in the amount of demand for public transportation in Malang city decreased so that the people tend to switch to the mode of personal transportation [5]. Such conditions contribute to the occurrence of an increase in traffic congestion in Malang city. Thus, the need for evaluation and improvement of transport services in Malang city for the use of local public transportation is one part of the strategy in a solution to overcome the problem of traffic congestion in Malang city [6] which will eventually become a factor driving the growth of the economy of Malang city.
Based on the observations that have been made, the availability of information technologies that support public transportation services in Malang city is still not sufficient. For example, people are still difficult to find suitable public transport for him/her. This is due to the limitations of information systems that are currently available. On the other hand, the process of determining a suitable public transportation used by the user is not just a process of finding an appropriate route because public transportation has some complex characteristics. In using public transport, people have a variety of criteria, wherein the criteria will affect the level of satisfaction with the decisions taken by the users of public transport. Some of criteria include availability of air conditioning, seating comfort price/tariff, security, time efficiency, privacy, and compliance with traffic rules [7].
Utilization of information technology in the transportation sector can be developed through the concept of CPS (Cyber-Physical Systems). In 2010, CPS rank high on the priority of federal research investment research in the United States [8]. One implementation of CPS for the transportation sector is a T-CPS (Transportation CPS) in the form of service-oriented architecture that includes perception, communication, computing, control and service, as well as functions that corresponds to [9]. T-CPS is an important research that leads to an availability of future intelligent transportation systems that can be used to deliver solutions that support technology to overcome the problems of traffic and transportation that occurs in the present [9]. It can be concluded that information technology, in this case the service-oriented architecture, has great potential to be implemented in the transportation sector.
This research proposed as early stage research and aims to produce a draft of application program interface (API) based on representational state transfer (REST) architectural style containing information of public transportation services in Malang city as one of the efforts to improve the quality of public transportation services in the city by information technology. The resulting API draft is expected to be a reference for academics, researchers, practitioners, governments, and the public with the relationship in the same field with this research topic.

Related Work
Yongfu [9] researched a method of a merger between the real system (physical) and virtual systems (cyber) to solve the traffic problems. The method was named T-CPS and stems from the main idea to send information about the physical objects of transportation along with state of the real system into the virtual system then integrates the virtual component with the real component via computing technology, communication, and control to realize the communication of information, coordination system and control of optimal decision making based on the interaction and feedback between the real system to a virtual system based on the object of accurate cognition of real transportation. T-CPS was developed based on service-oriented architecture [9].
In another study, Western [10] revealed major issues along with the direction of development of the use of information technology in transportation. Issues addressed by the Western include: the use of web technology, particularly with respect to real time technologies such as "zero-latency" and push technology; mobile computing; virtual reality; and the explosion of consumer electronics products. Other issues were also highlighted by Western is the issue of data sharing and interoperability. The issue of data sharing of such as the transport of data management, exchange and sharing the data sets of transportation. Issues on interoperability include systems integration, standard rules, as well as an early example of interoperability in transport.
One of the fundamental aspects of the problem are the geographical and topographical data modelling on the public transport network. This has been investigated in the article entitled "Modelling a Public Transport Network for Generation of Schematic Maps and Location Queries" [11]. More than just data modelling, in these writings, Avelar [11] has made visualization tools as well as a prototype system that allows users to perform queries against the transport network.
From a different viewpoint, the paradigm of machine-to-machine communication (M2M) is an important part of the internet of things (IoT) in which there is interaction data exchange between machines with sensors. Its main objective is to build a worldscale intelligent systems that involve interaction between machines without requiring interaction with humans. If the mechanism of this interaction is standardized (e.g. With REST API), it can facilitate the realization of these objectives [12].

3
Requirement Analysis

Domain Analysis
Based on data obtained through direct observation in the field, it can be seen that the modes of public transportation Malang city are made up of "Angkot" (public transportation, minibus), taxis, "Bus Halokes" (school bus), "Ojek" (public transportation, motorcycles), and "Becak" (rickshaws). Each type of public transportation mode has specific characteristics that differ from one another. From the specific characteristics of each transportation mode, a general model that can represent all types of transportation modes can be constructed through a process of generalization. The model depicted in feature diagram such as in figure 1 with a detailed explanation in table 1.   Availability of air In some types of public transportation, air conditioner conditioning has become a standard of service, but there are still many which are not equipped with air conditioning, for example "Mikrolet". 2 Seating comfort Although the mileage is relatively close (in the city), but the seat remains affect the level of user satisfaction. 3 Fare The fare should be comparable to the quality 4 Security Passenger safety from crime that may occur when using public transport. 5 Safety Passenger safety while the accidents happened that may result in casualties and material losses (e.g., damaged luggage). 6 Time efficiency The time required to reach the destination, including the waiting time and travel time. 7 Privacy The level of protection of personal privacy as a passenger. 8 Compliance with traffic Driving behaviour by the driver on the road. rules Walking time The people generally prefer a mode of transportation that can be reached easily without requiring a lot of walking. 5 Accessibility The people generally prefer a mode of transportation that is easily accessible. 6 Age The age factor shown to affect the decision of the selection of the mode of transportation used. 7 Gender Gender factor also been shown to affect the selection of the mode of transportation.

Functional Requirements
Based on the analysis of current conditions, the results of the generalization modelling to public transport in Malang city, user satisfaction criteria and factors affecting selection of public transportation mode, as well as the potential of existing information technology, then it can be derived to functional requirements of the proposed system. The proposed list of functional requirements can be seen in figure 2. Explanation in more detail about each proposed functional requirement can be seen in table 4. Search for public Users can use the system to look for public transport transportation by providing the location of origin (departure) and destination (arrival). Users can restrict the search based on certain desired type of transportation. Result of public transport can be influenced by the context prevailing at the time of the search process carried out public transportation. That context is the time, i.e. the time when the search is done, e.g. morning, afternoon, evening, night, or refer to a specific date and time) and passenger profiles, namely gender and age. In addition, the search results may represent a direct trip to the destination or the journey that requires a transfer from one mode to another mode to arrive at the destination. KF-02

Fig. 2. Functional Requirements of Proposed System
Estimate time of Users can use this system to estimate the time of departure departure. This functionality can also be translated that the system can provide an estimate of when public transportation is available to passengers in accordance with the position. For example, when people want to use transport facilities "Bus Halokes", the system can provide an estimate of the appropriate departure from the place where the passenger will rise. Another example, when people book a taxi, the system can provide an estimate of the arrival of the taxi the place where passengers will rise. KF-03 Estimate time of arrival Users can use this system to estimate the time of arrival at the destination.

KF-04
Estimate cost Users can use this system to estimate the costs needed to get to a location using public transportation.

KF-05
Reserve public Users can place an order for public transport services. transportation Reservations can be through phone calls and applications from third parties.

KF-06
View list of all public Users can see the names of all public transport modes transportation available in Malang city.

KF-07
View details of certain Users can view a detailed explanation of certain public transportation public transport. The detailed explanations include the name of public transportation, index of comfortability, index of security, index of safety, index of privacy, index of availability, index of accessibility index, and route.

REST API Design
Each functional requirement listed in figure 2 is expressed in a REST resource that has a unique uniform resource identifier (URI). There are two REST method used here, i.e. retrieve to retrieve the data and activity to perform a specific action. REST retrieve method uses HTTP GET method, while the REST activity method uses HTTP POST method. The design of REST API can be seen in table 5. Each resource accompanied by example of XML document representing the HTTP response body from service. The design of REST API on this research has focused on functional requirements and does not include navigation feature among resources. So, that is not yet meet one of REST principle, i.e. hypertext as the engine of application state (HATEOAS). <public-transportation-detail> <name>Mikrolet AH</name> <comfortability-index>3</comfortability-index> <security-index>3</security-index > <safety-index>3</safety-index> <privacy-index>2</privacy-index> <availability-index>4.1</availability-index> <route> <leave>A, B, C, D</leave> <return>D, F, F, A</return> </route> </public-transportation-detail>

Conclusion and Future Work
The result showed that the REST API is designed to provide a search service of transportation mode, cost estimation, time estimation, calling or booking a public transportation, list of all public transportation modes that exist, as well as detailed information on a mode of public transportation in which includes the name of public transportation, index of comfortability, index of security, index of safety, index of privacy, index of availability, index of accessibility index, and route. The next job is refining, adding features (if any) to current REST API design and implementing REST API designs that have been produced in this research with proper methods and algorithms.