Update saved search
Update a saved search or chart by specifying the update values in the json body. All the properties except for optional properties must be passed in the body to update the search or chart. The searchId cannot be updated once it is created. The adminBasic or adminAdvanced privilege is required.
Update Saved Search Parameters:
Parameter | Description | Data Type |
---|---|---|
name | Required. The display name for the saved search or chart. | String |
folder | Optional. The folder the saved search or chart will be categorized under. | String |
definition | Required if the searchType is Standard. The search definition to be saved. For details on search definition syntax, see Search for jobs in the system. | String |
searchType | Optional. The type for the saved search or chart. The accepted values are Standard, Chart and All. If not defined, the default type is Standard. | String |
colorRamp | Required if the searchType is Chart. The color ramp for the saved chart. | String |
sortIndex | Optional. The sorting order for the saved search or chart. | Integer |
Body parameter
{
"searchId": "string",
"name": "string",
"folder": "string",
"definition": {
"q": "string",
"search": "string",
"fields": [
"string"
],
"displayNames": [
"string"
],
"sortFields": [
{
"field": "string",
"sortOrder": "Asc"
}
],
"spatialExtent": "string",
"hasLocation": true,
"start": 0,
"num": 0
},
"searchType": "Chart",
"colorRamp": "string",
"sortIndex": 0
}
Query parameters
Name | Type | Required |
---|---|---|
|
|
Path parameters
Name | Type | Required |
---|---|---|
|
| |
|
| |
|
|
Examples
Request
# You can also use wget
curl -X PUT /{orgId}/{itemId}/searches/{searchId} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
Response
200 Response
{
"success": true
}
Status | Meaning | Description | Schema |
---|---|---|---|
| success | ||
| invalid object | ||
| error |