-
Notifications
You must be signed in to change notification settings - Fork 5
APIs
Alberto Parziale edited this page Oct 14, 2019
·
2 revisions
Aeria provides a set of standard Ajax endpoints that you can use.
## Search
If you need to get a list of posts, there's an endpoint for that. You can find it on:
http://[your_wp_installation_link]/wp-json/aeria/search
The available parameters are:
-
s: the search field's value. -
sender: this manipulates the API's response. Right now, 2 options are available: -
"SelectOptions"which only returnsIDandpost_title - anything else returns the full response.
-
post_typespecifies the required post type. -
parent_idspecifies the parent ID. -
taxonomyspecifies the taxonomy. -
taxonomy_termsspecifies the terms to look for in the taxonomy. -
orderbyspecifies an order parameter for the results. -
orderspecifies an order for the results. -
numberpostsspecifies the required number of posts. By default, it is set to -1(all).
To get a list of post_types, you can use:
http://[your_wp_installation_link]/wp-json/aeria/post-types
The available parameters are:
-
s, representing the searched value. -
public, whether the searched post type is public or not.
To get a list of post_types, you can use:
http://[your_wp_installation_link]/wp-json/aeria/taxonomies
The available parameters are:
-
s, representing the searched value. -
post_type, specifying the related post type.
To get a list of terms, you can use:
http://[your_wp_installation_link]/wp-json/aeria/terms
The available parameters are:
-
s, representing the searched value. -
taxonomy, specifying the taxonomy of terms you want (default iscategory). -
hide_empty, Whether to hide terms not assigned to any posts (defaulttrue). -
sender: this manipulates the API's response. Right now, 2 options are available: -
"SelectOptions"which only returnsIDandname - anything else returns the full response.
To know more about the Validation API, check the validators page.