Manage a Search Query
POST/search/history/:id
Allows you to manage a search query (save a search query to the Saved Searches list under the specified ID, convert a recent search to a saved search, update an existing search). For details on how to manage a saved search, see Manage Saved Search
Required parameters include the search ID, the RQL query, the flag that marks this search as saved, and a unique name for the saved search. A best practice is to copy data from the results of a search history, update the data as necessary, and set the saved parameter to true.
This API requires Prisma Cloud system administrator role access if you don't own the search with the given search ID.
Request
Path Parameters
Search ID
- application/json
Body
required
- RelativeTimeRangeConfigModel
- AbsoluteTimeRangeConfigModel
- ToNowTimeRangeConfigModel
- absolute
- relative
- to_now
Possible values: [aws
, azure
, gcp
, alibaba_cloud
, oci
]
Cloud Type
Search Description
Search ID
Search Name
RQL Query
Search Exists
timeRange objectrequired
See the Time Range Model for details.
Possible values: [BACKWARD
, FORWARD
]
Direction in which to count time. Default = BACKWARD
value objectrequired
Model for RelativeTimeDuration
Number of time units
Possible values: [minute
, hour
, day
, week
, month
, year
]
Time unit
value objectrequired
Model for Time
End timestamp
Start timestamp
Possible values: [MINUTE
, HOUR
, DAY
, WEEK
, MONTH
, YEAR
, EPOCH
, LOGIN
]
Time range object
Possible values: [absolute
, relative
, to_now
]
Time type
value objectrequired
Model for Time
End timestamp
Start timestamp
Possible values: [BACKWARD
, FORWARD
]
Direction in which to count time. Default = BACKWARD
value objectrequired
Model for RelativeTimeDuration
Number of time units
Possible values: [minute
, hour
, day
, week
, month
, year
]
Time unit
Possible values: [MINUTE
, HOUR
, DAY
, WEEK
, MONTH
, YEAR
, EPOCH
, LOGIN
]
Time range object
Responses
- 200
- 400
- 403
- 404
successful operation
- application/json; charset=UTF-8
- Schema
- Example (from schema)
Schema
- Array [
- ]
- RelativeTimeRangeConfigModel
- AbsoluteTimeRangeConfigModel
- ToNowTimeRangeConfigModel
- absolute
- relative
- to_now
- Array [
- ]
- RelativeTimeRangeConfigModel
- AbsoluteTimeRangeConfigModel
- ToNowTimeRangeConfigModel
- absolute
- relative
- to_now
Alert ID
true = Is Async
Async Result Url
Possible values: [aws
, azure
, gcp
, alibaba_cloud
, oci
]
Cloud Type
Cursor
data object
Alert ID
true = Is Async
Async Result Url
Possible values: [aws
, azure
, gcp
, alibaba_cloud
, oci
]
Cloud Type
Cursor
Search Description
filters object[]
View Order
Name
Possible values: [=
]
Operator
Value
Group By
Search ID
Search Name
RQL Query
Read Only
Search Exists
Possible values: [network
, audit_event
, config
, asset
]
Search Type
Time Granularity
timeRange objectrequired
See the Time Range Model for details.
Possible values: [BACKWARD
, FORWARD
]
Direction in which to count time. Default = BACKWARD
value objectrequired
Model for RelativeTimeDuration
Number of time units
Possible values: [minute
, hour
, day
, week
, month
, year
]
Time unit
value objectrequired
Model for Time
End timestamp
Start timestamp
Possible values: [MINUTE
, HOUR
, DAY
, WEEK
, MONTH
, YEAR
, EPOCH
, LOGIN
]
Time range object
Possible values: [absolute
, relative
, to_now
]
Time type
value objectrequired
Model for Time
End timestamp
Start timestamp
Possible values: [BACKWARD
, FORWARD
]
Direction in which to count time. Default = BACKWARD
value objectrequired
Model for RelativeTimeDuration
Number of time units
Possible values: [minute
, hour
, day
, week
, month
, year
]
Time unit
Possible values: [MINUTE
, HOUR
, DAY
, WEEK
, MONTH
, YEAR
, EPOCH
, LOGIN
]
Time range object
Search Description
filters object[]
View Order
Name
Possible values: [=
]
Operator
Value
Group By
Search ID
Search Name
RQL Query
Read Only
Search Exists
Possible values: [network
, audit_event
, config
, asset
]
Search Type
Time Granularity
timeRange objectrequired
See the Time Range Model for details.
Possible values: [BACKWARD
, FORWARD
]
Direction in which to count time. Default = BACKWARD
value objectrequired
Model for RelativeTimeDuration
Number of time units
Possible values: [minute
, hour
, day
, week
, month
, year
]
Time unit
value objectrequired
Model for Time
End timestamp
Start timestamp
Possible values: [MINUTE
, HOUR
, DAY
, WEEK
, MONTH
, YEAR
, EPOCH
, LOGIN
]
Time range object
Possible values: [absolute
, relative
, to_now
]
Time type
value objectrequired
Model for Time
End timestamp
Start timestamp
Possible values: [BACKWARD
, FORWARD
]
Direction in which to count time. Default = BACKWARD
value objectrequired
Model for RelativeTimeDuration
Number of time units
Possible values: [minute
, hour
, day
, week
, month
, year
]
Time unit
Possible values: [MINUTE
, HOUR
, DAY
, WEEK
, MONTH
, YEAR
, EPOCH
, LOGIN
]
Time range object
{
"alertId": "string",
"async": true,
"asyncResultUrl": "/search/config/jobs/2df49d4f72e842b582b123bc2b7826b3/download",
"cloudType": "aws",
"cursor": 0,
"data": {
"alertId": "string",
"async": true,
"asyncResultUrl": "/search/config/jobs/2df49d4f72e842b582b123bc2b7826b3/download",
"cloudType": "aws",
"cursor": 0,
"default": true,
"description": "string",
"filters": [
{
"name": "string",
"operator": "=",
"value": "string"
}
],
"groupBy": [
"string"
],
"id": "string",
"name": "string",
"query": "string",
"readOnly": true,
"saved": true,
"searchType": "network",
"timeGranularity": "string",
"timeRange": {
"relativeTimeType": "BACKWARD",
"type": "relative",
"value": {
"amount": 0,
"unit": "minute"
}
}
},
"default": true,
"description": "string",
"filters": [
{
"name": "string",
"operator": "=",
"value": "string"
}
],
"groupBy": [
"string"
],
"id": "string",
"name": "string",
"query": "string",
"readOnly": true,
"saved": true,
"searchType": "network",
"timeGranularity": "string",
"timeRange": {
"relativeTimeType": "BACKWARD",
"type": "relative",
"value": {
"amount": 0,
"unit": "minute"
}
}
}
bad_request / unsupported_search_query / duplicate_search_name
cannot_update_default_saved_search / not_owner_or_same_role
not_found