rocket-net-api by jezweb/claude-skills
npx skills add https://github.com/jezweb/claude-skills --skill rocket-net-api构建与 Rocket.net 托管 WordPress 平台 API 的集成。此技能涵盖身份验证、站点管理、域名配置、备份、插件/主题、CDN 缓存控制以及所有 200 多个 API 端点。
基础 URL : https://api.rocket.net/v1
身份验证 : 基于 JWT 令牌
/login 使用邮箱/密码获取令牌Authorization: Bearer <token>内容类型 : JSON API
Content-Type: application/jsonAccept: application/json广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
const response = await fetch('https://api.rocket.net/v1/login', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
},
body: JSON.stringify({
username: 'your-email@example.com',
password: 'your-password'
})
});
const { token } = await response.json();
// 在后续请求中使用令牌
async function rocketApiRequest(
endpoint: string,
options: RequestInit = {}
): Promise<any> {
const response = await fetch(`https://api.rocket.net/v1${endpoint}`, {
...options,
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': `Bearer ${token}`,
...options.headers
}
});
if (response.status === 401) {
// 令牌过期,重新认证
throw new Error('Token expired - request new token');
}
return response.json();
}
| 方法 | 端点 | 描述 |
|---|---|---|
| GET | /sites | 列出所有站点 |
| POST | /sites | 创建新站点 |
| GET | /sites/{id} | 获取站点详情 |
| PATCH | /sites/{id} | 更新站点属性 |
| DELETE | /sites/{id} | 删除站点 |
| POST | /sites/{id}/clone | 克隆站点(后台任务) |
| GET | /sites/{id}/credentials | 获取站点凭据 |
| GET | /sites/{id}/usage | 获取站点使用统计 |
| POST | /sites/{id}/lock | 锁定站点(防止修改) |
| DELETE | /sites/{id}/lock | 解锁站点 |
| GET | /sites/{id}/pma_login | 获取 phpMyAdmin SSO 链接 |
| GET | /sites/{id}/settings | 获取站点设置 |
| PATCH | /sites/{id}/settings | 更新站点设置 |
| GET | /sites/locations | 列出可用站点位置 |
| 方法 | 端点 | 描述 |
|---|---|---|
| POST | /sites/{id}/staging | 创建暂存站点 |
| DELETE | /sites/{id}/staging | 删除暂存站点 |
| POST | /sites/{id}/staging/publish | 将暂存发布到生产环境 |
| 方法 | 端点 | 描述 |
|---|---|---|
| GET | /sites/templates | 列出站点模板 |
| POST | /sites/templates | 创建站点模板 |
| GET | /sites/templates/{id} | 获取模板详情 |
| DELETE | /sites/templates/{id} | 删除模板 |
| POST | /sites/templates/{id}/sites | 从模板创建站点 |
| 方法 | 端点 | 描述 |
|---|---|---|
| GET | /sites/{id}/domains | 列出域名别名 |
| POST | /sites/{id}/domains | 添加域名别名 |
| DELETE | /sites/{id}/domains/{domainId} | 移除域名别名 |
| GET | /sites/{id}/maindomain | 获取主域名信息 |
| POST | /sites/{id}/maindomain | 设置主域名 |
| PUT | /sites/{id}/maindomain | 替换主域名 |
| PATCH | /sites/{id}/maindomain | 更新域名验证/SSL |
| GET | /sites/{id}/maindomain/status | 检查域名状态 |
| GET | /sites/{id}/maindomain/recheck | 强制重新验证 |
| GET | /sites/{id}/domains/{domainId}/edge_settings | 获取边缘设置 |
| PATCH | /sites/{id}/domains/{domainId}/edge_settings | 更新边缘设置 |
| 方法 | 端点 | 描述 |
|---|---|---|
| POST | /sites/{id}/cache/purge | 清除特定文件 |
| POST | /sites/{id}/cache/purge_everything | 清除所有缓存 |
| 方法 | 端点 | 描述 |
|---|---|---|
| GET | /sites/{id}/plugins | 列出已安装插件 |
| POST | /sites/{id}/plugins | 安装插件 |
| PATCH | /sites/{id}/plugins | 激活/停用插件 |
| PUT | /sites/{id}/plugins | 更新插件 |
| DELETE | /sites/{id}/plugins | 删除插件 |
| GET | /sites/{id}/plugins/search | 搜索可用插件 |
| GET | /sites/{id}/featured_plugins | 列出特色插件 |
| 方法 | 端点 | 描述 |
|---|---|---|
| GET | /sites/{id}/themes | 列出已安装主题 |
| POST | /sites/{id}/themes | 安装主题 |
| PATCH | /sites/{id}/themes | 激活主题 |
| PUT | /sites/{id}/themes | 更新主题 |
| DELETE | /sites/{id}/themes | 删除主题 |
| GET | /sites/{id}/themes/search | 搜索可用主题 |
| 方法 | 端点 | 描述 |
|---|---|---|
| GET | /sites/{id}/backup | 列出备份 |
| POST | /sites/{id}/backup | 创建备份 |
| GET | /sites/{id}/backup/{backupId} | 下载备份 |
| DELETE | /sites/{id}/backup/{backupId} | 删除备份 |
| POST | /sites/{id}/backup/{backupId}/restore | 恢复备份 |
| GET | /sites/{id}/backup/automated | 列出自动备份 |
| POST | /sites/{id}/backup/automated/{restoreId}/restore | 恢复自动备份 |
| 方法 | 端点 | 描述 |
|---|---|---|
| GET | /sites/{id}/cloud_backups | 列出云备份 |
| POST | /sites/{id}/cloud_backups | 创建云备份 |
| GET | /sites/{id}/cloud_backups/{backupId} | 获取云备份 |
| DELETE | /sites/{id}/cloud_backups/{backupId} | 删除云备份 |
| GET | /sites/{id}/cloud_backups/{backupId}/download | 获取下载链接 |
| POST | /sites/{id}/cloud_backups/{backupId}/restore | 恢复云备份 |
| 方法 | 端点 | 描述 |
|---|---|---|
| GET | /sites/{id}/file_manager/files | 列出文件 |
| POST | /sites/{id}/files | 上传文件 |
| PUT | /sites/{id}/files | 保存文件内容 |
| DELETE | /sites/{id}/files | 删除文件 |
| GET | /sites/{id}/files/view | 查看文件内容 |
| GET | /sites/{id}/files/download | 下载文件 |
| POST | /sites/{id}/files/folder | 创建文件夹 |
| POST | /sites/{id}/files/extract | 解压归档文件 |
| POST | /sites/{id}/files/compress | 压缩文件 |
| PATCH | /sites/{id}/files/chmod | 更改权限 |
| 方法 | 端点 | 描述 |
|---|---|---|
| GET | /sites/{id}/ftp_accounts | 列出 FTP 账户 |
| POST | /sites/{id}/ftp_accounts | 创建 FTP 账户 |
| PATCH | /sites/{id}/ftp_accounts | 更新 FTP 账户 |
| DELETE | /sites/{id}/ftp_accounts | 删除 FTP 账户 |
| 方法 | 端点 | 描述 |
|---|---|---|
| GET | /sites/{id}/ssh_keys | 列出 SSH 密钥 |
| POST | /sites/{id}/ssh_keys | 导入 SSH 密钥 |
| DELETE | /sites/{id}/ssh_keys | 删除 SSH 密钥 |
| POST | /sites/{id}/ssh_keys/authorize | 激活 SSH 密钥 |
| POST | /sites/{id}/ssh_keys/deauthorize | 停用 SSH 密钥 |
| GET | /sites/{id}/ssh_keys/{name} | 查看 SSH 密钥信息 |
| 方法 | 端点 | 描述 |
|---|---|---|
| GET | /sites/{id}/wp_login | 获取 WordPress SSO 链接 |
| GET | /sites/{id}/wp_status | 获取 WordPress 状态 |
| POST | /sites/{id}/wpcli | 执行 WP-CLI 命令 |
| 方法 | 端点 | 描述 |
|---|---|---|
| GET | /reporting/sites/{id}/cdn_requests | CDN 请求报告 |
| GET | /reporting/sites/{id}/cdn_cache_status | 缓存状态报告 |
| GET | /reporting/sites/{id}/cdn_cache_content | 缓存内容报告 |
| GET | /reporting/sites/{id}/visitors | 访客报告 |
| GET | /reporting/sites/{id}/waf_eventlist | WAF 事件列表 |
| GET | /reporting/sites/{id}/waf_events_source | 按来源划分的 WAF 事件 |
| GET | /reporting/sites/{id}/waf_firewall_events | 防火墙事件 |
| GET | /reporting/sites/{id}/bandwidth_usage | 带宽使用情况 |
| GET | /reporting/sites/{id}/bandwidth_top_usage | 最高带宽使用情况 |
| GET | /sites/{id}/access_logs | 访问日志 |
| 方法 | 端点 | 描述 |
|---|---|---|
| GET | /account/me | 获取用户信息 |
| PATCH | /account/me | 更新账户设置 |
| GET | /account/usage | 获取账户使用统计 |
| POST | /account/password | 更改密码 |
| GET | /account/tasks | 列出账户任务 |
| GET | /account/hosting_plan | 获取当前套餐 |
| PUT | /account/hosting_plan | 更改托管套餐 |
| POST | /account/billing_sso | 获取账单 SSO Cookie |
| 方法 | 端点 | 描述 |
|---|---|---|
| GET | /users | 列出账户用户 |
| POST | /users | 创建账户用户 |
| GET | /users/{userId} | 获取用户详情 |
| PATCH | /users/{userId} | 更新用户 |
| DELETE | /users/{userId} | 移除用户 |
| POST | /users/{userId}/reinvite | 重新发送邀请 |
| 方法 | 端点 | 描述 |
|---|---|---|
| GET | /sites/{id}/users | 列出站点用户 |
| POST | /sites/{id}/users | 邀请站点用户 |
| DELETE | /sites/{id}/users/{userId} | 移除站点用户 |
| POST | /sites/{id}/users/{userId}/reinvite | 重新发送邀请 |
| 方法 | 端点 | 描述 |
|---|---|---|
| GET | /billing/addresses | 列出账单地址 |
| POST | /billing/addresses | 创建账单地址 |
| GET | /billing/addresses/{addressId} | 获取账单地址 |
| PATCH | /billing/addresses/{addressId} | 更新账单地址 |
| DELETE | /billing/addresses/{addressId} | 删除账单地址 |
| GET | /billing/invoices | 列出发票 |
| GET | /billing/invoices/{invoiceId} | 获取发票 |
| GET | /billing/invoices/{invoiceId}/pdf | 下载发票 PDF |
| POST | /billing/invoices/{invoiceId}/credit_card_payment | 使用信用卡支付 |
| GET | /billing/payment_methods | 列出支付方式 |
| POST | /billing/payment_methods | 添加支付方式 |
| DELETE | /billing/payment_methods/{methodId} | 删除支付方式 |
| GET | /billing/products | 列出可用产品 |
| 方法 | 端点 | 描述 |
|---|---|---|
| GET | /sites/{id}/password_protection | 获取密码保护状态 |
| POST | /sites/{id}/password_protection | 启用密码保护 |
| DELETE | /sites/{id}/password_protection | 禁用密码保护 |
| GET | /sites/{id}/shopshield | 列出 ShopShield URI |
| POST | /sites/{id}/shopshield | 启用 ShopShield |
| DELETE | /sites/{id}/shopshield/{id} | 禁用 ShopShield |
| GET | /account/visitors | 账户访客统计 |
| GET | /account/bandwidth | 账户带宽统计 |
const sites = await rocketApiRequest('/sites');
console.log(sites);
// 返回站点对象数组,包含 id、domain、status 等
const newSite = await rocketApiRequest('/sites', {
method: 'POST',
body: JSON.stringify({
name: 'my-new-site',
location: 'us-east-1',
// 根据需要添加其他选项
})
});
// 清除特定 URL
await rocketApiRequest(`/sites/${siteId}/cache/purge`, {
method: 'POST',
body: JSON.stringify({
files: [
'https://example.com/style.css',
'https://example.com/script.js'
]
})
});
// 清除所有内容
await rocketApiRequest(`/sites/${siteId}/cache/purge_everything`, {
method: 'POST'
});
// 创建备份
const backup = await rocketApiRequest(`/sites/${siteId}/backup`, {
method: 'POST'
});
// 列出备份
const backups = await rocketApiRequest(`/sites/${siteId}/backup`);
// 恢复备份(后台任务)
await rocketApiRequest(`/sites/${siteId}/backup/${backupId}/restore`, {
method: 'POST'
});
// 列出已安装插件
const plugins = await rocketApiRequest(`/sites/${siteId}/plugins`);
// 安装插件
await rocketApiRequest(`/sites/${siteId}/plugins`, {
method: 'POST',
body: JSON.stringify({
plugins: ['wordfence', 'yoast-seo']
})
});
// 更新所有插件
await rocketApiRequest(`/sites/${siteId}/plugins`, {
method: 'PUT',
body: JSON.stringify({
plugins: ['all']
})
});
// 激活/停用插件
await rocketApiRequest(`/sites/${siteId}/plugins`, {
method: 'PATCH',
body: JSON.stringify({
plugins: ['wordfence'],
action: 'activate' // 或 'deactivate'
})
});
const result = await rocketApiRequest(`/sites/${siteId}/wpcli`, {
method: 'POST',
body: JSON.stringify({
command: 'user list --format=json'
})
});
// 获取 WordPress 管理员的 SSO 链接
const { url } = await rocketApiRequest(`/sites/${siteId}/wp_login`);
// 将用户重定向到 url 以自动登录
interface RocketSite {
id: number;
name: string;
domain: string;
status: 'active' | 'suspended' | 'pending';
location: string;
created_at: string;
updated_at: string;
}
interface RocketBackup {
id: number;
site_id: number;
type: 'manual' | 'automated' | 'cloud';
status: 'pending' | 'completed' | 'failed';
size: number;
created_at: string;
}
interface RocketPlugin {
name: string;
slug: string;
version: string;
status: 'active' | 'inactive';
update_available: boolean;
}
interface RocketDomain {
id: number;
domain: string;
is_main: boolean;
ssl_status: 'pending' | 'active' | 'failed';
validation_method: 'dns' | 'http';
}
interface RocketAuthResponse {
token: string;
expires_at: string;
}
interface RocketApiError {
error: string;
message: string;
status: number;
}
async function handleRocketRequest(endpoint: string, options?: RequestInit) {
try {
const response = await rocketApiRequest(endpoint, options);
return { data: response, error: null };
} catch (error) {
if (error.status === 401) {
// 重新认证并重试
await refreshToken();
return handleRocketRequest(endpoint, options);
}
if (error.status === 404) {
return { data: null, error: 'Resource not found' };
}
if (error.status === 429) {
// 速率限制 - 等待并重试
await sleep(1000);
return handleRocketRequest(endpoint, options);
}
return { data: null, error: error.message };
}
}
许多操作(克隆、备份恢复、暂存发布)作为后台任务运行。监控任务状态:
// 启动后台任务
const { task_id } = await rocketApiRequest(`/sites/${siteId}/clone`, {
method: 'POST',
body: JSON.stringify({ name: 'cloned-site' })
});
// 检查任务状态
const tasks = await rocketApiRequest(`/sites/${siteId}/tasks`);
const task = tasks.find(t => t.id === task_id);
console.log(task.status); // 'pending', 'running', 'completed', 'failed'
// 如果需要,取消任务
await rocketApiRequest(`/sites/${siteId}/tasks/${task_id}/cancel`, {
method: 'POST'
});
API 有速率限制。实现指数退避:
async function withRetry<T>(
fn: () => Promise<T>,
maxRetries = 3,
delay = 1000
): Promise<T> {
for (let i = 0; i < maxRetries; i++) {
try {
return await fn();
} catch (error) {
if (error.status === 429 && i < maxRetries - 1) {
await new Promise(resolve => setTimeout(resolve, delay * Math.pow(2, i)));
continue;
}
throw error;
}
}
throw new Error('Max retries exceeded');
}
每周安装数
109
仓库
GitHub 星标数
652
首次出现
2026年2月6日
安全审计
已安装于
claude-code89
replit81
opencode72
gemini-cli67
codex62
cursor61
Build integrations with Rocket.net's managed WordPress hosting platform API. This skill covers authentication, site management, domain configuration, backups, plugins/themes, CDN cache control, and all 200+ API endpoints.
Base URL : https://api.rocket.net/v1
Authentication : JWT token-based
/login with email/passwordAuthorization: Bearer <token>Content Type : JSON API
Content-Type: application/jsonAccept: application/jsonDocumentation : https://rocketdotnet.readme.io/reference/introduction
const response = await fetch('https://api.rocket.net/v1/login', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
},
body: JSON.stringify({
username: 'your-email@example.com',
password: 'your-password'
})
});
const { token } = await response.json();
// Use token in subsequent requests
async function rocketApiRequest(
endpoint: string,
options: RequestInit = {}
): Promise<any> {
const response = await fetch(`https://api.rocket.net/v1${endpoint}`, {
...options,
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': `Bearer ${token}`,
...options.headers
}
});
if (response.status === 401) {
// Token expired, re-authenticate
throw new Error('Token expired - request new token');
}
return response.json();
}
| Method | Endpoint | Description |
|---|---|---|
| GET | /sites | List all sites |
| POST | /sites | Create new site |
| GET | /sites/{id} | Get site details |
| PATCH | /sites/{id} | Update site properties |
| DELETE | /sites/{id} | Delete site |
| Method | Endpoint | Description |
|---|---|---|
| POST | /sites/{id}/staging | Create staging site |
| DELETE | /sites/{id}/staging | Delete staging site |
| POST | /sites/{id}/staging/publish | Publish staging to production |
| Method | Endpoint | Description |
|---|---|---|
| GET | /sites/templates | List site templates |
| POST | /sites/templates | Create site template |
| GET | /sites/templates/{id} | Get template details |
| DELETE | /sites/templates/{id} | Delete template |
| POST | /sites/templates/{id}/sites |
| Method | Endpoint | Description |
|---|---|---|
| GET | /sites/{id}/domains | List domain aliases |
| POST | /sites/{id}/domains | Add domain alias |
| DELETE | /sites/{id}/domains/{domainId} | Remove domain alias |
| GET | /sites/{id}/maindomain | Get main domain info |
| POST | /sites/{id}/maindomain |
| Method | Endpoint | Description |
|---|---|---|
| POST | /sites/{id}/cache/purge | Purge specific files |
| POST | /sites/{id}/cache/purge_everything | Purge all cache |
| Method | Endpoint | Description |
|---|---|---|
| GET | /sites/{id}/plugins | List installed plugins |
| POST | /sites/{id}/plugins | Install plugins |
| PATCH | /sites/{id}/plugins | Activate/deactivate plugins |
| PUT | /sites/{id}/plugins | Update plugins |
| DELETE | /sites/{id}/plugins |
| Method | Endpoint | Description |
|---|---|---|
| GET | /sites/{id}/themes | List installed themes |
| POST | /sites/{id}/themes | Install themes |
| PATCH | /sites/{id}/themes | Activate theme |
| PUT | /sites/{id}/themes | Update themes |
| DELETE | /sites/{id}/themes |
| Method | Endpoint | Description |
|---|---|---|
| GET | /sites/{id}/backup | List backups |
| POST | /sites/{id}/backup | Create backup |
| GET | /sites/{id}/backup/{backupId} | Download backup |
| DELETE | /sites/{id}/backup/{backupId} | Delete backup |
| POST | /sites/{id}/backup/{backupId}/restore |
| Method | Endpoint | Description |
|---|---|---|
| GET | /sites/{id}/cloud_backups | List cloud backups |
| POST | /sites/{id}/cloud_backups | Create cloud backup |
| GET | /sites/{id}/cloud_backups/{backupId} | Get cloud backup |
| DELETE | /sites/{id}/cloud_backups/{backupId} | Delete cloud backup |
| GET | /sites/{id}/cloud_backups/{backupId}/download |
| Method | Endpoint | Description |
|---|---|---|
| GET | /sites/{id}/file_manager/files | List files |
| POST | /sites/{id}/files | Upload file |
| PUT | /sites/{id}/files | Save file contents |
| DELETE | /sites/{id}/files | Delete file |
| GET | /sites/{id}/files/view |
| Method | Endpoint | Description |
|---|---|---|
| GET | /sites/{id}/ftp_accounts | List FTP accounts |
| POST | /sites/{id}/ftp_accounts | Create FTP account |
| PATCH | /sites/{id}/ftp_accounts | Update FTP account |
| DELETE | /sites/{id}/ftp_accounts | Delete FTP account |
| Method | Endpoint | Description |
|---|---|---|
| GET | /sites/{id}/ssh_keys | List SSH keys |
| POST | /sites/{id}/ssh_keys | Import SSH key |
| DELETE | /sites/{id}/ssh_keys | Delete SSH key |
| POST | /sites/{id}/ssh_keys/authorize | Activate SSH key |
| POST | /sites/{id}/ssh_keys/deauthorize |
| Method | Endpoint | Description |
|---|---|---|
| GET | /sites/{id}/wp_login | Get WordPress SSO link |
| GET | /sites/{id}/wp_status | Get WordPress status |
| POST | /sites/{id}/wpcli | Execute WP-CLI command |
| Method | Endpoint | Description |
|---|---|---|
| GET | /reporting/sites/{id}/cdn_requests | CDN requests report |
| GET | /reporting/sites/{id}/cdn_cache_status | Cache status report |
| GET | /reporting/sites/{id}/cdn_cache_content | Cache content report |
| GET | /reporting/sites/{id}/visitors | Visitors report |
| GET | /reporting/sites/{id}/waf_eventlist |
| Method | Endpoint | Description |
|---|---|---|
| GET | /account/me | Get user information |
| PATCH | /account/me | Update account settings |
| GET | /account/usage | Get account usage stats |
| POST | /account/password | Change password |
| GET | /account/tasks | List account tasks |
| Method | Endpoint | Description |
|---|---|---|
| GET | /users | List account users |
| POST | /users | Create account user |
| GET | /users/{userId} | Get user details |
| PATCH | /users/{userId} | Update user |
| DELETE | /users/{userId} | Remove user |
| Method | Endpoint | Description |
|---|---|---|
| GET | /sites/{id}/users | List site users |
| POST | /sites/{id}/users | Invite site user |
| DELETE | /sites/{id}/users/{userId} | Remove site user |
| POST | /sites/{id}/users/{userId}/reinvite | Resend invite |
| Method | Endpoint | Description |
|---|---|---|
| GET | /billing/addresses | List billing addresses |
| POST | /billing/addresses | Create billing address |
| GET | /billing/addresses/{addressId} | Get billing address |
| PATCH | /billing/addresses/{addressId} | Update billing address |
| DELETE | /billing/addresses/{addressId} |
| Method | Endpoint | Description |
|---|---|---|
| GET | /sites/{id}/password_protection | Get password protection status |
| POST | /sites/{id}/password_protection | Enable password protection |
| DELETE | /sites/{id}/password_protection | Disable password protection |
| GET | /sites/{id}/shopshield | List ShopShield URIs |
| POST | /sites/{id}/shopshield |
const sites = await rocketApiRequest('/sites');
console.log(sites);
// Returns array of site objects with id, domain, status, etc.
const newSite = await rocketApiRequest('/sites', {
method: 'POST',
body: JSON.stringify({
name: 'my-new-site',
location: 'us-east-1',
// Additional options as needed
})
});
// Purge specific URLs
await rocketApiRequest(`/sites/${siteId}/cache/purge`, {
method: 'POST',
body: JSON.stringify({
files: [
'https://example.com/style.css',
'https://example.com/script.js'
]
})
});
// Purge everything
await rocketApiRequest(`/sites/${siteId}/cache/purge_everything`, {
method: 'POST'
});
// Create backup
const backup = await rocketApiRequest(`/sites/${siteId}/backup`, {
method: 'POST'
});
// List backups
const backups = await rocketApiRequest(`/sites/${siteId}/backup`);
// Restore backup (background task)
await rocketApiRequest(`/sites/${siteId}/backup/${backupId}/restore`, {
method: 'POST'
});
// List installed plugins
const plugins = await rocketApiRequest(`/sites/${siteId}/plugins`);
// Install plugin
await rocketApiRequest(`/sites/${siteId}/plugins`, {
method: 'POST',
body: JSON.stringify({
plugins: ['wordfence', 'yoast-seo']
})
});
// Update all plugins
await rocketApiRequest(`/sites/${siteId}/plugins`, {
method: 'PUT',
body: JSON.stringify({
plugins: ['all']
})
});
// Activate/deactivate plugin
await rocketApiRequest(`/sites/${siteId}/plugins`, {
method: 'PATCH',
body: JSON.stringify({
plugins: ['wordfence'],
action: 'activate' // or 'deactivate'
})
});
const result = await rocketApiRequest(`/sites/${siteId}/wpcli`, {
method: 'POST',
body: JSON.stringify({
command: 'user list --format=json'
})
});
// Get SSO link for WordPress admin
const { url } = await rocketApiRequest(`/sites/${siteId}/wp_login`);
// Redirect user to url for auto-login
interface RocketSite {
id: number;
name: string;
domain: string;
status: 'active' | 'suspended' | 'pending';
location: string;
created_at: string;
updated_at: string;
}
interface RocketBackup {
id: number;
site_id: number;
type: 'manual' | 'automated' | 'cloud';
status: 'pending' | 'completed' | 'failed';
size: number;
created_at: string;
}
interface RocketPlugin {
name: string;
slug: string;
version: string;
status: 'active' | 'inactive';
update_available: boolean;
}
interface RocketDomain {
id: number;
domain: string;
is_main: boolean;
ssl_status: 'pending' | 'active' | 'failed';
validation_method: 'dns' | 'http';
}
interface RocketAuthResponse {
token: string;
expires_at: string;
}
interface RocketApiError {
error: string;
message: string;
status: number;
}
async function handleRocketRequest(endpoint: string, options?: RequestInit) {
try {
const response = await rocketApiRequest(endpoint, options);
return { data: response, error: null };
} catch (error) {
if (error.status === 401) {
// Re-authenticate and retry
await refreshToken();
return handleRocketRequest(endpoint, options);
}
if (error.status === 404) {
return { data: null, error: 'Resource not found' };
}
if (error.status === 429) {
// Rate limited - wait and retry
await sleep(1000);
return handleRocketRequest(endpoint, options);
}
return { data: null, error: error.message };
}
}
Many operations (clone, backup restore, staging publish) run as background tasks. Monitor task status:
// Start a background task
const { task_id } = await rocketApiRequest(`/sites/${siteId}/clone`, {
method: 'POST',
body: JSON.stringify({ name: 'cloned-site' })
});
// Check task status
const tasks = await rocketApiRequest(`/sites/${siteId}/tasks`);
const task = tasks.find(t => t.id === task_id);
console.log(task.status); // 'pending', 'running', 'completed', 'failed'
// Cancel task if needed
await rocketApiRequest(`/sites/${siteId}/tasks/${task_id}/cancel`, {
method: 'POST'
});
The API has rate limits. Implement exponential backoff:
async function withRetry<T>(
fn: () => Promise<T>,
maxRetries = 3,
delay = 1000
): Promise<T> {
for (let i = 0; i < maxRetries; i++) {
try {
return await fn();
} catch (error) {
if (error.status === 429 && i < maxRetries - 1) {
await new Promise(resolve => setTimeout(resolve, delay * Math.pow(2, i)));
continue;
}
throw error;
}
}
throw new Error('Max retries exceeded');
}
Weekly Installs
109
Repository
GitHub Stars
652
First Seen
Feb 6, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykFail
Installed on
claude-code89
replit81
opencode72
gemini-cli67
codex62
cursor61
Azure 升级评估与自动化工具 - 轻松迁移 Functions 计划、托管层级和 SKU
111,700 周安装
Datadog自动化监控:通过Rube MCP与Composio实现指标、日志、仪表板管理
69 周安装
Intercom自动化指南:通过Rube MCP与Composio实现客户支持对话管理
69 周安装
二进制初步分析指南:使用ReVa工具快速识别恶意软件与逆向工程
69 周安装
PrivateInvestigator 道德人员查找工具 | 公开数据调查、反向搜索与背景研究
69 周安装
TorchTitan:PyTorch原生分布式大语言模型预训练平台,支持4D并行与H100 GPU加速
69 周安装
screenshot 截图技能:跨平台桌面截图工具,支持macOS/Linux权限管理与多模式捕获
69 周安装
| POST | /sites/{id}/clone | Clone a site (background task) |
| GET | /sites/{id}/credentials | Get site credentials |
| GET | /sites/{id}/usage | Get site usage statistics |
| POST | /sites/{id}/lock | Lock site (prevent modifications) |
| DELETE | /sites/{id}/lock | Unlock site |
| GET | /sites/{id}/pma_login | Get phpMyAdmin SSO link |
| GET | /sites/{id}/settings | Get site settings |
| PATCH | /sites/{id}/settings | Update site settings |
| GET | /sites/locations | List available site locations |
| Create site from template |
| Set main domain |
| PUT | /sites/{id}/maindomain | Replace main domain |
| PATCH | /sites/{id}/maindomain | Update domain validation/SSL |
| GET | /sites/{id}/maindomain/status | Check domain status |
| GET | /sites/{id}/maindomain/recheck | Force validation recheck |
| GET | /sites/{id}/domains/{domainId}/edge_settings | Get edge settings |
| PATCH | /sites/{id}/domains/{domainId}/edge_settings | Update edge settings |
| Delete plugins |
| GET | /sites/{id}/plugins/search | Search available plugins |
| GET | /sites/{id}/featured_plugins | List featured plugins |
| Delete themes |
| GET | /sites/{id}/themes/search | Search available themes |
| Restore backup |
| GET | /sites/{id}/backup/automated | List automated backups |
| POST | /sites/{id}/backup/automated/{restoreId}/restore | Restore automated backup |
| Get download link |
| POST | /sites/{id}/cloud_backups/{backupId}/restore | Restore cloud backup |
| View file contents |
| GET | /sites/{id}/files/download | Download file |
| POST | /sites/{id}/files/folder | Create folder |
| POST | /sites/{id}/files/extract | Extract archive |
| POST | /sites/{id}/files/compress | Compress files |
| PATCH | /sites/{id}/files/chmod | Change permissions |
| Deactivate SSH key |
| GET | /sites/{id}/ssh_keys/{name} | View SSH key info |
| WAF events list |
| GET | /reporting/sites/{id}/waf_events_source | WAF events by source |
| GET | /reporting/sites/{id}/waf_firewall_events | Firewall events |
| GET | /reporting/sites/{id}/bandwidth_usage | Bandwidth usage |
| GET | /reporting/sites/{id}/bandwidth_top_usage | Top bandwidth usage |
| GET | /sites/{id}/access_logs | Access logs |
| GET | /account/hosting_plan | Get current plan |
| PUT | /account/hosting_plan | Change hosting plan |
| POST | /account/billing_sso | Get billing SSO cookie |
| POST | /users/{userId}/reinvite | Resend invite |
| Delete billing address |
| GET | /billing/invoices | List invoices |
| GET | /billing/invoices/{invoiceId} | Get invoice |
| GET | /billing/invoices/{invoiceId}/pdf | Download invoice PDF |
| POST | /billing/invoices/{invoiceId}/credit_card_payment | Pay with card |
| GET | /billing/payment_methods | List payment methods |
| POST | /billing/payment_methods | Add payment method |
| DELETE | /billing/payment_methods/{methodId} | Delete payment method |
| GET | /billing/products | List available products |
| Enable ShopShield |
| DELETE | /sites/{id}/shopshield/{id} | Disable ShopShield |
| GET | /account/visitors | Account visitor stats |
| GET | /account/bandwidth | Account bandwidth stats |