• Resolved Amusik

    (@amusik)


    Hi Scott!

    I love your plugin and it has helped me tremendously to develop some neat reports from my website.

    However, I’m having trouble with the API. The API works fine if I’m exporting a report to a CSV/JSON-file but when I tried the third API call (which to my understanding should return the actual JSON string and is shown below) I keep on getting an error {“success”:false,”data”:”Invalid Export Type”}.

    URL to JSON API (full data):
    https://xxxxx.com/wp-content/plugins/exports-and-reports/api.php?report=YOUR_REPORT_ID&full=1&action=json&token=5a91945da452732d741ab189fe2ec5dc

    When I looked at the source code of the api.php I can’t seem to find a section where action=json is listed. I can find action=manage and action=export. Am I mistaken or is the third full JSON not implemented yet?

    Anyways, it’s a fantastic plugin as it is. This full JSON API would be the crown jewel because this way I could easily connect one website to another.

    https://www.ads-software.com/plugins/exports-and-reports/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Scott Kingsley Clark

    (@sc0ttkclark)

    You need to reset your token now that you’ve posted it, be sure to do that soon.

    I’ll double check on the json export in a minute, where was this URL shown?

    Thread Starter Amusik

    (@amusik)

    Hi Scott – thanks for the quick reply! And no worries about the token – it’s not my actual token.

    The URL was shown on the Settings page – it’s the third option. There is first “URL to Cronjob”, “URL to JSON API (paginated)” and then there’s the one I posted above.

    The JSON export itself works fine if you want to get a .json file out of the system – but as I would understand it, the third option should actually return the json string and not a file containing the string.. right?

    Plugin Author Scott Kingsley Clark

    (@sc0ttkclark)

    I’ve fixed the export type case-sensitivity issue, I also fixed the JSON API output handling. They will now return the JSON data from the items exported as expected. I also added a new URL in the setting area that lets you generate the export file and download immediately.

    This will be available in Exports and Reports 0.6.4

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Trouble with full JSON export using the API’ is closed to new replies.