-
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 returnsID
andpost_title
- anything else returns the full response.
-
post_type
specifies the required post type. -
parent_id
specifies the parent ID. -
taxonomy
specifies the taxonomy. -
taxonomy_terms
specifies the terms to look for in the taxonomy. -
orderby
specifies an order parameter for the results. -
order
specifies an order for the results. -
numberposts
specifies 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 returnsID
andname
- anything else returns the full response.
To know more about the Validation API, check the validators page.