Method: projects.locations.notebooks.share

Shares a notebook to other accounts. Needs a side channel with the user's EUC.

HTTP request

POST https://discoveryengine.googleapis.com/v1alpha/{name=projects/*/locations/*/notebooks/*}:share

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. Full resource name of Notebook, such as projects/{project}/locations/{location}/notebooks/{notebookId}.

Request body

The request body contains data with the following structure:

JSON representation
{
  "accountAndRoles": [
    {
      object (AccountAndRole)
    }
  ],
  "notifyViaEmail": boolean
}
Fields
accountAndRoles[]

object (AccountAndRole)

Required. The list of accounts and roles to share the notebook with.

notifyViaEmail

boolean

Required. Whether to notify the shared users via email.

Response body

If successful, the response body is empty.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permissions on the name resource:

  • discoveryengine.notebooks.getIamPolicy
  • discoveryengine.notebooks.setIamPolicy

For more information, see the IAM documentation.

AccountAndRole

Account and role information.

JSON representation
{
  "email": string,
  "role": enum (ProjectRole)
}
Fields
email

string

Required. The email address associated with the account.

role

enum (ProjectRole)

Required. The role in the notebook.

ProjectRole

The role of the project.

IMPORTANT: This enum should never be used for authorization - it could be used to render certain elements in the UI or to communicate intent through a service interface.

Enums
PROJECT_ROLE_UNKNOWN Unknown role - do not use.
PROJECT_ROLE_OWNER The user owns the project.
PROJECT_ROLE_WRITER The user has writer permissions on the project.
PROJECT_ROLE_READER The user has reader permissions on the project.
PROJECT_ROLE_NOT_SHARED The user has no access to the project.