Duke Blogger
Posts: 0
Joined: Tue Jan 21, 2014 6:43 pm

Restful API and Json API

I'm trying to use the JsonAPI plugin in wordpress to bring in pieces of my site, like blog posts and so forth. Im not sure how the request/response works. I know my base url is http://dukeblogger.com/api/get_recent...

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Restful API and Json API

If you are new to Appery.io, please read the Getting Started section: http://docs.appery.io/getting-started and try some of the tutorials: http://docs.appery.io/tutorials. All tutorials cover how to work with REST services.

There is also documentation on using REST APIs: http://docs.appery.io/documentation/r...

Shawn Johnson
Posts: 0
Joined: Wed Jan 15, 2014 4:17 pm

Restful API and Json API

Duke,

Did you get this to work?, I was also doing the same thing, i was using wordpress as my backend and pulling posts via jquery.

I didn't have any issues with the url you posted,

just create a service and use your posted url and then go to test and test it from test click create a response, then you can map items in your view to the response object it took me a few tries before i got it down

Duke Blogger
Posts: 0
Joined: Tue Jan 21, 2014 6:43 pm

Restful API and Json API

when i click test i get the data but test response i get an error:

Incorrect format. Please verify sample response data and try again.

Shawn Johnson
Posts: 0
Joined: Wed Jan 15, 2014 4:17 pm

Restful API and Json API

Duke,

check your response json, I think there is an error in it, I ran in by jsonlit
http://pro.jsonlint.com/
just paste the url and hit the check button

and it returned an error "<!--PagenotcachedbyWPSuperCache.NoclosingHTMLtag.Checkyourtheme.--"

that is probably was causing the issue

you can try choosing a different theme and pulling the data again

Duke Blogger
Posts: 0
Joined: Tue Jan 21, 2014 6:43 pm

Restful API and Json API

I think i may have gotten it, it wasnt the theme but the wordpress cache plugin i was using. thank you so much for your help. nExt is mapping, wish me luck.

Duke Blogger
Posts: 0
Joined: Tue Jan 21, 2014 6:43 pm

Restful API and Json API

I thought i had it but it keeps returning nothing, perhaps a different error?

Shawn Johnson
Posts: 0
Joined: Wed Jan 15, 2014 4:17 pm

Restful API and Json API

Hey Duke,

It's seems to be working for me, check out my screen shots
I was able to create a test and generate a response object

I also ran the url through the json validator and it's valid

Image Image

Duke Blogger
Posts: 0
Joined: Tue Jan 21, 2014 6:43 pm

Restful API and Json API

Everything in your graphics i got to work, when i mapped the fields is when nothing showed up, but when i enabled the echo it finally worked for me. Thank you again. Clearly i'm a novice..lol

Shawn Johnson
Posts: 0
Joined: Wed Jan 15, 2014 4:17 pm

Restful API and Json API

it's all good, we are all an novice at some point. Glad you are making progress

Return to “Issues”