• Marin Zaimov
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
Hi guys,

I am creating my own REST API.
I was able to succesfully do @HttpPost

I am now working on @HttpGet and getting the following error from my curl request:

[][{"message":"An unexpected error occurred. Please include this ErrorId if you contact support: 22838684-12976 (2061038835)","errorCode":"UNKNOWN_EXCEPTION"}]

What does this mean and how can you guys use it to help me get my API running?

Also, how can i test and debug my Web service without having to contact support every time?
Here is my curl command:

curl --request GET -H 'Authorization: OAuth 00Do0000000KyIg!ASAAQAUD3IsQkLkjFArVq6RvMadk41WNticN9ZgGHa7Iozs0euGa9XVG7LMEysX6C_SIVcCNrr4NA5a62k2lrGgNTLtyXepJ' 'https://na17.salesforce.com/services/apexrest/QuotePreview?quoteId=a0Fo00000026dOXEAY'

and Php code used to run a get:

$quoteId = 'a0Fo00000026dOXEAY';
  $quoteurl = "https://na17.salesforce.com/services/apexrest/QuotePreview?quoteId=".$quoteId;
  $curl = curl_init();
  curl_setopt($curl, CURLOPT_URL, $quoteurl);
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($curl, CURLOPT_HTTPHEADER,
          array("Authorization: Bearer $accessCode",
           "Content-type: application/json"));
  curl_setopt($curl, CURLOPT_HTTPGET, true);

  $json_response = curl_exec($curl);


Hi guys,

I am creating my own REST API.
I was able to succesfully do @HttpPost

I am now working on @HttpGet and getting the following error from my curl request:

[][{"message":"An unexpected error occurred. Please include this ErrorId if you contact support: 22838684-12976 (2061038835)","errorCode":"UNKNOWN_EXCEPTION"}]

What does this mean and how can you guys use it to help me get my API running?

Also, how can i test and debug my Web service without having to contact support every time?
Here is my curl command:

curl --request GET -H 'Authorization: OAuth 00Do0000000KyIg!ASAAQAUD3IsQkLkjFArVq6RvMadk41WNticN9ZgGHa7Iozs0euGa9XVG7LMEysX6C_SIVcCNrr4NA5a62k2lrGgNTLtyXepJ' 'https://na17.salesforce.com/services/apexrest/QuotePreview?quoteId=a0Fo00000026dOXEAY'

and Php code used to run a get:

$quoteId = 'a0Fo00000026dOXEAY';
  $quoteurl = "https://na17.salesforce.com/services/apexrest/QuotePreview?quoteId=".$quoteId;
  $curl = curl_init();
  curl_setopt($curl, CURLOPT_URL, $quoteurl);
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($curl, CURLOPT_HTTPHEADER,
          array("Authorization: Bearer $accessCode",
           "Content-type: application/json"));
  curl_setopt($curl, CURLOPT_HTTPGET, true);

  $json_response = curl_exec($curl);