Basic information
About add-admin-api-endpoint
Create a database migration to add a table, add columns to an existing table, add a setting, or otherwise change the schema of Ghost's MySQL database.
add-admin-api-endpoint is an agent skill listed in the AddMCP.net directory, published by TryGhost. Runtime: TypeScript. License: MIT. The repository has 55,650 GitHub stars. Source code is hosted on github.com. Related topics: blogging, cms, ghost, javascript, journalism.
Overview
What is add-admin-api-endpoint?
name: Add Admin API Endpoint description: Add a new endpoint or endpoints to Ghost's Admin API at ghost/api/admin/**.
Create Admin API Endpoint
Instructions
- If creating an endpoint for an entirely new resource, create a new endpoint file in
ghost/core/core/server/api/endpoints/. Otherwise, locate the existing endpoint file in the same directory. - The endpoint file should create a controller object using the JSDoc type from (@tryghost/api-framework).Controller, including at minimum a
docNameand a single endpoint definition, i.e.browse. - Add routes for each endpoint to
ghost/core/core/server/web/api/endpoints/admin/routes.js. - Add basic
e2e-apitests for the endpoint inghost/core/test/e2e-api/adminto ensure the new endpoints function as expected. - Run the tests and iterate until they pass:
cd ghost/core && yarn test:single test/e2e-api/admin/{test-file-name}.
Reference
For a detailed reference on Ghost's API framework and how to create API controllers, see [reference.md](reference.md).
Videos
Tutorials, guides, and showcases related to add-admin-api-endpoint. The player loads when you press play.
Videos belong to their creators. Relevance is approximate; check the channel and description before following setup steps.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In