Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7846147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T17:28:47+00:00 2026-06-02T17:28:47+00:00

Can someone take a look at how I’ve set up this REST call? I

  • 0

Can someone take a look at how I’ve set up this REST call? I haven’t been able to find an example of this, and I can’t get it to work.

It may be the blank ‘link_name_to_fields_array’ parameter. I have read the documentation and don’t really understand that parameter. I don’t know if that is causing my problem or not.

Any help would be apprecitated.

//SET UP CURL
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

//parameters for get_entry call (I received a session id from a call to the login function.  Using it here)
//I manually got this user 'id' form the sugarcrm database
$parameters = array(
         'session'=>$result->id,
         'module_name' => 'users',
         'id' => '21a6a633-40de-9bf4-aa14-4f8753ea5aa2',
         'select_fields' => array('user_name'),
         'link_name_to_fields_array'=> array()
 );


$json = json_encode($parameters);
$postArgs='method=get_entry&input_type=JSON&response_type=JSON$rest_data=' . $json;
curl_setopt($curl,CURLOPT_POSTFIELDS, $postArgs);
$result2 = curl_exec( $curl );
echo("<pre>" . print_r($result2,true) . "</pre>");

The output is “Bad data passed in; Return to Home“

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T17:28:48+00:00Added an answer on June 2, 2026 at 5:28 pm

    You have an error in the postArgs line (replace $rest_data with &rest_data). Try with this:

    $postArgs='method=get_entry&input_type=JSON&response_type=JSON&rest_data=' . $json;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone take a look at this and tell me why it's not working.
Can someone take a look at this part of my code and tell me
Can someone take a look at this menu http://www.abmoldremediationnj.com/3 and let me know how
Can someone please tell me how this was done? Take a look at the
Please can someone take a look at the following image: http://img109.imageshack.us/img109/6885/colouring.png I need to
Can someone take a look http://goo.gl/X5Dzp , you see a list of data with
I am trying this and cannot seem to get it to work. Can someone
Can someone please take a look at these, it just is not happing for
Can someone take a look at my background shadow? Here is the link: link
Can someone please take a look at the small test case below and tell

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.