WordPress at a glance
function is not described

WP_REST_Users_Controller::get_collection_params() public WP 4.7.0

Retrieves the query params for collections.

{} It's a method of the class: WP_REST_Users_Controller{}

Hooks from the method
Return

Array. Collection parameters.

Usage

$WP_REST_Users_Controller = new WP_REST_Users_Controller();
$WP_REST_Users_Controller->get_collection_params();

Changelog

Since 4.7.0 Introduced.

Code of WP_REST_Users_Controller::get_collection_params() WP 5.5.1

<?php
public function get_collection_params() {
	$query_params = parent::get_collection_params();

	$query_params['context']['default'] = 'view';

	$query_params['exclude'] = array(
		'description' => __( 'Ensure result set excludes specific IDs.' ),
		'type'        => 'array',
		'items'       => array(
			'type' => 'integer',
		),
		'default'     => array(),
	);

	$query_params['include'] = array(
		'description' => __( 'Limit result set to specific IDs.' ),
		'type'        => 'array',
		'items'       => array(
			'type' => 'integer',
		),
		'default'     => array(),
	);

	$query_params['offset'] = array(
		'description' => __( 'Offset the result set by a specific number of items.' ),
		'type'        => 'integer',
	);

	$query_params['order'] = array(
		'default'     => 'asc',
		'description' => __( 'Order sort attribute ascending or descending.' ),
		'enum'        => array( 'asc', 'desc' ),
		'type'        => 'string',
	);

	$query_params['orderby'] = array(
		'default'     => 'name',
		'description' => __( 'Sort collection by object attribute.' ),
		'enum'        => array(
			'id',
			'include',
			'name',
			'registered_date',
			'slug',
			'include_slugs',
			'email',
			'url',
		),
		'type'        => 'string',
	);

	$query_params['slug'] = array(
		'description' => __( 'Limit result set to users with one or more specific slugs.' ),
		'type'        => 'array',
		'items'       => array(
			'type' => 'string',
		),
	);

	$query_params['roles'] = array(
		'description' => __( 'Limit result set to users matching at least one specific role provided. Accepts csv list or single role.' ),
		'type'        => 'array',
		'items'       => array(
			'type' => 'string',
		),
	);

	$query_params['who'] = array(
		'description' => __( 'Limit result set to users who are considered authors.' ),
		'type'        => 'string',
		'enum'        => array(
			'authors',
		),
	);

	/**
	 * Filter collection parameters for the users controller.
	 *
	 * This filter registers the collection parameter, but does not map the
	 * collection parameter to an internal WP_User_Query parameter.  Use the
	 * `rest_user_query` filter to set WP_User_Query arguments.
	 *
	 * @since 4.7.0
	 *
	 * @param array $query_params JSON Schema-formatted collection parameters.
	 */
	return apply_filters( 'rest_user_collection_params', $query_params );
}