From 31dad7477fabfe842a0abc292aadb650d91c0dd4 Mon Sep 17 00:00:00 2001 From: Andrew Top Date: Thu, 31 Oct 2024 09:28:00 -0400 Subject: [PATCH 01/18] feat SITES-26526 [Import Assistant] Validate parameters and create proxy to Firefall --- package-lock.json | 1 + package.json | 1 + src/controllers/assistant.js | 97 ++++++++++- src/dto/assistant-response.js | 21 +++ src/support/assistant-support.js | 73 ++++++++ test/controllers/assistant.test.js | 256 ++++++++++++++++++++++++++++- 6 files changed, 436 insertions(+), 13 deletions(-) create mode 100644 src/dto/assistant-response.js create mode 100644 src/support/assistant-support.js diff --git a/package-lock.json b/package-lock.json index 80c4fcce..b4b41de3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "@adobe/helix-status": "10.1.3", "@adobe/helix-universal-logger": "3.0.21", "@adobe/spacecat-shared-data-access": "1.50.1", + "@adobe/spacecat-shared-gpt-client": "1.3.0", "@adobe/spacecat-shared-http-utils": "1.6.18", "@adobe/spacecat-shared-ims-client": "1.3.22", "@adobe/spacecat-shared-rum-api-client": "2.9.10", diff --git a/package.json b/package.json index 077e903d..9eb59352 100644 --- a/package.json +++ b/package.json @@ -68,6 +68,7 @@ "@adobe/helix-status": "10.1.3", "@adobe/helix-universal-logger": "3.0.21", "@adobe/spacecat-shared-data-access": "1.50.1", + "@adobe/spacecat-shared-gpt-client": "1.3.0", "@adobe/spacecat-shared-http-utils": "1.6.18", "@adobe/spacecat-shared-ims-client": "1.3.22", "@adobe/spacecat-shared-rum-api-client": "2.9.10", diff --git a/src/controllers/assistant.js b/src/controllers/assistant.js index fe96a393..9084faf2 100644 --- a/src/controllers/assistant.js +++ b/src/controllers/assistant.js @@ -13,15 +13,24 @@ import { createResponse, } from '@adobe/spacecat-shared-http-utils'; +import { isObject } from '@adobe/spacecat-shared-utils'; +import { AssistantDto } from '../dto/assistant-response.js'; +import { commandConfig, getFirefallCompletion } from '../support/assistant-support.js'; import { ErrorWithStatusCode } from '../support/utils.js'; /** * Assistant controller. Provides methods to perform AI assisted operations. + * There are certain commands that can be executed by the assistant. Depending on the command + * has to be certain parameters such as prompt, htmlContent, imageUrl. A call is made + * to Firefall, and the response is returned. * @returns {object} Import assistant controller. * @constructor */ -function AssistantController() { +function AssistantController(context) { const HEADER_ERROR = 'x-error'; + const STATUS_BAD_REQUEST = 400; + const STATUS_OK = 200; + const { log } = context; function createErrorResponse(error) { return createResponse({}, error.status, { @@ -29,18 +38,92 @@ function AssistantController() { }); } + function isBase64UrlImage(base64String) { + return base64String.startsWith('data:image/') && base64String.endsWith('=') && base64String.includes('base64'); + } + + function validateRequestData(data) { + const { + command, prompt, htmlContent, imageUrl, + } = data; + + // Validate 'command' + if (!command) { + throw new ErrorWithStatusCode('Invalid request: command is required.', STATUS_BAD_REQUEST); + } + const currentCommandConfig = commandConfig[command]; + if (!currentCommandConfig) { + throw new ErrorWithStatusCode(`Invalid request: command not implemented: ${command}`, STATUS_BAD_REQUEST); + } + + if (currentCommandConfig.parameters.includes('prompt') && !prompt) { + throw new ErrorWithStatusCode('Invalid request: prompt is required.', STATUS_BAD_REQUEST); + } + + if (currentCommandConfig.parameters.includes('htmlContent')) { + if (!htmlContent) { + throw new ErrorWithStatusCode('Invalid request: HTML content is required.', STATUS_BAD_REQUEST); + } + if (!htmlContent.includes('')) { + throw new ErrorWithStatusCode('Invalid request: HTML content is invalid or incomplete.', STATUS_BAD_REQUEST); + } + } + + if (currentCommandConfig.parameters.includes('imageUrl')) { + if (!imageUrl) { + throw new ErrorWithStatusCode('Invalid request: Image url is required.', STATUS_BAD_REQUEST); + } + // Only base64 images for now. + if (!isBase64UrlImage(imageUrl)) { + throw new ErrorWithStatusCode('Invalid request: Image url is not a base64 encoded image.', STATUS_BAD_REQUEST); + } + } + } + + function parseRequestContext(requestContext) { + if (!requestContext || !isObject(requestContext)) { + throw new ErrorWithStatusCode('Invalid request: missing request context.', STATUS_BAD_REQUEST); + } + if (!requestContext.data || !requestContext.attributes) { + throw new ErrorWithStatusCode('Invalid request: invalid request context format.', STATUS_BAD_REQUEST); + } + const { data, attributes } = requestContext; + const { htmlContent, imageUrl, ...options } = data?.options || {}; + const { authInfo: { profile } } = attributes; + const requestData = { + command: data.command, + prompt: data.prompt, + htmlContent, + imageUrl, + importApiKey: requestContext.pathInfo.headers['x-api-key'], + apiKeyName: profile?.getName(), + imsOrgId: profile?.getImsOrgId() ?? requestContext.pathInfo.headers['x-gw-ims-org-id'], + imsUserId: profile?.getImsUserId(), + options, + }; + + validateRequestData(requestData); + + return requestData; + } + /** * Send an import assistant request to the model. - * @param {object} context - Context of the request. + * @param {object} requestContext - Context of the request. * @returns {Promise} 200 OK with a list of options from the model. */ - async function processImportAssistant(context) { - const { command } = context.data; - if (command) { - const error = new ErrorWithStatusCode(`Assistant command not implemented: ${command}`, 501); + async function processImportAssistant(requestContext) { + try { + const requestData = parseRequestContext(requestContext); + + // Call the assistant model. + const firefallResponse = await getFirefallCompletion(requestData, log); + const firefallDto = AssistantDto.toJSON(firefallResponse); + return createResponse(firefallDto, STATUS_OK); + } catch (error) { + log.error(`Failed to run assistant command: ${error.message}`); return createErrorResponse(error); } - return createResponse({}, 501); } return { diff --git a/src/dto/assistant-response.js b/src/dto/assistant-response.js new file mode 100644 index 00000000..94bb8a7d --- /dev/null +++ b/src/dto/assistant-response.js @@ -0,0 +1,21 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +/** + * Data transfer object for Assistant call. + */ +export const AssistantDto = { + /** + * Converts an assistant Firefall object into a JSON object. + */ + toJSON: (messageContent) => messageContent, +}; diff --git a/src/support/assistant-support.js b/src/support/assistant-support.js new file mode 100644 index 00000000..bc09bf90 --- /dev/null +++ b/src/support/assistant-support.js @@ -0,0 +1,73 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import { FirefallClient } from '@adobe/spacecat-shared-gpt-client'; +import { ErrorWithStatusCode } from './utils.js'; + +/* + * Command Config Type: + * - parameters: string[] : parameters required for the command + * - responseFormat: string : AI response format for the command + * - llmModel: string : the LLM Model to use for the command + */ +export const commandConfig = { + findMainContent: { + parameters: ['htmlContent', 'prompt'], + llmModel: 'gpt-4-turbo', + responseFormat: 'json_object', + }, + findRemovalSelectors: { + parameters: ['htmlContent', 'prompt'], + llmModel: 'gpt-4-turbo', + responseFormat: 'json_object', + }, + findBlockSelectors: { + parameters: ['htmlContent', 'prompt', 'imageUrl'], + llmModel: 'gpt-4-vision', + }, + findBlockCells: { + parameters: ['htmlContent', 'prompt', 'imageUrl'], + llmModel: 'gpt-4-vision', + }, + generatePageTransformation: { + parameters: ['htmlContent', 'prompt'], + llmModel: 'gpt-4-turbo', + responseFormat: 'json_object', + }, +}; + +export const getFirefallCompletion = async (requestData, log) => { + const context = { + env: { + ...process.env, + FIREFALL_API_KEY: 'aem-import-as-a-service', + IMS_CLIENT_ID: 'aem-import-as-a-service', + }, + log, + }; + let client; + try { + client = FirefallClient.createFrom(context); + } catch (error) { + throw new ErrorWithStatusCode(`Error creating FirefallClient: ${error.message}`, 500); + } + + try { + return await client.fetchChatCompletion(requestData.prompt, { + model: requestData.llmModel, + responseFormat: requestData.responseFormat, + imageUrls: [requestData.imageUrl], + }); + } catch (error) { + throw new ErrorWithStatusCode(`Error fetching insight: ${error.message}`, 500); + } +}; diff --git a/test/controllers/assistant.test.js b/test/controllers/assistant.test.js index 7e50894b..07601e34 100644 --- a/test/controllers/assistant.test.js +++ b/test/controllers/assistant.test.js @@ -13,37 +13,281 @@ /* eslint-env mocha */ import { Response } from '@adobe/fetch'; +import { FirefallClient } from '@adobe/spacecat-shared-gpt-client'; import { use, expect } from 'chai'; +import sinon from 'sinon'; import sinonChai from 'sinon-chai'; import chaiAsPromised from 'chai-as-promised'; import AssistantController from '../../src/controllers/assistant.js'; +import { commandConfig } from '../../src/support/assistant-support.js'; use(sinonChai); use(chaiAsPromised); describe('AssistantController tests', () => { + let sandbox; let baseContext; let assistantController; + const screenshot = 'iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAApgAAAKYB3X3/OAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAANCSURBVEiJtZZPbBtFFMZ/M7ubXdtdb1xSFyeilBapySVU8h8OoFaooFSqiihIVIpQBKci6KEg9Q6H9kovIHoCIVQJJCKE1ENFjnAgcaSGC6rEnxBwA04Tx43t2FnvDAfjkNibxgHxnWb2e/u992bee7tCa00YFsffekFY+nUzFtjW0LrvjRXrCDIAaPLlW0nHL0SsZtVoaF98mLrx3pdhOqLtYPHChahZcYYO7KvPFxvRl5XPp1sN3adWiD1ZAqD6XYK1b/dvE5IWryTt2udLFedwc1+9kLp+vbbpoDh+6TklxBeAi9TL0taeWpdmZzQDry0AcO+jQ12RyohqqoYoo8RDwJrU+qXkjWtfi8Xxt58BdQuwQs9qC/afLwCw8tnQbqYAPsgxE1S6F3EAIXux2oQFKm0ihMsOF71dHYx+f3NND68ghCu1YIoePPQN1pGRABkJ6Bus96CutRZMydTl+TvuiRW1m3n0eDl0vRPcEysqdXn+jsQPsrHMquGeXEaY4Yk4wxWcY5V/9scqOMOVUFthatyTy8QyqwZ+kDURKoMWxNKr2EeqVKcTNOajqKoBgOE28U4tdQl5p5bwCw7BWquaZSzAPlwjlithJtp3pTImSqQRrb2Z8PHGigD4RZuNX6JYj6wj7O4TFLbCO/Mn/m8R+h6rYSUb3ekokRY6f/YukArN979jcW+V/S8g0eT/N3VN3kTqWbQ428m9/8k0P/1aIhF36PccEl6EhOcAUCrXKZXXWS3XKd2vc/TRBG9O5ELC17MmWubD2nKhUKZa26Ba2+D3P+4/MNCFwg59oWVeYhkzgN/JDR8deKBoD7Y+ljEjGZ0sosXVTvbc6RHirr2reNy1OXd6pJsQ+gqjk8VWFYmHrwBzW/n+uMPFiRwHB2I7ih8ciHFxIkd/3Omk5tCDV1t+2nNu5sxxpDFNx+huNhVT3/zMDz8usXC3ddaHBj1GHj/As08fwTS7Kt1HBTmyN29vdwAw+/wbwLVOJ3uAD1wi/dUH7Qei66PfyuRj4Ik9is+hglfbkbfR3cnZm7chlUWLdwmprtCohX4HUtlOcQjLYCu+fzGJH2QRKvP3UNz8bWk1qMxjGTOMThZ3kvgLI5AzFfo379UAAAAASUVORK5CYII='; + const { info, debug, error } = console; beforeEach(() => { + sinon.restore(); + sandbox = sinon.createSandbox(); + baseContext = { + log: { + info, + debug, + error: sandbox.stub().callsFake(error), + }, params: {}, data: {}, + pathInfo: { + headers: { + 'x-gw-ims-org-id': 'testHeaderImsOrgId', + }, + }, + attributes: { + authInfo: { + profile: { + getName: () => 'testName', + getImsOrgId: () => 'testImsOrgId', + getImsUserId: () => 'testImsUserId', + }, + }, + }, }; + if (Math.random() > 0.7) { + // Occasionally use the x-gw-ims-org-id instead. + baseContext.attributes.authInfo.profile.getImsOrgId = () => undefined; + } assistantController = AssistantController(baseContext); }); - describe('processImportAssistant', () => { - it('should throw a not implemented error', async () => { + const testParameterWithCommand = async (command, errorMessage, testData = {}) => { + const response = await assistantController.processImportAssistant( + { + ...baseContext, + data: { + ...testData, + command, + }, + }, + ); + expect(response).to.be.an.instanceOf(Response); + expect(response.status).to.equal(400); + expect(response.headers.get('x-error')).to.equal(errorMessage); + }; + + describe('processImportAssistant parameters', () => { + it('undefined request test', async () => { + const response = await assistantController.processImportAssistant(undefined); + expect(response).to.be.an.instanceOf(Response); + expect(response.status).to.equal(400); + expect(response.headers.get('x-error')).to.equal('Invalid request: missing request context.'); + expect(baseContext.log.error.getCall(0).args[0]).to.include('Invalid request: missing request context.'); + }); + it('non-object request test', async () => { + const response = await assistantController.processImportAssistant('string'); + expect(response).to.be.an.instanceOf(Response); + expect(response.status).to.equal(400); + expect(response.headers.get('x-error')).to.equal('Invalid request: missing request context.'); + expect(baseContext.log.error.getCall(0).args[0]).to.include('Invalid request: missing request context.'); + }); + it('missing data in request test', async () => { + const datalessContext = { ...baseContext }; + delete datalessContext.data; + const response = await assistantController.processImportAssistant(datalessContext); + expect(response).to.be.an.instanceOf(Response); + expect(response.status).to.equal(400); + expect(response.headers.get('x-error')).to.equal('Invalid request: invalid request context format.'); + }); + it('missing attributes in request test', async () => { + const datalessContext = { ...baseContext }; + delete datalessContext.attributes; + const response = await assistantController.processImportAssistant(datalessContext); + expect(response).to.be.an.instanceOf(Response); + expect(response.status).to.equal(400); + expect(response.headers.get('x-error')).to.equal('Invalid request: invalid request context format.'); + }); + it('missing profile in request test', async () => { + const profilelessContext = { ...baseContext }; + delete profilelessContext.attributes.authInfo.profile; + const response = await assistantController.processImportAssistant( + { + ...profilelessContext, + data: { + command: 'findMainContent', + prompt: 'nav and some text', + options: { + htmlContent: '

this is html

', + }, + }, + }, + ); + expect(response).to.be.an.instanceOf(Response); + expect(response.status).to.equal(500); + expect(response.headers.get('x-error')).to.include('Error creating FirefallClient: Context param'); + }); + it('missing command test', async () => { const response = await assistantController.processImportAssistant({ ...baseContext }); expect(response).to.be.an.instanceOf(Response); - expect(response.status).to.equal(501); + expect(response.status).to.equal(400); + expect(response.headers.get('x-error')).to.equal('Invalid request: command is required.'); + expect(baseContext.log.error.getCall(0).args[0]).to.include('Invalid request: command is required.'); }); - it('should throw a not implemented error with invalid command', async () => { + it('empty command test', async () => { + const response = await assistantController.processImportAssistant({ ...baseContext, data: { command: '' } }); + expect(response).to.be.an.instanceOf(Response); + expect(response.status).to.equal(400); + expect(response.headers.get('x-error')).to.equal('Invalid request: command is required.'); + }); + it('invalid command test', async () => { const response = await assistantController.processImportAssistant({ ...baseContext, data: { command: 'test' } }); expect(response).to.be.an.instanceOf(Response); - expect(response.status).to.equal(501); - expect(response.headers.get('x-error')).to.equal('Assistant command not implemented: test'); + expect(response.status).to.equal(400); + expect(response.headers.get('x-error')).to.equal('Invalid request: command not implemented: test'); + }); + it('missing prompt test', async () => { + for (const [command, config] of Object.entries(commandConfig)) { + if (config.parameters.includes('prompt')) { + // For Debugging: console.log(`Testing ${command} for missing prompt`); + // eslint-disable-next-line no-await-in-loop + await testParameterWithCommand(command, 'Invalid request: prompt is required.'); + } + } + }); + it('missing htmlContent test', async () => { + for (const [command, config] of Object.entries(commandConfig)) { + if (config.parameters.includes('htmlContent')) { + // For Debugging: console.log(`Testing ${command} for missing htmlContent`); + // eslint-disable-next-line no-await-in-loop + await testParameterWithCommand(command, 'Invalid request: HTML content is required.', { prompt: 'nav' }); + } + } + }); + it('missing image URL test', async () => { + for (const [command, config] of Object.entries(commandConfig)) { + if (config.parameters.includes('imageUrl')) { + // For Debugging: console.log(`Testing ${command} for missing imageUrl`); + // eslint-disable-next-line no-await-in-loop + await testParameterWithCommand( + command, + 'Invalid request: Image url is required.', + { + prompt: 'nav ing', + options: { htmlContent: '

hello

' }, + }, + ); + } + } + }); + it('should throw an invalid request error with bad htmlContent', async () => { + const response = await assistantController.processImportAssistant( + { + ...baseContext, + data: { + command: 'findMainContent', + prompt: 'nav and some text', + options: { + htmlContent: '

this is not full html { + const response = await assistantController.processImportAssistant( + { + ...baseContext, + data: { + command: 'findBlockSelectors', + prompt: 'nav and some text', + options: { + htmlContent: 'hi', + imageUrl: 'not an image', + }, + }, + }, + ); + expect(response).to.be.an.instanceOf(Response); + expect(response.status).to.equal(400); + expect(response.headers.get('x-error')).to.equal('Invalid request: Image url is not a base64 encoded image.'); + }); + + it('should pass validation but fail firefall client', async () => { + const response = await assistantController.processImportAssistant( + { + ...baseContext, + data: { + command: 'findBlockCells', + prompt: 'nav and some text', + options: { + htmlContent: 'hi', + imageUrl: `data:image/png;base64,${screenshot}`, + }, + }, + }, + ); + expect(response).to.be.an.instanceOf(Response); + expect(response.status).to.equal(500); + expect(response.headers.get('x-error')).to.include('Error creating FirefallClient: Context param'); + }); + it('should pass validation but fail completion fetch', async () => { + // eslint-disable-next-line no-unused-vars + sinon.stub(FirefallClient, 'createFrom').callsFake(() => ({ })); + + const response = await assistantController.processImportAssistant( + { + ...baseContext, + data: { + command: 'findBlockCells', + prompt: 'nav and some text', + options: { + htmlContent: 'hi', + imageUrl: `data:image/png;base64,${screenshot}`, + }, + }, + }, + ); + expect(response).to.be.an.instanceOf(Response); + expect(response.status).to.equal(500); + expect(response.headers.get('x-error')).to.include('Error fetching insight:'); + }); + it('should succeed', async () => { + sinon.stub(FirefallClient, 'createFrom').callsFake(() => ({ + fetchChatCompletion: () => Promise.resolve({ + choices: [{ message: { content: '.breadcrumbs, .footer, .header' } }], + }), + })); + + const response = await assistantController.processImportAssistant( + { + ...baseContext, + data: { + command: 'findMainContent', + prompt: 'Analyze the provided HTML document to determine which element most likely represents the main content of the page and provide an appropriate CSS selector for this element. The main content of the page should not include any headers, footers, breadcrumbs or sidebars: {{{content}}}', + options: { + htmlContent: 'hi', + imageUrl: `data:image/png;base64,${screenshot}`, + }, + }, + }, + ); + expect(response).to.be.an.instanceOf(Response); + expect(response.status).to.equal(200); + expect(response.headers.get('x-error')).to.equal(null); + const results = await response.json(); + expect(results).to.not.be.undefined; + expect(results.choices).to.not.be.undefined; + expect(results.choices).to.be.an('array').of.length(1); + expect(results.choices[0].message).to.not.be.undefined; + expect(results.choices[0].message.content).to.not.be.undefined; + expect(results.choices[0].message.content).to.equal('.breadcrumbs, .footer, .header'); }); }); }); From 8f2c8d53b78b4e45960cf7b6b6d9293f6e4707d1 Mon Sep 17 00:00:00 2001 From: Andrew Top Date: Tue, 12 Nov 2024 11:35:35 -0500 Subject: [PATCH 02/18] feat SITES-26526 [Import Assistant] Validate parameters and create wrapper for Firefall --- package-lock.json | 328 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 328 insertions(+) diff --git a/package-lock.json b/package-lock.json index b4b41de3..8130df4f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1438,6 +1438,334 @@ "node": ">=16.0.0" } }, + "node_modules/@adobe/spacecat-shared-gpt-client": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@adobe/spacecat-shared-gpt-client/-/spacecat-shared-gpt-client-1.3.0.tgz", + "integrity": "sha512-xz/6z7j8QeUCvUNqnFMNh6Ae6mH/JxZEvHo/S3pNl1iY7c/h7kABNUILckKZ9mdb3tXXwdZx7BzLmMku8SwLbQ==", + "dependencies": { + "@adobe/fetch": "4.1.9", + "@adobe/helix-universal": "5.0.6", + "@adobe/spacecat-shared-ims-client": "1.3.21", + "@adobe/spacecat-shared-utils": "1.22.4" + }, + "engines": { + "node": ">=20.0.0 <23.0.0", + "npm": ">=10.0.0 <11.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-gpt-client/node_modules/@adobe/spacecat-shared-ims-client": { + "version": "1.3.21", + "resolved": "https://registry.npmjs.org/@adobe/spacecat-shared-ims-client/-/spacecat-shared-ims-client-1.3.21.tgz", + "integrity": "sha512-36JibetCbXPUJJ9DXBysh6lBz25f+PxYxJ9+zgkoPO5ZAK9vIvEHE/tXAEjeqDGtv3lwHOecYiW/Azhw+18g4w==", + "dependencies": { + "@adobe/fetch": "4.1.9", + "@adobe/helix-universal": "5.0.6", + "@adobe/spacecat-shared-utils": "1.22.3" + }, + "engines": { + "node": ">=20.0.0 <23.0.0", + "npm": ">=10.0.0 <11.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-gpt-client/node_modules/@adobe/spacecat-shared-ims-client/node_modules/@adobe/spacecat-shared-utils": { + "version": "1.22.3", + "resolved": "https://registry.npmjs.org/@adobe/spacecat-shared-utils/-/spacecat-shared-utils-1.22.3.tgz", + "integrity": "sha512-PdpPWbQJ3PLZpsfbgZTZXDx17LMOn4pJYS6QYOZ+xtbG6sIYF3qFcbrMrEKSI9VG/iaEDhZpu/cIX58eZrn71g==", + "dependencies": { + "@adobe/fetch": "4.1.9", + "@aws-sdk/client-s3": "3.685.0", + "@aws-sdk/client-sqs": "3.682.0", + "@json2csv/plainjs": "7.0.6", + "aws-xray-sdk": "3.10.1" + }, + "engines": { + "node": ">=20.0.0 <23.0.0", + "npm": ">=10.0.0 <11.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-gpt-client/node_modules/@adobe/spacecat-shared-utils": { + "version": "1.22.4", + "resolved": "https://registry.npmjs.org/@adobe/spacecat-shared-utils/-/spacecat-shared-utils-1.22.4.tgz", + "integrity": "sha512-BJoBMwNZMH/35K58H2k10lbV97MIfF6bqQY1CjCgt3mjGeh6HeqWtwl33WB2QrZ9FdVRBJN+YNrwGkyGn948hA==", + "dependencies": { + "@adobe/fetch": "4.1.9", + "@aws-sdk/client-s3": "3.685.0", + "@aws-sdk/client-sqs": "3.682.0", + "@json2csv/plainjs": "7.0.6", + "aws-xray-sdk": "3.10.1" + }, + "engines": { + "node": ">=20.0.0 <23.0.0", + "npm": ">=10.0.0 <11.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-gpt-client/node_modules/@aws-sdk/client-s3": { + "version": "3.685.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.685.0.tgz", + "integrity": "sha512-ClvMeQHbLhWkpxnVymo4qWS5/yZcPXjorDbSday3joCWYWCSHTO409nWd+jx6eA4MKT/EY/uJ6ZBJRFfByKLuA==", + "dependencies": { + "@aws-crypto/sha1-browser": "5.2.0", + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/client-sso-oidc": "3.682.0", + "@aws-sdk/client-sts": "3.682.0", + "@aws-sdk/core": "3.679.0", + "@aws-sdk/credential-provider-node": "3.682.0", + "@aws-sdk/middleware-bucket-endpoint": "3.679.0", + "@aws-sdk/middleware-expect-continue": "3.679.0", + "@aws-sdk/middleware-flexible-checksums": "3.682.0", + "@aws-sdk/middleware-host-header": "3.679.0", + "@aws-sdk/middleware-location-constraint": "3.679.0", + "@aws-sdk/middleware-logger": "3.679.0", + "@aws-sdk/middleware-recursion-detection": "3.679.0", + "@aws-sdk/middleware-sdk-s3": "3.685.0", + "@aws-sdk/middleware-ssec": "3.679.0", + "@aws-sdk/middleware-user-agent": "3.682.0", + "@aws-sdk/region-config-resolver": "3.679.0", + "@aws-sdk/signature-v4-multi-region": "3.685.0", + "@aws-sdk/types": "3.679.0", + "@aws-sdk/util-endpoints": "3.679.0", + "@aws-sdk/util-user-agent-browser": "3.679.0", + "@aws-sdk/util-user-agent-node": "3.682.0", + "@aws-sdk/xml-builder": "3.679.0", + "@smithy/config-resolver": "^3.0.9", + "@smithy/core": "^2.4.8", + "@smithy/eventstream-serde-browser": "^3.0.10", + "@smithy/eventstream-serde-config-resolver": "^3.0.7", + "@smithy/eventstream-serde-node": "^3.0.9", + "@smithy/fetch-http-handler": "^3.2.9", + "@smithy/hash-blob-browser": "^3.1.6", + "@smithy/hash-node": "^3.0.7", + "@smithy/hash-stream-node": "^3.1.6", + "@smithy/invalid-dependency": "^3.0.7", + "@smithy/md5-js": "^3.0.7", + "@smithy/middleware-content-length": "^3.0.9", + "@smithy/middleware-endpoint": "^3.1.4", + "@smithy/middleware-retry": "^3.0.23", + "@smithy/middleware-serde": "^3.0.7", + "@smithy/middleware-stack": "^3.0.7", + "@smithy/node-config-provider": "^3.1.8", + "@smithy/node-http-handler": "^3.2.4", + "@smithy/protocol-http": "^4.1.4", + "@smithy/smithy-client": "^3.4.0", + "@smithy/types": "^3.5.0", + "@smithy/url-parser": "^3.0.7", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.23", + "@smithy/util-defaults-mode-node": "^3.0.23", + "@smithy/util-endpoints": "^2.1.3", + "@smithy/util-middleware": "^3.0.7", + "@smithy/util-retry": "^3.0.7", + "@smithy/util-stream": "^3.1.9", + "@smithy/util-utf8": "^3.0.0", + "@smithy/util-waiter": "^3.1.6", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-gpt-client/node_modules/@aws-sdk/client-sqs": { + "version": "3.682.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sqs/-/client-sqs-3.682.0.tgz", + "integrity": "sha512-93r0i2VwiHiZkcXfWVoxMpyw91Ou0C6gyS7AzPHoZ9ZoXV1VaBFqQ/FmcLzzNa9pwjE6k/Pn7VJMNKBezE8EmQ==", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/client-sso-oidc": "3.682.0", + "@aws-sdk/client-sts": "3.682.0", + "@aws-sdk/core": "3.679.0", + "@aws-sdk/credential-provider-node": "3.682.0", + "@aws-sdk/middleware-host-header": "3.679.0", + "@aws-sdk/middleware-logger": "3.679.0", + "@aws-sdk/middleware-recursion-detection": "3.679.0", + "@aws-sdk/middleware-sdk-sqs": "3.679.0", + "@aws-sdk/middleware-user-agent": "3.682.0", + "@aws-sdk/region-config-resolver": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@aws-sdk/util-endpoints": "3.679.0", + "@aws-sdk/util-user-agent-browser": "3.679.0", + "@aws-sdk/util-user-agent-node": "3.682.0", + "@smithy/config-resolver": "^3.0.9", + "@smithy/core": "^2.4.8", + "@smithy/fetch-http-handler": "^3.2.9", + "@smithy/hash-node": "^3.0.7", + "@smithy/invalid-dependency": "^3.0.7", + "@smithy/md5-js": "^3.0.7", + "@smithy/middleware-content-length": "^3.0.9", + "@smithy/middleware-endpoint": "^3.1.4", + "@smithy/middleware-retry": "^3.0.23", + "@smithy/middleware-serde": "^3.0.7", + "@smithy/middleware-stack": "^3.0.7", + "@smithy/node-config-provider": "^3.1.8", + "@smithy/node-http-handler": "^3.2.4", + "@smithy/protocol-http": "^4.1.4", + "@smithy/smithy-client": "^3.4.0", + "@smithy/types": "^3.5.0", + "@smithy/url-parser": "^3.0.7", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.23", + "@smithy/util-defaults-mode-node": "^3.0.23", + "@smithy/util-endpoints": "^2.1.3", + "@smithy/util-middleware": "^3.0.7", + "@smithy/util-retry": "^3.0.7", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-gpt-client/node_modules/@aws-sdk/middleware-bucket-endpoint": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.679.0.tgz", + "integrity": "sha512-5EpiPhhGgnF+uJR4DzWUk6Lx3pOn9oM6JGXxeHsiynfoBfq7vHMleq+uABHHSQS+y7XzbyZ7x8tXNQlliMwOsg==", + "dependencies": { + "@aws-sdk/types": "3.679.0", + "@aws-sdk/util-arn-parser": "3.679.0", + "@smithy/node-config-provider": "^3.1.8", + "@smithy/protocol-http": "^4.1.4", + "@smithy/types": "^3.5.0", + "@smithy/util-config-provider": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-gpt-client/node_modules/@aws-sdk/middleware-expect-continue": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.679.0.tgz", + "integrity": "sha512-nYsh9PdWrF4EahTRdXHGlNud82RPc508CNGdh1lAGfPU3tNveGfMBX3PcGBtPOse3p9ebNKRWVmUc9eXSjGvHA==", + "dependencies": { + "@aws-sdk/types": "3.679.0", + "@smithy/protocol-http": "^4.1.4", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-gpt-client/node_modules/@aws-sdk/middleware-flexible-checksums": { + "version": "3.682.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.682.0.tgz", + "integrity": "sha512-5u1STth6iZUtAvPDO0NJVYKUX2EYKU7v84MYYaZ3O27HphRjFqDos0keL2KTnHn/KmMD68rM3yiUareWR8hnAQ==", + "dependencies": { + "@aws-crypto/crc32": "5.2.0", + "@aws-crypto/crc32c": "5.2.0", + "@aws-sdk/core": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@smithy/is-array-buffer": "^3.0.0", + "@smithy/node-config-provider": "^3.1.8", + "@smithy/protocol-http": "^4.1.4", + "@smithy/types": "^3.5.0", + "@smithy/util-middleware": "^3.0.7", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-gpt-client/node_modules/@aws-sdk/middleware-location-constraint": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.679.0.tgz", + "integrity": "sha512-SA1C1D3XgoKTGxyNsOqd016ONpk46xJLWDgJUd00Zb21Ox5wYCoY6aDRKiaMRW+1VfCJdezs1Do3XLyIU9KxyA==", + "dependencies": { + "@aws-sdk/types": "3.679.0", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-gpt-client/node_modules/@aws-sdk/middleware-sdk-s3": { + "version": "3.685.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.685.0.tgz", + "integrity": "sha512-C4w92b3A99NbghrA2Ssw6y1RbDF3I3Bgzi2Izh0pXgyIoDiX0xs9bUs/FGYLK4uepYr78DAZY8DwEpzjWIXkSA==", + "dependencies": { + "@aws-sdk/core": "3.679.0", + "@aws-sdk/types": "3.679.0", + "@aws-sdk/util-arn-parser": "3.679.0", + "@smithy/core": "^2.4.8", + "@smithy/node-config-provider": "^3.1.8", + "@smithy/protocol-http": "^4.1.4", + "@smithy/signature-v4": "^4.2.0", + "@smithy/smithy-client": "^3.4.0", + "@smithy/types": "^3.5.0", + "@smithy/util-config-provider": "^3.0.0", + "@smithy/util-middleware": "^3.0.7", + "@smithy/util-stream": "^3.1.9", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-gpt-client/node_modules/@aws-sdk/middleware-sdk-sqs": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sqs/-/middleware-sdk-sqs-3.679.0.tgz", + "integrity": "sha512-GjOpT9GRMH6n3Rm9ZsRsrIbLxBPE3/L1KMkIn2uZj14uqz1pdE4ALCN9b9ZkPN+L//rsUrYqtd9gq9Hn9c2FJw==", + "dependencies": { + "@aws-sdk/types": "3.679.0", + "@smithy/smithy-client": "^3.4.0", + "@smithy/types": "^3.5.0", + "@smithy/util-hex-encoding": "^3.0.0", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-gpt-client/node_modules/@aws-sdk/middleware-ssec": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-ssec/-/middleware-ssec-3.679.0.tgz", + "integrity": "sha512-4GNUxXbs1M71uFHRiCAZtN0/g23ogI9YjMe5isAuYMHXwDB3MhqF7usKf954mBP6tplvN44vYlbJ84faaLrTtg==", + "dependencies": { + "@aws-sdk/types": "3.679.0", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-gpt-client/node_modules/@aws-sdk/signature-v4-multi-region": { + "version": "3.685.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.685.0.tgz", + "integrity": "sha512-IHLwuAZGqfUWVrNqw0ugnBa7iL8uBP4x6A7bfBDXRXWCWjUCed/1/D//0lKDHwpFkV74fGW6KoBacnWSUlXmwA==", + "dependencies": { + "@aws-sdk/middleware-sdk-s3": "3.685.0", + "@aws-sdk/types": "3.679.0", + "@smithy/protocol-http": "^4.1.4", + "@smithy/signature-v4": "^4.2.0", + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@adobe/spacecat-shared-gpt-client/node_modules/@aws-sdk/xml-builder": { + "version": "3.679.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.679.0.tgz", + "integrity": "sha512-nPmhVZb39ty5bcQ7mAwtjezBcsBqTYZ9A2D9v/lE92KCLdu5RhSkPH7O71ZqbZx1mUSg9fAOxHPiG79U5VlpLQ==", + "dependencies": { + "@smithy/types": "^3.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/@adobe/spacecat-shared-http-utils": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/@adobe/spacecat-shared-http-utils/-/spacecat-shared-http-utils-1.6.18.tgz", From f20d6b132d06ae12c878054593f69e4110880ae8 Mon Sep 17 00:00:00 2001 From: Andrew Top Date: Tue, 12 Nov 2024 15:03:46 -0500 Subject: [PATCH 03/18] feat SITES-26526 [Import Assistant] Validate parameters and create wrapper for Firefall - imports.assistant --- docs/index.html | 3164 ++++++++++++++-------------- docs/openapi/schemas.yaml | 1 + docs/openapi/tools-api.yaml | 11 +- src/controllers/assistant.js | 34 +- src/support/assistant-support.js | 39 +- test/controllers/assistant.test.js | 38 +- 6 files changed, 1673 insertions(+), 1614 deletions(-) diff --git a/docs/index.html b/docs/index.html index 90419424..9d58acc4 100644 --- a/docs/index.html +++ b/docs/index.html @@ -12,427 +12,427 @@ margin: 0; } - -

SpaceCat API (1.75.10)

Download OpenAPI specification:Download

The SpaceCat API is used to manage edge delivery site directory and obtain audit information.

-

Authentication

api_key

DEPRECATED, use scoped_api_key or ims_key. (Used for read-only operations.)

-
Security Scheme Type: API Key
Header parameter name: x-api-key

scoped_api_key

For endpoints which authenticate with scoped API keys

-
Security Scheme Type: API Key
Header parameter name: x-api-key

ims_key

Value must be a valid IMS user token which will be offline-validated.

-
Security Scheme Type: API Key
Header parameter name: authorization

admin_key

DEPRECATED, use scoped_api_key or ims_key. (Used for read and write operations.)

-
Security Scheme Type: API Key
Header parameter name: x-api-key

site

SpaceCat API (1.75.11)

Download OpenAPI specification:Download

The SpaceCat API is used to manage edge delivery site directory and obtain audit information.

+

Authentication

api_key

DEPRECATED, use scoped_api_key or ims_key. (Used for read-only operations.)

+
Security Scheme Type: API Key
Header parameter name: x-api-key

scoped_api_key

For endpoints which authenticate with scoped API keys

+
Security Scheme Type: API Key
Header parameter name: x-api-key

ims_key

Value must be a valid IMS user token which will be offline-validated.

+
Security Scheme Type: API Key
Header parameter name: authorization

admin_key

DEPRECATED, use scoped_api_key or ims_key. (Used for read and write operations.)

+
Security Scheme Type: API Key
Header parameter name: x-api-key

site

Site operations

-

Retrieve all sites for an organization

This endpoint is useful for retrieving all sites for an organization.

-
Authorizations:
api_key
path Parameters
organizationId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The organization ID in uuid format

-

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new site

This endpoint is useful for creating a new site.

-
Authorizations:
admin_key
Request Body schema: application/json
required
baseURL
required
string <url> (URL)

The base URL of the site

-
deliveryType
required
string (DeliveryType)
Enum: "aem_edge" "aem_cs" "other"

The type of the delivery this site is using

-
gitHubURL
string <url> (URL)

The optional GitHub URL of the site

-
goLiveDate
string or null <date-time> (DateTime)

The date and time when the site went live on AEM Edge

-

Responses

Request samples

Content type
application/json
{
  • "organizationId": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
  • "deliveryType": "aem_cs"
}

Response samples

Content type
application/json
{
  • "id": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
  • "organizationId": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
  • "deliveryType": "aem_edge",
  • "goLiveDate": "2024-01-20T10:00:00Z",
  • "config": {
    },
  • "createdAt": "2023-12-15T09:30:00Z",
  • "updatedAt": "2024-01-19T11:20:00Z"
}

Retrieve all sites

This endpoint is useful for retrieving all sites.

-
Authorizations:
api_key

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve all sites by delivery type

This endpoint is useful for retrieving all sites by delivery type.

-
Authorizations:
api_key
path Parameters
deliveryType
required
string (DeliveryType)
Enum: "aem_edge" "aem_cs" "other"
Example: aem_edge

The type of the delivery this site is using

-

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve a single site by its Base URL

Retrieve all sites for an organization

This endpoint is useful for retrieving all sites for an organization.

+
Authorizations:
api_key
path Parameters
organizationId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The organization ID in uuid format

+

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new site

This endpoint is useful for creating a new site.

+
Authorizations:
admin_key
Request Body schema: application/json
required
baseURL
required
string <url> (URL)

The base URL of the site

+
deliveryType
required
string (DeliveryType)
Enum: "aem_edge" "aem_cs" "other"

The type of the delivery this site is using

+
gitHubURL
string <url> (URL)

The optional GitHub URL of the site

+
goLiveDate
string or null <date-time> (DateTime)

The date and time when the site went live on AEM Edge

+

Responses

Request samples

Content type
application/json
{
  • "organizationId": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
  • "deliveryType": "aem_cs"
}

Response samples

Content type
application/json
{
  • "id": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
  • "organizationId": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
  • "deliveryType": "aem_edge",
  • "goLiveDate": "2024-01-20T10:00:00Z",
  • "config": {
    },
  • "createdAt": "2023-12-15T09:30:00Z",
  • "updatedAt": "2024-01-19T11:20:00Z"
}

Retrieve all sites

This endpoint is useful for retrieving all sites.

+
Authorizations:
api_key

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve all sites by delivery type

This endpoint is useful for retrieving all sites by delivery type.

+
Authorizations:
api_key
path Parameters
deliveryType
required
string (DeliveryType)
Enum: "aem_edge" "aem_cs" "other"
Example: aem_edge

The type of the delivery this site is using

+

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve a single site by its Base URL

This endpoint is useful for retrieving a site when you only have its Base URL. The Base URL is a unique identifier for a site other than the Site ID. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

This endpoint is useful for retrieving a site when you only have its Base URL. The Base URL is a unique identifier for a site other than the Site ID. The base URL provided in the path must be base64 encoded. This is to allow for URLs with special characters to be used as path parameters.

-
Authorizations:
api_key
path Parameters
base64BaseUrl
required
string <base64url>

Base64-encoded base URL

-

Responses

Response samples

Content type
application/json
{
  • "id": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
  • "organizationId": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
  • "deliveryType": "aem_edge",
  • "goLiveDate": "2024-01-20T10:00:00Z",
  • "config": {
    },
  • "createdAt": "2023-12-15T09:30:00Z",
  • "updatedAt": "2024-01-19T11:20:00Z"
}

Retrieve all sites including their latest audit

Authorizations:
api_key
path Parameters
base64BaseUrl
required
string <base64url>

Base64-encoded base URL

+

Responses

Response samples

Content type
application/json
{
  • "id": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
  • "organizationId": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
  • "deliveryType": "aem_edge",
  • "goLiveDate": "2024-01-20T10:00:00Z",
  • "config": {
    },
  • "createdAt": "2023-12-15T09:30:00Z",
  • "updatedAt": "2024-01-19T11:20:00Z"
}

Retrieve all sites including their latest audit

This endpoint is useful for retrieving all sites including their latest audit. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

This endpoint is useful for retrieving all sites including their latest audit. The latest audit is determined by the auditedAt property of the audit and included in the audits array of the site object.

-
Authorizations:
api_key
path Parameters
auditType
required
string (AuditType)
Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
Example: cwv

The type of the audit

-

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve a single site by its ID

This endpoint is useful for retrieving a site by its ID.

-
Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

-

Responses

Response samples

Content type
application/json
{
  • "id": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
  • "organizationId": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
  • "deliveryType": "aem_edge",
  • "goLiveDate": "2024-01-20T10:00:00Z",
  • "config": {
    },
  • "createdAt": "2023-12-15T09:30:00Z",
  • "updatedAt": "2024-01-19T11:20:00Z"
}

Update a site

Authorizations:
api_key
path Parameters
auditType
required
string (AuditType)
Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
Example: cwv

The type of the audit

+

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve a single site by its ID

This endpoint is useful for retrieving a site by its ID.

+
Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

+

Responses

Response samples

Content type
application/json
{
  • "id": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
  • "organizationId": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
  • "deliveryType": "aem_edge",
  • "goLiveDate": "2024-01-20T10:00:00Z",
  • "config": {
    },
  • "createdAt": "2023-12-15T09:30:00Z",
  • "updatedAt": "2024-01-19T11:20:00Z"
}

Update a site

This endpoint is useful for updating a site. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

This endpoint is useful for updating a site. Only the fields as per the request body schema will be updated. At least one field to update must be provided in the request body.

-
Authorizations:
admin_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

-
Request Body schema: application/json
required
deliveryType
string (DeliveryType)
Enum: "aem_edge" "aem_cs" "other"

The type of the delivery this site is using

-
goLiveDate
string or null <date-time> (DateTime)

The date and time when the site went live on AEM Edge

-
object (SiteConfig)

Optional. The configuration of the site

-

Responses

Request samples

Content type
application/json
{
  • "organizationId": "u7y6t5r4-e3w2-x1z0-z9y8-x7v6w5u4t3s2",
  • "deliveryType": "other",
  • "goLiveDate": "2024-01-20T10:00:00Z"
}

Response samples

Content type
application/json
{
  • "id": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
  • "organizationId": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
  • "deliveryType": "aem_edge",
  • "goLiveDate": "2024-01-20T10:00:00Z",
  • "config": {
    },
  • "createdAt": "2023-12-15T09:30:00Z",
  • "updatedAt": "2024-01-19T11:20:00Z"
}

Delete a site

This endpoint is useful for deleting a site.

-
Authorizations:
admin_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

-

Responses

Update the configuration for an audit

Authorizations:
admin_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

+
Request Body schema: application/json
required
deliveryType
string (DeliveryType)
Enum: "aem_edge" "aem_cs" "other"

The type of the delivery this site is using

+
goLiveDate
string or null <date-time> (DateTime)

The date and time when the site went live on AEM Edge

+
object (SiteConfig)

Optional. The configuration of the site

+

Responses

Request samples

Content type
application/json
{
  • "organizationId": "u7y6t5r4-e3w2-x1z0-z9y8-x7v6w5u4t3s2",
  • "deliveryType": "other",
  • "goLiveDate": "2024-01-20T10:00:00Z"
}

Response samples

Content type
application/json
{
  • "id": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
  • "organizationId": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
  • "deliveryType": "aem_edge",
  • "goLiveDate": "2024-01-20T10:00:00Z",
  • "config": {
    },
  • "createdAt": "2023-12-15T09:30:00Z",
  • "updatedAt": "2024-01-19T11:20:00Z"
}

Delete a site

This endpoint is useful for deleting a site.

+
Authorizations:
admin_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

+

Responses

Update the configuration for an audit

This endpoint is useful for updating the configuration for an audit, +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

This endpoint is useful for updating the configuration for an audit, for example to set which URLs to skip from the audit.

-
Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

-
auditType
required
string (AuditType)
Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
Example: cwv

The type of the audit

-
Request Body schema: application/json
required
excludedURLs
Array of strings

Set of urls to exclude. If empty, will remove previously excluded URLs.

-

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json
{}

Retrieve key events for a site

This endpoint returns key events for a site chronologically, starting from the most recent and descending to the least recent

-
Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

-

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new key event for a site

The endpoint for creating new key events for a site

-
Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

-
Request Body schema: application/json
required
name
required
string

Name of the key event

-
type
required
string (KeyEventType)
Enum: "performance" "seo" "content" "code" "third party" "experimentation" "network" "status change"
time
string <date-time> (DateTime)

Time of the key event occurred (optional). Current time is used when the field is missing

-

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "type": "performance",
  • "time": "2024-01-19T14:20:30Z"
}

Response samples

Content type
application/json
{
  • "id": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
  • "name": "Multiple 404s detected",
  • "type": "seo",
  • "time": "2023-12-15T09:30:00Z"
}

Delete a key event

The endpoint for deleting a key event

-
Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

-
keyEventId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The key event ID in uuid format

-

Responses

Retrieve top pages for site

Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

+
auditType
required
string (AuditType)
Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
Example: cwv

The type of the audit

+
Request Body schema: application/json
required
excludedURLs
Array of strings

Set of urls to exclude. If empty, will remove previously excluded URLs.

+

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json
{}

Retrieve key events for a site

This endpoint returns key events for a site chronologically, starting from the most recent and descending to the least recent

+
Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

+

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new key event for a site

The endpoint for creating new key events for a site

+
Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

+
Request Body schema: application/json
required
name
required
string

Name of the key event

+
type
required
string (KeyEventType)
Enum: "performance" "seo" "content" "code" "third party" "experimentation" "network" "status change"
time
string <date-time> (DateTime)

Time of the key event occurred (optional). Current time is used when the field is missing

+

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "type": "performance",
  • "time": "2024-01-19T14:20:30Z"
}

Response samples

Content type
application/json
{
  • "id": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
  • "name": "Multiple 404s detected",
  • "type": "seo",
  • "time": "2023-12-15T09:30:00Z"
}

Delete a key event

The endpoint for deleting a key event

+
Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

+
keyEventId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The key event ID in uuid format

+

Responses

Retrieve top pages for site

Not implemented yet. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

Not implemented yet. This endpoint is useful for retrieving top pages for a site. The top pages will be ordered in buckets by source and geo, and in descending order by traffic within these buckets.

-
Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

-

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve top pages for site by source

Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

+

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve top pages for site by source

Not implemented yet. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

Not implemented yet. This endpoint is useful for retrieving top pages for a site. The top pages will be ordered in buckets by geo, and in descending order by traffic within these buckets.

-
Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

-
source
required
string
Value: "ahrefs"
Example: ahrefs

The source of the top pages

-

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve top pages for site by source and geo

Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

+
source
required
string
Value: "ahrefs"
Example: ahrefs

The source of the top pages

+

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve top pages for site by source and geo

Not implemented yet. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

Not implemented yet. This endpoint is useful for retrieving top pages for a site. The top pages will be ordered in descending order by traffic.

-
Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

-
source
required
string
Value: "ahrefs"
Example: ahrefs

The source of the top pages

-
geo
required
string
Example: au

The geo of the top pages

-

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieves all experiments for the site

This endpoint provide a list of experiments obtained from RUM data for the given site along with all the experiment details.

-
Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

-

Responses

Response samples

Content type
application/json
[
  • {
    }
]

audit

Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

+
source
required
string
Value: "ahrefs"
Example: ahrefs

The source of the top pages

+
geo
required
string
Example: au

The geo of the top pages

+

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieves all experiments for the site

This endpoint provide a list of experiments obtained from RUM data for the given site along with all the experiment details.

+
Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

+

Responses

Response samples

Content type
application/json
[
  • {
    }
]

audit

Audit operations

-

Retrieve all latest audits of a given type

Retrieve all latest audits of a given type

This endpoint is useful for retrieving all audits of a given type. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

This endpoint is useful for retrieving all audits of a given type. Optionally, the results can be sorted in ascending order by audited at date.

-
Authorizations:
api_key
path Parameters
auditType
required
string (AuditType)
Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
Example: cwv

The type of the audit

-
query Parameters
ascending
boolean
Default: false

Whether to sort ascending or descending

-

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve all audits for a site

Authorizations:
api_key
path Parameters
auditType
required
string (AuditType)
Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
Example: cwv

The type of the audit

+
query Parameters
ascending
boolean
Default: false

Whether to sort ascending or descending

+

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve all audits for a site

This endpoint is useful for retrieving all audits for a site. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

This endpoint is useful for retrieving all audits for a site. Optionally, the results can be sorted in ascending order by audited at date.

-
Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

-
query Parameters
ascending
boolean
Default: false

Whether to sort ascending or descending

-

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve all audits of a given type for a site

Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

+
query Parameters
ascending
boolean
Default: false

Whether to sort ascending or descending

+

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve all audits of a given type for a site

This endpoint is useful for retrieving all audits of a given type for a site. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

This endpoint is useful for retrieving all audits of a given type for a site. Optionally, the results can be sorted in ascending order by audited at date.

-
Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

-
auditType
required
string (AuditType)
Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
Example: cwv

The type of the audit

-
query Parameters
ascending
boolean
Default: false

Whether to sort ascending or descending

-

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve a single audit for a site

Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

+
auditType
required
string (AuditType)
Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
Example: cwv

The type of the audit

+
query Parameters
ascending
boolean
Default: false

Whether to sort ascending or descending

+

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve a single audit for a site

This endpoint is useful for retrieving a single audit for a site. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

This endpoint is useful for retrieving a single audit for a site. The audit is identified by the auditedAt property of the audit and the audit type.

-
Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

-
auditType
required
string (AuditType)
Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
Example: cwv

The type of the audit

-
auditedAt
required
string <date-time> (DateTime)
Example: 2024-01-19T14:20:30Z

The date and time of the audit in ISO 8601 format

-

Responses

Response samples

Content type
application/json
Example
{
  • "siteId": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
  • "auditedAt": "2024-01-20T12:00:00Z",
  • "expiresAt": "2024-07-20T12:00:00Z",
  • "auditType": "cwv",
  • "isError": false,
  • "deliveryType": "aem_edge",
  • "auditResult": {
    },
  • "previousAuditResult": {
    }
}

Retrieve all audits for a site

Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

+
auditType
required
string (AuditType)
Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
Example: cwv

The type of the audit

+
auditedAt
required
string <date-time> (DateTime)
Example: 2024-01-19T14:20:30Z

The date and time of the audit in ISO 8601 format

+

Responses

Response samples

Content type
application/json
Example
{
  • "siteId": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
  • "auditedAt": "2024-01-20T12:00:00Z",
  • "expiresAt": "2024-07-20T12:00:00Z",
  • "auditType": "cwv",
  • "isError": false,
  • "deliveryType": "aem_edge",
  • "auditResult": {
    },
  • "previousAuditResult": {
    }
}

Retrieve all audits for a site

This endpoint is useful for retrieving all audits for a site. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

This endpoint is useful for retrieving all audits for a site. Optionally, the results can be sorted in ascending order by audited at date.

-
Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

-
query Parameters
ascending
boolean
Default: false

Whether to sort ascending or descending

-

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve the latest audit for a site

Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

+
query Parameters
ascending
boolean
Default: false

Whether to sort ascending or descending

+

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve the latest audit for a site

This endpoint is useful for retrieving the latest audit for a site. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

This endpoint is useful for retrieving the latest audit for a site. The latest audit is determined by the given audit type and will be included in the audits array of the site object.

-
Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

-
auditType
required
string (AuditType)
Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
Example: cwv

The type of the audit

-

Responses

Response samples

Content type
application/json
Example
{
  • "siteId": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
  • "auditedAt": "2024-01-20T12:00:00Z",
  • "expiresAt": "2024-07-20T12:00:00Z",
  • "auditType": "cwv",
  • "isError": false,
  • "deliveryType": "aem_edge",
  • "auditResult": {
    },
  • "previousAuditResult": {
    }
}

Update the configuration for an audit

Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

+
auditType
required
string (AuditType)
Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
Example: cwv

The type of the audit

+

Responses

Response samples

Content type
application/json
Example
{
  • "siteId": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
  • "auditedAt": "2024-01-20T12:00:00Z",
  • "expiresAt": "2024-07-20T12:00:00Z",
  • "auditType": "cwv",
  • "isError": false,
  • "deliveryType": "aem_edge",
  • "auditResult": {
    },
  • "previousAuditResult": {
    }
}

Update the configuration for an audit

This endpoint is useful for updating the configuration for an audit, +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

This endpoint is useful for updating the configuration for an audit, for example to set which URLs to skip from the audit.

-
Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

-
auditType
required
string (AuditType)
Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
Example: cwv

The type of the audit

-
Request Body schema: application/json
required
excludedURLs
Array of strings

Set of urls to exclude. If empty, will remove previously excluded URLs.

-

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json
{}

site-audit

Authorizations:
api_key
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

+
auditType
required
string (AuditType)
Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
Example: cwv

The type of the audit

+
Request Body schema: application/json
required
excludedURLs
Array of strings

Set of urls to exclude. If empty, will remove previously excluded URLs.

+

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json
{}

site-audit

Site-audit operations

-

auth

auth

Init authentication against 3rd party services

-

Authenticate with Google

Authenticate with Google

This endpoint is used to authenticate with Google. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

This endpoint is used to authenticate with Google. The user will be redirected to the Google authentication flow.

-
path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

-

Responses

organization

path Parameters
siteId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The site ID in uuid format

+

Responses

organization

Organization operations

-

Create a new organization

This endpoint is useful for creating a new organization.

-
Authorizations:
admin_key
Request Body schema: application/json
required
name
required
string

The name of the organization

-
imsOrgId
string (ImsOrganizationId)

Optional. The ID of the Adobe IMS organization

-
object (OrganizationConfig)

Optional. The configuration of the organization

-

Responses

Request samples

Content type
application/json
{
  • "name": "Example Organization",
  • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
  • "config": {
    }
}

Response samples

Content type
application/json
{
  • "id": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
  • "name": "Example Organization",
  • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
  • "config": {
    },
  • "createdAt": "2023-12-15T09:30:00Z",
  • "updatedAt": "2024-01-19T11:20:00Z"
}

Retrieve all organizations

This endpoint is useful for retrieving all organizations.

-
Authorizations:
api_key

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve a single organization by its ID

This endpoint is useful for retrieving an organization by its ID.

-
Authorizations:
api_key
path Parameters
organizationId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The organization ID in uuid format

-

Responses

Response samples

Content type
application/json
{
  • "id": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
  • "name": "Example Organization",
  • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
  • "config": {
    },
  • "createdAt": "2023-12-15T09:30:00Z",
  • "updatedAt": "2024-01-19T11:20:00Z"
}

Update an organization

Create a new organization

This endpoint is useful for creating a new organization.

+
Authorizations:
admin_key
Request Body schema: application/json
required
name
required
string

The name of the organization

+
imsOrgId
string (ImsOrganizationId)

Optional. The ID of the Adobe IMS organization

+
object (OrganizationConfig)

Optional. The configuration of the organization

+

Responses

Request samples

Content type
application/json
{
  • "name": "Example Organization",
  • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
  • "config": {
    }
}

Response samples

Content type
application/json
{
  • "id": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
  • "name": "Example Organization",
  • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
  • "config": {
    },
  • "createdAt": "2023-12-15T09:30:00Z",
  • "updatedAt": "2024-01-19T11:20:00Z"
}

Retrieve all organizations

This endpoint is useful for retrieving all organizations.

+
Authorizations:
api_key

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve a single organization by its ID

This endpoint is useful for retrieving an organization by its ID.

+
Authorizations:
api_key
path Parameters
organizationId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The organization ID in uuid format

+

Responses

Response samples

Content type
application/json
{
  • "id": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
  • "name": "Example Organization",
  • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
  • "config": {
    },
  • "createdAt": "2023-12-15T09:30:00Z",
  • "updatedAt": "2024-01-19T11:20:00Z"
}

Update an organization

This endpoint is useful for updating an organization. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

This endpoint is useful for updating an organization. Only the fields as per the request body schema will be updated. At least one field to update must be provided in the request body.

-
Authorizations:
admin_key
path Parameters
organizationId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The organization ID in uuid format

-
Request Body schema: application/json
required
name
string

The name of the organization

-
imsOrgId
string (ImsOrganizationId)

Optional. The ID of the Adobe IMS organization

-
object (OrganizationConfig)

Optional. The configuration of the organization

-

Responses

Request samples

Content type
application/json
{
  • "name": "Example Organization",
  • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
  • "config": {
    }
}

Response samples

Content type
application/json
{
  • "id": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
  • "name": "Example Organization",
  • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
  • "config": {
    },
  • "createdAt": "2023-12-15T09:30:00Z",
  • "updatedAt": "2024-01-19T11:20:00Z"
}

Delete an organization

This endpoint is useful for deleting an organization.

-
Authorizations:
admin_key
path Parameters
organizationId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The organization ID in uuid format

-

Responses

Retrieve all sites for an organization

This endpoint is useful for retrieving all sites for an organization.

-
Authorizations:
api_key
path Parameters
organizationId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The organization ID in uuid format

-

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve an organization by IMS Org ID

This endpoint is useful for retrieving an organization by IMS Org ID.

-
Authorizations:
api_key
path Parameters
imsOrgId
required
string (ImsOrganizationId)
Example: 1234567890ABCDEF12345678@AdobeOrg

An IMS organization ID

-

Responses

Response samples

Content type
application/json
{
  • "id": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
  • "name": "Example Organization",
  • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
  • "config": {
    },
  • "createdAt": "2023-12-15T09:30:00Z",
  • "updatedAt": "2024-01-19T11:20:00Z"
}

Retrieve Slack config for an organization by IMS Org ID

Authorizations:
admin_key
path Parameters
organizationId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The organization ID in uuid format

+
Request Body schema: application/json
required
name
string

The name of the organization

+
imsOrgId
string (ImsOrganizationId)

Optional. The ID of the Adobe IMS organization

+
object (OrganizationConfig)

Optional. The configuration of the organization

+

Responses

Request samples

Content type
application/json
{
  • "name": "Example Organization",
  • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
  • "config": {
    }
}

Response samples

Content type
application/json
{
  • "id": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
  • "name": "Example Organization",
  • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
  • "config": {
    },
  • "createdAt": "2023-12-15T09:30:00Z",
  • "updatedAt": "2024-01-19T11:20:00Z"
}

Delete an organization

This endpoint is useful for deleting an organization.

+
Authorizations:
admin_key
path Parameters
organizationId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The organization ID in uuid format

+

Responses

Retrieve all sites for an organization

This endpoint is useful for retrieving all sites for an organization.

+
Authorizations:
api_key
path Parameters
organizationId
required
string <uuid> (Id)
Example: 123e4567-e89b-12d3-a456-426614174000

The organization ID in uuid format

+

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve an organization by IMS Org ID

This endpoint is useful for retrieving an organization by IMS Org ID.

+
Authorizations:
api_key
path Parameters
imsOrgId
required
string (ImsOrganizationId)
Example: 1234567890ABCDEF12345678@AdobeOrg

An IMS organization ID

+

Responses

Response samples

Content type
application/json
{
  • "id": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
  • "name": "Example Organization",
  • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
  • "config": {
    },
  • "createdAt": "2023-12-15T09:30:00Z",
  • "updatedAt": "2024-01-19T11:20:00Z"
}

Retrieve Slack config for an organization by IMS Org ID

This endpoint is useful for retrieving the Slack config of an +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

This endpoint is useful for retrieving the Slack config of an organization by IMS Org ID.

-
Authorizations:
api_key
path Parameters
imsOrgId
required
string (ImsOrganizationId)
Example: 1234567890ABCDEF12345678@AdobeOrg

An IMS organization ID

-

Responses

Response samples

Content type
application/json
{}

trigger

Authorizations:
api_key
path Parameters
imsOrgId
required
string (ImsOrganizationId)
Example: 1234567890ABCDEF12345678@AdobeOrg

An IMS organization ID

+

Responses

Response samples

Content type
application/json
{}

trigger

Trigger operations

-

Trigger an audit Deprecated

Trigger an audit Deprecated

Warning: This API is deprecated, will be removed in future versions and should no longer be used or enhanced. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

Warning: This API is deprecated, will be removed in future versions and should no longer be used or enhanced. Please use the Slack commands to trigger audits on-demand.

This endpoint is useful for triggering an audit. The audit will be run asynchronously and the response will be returned immediately.

@@ -1166,643 +1166,645 @@
  • lhs-mobile
  • The URL can be either a site ID or a base URL depending on the audit type.

    -
    Authorizations:
    admin_key
    query Parameters
    url
    required
    string

    The URL or Site ID to trigger the audit for

    -
    type
    required
    string (AuditType)
    Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
    Example: type=cwv

    The type of the audit to trigger

    -

    Responses

    hooks

    Authorizations:
    admin_key
    query Parameters
    url
    required
    string

    The URL or Site ID to trigger the audit for

    +
    type
    required
    string (AuditType)
    Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
    Example: type=cwv

    The type of the audit to trigger

    +

    Responses

    hooks

    Webhooks for receiving events

    -

    Process fulfillment_completed events

    Process fulfillment_completed events

    This endpoint can be used to process an array of fulfillment_completed +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint can be used to process an array of fulfillment_completed events, in the format produced by the Fulfillment Gateway and delivered by the Hoolihan pipeline. In particular, it is intended to be used to handle contract fulfillment events which involve an Edge Delivery Services fulfillable item "code".

    -
    Authorizations:
    admin_key
    Request Body schema: application/json
    required
    Array
    id
    required
    string

    The Hoolihan ID of the event

    -
    topic
    required
    string

    The name of the Hoolihan topic that the event was received on

    -
    required
    object (HoolihanEventValue)

    Value of the event, which contains the message payload from the publishing system

    -
    partition
    required
    integer

    The partition index that the event was received on

    -
    offset
    required
    integer

    The offset of the event within the partition

    -

    Responses

    Request samples

    Content type
    application/json
    [
    • {
      }
    ]

    Response samples

    Content type
    application/json
    [
    • {
      },
    • {
      }
    ]

    Process incoming site discovery hooks from CDN logs

    Authorizations:
    admin_key
    Request Body schema: application/json
    required
    Array
    id
    required
    string

    The Hoolihan ID of the event

    +
    topic
    required
    string

    The name of the Hoolihan topic that the event was received on

    +
    required
    object (HoolihanEventValue)

    Value of the event, which contains the message payload from the publishing system

    +
    partition
    required
    integer

    The partition index that the event was received on

    +
    offset
    required
    integer

    The offset of the event within the partition

    +

    Responses

    Request samples

    Content type
    application/json
    [
    • {
      }
    ]

    Response samples

    Content type
    application/json
    [
    • {
      },
    • {
      }
    ]

    Process incoming site discovery hooks from CDN logs

    This endpoint processes hooks that include x-forwarded-host header value from CDN logs +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint processes hooks that include x-forwarded-host header value from CDN logs Upon receiving the incoming webhook, it initiates a sequence of validation and sanitization procedures Once successful sanitization and validation are completed, it proceeds to send a Slack message notifying about the discovered domain

    -
    Authorizations:
    api_key
    path Parameters
    hookSecret
    required
    string

    Secret for the incoming webhook

    -
    Request Body schema: application/json
    required
    forwardedHost
    string

    value of x-forwarded-host header in the CDN log which trggered the domain discovery alert

    -
    property name*
    additional property
    any

    Responses

    Request samples

    Content type
    application/json
    {
    • "forwardedHost": "blog.adobe.com, main--blog--adobecom.hlx.live, main--blog--adobecom.hlx.live, main--blog--adobecom.hlx-fastly.page"
    }

    Process incoming site discovery hooks from RUM logs

    Authorizations:
    api_key
    path Parameters
    hookSecret
    required
    string

    Secret for the incoming webhook

    +
    Request Body schema: application/json
    required
    forwardedHost
    string

    value of x-forwarded-host header in the CDN log which trggered the domain discovery alert

    +
    property name*
    additional property
    any

    Responses

    Request samples

    Content type
    application/json
    {
    • "forwardedHost": "blog.adobe.com, main--blog--adobecom.hlx.live, main--blog--adobecom.hlx.live, main--blog--adobecom.hlx-fastly.page"
    }

    Process incoming site discovery hooks from RUM logs

    This endpoint processes hooks that include URL and domain information from RUM logs +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint processes hooks that include URL and domain information from RUM logs Upon receiving the incoming webhook, it initiates a sequence of validation and sanitization procedures Once successful sanitization and validation are completed, it proceeds to send a Slack message notifying about the discovered domain

    -
    Authorizations:
    api_key
    path Parameters
    hookSecret
    required
    string

    Secret for the incoming webhook

    -
    Request Body schema: application/json
    required
    url
    string <url> (URL)

    URL of the page which triggered the domain discovery alert

    -
    domain
    string <domain> (Domain)

    Domain of the page which triggered the domain discovery alert

    -
    property name*
    additional property
    any

    Responses

    Request samples

    Content type
    application/json
    {}

    Process setup completed events for site integration with analytics

    Authorizations:
    api_key
    path Parameters
    hookSecret
    required
    string

    Secret for the incoming webhook

    +
    Request Body schema: application/json
    required
    url
    string <url> (URL)

    URL of the page which triggered the domain discovery alert

    +
    domain
    string <domain> (Domain)

    Domain of the page which triggered the domain discovery alert

    +
    property name*
    additional property
    any

    Responses

    Request samples

    Content type
    application/json
    {}

    Process setup completed events for site integration with analytics

    Not implemented yet (will be via https://github.com/adobe/spacecat-api-service/issues/237). +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    Not implemented yet (will be via https://github.com/adobe/spacecat-api-service/issues/237). Process setup completed events for site integration with analytics.

    -
    Authorizations:
    api_key
    path Parameters
    hookSecret
    required
    string

    Secret for the incoming webhook

    -
    Request Body schema: application/json
    required
    required
    object

    The reporting details

    -
    required
    object

    The configuration for the data collection to embed on the site.

    -
    required
    object

    The data store details

    -
    object

    The data schema details

    -
    required
    object

    The data mapping details

    -
    property name*
    additional property
    any

    Responses

    Request samples

    Content type
    application/json
    Example
    {}

    slack

    Authorizations:
    api_key
    path Parameters
    hookSecret
    required
    string

    Secret for the incoming webhook

    +
    Request Body schema: application/json
    required
    required
    object

    The reporting details

    +
    required
    object

    The configuration for the data collection to embed on the site.

    +
    required
    object

    The data store details

    +
    object

    The data schema details

    +
    required
    object

    The data mapping details

    +
    property name*
    additional property
    any

    Responses

    Request samples

    Content type
    application/json
    Example
    {}

    slack

    Slack channel management

    -

    Request invitation to an existing Slack channel of an organization

    Request invitation to an existing Slack channel of an organization

    This endpoint can be used to invite a user to their organization's Slack +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint can be used to invite a user to their organization's Slack channel by IMS user ID, which is read from the IMS API via the provided user access token. As a prerequisite, there must be an existing Spacecat organization and Slack channel for the given IMS org ID.

    -
    Authorizations:
    admin_key
    Request Body schema: application/json
    required
    imsOrgId
    required
    string (ImsOrganizationId)

    The ID of the Adobe IMS organization

    -
    imsUserAccessToken
    required
    string (ImsUserAccessToken)

    The IMS access token of the user to invite to the Slack channel

    -

    Responses

    Request samples

    Content type
    application/json
    {
    • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
    • "imsUserAccessToken": "eyJhbGciOiJIUzI1NiJ9.eyJpZCI6IjEyMzQ1IiwidHlwZSI6ImFjY2Vzc190b2tlbiIsImNsaWVudF9pZCI6ImV4YW1wbGVfYXBwIiwidXNlcl9pZCI6Ijk4NzY1NDc4OTBBQkNERUYxMjM0NTY3OEBhYmNkZWYxMjM0NTY3ODkuZSIsImFzIjoiaW1zLW5hMSIsImFhX2lkIjoiMTIzNDU2Nzg5MEFCQ0RFRjEyMzQ1Njc4QGFkb2JlLmNvbSIsImNyZWF0ZWRfYXQiOiIxNzEwMjQ3MDAwMDAwIn0.MRDpxgxSHDj4DmA182hPnjMAnKkly-VUJ_bXpQ-J8EQ"
    }

    api-keys

    Authorizations:
    admin_key
    Request Body schema: application/json
    required
    imsOrgId
    required
    string (ImsOrganizationId)

    The ID of the Adobe IMS organization

    +
    imsUserAccessToken
    required
    string (ImsUserAccessToken)

    The IMS access token of the user to invite to the Slack channel

    +

    Responses

    Request samples

    Content type
    application/json
    {
    • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
    • "imsUserAccessToken": "eyJhbGciOiJIUzI1NiJ9.eyJpZCI6IjEyMzQ1IiwidHlwZSI6ImFjY2Vzc190b2tlbiIsImNsaWVudF9pZCI6ImV4YW1wbGVfYXBwIiwidXNlcl9pZCI6Ijk4NzY1NDc4OTBBQkNERUYxMjM0NTY3OEBhYmNkZWYxMjM0NTY3ODkuZSIsImFzIjoiaW1zLW5hMSIsImFhX2lkIjoiMTIzNDU2Nzg5MEFCQ0RFRjEyMzQ1Njc4QGFkb2JlLmNvbSIsImNyZWF0ZWRfYXQiOiIxNzEwMjQ3MDAwMDAwIn0.MRDpxgxSHDj4DmA182hPnjMAnKkly-VUJ_bXpQ-J8EQ"
    }

    api-keys

    API key management

    -

    Create a new API key

    Create a new API key

    Note: Not implemented yet.

    +returned in the response only once. The scoped API key, with the &#39;imports.assistant&#39; scope, can be +used to authenticate the Spacecat APIs by including it in the x-api-key header.</p> +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    Note: Not implemented yet.

    This endpoint can be used to create a new API key with a set of scopes. The scoped API key will be -returned in the response only once. The scoped API key can be used to authenticate the Spacecat APIs by -including it in the x-api-key header.

    -
    Authorizations:
    ims_key
    header Parameters
    x-gw-ims-org-id
    string
    Example: 1234567890ABCDEF12345678@AdobeOrg

    IMS Organization Id of the client.

    -
    Request Body schema: application/json
    name
    required
    string

    The name of the API key

    -
    features
    required
    Array of strings

    The features the API key is for

    -
    domains
    required
    Array of strings <domain> (Domain) [ items <domain > ]

    The domains the API key is allowed to access

    -

    Responses

    Request samples

    Content type
    application/json
    {
    • "name": "Example API Key",
    • "features": [
      ],
    • "domains": [
      ]
    }

    Response samples

    Content type
    application/json
    {
    • "id": "123e4567-e89b-12d3-a456-426614174000",
    • "name": "string",
    • "scopes": [
      ],
    • "createdAt": "2024-01-19T14:20:30Z",
    • "expiresAt": "2024-01-19T14:20:30Z",
    • "apiKey": "string"
    }

    Get all API keys owned by the given IMS client

    Authorizations:
    ims_key
    header Parameters
    x-gw-ims-org-id
    string
    Example: 1234567890ABCDEF12345678@AdobeOrg

    IMS Organization Id of the client.

    +
    Request Body schema: application/json
    name
    required
    string

    The name of the API key

    +
    features
    required
    Array of strings

    The features the API key is for

    +
    domains
    required
    Array of strings <domain> (Domain) [ items <domain > ]

    The domains the API key is allowed to access

    +

    Responses

    Request samples

    Content type
    application/json
    {
    • "name": "Example API Key",
    • "features": [
      ],
    • "domains": [
      ]
    }

    Response samples

    Content type
    application/json
    {
    • "id": "123e4567-e89b-12d3-a456-426614174000",
    • "name": "string",
    • "scopes": [
      ],
    • "createdAt": "2024-01-19T14:20:30Z",
    • "expiresAt": "2024-01-19T14:20:30Z",
    • "apiKey": "string"
    }

    Get all API keys owned by the given IMS client

    Note: Not implemented yet.

    +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    Note: Not implemented yet.

    This endpoint can be used to list all the API keys created by the client.

    -
    Authorizations:
    ims_key
    header Parameters
    x-gw-ims-org-id
    string
    Example: 1234567890ABCDEF12345678@AdobeOrg

    IMS Organization Id of the client.

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Delete an API key

    Authorizations:
    ims_key
    header Parameters
    x-gw-ims-org-id
    string
    Example: 1234567890ABCDEF12345678@AdobeOrg

    IMS Organization Id of the client.

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Delete an API key

    Note: Not implemented yet.

    +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    Note: Not implemented yet.

    This endpoint can be used to delete an API key. The API key will be marked as deleted in the system and will no longer be valid for authentication. Only keys created by this IMS client can be deleted by it.

    -
    Authorizations:
    ims_key
    path Parameters
    apiKeyId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The API key ID in uuid format

    -
    header Parameters
    x-gw-ims-org-id
    string
    Example: 1234567890ABCDEF12345678@AdobeOrg

    IMS Organization Id of the client.

    -

    Responses

    import

    Authorizations:
    ims_key
    path Parameters
    apiKeyId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The API key ID in uuid format

    +
    header Parameters
    x-gw-ims-org-id
    string
    Example: 1234567890ABCDEF12345678@AdobeOrg

    IMS Organization Id of the client.

    +

    Responses

    import

    APIs for importing content to Edge Delivery Services

    -

    Create a new import job

    Create a new import job

    This endpoint can be used to start a new import job with a set of URLs, import API key, +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint can be used to start a new import job with a set of URLs, import API key, optional import.js mapping file, and optional custom headers. The import job will be processed asynchronously and the status of the job can be queried at the /tools/import/jobs/{jobId} endpoint. If there is no import queue available at the time of the request, a 503 Service Unavailable response will be returned. A single import job per client is permitted, otherwise a 429 Too Many Requests response will be returned.

    -
    Authorizations:
    scoped_api_key
    header Parameters
    x-api-key
    string
    Authorizations:
    scoped_api_key
    header Parameters
    x-api-key
    string

    Client-specific import API key. This same key will be required to fetch the job status, +" class="sc-epnzzT sc-eMwmJz drsioI ewnBNs">

    Client-specific import API key. This same key will be required to fetch the job status, and final .zip result.

    -
    Request Body schema: multipart/form-data
    required
    urls
    required
    Array of strings <url> (URL) [ items <url > ]

    The URLs to import

    -
    object (ImportOptions)

    Optional configuration params, defined as a JSON object

    -
    importScript
    string <binary>

    Optional import.js mapping file

    -
    customHeaders
    object

    Optional custom headers to send with each HTTP request

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "id": "12d6ac8e-d5e4-4788-90eb-b69e10e745fd",
    • "status": "RUNNING",
    • "startTime": "2024-01-19T14:20:30Z",
    • "urlCount": 25,
    • "successCount": 15,
    • "failedCount": 0
    }

    Query the status of an import job

    This endpoint can be used to query the status of an import job, given its jobId.

    -
    Authorizations:
    scoped_api_key
    path Parameters
    jobId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The job ID in uuid format

    -
    header Parameters
    x-api-key
    string

    Client-specific import API key. Must match the key used to start the import job.

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "id": "12d6ac8e-d5e4-4788-90eb-b69e10e745fd",
    • "status": "RUNNING",
    • "startTime": "2024-01-19T14:20:30Z",
    • "urlCount": 25,
    • "successCount": 15,
    • "failedCount": 0
    }

    Delete an import job

    Request Body schema: multipart/form-data
    required
    urls
    required
    Array of strings <url> (URL) [ items <url > ]

    The URLs to import

    +
    object (ImportOptions)

    Optional configuration params, defined as a JSON object

    +
    importScript
    string <binary>

    Optional import.js mapping file

    +
    customHeaders
    object

    Optional custom headers to send with each HTTP request

    +

    Responses

    Response samples

    Content type
    application/json
    {
    • "id": "12d6ac8e-d5e4-4788-90eb-b69e10e745fd",
    • "status": "RUNNING",
    • "startTime": "2024-01-19T14:20:30Z",
    • "urlCount": 25,
    • "successCount": 15,
    • "failedCount": 0
    }

    Query the status of an import job

    This endpoint can be used to query the status of an import job, given its jobId.

    +
    Authorizations:
    scoped_api_key
    path Parameters
    jobId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The job ID in uuid format

    +
    header Parameters
    x-api-key
    string

    Client-specific import API key. Must match the key used to start the import job.

    +

    Responses

    Response samples

    Content type
    application/json
    {
    • "id": "12d6ac8e-d5e4-4788-90eb-b69e10e745fd",
    • "status": "RUNNING",
    • "startTime": "2024-01-19T14:20:30Z",
    • "urlCount": 25,
    • "successCount": 15,
    • "failedCount": 0
    }

    Delete an import job

    This endpoint can be used to delete an import job, given its jobId. This operation will remove +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint can be used to delete an import job, given its jobId. This operation will remove all import URL entities in addition to the import job itself. The imports.delete scope is required on the API key used to delete the import job, and only jobs created by the provided key can be deleted.

    -
    Authorizations:
    scoped_api_key
    path Parameters
    jobId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The job ID in uuid format

    -
    header Parameters
    x-api-key
    string
    Authorizations:
    scoped_api_key
    path Parameters
    jobId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The job ID in uuid format

    +
    header Parameters
    x-api-key
    string

    Client-specific import API key. Must match the key used to start the import job, and +" class="sc-epnzzT sc-eMwmJz drsioI ewnBNs">

    Client-specific import API key. Must match the key used to start the import job, and include the imports.delete scope.

    -

    Responses

    Query the progress of an import job

    This endpoint can be used to query the progress of an import job, given its jobId.

    -
    Authorizations:
    scoped_api_key
    path Parameters
    jobId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The job ID in uuid format

    -
    header Parameters
    x-api-key
    string

    Client-specific import API key. Must match the key used to start the import job.

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "pending": 0,
    • "redirect": 0,
    • "running": 0,
    • "completed": 1,
    • "failed": 0
    }

    Request a pre-signed URL to download the result of an import job as a .zip archive

    Responses

    Query the progress of an import job

    This endpoint can be used to query the progress of an import job, given its jobId.

    +
    Authorizations:
    scoped_api_key
    path Parameters
    jobId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The job ID in uuid format

    +
    header Parameters
    x-api-key
    string

    Client-specific import API key. Must match the key used to start the import job.

    +

    Responses

    Response samples

    Content type
    application/json
    {
    • "pending": 0,
    • "redirect": 0,
    • "running": 0,
    • "completed": 1,
    • "failed": 0
    }

    Request a pre-signed URL to download the result of an import job as a .zip archive

    This endpoint can be used to download an archive of an import job, which will include +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint can be used to download an archive of an import job, which will include all the resulting documents that were generated as part of the import. It will also include the import-report.xlsx file, which contains a summary of the import job.

    -
    Authorizations:
    scoped_api_key
    path Parameters
    jobId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The job ID in uuid format

    -
    header Parameters
    x-api-key
    string

    Client-specific import API key. Must match the key used to start the import job.

    -

    Responses

    Response samples

    Content type
    application/json

    Send a prompt to the import assistant

    Authorizations:
    scoped_api_key
    path Parameters
    jobId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The job ID in uuid format

    +
    header Parameters
    x-api-key
    string

    Client-specific import API key. Must match the key used to start the import job.

    +

    Responses

    Response samples

    Content type
    application/json

    Send a prompt to the import assistant

    Note: Not implemented yet.

    -

    This endpoint can be used to send prompts to the import assistant. +choices in response to the request. The provided API key must +have the &#39;imports.assistant&#39; scope.</p> +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    Note: Not implemented yet.

    +

    This endpoint can be used to send prompts to the import assistant. Each prompt will make use of AI to analyze a URL and return -choices in response to the request.

    -
    Authorizations:
    scoped_api_key
    header Parameters
    x-api-key
    string

    Client-specific import API key.

    -
    Request Body schema: application/json
    url
    required
    string <url> (URL)

    The URL to analyze

    -
    command
    required
    string

    Assistant command to execute. Examples are 'start', 'cleanup', 'block', 'cells'.

    -
    prompt
    string

    Optional prompt to provide context for the analysis.

    -
    options
    object

    Optional configuration options required by the command.

    -

    Responses

    Request samples

    Content type
    application/json
    {}

    Response samples

    Content type
    application/json
    {
    • "choices": [
      ]
    }

    scrape

    Authorizations:
    scoped_api_key
    header Parameters
    x-api-key
    string

    Client-specific import API key with the 'imports.assistant' scope.

    +
    Request Body schema: application/json
    url
    required
    string <url> (URL)

    The URL to analyze

    +
    command
    required
    string

    Assistant command to execute. Examples are 'start', 'cleanup', 'block', 'cells'.

    +
    prompt
    string

    Optional prompt to provide context for the analysis.

    +
    options
    object

    Optional configuration options required by the command.

    +

    Responses

    Request samples

    Content type
    application/json
    {}

    Response samples

    Content type
    application/json
    {
    • "choices": [
      ]
    }

    scrape

    APIs for scraping web pages

    -

    Scrape a set of URLs

    Scrape a set of URLs

    Warning: prototype endpoint. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    Warning: prototype endpoint. This endpoint allows you to scrape a set of URLs. The URLs are scraped in parallel and the results are returned in the same order as the input. The maximum number of URLs that can be scraped in a single request is 10.

    -
    Authorizations:
    api_key
    Request Body schema: application/json
    urls
    required
    Array of strings <url> (URL) [ items <url > ]

    The URLs to scrape. The URLs must be unique. Limit of 10 URLs per request.

    -

    Responses

    Request samples

    Content type
    application/json

    Response samples

    Content type
    application/json
    {
    • "id": "12d6ac8e-d5e4-4788-90eb-b69e10e745fd",
    • "status": "COMPLETE",
    • "startTime": "2024-01-19T14:20:30Z",
    • "urlCount": 10,
    • "successCount": 9,
    • "failedCount": 1,
    • "results": []
    }

    configuration

    Get all application configurations

    Authorizations:
    admin_key

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Get the latest application configuration

    Authorizations:
    admin_key

    Responses

    Response samples

    Content type
    application/json
    {
    • "version": "string",
    • "jobs": [
      ],
    • "queues": {
      }
    }

    Get a specific version of the application configuration

    Authorizations:
    admin_key
    path Parameters
    version
    required
    string

    Responses

    Response samples

    Content type
    application/json
    {
    • "version": "string",
    • "jobs": [
      ],
    • "queues": {
      }
    }

    configurations-sites-audits

    Enable or disable audits for sites

    Use this endpoint to enable or disable specific audit types for your sites.

    -
    Authorizations:
    admin_key
    Request Body schema: application/json
    required
    Array
    baseURL
    required
    string <url> (URL)
    auditType
    required
    string

    The type of audit to be enabled or disabled.

    -
    enable
    required
    boolean

    Set to true to enable the audit, or false to disable it.

    -

    Responses

    Request samples

    Content type
    application/json
    []

    Response samples

    Content type
    application/json
    {
    • "status": 0,
    • "message": "string"
    }

    key event

    Retrieve key events for a site

    This endpoint returns key events for a site chronologically, starting from the most recent and descending to the least recent

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a new key event for a site

    The endpoint for creating new key events for a site

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -
    Request Body schema: application/json
    required
    name
    required
    string

    Name of the key event

    -
    type
    required
    string (KeyEventType)
    Enum: "performance" "seo" "content" "code" "third party" "experimentation" "network" "status change"
    time
    string <date-time> (DateTime)

    Time of the key event occurred (optional). Current time is used when the field is missing

    -

    Responses

    Request samples

    Content type
    application/json
    {
    • "name": "string",
    • "type": "performance",
    • "time": "2024-01-19T14:20:30Z"
    }

    Response samples

    Content type
    application/json
    {
    • "id": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
    • "name": "Multiple 404s detected",
    • "type": "seo",
    • "time": "2023-12-15T09:30:00Z"
    }

    Delete a key event

    The endpoint for deleting a key event

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -
    keyEventId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The key event ID in uuid format

    -

    Responses

    top pages

    Retrieve top pages for site

    Authorizations:
    api_key
    Request Body schema: application/json
    urls
    required
    Array of strings <url> (URL) [ items <url > ]

    The URLs to scrape. The URLs must be unique. Limit of 10 URLs per request.

    +

    Responses

    Request samples

    Content type
    application/json

    Response samples

    Content type
    application/json
    {
    • "id": "12d6ac8e-d5e4-4788-90eb-b69e10e745fd",
    • "status": "COMPLETE",
    • "startTime": "2024-01-19T14:20:30Z",
    • "urlCount": 10,
    • "successCount": 9,
    • "failedCount": 1,
    • "results": []
    }

    configuration

    Get all application configurations

    Authorizations:
    admin_key

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Get the latest application configuration

    Authorizations:
    admin_key

    Responses

    Response samples

    Content type
    application/json
    {
    • "version": "string",
    • "jobs": [
      ],
    • "queues": {
      }
    }

    Get a specific version of the application configuration

    Authorizations:
    admin_key
    path Parameters
    version
    required
    string

    Responses

    Response samples

    Content type
    application/json
    {
    • "version": "string",
    • "jobs": [
      ],
    • "queues": {
      }
    }

    configurations-sites-audits

    Enable or disable audits for sites

    Use this endpoint to enable or disable specific audit types for your sites.

    +
    Authorizations:
    admin_key
    Request Body schema: application/json
    required
    Array
    baseURL
    required
    string <url> (URL)
    auditType
    required
    string

    The type of audit to be enabled or disabled.

    +
    enable
    required
    boolean

    Set to true to enable the audit, or false to disable it.

    +

    Responses

    Request samples

    Content type
    application/json
    []

    Response samples

    Content type
    application/json
    {
    • "status": 0,
    • "message": "string"
    }

    key event

    Retrieve key events for a site

    This endpoint returns key events for a site chronologically, starting from the most recent and descending to the least recent

    +
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a new key event for a site

    The endpoint for creating new key events for a site

    +
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +
    Request Body schema: application/json
    required
    name
    required
    string

    Name of the key event

    +
    type
    required
    string (KeyEventType)
    Enum: "performance" "seo" "content" "code" "third party" "experimentation" "network" "status change"
    time
    string <date-time> (DateTime)

    Time of the key event occurred (optional). Current time is used when the field is missing

    +

    Responses

    Request samples

    Content type
    application/json
    {
    • "name": "string",
    • "type": "performance",
    • "time": "2024-01-19T14:20:30Z"
    }

    Response samples

    Content type
    application/json
    {
    • "id": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
    • "name": "Multiple 404s detected",
    • "type": "seo",
    • "time": "2023-12-15T09:30:00Z"
    }

    Delete a key event

    The endpoint for deleting a key event

    +
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +
    keyEventId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The key event ID in uuid format

    +

    Responses

    top pages

    Retrieve top pages for site

    Not implemented yet. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    Not implemented yet. This endpoint is useful for retrieving top pages for a site. The top pages will be ordered in buckets by source and geo, and in descending order by traffic within these buckets.

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve top pages for site by source

    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve top pages for site by source

    Not implemented yet. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    Not implemented yet. This endpoint is useful for retrieving top pages for a site. The top pages will be ordered in buckets by geo, and in descending order by traffic within these buckets.

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -
    source
    required
    string
    Value: "ahrefs"
    Example: ahrefs

    The source of the top pages

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve top pages for site by source and geo

    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +
    source
    required
    string
    Value: "ahrefs"
    Example: ahrefs

    The source of the top pages

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve top pages for site by source and geo

    Not implemented yet. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    Not implemented yet. This endpoint is useful for retrieving top pages for a site. The top pages will be ordered in descending order by traffic.

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -
    source
    required
    string
    Value: "ahrefs"
    Example: ahrefs

    The source of the top pages

    -
    geo
    required
    string
    Example: au

    The geo of the top pages

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    experimental

    Retrieve site metrics by source

    This endpoint is useful for retrieving site metrics by source.

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -
    source
    required
    string
    Value: "ahrefs"
    Example: ahrefs

    The source of the top pages

    -
    metric
    required
    string
    Value: "organic-traffic"
    Example: organic-traffic

    The name of the site metric

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    experiments

    Retrieves all experiments for the site

    This endpoint provide a list of experiments obtained from RUM data for the given site along with all the experiment details.

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]
    +
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +
    source
    required
    string
    Value: "ahrefs"
    Example: ahrefs

    The source of the top pages

    +
    geo
    required
    string
    Example: au

    The geo of the top pages

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    experimental

    Retrieve site metrics by source

    This endpoint is useful for retrieving site metrics by source.

    +
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +
    source
    required
    string
    Value: "ahrefs"
    Example: ahrefs

    The source of the top pages

    +
    metric
    required
    string
    Value: "organic-traffic"
    Example: organic-traffic

    The name of the site metric

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    experiments

    Retrieves all experiments for the site

    This endpoint provide a list of experiments obtained from RUM data for the given site along with all the experiment details.

    +
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]
    -

    SpaceCat API (1.75.17)

    Download OpenAPI specification:Download

    The SpaceCat API is used to manage edge delivery site directory and obtain audit information.

    -

    Authentication

    api_key

    DEPRECATED, use scoped_api_key or ims_key. (Used for read-only operations.)

    -
    Security Scheme Type: API Key
    Header parameter name: x-api-key

    scoped_api_key

    For endpoints which authenticate with scoped API keys

    -
    Security Scheme Type: API Key
    Header parameter name: x-api-key

    ims_key

    Value must be a valid IMS user token which will be offline-validated.

    -
    Security Scheme Type: API Key
    Header parameter name: authorization

    admin_key

    DEPRECATED, use scoped_api_key or ims_key. (Used for read and write operations.)

    -
    Security Scheme Type: API Key
    Header parameter name: x-api-key

    site

    SpaceCat API (1.75.19)

    Download OpenAPI specification:Download

    The SpaceCat API is used to manage edge delivery site directory and obtain audit information.

    +

    Authentication

    api_key

    DEPRECATED, use scoped_api_key or ims_key. (Used for read-only operations.)

    +
    Security Scheme Type: API Key
    Header parameter name: x-api-key

    scoped_api_key

    For endpoints which authenticate with scoped API keys

    +
    Security Scheme Type: API Key
    Header parameter name: x-api-key

    ims_key

    Value must be a valid IMS user token which will be offline-validated.

    +
    Security Scheme Type: API Key
    Header parameter name: authorization

    admin_key

    DEPRECATED, use scoped_api_key or ims_key. (Used for read and write operations.)

    +
    Security Scheme Type: API Key
    Header parameter name: x-api-key

    site

    Site operations

    -

    Retrieve all sites for an organization

    This endpoint is useful for retrieving all sites for an organization.

    -
    Authorizations:
    api_key
    path Parameters
    organizationId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The organization ID in uuid format

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a new site

    This endpoint is useful for creating a new site.

    -
    Authorizations:
    admin_key
    Request Body schema: application/json
    required
    baseURL
    required
    string <url> (URL)

    The base URL of the site

    -
    deliveryType
    required
    string (DeliveryType)
    Enum: "aem_edge" "aem_cs" "other"

    The type of the delivery this site is using

    -
    gitHubURL
    string <url> (URL)

    The optional GitHub URL of the site

    -
    goLiveDate
    string or null <date-time> (DateTime)

    The date and time when the site went live on AEM Edge

    -

    Responses

    Request samples

    Content type
    application/json
    {
    • "organizationId": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
    • "deliveryType": "aem_cs"
    }

    Response samples

    Content type
    application/json
    {
    • "id": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
    • "organizationId": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
    • "deliveryType": "aem_edge",
    • "goLiveDate": "2024-01-20T10:00:00Z",
    • "config": {
      },
    • "createdAt": "2023-12-15T09:30:00Z",
    • "updatedAt": "2024-01-19T11:20:00Z"
    }

    Retrieve all sites

    This endpoint is useful for retrieving all sites.

    -
    Authorizations:
    api_key

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve all sites by delivery type

    This endpoint is useful for retrieving all sites by delivery type.

    -
    Authorizations:
    api_key
    path Parameters
    deliveryType
    required
    string (DeliveryType)
    Enum: "aem_edge" "aem_cs" "other"
    Example: aem_edge

    The type of the delivery this site is using

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve a single site by its Base URL

    Retrieve all sites for an organization

    This endpoint is useful for retrieving all sites for an organization.

    +
    Authorizations:
    api_key
    path Parameters
    organizationId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The organization ID in uuid format

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a new site

    This endpoint is useful for creating a new site.

    +
    Authorizations:
    admin_key
    Request Body schema: application/json
    required
    baseURL
    required
    string <url> (URL)

    The base URL of the site

    +
    deliveryType
    required
    string (DeliveryType)
    Enum: "aem_edge" "aem_cs" "other"

    The type of the delivery this site is using

    +
    gitHubURL
    string <url> (URL)

    The optional GitHub URL of the site

    +
    goLiveDate
    string or null <date-time> (DateTime)

    The date and time when the site went live on AEM Edge

    +

    Responses

    Request samples

    Content type
    application/json
    {
    • "organizationId": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
    • "deliveryType": "aem_cs"
    }

    Response samples

    Content type
    application/json
    {
    • "id": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
    • "organizationId": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
    • "deliveryType": "aem_edge",
    • "goLiveDate": "2024-01-20T10:00:00Z",
    • "config": {
      },
    • "createdAt": "2023-12-15T09:30:00Z",
    • "updatedAt": "2024-01-19T11:20:00Z"
    }

    Retrieve all sites

    This endpoint is useful for retrieving all sites.

    +
    Authorizations:
    api_key

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve all sites by delivery type

    This endpoint is useful for retrieving all sites by delivery type.

    +
    Authorizations:
    api_key
    path Parameters
    deliveryType
    required
    string (DeliveryType)
    Enum: "aem_edge" "aem_cs" "other"
    Example: aem_edge

    The type of the delivery this site is using

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve a single site by its Base URL

    This endpoint is useful for retrieving a site when you only have its Base URL. The Base URL is a unique identifier for a site other than the Site ID. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint is useful for retrieving a site when you only have its Base URL. The Base URL is a unique identifier for a site other than the Site ID. The base URL provided in the path must be base64 encoded. This is to allow for URLs with special characters to be used as path parameters.

    -
    Authorizations:
    api_key
    path Parameters
    base64BaseUrl
    required
    string <base64url>

    Base64-encoded base URL

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "id": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
    • "organizationId": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
    • "deliveryType": "aem_edge",
    • "goLiveDate": "2024-01-20T10:00:00Z",
    • "config": {
      },
    • "createdAt": "2023-12-15T09:30:00Z",
    • "updatedAt": "2024-01-19T11:20:00Z"
    }

    Retrieve all sites including their latest audit

    Authorizations:
    api_key
    path Parameters
    base64BaseUrl
    required
    string <base64url>

    Base64-encoded base URL

    +

    Responses

    Response samples

    Content type
    application/json
    {
    • "id": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
    • "organizationId": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
    • "deliveryType": "aem_edge",
    • "goLiveDate": "2024-01-20T10:00:00Z",
    • "config": {
      },
    • "createdAt": "2023-12-15T09:30:00Z",
    • "updatedAt": "2024-01-19T11:20:00Z"
    }

    Retrieve all sites including their latest audit

    This endpoint is useful for retrieving all sites including their latest audit. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint is useful for retrieving all sites including their latest audit. The latest audit is determined by the auditedAt property of the audit and included in the audits array of the site object.

    -
    Authorizations:
    api_key
    path Parameters
    auditType
    required
    string (AuditType)
    Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
    Example: cwv

    The type of the audit

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve a single site by its ID

    This endpoint is useful for retrieving a site by its ID.

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "id": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
    • "organizationId": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
    • "deliveryType": "aem_edge",
    • "goLiveDate": "2024-01-20T10:00:00Z",
    • "config": {
      },
    • "createdAt": "2023-12-15T09:30:00Z",
    • "updatedAt": "2024-01-19T11:20:00Z"
    }

    Update a site

    Authorizations:
    api_key
    path Parameters
    auditType
    required
    string (AuditType)
    Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
    Example: cwv

    The type of the audit

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve a single site by its ID

    This endpoint is useful for retrieving a site by its ID.

    +
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +

    Responses

    Response samples

    Content type
    application/json
    {
    • "id": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
    • "organizationId": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
    • "deliveryType": "aem_edge",
    • "goLiveDate": "2024-01-20T10:00:00Z",
    • "config": {
      },
    • "createdAt": "2023-12-15T09:30:00Z",
    • "updatedAt": "2024-01-19T11:20:00Z"
    }

    Update a site

    This endpoint is useful for updating a site. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint is useful for updating a site. Only the fields as per the request body schema will be updated. At least one field to update must be provided in the request body.

    -
    Authorizations:
    admin_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -
    Request Body schema: application/json
    required
    deliveryType
    string (DeliveryType)
    Enum: "aem_edge" "aem_cs" "other"

    The type of the delivery this site is using

    -
    goLiveDate
    string or null <date-time> (DateTime)

    The date and time when the site went live on AEM Edge

    -
    object (SiteConfig)

    Optional. The configuration of the site

    -

    Responses

    Request samples

    Content type
    application/json
    {
    • "organizationId": "u7y6t5r4-e3w2-x1z0-z9y8-x7v6w5u4t3s2",
    • "deliveryType": "other",
    • "goLiveDate": "2024-01-20T10:00:00Z"
    }

    Response samples

    Content type
    application/json
    {
    • "id": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
    • "organizationId": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
    • "deliveryType": "aem_edge",
    • "goLiveDate": "2024-01-20T10:00:00Z",
    • "config": {
      },
    • "createdAt": "2023-12-15T09:30:00Z",
    • "updatedAt": "2024-01-19T11:20:00Z"
    }

    Delete a site

    This endpoint is useful for deleting a site.

    -
    Authorizations:
    admin_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -

    Responses

    Update the configuration for an audit

    Authorizations:
    admin_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +
    Request Body schema: application/json
    required
    deliveryType
    string (DeliveryType)
    Enum: "aem_edge" "aem_cs" "other"

    The type of the delivery this site is using

    +
    goLiveDate
    string or null <date-time> (DateTime)

    The date and time when the site went live on AEM Edge

    +
    object (SiteConfig)

    Optional. The configuration of the site

    +

    Responses

    Request samples

    Content type
    application/json
    {
    • "organizationId": "u7y6t5r4-e3w2-x1z0-z9y8-x7v6w5u4t3s2",
    • "deliveryType": "other",
    • "goLiveDate": "2024-01-20T10:00:00Z"
    }

    Response samples

    Content type
    application/json
    {
    • "id": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
    • "organizationId": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
    • "deliveryType": "aem_edge",
    • "goLiveDate": "2024-01-20T10:00:00Z",
    • "config": {
      },
    • "createdAt": "2023-12-15T09:30:00Z",
    • "updatedAt": "2024-01-19T11:20:00Z"
    }

    Delete a site

    This endpoint is useful for deleting a site.

    +
    Authorizations:
    admin_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +

    Responses

    Update the configuration for an audit

    This endpoint is useful for updating the configuration for an audit, +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint is useful for updating the configuration for an audit, for example to set which URLs to skip from the audit.

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -
    auditType
    required
    string (AuditType)
    Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
    Example: cwv

    The type of the audit

    -
    Request Body schema: application/json
    required
    excludedURLs
    Array of strings

    Set of urls to exclude. If empty, will remove previously excluded URLs.

    -

    Responses

    Request samples

    Content type
    application/json

    Response samples

    Content type
    application/json
    {}

    Retrieve key events for a site

    This endpoint returns key events for a site chronologically, starting from the most recent and descending to the least recent

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a new key event for a site

    The endpoint for creating new key events for a site

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -
    Request Body schema: application/json
    required
    name
    required
    string

    Name of the key event

    -
    type
    required
    string (KeyEventType)
    Enum: "performance" "seo" "content" "code" "third party" "experimentation" "network" "status change"
    time
    string <date-time> (DateTime)

    Time of the key event occurred (optional). Current time is used when the field is missing

    -

    Responses

    Request samples

    Content type
    application/json
    {
    • "name": "string",
    • "type": "performance",
    • "time": "2024-01-19T14:20:30Z"
    }

    Response samples

    Content type
    application/json
    {
    • "id": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
    • "name": "Multiple 404s detected",
    • "type": "seo",
    • "time": "2023-12-15T09:30:00Z"
    }

    Delete a key event

    The endpoint for deleting a key event

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -
    keyEventId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The key event ID in uuid format

    -

    Responses

    Retrieve top pages for site

    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +
    auditType
    required
    string (AuditType)
    Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
    Example: cwv

    The type of the audit

    +
    Request Body schema: application/json
    required
    excludedURLs
    Array of strings

    Set of urls to exclude. If empty, will remove previously excluded URLs.

    +

    Responses

    Request samples

    Content type
    application/json

    Response samples

    Content type
    application/json
    {}

    Retrieve key events for a site

    This endpoint returns key events for a site chronologically, starting from the most recent and descending to the least recent

    +
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a new key event for a site

    The endpoint for creating new key events for a site

    +
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +
    Request Body schema: application/json
    required
    name
    required
    string

    Name of the key event

    +
    type
    required
    string (KeyEventType)
    Enum: "performance" "seo" "content" "code" "third party" "experimentation" "network" "status change"
    time
    string <date-time> (DateTime)

    Time of the key event occurred (optional). Current time is used when the field is missing

    +

    Responses

    Request samples

    Content type
    application/json
    {
    • "name": "string",
    • "type": "performance",
    • "time": "2024-01-19T14:20:30Z"
    }

    Response samples

    Content type
    application/json
    {
    • "id": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
    • "name": "Multiple 404s detected",
    • "type": "seo",
    • "time": "2023-12-15T09:30:00Z"
    }

    Delete a key event

    The endpoint for deleting a key event

    +
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +
    keyEventId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The key event ID in uuid format

    +

    Responses

    Retrieve top pages for site

    Not implemented yet. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    Not implemented yet. This endpoint is useful for retrieving top pages for a site. The top pages will be ordered in buckets by source and geo, and in descending order by traffic within these buckets.

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve top pages for site by source

    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve top pages for site by source

    Not implemented yet. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    Not implemented yet. This endpoint is useful for retrieving top pages for a site. The top pages will be ordered in buckets by geo, and in descending order by traffic within these buckets.

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -
    source
    required
    string
    Value: "ahrefs"
    Example: ahrefs

    The source of the top pages

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve top pages for site by source and geo

    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +
    source
    required
    string
    Value: "ahrefs"
    Example: ahrefs

    The source of the top pages

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve top pages for site by source and geo

    Not implemented yet. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    Not implemented yet. This endpoint is useful for retrieving top pages for a site. The top pages will be ordered in descending order by traffic.

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -
    source
    required
    string
    Value: "ahrefs"
    Example: ahrefs

    The source of the top pages

    -
    geo
    required
    string
    Example: au

    The geo of the top pages

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieves all experiments for the site

    This endpoint provide a list of experiments obtained from RUM data for the given site along with all the experiment details.

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    audit

    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +
    source
    required
    string
    Value: "ahrefs"
    Example: ahrefs

    The source of the top pages

    +
    geo
    required
    string
    Example: au

    The geo of the top pages

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieves all experiments for the site

    This endpoint provide a list of experiments obtained from RUM data for the given site along with all the experiment details.

    +
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    audit

    Audit operations

    -

    Retrieve all latest audits of a given type

    Retrieve all latest audits of a given type

    This endpoint is useful for retrieving all audits of a given type. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint is useful for retrieving all audits of a given type. Optionally, the results can be sorted in ascending order by audited at date.

    -
    Authorizations:
    api_key
    path Parameters
    auditType
    required
    string (AuditType)
    Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
    Example: cwv

    The type of the audit

    -
    query Parameters
    ascending
    boolean
    Default: false

    Whether to sort ascending or descending

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve all audits for a site

    Authorizations:
    api_key
    path Parameters
    auditType
    required
    string (AuditType)
    Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
    Example: cwv

    The type of the audit

    +
    query Parameters
    ascending
    boolean
    Default: false

    Whether to sort ascending or descending

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve all audits for a site

    This endpoint is useful for retrieving all audits for a site. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint is useful for retrieving all audits for a site. Optionally, the results can be sorted in ascending order by audited at date.

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -
    query Parameters
    ascending
    boolean
    Default: false

    Whether to sort ascending or descending

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve all audits of a given type for a site

    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +
    query Parameters
    ascending
    boolean
    Default: false

    Whether to sort ascending or descending

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve all audits of a given type for a site

    This endpoint is useful for retrieving all audits of a given type for a site. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint is useful for retrieving all audits of a given type for a site. Optionally, the results can be sorted in ascending order by audited at date.

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -
    auditType
    required
    string (AuditType)
    Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
    Example: cwv

    The type of the audit

    -
    query Parameters
    ascending
    boolean
    Default: false

    Whether to sort ascending or descending

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve a single audit for a site

    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +
    auditType
    required
    string (AuditType)
    Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
    Example: cwv

    The type of the audit

    +
    query Parameters
    ascending
    boolean
    Default: false

    Whether to sort ascending or descending

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve a single audit for a site

    This endpoint is useful for retrieving a single audit for a site. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint is useful for retrieving a single audit for a site. The audit is identified by the auditedAt property of the audit and the audit type.

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -
    auditType
    required
    string (AuditType)
    Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
    Example: cwv

    The type of the audit

    -
    auditedAt
    required
    string <date-time> (DateTime)
    Example: 2024-01-19T14:20:30Z

    The date and time of the audit in ISO 8601 format

    -

    Responses

    Response samples

    Content type
    application/json
    Example
    {
    • "siteId": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
    • "auditedAt": "2024-01-20T12:00:00Z",
    • "expiresAt": "2024-07-20T12:00:00Z",
    • "auditType": "cwv",
    • "isError": false,
    • "deliveryType": "aem_edge",
    • "auditResult": {
      },
    • "previousAuditResult": {
      }
    }

    Retrieve all audits for a site

    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +
    auditType
    required
    string (AuditType)
    Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
    Example: cwv

    The type of the audit

    +
    auditedAt
    required
    string <date-time> (DateTime)
    Example: 2024-01-19T14:20:30Z

    The date and time of the audit in ISO 8601 format

    +

    Responses

    Response samples

    Content type
    application/json
    Example
    {
    • "siteId": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
    • "auditedAt": "2024-01-20T12:00:00Z",
    • "expiresAt": "2024-07-20T12:00:00Z",
    • "auditType": "cwv",
    • "isError": false,
    • "deliveryType": "aem_edge",
    • "auditResult": {
      },
    • "previousAuditResult": {
      }
    }

    Retrieve all audits for a site

    This endpoint is useful for retrieving all audits for a site. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint is useful for retrieving all audits for a site. Optionally, the results can be sorted in ascending order by audited at date.

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -
    query Parameters
    ascending
    boolean
    Default: false

    Whether to sort ascending or descending

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve the latest audit for a site

    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +
    query Parameters
    ascending
    boolean
    Default: false

    Whether to sort ascending or descending

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve the latest audit for a site

    This endpoint is useful for retrieving the latest audit for a site. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint is useful for retrieving the latest audit for a site. The latest audit is determined by the given audit type and will be included in the audits array of the site object.

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -
    auditType
    required
    string (AuditType)
    Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
    Example: cwv

    The type of the audit

    -

    Responses

    Response samples

    Content type
    application/json
    Example
    {
    • "siteId": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
    • "auditedAt": "2024-01-20T12:00:00Z",
    • "expiresAt": "2024-07-20T12:00:00Z",
    • "auditType": "cwv",
    • "isError": false,
    • "deliveryType": "aem_edge",
    • "auditResult": {
      },
    • "previousAuditResult": {
      }
    }

    Update the configuration for an audit

    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +
    auditType
    required
    string (AuditType)
    Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
    Example: cwv

    The type of the audit

    +

    Responses

    Response samples

    Content type
    application/json
    Example
    {
    • "siteId": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
    • "auditedAt": "2024-01-20T12:00:00Z",
    • "expiresAt": "2024-07-20T12:00:00Z",
    • "auditType": "cwv",
    • "isError": false,
    • "deliveryType": "aem_edge",
    • "auditResult": {
      },
    • "previousAuditResult": {
      }
    }

    Update the configuration for an audit

    This endpoint is useful for updating the configuration for an audit, +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint is useful for updating the configuration for an audit, for example to set which URLs to skip from the audit.

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -
    auditType
    required
    string (AuditType)
    Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
    Example: cwv

    The type of the audit

    -
    Request Body schema: application/json
    required
    excludedURLs
    Array of strings

    Set of urls to exclude. If empty, will remove previously excluded URLs.

    -

    Responses

    Request samples

    Content type
    application/json

    Response samples

    Content type
    application/json
    {}

    site-audit

    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +
    auditType
    required
    string (AuditType)
    Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
    Example: cwv

    The type of the audit

    +
    Request Body schema: application/json
    required
    excludedURLs
    Array of strings

    Set of urls to exclude. If empty, will remove previously excluded URLs.

    +

    Responses

    Request samples

    Content type
    application/json

    Response samples

    Content type
    application/json
    {}

    site-audit

    Site-audit operations

    -

    auth

    auth

    Init authentication against 3rd party services

    -

    Authenticate with Google

    Authenticate with Google

    This endpoint is used to authenticate with Google. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint is used to authenticate with Google. The user will be redirected to the Google authentication flow.

    -
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -

    Responses

    organization

    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +

    Responses

    organization

    Organization operations

    -

    Create a new organization

    This endpoint is useful for creating a new organization.

    -
    Authorizations:
    admin_key
    Request Body schema: application/json
    required
    name
    required
    string

    The name of the organization

    -
    imsOrgId
    string (ImsOrganizationId)

    Optional. The ID of the Adobe IMS organization

    -
    object (OrganizationConfig)

    Optional. The configuration of the organization

    -

    Responses

    Request samples

    Content type
    application/json
    {
    • "name": "Example Organization",
    • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
    • "config": {
      }
    }

    Response samples

    Content type
    application/json
    {
    • "id": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
    • "name": "Example Organization",
    • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
    • "config": {
      },
    • "createdAt": "2023-12-15T09:30:00Z",
    • "updatedAt": "2024-01-19T11:20:00Z"
    }

    Retrieve all organizations

    This endpoint is useful for retrieving all organizations.

    -
    Authorizations:
    api_key

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve a single organization by its ID

    This endpoint is useful for retrieving an organization by its ID.

    -
    Authorizations:
    api_key
    path Parameters
    organizationId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The organization ID in uuid format

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "id": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
    • "name": "Example Organization",
    • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
    • "config": {
      },
    • "createdAt": "2023-12-15T09:30:00Z",
    • "updatedAt": "2024-01-19T11:20:00Z"
    }

    Update an organization

    Create a new organization

    This endpoint is useful for creating a new organization.

    +
    Authorizations:
    admin_key
    Request Body schema: application/json
    required
    name
    required
    string

    The name of the organization

    +
    imsOrgId
    string (ImsOrganizationId)

    Optional. The ID of the Adobe IMS organization

    +
    object (OrganizationConfig)

    Optional. The configuration of the organization

    +

    Responses

    Request samples

    Content type
    application/json
    {
    • "name": "Example Organization",
    • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
    • "config": {
      }
    }

    Response samples

    Content type
    application/json
    {
    • "id": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
    • "name": "Example Organization",
    • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
    • "config": {
      },
    • "createdAt": "2023-12-15T09:30:00Z",
    • "updatedAt": "2024-01-19T11:20:00Z"
    }

    Retrieve all organizations

    This endpoint is useful for retrieving all organizations.

    +
    Authorizations:
    api_key

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve a single organization by its ID

    This endpoint is useful for retrieving an organization by its ID.

    +
    Authorizations:
    api_key
    path Parameters
    organizationId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The organization ID in uuid format

    +

    Responses

    Response samples

    Content type
    application/json
    {
    • "id": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
    • "name": "Example Organization",
    • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
    • "config": {
      },
    • "createdAt": "2023-12-15T09:30:00Z",
    • "updatedAt": "2024-01-19T11:20:00Z"
    }

    Update an organization

    This endpoint is useful for updating an organization. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint is useful for updating an organization. Only the fields as per the request body schema will be updated. At least one field to update must be provided in the request body.

    -
    Authorizations:
    admin_key
    path Parameters
    organizationId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The organization ID in uuid format

    -
    Request Body schema: application/json
    required
    name
    string

    The name of the organization

    -
    imsOrgId
    string (ImsOrganizationId)

    Optional. The ID of the Adobe IMS organization

    -
    object (OrganizationConfig)

    Optional. The configuration of the organization

    -

    Responses

    Request samples

    Content type
    application/json
    {
    • "name": "Example Organization",
    • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
    • "config": {
      }
    }

    Response samples

    Content type
    application/json
    {
    • "id": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
    • "name": "Example Organization",
    • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
    • "config": {
      },
    • "createdAt": "2023-12-15T09:30:00Z",
    • "updatedAt": "2024-01-19T11:20:00Z"
    }

    Delete an organization

    This endpoint is useful for deleting an organization.

    -
    Authorizations:
    admin_key
    path Parameters
    organizationId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The organization ID in uuid format

    -

    Responses

    Retrieve all sites for an organization

    This endpoint is useful for retrieving all sites for an organization.

    -
    Authorizations:
    api_key
    path Parameters
    organizationId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The organization ID in uuid format

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve an organization by IMS Org ID

    This endpoint is useful for retrieving an organization by IMS Org ID.

    -
    Authorizations:
    api_key
    path Parameters
    imsOrgId
    required
    string (ImsOrganizationId)
    Example: 1234567890ABCDEF12345678@AdobeOrg

    An IMS organization ID

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "id": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
    • "name": "Example Organization",
    • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
    • "config": {
      },
    • "createdAt": "2023-12-15T09:30:00Z",
    • "updatedAt": "2024-01-19T11:20:00Z"
    }

    Retrieve Slack config for an organization by IMS Org ID

    Authorizations:
    admin_key
    path Parameters
    organizationId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The organization ID in uuid format

    +
    Request Body schema: application/json
    required
    name
    string

    The name of the organization

    +
    imsOrgId
    string (ImsOrganizationId)

    Optional. The ID of the Adobe IMS organization

    +
    object (OrganizationConfig)

    Optional. The configuration of the organization

    +

    Responses

    Request samples

    Content type
    application/json
    {
    • "name": "Example Organization",
    • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
    • "config": {
      }
    }

    Response samples

    Content type
    application/json
    {
    • "id": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
    • "name": "Example Organization",
    • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
    • "config": {
      },
    • "createdAt": "2023-12-15T09:30:00Z",
    • "updatedAt": "2024-01-19T11:20:00Z"
    }

    Delete an organization

    This endpoint is useful for deleting an organization.

    +
    Authorizations:
    admin_key
    path Parameters
    organizationId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The organization ID in uuid format

    +

    Responses

    Retrieve all sites for an organization

    This endpoint is useful for retrieving all sites for an organization.

    +
    Authorizations:
    api_key
    path Parameters
    organizationId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The organization ID in uuid format

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve an organization by IMS Org ID

    This endpoint is useful for retrieving an organization by IMS Org ID.

    +
    Authorizations:
    api_key
    path Parameters
    imsOrgId
    required
    string (ImsOrganizationId)
    Example: 1234567890ABCDEF12345678@AdobeOrg

    An IMS organization ID

    +

    Responses

    Response samples

    Content type
    application/json
    {
    • "id": "o1p2q3r4-s5t6-u7v8-w9x0-yz12x34y56z",
    • "name": "Example Organization",
    • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
    • "config": {
      },
    • "createdAt": "2023-12-15T09:30:00Z",
    • "updatedAt": "2024-01-19T11:20:00Z"
    }

    Retrieve Slack config for an organization by IMS Org ID

    This endpoint is useful for retrieving the Slack config of an +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint is useful for retrieving the Slack config of an organization by IMS Org ID.

    -
    Authorizations:
    api_key
    path Parameters
    imsOrgId
    required
    string (ImsOrganizationId)
    Example: 1234567890ABCDEF12345678@AdobeOrg

    An IMS organization ID

    -

    Responses

    Response samples

    Content type
    application/json
    {}

    trigger

    Authorizations:
    api_key
    path Parameters
    imsOrgId
    required
    string (ImsOrganizationId)
    Example: 1234567890ABCDEF12345678@AdobeOrg

    An IMS organization ID

    +

    Responses

    Response samples

    Content type
    application/json
    {}

    trigger

    Trigger operations

    -

    Trigger an audit Deprecated

    Trigger an audit Deprecated

    Warning: This API is deprecated, will be removed in future versions and should no longer be used or enhanced. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    Warning: This API is deprecated, will be removed in future versions and should no longer be used or enhanced. Please use the Slack commands to trigger audits on-demand.

    This endpoint is useful for triggering an audit. The audit will be run asynchronously and the response will be returned immediately.

    @@ -1166,643 +1166,641 @@
  • lhs-mobile
  • The URL can be either a site ID or a base URL depending on the audit type.

    -
    Authorizations:
    admin_key
    query Parameters
    url
    required
    string

    The URL or Site ID to trigger the audit for

    -
    type
    required
    string (AuditType)
    Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
    Example: type=cwv

    The type of the audit to trigger

    -

    Responses

    hooks

    Authorizations:
    admin_key
    query Parameters
    url
    required
    string

    The URL or Site ID to trigger the audit for

    +
    type
    required
    string (AuditType)
    Enum: "404" "apex" "cwv" "lhs" "lhs-desktop" "lhs-mobile" "broken-backlinks" "canonical" "sitemap" "structured-data" "costs"
    Example: type=cwv

    The type of the audit to trigger

    +

    Responses

    hooks

    Webhooks for receiving events

    -

    Process fulfillment_completed events

    Process fulfillment_completed events

    This endpoint can be used to process an array of fulfillment_completed +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint can be used to process an array of fulfillment_completed events, in the format produced by the Fulfillment Gateway and delivered by the Hoolihan pipeline. In particular, it is intended to be used to handle contract fulfillment events which involve an Edge Delivery Services fulfillable item "code".

    -
    Authorizations:
    admin_key
    Request Body schema: application/json
    required
    Array
    id
    required
    string

    The Hoolihan ID of the event

    -
    topic
    required
    string

    The name of the Hoolihan topic that the event was received on

    -
    required
    object (HoolihanEventValue)

    Value of the event, which contains the message payload from the publishing system

    -
    partition
    required
    integer

    The partition index that the event was received on

    -
    offset
    required
    integer

    The offset of the event within the partition

    -

    Responses

    Request samples

    Content type
    application/json
    [
    • {
      }
    ]

    Response samples

    Content type
    application/json
    [
    • {
      },
    • {
      }
    ]

    Process incoming site discovery hooks from CDN logs

    Authorizations:
    admin_key
    Request Body schema: application/json
    required
    Array
    id
    required
    string

    The Hoolihan ID of the event

    +
    topic
    required
    string

    The name of the Hoolihan topic that the event was received on

    +
    required
    object (HoolihanEventValue)

    Value of the event, which contains the message payload from the publishing system

    +
    partition
    required
    integer

    The partition index that the event was received on

    +
    offset
    required
    integer

    The offset of the event within the partition

    +

    Responses

    Request samples

    Content type
    application/json
    [
    • {
      }
    ]

    Response samples

    Content type
    application/json
    [
    • {
      },
    • {
      }
    ]

    Process incoming site discovery hooks from CDN logs

    This endpoint processes hooks that include x-forwarded-host header value from CDN logs +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint processes hooks that include x-forwarded-host header value from CDN logs Upon receiving the incoming webhook, it initiates a sequence of validation and sanitization procedures Once successful sanitization and validation are completed, it proceeds to send a Slack message notifying about the discovered domain

    -
    Authorizations:
    api_key
    path Parameters
    hookSecret
    required
    string

    Secret for the incoming webhook

    -
    Request Body schema: application/json
    required
    forwardedHost
    string

    value of x-forwarded-host header in the CDN log which trggered the domain discovery alert

    -
    property name*
    additional property
    any

    Responses

    Request samples

    Content type
    application/json
    {
    • "forwardedHost": "blog.adobe.com, main--blog--adobecom.hlx.live, main--blog--adobecom.hlx.live, main--blog--adobecom.hlx-fastly.page"
    }

    Process incoming site discovery hooks from RUM logs

    Authorizations:
    api_key
    path Parameters
    hookSecret
    required
    string

    Secret for the incoming webhook

    +
    Request Body schema: application/json
    required
    forwardedHost
    string

    value of x-forwarded-host header in the CDN log which trggered the domain discovery alert

    +
    property name*
    additional property
    any

    Responses

    Request samples

    Content type
    application/json
    {
    • "forwardedHost": "blog.adobe.com, main--blog--adobecom.hlx.live, main--blog--adobecom.hlx.live, main--blog--adobecom.hlx-fastly.page"
    }

    Process incoming site discovery hooks from RUM logs

    This endpoint processes hooks that include URL and domain information from RUM logs +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint processes hooks that include URL and domain information from RUM logs Upon receiving the incoming webhook, it initiates a sequence of validation and sanitization procedures Once successful sanitization and validation are completed, it proceeds to send a Slack message notifying about the discovered domain

    -
    Authorizations:
    api_key
    path Parameters
    hookSecret
    required
    string

    Secret for the incoming webhook

    -
    Request Body schema: application/json
    required
    url
    string <url> (URL)

    URL of the page which triggered the domain discovery alert

    -
    domain
    string <domain> (Domain)

    Domain of the page which triggered the domain discovery alert

    -
    property name*
    additional property
    any

    Responses

    Request samples

    Content type
    application/json
    {}

    Process setup completed events for site integration with analytics

    Authorizations:
    api_key
    path Parameters
    hookSecret
    required
    string

    Secret for the incoming webhook

    +
    Request Body schema: application/json
    required
    url
    string <url> (URL)

    URL of the page which triggered the domain discovery alert

    +
    domain
    string <domain> (Domain)

    Domain of the page which triggered the domain discovery alert

    +
    property name*
    additional property
    any

    Responses

    Request samples

    Content type
    application/json
    {}

    Process setup completed events for site integration with analytics

    Not implemented yet (will be via https://github.com/adobe/spacecat-api-service/issues/237). +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    Not implemented yet (will be via https://github.com/adobe/spacecat-api-service/issues/237). Process setup completed events for site integration with analytics.

    -
    Authorizations:
    api_key
    path Parameters
    hookSecret
    required
    string

    Secret for the incoming webhook

    -
    Request Body schema: application/json
    required
    required
    object

    The reporting details

    -
    required
    object

    The configuration for the data collection to embed on the site.

    -
    required
    object

    The data store details

    -
    object

    The data schema details

    -
    required
    object

    The data mapping details

    -
    property name*
    additional property
    any

    Responses

    Request samples

    Content type
    application/json
    Example
    {}

    slack

    Authorizations:
    api_key
    path Parameters
    hookSecret
    required
    string

    Secret for the incoming webhook

    +
    Request Body schema: application/json
    required
    required
    object

    The reporting details

    +
    required
    object

    The configuration for the data collection to embed on the site.

    +
    required
    object

    The data store details

    +
    object

    The data schema details

    +
    required
    object

    The data mapping details

    +
    property name*
    additional property
    any

    Responses

    Request samples

    Content type
    application/json
    Example
    {}

    slack

    Slack channel management

    -

    Request invitation to an existing Slack channel of an organization

    Request invitation to an existing Slack channel of an organization

    This endpoint can be used to invite a user to their organization's Slack +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint can be used to invite a user to their organization's Slack channel by IMS user ID, which is read from the IMS API via the provided user access token. As a prerequisite, there must be an existing Spacecat organization and Slack channel for the given IMS org ID.

    -
    Authorizations:
    admin_key
    Request Body schema: application/json
    required
    imsOrgId
    required
    string (ImsOrganizationId)

    The ID of the Adobe IMS organization

    -
    imsUserAccessToken
    required
    string (ImsUserAccessToken)

    The IMS access token of the user to invite to the Slack channel

    -

    Responses

    Request samples

    Content type
    application/json
    {
    • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
    • "imsUserAccessToken": "eyJhbGciOiJIUzI1NiJ9.eyJpZCI6IjEyMzQ1IiwidHlwZSI6ImFjY2Vzc190b2tlbiIsImNsaWVudF9pZCI6ImV4YW1wbGVfYXBwIiwidXNlcl9pZCI6Ijk4NzY1NDc4OTBBQkNERUYxMjM0NTY3OEBhYmNkZWYxMjM0NTY3ODkuZSIsImFzIjoiaW1zLW5hMSIsImFhX2lkIjoiMTIzNDU2Nzg5MEFCQ0RFRjEyMzQ1Njc4QGFkb2JlLmNvbSIsImNyZWF0ZWRfYXQiOiIxNzEwMjQ3MDAwMDAwIn0.MRDpxgxSHDj4DmA182hPnjMAnKkly-VUJ_bXpQ-J8EQ"
    }

    api-keys

    Authorizations:
    admin_key
    Request Body schema: application/json
    required
    imsOrgId
    required
    string (ImsOrganizationId)

    The ID of the Adobe IMS organization

    +
    imsUserAccessToken
    required
    string (ImsUserAccessToken)

    The IMS access token of the user to invite to the Slack channel

    +

    Responses

    Request samples

    Content type
    application/json
    {
    • "imsOrgId": "1234567890ABCDEF12345678@AdobeOrg",
    • "imsUserAccessToken": "eyJhbGciOiJIUzI1NiJ9.eyJpZCI6IjEyMzQ1IiwidHlwZSI6ImFjY2Vzc190b2tlbiIsImNsaWVudF9pZCI6ImV4YW1wbGVfYXBwIiwidXNlcl9pZCI6Ijk4NzY1NDc4OTBBQkNERUYxMjM0NTY3OEBhYmNkZWYxMjM0NTY3ODkuZSIsImFzIjoiaW1zLW5hMSIsImFhX2lkIjoiMTIzNDU2Nzg5MEFCQ0RFRjEyMzQ1Njc4QGFkb2JlLmNvbSIsImNyZWF0ZWRfYXQiOiIxNzEwMjQ3MDAwMDAwIn0.MRDpxgxSHDj4DmA182hPnjMAnKkly-VUJ_bXpQ-J8EQ"
    }

    api-keys

    API key management

    -

    Create a new API key

    Create a new API key

    Note: Not implemented yet.

    +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    Note: Not implemented yet.

    This endpoint can be used to create a new API key with a set of scopes. The scoped API key will be -returned in the response only once. The scoped API key can be used to authenticate the Spacecat APIs by +returned in the response only once. The scoped API key can be used to authenticate the Spacecat APIs by including it in the x-api-key header.

    -
    Authorizations:
    ims_key
    header Parameters
    x-gw-ims-org-id
    string
    Example: 1234567890ABCDEF12345678@AdobeOrg

    IMS Organization Id of the client.

    -
    Request Body schema: application/json
    name
    required
    string

    The name of the API key

    -
    features
    required
    Array of strings

    The features the API key is for

    -
    domains
    required
    Array of strings <domain> (Domain) [ items <domain > ]

    The domains the API key is allowed to access

    -

    Responses

    Request samples

    Content type
    application/json
    {
    • "name": "Example API Key",
    • "features": [
      ],
    • "domains": [
      ]
    }

    Response samples

    Content type
    application/json
    {
    • "id": "123e4567-e89b-12d3-a456-426614174000",
    • "name": "string",
    • "scopes": [
      ],
    • "createdAt": "2024-01-19T14:20:30Z",
    • "expiresAt": "2024-01-19T14:20:30Z",
    • "apiKey": "string"
    }

    Get all API keys owned by the given IMS client

    Authorizations:
    ims_key
    header Parameters
    x-gw-ims-org-id
    string
    Example: 1234567890ABCDEF12345678@AdobeOrg

    IMS Organization Id of the client.

    +
    Request Body schema: application/json
    name
    required
    string

    The name of the API key

    +
    features
    required
    Array of strings

    The features the API key is for

    +
    domains
    required
    Array of strings <domain> (Domain) [ items <domain > ]

    The domains the API key is allowed to access

    +

    Responses

    Request samples

    Content type
    application/json
    {
    • "name": "Example API Key",
    • "features": [
      ],
    • "domains": [
      ]
    }

    Response samples

    Content type
    application/json
    {
    • "id": "123e4567-e89b-12d3-a456-426614174000",
    • "name": "string",
    • "scopes": [
      ],
    • "createdAt": "2024-01-19T14:20:30Z",
    • "expiresAt": "2024-01-19T14:20:30Z",
    • "apiKey": "string"
    }

    Get all API keys owned by the given IMS client

    Note: Not implemented yet.

    +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    Note: Not implemented yet.

    This endpoint can be used to list all the API keys created by the client.

    -
    Authorizations:
    ims_key
    header Parameters
    x-gw-ims-org-id
    string
    Example: 1234567890ABCDEF12345678@AdobeOrg

    IMS Organization Id of the client.

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Delete an API key

    Authorizations:
    ims_key
    header Parameters
    x-gw-ims-org-id
    string
    Example: 1234567890ABCDEF12345678@AdobeOrg

    IMS Organization Id of the client.

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Delete an API key

    Note: Not implemented yet.

    +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    Note: Not implemented yet.

    This endpoint can be used to delete an API key. The API key will be marked as deleted in the system and will no longer be valid for authentication. Only keys created by this IMS client can be deleted by it.

    -
    Authorizations:
    ims_key
    path Parameters
    apiKeyId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The API key ID in uuid format

    -
    header Parameters
    x-gw-ims-org-id
    string
    Example: 1234567890ABCDEF12345678@AdobeOrg

    IMS Organization Id of the client.

    -

    Responses

    import

    Authorizations:
    ims_key
    path Parameters
    apiKeyId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The API key ID in uuid format

    +
    header Parameters
    x-gw-ims-org-id
    string
    Example: 1234567890ABCDEF12345678@AdobeOrg

    IMS Organization Id of the client.

    +

    Responses

    import

    APIs for importing content to Edge Delivery Services

    -

    Create a new import job

    Create a new import job

    This endpoint can be used to start a new import job with a set of URLs, import API key, +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint can be used to start a new import job with a set of URLs, import API key, optional import.js mapping file, and optional custom headers. The import job will be processed asynchronously and the status of the job can be queried at the /tools/import/jobs/{jobId} endpoint. If there is no import queue available at the time of the request, a 503 Service Unavailable response will be returned. A single import job per client is permitted, otherwise a 429 Too Many Requests response will be returned.

    -
    Authorizations:
    scoped_api_key
    header Parameters
    x-api-key
    string
    Authorizations:
    scoped_api_key
    header Parameters
    x-api-key
    string

    Client-specific import API key. This same key will be required to fetch the job status, +" class="sc-epnzzT sc-eMwmJz drsioI ewnBNs">

    Client-specific import API key. This same key will be required to fetch the job status, and final .zip result.

    -
    Request Body schema: multipart/form-data
    required
    urls
    required
    Array of strings <url> (URL) [ items <url > ]

    The URLs to import

    -
    object (ImportOptions)

    Optional configuration params, defined as a JSON object

    -
    importScript
    string <binary>

    Optional import.js mapping file

    -
    customHeaders
    object

    Optional custom headers to send with each HTTP request

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "id": "12d6ac8e-d5e4-4788-90eb-b69e10e745fd",
    • "status": "RUNNING",
    • "startTime": "2024-01-19T14:20:30Z",
    • "urlCount": 25,
    • "successCount": 15,
    • "failedCount": 0
    }

    Query the status of an import job

    This endpoint can be used to query the status of an import job, given its jobId.

    -
    Authorizations:
    scoped_api_key
    path Parameters
    jobId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The job ID in uuid format

    -
    header Parameters
    x-api-key
    string

    Client-specific import API key. Must match the key used to start the import job.

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "id": "12d6ac8e-d5e4-4788-90eb-b69e10e745fd",
    • "status": "RUNNING",
    • "startTime": "2024-01-19T14:20:30Z",
    • "urlCount": 25,
    • "successCount": 15,
    • "failedCount": 0
    }

    Delete an import job

    Request Body schema: multipart/form-data
    required
    urls
    required
    Array of strings <url> (URL) [ items <url > ]

    The URLs to import

    +
    object (ImportOptions)

    Optional configuration params, defined as a JSON object

    +
    importScript
    string <binary>

    Optional import.js mapping file

    +
    customHeaders
    object

    Optional custom headers to send with each HTTP request

    +

    Responses

    Response samples

    Content type
    application/json
    {
    • "id": "12d6ac8e-d5e4-4788-90eb-b69e10e745fd",
    • "status": "RUNNING",
    • "startTime": "2024-01-19T14:20:30Z",
    • "urlCount": 25,
    • "successCount": 15,
    • "failedCount": 0
    }

    Query the status of an import job

    This endpoint can be used to query the status of an import job, given its jobId.

    +
    Authorizations:
    scoped_api_key
    path Parameters
    jobId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The job ID in uuid format

    +
    header Parameters
    x-api-key
    string

    Client-specific import API key. Must match the key used to start the import job.

    +

    Responses

    Response samples

    Content type
    application/json
    {
    • "id": "12d6ac8e-d5e4-4788-90eb-b69e10e745fd",
    • "status": "RUNNING",
    • "startTime": "2024-01-19T14:20:30Z",
    • "urlCount": 25,
    • "successCount": 15,
    • "failedCount": 0
    }

    Delete an import job

    This endpoint can be used to delete an import job, given its jobId. This operation will remove +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint can be used to delete an import job, given its jobId. This operation will remove all import URL entities in addition to the import job itself. The imports.delete scope is required on the API key used to delete the import job, and only jobs created by the provided key can be deleted.

    -
    Authorizations:
    scoped_api_key
    path Parameters
    jobId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The job ID in uuid format

    -
    header Parameters
    x-api-key
    string
    Authorizations:
    scoped_api_key
    path Parameters
    jobId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The job ID in uuid format

    +
    header Parameters
    x-api-key
    string

    Client-specific import API key. Must match the key used to start the import job, and +" class="sc-epnzzT sc-eMwmJz drsioI ewnBNs">

    Client-specific import API key. Must match the key used to start the import job, and include the imports.delete scope.

    -

    Responses

    Query the progress of an import job

    This endpoint can be used to query the progress of an import job, given its jobId.

    -
    Authorizations:
    scoped_api_key
    path Parameters
    jobId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The job ID in uuid format

    -
    header Parameters
    x-api-key
    string

    Client-specific import API key. Must match the key used to start the import job.

    -

    Responses

    Response samples

    Content type
    application/json
    {
    • "pending": 0,
    • "redirect": 0,
    • "running": 0,
    • "completed": 1,
    • "failed": 0
    }

    Request a pre-signed URL to download the result of an import job as a .zip archive

    Responses

    Query the progress of an import job

    This endpoint can be used to query the progress of an import job, given its jobId.

    +
    Authorizations:
    scoped_api_key
    path Parameters
    jobId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The job ID in uuid format

    +
    header Parameters
    x-api-key
    string

    Client-specific import API key. Must match the key used to start the import job.

    +

    Responses

    Response samples

    Content type
    application/json
    {
    • "pending": 0,
    • "redirect": 0,
    • "running": 0,
    • "completed": 1,
    • "failed": 0
    }

    Request a pre-signed URL to download the result of an import job as a .zip archive

    This endpoint can be used to download an archive of an import job, which will include +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    This endpoint can be used to download an archive of an import job, which will include all the resulting documents that were generated as part of the import. It will also include the import-report.xlsx file, which contains a summary of the import job.

    -
    Authorizations:
    scoped_api_key
    path Parameters
    jobId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The job ID in uuid format

    -
    header Parameters
    x-api-key
    string

    Client-specific import API key. Must match the key used to start the import job.

    -

    Responses

    Response samples

    Content type
    application/json

    Send a prompt to the import assistant

    Authorizations:
    scoped_api_key
    path Parameters
    jobId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The job ID in uuid format

    +
    header Parameters
    x-api-key
    string

    Client-specific import API key. Must match the key used to start the import job.

    +

    Responses

    Response samples

    Content type
    application/json

    Send a prompt to the import assistant

    Note: Not implemented yet.

    -

    This endpoint can be used to send prompts to the import assistant. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    Note: Not implemented yet.

    +

    This endpoint can be used to send prompts to the import assistant. Each prompt will make use of AI to analyze a URL and return choices in response to the request.

    -
    Authorizations:
    scoped_api_key
    header Parameters
    x-api-key
    string

    Client-specific import API key.

    -
    Request Body schema: application/json
    url
    required
    string <url> (URL)

    The URL to analyze

    -
    command
    required
    string

    Assistant command to execute. Examples are 'start', 'cleanup', 'block', 'cells'.

    -
    prompt
    string

    Optional prompt to provide context for the analysis.

    -
    options
    object

    Optional configuration options required by the command.

    -

    Responses

    Request samples

    Content type
    application/json
    {}

    Response samples

    Content type
    application/json
    {
    • "choices": [
      ]
    }

    scrape

    Authorizations:
    scoped_api_key
    header Parameters
    x-api-key
    string

    Client-specific import API key with the 'imports.assistant' scope.

    +
    Request Body schema: application/json
    command
    required
    string

    Assistant command to execute. Examples 'findMainContent', 'findRemovalSelectors', 'findBlockSelectors', 'findBlockCells', 'generatePageTransformation'.

    +
    prompt
    string

    Optional prompt to provide context for the analysis.

    +
    options
    object

    Optional configuration options required by the command. Example 'imageUrl'

    +

    Responses

    Request samples

    Content type
    application/json
    {
    • "command": "findRemovalSelectors",
    • "prompt": "breadcrumbs",
    • "options": {
      }
    }

    Response samples

    Content type
    application/json
    {
    • "choices": [
      ]
    }

    scrape

    APIs for scraping web pages

    -

    Scrape a set of URLs

    Scrape a set of URLs

    Warning: prototype endpoint. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    Warning: prototype endpoint. This endpoint allows you to scrape a set of URLs. The URLs are scraped in parallel and the results are returned in the same order as the input. The maximum number of URLs that can be scraped in a single request is 10.

    -
    Authorizations:
    api_key
    Request Body schema: application/json
    urls
    required
    Array of strings <url> (URL) [ items <url > ]

    The URLs to scrape. The URLs must be unique. Limit of 10 URLs per request.

    -

    Responses

    Request samples

    Content type
    application/json

    Response samples

    Content type
    application/json
    {
    • "id": "12d6ac8e-d5e4-4788-90eb-b69e10e745fd",
    • "status": "COMPLETE",
    • "startTime": "2024-01-19T14:20:30Z",
    • "urlCount": 10,
    • "successCount": 9,
    • "failedCount": 1,
    • "results": []
    }

    configuration

    Get all application configurations

    Authorizations:
    admin_key

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Get the latest application configuration

    Authorizations:
    admin_key

    Responses

    Response samples

    Content type
    application/json
    {
    • "version": "string",
    • "jobs": [
      ],
    • "queues": {
      }
    }

    Get a specific version of the application configuration

    Authorizations:
    admin_key
    path Parameters
    version
    required
    string

    Responses

    Response samples

    Content type
    application/json
    {
    • "version": "string",
    • "jobs": [
      ],
    • "queues": {
      }
    }

    configurations-sites-audits

    Enable or disable audits for sites

    Use this endpoint to enable or disable specific audit types for your sites.

    -
    Authorizations:
    admin_key
    Request Body schema: application/json
    required
    Array
    baseURL
    required
    string <url> (URL)
    auditType
    required
    string

    The type of audit to be enabled or disabled.

    -
    enable
    required
    boolean

    Set to true to enable the audit, or false to disable it.

    -

    Responses

    Request samples

    Content type
    application/json
    []

    Response samples

    Content type
    application/json
    {
    • "status": 0,
    • "message": "string"
    }

    key event

    Retrieve key events for a site

    This endpoint returns key events for a site chronologically, starting from the most recent and descending to the least recent

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a new key event for a site

    The endpoint for creating new key events for a site

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -
    Request Body schema: application/json
    required
    name
    required
    string

    Name of the key event

    -
    type
    required
    string (KeyEventType)
    Enum: "performance" "seo" "content" "code" "third party" "experimentation" "network" "status change"
    time
    string <date-time> (DateTime)

    Time of the key event occurred (optional). Current time is used when the field is missing

    -

    Responses

    Request samples

    Content type
    application/json
    {
    • "name": "string",
    • "type": "performance",
    • "time": "2024-01-19T14:20:30Z"
    }

    Response samples

    Content type
    application/json
    {
    • "id": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
    • "name": "Multiple 404s detected",
    • "type": "seo",
    • "time": "2023-12-15T09:30:00Z"
    }

    Delete a key event

    The endpoint for deleting a key event

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -
    keyEventId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The key event ID in uuid format

    -

    Responses

    top pages

    Retrieve top pages for site

    Authorizations:
    api_key
    Request Body schema: application/json
    urls
    required
    Array of strings <url> (URL) [ items <url > ]

    The URLs to scrape. The URLs must be unique. Limit of 10 URLs per request.

    +

    Responses

    Request samples

    Content type
    application/json

    Response samples

    Content type
    application/json
    {
    • "id": "12d6ac8e-d5e4-4788-90eb-b69e10e745fd",
    • "status": "COMPLETE",
    • "startTime": "2024-01-19T14:20:30Z",
    • "urlCount": 10,
    • "successCount": 9,
    • "failedCount": 1,
    • "results": []
    }

    configuration

    Get all application configurations

    Authorizations:
    admin_key

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Get the latest application configuration

    Authorizations:
    admin_key

    Responses

    Response samples

    Content type
    application/json
    {
    • "version": "string",
    • "jobs": [
      ],
    • "queues": {
      }
    }

    Get a specific version of the application configuration

    Authorizations:
    admin_key
    path Parameters
    version
    required
    string

    Responses

    Response samples

    Content type
    application/json
    {
    • "version": "string",
    • "jobs": [
      ],
    • "queues": {
      }
    }

    configurations-sites-audits

    Enable or disable audits for sites

    Use this endpoint to enable or disable specific audit types for your sites.

    +
    Authorizations:
    admin_key
    Request Body schema: application/json
    required
    Array
    baseURL
    required
    string <url> (URL)
    auditType
    required
    string

    The type of audit to be enabled or disabled.

    +
    enable
    required
    boolean

    Set to true to enable the audit, or false to disable it.

    +

    Responses

    Request samples

    Content type
    application/json
    []

    Response samples

    Content type
    application/json
    {
    • "status": 0,
    • "message": "string"
    }

    key event

    Retrieve key events for a site

    This endpoint returns key events for a site chronologically, starting from the most recent and descending to the least recent

    +
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a new key event for a site

    The endpoint for creating new key events for a site

    +
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +
    Request Body schema: application/json
    required
    name
    required
    string

    Name of the key event

    +
    type
    required
    string (KeyEventType)
    Enum: "performance" "seo" "content" "code" "third party" "experimentation" "network" "status change"
    time
    string <date-time> (DateTime)

    Time of the key event occurred (optional). Current time is used when the field is missing

    +

    Responses

    Request samples

    Content type
    application/json
    {
    • "name": "string",
    • "type": "performance",
    • "time": "2024-01-19T14:20:30Z"
    }

    Response samples

    Content type
    application/json
    {
    • "id": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
    • "name": "Multiple 404s detected",
    • "type": "seo",
    • "time": "2023-12-15T09:30:00Z"
    }

    Delete a key event

    The endpoint for deleting a key event

    +
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +
    keyEventId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The key event ID in uuid format

    +

    Responses

    top pages

    Retrieve top pages for site

    Not implemented yet. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    Not implemented yet. This endpoint is useful for retrieving top pages for a site. The top pages will be ordered in buckets by source and geo, and in descending order by traffic within these buckets.

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve top pages for site by source

    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve top pages for site by source

    Not implemented yet. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    Not implemented yet. This endpoint is useful for retrieving top pages for a site. The top pages will be ordered in buckets by geo, and in descending order by traffic within these buckets.

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -
    source
    required
    string
    Value: "ahrefs"
    Example: ahrefs

    The source of the top pages

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve top pages for site by source and geo

    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +
    source
    required
    string
    Value: "ahrefs"
    Example: ahrefs

    The source of the top pages

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Retrieve top pages for site by source and geo

    Not implemented yet. +" class="sc-epnzzT sc-eMwmJz drsioI dWZUhK">

    Not implemented yet. This endpoint is useful for retrieving top pages for a site. The top pages will be ordered in descending order by traffic.

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -
    source
    required
    string
    Value: "ahrefs"
    Example: ahrefs

    The source of the top pages

    -
    geo
    required
    string
    Example: au

    The geo of the top pages

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    experimental

    Retrieve site metrics by source

    This endpoint is useful for retrieving site metrics by source.

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -
    source
    required
    string
    Value: "ahrefs"
    Example: ahrefs

    The source of the top pages

    -
    metric
    required
    string
    Value: "organic-traffic"
    Example: organic-traffic

    The name of the site metric

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    experiments

    Retrieves all experiments for the site

    This endpoint provide a list of experiments obtained from RUM data for the given site along with all the experiment details.

    -
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]
    +
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +
    source
    required
    string
    Value: "ahrefs"
    Example: ahrefs

    The source of the top pages

    +
    geo
    required
    string
    Example: au

    The geo of the top pages

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    experimental

    Retrieve site metrics by source

    This endpoint is useful for retrieving site metrics by source.

    +
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +
    source
    required
    string
    Value: "ahrefs"
    Example: ahrefs

    The source of the top pages

    +
    metric
    required
    string
    Value: "organic-traffic"
    Example: organic-traffic

    The name of the site metric

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    experiments

    Retrieves all experiments for the site

    This endpoint provide a list of experiments obtained from RUM data for the given site along with all the experiment details.

    +
    Authorizations:
    api_key
    path Parameters
    siteId
    required
    string <uuid> (Id)
    Example: 123e4567-e89b-12d3-a456-426614174000

    The site ID in uuid format

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]