Get Results

Description

LicenseLicense:

The ArcGIS Data Reviewer for Server extension is required in order to use this resource.

The getResults operation queries records from REVTABLEMAIN, REVBATCHRUNTABLE and REVCHECKRUNTABLE. This operation does not return geometries but does support spatialFilters in its filtersArray parameter. Use this operation in conjunction with a Dynamic Layer and the getLayerDefinition operation to link map features to Reviewer attributes. That link is between linkId and recordId.

This operation has two parameters, queryParameters and filtersArray. filtersArray is optional. If filtersArray is unset, all information is returned according to the setting specified in queryParameters.

This operation returns a non-spatial featureset. A featureset is a JSON object that contains a list of fields aliases, fields, and field values. See the ArcGIS Data Reviewer for Server REST API reference to learn more about the structure of a featureset.

Results are paged. You specify the number of results per page with the pageSize queryParameter. You specify which page in the result set to return with the pageNumber queryParameter. You specify which fields to include in the featureset with the returnFields queryParameter.

queryParameters is a JSON object that contains the following key-value pairs:

Request parameters

Parameter

Details

queryParameters

Description: JSON object that contains key-value pairs that control the number of items per page, page number, fields and sort order.

filtersArray

Description: An array of filters. A filter is a JSON structure. Filters limit the number of features retrieved from the server to a specified criteria. Filters are similar in functionality to a SQL where clause.

f

Description: The response format. The default response format is html.

Values: html | json

Example usage

Example 1: Retrieve results from all the fields on page 1, limiting the page size to five items, sorting by objectId in descending order.

http://localhost:6080/arcgis/rest/services/reviewer/MapServer/exts/DataReviewerServer/ReviewerResults/getResults?queryParameters={"pageSize":5,"pageNumber":1,"sortyBy":"objectid","returnFields":["*"],"sortDescending":true}&filtersArray=&f=pjson

JSON response example

{
 "fieldAliases": {
  "recordId": "RecordId",
  "objectId": "ObjectId",
  "subtype": "Subtype",
  "category": "Category",
  "sessionId": "SessionId",
  "checktitle": "Checktitle",
  "resourceName": "ResourceName",
  "checkName": "CheckName",
  "notes": "Notes",
  "severity": "Severity",
  "reviewStatus": "ReviewStatus",
  "reviewTechnician": "ReviewTechnician",
  "correctionTechnician": "CorrectionTechnician",
  "verificationTechnician": "VerificationTechnician",
  "reviewDateUtc": "ReviewDateUtc",
  "correctionDateUtc": "CorrectionDateUtc",
  "verificationDateUtc": "VerificationDateUtc",
  "lifecycleStatus": "LifecycleStatus",
  "lifecyclePhasee": "LifecyclePhase"
 },
 "fields": [
  {
   "name": "recordId",
   "type": "esriFieldTypeInteger"
  },
  {
   "name": "objectId",
   "type": "esriFieldTypeInteger"
  },
  {
   "name": "subtype",
   "type": "esriFieldTypeString"
  },
  {
   "name": "category",
   "type": "esriFieldTypeString"
  },
  {
   "name": "sessionId",
   "type": "esriFieldTypeInteger"
  },
  {
   "name": "checktitle",
   "type": "esriFieldTypeString"
  },
  {
   "name": "resourceName",
   "type": "esriFieldTypeString"
  },
  {
   "name": "checkName",
   "type": "esriFieldTypeString"
  },
  {
   "name": "notes",
   "type": "esriFieldTypeString"
  },
  {
   "name": "severity",
   "type": "esriFieldTypeInteger"
  },
  {
   "name": "reviewStatus",
   "type": "esriFieldTypeString"
  },
  {
   "name": "reviewTechnician",
   "type": "esriFieldTypeString"
  },
  {
   "name": "correctionTechnician",
   "type": "esriFieldTypeString"
  },
  {
   "name": "verificationTechnician",
   "type": "esriFieldTypeString"
  },
  {
   "name": "reviewDateUtc",
   "type": "esriFieldTypeDate"
  },
  {
   "name": "correctionDateUtc",
   "type": "esriFieldTypeDate"
  },
  {
   "name": "verificationDateUtc",
   "type": "esriFieldTypeDate"
  },
  {
   "name": "lifecycleStatus",
   "type": "esriFieldTypeInteger"
  },
  {
   "name": "lifecyclePhase",
   "type": "esriFieldTypeInteger"
 	}
 ],
 "features": [
  {
   "attributes": {
    "recordId": 291,
    "objectId": 7927,
    "subtype": "",
    "category": "Feature Record",
    "sessionId": 1,
    "checktitle": "Orphan Storm Manholes",
    "resourceName": "swManhole",
    "checkName": "Geometry on Geometry Check",
    "notes": "",
    "severity": 2,
    "reviewStatus": "Point does not intersect polyline",
    "reviewTechnician": "homer",
    "correctionTechnician": null,
    "verificationTechnician": null,
    "reviewDateUtc": 1351648012000,
    "correctionDateUtc": null,
    "verificationDateUtc": null,
    "lifecycleStatus": 1,
    "lifecyclePhase": 2
   }
  },
  {
   "attributes": {
    "recordId": 290,
    "objectId": 7926,
    "subtype": "",
    "category": "Feature Record",
    "sessionId": 1,
    "checktitle": "Orphan Storm Manholes",
    "resourceName": "swManhole",
    "checkName": "Geometry on Geometry Check",
    "notes": "",
    "severity": 2,
    "reviewStatus": "Point does not intersect polyline",
    "reviewTechnician": "homer",
    "correctionTechnician": null,
    "verificationTechnician": null,
    "reviewDateUtc": 1351648012000,
    "correctionDateUtc": null,
    "verificationDateUtc": null,
    "lifecycleStatus": 1,
    "lifecyclePhase": 2
   }
  },
  {
   "attributes": {
    "recordId": 289,
    "objectId": 7924,
    "subtype": "",
    "category": "Feature Record",
    "sessionId": 1,
    "checktitle": "Orphan Storm Manholes",
    "resourceName": "swManhole",
    "checkName": "Geometry on Geometry Check",
    "notes": "",
    "severity": 2,
    "reviewStatus": "Point does not intersect polyline",
    "reviewTechnician": "homer",
    "correctionTechnician": null,
    "verificationTechnician": null,
    "reviewDateUtc": 1351648012000,
    "correctionDateUtc": null,
    "verificationDateUtc": null,
    "lifecycleStatus": 1,
    "lifecyclePhase": 2
   }
  },
  {
   "attributes": {
    "recordId": 288,
    "objectId": 7922,
    "subtype": "",
    "category": "Feature Record",
    "sessionId": 1,
    "checktitle": "Orphan Storm Manholes",
    "resourceName": "swManhole",
    "checkName": "Geometry on Geometry Check",
    "notes": "",
    "severity": 2,
    "reviewStatus": "Point does not intersect polyline",
    "reviewTechnician": "homer",
    "correctionTechnician": null,
    "verificationTechnician": null,
    "reviewDateUtc": 1351648012000,
    "correctionDateUtc": null,
    "verificationDateUtc": null,
    "lifecycleStatus": 1,
    "lifecyclePhase": 2
   }
  },
  {
   "attributes": {
    "recordId": 287,
    "objectId": 7919,
    "subtype": "",
    "category": "Feature Record",
    "sessionId": 1,
    "checktitle": "Orphan Storm Manholes",
    "resourceName": "swManhole",
    "checkName": "Geometry on Geometry Check",
    "notes": "",
    "severity": 2,
    "reviewStatus": "Point does not intersect polyline",
    "reviewTechnician": "homer",
    "correctionTechnician": null,
    "verificationTechnician": null,
    "reviewDateUtc": 1351648012000,
    "correctionDateUtc": null,
    "verificationDateUtc": null,
    "lifecycleStatus": 1,
    "lifecyclePhase": 2
   }
  }
 ]
}

Example 2: Retrieve results from 3 fields on page 1, limiting the page size to 5 items, filtering for severities equal to 5:

http://localhost:6080/arcgis/rest/services/reviewer/MapServer/exts/DataReviewerServer/ReviewerResults/getResults?queryParameters={"pageSize":5,"pageNumber":1,"returnFields":["recordId","resourceName","sessionId"]}&filtersArray={"filtersArray":[{"singleAttributeFilter":[{"fieldValue":5,"fieldName":"severity"}]}]}&f=pjson

JSON response example

{
 "fieldAliases": {
  "recordId": "RecordId",
  "resourceName": "ResourceName",
  "sessionId": "SessionId"
 },
 "fields": [
  {
   "name": "recordId",
   "type": "esriFieldTypeInteger"
  },
  {
   "name": "resourceName",
   "type": "esriFieldTypeString"
  },
  {
   "name": "sessionId",
   "type": "esriFieldTypeInteger"
  }
 ],
 "features": [
  {
   "attributes": {
    "recordId": 14,
    "resourceName": "Landmarks",
    "sessionId": 2
   }
  },
  {
   "attributes": {
    "recordId": 15,
    "resourceName": "Landmarks",
    "sessionId": 2
   }
  },
  {
   "attributes": {
    "recordId": 16,
    "resourceName": "Landmarks",
    "sessionId": 2
   }
  },
  {
   "attributes": {
    "recordId": 17,
    "resourceName": "Landmarks",
    "sessionId": 2
   }
  },
  {
   "attributes": {
    "recordId": 18,
    "resourceName": "Landmarks",
    "sessionId": 2
   }
  }
 ]
}

Example 3: Return 1 result from page 0, from fields ObjectId, SessionId, Severity, resourceName, ReviewStatus, ReviewTechnician, and Notes.

http://localhost:6080/arcgis/rest/services/reviewer/MapServer/exts/DataReviewerServer/ReviewerResults/getResults?queryParameters={"pageSize":"1","pageNumber":"0","returnFields":["ObjectId","SessionId","Severity","resourceName","ReviewStatus","ReviewTechnician","Notes"]}&filtersArray=&f=pjson

JSON response example

{
 "fieldAliases": {
  "objectId": "ObjectId",
  "sessionId": "SessionId",
  "severity": "Severity",
  "resourceName": "ResourceName",
  "reviewStatus": "ReviewStatus",
  "reviewTechnician": "ReviewTechnician",
  "notes": "Notes"
 },
 "fields": [
  {
   "name": "objectId",
   "type": "esriFieldTypeInteger"
  },
  {
   "name": "sessionId",
   "type": "esriFieldTypeInteger"
  },
  {
   "name": "severity",
   "type": "esriFieldTypeInteger"
  },
  {
   "name": "resourceName",
   "type": "esriFieldTypeString"
  },
  {
   "name": "reviewStatus",
   "type": "esriFieldTypeString"
  },
  {
   "name": "reviewTechnician",
   "type": "esriFieldTypeString"
  },
  {
   "name": "notes",
   "type": "esriFieldTypeString"
  }
 ],
 "features": [
  {
   "attributes": {
    "objectId": 35631,
    "sessionId": 1,
    "severity": 1,
    "resourceName": "ssTap",
    "reviewStatus": "Value is not unique:FACILITYID,  ",
    "reviewTechnician": "roberts",
    "notes": ""
   }
  }
 ]
}

9/13/2017