Feedback (GET/POST)

The action route is responsible for sending and receiving data to/from feedback service e.g. Open311.

##Requirements The feedback service tool must have been selected in Oskari map publishing editor to the view and there must be 2-3 internal properties defined in the current view metadata when creating the view:

View metadata for feedback service is managed in Oskari map publishing editor

screenshot

Parameters

Name Type Description Required?
lang Language The language where the search will be targeted to **true**
method String request method **true**
srs String source CRS e.g. EPSG:3067 **true/false**
serviceId String Open311 service_code **true/false**
getServiceRequests JSON get feedback filter data **true/false**
postServiceRequest JSON feedback data to post **true/false**


 Parameters of the feedback request. Possible values are:
     *                 method - *required (serviceList, serviceDefinition, getFeedback, postFeedback
     *                 srs - *required when method is postFeedback or getFeedback
     *                 lang - fi/sv/en
     *                 serviceId - for serviceDefinition request (Open311 service_code)
     *                 getServiceRequests {JSON}  filterparams for getFeedback method
     *                 postServiceRequest {JSON} data to post to service (postFeedback method)
     

Response

Success

Error

Examples

Example query method = serviceList

http://localhost:8080/web/fi/kartta?p_p_id=Portti2Map_WAR_portti2mapportlet&p_p_lifecycle=2&action_route=Feedback&method=serviceList

Example query method = serviceDefinition

http://localhost:8080/web/fi/kartta?p_p_id=Portti2Map_WAR_portti2mapportlet&p_p_lifecycle=2&action_route=Feedback&method=serviceDefinition&serviceId=172

Example query method = postFeedback

http://localhost:8080/web/fi/kartta?p_p_id=Portti2Map_WAR_portti2mapportlet&p_p_lifecycle=2&action_route=Feedback&method=postFeedback

                var postdata = {
                "service_code": "180",
                "description": "Kampin bussipysäkillä on roskakori täynnä",
                "first_name" : "Oskari",
                "last_name" : "Maanmittaushallitus",
                "lat": "6674188.748000",
                "long": "384717.640000"
                };
                var data = {
                "srs":"EPSG:3067",
                "postServiceRequest": JSON.stringify(postdata)
                };
                channel.postRequest('PostFeedbackRequest', [data]);

Example query method = getFeedback

http://localhost:8080/web/fi/kartta?p_p_id=Portti2Map_WAR_portti2mapportlet&p_p_lifecycle=2&action_route=Feedback&method=getFeedback

                               var filterdata = {
                                 "start_date": "2016-04-01T00:00:00Z",
                                 "status": "open,closed"
                               };
                               var data = {                        
                               "srs":"EPSG:3067",
                               "getServiceRequests": JSON.stringify(filterdata)
                               };
                               channel.postRequest('GetFeedbackRequest', [data]);

Last modified: Thu Nov 10 2022 13:59:32 GMT+0200 (Eastern European Standard Time)