Hi Goharika,
Are you saying that you had working REST API code and it broke after installing Beaver Builder? Let me know.
Justin
Yes because it chages json format, now I can get the json but not post,
for example in such way I can get my page json http://lc13754376.on-rev.com/restapi/wp-json/pages/62 but when I need to edit the same page it doesn’t work, because Beaver structure is different and it returns html <div> elements too(for example), so content is changing. In forums I find somebody using Jetpack http://jetpack.me/support/json-api/ for working with api
So just by activating Beaver Builder, the response here breaks… http://lc13754376.on-rev.com/restapi/wp-json/pages/62
Is that correct? Sorry, I’m still trying to figure out exactly what the issue is 🙂
OK let me explain more clear.
Yes when I am trying to post there, sending post request, for editing this page, It doesn’t work, before installing Beaver my json was looked such way
“content”: {
“rendered”: “<p>Standart Content</p>”
}
After installing it looks in this way
“content”: “<div class=\”pdfprnt-top-right\”>
Thanks for clarifying! Let me do some testing today and get back to you.
Justin
Can you help me out a bit here. I’m still not very familiar with the rest api. I installed it on my localhost and am trying to query a page like you using this link…
http://localhost/wordpress-latest/wp-json/pages/23069
But I get this message whether Beaver Builder is active or not.
[{“code”:”rest_no_route”,”message”:”No route was found matching the URL and request method”,”data”:{“status”:404}}]
EDIT: actually it looks like you might be using the wrong endpoint. Make sure you have the latest version and then try this endpoint (on your domain with your page id)…
http://localhost/wordpress-latest/wp-json/wp/v2/pages/23069
Using that endpoint, I get the same response regardless of if Beaver Builder is active or not. Give that a shot and let me know how it goes.
Justin
Yes you are right connected with URL, if we use the second version of API the link should include the version, example with using second version here you can see result http://buildatourapp.com/wp-json/wp/v2/pages/706
Also requires these 2 plugins to activate in you dashboard
https://ww.wp.xz.cn/plugins/rest-api/
https://github.com/WP-API/Basic-Auth
For example to check api working or no you can type http://localhost/wordpress-latest/wp-json/wp/v2/
So now I can get the information, and now working on posting, if it will work too, I will post here in case somebody will need too. If you will get results too please send 🙂