This page explains how to add filters to your Jira Data Center data stores in Gemini Enterprise. Filters determine which information is retrieved or excluded from the Jira Data Center data store when users chat with the Assistant using the Gemini Enterprise app or run actions against your Jira instance.
Filter types
You can configure the following filters within the params object of your data connector:
- Inclusion filter (
admin_filter): Retrieves only specific information from the Jira Data Center data store and restricts actions to allowed projects. - Exclusion filter (
admin_exclusion_filter): Excludes specific information from the Jira Data Center data store and prevents actions on out-of-scope projects.
Filter keys
The filter parameters accept an object containing key-value pairs. The keys represent the Jira Data Center fields you want to filter on, and the values are arrays of strings containing the criteria to match. When updating filters using the API, the following keys are supported:
| Filter name | FILTER_KEY |
Description | Value examples |
|---|---|---|---|
| Project | Project |
Filters search results and restricts actions to specific Jira project keys. Mutations and retrievals on out-of-scope projects fail or return no results. | • ENG • HR • SUPPORT |
Update filters in an existing data store
You can update filters in an existing data store using either the Google Cloud console or the API.
Console
To modify existing filter configurations:- In the Google Cloud console navigation menu, click Data stores.
- Select your Jira Data Center data store.
- Click View/edit parameters.
- In the View/edit parameters panel, add or update the project keys and filter types.
- Click Save.
REST
To add or to update filters in an existing
Jira Data Center data store, call the
updateDataConnector
method with any one of these fields:
- The
admin_filterfield for inclusion filter. - The
admin_exclusion_filterfield for exclusion filter.
In the request body, the field must contain all the filters you want to have in the data store, including the filters that are not updated.
To add or update filters in an existing Jira Data Center data store, run the following command:
curl -X PATCH
-H "Authorization: Bearer $(gcloud auth print-access-token)"
-H "Content-Type: application/json"
-H "X-Goog-User-Project: PROJECT_ID"
"https://ENDPOINT_LOCATION-discoveryengine.googleapis.com/v1alpha/projects/PROJECT_ID/locations/LOCATION/collections/COLLECTION_ID/dataConnector?updateMask=params"
-d '{ "params": { "FILTER_TYPE": { "FILTER_KEY": [ "UPDATED_FILTER_VALUE1", "UPDATED_FILTER_VALUE2" ] } } }'
Replace the following:
-
PROJECT_ID: the ID of your project. -
ENDPOINT_LOCATION: the multi-region for your API request. Specify one of the following values:usfor the US multi-regioneufor the EU multi-regionglobalfor the Global location
-
LOCATION: the multi-region of your data store:global,us, oreu -
COLLECTION_ID: The ID of the collection containing the data store. -
FILTER_TYPE: the type of filter added to your Jira Data Center data stores. For more information, see Filter types. -
FILTER_KEY: the key for the filter, corresponding to a field in your data. For more information, see Filter keys. -
UPDATED_FILTER_VALUES: the value or values to filter on for the specifiedFILTER_KEY(for example, project keys such asENG).
Important Considerations
If you switch from an inclusion filter to an exclusion filter, or from an exclusion filter to an inclusion filter, you must explicitly remove the filter that is no longer required by setting it to empty in the request body. For example, if you have an
admin_filterand want to switch toadmin_exclusion_filter, include"admin_filter": {}in addition toadmin_exclusion_filterin your API requestparamsobject. The following example showsparamsobject when switching fromadmin_filtertoadmin_exclusion_filter:"params": { "admin_filter": {}, "admin_exclusion_filter": { "Project": ["ENG"] } }
When updating filters, you must include the previously added filters as well.
Verify that the data store includes the filters
You can get the details of the data store to confirm that the filters you added or updated are correctly applied using the Google Cloud console or the API:
Console
To view the existing filter configurations:- In the Google Cloud console navigation menu, click Data stores.
- Select your Jira Data Center data store.
- Click View/edit parameters.
In the View/edit parameters panel, the existing filters applied to the data store are displayed.
REST
To verify data store settings, call the
getDataConnector
method:
curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "X-Goog-User-Project: PROJECT_ID" \ "https://ENDPOINT_LOCATION-discoveryengine.googleapis.com/v1alpha/projects/PROJECT_ID/locations/LOCATION/collections/COLLECTION_ID/dataConnector"
Replace the following:
-
PROJECT_ID: the ID of your project. -
ENDPOINT_LOCATION: the multi-region for your API request. Specify one of the following values:usfor the US multi-regioneufor the EU multi-regionglobalfor the Global location
-
LOCATION: the multi-region of your data store:global,us, oreu -
COLLECTION_ID: the ID of the collection containing the data store.
In the response, view the admin_filter or admin_exclusion_filter fields in params to verify
the filters.
What's next
- To provide a user interface for querying your Jira Data Center data, create an app and connect it to the Jira Data Center data store.
- To manage the list of actions, see Manage actions.
- To preview how your search results appear after your app is set up, see Get search results.
- To enable alerts for the data store, see Configure alerts for third-party data stores.