Jump to content

Recommended Posts

Posted

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.

Posted

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
  • Like 1
Posted

@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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...