Skip to main content
Glama

activatePage

Publish a single page or its entire content tree via REST/JSON-RPC API in Adobe Experience Manager, enabling precise control and automation in content management workflows.

Instructions

Activate (publish) a single page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
activateTreeNo
pagePathYes

Implementation Reference

  • Core handler function that executes the page activation by posting to AEM's replication endpoint with fallback to WCM command.
    async activatePage(request) { return safeExecute(async () => { const { pagePath, activateTree = false } = request; if (!isValidContentPath(pagePath)) { throw createAEMError(AEM_ERROR_CODES.INVALID_PARAMETERS, `Invalid page path: ${String(pagePath)}`, { pagePath }); } try { // Use the correct AEM replication servlet endpoint const formData = new URLSearchParams(); formData.append('cmd', 'Activate'); formData.append('path', pagePath); formData.append('ignoredeactivated', 'false'); formData.append('onlymodified', 'false'); if (activateTree) { formData.append('deep', 'true'); } const response = await this.httpClient.post('/bin/replicate.json', formData, { headers: { 'Content-Type': 'application/x-www-form-urlencoded', }, }); return createSuccessResponse({ success: true, activatedPath: pagePath, activateTree, response: response.data, timestamp: new Date().toISOString(), }, 'activatePage'); } catch (error) { // Fallback to alternative replication methods try { const wcmResponse = await this.httpClient.post('/bin/wcmcommand', { cmd: 'activate', path: pagePath, ignoredeactivated: false, onlymodified: false, }); return createSuccessResponse({ success: true, activatedPath: pagePath, activateTree, response: wcmResponse.data, fallbackUsed: 'WCM Command', timestamp: new Date().toISOString(), }, 'activatePage'); } catch (fallbackError) { throw handleAEMHttpError(error, 'activatePage'); } } }, 'activatePage'); }
  • MCP tool schema definition including input validation for pagePath (required) and optional activateTree.
    name: 'activatePage', description: 'Activate (publish) a single page', inputSchema: { type: 'object', properties: { pagePath: { type: 'string' }, activateTree: { type: 'boolean' }, }, required: ['pagePath'], }, },
  • Registration and dispatch handler in MCP server that calls the AEM connector when activatePage tool is invoked.
    case 'activatePage': { const result = await aemConnector.activatePage(args); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
  • Proxy method in AEMConnector class that delegates to PageOperations instance.
    async activatePage(request) { return this.pageOps.activatePage(request);
  • Alternative dispatch handler in MCPRequestHandler class.
    case 'activatePage': return await this.aemConnector.activatePage(params);

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/indrasishbanerjee/aem-mcp-server'

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