Possible to add API Method by Plugin?


#1

I have a peculiar use-case where I may want the ID of the log_link_visit_action created when I make an authenticated tracking API call. Because there’s no obvious reason to add/maintain this feature in the standard API, I was wondering if I could add a custom API call using a plugin. I poked around and didn’t see any obvious comments either way (except that I don’t see an API item on the hooks list).


#2

Disregard - delete or leave so others can find by searching. Just realized that most of the API modules are actually implemented as plugins… and found the ExampleAPI plugin.


#3

to me happens to me the same problem. please help!!


#4

As I mentioned in my second post (responding to myself), basically everything the API does is a plugin:

  • There an ExampleAPI directory in the plugins folder to show you how to create a custom API call using a plugin.
  • You could even copy the existing tracking plugin, adjusting the response (to include the ID) and names (so it wouldn’t affect existing callers).