Zoho: Retrieve All Attachments
Zoho attachments.getAttachments: arguments, response, policy and SDK examples.
← Attachments operations · Get started
Operation zoho.getattachments
Provider route: GET /crm/v8/{moduleApiName}/{recordId}/Attachments. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/zoho with npm, or alter-sdk-zoho with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { ZohoIntegration } from "@alter-ai/zoho";
async function execute(input: Parameters<ZohoIntegration["attachments"]["getAttachments"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new ZohoIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.attachments.getAttachments(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_zoho import ZohoIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = ZohoIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.attachments.get_attachments(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.recordId | string | Required within parent | Maximum length: 64 |
path.moduleApiName | string | Required within parent | Maximum length: 64 |
query | object | Optional | Additional keys: not allowed |
query.fields | string | Optional | Maximum length: 100000 |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Retrieve All Attachments — response body |
Referenced models: Retrieve All Attachments — response body
Schemas
Section titled “Schemas”Retrieve All Attachments — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Response containing list of attachments for a record Additional keys: not allowed |
data | array | Required within parent | Array of attachment objects Maximum items: 1000 |
data[] | Model | Each item | Expand Retrieve All Attachments — response body — data item |
info | Model | Required within parent | Expand Retrieve All Attachments — response body — info |
Referenced models: Retrieve All Attachments — response body — data item, Retrieve All Attachments — response body — info
Retrieve All Attachments — response body — data item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Individual attachment metadata Additional keys: not allowed |
$editable | boolean | Optional | Indicates if the attachment is editable |
$field_states | JSON | Optional | |
$field_states (anyOf 1) | object | Alternative | Represents the field states metadata |
$field_states (anyOf 2) | null | Alternative | Represents the field states metadata |
$file_id | JSON | Optional | |
$file_id (anyOf 1) | string | Alternative | Represents the file identifier for the attachment Maximum length: 255 |
$file_id (anyOf 2) | null | Alternative | Represents the file identifier for the attachment Maximum length: 255 |
$link_url | JSON | Optional | |
$link_url (anyOf 1) | string | Alternative | Represents the URL for link-type attachments. Null for file attachments. Format: uri Maximum length: 2000 |
$link_url (anyOf 2) | null | Alternative | Represents the URL for link-type attachments. Null for file attachments. Format: uri Maximum length: 2000 |
$se_module | string | Optional | Represents the source module name Maximum length: 100 |
$sharing_permission | string | Optional | Represents the sharing permission level for the attachment Maximum length: 50 |
$state | string | Optional | Represents the current state of the attachment Maximum length: 50 |
$type | string | Optional | Represents the type of the attachment. Possible values: `File` for uploaded files, or `Link URL` for URL-based attachments. Maximum length: 50 |
Created_By | Model | Required within parent | Expand Retrieve All Attachments — response body — data item Created By |
Created_Time | string | Required within parent | Represents the timestamp when the attachment was created (ISO 8601 with timezone) Format: date-time |
File_Name | string | Optional | Represents the name of the attached file Maximum length: 250 |
Modified_By | Model | Required within parent | Expand Retrieve All Attachments — response body — data item Modified By |
Modified_Time | string | Required within parent | Represents the timestamp when the attachment was last modified (ISO 8601 with timezone) Format: date-time |
Owner | Model | Optional | Expand Retrieve All Attachments — response body — data item Owner |
Parent_Id | object | Optional | Parent record information Additional keys: not allowed |
Parent_Id.id | string | Required within parent | Parent record ID. Use the [Get Records API](record.yaml#$.paths./module.get) to retrieve record IDs. Maximum length: 50 Pattern: ^[0-9]+$ |
Parent_Id.name | string | Required within parent | Represents the parent record name Maximum length: 250 |
Size | string | Optional | Represents the size of the attachment in bytes Maximum length: 50000 Pattern: ^[0-9]+$ |
id | string | Required within parent | Represents the unique numeric identifier of the attachment Maximum length: 50 Pattern: ^[0-9]+$ |
Referenced models: Retrieve All Attachments — response body — data item Created By, Retrieve All Attachments — response body — data item Modified By, Retrieve All Attachments — response body — data item Owner
Retrieve All Attachments — response body — info
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Pagination information for list responses Additional keys: not allowed |
count | JSON | Required within parent | |
count (anyOf 1) | integer | Alternative | Represents the number of records returned in the current response Format: int32 Minimum: 0 |
count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
more_records | boolean | Required within parent | Indicates whether more records are available |
next_page_token | JSON | Required within parent | |
next_page_token (anyOf 1) | string | Alternative | Represents the token to retrieve the next page of results Maximum length: 1024 |
next_page_token (anyOf 2) | null | Alternative | Represents the token to retrieve the next page of results Maximum length: 1024 |
page | JSON | Required within parent | |
page (anyOf 1) | integer | Alternative | Represents the current page number Format: int32 Minimum: 1 |
page (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
page_token_expiry | JSON | Required within parent | |
page_token_expiry (anyOf 1) | string | Alternative | Represents the expiry timestamp for the page tokens Format: date-time |
page_token_expiry (anyOf 2) | null | Alternative | Represents the expiry timestamp for the page tokens Format: date-time |
per_page | JSON | Required within parent | |
per_page (anyOf 1) | integer | Alternative | Represents the number of records per page Format: int32 Maximum: 200 Minimum: 1 |
per_page (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
previous_page_token | JSON | Required within parent | |
previous_page_token (anyOf 1) | string | Alternative | Represents the token to retrieve the previous page of results Maximum length: 1024 |
previous_page_token (anyOf 2) | null | Alternative | Represents the token to retrieve the previous page of results Maximum length: 1024 |
Retrieve All Attachments — response body — data item Created By
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | User who created the attachment. Additional keys: not allowed |
email | string | Optional | Represents the user email address Format: email Maximum length: 100 |
id | string | Required within parent | User ID. Use the [Users API](users.yaml#$.paths./users/bulk.get) to retrieve user IDs. Maximum length: 50 Pattern: ^[0-9]+$ |
name | string | Required within parent | Represents the user display name Maximum length: 250 |
Retrieve All Attachments — response body — data item Modified By
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | User who last modified the attachment. Additional keys: not allowed |
email | string | Optional | Represents the user email address Format: email Maximum length: 100 |
id | string | Required within parent | User ID. Use the [Users API](users.yaml#$.paths./users/bulk.get) to retrieve user IDs. Maximum length: 50 Pattern: ^[0-9]+$ |
name | string | Required within parent | Represents the user display name Maximum length: 250 |
Retrieve All Attachments — response body — data item Owner
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Owner of the attachment Additional keys: not allowed |
email | string | Optional | Represents the owner email address Format: email Maximum length: 100 |
id | string | Required within parent | Owner user ID. Use the [Users API](users.yaml#$.paths./users/bulk.get) to retrieve user IDs. Maximum length: 50 Pattern: ^[0-9]+$ |
name | string | Required within parent | Represents the owner display name Maximum length: 250 |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: zoho.getattachments. Catalog operation: getAttachments. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.