Reports.ashx Endpoint

Overview

The FaultLogging.aspx code assumes that certain nodes are present in the Map Source referenced in a request to create a report, specifically: /MapSource/LogFaultOptions/ErrorPage; /MapSource/LogFaultOptions/XSLs/Create; /MapSource/LogFaultOptions/XSLs/Form

Similar paths are expected when performing other actions. Because these fields are not actually required when FaultLogging.aspx is used outside of the original workflow, they are not fundamental to successfully acting on a report.

To overcome this we have created a new new reports.ashx endpoint to proxy requests to the Fault Reporting methods in Locate.asmx. This allows iShare Logger (using ol-ishare) to submit reports to at_incidents without the need for the faultreporting.aspx.

Description

This endpoint currently allows for the adding and archiving of Reports.

http://custom.astun.local/mycouncil/web/reports.ashx

All Requests

Required HTTP request method: POST

Required HTTP request content-type: application/x-www-form-urlencoded

Add Report Request

This creates an entry in iShare’s internal report table.

Form Parameters

Name

Required

Value

Description

Name

Required

Value

Description

action

Yes

add

Tells the service that this is a request to add a new report

mapsource

Yes, or profile

Text

Name of iShare MapSource to log report against, e.g. mapsources/reports

profile

Yes, or mapsource

See mapsource

See mapsource

x

Yes

Number

X coordinate, normally easting

y

Yes

Number

Y coordinate, normally northing

layer

Yes

Text

Name of layer in specified profile/MapSource to log report against, e.g. planning_consultation_2023

description

Yes, or selectionid

Text

Description of report, required when no feature selection is made

selectionid

Yes, or description

Text

Identifier for a feature that has been selected for a fault report

selectionidfield

Yes, if selectionid specified

Text

The name of the field in which the selectionid identifier is referenced

Response

Returns a JSON document containing the identifier for the newly created Report.

{"reportid": NEW_REPORT_ID}

Archive Report Request

This marks a report with the specified identifier as archived, so it can be excluded from Layer requests if necessary.

Form Parameters

Name

Required

Value

Description

Name

Required

Value

Description

action

Yes

add

Tells the service that this is a request to add a new report

reportid

Yes

Text

Response

Returns a JSON document containing the identifier for the report and its new status

{"reportid": REPORT_ID, "active": false}