Title: WP_REST_View_Config_Controller::get_view_base_schema
Published: August 20, 2026

---

# WP_REST_View_Config_Controller::get_view_base_schema(): array

## In this article

 * [Description](https://developer.wordpress.org/reference/classes/wp_rest_view_config_controller/get_view_base_schema/?output_format=md#description)
 * [Return](https://developer.wordpress.org/reference/classes/wp_rest_view_config_controller/get_view_base_schema/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_rest_view_config_controller/get_view_base_schema/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_rest_view_config_controller/get_view_base_schema/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_rest_view_config_controller/get_view_base_schema/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_rest_view_config_controller/get_view_base_schema/?output_format=md#wp--skip-link--target)

Returns the schema properties shared by all view types (ViewBase), excluding ‘type’.

## 󠀁[Description](https://developer.wordpress.org/reference/classes/wp_rest_view_config_controller/get_view_base_schema/?output_format=md#description)󠁿

Note that `search` and `page` are not part of the schema: they are managed via the
URL, which is their only source of truth.

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_rest_view_config_controller/get_view_base_schema/?output_format=md#return)󠁿

 array Schema properties for the base view configuration.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_rest_view_config_controller/get_view_base_schema/?output_format=md#source)󠁿

    ```php
    protected function get_view_base_schema() {
    	return array(
    		'filters'               => array(
    			'type'  => 'array',
    			'items' => array(
    				'type'       => 'object',
    				'properties' => array(
    					'field'    => array(
    						'type' => 'string',
    					),
    					'operator' => array(
    						'type' => 'string',
    						'enum' => array(
    							'is',
    							'isNot',
    							'isAny',
    							'isNone',
    							'isAll',
    							'isNotAll',
    							'lessThan',
    							'greaterThan',
    							'lessThanOrEqual',
    							'greaterThanOrEqual',
    							'before',
    							'after',
    						),
    					),
    					'value'    => array(),
    					'isLocked' => array(
    						'type' => 'boolean',
    					),
    				),
    			),
    		),
    		'sort'                  => array(
    			'type'       => 'object',
    			'properties' => array(
    				'field'     => array(
    					'type' => 'string',
    				),
    				'direction' => array(
    					'type' => 'string',
    					'enum' => array( 'asc', 'desc' ),
    				),
    			),
    		),
    		'perPage'               => array(
    			'type' => 'integer',
    		),
    		'fields'                => array(
    			'type'  => 'array',
    			'items' => array(
    				'type' => 'string',
    			),
    		),
    		'titleField'            => array(
    			'type' => 'string',
    		),
    		'mediaField'            => array(
    			'type' => 'string',
    		),
    		'descriptionField'      => array(
    			'type' => 'string',
    		),
    		'showTitle'             => array(
    			'type' => 'boolean',
    		),
    		'showMedia'             => array(
    			'type' => 'boolean',
    		),
    		'showDescription'       => array(
    			'type' => 'boolean',
    		),
    		'showLevels'            => array(
    			'type' => 'boolean',
    		),
    		'groupBy'               => array(
    			'type'       => 'object',
    			'properties' => array(
    				'field'     => array(
    					'type' => 'string',
    				),
    				'direction' => array(
    					'type' => 'string',
    					'enum' => array( 'asc', 'desc' ),
    				),
    				'showLabel' => array(
    					'type'    => 'boolean',
    					'default' => true,
    				),
    			),
    		),
    		'infiniteScrollEnabled' => array(
    			'type' => 'boolean',
    		),
    	);
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/rest-api/endpoints/class-wp-rest-view-config-controller.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-view-config-controller.php#L401)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-view-config-controller.php#L401-L497)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_rest_view_config_controller/get_view_base_schema/?output_format=md#related)󠁿

| Used by | Description | 
| [WP_REST_View_Config_Controller::get_item_schema()](https://developer.wordpress.org/reference/classes/wp_rest_view_config_controller/get_item_schema/)`wp-includes/rest-api/endpoints/class-wp-rest-view-config-controller.php` |

Retrieves the item’s schema, conforming to JSON Schema.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_rest_view_config_controller/get_view_base_schema/?output_format=md#changelog)󠁿

| Version | Description | 
| [7.1.0](https://developer.wordpress.org/reference/since/7.1.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_rest_view_config_controller%2Fget_view_base_schema%2F)
before being able to contribute a note or feedback.