Zoho: specific variable
Zoho variables.getVariableById: arguments, response, policy and SDK examples.
← Variables operations · Get started
Operation zoho.getvariablebyid
Provider route: GET /crm/v8/settings/variables/{id}. 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["variables"]["getVariableById"]>[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.variables.getVariableById(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.variables.get_variable_by_id(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.id | string | Required within parent | Maximum length: 255 |
query | object | Optional | Additional keys: not allowed |
query.group | string | Optional | Format: int64 |
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 specific variable — response body |
Referenced models: specific variable — response body
Schemas
Section titled “Schemas”specific variable — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Collection wrapper returning variables associated with the specified group identifier. Additional keys: not allowed |
variables | array | Required within parent | Array of variable operation results. Maximum items: 25 |
variables[] | Model | Each item | Expand specific variable — response body — variables item |
Referenced models: specific variable — response body — variables item
specific variable — response body — variables item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Representation of a variable within collection responses, including readOnly, apiName, name, description, id, source, type, value, and group brief. Additional keys: not allowed |
api_name | string | Required within parent | The API name of the CRM variable. Maximum length: 100 |
description | JSON | Required within parent | |
description (anyOf 1) | string | Alternative | The description of the variable, if any. Maximum length: 3000 |
description (anyOf 2) | null | Alternative | The description of the variable, if any. Maximum length: 3000 |
id | string | Required within parent | The unique ID of the variable. Format: int64 Maximum length: 19 |
name | string | Required within parent | The display name of the variable. Maximum length: 50 |
read_only | boolean | Optional | Indicates whether the variable is read-only. |
source | string | Required within parent | The source of the variable (for example, crm). Maximum length: 255 |
type | string | Required within parent | The data type of the variable (for example, text, integer, percent, decimal, currency, date, datetime, email, phone, url, checkbox, textarea, long). Maximum length: 255 |
value | string | Optional | The current value of the variable, if any. Maximum length: 3000 |
variable_group | Model | Required within parent | Expand specific variable — response body — variables item variable group |
Referenced models: specific variable — response body — variables item variable group
specific variable — response body — variables item variable group
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Base schema for variable_group Additional keys: allowed |
api_name | string | Optional | The API name of the variable group. Maximum length: 100 |
id | string | Optional | The unique ID of the variable group. Maximum length: 19 |
name | string | Optional | The display name of the variable group. Maximum length: 50 |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: zoho.getvariablebyid. Catalog operation: getVariableById. 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.
Refused by default. This operation leaves the caller holding a credential (Marked: returns the variable’s value, and Zoho documents variables as reusable authentication parameters in APIs, a stored third-party credential read out of Zoho.), so Alter refuses it on every connection with credential_minting_refused unless an organization admin allows it: a credential_minting rule naming provider zoho and operation zoho.getvariablebyid (or getVariableById). See Allow an operation that hands over a credential.
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.