You can use the WP_REST_Server::get_namespaces()
method.
For instance.
$exists = in_array( 'ns/v1', rest_get_server()->get_namespaces() );
Related Posts:
- Get post count in wp rest API v2 and get all categories
- Are there server performance benefits to fetching only specific fields when querying the REST API?
- WordPress Rest API: How do we validate with our custom API key?
- Hiding API routes list
- Can we access the REST request parameters from within the permission_callback to enforce a 401 by returning false?
- WordPress REST API “rest_authentication_errors” doesn’t work external queries?
- How to filter users on custom meta fields in WP JSON v2?
- Gutenberg Custom Block Getting All Posts
- Display post title from WordPress excluding a string via API
- WP_REMOTE_POST Requests are being blocked by API provider [closed]
- is it possible to filter a rest api endpoint by using a registered rest field?
- Use the backbone.js client to save custom post type meta
- No ‘Access-Control-Allow-Origin’ when call rest API
- Update a post based on results from GET request to another server
- WP API post__not_in is not working
- Get a remote post ID via API given URL
- How to change the date and time in REST API for comments?
- Is there a way to download only the Rest API part of WordPress?
- WordPress REST Api get posts by ID
- How to use Python to create a Post in WordPress?
- Cannot use WordPress Application Passwords: “code”: “rest_no_route” “status”:404 for /wp-json/wp/v2/users/me/application-passwords
- How to display relations via wordpress Rest API
- register/login api
- WordPress REST API in Integromat: How to overcome “Sorry, you are not allowed to list users / edit this…”
- Remove unwanted fields from WP API response
- WordPress API “code”:”rest_no_route” with Custom Route
- API request forbidden when requesting from same domain
- Woocommerce API for calling products by Category ID
- wordpress rest api authentication failed
- Does something like is_rest() exist
- WP REST API — How to change HTTP Response status code?
- Search WP API using the post title
- Displaying a page built with Elementor using the REST API [closed]
- Understanding SHORTINIT with WordPress 5
- Filter post_content before loading in Gutenberg editor
- WP REST API – Retrieve content from page
- Create post using rest api with html content
- rest_post_query on multiple post types?
- Wp Rest Api Custom Endpoint for page subpages
- How should an old API version be deprecated gracefully?
- WP REST API returns incorrect data?
- WP 5.5 Fatal Error – get_rest_controller() in rest-api.php
- Hook before posting via JSON REST API
- Is it posible to use wp.data.select(‘core’) outside a block?
- Can you Use the Rest API to query a custom database table
- I am getting error message on accessing menu-endpoint
- Is there anyway to format my EndPoint URL in WordPress?
- Return WP_Error as WP_REST_Response
- Authenticating with REST API
- Update Line Item Meta Data – WooCommerce API
- Custom Rest API POST endpoint with conditionally required parameters
- What is the meta field in the response of the user REST API?
- Is there any way to clear cache when making REST API request?
- Custom API endpoint to create gallery for post
- Register REST route with a multi-value parameter
- How do I add meta when creating a post with rest api?
- WordPress + REST API v2 and private pages Load by slug
- Change permissions on REST api?
- PHP: authenticate for a REST request?
- Is it Ok to restrict Access-Control-Allow-Origin for /wp-json requests?
- Validate rest-api call on create
- Authenticate current user to REST API
- rest api endpoint – accept diacritic characters
- Rest API V2 custom post type. I only need the title and link
- Retriving all users with REST API not working
- Custom Endpoint API based on attribute gutenberg block
- Custom WP API endpoint NULL body data
- How to include file attachment in ajax submission via the rest_api?
- Uploading a media item with the wp-json API to a specific path
- post values to custom post type which has advanced custom fields
- What is an endpoint for custom post type comments in REST API?
- How would I know if my system using REST api or not?
- How can I create new CustomPostType record using wp.api.collections?
- WP Rest_API- Post request for images returns empty
- DELETE request using WP REST API
- wp_insert_post function and automatic trashing posts once is no longer in API
- Fetching WordPress Private Posts, Public Posts Via Default REST API Endpoint
- Got Blank issue for get data from /wp-json/v2/post
- How do i POST to WordPress rest API from the same domain?
- WP API file_get_contents return TTP request failed! HTTP/1.1 401 Unauthorized
- Not able to delete media by REST API
- Need to get user data via API
- REST API retrieving posts from www.sitename.com/category/news/ instead of just just from www.sitename.com
- REST API get featured image source for custom post type
- Custom rest API route not passing data along
- How to filter wp-json/wp/v2/users response on custom metas?
- Paid membership Pro Rest API
- WP API users per page
- wp_query json ouput
- GET request for media files in WP REST API 2 results in an empty array
- Fatal error: Call to undefined function register_rest_route()
- WordPress REST API not displaying all information
- API wp-json/wp/v2/pages/ returns a different result if page is specified
- Update post / page using API + python
- Calling a Rest API with parameters on button Click
- WordPress json – How to use the content rendered from json
- Subscriber role cann’t add comment meta using REST API
- WordPress REST API function not calling from external site
- Issue with API after 6.2 update
- Verify user login and password over api