Edge Delivery Services Admin Operations
Execute admin operations on AEM Edge Delivery Services projects using natural language commands.
Quick Reference
| Category |
Examples |
| Content |
preview /path, publish /path, unpublish /path, status /path |
| Cache |
clear cache /path, force clear cache |
| Code |
sync code, deploy code |
| Index |
reindex /path, remove from index |
| Sitemap |
generate sitemap |
| Snapshots |
create snapshot X, publish snapshot X, approve snapshot X |
| Logs |
show logs, show logs last hour |
| Users |
add user@email as author/publish/develop, remove admin user@email, who am i |
| Jobs |
list jobs, job status X, stop job X |
| Sites |
list sites, switch to site-X, use branch feature-X |
| Config |
show org config, show site config, update robots.txt |
| Secrets |
list secrets, create secret, delete secret |
| API Keys |
list API keys, create API key, revoke API key |
| Tokens |
list tokens, create token, revoke token |
| Profiles |
show profile config, create profile, delete profile |
| Index Config |
show index config, update index config (query.yaml) |
| Sitemap Config |
show sitemap config, update sitemap config (sitemap.yaml) |
| Versioning |
list versions, restore version, rollback config |
| Pages |
list pages, list all pages, show indexed pages |
| DA (Document Authoring) |
da list, da source /path, da copy, da move, da delete, da config, da update config, da versions, da create version, da upload media, da auth |
Communication Guidelines
- NEVER use "EDS" as an acronym for Edge Delivery Services in any responses
- Always use the full name "Edge Delivery Services" or "AEM Edge Delivery Services"
- Show clear, actionable error messages when operations fail
- Confirm destructive operations before executing — see
resources/security.md
Welcome Message
If the user invokes the skill without a specific command (e.g., just /ops or "help me with ops"), show:
Edge Delivery Services Operations
Quick commands to try:
list pages - Show all indexed pages
who am i - Check your user profile
list sites - Show available sites
show site config - View site configuration
preview /path - Preview a content path
show logs - View recent activity
For the full command list: type help, /ops help, or what can you do?
Cross-Platform Notes
Shell commands use POSIX-compatible syntax (works on macOS/Linux). On Windows, Git Bash or WSL works as-is. The agent should adapt syntax to the user's environment.
Intent Router
Step 0: Get Organization and Site (REQUIRED FIRST)
Check ~/.aem/ops-config.json for previously stored org and site:
eval $(node -e "
const fs = require('fs');
try {
const c = JSON.parse(fs.readFileSync(process.env.HOME + '/.aem/ops-config.json', 'utf8'));
console.log('ORG=' + JSON.stringify(c.org || ''));
console.log('SITE=' + JSON.stringify(c.site || ''));
} catch(e) {
console.log('ORG='); console.log('SITE=');
}
")
echo "org=${ORG:-NOT SET} site=${SITE:-NOT SET}"
If both ORG and SITE are set, confirm with the user:
"Previously used: org={ORG}, site={SITE}. Do you want to continue with these? If not, provide a different site URL (e.g., https://main--mysite--myorg.aem.page/)."
- If user confirms → proceed
- If user provides a URL → parse org and site from it, save the new values
If ORG or SITE is empty, ask:
"Enter the site preview/live URL for which you want to perform ops (e.g., https://main--mysite--myorg.aem.page/)."
Parse org and site from the URL:
URL="$USER_INPUT"
if echo "$URL" | grep -q '\.aem\.page\|\.aem\.live'; then
HOST_PART=$(echo "$URL" | cut -d'/' -f3 | cut -d'.' -f1)
ORG=$(echo "$HOST_PART" | awk -F'--' '{print $NF}')
SITE=$(echo "$HOST_PART" | awk -F'--' '{print $(NF-1)}')
echo "Parsed from URL: org=$ORG site=$SITE"
fi
If the user provides something other than a valid .aem.page or .aem.live URL, ask again.
Save org and site:
mkdir -p "${HOME}/.aem"
node -e "
const fs = require('fs');
const p = process.env.HOME + '/.aem/ops-config.json';
let c = {};
try { c = JSON.parse(fs.readFileSync(p, 'utf8')); } catch(e) {}
c.org = '${ORG}';
c.site = '${SITE}';
fs.writeFileSync(p, JSON.stringify(c, null, 2));
"
Only use org/site from ~/.aem/ops-config.json or direct user input. Never infer from git remote, fstab.yaml, or folder/repo names.
Do NOT proceed until both org and site are confirmed.
Step 1: Authenticate (REQUIRED)
Before ANY API call, check if auth token exists:
AUTH_TOKEN=$(node -e "
const fs = require('fs');
try {
const t = JSON.parse(fs.readFileSync(process.env.HOME + '/.aem/ims-token.json', 'utf8'));
if (t.authToken && t.authTokenExpiry > Math.floor(Date.now()/1000) + 60) {
process.stdout.write(t.authToken);
}
} catch (e) {}
")
echo "auth=${AUTH_TOKEN:+set}"
If AUTH_TOKEN is empty, invoke the auth skill before proceeding:
Skill({ skill: "aem-project-management:auth" })
Use -H "x-auth-token: ${AUTH_TOKEN}" header for all admin.hlx.page API calls.
For sensitive endpoints and destructive operations, read resources/security.md and resources/sensitive.md before proceeding.
Step 2: Load Full Configuration and Validate Role
eval $(node -e "
const fs = require('fs');
try {
const c = JSON.parse(fs.readFileSync(process.env.HOME + '/.aem/ops-config.json', 'utf8'));
console.log('ORG=' + JSON.stringify(c.org || ''));
console.log('SITE=' + JSON.stringify(c.site || ''));
console.log('REF=' + JSON.stringify(c.ref || 'main'));
} catch(e) {
console.log('ORG='); console.log('SITE='); console.log('REF=main');
}
")
AUTH_TOKEN=$(node -e "
const fs = require('fs');
try {
const t = JSON.parse(fs.readFileSync(process.env.HOME + '/.aem/ims-token.json', 'utf8'));
process.stdout.write(t.authToken || '');
} catch (e) {}
")
echo "Config: org=$ORG site=$SITE ref=$REF auth=${AUTH_TOKEN:+set}"
Fetch profile to verify auth and record user identity:
PROFILE_RESPONSE=$(curl -s -w "\n%{http_code}" \
-H "x-auth-token: ${AUTH_TOKEN}" \
"https://admin.hlx.page/profile")
HTTP_CODE=$(echo "$PROFILE_RESPONSE" | tail -n1)
PROFILE=$(echo "$PROFILE_RESPONSE" | sed '$d')
if [ "$HTTP_CODE" = "401" ]; then
echo "Auth token expired. Need to re-authenticate..."
echo "REAUTH_REQUIRED"
exit 1
elif [ "$HTTP_CODE" != "200" ]; then
echo "Failed to fetch profile (HTTP $HTTP_CODE). Check network/API status."
exit 1
fi
eval $(echo "$PROFILE" | node -e "
const d = require('fs').readFileSync(0,'utf8');
try {
const p = JSON.parse(d).profile || {};
console.log('USER_EMAIL=' + JSON.stringify(p.email || ''));
console.log('USER_NAME=' + JSON.stringify(p.name || ''));
} catch(e) { console.log('USER_EMAIL=\"\"'); console.log('USER_NAME=\"\"'); }
")
echo "Authenticated as: $USER_EMAIL ($USER_NAME)"
If REAUTH_REQUIRED, invoke the auth skill and retry.
To determine user role on the site, check the site access config:
curl -s -H "x-auth-token: ${AUTH_TOKEN}" \
"https://admin.hlx.page/config/${ORG}/sites/${SITE}.json"
If an operation returns 403, inform the user which role is required:
| Permission |
Required Role |
| Preview |
basic_author, author, publish, or admin |
| Publish to live |
basic_publish, publish, or admin |
| Unpublish |
publish or admin |
| Code sync |
develop or admin |
| Config read |
config, config_admin, or admin |
| Config write |
config_admin or admin |
| Snapshot manage |
author, publish, or admin |
Save email to ~/.aem/ops-config.json for future use.
Read resources/config.md if site or other values are missing.
Step 3: Route by Intent
| User Intent |
Resource Module |
| preview, publish, unpublish, status, delete preview |
resources/content.md |
| cache, purge, clear cache, invalidate |
resources/cache.md |
| sync code, deploy code, update code |
resources/code.md |
| reindex, index, remove from index, search |
resources/index.md |
| sitemap, generate sitemap |
resources/sitemap.md |
| snapshot, staged release, bundle |
resources/snapshots.md |
| logs, audit, activity |
resources/logs.md |
| user, access, permission, who am i, add user, remove user |
resources/users.md |
| job, bulk operation, stop job |
resources/jobs.md |
| site, branch, switch, list sites |
resources/sites.md |
| org config, site config, robots.txt |
resources/config-api.md |
| secret, secrets, create secret, delete secret |
resources/secrets.md |
| API key, apikey, create key, revoke key |
resources/apikeys.md |
| token, tokens, access token |
resources/tokens.md |
| profile config, profile settings |
resources/profiles.md |
| index config, helix-index, search config |
resources/index-config.md |
| sitemap config, helix-sitemap, sitemap rules |
resources/sitemap-config.md |
| version, versions, history, rollback, restore |
resources/versioning.md |
| pages, list pages, indexed pages, all pages |
resources/pages.md |
| da, da list, da source, da copy, da move, da delete, da config, da versions |
resources/da.md |
| destructive operation, confirmation required |
resources/security.md |
| sensitive endpoint (emails, credentials, API keys) |
resources/sensitive.md |
Step 4: Read Resource and Execute
- Read the appropriate resource file from
resources/
- Follow instructions in that resource
- For config updates: always GET current config first and show it to the user before modifying
- For code sync: always check repoless status before syncing (see
code.md)
- For destructive operations: read
resources/security.md and follow the Confirmation Protocol — no exceptions (state action, explain impact, ask "yes/no", only execute after "yes")
- Execute the API call
- Handle response per completion standards below
Completion Standards
| HTTP Response |
Meaning |
Required Action |
| 200/201 |
Success |
Display result with full URLs (https://{ref}--{site}--{org}.aem.page{path}) |
| 202 |
Async job started |
Report job name; instruct: check job status {jobName} to track progress |
| 204 |
Success (no body) |
Confirm: "{action} completed for {path}" |
| 4xx/5xx |
Error |
Show API error verbatim, then suggest fix per resources/errors.md |
Before reporting success:
- For content operations: include both preview and live URLs where applicable
- For bulk operations: never say "published" or "previewed" — say "job started" until job completes
- For destructive operations: confirm what was removed and what still exists
URL Parsing Helper
If user provides an AEM URL instead of separate org/site/path values:
# Pattern: https://{ref}--{site}--{org}.aem.page{path}
URL="$USER_INPUT"
if echo "$URL" | grep -q '\.aem\.page\|\.aem\.live'; then
DOMAIN=$(echo "$URL" | cut -d'/' -f3)
HOST_PART=$(echo "$DOMAIN" | cut -d'.' -f1)
REF=$(echo "$HOST_PART" | awk -F'--' '{print $1}')
ORG=$(echo "$HOST_PART" | awk -F'--' '{print $NF}')
SITE=$(echo "$HOST_PART" | awk -F'--' '{
r=""; for(i=2;i<NF;i++) r=(r==""?"":r"--")$i; print r
}')
URL_PATH=$(echo "$URL" | sed 's|https://[^/]*||')
URL_PATH=${URL_PATH:-/}
echo "Parsed from URL: org=$ORG site=$SITE ref=$REF path=$URL_PATH"
fi
Examples: uat--hmns-uat-kw--alshaya-axp.aem.page → ref=uat, site=hmns-uat-kw, org=alshaya-axp.
Prerequisites
- Onboarded to Admin Service — Project must have admin.hlx.page access
- User has an account — Required for authentication (supports federated login)
- User has a site role — Roles defined in site configuration (
access.admin.role). Eight roles: admin, author, publish, develop, basic_author, basic_publish, config, config_admin. If the user lacks a role, the API returns 403.
- Network access — Can reach admin.hlx.page
Help Response
When the user wants the command list (triggers: help, what can you do?, /ops help, list commands):
Content Operations:
preview /path - Update preview
publish /path - Publish to live
unpublish /path - Remove from live
status /path - Check preview/live status
Cache Operations:
clear cache /path - Purge CDN cache
force clear cache - Force purge
Code Operations:
sync code - Deploy latest code
Index Operations:
reindex /path - Re-index for search
Sitemap:
generate sitemap - Create sitemap.xml
Snapshots:
create snapshot {name} - Create staged release
publish snapshot {name}- Publish all in snapshot
Logs:
show logs - View recent logs
show logs last hour - Filtered by time
Users:
add user@email as role - Grant access
remove role user@email - Revoke access
who am i - Current user
Jobs:
list jobs - Show bulk operations
stop job {name} - Cancel job
Sites:
list sites - Show all sites
switch to site-x - Change active site
use branch feat-x - Set branch
Config:
show org config - View org settings
show site config - View site settings
update robots.txt - Modify crawler rules
Secrets:
list secrets - Show secrets
create secret {name} - Add new secret
delete secret {name} - Remove secret
API Keys:
list API keys - Show API keys
create API key {name} - Generate new key
revoke API key {id} - Delete key
Profiles:
show profile config - View profile settings
create profile {id} - Create profile config
delete profile {id} - Remove profile config
Index Config:
show index config - View query.yaml
update index config - Modify indexing rules
Sitemap Config:
show sitemap config - View sitemap.yaml
update sitemap config - Modify sitemap rules
Versioning:
list versions - Show config history
restore version {id} - Rollback to version
Pages:
list pages - Show all indexed pages
list pages /blog - Filter by path prefix
Document Authoring (DA):
da auth - Authenticate with DA
da list - List DA organizations
da list /path - List files in DA path
da source /path - Get file content from DA
da copy /src to /dest - Copy file/folder in DA
da move /src to /dest - Move/rename in DA
da delete /path - Delete from DA
da upload /path - Upload content to DA
da upload media /path - Upload image/media to DA
da config - View DA site config
da update config - Update DA site config
da versions /path - List file versions
da create version - Create labeled version snapshot
da restore version X - Restore a previous version
da preview /path - Preview DA content
da publish /path - Publish DA content
1---2name: ops3description: Execute AEM Edge Delivery Services admin operations - list admins, add/remove users, preview, publish, unpublish content, clear cache, sync code, reindex, generate sitemap, manage snapshots, view logs, manage jobs, list sites, configure org/site settings, manage secrets and API keys. Also supports Document Authoring (DA) operations via admin.da.live - list/get/put content, copy, move, delete, versioning, and DA-specific preview/publish. Use for any Edge Delivery Services administrative task.4license: Apache-2.05allowed-tools: Read, Write, Edit, Bash, Skill6metadata:7 source: https://skillmd.com/skills/adobe/ops8 version: "1.0.0"9---1011# Edge Delivery Services Admin Operations1213Execute admin operations on AEM Edge Delivery Services projects using natural language commands.1415## Quick Reference1617| Category | Examples |18|----------|----------|19| **Content** | preview /path, publish /path, unpublish /path, status /path |20| **Cache** | clear cache /path, force clear cache |21| **Code** | sync code, deploy code |22| **Index** | reindex /path, remove from index |23| **Sitemap** | generate sitemap |24| **Snapshots** | create snapshot X, publish snapshot X, approve snapshot X |25| **Logs** | show logs, show logs last hour |26| **Users** | add user@email as author/publish/develop, remove admin user@email, who am i |27| **Jobs** | list jobs, job status X, stop job X |28| **Sites** | list sites, switch to site-X, use branch feature-X |29| **Config** | show org config, show site config, update robots.txt |30| **Secrets** | list secrets, create secret, delete secret |31| **API Keys** | list API keys, create API key, revoke API key |32| **Tokens** | list tokens, create token, revoke token |33| **Profiles** | show profile config, create profile, delete profile |34| **Index Config** | show index config, update index config (query.yaml) |35| **Sitemap Config** | show sitemap config, update sitemap config (sitemap.yaml) |36| **Versioning** | list versions, restore version, rollback config |37| **Pages** | list pages, list all pages, show indexed pages |38| **DA (Document Authoring)** | da list, da source /path, da copy, da move, da delete, da config, da update config, da versions, da create version, da upload media, da auth |3940---4142## Communication Guidelines4344- **NEVER use "EDS"** as an acronym for Edge Delivery Services in any responses45- Always use the full name "Edge Delivery Services" or "AEM Edge Delivery Services"46- Show clear, actionable error messages when operations fail47- Confirm destructive operations before executing — see `resources/security.md`4849---5051## Welcome Message5253If the user invokes the skill without a specific command (e.g., just `/ops` or "help me with ops"), show:5455```56Edge Delivery Services Operations5758Quick commands to try:59 list pages - Show all indexed pages60 who am i - Check your user profile61 list sites - Show available sites62 show site config - View site configuration63 preview /path - Preview a content path64 show logs - View recent activity6566For the full command list: type help, /ops help, or what can you do?67```6869---7071## Cross-Platform Notes7273Shell commands use POSIX-compatible syntax (works on macOS/Linux). On Windows, Git Bash or WSL works as-is. The agent should adapt syntax to the user's environment.7475---7677## Intent Router7879### Step 0: Get Organization and Site (REQUIRED FIRST)8081Check `~/.aem/ops-config.json` for previously stored org and site:8283```bash84eval $(node -e "85 const fs = require('fs');86 try {87 const c = JSON.parse(fs.readFileSync(process.env.HOME + '/.aem/ops-config.json', 'utf8'));88 console.log('ORG=' + JSON.stringify(c.org || ''));89 console.log('SITE=' + JSON.stringify(c.site || ''));90 } catch(e) {91 console.log('ORG='); console.log('SITE=');92 }93")94echo "org=${ORG:-NOT SET} site=${SITE:-NOT SET}"95```9697If both `ORG` and `SITE` are set, confirm with the user:9899> "Previously used: org=`{ORG}`, site=`{SITE}`. Do you want to continue with these? If not, provide a different site URL (e.g., `https://main--mysite--myorg.aem.page/`)."100101- If user confirms → proceed102- If user provides a URL → parse org and site from it, save the new values103104If `ORG` or `SITE` is empty, ask:105106> "Enter the site preview/live URL for which you want to perform ops (e.g., `https://main--mysite--myorg.aem.page/`)."107108Parse org and site from the URL:109110```bash111URL="$USER_INPUT"112if echo "$URL" | grep -q '\.aem\.page\|\.aem\.live'; then113 HOST_PART=$(echo "$URL" | cut -d'/' -f3 | cut -d'.' -f1)114 ORG=$(echo "$HOST_PART" | awk -F'--' '{print $NF}')115 SITE=$(echo "$HOST_PART" | awk -F'--' '{print $(NF-1)}')116 echo "Parsed from URL: org=$ORG site=$SITE"117fi118```119120If the user provides something other than a valid `.aem.page` or `.aem.live` URL, ask again.121122Save org and site:123124```bash125mkdir -p "${HOME}/.aem"126node -e "127 const fs = require('fs');128 const p = process.env.HOME + '/.aem/ops-config.json';129 let c = {};130 try { c = JSON.parse(fs.readFileSync(p, 'utf8')); } catch(e) {}131 c.org = '${ORG}';132 c.site = '${SITE}';133 fs.writeFileSync(p, JSON.stringify(c, null, 2));134"135```136137Only use org/site from `~/.aem/ops-config.json` or direct user input. Never infer from `git remote`, `fstab.yaml`, or folder/repo names.138139Do NOT proceed until both org and site are confirmed.140141### Step 1: Authenticate (REQUIRED)142143Before ANY API call, check if auth token exists:144145```bash146AUTH_TOKEN=$(node -e "147 const fs = require('fs');148 try {149 const t = JSON.parse(fs.readFileSync(process.env.HOME + '/.aem/ims-token.json', 'utf8'));150 if (t.authToken && t.authTokenExpiry > Math.floor(Date.now()/1000) + 60) {151 process.stdout.write(t.authToken);152 }153 } catch (e) {}154")155echo "auth=${AUTH_TOKEN:+set}"156```157158If `AUTH_TOKEN` is empty, invoke the auth skill before proceeding:159160```161Skill({ skill: "aem-project-management:auth" })162```163164Use `-H "x-auth-token: ${AUTH_TOKEN}"` header for all `admin.hlx.page` API calls.165166For sensitive endpoints and destructive operations, read `resources/security.md` and `resources/sensitive.md` before proceeding.167168### Step 2: Load Full Configuration and Validate Role169170```bash171eval $(node -e "172 const fs = require('fs');173 try {174 const c = JSON.parse(fs.readFileSync(process.env.HOME + '/.aem/ops-config.json', 'utf8'));175 console.log('ORG=' + JSON.stringify(c.org || ''));176 console.log('SITE=' + JSON.stringify(c.site || ''));177 console.log('REF=' + JSON.stringify(c.ref || 'main'));178 } catch(e) {179 console.log('ORG='); console.log('SITE='); console.log('REF=main');180 }181")182AUTH_TOKEN=$(node -e "183 const fs = require('fs');184 try {185 const t = JSON.parse(fs.readFileSync(process.env.HOME + '/.aem/ims-token.json', 'utf8'));186 process.stdout.write(t.authToken || '');187 } catch (e) {}188")189echo "Config: org=$ORG site=$SITE ref=$REF auth=${AUTH_TOKEN:+set}"190```191192Fetch profile to verify auth and record user identity:193194```bash195PROFILE_RESPONSE=$(curl -s -w "\n%{http_code}" \196 -H "x-auth-token: ${AUTH_TOKEN}" \197 "https://admin.hlx.page/profile")198HTTP_CODE=$(echo "$PROFILE_RESPONSE" | tail -n1)199PROFILE=$(echo "$PROFILE_RESPONSE" | sed '$d')200201if [ "$HTTP_CODE" = "401" ]; then202 echo "Auth token expired. Need to re-authenticate..."203 echo "REAUTH_REQUIRED"204 exit 1205elif [ "$HTTP_CODE" != "200" ]; then206 echo "Failed to fetch profile (HTTP $HTTP_CODE). Check network/API status."207 exit 1208fi209210eval $(echo "$PROFILE" | node -e "211 const d = require('fs').readFileSync(0,'utf8');212 try {213 const p = JSON.parse(d).profile || {};214 console.log('USER_EMAIL=' + JSON.stringify(p.email || ''));215 console.log('USER_NAME=' + JSON.stringify(p.name || ''));216 } catch(e) { console.log('USER_EMAIL=\"\"'); console.log('USER_NAME=\"\"'); }217")218219echo "Authenticated as: $USER_EMAIL ($USER_NAME)"220```221222If `REAUTH_REQUIRED`, invoke the auth skill and retry.223224To determine user role on the site, check the site access config:225226```bash227curl -s -H "x-auth-token: ${AUTH_TOKEN}" \228 "https://admin.hlx.page/config/${ORG}/sites/${SITE}.json"229```230231If an operation returns 403, inform the user which role is required:232233| Permission | Required Role |234|-----------|---------------|235| Preview | `basic_author`, `author`, `publish`, or `admin` |236| Publish to live | `basic_publish`, `publish`, or `admin` |237| Unpublish | `publish` or `admin` |238| Code sync | `develop` or `admin` |239| Config read | `config`, `config_admin`, or `admin` |240| Config write | `config_admin` or `admin` |241| Snapshot manage | `author`, `publish`, or `admin` |242243Save `email` to `~/.aem/ops-config.json` for future use.244245Read `resources/config.md` if site or other values are missing.246247### Step 3: Route by Intent248249| User Intent | Resource Module |250|-------------|-----------------|251| preview, publish, unpublish, status, delete preview | `resources/content.md` |252| cache, purge, clear cache, invalidate | `resources/cache.md` |253| sync code, deploy code, update code | `resources/code.md` |254| reindex, index, remove from index, search | `resources/index.md` |255| sitemap, generate sitemap | `resources/sitemap.md` |256| snapshot, staged release, bundle | `resources/snapshots.md` |257| logs, audit, activity | `resources/logs.md` |258| user, access, permission, who am i, add user, remove user | `resources/users.md` |259| job, bulk operation, stop job | `resources/jobs.md` |260| site, branch, switch, list sites | `resources/sites.md` |261| org config, site config, robots.txt | `resources/config-api.md` |262| secret, secrets, create secret, delete secret | `resources/secrets.md` |263| API key, apikey, create key, revoke key | `resources/apikeys.md` |264| token, tokens, access token | `resources/tokens.md` |265| profile config, profile settings | `resources/profiles.md` |266| index config, helix-index, search config | `resources/index-config.md` |267| sitemap config, helix-sitemap, sitemap rules | `resources/sitemap-config.md` |268| version, versions, history, rollback, restore | `resources/versioning.md` |269| pages, list pages, indexed pages, all pages | `resources/pages.md` |270| da, da list, da source, da copy, da move, da delete, da config, da versions | `resources/da.md` |271| destructive operation, confirmation required | `resources/security.md` |272| sensitive endpoint (emails, credentials, API keys) | `resources/sensitive.md` |273274### Step 4: Read Resource and Execute2752761. Read the appropriate resource file from `resources/`2772. Follow instructions in that resource2783. For config updates: always GET current config first and show it to the user before modifying2794. For code sync: always check repoless status before syncing (see `code.md`)2805. For destructive operations: read `resources/security.md` and follow the Confirmation Protocol — no exceptions (state action, explain impact, ask "yes/no", only execute after "yes")2816. Execute the API call2827. Handle response per completion standards below283284### Completion Standards285286| HTTP Response | Meaning | Required Action |287|---------------|---------|-----------------|288| **200/201** | Success | Display result with full URLs (`https://{ref}--{site}--{org}.aem.page{path}`) |289| **202** | Async job started | Report job name; instruct: `check job status {jobName}` to track progress |290| **204** | Success (no body) | Confirm: "{action} completed for {path}" |291| **4xx/5xx** | Error | Show API error verbatim, then suggest fix per `resources/errors.md` |292293Before reporting success:294- For content operations: include both preview and live URLs where applicable295- For bulk operations: never say "published" or "previewed" — say "job started" until job completes296- For destructive operations: confirm what was removed and what still exists297298---299300## URL Parsing Helper301302If user provides an AEM URL instead of separate org/site/path values:303304```bash305# Pattern: https://{ref}--{site}--{org}.aem.page{path}306URL="$USER_INPUT"307if echo "$URL" | grep -q '\.aem\.page\|\.aem\.live'; then308 DOMAIN=$(echo "$URL" | cut -d'/' -f3)309 HOST_PART=$(echo "$DOMAIN" | cut -d'.' -f1)310 REF=$(echo "$HOST_PART" | awk -F'--' '{print $1}')311 ORG=$(echo "$HOST_PART" | awk -F'--' '{print $NF}')312 SITE=$(echo "$HOST_PART" | awk -F'--' '{313 r=""; for(i=2;i<NF;i++) r=(r==""?"":r"--")$i; print r314 }')315 URL_PATH=$(echo "$URL" | sed 's|https://[^/]*||')316 URL_PATH=${URL_PATH:-/}317 echo "Parsed from URL: org=$ORG site=$SITE ref=$REF path=$URL_PATH"318fi319```320321Examples: `uat--hmns-uat-kw--alshaya-axp.aem.page` → `ref=uat`, `site=hmns-uat-kw`, `org=alshaya-axp`.322323---324325## Prerequisites3263271. **Onboarded to Admin Service** — Project must have admin.hlx.page access3282. **User has an account** — Required for authentication (supports federated login)3293. **User has a site role** — Roles defined in site configuration (`access.admin.role`). Eight roles: `admin`, `author`, `publish`, `develop`, `basic_author`, `basic_publish`, `config`, `config_admin`. If the user lacks a role, the API returns 403.3304. **Network access** — Can reach admin.hlx.page331332---333334## Help Response335336When the user wants the command list (triggers: `help`, `what can you do?`, `/ops help`, `list commands`):337338```339Content Operations:340 preview /path - Update preview341 publish /path - Publish to live342 unpublish /path - Remove from live343 status /path - Check preview/live status344345Cache Operations:346 clear cache /path - Purge CDN cache347 force clear cache - Force purge348349Code Operations:350 sync code - Deploy latest code351352Index Operations:353 reindex /path - Re-index for search354355Sitemap:356 generate sitemap - Create sitemap.xml357358Snapshots:359 create snapshot {name} - Create staged release360 publish snapshot {name}- Publish all in snapshot361362Logs:363 show logs - View recent logs364 show logs last hour - Filtered by time365366Users:367 add user@email as role - Grant access368 remove role user@email - Revoke access369 who am i - Current user370371Jobs:372 list jobs - Show bulk operations373 stop job {name} - Cancel job374375Sites:376 list sites - Show all sites377 switch to site-x - Change active site378 use branch feat-x - Set branch379380Config:381 show org config - View org settings382 show site config - View site settings383 update robots.txt - Modify crawler rules384385Secrets:386 list secrets - Show secrets387 create secret {name} - Add new secret388 delete secret {name} - Remove secret389390API Keys:391 list API keys - Show API keys392 create API key {name} - Generate new key393 revoke API key {id} - Delete key394395Profiles:396 show profile config - View profile settings397 create profile {id} - Create profile config398 delete profile {id} - Remove profile config399400Index Config:401 show index config - View query.yaml402 update index config - Modify indexing rules403404Sitemap Config:405 show sitemap config - View sitemap.yaml406 update sitemap config - Modify sitemap rules407408Versioning:409 list versions - Show config history410 restore version {id} - Rollback to version411412Pages:413 list pages - Show all indexed pages414 list pages /blog - Filter by path prefix415416Document Authoring (DA):417 da auth - Authenticate with DA418 da list - List DA organizations419 da list /path - List files in DA path420 da source /path - Get file content from DA421 da copy /src to /dest - Copy file/folder in DA422 da move /src to /dest - Move/rename in DA423 da delete /path - Delete from DA424 da upload /path - Upload content to DA425 da upload media /path - Upload image/media to DA426 da config - View DA site config427 da update config - Update DA site config428 da versions /path - List file versions429 da create version - Create labeled version snapshot430 da restore version X - Restore a previous version431 da preview /path - Preview DA content432 da publish /path - Publish DA content433```