Someone can help and provide the hints or syntax to me for the API of v4_1 pattern.
Iâm newly in API area in suiteCRM. My boss want to through the API to collect the data from other colleagues. I try to use the suiteCRM v4_1 to establish the connection and success for authentication process via Postman.
Like this:
http://xxx.xxx.xxx.xxx/xxx_app/service/v4_1/rest.php?method=login&input_type=JSON&response_type=JSON&rest_data={âuser_authâ:{âuser_nameâ:âxxxxxxxxâ,âpasswordâ:âxxxxxxâ},âappliationâ:"suite"}
But Iâm no idea the pattern how to feed the data from API to LEAD module
I tried the below syntax but not works.
http://xxx.xxx.xxx.xxx/xxx_app/service/v4_1/rest.php?method=login&input_type=JSON&response_type=JSON&rest_data={âuser_authâ:{âuser_nameâ:âxxxxxxxxâ,âpasswordâ:âxxxxxxâ},âappliationâ:âsuiteâ,{"data": {âtypeâ: âLeadsâ,âattributesâ: {ânameâ: âABCDE FGHâ}}}}
OR
http://xxx.xxx.xxx.xxx/xxx_app/service/v4_1/lead?{âdataâ: {âtypeâ: âLeadsâ,âattributesâ: {ânameâ: âABCDE FGHâ}}}
Both return the error 404, The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
OS: Windows 10 Pro
WebServices : XAMPP
Network: Intranet
It seems [WORK] in update processes but still [NOT work] for create in Postman (API v4_1).
suiteCRM version : Version 7.11.22
[Update] - Work for me [POST/GET]
[Create] - Still not work [POST/GET]
logging in [php_error_log]
[04-Aug-2022 09:12:53 Europe/Berlin] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function SugarWebServiceImplv3_1::set_entry(), 1 passed in D:\XAMPP\htdocs\accmail\service\core\REST\SugarRestJSON.php on line 94 and at least 3 expected in D:\XAMPP\htdocs\accmail\service\v3_1\SugarWebServiceImplv3_1.php:238
Stack trace:
#0 D:\XAMPP\htdocs\accmail\service\core\REST\SugarRestJSON.php(94): SugarWebServiceImplv3_1->set_entry(NULL)
#1 D:\XAMPP\htdocs\accmail\service\core\SugarRestService.php(136): SugarRestJSON->serve()
#2 D:\XAMPP\htdocs\accmail\service\core\webservice.php(70): SugarRestService->serve()
#3 D:\XAMPP\htdocs\accmail\service\v4_1\rest.php(56): require_once(âD:\XAMPP\htdocsâŚâ)
#4 {main}
thrown in D:\XAMPP\htdocs\accmail\service\v3_1\SugarWebServiceImplv3_1.php on line 238
[04-Aug-2022 07:12:58 UTC] PHP Warning: Module âfileinfoâ already loaded in Unknown on line 0
[04-Aug-2022 07:12:58 UTC] PHP Warning: Module âcurlâ already loaded in Unknown on line 0
I found the issue for this. Typing mistake.
Incorrect syntax : âlast_nameâ.âBorisâ
Correct : âlast_nameâ:"Borisâ