Skip to content

Feat(admin-api): add Admin API skill for AEM Edge Delivery Services#86

Open
mkbansal1 wants to merge 12 commits intoadobe:mainfrom
mkbansal1:feat/admin-api-skill
Open

Feat(admin-api): add Admin API skill for AEM Edge Delivery Services#86
mkbansal1 wants to merge 12 commits intoadobe:mainfrom
mkbansal1:feat/admin-api-skill

Conversation

@mkbansal1
Copy link
Copy Markdown

Description

Adds a new admin-api skill to the project-management plugin that enables
natural language access to the AEM Edge Delivery Services Admin API
(https://admin.hlx.page).

The skill covers the full content lifecycle — preview, publish, cache, indexing,
and code deployments — through plain English commands, without requiring developers
or content teams to memorise API endpoints or write curl commands manually.

Operations supported:

  • Preview — trigger, get status, delete (single path)
  • Publish / Unpublish — single path; bulk publish via explicit path list
  • Cache Purge — single path, multiple paths (loop), full site wildcard (/*)
  • Status — cross-layer inspection (edit / preview / live) with timestamp diagnosis
  • Bulk Preview — folder wildcard or explicit paths, returns async job
  • Bulk Status — explicit paths (synchronous) or wildcard folder (async job)
  • Job Management — list, get status, get details, stop (topics: preview / live / index / code)
  • Code Sync — single file or full repo (/*) with branch override support
  • Code Status — per-file code bus state vs GitHub source comparison
  • Index Management — reindex, remove from index, bulk reindex, index status

Skill architecture:

  • Thin orchestrator (SKILL.md) routes to 6 focused resource files
  • Each resource file is self-contained and independently readable
  • Two-token auth model: authToken (admin JWT) for reads; imsToken (Adobe IMS Bearer) for writes — wired to the existing project-management:auth sub-skill
  • Org/site/ref resolved from saved config → AEM URL parsing → user prompt (no hardcoded values)

Related Issue

No existing issue — proposing as a new skill contribution per the contribution guidelines.

Motivation and Context

EDS Admin API operations (preview, publish, cache purge, etc.) are frequent,
repetitive tasks for both developers and content teams. The current workflow
requires knowing the exact API endpoint structure, constructing curl commands,
and handling auth headers manually.

This skill reduces that friction to a single natural language command (e.g.
publish /en/homepage, bulk preview /en/campaign/, why isn't my page updating?),
making Admin API access practical for daily use without prior API knowledge.

Tested on a production EDS project with 600+ sites across SharePoint and DA
content sources.

How Has This Been Tested?

Tested live against a production EDS project (uat environment, SharePoint + DA sources):

  • Single-path preview, publish, unpublish, cache purge — verified HTTP 200/204 responses and correct CDN propagation
  • Status command — verified cross-layer timestamp comparison and correct diagnosis recommendations
  • Bulk preview (/en/help-center/*) — verified HTTP 202 async job, job details showing per-path 200/304 results
  • Bulk publish (explicit paths extracted from preview job) — verified HTTP 202, all paths published successfully
  • Bulk status (wildcard → async job; explicit paths → sync 200)
  • Code sync (/*) on named branch — verified HTTP 202 async job and per-file sync results
  • Index status, reindex, remove from index — verified against pages with and without query-index.json
  • Job management (get status, get details, stop) — verified across preview, publish, index, and code topics
  • Auth token expiry handling — verified 401 detection and re-auth flow via project-management:auth

Environment: macOS, Claude Code CLI, AEM EDS (SharePoint + DA authoring sources)

Screenshots (if appropriate):

Skill is CLI/API based; operation outputs are structured text tables in the terminal. Adding a screenshot
image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly. (README.md included in the skill)
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes. (NA)
  • All new and existing tests passed. (NA)

asthabh23 and others added 4 commits April 20, 2026 17:52
…min operations

Introduces a new skill that enables natural language execution of AEM Edge
Delivery Services admin tasks: content preview/publish, cache management,
code sync, indexing, user management, logs, jobs, config, secrets, and more.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@mkbansal1 mkbansal1 force-pushed the feat/admin-api-skill branch from 0c98c51 to 1b48cb0 Compare April 22, 2026 03:46
mkbansal1 and others added 8 commits April 22, 2026 18:59
- Use IMS Bearer token (authorization: Bearer + x-content-source-authorization)
  for write ops: preview, publish, unpublish, cache purge, code sync
- Use admin JWT (authorization: token) for read ops: status checks,
  job queries, index reads
- Extract IMS token from admin JWT payload as best-effort fallback
- Document DA (markup mountpoint) bulk operation limitation — wildcard
  paths not supported; explicit paths required
- Document bulk publish wildcard restriction (all sites, security policy)
- Fix code bus wildcard sync URL format

Tested across SharePoint and DA sites — all 18 operations passing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…sing

- Remove duplicated config loading block from SKILL.md Step 2; delegate
  entirely to resources/config.md
- Add IMS_TOKEN to config.md Load Configuration block (was only in SKILL.md)
- Add "Parse from AEM URL" section to config.md with Python-based parser
  that reliably handles hyphenated ref/site/org names (e.g. feature-x,
  hmns-uat-qa-da) — replaces fragile macOS BSD sed approach
- SKILL.md Step 2 is now a 3-line reference; all config logic in one place

Tested: URL parsing + status/preview/publish across SharePoint and DA sites.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… gap fixes

Response handler (Step 4):
- Add 200/204/202 success cases previously undocumented
- 202 now instructs user to track with job name explicitly
- 401 gives precise DevTools instruction for IMS token retrieval
- Remove duplicate standalone Error Handling section

Intent router gaps (Point 3):
- Add bulk status, force purge, index status, job details to router table
- Content operations: bulk status patterns
- Cache operations: force/full purge patterns
- Index operations: index status patterns
- Job management: job details and check job patterns

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Added post-curl recommended next actions to all 20 ops resource files
  covering ~150 operations across content, cache, jobs, index, code,
  config-api, apikeys, secrets, tokens, users, profiles, sites,
  snapshots, versioning, logs, sitemap, and index-config modules
- Fixed misplaced pre-curl recommendation blocks (moved to correct
  post-curl position in previous section) across apikeys, secrets,
  config-api, logs, profiles, snapshots, tokens, users, versioning,
  and sites files
- Repaired broken ## Natural Language Patterns headings in sitemap.md,
  users.md, and sites.md caused by mid-heading insertion
- Added recommendation format guidelines to SKILL.md — each command
  in its own fenced code block for one-click copy button support
- Recommendations follow professional phrasing (no rhetorical
  questions), use relative paths only, and provide 2-3 focused
  contextual suggestions per operation

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…keys

Fixes discovered by live testing against alshaya-axp org:

config-api.md:
- Site config endpoint: /config/{org}/{site}.json → /config/{org}/sites/{site}.json
- Robots.txt endpoint: /config/{org}/{site}.json/robots.txt → /config/{org}/sites/{site}/robots.txt
- Applied across API reference table and all 6 curl commands (Read, Update,
  Create, Delete site config + Read, Update robots.txt)

users.md:
- List Users: added smart fallback script — tries site access.json first,
  falls back to org config users[] when access.json returns 404 (common in
  repoless orgs that manage access centrally)
- List Org Users: /config/{org}/users returns 400 — reads from
  /config/{org}.json users[] array instead; updated API reference table
- Added note explaining org-level user storage pattern

apikeys.md:
- List Org API Keys: /config/{org}/apikeys returns 400 — reads from
  /config/{org}.json apiKeys{} map instead; replaced curl with node script
  that parses and formats key metadata
- Updated API reference table to reflect actual endpoint

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Closes the polish gap identified in the ops vs admin-api comparison —
every resource file now opens with a contextual "When to Use" section
so users and the skill router can quickly determine the right resource
for their intent without reading through the full API reference.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Each resource file now ends with a ## Success Criteria section — a
3–5 point checklist that tells the skill what it must verify and
communicate before calling an operation done. Covers HTTP status
confirmation, URL output, destructive-op guards, fallback behaviour,
and recommended follow-up steps. Closes the final polish gap
identified in the ops vs admin-api comparison.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Success messages now show the constructed preview or live URL directly
so users can click or copy without mentally assembling it. Also upgrades
the Check Status output to a layered table with ✅ indicators and inline
commands in the diagnosis rows. Fixes branch URL typo (.aem.live →
.aem.page — branches are preview-only). Applies to content.md,
sitemap.md, and snapshots.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants