WordPress at a glance
function is not described

WP_REST_Server::get_namespaces() public WP 4.4.0

Retrieves namespaces registered on the server.

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

No Hooks.

Return

String[]. List of registered namespaces.

Usage

$WP_REST_Server = new WP_REST_Server();
$WP_REST_Server->get_namespaces();

Changelog

Since 4.4.0 Introduced.

Code of WP_REST_Server::get_namespaces() WP 5.5.1

<?php
public function get_namespaces() {
	return array_keys( $this->namespaces );
}