### Start Local Development Server with AEM CLI Source: https://www.aem.live/developer/tutorial Navigates into the project directory and starts the local AEM development environment. This command opens the project at http://localhost:3000/. ```bash cd aem up ``` -------------------------------- ### Install AEM CLI for Local Development Source: https://www.aem.live/docs/faq Installs the AEM CLI globally and starts a local server for Edge Delivery Services development. This setup allows for real-time code updates and uses production content for accurate previews. ```bash npm install -g @adobe/aem-cli && aem up ``` -------------------------------- ### Bulk Operations Examples Source: https://www.aem.live/docs/admin.html Provides examples for bulk operations like publishing and previewing multiple files. ```APIDOC ## Bulk Operations Examples ### Description Examples demonstrating how to perform bulk operations. ### Request Example #### Bulk Publish Payload ```json { "forceUpdate": true, "paths": [ "/en", "/metadata.json", "/blog/" ], "delete": false } ``` ### Request Example #### Bulk Preview Payload ```json { "forceUpdate": true, "paths": [ "/en", "/en/*", "/metadata.json", "/blog/" ], "delete": false } ``` ``` -------------------------------- ### List Profile Config API Call Example Source: https://www.aem.live/docs/admin.html Example of an API call to retrieve configuration profile names. It includes parameters for organization and optional detailed information. ```http GET /path?org=string&details=boolean Content-Type: application/json Authorization: _AuthCookie_ ``` -------------------------------- ### Install AEM CLI and Clone Repository Source: https://www.aem.live/developer/tutorial Installs the AEM Command Line Interface globally and clones the project repository. Requires Node.js and npm to be installed. ```bash npm install -g @adobe/aem-cli git clone https://github.com// ``` -------------------------------- ### Profile Configuration Example Source: https://www.aem.live/docs/admin.html Defines a list of profiles, where each profile has a name. This is typically used for organizing or categorizing configurations. ```json { "profiles": [ { "name": "string" } ] } ``` -------------------------------- ### Bulk Publish Job Payload Example Source: https://www.aem.live/docs/admin.html An example payload for initiating a bulk publish job, specifying multiple paths to be updated. Configuration files are ignored, and the operation is asynchronous. ```json { "paths": [ { "path": "/en" }, { "path": "/blog/" }, { "path": "/metadata.json" } ] } ``` -------------------------------- ### Index Configuration Schema Example Source: https://www.aem.live/docs/admin.html Provides an example of the IndexConfig schema, including version and indices. The indices object can contain multiple index definitions with include, exclude, target, and properties. ```JSON { "version": 1, "indices": { } } ``` -------------------------------- ### Content Configuration Example (Google) Source: https://www.aem.live/docs/admin.html This JSON object illustrates the configuration for integrating with Google Drive as a content source. It includes a content bus ID, source type ('google'), and the Google Drive URL. It also supports an optional overlay for previewing content from an alternative source. ```json { "title": "string", "description": "string", "contentBusId": "string", "source": { "type": "google", "url": "string", "id": "string", "overlay": { "type": "any", "url": "string" } } } ``` -------------------------------- ### Job Status Response Sample Source: https://www.aem.live/docs/admin.html Example JSON response for a successful job status request. It provides the job's topic, name, state, start time, progress status, and related links. ```json { "topic": "preview", "name": "job-123", "state": "created", "startTime": "2021-05-31T23:00:00Z", "progress": { "total": 10, "processed": 0, "failed": 0 }, "links": { "self": "https://admin.hlx.page/job/adobe/blog/main/preview/job-123", "details": "https://admin.hlx.page/job/adobe/blog/main/preview/job-123/details", "list": "https://admin.hlx.page/job/adobe/blog/main/preview" } } ``` -------------------------------- ### Configure Sidekick Plugin in config.json Source: https://www.aem.live/docs/sidekick-library Sets up the Sidekick library to appear in the Sidekick by defining a configuration file at `tools/sidekick/config.json`. This example includes a 'library' plugin with specific environments and include paths. ```json { "project": "Example", "plugins": [ { "id": "library", "title": "Library", "environments": ["edit"], "url": "/tools/sidekick/library.html", "includePaths": ["**.docx**"] } ] } ``` -------------------------------- ### Get Snapshot Status - Response Sample Source: https://www.aem.live/docs/admin.html Provides an example of the successful response when retrieving the status of a snapshot. It includes webPath, resourcePath, preview status and details, snapshot information, and various links for accessing related API endpoints. ```json { "webPath": "/.snapshot/12345/en/2021/blog", "resourcePath": "/.snapshot/12345/en/2021/blog.md", "preview": { "status": 200, "url": "https://main--repo--owner.hlx.page/.snapshot/12345/en/2021/blog", "lastModified": "2021-05-31T23:00:00Z", "contentBusId": "h3-theblog-123ab123ab12ab123a12b3a/.snapshot/12345/preview/en/2021/blog.md", "permissions": [ "read", "write" ] }, "snapshot": { "id": "12345", "locked": "2021-05-31T23:00:00Z" }, "links": { "status": "https://admin.hlx.page/status/adobe/blog/main/blog", "preview": "https://admin.hlx.page/preview/adobe/blog/main/blog", "live": "https://admin.hlx.page/live/adobe/blog/main/blog", "code": "https://admin.hlx.page/code/adobe/blog/main/blog" } } ``` -------------------------------- ### Start Bulk Preview Job - API Reference Source: https://www.aem.live/docs/admin.html Initiates a bulk preview job for specified resources. Supports recursive folder preview and optional force updates. Configuration files are ignored. The operation is asynchronous and returns job details upon scheduling. Requires organization, site, and ref. ```http POST /preview/{org}/{site}/{ref}/* HTTP/1.1 Host: admin.hlx.page Content-Type: application/json { "forceUpdate": true, "paths": [ "/en", "/en/*", "/metadata.json", "/blog/" ], "delete": false } ``` -------------------------------- ### Access Profile Configuration Source: https://www.aem.live/docs/admin.html Provides example URLs for accessing and configuring profiles within an organization. These URLs are used for GET and POST requests to manage profile settings. ```HTTP POST /config/{org}/profiles/{profile}.json GET https://admin.hlx.page/config/{org}/profiles/{profile}.json ``` -------------------------------- ### Get Job Status API Source: https://www.aem.live/docs/admin.html Retrieves the status of a specific job, identified by its name, along with organizational, site, reference, and topic information. The response includes job details like topic, name, state, start time, progress, and links to related resources. ```json "/job/{org}/{site}/{ref}/{topic}/{jobName}": { "get": { "operationId": "getJob", "tags": [ "job" ], "summary": "Job Status", "description": "Returns the job status", "security": [ { "AuthCookie": [ "job:read" ] } ], "parameters": [ { "$ref": "#/components/parameters/orgParam" }, { "$ref": "#/components/parameters/siteParam" }, { "$ref": "#/components/parameters/refParam" }, { "$ref": "#/components/parameters/topicParam" }, { "$ref": "#/components/parameters/jobNameParam" } ], "responses": { "202": { "description": "The Job Status", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/jobStatus" }, { "$ref": "#/components/schemas/jobLinksInfo" } ] }, "examples": { "success": { "description": "Success response.", "value": { "topic": "preview", "name": "job-123", "state": "created", "startTime": "2021-05-31T23:00:00Z", "progress": { "total": 10, "processed": 0, "failed": 0 }, "links": { "self": "https://admin.hlx.page/job/adobe/blog/main/preview/job-123", "details": "https://admin.hlx.page/job/adobe/blog/main/preview/job-123/details", "list": "https://admin.hlx.page/job/adobe/blog/main/preview" } } } } } } }, "400": { "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, "403": { "$ref": "#/components/responses/403" }, "404": { "$ref": "#/components/responses/404" }, "429": { "$ref": "#/components/responses/429" } } } } ``` -------------------------------- ### Start Bulk Preview Job (POST /preview/{org}/{site}/{ref}/*) Source: https://www.aem.live/docs/admin.html Initiates a bulk preview job for multiple resources, including recursive previewing of folders. It allows for forced updates and ignores configuration files. The job runs asynchronously, and the response provides job creation details. ```openapi { "/preview/{org}/{site}/{ref}/*": { "post": { "operationId": "bulkPreview", "tags": [ "preview" ], "summary": "Start a bulk preview job", "description": "Updates preview resources specified in the `paths` property in the payload. If a path ends with `/*`, it is assume to be folder and is recursively previewed.
By default, only new and modified resources are updated, unless the `forceUpdate` property is set to `true`.
Note that configuration files, like `/.helix/config` or `redirects.json`, are always ignored during bulk preview.
Note that the bulk preview is performed asynchronously and this request will return information to the created job.\n", "security": [ { "AuthCookie": [ "edit:read", "edit:list", "preview:read", "preview:write" ] } ], "parameters": [ { "$ref": "#/components/parameters/orgParam" }, { "$ref": "#/components/parameters/siteParam" }, { "$ref": "#/components/parameters/refParam" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bulkPreviewBody" }, "examples": { "multiple-paths": { "$ref": "#/components/examples/bulk-preview-payload_example" } } } } }, "responses": { "202": { "description": "Bulk preview schedule" } } } } } ``` -------------------------------- ### Response Sample - Live Content Info (JSON) Source: https://www.aem.live/docs/admin.html Example JSON response showing live content details, including the live URL and code bus information. ```json [ { "live": { "url": "https://main--repo--owner.hlx.live/scripts.js" }, "code": { "status": 200, "lastModified": "2021-05-31T23:00:00Z", "codeBusId": "helix-code-bus/owner/repo/main/scripts.js", "permissions": [ "read", "write" ] } } ] ``` -------------------------------- ### POST /preview/{org}/{site}/{ref}/* Source: https://www.aem.live/docs/admin.html Starts a bulk preview job to update preview resources. It can recursively preview folders and optionally force updates or delete resources. ```APIDOC ## POST /preview/{org}/{site}/{ref}/* ### Description Starts a bulk preview job to update preview resources specified in the `paths` property in the payload. If a path ends with `/*`, it is assumed to be a folder and is recursively previewed. By default, only new and modified resources are updated, unless the `forceUpdate` property is set to `true`. Configuration files like `/.helix/config` or `redirects.json` are always ignored. ### Method POST ### Endpoint `/preview/{org}/{site}/{ref}/*` ### Parameters #### Path Parameters - **org** (string) - Required - Organisation name. - **site** (string) - Required - Site ID. - **ref** (string) - Required - Ref (branch) of the repository. #### Request Body - **forceUpdate** (boolean) - Optional - Forces an update of the resources during bulk-preview. - **forceAsync** (boolean) - Optional - Forces the job to be executed asynchronous, even for a small number of given paths. - **paths** (Array of strings) - Required - Paths to filter the bulk preview. - **delete** (boolean) - Optional - Default: false. Delete the resources from preview. ### Request Example ```json { "forceUpdate": true, "paths": [ "/en", "/en/*", "/metadata.json", "/blog/" ], "delete": false } ``` ### Responses #### Success Response (202) - Bulk preview scheduled. - Response body contains job information including status, message ID, and links. #### Response Example ```json { "status": 202, "messageId": "37e92eec-020c-4eae-8f80-3db444c25056", "job": { "topic": "preview", "name": "job-123", "state": "created", "startTime": "2021-05-31T23:00:00Z", "data": { "paths": [ "/documents" ] } }, "links": { "self": "https://admin.hlx.page/job/adobe/blog/main/preview/job-123", "list": "https://admin.hlx.page/job/adobe/blog/main/preview" } } ``` #### Error Responses - **400** - Invalid request URL. - **401** - Not authenticated. - **403** - Access role does not have the required permission. - **404** - Resource not found. - **429** - Rate limited by admin service. See https://www.aem.live/docs/limits#admin-api-limits - **500** - Operation failed due to an internal error. ``` -------------------------------- ### CDN Configuration Example (Fastly) Source: https://www.aem.live/docs/admin.html This JSON object shows a configuration for a production CDN using Fastly. It specifies the CDN type, production host, routes to be served by the Franklin service, the Fastly service ID, and an authentication token for purging. It also includes optional overrides for live and preview host configurations. ```json { "prod": { "type": "fastly", "host": "string", "route": [ "string" ], "serviceId": "string", "authToken": "string" }, "live": { "host": "main--$repo--page.example.com" }, "preview": { "host": "main--$repo--live.example.com" }, "review": { "host": "example.reviews" } } ``` -------------------------------- ### Change Event Example Source: https://www.aem.live/docs/admin.html An example of a change event payload, detailing modifications to files. ```APIDOC ## Change Event Example ### Description An example payload for a change event, illustrating file modifications. ### Request Example #### Multiple Files Event Example ```json { "type": "github", "baseRef": "", "installationId": 995843, "changes": [ { "path": "new-file.txt", "time": "2021-05-04T13:40:15+09:00", "type": "added", "contentType": "text/plain; charset=utf-8", "commit": "5edf98811d50b5b948f6f890f0c4367095490dbd" }, { "path": "src/html.htl", "time": "2021-05-04T13:40:15+09:00", "type": "modified", "contentType": "application/vnd.adobe.htl", "commit": "f8b7e6d5c4a3b2f1e0d9c8b7a6f5e4d3c2b1a0f9" } ] } ``` ``` -------------------------------- ### List Organization Config Versions Response Sample (JSON) Source: https://www.aem.live/docs/admin.html An example of a successful response (200 OK) for listing available versions of an organization's configuration. The JSON object includes the current version and a list of historical versions with their creation date and name. ```json { "current": 0, "versions": [ { "version": 0, "created": "2023-10-26T10:00:00Z", "name": "Initial configuration" } ] } ``` -------------------------------- ### Get Organization Config Version (GET) Source: https://www.aem.live/docs/admin.html Retrieves a specific version of the organization's configuration. Requires authentication and the version ID as a path parameter. Returns the configuration data for the specified version. ```http GET /config/{org}/versions/{id} Host: admin.hlx.page Authorization: _AuthCookie_ ``` -------------------------------- ### Enable Publish Confirmation Dialog Source: https://www.aem.live/developer/sidekick-development This example shows how to configure the 'publish' plugin to display a confirmation dialog before executing the publish action. This adds an extra layer of precaution for critical content. ```json { "plugins": [ { "id": "publish", "confirm": true } ] } ``` -------------------------------- ### Start Bulk Status Job (API Response) Source: https://www.aem.live/docs/admin.html Confirms the scheduling of a bulk status job. The response includes a status code, a message ID, and detailed information about the created job, such as its topic, name, state, start time, and associated links for monitoring. ```json { "status": 202, "messageId": "37e92eec-020c-4eae-8f80-3db444c25056", "job": { "topic": "status", "name": "job-123", "state": "created", "startTime": "2021-05-31T23:00:00Z", "data": { "paths": [ { "prefix": "/en/" }, { "path": "/en" }, { "path": "/blog/" } ] } }, "links": { "self": "https://admin.hlx.page/job/adobe/blog/main/status/job-123", "list": "https://admin.hlx.page/job/adobe/blog/main/status" } } ``` -------------------------------- ### Get Snapshot Status - API Endpoint Source: https://www.aem.live/docs/admin.html Shows the GET request to retrieve the status of a specific snapshot resource. Parameters include organization, site, snapshot ID, and the relative path of the resource. This helps in monitoring the snapshot's state and associated metadata. ```http GET https://admin.hlx.page/snapshot/{org}/{site}/main/{snapshotId}/{path} ``` -------------------------------- ### Access Control Configuration Example Source: https://www.aem.live/docs/admin.html This JSON object demonstrates the structure for configuring access control for different environments (admin, site, preview, live). It includes settings for role-based authentication, default roles, API key validation, and explicit allow lists for users or secrets. ```json { "admin": { "role": {}, "requireAuth": "auto", "defaultRole": [ "admin" ], "apiKeyId": [ "string" ] }, "site": { "allow": [ "string" ], "secretId": [ "^a$" ], "apiKeyId": [ "string" ] }, "preview": { "allow": [ "string" ], "secretId": [ "^a$" ], "apiKeyId": [ "string" ] }, "live": { "allow": [ "string" ], "secretId": [ "^a$" ], "apiKeyId": [ "string" ] } } ``` -------------------------------- ### Example: Omitting Metadata Values Source: https://www.aem.live/docs/bulk-metadata This example demonstrates how to explicitly remove metadata, such as the canonical link, for specific URL patterns by assigning an empty string as the value. This ensures the metadata element is removed unless overridden by page-level metadata. ```csv URL,Canonical /**,"" ``` -------------------------------- ### Sample Aggregated Site Configuration JSON Source: https://www.aem.live/docs/admin.html An example JSON response for the aggregated site configuration, illustrating various configuration options including content sources, CDN settings, access controls, sidekick plugins, and event configurations. ```json { "version": 1, "name": "^a(?:-a)*$", "title": "string", "description": "string", "created": "2019-08-24T14:15:22Z", "lastModified": "2019-08-24T14:15:22Z", "content": { "title": "string", "description": "string", "contentBusId": "string", "source": { "type": "google", "url": "http://example.com", "id": "string" }, "overlay": { "type": "markup", "url": "http://example.com", "suffix": "string" } }, "code": { "title": "string", "description": "string", "owner": "^a$", "repo": "^a$", "source": { "type": "github", "url": "http://example.com", "raw_url": "http://example.com", "secretId": "^a$", "owner": "^a$", "repo": "^a$" } }, "folders": { }, "headers": { }, "cdn": { "prod": { "type": "fastly", "host": "string", "route": [ "string" ], "serviceId": "string", "authToken": "string" }, "live": { "host": "main--$repo--page.example.com" }, "preview": { "host": "main--$repo--live.example.com" }, "review": { "host": "example.reviews" } }, "access": { "admin": { "role": { }, "requireAuth": "auto", "defaultRole": [ "admin" ], "apiKeyId": [ "string" ] }, "site": { "allow": [ "string" ], "secretId": [ "^a$" ], "apiKeyId": [ "string" ] }, "preview": { "allow": [ "string" ], "secretId": [ "^a$" ], "apiKeyId": [ "string" ] }, "live": { "allow": [ "string" ], "secretId": [ "^a$" ], "apiKeyId": [ "string" ] } }, "tokens": { }, "secrets": { }, "apiKeys": { }, "groups": { }, "sidekick": { "editUrlLabel": "string", "editUrlPattern": "string", "host": "example.com", "liveHost": "example.com", "plugins": [ { "badgeVariant": "gray", "containerId": "string", "environments": "any", "event": "string", "excludePaths": "/foo/**", "id": "string", "includePaths": "/foo/bar/**", "isBadge": true, "isContainer": true, "isPalette": true, "isPopover": true, "paletteRect": "top: 100px; right: 20px; width: 200px; height: 50vh", "passConfig": true, "passReferrer": true, "pinned": true, "popoverRect": "width: 400px; height: 300px", "title": "string", "titleI18n": { }, "url": "string" } ], "previewHost": "example.com", "project": "string", "reviewHost": "example.com", "specialViews": [ { "id": "string", "path": "/foo/**.json", "title": "string", "viewer": "/tools/sidekick/foo/index.html" } ], "trustedHosts": [ "string" ], "wordSaveDelay": 0 }, "metadata": { "source": [ "string" ] }, "robots": { "txt": "string" }, "public": { }, "events": { "github": { "target": "^a/a$" } }, "features": { }, "limits": { }, "extends": { "profile": "^0$" } } ``` -------------------------------- ### Get True Origin in iFrame Context Source: https://www.aem.live/docs/sidekick-library Provides a utility function to reliably get the true origin of the current page, even when running within an iframe using the `srcdoc` attribute. It checks if the page is loaded via `about:srcdoc` and returns the parent's origin if so. ```javascript /** * Returns the true origin of the current page in the browser. * If the page is running in a iframe with srcdoc, the ancestor origin is returned. * @returns {String} The true origin */ export function getOrigin() { const { location } = window; return location.href === 'about:srcdoc' ? window.parent.location.origin : location.origin; } ``` -------------------------------- ### Bulk File Operations Payload Examples Source: https://www.aem.live/docs/admin.html Examples for bulk file operations, including selecting files for status checks, publishing, and previewing. These payloads specify paths and update options. ```json { "example": { "summary": "fetch status of multiple files", "value": { "select": [ "edit", "preview", "live" ], "paths": [ "/en", "/en/*", "/blog/" ] } }, "bulk-publish-payload_example": { "summary": "publish multiple files", "value": { "forceUpdate": true, "paths": [ "/en", "/metadata.json", "/blog/" ], "delete": false } }, "bulk-preview-payload_example": { "summary": "preview multiple files", "value": { "forceUpdate": true, "paths": [ "/en", "/en/*", "/metadata.json", "/blog/" ], "delete": false } } } ``` -------------------------------- ### Site Configuration Payload Example (JSON) Source: https://www.aem.live/docs/admin.html This JSON object represents a sample payload for configuring AEM Live LLMs TXT sites. It includes versioning, site metadata, content sources, code repository details, CDN configurations, access controls, and sidekick settings. ```json { "version": 1, "name": "^a(?:-a)*$", "title": "string", "description": "string", "created": "2019-08-24T14:15:22Z", "lastModified": "2019-08-24T14:15:22Z", "content": { "title": "string", "description": "string", "contentBusId": "string", "source": { "type": "google", "url": "http://example.com", "id": "string" }, "overlay": { "type": "markup", "url": "http://example.com", "suffix": "string" } }, "code": { "title": "string", "description": "string", "owner": "^a$", "repo": "^a$", "source": { "type": "github", "url": "http://example.com", "raw_url": "http://example.com", "secretId": "^a$", "owner": "^a$", "repo": "^a$" } }, "folders": { }, "headers": { }, "cdn": { "prod": { "type": "fastly", "host": "string", "route": [ "string" ], "serviceId": "string", "authToken": "string" }, "live": { "host": "main--$repo--page.example.com" }, "preview": { "host": "main--$repo--live.example.com" }, "review": { "host": "example.reviews" } }, "access": { "admin": { "role": { }, "requireAuth": "auto", "defaultRole": [ "admin" ], "apiKeyId": [ "string" ] }, "site": { "allow": [ "string" ], "secretId": [ "^a$" ], "apiKeyId": [ "string" ] }, "preview": { "allow": [ "string" ], "secretId": [ "^a$" ], "apiKeyId": [ "string" ] }, "live": { "allow": [ "string" ], "secretId": [ "^a$" ], "apiKeyId": [ "string" ] } }, "tokens": { }, "secrets": { }, "apiKeys": { }, "groups": { }, "sidekick": { "editUrlLabel": "string", "editUrlPattern": "string", "host": "example.com", "liveHost": "example.com", "plugins": [ { "badgeVariant": "gray", "containerId": "string", "environments": "any", "event": "string", "excludePaths": "/foo/*", "id": "string", "includePaths": "/foo/bar/*", "isBadge": true, "isContainer": true, "isPalette": true, "isPopover": true, "paletteRect": "top: 100px; right: 20px; width: 200px; height: 50vh", "passConfig": true, "passReferrer": true, "pinned": true, "popoverRect": "width: 400px; height: 300px", "title": "string", "titleI18n": { }, "url": "string" } ], "previewHost": "example.com", "project": "string", "reviewHost": "example.com", "specialViews": [ { "id": "string" } ] } } ``` -------------------------------- ### Get Project Logs Response Sample Source: https://www.aem.live/docs/admin.html Demonstrates the format of a successful response when fetching log entries for a project. It includes timestamps, durations, status codes, methods, routes, and pagination information. ```json { "from": "2023-11-07T14:00:00.000Z", "to": "2023-11-07T16:15:12.454Z", "entries": [ { "timestamp": 1699368094644, "duration": 467, "status": 201, "method": "POST,", "route": "preview", "path": "/my-page", "contentBusId": "xyz", "owner": "owner", "repo": "repo", "ref": "ref" }, { "timestamp": 1699368094645, "duration": 1005, "status": 202, "method": "POST", "route": "live", "snapshotId": "default", "user": "foo@example.com", "paths": [ "/", "/docs/howto/", "/docs/howto/one", "/docs/howto/two" ], "contentBusId": "abc", "owner": "owner", "repo": "repo", "ref": "ref" }, { "timestamp": 1699372505155, "event": "dinner is ready", "contentBusId": "xyz", "owner": "owner", "repo": "repo", "ref": "ref" } ], "nextToken": "ABAB==", "links": { "next": "https://admin.hlx.page/log/owner/repo/ref/?nextToken=ABAB==" } } ``` -------------------------------- ### Get Index Status Source: https://www.aem.live/docs/admin.html Returns the index status of the respective resource. ```APIDOC ## GET /index/{org}/{site}/{ref}/{path} ### Description Returns the index status of the respective resource. ### Method GET ### Endpoint `/index/{org}/{site}/{ref}/{path}` ### Parameters #### Path Parameters - **org** (string) - Required - Organisation name. - **site** (string) - Required - Site id. - **ref** (string) - Required - Ref (branch) of repository. - **path** (string) - Required - Relative path of the resource ### Responses #### Success Response (200) The index status of a resource. #### Response Example ```json { "webPath": "/en/2021/blog", "resourcePath": "/en/2021/blog.md", "index": { "name": "blog", "githubLink": "https://github.com/owner/repo/blob/main/helix-index.yaml#L4", "indexedUrl": "https://main--site--org.aem.live/en/2021/blog", "lastModified": "Tue, 01 Mar 2022 08:32:01 GMT" } } ``` #### Error Responses - **401** - Not authenticated - **403** - Access role does not have the required permission - **404** - Resource not found or not in index definition. - **429** - Rate limited by admin service. see https://www.aem.live/docs/limits#admin-api-limits - **500** - Operation failed due to an internal error. ``` -------------------------------- ### File Change Event Payload Example Source: https://www.aem.live/docs/admin.html An example payload representing multiple file changes within a system event. It includes file paths, modification types, content types, and commit information. ```json { "change-event-payload_example": { "summary": "Multiple files event example", "value": { "type": "github", "baseRef": "", "installationId": 995843, "changes": [ { "path": "new-file.txt", "time": "2021-05-04T13:40:15+09:00", "type": "added", "contentType": "text/plain; charset=utf-8", "commit": "5edf98811d50b5b948f6f890f0c4367095490dbd" }, { "path": "src/html.htl", "time": "2021-05-04T13:40:15+09:00", "type": "de" } ] } } } ``` -------------------------------- ### POST /snapshot/{org}/{site}/main/{snapshotId} Source: https://www.aem.live/docs/admin.html Creates a snapshot of the specified resource and stores it in the preview partition. Supports recursive snapshotting of subtrees. ```APIDOC ## POST /snapshot/{org}/{site}/main/{snapshotId} ### Description Creates a snapshot of the specified resource and stores it in the preview partition below the `.snapshot/snapshotId` folder. If the path param ends with a `*`, a snapshot of the entire subtree is created. If the snapshot is locked, a `409` response is returned. ### Method POST ### Endpoint `/snapshot/{org}/{site}/main/{snapshotId}` ### Parameters #### Path Parameters - **org** (string) - Required - Organisation name. - **site** (string) - Required - Site ID. - **snapshotId** (string) - Required - ID of the snapshot. - **path** (string) - Required - Relative path of the resource. #### Query Parameters - **filter** (any) - Optional - Filters the resources that are selected for snapshot. If set to `modified` only the resources that have a preview date newer than the live date are selected. Default: "all", Enum: ["all", "modified"] #### Request Body - **locked** (boolean) - Optional - Specifies if the snapshot should be locked. - **title** (string) - Optional - Title of the snapshot. - **description** (string) - Optional - Description of the snapshot. - **metadata** (object) - Optional - Additional properties for metadata. ### Request Example ```json { "locked": true, "title": "string", "description": "string", "metadata": {} } ``` ### Response #### Success Response (200) - **manifest** (object) - The snapshot manifest, including title, id, creation/modification dates, resources, and links. #### Response Example ```json { "manifest": { "title": "December release", "id": "12345", "created": "2021-04-31T23:00:00Z", "lastModified": "2021-05-31T23:00:00Z", "lastUpdated": "2021-05-31T23:00:00Z", "resources": [ { "path": "/foo" }, { "path": "/bar" } ] }, "links": { "snapshot": "https://admin.hlx.page/snapshot/adobe/blog/main/12345" } } ``` #### Error Responses - **400**: Invalid request url. - **401**: Not authenticated. - **403**: Access role does not have the required permission. - **404**: Resource not found. - **409**: Conflict. The requested operation is not allowed by the current state of the resource. ```