Articles in this section
VTAP Tables
Table of Contents
Introduction
VTAP Tables allows you to create, update, delete tables just like any sql table. You can add data, update, delete data to these tables and use them just like spreadsheets. Generally you would use these tables when you have light data, which does not need permission checks or each row does not need an owner. You can use these Tables with Insights Designers and visualize the data in different types of charts, and pivot tables. You can embed apps built on VTAP into the CRM iframe.
You can use these tables to store data for many use cases like:
- Store data coming from other applications.
- Push crm data, like log data or user specific data.
Technical Limits
- Every account can have a maximum of 100 tables.
- Every table can have a maximum of 100,000 rows
- Every table can have a maximum of 50 columns.
VTAP Tables can be accessed from our REST API’s as well as VTAP Javascript API’s which are explained below.
REST API’s
Authentication
VTAP Tables uses basic authentication to access the resources. You need to pass Vtiger Username as username and Accesskey(available in User My preference) as Password.
End points
Below are the endpoints which will let you create tables and access its data.
- Get all VTAP Tables
- URL - restapi/vtap/tables
- Method - GET
- Header - Basic Authentication (Vtiger Username + Access key)
- Request
|
- Response format
|
- Create VTAP Table
- URL - restapi/vtap/tables
- Method - POST
- Header - Basic Authentication (Vtiger Username + Access key)
- Parameters
- name - name of the table, only alphabets and numbers are accepted and starting with alphabets only.
- label - Table display name
- columns - array of columns of the table with name, label and type. Supported types of the columns are:
- string - string length 255
- text - string length 64k
- number - max value 2147483647
- decimal - 20 integers and 8 decimal
- boolean - 0/1
- date
- datetime
- richtext - 64MB
- Request
|
- Update VTAP Table
- URL - restapi/vtap/tables
- Method - PUT
- Header - Basic Authentication (Vtiger Username + Access key)
- Parameters
- name - name of the existing table.
- label - Table display name, if you want to change
- columns - array of columns of the table with name, label and type. If you want to remove a column then pass “remove” as true. If column name does not exist then it will create else it will update.
- Request
|
- Delete VTAP Table
- URL - restapi/vtap/tables
- Method - DELETE
- Header - Basic Authentication (Vtiger Username + Access key)
- Parameters
- name - name of the existing table.
- Request
|
- Add data to VTAP Table
- URL - restapi/vtap/tables/TABLENAME
- Method - POST
- Header - Basic Authentication (Vtiger Username + Access key)
- Parameters
- name - name of the existing table.
- values - array of the data to be added to the table
- Request
|
- Import csv file to VTAP Table
- URL - restapi/vtap/tables/TABLENAME
- Method - POST
- Header - Basic Authentication (Vtiger Username + Access key)
- Parameters
- name - name of the existing table.
- filename - csv file having headers with column name of the tables
- Request
|
- Get data from VTAP Table
- URL - restapi/vtap/tables/TABLENAME
- Method - GET
- Header - Basic Authentication (Vtiger Username + Access key)
- Parameters
- name - name of the existing table.
- page - page number, per page limit is 1000
- Request
|
- Update data to VTAP Table
- URL - restapi/vtap/tables/TABLENAME
- Method - PUT
- Header - Basic Authentication (Vtiger Username + Access key)
- Parameters
- name - name of the existing table.
- values - array of the data to be added to the table, each row should have an id that is returned when adding data to the table.
- Request
|
- Delete data to VTAP Table
- URL - restapi/vtap/tables/TABLENAME
- Method - DELETE
- Header - Basic Authentication (Vtiger Username + Access key)
- Parameters
- name - name of the existing table.
- values - array of the row ids
- Request
|
Javascript API
You can use VTAP Javascript api’s to perform CRUD operation on tables schema as well as data. All the javascript functions return a promise to wait and process the data.
- VTAP.Tables.Get - To get all the VTAP Tables available in the account
|
- VTAP.Tables.Create(name, label, columns) - To add a new VTAP Table.
- Parameters
- name - name of the table
- label - label of the table
- columns - columns of the table
- Parameters
|
- VTAP.Tables.Put(name, label, columns) - To update an existing VTAP Table label and columns.
- Parameters
- name - name of the table
- label - label of the table
- columns - columns of the table
- Parameters
|
- VTAP.Tables.Delete(name) - To delete an existing VTAP Table rows.
|
API CRUD operations on VTAP Tables and their details are below:
- VTAP.TablesData.Get(name, page) - To fetch data from the VTAP Tables
|
- VTAP.TablesData.Create(name, rows) - To add data to existing VTAP Tables
|
- VTAP.TablesData.Import(name, file) - To import csv file to existing VTAP Tables
|
- VTAP.TablesData.Update(name, rows) - update VTAP tables row data.
|
- VTAP.TablesData.Delete(name, ids) - delete VTAP table rows.
|