Get Action.getPageUrl with REST

Hello,

I’m sorry if this question is already asked, I couldn’t find the information either here or outside.
Is it possible to use the following endpoint with Wordpress REST:

apiAction = getPageUrl

$query = [
    'rest_route' => '/matomo/v1/api/processed_report',
    'period' => 'date',
    'date' => 'yesterday',
    'apiModule' => 'Actions',
    'apiAction' => 'getPageUrl',
    'pageUrl' => '{{ url }}',
];

I need to get the report for a given url.

Thanks in advance for the help.

Hello @mub Matomo for WordPress doesn’t support our HTTP API but instead supports the WordPress REST API. View the reference and more information on our developer site. You can use it to automatically create goals, fetch reports, add annotations, and more.

Hello @Emerson_N, Thanks for your answer.

I understand we can only access via the REST API of wordpress and not the HTTP version.
In my case, I only need the fetch the data. As you shown, in the reference page there is an example with “apiActions=getPageUrls” but in my case I would like to access to “getPageUrl” (the example I provided) but the endpoint seems not be available with REST.

My questions are:

  • How can I get a report of a single url (if possible).
  • Can we access all the endpoint available from HTTP API with the REST ?

Thanks in advance for the help.

Is it possible to have an update about this issues ?

Thanks in advance.

Hello @mub Sorry for the late response and for the bringer of this news. It’s not possible to get a report of single URL or access the endpoint available from HTTP API with the REST.

The only report you can get from WordPress REST API are the one mentioned on this link: https://developer.matomo.org/api-reference/wordpress/restapi-reference