Skip to main content

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

    id stringrequired

    Search ID

Body

required
    cloudType string

    Possible values: [aws, azure, gcp, alibaba_cloud, oci]

    Cloud Type

    default boolean
    description string

    Search Description

    filters object[]

    View Order

  • Array [
  • name string

    Name

    operator string

    Possible values: [=]

    Operator

    value string

    Value

  • ]
  • id string

    Search ID

    name string

    Search Name

    query stringrequired

    RQL Query

    saved boolean

    Search Exists

    timeRange objectrequired

    See the Time Range Model for details.

    oneOf
    relativeTimeType string

    Possible values: [BACKWARD, FORWARD]

    Direction in which to count time. Default = BACKWARD

    type string
    value objectrequired

    Model for RelativeTimeDuration

    amount int32

    Number of time units

    unit string

    Possible values: [minute, hour, day, week, month, year]

    Time unit

    type stringrequired

    Possible values: [absolute, relative, to_now]

    Time type

    type string
    value objectrequired

    Model for Time

    endTime int64

    End timestamp

    startTime int64

    Start timestamp

Responses

successful operation

Schema
    alertId string

    Alert ID

    async boolean

    true = Is Async

    asyncResultUrl string

    Async Result Url

    cloudType string

    Possible values: [aws, azure, gcp, alibaba_cloud, oci]

    Cloud Type

    cursor int32

    Cursor

    data object
    alertId string

    Alert ID

    async boolean

    true = Is Async

    asyncResultUrl string

    Async Result Url

    cloudType string

    Possible values: [aws, azure, gcp, alibaba_cloud, oci]

    Cloud Type

    cursor int32

    Cursor

    default boolean
    description string

    Search Description

    filters object[]

    View Order

  • Array [
  • name string

    Name

    operator string

    Possible values: [=]

    Operator

    value string

    Value

  • ]
  • groupBy string[]

    Group By

    id string

    Search ID

    name string

    Search Name

    query stringrequired

    RQL Query

    saved boolean

    Search Exists

    searchType string

    Possible values: [network, audit_event, config, asset]

    Search Type

    timeGranularity string

    Time Granularity

    timeRange objectrequired

    See the Time Range Model for details.

    oneOf
    relativeTimeType string

    Possible values: [BACKWARD, FORWARD]

    Direction in which to count time. Default = BACKWARD

    type string
    value objectrequired

    Model for RelativeTimeDuration

    amount int32

    Number of time units

    unit string

    Possible values: [minute, hour, day, week, month, year]

    Time unit

    type stringrequired

    Possible values: [absolute, relative, to_now]

    Time type

    type string
    value objectrequired

    Model for Time

    endTime int64

    End timestamp

    startTime int64

    Start timestamp

    default boolean
    description string

    Search Description

    filters object[]

    View Order

  • Array [
  • name string

    Name

    operator string

    Possible values: [=]

    Operator

    value string

    Value

  • ]
  • groupBy string[]

    Group By

    id string

    Search ID

    name string

    Search Name

    query stringrequired

    RQL Query

    saved boolean

    Search Exists

    searchType string

    Possible values: [network, audit_event, config, asset]

    Search Type

    timeGranularity string

    Time Granularity

    timeRange objectrequired

    See the Time Range Model for details.

    oneOf
    relativeTimeType string

    Possible values: [BACKWARD, FORWARD]

    Direction in which to count time. Default = BACKWARD

    type string
    value objectrequired

    Model for RelativeTimeDuration

    amount int32

    Number of time units

    unit string

    Possible values: [minute, hour, day, week, month, year]

    Time unit

    type stringrequired

    Possible values: [absolute, relative, to_now]

    Time type

    type string
    value objectrequired

    Model for Time

    endTime int64

    End timestamp

    startTime int64

    Start timestamp

Loading...