FRAMES | NO FRAMES Description | Parameters | Examples | Response
Update User Query (Operation)
URL http://<users-url>/<username>/queries/<queryid>/update
Parent Resource User Job Query

Description

This operation is supported from 10.3.1 onwards.

Updates a user query.

Parameters

Parameter Details
f Description: The response format. The default response format is html.

Values: html | json
user Required

Description: The user name of the person who makes the update query request. The user who has "ManageQuery" privilege can update their own personal queries.
properties Description: A JSON object containing the user query property values to update. At least one parameter from the list in below needs to be specified to update.

  • name: The name of the query.
  • fields: The names of the fields that participate in the query. This list is a comma delimited list of field names.
  • aliases: The descriptions of the fields that participate in the query. This list is a comma delimited list of field aliases.
  • tables: The names of the tables that participate in the query. This list is a comma delimited list of table names.
  • where: where clause for the query.
  • orderBy: The name of the field by which to order the results. Only a single field name may be specified.

Note: User query container cannot be updated.

Syntax:

{
  "name":"<queryName>",
  "fields":"<fieldList>",
  "aliases":"<aliasList>",
  "tables":"<tableList>",
  "where":"<whereclause>",
  "orderBy":"<orderByField>"
}

Example Usage

Example: URL for Andy Miller to update his own job query which has query ID "401" in the "Workflow" service on sampleserver. Andy Miller's user name is "amiller" and has "ManageQuery" privilege. The query properties to be updated are query fields and where clause.

http://sampleserver/arcgis/rest/services/Workflow/WMServer/community/users/amiller/queries/401/update?user=amiller&properties={"fields":"JTX_JOBS.JOB_ID,JTX_STATUS.NAME,JTX_USERS.FULL_NAME","where":"JTX_STATUS.ID=JTX_JOBS.STATUS%20AND%20JTX_USERS.USERNAME=JTX_JOBS.ASSIGNED_TO%20AND%20JTX_JOBS.STATUS=7"}&f=pjson

JSON Response Syntax

{ "success": true }

JSON Response Example

{ "success": true }