FRAMES | NO FRAMES | Description | Parameters | Examples | Response |
URL | http://<wmservice-url>/publicQueries/createQuery |
---|---|
Parent Resource | Public Queries |
Parameter | Details |
---|---|
f | Description: The response format. The default response format is html. Values: html | json |
user | Required Description: The username of the person who makes the create query request. The person must have AdministratorAccess Privilege to create public queries. |
properties | Required Description: A JSON object containing the public query property values to update.
Syntax: { "name":"<queryName>", "fields":"<fieldList>", "aliases":"<aliasList>", "tables":"<tableList>", "where":"<whereclause>", "orderBy":"<orderByField>", "containerId":"<containerId>" } |
Example 1: URL for creating the public query named "All Jobs" in the "Workflow" service on sampleserver. The person who makes the request is "admin0000".
http://sampleserver/arcgis/rest/services/Workflow/WMServer/publicQueries/createQuery?user=admin0000&properties={"name":"All+Jobs","fields":"WMX.JTX_JOBS.JOB_ID,WMX.JTX_STATUS.NAME,WMX.JTX_USERS.FULL_NAME","tables":"WMX.JTX_JOBS,WMX.JTX_STATUS,WMX.JTX_USERS"}&f=pjsonExample 2: URL for creating the public query named "ClosedJobs" in the "Workflow" service on sampleserver. The person who makes the request is "admin0000". The query will return all closed jobs with job status as "Closed" and be created in query container with containerId "2".
http://sampleserver/arcgis/rest/services/Workflow/WMServer/publicQueries/createQuery?user=admin0000&properties={"name":"ClosedJobs","fields":"WMX.JTX_JOBS.JOB_ID,WMX.JTX_STATUS.NAME,WMX.JTX_USERS.FULL_NAME","aliases":"Job%20ID,Job%20Status,Assigned%20To","tables":"WMX.JTX_JOBS,WMX.JTX_STATUS,WMX.JTX_USERS","where":"JTX_STATUS.ID=JTX_JOBS.STATUS%20AND%20JTX_USERS.USERNAME=JTX_JOBS.ASSIGNED_TO%20AND%20JTX_JOBS.STATUS=7","containerId":"2"}&f=pjson{ "queryId": "<queryId>" }
{ "queryId": 401 }