# Search for bookmarks compatible with this VDB Group.

Endpoint: POST /vdb-groups/{vdbGroupId}/bookmarks/search
Version: 3.30.0
Security: ApiKeyAuth

## Security:

  - `ApiKeyAuth` (unknown)
    apiKey in header Authorization

## Path parameters:

  - `vdbGroupId` (string, required)
    The ID or name of the VDB Group.

## Query parameters:

  - `limit` (integer)
    Maximum number of objects to return per query. The value must be between 1 and 1000. Default is 100.

  - `cursor` (string)
    Cursor to fetch the next or previous page of results. The value of this property must be extracted from the 'prev_cursor' or 'next_cursor' property of a PaginatedResponseMetadata which is contained in the response of list and search API endpoints.

  - `sort` (string)
    The field to sort results by. A property name with a prepended '-' signifies descending order.

## Request body:

  - `application/json` (unknown)
    A request body containing a filter expression. This enables searching
for items matching arbitrarily complex conditions. The list of
attributes which can be used in filter expressions is available
in the x-filterable vendor extension.
# Filter Expression Overview
**Note: All keywords are case-insensitive**
## Comparison Operators
| Operator | Description | Example |
|  --- | --- | --- |
| CONTAINS | Substring or membership testing for string and list attributes respectively. | field3 CONTAINS 'foobar', field4 CONTAINS TRUE |
| IN | Tests if field is a member of a list literal. List can contain a maximum of 100 values | field2 IN ['Goku', 'Vegeta'] |
| GE | Tests if a field is greater than or equal to a literal value | field1 GE 1.2e-2 |
| GT | Tests if a field is greater than a literal value | field1 GT 1.2e-2 |
| LE | Tests if a field is less than or equal to a literal value | field1 LE 9000 |
| LT | Tests if a field is less than a literal value | field1 LT 9.02 |
| NE | Tests if a field is not equal to a literal value | field1 NE 42 |
| EQ | Tests if a field is equal to a literal value | field1 EQ 42 |

## Search Operator
The SEARCH operator filters for items which have any filterable
attribute that contains the input string as a substring, comparison
is done case-insensitively. This is not restricted to attributes with
string values. Specifically `SEARCH '12'` would match an item with an
attribute with an integer value of `123`.
## Logical Operators
Ordered by precedence.
| Operator | Description | Example |
|  --- | --- | --- |
| NOT | Logical NOT (Right associative) | NOT field1 LE 9000 |
| AND | Logical AND (Left Associative) | field1 GT 9000 AND field2 EQ 'Goku' |
| OR | Logical OR (Left Associative) | field1 GT 9000 OR field2 EQ 'Goku' |

## Grouping
Parenthesis `()` can be used to override operator precedence.
For example:
NOT (field1 LT 1234 AND field2 CONTAINS 'foo')
## Literal Values
| Literal | Description | Examples |
|  --- | --- | --- |
| Nil | Represents the absence of a value | nil, Nil, nIl, NIL |
| Boolean | true/false boolean | true, false, True, False, TRUE, FALSE |
| Number | Signed integer and floating point numbers. Also supports scientific notation. | 0, 1, -1, 1.2, 0.35, 1.2e-2, -1.2e+2 |
| String | Single or double quoted | "foo", "bar", "foo bar", 'foo', 'bar', 'foo bar' |
| Datetime | Formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) | 2018-04-27T18:39:26.397237+00:00 |
| List | Comma-separated literals wrapped in square brackets | [0], [0, 1], ['foo', "bar"] |

## Limitations
- A maximum of 8 unique identifiers may be used inside a filter expression.

## Request fields (application/json):

  - `filter_expression` (string)
    Example: string_field CONTAINS "over" AND numberic_field GT 9000 OR string_field2 EQ "Goku"

## Request examples:

  - `Nested Object Comparison` (unknown)
    An example of a nested Object comparison testing that at least one repository has a
version which is equal to 19.0.0.

  - `Relative comparison` (unknown)
    An example of a relative comparison testing that field1 has a
value which is less than 123.

  - `Absence of an attribute value` (unknown)
    An example of using nil to test for the absence of a value for field2.

  - `Existence of an attribute value` (unknown)
    An example of using nil to test for the existence of a value for field2.

  - `Use of the CONTAINS operator` (unknown)
    An example of using the 'CONTAINS' operator to check if
field2 contains the string 'foo'. If field2 is string valued
then this is checking if 'foo' is a substring of field2. If
field2 is a list of strings then this is checking if 'foo'
is a member of the list.

  - `Use of the IN operator` (unknown)
    An example of using the 'IN' operator to check if field1
is an element of a list literal.

  - `Use of the SEARCH operator` (unknown)
    An example of using the 'SEARCH' operator to retrieve all elements
for which 'foo' is a substring of a filterable attribute.

  - `Overriding operator precedence` (unknown)
    An example of parenthesis being used to group operators & override
operator precedence.

## Response 200:

  - `200` (unknown)
    OK

## Response 200 fields (application/json):

  - `items` (array)

  - `items.id` (string)
    The Bookmark object entity ID.
    Example: bookmark-123

  - `items.name` (string)
    The user-defined name of this bookmark.
    Example: my-bookmark-123

  - `items.creation_date` (string)
    The date and time that this bookmark was created.
    Example: 2021-07-04T08:51:34.148Z

  - `items.data_timestamp` (string)
    The timestamp for the data that the bookmark refers to.
    Example: 2021-06-03T08:51:34.148Z

  - `items.timeflow_id` (string)
    The timeflow for the snapshot that the bookmark was created of.
    Example: 1-TIMEFLOW-1

  - `items.location` (string)
    The location for the data that the bookmark refers to.
    Example: 200000

  - `items.vdb_ids` (array)
    The list of VDB IDs associated with this bookmark.
    Example: ["vdb-123","vdb-456"]

  - `items.dsource_ids` (array)
    The list of dSource IDs associated with this bookmark.
    Example: ["dsource-123","dsource-456"]

  - `items.engine_ids` (array)
    The list of engine IDs associated with this bookmark.
    Example: ["1","2"]

  - `items.vdb_names` (array)
    The list of VDB names associated with this bookmark.
    Example: ["my-vdb","sales-vdb"]

  - `items.dsource_names` (array)
    The list of dSource names associated with this bookmark.
    Example: ["oracle-prod","mysql-staging"]

  - `items.vdb_group_id` (string)
    The ID of the VDB group on which bookmark is created.
    Example: vdb-group-123

  - `items.vdb_group_name` (string)
    The name of the VDB group on which bookmark is created.
    Example: my-vdb-group

  - `items.vdbs` (array)
    The list of VDB IDs and VDB names associated with this bookmark.

  - `items.vdbs.vdb_id` (string)
    The VDB id.
    Example: vdb-id-1

  - `items.vdbs.vdb_name` (string)
    The VDB name.
    Example: vdb-name

  - `items.vdbs.snapshot_id` (string)
    The snapshot id.
    Example: 1-SNAP-1

  - `items.vdbs.source_data_timestamp` (string)
    The timestamp of origin timeline location.
    Example: 2021-05-01T08:51:34.148Z

  - `items.vdbs.root_parent_id` (string)
    The root of the VDB.
    Example: 1-DBCONTAINER-1

  - `items.vdbs.timeflow_id` (string)
    The timeflow id of the snapshot.

  - `items.vdbs.data_timestamp` (string)
    The bookmark timestamp of the VDB.

  - `items.dsources` (array)
    The list of dSource IDs and dSource names associated with this bookmark.

  - `items.dsources.dsource_id` (string)
    The dSource id.
    Example: dsource-id-1

  - `items.dsources.dsource_name` (string)
    The dSource name.
    Example: dsource-name

  - `items.dsources.snapshot_id` (string)
    The snapshot id.
    Example: 1-SNAP-1

  - `items.dsources.timeflow_id` (string)
    The timeflow id.
    Example: 1-ORACLE-TIMEFLOW-1

  - `items.dsources.data_timestamp` (string)
    The bookmark timestamp of the dSource.

  - `items.paas_databases` (array)
    The list of PaaS Database IDs and PaaS Database names associated with this bookmark.

  - `items.paas_databases.paas_database_id` (string)
    The PaaS Database id.
    Example: paas-database-id-1

  - `items.paas_databases.paas_database_name` (string)
    The PaaS Database name.
    Example: paas-database-name

  - `items.paas_databases.root_parent_id` (string)
    The root of the PaaS Database.
    Example: paas-instance-id-1

  - `items.paas_databases.paas_snapshot_id` (string)
    The PaaS Snapshot id.
    Example: 1-SNAP-1

  - `items.paas_databases.data_timestamp` (string)
    The timestamp of the PaaS Snapshot.
    Example: 2021-05-01T08:51:34.148Z

  - `items.paas_instances` (array)
    The list of PaaS Instance IDs and PaaS Instance names associated with this bookmark.

  - `items.paas_instances.paas_instance_id` (string)
    The PaaS Instance id.
    Example: paas-instance-id-1

  - `items.paas_instances.paas_instance_name` (string)
    The PaaS Instance name.
    Example: paas-instance-name

  - `items.paas_instances.root_parent_id` (string)
    The root of the PaaS Instance.
    Example: paas-instance-root-id-1

  - `items.paas_instances.paas_snapshot_id` (string)
    The PaaS Instance snapshot id.
    Example: 1-SNAP-1

  - `items.paas_instances.data_timestamp` (string)
    The timestamp of the PaaS Instance snapshot.
    Example: 2021-05-01T08:51:34.148Z

  - `items.retention` (integer)
    The retention policy for this bookmark, in days. A value of -1 indicates the bookmark should be kept forever. Deprecated in favor of expiration.
    Example: 365

  - `items.expiration` (string)
    The expiration for this bookmark. When unset, indicates the bookmark is kept forever except for bookmarks of replicated datasets. Expiration cannot be set for bookmarks of replicated datasets.
    Example: 2021-07-04T00:00:00.000Z

  - `items.status` (string)
    A message with details about operation progress or state of this bookmark.
    Example: RESTORED

  - `items.replicated_dataset` (boolean)
    Whether this bookmark is created from a replicated dataset or not.

  - `items.bookmark_source` (string)
    Source of the bookmark, default is DCT. In case of self-service bookmarks, this value would be ENGINE.
    Enum: "DCT", "ENGINE"

  - `items.bookmark_status` (string)
    Status of the bookmark. It can have INACTIVE value for engine bookmarks only. If this value is INACTIVE then ss_bookmark_errors would have the list of associated errors.
    Enum: "ACTIVE", "INACTIVE", "CREATING", "DELETING"

  - `items.ss_data_layout_id` (string)
    Data-layout Id for engine-managed bookmarks.

  - `items.ss_bookmark_reference` (string)
    Engine reference of the self-service bookmark.

  - `items.ss_bookmark_errors` (array)
    List of errors if any, during bookmark creation in DCT from self-service.
    Example: ["No snapshots found for JS_BOOKMARK-1 at timestamp 2021-07-04T08:51:34.148"]

  - `items.bookmark_type` (string)
    Type of the bookmark, either PUBLIC or PRIVATE.
    Enum: "PUBLIC", "PRIVATE"

  - `items.namespace_id` (string)
    The namespace id of this bookmark.
    Example: 1-NAMESPACE-1

  - `items.namespace_name` (string)
    The namespace name of this bookmark.
    Example: test-engine-1

  - `items.is_replica` (boolean)
    Is this a replicated bookmark.
    Example: true

  - `items.primary_object_id` (string)
    Id of the parent bookmark from which this bookmark was replicated.

  - `items.primary_engine_id` (string)
    The ID of the parent engine from which replication was done.

  - `items.primary_engine_name` (string)
    The name of the parent engine from which replication was done.

  - `items.primary_bookmark_expiration` (string)
    The expiration for the primary bookmark.
    Example: 2021-07-04T00:00:00.000Z

  - `items.replicas` (array)
    The list of replicas replicated from this object.

  - `items.replicas.replica_id` (string)
    The ID of the replicated object.
    Example: replica-1

  - `items.replicas.replica_engine_id` (string)
    The ID of the replicated object's engine.
    Example: 1

  - `items.replicas.replica_engine_name` (string)
    The name of the replicated object's engine.
    Example: replica-e1

  - `items.replicas.replica_namespace_id` (string)
    The namespace id of the replicated object.
    Example: namespace-1

  - `items.tags` (array)
    The tags to be created for this Bookmark.
    Example: [{"key":"key-1","value":"value-1"},{"key":"key-2","value":"value-2"}]

  - `items.tags.key` (string, required)
    Key of the tag
    Example: key-1

  - `items.tags.value` (string, required)
    Value of the tag
    Example: value-1

  - `response_metadata` (object)

  - `response_metadata.prev_cursor` (string)
    Pointer to the previous page of results. Use this value as a cursor query parameter in a subsequent request, along with limit, to navigate through the collection by virtual page.

  - `response_metadata.next_cursor` (string)
    Pointer to the next page of results. Use this value as a cursor query parameter in a subsequent request, along with limit, to navigate through the collection by virtual page.

  - `response_metadata.total` (integer)
    The total number of results. This value may not be provided.

