Usage_Reports::rest_api_endpoint()

rest_api_endpoint Create an endpoint so that the process can run at background https://site_domain/wp-json/uap/v2/async_report/

Contents


Return Return

(void)


Source Source

File: src/core/classes/class-usage-reports.php

	public function rest_api_endpoint() {
		register_rest_route(
			AUTOMATOR_REST_API_END_POINT,
			'/async_report/',
			array(
				'methods'             => 'POST',
				'callback'            => array( $this, 'call_api' ),
				'permission_callback' => array( $this, 'validate_rest_call' )
			)
		);
	}