Pulling tags from Api of a personal web app


I have kind of an unusual question that I’m suspecting is not possible to do but I figured it was worth a try to ask.

When adding tags to a post through the admin ui, a drop down appears that shows all existing tags that match user input. I have a personal web application that lets me create tags (not ghost tags) and I want to somehow pass this information through to ghost so that on the admin page when the user begins typing the only tags that appear in the dropdown are the tags created through my application.

Big thanks in advance :))

Hey @aleksanderbodurri. This is an unusual use case indeed :)

If you only want to use the tags from your application you would need to override the functionality in Ghost core.

One way would be modifying the tag model in Ghost Admin so it’s fetching the resource from a different endpoint (but still writes to Ghost Admin API).

Another way would be adding a rule to your HTTP server configuration so that GET yourblog.com/ghost/api/v2/admin/tags/ instead of hitting Ghost’s instance API redirect the request to your application which should serve tags in an exact same format that Ghost Admin API does (it’s an experimental endpoint at the moment but response is similar to one served by Content API):

This is very specific use-case, unfortunately, there’s no easy way around it :slight_smile:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.