http-api-cloudbase▌
tencentcloudbase/skills · updated Apr 27, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
HTTP API access to CloudBase platform features including database, authentication, functions, storage, and hosting.
- ›Supports MySQL RESTful API for CRUD operations on database tables via GET, POST, PATCH, DELETE endpoints with field selection, filtering, pagination, and sorting
- ›Requires authentication via AccessToken (user permissions), API Key (admin permissions), or Publishable Key (anonymous access); tokens passed in Authorization header
- ›Provides unified domain endpoints for domest
Activation Contract
Use this first when
- The request comes from Android, iOS, Flutter, React Native, non-Node backends, or admin scripts that must call official CloudBase APIs via raw HTTP.
- The task is to consume CloudBase platform endpoints, not to build a new HTTP service on CloudBase.
Read before writing code if
- The platform does not support a CloudBase SDK, or the user explicitly asks for HTTP API integration.
- The user says "HTTP API" but it is unclear whether they mean official CloudBase endpoints or their own business API.
Then also read
- Auth configuration ->
../auth-tool/SKILL.md - MySQL MCP management ->
../relational-database-tool/SKILL.md - Your own HTTP service on CloudBase ->
../cloud-functions/SKILL.mdor../cloudrun-development/SKILL.md
Do NOT use for
- CloudBase Web SDK flows, mini program SDK flows, or MCP-driven management tasks.
- Building your own HTTP service or REST API on CloudBase.
Common mistakes / gotchas
- Treating Web SDK examples as valid for native Apps.
- Guessing endpoints without reading OpenAPI definitions.
- Confusing official CloudBase HTTP APIs with your own function or CloudRun endpoint.
- Mixing raw HTTP API integration with MCP management logic.
Minimal checklist
- Read HTTP API Routing Checklist before implementation.
When to use this skill
Use this skill whenever you need to call CloudBase platform features via raw HTTP APIs, for example:
- Non-Node backends (Go, Python, Java, PHP, etc.)
- Integration tests or admin scripts that use curl or language HTTP clients
- Direct database operations via MySQL RESTful API
- Cloud function invocation via HTTP
- Any scenario where SDKs are not available or not preferred
Do not use this skill for:
- Frontend Web apps using
@cloudbase/js-sdk(use CloudBase Web skills) - Node.js code using
@cloudbase/node-sdk(use CloudBase Node skills) - Authentication flows (use CloudBase Auth HTTP API skill for auth-specific endpoints)
How to use this skill (for a coding agent)
-
Clarify the scenario
- Confirm this code will call HTTP endpoints directly (not SDKs).
- Ask for:
env– CloudBase environment ID- Authentication method (AccessToken, API Key, or Publishable Key)
- Confirm which CloudBase feature is needed (database, functions, storage, etc.).
- For user authentication: If no specific method is requested, always default to Phone SMS Verification - it's the most user-friendly and secure option for Chinese users.
-
Determine the base URL
- Use the correct domain based on region (domestic vs. international).
- Default is domestic Shanghai region.
-
Set up authentication
- Choose appropriate authentication method based on use case.
- Add
Authorization: Bearer <token>header to requests.
-
Reference OpenAPI Swagger documentation
- MUST use
searchKnowledgeBasetool to get OpenAPI specifications - Use the tool with
mode=openapiand specify theapiName:mysqldb- MySQL RESTful APIfunctions- Cloud Functions APIauth- Authentication APIcloudrun- CloudRun APIstorage- Storage API
- Example:
searchKnowledgeBase({ mode: "openapi", apiName: "mysqldb" }) - Parse the returned YAML content to understand exact endpoint paths, parameters, request/response schemas
- Never invent endpoints or parameters - always reference the swagger documentation
- MUST use
Overview
CloudBase HTTP API is a set of interfaces for accessing CloudBase platform features via HTTP protocol, supporting database, user authentication, cloud functions, cloud hosting, cloud storage, AI, and more.
OpenAPI Swagger Documentation
⚠️ IMPORTANT: Always use searchKnowledgeBase tool to get OpenAPI Swagger specifications
Before implementing any HTTP API calls, you should:
-
Use
searchKnowledgeBasetool to get OpenAPI documentation:searchKnowledgeBase({ mode: "openapi", apiName: "<api-name>" }) -
Available API names:
mysqldb- MySQL RESTful APIfunctions- Cloud Functions APIauth- Authentication APIcloudrun- CloudRun APIstorage- Storage API
-
Parse and use the swagger documentation:
- Extract exact endpoint paths and HTTP methods
- Understand required and optional parameters
- Review request/response schemas
- Check authentication requirements
- Verify error response formats
-
Never invent API endpoints or parameters - always base your implementation on the official swagger documentation.
Prerequisites
Before starting, ensure you have:
- CloudBase environment created and activated
- Authentication credentials (AccessToken, API Key, or Publishable Key)
Authentication and Authorization
CloudBase HTTP API requires authentication. Choose the appropriate method based on your use case:
AccessToken Authentication
Applicable environments: Client/Server
User permissions: Logged-in user permissions
How to get: Use searchKnowledgeBase({ mode: "openapi", apiName: "auth" }) to get the Authentication API specification
API Key
Applicable environments: Server
User permissions: Administrator permissions
- Validity: Long-term valid
- How to get: Get from CloudBase Platform/ApiKey Management Page
⚠️ Warning: Tokens are critical credentials for identity authentication. Keep them secure. API Key must NOT be used in client-side code.
Publishable Key
Applicable environments: Client/Server
User permissions: Anonymous user permissions
- Validity: Long-term valid
- How to get: Get from CloudBase Platform/ApiKey Management Page
💡 Note: Can be exposed in browsers, used for requesting publicly accessible resources, effectively reducing MAU.
API Endpoint URLs
CloudBase HTTP API uses unified domain names for API calls. The domain varies based on the environment's region.
Domestic Regions
For environments in domestic regions like Shanghai (ap-shanghai), use:
https://{your-env}.api.tcloudbasegateway.com
Replace {your-env} with the actual environment ID. For example, if environment ID is cloud1-abc:
https://cloud1-abc.api.tcloudbasegateway.com
International Regions
For environments in international regions like Singapore (ap-singapore), use:
https://{your-env}.api.intl.tcloudbasegateway.com
Replace {your-env} with the actual environment ID. For example, if environment ID is cloud1-abc:
https://cloud1-abc.api.intl.tcloudbasegateway.com
Using Authentication in Requests
Add the token to the request header:
Authorization: Bearer <access_token/apikey/publishable_key>
:::warning Note
When making actual calls, replace the entire part including angle brackets (< >) with your obtained key. For example, if the obtained key is eymykey, fill it as:
Authorization: Bearer eymykey
:::
Usage Examples
Cloud Function Invocation Example
curl -X POST "https://your-env-id.api.tcloudbasegateway.com/v1/functions/YOUR_FUNCTION_NAME" \
-H "Authorization: Bearer <access_token/apikey/publishable_key>" \
-H "Content-Type: application/json" \
-d '{"name": "张三", "age": 25}'
For detailed API specifications, always download and reference the OpenAPI Swagger files mentioned above.
MySQL RESTful API
The MySQL RESTful API provides all MySQL database operations via HTTP endpoints.
Base URL Patterns
Support three domain access patterns:
https://{envId}.api.tcloudbasegateway.com/v1/rdb/rest/{table}https://{envId}.api.tcloudbasegateway.com/v1/rdb/rest/{schema}/{table}https://{envId}.api.tcloudbasegateway.com/v1/rdb/rest/{instance}/{schema}/{table}
Where:
envIdis the environment IDinstanceis the database instance identifierschemais the database nametableis the table name
If using the system database, recommend pattern 1.
Request Headers
| Header | Parameter | Description | Example |
|---|---|---|---|
| Accept | application/json, application/vnd.pgrst.object+json |
Control data return format | Accept: application/json |
| Content-Type | application/json, application/vnd.pgrst.object+json |
Request content type | Content-Type: application/json |
| Prefer | Operation-dependent feature values | - return=representation Write operation, return data body and headers- return=minimal Write operation, return headers only (default)- count=exact Read operation, specify count- resolution=merge-duplicates Upsert operation, merge conflicts- resolution=ignore-duplicates Upsert operation, ignore conflicts |
Prefer: return=representation |
| Authorization | Bearer <token> |
Authentication token | Authorization: Bearer <access_token> |
Query Records
GET /v1/rdb/rest/{table}
Query Parameters:
select: Field selection, supports*or field list, supports join queries likeclass_id(grade,class_number)limit: Limit return countoffset: Offset for paginationorder: Sort field, formatfield.ascorfield.desc
Example:
# Before URL encoding
curl -X GET 'https://your-env.api.tcloudbasegateway.com/v1/rdb/rest/course?select=name,position&name=like.%张三%&title=eq.文章标题' \
-H "Authorization: Bearer <access_token>"
# After URL encoding
curl -X GET 'https://your-env.api.tcloudbasegateway.com/v1/rdb/rest/course?select=name,position&name=like.%%E5%BC%A0%E4%B8%89%&title=eq.%E6%96%87%E7%AB%A0%E6%A0%87%E9%A2%98' \
-H "Authorization: Bearer <access_token>"
Response Headers:
Content-Range: Data range, e.g.,0-9/100(0=start, 9=end, 100=total)
Insert Records
POST /v1/rdb/rest/{table}
Request Body: JSON object or array of objects
💡 Note about
_openid: When a user is logged in (using AccessToken authentication), the_openidfield is automatically populated by the server with the current user's identity. You do NOT need to manually set this field in INSERT operations - the server will fill it automatically based on the authenticated user's session.
Example:
curl -X POST 'https://your-env.api.tcloudbasegateway.com/v1/rdb/rest/course' \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-H "Prefer: return=representation" \
-d '{
"name": "数学",
"position": 1
}'
Update Records
PATCH /v1/rdb/rest/{table}
Request Body: JSON object with fields to update
Example:
curl -X PATCH 'https://your-env.api.tcloudbasegateway.com/v1/rdb/rest/course?id=eq.1' \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-H "Prefer: return=representation" \
-d '{
"name": "高等数学",
"position": 2
}'
⚠️ Important: UPDATE requires a WHERE clause. Use query parameters like
?id=eq.1to specify conditions.
Delete Records
DELETE /v1/rdb/rest/{table}
Example:
curl -X DELETE 'https://your-env.api.tcloudbasegateway.com/v1/rdb/rest/course?id=eq.1' \
-H "Authorization: Bearer <access_token>"
⚠️ Important: DELETE requires a WHERE clause. Use query parameters to specify conditions.
Error Codes and HTTP Status Codes
| Error Code | HTTP Status | Description |
|---|---|---|
| INVALID_PARAM | 400 | Invalid request parameters |
| INVALID_REQUEST | 400 | Invalid request content: missing permission fields, SQL execution errors, etc. |
| INVALID_REQUEST | 406 | Does not meet single record return constraint |
| PERMISSION_DENIED | 401, 403 | Authentication failed: 401 for identity authentication failure, 403 for authorization failure |
| RESOURCE_NOT_FOUND | 404 | Database instance or table not found |
| SYS_ERR | 500 | Internal system error |
| OPERATION_FAILED | 503 | Failed to establish database connection |
| RESOURCE_UNAVAILABLE | 503 | Database unavailable due to certain reasons |
Response Format
-
All POST, PATCH, DELETE operations: Request header with
Prefer: return=representationmeans there is a response body, without it means only response headers. -
POST, PATCH, DELETE response bodies are usually JSON array type
[]. If request header specifiesAccept: application/vnd.pgrst.object+json, it will return JSON object type{}. -
If
Accept: application/vnd.pgrst.object+jsonis specified but data quantity is greater than 1, an error will be returned.
URL Encoding
When making requests, please perform URL encoding. For example:
Original request:
curl -i -X GET 'https://{{host}}/v1/rdb/rest/course?select=name,position&name=like.%张三%&title=eq.文章标题'
Encoded request:
curl -i -X GET 'https://{{host}}/v1/rdb/rest/course?select=name,position&name=like.%%E5%BC%A0%E4%B8%89%&title=eq.%E6%96%87%E7%AB%A0%E6%A0%87%E9%A2%98'
Online Debugging Tool
CloudBase platform provides an online debugging tool where you can test API interfaces without writing code:
- Visit the API documentation page
- Find the debugging tool entry
- Fill in environment ID and request parameters
- Click send request to view response
API Documentation References
⚠️ Always use searchKnowledgeBase tool to get OpenAPI Swagger specifications:
Use searchKnowledgeBase({ mode: "openapi", apiName: "<api-name>" }) with these API names:
auth- Authentication APImysqldb- MySQL RESTful APIfunctions- Cloud Functions APIcloudrun- CloudRun APIstorage- Storage API
How to use the OpenAPI documentation:
- Call
searchKnowledgeBasetool with the appropriateapiName - Parse the returned YAML content to extract:
- Endpoint paths (e.g.,
/v1/rdb/rest/{table}) - HTTP methods (GET, POST, PATCH, DELETE)
- Path parameters, query parameters, request body schemas
- Response schemas and status codes
- Authentication requirements
- Endpoint paths (e.g.,
- Use the extracted information to construct accurate API calls
- Never assume endpoint structure - always verify against swagger documentation
Common Patterns
Reusable Shell Variables
how to use http-api-cloudbaseHow to use http-api-cloudbase on Cursor
AI-first code editor with Composer
1Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add http-api-cloudbase
2Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
$npx skills add https://github.com/tencentcloudbase/skills --skill http-api-cloudbaseThe skills CLI fetches http-api-cloudbase from GitHub repository tencentcloudbase/skills and configures it for Cursor.
3Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
◆ Which agents do you want to install to?││ ── Universal (.agents/skills) ── always included ────│ • Amp│ • Antigravity│ • Cline│ • Codex│ ●Cursor(selected)│ • Cursor│ • Windsurf4Verify installation
Confirm successful installation by checking the skill directory location:
.cursor/skills/http-api-cloudbaseReload or restart Cursor to activate http-api-cloudbase. Access the skill through slash commands (e.g., /http-api-cloudbase) or your agent's skill management interface.
⚠Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
Additional Resources
List & Monetize Your Skill
Submit your Claude Code skill and start earning
GET_STARTED →Use Cases▌
Task Automation & Efficiency
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
✓Save 3-5 hours per week on routine tasks
Knowledge Enhancement
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
✓Accelerate learning and skill development by 2x
Quality Improvement
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
✓Improve work quality by 30-40% with less effort
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Installation Steps
- 1.Install skill using provided installation command
- 2.Test with simple use case relevant to your work
- 3.Evaluate output quality and relevance
- 4.Iterate on prompts to improve results
- 5.Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices▌
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This▌
✓ Use When
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid When
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path▌
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
general reviewsRatings
4.6★★★★★75 reviews- ★★★★★Zara Haddad· Dec 24, 2024
http-api-cloudbase is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Ira Patel· Dec 24, 2024
http-api-cloudbase reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Chaitanya Patil· Dec 16, 2024
http-api-cloudbase reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Min Patel· Dec 8, 2024
We added http-api-cloudbase from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Min Rao· Dec 8, 2024
http-api-cloudbase has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Diya Farah· Dec 8, 2024
Keeps context tight: http-api-cloudbase is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★William Verma· Dec 4, 2024
Solid pick for teams standardizing on skills: http-api-cloudbase is focused, and the summary matches what you get after install.
- ★★★★★Zara Martinez· Nov 27, 2024
Solid pick for teams standardizing on skills: http-api-cloudbase is focused, and the summary matches what you get after install.
- ★★★★★Xiao Liu· Nov 27, 2024
http-api-cloudbase fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Diya Abebe· Nov 23, 2024
We added http-api-cloudbase from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
showing 1-10 of 75
1 / 8