VADL
Vtiger Application Definition Language (a.k.a VADL) is custom XML based specification for developing API on VTAP.
XML format makes it easy for administrator or developer to quickly start without needing deep investment in programming skills.
Through VDAL you can define:
- API to CREATE, RETERIVE, UPDATE or DELETE records.
- Invoke REST or SOAP external endpoints.
- Create Inboud API to CRM from external applications.
General structure is as follows:
<?xml version="1.0"?>
<api method="HTTP_METHOD">
<!-- your definition here. -->
</api>
APIs
Name | Description | Example |
---|---|---|
api | entire api definition is encapsulated inside api node, method attribute set the type(get,post,put,delete) of http request. | <api method='post'></api> |
select | this will let you select the vtiger record data, you can select which fields to be fetched, filter records and sort them | <api method='get'><select module='Contacts'></select></api> |
record | This will have all the fields which needs to be retrieved and is placed inside select node. | <record><field name="firstname"></field><field name="lastname"></field></record> |
where | Use this when you want to filer the records, you can pass multiple fields. Use glue attribute(OR, AND) to decide if all or any fields should match the conditions. | <where glue="OR"><field name="firstname" value="@first"></field><field name="lastname" value="@last" condition="like"></field></record> |
sort | This will have fields that will sort the data, with order attribute defining descending or ascending. | <sort><field name="annual_revenue" order="descending"></field></sort> |
limit | By default we return 100 records, but you can pass max attribute to limit records. If there are more records, you can pass page parameter in the request get specific page records. | <limit max="5" page="@page"></limit> |
create | this will let you create vtiger record | <api method='post'><create module='Contacts'></create></api> |
update | this will let you update vtiger record | <api method='put'><update module='Contacts'></update></api> |
upsert | this will let you update record if exists else create it | <api method='put'><upsert module='Contacts'></upsert></api> |
delete | this will help you delete vtiger record | <api method='delete'><delete module='Contacts'></delete></api> |
rest | this will help you connect with other application | <api method='get'><rest method="get"><url>https://slack.com/api/conversations.list</url></rest></api> |
soap | connect with legacy soap api's | <api method='get'><soap method="get"><auth><basic username="" password=""></basic></auth><url></url></soap></api> |
webhook | build incoming webhook api's | <api><webhook><select module='Contacts'></select></webhook></api> |
For examples on how to create custom apis, visit here or to learn how to connect to other applications click here.