Skip to content
Alberto Parziale edited this page Oct 14, 2019 · 2 revisions

APIs

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 returns ID and post_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).

Post Types

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.

Taxonomies

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.

Terms

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 is category).
  • hide_empty, Whether to hide terms not assigned to any posts (default true).
  • sender: this manipulates the API's response. Right now, 2 options are available:
  • "SelectOptions" which only returns ID and name
  • anything else returns the full response.

Validate

To know more about the Validation API, check the validators page.

Clone this wiki locally