Creates a saved query.

Scopes

You will need authorization for the https://www.googleapis.com/auth/ediscovery scope to make a valid call.

If unset, the scope for this method defaults to https://www.googleapis.com/auth/ediscovery. You can set the scope for this method like this: vault1 --scope <scope> matters saved-queries-create ...

Required Scalar Argument

  • <matter-id> (string)
    • The ID of the matter to create the saved query in.

Required Request Value

The request value is a data-structure with various fields. Each field may be a simple scalar or another data-structure. In the latter case it is advised to set the field-cursor to the data-structure's field to specify values more concisely.

For example, a structure like this:

SavedQuery:
  create-time: string
  display-name: string
  matter-id: string
  query:
    account-info:
      emails: [string]
    calendar-options:
      location-query: [string]
      minus-words: [string]
      people-query: [string]
      response-statuses: [string]
      version-date: string
    corpus: string
    data-scope: string
    drive-options:
      client-side-encrypted-option: string
      include-shared-drives: boolean
      include-team-drives: boolean
      version-date: string
    end-time: string
    hangouts-chat-info:
      room-id: [string]
    hangouts-chat-options:
      include-rooms: boolean
    mail-options:
      client-side-encrypted-option: string
      exclude-drafts: boolean
    method: string
    org-unit-info:
      org-unit-id: string
    search-method: string
    shared-drive-info:
      shared-drive-ids: [string]
    sites-url-info:
      urls: [string]
    start-time: string
    team-drive-info:
      team-drive-ids: [string]
    terms: string
    time-zone: string
    voice-options:
      covered-data: [string]
  saved-query-id: string

can be set completely with the following arguments which are assumed to be executed in the given order. Note how the cursor position is adjusted to the respective structures, allowing simple field names to be used most of the time.

  • -r . create-time=eos
    • Output only. The server-generated timestamp when the saved query was created.
  • display-name=lorem
    • The name of the saved query.
  • matter-id=ea
    • Output only. The matter ID of the matter the saved query is saved in. The server does not use this field during create and always uses matter ID in the URL.
  • query.account-info emails=stet

    • A set of accounts to search.
    • Each invocation of this argument appends the given value to the array.
  • ..calendar-options location-query=dolores

    • Matches only those events whose location contains all of the words in the given set. If the string contains quoted phrases, this method only matches those events whose location contain the exact phrase. Entries in the set are considered in "and". Word splitting example: ["New Zealand"] vs ["New","Zealand"] "New Zealand": matched by both "New and better Zealand": only matched by the later
    • Each invocation of this argument appends the given value to the array.
  • minus-words=eos
    • Matches only those events that do not contain any of the words in the given set in title, description, location, or attendees. Entries in the set are considered in "or".
    • Each invocation of this argument appends the given value to the array.
  • people-query=et
    • Matches only those events whose attendees contain all of the words in the given set. Entries in the set are considered in "and".
    • Each invocation of this argument appends the given value to the array.
  • response-statuses=sea
    • Matches only events for which the custodian gave one of these responses. If the set is empty or contains ATTENDEE_RESPONSE_UNSPECIFIED there will be no filtering on responses.
    • Each invocation of this argument appends the given value to the array.
  • version-date=et

    • Search the current version of the Calendar event, but export the contents of the last version saved before 12:00 AM UTC on the specified date. Enter the date in UTC.
  • .. corpus=at

    • The Google Workspace service to search.
  • data-scope=dolore
    • The data source to search.
  • drive-options client-side-encrypted-option=eirmod
  • include-shared-drives=true
    • Set to true to include shared drives.
  • include-team-drives=true
    • Set to true to include Team Drive.
  • version-date=erat

    • Search the current version of the Drive file, but export the contents of the last version saved before 12:00 AM UTC on the specified date. Enter the date in UTC.
  • .. end-time=dolores

    • The end time for the search query. Specify in GMT. The value is rounded to 12 AM on the specified date.
  • hangouts-chat-info room-id=erat

    • A list of Chat spaces IDs, as provided by the Chat API. There is a limit of exporting from 500 Chat spaces per request.
    • Each invocation of this argument appends the given value to the array.
  • ..hangouts-chat-options include-rooms=false

    • For searches by account or organizational unit, set to true to include rooms.
  • ..mail-options client-side-encrypted-option=sea

    • Specifies whether the results should include encrypted content, unencrypted content, or both. Defaults to including both.
  • exclude-drafts=true

    • Set to true to exclude drafts.
  • .. method=lorem

    • The entity to search. This field replaces searchMethod to support shared drives. When searchMethod is TEAM_DRIVE, the response of this field is SHARED_DRIVE.
  • org-unit-info org-unit-id=et

  • .. search-method=at

    • The search method to use.
  • shared-drive-info shared-drive-ids=dolor

    • A list of shared drive IDs, as provided by the Drive API.
    • Each invocation of this argument appends the given value to the array.
  • ..sites-url-info urls=et

    • A list of published site URLs.
    • Each invocation of this argument appends the given value to the array.
  • .. start-time=sit

    • The start time for the search query. Specify in GMT. The value is rounded to 12 AM on the specified date.
  • team-drive-info team-drive-ids=erat

    • List of Team Drive IDs, as provided by the Drive API.
    • Each invocation of this argument appends the given value to the array.
  • .. terms=sea

  • time-zone=nonumy
    • The time zone name. It should be an IANA TZ name, such as "America/Los_Angeles". For a list of time zone names, see Time Zone. For more information about how Vault uses time zones, see the Vault help center.
  • voice-options covered-data=et

    • Datatypes to search
    • Each invocation of this argument appends the given value to the array.
  • ... saved-query-id=gubergren

    • A unique identifier for the saved query.

About Cursors

The cursor position is key to comfortably set complex nested structures. The following rules apply:

  • The cursor position is always set relative to the current one, unless the field name starts with the . character. Fields can be nested such as in -r f.s.o .
  • The cursor position is set relative to the top-level structure if it starts with ., e.g. -r .s.s
  • You can also set nested fields without setting the cursor explicitly. For example, to set a value relative to the current cursor position, you would specify -r struct.sub_struct=bar.
  • You can move the cursor one level up by using ... Each additional . moves it up one additional level. E.g. ... would go three levels up.

Optional Output Flags

The method's return value a JSON encoded structure, which will be written to standard output by default.

  • -o out
    • out specifies the destination to which to write the server's result to. It will be a JSON-encoded structure. The destination may be - to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.

Optional General Properties

The following properties can configure any call, and are not specific to this method.

  • -p $-xgafv=string

    • V1 error format.
  • -p access-token=string

    • OAuth access token.
  • -p alt=string

    • Data format for response.
  • -p callback=string

    • JSONP
  • -p fields=string

    • Selector specifying which fields to include in a partial response.
  • -p key=string

    • API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
  • -p oauth-token=string

    • OAuth 2.0 token for the current user.
  • -p pretty-print=boolean

    • Returns response with indentations and line breaks.
  • -p quota-user=string

    • Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
  • -p upload-type=string

    • Legacy upload protocol for media (e.g. "media", "multipart").
  • -p upload-protocol=string

    • Upload protocol for media (e.g. "raw", "multipart").