Skip to content

Asana: Create a table

Asana tables.createTable: arguments, response, policy and SDK examples.

← Tables operations · Get started

Operation asana.createtable

Provider route: POST /tables. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/asana with npm, or alter-sdk-asana with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { AsanaIntegration } from "@alter-ai/asana";
async function execute(input: Parameters<AsanaIntegration["tables"]["createTable"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new AsanaIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.tables.createTable(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_asana import AsanaIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = AsanaIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.tables.create_table(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
queryModelOptionalExpand Get a table — request body — query
bodyobjectRequired within parent
body.dataModelRequired within parentExpand Create a table — request body — body data

Referenced models: Create a table — request body — body data, Get a table — request body — query

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$JSONRoot
$ (allOf 1)objectAll variants apply
$ (allOf 1).dataModelOptionalExpand Get a table — response body — data data — Table Response
$ (allOf 2)ModelAll variants applyExpand Get a table — response body — data

Referenced models: Get a table — response body — data data — Table Response, Get a table — response body — data

7 more schemas are linked from the tables above, on the schema pages.

Get a table — response body — data data — Table Response
FieldTypePresenceDescription and constraints
$JSONRoot
$ (allOf 1)ModelAll variants applyExpand Get tables in a workspace — response body — data, next page data item
$ (allOf 2)objectAll variants apply
$ (allOf 2).modified_atstringOptionalThe time at which this table was last modified.
Format: date-time
Read only: true
$ (allOf 2).created_atstringOptionalThe time at which this resource was created.
Format: date-time
Read only: true
$ (allOf 2).workspaceJSONOptional
$ (allOf 2).workspace (allOf 1)ModelAll variants applyExpand Update a workspace — request body — body data
$ (allOf 2).workspace (allOf 2)objectAll variants apply*Create-only*. The workspace or organization this table is associated with. Once created, tables cannot be moved to a different workspace. This attribute can only be specified at creation time.
Read only: true
$ (allOf 2).custom_field_settingsarrayOptionalArray of custom field definitions that are enabled for the table. These represent which custom fields are available to records in the table, but do not include any values.
Read only: true
$ (allOf 2).custom_field_settings[]ModelEach itemExpand Add a custom field to a table — response body — data data — Custom Field Table Setting Response
$ (allOf 2).default_access_levelstringOptionalThe default access level for users who join or are added as members of the table.
Known values: admin, editor, commenter, viewer

Referenced models: Add a custom field to a table — response body — data data — Custom Field Table Setting Response, Get tables in a workspace — response body — data, next page data item, Update a workspace — request body — body data

Get a table — response body — data
FieldTypePresenceDescription and constraints
$objectRoot
dataModelRequired within parentExpand Get a table — response body — data data — sdk__Table Response

Referenced models: Get a table — response body — data data — sdk__Table Response

Create a table — request body — body data
FieldTypePresenceDescription and constraints
$JSONRoot
$ (allOf 1)ModelAll variants applyExpand Get tables in a workspace — response body — data, next page data item
$ (allOf 2)objectAll variants apply
$ (allOf 2).workspacestringRequired within parent*Create-only*. The workspace or organization in which this table will be created. Once created, tables cannot be moved to a different workspace.

Referenced models: Get tables in a workspace — response body — data, next page data item

Get a table — request body — query
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
opt_prettybooleanOptional
opt_fieldsarrayOptional
opt_fields[]stringEach itemOne of: created_at, custom_field_settings, custom_field_settings.custom_field, custom_field_settings.custom_field.date_value, custom_field_settings.custom_field.date_value.date, custom_field_settings.custom_field.date_value.date_time, custom_field_settings.custom_field.display_value, custom_field_settings.custom_field.enabled, custom_field_settings.custom_field.enum_options, custom_field_settings.custom_field.enum_options.color, custom_field_settings.custom_field.enum_options.enabled, custom_field_settings.custom_field.enum_options.name, custom_field_settings.custom_field.enum_value, custom_field_settings.custom_field.enum_value.color, custom_field_settings.custom_field.enum_value.enabled, custom_field_settings.custom_field.enum_value.name, custom_field_settings.custom_field.id_prefix, custom_field_settings.custom_field.input_restrictions, custom_field_settings.custom_field.is_formula_field, custom_field_settings.custom_field.is_lookup_field, custom_field_settings.custom_field.multi_enum_values, custom_field_settings.custom_field.multi_enum_values.color, custom_field_settings.custom_field.multi_enum_values.enabled, custom_field_settings.custom_field.multi_enum_values.name, custom_field_settings.custom_field.name, custom_field_settings.custom_field.number_value, custom_field_settings.custom_field.representation_type, custom_field_settings.custom_field.text_value, custom_field_settings.custom_field.type, custom_field_settings.is_important, default_access_level, modified_at, name, workspace, workspace.name
Add a custom field to a table — response body — data data — Custom Field Table Setting Response
FieldTypePresenceDescription and constraints
$JSONRoot
$ (allOf 1)ModelAll variants applyExpand Add a custom field to a table — response body — data data gid, resource type
$ (allOf 2)objectAll variants apply
$ (allOf 2).custom_fieldJSONOptional
$ (allOf 2).custom_field (allOf 1)ModelAll variants applyExpand Get a membership — response body — data / data / access_level: admin, editor, user parent
$ (allOf 2).custom_field (allOf 2)objectAll variants applyThe custom field that is applied to the table.
Read only: true
$ (allOf 2).is_importantbooleanOptional`is_important` is used in the Asana web application to determine if this custom field is displayed in the list/grid view of a table.
Read only: true

Referenced models: Add a custom field to a table — response body — data data gid, resource type, Get a membership — response body — data / data / access_level: admin, editor, user parent

Get tables in a workspace — response body — data, next page data item
FieldTypePresenceDescription and constraints
$objectRootA *table* is a container for structured records (rows), with columns defined by custom field settings.
gidstringOptionalGlobally unique identifier of the resource, as a string.
Read only: true
resource_typestringOptionalThe base type of this resource.
Read only: true
namestringOptionalThe name of the table.
Update a workspace — request body — body data
FieldTypePresenceDescription and constraints
$objectRootA *workspace* is the highest-level organizational unit in Asana. All projects and tasks have an associated workspace.
gidstringOptionalGlobally unique identifier of the resource, as a string.
Read only: true
resource_typestringOptionalThe base type of this resource.
Read only: true
namestringOptionalThe name of the workspace.
Get a table — response body — data data — sdk__Table Response
FieldTypePresenceDescription and constraints
$objectRootA generic Asana Resource, containing a globally unique identifier.A generic Asana Resource, containing a globally unique identifier.
A *table* is a container for structured records (rows), with columns defined by custom field settings.
gidstringOptionalGlobally unique identifier of the resource, as a string.
Read only: true
resource_typestringOptionalThe base type of this resource.
Read only: true
namestringOptionalThe name of the table.
modified_atstringOptionalThe time at which this table was last modified.
Format: date-time
Read only: true
created_atstringOptionalThe time at which this resource was created.
Format: date-time
Read only: true
workspaceModelOptionalExpand Get a table — response body — data data workspace
custom_field_settingsarrayOptionalArray of custom field definitions that are enabled for the table. These represent which custom fields are available to records in the table, but do not include any values.
Read only: true
custom_field_settings[]ModelEach itemExpand Get a table — response body — data data custom field settings item
default_access_levelstringOptionalThe default access level for users who join or are added as members of the table.
Known values: admin, editor, commenter, viewer

Referenced models: Get a table — response body — data data custom field settings item, Get a table — response body — data data workspace

Add a custom field to a table — response body — data data gid, resource type
FieldTypePresenceDescription and constraints
$objectRootA *custom field table setting* represents the many-to-many join of a custom field and a table, storing information relevant to that particular pairing.
gidstringOptionalGlobally unique identifier of the resource, as a string.
Read only: true
resource_typestringOptionalThe base type of this resource.
Read only: true
Get a custom field — response body — data data date value date, date time
FieldTypePresenceDescription and constraints
$objectRoot*Conditional*. Only relevant for custom fields of type `date`. This object reflects the chosen date (and optionally, time) value of a `date` custom field. If no date is selected, the value of `date_value` will be `null`.
datestringOptionalA string representing the date in YYYY-MM-DD format.
date_timestringOptionalA string representing the date in ISO 8601 format. If no time value is selected, the value of `date-time` will be `null`.

SDK function policy ID: asana.createtable. Catalog operation: asana:createTable. 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.

Required provider scopes: ["tables:write"]

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.