Manage Groups¶
| Method | Path | Description |
|---|---|---|
GET |
baseurl/groups |
Return a list of WindyGrid groups. |
Request Parameters¶
| Parameter | Value | Description |
|---|---|---|
| q | String | Filter expression to use to search against the Open Grid group repository. Pass {} (empty object) to specify ‘no filter’ or leave out this parameter altogether. It is recommended that this value be URL encoded. |
| n | String | The maximum number of records to return; If this parameter is not specified, no records are returned (i.e. default value of 0). |
Sample Request¶
https://webapps1.chicago.gov/windygridservice/rest/groups?q={}&n=10
Or when URL encoded:
https://webapps1.chicago.gov/windygridservice/rest/groups?q=%7B%7D&n=10
Sample Response¶
[{ "_id" : {"$oid":"55c0c620a3db5f3058630eb3"}, "groupId":"windygrid_users", "name":"WindyGrid Users", "description":"Group for all WindyGrid users", "enabled": true, "functions":["Quick Search", "Advanced Search"], "datasets": ["s311sr", "s311wo"] }]
Method¶
| Method | Path | Description |
|---|---|---|
POST |
baseurl/groups |
Creates a new group; returns object for newly created group, if successful. |
Sample Request¶
https://webapps1.chicago.gov/windygridservice/rest/groups
Sample Response¶
{ "groupId" : "WINDYGRID_NEWGROUP", "name" : "ABC GROUP", "description" : "ADD ABC GROUP", "enabled" : true, "functions" : [ ], "datasets" : [ ], "_id": {"$oid":"55cb6362c4aa475d78d4bc40"} }
List Group Specifics¶
| Method | Path | Description |
|---|---|---|
GET |
baseurl/groups/{group_id} |
Return a single group given a group’s internal id. |
Sample Request¶
https://webapps1.chicago.gov/windygridservice/rest/groups/{"$oid": "55c0c620a3db5f3058630eb3"}
or when URL encoded:
https://webapps1.chicago.gov/windygridservice/rest/groups/%7B%22%24oid%22%3A%20%2255c0c620a3db5f3058630eb3%22%7D
Sample Response¶
[{ "_id": {"$oid" : "56250902a3db5f28348d3b81"}, "groupId" : "windygrid_users", "name" : "WindyGrid Users", "description" : "Group for all WindyGrid users", "enabled" : true, "functions":["Quick Search", "Advanced Search"], "datasets":["s311sr", "s311wo"] }]
Update Groups¶
| Method | Path |
Description |
|---|---|---|
PUT |
baseurl/groups/{group_id} |
Update a group (group-level attributes and members). Returns the updated group data, if successful. |
Sample Request¶
https://webapps1.chicago.gov/windygridservice/rest/groups/{"$oid":"56250902a3db5f28348d3b81"}
or when URL encoded:
https://webapps1.chicago.gov/windygridservice/rest/groups/%7B%22%24oid%22%3A%2255c525c6c4aae748132f4d06%22%7D
Request Payload:¶
{ "id":{"$oid":"56250902a3db5f28348d3b81"}, "o": {"groupId":"windygridfullreal", "name":"WindyGrid Full Report/Real-time", "description":"Groups for all WindyGrid users with access to Full Reports and Real-time data", "enabled":true, "isAdmin":false, "functions":["Advanced Search"], "datasets":["s311sr", "s311wo"] } }
Sample Response¶
{ "groupId" : "windygridfullreal", "name" : "WindyGrid Full Report/Real-time", "description" : "Groups for all WindyGrid users with access to Full Reports and Real-time data", "enabled" : true, "isAdmin" : false, "functions" : ["Advanced Search"], "datasets" : ["s311sr", "s311wo"] }
Delete Groups¶
| Method | Path | Description |
|---|---|---|
DELETE |
baseurl/groups/{group_id} |
Delete a group given the group’s internal Id on the URL path. |
Sample Request¶
https://webapps1.chicago.gov/windygridservice/rest/groups/{"$oid":"56250902a3db5f28348d3b81"}
or when URL encoded:
https://webapps1.chicago.gov/windygridservice/rest/groups/%7B%22$oid%22:%2256250902a3db5f28348d3b81%22%7D
Sample Response¶
No response is returned when a group is deleted successfully.
List Datasets¶
| Method | Path |
Description |
|---|---|---|
GET |
baseurl/datasets |
Return a list of available datasets. The response is a JSON array of descriptors for each available dataset. |
Sample Request¶
https://webapps1.chicago.gov/windygridservice/rest/datasets
Sample Response
[{
"id":"s311sr",
"displayName":"311 Service Requests",
"options":{"rendition":{"icon":"default",
"color":"#CD5C5C",
"fillColor":"#00FFFF",
"opacity":85,
"size":6,
"borderWidth":3},
"latLong":"where.latitude,where.longitude",
"creationTimestamp":"when.creation_date",
"defaultSort":"{'when.creation_date':-1}",
"locationField":"where.location",
"addressField":null,
"chart":null,
"lat":"where.latitude",
"long":"where.longitude"},
"dataSource":null,
"quickSearch":{"enable":true,
"triggerWord":"311sr",
"triggerAlias":"311sr",
"defaultMax":500,
"defaultSort":"{'when.creation_date': -1}",
"baseClientFilter":"{ \"when.creation_date\": {\"$gte\": @m{subtract(1, 'hour')}, \"$lte\":@m{}}}"},
"columns":[{
"id":"_id",
"displayName":"ID",
"dataType":"string",
"dataSource":null,
"filter":false,
"popup":false,
"list":false,
"yAxis":false,
"xAxis":false,
"quickSearch":false,
"array":false,
"listOfValuesId":null,
"format":null,
"dotSizer":null,
"sortOrder":0},
{
"id":"what.service_request_number",
"displayName":"Service Request Number",
"dataType":"string",
"dataSource":null,
"filter":true,
"popup":true,
"list":true,
"yAxis":false,
"xAxis":false,
"quickSearch":true,
"array":false,
"listOfValuesId":null,
"format":null,
"dotSizer":null,
"sortOrder":0},
{
"id":"when.creation_date",
"displayName":"Creation Date",
"dataType":"date",
"dataSource":null,
"filter":true,
"popup":true,
"list":true,
"yAxis":false,
"xAxis":true,
"quickSearch":false,
"array":false,
"listOfValuesId":null,
"format":null,
"dotSizer":null,
"sortOrder":0},
{
"id":"what.type",
"displayName":"Type",
"dataType":"string",
"dataSource":null,
"filter":true,
"popup":true,
"list":true,
"yAxis":true,
"xAxis":true,
"quickSearch":false,
"array":false,
"listOfValuesId":"s311_service_request_type",
"format":null,
"dotSizer":null,
"sortOrder":0},
{
"id":"what.type_code",
"displayName":"Type Code",
"dataType":"string",
"dataSource":null,
"filter":false,
"popup":true,
"list":true,
"yAxis":false,
"xAxis":false,
"quickSearch":false,
"array":false,
"listOfValuesId":null,
"format":null,
"dotSizer":null,
"sortOrder":0},
{
"id":"what.is_legacy",
"displayName":"Is Legacy",
"dataType":"string",
"dataSource":null,
"filter":true,
"popup":true,
"list":true,
"yAxis":false,
"xAxis":false,
"quickSearch":true,
"array":false,
"listOfValuesId":null,
"format":null,
"dotSizer":null,
"sortOrder":0},
{
"id":"what.origin",
"displayName":"Origin Type",
"dataType":"string",
"dataSource":null,
"filter":true,
"popup":true,
"list":true,
"yAxis":false,
"xAxis":false,
"quickSearch":true,
"array":false,
"listOfValuesId":"s311sr_origin",
"format":null,
"dotSizer":null,
"sortOrder":0},
{
"id":"where.address",
"displayName":"Address",
"dataType":"string",
"dataSource":null,
"filter":true,
"popup":true,
"list":true,
"yAxis":false,
"xAxis":false,
"quickSearch":false,
"array":false,
"listOfValuesId":null,
"format":null,
"dotSizer":null,
"sortOrder":0},
{
"id":"where.zip",
"displayName":"Zip
"dataType":"string",
"dataSource":null,
"filter":false,
"popup":true,
"list":true,
"yAxis":false,
"xAxis":false,
"quickSearch":false,
"array":false,
"listOfValuesId":null,
"format":null,
"dotSizer":null,
"sortOrder":0},
{
"id":"where.city",
"displayName":"City",
"dataType":"string",
"dataSource":null,
"filter":false,
"popup":true,
"list":true,
"yAxis":false,
"xAxis":false,
"quickSearch":false,
"array":false,
"listOfValuesId":null,
"format":null,
"dotSizer":null,
"sortOrder":0},
{
"id":"where.state",
"displayName":"State",
"dataType":"string",
"dataSource":null,
"filter":false,
"popup":true,
"list":true,
"yAxis":false,
"xAxis":false,
"quickSearch":false,
"array":false,
"listOfValuesId":null,
"format":null,
"dotSizer":null,
"sortOrder":0},
{
"id":"what.status",
"displayName":"Status",
"dataType":"string",
"dataSource":null,
"filter":true,
"popup":true,
"list":true,
"yAxis":true,
"xAxis":true,
"quickSearch":true,
"array":false,
"listOfValuesId":"s311sr_status",
"format":null,
"dotSizer":null,
"sortOrder":0},
{
"id":"when.completion_date",
"displayName":"Completion Date",
"dataType":"date",
"dataSource":null,
"filter":true,
"popup":true,
"list":true,
"yAxis":false,
"xAxis":true,
"quickSearch":false,
"array":false,
"listOfValuesId":null,
"format":null,
"dotSizer":null,
"sortOrder":0},
{
"id":"what.work_orders",
"displayName":"Work Orders",
"dataType":"string",
"dataSource":null,
"filter":true,
"popup":false,
"list":true,
"yAxis":false,
"xAxis":false,
"quickSearch":false,
"array":true,
"listOfValuesId":null,
"format":null,
"dotSizer":null,
"sortOrder":0},
{
"id":"what.description",
"displayName":"Description",
"dataType":"string",
"dataSource":null,
"filter":true,
"popup":true,
"list":true,
"yAxis":false,
"xAxis":false,
"quickSearch":false,
"array":false,
"listOfValuesId":null,
"format":null,
"dotSizer":null,
"sortOrder":0},
{
"id":"what.reason",
"displayName":"Reason",
"dataType":"string",
"dataSource":null,
"filter":true,
"popup":false,
"list":true,
"yAxis":false,
"xAxis":false,
"quickSearch":false,
"array":false,
"listOfValuesId":"s311sr_reason",
"format":null,
"dotSizer":null,
"sortOrder":0},
{
"id":"what.priority",
"displayName":"Priority",
"dataType":"string",
"dataSource":null,
"filter":true,
"popup":false,
"list":true,
"yAxis":false,
"xAxis":false,
"quickSearch":false,
"array":false,
"listOfValuesId":"s311sr_priority",
"format":null,
"dotSizer":null,
"sortOrder":0},
{
"id":"what.legacy_service_number",
"displayName":"Legacy SR Number",
"dataType":"string",
"dataSource":null,
"filter":false,
"popup":false,
"list":true,
"yAxis":false,
"xAxis":false,
"quickSearch":false,
"array":false,
"listOfValuesId":null,
"format":null,
"dotSizer":null,
"sortOrder":0},
{
"id":"what.department",
"displayName":"Department",
"dataType":"string",
"dataSource":null,
"filter":true,
"popup":true,
"list":true,
"yAxis":false,
"xAxis":false,
"quickSearch":false,
"array":false,
"listOfValuesId":"s311sr_department",
"format":null,
"dotSizer":null,
"sortOrder":0},
{
"id":"what.is_deleted",
"displayName":"Is Deleted",
"dataType":"string",
"dataSource":null,
"filter":true,
"popup":true,
"list":true,
"yAxis":false,
"xAxis":false,
"quickSearch":false,
"array":false,
"listOfValuesId":null,
"format":null,
"dotSizer":null,
"sortOrder":0},
{
"id":"where.latitude",
"displayName":"Latitude",
"dataType":"float",
"dataSource":null,
"filter":false,
"popup":false,
"list":true,
"yAxis":false,
"xAxis":false,
"quickSearch":false,
"array":false,
"listOfValuesId":null,
"format":null,
"dotSizer":null,
"sortOrder":0},
{
"id":"where.longitude",
"displayName":"Longitude",
"dataType":"float",
"dataSource":null,
"filter":false,
"popup":false,
"list":true,
"yAxis":false,
"xAxis":false,
"quickSearch":false,
"array":false,
"listOfValuesId":null,
"format":null,
"dotSizer":null,
"sortOrder":0}
]
}]