Vineet Sawant Posted February 18, 2015 Share Posted February 18, 2015 Hello, I remember recently using processwire's built-in json API in one of the dev builds. I can't seem to find any kind of documentation of that now. Since I switched my machine, I can't even find that code again.(I've been searching for hours) Can anyone please point me or provide me any clue about the above said json api? It worked something like this: If you need to find any pages using template basic-page, you can get it as follows: http://example.com/processwire/?template=basic-page hit above and it'll return the json output. Thanks. Link to comment Share on other sites More sharing options...
LostKobrakai Posted February 18, 2015 Share Posted February 18, 2015 I don't know about a core api, but there's this http://modules.processwire.com/modules/service-pages/. 3 Link to comment Share on other sites More sharing options...
Vineet Sawant Posted February 18, 2015 Author Share Posted February 18, 2015 I think I'll have to dig up my old machine and find that code. :/ Link to comment Share on other sites More sharing options...
renobird Posted February 18, 2015 Share Posted February 18, 2015 The URL you listed above is how the service pages module works. I think LostKobrakai had it right... 1 Link to comment Share on other sites More sharing options...
BitPoet Posted February 18, 2015 Share Posted February 18, 2015 For users with page-edit permissions, there's also the JSON API in ProcessPageSearch, callable like <?= $config->urls->admin ?>page/search/for?template=basic-page&include=hidden 1 Link to comment Share on other sites More sharing options...
Vineet Sawant Posted February 18, 2015 Author Share Posted February 18, 2015 @renobird, @BitPoet $json = file_get_contents($config->urls->admin.'page/search/for?template=basic-page'); This was the code I was looking for so I guess its is ProcessPageSearch that I was looking for. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now