Skip to main content
Glama
IMPLEMENTATION-direct-http-api.md•2.41 kB
# Task: Direct HTTP API Implementation **Priority**: Critical šŸ”“ **Assignee**: Claude Code **Created**: June 28, 2025 **Status**: Ready to Execute ## Objective Implement direct HTTP API calls to replace browser automation, enabling natural language → composition creation via REST API. ## Validated API Specifications ### Composition Save Endpoint ``` PUT https://api.digitalpages.com.br/storage/v1.0/content?uid={UID}&manual_project_uid=36c92686-c494-ec11-a22a-dc984041c95d ``` ### Request Format ``` Content-Type: multipart/form-data Authorization: Bearer {JWT_TOKEN} Content-Disposition: form-data; name="file"; filename="composition.rdpcomposer" Content-Type: digitalpages/composer {JSON_PAYLOAD} ``` ### JSON Payload Structure ```json { "version": "1.1", "metadata": { "title": "Composition Title", "description": "", "thumb": null, "tags": [] }, "interface": { "content_language": "pt_br", "index_option": "buttons", "font_family": "Lato", "show_summary": "disabled", "finish_btn": "disabled" }, "structure": [ { "id": "generated-uuid", "type": "text-1", "content": "<p>Widget content</p>", "background_color": "#FFFFFF", "padding_top": 0, "padding_bottom": 0 } ] } ``` ## Implementation Requirements ### Update MCP Server Functions - `create-new-composition`: Use POST/PUT to storage API - `edit-composition-metadata`: Update metadata in JSON - `save-composition`: Use discovered endpoint - Remove all browser automation dependencies ### Constants ```javascript const API_BASE = "https://api.digitalpages.com.br"; const PROJECT_UID = "36c92686-c494-ec11-a22a-dc984041c95d"; const JWT_TOKEN = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."; ``` ### Widget Type Mapping - Text: `type: "text-1"` - Header: `type: "head-1"` - List: `type: "list-1"` - Image: `type: "image-1"` ## Success Criteria - āœ… Composition creation via HTTP POST - āœ… Widget addition through structure array - āœ… Natural language → composition workflow - āœ… EROFS browser automation bypassed - āœ… End-to-end testing successful ## Files to Create/Update - `/src/api-client.js` - HTTP API client - `/src/composition-manager.js` - Composition CRUD - Update existing MCP server functions - `/tests/direct-api-test.js` - Integration tests **Ready for immediate implementation with validated API specifications.**

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rkm097git/euconquisto-composer-mcp-poc'

If you have feedback or need assistance with the MCP directory API, please join our Discord server