Skip To Content

Update Report

  • URL:https://report-url/update(POST only)
  • Required Capability:Item Owner
  • Version Introduced:11.1

Description

This operation edits a report within a mission. To apply an update to a report, only supply the desired updates, all fields and properties not supplied will remain the same after the update operation.

Request parameters

ParameterDetails
item

(Optional)

A JSON object containing the desired title and summary of the report.


{
   "title":"My New Title",
   "summary": "My new summary."
}
drawingInfo

(Optional)

A JSON Object that defines the report feature layer's drawing info, including a feature renderer. See drawingInfo for details.

addFields

(Optional)

A JSON Array of fields to be added to the report. Refer to Questions to construct the proper JSON .

updateFields

(Optional)

A JSON Array of fields to be updated in the report.

async

(Optional)

If true, the edit report request is created asynchronously and a jobId is given.

Default is false.

f

(Optional)

The response format. The default response format is html.

Values: html | json | pjson

Example Edit Report Request

Below is a sample request URL for the reports/edit operation:


POST /webadaptor/rest/services/<misison_id>/MissionServer/reports/<report_id>/edit HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

title={
   "title":"My New Title",
   "summary": "My new summary."
}
drawingInfo={"renderer":{"type":"simple","symbol":{"color":[0,0,128,128],"size":15,"angle":0,"xoffset":0,"yoffset":0,"type":"esriSMS","style":"esriSMSCircle","outline":{"color":[0,0,128,255],"width":0.99975,"type":"esriSLS","style":"esriSLSSolid"}}}}
addFields=[
      {
        "position": 0,
        "fieldName": "added_dropdown",
        "name": "add_dropdown_1",
        "type": "esriQuestionTypeDropdown",
        "label": "Added Dropdown",
        "description": "Choose a color",
        "isRequired": false,
        "choices": {
          "items": [
            {
              "label": "Red",
              "value": "color_1",
              "position": 0
            },
            {
              "label": "Blue",
              "value": "color_2",
              "position": 1
            }
          ],
          "other": {
            "isEnabled": false,
            "label": "Other",
            "value": "other",
            "name": "test_drop_down_other",
            "fieldName": "test_drop_down_other"
          }
        },
        "choicesOrder": {
          "type": "default"
        }
      },
      {
        "position": 1,
        "fieldName": "added_date",
        "name": "add_date_1",
        "type": "esriQuestionTypeDateTime",
        "label": "Added Date",
        "description": "Date of event",
        "isRequired": false,
        "isVisible": true,
        "validation": {
          "valueRange": {
            "isEnabled": false
          }
        }
      }
]
updateFields=[
      {
        "position": 2,
        "fieldName": "added_choice",
        "label": "Updated Domain",
        "description": "Updated Description"
      }
]

JSON Response example


{
    "editResults": {
        "item": true,
        "updateFields": true,
        "addFields": true,
        "drawingInfo": true
    },
    "success": true
}

Async JSON Response example


{"jobId": "jf0366af5-b379-4ac0-8aa7-70b2264cf65a"}