REST Resource: attachments

Resource: Attachment

An attachment resource with a unique name that an agent can use to identify the attachment.

JSON representation
{
  "name": string,
  "gcsUrl": string,
  "displayName": string,
  "description": string,
  "contentType": string,
  "sizeBytes": string,
  "attachmentOperationSource": enum (AttachmentOperationSource),
  "uploadTime": string,
  "uploadError": {
    object (Status)
  }
}
Fields
name

string

Output only. The unique identifier of the attachment. Read-only. Defined by the platform.

gcsUrl

string

Output only. The GCS URL of the attachment. This is the publicly accessible URL that is used to fetch the attachment from GCS.

displayName

string

Optional. Display name of the attachment.

description

string

Optional. Text description of the attachment's content. Screen readers use this description to help users with disabilities understand what the attachment contains.

contentType

string

Optional. The content type of the attachment.

sizeBytes

string (int64 format)

Output only. Size in bytes of the attachment.

attachmentOperationSource

enum (AttachmentOperationSource)

Required. The source that triggered the attachment upload.

Required if uploadType=media. Specifies the reason for the upload. See AttachmentOperationSource for possible values.

uploadTime

string (Timestamp format)

Output only. The time when the attachment was uploaded to GCS.

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".

uploadError

object (Status)

Output only. Error result, if any, that occurred during the attachment upload.

AttachmentOperationSource

List of Attachment Operation Sources.

Enums
ATTACHMENT_OPERATION_SOURCE_UNSPECIFIED Attachment Operation is unspecified
VERIFICATION_PAGE Console verification page.
VERIFICATION_ATTACHMENT_VIA_BC_API Supporting attachment for agent verification, uploaded using the Business Communications API.

Status

The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details.

You can find out more about this error model and how to work with it in the API Design Guide.

JSON representation
{
  "code": integer,
  "message": string,
  "details": [
    {
      "@type": string,
      field1: ...,
      ...
    }
  ]
}
Fields
code

integer

The status code, which should be an enum value of google.rpc.Code.

message

string

A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.

details[]

object

A list of messages that carry the error details. There is a common set of message types for APIs to use.

An object containing fields of an arbitrary type. An additional field "@type" contains a URI identifying the type. Example: { "id": 1234, "@type": "types.example.com/standard/id" }.

Methods

create

Creates an attachment for an RCS for Business agent.