add admin api endpoint

Create Admin API Endpoint

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "add admin api endpoint" with this command: npx skills add tryghost/ghost/tryghost-ghost-add-admin-api-endpoint

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 docName and 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-api tests for the endpoint in ghost/core/test/e2e-api/admin to 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.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

create database migration

No summary provided by upstream source.

Repository SourceNeeds Review
General

format numbers

No summary provided by upstream source.

Repository SourceNeeds Review
General

ghost

No summary provided by upstream source.

Repository SourceNeeds Review