Oskari API documentation

Select request

admindown-arrow
frameworkdown-arrow
mappingdown-arrow
uidown-arrow

PostFeedbackRequest RPC

Posts user's feedback data to feedback service (Open311).

Description

Request forwards feedback parameters to the request handler.

http://wiki.open311.org/GeoReport_v2/#post-service-request

Parameters

(* means that the parameter is required)

Name Type Description Example Details
/* baseUrl String Open311 service base urlhttps://asiointi.hel.fi/palautews/rest/v1
/* srs String Coordinate system of front end mapEPSG:3067
/* payload JSON user's feedback data see below examplehttp://wiki.open311.org/GeoReport_v2/#post-service-request
lang String the language in which to get instructions

Parameter description

http://wiki.open311.org/GeoReport_v2/


   payload content                                                  Required item
         api_key 	    Api key for submitting service requests 	        Yes (imported via properties)
         service_code 	The unique identifier for the service request type 	Yes
         description 	A full description of the service request. 	        Yes
                         This is free form text having min 10 and max 5,000 characters.
                         This may contain line breaks, but not html or code.
         title       	Title of the service requests 	No
         lat 	Latitude using the (WGS84) projection. 	Yes/No, if geometry availabe
         long 	Longitude using the (WGS84) projection. Yes/No, if geometry availabe
         service_object_type                             No
         service_object_id                               No
         address_string 	Human readable address or description of the location. 	No
         email 	 	No
         first_name 	No
         last_name 	No
         phone 	 	No
         media_url 	A URL to media associated with the request, e.g. an image 	No
         media 	Array of file uploads 	No
         geometry  geojson geometry (Point, LineString or Polygon) (service extension 'geometry') No


Oskari request parameter defaults

There are also parameters, which are not in request api, but must be defined in Oskari publisher when creating the embedded map.

Use Oskari map publishing method for to define these properties for the embedded map

Oskari embedded map configs for feedbackService

1. **base url**, Open311 service base url
2. **api_key** value in Open311 post request - posting is not allowed without api key in general
3. **service extensions**,
Url, key and extensions are not visible to the user

--> http://wiki.open311.org/GeoReport_v2/#post-service-request

Examples


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



   javascript
   var postdata = {
       "service_code": "180",
       "description": "Vartiosaari kaipaa suojelua",
       "first_name" : "Line",
       "last_name" : "POC",
       "geometry": {
           "type": "LineString",
           "coordinates": [ [393000,6673192],[393216,6673560],[393712,6673864],[393736,6673592]]}
   };
   var data = {
       "srs":"EPSG:3067",
       "payload": postdata
   };
   channel.postRequest('PostFeedbackRequest', [data]);


Related api

  • FeedbackResultEvent