Title: wp-includes/rest-api.php | Developer.WordPress.org

---

# File: wp-includes/rest-api.php

 * hook[wp_is_rest_endpoint](https://developer.wordpress.org/reference/hooks/wp_is_rest_endpoint/)
 * Filters whether a REST endpoint request is currently being handled.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/wp_is_rest_endpoint/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/wp_is_rest_endpoint/#uses)
   | Source: [wp-includes/rest-api.php:3543](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L3543-L3543)
 * function[wp_is_rest_endpoint()](https://developer.wordpress.org/reference/functions/wp_is_rest_endpoint/)
 * Checks whether a REST API endpoint request is currently being handled.
 * Used by [3 functions](https://developer.wordpress.org/reference/functions/wp_is_rest_endpoint/#used-by)
   | Uses [3 functions](https://developer.wordpress.org/reference/functions/wp_is_rest_endpoint/#uses)
   | Source: [wp-includes/rest-api.php:3522](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L3522-L3544)
 * function[rest_get_route_for_post_type_items()](https://developer.wordpress.org/reference/functions/rest_get_route_for_post_type_items/)
 * Gets the REST API route for a post type.
 * Used by [7 functions](https://developer.wordpress.org/reference/functions/rest_get_route_for_post_type_items/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/functions/rest_get_route_for_post_type_items/#uses)
   | Source: [wp-includes/rest-api.php:3265](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L3265-L3288)
 * hook[rest_route_for_post_type_items](https://developer.wordpress.org/reference/hooks/rest_route_for_post_type_items/)
 * Filters the REST API route for a post type.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/rest_route_for_post_type_items/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/rest_route_for_post_type_items/#uses)
   | Source: [wp-includes/rest-api.php:3287](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L3287-L3287)
 * function[rest_get_route_for_taxonomy_items()](https://developer.wordpress.org/reference/functions/rest_get_route_for_taxonomy_items/)
 * Gets the REST API route for a taxonomy.
 * Used by [5 functions](https://developer.wordpress.org/reference/functions/rest_get_route_for_taxonomy_items/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/functions/rest_get_route_for_taxonomy_items/#uses)
   | Source: [wp-includes/rest-api.php:3332](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L3332-L3355)
 * hook[rest_route_for_taxonomy_items](https://developer.wordpress.org/reference/hooks/rest_route_for_taxonomy_items/)
 * Filters the REST API route for a taxonomy.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/rest_route_for_taxonomy_items/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/rest_route_for_taxonomy_items/#uses)
   | Source: [wp-includes/rest-api.php:3354](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L3354-L3354)
 * function[rest_convert_error_to_response()](https://developer.wordpress.org/reference/functions/rest_convert_error_to_response/)
 * Converts an error to a response object.
 * Used by [3 functions](https://developer.wordpress.org/reference/functions/rest_convert_error_to_response/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/functions/rest_convert_error_to_response/#uses)
   | Source: [wp-includes/rest-api.php:3464](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L3464-L3509)
 * function[rest_validate_integer_value_from_schema()](https://developer.wordpress.org/reference/functions/rest_validate_integer_value_from_schema/)
 * Validates an integer value based on a schema.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/rest_validate_integer_value_from_schema/#used-by)
   | Uses [5 functions](https://developer.wordpress.org/reference/functions/rest_validate_integer_value_from_schema/#uses)
   | Source: [wp-includes/rest-api.php:2788](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L2788-L2804)
 * function[rest_validate_object_value_from_schema()](https://developer.wordpress.org/reference/functions/rest_validate_object_value_from_schema/)
 * Validates an object value based on a schema.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/rest_validate_object_value_from_schema/#used-by)
   | Uses [9 functions](https://developer.wordpress.org/reference/functions/rest_validate_object_value_from_schema/#uses)
   | Source: [wp-includes/rest-api.php:2410](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L2410-L2513)
 * function[rest_validate_array_value_from_schema()](https://developer.wordpress.org/reference/functions/rest_validate_array_value_from_schema/)
 * Validates an array value based on a schema.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/rest_validate_array_value_from_schema/#used-by)
   | Uses [9 functions](https://developer.wordpress.org/reference/functions/rest_validate_array_value_from_schema/#uses)
   | Source: [wp-includes/rest-api.php:2525](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L2525-L2584)
 * function[rest_validate_number_value_from_schema()](https://developer.wordpress.org/reference/functions/rest_validate_number_value_from_schema/)
 * Validates a number value based on a schema.
 * Used by [2 functions](https://developer.wordpress.org/reference/functions/rest_validate_number_value_from_schema/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/functions/rest_validate_number_value_from_schema/#uses)
   | Source: [wp-includes/rest-api.php:2596](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L2596-L2713)
 * function[rest_validate_string_value_from_schema()](https://developer.wordpress.org/reference/functions/rest_validate_string_value_from_schema/)
 * Validates a string value based on a schema.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/rest_validate_string_value_from_schema/#used-by)
   | Uses [5 functions](https://developer.wordpress.org/reference/functions/rest_validate_string_value_from_schema/#uses)
   | Source: [wp-includes/rest-api.php:2725](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L2725-L2776)
 * function[rest_validate_enum()](https://developer.wordpress.org/reference/functions/rest_validate_enum/)
 * Validates that the given value is a member of the JSON Schema “enum”.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/rest_validate_enum/#used-by)
   | Uses [7 functions](https://developer.wordpress.org/reference/functions/rest_validate_enum/#uses)
   | Source: [wp-includes/rest-api.php:2136](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L2136-L2160)
 * function[rest_validate_null_value_from_schema()](https://developer.wordpress.org/reference/functions/rest_validate_null_value_from_schema/)
 * Validates a null value based on a schema.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/rest_validate_null_value_from_schema/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/functions/rest_validate_null_value_from_schema/#uses)
   | Source: [wp-includes/rest-api.php:2365](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L2365-L2376)
 * function[rest_validate_boolean_value_from_schema()](https://developer.wordpress.org/reference/functions/rest_validate_boolean_value_from_schema/)
 * Validates a boolean value based on a schema.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/rest_validate_boolean_value_from_schema/#used-by)
   | Uses [3 functions](https://developer.wordpress.org/reference/functions/rest_validate_boolean_value_from_schema/#uses)
   | Source: [wp-includes/rest-api.php:2387](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L2387-L2398)
 * function[rest_are_values_equal()](https://developer.wordpress.org/reference/functions/rest_are_values_equal/)
 * Checks the equality of two values, following JSON Schema semantics.
 * Used by [2 functions](https://developer.wordpress.org/reference/functions/rest_are_values_equal/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/rest_are_values_equal/#uses)
   | Source: [wp-includes/rest-api.php:2105](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L2105-L2124)
 * function[rest_get_authenticated_app_password()](https://developer.wordpress.org/reference/functions/rest_get_authenticated_app_password/)
 * Gets the Application Password used for authenticating the request.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/rest_get_authenticated_app_password/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/functions/rest_get_authenticated_app_password/#uses)
   | Source: [wp-includes/rest-api.php:1231](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L1231-L1235)
 * function[rest_get_endpoint_args_for_schema()](https://developer.wordpress.org/reference/functions/rest_get_endpoint_args_for_schema/)
 * Retrieves an array of endpoint arguments from the item schema and endpoint method.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/rest_get_endpoint_args_for_schema/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/rest_get_endpoint_args_for_schema/#uses)
   | Source: [wp-includes/rest-api.php:3396](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L3396-L3448)
 * function[rest_validate_json_schema_pattern()](https://developer.wordpress.org/reference/functions/rest_validate_json_schema_pattern/)
 * Validates if the JSON Schema pattern matches a value.
 * Used by [2 functions](https://developer.wordpress.org/reference/functions/rest_validate_json_schema_pattern/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/functions/rest_validate_json_schema_pattern/#uses)
   | Source: [wp-includes/rest-api.php:1855](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L1855-L1859)
 * function[rest_find_matching_pattern_property_schema()](https://developer.wordpress.org/reference/functions/rest_find_matching_pattern_property_schema/)
 * Finds the schema for a property using the patternProperties keyword.
 * Used by [3 functions](https://developer.wordpress.org/reference/functions/rest_find_matching_pattern_property_schema/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/rest_find_matching_pattern_property_schema/#uses)
   | Source: [wp-includes/rest-api.php:1870](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L1870-L1880)
 * function[rest_format_combining_operation_error()](https://developer.wordpress.org/reference/functions/rest_format_combining_operation_error/)
 * Formats a combining operation error into a WP_Error object.
 * Used by [1 function](https://developer.wordpress.org/reference/functions/rest_format_combining_operation_error/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/functions/rest_format_combining_operation_error/#uses)
   | Source: [wp-includes/rest-api.php:1891](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L1891-L1912)
 * function[rest_get_combining_operation_error()](https://developer.wordpress.org/reference/functions/rest_get_combining_operation_error/)
 * Gets the error of combining operation.
 * Used by [2 functions](https://developer.wordpress.org/reference/functions/rest_get_combining_operation_error/#used-by)
   | Uses [4 functions](https://developer.wordpress.org/reference/functions/rest_get_combining_operation_error/#uses)
   | Source: [wp-includes/rest-api.php:1924](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L1924-L1981)
 * function[rest_find_any_matching_schema()](https://developer.wordpress.org/reference/functions/rest_find_any_matching_schema/)
 * Finds the matching schema among the “anyOf” schemas.
 * Used by [3 functions](https://developer.wordpress.org/reference/functions/rest_find_any_matching_schema/#used-by)
   | Uses [3 functions](https://developer.wordpress.org/reference/functions/rest_find_any_matching_schema/#uses)
   | Source: [wp-includes/rest-api.php:1993](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L1993-L2014)
 * function[rest_find_one_matching_schema()](https://developer.wordpress.org/reference/functions/rest_find_one_matching_schema/)
 * Finds the matching schema among the “oneOf” schemas.
 * Used by [3 functions](https://developer.wordpress.org/reference/functions/rest_find_one_matching_schema/#used-by)
   | Uses [6 functions](https://developer.wordpress.org/reference/functions/rest_find_one_matching_schema/#uses)
   | Source: [wp-includes/rest-api.php:2027](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L2027-L2090)
 * function[rest_get_allowed_schema_keywords()](https://developer.wordpress.org/reference/functions/rest_get_allowed_schema_keywords/)
 * Get all valid JSON schema properties.
 * Used by [2 functions](https://developer.wordpress.org/reference/functions/rest_get_allowed_schema_keywords/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/functions/rest_get_allowed_schema_keywords/#uses)
   | Source: [wp-includes/rest-api.php:2169](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L2169-L2197)
 * function[rest_add_application_passwords_to_index()](https://developer.wordpress.org/reference/functions/rest_add_application_passwords_to_index/)
 * Adds Application Passwords info to the REST API index.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/rest_add_application_passwords_to_index/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/functions/rest_add_application_passwords_to_index/#uses)
   | Source: [wp-includes/rest-api.php:1282](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L1282-L1294)
 * function[rest_application_password_collect_status()](https://developer.wordpress.org/reference/functions/rest_application_password_collect_status/)
 * Collects the status of authenticating with an application password.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/rest_application_password_collect_status/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/functions/rest_application_password_collect_status/#uses)
   | Source: [wp-includes/rest-api.php:1210](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L1210-L1220)
 * function[rest_application_password_check_errors()](https://developer.wordpress.org/reference/functions/rest_application_password_check_errors/)
 * Checks for errors when using application password-based authentication.
 * Used by [0 functions](https://developer.wordpress.org/reference/functions/rest_application_password_check_errors/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/functions/rest_application_password_check_errors/#uses)
   | Source: [wp-includes/rest-api.php:1248](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L1248-L1272)
 * function[rest_get_route_for_post()](https://developer.wordpress.org/reference/functions/rest_get_route_for_post/)
 * Gets the REST API route for a post.
 * Used by [13 functions](https://developer.wordpress.org/reference/functions/rest_get_route_for_post/#used-by)
   | Uses [3 functions](https://developer.wordpress.org/reference/functions/rest_get_route_for_post/#uses)
   | Source: [wp-includes/rest-api.php:3231](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L3231-L3254)
 * hook[rest_route_for_post](https://developer.wordpress.org/reference/hooks/rest_route_for_post/)
 * Filters the REST API route for a post.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/rest_route_for_post/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/rest_route_for_post/#uses)
   | Source: [wp-includes/rest-api.php:3253](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api.php#L3253-L3253)

1 [2](https://developer.wordpress.org/reference/file/wp-includes/rest-api.php/page/2/?output_format=md)
[3](https://developer.wordpress.org/reference/file/wp-includes/rest-api.php/page/3/?output_format=md)
[4](https://developer.wordpress.org/reference/file/wp-includes/rest-api.php/page/4/?output_format=md)

 [Next Page](https://developer.wordpress.org/reference/file/wp-includes/rest-api.php/page/2/?output_format=md)