← 返回
未分类 中文

Ghost Admin API Endpoint Builder

Create or extend Ghost Admin API endpoint code in the standard core structure. Use this skill for tasks that add a new endpoint file under `ghost/core/core/s...
在标准核心结构中创建或扩展 Ghost Admin API 端点代码,使用此技能可在 `ghost/core/core/s...` 路径下添加新的端点文件。
kukudadasd kukudadasd 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 66
下载
💾 0
安装
1
版本
#latest

概述

Admin API Endpoint Testing Guide

This guide provides a comprehensive approach for developers to test newly created endpoints in Ghost's Admin API. Follow the steps below to ensure your endpoints are functioning correctly.

Instructions

  1. Creating a New Endpoint: If you are creating an endpoint for a new resource, start by creating a new endpoint file in ghost/core/core/server/api/endpoints/. If the endpoint already exists, locate the corresponding file in the same directory.
  2. Controller Object: In the endpoint file, create a controller object using the JSDoc type from @tryghost/api-framework.Controller. Ensure it includes at least a docName and a single endpoint definition, such as browse.
  3. Adding Routes: Add the necessary routes for each endpoint to ghost/core/core/server/web/api/endpoints/admin/routes.js to make them accessible through the API.
  4. Testing the Endpoint: Implement basic end-to-end API tests for the new endpoint in ghost/core/test/e2e-api/admin. This will help verify that the endpoint functions as expected.
  5. Running Tests: Execute the tests and iterate on your implementation until all tests pass. Use the command: cd ghost/core && yarn test:single test/e2e-api/admin/{test-file-name} to run your specific test file.

Reference

For further details on Ghost's API framework and how to create API controllers, refer to the official documentation.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-06-09 19:24

安全检测

腾讯云安全 (Keen)

队列中

腾讯云安全 (Sanbu)

队列中

🔗 相关推荐

ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,363 📥 319,175
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 672 📥 324,613
ai-intelligence

self-improving agent

pskoett
捕获经验教训、错误和纠正,以实现持续改进。使用时机:(1)命令或操作意外失败;(2)用户纠正……
★ 4,064 📥 801,286