Forum Discussion

Raj's avatar
Raj
New Contributor II
8 years ago

REST Get snap error to get json data from url

Hello,

I have REST API credentials that I can put in a Chrome browser and get the data. I want to use REST Get Snap to get the data. However when I set up REST Get snap with account details, I am getting the following error:

Failure: Failed to execute HTTP request, Reason: Connection reset, Resolution: Please check the Snap properties.

What am I doing wrong?

Thanks.

7 Replies

  • dmiller's avatar
    dmiller
    Former Employee

    Can you supply a screen shot of the REST Get Snap?

    • nganapathiraju's avatar
      nganapathiraju
      Former Employee

      It looks like a workday report. Click on Trust all Certificates. [ its not needed typically]

      Content-Type is not required.

      Can you just hardcode the URL and try and improvise on it later for an expression?

      Also check which snaplex you are running.

      • Raj's avatar
        Raj
        New Contributor II

        Url has extension ?format=json. I can get the data using Chrome browser. As suggested, I checked on Trust all Certificates. Still has the same HTTP validation error.

        Should the url not be quoted with double-quotes? Without out this, it throws error.

        Here is a public api:

        https://simple-api.github.io/api-offices/

        to try out.

        I haven’t even gone to set up snaplex. Just trying it out in Designer.

  • jcampion's avatar
    jcampion
    New Contributor III

    Are you reading a workday report? If so, did you set the account on the REST GET with the proper credentials? If you are trying to use the SOAP API, this is not the way to do it. I can read a WD report using the REST GET with proper credentials set in a BASIC AUTH account. I do not have the Content-Type set in the HTTP header.

    In the following (downstream) snap I have a json splitter with this expression:
    $entity[‘wd:Report_Data’][‘wd:Report_Entry’][*]

    Hope this helps!