API link pattern and example for v4

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

This may help you

1 Like

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”