I have attached a functioning GET and POST API, but I don't know how to view the json arguments sent to the API.
Example:the 'value': 'something to test' string. How do I get to that value in the API?.
I have attached a functioning GET and POST API, but I don't know how to view the json arguments sent to the API.
Example:the 'value': 'something to test' string. How do I get to that value in the API?.
Hi Amy,
All JSON parameters are available as part of your $args
variable in your API method argument.
This method will require the parameters $api
and $args
. Any path variables, query string parameters or posted data will be available in the $args parameter for you to work with.
From documentation: https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_10.2/Integration/Web_Services/REST_API/Extending_Endpoints/
So if you pass {'value':'something to test'}
, you will be able to access it like $args['value']
Hi Amy,
All JSON parameters are available as part of your $args
variable in your API method argument.
This method will require the parameters $api
and $args
. Any path variables, query string parameters or posted data will be available in the $args parameter for you to work with.
From documentation: https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_10.2/Integration/Web_Services/REST_API/Extending_Endpoints/
So if you pass {'value':'something to test'}
, you will be able to access it like $args['value']