Skip to content

gztrailerapp/custom-vtigerapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom vTiger api1

Pre-requisites

Setup

  1. Clone this repo into a LAMP container. See the README of the LAMP container for instructions.

  2. Setup the environment using env.list in supervisor (/etc/supervisor/conf.d/supervisord.conf ). Don't forget to do: supervisorctl update. Check http://[IP]:[PORT]/info.php for the environment variables.

  3. Run ./setup.sh

Update main.config

  • Change memcache server detail
  • Change vTiger api path
  • Change Postfix Server Configuration

Tests

see test

Send request using curl

0. Prepare credentials:
  username=<portal username>
  password=<portal password>
  url=<API URL http://localhost/api etc.>

1. Login Request
  curl -X POST $url/Authenticate/login \
  -H "Content-Type:application/json" -H "X-USERNAME:$username" \
  -H "X-PASSWORD:$password" -H "X-CLIENTID:clab" -H "ACCEPT-LANGUAGE:en" -H "ACCEPT:json"

2. Assets List Request
  curl -X GET $url/Assets \
  -H "Content-Type:application/json" -H "X-USERNAME:$username" \
  -H "X-PASSWORD:$password" -H "X-CLIENTID:clab" -H "ACCEPT-LANGUAGE:en" -H "ACCEPT:json"

3. For trailer app portal: to get all damages we not use custom and vtiger api, For same we use direct mysql connection.


4. For Assets tab
  curl -X GET $url/Assets/Search/s?searchString='' \
  -H "Content-Type:application/json" -H "X-USERNAME:$username" \
  -H "X-PASSWORD:$password" -H "X-CLIENTID:clab" -H "ACCEPT-LANGUAGE:en" -H "ACCEPT:json"

5. Get All Account
  curl -X GET $url/Accounts \
  -H "Content-Type:application/json" -H "X-USERNAME:$username" \
  -H "X-PASSWORD:$password" -H "X-CLIENTID:clab" -H "ACCEPT-LANGUAGE:en" -H "ACCEPT:json"

6. Get All Products
  curl -X GET $url/Products \
  -H "Content-Type:application/json" -H "X-USERNAME:$username" \
  -H "X-PASSWORD:$password" -H "X-CLIENTID:clab" -H "ACCEPT-LANGUAGE:en" -H "ACCEPT:json"

7. Get Pick list
  curl -X GET $url/Assets/trailertype \
  -H "Content-Type:application/json" -H "X-USERNAME:$username" \
  -H "X-PASSWORD:$password" -H "X-CLIENTID:clab" -H "ACCEPT-LANGUAGE:en" -H "ACCEPT:json"

8. Get All Products
  curl -X GET $url/Assets/trailertype \
  -H "Content-Type:application/json" -H "X-USERNAME:$username" \
  -H "X-PASSWORD:$password" -H "X-CLIENTID:clab" -H "ACCEPT-LANGUAGE:en" -H "ACCEPT:json"

9. Create new Assets
  curl -X POST $url/Assets \
  -H "Content-Type:application/json" -H "X-USERNAME:$username" \
  -H "X-PASSWORD:$password" -H "X-CLIENTID:clab" -H "ACCEPT-LANGUAGE:en" -H "ACCEPT:json" \
  -D data

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages