Support with webserver API Get All Tiddlers filters and excludes

I’m trying to retrieve all tiddlers (the Journal ones) following a certain filter via the webserver api but I want to get the text, i.e. contents, of the tiddler.

According to the documentation, I need to:

  1. Create a new tiddler with the filter as part of the title, so I have:

$:/config/Server/ExternalFilters/[tag[Journal]!sort[created]]
with the text being yes to allow it.

  1. Request the data from the URL:

If I visit https://mywiki.com/recipes/default/tiddlers.json?filter=[tag[Journal]!sort[created]], it returns the json of the all the tiddlers, however, the text is excluded. As this is the default.

There’s the exclude parameter but how to I set it to include the text?

Also, I’ve tried using the exclude parameter but I’m not using it correctly. e.g. I tried:

https://mywiki.com/recipes/default/tiddlers.json?filter=[tag[Journal]!sort[created]]?exclude=type but it returns nothing, and a 403 forbidden error.

The second query parameter needs a preceding ampersand, try this:

https://mywiki.com/recipes/default/tiddlers.json?filter=[tag[Journal]!sort[created]]&exclude=type

Note that you can exclude any field, it does not need to exist in the wiki:

https://mywiki.com/recipes/default/tiddlers.json?filter=[tag[Journal]!sort[created]]&exclude=null

1 Like

Of course! :sweat_smile: Thank you, works perfectly now.