# REST Resource: cases.attachments

## Resource: Attachment

An Attachment contains metadata about a file that was uploaded to a case - it is NOT a file itself. That being said, the name of an Attachment object can be used to download its accompanying file through the `media.download` endpoint.

While attachments can be uploaded in the console at the same time as a comment, they're associated on a "case" level, not a "comment" level.

| JSON representation |
|---|
| ``` { "name": string, "createTime": string, "creator": { object (`https://docs.cloud.google.com/support/docs/reference/rest/v2/Actor`) }, "filename": string, "mimeType": string, "sizeBytes": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. Identifier. The resource name of the attachment. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time at which the attachment was created. 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"`. |
| `creator` | ``object (`https://docs.cloud.google.com/support/docs/reference/rest/v2/Actor`)`` Output only. The user who uploaded the attachment. Note, the name and email will be obfuscated if the attachment was uploaded by Google support. |
| `filename` | `string` The filename of the attachment (e.g. `"graph.jpg"`). |
| `mimeType` | `string` Output only. The MIME type of the attachment (e.g. text/plain). |
| `sizeBytes` | `string (https://developers.google.com/discovery/v1/type-format format)` Output only. The size of the attachment in bytes. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/support/docs/reference/rest/v2/cases.attachments/get` | Retrieve an attachment associated with a support case. |
| ### `https://docs.cloud.google.com/support/docs/reference/rest/v2/cases.attachments/list` | List all the attachments associated with a support case. |