Set up a Canvas data store

Create a Canvas (Canvas LMS) data store in Gemini Enterprise so users can search Canvas content and run actions with natural language.

Before you begin

  1. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  2. If you're using an existing project for this guide, verify that you have the permissions required to complete this guide. If you created a new project, then you already have the required permissions.

  3. Verify that billing is enabled for your Google Cloud project.

  4. Enable the Gemini Enterprise API, if it is not already enabled.

    Roles required to enable APIs

    To enable APIs, you need the serviceusage.services.enable permission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.

    Enable the API

Required roles

To get the permissions that you need to create a Canvas data store, ask your administrator to grant you the Discovery Engine Editor (roles/discoveryengine.editor) IAM role on your project. For more information about granting roles, see Manage access to projects, folders, and organizations.

You might also be able to get the required permissions through custom roles or other predefined roles.

Configure Canvas OAuth credentials

In your Canvas LMS instance, sign in as a root account administrator and create an OAuth 2.0 developer API key. For more information, see Developer Keys in the Instructure developer documentation.

  1. In Global Navigation, click Admin, select your account, and click Developer Keys.

  2. Click + Developer Key and select + API Key.

  3. In the Key Name field, enter a name for the key. In the Owner Email field, enter an email address. In the Redirect URIs field, enter https://vertexaisearch.cloud.google.com/oauth-redirect.

  4. Leave Enforce Scopes turned off. Gemini Enterprise requests the scopes it needs during authorization.

  5. Click Save, and set the API key state to On.

  6. Copy the client ID from the Details column and click Show Key to copy the client secret. Store both values securely for later use.

  7. Identify the base URL of your Canvas instance, for example https://canvas.example.com (using https:// without a trailing slash).

Create the Canvas data store

To create the Canvas data store, perform the following steps:

  1. In the Google Cloud console, go to the Gemini Enterprise page.

    Go to Gemini Enterprise

  2. Select your Google Cloud project.

  3. In the navigation menu, click Data stores, and click Create data store.

  4. In the Source section, search for Canvas, and click Select.

  5. In the Actions section, if you want to enable actions now, select the actions under Select Canvas actions to enable and click Continue. Otherwise, click Skip; you can also add actions later. For more information, see Add actions.

  6. In the Data section, do the following:

    1. In the Authentication settings section, do the following:

      1. In the Instance URI field, enter the base URL of your Canvas instance using https:// with no trailing slash, for example https://canvas.example.com.
      2. In the Client ID field, enter the client ID of your Canvas API key.
      3. In the Client Secret field, enter the client secret of your Canvas API key.
      4. Click Verify Auth, sign in to your Canvas account, and authorize Gemini Enterprise to access Canvas. After authorization succeeds, the console displays Successfully logged in. Click Continue.
    2. In the Destinations section, under Canvas Instance URL, enter the URL of your Canvas instance in the Host field (for example, https://canvas.example.com). This URL must start with https://. Click Continue.

    3. In the Advanced options section, if you need fixed IP addresses for outbound traffic, select Enable static IP. You can add these IP addresses to your allowlist. For more information, see Configure static IP egress. Click Continue.

    4. In the Entities to search section, select the Canvas entities to search. You can select any combination of Course, Assignment, Quiz, Calendar Event, Module, Page, File, Enrollment, Submission, Discussion Topic, Group, and User. Click Continue.

  7. In the Configuration section:

    1. From the Multi-region list, select the location for your data connector.
    2. In the Your data connector name field, enter a name for your connector.
    3. If you selected us or eu as the location, configure the Encryption settings:
      • Optional: If you haven't configured single-region keys, click Go to settings page to do so. For more information, see Register a single-region key for third-party connectors.
      • Select Google-managed encryption key or Cloud KMS key.
      • If you selected Cloud KMS key:
        • In the Key management type list, select the appropriate type.
        • In the Cloud KMS key list, select the key.
      For more information, see Customer-managed encryption keys.

  8. Click Create. Gemini Enterprise creates your data store and displays your data stores on the Data stores page.

On the Data stores page, click your data store name to see the status. After the data store state changes from Creating to Active, the Canvas data store is ready for use.

After you create the data store, connect the data store to an existing app or create a new app. Before you run queries, authorize Gemini Enterprise to access Canvas data.

Data handling and query execution

This section describes how Gemini Enterprise manages your query and the privacy implications of using the federated data store.

Query execution

After you authorize Canvas and send a search query to Gemini Enterprise:

  • Gemini Enterprise sends your search query directly to the Canvas API.
  • Gemini Enterprise blends the results with those from other connected data sources and displays a comprehensive search result.

Data handling

When using third-party federated search, the following data handling rules apply:

  • Your query string is sent to the third-party search backend (Canvas API).
  • These third parties may associate queries with your identity.
  • If multiple federated search data sources are enabled, the query might be sent to all of them.
  • After the data reaches the third-party system, it is governed by that system's terms of service and privacy policies.

What's next