REST Resource: projects.locations.notebooks.sources

Resource: Source

Source represents a single source of content.

JSON representation
{
  "name": string,
  "title": string,
  "sourceId": {
    object (SourceId)
  },
  "metadata": {
    object (SourceMetadata)
  },
  "settings": {
    object (SourceSettings)
  }
}
Fields
name

string

Identifier. The full resource name of the source. Format: projects/{project}/locations/{location}/notebooks/{notebook}/sources/{sourceId}.

This field must be a UTF-8 encoded string with a length limit of 1024 characters.

title

string

Optional. Title of the source.

sourceId

object (SourceId)

Optional. Output only. Source id, which is the last segment of the source's resource name.

metadata

object (SourceMetadata)

Output only. metadata about the source.

settings

object (SourceSettings)

Output only. status of the source, and any failure reasons.

SourceId

SourceId is the last segment of the source's resource name.

JSON representation
{
  "id": string
}
Fields
id

string

The ID of the source.

SourceMetadata

Represents the metadata of a source and some additional information.

JSON representation
{

  // Union field metadata can be only one of the following:
  "googleDocsMetadata": {
    object (GoogleDocsSourceMetadata)
  },
  "youtubeMetadata": {
    object (YoutubeMetadata)
  },
  "agentspaceMetadata": {
    object (AgentspaceMetadata)
  }
  // End of list of possible types for union field metadata.
  "wordCount": integer,
  "tokenCount": integer,
  "sourceAddedTimestamp": string
}
Fields
Union field metadata. Metadata for the source. metadata can be only one of the following:
googleDocsMetadata

object (GoogleDocsSourceMetadata)

metadata for a google doc source.

youtubeMetadata

object (YoutubeMetadata)

metadata for a youtube video source.

agentspaceMetadata

object (AgentspaceMetadata)

metadata for an agentspace source.

wordCount

integer

The word count of the source.

tokenCount

integer

The number of tokens in the source.

sourceAddedTimestamp

string (Timestamp format)

The timestamp the source was added.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

GoogleDocsSourceMetadata

metadata about a google doc source.

JSON representation
{
  "documentId": string,
  "revisionId": string
}
Fields
documentId

string

Output only. The document id of the google doc.

revisionId

string

Output only. Revision id for the doc.

YoutubeMetadata

metadata about a youtube video source.

JSON representation
{
  "videoId": string,
  "channelName": string
}
Fields
videoId

string

Output only. The ID of the youtube video.

channelName

string

Output only. The channel name of the youtube video.

AgentspaceMetadata

metadata about an agentspace source.

JSON representation
{
  "documentName": string,
  "documentTitle": string
}
Fields
documentName

string

Output only. The full document name in Agentspace.

documentTitle

string

Output only. The title of the document.

SourceSettings

Allows extension of Source Settings in the sources.batchCreate (Formerly AddSource request).

JSON representation
{
  "status": enum (SourceStatus),
  "failureReason": {
    object (FailureReason)
  }
}
Fields
status

enum (SourceStatus)

status of the source.

failureReason

object (FailureReason)

Failure reason containing details about why a source failed to ingest.

SourceStatus

List of possible statuses for a source.

Enums
SOURCE_STATUS_UNSPECIFIED Unspecified status.
SOURCE_STATUS_PENDING The source is pending addition.
SOURCE_STATUS_COMPLETE Source addition is complete and successful.
SOURCE_STATUS_ERROR Source addition has permanently failed.
SOURCE_STATUS_PENDING_DELETION The source is pending deletion.
SOURCE_STATUS_TENTATIVE The user is attempting to add a source, but we have not yet uploaded it or checked user limits. Does not count towards the user's source limit.

FailureReason

Failure reason containing details about why a source failed to ingest.

JSON representation
{

  // Union field error can be only one of the following:
  "unknown": {
    object (Unknown)
  },
  "sourceTooLong": {
    object (SourceTooLong)
  },
  "ingestionError": {
    object (IngestionError)
  },
  "sourceEmpty": {
    object (SourceEmpty)
  },
  "uploadError": {
    object (UploadError)
  },
  "paywallError": {
    object (PaywallError)
  },
  "sourceUnreachable": {
    object (SourceUnreachable)
  },
  "googleDriveError": {
    object (GoogleDriveError)
  },
  "youtubeError": {
    object (YoutubeError)
  },
  "audioTranscriptionError": {
    object (AudioTranscriptionError)
  },
  "sourceLimitExceeded": {
    object (SourceLimitExceeded)
  },
  "domainBlocked": {
    object (DomainBlocked)
  }
  // End of list of possible types for union field error.
}
Fields
Union field error. The specific error. error can be only one of the following:
unknown

object (Unknown)

Indicates an unknown error occurred.

sourceTooLong

object (SourceTooLong)

Indicates source word count exceeded the user's limit.

ingestionError

object (IngestionError)

Indicates an error occurred while ingesting the source.

sourceEmpty

object (SourceEmpty)

Indicates that the source is empty.

uploadError

object (UploadError)

Indicates an error occurred while uploading the source.

paywallError

object (PaywallError)

Indicates that the source is paywalled and cannot be ingested.

sourceUnreachable

object (SourceUnreachable)

Indicates that the source is unreachable.

googleDriveError

object (GoogleDriveError)

A google drive specific error.

youtubeError

object (YoutubeError)

A youtube specific error.

audioTranscriptionError

object (AudioTranscriptionError)

An audio file transcription specific error.

sourceLimitExceeded

object (SourceLimitExceeded)

Error if the user tries to update beyond their limits.

domainBlocked

object (DomainBlocked)

Error if the user tries to add a source from a blocked domain.

Unknown

This type has no fields.

Indicates an unknown error occurred.

SourceTooLong

Indicates source word count exceeded the user's limit.

JSON representation
{
  "wordCount": integer,
  "wordLimit": integer
}
Fields
wordCount

integer

The number of words in the source.

wordLimit

integer

The word count limit for the current user at the time of the upload.

IngestionError

This type has no fields.

Indicates an error occurred while ingesting the source.

SourceEmpty

This type has no fields.

Indicates that the source is empty.

UploadError

This type has no fields.

Indicates an error occurred while uploading the source.

PaywallError

This type has no fields.

Indicates that the source is paywalled and cannot be ingested.

SourceUnreachable

Indicates that the source is unreachable. This is primarily used for sources that are added via URL.

JSON representation
{
  "errorDetails": enum (SourceUnreachableErrorReason)
}
Fields
errorDetails

enum (SourceUnreachableErrorReason)

Describes why the source is unreachable.

SourceUnreachableErrorReason

Details about why the source is unreachable. Used to display appropriate message to the user.

Enums
ERROR_REASON_UNSPECIFIED Default
ERROR_REASON_INVALID_URL The source URL is invalid.
ERROR_REASON_NOT_ACCESSIBLE The source URL is not accessible.
ERROR_REASON_NOT_REACHABLE The source URL is not reachable.
ERROR_REASON_URL_NOT_FOUND The source URL returned 404.
ERROR_REASON_TRANSIENT_ERROR The source URL not reachable due to a transient network error or host timeout etc.
ERROR_REASON_FETCH_FAILED The source URL could not be fetched due to an internal error.
ERROR_REASON_NOT_SUPPORTED The URL is not yet supported. Examples include: the fetched content exceeds the trawler fetch max size, the fetched content is a type we do not yet support, etc.

GoogleDriveError

A google drive specific error.

JSON representation
{

  // Union field error can be only one of the following:
  "downloadPrevented": {
    object (DownloadPrevented)
  }
  // End of list of possible types for union field error.
}
Fields
Union field error. The Drive specific error. error can be only one of the following:
downloadPrevented

object (DownloadPrevented)

The user was prevented from downloading the file.

DownloadPrevented

This type has no fields.

The user was prevented from downloading the file.

YoutubeError

A youtube specific error.

JSON representation
{

  // Union field error can be only one of the following:
  "videoDeleted": {
    object (VideoDeleted)
  }
  // End of list of possible types for union field error.
}
Fields
Union field error. The youtube specific error. error can be only one of the following:
videoDeleted

object (VideoDeleted)

Error to indicate that the source was removed because the video was deleted.

VideoDeleted

This type has no fields.

Error to indicate that the source was removed because the video was deleted.

AudioTranscriptionError

An audio file transcription specific error.

JSON representation
{

  // Union field error can be only one of the following:
  "languageDetectionFailed": {
    object (LanguageDetectionFailed)
  },
  "noAudioDetected": {
    object (NoAudioDetected)
  }
  // End of list of possible types for union field error.
}
Fields
Union field error. The audio file transcription specific error. error can be only one of the following:
languageDetectionFailed

object (LanguageDetectionFailed)

Could not detect language of the file (it may not be speech).

noAudioDetected

object (NoAudioDetected)

No audio was detected in the input file (it may have been a video).

LanguageDetectionFailed

This type has no fields.

Could not detect language of the file (it may not be speech).

NoAudioDetected

This type has no fields.

No audio was detected in the input file.

SourceLimitExceeded

This type has no fields.

Indicates that the user does not have space for this source.

DomainBlocked

This type has no fields.

Error to indicate that the source was removed because the domain was blocked.

Methods

batchCreate

Creates a list of Sources.

batchDelete

Deletes multiple sources

get

Gets a Source.