diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index ad8fd3d92e..d271b64d36 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -325,51 +325,27 @@
# updates to the octopus rest api overview page are reviewed by team-marketing
-/docs/octopus-rest-api/index.mdx @OctopusDeploy/team-marketing
+/docs/api/index.mdx @OctopusDeploy/team-marketing
# updates to the how to create an api key page are reviewed by team-backend-foundations
-/docs/octopus-rest-api/how-to-create-an-api-key.md @OctopusDeploy/team-backend-foundations
+/docs/api/authentication/create-an-api-key.md @OctopusDeploy/team-backend-foundations
# updates to the octopus client page are reviewed by team-backend-foundations
-/docs/octopus-rest-api/octopus.client/index.md @OctopusDeploy/team-backend-foundations
+/docs/api/octopus.client/index.md @OctopusDeploy/team-backend-foundations
# updates to the octopus command line sections are reviewed by team-modern-deployments
-/docs/octopus-rest-api/octopus-cli/ @OctopusDeploy/team-modern-deployments
-
-# updates to the API examples page are reviewed by team-backend-foundations
-
-/docs/octopus-rest-api/examples/index.md @OctopusDeploy/team-backend-foundations
-
-# updates to the octopus server command line page are reviewed by team-backend-foundations
-
-/docs/octopus-rest-api/octopus.server.exe-command-line/index.md @OctopusDeploy/team-backend-foundations
-
-# updates to the octopus rest api tentacle exe command line page are reviewed by team-executions-foundations
-
-/docs/octopus-rest-api/tentacle.exe-command-line/index.md @OctopusDeploy/team-executions-foundations
-
-# updates to the calamari page are reviewed by team-modern-deployments
-
-/docs/octopus-rest-api/calamari.md @OctopusDeploy/team-modern-deployments
-
-# updates to the octopus migrator command line page are reviewed by team-backend-foundations
-
-/docs/octopus-rest-api/octopus.migrator.exe-command-line/index.md @OctopusDeploy/team-backend-foundations
-
-# updates to the migration api page are reviewed by team-backend-foundations
-
-/docs/octopus-rest-api/migration-api/index.md @OctopusDeploy/team-backend-foundations
+/docs/cli/octopus-cli/ @OctopusDeploy/team-modern-deployments
# updates to the octopus CLI sections are reviewed by team-modern-deployments
-/docs/octopus-rest-api/cli/ @OctopusDeploy/team-modern-deployments
+/docs/cli/ @OctopusDeploy/team-modern-deployments
# updates to the openid connect page are reviewed by team-devex
-/docs/octopus-rest-api/openid-connect/ @OctopusDeploy/team-devex
+/docs/api/authentication/openid-connect/ @OctopusDeploy/team-devex
# updates to the administration section are reviewed by team-backend-foundations
diff --git a/src/components/TopNav.astro b/src/components/TopNav.astro
index cba455ca14..52b9ec1880 100644
--- a/src/components/TopNav.astro
+++ b/src/components/TopNav.astro
@@ -18,7 +18,7 @@ const {
links = [
{ label: 'Docs', href: '/docs' },
// TODO: { label: 'Learn', href: '/docs/?' },
- { label: 'API', href: '/docs/octopus-rest-api' },
+ { label: 'API', href: '/docs/api' },
{ label: 'CLI', href: '/docs/cli' },
],
} = Astro.props satisfies Props;
diff --git a/src/lib/searchIndexing.ts b/src/lib/searchIndexing.ts
index b21aa20b17..34fc325c6a 100644
--- a/src/lib/searchIndexing.ts
+++ b/src/lib/searchIndexing.ts
@@ -5,7 +5,6 @@
import type { Frontmatter } from 'astro-accelerator-utils/types/Frontmatter';
import { classify } from '../scripts/search-engine';
-import { isUnderConstructionUrl } from './underConstruction';
type ArticleAttributes = {
'data-pagefind-ignore'?: string;
@@ -48,8 +47,7 @@ export function searchIndexAttributes(
pathname: string,
frontmatter: Frontmatter
): IndexAttributes {
- const indexable =
- frontmatter.navSearch !== false && !isUnderConstructionUrl(pathname);
+ const indexable = frontmatter.navSearch !== false;
// `all` rather than the default `index`: a bare ignore still lets Pagefind
// read a title or metadata out of the block.
diff --git a/src/lib/underConstruction.ts b/src/lib/underConstruction.ts
deleted file mode 100644
index e5e1b80301..0000000000
--- a/src/lib/underConstruction.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-// TEMPORARY - delete this file when the API reference goes live.
-//
-// The generated API reference under src/pages/docs/api is published, but the
-// section is still under construction: there is no landing page, the existing
-// /docs/octopus-rest-api content has not been folded in, and nothing links to
-// it. Until that work lands we keep it out of the site search index and out of
-// sitemap.xml, so neither readers nor Google arrive at it ahead of the pages
-// that explain it.
-//
-// Two call sites, which is why there are two entry points. sitemap.xml.ts takes
-// its page list from an `import.meta.glob` rooted at src/pages/docs, so the paths
-// it passes in look like './api/feeds.md'; `searchIndexAttributes` has the
-// rendered URL.
-
-const UNDER_CONSTRUCTION = [/^api(\/|$)/];
-
-/** True for a page that is built and published, but deliberately not indexed. */
-export function isUnderConstruction(globPath: string): boolean {
- const path = globPath.replace(/^\.?\//, '');
- return UNDER_CONSTRUCTION.some((pattern) => pattern.test(path));
-}
-
-/** The same test against a rendered page's URL. */
-export function isUnderConstructionUrl(pathname: string): boolean {
- return isUnderConstruction(pathname.replace(/^\/docs\//, ''));
-}
diff --git a/src/pages/components.mdx b/src/pages/components.mdx
index 3abc05b5f7..6db7d0d879 100644
--- a/src/pages/components.mdx
+++ b/src/pages/components.mdx
@@ -41,7 +41,7 @@ export const searchDemoResults = [
facet: 'docs',
},
{
- url: '/docs/octopus-rest-api/feeds/modify-a-feed',
+ url: '/docs/api/feeds/modify-a-feed',
title: 'Modify a feed',
excerpt:
'Updates the specified feed by setting the values of the parameters passed.',
diff --git a/src/pages/docs/administration/high-availability/auto-scaling-high-availability-nodes.md b/src/pages/docs/administration/high-availability/auto-scaling-high-availability-nodes.md
index 2791668d2d..b890ae4b3b 100644
--- a/src/pages/docs/administration/high-availability/auto-scaling-high-availability-nodes.md
+++ b/src/pages/docs/administration/high-availability/auto-scaling-high-availability-nodes.md
@@ -214,7 +214,7 @@ A task node is a node where the task cap is greater than 0. By default, all nod
While High Availability was designed to add nodes quickly, it was not designed to delete nodes quickly. The assumption was made when a node went offline; it was for a server restart. It was not designed to handle scale-in events from an auto-scaling technology automatically.
-Auto-scaling technologies don't let you run scripts directly on virtual machines as they are being deleted. They will typically publish a message you can process. Because of that, you'll need to leverage the [Octopus Deploy REST API](/docs/octopus-rest-api) to do the following:
+Auto-scaling technologies don't let you run scripts directly on virtual machines as they are being deleted. They will typically publish a message you can process. Because of that, you'll need to leverage the [Octopus Deploy REST API](/docs/api) to do the following:
- Enable drain mode on the node. While that is enabled, it will prevent the node from picking up new tasks and will attempt to finish in-process tasks.
- Wait until either the node is marked offline or all tasks have finished processing.
diff --git a/src/pages/docs/administration/high-availability/how-high-availability-works.md b/src/pages/docs/administration/high-availability/how-high-availability-works.md
index 5f894152d2..73448ab4bc 100644
--- a/src/pages/docs/administration/high-availability/how-high-availability-works.md
+++ b/src/pages/docs/administration/high-availability/how-high-availability-works.md
@@ -81,7 +81,7 @@ For planned outages, the recommendation is to enable drain mode. That will tell
Once the outage is finished, repeat the same steps, but select **Disable Drain Node** instead.
-Not all outages can be planned. The underlying hypervisor hosting VM the node is running on could crash. A data center could go offline. When that happens you can use this [API Script](/docs/octopus-rest-api/examples/bulk-operations/rerun-deployments-and-runbooks-after-node-shutdown) to re-run those canceled deployments and runbook runs.
+Not all outages can be planned. The underlying hypervisor hosting VM the node is running on could crash. A data center could go offline. When that happens you can use this [API Script](/docs/api/examples/bulk-operations/rerun-deployments-and-runbooks-after-node-shutdown) to re-run those canceled deployments and runbook runs.
### Number of nodes
diff --git a/src/pages/docs/administration/managing-infrastructure/rate-limiting.md b/src/pages/docs/administration/managing-infrastructure/rate-limiting.md
index 90fb64af06..5c30422a36 100644
--- a/src/pages/docs/administration/managing-infrastructure/rate-limiting.md
+++ b/src/pages/docs/administration/managing-infrastructure/rate-limiting.md
@@ -33,7 +33,7 @@ The rate limit applies per user.
### Authenticated AI Agent Requests
-This policy applies to any HTTP requests associated with an authenticated user which authenticate using an [agent API key](/docs/octopus-rest-api/how-to-create-an-api-key#creating-an-agent-api-key).
+This policy applies to any HTTP requests associated with an authenticated user which authenticate using an [agent API key](/docs/api/authentication/create-an-api-key#creating-an-agent-api-key).
The rate limit applies per user, counted separately from non-AI requests.
### Webhook Trigger Requests
diff --git a/src/pages/docs/administration/managing-infrastructure/server-configuration/managing-configuration.md b/src/pages/docs/administration/managing-infrastructure/server-configuration/managing-configuration.md
index 6f244a1d69..5f6e483735 100644
--- a/src/pages/docs/administration/managing-infrastructure/server-configuration/managing-configuration.md
+++ b/src/pages/docs/administration/managing-infrastructure/server-configuration/managing-configuration.md
@@ -20,7 +20,7 @@ In the Octopus Web Portal, you can access configuration by navigating to **Confi
## Octopus.Client
-Using [Octopus.Client](/docs/octopus-rest-api/octopus.client), each of the configuration types can be managed programmatically, reading from and writing back to the Octopus Deploy database.
+Using [Octopus.Client](/docs/api/octopus.client), each of the configuration types can be managed programmatically, reading from and writing back to the Octopus Deploy database.
:::div{.hint}
This requires version 15.2.0 or later of the client library.
@@ -67,4 +67,4 @@ $guestConfig.IsEnabled = $true;
$guestConfig = $modifyMethod.Invoke($repo.Configuration, $guestConfig)
```
-For more information on using the Octopus.Client library see [Octopus.Client](/docs/octopus-rest-api/octopus.client).
+For more information on using the Octopus.Client library see [Octopus.Client](/docs/api/octopus.client).
diff --git a/src/pages/docs/administration/migrate-spaces-with-octoterra/index.md b/src/pages/docs/administration/migrate-spaces-with-octoterra/index.md
index 69de04750e..c9c65c7695 100644
--- a/src/pages/docs/administration/migrate-spaces-with-octoterra/index.md
+++ b/src/pages/docs/administration/migrate-spaces-with-octoterra/index.md
@@ -93,8 +93,8 @@ These are the prerequisites for migrating an Octopus space with the Octoterra Wi
- [Backup](https://octopus.com/docs/administration/data/backup-and-restore) your Octopus instance again before the migration.
- Download the Octoterra Wizard from [GitHub](https://github.com/OctopusSolutionsEngineering/OctoterraWizard).
- Install [Terraform](https://developer.hashicorp.com/terraform/install) on your local workstation.
-- [Create an API key](https://octopus.com/docs/octopus-rest-api/how-to-create-an-api-key) for the source Octopus instance.
-- [Create an API key](https://octopus.com/docs/octopus-rest-api/how-to-create-an-api-key) for the destination Octopus instance.
+- [Create an API key](https://octopus.com/docs/api/authentication/create-an-api-key) for the source Octopus instance.
+- [Create an API key](https://octopus.com/docs/api/authentication/create-an-api-key) for the destination Octopus instance.
- Create a remote [Terraform backend](https://developer.hashicorp.com/terraform/language/settings/backends/configuration) to maintain the state of the Terraform resources. [AWS S3](https://developer.hashicorp.com/terraform/language/settings/backends/s3) and [Azure Storage Accounts](https://developer.hashicorp.com/terraform/language/settings/backends/azurerm) are supported.
- Install any required local tools. See the "Local Tools vs Container Images" section for more details.
@@ -336,7 +336,7 @@ Any firewall rules relating to the Octopus server must be updated to reflect the
### Regenerate API keys
-Any external scripts and platforms to connect to the destination Octopus server must make use of a new [API key](https://octopus.com/docs/octopus-rest-api/how-to-create-an-api-key).
+Any external scripts and platforms to connect to the destination Octopus server must make use of a new [API key](https://octopus.com/docs/api/authentication/create-an-api-key).
### Reconfigure polling tentacles
diff --git a/src/pages/docs/administration/reporting/report-on-deployments-excel-template.md b/src/pages/docs/administration/reporting/report-on-deployments-excel-template.md
index 93374ab121..230768a180 100644
--- a/src/pages/docs/administration/reporting/report-on-deployments-excel-template.md
+++ b/src/pages/docs/administration/reporting/report-on-deployments-excel-template.md
@@ -59,7 +59,7 @@ The best way to consume reporting data from Octopus is using the XML feed. The f
Where:
- `` is the hostname of your Octopus Server
-- `` is one of [your API keys](/docs/octopus-rest-api/how-to-create-an-api-key)
+- `` is one of [your API keys](/docs/api/authentication/create-an-api-key)
For example:
diff --git a/src/pages/docs/administration/reporting/report-on-deployments-using-excel.md b/src/pages/docs/administration/reporting/report-on-deployments-using-excel.md
index 19ea0415b2..7eac77e3fd 100644
--- a/src/pages/docs/administration/reporting/report-on-deployments-using-excel.md
+++ b/src/pages/docs/administration/reporting/report-on-deployments-using-excel.md
@@ -24,7 +24,7 @@ At a high-level, the steps are:
Before we can report on the data using Excel, we need to export it in a format that Excel can import. The easiest way to do this is using an XML file.
-Octopus exposes data on deployments through the `/api/reporting/deployments/xml` endpoint. You can use our [Octopus API clients](/docs/octopus-rest-api/getting-started#api-clients) to download the XML file.
+Octopus exposes data on deployments through the `/api/reporting/deployments/xml` endpoint. You can use our [Octopus API clients](/docs/api/#api-clients) to download the XML file.
PowerShell
diff --git a/src/pages/docs/api-and-integration/api/how-to-create-an-api-key.md b/src/pages/docs/api-and-integration/api/how-to-create-an-api-key.md
index 225c980a29..ac03e5207e 100644
--- a/src/pages/docs/api-and-integration/api/how-to-create-an-api-key.md
+++ b/src/pages/docs/api-and-integration/api/how-to-create-an-api-key.md
@@ -1,7 +1,7 @@
---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/how-to-create-an-api-key
+redirect: https://octopus.com/docs/api/authentication/create-an-api-key
pubDate: 2023-01-01
navSearch: false
navSitemap: false
diff --git a/src/pages/docs/api-and-integration/examples/add-a-space-with-environments.md b/src/pages/docs/api-and-integration/examples/add-a-space-with-environments.md
index 4ca533f3f3..acffb8170b 100644
--- a/src/pages/docs/api-and-integration/examples/add-a-space-with-environments.md
+++ b/src/pages/docs/api-and-integration/examples/add-a-space-with-environments.md
@@ -1,7 +1,7 @@
---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/spaces/add-a-space-with-environments
+redirect: https://octopus.com/docs/api/examples/spaces/add-a-space-with-environments
pubDate: 2023-01-01
navSearch: false
navSitemap: false
diff --git a/src/pages/docs/api-and-integration/examples/delete-a-space.md b/src/pages/docs/api-and-integration/examples/delete-a-space.md
index c6529b8503..fe8bf0f75c 100644
--- a/src/pages/docs/api-and-integration/examples/delete-a-space.md
+++ b/src/pages/docs/api-and-integration/examples/delete-a-space.md
@@ -1,7 +1,7 @@
---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/spaces/delete-a-space
+redirect: https://octopus.com/docs/api/examples/spaces/delete-a-space
pubDate: 2023-01-01
navSearch: false
navSitemap: false
diff --git a/src/pages/docs/api-and-integration/examples/index.md b/src/pages/docs/api-and-integration/examples/index.md
index e165e097c1..c053b4ce77 100644
--- a/src/pages/docs/api-and-integration/examples/index.md
+++ b/src/pages/docs/api-and-integration/examples/index.md
@@ -1,7 +1,7 @@
---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples
+redirect: https://octopus.com/docs/api/examples
pubDate: 2023-01-01
navSearch: false
navSitemap: false
diff --git a/src/pages/docs/api-and-integration/migration-api/index.md b/src/pages/docs/api-and-integration/migration-api/index.md
index 2be7519959..3b43368f00 100644
--- a/src/pages/docs/api-and-integration/migration-api/index.md
+++ b/src/pages/docs/api-and-integration/migration-api/index.md
@@ -1,7 +1,7 @@
---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/migration-api
+redirect: https://octopus.com/docs/api/migrations
pubDate: 2023-01-01
navSearch: false
navSitemap: false
diff --git a/src/pages/docs/api-and-integration/octopus.client.md b/src/pages/docs/api-and-integration/octopus.client.md
index db5d77a6c6..bc45ecc2ce 100644
--- a/src/pages/docs/api-and-integration/octopus.client.md
+++ b/src/pages/docs/api-and-integration/octopus.client.md
@@ -1,7 +1,7 @@
---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/octopus.client
+redirect: https://octopus.com/docs/api/octopus.client
pubDate: 2023-01-01
navSearch: false
navSitemap: false
diff --git a/src/pages/docs/api/authentication/create-an-api-key.md b/src/pages/docs/api/authentication/create-an-api-key.md
new file mode 100644
index 0000000000..e6f1cb5a12
--- /dev/null
+++ b/src/pages/docs/api/authentication/create-an-api-key.md
@@ -0,0 +1,143 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2026-06-19
+title: Create an API Key
+description: How to create an API key to interact with Octopus without the need for a username and password.
+navOrder: 10
+---
+
+API keys allow you to access the Octopus Deploy [REST API](/docs/octopus-rest-api) and perform tasks such as creating and deploying releases. API keys can be saved in scripts or external tools, without having to use your username and password. Each user and service account can have multiple API keys.
+
+See the [Service Accounts docs](/docs/security/users-and-teams/service-accounts) for information about creating service accounts.
+
+## Creating an API Key
+
+[Getting Started - API Keys](https://www.youtube.com/watch?v=f3-vRjpB0cE)
+
+You can create API keys by performing the following steps:
+
+1. Log into the Octopus Web Portal, click your profile image and select **Profile**.
+1. Click **My API Keys**.
+1. Click **New API key**, state the purpose of the API key.
+1. Choose the level of **Access** to grant (see below).
+1. Click **Generate new**.
+1. Copy the new API key to your clipboard.
+
+:::div{.warning}
+**Write Your Key Down**
+After you generate an API key, it cannot be retrieved from the Octopus Web Portal again, we store only a one-way hash of the API key. If you want to use the API key again, you need to store it in a secure place such as a password manager. Read about [why we hash API keys](https://octopus.com/blog/hashing-api-keys).
+:::
+
+## Creating an agent API key {#creating-an-agent-api-key}
+
+If you're connecting an AI agent to Octopus—such as the [Octopus MCP server](/docs/octopus-ai/mcp)—create a dedicated agent API key rather than a regular one. Agent keys are tagged throughout Octopus so you can filter for and audit agent activity separately from human activity.
+
+You can also create an agent API key directly from the **API Keys** page:
+
+1. Click **New API key for AI Agent** and state the purpose of the key.
+1. Choose the level of **Access** to grant.
+1. Click **Generate new**.
+1. Copy the new API key to your clipboard.
+
+## Choosing an access level
+
+:::div{.hint}
+
+This feature is currently being rolled out to Octopus Cloud customers and will become available to self-hosted installations in Octopus Server 2026.3.
+
+If you don't see the access option when creating an API key, the API key will be created with full access and have the same permissions as your user account.
+
+:::
+
+Recent versions of Octopus Server add the ability to limit the scope of an API key, to allow only read-only access. Alternatively, you can grant the API key full access to give it the same permissions as your user account. Use the **Preview Permissions** link to see the exact list of permissions that apply to the chosen access level.
+
+Read-only scopes are useful for tooling that doesn't need to be able to make changes, perform actions or trigger deployments, such as AI agents (like Claude Code) or for external monitoring systems (like release progression dashboards).
+
+Note that it is not possible to create an API key with more permissions than your user account. For these scenarios, you should look at creating an API key under a dedicated [Service Account](/docs/security/users-and-teams/service-accounts) instead. Use this approach for tooling that is not acting on behalf of a particular user.
+
+## Setting an expiry date
+
+:::div{.hint}
+The ability to set an expiry date on new API keys was added in Octopus Deploy **2020.6**.
+:::
+By default, new API keys are valid for 180 days from the point they are created.
+
+When creating an API key in the Octopus Web Portal, you can choose from a preset list of offsets from the current date, or select a custom date. Keys will expire at the end of the selected day. When using the Octopus REST API to create a key, you can set the expiry date to your preferred date and time, including time zone offset.
+
+There are three restrictions on the expiry date:
+
+- It cannot be in the past.
+- It cannot be after the expiry date of the key being used to create it (when using the REST API).
+- **Octopus Deploy 2025.4 and newer:** It cannot exceed the server's configured maximum expiry period (defaults to 366 days, configurable)
+
+## Configure API keys for expiry notifications
+
+[Octopus Subscriptions](/docs/administration/managing-infrastructure/subscriptions) can be used to configure notifications when API keys are close to expiry or have expired.
+
+There is an "API key expiry events" event-group and three events:
+
+- API key expiry 20-day warning.
+- API key expiry 10-day warning.
+- API key expired.
+
+:::div{.info}
+
+The background task which raises the api-key-expiry events runs:
+
+- 10 minutes after the Octopus Server service starts
+- Every 4 hours
+
+:::
+
+## Configuring API Key default and maximum expiry durations
+
+:::div{.hint}
+The ability to control the default and maximum API key expiry was added in Octopus Deploy **2025.4**. The ability to create keys that never expire was removed in this version.
+
+Versions 2025.3 and below will use a default expiry of 180 days and have no maximum.
+:::
+
+Octopus administrators can change the maximum API key expiry from 366 days to a value of their choice, up to 1096 days.
+
+Octopus administrators can change the default API key expiry from 180 days to a value of their choice. The default period must be less than or equal to the maximum.
+
+To change these values in the Octopus Web Portal:
+
+1. Navigate to **Configuration ➜ Settings** and click **Authentication**.
+1. Expand the sections for **API Key default expiry (days)** and **API Key maximum expiry (days)** and alter the values.
+1. Click Save.
+
+## Managing API keys
+
+Octopus administrators can view all API keys across the instance from the **API Keys** page.
+
+### Identifying key types
+
+Each key's row shows an **API key type** column with a type tag—**User**, or **AI Agent**—so you can tell at a glance which kind of identity each key belongs to.
+
+### Filtering by agent
+
+Check **AI Agents** to filter the list to agent keys only. This is useful when you want to review the credentials your agents are using without wading through keys belonging to human users.
+
+### Last used
+
+The list shows when each key was last used. Use this to spot dormant credentials that may need rotating.
+
+### Viewing permissions
+
+Each row has an overflow menu. Select **View permissions** to open the Test Permissions page for that identity, so you can see exactly what the key can do.
+
+## Disabling API key creation for user accounts
+
+:::div{.hint}
+The ability to disable API key creation for user accounts was added in Octopus Deploy **2023.2**.
+:::
+
+Octopus administrators can disable the creation of API keys for regular user accounts. Existing API keys will continue to function, and new API keys can still be created for [Service Accounts](/docs/security/users-and-teams/service-accounts).
+
+To change the value in the Octopus Web Portal:
+
+1. Navigate to **Configuration ➜ Settings** and click **Authentication**.
+1. Expand the section for **User API Keys** and alter the value.
+1. Click Save.
diff --git a/src/pages/docs/octopus-rest-api/openid-connect/github-actions.md b/src/pages/docs/api/authentication/openid-connect/github-actions.md
similarity index 99%
rename from src/pages/docs/octopus-rest-api/openid-connect/github-actions.md
rename to src/pages/docs/api/authentication/openid-connect/github-actions.md
index f021b4d4f3..e8648bb028 100644
--- a/src/pages/docs/octopus-rest-api/openid-connect/github-actions.md
+++ b/src/pages/docs/api/authentication/openid-connect/github-actions.md
@@ -12,7 +12,7 @@ hideInThisSection: true
Octopus has first-class support for using OpenID Connect (OIDC) within GitHub Actions when using the [`OctopusDeploy/login`](https://github.com/OctopusDeploy/login) action.
:::div{.hint}
-Using OIDC to access the Octopus API is only supported for service accounts, to access the API for a user account please use [an API key](/docs/octopus-rest-api/how-to-create-an-api-key).
+Using OIDC to access the Octopus API is only supported for service accounts, to access the API for a user account please use [an API key](/docs/api/authentication/create-an-api-key).
:::
For more information on OIDC in GitHub Actions see [Security hardening with OpenID Connect](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect).
diff --git a/src/pages/docs/octopus-rest-api/openid-connect/index.md b/src/pages/docs/api/authentication/openid-connect/index.md
similarity index 95%
rename from src/pages/docs/octopus-rest-api/openid-connect/index.md
rename to src/pages/docs/api/authentication/openid-connect/index.md
index 87313cb6f6..81bf81eab1 100644
--- a/src/pages/docs/octopus-rest-api/openid-connect/index.md
+++ b/src/pages/docs/api/authentication/openid-connect/index.md
@@ -31,14 +31,14 @@ Some of the benefits of using OIDC in Octopus include:
- Access tokens are only issued for requests from trusted external systems, allowing for controlled access to service accounts and promoting using the principle of least access.
:::div{.hint}
-Using OIDC to access the Octopus API is only supported for service accounts, to access the API for a user account please use [an API key](/docs/octopus-rest-api/how-to-create-an-api-key).
+Using OIDC to access the Octopus API is only supported for service accounts, to access the API for a user account please use [an API key](/docs/api/authentication/create-an-api-key).
:::
Any issuer that can generate signed OIDC tokens which can be validated anonymously is supported, however first-class support for GitHub Actions is provided with the [`OctopusDeploy/login`](https://github.com/OctopusDeploy/login) action.
## Getting started with GitHub Actions
-Follow the guide below to get started using OIDC with GitHub Actions. For more complex scenarios, or for a full list of available options, see [Using OpenID Connect with Octopus and GitHub Actions](/docs/octopus-rest-api/openid-connect/github-actions).
+Follow the guide below to get started using OIDC with GitHub Actions. For more complex scenarios, or for a full list of available options, see [Using OpenID Connect with Octopus and GitHub Actions](/docs/api/authentication/openid-connect/github-actions).
### Create an OIDC identity for a service account
@@ -114,7 +114,7 @@ jobs:
## Getting started with other issuers
-Follow the guide below to get started using OIDC with other issuers. For more complex scenarios, or for a full list of available options, see [Using OpenID Connect with Other Issuers](/docs/octopus-rest-api/openid-connect/other-issuers).
+Follow the guide below to get started using OIDC with other issuers. For more complex scenarios, or for a full list of available options, see [Using OpenID Connect with Other Issuers](/docs/api/authentication/openid-connect/other-issuers).
### Create an OIDC identity for a service account
@@ -150,7 +150,7 @@ A Service Account Id will be shown, this will be a GUID which must be supplied a
1. Obtain an OIDC token from the issuer, the `aud` claim must be the Service Account Id. The process for obtaining the OIDC token from the issuer will differ by issuer, please consult your OIDC issuers documentation.
2. Get the token exchange endpoint for your Octopus server from the `token_endpoint` property of the OpenID Connect Discovery endpoint `https://my-octopus-server.com/.well-known/openid-configuration`.
-3. Exchange the OIDC token for an Octopus access token, setting `audience` property to the Service Account Id from above. See [Exchanging an OIDC token for an Octopus access token](/docs/octopus-rest-api/openid-connect/other-issuers#OidcOtherIssuers-TokenExchange) for more details on the token exchange request.
+3. Exchange the OIDC token for an Octopus access token, setting `audience` property to the Service Account Id from above. See [Exchanging an OIDC token for an Octopus access token](/docs/api/authentication/openid-connect/other-issuers#OidcOtherIssuers-TokenExchange) for more details on the token exchange request.
4. Get the `access_token` from the token exchange response.
### Using the access token to access the Octopus API
@@ -191,7 +191,7 @@ If you are encountering issues using OIDC validating identity tokens from your O
- The audience must be the id of the service account and will be a GUID.
- The issuer must be a URL using the HTTPS scheme.
- The subject must match the configured subject on the OIDC identity and is *case-sensitive*. Support is available to include wildcard characters in the subject using `*` and `?` for multiple and single character matches respectively.
-- If you are making the token exchange request manually (e.g. using an [issuer other than GitHub Actions](/docs/octopus-rest-api/openid-connect/other-issuers)), check that the required fields are set correctly. See [Exchanging an OIDC token for an Octopus access token](/docs/octopus-rest-api/openid-connect/other-issuers#OidcOtherIssuers-TokenExchange) for more information on the request format.
+- If you are making the token exchange request manually (e.g. using an [issuer other than GitHub Actions](/docs/api/authentication/openid-connect/other-issuers)), check that the required fields are set correctly. See [Exchanging an OIDC token for an Octopus access token](/docs/api/authentication/openid-connect/other-issuers#OidcOtherIssuers-TokenExchange) for more information on the request format.
- Check that the token has not expired (`exp`). Often identity tokens created by OIDC providers will have a short lifetime.
- Check that the token is signed by a valid key from the issuer. Signing keys may be invalidated by providers under some circumstances.
- Check that the public key used to sign the token are available using [OpenID discovery](https://openid.net/specs/openid-connect-discovery-1_0.html).
diff --git a/src/pages/docs/octopus-rest-api/openid-connect/other-issuers.md b/src/pages/docs/api/authentication/openid-connect/other-issuers.md
similarity index 99%
rename from src/pages/docs/octopus-rest-api/openid-connect/other-issuers.md
rename to src/pages/docs/api/authentication/openid-connect/other-issuers.md
index ae635807bb..653ccf9a97 100644
--- a/src/pages/docs/octopus-rest-api/openid-connect/other-issuers.md
+++ b/src/pages/docs/api/authentication/openid-connect/other-issuers.md
@@ -12,7 +12,7 @@ hideInThisSection: true
Octopus supports using OpenID Connect for any external system that can issue a signed OIDC token which can be validated anonymously via an HTTPS endpoint.
:::div{.hint}
-Using OIDC to access the Octopus API is only supported for service accounts, to access the API for a user account please use [an API key](/docs/octopus-rest-api/how-to-create-an-api-key).
+Using OIDC to access the Octopus API is only supported for service accounts, to access the API for a user account please use [an API key](/docs/api/authentication/create-an-api-key).
:::
## Configuring an OIDC identity
diff --git a/src/pages/docs/api/examples/accounts/create-aws-account.mdx b/src/pages/docs/api/examples/accounts/create-aws-account.mdx
new file mode 100644
index 0000000000..1d7115a1e6
--- /dev/null
+++ b/src/pages/docs/api/examples/accounts/create-aws-account.mdx
@@ -0,0 +1,24 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Create an AWS account
+description: An example script to create an AWS account in Octopus.
+---
+import CreateAwsAccountScripts from 'src/shared-content/scripts/create-aws-account-scripts.include.md';
+
+This script provides an example of how to programmatically create an AWS account.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Octopus Space Name
+- AWS account key
+- AWS secret key
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/accounts/create-azure-service-principal.mdx b/src/pages/docs/api/examples/accounts/create-azure-service-principal.mdx
new file mode 100644
index 0000000000..b88b04baa2
--- /dev/null
+++ b/src/pages/docs/api/examples/accounts/create-azure-service-principal.mdx
@@ -0,0 +1,31 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Create an Azure service principal
+description: An example script to create an Azure service principal in Octopus.
+---
+import CreateAzureServicePrincipalScripts from 'src/shared-content/scripts/create-azure-service-principal-scripts.include.md';
+
+This script provides an example of how to programmatically create an [Azure Service Principal account](/docs/infrastructure/accounts/azure/#azure-service-principal).
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Azure Client ID
+- Azure Secret/Password
+- Azure Subscription Number
+- Azure Tenant ID
+- Octopus Account Name
+- (Optional) Octopus Account Description
+- Octopus Account Participation Type (Tenanted|Untenanted|TenantedOrUntenanted)
+- (Optional) Array of Tenant Tags
+- (Optional) Array of Tenant IDs
+- (Optional) Array of Environment IDs
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/accounts/create-gcp-account.mdx b/src/pages/docs/api/examples/accounts/create-gcp-account.mdx
new file mode 100644
index 0000000000..0192d6054e
--- /dev/null
+++ b/src/pages/docs/api/examples/accounts/create-gcp-account.mdx
@@ -0,0 +1,38 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Create a Google Cloud account
+description: An example script to create a Google Cloud (GCP) account in Octopus.
+---
+import CreateGoogleCloudAccountScript from 'src/shared-content/scripts/create-google-cloud-account-scripts.include.md';
+
+This script provides an example of how to programmatically create a Google Cloud (GCP) account.
+
+:::div{.hint}
+**Note:**
+Please note there are some items to consider before using these scripts:
+
+- Google Cloud Accounts were added in **Octopus 2021.2**. Using these script examples in earlier versions of Octopus won't work.
+- Script examples that use the [Octopus Clients library](https://github.com/OctopusDeploy/OctopusClients) make use of a new `GoogleCloudAccountResource` type that was added in version **11.3.3355** of the library.
+
+:::
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Octopus Space ID
+- Name for the Google Cloud account
+- *Optional* description for the Google Cloud account
+- Path to the [json key file](https://oc.to/GoogleCloudServiceAccountKey) to use when authenticating against Google Cloud
+- *Optional* Array of Environment IDs
+- Octopus Tenanted Participation Type (`Tenanted` | `Untenanted` | `TenantedOrUntenanted`)
+- *Optional* Array of Tenant IDs
+- *Optional* Array of Tenant Tags
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/accounts/index.md b/src/pages/docs/api/examples/accounts/index.md
new file mode 100644
index 0000000000..9cea2a7b8e
--- /dev/null
+++ b/src/pages/docs/api/examples/accounts/index.md
@@ -0,0 +1,26 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Accounts
+description: This section includes examples of how to use the REST API to create and manage accounts in Octopus.
+navOrder: 10
+hideInThisSectionHeader: true
+---
+
+[Accounts](https://oc.to/OnboardingAccountsLearnMore) help you to centralize account details used during your deployments, including things like username/password, tokens, Azure and AWS credentials and SSH key pairs.
+
+Out-of-the-box, Octopus provides different types of accounts to help manage your infrastructure:
+
+- [Azure account](/docs/infrastructure/accounts/azure).
+- [AWS account](/docs/infrastructure/accounts/aws).
+- [Google Cloud account](/docs/infrastructure/accounts/google-cloud).
+- [SSH Key Pair](/docs/infrastructure/accounts/ssh-key-pair).
+- [Username/Password](/docs/infrastructure/accounts/username-and-password).
+- [Tokens](/docs/infrastructure/accounts/tokens).
+
+You can use the REST API to create and manage accounts in Octopus. Typical tasks can include:
+
+- [Create an AWS account](/docs/api/examples/accounts/create-aws-account)
+- [Create an Azure service principal](/docs/api/examples/accounts/create-azure-service-principal)
+- [Create a Google Cloud account](/docs/api/examples/accounts/create-gcp-account)
diff --git a/src/pages/docs/api/examples/add-a-space-with-environments.md b/src/pages/docs/api/examples/add-a-space-with-environments.md
new file mode 100644
index 0000000000..acffb8170b
--- /dev/null
+++ b/src/pages/docs/api/examples/add-a-space-with-environments.md
@@ -0,0 +1,9 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/spaces/add-a-space-with-environments
+pubDate: 2023-01-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/api/examples/add-azure-web-app.md b/src/pages/docs/api/examples/add-azure-web-app.md
new file mode 100644
index 0000000000..9a3e66be93
--- /dev/null
+++ b/src/pages/docs/api/examples/add-azure-web-app.md
@@ -0,0 +1,9 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-targets/add-azure-web-app
+pubDate: 2023-01-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/api/examples/add-environment-to-step.md b/src/pages/docs/api/examples/add-environment-to-step.md
new file mode 100644
index 0000000000..9eeb47c1a3
--- /dev/null
+++ b/src/pages/docs/api/examples/add-environment-to-step.md
@@ -0,0 +1,9 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-process/add-environment-to-step
+pubDate: 2023-01-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/api/examples/artifacts/create-and-upload-artifacts.mdx b/src/pages/docs/api/examples/artifacts/create-and-upload-artifacts.mdx
new file mode 100644
index 0000000000..21f7fcdecd
--- /dev/null
+++ b/src/pages/docs/api/examples/artifacts/create-and-upload-artifacts.mdx
@@ -0,0 +1,27 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Upload Artifact to Existing Deployment
+description: An example script to upload an existing local file as an artifact to an existing deployment.
+---
+import UploadArtifactToDeploymentScripts from 'src/shared-content/scripts/upload-artifact-to-deployment-scripts.include.md';
+
+This script provides an example of how to programmatically upload an [artifact](/docs/projects/deployment-process/artifacts) to an existing deployment.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Space Name
+- API Key
+- Project Name
+- Release Version
+- Environment Name
+- File Path to Upload
+- File Name for Octopus
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/artifacts/download-deployment-artifacts.mdx b/src/pages/docs/api/examples/artifacts/download-deployment-artifacts.mdx
new file mode 100644
index 0000000000..53778740c5
--- /dev/null
+++ b/src/pages/docs/api/examples/artifacts/download-deployment-artifacts.mdx
@@ -0,0 +1,27 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Download Deployment Artifact
+description: An example script to download a deployment artifact to a specified location.
+---
+import DownloadArtifactFromDeploymentScripts from 'src/shared-content/scripts/download-artifact-from-deployment-scripts.include.md';
+
+This script provides an example of how to programmatically download an existing [artifact](/docs/projects/deployment-process/artifacts) created as part of a deployment to a specified location.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Space Name
+- API Key
+- Project Name
+- Release Version
+- Environment Name
+- File Download Path
+- File Name for Octopus
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/artifacts/download-runbook-artifacts.mdx b/src/pages/docs/api/examples/artifacts/download-runbook-artifacts.mdx
new file mode 100644
index 0000000000..332ff35f7b
--- /dev/null
+++ b/src/pages/docs/api/examples/artifacts/download-runbook-artifacts.mdx
@@ -0,0 +1,27 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Download Runbook Artifact
+description: An example script to download a runbook artifact to a specified location.
+---
+import DownloadArtifactFromRunbookScripts from 'src/shared-content/scripts/download-artifact-from-runbook-scripts.include.md';
+
+This script provides an example of how to programmatically download an existing [artifact](/docs/projects/deployment-process/artifacts) created as part of a runbook to a specified location. The latest runbook run will be chosen as the task to retrieve the artifact from.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- API Key
+- Space Name
+- Project Name
+- Runbook Name
+- Environment Name
+- File Download Path
+- File Name for Octopus
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/artifacts/index.md b/src/pages/docs/api/examples/artifacts/index.md
new file mode 100644
index 0000000000..f64c32d52e
--- /dev/null
+++ b/src/pages/docs/api/examples/artifacts/index.md
@@ -0,0 +1,15 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Artifacts
+description: This section includes examples of how to use the REST API to create and manage artifacts in Octopus.
+navOrder: 20
+hideInThisSectionHeader: true
+---
+
+You can use the REST API to create and download [artifacts](/docs/projects/deployment-process/artifacts) in Octopus. Typical tasks can include:
+
+- [Upload Artifact to Existing Deployment](/docs/api/examples/artifacts/create-and-upload-artifacts)
+- [Download Deployment Artifact](/docs/api/examples/artifacts/download-deployment-artifacts)
+- [Download Runbook Artifact](/docs/api/examples/artifacts/download-runbook-artifacts)
diff --git a/src/pages/docs/api/examples/bulk-operations/bulk-add-projects-to-tenants.mdx b/src/pages/docs/api/examples/bulk-operations/bulk-add-projects-to-tenants.mdx
new file mode 100644
index 0000000000..9127a3afb9
--- /dev/null
+++ b/src/pages/docs/api/examples/bulk-operations/bulk-add-projects-to-tenants.mdx
@@ -0,0 +1,43 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Bulk add a project to a list of tenants
+description: An example script that will add a project to a lot of tenants at once.
+---
+import BulkAddTenantsToProjects from 'src/shared-content/scripts/bulk-add-tenants-to-projects.include.md';
+
+This script demonstrates how to programmatically assign a group of [tenants](/docs/tenants) to a project in Octopus.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Name of the project to add
+- A list of Environments to tie the project to
+- The tenant tag you wish to filter on
+- What if is true or false
+- Max number of tenants to change
+
+:::div{.hint}
+**Note:**
+In order for this script to execute correctly, please note the following:
+
+- The projects provided must have the Multi-tenanted deployment setting enabled.
+- The environments provided must exist.
+- The optional tenant tags provided must exist.
+- The script will make sure the environments specified are assigned to that tenant. Even if the tenant / project relationship already exists.
+
+:::
+
+This script has guardrails in place to ensure you don't make too many changes.
+
+- The first is what if. Set that to `$true` and it will skip the save step. It will print out all the changes it would've made to the tenant.
+- The second is the max number of tenants to change. The search will still return the full list of tenants, however, it will only change, at most the number of tenants specified. For example, if you specified 10 tenants, and it found 25 to change, it would only change those 10. The next run will change the next 10, and then finally the last 5.
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/bulk-operations/index.md b/src/pages/docs/api/examples/bulk-operations/index.md
new file mode 100644
index 0000000000..7823aa8262
--- /dev/null
+++ b/src/pages/docs/api/examples/bulk-operations/index.md
@@ -0,0 +1,22 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Bulk Operations
+description: This section includes examples of how to use the REST API to perform a variety of bulk operations using the Octopus Deploy API.
+navOrder: 400
+hideInThisSectionHeader: true
+---
+
+You can use the Octopus Deploy REST API to perform a number of bulk operations.
+
+All the scripts in this section will include:
+
+- A what-if parameter to let you run the script without worrying about saving any changes.
+- A list of what would've changed (when what-if is `True`), or what just changed (when what-if is `False`).
+- A "limiter" parameter that will limit the number of changes per run. If you have 25 items to change, and the limit is set to 5, it will only change five items per run. You'd need to run the script five times to change all 25 items. This was added so you can do some test runs and spot-check the results.
+
+Provided sample bulk operations are:
+
+- [Bulk add a project to a list of tenants](/docs/api/examples/bulk-operations/bulk-add-projects-to-tenants)
+- [Rerun all canceled deployments and runbook runs after node shutdown](/docs/api/examples/bulk-operations/rerun-deployments-and-runbooks-after-node-shutdown)
diff --git a/src/pages/docs/api/examples/bulk-operations/rerun-deployments-and-runbooks-after-node-shutdown.mdx b/src/pages/docs/api/examples/bulk-operations/rerun-deployments-and-runbooks-after-node-shutdown.mdx
new file mode 100644
index 0000000000..5a198237f2
--- /dev/null
+++ b/src/pages/docs/api/examples/bulk-operations/rerun-deployments-and-runbooks-after-node-shutdown.mdx
@@ -0,0 +1,36 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2026-06-23
+title: Rerun all canceled deployments and runbook runs after node shutdown.
+description: An example script that determine which deployments and runbook runs were canceled because of a node shutdown and resubmit them.
+---
+import RerunDeploymentsAndRunbooksAfterNodeFailure from 'src/shared-content/scripts/rerun-deployments-and-runbooks-after-node-failure.include.md';
+
+:::div{.hint}
+**Octopus Cloud:** This script is no longer needed for deployments and runbook runs. On Octopus Cloud, these tasks are resilient — they continue automatically after a node restart or maintenance window rather than being cancelled. This script remains useful for self-hosted High Availability instances, where node restarts still cancel active tasks.
+:::
+
+This script demonstrates how to programmatically determine which deployments and runbook runs can be resubmitted because they were canceled because of a node shutdown. The node could have been shutdown for normal reasons, or it could have stopped responding, or it could have been turned off.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- The age in minutes you wish to filter on
+- The comma separated list of nodes names that were shutdown
+- What if is true or false
+
+This script has guardrails in place to ensure you don't make too many changes.
+
+- A what if variable. Set that to `$true` and it will skip the submission step. It will print out all the deployments and runbook runs it would've done.
+- This script will not resubmit every canceled runbook run or deployment. For a runbook run or deployment to be considered it must:
+ - Have been canceled within the time frame provided.
+ - Have been running on the node or nodes that were provided.
+ - Have been canceled because of a node shutdown.
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/cancel-queued-deployments.md b/src/pages/docs/api/examples/cancel-queued-deployments.md
new file mode 100644
index 0000000000..384d909869
--- /dev/null
+++ b/src/pages/docs/api/examples/cancel-queued-deployments.md
@@ -0,0 +1,9 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployments/cancel-queued-deployments
+pubDate: 2023-01-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/api/examples/certificates/create-certificate.mdx b/src/pages/docs/api/examples/certificates/create-certificate.mdx
new file mode 100644
index 0000000000..c466146a7f
--- /dev/null
+++ b/src/pages/docs/api/examples/certificates/create-certificate.mdx
@@ -0,0 +1,24 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Create a certificate
+description: An example script to add a certificate to the Octopus certificate library.
+---
+import CreateCertificateScripts from 'src/shared-content/scripts/create-certificate-scripts.include.md';
+
+This script uploads a certificate file in pfx format to the Octopus [certificate library](/docs/deployments/certificates) to be used in deployments or runbooks.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- PFX file path
+- PFX file password
+- Certificate Name
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/certificates/index.md b/src/pages/docs/api/examples/certificates/index.md
new file mode 100644
index 0000000000..ee77021630
--- /dev/null
+++ b/src/pages/docs/api/examples/certificates/index.md
@@ -0,0 +1,14 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Certificates
+description: This section includes examples of how to use the REST API to create and manage certificates in Octopus.
+navOrder: 30
+hideInThisSectionHeader: true
+---
+
+You can use the REST API to create and manage your [certificates](/docs/deployments/certificates) in Octopus. Typical tasks can include:
+
+- [Create a certificate](/docs/api/examples/certificates/create-certificate)
+- [Replace existing certificate](/docs/api/examples/certificates/replace-certificate)
diff --git a/src/pages/docs/api/examples/certificates/replace-certificate.mdx b/src/pages/docs/api/examples/certificates/replace-certificate.mdx
new file mode 100644
index 0000000000..90afc9bd2a
--- /dev/null
+++ b/src/pages/docs/api/examples/certificates/replace-certificate.mdx
@@ -0,0 +1,24 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Replace existing certificate
+description: An example script to replace an existing certificate in Octopus Deploy.
+---
+import ReplaceCertificateScripts from 'src/shared-content/scripts/replace-certificate-scripts.include.md';
+
+This script replaces an existing certificate in the Octopus [certificate library](/docs/deployments/certificates).
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Certificate name
+- Replacement certificate file path
+- Replacement certificate password
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/change-machine-machinepolicy.md b/src/pages/docs/api/examples/change-machine-machinepolicy.md
new file mode 100644
index 0000000000..82a080f62c
--- /dev/null
+++ b/src/pages/docs/api/examples/change-machine-machinepolicy.md
@@ -0,0 +1,9 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-targets/change-target-machinepolicy
+pubDate: 2023-01-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/api/examples/channels/create-channel.mdx b/src/pages/docs/api/examples/channels/create-channel.mdx
new file mode 100644
index 0000000000..ffb04e6409
--- /dev/null
+++ b/src/pages/docs/api/examples/channels/create-channel.mdx
@@ -0,0 +1,24 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Create a channel
+description: An example script that creates a channel.
+---
+import CreateChannelScripts from 'src/shared-content/scripts/create-channel-scripts.include.md';
+
+This script demonstrates how to programmatically create a channel in Octopus Deploy.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Name of the channel to create
+- ID of the project to add the channel to
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/channels/index.md b/src/pages/docs/api/examples/channels/index.md
new file mode 100644
index 0000000000..15a1298053
--- /dev/null
+++ b/src/pages/docs/api/examples/channels/index.md
@@ -0,0 +1,13 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Channels
+description: This section includes examples of how to use the REST API to create and manage channels in Octopus.
+navOrder: 40
+hideInThisSectionHeader: true
+---
+
+You can use the REST API to create and manage your [channels](/docs/releases/channels) in Octopus. Typical tasks can include:
+
+- [Create a channel](/docs/api/examples/channels/create-channel)
diff --git a/src/pages/docs/api/examples/create-and-deploy-a-release.md b/src/pages/docs/api/examples/create-and-deploy-a-release.md
new file mode 100644
index 0000000000..2d1de06802
--- /dev/null
+++ b/src/pages/docs/api/examples/create-and-deploy-a-release.md
@@ -0,0 +1,9 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployments/create-and-deploy-a-release
+pubDate: 2023-01-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/api/examples/create-azure-service-principal.md b/src/pages/docs/api/examples/create-azure-service-principal.md
new file mode 100644
index 0000000000..d33cb9475a
--- /dev/null
+++ b/src/pages/docs/api/examples/create-azure-service-principal.md
@@ -0,0 +1,9 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/accounts/create-azure-service-principal
+pubDate: 2023-01-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/api/examples/create-certificate.md b/src/pages/docs/api/examples/create-certificate.md
new file mode 100644
index 0000000000..3b5e7b6472
--- /dev/null
+++ b/src/pages/docs/api/examples/create-certificate.md
@@ -0,0 +1,9 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/certificates/create-certificate
+pubDate: 2023-01-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/api/examples/create-project.md b/src/pages/docs/api/examples/create-project.md
new file mode 100644
index 0000000000..947e601099
--- /dev/null
+++ b/src/pages/docs/api/examples/create-project.md
@@ -0,0 +1,9 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/projects/create-project
+pubDate: 2023-01-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/api/examples/create-runbook.md b/src/pages/docs/api/examples/create-runbook.md
new file mode 100644
index 0000000000..8518cd8f86
--- /dev/null
+++ b/src/pages/docs/api/examples/create-runbook.md
@@ -0,0 +1,9 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/runbooks/create-runbook
+pubDate: 2023-01-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/api/examples/create-script-step.md b/src/pages/docs/api/examples/create-script-step.md
new file mode 100644
index 0000000000..749c4174e9
--- /dev/null
+++ b/src/pages/docs/api/examples/create-script-step.md
@@ -0,0 +1,9 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-process/create-script-step
+pubDate: 2023-01-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/api/examples/delete-a-space.md b/src/pages/docs/api/examples/delete-a-space.md
new file mode 100644
index 0000000000..fe8bf0f75c
--- /dev/null
+++ b/src/pages/docs/api/examples/delete-a-space.md
@@ -0,0 +1,9 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/spaces/delete-a-space
+pubDate: 2023-01-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/api/examples/delete-machines-by-role.md b/src/pages/docs/api/examples/delete-machines-by-role.md
new file mode 100644
index 0000000000..45ffdccd15
--- /dev/null
+++ b/src/pages/docs/api/examples/delete-machines-by-role.md
@@ -0,0 +1,9 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-targets/delete-machines-by-role
+pubDate: 2023-01-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/api/examples/delete-project-releases.md b/src/pages/docs/api/examples/delete-project-releases.md
new file mode 100644
index 0000000000..99d6890c45
--- /dev/null
+++ b/src/pages/docs/api/examples/delete-project-releases.md
@@ -0,0 +1,9 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/releases/delete-project-releases
+pubDate: 2023-01-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/api/examples/deployment-process/add-environment-to-step.mdx b/src/pages/docs/api/examples/deployment-process/add-environment-to-step.mdx
new file mode 100644
index 0000000000..b40b0cbb30
--- /dev/null
+++ b/src/pages/docs/api/examples/deployment-process/add-environment-to-step.mdx
@@ -0,0 +1,25 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Add an environment to step
+description: An example script that scopes a step to an environment.
+---
+import AddEnvironmentToStepScripts from 'src/shared-content/scripts/add-environment-to-step-scripts.include.md';
+
+This script demonstrates how to programmatically add an environment scope to an existing step so that it only runs in specific environments.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space you want to use
+- Name of the step to add the environment to
+- List of environments to add to the step
+- Name of project to modify
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/deployment-process/create-script-step.mdx b/src/pages/docs/api/examples/deployment-process/create-script-step.mdx
new file mode 100644
index 0000000000..992062241f
--- /dev/null
+++ b/src/pages/docs/api/examples/deployment-process/create-script-step.mdx
@@ -0,0 +1,23 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2024-06-27
+title: Add a run a script step
+description: An example script to add a run a script step to a project.
+---
+import CreateScriptStepScripts from 'src/shared-content/scripts/create-script-step-scripts.include.md';
+
+This script demonstrates how to programmatically add a [Run A Script](/docs/deployments/custom-scripts/run-a-script-step) step to a project, which runs on a deployment target that matches a specified [target tag](/docs/infrastructure/deployment-targets/target-tags).
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Project name
+- Machine role
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/deployment-process/get-steps-using-package.mdx b/src/pages/docs/api/examples/deployment-process/get-steps-using-package.mdx
new file mode 100644
index 0000000000..783a538b02
--- /dev/null
+++ b/src/pages/docs/api/examples/deployment-process/get-steps-using-package.mdx
@@ -0,0 +1,23 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Get all steps that use a package
+description: An example script to find all steps that reference a specific package.
+---
+import GetStepsUsingPackageScripts from 'src/shared-content/scripts/get-steps-using-package-scripts.include.md';
+
+This script displays all projects in a space that reference the specified package.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to search
+- The package ID to search for
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/deployment-process/get-steps-using-role.mdx b/src/pages/docs/api/examples/deployment-process/get-steps-using-role.mdx
new file mode 100644
index 0000000000..842536bd0d
--- /dev/null
+++ b/src/pages/docs/api/examples/deployment-process/get-steps-using-role.mdx
@@ -0,0 +1,23 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Get all steps using role
+description: An example script to find all steps targeting a role.
+---
+import GetStepsUsingRoleScripts from 'src/shared-content/scripts/get-steps-using-role-scripts.include.md';
+
+This script displays all projects in a space that target the given role.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Name of the role to search for
+- Name of the space to search
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/deployment-process/index.md b/src/pages/docs/api/examples/deployment-process/index.md
new file mode 100644
index 0000000000..520f71ee34
--- /dev/null
+++ b/src/pages/docs/api/examples/deployment-process/index.md
@@ -0,0 +1,11 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Deployment process
+description: This section includes examples of how to use the REST API to manage a project's deployment process in Octopus.
+navOrder: 50
+hideInThisSectionHeader: true
+---
+
+You can use the REST API to manage a project's [deployment process](/docs/projects/deployment-process). Typical tasks might include:
diff --git a/src/pages/docs/api/examples/deployment-targets/add-azure-web-app.mdx b/src/pages/docs/api/examples/deployment-targets/add-azure-web-app.mdx
new file mode 100644
index 0000000000..5cd6834050
--- /dev/null
+++ b/src/pages/docs/api/examples/deployment-targets/add-azure-web-app.mdx
@@ -0,0 +1,25 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Add an Azure Web App
+description: An example script to add an Azure Web App as a deployment target.
+---
+import AddAzureWebAppScripts from 'src/shared-content/scripts/add-azure-web-app-scripts.include.md';
+
+This script demonstrates how to programmatically add an Azure Web App as a deployment target.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to add the target to
+- Name of the Azure Service Principal account in Octopus
+- Name of the Azure Web App
+- Name of the Azure Resource Group
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/deployment-targets/add-target-role.mdx b/src/pages/docs/api/examples/deployment-targets/add-target-role.mdx
new file mode 100644
index 0000000000..4087387747
--- /dev/null
+++ b/src/pages/docs/api/examples/deployment-targets/add-target-role.mdx
@@ -0,0 +1,24 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Add a target role
+description: An example script that adds a target role to a deployment target.
+---
+import AddTargetRoleScripts from 'src/shared-content/scripts/add-target-role-scripts.include.md';
+
+This script demonstrates how to programmatically add a target role to a deployment target.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Name of the machine to update
+- Name of the target role to add
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/deployment-targets/add-tenant-to-target.mdx b/src/pages/docs/api/examples/deployment-targets/add-tenant-to-target.mdx
new file mode 100644
index 0000000000..41f69184b0
--- /dev/null
+++ b/src/pages/docs/api/examples/deployment-targets/add-tenant-to-target.mdx
@@ -0,0 +1,25 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Add Tenants to targets
+description: An example script to associate a list of tenants to one or more deployment targets.
+---
+import AddTenantsToTargetsScript from 'src/shared-content/scripts/add-tenants-to-targets-scripts.include.md';
+
+This script demonstrates how to programmatically associate a list of tenants to one or more deployment targets.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space you want to work in
+- Octopus Tenanted Participation Type (`Tenanted` | `Untenanted` | `TenantedOrUntenanted`)
+- List of deployment targets to associate with the Tenants
+- List of Tenants to associate with the deployment targets
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/deployment-targets/change-target-machinepolicy.mdx b/src/pages/docs/api/examples/deployment-targets/change-target-machinepolicy.mdx
new file mode 100644
index 0000000000..a2ceb1ab6a
--- /dev/null
+++ b/src/pages/docs/api/examples/deployment-targets/change-target-machinepolicy.mdx
@@ -0,0 +1,24 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Change target's machine policy
+description: An example script that changes a machine policy of a deployment target.
+---
+import ChangeMachinePolicyScripts from 'src/shared-content/scripts/change-machine-machinepolicy-scripts.include.md';
+
+This script demonstrates how to programmatically change a machine policy of a deployment target.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Name of the machine to update
+- Name of the machine policy to update to
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/deployment-targets/check-for-tentacle-upgrades.mdx b/src/pages/docs/api/examples/deployment-targets/check-for-tentacle-upgrades.mdx
new file mode 100644
index 0000000000..4e4e9759cb
--- /dev/null
+++ b/src/pages/docs/api/examples/deployment-targets/check-for-tentacle-upgrades.mdx
@@ -0,0 +1,22 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Check Tentacles for available upgrades
+description: An example script to check targets and workers for available Tentacle upgrades.
+---
+import CheckForTentacleUpgradesScripts from 'src/shared-content/scripts/check-for-tentacle-upgrades-scripts.include.md';
+
+This script demonstrates how to programmatically check if Tentacles have upgrades available.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/deployment-targets/delete-machines-by-name.mdx b/src/pages/docs/api/examples/deployment-targets/delete-machines-by-name.mdx
new file mode 100644
index 0000000000..46a467bd0e
--- /dev/null
+++ b/src/pages/docs/api/examples/deployment-targets/delete-machines-by-name.mdx
@@ -0,0 +1,27 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Delete targets by name
+description: An example script to delete targets by matching a specified name.
+---
+import DeleteTargetsByNameScripts from 'src/shared-content/scripts/delete-targets-by-name-scripts.include.md';
+
+This script demonstrates how to programmatically delete deployment targets which match a specified name.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space you want to use
+- Name of the machine name to use
+
+:::div{.warning}
+**This script will delete deployment targets which match the specified name. This operation is destructive and cannot be undone.**
+:::
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/deployment-targets/delete-machines-by-role.mdx b/src/pages/docs/api/examples/deployment-targets/delete-machines-by-role.mdx
new file mode 100644
index 0000000000..c6a059bc26
--- /dev/null
+++ b/src/pages/docs/api/examples/deployment-targets/delete-machines-by-role.mdx
@@ -0,0 +1,27 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Delete targets by role
+description: An example script to delete targets by role.
+---
+import DeleteTargetsByRoleScripts from 'src/shared-content/scripts/delete-targets-by-role-scripts.include.md';
+
+This script demonstrates how to programmatically delete deployment targets with the specified role from the Octopus Server.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space you want to use
+- Name of the role to use
+
+:::div{.warning}
+**This script will delete deployment targets matching the specified role. This operation is destructive and cannot be undone.**
+:::
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/deployment-targets/enable-disable-machine.mdx b/src/pages/docs/api/examples/deployment-targets/enable-disable-machine.mdx
new file mode 100644
index 0000000000..a7fe75c2d9
--- /dev/null
+++ b/src/pages/docs/api/examples/deployment-targets/enable-disable-machine.mdx
@@ -0,0 +1,24 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Deactivate machines
+description: An example script that enables or disables a machine in Octopus.
+---
+import EnableDisableMachineScripts from 'src/shared-content/scripts/enable-disable-machine-scripts.include.md';
+
+This script demonstrates how to programmatically enable or disable a machine.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Name of the machine
+- Boolean value for enabled
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/deployment-targets/find-target-usage.mdx b/src/pages/docs/api/examples/deployment-targets/find-target-usage.mdx
new file mode 100644
index 0000000000..f137273847
--- /dev/null
+++ b/src/pages/docs/api/examples/deployment-targets/find-target-usage.mdx
@@ -0,0 +1,32 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Find target usage
+description: An example script that will loop through all the steps in the deployment process and runbooks and determine if a target is being used
+---
+import FindTargetUsageNoTenants from 'src/shared-content/scripts/find-target-usage-no-tenants.include.md';
+
+This script will accept a target name and loop through all the projects in the space and determines:
+
+- Does the target role(s) and environments match any steps in the deployment process.
+- Does the target role(s) and environments match any steps in any runbook processes.
+
+Any matching projects or runbooks will be printed at the end of the script.
+
+**Please Note:** This script reflects the *current* state of the runbooks and deployment process. It does not look at release snapshots or previously published runbooks. It also does not take tenants into account.
+
+This script should work with any version of Octopus 4.0 or later. It has guard clauses in place to exclude spaces and runbooks based on the version.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key - the user associated with the API key will need read-only permissions on all spaces
+- Space Name - name of the space to search for, if left blank it will use the default space
+- Target Name - name of the target to search for
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/deployment-targets/find-unused-targets.mdx b/src/pages/docs/api/examples/deployment-targets/find-unused-targets.mdx
new file mode 100644
index 0000000000..be79de875c
--- /dev/null
+++ b/src/pages/docs/api/examples/deployment-targets/find-unused-targets.mdx
@@ -0,0 +1,30 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Find unused targets
+description: An example script the will find provide a list of targets being unused that might cause your target count to be inflated.
+---
+import FindUnusedTargets from 'src/shared-content/scripts/find-unused-targets.include.md';
+
+This script will loop through all the targets in all spaces on an instance and will return:
+
+- How many cloud region targets which are not counted against your license
+- How many duplicate listening Tentacles you have
+- How many targets that are disabled
+- How many targets are being reported as offline
+- How many targets have never been used in a deployment
+- How many targets haven't had a deployment in over `x` days
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key - the user associated with the API key will need read-only permissions on all spaces
+- Days Since Last Deployment - the number of days to allow before considering the target is inactive, default is 90
+- Include machine lists - boolean specifying whether to include the machines as part of the summary
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/deployment-targets/index.md b/src/pages/docs/api/examples/deployment-targets/index.md
new file mode 100644
index 0000000000..f2197e0bd3
--- /dev/null
+++ b/src/pages/docs/api/examples/deployment-targets/index.md
@@ -0,0 +1,11 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Deployment targets
+description: This section includes examples of how to use the REST API to create and manage deployment targets in Octopus.
+navOrder: 60
+hideInThisSectionHeader: true
+---
+
+You can use the REST API to create and manage your [deployment targets](/docs/infrastructure/deployment-targets) in Octopus. Typical tasks can include:
diff --git a/src/pages/docs/api/examples/deployment-targets/register-listening-tentacle.mdx b/src/pages/docs/api/examples/deployment-targets/register-listening-tentacle.mdx
new file mode 100644
index 0000000000..837d0cf82e
--- /dev/null
+++ b/src/pages/docs/api/examples/deployment-targets/register-listening-tentacle.mdx
@@ -0,0 +1,27 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Register Listening Tentacle
+description: An example script to register a listening tentacle using the REST API.
+---
+import RegisterListeningTentacleScripts from 'src/shared-content/scripts/register-listening-tentacle-scripts.include.md';
+
+This script demonstrates how to programmatically register a [Listening Tentacle](/docs/infrastructure/deployment-targets/tentacle/tentacle-communication/#listening-tentacles-recommended).
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to work with
+- Hostname (DNS entry will also work) of the machine to register
+- Communications style (API method only): `TentaclePassive` for listening
+- Port number the Tentacle is listening on
+- An array of environments for the Tentacle
+- An array of roles for the Tentacle
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/deployment-targets/register-polling-tentacle.mdx b/src/pages/docs/api/examples/deployment-targets/register-polling-tentacle.mdx
new file mode 100644
index 0000000000..c569307cb2
--- /dev/null
+++ b/src/pages/docs/api/examples/deployment-targets/register-polling-tentacle.mdx
@@ -0,0 +1,27 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Register Polling Tentacle
+description: An example script to register a Polling Tentacle using the REST API.
+---
+import RegisterPollingTentacleScripts from 'src/shared-content/scripts/register-polling-tentacle-scripts.include.md';
+
+This script demonstrates how to programmatically add a [Polling Tentacle](/docs/infrastructure/deployment-targets/tentacle/tentacle-communication/#polling-tentacles). Polling Tentacles usually self-register during the installation process, but in cases where the Tentacle was deleted from the server and needs to be re-added, this script shows you how.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to work with
+- Hostname of the machine to register
+- Tentacle thumbprint
+- Tentacle identifier
+- Array of environments
+- Array of roles
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/deployment-targets/register-ssh-target.mdx b/src/pages/docs/api/examples/deployment-targets/register-ssh-target.mdx
new file mode 100644
index 0000000000..2d501d79e0
--- /dev/null
+++ b/src/pages/docs/api/examples/deployment-targets/register-ssh-target.mdx
@@ -0,0 +1,38 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Register SSH target using the Octopus REST API
+navTitle: Register SSH target
+description: An example script to register an SSH target using the REST API.
+---
+import RegisterSshTargetScripts from 'src/shared-content/scripts/register-ssh-target-scripts.include.md';
+
+This script demonstrates how to programmatically register an [SSH target](/docs/infrastructure/deployment-targets/linux/ssh-target) using the REST API.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to work with
+- The name for the SSH target
+- Hostname or IP address of the SSH target to register
+- Port for the SSH target (`22` by default)
+- The SSH target's host fingerprint (see below)
+- The Account name to use when authenticating.
+- A list of environments for the SSH target
+- A list of roles for the SSH target
+- Octopus Tenanted Participation Type (`Tenanted` | `Untenanted` | `TenantedOrUntenanted`)
+- *Optional*: A list of Tenant names to connect to the SSH target.
+
+You can find the host fingerprint for an SSH target by remotely logging onto the machine and retrieving it. An example bash script to do this is shown below:
+
+```bash
+ssh-keygen -E md5 -lf /etc/ssh/ssh_host_ed25519_key.pub | cut -d' ' -f2 | awk '{ print $1}' | cut -d':' -f2-
+```
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/deployment-targets/upgrade-machines.mdx b/src/pages/docs/api/examples/deployment-targets/upgrade-machines.mdx
new file mode 100644
index 0000000000..7d49824051
--- /dev/null
+++ b/src/pages/docs/api/examples/deployment-targets/upgrade-machines.mdx
@@ -0,0 +1,23 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Upgrade targets
+description: An example script that upgrades a list of deployment targets.
+---
+import UpgradeMachinesScripts from 'src/shared-content/scripts/upgrade-machines-scripts.include.md';
+
+This script demonstrates how to programmatically upgrade deployment targets.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to work with
+- Array of machine names
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/deployments/cancel-queued-deployments.mdx b/src/pages/docs/api/examples/deployments/cancel-queued-deployments.mdx
new file mode 100644
index 0000000000..5f66f3359a
--- /dev/null
+++ b/src/pages/docs/api/examples/deployments/cancel-queued-deployments.mdx
@@ -0,0 +1,22 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Cancel queued deployments
+description: An example script to cancel queued deployments.
+---
+import CancelQueuedDeploymentsScripts from 'src/shared-content/scripts/cancel-queued-deployments-scripts.include.md';
+
+This script demonstrates how to programmatically cancel queued deployments.
+
+## Usage
+
+Provide values for the following
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to work with
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/deployments/create-and-deploy-a-release.mdx b/src/pages/docs/api/examples/deployments/create-and-deploy-a-release.mdx
new file mode 100644
index 0000000000..ca0ba8af2c
--- /dev/null
+++ b/src/pages/docs/api/examples/deployments/create-and-deploy-a-release.mdx
@@ -0,0 +1,35 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Create and deploy a release
+description: Example scripts to create and deploy a release.
+---
+import CreateAndDeployReleaseScripts from 'src/shared-content/scripts/create-and-deploy-release-scripts.include.md';
+import CreateAndDeployReleaseWithTenantsScripts from 'src/shared-content/scripts/create-and-deploy-release-with-tenants-scripts.include.md';
+
+These scripts create and deploy a release, including examples for choosing a channel and deploying to tenants.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Space Name
+- Project Name
+- Environment Name
+- Channel Name
+- (Optional) Tenant Names
+
+:::div{.warning}
+**These scripts will create a release and deployments to the provided environments. Take care when running this script or one based on it.**
+:::
+
+## Create and deploy a release
+
+
+
+## Create and deploy a release to a group of tenants
+
+
diff --git a/src/pages/docs/api/examples/deployments/deploy-release-with-prompted-variables.mdx b/src/pages/docs/api/examples/deployments/deploy-release-with-prompted-variables.mdx
new file mode 100644
index 0000000000..42c164e8af
--- /dev/null
+++ b/src/pages/docs/api/examples/deployments/deploy-release-with-prompted-variables.mdx
@@ -0,0 +1,26 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Deploy existing release with prompted variables
+description: An example script to deploy an existing release with prompted variables.
+---
+import DeployReleaseWithPromptedVariablesScripts from 'src/shared-content/scripts/deploy-release-with-prompted-variables-scripts.include.md';
+
+This script demonstrates how to programmatically deploy an existing release with prompted variables.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Space Name
+- Project Name
+- Environment Name
+- Release Version
+- Prompted Variables (the format is variable name::variable value, can be multi-line)
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/deployments/deploy-release.mdx b/src/pages/docs/api/examples/deployments/deploy-release.mdx
new file mode 100644
index 0000000000..2ff3dac4e4
--- /dev/null
+++ b/src/pages/docs/api/examples/deployments/deploy-release.mdx
@@ -0,0 +1,25 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Deploy existing release
+description: An example script to deploy an existing release.
+---
+import DeployReleaseScripts from 'src/shared-content/scripts/deploy-release-scripts.include.md';
+
+This script demonstrates how to programmatically deploy an existing release.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Space Name
+- Project Name
+- Environment Name
+- Release Version
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/deployments/index.md b/src/pages/docs/api/examples/deployments/index.md
new file mode 100644
index 0000000000..d06d69cc06
--- /dev/null
+++ b/src/pages/docs/api/examples/deployments/index.md
@@ -0,0 +1,11 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Deployments
+description: This section includes examples of how to use the REST API to create and manage deployments in Octopus.
+navOrder: 70
+hideInThisSectionHeader: true
+---
+
+You can use the REST API to create and manage your Octopus deployments. Typical tasks can include:
diff --git a/src/pages/docs/api/examples/deployments/list-deployments-to-environment.mdx b/src/pages/docs/api/examples/deployments/list-deployments-to-environment.mdx
new file mode 100644
index 0000000000..06146d92e6
--- /dev/null
+++ b/src/pages/docs/api/examples/deployments/list-deployments-to-environment.mdx
@@ -0,0 +1,23 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: List deployments to environment
+description: An example script to retrieve a list of deployments to an environment
+---
+import ListDeploymentsToEnvironmentScripts from 'src/shared-content/scripts/list-deployments-to-environment-scripts.include.md';
+
+This script demonstrates how to programmatically retrieve a list of deployments to an environment.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Space Name
+- Environment Name
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/environments/add-environments.mdx b/src/pages/docs/api/examples/environments/add-environments.mdx
new file mode 100644
index 0000000000..38d23e887a
--- /dev/null
+++ b/src/pages/docs/api/examples/environments/add-environments.mdx
@@ -0,0 +1,25 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Adding Environments
+description: An example script to create environments in a Space.
+---
+import AddEnvironmentsScripts from 'src/shared-content/scripts/add-environments-scripts.include.md';
+
+This script demonstrates how to programmatically create [environments](/docs/infrastructure/environments/) in an existing [Space](/docs/administration/spaces).
+
+It creates an environment for each entry in the supplied list. If the environment already exists in the Space, it skips the creation.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Space Name
+- A list of environment names to create
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/environments/index.md b/src/pages/docs/api/examples/environments/index.md
new file mode 100644
index 0000000000..a4483cb373
--- /dev/null
+++ b/src/pages/docs/api/examples/environments/index.md
@@ -0,0 +1,11 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Environments
+description: This section includes examples of how to use the REST API to create and manage environments in Octopus.
+navOrder: 80
+hideInThisSectionHeader: true
+---
+
+You can use the REST API to create and manage your Octopus environments. Typical tasks can include:
diff --git a/src/pages/docs/api/examples/events/find-events-by-date.mdx b/src/pages/docs/api/examples/events/find-events-by-date.mdx
new file mode 100644
index 0000000000..04a06bbdc3
--- /dev/null
+++ b/src/pages/docs/api/examples/events/find-events-by-date.mdx
@@ -0,0 +1,26 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Find events by date
+description: An example script that finds events by date in Octopus using the REST API and Octopus.Client.
+---
+import FindEventsByDateScripts from 'src/shared-content/scripts/find-events-by-date-scripts.include.md';
+
+This script demonstrates how to programmatically finds events for a specific date.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Date to find events by
+
+:::div{.warning}
+**This script will query all events for a specific date in Octopus. It may take some time to execute on an Octopus instance with a large amount of Event records. Take care when running this script or one based on it.**
+:::
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/events/index.md b/src/pages/docs/api/examples/events/index.md
new file mode 100644
index 0000000000..e5b5708669
--- /dev/null
+++ b/src/pages/docs/api/examples/events/index.md
@@ -0,0 +1,13 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Events
+description: This section includes examples of how to use the REST API to find events from Octopus.
+navOrder: 90
+hideInThisSectionHeader: true
+---
+
+You can use the REST API to review events on Octopus Deploy. Typical tasks might include:
+
+- [Find events by date](/docs/api/examples/events/find-events-by-date)
diff --git a/src/pages/docs/api/examples/feeds/change-feed.mdx b/src/pages/docs/api/examples/feeds/change-feed.mdx
new file mode 100644
index 0000000000..4c181eca57
--- /dev/null
+++ b/src/pages/docs/api/examples/feeds/change-feed.mdx
@@ -0,0 +1,24 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Change feed
+description: An example script that changes an existing feed by updating the feed name in Octopus using the REST API and Octopus.Client.
+---
+import ChangeFeedScripts from 'src/shared-content/scripts/change-feed-scripts.include.md';
+
+This script demonstrates how to programmatically change an existing feed and update its name in Octopus.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Name of the feed to modify
+- New value for the name of the feed
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/feeds/create-feed.mdx b/src/pages/docs/api/examples/feeds/create-feed.mdx
new file mode 100644
index 0000000000..70a322e3dd
--- /dev/null
+++ b/src/pages/docs/api/examples/feeds/create-feed.mdx
@@ -0,0 +1,27 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Create a feed
+description: An example script that creates a nuget feed in Octopus.
+---
+import CreateNugetFeedScripts from 'src/shared-content/scripts/create-nuget-feed-scripts.include.md';
+
+This script demonstrates how to programmatically create a NuGet external feed in Octopus.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Name of the feed
+- Feed URL
+- Download retry attempts
+- Download retry backoff (in seconds)
+- Optional Username to use for authentication
+- Optional Password to use for authentication
+- Whether to use the extended API
+
+
diff --git a/src/pages/docs/api/examples/feeds/delete-feed.mdx b/src/pages/docs/api/examples/feeds/delete-feed.mdx
new file mode 100644
index 0000000000..6393b35cd9
--- /dev/null
+++ b/src/pages/docs/api/examples/feeds/delete-feed.mdx
@@ -0,0 +1,27 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Delete a feed
+description: An example script that deletes an existing feed in Octopus using the REST API and Octopus.Client.
+---
+import DeleteFeedScripts from 'src/shared-content/scripts/delete-feed-scripts.include.md';
+
+This script demonstrates how to programmatically delete an existing feed in Octopus.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Name of the feed to delete
+
+:::div{.warning}
+**This script will delete the feed with the specified name. This operation is destructive and cannot be undone.**
+:::
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/feeds/download-package-from-builtin-feed.mdx b/src/pages/docs/api/examples/feeds/download-package-from-builtin-feed.mdx
new file mode 100644
index 0000000000..5780f4b6a7
--- /dev/null
+++ b/src/pages/docs/api/examples/feeds/download-package-from-builtin-feed.mdx
@@ -0,0 +1,25 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Download package from built-in feed
+description: An example script that downloads a package from the built-in feed.
+---
+import DownloadPackageScripts from 'src/shared-content/scripts/download-package-scripts.include.md';
+
+This script demonstrates how to programmatically download a package from the built-in Octopus feed.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Name of the package
+- Version of the package to download
+- The output folder to save the package to
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/feeds/get-feeds.md b/src/pages/docs/api/examples/feeds/get-feeds.md
new file mode 100644
index 0000000000..93bfb65d05
--- /dev/null
+++ b/src/pages/docs/api/examples/feeds/get-feeds.md
@@ -0,0 +1,9 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/feeds/retrieve-feeds
+pubDate: 2023-01-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/api/examples/feeds/index.md b/src/pages/docs/api/examples/feeds/index.md
new file mode 100644
index 0000000000..4726492242
--- /dev/null
+++ b/src/pages/docs/api/examples/feeds/index.md
@@ -0,0 +1,19 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Feeds
+description: This section includes examples of how to use the REST API to create and manage feeds in Octopus.
+navOrder: 100
+hideInThisSectionHeader: true
+---
+
+You can use the REST API to create and manage your [package repositories](/docs/packaging-applications/package-repositories) in Octopus. Typical tasks might include:
+
+- [Change feed](/docs/api/examples/feeds/change-feed)
+- [Create a feed](/docs/api/examples/feeds/create-feed)
+- [Delete a feed](/docs/api/examples/feeds/delete-feed)
+- [Download package from built-in feed](/docs/api/examples/feeds/download-package-from-builtin-feed)
+- [Push package to built-in feed](/docs/api/examples/feeds/push-package-to-builtin-feed)
+- [Retrieve all feeds](/docs/api/examples/feeds/retrieve-feeds)
+- [Synchronize packages](/docs/api/examples/feeds/synchronize-packages)
diff --git a/src/pages/docs/api/examples/feeds/push-package-to-builtin-feed.mdx b/src/pages/docs/api/examples/feeds/push-package-to-builtin-feed.mdx
new file mode 100644
index 0000000000..5c4b74cd0e
--- /dev/null
+++ b/src/pages/docs/api/examples/feeds/push-package-to-builtin-feed.mdx
@@ -0,0 +1,23 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Push package to built-in feed
+description: An example script that pushes a package to the built-in feed.
+---
+import PushPackageScripts from 'src/shared-content/scripts/push-package-scripts.include.md';
+
+This script demonstrates how to programmatically push a package to the built-in Octopus feed.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Path to the package
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/feeds/retrieve-feeds.mdx b/src/pages/docs/api/examples/feeds/retrieve-feeds.mdx
new file mode 100644
index 0000000000..68cbf9d356
--- /dev/null
+++ b/src/pages/docs/api/examples/feeds/retrieve-feeds.mdx
@@ -0,0 +1,22 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Retrieve all feeds
+description: An example script that retrieves all feeds in Octopus.
+---
+import GetFeedsScripts from 'src/shared-content/scripts/get-feeds-scripts.include.md';
+
+This script demonstrates how to programmatically retrieve all feeds from a Space in Octopus.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/feeds/synchronize-packages.mdx b/src/pages/docs/api/examples/feeds/synchronize-packages.mdx
new file mode 100644
index 0000000000..6e1c62146b
--- /dev/null
+++ b/src/pages/docs/api/examples/feeds/synchronize-packages.mdx
@@ -0,0 +1,68 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2024-06-13
+title: Synchronize packages
+description: An example script that synchronizes packages from the built-in feed between two spaces in Octopus using the REST API.
+---
+import SyncPackagesScripts from 'src/shared-content/scripts/sync-packages-scripts.include.md';
+
+This script synchronizes packages from the [built-in feed](/docs/packaging-applications/package-repositories/built-in-repository/) between two [spaces](/docs/administration/spaces). The spaces can be on the same Octopus instance, or in different instances.
+
+## Usage
+
+Provide values for:
+
+- `VersionSelection` - the version selection of packages to sync. Choose from:
+ - **FileVersions** - sync versions specified in the file specified by the `Path` parameter.
+ - **LatestVersion** - sync the latest version of packages in the built-in feed.
+ - **AllVersions** - sync all versions of packages in the built-in feed.
+- `PackageListFilePath` - the path to a file containing details of the packages and versions to sync. The file input format is:
+
+ ```json
+ [
+ {
+ "Id": "WebApp1",
+ "Versions": [
+ "1.0.0",
+ "1.0.1"
+ ]
+ },
+ {
+ "Id": "WebApp2",
+ "Versions": [
+ "1.0.0",
+ "1.0.2"
+ ]
+ }
+ ]
+ ```
+
+- `SourceUrl` - Octopus URL used as the source for package synchronization.
+- `SourceApiKey` - Octopus API Key used with the source Octopus server.
+- `SourceSpace` - Name of the space to use from the source Octopus server.
+- `DestinationUrl` - Octopus URL used as the destination for package synchronization.
+- `DestinationApiKey` - Octopus API Key used with the destination Octopus server.
+- `DestinationSpace` - Name of the space to use for the destination Octopus server.
+- `CutOffDate` - *Optional* cut-off date for a package's published date to be included in the synchronization.
+
+### Example usage
+
+This example takes packages specified in the `packages.json` file, finding all versions found in the source Octopus instance which have a published date greater than `2021-02-11` and synchronizing them with the destination Octopus instance:
+
+```powershell
+./SyncPackages.ps1 `
+-VersionSelection AllVersions `
+-PackageListFilePath "packages.json" `
+-SourceUrl https://source.octopus.app `
+-SourceApiKey "API-SOURCEKEY" `
+-SourceSpace "Default" `
+-DestinationUrl https://destination.octopus.app `
+-DestinationApiKey "API-DESTKEY" `
+-DestinationSpace "Default" `
+-CutOffDate (Get-Date "2021-02-11")
+```
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/get-steps-using-role.md b/src/pages/docs/api/examples/get-steps-using-role.md
new file mode 100644
index 0000000000..243dc082e4
--- /dev/null
+++ b/src/pages/docs/api/examples/get-steps-using-role.md
@@ -0,0 +1,9 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-process/get-steps-using-role
+pubDate: 2023-01-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/api/examples/index.md b/src/pages/docs/api/examples/index.md
new file mode 100644
index 0000000000..bb11e0f1a5
--- /dev/null
+++ b/src/pages/docs/api/examples/index.md
@@ -0,0 +1,93 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: API examples
+description: A set of examples using the Octopus REST API to accomplish tasks.
+navOrder: 40
+hideInThisSectionHeader: true
+---
+
+As you work with the Octopus API, you may need some guidance on how to perform certain actions or what parameters to provide. The [OctopusDeploy-API GitHub repository](https://github.com/OctopusDeploy/OctopusDeploy-Api) contains many examples using the API, with solutions covering:
+
+- PowerShell using the REST API.
+- PowerShell using Octopus.Client.
+- C# using Octopus.Client.
+- Python using the REST API.
+- Go using the [Go API Client for Octopus Deploy](https://github.com/OctopusDeploy/go-octopusdeploy).
+- TypeScript using the [TypeScript API Client for Octopus Deploy](https://github.com/OctopusDeploy/api-client.ts).
+
+In addition, we also have a wide range of some of the more common examples here as well.
+
+## Using the scripts
+
+To use the example scripts, you'll need to provide your Octopus Server URL and an [API Key](/docs/api/authentication/create-an-api-key). There may be other values that need to be updated to fit your scenario such as Space, Project, and Environment names.
+
+:::div{.hint}
+**The examples provided are for reference and should be modified and tested prior to using in a production Octopus instance.**
+:::
+
+### C# examples
+
+The C# examples are written using [dotnet script](https://github.com/filipw/dotnet-script). The same logic can be used in a standard C# application.
+
+### Octopus.Client examples
+
+Examples using [Octopus.Client](/docs/api/octopus.client) require the library to be installed and a path to the library to be provided.
+
+### Python examples
+
+The Python examples are written using **Python 3** and use the [Requests](https://requests.readthedocs.io/en/master/) library. Some examples also use the [urllib](https://docs.python.org/3/library/urllib.html) module.
+
+### Go examples
+
+The Go examples are written using the [Go API Client for Octopus Deploy](https://github.com/OctopusDeploy/go-octopusdeploy).
+
+### Java examples
+
+The Java examples are written using the [java-octopus-deploy](https://github.com/OctopusDeployLabs/java-octopus-deploy) Client.
+
+The Java Client library requires **Java 1.8** or above.
+
+### TypeScript examples
+
+The TypeScript examples are written using the [TypeScript API Client for Octopus Deploy](https://github.com/OctopusDeploy/api-client.ts).
+
+## Bulk operations
+
+Sometimes you want to perform an action on a resource in Octopus multiple times. For example, connecting a tenant to all of your projects. Having to run a script that performs an operation once, repeatedly, can become tedious.
+
+To help with this, we've included examples of [bulk operations](/docs/api/examples/bulk-operations) using the Octopus REST API.
+
+## Explore examples
+
+Explore the REST API examples further in this section:
+
+- [Accounts](/docs/api/examples/accounts)
+- [Artifacts](/docs/api/examples/artifacts)
+- [Certificates](/docs/api/examples/certificates)
+- [Channels](/docs/api/examples/channels)
+- [Deployment process](/docs/api/examples/deployment-process)
+- [Deployment targets](/docs/api/examples/deployment-targets)
+- [Deployments](/docs/api/examples/deployments)
+- [Environments](/docs/api/examples/environments)
+- [Events](/docs/api/examples/events)
+- [Feeds](/docs/api/examples/feeds)
+- [Lifecycles](/docs/api/examples/lifecycles)
+- [Project Groups](/docs/api/examples/project-groups)
+- [Projects](/docs/api/examples/projects)
+- [Releases](/docs/api/examples/releases)
+- [Reports](/docs/api/examples/reports)
+- [Runbooks](/docs/api/examples/runbooks)
+- [Spaces](/docs/api/examples/spaces)
+- [Step Templates](/docs/api/examples/step-templates)
+- [Tag sets](/docs/api/examples/tagsets)
+- [Tasks](/docs/api/examples/tasks)
+- [Tenants](/docs/api/examples/tenants)
+- [Users and Teams](/docs/api/examples/users-and-teams)
+- [Variables](/docs/api/examples/variables)
+- [Bulk Operations](/docs/api/examples/bulk-operations)
+
+## Get help from the community
+
+If you're looking for help with API scripts or want to share your own, join the [Octopus Community Slack channel](https://octopus.com/slack). It's a great place to get inspiration, ask questions, and connect with other Octopus users and employees.
diff --git a/src/pages/docs/api/examples/lifecycles/create-lifecycle.mdx b/src/pages/docs/api/examples/lifecycles/create-lifecycle.mdx
new file mode 100644
index 0000000000..1d5fd0ed29
--- /dev/null
+++ b/src/pages/docs/api/examples/lifecycles/create-lifecycle.mdx
@@ -0,0 +1,23 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Create a lifecycle
+description: An example script that creates a lifecycle.
+---
+import CreateALifecycleScripts from 'src/shared-content/scripts/create-a-lifecycle-scripts.include.md';
+
+This script demonstrates how to programmatically create a lifecycle in Octopus Deploy.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Space ID of the space to use
+- Name of the lifecycle to create
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/lifecycles/index.md b/src/pages/docs/api/examples/lifecycles/index.md
new file mode 100644
index 0000000000..c953a465bf
--- /dev/null
+++ b/src/pages/docs/api/examples/lifecycles/index.md
@@ -0,0 +1,13 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Lifecycles
+description: This section includes examples of how to use the REST API to create and manage lifecycles in Octopus.
+navOrder: 110
+hideInThisSectionHeader: true
+---
+
+You can use the REST API to create and manage your [lifecycles](/docs/releases/lifecycles) in Octopus. Typical tasks can include:
+
+- [Create a lifecycle](/docs/api/examples/lifecycles/create-lifecycle)
diff --git a/src/pages/docs/api/examples/list-users-with-role.md b/src/pages/docs/api/examples/list-users-with-role.md
new file mode 100644
index 0000000000..c8d714c586
--- /dev/null
+++ b/src/pages/docs/api/examples/list-users-with-role.md
@@ -0,0 +1,9 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/users-and-teams/list-users-with-role
+pubDate: 2023-01-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/api/examples/project-groups/create-projectgroup.mdx b/src/pages/docs/api/examples/project-groups/create-projectgroup.mdx
new file mode 100644
index 0000000000..cb7e8eb4db
--- /dev/null
+++ b/src/pages/docs/api/examples/project-groups/create-projectgroup.mdx
@@ -0,0 +1,23 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Create a project group
+description: An example script that creates a project group.
+---
+import CreateProjectGroupScripts from 'src/shared-content/scripts/create-projectgroup-scripts.include.md';
+
+This script demonstrates how to programmatically create a project group in Octopus Deploy.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Space ID of the space to use
+- Name of the project group to create
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/project-groups/index.md b/src/pages/docs/api/examples/project-groups/index.md
new file mode 100644
index 0000000000..a4060d3732
--- /dev/null
+++ b/src/pages/docs/api/examples/project-groups/index.md
@@ -0,0 +1,13 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Project Groups
+description: This section includes examples of how to use the REST API to create and manage project groups in Octopus.
+navOrder: 120
+hideInThisSectionHeader: true
+---
+
+You can use the REST API to create and manage [project groups](/docs/projects/#project-group) in Octopus. Typical tasks can include:
+
+- [Create a project group](/docs/api/examples/project-groups/create-projectgroup)
diff --git a/src/pages/docs/api/examples/projects/coordinating-multiple-projects.mdx b/src/pages/docs/api/examples/projects/coordinating-multiple-projects.mdx
new file mode 100644
index 0000000000..3fcaa3cd1f
--- /dev/null
+++ b/src/pages/docs/api/examples/projects/coordinating-multiple-projects.mdx
@@ -0,0 +1,10 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Coordinating multiple projects
+description: Script examples for working with data from multiple projects.
+---
+import ProjectCoordinationCodeSamples from 'src/shared-content/octopus-rest-api/project-coordination-code-samples.include.md';
+
+
diff --git a/src/pages/docs/api/examples/projects/create-project.mdx b/src/pages/docs/api/examples/projects/create-project.mdx
new file mode 100644
index 0000000000..cef9913695
--- /dev/null
+++ b/src/pages/docs/api/examples/projects/create-project.mdx
@@ -0,0 +1,25 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Create a project
+description: An example script that creates a project.
+---
+import CreateProjectScripts from 'src/shared-content/scripts/create-project-scripts.include.md';
+
+This script demonstrates how to programmatically create a project in Octopus Deploy.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Name of the project
+- Name of the project group to add the project to
+- Name of the lifecycle to use for the project
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/projects/delete-project.mdx b/src/pages/docs/api/examples/projects/delete-project.mdx
new file mode 100644
index 0000000000..75e16c81a7
--- /dev/null
+++ b/src/pages/docs/api/examples/projects/delete-project.mdx
@@ -0,0 +1,27 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Delete a project
+description: An example script that deletes a project.
+---
+import DeleteProjectByNameScripts from 'src/shared-content/scripts/delete-project-by-name-scripts.include.md';
+
+This script demonstrates how to programmatically delete a project in Octopus Deploy.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Name of the project
+
+:::div{.warning}
+**This script will delete the project with the specified name. This operation is destructive and cannot be undone. Ensure you have a database backup and take care when running this script or one based on it**
+:::
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/projects/delete-projects-with-empty-processes.mdx b/src/pages/docs/api/examples/projects/delete-projects-with-empty-processes.mdx
new file mode 100644
index 0000000000..6fc029c80f
--- /dev/null
+++ b/src/pages/docs/api/examples/projects/delete-projects-with-empty-processes.mdx
@@ -0,0 +1,24 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Delete projects with no process
+description: An example script that deletes projects that have no deployment process in Octopus using the REST API and Octopus.Client.
+---
+import DeleteProjectsWithoutProcessesScripts from 'src/shared-content/scripts/delete-projects-without-processes-scripts.include.md';
+
+This script demonstrates how to programmatically delete projects with no deployment process in Octopus Deploy.
+
+## Usage
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+
+:::div{.warning}
+**This script will delete projects with no deployment process. This operation is destructive and cannot be undone. Ensure you have a database backup and take care when running this script or one based on it**
+:::
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/projects/disable-project-triggers.mdx b/src/pages/docs/api/examples/projects/disable-project-triggers.mdx
new file mode 100644
index 0000000000..b1591155a4
--- /dev/null
+++ b/src/pages/docs/api/examples/projects/disable-project-triggers.mdx
@@ -0,0 +1,23 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Disable project triggers
+description: An example script that disables a project's triggers in Octopus using the REST API and Octopus.Client.
+---
+import DisableProjectTriggersScripts from 'src/shared-content/scripts/disable-project-triggers-scripts.include.md';
+
+This script demonstrates how to programmatically disable triggers for a project in Octopus Deploy.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Name of the project
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/projects/enable-disable-project.mdx b/src/pages/docs/api/examples/projects/enable-disable-project.mdx
new file mode 100644
index 0000000000..cea4ff93f1
--- /dev/null
+++ b/src/pages/docs/api/examples/projects/enable-disable-project.mdx
@@ -0,0 +1,24 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Deactivate projects
+description: An example script that enables or disables a project in Octopus.
+---
+import EnableDisableProjectScripts from 'src/shared-content/scripts/enable-disable-project-scripts.include.md';
+
+This script demonstrates how to programmatically enable or disable an Octopus [project](/docs/projects).
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Name of the project
+- Boolean value for enabled
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/projects/export-projects.mdx b/src/pages/docs/api/examples/projects/export-projects.mdx
new file mode 100644
index 0000000000..213ea5cb34
--- /dev/null
+++ b/src/pages/docs/api/examples/projects/export-projects.mdx
@@ -0,0 +1,35 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Export projects
+description: An example script that will export projects that can be imported into a different space on the same, or different Octopus instance.
+---
+import ExportProjectsScripts from 'src/shared-content/scripts/export-projects-scripts.include.md';
+
+This script will export projects from an Octopus space that can be imported into a different space on the same instance or a separate Octopus instance.
+
+:::div{.hint}
+**Note:**
+Please note there are some items to consider before using this script:
+
+- This script uses an API endpoint introduced in **Octopus 2021.1** for the [Export/Import Projects feature](/docs/projects/export-import). Using this script in earlier versions of Octopus will not work.
+- Automating the export of projects as part of a backup/restore process is **not recommended**. See our [supported scenarios](/docs/projects/export-import/#scenarios) when using the API from this feature.
+
+:::
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space where the projects to be exported can be found
+- A list of project names to be exported
+- A password to protect sensitive values in the exported data
+- Boolean whether or not to wait for the export task to finish
+ - Timeout in seconds to wait before attempting to cancel the task.
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/projects/find-unused-projects.mdx b/src/pages/docs/api/examples/projects/find-unused-projects.mdx
new file mode 100644
index 0000000000..9afdb32fc6
--- /dev/null
+++ b/src/pages/docs/api/examples/projects/find-unused-projects.mdx
@@ -0,0 +1,28 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Find unused projects
+description: An example script that will find any project that hasn't had a release created in the previous days
+---
+import FindUnusedProjects from 'src/shared-content/scripts/find-unused-projects.include.md';
+
+This script will search for projects who haven't had a release created in the previous set number of days.
+
+Please note, this script will exclude projects:
+
+- Without *any* releases.
+- Projects already disabled.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Disable Old Projects - indicates if the projects should be set to disabled, default is $false
+- Days Since Last Release - the number of days to allow before considering the project is inactive, default is 90
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/projects/import-projects.mdx b/src/pages/docs/api/examples/projects/import-projects.mdx
new file mode 100644
index 0000000000..b18e29b84b
--- /dev/null
+++ b/src/pages/docs/api/examples/projects/import-projects.mdx
@@ -0,0 +1,36 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Import projects
+description: An example script that will import projects from a previously executed export task from another space on an Octopus instance.
+---
+import ImportProjectsScripts from 'src/shared-content/scripts/import-projects-scripts.include.md';
+
+This script demonstrates how you can import projects into an Octopus space. It uses a previously executed export task from another space as the source for the import.
+
+:::div{.hint}
+**Note:**
+Please note there are some items to consider before using this script:
+
+- This script uses an API endpoint introduced in **Octopus 2021.1** for the [Export/Import Projects feature](/docs/projects/export-import). Using this script in earlier versions of Octopus will not work.
+- Automating the import of projects as part of a backup/restore process is **not recommended**. See our [supported scenarios](/docs/projects/export-import/#scenarios) when using the API from this feature.
+
+:::
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space where the projects were exported from
+- Name of the space where the projects are to be exported into
+- The export Server Task Id to use as the source for import e.g. `ServerTasks-12345`
+- The password used to protect sensitive values in the exported data
+- Boolean whether or not to wait for the import task to finish
+ - Timeout in seconds to wait before attempting to cancel the task.
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/projects/index.md b/src/pages/docs/api/examples/projects/index.md
new file mode 100644
index 0000000000..99c615ec66
--- /dev/null
+++ b/src/pages/docs/api/examples/projects/index.md
@@ -0,0 +1,21 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-07-04
+title: Projects
+description: This section includes examples of how to use the REST API to create and manage projects in Octopus.
+navOrder: 130
+hideInThisSectionHeader: true
+---
+
+You can use the REST API to create and manage your Octopus [projects](/docs/projects). Typical tasks can include:
+
+- [Coordinating multiple projects](/docs/api/examples/projects/coordinating-multiple-projects)
+- [Create a project](/docs/api/examples/projects/create-project)
+- [Delete a project](/docs/api/examples/projects/delete-project)
+- [Delete projects with no process](/docs/api/examples/projects/delete-projects-with-empty-processes)
+- [Disable project triggers](/docs/api/examples/projects/disable-project-triggers)
+- [Enable/disable project](/docs/api/examples/projects/enable-disable-project)
+- [Export projects](/docs/api/examples/projects/export-projects)
+- [Find unused projects](/docs/api/examples/projects/find-unused-projects)
+- [Import projects](/docs/api/examples/projects/import-projects)
diff --git a/src/pages/docs/api/examples/publish-runbook.md b/src/pages/docs/api/examples/publish-runbook.md
new file mode 100644
index 0000000000..4b0116aff6
--- /dev/null
+++ b/src/pages/docs/api/examples/publish-runbook.md
@@ -0,0 +1,9 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/runbooks/publish-runbook
+pubDate: 2023-01-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/api/examples/register-listening-tentacle.md b/src/pages/docs/api/examples/register-listening-tentacle.md
new file mode 100644
index 0000000000..ea62650da1
--- /dev/null
+++ b/src/pages/docs/api/examples/register-listening-tentacle.md
@@ -0,0 +1,9 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-targets/register-listening-tentacle
+pubDate: 2023-01-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/api/examples/register-polling-tentacle.md b/src/pages/docs/api/examples/register-polling-tentacle.md
new file mode 100644
index 0000000000..fcb630adfe
--- /dev/null
+++ b/src/pages/docs/api/examples/register-polling-tentacle.md
@@ -0,0 +1,9 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-targets/register-polling-tentacle
+pubDate: 2023-01-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/api/examples/releases/create-release-with-specific-version.mdx b/src/pages/docs/api/examples/releases/create-release-with-specific-version.mdx
new file mode 100644
index 0000000000..1c7218fd95
--- /dev/null
+++ b/src/pages/docs/api/examples/releases/create-release-with-specific-version.mdx
@@ -0,0 +1,25 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Create a release with specific version
+description: An example script that creates a release with a specific version number.
+---
+import CreateReleaseWithVersionScripts from 'src/shared-content/scripts/create-release-with-version-scripts.include.md';
+
+This script demonstrates how to programmatically create a release with a specified version number.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Name of the project
+- Name of the channel
+- Version number of the release to create
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/releases/delete-project-releases.mdx b/src/pages/docs/api/examples/releases/delete-project-releases.mdx
new file mode 100644
index 0000000000..ade6151640
--- /dev/null
+++ b/src/pages/docs/api/examples/releases/delete-project-releases.mdx
@@ -0,0 +1,27 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Delete project releases
+description: An example script that deletes releases for a project.
+---
+import DeleteProjectReleasesScripts from 'src/shared-content/scripts/delete-project-releases-scripts.include.md';
+
+This script demonstrates how to programmatically delete releases for a project.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Name of the project
+
+:::div{.warning}
+**This script will delete all releases for a given project. This operation is destructive and cannot be undone. Ensure you have a database backup and take care when running this script or one based on it**
+:::
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/releases/index.md b/src/pages/docs/api/examples/releases/index.md
new file mode 100644
index 0000000000..4ff7f9fc28
--- /dev/null
+++ b/src/pages/docs/api/examples/releases/index.md
@@ -0,0 +1,15 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Releases
+description: This section includes examples of how to use the REST API to create and manage releases in Octopus.
+navOrder: 140
+hideInThisSectionHeader: true
+---
+You can use the REST API to create and manage your Octopus [releases](/docs/releases). Typical tasks can include:
+
+- [Create a release with specific version](/docs/api/examples/releases/create-release-with-specific-version)
+- [Delete project releases](/docs/api/examples/releases/delete-project-releases)
+- [Promote a release not in the destination](/docs/api/examples/releases/promote-release-not-in-destination)
+- [Update release variable snapshot](/docs/api/examples/releases/update-release-variable-snapshot)
diff --git a/src/pages/docs/api/examples/releases/promote-release-not-in-destination.mdx b/src/pages/docs/api/examples/releases/promote-release-not-in-destination.mdx
new file mode 100644
index 0000000000..161d624866
--- /dev/null
+++ b/src/pages/docs/api/examples/releases/promote-release-not-in-destination.mdx
@@ -0,0 +1,25 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Promote a release not in the destination
+description: An example script that will promote a release if it is not in the destination.
+---
+import PromoteReleasesNotInDestination from 'src/shared-content/scripts/promote-releases-not-in-destination.include.md';
+
+This script demonstrates how to programmatically find the latest deployment in each environment and compare releases. If they don't match then promote the release to the next environment.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Comma separated list of projects
+- Source Environment Name
+- Destination Environment Name
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/releases/update-release-variable-snapshot.mdx b/src/pages/docs/api/examples/releases/update-release-variable-snapshot.mdx
new file mode 100644
index 0000000000..280287706b
--- /dev/null
+++ b/src/pages/docs/api/examples/releases/update-release-variable-snapshot.mdx
@@ -0,0 +1,25 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Update release variable snapshot
+description: An example script that updates the variable snapshot for a release.
+---
+import UpdateReleaseVariableShapshotScripts from 'src/shared-content/scripts/update-release-variable-snapshot-scripts.include.md';
+
+This script demonstrates how to programmatically update the variable snapshot for a release.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Name of the project
+- Name of the channel
+- Version of the release
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/replace-certificate.md b/src/pages/docs/api/examples/replace-certificate.md
new file mode 100644
index 0000000000..2e46978b49
--- /dev/null
+++ b/src/pages/docs/api/examples/replace-certificate.md
@@ -0,0 +1,9 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/certificates/replace-certificate
+pubDate: 2023-01-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/api/examples/reports/deployments-per-target-role-report.mdx b/src/pages/docs/api/examples/reports/deployments-per-target-role-report.mdx
new file mode 100644
index 0000000000..220cad7032
--- /dev/null
+++ b/src/pages/docs/api/examples/reports/deployments-per-target-role-report.mdx
@@ -0,0 +1,29 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Deployments Per Deployment Target Role Report
+description: An example script that will provide a list of all the deployment targets in a given role and their respective deployments.
+---
+import DeploymentsPerTargetRoleReport from 'src/shared-content/scripts/deployments-per-target-role-report.include.md';
+
+The Octopus Web Portal allows you to see what deployments have gone out to a specific deployment target, but it doesn't provide you with a list of deployments for all the deployment targets in a role. This script demonstrates how to generate such a report.
+
+:::figure
+
+:::
+
+**Please note:** The report is generated as a CSV file, formatting was added to the screenshot to make it easier to read.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Report Path
+- Space Name
+- Target Role
+- Days to Query
+
+
diff --git a/src/pages/docs/api/examples/reports/environment-permissions-report.mdx b/src/pages/docs/api/examples/reports/environment-permissions-report.mdx
new file mode 100644
index 0000000000..821b42dbf4
--- /dev/null
+++ b/src/pages/docs/api/examples/reports/environment-permissions-report.mdx
@@ -0,0 +1,40 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Environment permissions report
+description: An example script that will provide a report of which users have access to a specific permission for a specific environment.
+---
+import EnvironmentPermissionsReport from 'src/shared-content/scripts/environment-permissions-report.include.md';
+
+The Octopus Web Portal provides the ability to see the permissions from a user's point of view. This script demonstrates how to generate a report for a specific permission for specific environments. For example, what users have permissions to deploy to **Production.**
+
+This report will look for teams scoped to a role with a specific environment (Production) or no environments. For example, you want to find out all the users who have permissions to deploy to **Production**. If a user is on a team scoped to the role `Deployment Creator` with no environments that user will show up in the report with an environment scoping of **All** because they have permissions to deploy to **Production**.
+
+:::figure
+
+:::
+
+**Please note:** The report is generated as a CSV file, formatting was added to the screenshot to make it easier to read.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Report Path
+- Space Filter
+- Environment Filter
+- User Filter
+- Permission Name
+
+The filters allow you to choose which space(s), project(s), and user(s) to generate a report for. They all have the same features.
+
+- `all` will return the results for all spaces/environments.
+- Wildcard or `*` will return all spaces/environments matching the wildcard search.
+- Specific name will only show the exact matching spaces/environments.
+
+The filters support comma-separated entries. Setting the Environment Filter to `Test,Prod*` will find all environments with the display name of `Test` or that start with `Prod`.
+
+
diff --git a/src/pages/docs/api/examples/reports/index.md b/src/pages/docs/api/examples/reports/index.md
new file mode 100644
index 0000000000..e90d7267b5
--- /dev/null
+++ b/src/pages/docs/api/examples/reports/index.md
@@ -0,0 +1,19 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Generate reports with the Octopus REST API
+navTitle: Reports
+description: This section includes examples of how to use the REST API to generate comma separated reports using the Octopus Deploy API.
+navOrder: 150
+hideInThisSectionHeader: true
+---
+
+You can use the Octopus Deploy REST API to generate a number of reports.
+
+All the reports in this section will include:
+
+- 1 to N number of filters to filter out unwanted data.
+- Output results to a file (typically `.csv`) to store or share with others.
+
+Provided sample reports are:
diff --git a/src/pages/docs/api/examples/reports/project-permissions-report.mdx b/src/pages/docs/api/examples/reports/project-permissions-report.mdx
new file mode 100644
index 0000000000..ed55ca949e
--- /dev/null
+++ b/src/pages/docs/api/examples/reports/project-permissions-report.mdx
@@ -0,0 +1,53 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Project permissions report
+description: An example script that will provide a report of which users have access to specific projects.
+---
+import ProjectPermissionsReport from 'src/shared-content/scripts/project-permissions-report.include.md';
+
+The Octopus Web Portal provides the ability to see the permissions from a user's point of view. This script demonstrates how to generate a report of permissions from a project's point of view.
+
+:::figure
+
+:::
+
+**Please note:** The report is generated as a CSV file, formatting was added to the screenshot to make it easier to read.
+
+A user could be assigned to multiple teams with multiple role scopes. This script will determine the "most permissive" role scoping and display that. For example:
+
+- User A is assigned to Team B that has permissions to deploy to **Production**.
+- User A is assigned to Team C that has permissions to deploy to any environment.
+
+The report should show the user has permissions to deploy to any environment.
+
+The report will also combine environment and tenant scoping. For example:
+
+- User A is assigned to Team B that has permissions to deploy to **Production**.
+- User A is assigned to Team C that has permissions to deploy to **Staging**.
+
+The report should show the user has permissions to deploy to **Staging;Production**.
+
+Finally, if a user is scoped to an environment or tenant that is *not* associated with the project then that scoping is excluded from the report.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Report Path
+- Space Filter
+- Project Filter
+- User Filter
+
+The filters allow you to choose which space(s), project(s), and user(s) to generate a report for. They all have the same features.
+
+- `all` will return the results for all spaces/projects/users.
+- Wildcard or `*` will return all spaces/projects/users matching the wildcard search.
+- Specific name will only show the exact matching spaces/projects/users.
+
+The filters support comma-separated entries. Setting the User Filter to `Test,Bob*` will find all users with the display name of `Test` or that start with `Bob`.
+
+
diff --git a/src/pages/docs/api/examples/reports/project-release-deployment-targets-report.mdx b/src/pages/docs/api/examples/reports/project-release-deployment-targets-report.mdx
new file mode 100644
index 0000000000..05796a7952
--- /dev/null
+++ b/src/pages/docs/api/examples/reports/project-release-deployment-targets-report.mdx
@@ -0,0 +1,29 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Project Release Deployment Targets Report
+description: An example script that will provide a list of all the deployments and deployment targets deployed to.
+---
+import ProjectDeploymentTargetsReport from 'src/shared-content/scripts/project-deployment-targets-report.include.md';
+
+The Octopus Web Portal allows you to see what deployments have gone out to a specific deployment target, but it doesn't provide you with a list of deployment targets for each deployment. This script demonstrates how to generate a report of the deployment targets for a specific release version for a project.
+
+:::figure
+
+:::
+
+**Please note:** The report is generated as a CSV file, formatting was added to the screenshot to make it easier to read.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Report Path
+- Space Name
+- Project Name
+- Release Version
+
+
diff --git a/src/pages/docs/api/examples/run-runbook.md b/src/pages/docs/api/examples/run-runbook.md
new file mode 100644
index 0000000000..bec063e988
--- /dev/null
+++ b/src/pages/docs/api/examples/run-runbook.md
@@ -0,0 +1,9 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/runbooks/run-runbook
+pubDate: 2023-01-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/api/examples/runbooks/add-script-step-to-runbook.mdx b/src/pages/docs/api/examples/runbooks/add-script-step-to-runbook.mdx
new file mode 100644
index 0000000000..8958ac080b
--- /dev/null
+++ b/src/pages/docs/api/examples/runbooks/add-script-step-to-runbook.mdx
@@ -0,0 +1,29 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Add a script step to runbook
+description: An example script that adds a simple PowerShell script to a runbook.
+---
+import AddScriptStepToRunbookScripts from 'src/shared-content/scripts/add-script-step-to-runbook-scripts.include.md';
+
+This script demonstrates how to programmatically add a simple PowerShell script to a runbook.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Name of the runbook
+- Source PowerShell script
+- *Optional* Target role to run the script against.
+
+:::div{.hint}
+**Note:** The source script provided to Octopus must be properly escaped.
+:::
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/runbooks/create-and-publish-runbook.mdx b/src/pages/docs/api/examples/runbooks/create-and-publish-runbook.mdx
new file mode 100644
index 0000000000..5d46c34c23
--- /dev/null
+++ b/src/pages/docs/api/examples/runbooks/create-and-publish-runbook.mdx
@@ -0,0 +1,24 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Create and publish a new runbook snapshot
+description: An example script to create and publish a new runbook snapshot
+---
+import CreateAndPublishRunbookScripts from 'src/shared-content/scripts/create-and-publish-runbook-scripts.include.md';
+
+This script demonstrates how to programmatically create a new runbook snapshot and publish it for use by runbook consumers. If the runbook references any packages from the [Octopus built-in repository](/docs/packaging-applications/package-repositories/built-in-repository), then the latest package versions will be included in the snapshot.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to work with
+- Name of the project with the runbook
+- Name of the runbook
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/runbooks/create-runbook.mdx b/src/pages/docs/api/examples/runbooks/create-runbook.mdx
new file mode 100644
index 0000000000..69f067e662
--- /dev/null
+++ b/src/pages/docs/api/examples/runbooks/create-runbook.mdx
@@ -0,0 +1,24 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Create a runbook
+description: An example script that creates a runbook.
+---
+import CreateRunbookScripts from 'src/shared-content/scripts/create-runbook-scripts.include.md';
+
+This script demonstrates how to programmatically create a runbook.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Name of the project
+- Name of the runbook to create
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/runbooks/create-scheduled-runbook-trigger.mdx b/src/pages/docs/api/examples/runbooks/create-scheduled-runbook-trigger.mdx
new file mode 100644
index 0000000000..4f265b5d37
--- /dev/null
+++ b/src/pages/docs/api/examples/runbooks/create-scheduled-runbook-trigger.mdx
@@ -0,0 +1,30 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Create a new scheduled runbook trigger
+description: An example script to create and publish a new runbook scheduled trigger
+---
+import CreateScheduledRunbookTriggerScripts from 'src/shared-content/scripts/create-scheduled-runbook-trigger-scripts.include.md';
+
+This script demonstrates how to programmatically create a new [scheduled runbook trigger](/docs/runbooks/scheduled-runbook-trigger). The trigger will run once a day at the time specified, on the days specified, in the timezone chosen (default is `GMT Standard Time`).
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to work with
+- Name of the project with the runbook
+- Name of the runbook
+- Name of the scheduled trigger
+- Description of the scheduled trigger
+- List of environments to run the runbook in
+- Timezone for the schedule
+- List of the days of week to run the trigger on
+- The time to run the trigger each day, provided in the format `yyyy-MM-ddTHH:mm:ss.fffZ`. For example, `2021-07-22T09:00:00.000Z`.
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/runbooks/index.md b/src/pages/docs/api/examples/runbooks/index.md
new file mode 100644
index 0000000000..fd230c673c
--- /dev/null
+++ b/src/pages/docs/api/examples/runbooks/index.md
@@ -0,0 +1,18 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Runbooks
+description: This section includes examples of how to use the REST API to create and manage runbooks in Octopus.
+navOrder: 160
+hideInThisSectionHeader: true
+---
+You can use the REST API to create and manage your Octopus [runbooks](/docs/runbooks). Typical tasks can include:
+
+- [Add a script step to runbook](/docs/api/examples/runbooks/add-script-step-to-runbook)
+- [Create and publish a new runbook snapshot](/docs/api/examples/runbooks/create-and-publish-runbook)
+- [Create a runbook](/docs/api/examples/runbooks/create-runbook)
+- [Create a new scheduled runbook trigger](/docs/api/examples/runbooks/create-scheduled-runbook-trigger)
+- [Publish a runbook snapshot](/docs/api/examples/runbooks/publish-runbook)
+- [Run a runbook with prompted variables](/docs/api/examples/runbooks/run-runbook-with-prompted-variables)
+- [Run a published runbook](/docs/api/examples/runbooks/run-runbook)
diff --git a/src/pages/docs/api/examples/runbooks/publish-runbook.mdx b/src/pages/docs/api/examples/runbooks/publish-runbook.mdx
new file mode 100644
index 0000000000..723b76067a
--- /dev/null
+++ b/src/pages/docs/api/examples/runbooks/publish-runbook.mdx
@@ -0,0 +1,25 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Publish a runbook snapshot
+description: An example script to publish an existing runbook snapshot
+---
+import PublishRunbookScripts from 'src/shared-content/scripts/publish-runbook-scripts.include.md';
+
+This script demonstrates how to programmatically publish an *existing* runbook snapshot. To learn how to create a new snapshot and publish it see [this example](/docs/api/examples/runbooks/create-and-publish-runbook).
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to work with
+- Name of the project with the runbook
+- Name of the runbook
+- Name of the snapshot to publish
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/runbooks/run-runbook-with-prompted-variables.mdx b/src/pages/docs/api/examples/runbooks/run-runbook-with-prompted-variables.mdx
new file mode 100644
index 0000000000..5254323330
--- /dev/null
+++ b/src/pages/docs/api/examples/runbooks/run-runbook-with-prompted-variables.mdx
@@ -0,0 +1,39 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Run a runbook with prompted variables
+description: An example script to run a runbook with prompted variables.
+---
+import RunARunbookWithPromptedVariables from 'src/shared-content/scripts/run-a-runbook-with-prompted-variables.include.md';
+
+This script demonstrates how to programmatically run a runbook when the runbook has prompted variables. It will also wait for the runbook run to complete.
+
+## Usage
+
+Provide values for the following:
+
+- Runbook Base URL
+- Runbook API Key
+- Name of the space
+- Name of the project
+- Name of the runbook
+- Name of the environment
+- Wait for finish
+- Use guided failure mode
+- Use a published snapshot only
+- Cancel in seconds
+- Prompted variables
+
+### Prompted variable format
+
+In the PowerShell script the prompted variables should be provided in the format `Name::Value` with a new line separating them:
+
+```text
+PromptedVariableName::My Super Awesome Value
+OtherPromptedVariable::Other Super Awesome Value
+```
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/runbooks/run-runbook.mdx b/src/pages/docs/api/examples/runbooks/run-runbook.mdx
new file mode 100644
index 0000000000..adb6219c62
--- /dev/null
+++ b/src/pages/docs/api/examples/runbooks/run-runbook.mdx
@@ -0,0 +1,26 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Run a published runbook
+description: An example script to run a published runbook.
+---
+import RunRunbookScripts from 'src/shared-content/scripts/run-runbook-scripts.include.md';
+
+This script demonstrates how to programmatically run a published runbook.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space
+- Name of the project
+- Name of the runbook
+- Array of environment names
+- *Optional* tenant name
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/spaces/add-a-space-with-environments.mdx b/src/pages/docs/api/examples/spaces/add-a-space-with-environments.mdx
new file mode 100644
index 0000000000..5593ede404
--- /dev/null
+++ b/src/pages/docs/api/examples/spaces/add-a-space-with-environments.mdx
@@ -0,0 +1,28 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Add a Space with environments
+description: An example script to create a new space and populate it with some default environments.
+---
+import AddASpaceWithEnvironmentsScripts from 'src/shared-content/scripts/add-a-space-with-environments-scripts.include.md';
+
+This script is a starter for bootstrapping a new [Space](/docs/administration/spaces) in your Octopus instance.
+
+It creates a new space with the provided name, description, and managers. At least one manager team or member must be provided.
+
+Then the script will create the [Environments](/docs/infrastructure/environments) provided in the newly created space.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Space Name
+- Environments
+- A combination of Manager Teams and Manager Team Members
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/spaces/delete-a-space.mdx b/src/pages/docs/api/examples/spaces/delete-a-space.mdx
new file mode 100644
index 0000000000..b53ea32be7
--- /dev/null
+++ b/src/pages/docs/api/examples/spaces/delete-a-space.mdx
@@ -0,0 +1,26 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Delete a Space
+description: An example script to delete a space.
+---
+import DeleteASpaceScripts from 'src/shared-content/scripts/delete-a-space-scripts.include.md';
+
+This script deletes a [Space](/docs/administration/spaces) from your Octopus instance.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Space Name to delete the space with the given name.
+
+:::div{.warning}
+**Be very careful when deleting a Space. This operation is destructive and cannot be undone.**
+:::
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/spaces/index.md b/src/pages/docs/api/examples/spaces/index.md
new file mode 100644
index 0000000000..8689d7f2f1
--- /dev/null
+++ b/src/pages/docs/api/examples/spaces/index.md
@@ -0,0 +1,13 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Spaces
+description: This section includes examples of how to use the REST API to create and manage spaces in Octopus.
+navOrder: 170
+hideInThisSectionHeader: true
+---
+You can use the REST API to create and manage your Octopus [Spaces](/docs/administration/spaces). Typical tasks can include:
+
+- [Add a Space with environments](/docs/api/examples/spaces/add-a-space-with-environments)
+- [Delete a Space](/docs/api/examples/spaces/delete-a-space)
diff --git a/src/pages/docs/api/examples/step-templates/export-step-templates.mdx b/src/pages/docs/api/examples/step-templates/export-step-templates.mdx
new file mode 100644
index 0000000000..6ed19757b9
--- /dev/null
+++ b/src/pages/docs/api/examples/step-templates/export-step-templates.mdx
@@ -0,0 +1,22 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Export step templates
+description: An example script that exports all step templates in a Space to files.
+---
+import ExportStepTemplatesScripts from 'src/shared-content/scripts/export-step-templates-scripts.include.md';
+
+This script demonstrates how to export all step templates in a Space to files.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the Space to use
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/step-templates/index.md b/src/pages/docs/api/examples/step-templates/index.md
new file mode 100644
index 0000000000..2e659dfaf2
--- /dev/null
+++ b/src/pages/docs/api/examples/step-templates/index.md
@@ -0,0 +1,12 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Step Templates
+description: This section includes examples of how to use the REST API to create and manage step templates in Octopus.
+navOrder: 180
+hideInThisSectionHeader: true
+---
+You can use the REST API to create and manage your Octopus [step templates](/docs/projects/custom-step-templates). Typical tasks can include:
+
+- [Export step templates](/docs/api/examples/step-templates/export-step-templates)
diff --git a/src/pages/docs/api/examples/tagsets/create-tagset.mdx b/src/pages/docs/api/examples/tagsets/create-tagset.mdx
new file mode 100644
index 0000000000..ca7ae18585
--- /dev/null
+++ b/src/pages/docs/api/examples/tagsets/create-tagset.mdx
@@ -0,0 +1,33 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2025-10-08
+title: Create a tag set
+description: An example script that creates a tag set in Octopus Deploy.
+---
+import CreateTagsetScripts from 'src/shared-content/scripts/create-tagset-scripts.include.md';
+
+This script demonstrates how to programmatically create a tag set in Octopus Deploy.
+
+:::div{.hint}
+From Octopus Cloud version **2025.4.3897**, `Type` and `Scopes` parameters can be included to configure the type of and scoping of a tag set when created via the API.
+
+The API will ignore the `Type` and `Scopes` parameters if the `Extended Tag Sets` feature toggle is disabled.
+:::
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Name of the tag set to create
+- Type for the tag set (MultiSelect, SingleSelect, or FreeText)
+- Scopes for the tag set (Tenant, Environment, Project, or any combination)
+- Optional description for the tag set
+- Optional tags to add to the new tag set
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/tagsets/index.md b/src/pages/docs/api/examples/tagsets/index.md
new file mode 100644
index 0000000000..625bf3524c
--- /dev/null
+++ b/src/pages/docs/api/examples/tagsets/index.md
@@ -0,0 +1,10 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2025-10-08
+title: Tag sets
+description: This section includes examples of how to use the REST API to create and manage tag sets in Octopus.
+navOrder: 190
+hideInThisSectionHeader: true
+---
+You can use the REST API to create and manage [tag sets](/docs/tenants/tag-sets). Typical tasks can include:
diff --git a/src/pages/docs/api/examples/tasks/index.md b/src/pages/docs/api/examples/tasks/index.md
new file mode 100644
index 0000000000..6c447c6737
--- /dev/null
+++ b/src/pages/docs/api/examples/tasks/index.md
@@ -0,0 +1,14 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Manage server tasks with the Octopus REST API
+navTitle: Tasks
+description: This section includes examples of how to use the REST API to create and manage Tasks in Octopus.
+navOrder: 200
+hideInThisSectionHeader: true
+---
+You can use the REST API to create and manage Server tasks in Octopus. Typical tasks might include:
+
+- [Reprioritize Tasks](/docs/api/examples/tasks/reprioritize-tasks)
+- [Run a health check](/docs/api/examples/tasks/run-healthcheck)
diff --git a/src/pages/docs/api/examples/tasks/reprioritize-tasks.mdx b/src/pages/docs/api/examples/tasks/reprioritize-tasks.mdx
new file mode 100644
index 0000000000..5292d6720d
--- /dev/null
+++ b/src/pages/docs/api/examples/tasks/reprioritize-tasks.mdx
@@ -0,0 +1,74 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-10-20
+title: Reprioritize Tasks
+description: An example script to find deployments or runbook runs for a specific environment, project, or tenant and move them to the top of the queue.
+---
+import ReprioritizeTasks from 'src/shared-content/scripts/reprioritize-tasks.include.md';
+
+:::div{.hint}
+Support for [prioritizing tasks](/docs/tasks/prioritize-tasks) directly in Octopus is available from **2023.4**.
+:::
+
+This script can be used to move critical deployments from the bottom of the queue to the top of the queue.
+
+How it works:
+
+1. Look at all the pending tasks in the queue. All in-process items are left as is.
+2. If there are any deployments or runbook runs, it will check to see if they match specified criteria.
+3. If any matching runbook runs or deployment tasks are found, it will loop through the queue and cancel all the items before them.
+4. If the script cancels any runbook runs or deployments, it will resubmit them using the same values.
+
+For example, you have this in your pending queue:
+
+1. Deployment to Dev
+2. Runbook run on Maintenance
+3. Retention policy run
+4. Deployment to Production
+
+It will cancel the deployment to `Dev`, the runbook run on `Maintenance`, and the retention policy run. It will then resubmit the deployment to `Dev,` and the runbook run on `Maintenance` using the same parameters. The user who appears in the audit log will be the one attached to the API key.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL (required)
+- Octopus API Key (required)
+
+The script looks for tasks one of two ways:
+
+1. Task Id List - comma separated list of task ids to move to the top of the queue
+2. Matching based on criteria, see below
+
+Matching based on criteria
+
+- Space List - comma separated list of spaces to look for (optional)
+- Environment List - comma separated list of environments to look for (optional)
+ - Options:
+ - `EnvironmentName` - eg `Production` - looks for the `Production` environment in any space from the space list.
+ - `EnvironmentName::SpaceName` - eg `Production::Default` - looks for the `Production` environment in the `Default` space only.
+- Project List - comma separated list of projects to look for (optional)
+ - Options:
+ - `ProjectName` - eg `Hello World` - looks for the `Hello World` project in any space from the space list.
+ - `ProjectName::SpaceName` - eg `Hello World::Default` - looks for the `Hello World` project in the `Default` space only.
+- Tenant List - comma separated list of tenants to look for (optional)
+ - Options:
+ - `TenantName` - eg `My Tenant` - looks for the `My Tenant` tenant in any space from the space list.
+ - `TenantName::SpaceName` - eg `My Tenant::Default` - looks for the `My Tenant` tenant in the `Default` space only.
+- Match Type - how the match will happen
+ - Options:
+ - `Or` - will look for runbook run or deployment that matches any of the filters - eg `Production` OR `Hello World` OR `My Tenant`
+ - `And` - will look for runbook run or deployment that matches all filters - eg `Production` AND `Hello World` AND `My Tenant`
+ - If a filter isn't supplied it is excluded from the check
+- Task Type - what task type to look for
+ - Options:
+ - `Deploy` - looks for deployments only
+ - `RunbookRun` - looks for runbook runs only
+ - `Both` - looks for both deployments and runbooks runs
+
+You must supply at least one task id OR at least one filter for environments OR projects OR tenants must be supplied.
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/tasks/run-healthcheck.mdx b/src/pages/docs/api/examples/tasks/run-healthcheck.mdx
new file mode 100644
index 0000000000..404467f49f
--- /dev/null
+++ b/src/pages/docs/api/examples/tasks/run-healthcheck.mdx
@@ -0,0 +1,28 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Run a health check
+description: An example script that creates and runs a health check task.
+---
+import RunHealthcheckScripts from 'src/shared-content/scripts/run-healthcheck-scripts.include.md';
+
+This script demonstrates how to programmatically create and run a [health check](/docs/infrastructure/deployment-targets/machine-policies) task in Octopus Deploy.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Description for the health check task
+- Timeout value (in minutes) for the task
+- Machine timeout value (in minutes) for the health check to use when run against machines
+- One of:
+ - An environment name to run the health check task against or
+ - A list of machine names to run the health check task against or
+ - A combination of both environment and machines
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/tenants/bulk-add-projects-to-tenants.md b/src/pages/docs/api/examples/tenants/bulk-add-projects-to-tenants.md
new file mode 100644
index 0000000000..99afcc2f12
--- /dev/null
+++ b/src/pages/docs/api/examples/tenants/bulk-add-projects-to-tenants.md
@@ -0,0 +1,9 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/bulk-operations/bulk-add-projects-to-tenants
+pubDate: 2023-01-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/api/examples/tenants/create-tenant.mdx b/src/pages/docs/api/examples/tenants/create-tenant.mdx
new file mode 100644
index 0000000000..05f2ed70ec
--- /dev/null
+++ b/src/pages/docs/api/examples/tenants/create-tenant.mdx
@@ -0,0 +1,36 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Create a tenant
+description: An example script that creates a tenant.
+---
+import CreateATenantScripts from 'src/shared-content/scripts/create-a-tenant-scripts.include.md';
+
+This script demonstrates how to programmatically create a new [tenant](/docs/tenants) in Octopus.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Name of the tenant to create
+- A list of Project names to connect the new tenant with
+- A list of Environment names to connect the new tenant with
+- A list of Tenant tags to use with the new tenant
+
+:::div{.hint}
+**Note:**
+In order for this script to execute correctly, please note the following:
+
+- The projects provided must have the Multi-tenanted deployment setting enabled.
+- The environments provided must exist.
+- The optional tenant tags provided must exist.
+
+:::
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/tenants/deactivate-tenant.mdx b/src/pages/docs/api/examples/tenants/deactivate-tenant.mdx
new file mode 100644
index 0000000000..068c8cbbb9
--- /dev/null
+++ b/src/pages/docs/api/examples/tenants/deactivate-tenant.mdx
@@ -0,0 +1,27 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2024-11-18
+modDate: 2024-11-18
+title: Deactivate tenants
+description: An example script that activates or deactivates a tenant in Octopus.
+---
+import DeactivateTenantScripts from 'src/shared-content/scripts/deactivate-tenant-scripts.include.md';
+
+In 2025.1 Octopus has added support for deactivating tenants. Inactive tenants do not allow deployments or runbook runs but are able to be edited. They are also removed from license calculations allowing you to effectively archive unused tenants and re-enable them in the future.
+Inactive tenants are highlighted with grayed out text and are not available for selection on the deployment or runbook run pages. If deployments are created for inactive tenants via the API or CLI an exception will be thrown.
+
+This script demonstrates how to programmatically deactivate a tenant.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Name of the tenant
+- Boolean value for enabled
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/tenants/index.md b/src/pages/docs/api/examples/tenants/index.md
new file mode 100644
index 0000000000..b07621a3b7
--- /dev/null
+++ b/src/pages/docs/api/examples/tenants/index.md
@@ -0,0 +1,14 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Tenants
+description: This section includes examples of how to use the REST API or Octopus.Client to create and manage Tenants in Octopus.
+navOrder: 210
+hideInThisSectionHeader: true
+---
+You can use the REST API to create and manage Server tasks in Octopus. Typical tasks might include:
+
+- [Create a tenant](/docs/api/examples/tenants/create-tenant)
+- [Update tenant variables](/docs/api/examples/tenants/update-tenant-variable)
+- [Deactivate tenants](/docs/api/examples/tenants/deactivate-tenant)
diff --git a/src/pages/docs/api/examples/tenants/update-tenant-variable.mdx b/src/pages/docs/api/examples/tenants/update-tenant-variable.mdx
new file mode 100644
index 0000000000..5c2aa79d8f
--- /dev/null
+++ b/src/pages/docs/api/examples/tenants/update-tenant-variable.mdx
@@ -0,0 +1,39 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2026-01-20
+title: Update tenant variables
+description: Example scripts that update tenant variables for both project variables and common (library) variables in Octopus using the REST API and Octopus.Client.
+---
+import UpdateTenantProjectVariableScripts from 'src/shared-content/scripts/update-tenant-project-variable-scripts.include.md';
+import UpdateTenantCommonVariableScripts from 'src/shared-content/scripts/update-tenant-common-variable-scripts.include.md';
+
+These scripts demonstrate how to programmatically update tenant variables.
+
+## Update project tenant variables
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Name of the tenant
+- Name of the Project template
+- The new variable value
+- Choose whether the new variable value is bound to an Octopus variable value e.g. `#{MyVariable}`
+
+
+
+## Update common tenant variables
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Name of the tenant
+- Name of the Library template
+- The new variable value
+- Choose whether the new variable value is bound to an Octopus variable value e.g. `#{MyVariable}`
+
+
diff --git a/src/pages/docs/api/examples/users-and-teams/add-azure-ad-to-users.mdx b/src/pages/docs/api/examples/users-and-teams/add-azure-ad-to-users.mdx
new file mode 100644
index 0000000000..823e0135ed
--- /dev/null
+++ b/src/pages/docs/api/examples/users-and-teams/add-azure-ad-to-users.mdx
@@ -0,0 +1,63 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2024-06-25
+title: Add Microsoft Entra ID login to users
+description: An example script to add Microsoft Entra ID login details to Octopus user accounts.
+---
+import AddAzureADIdentityToUsersScripts from 'src/shared-content/scripts/add-azure-ad-identity-to-users-scripts.include.md';
+
+Octopus supports a number of external [authentication providers](/docs/security/authentication/), including [Microsoft Entra ID Authentication](/docs/security/authentication/azure-ad-authentication). If you want to use Microsoft Entra ID to authenticate but re-use existing Octopus user accounts, the easiest way is to add an Azure AD login:
+
+:::figure
+
+:::
+
+This script will add Microsoft Entra ID login details to Octopus user accounts.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- A list of users, supplied from either:
+ - The path to a CSV file containing user records
+ - The Octopus Username, Azure email address and (optionally) Azure display name
+- (Optional) whether or not to update the Octopus user's email address
+- (Optional) whether or not to update the Octopus user's display name
+- (Optional) whether or not to continue to the next user if an error occurs
+- (Optional) whether or not to force an update of the Azure AD identity if one already exists
+- (Optional) whether or not to perform a dry run (What If?) and not perform any updates
+- (Optional) whether or not to toggle debug (Verbose) logging
+
+### Add Microsoft Entra ID identities to single user
+
+```powershell Add an identity to a single user
+AddAzureADLogins -OctopusURL "https://your-octopus-url/" -OctopusAPIKey "API-YOUR-KEY" -OctopusUsername "OctoUser" -AzureEmailAddress "octouser@exampledomain.com" -AzureDisplayName "Octo User" -ContinueOnError $False -Force $False -WhatIf $False -DebugLogging $False
+```
+
+### Add Microsoft Entra ID identities for multiple users from CSV file
+
+```powershell Add identities to every user in a CSV file
+AddAzureADLogins -OctopusURL "https://your-octopus-url/" -OctopusAPIKey "API-YOUR-KEY" -Path "/path/to/user_azure_ad_logins.csv" -ContinueOnError $False -Force $False -WhatIf $False -DebugLogging $False
+```
+
+### Example CSV file
+
+An example of the expected CSV file format is shown below:
+
+```text Expected CSV format
+OctopusUsername, AzureEmailAddress, AzureDisplayName
+OctoUser, octouser@exampledomain.com, Octo User
+```
+
+The first row should be the header row containing the following columns:
+
+- `OctopusUsername`
+- `AzureEmailAddress`
+- `AzureDisplayName`
+
+### Script
+
+
diff --git a/src/pages/docs/api/examples/users-and-teams/add-domain-teams.mdx b/src/pages/docs/api/examples/users-and-teams/add-domain-teams.mdx
new file mode 100644
index 0000000000..94fdb407d7
--- /dev/null
+++ b/src/pages/docs/api/examples/users-and-teams/add-domain-teams.mdx
@@ -0,0 +1,23 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Add domain teams
+description: An example script that adds teams from a new domain to existing Octopus teams.
+---
+import AddDomainTeamsScripts from 'src/shared-content/scripts/add-domain-teams-scripts.include.md';
+
+This script demonstrates how to programmatically add teams from a new domain to existing Octopus teams. This can be useful when you are migrating from one domain to another.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Maximum number of records to update
+- Name of new to domain to use
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/users-and-teams/add-environment-to-team.mdx b/src/pages/docs/api/examples/users-and-teams/add-environment-to-team.mdx
new file mode 100644
index 0000000000..000d069961
--- /dev/null
+++ b/src/pages/docs/api/examples/users-and-teams/add-environment-to-team.mdx
@@ -0,0 +1,25 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Add an environment to a team
+description: An example script that adds an environment to a team user role.
+---
+import AddEnvironmentToTeamScripts from 'src/shared-content/scripts/add-environment-to-team-scripts.include.md';
+
+This script demonstrates how to programmatically add an environment to a user role for a team.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to work with
+- Name of the team
+- Name of the user role
+- Array of environment names
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/users-and-teams/change-users-domain.mdx b/src/pages/docs/api/examples/users-and-teams/change-users-domain.mdx
new file mode 100644
index 0000000000..cbefac6693
--- /dev/null
+++ b/src/pages/docs/api/examples/users-and-teams/change-users-domain.mdx
@@ -0,0 +1,24 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Change users domain
+description: An example script that changes an Octopus user's Active Directory domain assignment.
+---
+import ChangeUserDomainScripts from 'src/shared-content/scripts/change-user-domain-scripts.include.md';
+
+This script demonstrates how to programmatically change an Octopus user's Active Directory domain assignment. This can be useful when you are migrating from one domain to another.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Maximum number of records to update
+- Name of the old domain to search for
+- Name of new to domain to use in place of the old domain
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/users-and-teams/create-api-key.mdx b/src/pages/docs/api/examples/users-and-teams/create-api-key.mdx
new file mode 100644
index 0000000000..bda92a41e1
--- /dev/null
+++ b/src/pages/docs/api/examples/users-and-teams/create-api-key.mdx
@@ -0,0 +1,27 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Create an API Key
+description: An example script that creates an API Key.
+---
+import CreateApiKeyScripts from 'src/shared-content/scripts/create-api-key-scripts.include.md';
+
+This script demonstrates how to programmatically create a new API Key.
+
+:::div{.warning}
+**Note:** You can only create a new API Key for your own user account. You will also need an existing API Key to authenticate with the Octopus REST API, created from the [Octopus Web Portal](/docs/api/authentication/create-an-api-key).
+:::
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Name of the user to create the API Key for
+- Description of the API Key's purpose
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/users-and-teams/find-teams-with-role.mdx b/src/pages/docs/api/examples/users-and-teams/find-teams-with-role.mdx
new file mode 100644
index 0000000000..7bdd005403
--- /dev/null
+++ b/src/pages/docs/api/examples/users-and-teams/find-teams-with-role.mdx
@@ -0,0 +1,23 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Find teams with role
+description: An example script that finds all teams using a specific role.
+---
+import FindTeamsWithRoleScripts from 'src/shared-content/scripts/find-teams-with-role-scripts.include.md';
+
+This script demonstrates how to programmatically find all teams using a specific role.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to work with
+- Name of the user role
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/users-and-teams/index.md b/src/pages/docs/api/examples/users-and-teams/index.md
new file mode 100644
index 0000000000..300e712aaf
--- /dev/null
+++ b/src/pages/docs/api/examples/users-and-teams/index.md
@@ -0,0 +1,23 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Users and Teams
+description: This section includes examples of how to use the REST API to manage users and teams in Octopus.
+navOrder: 220
+hideInThisSectionHeader: true
+---
+You can use the REST API to create and manage your Octopus [Users and Teams](/docs/security/users-and-teams). Typical tasks can include:
+
+- [Add Azure Active Directory login to users](/docs/api/examples/users-and-teams/add-azure-ad-to-users)
+- [Add domain teams](/docs/api/examples/users-and-teams/add-domain-teams)
+- [Add an environment to a team](/docs/api/examples/users-and-teams/add-environment-to-team)
+- [Change users domain](/docs/api/examples/users-and-teams/change-users-domain)
+- [Create an API Key](/docs/api/examples/users-and-teams/create-api-key)
+- [Find teams with role](/docs/api/examples/users-and-teams/find-teams-with-role)
+- [List users with editing roles](/docs/api/examples/users-and-teams/list-users-with-editing-roles)
+- [List users with role](/docs/api/examples/users-and-teams/list-users-with-role)
+- [List users](/docs/api/examples/users-and-teams/list-users)
+- [Remove a project from team](/docs/api/examples/users-and-teams/remove-project-from-team)
+- [Swap AD group with LDAP group](/docs/api/examples/users-and-teams/swap-ad-domain-group-with-ldap-group)
+- [Change users AD domain to LDAP](/docs/api/examples/users-and-teams/swap-users-ad-domain-to-ldap)
diff --git a/src/pages/docs/api/examples/users-and-teams/list-users-with-editing-roles.mdx b/src/pages/docs/api/examples/users-and-teams/list-users-with-editing-roles.mdx
new file mode 100644
index 0000000000..38f53eeec3
--- /dev/null
+++ b/src/pages/docs/api/examples/users-and-teams/list-users-with-editing-roles.mdx
@@ -0,0 +1,22 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: List users with editing roles
+description: An example script to list all users that have any user roles (permissions) containing the words Edit, Create or Delete.
+---
+import ListUsersWithEditingRolesScripts from 'src/shared-content/scripts/list-users-with-editing-roles-scripts.include.md';
+
+This script will list all users in an Octopus instance that have user roles (permissions) containing the words Edit, Create or Delete.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- (Optional) path to export the results to a csv file
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/users-and-teams/list-users-with-role.mdx b/src/pages/docs/api/examples/users-and-teams/list-users-with-role.mdx
new file mode 100644
index 0000000000..8320884497
--- /dev/null
+++ b/src/pages/docs/api/examples/users-and-teams/list-users-with-role.mdx
@@ -0,0 +1,60 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: List users with role
+description: An example script to list all users that have a specific role by team.
+---
+import ListUsersWithRoleScripts from 'src/shared-content/scripts/list-users-with-role-scripts.include.md';
+
+This script will list all users with a given role by team. You can also filter the list by specifying a space name.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- User Role Name
+- (Optional) Space Name
+
+## Example output
+
+### All spaces with role name `Project Deployer`
+
+```text
+Team: Build Servers
+Space: Default
+TeamCity
+Build Server
+Team: Can Deploy But Not Download Packages
+Space: Default
+PackageTest
+Team: Developer Lower Environment
+Space: Default
+Paul Oliver the Developer
+Team: Devs
+Space: Default
+Team: Quick Test
+Space: Default
+Ryan Rousseau
+Team: ShawnTest
+Space: AzureDevOps
+Adam Close
+External security groups:
+TestDomain\SpecialGroup
+```
+
+### Space name AzureDevOps
+
+```text
+Team: ShawnTest
+Space: AzureDevOps
+Adam Close
+External security groups:
+TestDomain\SpecialGroup
+```
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/users-and-teams/list-users.mdx b/src/pages/docs/api/examples/users-and-teams/list-users.mdx
new file mode 100644
index 0000000000..c51d86fb11
--- /dev/null
+++ b/src/pages/docs/api/examples/users-and-teams/list-users.mdx
@@ -0,0 +1,31 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: List users
+description: An example script to list all users in an Octopus instance.
+---
+import ListUsersScripts from 'src/shared-content/scripts/list-users-scripts.include.md';
+
+This script will list all active users in an Octopus instance. In addition, there are a number of optional items you can include:
+
+- scoped user roles
+- any associated [Active Directory](/docs/security/authentication/active-directory) details
+- any associated [Azure Active Directory](/docs/security/authentication/azure-ad-authentication) details
+- inactive users
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- (Optional) whether or not to include user role details
+- (Optional) whether or not to include Active Directory details
+- (Optional) whether or not to include Azure Active Directory details
+- (Optional) whether or not to include disabled users
+- (Optional) path to export the results to a csv file
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/users-and-teams/remove-project-from-team.mdx b/src/pages/docs/api/examples/users-and-teams/remove-project-from-team.mdx
new file mode 100644
index 0000000000..a5df6fb60b
--- /dev/null
+++ b/src/pages/docs/api/examples/users-and-teams/remove-project-from-team.mdx
@@ -0,0 +1,24 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Remove a project from team
+description: An example script that removes a project from a team.
+---
+import RemoveProjectFromTeamScripts from 'src/shared-content/scripts/remove-project-from-team-scripts.include.md';
+
+This script demonstrates how to programmatically remove a project from a team.
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to work with
+- Name of the team
+- Name of the project
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/users-and-teams/swap-ad-domain-group-with-ldap-group.mdx b/src/pages/docs/api/examples/users-and-teams/swap-ad-domain-group-with-ldap-group.mdx
new file mode 100644
index 0000000000..dbade507b9
--- /dev/null
+++ b/src/pages/docs/api/examples/users-and-teams/swap-ad-domain-group-with-ldap-group.mdx
@@ -0,0 +1,35 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Swap AD group with LDAP group
+description: An example script that swaps any active directory external group for a matching LDAP external group in each Octopus team.
+---
+import SwitchADDomainGroupToLdapGroupScripts from 'src/shared-content/scripts/switch-ad-domain-group-to-ldap-group-scripts.include.md';
+
+This script demonstrates how to programmatically swap any Active Directory external group for a matching LDAP external group in each Octopus team. This can be useful when you are migrating from the Active Directory authentication provider to the LDAP provider.
+
+We also have a script that will [swap Active Directory login records with matching LDAP ones](/docs/api/examples/users-and-teams/swap-users-ad-domain-to-ldap) for Octopus users.
+
+:::div{.hint}
+**Note:**
+Please note there are some things to consider before using this script:
+
+- Both the [Active Directory](/docs/security/authentication/active-directory/) and [LDAP](/docs/security/authentication/ldap) providers must be enabled for this script to work as it queries both providers.
+- Always ensure you test the script on a non-production server first, and have a production database backup.
+
+:::
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Name of the Active Directory domain to use to look up the groups to swap
+- WhatIf - A boolean value to toggle whether or not to perform the actual updates to teams in Octopus.
+- Remove old teams - A boolean value to toggle whether or not to remove the existing Active Directory groups from each team.
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/users-and-teams/swap-users-ad-domain-to-ldap.mdx b/src/pages/docs/api/examples/users-and-teams/swap-users-ad-domain-to-ldap.mdx
new file mode 100644
index 0000000000..dcfb6f1768
--- /dev/null
+++ b/src/pages/docs/api/examples/users-and-teams/swap-users-ad-domain-to-ldap.mdx
@@ -0,0 +1,39 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Change users AD domain to LDAP
+description: An example script that swaps an Octopus user's Active Directory login record for a matching LDAP one.
+---
+import SwitchUsersADDomainToLdapScripts from 'src/shared-content/scripts/switch-users-ad-domain-to-ldap-scripts.include.md';
+
+This script demonstrates how to programmatically swap an Octopus user's Active Directory login record for a matching LDAP one. This can be useful when you are migrating from the Active Directory authentication provider to the LDAP provider.
+
+We also have a script that will [swap Active Directory groups with matching LDAP groups](/docs/api/examples/users-and-teams/swap-ad-domain-group-with-ldap-group) for Octopus teams.
+
+:::div{.hint}
+**Note:**
+Please note there are some things to consider before using this script:
+
+- The [LDAP authentication provider](/docs/security/authentication/ldap) must be enabled for this script to work as it queries for matching users in LDAP.
+- The script won't work if the LDAP server and the AD Server domains are different. For example migrating from `domain-one.local` to `domain-two.local`.
+- Always ensure you test the script on a non-production server first, and have a production database backup.
+
+:::
+
+## Usage
+
+Provide values for:
+
+- Octopus URL
+- Octopus API Key
+- Max number of records to update in the script execution.
+- Name of the domain to use to find a users existing Active Directory record to optionally remove, in the format `your-ad-domain.com`.
+- Name of the domain to use when searching LDAP for matching external user records in the format `your-ldap-domain.com`. *This is typically the same value as the Active Directory domain*.
+- LDAP username lookup - A boolean value to toggle whether or not to include the LDAP domain when matching the Active Directory username to the LDAP one.
+- WhatIf - A boolean value to toggle whether or not to perform the actual updates to users in Octopus.
+- Remove old Active Directory records - A boolean value to toggle whether or not to remove the existing active directory record from each user.
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/users/index.md b/src/pages/docs/api/examples/users/index.md
new file mode 100644
index 0000000000..9ff254bbdf
--- /dev/null
+++ b/src/pages/docs/api/examples/users/index.md
@@ -0,0 +1,9 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/users-and-teams
+pubDate: 2023-01-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/api/examples/users/list-users-with-role.md b/src/pages/docs/api/examples/users/list-users-with-role.md
new file mode 100644
index 0000000000..c8d714c586
--- /dev/null
+++ b/src/pages/docs/api/examples/users/list-users-with-role.md
@@ -0,0 +1,9 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/users-and-teams/list-users-with-role
+pubDate: 2023-01-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/api/examples/variables/add-library-set-to-project.mdx b/src/pages/docs/api/examples/variables/add-library-set-to-project.mdx
new file mode 100644
index 0000000000..9b4b4332ae
--- /dev/null
+++ b/src/pages/docs/api/examples/variables/add-library-set-to-project.mdx
@@ -0,0 +1,24 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Add variable set to a project
+description: An example script that adds a variable set to a project.
+---
+import AddLibrarySetToProjectScripts from 'src/shared-content/scripts/add-library-set-to-project-scripts.include.md';
+
+This script demonstrates how to programmatically add a variable set to a project.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Name of the project
+- Name of the variable set
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/variables/add-update-project-variable.mdx b/src/pages/docs/api/examples/variables/add-update-project-variable.mdx
new file mode 100644
index 0000000000..3a486e9807
--- /dev/null
+++ b/src/pages/docs/api/examples/variables/add-update-project-variable.mdx
@@ -0,0 +1,28 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Add or update project variable
+description: An example script that adds or updates a project variable.
+---
+import AddUpdateProjectVariableScripts from 'src/shared-content/scripts/add-update-project-variable-scripts.include.md';
+
+This script demonstrates how to programmatically add or update a project variable.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to use
+- Name of the project
+- The variable properties including:
+ - Variable name
+ - Variable value
+ - Variable type
+ - If the variable is sensitive
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/variables/clear-sensitive-variables.mdx b/src/pages/docs/api/examples/variables/clear-sensitive-variables.mdx
new file mode 100644
index 0000000000..fbcf325462
--- /dev/null
+++ b/src/pages/docs/api/examples/variables/clear-sensitive-variables.mdx
@@ -0,0 +1,25 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Clear sensitive variables
+description: An example script that clears all sensitive variables.
+---
+import ClearSensitiveVariablesScripts from 'src/shared-content/scripts/clear-sensitive-variables-scripts.include.md';
+
+This script demonstrates how to programmatically clear all sensitive variables in Projects and Variable Sets in an Octopus instance.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+
+:::div{.warning}
+**This script will clear all sensitive variable values from an Octopus instance. Take care when running this script or one based on it.**
+:::
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/variables/find-projects-using-library-set.mdx b/src/pages/docs/api/examples/variables/find-projects-using-library-set.mdx
new file mode 100644
index 0000000000..a65ed3fe66
--- /dev/null
+++ b/src/pages/docs/api/examples/variables/find-projects-using-library-set.mdx
@@ -0,0 +1,23 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Find projects using variable set
+description: An example script that finds all projects using a specific variable set.
+---
+import FindProjectsUsingVariableSetScripts from 'src/shared-content/scripts/find-projects-using-variable-set-scripts.include.md';
+
+This script demonstrates how to programmatically find all projects using a specific variable set.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to search
+- Name of the Variable Set to search for
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/variables/find-variable-usage.mdx b/src/pages/docs/api/examples/variables/find-variable-usage.mdx
new file mode 100644
index 0000000000..450bd327e8
--- /dev/null
+++ b/src/pages/docs/api/examples/variables/find-variable-usage.mdx
@@ -0,0 +1,36 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Find variable usage
+description: An example script that finds usages of a variable, searching in project variables, and optionally deployment processes and runbooks.
+---
+import FindVariableUsageScripts from 'src/shared-content/scripts/find-variable-usage-scripts.include.md';
+
+This script demonstrates how to programmatically find usages of a variable in all project variable sets (either a named match, or referenced in another variable), and optionally any deployment process or runbook processes.
+
+:::div{.hint}
+**Limitations:**
+Please note the limitations with this example:
+
+- It's not possible to use the REST API to search through sensitive variable values, as these values will be returned as `null`.
+- Variables that are referenced inside of any packages included as part of a deployment or runbook are not searched.
+
+:::
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to search
+- Name of the variable to search for
+- Boolean value to toggle searching in a project's deployment process
+- Boolean value to toggle searching in a project's runbook processes
+- (Optional) Boolean value to toggle searching in variable sets
+- (Optional) path to export the results to a csv file
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/variables/find-variable-value-usage.mdx b/src/pages/docs/api/examples/variables/find-variable-value-usage.mdx
new file mode 100644
index 0000000000..ea62c3a03e
--- /dev/null
+++ b/src/pages/docs/api/examples/variables/find-variable-value-usage.mdx
@@ -0,0 +1,32 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Find variable value usage
+description: An example script that finds all variables with a specific value in project variables and variable sets.
+---
+import FindVariableValueUsageScripts from 'src/shared-content/scripts/find-variable-value-usage-scripts.include.md';
+
+This script demonstrates how to programmatically find usages of a variable value in all projects and variable sets. You could use this to help replace values in a connection string if a server name or IP has changed.
+
+:::div{.hint}
+**Limitations:**
+Please note the limitations with this example:
+
+- It's not possible to use the REST API to search through sensitive variable values.
+
+:::
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to search
+- Name of the variable value to search for
+- Optional path to export the results to a csv file
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/variables/find-variable-vaule-usage.md b/src/pages/docs/api/examples/variables/find-variable-vaule-usage.md
new file mode 100644
index 0000000000..f46dbbccea
--- /dev/null
+++ b/src/pages/docs/api/examples/variables/find-variable-vaule-usage.md
@@ -0,0 +1,9 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/variables/find-variable-value-usage
+pubDate: 2023-01-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/api/examples/variables/find-variableset-variables-usage.mdx b/src/pages/docs/api/examples/variables/find-variableset-variables-usage.mdx
new file mode 100644
index 0000000000..830dbbcebe
--- /dev/null
+++ b/src/pages/docs/api/examples/variables/find-variableset-variables-usage.mdx
@@ -0,0 +1,35 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Find variable set variables usage
+description: An example script that loads variables from a variable set and finds usages in project variables, and optionally deployment processes and runbooks.
+---
+import FindVariableSetUsageScripts from 'src/shared-content/scripts/find-variableset-variables-usage-scripts.include.md';
+
+This script demonstrates how to programmatically find usages of variables from a variable set. It searches in all projects for a reference to each variable, and optionally deployment processes and runbook processes.
+
+:::div{.hint}
+**Limitations:**
+Please note the limitations with this example:
+
+- It's not possible to use the REST API to search through sensitive variable values, as these values will be returned as `null`.
+- Variables that are referenced inside of any packages included as part of a deployment or runbook are not searched.
+
+:::
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to search
+- Name of the variable set to use
+- Boolean value to toggle searching in a project's deployment process
+- Boolean value to toggle searching in a project's runbook processes
+- Optional path to export the results to a csv file
+
+## Script
+
+
diff --git a/src/pages/docs/api/examples/variables/index.md b/src/pages/docs/api/examples/variables/index.md
new file mode 100644
index 0000000000..9844be37a0
--- /dev/null
+++ b/src/pages/docs/api/examples/variables/index.md
@@ -0,0 +1,19 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Variables
+description: This section includes examples of how to use the REST API to create and manage variables in Octopus.
+navOrder: 230
+hideInThisSectionHeader: true
+---
+You can use the REST API to create and manage your Octopus [variables](/docs/projects/variables). Typical tasks can include:
+
+- [Add variable set to a project](/docs/api/examples/variables/add-library-set-to-project)
+- [Add or update project variable](/docs/api/examples/variables/add-update-project-variable)
+- [Clear sensitive variables](/docs/api/examples/variables/clear-sensitive-variables)
+- [Find projects using variable set](/docs/api/examples/variables/find-projects-using-library-set)
+- [Find variable usage](/docs/api/examples/variables/find-variable-usage)
+- [Find variable value usage](/docs/api/examples/variables/find-variable-value-usage)
+- [Find variable set variables usage](/docs/api/examples/variables/find-variableset-variables-usage)
+- [Update variable set variable value](/docs/api/examples/variables/update-variable-set-variable-value)
diff --git a/src/pages/docs/api/examples/variables/update-variable-set-variable-value.mdx b/src/pages/docs/api/examples/variables/update-variable-set-variable-value.mdx
new file mode 100644
index 0000000000..fdad1a1601
--- /dev/null
+++ b/src/pages/docs/api/examples/variables/update-variable-set-variable-value.mdx
@@ -0,0 +1,27 @@
+---
+layout: src/layouts/Default.astro
+pubDate: 2023-01-01
+modDate: 2023-01-01
+title: Update variable set variable value
+description: An example script that loads variables from a variable set, looks for a match and replaces the variable value.
+---
+import UpdateVariableSetVariableValueScripts from 'src/shared-content/scripts/update-variable-set-variable-value-scripts.include.md';
+
+This script demonstrates how to programmatically update a matching variable value stored in a variable set.
+
+Note: This script does not alter the variable scopes, only the value.
+
+## Usage
+
+Provide values for the following:
+
+- Octopus URL
+- Octopus API Key
+- Name of the space to search
+- Name of the variable set to use
+- Variable name to search for
+- New variable value to replace existing value
+
+## Script
+
+
diff --git a/src/pages/docs/octopus-rest-api/octopus.client/getting-started.mdx b/src/pages/docs/api/octopus.client/getting-started.mdx
similarity index 100%
rename from src/pages/docs/octopus-rest-api/octopus.client/getting-started.mdx
rename to src/pages/docs/api/octopus.client/getting-started.mdx
diff --git a/src/pages/docs/octopus-rest-api/octopus.client/index.md b/src/pages/docs/api/octopus.client/index.md
similarity index 89%
rename from src/pages/docs/octopus-rest-api/octopus.client/index.md
rename to src/pages/docs/api/octopus.client/index.md
index a2899e7049..ff333a7ddd 100644
--- a/src/pages/docs/octopus-rest-api/octopus.client/index.md
+++ b/src/pages/docs/api/octopus.client/index.md
@@ -19,4 +19,4 @@ Details for where to find the API and how to authenticate can be found in our [R
## Octopus.Client Examples
-We have many examples showing how to use Octopus.Client in both our [API examples](/docs/octopus-rest-api/examples) and the [OctopusDeploy-API GitHub repository](https://github.com/OctopusDeploy/OctopusDeploy-Api/tree/master/Octopus.Client).
+We have many examples showing how to use Octopus.Client in both our [API examples](/docs/api/examples) and the [OctopusDeploy-API GitHub repository](https://github.com/OctopusDeploy/OctopusDeploy-Api/tree/master/Octopus.Client).
diff --git a/src/pages/docs/octopus-rest-api/octopus.client/using-client-directly.md b/src/pages/docs/api/octopus.client/using-client-directly.md
similarity index 91%
rename from src/pages/docs/octopus-rest-api/octopus.client/using-client-directly.md
rename to src/pages/docs/api/octopus.client/using-client-directly.md
index 5771422cc5..004ee9a987 100644
--- a/src/pages/docs/octopus-rest-api/octopus.client/using-client-directly.md
+++ b/src/pages/docs/api/octopus.client/using-client-directly.md
@@ -7,7 +7,7 @@ description: How to use the IOctopusClient type in the Octopus.Client library.
navOrder: 30
---
-For some operations not available through [repositories](/docs/octopus-rest-api/octopus.client/using-resources), it will be necessary to use the `IOctopusClient` type:
+For some operations not available through [repositories](/docs/api/octopus.client/using-resources), it will be necessary to use the `IOctopusClient` type:
PowerShell
diff --git a/src/pages/docs/octopus-rest-api/octopus.client/using-client-in-octopus.mdx b/src/pages/docs/api/octopus.client/using-client-in-octopus.mdx
similarity index 100%
rename from src/pages/docs/octopus-rest-api/octopus.client/using-client-in-octopus.mdx
rename to src/pages/docs/api/octopus.client/using-client-in-octopus.mdx
diff --git a/src/pages/docs/octopus-rest-api/octopus.client/using-resources.md b/src/pages/docs/api/octopus.client/using-resources.md
similarity index 100%
rename from src/pages/docs/octopus-rest-api/octopus.client/using-resources.md
rename to src/pages/docs/api/octopus.client/using-resources.md
diff --git a/src/pages/docs/octopus-rest-api/octopus.client/working-with-spaces.md b/src/pages/docs/api/octopus.client/working-with-spaces.md
similarity index 100%
rename from src/pages/docs/octopus-rest-api/octopus.client/working-with-spaces.md
rename to src/pages/docs/api/octopus.client/working-with-spaces.md
diff --git a/src/pages/docs/argo-cd/instances/automated-installation.md b/src/pages/docs/argo-cd/instances/automated-installation.md
index faba3aed43..5ffe0353a3 100644
--- a/src/pages/docs/argo-cd/instances/automated-installation.md
+++ b/src/pages/docs/argo-cd/instances/automated-installation.md
@@ -177,7 +177,7 @@ The application YAML required to install the helm chart is as follows (replacing
```
3. Generate Octopus Deploy Api-Key
- 3.1. Follow the instructions on the [How to Create an API Key](/docs/octopus-rest-api/how-to-create-an-api-key) guide
+ 3.1. Follow the instructions on the [How to Create an API Key](/docs/api/authentication/create-an-api-key) guide
3.2. Save the token in a secret
```shell
diff --git a/src/pages/docs/best-practices/octopus-administration/users-roles-and-teams.md b/src/pages/docs/best-practices/octopus-administration/users-roles-and-teams.md
index bb08245eed..d53231dd88 100644
--- a/src/pages/docs/best-practices/octopus-administration/users-roles-and-teams.md
+++ b/src/pages/docs/best-practices/octopus-administration/users-roles-and-teams.md
@@ -32,7 +32,7 @@ We also recommend creating a unique service account per integration. For exampl
## API keys
-[API Keys](/docs/octopus-rest-api/how-to-create-an-api-key/) allow you, or the service account, to access the [Octopus Deploy REST API](/docs/octopus-rest-api). API keys for users should be kept to a minimum, if a key was ever shared, then anyone can impersonate that user. Only use API keys for service accounts for any external integrations.
+[API Keys](/docs/api/authentication/create-an-api-key/) allow you, or the service account, to access the [Octopus Deploy REST API](/docs/octopus-rest-api). API keys for users should be kept to a minimum, if a key was ever shared, then anyone can impersonate that user. Only use API keys for service accounts for any external integrations.
**Octopus Deploy 2020.6** introduced the concept of expiring API keys. Our recommendation is to set up a periodic rotation of API keys following your companies policy on key expiration.
diff --git a/src/pages/docs/best-practices/platform-engineering/managing-project-resources.md b/src/pages/docs/best-practices/platform-engineering/managing-project-resources.md
index 8e5ec6a960..aa593a75f2 100644
--- a/src/pages/docs/best-practices/platform-engineering/managing-project-resources.md
+++ b/src/pages/docs/best-practices/platform-engineering/managing-project-resources.md
@@ -159,7 +159,7 @@ The steps documented below are best run on the `Hosted Ubuntu` worker pools for
1. Tick the `Ignore All Changes` option to instruct Terraform to ignore any changes made to a project through the UI using the [lifecycle meta-argument](https://developer.hashicorp.com/terraform/language/meta-arguments/lifecycle). This option is most useful when [RBAC controls](/docs/getting-started/best-practices/users-roles-and-teams) allow customers to edit the variables of a project managed by Terraform but not edit the project steps or other settings. This allows platform teams to treat entire projects much like [step templates](/docs/projects/custom-step-templates), where end users can edit parameters but not touch the configuration of the steps, but in this case the project variables can be edited but the project steps can not.
2. Set the `Terraform Backend` field to the [backend](https://developer.hashicorp.com/terraform/language/settings/backends/configuration) configured in the exported module. The step defaults to `s3`, which uses an S3 bucket to store Terraform state. However, any backend provider can be defined here.
3. Set the `Octopus Server URL` field to the URL of the Octopus server to export a space from. The default value of `#{Octopus.Web.ServerUri}` references the URL of the current Octopus instance.
- 4. Set the `Octopus API Key` field to the [API key](/docs/octopus-rest-api/how-to-create-an-api-key) used to access the instance defined in the `Octopus Server URL` field.
+ 4. Set the `Octopus API Key` field to the [API key](/docs/api/authentication/create-an-api-key) used to access the instance defined in the `Octopus Server URL` field.
5. Set the `Octopus Space ID` field to the ID of the space to be exported. The default value of `#{Octopus.Space.Id}` references the current space.
6. Set the `Octopus Project Name` field to the name of the project to serialize. The default value of `#{Octopus.Project.Name}` assumes the runbook has been defined in the same project that is being exported.
7. Set the `Octopus Upload Space ID` field to the ID of another space to upload the resulting Terraform module zip file to the built-in feed of that space. Leave this field blank to upload the zip file to the built-in feed of the current space.
@@ -187,7 +187,7 @@ The following steps create a project in an existing space with the Terraform mod
2. Set the `Terraform Workspace` field to a [workspace](https://developer.hashicorp.com/terraform/language/state/workspaces) that maintains the state of Octopus resources created by Terraform. The default value of `#{OctoterraApply.Octopus.SpaceID}` uses a workspace based on the ID of the space that is being populated. Leave the default value unless you have a specific reason to change it.
3. Select the package created by the export process in the previous section in the `Terraform Module Package` field. The package name is the same as the exported project name, with all non-alphanumeric characters replaced with an underscore.
4. Set the `Octopus Server URL` field to the URL of the Octopus server to create the new project in. The default value of `#{Octopus.Web.ServerUri}` references the URL of the current Octopus instance.
- 5. Set the `Octopus API Key` field to the [API key](/docs/octopus-rest-api/how-to-create-an-api-key) used when accessing the instance defined in the `Octopus Server URL` field.
+ 5. Set the `Octopus API Key` field to the [API key](/docs/api/authentication/create-an-api-key) used when accessing the instance defined in the `Octopus Server URL` field.
6. Set the `Octopus Space ID` field to the ID of an existing space where the project will be created.
7. Set the `Terraform Additional Apply Params` field to a list of additional arguments to pass to the `terraform apply` command. This field is typically used to define the value of secrets such as secret variables e.g. `-var=eks_octopub_frontend_my_secret_1=TheSecretValue`. It is also useful to override the Git repository for a CaC enabled project, as [projects can not share Git repositories](/docs/projects/version-control/config-as-code-reference) e.g. `-var=project_frontend_webapp_git_url=http://github.com/username/project`.
8. Set the `Terraform Additional Init Params` field to a list of additional arguments to pass to the `terraform init` command. Leave this field blank unless you have a specific reason to pass an argument to Terraform.
diff --git a/src/pages/docs/best-practices/platform-engineering/managing-runbook-resources.md b/src/pages/docs/best-practices/platform-engineering/managing-runbook-resources.md
index ee7fb4ec22..7a6b340028 100644
--- a/src/pages/docs/best-practices/platform-engineering/managing-runbook-resources.md
+++ b/src/pages/docs/best-practices/platform-engineering/managing-runbook-resources.md
@@ -47,7 +47,7 @@ The steps documented below are best run on the `Hosted Ubuntu` worker pools for
1. Tick the `Ignore All Changes` option to instruct Terraform to ignore any changes made to a project through the UI using the [lifecycle meta-argument](https://developer.hashicorp.com/terraform/language/meta-arguments/lifecycle). Enabling this option allows the runbook to be edited via the UI once it is deployed and Terraform will not overwrite those changes when reapplying the module. Leave the option disabled to have Terraform overwrite any changes to the downstream runbook when the module is reapplied.
2. Set the `Terraform Backend` field to the [backend](https://developer.hashicorp.com/terraform/language/settings/backends/configuration) configured in the exported module. The step defaults to `s3`, which uses an S3 bucket to store Terraform state. However, any backend provider can be defined here.
3. Set the `Octopus Server URL` field to the URL of the Octopus server to export a space from. The default value of `#{Octopus.Web.ServerUri}` references the URL of the current Octopus instance.
- 4. Set the `Octopus API Key` field to the [API key](/docs/octopus-rest-api/how-to-create-an-api-key) used to access the instance defined in the `Octopus Server URL` field.
+ 4. Set the `Octopus API Key` field to the [API key](/docs/api/authentication/create-an-api-key) used to access the instance defined in the `Octopus Server URL` field.
5. Set the `Octopus Space ID` field to the ID of the space to be exported. The default value of `#{Octopus.Space.Id}` references the current space.
6. Set the `Octopus Project Name` field to the name of the project that contains the runbook to be exported. The default value of `#{Octopus.Project.Name}` references the current project.
7. Set the `Octopus Runbook Name` field to the name of the runbook to serialize.
@@ -81,7 +81,7 @@ The following steps create a runbook in an existing project with the Terraform m
2. Set the `Terraform Workspace` field to a [workspace](https://developer.hashicorp.com/terraform/language/state/workspaces) that maintains the state of Octopus resources created by Terraform. The default value of `#{OctoterraApply.Octopus.SpaceID}_#{OctoterraApply.Octopus.Project | Replace "[^A-Za-z0-9]" "_"}` uses a workspace based on the ID of the space and the name of the project that is being populated. Leave the default value unless you have a specific reason to change it.
3. Select the package created by the export process in the previous section in the `Terraform Module Package` field. The package name is the same as the exported runbook name, with all non-alphanumeric characters replaced with an underscore.
4. Set the `Octopus Server URL` field to the URL of the Octopus server to create the new project in. The default value of `#{Octopus.Web.ServerUri}` references the URL of the current Octopus instance.
- 5. Set the `Octopus API Key` field to the [API key](/docs/octopus-rest-api/how-to-create-an-api-key) used when accessing the instance defined in the `Octopus Server URL` field.
+ 5. Set the `Octopus API Key` field to the [API key](/docs/api/authentication/create-an-api-key) used when accessing the instance defined in the `Octopus Server URL` field.
6. Set the `Octopus Space ID` field to the ID of an existing space where the project will be created.
7. Set the `Octopus Project Name` field to the name of the project to deploy the runbook into.
8. Set the `Terraform Additional Apply Params` field to a list of additional arguments to pass to the `terraform apply` command. This field is typically used to override the name of the runbook e.g. `"-var=runbook_eks_octopub_audits____describe_pods_name=The New Runbook Name"`. Leave this field blank if you do not wish to customize the deployed runbook.
diff --git a/src/pages/docs/best-practices/platform-engineering/managing-space-resources.md b/src/pages/docs/best-practices/platform-engineering/managing-space-resources.md
index f72e83b2e5..10a9801676 100644
--- a/src/pages/docs/best-practices/platform-engineering/managing-space-resources.md
+++ b/src/pages/docs/best-practices/platform-engineering/managing-space-resources.md
@@ -58,7 +58,7 @@ The following process serializes a space to a Terraform module:
2. Add the `Octopus - Serialize Space to Terraform` step from the [community step template library](/docs/projects/community-step-templates).
1. Set the `Terraform Backend` field to the [backend](https://developer.hashicorp.com/terraform/language/settings/backends/configuration) configured in the exported module. The step defaults to `s3`, which uses an S3 bucket to store Terraform state. However, any backend provider can be defined here.
2. Set the `Octopus Server URL` field to the URL of the Octopus server to export a space from. The default value of `#{Octopus.Web.ServerUri}` references the URL of the current Octopus instance.
- 3. Set the `Octopus API Key` field to the [API key](/docs/octopus-rest-api/how-to-create-an-api-key) used when accessing the instance defined in the `Octopus Server URL` field.
+ 3. Set the `Octopus API Key` field to the [API key](/docs/api/authentication/create-an-api-key) used when accessing the instance defined in the `Octopus Server URL` field.
4. Set the `Octopus Space ID` field to the ID of the space to be exported. The default value of `#{Octopus.Space.Id}` references the current space.
5. Set the `Octopus Upload Space ID` field to the ID of another space to upload the resulting Terraform module zip file to the built-in feed of that space. Leave this field blank to upload the zip file to the built-in feed of the current space.
6. Set the `Ignored Variables Sets` field to a comma separated list of variable sets to exclude from the Terraform module. Typically, this field is used when the values of the previous fields were sourced from a variable set that should not be exported.
@@ -94,7 +94,7 @@ The following process creates and populates a space with the Terraform module ex
4. Set the `Terraform Workspace` field to a [workspace](https://developer.hashicorp.com/terraform/language/state/workspaces) that tracks the new space. The default value of `#{OctoterraApply.Octopus.Space.NewName | Replace "[^A-Za-z0-9]" "_"}` creates a workspace name based on the space name with all non-alphanumeric characters replaced with an underscore. Leave the default value unless you have a specific reason to change it.
5. Select the package created by the export process in the previous section in the `Terraform Module Package` field. The package name is the same as the exported space name, with all non-alphanumeric characters replaced with an underscore.
6. Set the `Octopus Server URL` field to the URL of the Octopus server to create the new space in. The default value of `#{Octopus.Web.ServerUri}` references the URL of the current Octopus instance.
- 7. Set the `Octopus API Key` field to the [API key](/docs/octopus-rest-api/how-to-create-an-api-key) used when accessing the instance defined in the `Octopus Server URL` field.
+ 7. Set the `Octopus API Key` field to the [API key](/docs/api/authentication/create-an-api-key) used when accessing the instance defined in the `Octopus Server URL` field.
8. Set the `Terraform Additional Apply Params` field to a list of additional arguments to pass to the `terraform apply` command. This field is typically used to define the value of any Terraform variables. However, there are no variables that need to be defined when creating a space, so leave this field blank unless you have a specific reason to pass an argument to Terraform.
9. Set the `Terraform Additional Init Params` field to a list of additional arguments to pass to the `terraform init` command. Leave this field blank unless you have a specific reason to pass an argument to Terraform.
10. Each `Octopus - Create Octoterra Space` step exposes values relating to their specific Terraform backend that must be configured. For example, the `Octopus - Create Octoterra Space (S3 Backend)` step exposes fields to configure the S3 bucket, key, and region where the Terraform state is saved. Other steps have similar fields.
@@ -103,7 +103,7 @@ The following process creates and populates a space with the Terraform module ex
2. Set the `Terraform Workspace` field to a [workspace](https://developer.hashicorp.com/terraform/language/state/workspaces) that tracks the new space. The default value of `#{OctoterraApply.Octopus.SpaceID}` creates a workspace name based on the ID of the space that is being populated. Leave the default value unless you have a specific reason to change it.
3. Select the package created by the export process in the previous section in the `Terraform Module Package` field. The package name is the same as the exported space name, with all non-alphanumeric characters replaced with an underscore.
4. Set the `Octopus Server URL` field to the URL of the Octopus server to create the new space in. The default value of `#{Octopus.Web.ServerUri}` references the URL of the current Octopus instance.
- 5. Set the `Octopus API Key` field to the [API key](/docs/octopus-rest-api/how-to-create-an-api-key) used when accessing the instance defined in the `Octopus Server URL` field.
+ 5. Set the `Octopus API Key` field to the [API key](/docs/api/authentication/create-an-api-key) used when accessing the instance defined in the `Octopus Server URL` field.
6. Set the `Octopus Space ID` field to the ID of the space created by the previous step. The ID is an output variable that can be access with an [octostache template](/docs/projects/variables/variable-substitutions) like `#{Octopus.Action[Octopus - Create Octoterra Space (S3 Backend)].Output.TerraformValueOutputs[octopus_space_id]}`. Note that the name of the previous step may need to be changed from `Octopus - Create Octoterra Space (S3 Backend)` if your step has a different name.
7. Set the `Terraform Additional Apply Params` field to a list of additional arguments to pass to the `terraform apply` command. This field is typically used to define the value of secrets such as account or feed passwords e.g. `-var=account_aws_account=TheAwsSecretKey`.
8. Set the `Terraform Additional Init Params` field to a list of additional arguments to pass to the `terraform init` command. Leave this field blank unless you have a specific reason to pass an argument to Terraform.
diff --git a/src/pages/docs/deployments/databases/sql-server/redgate.md b/src/pages/docs/deployments/databases/sql-server/redgate.md
index e4234d76ed..7da1296c43 100644
--- a/src/pages/docs/deployments/databases/sql-server/redgate.md
+++ b/src/pages/docs/deployments/databases/sql-server/redgate.md
@@ -91,7 +91,7 @@ The Octopus Server will attempt to connect to the Tentacle. The listening Tenta
The process to register Polling Tentacles as workers takes place in the **Tentacle Manager** on the server hosting the Tentacle. Select the polling Tentacle to get started with the wizard.
-On the credentials screen enter a username and password or the [API key](/docs/octopus-rest-api/how-to-create-an-api-key) of a user who has permissions to add worker pools. This account will only be used for registration.
+On the credentials screen enter a username and password or the [API key](/docs/api/authentication/create-an-api-key) of a user who has permissions to add worker pools. This account will only be used for registration.
:::div{.info}
The registration process will connect to the RESTful API of the Octopus Server. It will connect over port 80 or 443 using the http/https protocol. After registration the default port the Tentacle will connect to is port 10943.
diff --git a/src/pages/docs/deployments/node-js/node-on-linux.md b/src/pages/docs/deployments/node-js/node-on-linux.md
index 0c1848b845..9e91395411 100644
--- a/src/pages/docs/deployments/node-js/node-on-linux.md
+++ b/src/pages/docs/deployments/node-js/node-on-linux.md
@@ -133,7 +133,7 @@ npm install
npm install --save-dev gulp-bump @octopusdeploy/gulp-octo
```
-Modify the **gulpfile.js** file to add the following gulp tasks. Substitute the correct **host** address for your Octopus Server and an **apiKey**. See [how to create an API Key](/docs/octopus-rest-api/how-to-create-an-api-key).
+Modify the **gulpfile.js** file to add the following gulp tasks. Substitute the correct **host** address for your Octopus Server and an **apiKey**. See [how to create an API Key](/docs/api/authentication/create-an-api-key).
```js
var bump = require('gulp-bump');
@@ -181,7 +181,7 @@ npm install
npm install --save-dev grunt-bump grunt-contrib-clean @octopusdeploy/grunt-octo
```
-Modify the **gruntfile.js** file to add the following grunt tasks. Substitute the correct **host** address for your Octopus Server and an **apiKey**. See [how to create an API Key](/docs/octopus-rest-api/how-to-create-an-api-key).
+Modify the **gruntfile.js** file to add the following grunt tasks. Substitute the correct **host** address for your Octopus Server and an **apiKey**. See [how to create an API Key](/docs/api/authentication/create-an-api-key).
```js
grunt.initConfig({
diff --git a/src/pages/docs/deployments/patterns/elastic-and-transient-environments/keeping-deployment-targets-up-to-date.md b/src/pages/docs/deployments/patterns/elastic-and-transient-environments/keeping-deployment-targets-up-to-date.md
index 06ed4e50cd..ef8c6d87f2 100644
--- a/src/pages/docs/deployments/patterns/elastic-and-transient-environments/keeping-deployment-targets-up-to-date.md
+++ b/src/pages/docs/deployments/patterns/elastic-and-transient-environments/keeping-deployment-targets-up-to-date.md
@@ -60,7 +60,7 @@ To test the trigger, we will disable a deployment target, deploy to that target'
## Overriding the release used for automatic deployments {#override-release-for-automatic-deployments}
-Automatic deployments attempts to calculate the release to use for a project and environment (using the *current* and *successful* release that has been deployed, as shown in your Project Overview dashboard). In some cases the calculated release may not be the release that should be automatically deployed, or Octopus may not be able to find a deployment for an environment (maybe you have a release, but have not yet deployed it anywhere). It is possible to explicitly set the release that should be automatically deployed by overriding the automatic-deployment-release. Overrides can be configured using the [Octopus CLI](/docs/cli/octopus-cli/) or through [Octopus.Client](/docs/octopus-rest-api/octopus.client). Overrides define a release for a project when deploying to an environment (this can, for example, be useful for cloud-testing-automation when standing up new cloud infrastructure). For multi-tenanted deployments, overrides may be configured for each environment/tenant combination.
+Automatic deployments attempts to calculate the release to use for a project and environment (using the *current* and *successful* release that has been deployed, as shown in your Project Overview dashboard). In some cases the calculated release may not be the release that should be automatically deployed, or Octopus may not be able to find a deployment for an environment (maybe you have a release, but have not yet deployed it anywhere). It is possible to explicitly set the release that should be automatically deployed by overriding the automatic-deployment-release. Overrides can be configured using the [Octopus CLI](/docs/cli/octopus-cli/) or through [Octopus.Client](/docs/api/octopus.client). Overrides define a release for a project when deploying to an environment (this can, for example, be useful for cloud-testing-automation when standing up new cloud infrastructure). For multi-tenanted deployments, overrides may be configured for each environment/tenant combination.
**Octopus.Client**
diff --git a/src/pages/docs/getting-started/reference-architectures/eks-reference-architecture.md b/src/pages/docs/getting-started/reference-architectures/eks-reference-architecture.md
index 4a58a6e8b2..46b377b1e2 100644
--- a/src/pages/docs/getting-started/reference-architectures/eks-reference-architecture.md
+++ b/src/pages/docs/getting-started/reference-architectures/eks-reference-architecture.md
@@ -24,7 +24,7 @@ The step exposes a number of options, typically requesting credentials to the va
- `AWS Access Key` and `AWS Secret Key` require the [access keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html) of the user that will create the EKS cluster.
- `Docker Hub Username` and `Docker Hub Password` require the credentials of a [Docker Hub user](https://docs.docker.com/docker-id/) that is used to access sample Docker images from public DockerHub repositories. These credentials are also used by a sample GitHub Actions workflow that publishes Docker images.
- `GitHub Access Token` requires the [GitHub access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) of a user that is used to create a new GitHub repository holding a sample application.
-- `Octopus API Key` requires an [API key](https://octopus.com/docs/octopus-rest-api/how-to-create-an-api-key) to the Octopus instance where the reference architecture projects and supporting resources are created.
+- `Octopus API Key` requires an [API key](https://octopus.com/docs/api/authentication/create-an-api-key) to the Octopus instance where the reference architecture projects and supporting resources are created.
- `Octopus Space ID` requires the space ID where the reference architecture projects and supporting resources are created. Leave the default value to populate the same space as the runbook.
- `Octopus Server URL` requires the URL of the Octopus instance where the reference architecture projects and supporting resources are created. Leave the default value to populate the same instance as the runbook.
- `Optional Terraform Apply Args` allows custom arguments to be passed to the `terraform apply` command. The Terraform module applied by this step exposes a number of optional variables that can be defined as apply arguments. These arguments can be defined by setting this field to a value like `-var=project_template_project_name=renamed -var=infrastructure_project_name=renamed2 -var=frontend_project_name=renamed3 -var=products_project_name=renamed4 -var=audits_project_name=renamed5`:
diff --git a/src/pages/docs/getting-started/reference-architectures/webapp-reference-architecture.md b/src/pages/docs/getting-started/reference-architectures/webapp-reference-architecture.md
index 596bd26e1d..17401fcaad 100644
--- a/src/pages/docs/getting-started/reference-architectures/webapp-reference-architecture.md
+++ b/src/pages/docs/getting-started/reference-architectures/webapp-reference-architecture.md
@@ -21,7 +21,7 @@ The step exposes a number of options, typically requesting credentials to the va
- `Azure account application ID`, `Azure account subscription ID`, `Azure account tenant ID`, and `Azure account password` require the details associated with a [service principal](https://learn.microsoft.com/en-us/purview/create-service-principal-azure) used to access the Azure platform.
- `Docker Hub Username` and `Docker Hub Password` require the credentials of a [Docker Hub user](https://docs.docker.com/docker-id/) that is used to access sample Docker images from public DockerHub repositories. These credentials are also used by a sample GitHub Actions workflow that publishes Docker images.
- `GitHub Access Token` requires the [GitHub access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) of a user that is used to create a new GitHub repository holding a sample application.
-- `Octopus API Key` requires an [API key](https://octopus.com/docs/octopus-rest-api/how-to-create-an-api-key) to the Octopus instance where the reference architecture projects and supporting resources are created.
+- `Octopus API Key` requires an [API key](https://octopus.com/docs/api/authentication/create-an-api-key) to the Octopus instance where the reference architecture projects and supporting resources are created.
- `Octopus Space ID` requires the space ID where the reference architecture projects and supporting resources are created. Leave the default value to populate the same space as the runbook.
- `Octopus Server URL` requires the URL of the Octopus instance where the reference architecture projects and supporting resources are created. Leave the default value to populate the same instance as the runbook.
- `Optional Terraform Apply Args` allows custom arguments to be passed to the `terraform apply` command. The Terraform module applied by this step exposes a number of optional variables that can be defined as apply arguments. These arguments can be defined by setting this field to a value like `-var=project_template_project_name=renamed -var=infrastructure_project_name=renamed2 -var=frontend_project_name=renamed3 -var=products_project_name=renamed4 -var=audits_project_name=renamed5`:
diff --git a/src/pages/docs/how-to/how-to-create-an-api-key/index.md b/src/pages/docs/how-to/how-to-create-an-api-key/index.md
index 225c980a29..ac03e5207e 100644
--- a/src/pages/docs/how-to/how-to-create-an-api-key/index.md
+++ b/src/pages/docs/how-to/how-to-create-an-api-key/index.md
@@ -1,7 +1,7 @@
---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/how-to-create-an-api-key
+redirect: https://octopus.com/docs/api/authentication/create-an-api-key
pubDate: 2023-01-01
navSearch: false
navSitemap: false
diff --git a/src/pages/docs/how-to/sensitive-properties-api-changes-in-release-3.3/index.md b/src/pages/docs/how-to/sensitive-properties-api-changes-in-release-3.3/index.md
index e165e097c1..c053b4ce77 100644
--- a/src/pages/docs/how-to/sensitive-properties-api-changes-in-release-3.3/index.md
+++ b/src/pages/docs/how-to/sensitive-properties-api-changes-in-release-3.3/index.md
@@ -1,7 +1,7 @@
---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples
+redirect: https://octopus.com/docs/api/examples
pubDate: 2023-01-01
navSearch: false
navSitemap: false
diff --git a/src/pages/docs/infrastructure/accounts/azure/index.md b/src/pages/docs/infrastructure/accounts/azure/index.md
index 2b3a715c6a..907a7631c1 100644
--- a/src/pages/docs/infrastructure/accounts/azure/index.md
+++ b/src/pages/docs/infrastructure/accounts/azure/index.md
@@ -709,7 +709,7 @@ if ($answer.ToLower() -ne "y")
Import-AzurePowerShellModules
$OctopusURL = Get-ParameterValue -originalParameterValue $OctopusURL -parameterName "the URL of your Octopus Deploy Instance, example: https://samples.octopus.com"
-$OctopusApiKey = Get-ParameterValue -originalParameterValue $OctopusApiKey -parameterName "the API Key of your Octopus Deploy User. See https://octopus.com/docs/octopus-rest-api/how-to-create-an-api-key for a guide on how to create one"
+$OctopusApiKey = Get-ParameterValue -originalParameterValue $OctopusApiKey -parameterName "the API Key of your Octopus Deploy User. See https://octopus.com/docs/api/authentication/create-an-api-key for a guide on how to create one"
$OctopusSpaceName = Get-ParameterValueWithDefault -originalParameterValue $OctopusSpaceName -parameterName "the name of the space in Octopus Deploy. If left empty it will default to 'Default'" -defaultValue "Default"
$OctopusAccountName = Get-ParameterValueWithDefault -originalParameterValue $OctopusAccountName -parameterName "the name of the account you wish to create in Octopus Deploy. If left empty it will default to 'Bootstrap Azure Account'" -defaultValue "Bootstrap Azure Account"
diff --git a/src/pages/docs/infrastructure/deployment-targets/dynamic-infrastructure/index.mdx b/src/pages/docs/infrastructure/deployment-targets/dynamic-infrastructure/index.mdx
index 6b488e45b9..e460ecbdf4 100644
--- a/src/pages/docs/infrastructure/deployment-targets/dynamic-infrastructure/index.mdx
+++ b/src/pages/docs/infrastructure/deployment-targets/dynamic-infrastructure/index.mdx
@@ -29,13 +29,13 @@ Dynamic infrastructure can be enabled when a new environment is created, or it c
Octopus comes with a REST API that can be used to register Octopus accounts and deployment targets dynamically:
-- [Create an AWS Account](/docs/octopus-rest-api/examples/accounts/create-aws-account)
-- [Create an Azure Service Principal Account](/docs/octopus-rest-api/examples/accounts/create-azure-service-principal)
-- [Add an Azure Web App target](/docs/octopus-rest-api/examples/deployment-targets/add-azure-web-app)
-- [Register a listening Tentacle](/docs/octopus-rest-api/examples/deployment-targets/register-listening-tentacle)
-- [Register a Polling Tentacle](/docs/octopus-rest-api/examples/deployment-targets/register-polling-tentacle)
+- [Create an AWS Account](/docs/api/examples/accounts/create-aws-account)
+- [Create an Azure Service Principal Account](/docs/api/examples/accounts/create-azure-service-principal)
+- [Add an Azure Web App target](/docs/api/examples/deployment-targets/add-azure-web-app)
+- [Register a listening Tentacle](/docs/api/examples/deployment-targets/register-listening-tentacle)
+- [Register a Polling Tentacle](/docs/api/examples/deployment-targets/register-polling-tentacle)
-To learn more about the things you can do with the API, take a look at our [API examples](/docs/octopus-rest-api/examples) section.
+To learn more about the things you can do with the API, take a look at our [API examples](/docs/api/examples) section.
## Using PowerShell functions
diff --git a/src/pages/docs/infrastructure/deployment-targets/tentacle/windows/automating-tentacle-installation.mdx b/src/pages/docs/infrastructure/deployment-targets/tentacle/windows/automating-tentacle-installation.mdx
index 07779b3cb2..24bfe10a1e 100644
--- a/src/pages/docs/infrastructure/deployment-targets/tentacle/windows/automating-tentacle-installation.mdx
+++ b/src/pages/docs/infrastructure/deployment-targets/tentacle/windows/automating-tentacle-installation.mdx
@@ -105,7 +105,7 @@ $repository.machines.create($tentacle)
```
:::div{.hint}
-Want to register your Tentacles another way? Take a look at our [examples](/docs/octopus-rest-api/examples/deployment-targets/) for ways to register Tentacles using the [Octopus REST API](/docs/octopus-rest-api).
+Want to register your Tentacles another way? Take a look at our [examples](/docs/api/examples/deployment-targets/) for ways to register Tentacles using the [Octopus REST API](/docs/octopus-rest-api).
:::
## Example: Polling Tentacle \{#AutomatingTentacleinstallation-Example-PollingTentacle}
@@ -129,7 +129,7 @@ Tentacle.exe service --instance "Tentacle" --install --start --console
**Tips:**
- If you are running this from a PowerShell remote session, make sure to add `--console` at the end of each command to force Tentacle.exe not to run as a service.
-- Want to register your Tentacles another way? Take a look at our [examples](/docs/octopus-rest-api/examples/deployment-targets/) for ways to register Tentacles using the [Octopus REST API](/docs/octopus-rest-api).
+- Want to register your Tentacles another way? Take a look at our [examples](/docs/api/examples/deployment-targets/) for ways to register Tentacles using the [Octopus REST API](/docs/octopus-rest-api).
:::
diff --git a/src/pages/docs/infrastructure/deployment-targets/tentacle/windows/azure-virtual-machines/via-the-azure-portal.mdx b/src/pages/docs/infrastructure/deployment-targets/tentacle/windows/azure-virtual-machines/via-the-azure-portal.mdx
index e99bb805bd..8a20e9002a 100644
--- a/src/pages/docs/infrastructure/deployment-targets/tentacle/windows/azure-virtual-machines/via-the-azure-portal.mdx
+++ b/src/pages/docs/infrastructure/deployment-targets/tentacle/windows/azure-virtual-machines/via-the-azure-portal.mdx
@@ -42,7 +42,7 @@ The settings for the extension are:
**Octopus Server URL**: URL to your Octopus Server. You'll need your own Octopus Server (possibly also running on Azure), and you should [consider using HTTPS](/docs/security/exposing-octopus/expose-the-octopus-web-portal-over-https/). The extension will use the [Octopus REST API](/docs/octopus-rest-api) against this URL to register the machine.
-**API Key**: [Your API key](/docs/octopus-rest-api/how-to-create-an-api-key/). This key will only be used when registering the machine with the Octopus Server; it isn't used for [subsequent communication](/docs/security/octopus-tentacle-communication).
+**API Key**: [Your API key](/docs/api/authentication/create-an-api-key/). This key will only be used when registering the machine with the Octopus Server; it isn't used for [subsequent communication](/docs/security/octopus-tentacle-communication).
**Environments**: The name of the [environment](/docs/infrastructure/environments) to add the machine to. You can specify more than one by using commas; for example: `UAT1,UAT2`.
diff --git a/src/pages/docs/infrastructure/workers/index.mdx b/src/pages/docs/infrastructure/workers/index.mdx
index b014195d81..3deed6b779 100644
--- a/src/pages/docs/infrastructure/workers/index.mdx
+++ b/src/pages/docs/infrastructure/workers/index.mdx
@@ -105,7 +105,7 @@ Workers have machine policies, are health checked, and run Calamari, just like d
## Registering an External Worker \{#registering-an-external-worker}
-Once the Tentacle or SSH machine has been configured, workers can be added using the [Web Portal](#registering-workers-in-the-octopus-web-portal), the [Octopus Deploy REST API](/docs/octopus-rest-api/), the [Octopus.Clients library](/docs/octopus-rest-api/octopus.client) or with the Tentacle executable. Only a user with the `ConfigureServer` permission can add or edit workers.
+Once the Tentacle or SSH machine has been configured, workers can be added using the [Web Portal](#registering-workers-in-the-octopus-web-portal), the [Octopus Deploy REST API](/docs/api/), the [Octopus.Clients library](/docs/api/octopus.client) or with the Tentacle executable. Only a user with the `ConfigureServer` permission can add or edit workers.
### Registering Workers in the Octopus Web Portal \{#registering-workers-in-the-octopus-web-portal}
@@ -173,7 +173,7 @@ The Tentacle executable can also be used to deregister workers, for example:
```
:::div{.hint}
-For information on creating an API key, see [how to create an API key](/docs/octopus-rest-api/how-to-create-an-api-key).
+For information on creating an API key, see [how to create an API key](/docs/api/authentication/create-an-api-key).
:::
## Recommendations for External Workers \{#recommendations-for-external-workers}
diff --git a/src/pages/docs/installation/index.mdx b/src/pages/docs/installation/index.mdx
index 1ab1b54756..482646e758 100644
--- a/src/pages/docs/installation/index.mdx
+++ b/src/pages/docs/installation/index.mdx
@@ -51,7 +51,7 @@ When installed, the self-hosted Octopus Server:
- As a Windows Service called **OctopusDeploy**, installed via an MSI.
- In a [Linux](/docs/installation/octopus-server-linux-container) container.
- Stores its data in an [SQL Server Database](/docs/installation/sql-server-database/). ([SQL Server Express](https://oc.to/downloadsqlserverexpress) is an easy way of getting started.)
-- Includes an embedded HTTP server which serves the [Octopus REST API](/docs/octopus-rest-api/) and the **Octopus Web Portal** that you will use to manage your [infrastructure](/docs/infrastructure/), [deployments](/docs/projects/deployment-process/), [runbooks](/docs/runbooks/), and coordinate your [releases](/docs/releases).
+- Includes an embedded HTTP server which serves the [Octopus REST API](/docs/api/) and the **Octopus Web Portal** that you will use to manage your [infrastructure](/docs/infrastructure/), [deployments](/docs/projects/deployment-process/), [runbooks](/docs/runbooks/), and coordinate your [releases](/docs/releases).
Before you install Octopus Deploy, review the software and hardware [requirements](/docs/installation/requirements/), and make sure you have access to an instance of [SQL Server Database](/docs/installation/sql-server-database) that you can use with Octopus Deploy.
diff --git a/src/pages/docs/kubernetes/live-object-status/installation.md b/src/pages/docs/kubernetes/live-object-status/installation.md
index c1f721a644..42d2968079 100644
--- a/src/pages/docs/kubernetes/live-object-status/installation.md
+++ b/src/pages/docs/kubernetes/live-object-status/installation.md
@@ -32,7 +32,7 @@ Find the following values and replace them in the Helm command below
| | Value | Example |
| :----------- | :----------------------------------------------------------------------------------------------------: | :---------------------- |
| INSTANCE_URL | The URL you access your instance with, without https:// or a trailing slash | my-instance.octopus.app |
-| API_KEY | An [API key](/docs/octopus-rest-api/how-to-create-an-api-key) for your user, created from your profile | API-MYKEY |
+| API_KEY | An [API key](/docs/api/authentication/create-an-api-key) for your user, created from your profile | API-MYKEY |
| SPACE_ID | The ID of the space your agent is installed in, find this in any Octopus url | Spaces-1 |
| AGENT_NAME | The name of the Kubernetes agent | My Agent |
| HELM_RELEASE | The name of the Helm release used to install the Kubernetes agent | myagent |
diff --git a/src/pages/docs/octopus-ai/claude-agent-step/tools.md b/src/pages/docs/octopus-ai/claude-agent-step/tools.md
index 27d07b4d5c..68cdefddda 100644
--- a/src/pages/docs/octopus-ai/claude-agent-step/tools.md
+++ b/src/pages/docs/octopus-ai/claude-agent-step/tools.md
@@ -31,7 +31,7 @@ To connect the agent to your Octopus instance:
1. Create a dedicated [agent service account](/docs/security/users-and-teams/service-accounts#agent-service-accounts). This gives the agent its own identity, keeps its activity identifiable in the audit log, and lets you revoke it on its own.
2. Grant the account the least privilege the task needs. For investigation and reporting, read-only access is usually enough, and it's what we recommend for a first run.
-3. Generate an [agent API key](/docs/octopus-rest-api/how-to-create-an-api-key#creating-an-agent-api-key) under the account.
+3. Generate an [agent API key](/docs/api/authentication/create-an-api-key#creating-an-agent-api-key) under the account.
4. Store the key as a **sensitive variable** (for example, `octopus-api-key`), so the key is kept out of the task log and execution context.
5. On the step, expand **Agent Capabilities (optional)** > **Octopus MCP Server** and set **Octopus API key** to a reference to your variable, for example `#{octopus-api-key}`.
6. In **Tools**, list which of the server's tools the agent may call, one per line without the `mcp__octopus__` prefix, or leave the default `*` to allow every tool the server offers. A blank field disallows any tool the MCP server exposes.
diff --git a/src/pages/docs/octopus-ai/index.mdx b/src/pages/docs/octopus-ai/index.mdx
index fd47bb09d2..8c18156c8e 100644
--- a/src/pages/docs/octopus-ai/index.mdx
+++ b/src/pages/docs/octopus-ai/index.mdx
@@ -37,7 +37,7 @@ The Assistant also helps monitor your Octopus Deploy instance for optimization o
The Octopus MCP (Model Context Protocol) server represents a significant leap forward in AI integration capabilities. Built on Anthropic's open standard for connecting AI agents to external data sources and tools, the MCP server will enable AI agents like Claude to interact directly with your Octopus Deploy infrastructure.
-With supporting **governance** features like [Agent API keys](/docs/octopus-rest-api/how-to-create-an-api-key#creating-an-agent-api-key) and [Agent Service Accounts](/docs/security/users-and-teams/service-accounts#agent-service-accounts), you can also keep agent actions fully auditable in clear, filterable audit logs, so you can meet your compliance requirements.
+With supporting **governance** features like [Agent API keys](/docs/api/authentication/create-an-api-key#creating-an-agent-api-key) and [Agent Service Accounts](/docs/security/users-and-teams/service-accounts#agent-service-accounts), you can also keep agent actions fully auditable in clear, filterable audit logs, so you can meet your compliance requirements.
The Octopus MCP server provides similar capabilities to the Octopus AI Assistant, but provides further benefits:
diff --git a/src/pages/docs/octopus-ai/mcp/local/index.md b/src/pages/docs/octopus-ai/mcp/local/index.md
index 0364a205c4..fc6dd9e343 100644
--- a/src/pages/docs/octopus-ai/mcp/local/index.md
+++ b/src/pages/docs/octopus-ai/mcp/local/index.md
@@ -30,7 +30,7 @@ For more information, see the [Octopus REST API](/docs/octopus-rest-api) documen
## Governance
-Use dedicated [Agent API keys](/docs/octopus-rest-api/how-to-create-an-api-key#creating-an-agent-api-key) and [Agent Service Accounts](/docs/security/users-and-teams/service-accounts#agent-service-accounts) for agents connecting to your Octopus instance. These make agent actions identifiable and filterable in the audit log.
+Use dedicated [Agent API keys](/docs/api/authentication/create-an-api-key#creating-an-agent-api-key) and [Agent Service Accounts](/docs/security/users-and-teams/service-accounts#agent-service-accounts) for agents connecting to your Octopus instance. These make agent actions identifiable and filterable in the audit log.
## Installation
@@ -38,7 +38,7 @@ Use dedicated [Agent API keys](/docs/octopus-rest-api/how-to-create-an-api-key#c
- Node.js 20 or later
- An Octopus Deploy instance that the MCP server can access over HTTPS
-- An Octopus Deploy API key. We recommend creating a dedicated [Agent Service Account](/docs/security/users-and-teams/service-accounts#agent-service-accounts) and generating an [Agent API key](/docs/octopus-rest-api/how-to-create-an-api-key#creating-an-agent-api-key) for it. This gives the MCP server its own identity, limits its permissions, and identifies its activity in the audit log and on the API Keys page.
+- An Octopus Deploy API key. We recommend creating a dedicated [Agent Service Account](/docs/security/users-and-teams/service-accounts#agent-service-accounts) and generating an [Agent API key](/docs/api/authentication/create-an-api-key#creating-an-agent-api-key) for it. This gives the MCP server its own identity, limits its permissions, and identifies its activity in the audit log and on the API Keys page.
### Configuration
diff --git a/src/pages/docs/octopus-ai/mcp/remote/index.md b/src/pages/docs/octopus-ai/mcp/remote/index.md
index 7ed9e7950a..75b695f3c9 100644
--- a/src/pages/docs/octopus-ai/mcp/remote/index.md
+++ b/src/pages/docs/octopus-ai/mcp/remote/index.md
@@ -41,7 +41,7 @@ Octopus Remote MCP initially supports a selected set of core Octopus features. W
### Requirements
- An Octopus Deploy instance that can be accessed over HTTPS
-- An Octopus Deploy API key. We recommend creating a dedicated [Agent Service Account](/docs/security/users-and-teams/service-accounts#agent-service-accounts) and generating an [Agent API key](/docs/octopus-rest-api/how-to-create-an-api-key#creating-an-agent-api-key) for it. This gives the MCP server its own identity, limits its permissions, and identifies its activity in the audit log and on the API Keys page.
+- An Octopus Deploy API key. We recommend creating a dedicated [Agent Service Account](/docs/security/users-and-teams/service-accounts#agent-service-accounts) and generating an [Agent API key](/docs/api/authentication/create-an-api-key#creating-an-agent-api-key) for it. This gives the MCP server its own identity, limits its permissions, and identifies its activity in the audit log and on the API Keys page.
Set the `OCTOPUS_API_KEY` environment variable to your Agent API key, then run:
@@ -75,7 +75,7 @@ The Octopus MCP server operates within the same security boundary as our Rest AP
## Governance
-Use dedicated [Agent API keys](/docs/octopus-rest-api/how-to-create-an-api-key#creating-an-agent-api-key) and [Agent Service Accounts](/docs/security/users-and-teams/service-accounts#agent-service-accounts) for agents connecting to your Octopus instance. These make agent actions identifiable and filterable in the audit log.
+Use dedicated [Agent API keys](/docs/api/authentication/create-an-api-key#creating-an-agent-api-key) and [Agent Service Accounts](/docs/security/users-and-teams/service-accounts#agent-service-accounts) for agents connecting to your Octopus instance. These make agent actions identifiable and filterable in the audit log.
## Configuration
diff --git a/src/pages/docs/octopus-ai/mcp/remote/use-cases.md b/src/pages/docs/octopus-ai/mcp/remote/use-cases.md
index a9e138cd22..00f65f5410 100644
--- a/src/pages/docs/octopus-ai/mcp/remote/use-cases.md
+++ b/src/pages/docs/octopus-ai/mcp/remote/use-cases.md
@@ -70,4 +70,4 @@ Example prompts:
- [Octopus Remote MCP](/docs/octopus-ai/mcp/remote)
- [Agent Service Accounts](/docs/security/users-and-teams/service-accounts#agent-service-accounts)
-- [Agent API keys](/docs/octopus-rest-api/how-to-create-an-api-key#creating-an-agent-api-key)
+- [Agent API keys](/docs/api/authentication/create-an-api-key#creating-an-agent-api-key)
diff --git a/src/pages/docs/octopus-cloud/connection-agent.md b/src/pages/docs/octopus-cloud/connection-agent.md
index f40a764783..fbdb352ea1 100644
--- a/src/pages/docs/octopus-cloud/connection-agent.md
+++ b/src/pages/docs/octopus-cloud/connection-agent.md
@@ -64,7 +64,7 @@ By default, you can register up to 5 Connection Agents per instance. [Contact ou
**IMPORTANT - Protect your Private Key:** The generated `.pem` file is your private key and must be kept secret. It lets Connection Agent authenticate and proxy requests from Octopus Cloud. If the private key is compromised, immediately [rotate your private key](#rotate-the-agents-key).
:::
-1. [Create an API key](https://octopus.com/docs/octopus-rest-api/how-to-create-an-api-key) with a short expiry date on your Octopus Cloud instance. This API key will only be used to register the Connection Agent.
+1. [Create an API key](https://octopus.com/docs/api/authentication/create-an-api-key) with a short expiry date on your Octopus Cloud instance. This API key will only be used to register the Connection Agent.
1. Register the Connection Agent with your Octopus Cloud instance. This command doesn't need to be run on the same infrastructure you intend to run the Connection Agent on.
diff --git a/src/pages/docs/octopus-cloud/disaster-recovery.md b/src/pages/docs/octopus-cloud/disaster-recovery.md
index c8cba09fd8..1cfad77c7b 100644
--- a/src/pages/docs/octopus-cloud/disaster-recovery.md
+++ b/src/pages/docs/octopus-cloud/disaster-recovery.md
@@ -66,4 +66,4 @@ In the case of an Azure region wide disaster the time to restore services will v
### Importing data
-Due to some key differences between the self-hosted and cloud configurations, it **is not possible** to use the existing [Migration API](/docs/octopus-rest-api/migration-api/) to import data. If you are migrating from an existing self-hosted instance please see [migrating from self-hosted to Octopus Cloud](/docs/octopus-cloud/migrations).
+Due to some key differences between the self-hosted and cloud configurations, it **is not possible** to use the existing [Migration API](/docs/api/migrations) to import data. If you are migrating from an existing self-hosted instance please see [migrating from self-hosted to Octopus Cloud](/docs/octopus-cloud/migrations).
diff --git a/src/pages/docs/octopus-cloud/migrations.md b/src/pages/docs/octopus-cloud/migrations.md
index 3b9939c26b..f93946807a 100644
--- a/src/pages/docs/octopus-cloud/migrations.md
+++ b/src/pages/docs/octopus-cloud/migrations.md
@@ -292,6 +292,6 @@ In our experience, most people turn off their Octopus Server in about three to s
## No longer offered or supported
-Please note that our existing [Migration API](https://octopus.com/docs/octopus-rest-api/migration-api) is **not supported** for migrations to cloud instances due to configuration differences between self-hosted and cloud installations.
+Please note that our existing [Migration API](/docs/api/migrations) is **not supported** for migrations to cloud instances due to configuration differences between self-hosted and cloud installations.
The legacy [Data Migration](https://octopus.com/docs/administration/data/data-migration) included with Octopus Deploy is **not supported** for migrations to cloud instances. That tool is a Windows command-line application that must be run directly on the server hosting Octopus Deploy via an RDP session. Octopus Cloud runs on our Linux Container image on a Kubernetes Cluster and therefore access to the Container is not permitted for security reasons.
diff --git a/src/pages/docs/octopus-rest-api/examples/accounts/create-aws-account.mdx b/src/pages/docs/octopus-rest-api/examples/accounts/create-aws-account.mdx
index 1d7115a1e6..3c79aa7d1e 100644
--- a/src/pages/docs/octopus-rest-api/examples/accounts/create-aws-account.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/accounts/create-aws-account.mdx
@@ -1,24 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/accounts/create-aws-account
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Create an AWS account
-description: An example script to create an AWS account in Octopus.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import CreateAwsAccountScripts from 'src/shared-content/scripts/create-aws-account-scripts.include.md';
-
-This script provides an example of how to programmatically create an AWS account.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Octopus Space Name
-- AWS account key
-- AWS secret key
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/accounts/create-azure-service-principal.mdx b/src/pages/docs/octopus-rest-api/examples/accounts/create-azure-service-principal.mdx
index b88b04baa2..0e1b4c1d15 100644
--- a/src/pages/docs/octopus-rest-api/examples/accounts/create-azure-service-principal.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/accounts/create-azure-service-principal.mdx
@@ -1,31 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/accounts/create-azure-service-principal
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Create an Azure service principal
-description: An example script to create an Azure service principal in Octopus.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import CreateAzureServicePrincipalScripts from 'src/shared-content/scripts/create-azure-service-principal-scripts.include.md';
-
-This script provides an example of how to programmatically create an [Azure Service Principal account](/docs/infrastructure/accounts/azure/#azure-service-principal).
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Azure Client ID
-- Azure Secret/Password
-- Azure Subscription Number
-- Azure Tenant ID
-- Octopus Account Name
-- (Optional) Octopus Account Description
-- Octopus Account Participation Type (Tenanted|Untenanted|TenantedOrUntenanted)
-- (Optional) Array of Tenant Tags
-- (Optional) Array of Tenant IDs
-- (Optional) Array of Environment IDs
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/accounts/create-gcp-account.mdx b/src/pages/docs/octopus-rest-api/examples/accounts/create-gcp-account.mdx
index 0192d6054e..b1aadaa1e1 100644
--- a/src/pages/docs/octopus-rest-api/examples/accounts/create-gcp-account.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/accounts/create-gcp-account.mdx
@@ -1,38 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/accounts/create-gcp-account
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Create a Google Cloud account
-description: An example script to create a Google Cloud (GCP) account in Octopus.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import CreateGoogleCloudAccountScript from 'src/shared-content/scripts/create-google-cloud-account-scripts.include.md';
-
-This script provides an example of how to programmatically create a Google Cloud (GCP) account.
-
-:::div{.hint}
-**Note:**
-Please note there are some items to consider before using these scripts:
-
-- Google Cloud Accounts were added in **Octopus 2021.2**. Using these script examples in earlier versions of Octopus won't work.
-- Script examples that use the [Octopus Clients library](https://github.com/OctopusDeploy/OctopusClients) make use of a new `GoogleCloudAccountResource` type that was added in version **11.3.3355** of the library.
-
-:::
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Octopus Space ID
-- Name for the Google Cloud account
-- *Optional* description for the Google Cloud account
-- Path to the [json key file](https://oc.to/GoogleCloudServiceAccountKey) to use when authenticating against Google Cloud
-- *Optional* Array of Environment IDs
-- Octopus Tenanted Participation Type (`Tenanted` | `Untenanted` | `TenantedOrUntenanted`)
-- *Optional* Array of Tenant IDs
-- *Optional* Array of Tenant Tags
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/accounts/index.md b/src/pages/docs/octopus-rest-api/examples/accounts/index.md
index ffd6cdd65d..d1cdda67f3 100644
--- a/src/pages/docs/octopus-rest-api/examples/accounts/index.md
+++ b/src/pages/docs/octopus-rest-api/examples/accounts/index.md
@@ -1,26 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/accounts
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Accounts
-description: This section includes examples of how to use the REST API to create and manage accounts in Octopus.
-navOrder: 10
-hideInThisSectionHeader: true
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-
-[Accounts](https://oc.to/OnboardingAccountsLearnMore) help you to centralize account details used during your deployments, including things like username/password, tokens, Azure and AWS credentials and SSH key pairs.
-
-Out-of-the-box, Octopus provides different types of accounts to help manage your infrastructure:
-
-- [Azure account](/docs/infrastructure/accounts/azure).
-- [AWS account](/docs/infrastructure/accounts/aws).
-- [Google Cloud account](/docs/infrastructure/accounts/google-cloud).
-- [SSH Key Pair](/docs/infrastructure/accounts/ssh-key-pair).
-- [Username/Password](/docs/infrastructure/accounts/username-and-password).
-- [Tokens](/docs/infrastructure/accounts/tokens).
-
-You can use the REST API to create and manage accounts in Octopus. Typical tasks can include:
-
-- [Create an AWS account](/docs/octopus-rest-api/examples/accounts/create-aws-account)
-- [Create an Azure service principal](/docs/octopus-rest-api/examples/accounts/create-azure-service-principal)
-- [Create a Google Cloud account](/docs/octopus-rest-api/examples/accounts/create-gcp-account)
diff --git a/src/pages/docs/octopus-rest-api/examples/add-a-space-with-environments.md b/src/pages/docs/octopus-rest-api/examples/add-a-space-with-environments.md
index 4ca533f3f3..efe595cd45 100644
--- a/src/pages/docs/octopus-rest-api/examples/add-a-space-with-environments.md
+++ b/src/pages/docs/octopus-rest-api/examples/add-a-space-with-environments.md
@@ -1,8 +1,9 @@
----
+---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/spaces/add-a-space-with-environments
-pubDate: 2023-01-01
+redirect: https://octopus.com/docs/api/examples/spaces/add-a-space-with-environments
+pubDate: 2023-01-01
+modDate: 2026-09-01
navSearch: false
navSitemap: false
navMenu: false
diff --git a/src/pages/docs/octopus-rest-api/examples/add-azure-web-app.md b/src/pages/docs/octopus-rest-api/examples/add-azure-web-app.md
index 27e121a4c7..ce32457913 100644
--- a/src/pages/docs/octopus-rest-api/examples/add-azure-web-app.md
+++ b/src/pages/docs/octopus-rest-api/examples/add-azure-web-app.md
@@ -1,8 +1,9 @@
----
+---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/deployment-targets/add-azure-web-app
-pubDate: 2023-01-01
+redirect: https://octopus.com/docs/api/examples/deployment-targets/add-azure-web-app
+pubDate: 2023-01-01
+modDate: 2026-09-01
navSearch: false
navSitemap: false
navMenu: false
diff --git a/src/pages/docs/octopus-rest-api/examples/add-environment-to-step.md b/src/pages/docs/octopus-rest-api/examples/add-environment-to-step.md
index 88f7036dc1..ffb558514e 100644
--- a/src/pages/docs/octopus-rest-api/examples/add-environment-to-step.md
+++ b/src/pages/docs/octopus-rest-api/examples/add-environment-to-step.md
@@ -1,8 +1,9 @@
----
+---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/deployment-process/add-environment-to-step
-pubDate: 2023-01-01
+redirect: https://octopus.com/docs/api/examples/deployment-process/add-environment-to-step
+pubDate: 2023-01-01
+modDate: 2026-09-01
navSearch: false
navSitemap: false
navMenu: false
diff --git a/src/pages/docs/octopus-rest-api/examples/artifacts/create-and-upload-artifacts.mdx b/src/pages/docs/octopus-rest-api/examples/artifacts/create-and-upload-artifacts.mdx
index 21f7fcdecd..8b6168df34 100644
--- a/src/pages/docs/octopus-rest-api/examples/artifacts/create-and-upload-artifacts.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/artifacts/create-and-upload-artifacts.mdx
@@ -1,27 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/artifacts/create-and-upload-artifacts
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Upload Artifact to Existing Deployment
-description: An example script to upload an existing local file as an artifact to an existing deployment.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import UploadArtifactToDeploymentScripts from 'src/shared-content/scripts/upload-artifact-to-deployment-scripts.include.md';
-
-This script provides an example of how to programmatically upload an [artifact](/docs/projects/deployment-process/artifacts) to an existing deployment.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Space Name
-- API Key
-- Project Name
-- Release Version
-- Environment Name
-- File Path to Upload
-- File Name for Octopus
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/artifacts/download-deployment-artifacts.mdx b/src/pages/docs/octopus-rest-api/examples/artifacts/download-deployment-artifacts.mdx
index 53778740c5..d7667784b3 100644
--- a/src/pages/docs/octopus-rest-api/examples/artifacts/download-deployment-artifacts.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/artifacts/download-deployment-artifacts.mdx
@@ -1,27 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/artifacts/download-deployment-artifacts
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Download Deployment Artifact
-description: An example script to download a deployment artifact to a specified location.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import DownloadArtifactFromDeploymentScripts from 'src/shared-content/scripts/download-artifact-from-deployment-scripts.include.md';
-
-This script provides an example of how to programmatically download an existing [artifact](/docs/projects/deployment-process/artifacts) created as part of a deployment to a specified location.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Space Name
-- API Key
-- Project Name
-- Release Version
-- Environment Name
-- File Download Path
-- File Name for Octopus
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/artifacts/download-runbook-artifacts.mdx b/src/pages/docs/octopus-rest-api/examples/artifacts/download-runbook-artifacts.mdx
index 332ff35f7b..d6bcff059d 100644
--- a/src/pages/docs/octopus-rest-api/examples/artifacts/download-runbook-artifacts.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/artifacts/download-runbook-artifacts.mdx
@@ -1,27 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/artifacts/download-runbook-artifacts
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Download Runbook Artifact
-description: An example script to download a runbook artifact to a specified location.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import DownloadArtifactFromRunbookScripts from 'src/shared-content/scripts/download-artifact-from-runbook-scripts.include.md';
-
-This script provides an example of how to programmatically download an existing [artifact](/docs/projects/deployment-process/artifacts) created as part of a runbook to a specified location. The latest runbook run will be chosen as the task to retrieve the artifact from.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- API Key
-- Space Name
-- Project Name
-- Runbook Name
-- Environment Name
-- File Download Path
-- File Name for Octopus
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/artifacts/index.md b/src/pages/docs/octopus-rest-api/examples/artifacts/index.md
index aa68c57b6d..8307d49e5b 100644
--- a/src/pages/docs/octopus-rest-api/examples/artifacts/index.md
+++ b/src/pages/docs/octopus-rest-api/examples/artifacts/index.md
@@ -1,15 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/artifacts
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Artifacts
-description: This section includes examples of how to use the REST API to create and manage artifacts in Octopus.
-navOrder: 20
-hideInThisSectionHeader: true
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-
-You can use the REST API to create and download [artifacts](/docs/projects/deployment-process/artifacts) in Octopus. Typical tasks can include:
-
-- [Upload Artifact to Existing Deployment](/docs/octopus-rest-api/examples/artifacts/create-and-upload-artifacts)
-- [Download Deployment Artifact](/docs/octopus-rest-api/examples/artifacts/download-deployment-artifacts)
-- [Download Runbook Artifact](/docs/octopus-rest-api/examples/artifacts/download-runbook-artifacts)
diff --git a/src/pages/docs/octopus-rest-api/examples/bulk-operations/bulk-add-projects-to-tenants.mdx b/src/pages/docs/octopus-rest-api/examples/bulk-operations/bulk-add-projects-to-tenants.mdx
index 9127a3afb9..d7f4a9f213 100644
--- a/src/pages/docs/octopus-rest-api/examples/bulk-operations/bulk-add-projects-to-tenants.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/bulk-operations/bulk-add-projects-to-tenants.mdx
@@ -1,43 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/bulk-operations/bulk-add-projects-to-tenants
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Bulk add a project to a list of tenants
-description: An example script that will add a project to a lot of tenants at once.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import BulkAddTenantsToProjects from 'src/shared-content/scripts/bulk-add-tenants-to-projects.include.md';
-
-This script demonstrates how to programmatically assign a group of [tenants](/docs/tenants) to a project in Octopus.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Name of the project to add
-- A list of Environments to tie the project to
-- The tenant tag you wish to filter on
-- What if is true or false
-- Max number of tenants to change
-
-:::div{.hint}
-**Note:**
-In order for this script to execute correctly, please note the following:
-
-- The projects provided must have the Multi-tenanted deployment setting enabled.
-- The environments provided must exist.
-- The optional tenant tags provided must exist.
-- The script will make sure the environments specified are assigned to that tenant. Even if the tenant / project relationship already exists.
-
-:::
-
-This script has guardrails in place to ensure you don't make too many changes.
-
-- The first is what if. Set that to `$true` and it will skip the save step. It will print out all the changes it would've made to the tenant.
-- The second is the max number of tenants to change. The search will still return the full list of tenants, however, it will only change, at most the number of tenants specified. For example, if you specified 10 tenants, and it found 25 to change, it would only change those 10. The next run will change the next 10, and then finally the last 5.
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/bulk-operations/index.md b/src/pages/docs/octopus-rest-api/examples/bulk-operations/index.md
index 8f5046509d..b468c3851b 100644
--- a/src/pages/docs/octopus-rest-api/examples/bulk-operations/index.md
+++ b/src/pages/docs/octopus-rest-api/examples/bulk-operations/index.md
@@ -1,22 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/bulk-operations
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Bulk Operations
-description: This section includes examples of how to use the REST API to perform a variety of bulk operations using the Octopus Deploy API.
-navOrder: 400
-hideInThisSectionHeader: true
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-
-You can use the Octopus Deploy REST API to perform a number of bulk operations.
-
-All the scripts in this section will include:
-
-- A what-if parameter to let you run the script without worrying about saving any changes.
-- A list of what would've changed (when what-if is `True`), or what just changed (when what-if is `False`).
-- A "limiter" parameter that will limit the number of changes per run. If you have 25 items to change, and the limit is set to 5, it will only change five items per run. You'd need to run the script five times to change all 25 items. This was added so you can do some test runs and spot-check the results.
-
-Provided sample bulk operations are:
-
-- [Bulk add a project to a list of tenants](/docs/octopus-rest-api/examples/bulk-operations/bulk-add-projects-to-tenants)
-- [Rerun all canceled deployments and runbook runs after node shutdown](/docs/octopus-rest-api/examples/bulk-operations/rerun-deployments-and-runbooks-after-node-shutdown)
diff --git a/src/pages/docs/octopus-rest-api/examples/bulk-operations/rerun-deployments-and-runbooks-after-node-shutdown.mdx b/src/pages/docs/octopus-rest-api/examples/bulk-operations/rerun-deployments-and-runbooks-after-node-shutdown.mdx
index 5a198237f2..0cbf7bebae 100644
--- a/src/pages/docs/octopus-rest-api/examples/bulk-operations/rerun-deployments-and-runbooks-after-node-shutdown.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/bulk-operations/rerun-deployments-and-runbooks-after-node-shutdown.mdx
@@ -1,36 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/bulk-operations/rerun-deployments-and-runbooks-after-node-shutdown
pubDate: 2023-01-01
-modDate: 2026-06-23
-title: Rerun all canceled deployments and runbook runs after node shutdown.
-description: An example script that determine which deployments and runbook runs were canceled because of a node shutdown and resubmit them.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import RerunDeploymentsAndRunbooksAfterNodeFailure from 'src/shared-content/scripts/rerun-deployments-and-runbooks-after-node-failure.include.md';
-
-:::div{.hint}
-**Octopus Cloud:** This script is no longer needed for deployments and runbook runs. On Octopus Cloud, these tasks are resilient — they continue automatically after a node restart or maintenance window rather than being cancelled. This script remains useful for self-hosted High Availability instances, where node restarts still cancel active tasks.
-:::
-
-This script demonstrates how to programmatically determine which deployments and runbook runs can be resubmitted because they were canceled because of a node shutdown. The node could have been shutdown for normal reasons, or it could have stopped responding, or it could have been turned off.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- The age in minutes you wish to filter on
-- The comma separated list of nodes names that were shutdown
-- What if is true or false
-
-This script has guardrails in place to ensure you don't make too many changes.
-
-- A what if variable. Set that to `$true` and it will skip the submission step. It will print out all the deployments and runbook runs it would've done.
-- This script will not resubmit every canceled runbook run or deployment. For a runbook run or deployment to be considered it must:
- - Have been canceled within the time frame provided.
- - Have been running on the node or nodes that were provided.
- - Have been canceled because of a node shutdown.
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/cancel-queued-deployments.md b/src/pages/docs/octopus-rest-api/examples/cancel-queued-deployments.md
index 511e3b56b7..63b99f1b17 100644
--- a/src/pages/docs/octopus-rest-api/examples/cancel-queued-deployments.md
+++ b/src/pages/docs/octopus-rest-api/examples/cancel-queued-deployments.md
@@ -1,8 +1,9 @@
----
+---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/deployments/cancel-queued-deployments
-pubDate: 2023-01-01
+redirect: https://octopus.com/docs/api/examples/deployments/cancel-queued-deployments
+pubDate: 2023-01-01
+modDate: 2026-09-01
navSearch: false
navSitemap: false
navMenu: false
diff --git a/src/pages/docs/octopus-rest-api/examples/certificates/create-certificate.mdx b/src/pages/docs/octopus-rest-api/examples/certificates/create-certificate.mdx
index c466146a7f..d8cd21fcac 100644
--- a/src/pages/docs/octopus-rest-api/examples/certificates/create-certificate.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/certificates/create-certificate.mdx
@@ -1,24 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/certificates/create-certificate
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Create a certificate
-description: An example script to add a certificate to the Octopus certificate library.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import CreateCertificateScripts from 'src/shared-content/scripts/create-certificate-scripts.include.md';
-
-This script uploads a certificate file in pfx format to the Octopus [certificate library](/docs/deployments/certificates) to be used in deployments or runbooks.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- PFX file path
-- PFX file password
-- Certificate Name
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/certificates/index.md b/src/pages/docs/octopus-rest-api/examples/certificates/index.md
index 99d12bcda3..c3d2331991 100644
--- a/src/pages/docs/octopus-rest-api/examples/certificates/index.md
+++ b/src/pages/docs/octopus-rest-api/examples/certificates/index.md
@@ -1,14 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/certificates
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Certificates
-description: This section includes examples of how to use the REST API to create and manage certificates in Octopus.
-navOrder: 30
-hideInThisSectionHeader: true
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-
-You can use the REST API to create and manage your [certificates](/docs/deployments/certificates) in Octopus. Typical tasks can include:
-
-- [Create a certificate](/docs/octopus-rest-api/examples/certificates/create-certificate)
-- [Replace existing certificate](/docs/octopus-rest-api/examples/certificates/replace-certificate)
diff --git a/src/pages/docs/octopus-rest-api/examples/certificates/replace-certificate.mdx b/src/pages/docs/octopus-rest-api/examples/certificates/replace-certificate.mdx
index 90afc9bd2a..27f3aea62f 100644
--- a/src/pages/docs/octopus-rest-api/examples/certificates/replace-certificate.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/certificates/replace-certificate.mdx
@@ -1,24 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/certificates/replace-certificate
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Replace existing certificate
-description: An example script to replace an existing certificate in Octopus Deploy.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import ReplaceCertificateScripts from 'src/shared-content/scripts/replace-certificate-scripts.include.md';
-
-This script replaces an existing certificate in the Octopus [certificate library](/docs/deployments/certificates).
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Certificate name
-- Replacement certificate file path
-- Replacement certificate password
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/change-machine-machinepolicy.md b/src/pages/docs/octopus-rest-api/examples/change-machine-machinepolicy.md
index 8655321513..b418585c39 100644
--- a/src/pages/docs/octopus-rest-api/examples/change-machine-machinepolicy.md
+++ b/src/pages/docs/octopus-rest-api/examples/change-machine-machinepolicy.md
@@ -1,8 +1,9 @@
----
+---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/deployment-targets/change-target-machinepolicy
-pubDate: 2023-01-01
+redirect: https://octopus.com/docs/api/examples/deployment-targets/change-target-machinepolicy
+pubDate: 2023-01-01
+modDate: 2026-09-01
navSearch: false
navSitemap: false
navMenu: false
diff --git a/src/pages/docs/octopus-rest-api/examples/channels/create-channel.mdx b/src/pages/docs/octopus-rest-api/examples/channels/create-channel.mdx
index ffb04e6409..4dae72de0e 100644
--- a/src/pages/docs/octopus-rest-api/examples/channels/create-channel.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/channels/create-channel.mdx
@@ -1,24 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/channels/create-channel
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Create a channel
-description: An example script that creates a channel.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import CreateChannelScripts from 'src/shared-content/scripts/create-channel-scripts.include.md';
-
-This script demonstrates how to programmatically create a channel in Octopus Deploy.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Name of the channel to create
-- ID of the project to add the channel to
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/channels/index.md b/src/pages/docs/octopus-rest-api/examples/channels/index.md
index 4dd7c5dbd8..038a3d4843 100644
--- a/src/pages/docs/octopus-rest-api/examples/channels/index.md
+++ b/src/pages/docs/octopus-rest-api/examples/channels/index.md
@@ -1,13 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/channels
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Channels
-description: This section includes examples of how to use the REST API to create and manage channels in Octopus.
-navOrder: 40
-hideInThisSectionHeader: true
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-
-You can use the REST API to create and manage your [channels](/docs/releases/channels) in Octopus. Typical tasks can include:
-
-- [Create a channel](/docs/octopus-rest-api/examples/channels/create-channel)
diff --git a/src/pages/docs/octopus-rest-api/examples/create-and-deploy-a-release.md b/src/pages/docs/octopus-rest-api/examples/create-and-deploy-a-release.md
index 53429e8665..316c0f9f8e 100644
--- a/src/pages/docs/octopus-rest-api/examples/create-and-deploy-a-release.md
+++ b/src/pages/docs/octopus-rest-api/examples/create-and-deploy-a-release.md
@@ -1,8 +1,9 @@
----
+---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/deployments/create-and-deploy-a-release
-pubDate: 2023-01-01
+redirect: https://octopus.com/docs/api/examples/deployments/create-and-deploy-a-release
+pubDate: 2023-01-01
+modDate: 2026-09-01
navSearch: false
navSitemap: false
navMenu: false
diff --git a/src/pages/docs/octopus-rest-api/examples/create-azure-service-principal.md b/src/pages/docs/octopus-rest-api/examples/create-azure-service-principal.md
index 3f229d221f..0e1b4c1d15 100644
--- a/src/pages/docs/octopus-rest-api/examples/create-azure-service-principal.md
+++ b/src/pages/docs/octopus-rest-api/examples/create-azure-service-principal.md
@@ -1,8 +1,9 @@
----
+---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/accounts/create-azure-service-principal
-pubDate: 2023-01-01
+redirect: https://octopus.com/docs/api/examples/accounts/create-azure-service-principal
+pubDate: 2023-01-01
+modDate: 2026-09-01
navSearch: false
navSitemap: false
navMenu: false
diff --git a/src/pages/docs/octopus-rest-api/examples/create-certificate.md b/src/pages/docs/octopus-rest-api/examples/create-certificate.md
index 404ce23865..d8cd21fcac 100644
--- a/src/pages/docs/octopus-rest-api/examples/create-certificate.md
+++ b/src/pages/docs/octopus-rest-api/examples/create-certificate.md
@@ -1,8 +1,9 @@
----
+---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/certificates/create-certificate
-pubDate: 2023-01-01
+redirect: https://octopus.com/docs/api/examples/certificates/create-certificate
+pubDate: 2023-01-01
+modDate: 2026-09-01
navSearch: false
navSitemap: false
navMenu: false
diff --git a/src/pages/docs/octopus-rest-api/examples/create-project.md b/src/pages/docs/octopus-rest-api/examples/create-project.md
index 664116d3ef..ff280e33b8 100644
--- a/src/pages/docs/octopus-rest-api/examples/create-project.md
+++ b/src/pages/docs/octopus-rest-api/examples/create-project.md
@@ -1,8 +1,9 @@
----
+---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/projects/create-project
-pubDate: 2023-01-01
+redirect: https://octopus.com/docs/api/examples/projects/create-project
+pubDate: 2023-01-01
+modDate: 2026-09-01
navSearch: false
navSitemap: false
navMenu: false
diff --git a/src/pages/docs/octopus-rest-api/examples/create-runbook.md b/src/pages/docs/octopus-rest-api/examples/create-runbook.md
index 1d0431b831..5bc9e53b68 100644
--- a/src/pages/docs/octopus-rest-api/examples/create-runbook.md
+++ b/src/pages/docs/octopus-rest-api/examples/create-runbook.md
@@ -1,8 +1,9 @@
----
+---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/runbooks/create-runbook
-pubDate: 2023-01-01
+redirect: https://octopus.com/docs/api/examples/runbooks/create-runbook
+pubDate: 2023-01-01
+modDate: 2026-09-01
navSearch: false
navSitemap: false
navMenu: false
diff --git a/src/pages/docs/octopus-rest-api/examples/create-script-step.md b/src/pages/docs/octopus-rest-api/examples/create-script-step.md
index 997b45d8de..e2c5d3f112 100644
--- a/src/pages/docs/octopus-rest-api/examples/create-script-step.md
+++ b/src/pages/docs/octopus-rest-api/examples/create-script-step.md
@@ -1,8 +1,9 @@
----
+---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/deployment-process/create-script-step
-pubDate: 2023-01-01
+redirect: https://octopus.com/docs/api/examples/deployment-process/create-script-step
+pubDate: 2023-01-01
+modDate: 2026-09-01
navSearch: false
navSitemap: false
navMenu: false
diff --git a/src/pages/docs/octopus-rest-api/examples/delete-a-space.md b/src/pages/docs/octopus-rest-api/examples/delete-a-space.md
index c6529b8503..34ec2c5949 100644
--- a/src/pages/docs/octopus-rest-api/examples/delete-a-space.md
+++ b/src/pages/docs/octopus-rest-api/examples/delete-a-space.md
@@ -1,8 +1,9 @@
----
+---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/spaces/delete-a-space
-pubDate: 2023-01-01
+redirect: https://octopus.com/docs/api/examples/spaces/delete-a-space
+pubDate: 2023-01-01
+modDate: 2026-09-01
navSearch: false
navSitemap: false
navMenu: false
diff --git a/src/pages/docs/octopus-rest-api/examples/delete-machines-by-role.md b/src/pages/docs/octopus-rest-api/examples/delete-machines-by-role.md
index 0c5b670127..2f1c71c65f 100644
--- a/src/pages/docs/octopus-rest-api/examples/delete-machines-by-role.md
+++ b/src/pages/docs/octopus-rest-api/examples/delete-machines-by-role.md
@@ -1,8 +1,9 @@
----
+---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/deployment-targets/delete-machines-by-role
-pubDate: 2023-01-01
+redirect: https://octopus.com/docs/api/examples/deployment-targets/delete-machines-by-role
+pubDate: 2023-01-01
+modDate: 2026-09-01
navSearch: false
navSitemap: false
navMenu: false
diff --git a/src/pages/docs/octopus-rest-api/examples/delete-project-releases.md b/src/pages/docs/octopus-rest-api/examples/delete-project-releases.md
index 68c7c543f8..7d4dad7ceb 100644
--- a/src/pages/docs/octopus-rest-api/examples/delete-project-releases.md
+++ b/src/pages/docs/octopus-rest-api/examples/delete-project-releases.md
@@ -1,8 +1,9 @@
----
+---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/releases/delete-project-releases
-pubDate: 2023-01-01
+redirect: https://octopus.com/docs/api/examples/releases/delete-project-releases
+pubDate: 2023-01-01
+modDate: 2026-09-01
navSearch: false
navSitemap: false
navMenu: false
diff --git a/src/pages/docs/octopus-rest-api/examples/deployment-process/add-environment-to-step.mdx b/src/pages/docs/octopus-rest-api/examples/deployment-process/add-environment-to-step.mdx
index b40b0cbb30..ffb558514e 100644
--- a/src/pages/docs/octopus-rest-api/examples/deployment-process/add-environment-to-step.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/deployment-process/add-environment-to-step.mdx
@@ -1,25 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-process/add-environment-to-step
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Add an environment to step
-description: An example script that scopes a step to an environment.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import AddEnvironmentToStepScripts from 'src/shared-content/scripts/add-environment-to-step-scripts.include.md';
-
-This script demonstrates how to programmatically add an environment scope to an existing step so that it only runs in specific environments.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space you want to use
-- Name of the step to add the environment to
-- List of environments to add to the step
-- Name of project to modify
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/deployment-process/create-script-step.mdx b/src/pages/docs/octopus-rest-api/examples/deployment-process/create-script-step.mdx
index 992062241f..e2c5d3f112 100644
--- a/src/pages/docs/octopus-rest-api/examples/deployment-process/create-script-step.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/deployment-process/create-script-step.mdx
@@ -1,23 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-process/create-script-step
pubDate: 2023-01-01
-modDate: 2024-06-27
-title: Add a run a script step
-description: An example script to add a run a script step to a project.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import CreateScriptStepScripts from 'src/shared-content/scripts/create-script-step-scripts.include.md';
-
-This script demonstrates how to programmatically add a [Run A Script](/docs/deployments/custom-scripts/run-a-script-step) step to a project, which runs on a deployment target that matches a specified [target tag](/docs/infrastructure/deployment-targets/target-tags).
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Project name
-- Machine role
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/deployment-process/get-steps-using-package.mdx b/src/pages/docs/octopus-rest-api/examples/deployment-process/get-steps-using-package.mdx
index 783a538b02..719bae35d6 100644
--- a/src/pages/docs/octopus-rest-api/examples/deployment-process/get-steps-using-package.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/deployment-process/get-steps-using-package.mdx
@@ -1,23 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-process/get-steps-using-package
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Get all steps that use a package
-description: An example script to find all steps that reference a specific package.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import GetStepsUsingPackageScripts from 'src/shared-content/scripts/get-steps-using-package-scripts.include.md';
-
-This script displays all projects in a space that reference the specified package.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to search
-- The package ID to search for
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/deployment-process/get-steps-using-role.mdx b/src/pages/docs/octopus-rest-api/examples/deployment-process/get-steps-using-role.mdx
index 842536bd0d..b4e92245e2 100644
--- a/src/pages/docs/octopus-rest-api/examples/deployment-process/get-steps-using-role.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/deployment-process/get-steps-using-role.mdx
@@ -1,23 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-process/get-steps-using-role
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Get all steps using role
-description: An example script to find all steps targeting a role.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import GetStepsUsingRoleScripts from 'src/shared-content/scripts/get-steps-using-role-scripts.include.md';
-
-This script displays all projects in a space that target the given role.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Name of the role to search for
-- Name of the space to search
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/deployment-process/index.md b/src/pages/docs/octopus-rest-api/examples/deployment-process/index.md
index 520f71ee34..4aa17caaff 100644
--- a/src/pages/docs/octopus-rest-api/examples/deployment-process/index.md
+++ b/src/pages/docs/octopus-rest-api/examples/deployment-process/index.md
@@ -1,11 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-process
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Deployment process
-description: This section includes examples of how to use the REST API to manage a project's deployment process in Octopus.
-navOrder: 50
-hideInThisSectionHeader: true
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-
-You can use the REST API to manage a project's [deployment process](/docs/projects/deployment-process). Typical tasks might include:
diff --git a/src/pages/docs/octopus-rest-api/examples/deployment-targets/add-azure-web-app.mdx b/src/pages/docs/octopus-rest-api/examples/deployment-targets/add-azure-web-app.mdx
index 5cd6834050..ce32457913 100644
--- a/src/pages/docs/octopus-rest-api/examples/deployment-targets/add-azure-web-app.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/deployment-targets/add-azure-web-app.mdx
@@ -1,25 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-targets/add-azure-web-app
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Add an Azure Web App
-description: An example script to add an Azure Web App as a deployment target.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import AddAzureWebAppScripts from 'src/shared-content/scripts/add-azure-web-app-scripts.include.md';
-
-This script demonstrates how to programmatically add an Azure Web App as a deployment target.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to add the target to
-- Name of the Azure Service Principal account in Octopus
-- Name of the Azure Web App
-- Name of the Azure Resource Group
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/deployment-targets/add-target-role.mdx b/src/pages/docs/octopus-rest-api/examples/deployment-targets/add-target-role.mdx
index 4087387747..712599d315 100644
--- a/src/pages/docs/octopus-rest-api/examples/deployment-targets/add-target-role.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/deployment-targets/add-target-role.mdx
@@ -1,24 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-targets/add-target-role
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Add a target role
-description: An example script that adds a target role to a deployment target.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import AddTargetRoleScripts from 'src/shared-content/scripts/add-target-role-scripts.include.md';
-
-This script demonstrates how to programmatically add a target role to a deployment target.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Name of the machine to update
-- Name of the target role to add
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/deployment-targets/add-tenant-to-target.mdx b/src/pages/docs/octopus-rest-api/examples/deployment-targets/add-tenant-to-target.mdx
index 41f69184b0..3f7803d8e7 100644
--- a/src/pages/docs/octopus-rest-api/examples/deployment-targets/add-tenant-to-target.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/deployment-targets/add-tenant-to-target.mdx
@@ -1,25 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-targets/add-tenant-to-target
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Add Tenants to targets
-description: An example script to associate a list of tenants to one or more deployment targets.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import AddTenantsToTargetsScript from 'src/shared-content/scripts/add-tenants-to-targets-scripts.include.md';
-
-This script demonstrates how to programmatically associate a list of tenants to one or more deployment targets.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space you want to work in
-- Octopus Tenanted Participation Type (`Tenanted` | `Untenanted` | `TenantedOrUntenanted`)
-- List of deployment targets to associate with the Tenants
-- List of Tenants to associate with the deployment targets
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/deployment-targets/change-target-machinepolicy.mdx b/src/pages/docs/octopus-rest-api/examples/deployment-targets/change-target-machinepolicy.mdx
index a2ceb1ab6a..b418585c39 100644
--- a/src/pages/docs/octopus-rest-api/examples/deployment-targets/change-target-machinepolicy.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/deployment-targets/change-target-machinepolicy.mdx
@@ -1,24 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-targets/change-target-machinepolicy
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Change target's machine policy
-description: An example script that changes a machine policy of a deployment target.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import ChangeMachinePolicyScripts from 'src/shared-content/scripts/change-machine-machinepolicy-scripts.include.md';
-
-This script demonstrates how to programmatically change a machine policy of a deployment target.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Name of the machine to update
-- Name of the machine policy to update to
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/deployment-targets/check-for-tentacle-upgrades.mdx b/src/pages/docs/octopus-rest-api/examples/deployment-targets/check-for-tentacle-upgrades.mdx
index 4e4e9759cb..daf08d4f16 100644
--- a/src/pages/docs/octopus-rest-api/examples/deployment-targets/check-for-tentacle-upgrades.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/deployment-targets/check-for-tentacle-upgrades.mdx
@@ -1,22 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-targets/check-for-tentacle-upgrades
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Check Tentacles for available upgrades
-description: An example script to check targets and workers for available Tentacle upgrades.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import CheckForTentacleUpgradesScripts from 'src/shared-content/scripts/check-for-tentacle-upgrades-scripts.include.md';
-
-This script demonstrates how to programmatically check if Tentacles have upgrades available.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/deployment-targets/delete-machines-by-name.mdx b/src/pages/docs/octopus-rest-api/examples/deployment-targets/delete-machines-by-name.mdx
index 46a467bd0e..edef30df9e 100644
--- a/src/pages/docs/octopus-rest-api/examples/deployment-targets/delete-machines-by-name.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/deployment-targets/delete-machines-by-name.mdx
@@ -1,27 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-targets/delete-machines-by-name
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Delete targets by name
-description: An example script to delete targets by matching a specified name.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import DeleteTargetsByNameScripts from 'src/shared-content/scripts/delete-targets-by-name-scripts.include.md';
-
-This script demonstrates how to programmatically delete deployment targets which match a specified name.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space you want to use
-- Name of the machine name to use
-
-:::div{.warning}
-**This script will delete deployment targets which match the specified name. This operation is destructive and cannot be undone.**
-:::
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/deployment-targets/delete-machines-by-role.mdx b/src/pages/docs/octopus-rest-api/examples/deployment-targets/delete-machines-by-role.mdx
index c6a059bc26..2f1c71c65f 100644
--- a/src/pages/docs/octopus-rest-api/examples/deployment-targets/delete-machines-by-role.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/deployment-targets/delete-machines-by-role.mdx
@@ -1,27 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-targets/delete-machines-by-role
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Delete targets by role
-description: An example script to delete targets by role.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import DeleteTargetsByRoleScripts from 'src/shared-content/scripts/delete-targets-by-role-scripts.include.md';
-
-This script demonstrates how to programmatically delete deployment targets with the specified role from the Octopus Server.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space you want to use
-- Name of the role to use
-
-:::div{.warning}
-**This script will delete deployment targets matching the specified role. This operation is destructive and cannot be undone.**
-:::
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/deployment-targets/enable-disable-machine.mdx b/src/pages/docs/octopus-rest-api/examples/deployment-targets/enable-disable-machine.mdx
index a7fe75c2d9..15947e2b88 100644
--- a/src/pages/docs/octopus-rest-api/examples/deployment-targets/enable-disable-machine.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/deployment-targets/enable-disable-machine.mdx
@@ -1,24 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-targets/enable-disable-machine
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Deactivate machines
-description: An example script that enables or disables a machine in Octopus.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import EnableDisableMachineScripts from 'src/shared-content/scripts/enable-disable-machine-scripts.include.md';
-
-This script demonstrates how to programmatically enable or disable a machine.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Name of the machine
-- Boolean value for enabled
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/deployment-targets/find-target-usage.mdx b/src/pages/docs/octopus-rest-api/examples/deployment-targets/find-target-usage.mdx
index f137273847..201eb64ede 100644
--- a/src/pages/docs/octopus-rest-api/examples/deployment-targets/find-target-usage.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/deployment-targets/find-target-usage.mdx
@@ -1,32 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-targets/find-target-usage
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Find target usage
-description: An example script that will loop through all the steps in the deployment process and runbooks and determine if a target is being used
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import FindTargetUsageNoTenants from 'src/shared-content/scripts/find-target-usage-no-tenants.include.md';
-
-This script will accept a target name and loop through all the projects in the space and determines:
-
-- Does the target role(s) and environments match any steps in the deployment process.
-- Does the target role(s) and environments match any steps in any runbook processes.
-
-Any matching projects or runbooks will be printed at the end of the script.
-
-**Please Note:** This script reflects the *current* state of the runbooks and deployment process. It does not look at release snapshots or previously published runbooks. It also does not take tenants into account.
-
-This script should work with any version of Octopus 4.0 or later. It has guard clauses in place to exclude spaces and runbooks based on the version.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key - the user associated with the API key will need read-only permissions on all spaces
-- Space Name - name of the space to search for, if left blank it will use the default space
-- Target Name - name of the target to search for
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/deployment-targets/find-unused-targets.mdx b/src/pages/docs/octopus-rest-api/examples/deployment-targets/find-unused-targets.mdx
index be79de875c..7ca2e675de 100644
--- a/src/pages/docs/octopus-rest-api/examples/deployment-targets/find-unused-targets.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/deployment-targets/find-unused-targets.mdx
@@ -1,30 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-targets/find-unused-targets
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Find unused targets
-description: An example script the will find provide a list of targets being unused that might cause your target count to be inflated.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import FindUnusedTargets from 'src/shared-content/scripts/find-unused-targets.include.md';
-
-This script will loop through all the targets in all spaces on an instance and will return:
-
-- How many cloud region targets which are not counted against your license
-- How many duplicate listening Tentacles you have
-- How many targets that are disabled
-- How many targets are being reported as offline
-- How many targets have never been used in a deployment
-- How many targets haven't had a deployment in over `x` days
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key - the user associated with the API key will need read-only permissions on all spaces
-- Days Since Last Deployment - the number of days to allow before considering the target is inactive, default is 90
-- Include machine lists - boolean specifying whether to include the machines as part of the summary
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/deployment-targets/index.md b/src/pages/docs/octopus-rest-api/examples/deployment-targets/index.md
index f2197e0bd3..cb315d7836 100644
--- a/src/pages/docs/octopus-rest-api/examples/deployment-targets/index.md
+++ b/src/pages/docs/octopus-rest-api/examples/deployment-targets/index.md
@@ -1,11 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-targets
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Deployment targets
-description: This section includes examples of how to use the REST API to create and manage deployment targets in Octopus.
-navOrder: 60
-hideInThisSectionHeader: true
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-
-You can use the REST API to create and manage your [deployment targets](/docs/infrastructure/deployment-targets) in Octopus. Typical tasks can include:
diff --git a/src/pages/docs/octopus-rest-api/examples/deployment-targets/register-listening-tentacle.mdx b/src/pages/docs/octopus-rest-api/examples/deployment-targets/register-listening-tentacle.mdx
index 837d0cf82e..11bb9ee269 100644
--- a/src/pages/docs/octopus-rest-api/examples/deployment-targets/register-listening-tentacle.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/deployment-targets/register-listening-tentacle.mdx
@@ -1,27 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-targets/register-listening-tentacle
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Register Listening Tentacle
-description: An example script to register a listening tentacle using the REST API.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import RegisterListeningTentacleScripts from 'src/shared-content/scripts/register-listening-tentacle-scripts.include.md';
-
-This script demonstrates how to programmatically register a [Listening Tentacle](/docs/infrastructure/deployment-targets/tentacle/tentacle-communication/#listening-tentacles-recommended).
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to work with
-- Hostname (DNS entry will also work) of the machine to register
-- Communications style (API method only): `TentaclePassive` for listening
-- Port number the Tentacle is listening on
-- An array of environments for the Tentacle
-- An array of roles for the Tentacle
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/deployment-targets/register-polling-tentacle.mdx b/src/pages/docs/octopus-rest-api/examples/deployment-targets/register-polling-tentacle.mdx
index c569307cb2..cc900a13d0 100644
--- a/src/pages/docs/octopus-rest-api/examples/deployment-targets/register-polling-tentacle.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/deployment-targets/register-polling-tentacle.mdx
@@ -1,27 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-targets/register-polling-tentacle
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Register Polling Tentacle
-description: An example script to register a Polling Tentacle using the REST API.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import RegisterPollingTentacleScripts from 'src/shared-content/scripts/register-polling-tentacle-scripts.include.md';
-
-This script demonstrates how to programmatically add a [Polling Tentacle](/docs/infrastructure/deployment-targets/tentacle/tentacle-communication/#polling-tentacles). Polling Tentacles usually self-register during the installation process, but in cases where the Tentacle was deleted from the server and needs to be re-added, this script shows you how.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to work with
-- Hostname of the machine to register
-- Tentacle thumbprint
-- Tentacle identifier
-- Array of environments
-- Array of roles
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/deployment-targets/register-ssh-target.mdx b/src/pages/docs/octopus-rest-api/examples/deployment-targets/register-ssh-target.mdx
index 2d501d79e0..36a1935b25 100644
--- a/src/pages/docs/octopus-rest-api/examples/deployment-targets/register-ssh-target.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/deployment-targets/register-ssh-target.mdx
@@ -1,38 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-targets/register-ssh-target
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Register SSH target using the Octopus REST API
-navTitle: Register SSH target
-description: An example script to register an SSH target using the REST API.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import RegisterSshTargetScripts from 'src/shared-content/scripts/register-ssh-target-scripts.include.md';
-
-This script demonstrates how to programmatically register an [SSH target](/docs/infrastructure/deployment-targets/linux/ssh-target) using the REST API.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to work with
-- The name for the SSH target
-- Hostname or IP address of the SSH target to register
-- Port for the SSH target (`22` by default)
-- The SSH target's host fingerprint (see below)
-- The Account name to use when authenticating.
-- A list of environments for the SSH target
-- A list of roles for the SSH target
-- Octopus Tenanted Participation Type (`Tenanted` | `Untenanted` | `TenantedOrUntenanted`)
-- *Optional*: A list of Tenant names to connect to the SSH target.
-
-You can find the host fingerprint for an SSH target by remotely logging onto the machine and retrieving it. An example bash script to do this is shown below:
-
-```bash
-ssh-keygen -E md5 -lf /etc/ssh/ssh_host_ed25519_key.pub | cut -d' ' -f2 | awk '{ print $1}' | cut -d':' -f2-
-```
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/deployment-targets/upgrade-machines.mdx b/src/pages/docs/octopus-rest-api/examples/deployment-targets/upgrade-machines.mdx
index 7d49824051..7176eda6d6 100644
--- a/src/pages/docs/octopus-rest-api/examples/deployment-targets/upgrade-machines.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/deployment-targets/upgrade-machines.mdx
@@ -1,23 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployment-targets/upgrade-machines
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Upgrade targets
-description: An example script that upgrades a list of deployment targets.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import UpgradeMachinesScripts from 'src/shared-content/scripts/upgrade-machines-scripts.include.md';
-
-This script demonstrates how to programmatically upgrade deployment targets.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to work with
-- Array of machine names
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/deployments/cancel-queued-deployments.mdx b/src/pages/docs/octopus-rest-api/examples/deployments/cancel-queued-deployments.mdx
index 5f66f3359a..63b99f1b17 100644
--- a/src/pages/docs/octopus-rest-api/examples/deployments/cancel-queued-deployments.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/deployments/cancel-queued-deployments.mdx
@@ -1,22 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployments/cancel-queued-deployments
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Cancel queued deployments
-description: An example script to cancel queued deployments.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import CancelQueuedDeploymentsScripts from 'src/shared-content/scripts/cancel-queued-deployments-scripts.include.md';
-
-This script demonstrates how to programmatically cancel queued deployments.
-
-## Usage
-
-Provide values for the following
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to work with
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/deployments/create-and-deploy-a-release.mdx b/src/pages/docs/octopus-rest-api/examples/deployments/create-and-deploy-a-release.mdx
index ca0ba8af2c..316c0f9f8e 100644
--- a/src/pages/docs/octopus-rest-api/examples/deployments/create-and-deploy-a-release.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/deployments/create-and-deploy-a-release.mdx
@@ -1,35 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployments/create-and-deploy-a-release
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Create and deploy a release
-description: Example scripts to create and deploy a release.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import CreateAndDeployReleaseScripts from 'src/shared-content/scripts/create-and-deploy-release-scripts.include.md';
-import CreateAndDeployReleaseWithTenantsScripts from 'src/shared-content/scripts/create-and-deploy-release-with-tenants-scripts.include.md';
-
-These scripts create and deploy a release, including examples for choosing a channel and deploying to tenants.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Space Name
-- Project Name
-- Environment Name
-- Channel Name
-- (Optional) Tenant Names
-
-:::div{.warning}
-**These scripts will create a release and deployments to the provided environments. Take care when running this script or one based on it.**
-:::
-
-## Create and deploy a release
-
-
-
-## Create and deploy a release to a group of tenants
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/deployments/deploy-release-with-prompted-variables.mdx b/src/pages/docs/octopus-rest-api/examples/deployments/deploy-release-with-prompted-variables.mdx
index 42c164e8af..3fce09b638 100644
--- a/src/pages/docs/octopus-rest-api/examples/deployments/deploy-release-with-prompted-variables.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/deployments/deploy-release-with-prompted-variables.mdx
@@ -1,26 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployments/deploy-release-with-prompted-variables
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Deploy existing release with prompted variables
-description: An example script to deploy an existing release with prompted variables.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import DeployReleaseWithPromptedVariablesScripts from 'src/shared-content/scripts/deploy-release-with-prompted-variables-scripts.include.md';
-
-This script demonstrates how to programmatically deploy an existing release with prompted variables.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Space Name
-- Project Name
-- Environment Name
-- Release Version
-- Prompted Variables (the format is variable name::variable value, can be multi-line)
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/deployments/deploy-release.mdx b/src/pages/docs/octopus-rest-api/examples/deployments/deploy-release.mdx
index 2ff3dac4e4..740f563e75 100644
--- a/src/pages/docs/octopus-rest-api/examples/deployments/deploy-release.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/deployments/deploy-release.mdx
@@ -1,25 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployments/deploy-release
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Deploy existing release
-description: An example script to deploy an existing release.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import DeployReleaseScripts from 'src/shared-content/scripts/deploy-release-scripts.include.md';
-
-This script demonstrates how to programmatically deploy an existing release.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Space Name
-- Project Name
-- Environment Name
-- Release Version
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/deployments/index.md b/src/pages/docs/octopus-rest-api/examples/deployments/index.md
index d06d69cc06..9f61c60f1a 100644
--- a/src/pages/docs/octopus-rest-api/examples/deployments/index.md
+++ b/src/pages/docs/octopus-rest-api/examples/deployments/index.md
@@ -1,11 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployments
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Deployments
-description: This section includes examples of how to use the REST API to create and manage deployments in Octopus.
-navOrder: 70
-hideInThisSectionHeader: true
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-
-You can use the REST API to create and manage your Octopus deployments. Typical tasks can include:
diff --git a/src/pages/docs/octopus-rest-api/examples/deployments/list-deployments-to-environment.mdx b/src/pages/docs/octopus-rest-api/examples/deployments/list-deployments-to-environment.mdx
index 06146d92e6..afb8f1183c 100644
--- a/src/pages/docs/octopus-rest-api/examples/deployments/list-deployments-to-environment.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/deployments/list-deployments-to-environment.mdx
@@ -1,23 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/deployments/list-deployments-to-environment
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: List deployments to environment
-description: An example script to retrieve a list of deployments to an environment
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import ListDeploymentsToEnvironmentScripts from 'src/shared-content/scripts/list-deployments-to-environment-scripts.include.md';
-
-This script demonstrates how to programmatically retrieve a list of deployments to an environment.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Space Name
-- Environment Name
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/environments/add-environments.mdx b/src/pages/docs/octopus-rest-api/examples/environments/add-environments.mdx
index 38d23e887a..d0054a7b60 100644
--- a/src/pages/docs/octopus-rest-api/examples/environments/add-environments.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/environments/add-environments.mdx
@@ -1,25 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/environments/add-environments
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Adding Environments
-description: An example script to create environments in a Space.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import AddEnvironmentsScripts from 'src/shared-content/scripts/add-environments-scripts.include.md';
-
-This script demonstrates how to programmatically create [environments](/docs/infrastructure/environments/) in an existing [Space](/docs/administration/spaces).
-
-It creates an environment for each entry in the supplied list. If the environment already exists in the Space, it skips the creation.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Space Name
-- A list of environment names to create
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/environments/index.md b/src/pages/docs/octopus-rest-api/examples/environments/index.md
index a4483cb373..4a10bb99e5 100644
--- a/src/pages/docs/octopus-rest-api/examples/environments/index.md
+++ b/src/pages/docs/octopus-rest-api/examples/environments/index.md
@@ -1,11 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/environments
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Environments
-description: This section includes examples of how to use the REST API to create and manage environments in Octopus.
-navOrder: 80
-hideInThisSectionHeader: true
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-
-You can use the REST API to create and manage your Octopus environments. Typical tasks can include:
diff --git a/src/pages/docs/octopus-rest-api/examples/events/find-events-by-date.mdx b/src/pages/docs/octopus-rest-api/examples/events/find-events-by-date.mdx
index 04a06bbdc3..ff340b6499 100644
--- a/src/pages/docs/octopus-rest-api/examples/events/find-events-by-date.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/events/find-events-by-date.mdx
@@ -1,26 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/events/find-events-by-date
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Find events by date
-description: An example script that finds events by date in Octopus using the REST API and Octopus.Client.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import FindEventsByDateScripts from 'src/shared-content/scripts/find-events-by-date-scripts.include.md';
-
-This script demonstrates how to programmatically finds events for a specific date.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Date to find events by
-
-:::div{.warning}
-**This script will query all events for a specific date in Octopus. It may take some time to execute on an Octopus instance with a large amount of Event records. Take care when running this script or one based on it.**
-:::
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/events/index.md b/src/pages/docs/octopus-rest-api/examples/events/index.md
index 0eb816cc87..0c97ae6a90 100644
--- a/src/pages/docs/octopus-rest-api/examples/events/index.md
+++ b/src/pages/docs/octopus-rest-api/examples/events/index.md
@@ -1,13 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/events
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Events
-description: This section includes examples of how to use the REST API to find events from Octopus.
-navOrder: 90
-hideInThisSectionHeader: true
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-
-You can use the REST API to review events on Octopus Deploy. Typical tasks might include:
-
-- [Find events by date](/docs/octopus-rest-api/examples/events/find-events-by-date)
diff --git a/src/pages/docs/octopus-rest-api/examples/feeds/change-feed.mdx b/src/pages/docs/octopus-rest-api/examples/feeds/change-feed.mdx
index 4c181eca57..f221a7d3c9 100644
--- a/src/pages/docs/octopus-rest-api/examples/feeds/change-feed.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/feeds/change-feed.mdx
@@ -1,24 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/feeds/change-feed
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Change feed
-description: An example script that changes an existing feed by updating the feed name in Octopus using the REST API and Octopus.Client.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import ChangeFeedScripts from 'src/shared-content/scripts/change-feed-scripts.include.md';
-
-This script demonstrates how to programmatically change an existing feed and update its name in Octopus.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Name of the feed to modify
-- New value for the name of the feed
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/feeds/create-feed.mdx b/src/pages/docs/octopus-rest-api/examples/feeds/create-feed.mdx
index 70a322e3dd..8627d7ddac 100644
--- a/src/pages/docs/octopus-rest-api/examples/feeds/create-feed.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/feeds/create-feed.mdx
@@ -1,27 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/feeds/create-feed
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Create a feed
-description: An example script that creates a nuget feed in Octopus.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import CreateNugetFeedScripts from 'src/shared-content/scripts/create-nuget-feed-scripts.include.md';
-
-This script demonstrates how to programmatically create a NuGet external feed in Octopus.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Name of the feed
-- Feed URL
-- Download retry attempts
-- Download retry backoff (in seconds)
-- Optional Username to use for authentication
-- Optional Password to use for authentication
-- Whether to use the extended API
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/feeds/delete-feed.mdx b/src/pages/docs/octopus-rest-api/examples/feeds/delete-feed.mdx
index 6393b35cd9..3e77d0d5f8 100644
--- a/src/pages/docs/octopus-rest-api/examples/feeds/delete-feed.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/feeds/delete-feed.mdx
@@ -1,27 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/feeds/delete-feed
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Delete a feed
-description: An example script that deletes an existing feed in Octopus using the REST API and Octopus.Client.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import DeleteFeedScripts from 'src/shared-content/scripts/delete-feed-scripts.include.md';
-
-This script demonstrates how to programmatically delete an existing feed in Octopus.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Name of the feed to delete
-
-:::div{.warning}
-**This script will delete the feed with the specified name. This operation is destructive and cannot be undone.**
-:::
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/feeds/download-package-from-builtin-feed.mdx b/src/pages/docs/octopus-rest-api/examples/feeds/download-package-from-builtin-feed.mdx
index 5780f4b6a7..58e1cdfbcf 100644
--- a/src/pages/docs/octopus-rest-api/examples/feeds/download-package-from-builtin-feed.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/feeds/download-package-from-builtin-feed.mdx
@@ -1,25 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/feeds/download-package-from-builtin-feed
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Download package from built-in feed
-description: An example script that downloads a package from the built-in feed.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import DownloadPackageScripts from 'src/shared-content/scripts/download-package-scripts.include.md';
-
-This script demonstrates how to programmatically download a package from the built-in Octopus feed.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Name of the package
-- Version of the package to download
-- The output folder to save the package to
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/feeds/get-feeds.md b/src/pages/docs/octopus-rest-api/examples/feeds/get-feeds.md
index c5b466199f..6f8e26819b 100644
--- a/src/pages/docs/octopus-rest-api/examples/feeds/get-feeds.md
+++ b/src/pages/docs/octopus-rest-api/examples/feeds/get-feeds.md
@@ -1,8 +1,9 @@
----
+---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/feeds/retrieve-feeds
-pubDate: 2023-01-01
+redirect: https://octopus.com/docs/api/examples/feeds/retrieve-feeds
+pubDate: 2023-01-01
+modDate: 2026-09-01
navSearch: false
navSitemap: false
navMenu: false
diff --git a/src/pages/docs/octopus-rest-api/examples/feeds/index.md b/src/pages/docs/octopus-rest-api/examples/feeds/index.md
index eda3c772a1..bdee561bcd 100644
--- a/src/pages/docs/octopus-rest-api/examples/feeds/index.md
+++ b/src/pages/docs/octopus-rest-api/examples/feeds/index.md
@@ -1,19 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/feeds
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Feeds
-description: This section includes examples of how to use the REST API to create and manage feeds in Octopus.
-navOrder: 100
-hideInThisSectionHeader: true
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-
-You can use the REST API to create and manage your [package repositories](/docs/packaging-applications/package-repositories) in Octopus. Typical tasks might include:
-
-- [Change feed](/docs/octopus-rest-api/examples/feeds/change-feed)
-- [Create a feed](/docs/octopus-rest-api/examples/feeds/create-feed)
-- [Delete a feed](/docs/octopus-rest-api/examples/feeds/delete-feed)
-- [Download package from built-in feed](/docs/octopus-rest-api/examples/feeds/download-package-from-builtin-feed)
-- [Push package to built-in feed](/docs/octopus-rest-api/examples/feeds/push-package-to-builtin-feed)
-- [Retrieve all feeds](/docs/octopus-rest-api/examples/feeds/retrieve-feeds)
-- [Synchronize packages](/docs/octopus-rest-api/examples/feeds/synchronize-packages)
diff --git a/src/pages/docs/octopus-rest-api/examples/feeds/push-package-to-builtin-feed.mdx b/src/pages/docs/octopus-rest-api/examples/feeds/push-package-to-builtin-feed.mdx
index 5c4b74cd0e..2afe49d9ec 100644
--- a/src/pages/docs/octopus-rest-api/examples/feeds/push-package-to-builtin-feed.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/feeds/push-package-to-builtin-feed.mdx
@@ -1,23 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/feeds/push-package-to-builtin-feed
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Push package to built-in feed
-description: An example script that pushes a package to the built-in feed.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import PushPackageScripts from 'src/shared-content/scripts/push-package-scripts.include.md';
-
-This script demonstrates how to programmatically push a package to the built-in Octopus feed.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Path to the package
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/feeds/retrieve-feeds.mdx b/src/pages/docs/octopus-rest-api/examples/feeds/retrieve-feeds.mdx
index 68cbf9d356..6f8e26819b 100644
--- a/src/pages/docs/octopus-rest-api/examples/feeds/retrieve-feeds.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/feeds/retrieve-feeds.mdx
@@ -1,22 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/feeds/retrieve-feeds
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Retrieve all feeds
-description: An example script that retrieves all feeds in Octopus.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import GetFeedsScripts from 'src/shared-content/scripts/get-feeds-scripts.include.md';
-
-This script demonstrates how to programmatically retrieve all feeds from a Space in Octopus.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/feeds/synchronize-packages.mdx b/src/pages/docs/octopus-rest-api/examples/feeds/synchronize-packages.mdx
index 6e1c62146b..7b0204e367 100644
--- a/src/pages/docs/octopus-rest-api/examples/feeds/synchronize-packages.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/feeds/synchronize-packages.mdx
@@ -1,68 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/feeds/synchronize-packages
pubDate: 2023-01-01
-modDate: 2024-06-13
-title: Synchronize packages
-description: An example script that synchronizes packages from the built-in feed between two spaces in Octopus using the REST API.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import SyncPackagesScripts from 'src/shared-content/scripts/sync-packages-scripts.include.md';
-
-This script synchronizes packages from the [built-in feed](/docs/packaging-applications/package-repositories/built-in-repository/) between two [spaces](/docs/administration/spaces). The spaces can be on the same Octopus instance, or in different instances.
-
-## Usage
-
-Provide values for:
-
-- `VersionSelection` - the version selection of packages to sync. Choose from:
- - **FileVersions** - sync versions specified in the file specified by the `Path` parameter.
- - **LatestVersion** - sync the latest version of packages in the built-in feed.
- - **AllVersions** - sync all versions of packages in the built-in feed.
-- `PackageListFilePath` - the path to a file containing details of the packages and versions to sync. The file input format is:
-
- ```json
- [
- {
- "Id": "WebApp1",
- "Versions": [
- "1.0.0",
- "1.0.1"
- ]
- },
- {
- "Id": "WebApp2",
- "Versions": [
- "1.0.0",
- "1.0.2"
- ]
- }
- ]
- ```
-
-- `SourceUrl` - Octopus URL used as the source for package synchronization.
-- `SourceApiKey` - Octopus API Key used with the source Octopus server.
-- `SourceSpace` - Name of the space to use from the source Octopus server.
-- `DestinationUrl` - Octopus URL used as the destination for package synchronization.
-- `DestinationApiKey` - Octopus API Key used with the destination Octopus server.
-- `DestinationSpace` - Name of the space to use for the destination Octopus server.
-- `CutOffDate` - *Optional* cut-off date for a package's published date to be included in the synchronization.
-
-### Example usage
-
-This example takes packages specified in the `packages.json` file, finding all versions found in the source Octopus instance which have a published date greater than `2021-02-11` and synchronizing them with the destination Octopus instance:
-
-```powershell
-./SyncPackages.ps1 `
--VersionSelection AllVersions `
--PackageListFilePath "packages.json" `
--SourceUrl https://source.octopus.app `
--SourceApiKey "API-SOURCEKEY" `
--SourceSpace "Default" `
--DestinationUrl https://destination.octopus.app `
--DestinationApiKey "API-DESTKEY" `
--DestinationSpace "Default" `
--CutOffDate (Get-Date "2021-02-11")
-```
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/get-steps-using-role.md b/src/pages/docs/octopus-rest-api/examples/get-steps-using-role.md
index 5ae81249aa..b4e92245e2 100644
--- a/src/pages/docs/octopus-rest-api/examples/get-steps-using-role.md
+++ b/src/pages/docs/octopus-rest-api/examples/get-steps-using-role.md
@@ -1,8 +1,9 @@
----
+---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/deployment-process/get-steps-using-role
-pubDate: 2023-01-01
+redirect: https://octopus.com/docs/api/examples/deployment-process/get-steps-using-role
+pubDate: 2023-01-01
+modDate: 2026-09-01
navSearch: false
navSitemap: false
navMenu: false
diff --git a/src/pages/docs/octopus-rest-api/examples/index.md b/src/pages/docs/octopus-rest-api/examples/index.md
index e40845e137..606bfdeb20 100644
--- a/src/pages/docs/octopus-rest-api/examples/index.md
+++ b/src/pages/docs/octopus-rest-api/examples/index.md
@@ -1,93 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: API examples
-description: A set of examples using the Octopus REST API to accomplish tasks.
-navOrder: 40
-hideInThisSectionHeader: true
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-
-As you work with the Octopus API, you may need some guidance on how to perform certain actions or what parameters to provide. The [OctopusDeploy-API GitHub repository](https://github.com/OctopusDeploy/OctopusDeploy-Api) contains many examples using the API, with solutions covering:
-
-- PowerShell using the REST API.
-- PowerShell using Octopus.Client.
-- C# using Octopus.Client.
-- Python using the REST API.
-- Go using the [Go API Client for Octopus Deploy](https://github.com/OctopusDeploy/go-octopusdeploy).
-- TypeScript using the [TypeScript API Client for Octopus Deploy](https://github.com/OctopusDeploy/api-client.ts).
-
-In addition, we also have a wide range of some of the more common examples here as well.
-
-## Using the scripts
-
-To use the example scripts, you'll need to provide your Octopus Server URL and an [API Key](/docs/octopus-rest-api/how-to-create-an-api-key). There may be other values that need to be updated to fit your scenario such as Space, Project, and Environment names.
-
-:::div{.hint}
-**The examples provided are for reference and should be modified and tested prior to using in a production Octopus instance.**
-:::
-
-### C# examples
-
-The C# examples are written using [dotnet script](https://github.com/filipw/dotnet-script). The same logic can be used in a standard C# application.
-
-### Octopus.Client examples
-
-Examples using [Octopus.Client](/docs/octopus-rest-api/octopus.client) require the library to be installed and a path to the library to be provided.
-
-### Python examples
-
-The Python examples are written using **Python 3** and use the [Requests](https://requests.readthedocs.io/en/master/) library. Some examples also use the [urllib](https://docs.python.org/3/library/urllib.html) module.
-
-### Go examples
-
-The Go examples are written using the [Go API Client for Octopus Deploy](https://github.com/OctopusDeploy/go-octopusdeploy).
-
-### Java examples
-
-The Java examples are written using the [java-octopus-deploy](https://github.com/OctopusDeployLabs/java-octopus-deploy) Client.
-
-The Java Client library requires **Java 1.8** or above.
-
-### TypeScript examples
-
-The TypeScript examples are written using the [TypeScript API Client for Octopus Deploy](https://github.com/OctopusDeploy/api-client.ts).
-
-## Bulk operations
-
-Sometimes you want to perform an action on a resource in Octopus multiple times. For example, connecting a tenant to all of your projects. Having to run a script that performs an operation once, repeatedly, can become tedious.
-
-To help with this, we've included examples of [bulk operations](/docs/octopus-rest-api/examples/bulk-operations) using the Octopus REST API.
-
-## Explore examples
-
-Explore the REST API examples further in this section:
-
-- [Accounts](/docs/octopus-rest-api/examples/accounts)
-- [Artifacts](/docs/octopus-rest-api/examples/artifacts)
-- [Certificates](/docs/octopus-rest-api/examples/certificates)
-- [Channels](/docs/octopus-rest-api/examples/channels)
-- [Deployment process](/docs/octopus-rest-api/examples/deployment-process)
-- [Deployment targets](/docs/octopus-rest-api/examples/deployment-targets)
-- [Deployments](/docs/octopus-rest-api/examples/deployments)
-- [Environments](/docs/octopus-rest-api/examples/environments)
-- [Events](/docs/octopus-rest-api/examples/events)
-- [Feeds](/docs/octopus-rest-api/examples/feeds)
-- [Lifecycles](/docs/octopus-rest-api/examples/lifecycles)
-- [Project Groups](/docs/octopus-rest-api/examples/project-groups)
-- [Projects](/docs/octopus-rest-api/examples/projects)
-- [Releases](/docs/octopus-rest-api/examples/releases)
-- [Reports](/docs/octopus-rest-api/examples/reports)
-- [Runbooks](/docs/octopus-rest-api/examples/runbooks)
-- [Spaces](/docs/octopus-rest-api/examples/spaces)
-- [Step Templates](/docs/octopus-rest-api/examples/step-templates)
-- [Tag sets](/docs/octopus-rest-api/examples/tagsets)
-- [Tasks](/docs/octopus-rest-api/examples/tasks)
-- [Tenants](/docs/octopus-rest-api/examples/tenants)
-- [Users and Teams](/docs/octopus-rest-api/examples/users-and-teams)
-- [Variables](/docs/octopus-rest-api/examples/variables)
-- [Bulk Operations](/docs/octopus-rest-api/examples/bulk-operations)
-
-## Get help from the community
-
-If you're looking for help with API scripts or want to share your own, join the [Octopus Community Slack channel](https://octopus.com/slack). It's a great place to get inspiration, ask questions, and connect with other Octopus users and employees.
diff --git a/src/pages/docs/octopus-rest-api/examples/lifecycles/create-lifecycle.mdx b/src/pages/docs/octopus-rest-api/examples/lifecycles/create-lifecycle.mdx
index 1d5fd0ed29..6aae2d4365 100644
--- a/src/pages/docs/octopus-rest-api/examples/lifecycles/create-lifecycle.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/lifecycles/create-lifecycle.mdx
@@ -1,23 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/lifecycles/create-lifecycle
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Create a lifecycle
-description: An example script that creates a lifecycle.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import CreateALifecycleScripts from 'src/shared-content/scripts/create-a-lifecycle-scripts.include.md';
-
-This script demonstrates how to programmatically create a lifecycle in Octopus Deploy.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Space ID of the space to use
-- Name of the lifecycle to create
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/lifecycles/index.md b/src/pages/docs/octopus-rest-api/examples/lifecycles/index.md
index a1cad14696..78e381a149 100644
--- a/src/pages/docs/octopus-rest-api/examples/lifecycles/index.md
+++ b/src/pages/docs/octopus-rest-api/examples/lifecycles/index.md
@@ -1,13 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/lifecycles
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Lifecycles
-description: This section includes examples of how to use the REST API to create and manage lifecycles in Octopus.
-navOrder: 110
-hideInThisSectionHeader: true
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-
-You can use the REST API to create and manage your [lifecycles](/docs/releases/lifecycles) in Octopus. Typical tasks can include:
-
-- [Create a lifecycle](/docs/octopus-rest-api/examples/lifecycles/create-lifecycle)
diff --git a/src/pages/docs/octopus-rest-api/examples/list-users-with-role.md b/src/pages/docs/octopus-rest-api/examples/list-users-with-role.md
index 5ead862cf1..047267ea7c 100644
--- a/src/pages/docs/octopus-rest-api/examples/list-users-with-role.md
+++ b/src/pages/docs/octopus-rest-api/examples/list-users-with-role.md
@@ -1,8 +1,9 @@
----
+---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/users-and-teams/list-users-with-role
-pubDate: 2023-01-01
+redirect: https://octopus.com/docs/api/examples/users-and-teams/list-users-with-role
+pubDate: 2023-01-01
+modDate: 2026-09-01
navSearch: false
navSitemap: false
navMenu: false
diff --git a/src/pages/docs/octopus-rest-api/examples/project-groups/create-projectgroup.mdx b/src/pages/docs/octopus-rest-api/examples/project-groups/create-projectgroup.mdx
index cb7e8eb4db..1c09c0b575 100644
--- a/src/pages/docs/octopus-rest-api/examples/project-groups/create-projectgroup.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/project-groups/create-projectgroup.mdx
@@ -1,23 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/project-groups/create-projectgroup
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Create a project group
-description: An example script that creates a project group.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import CreateProjectGroupScripts from 'src/shared-content/scripts/create-projectgroup-scripts.include.md';
-
-This script demonstrates how to programmatically create a project group in Octopus Deploy.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Space ID of the space to use
-- Name of the project group to create
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/project-groups/index.md b/src/pages/docs/octopus-rest-api/examples/project-groups/index.md
index bade42c72b..642beb54be 100644
--- a/src/pages/docs/octopus-rest-api/examples/project-groups/index.md
+++ b/src/pages/docs/octopus-rest-api/examples/project-groups/index.md
@@ -1,13 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/project-groups
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Project Groups
-description: This section includes examples of how to use the REST API to create and manage project groups in Octopus.
-navOrder: 120
-hideInThisSectionHeader: true
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-
-You can use the REST API to create and manage [project groups](/docs/projects/#project-group) in Octopus. Typical tasks can include:
-
-- [Create a project group](/docs/octopus-rest-api/examples/project-groups/create-projectgroup)
diff --git a/src/pages/docs/octopus-rest-api/examples/projects/coordinating-multiple-projects.mdx b/src/pages/docs/octopus-rest-api/examples/projects/coordinating-multiple-projects.mdx
index 3fcaa3cd1f..400ee2270a 100644
--- a/src/pages/docs/octopus-rest-api/examples/projects/coordinating-multiple-projects.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/projects/coordinating-multiple-projects.mdx
@@ -1,10 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/projects/coordinating-multiple-projects
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Coordinating multiple projects
-description: Script examples for working with data from multiple projects.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import ProjectCoordinationCodeSamples from 'src/shared-content/octopus-rest-api/project-coordination-code-samples.include.md';
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/projects/create-project.mdx b/src/pages/docs/octopus-rest-api/examples/projects/create-project.mdx
index cef9913695..ff280e33b8 100644
--- a/src/pages/docs/octopus-rest-api/examples/projects/create-project.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/projects/create-project.mdx
@@ -1,25 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/projects/create-project
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Create a project
-description: An example script that creates a project.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import CreateProjectScripts from 'src/shared-content/scripts/create-project-scripts.include.md';
-
-This script demonstrates how to programmatically create a project in Octopus Deploy.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Name of the project
-- Name of the project group to add the project to
-- Name of the lifecycle to use for the project
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/projects/delete-project.mdx b/src/pages/docs/octopus-rest-api/examples/projects/delete-project.mdx
index 75e16c81a7..4a8ab57bcb 100644
--- a/src/pages/docs/octopus-rest-api/examples/projects/delete-project.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/projects/delete-project.mdx
@@ -1,27 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/projects/delete-project
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Delete a project
-description: An example script that deletes a project.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import DeleteProjectByNameScripts from 'src/shared-content/scripts/delete-project-by-name-scripts.include.md';
-
-This script demonstrates how to programmatically delete a project in Octopus Deploy.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Name of the project
-
-:::div{.warning}
-**This script will delete the project with the specified name. This operation is destructive and cannot be undone. Ensure you have a database backup and take care when running this script or one based on it**
-:::
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/projects/delete-projects-with-empty-processes.mdx b/src/pages/docs/octopus-rest-api/examples/projects/delete-projects-with-empty-processes.mdx
index 6fc029c80f..ae8cd38ce1 100644
--- a/src/pages/docs/octopus-rest-api/examples/projects/delete-projects-with-empty-processes.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/projects/delete-projects-with-empty-processes.mdx
@@ -1,24 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/projects/delete-projects-with-empty-processes
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Delete projects with no process
-description: An example script that deletes projects that have no deployment process in Octopus using the REST API and Octopus.Client.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import DeleteProjectsWithoutProcessesScripts from 'src/shared-content/scripts/delete-projects-without-processes-scripts.include.md';
-
-This script demonstrates how to programmatically delete projects with no deployment process in Octopus Deploy.
-
-## Usage
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-
-:::div{.warning}
-**This script will delete projects with no deployment process. This operation is destructive and cannot be undone. Ensure you have a database backup and take care when running this script or one based on it**
-:::
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/projects/disable-project-triggers.mdx b/src/pages/docs/octopus-rest-api/examples/projects/disable-project-triggers.mdx
index b1591155a4..1afe93b86f 100644
--- a/src/pages/docs/octopus-rest-api/examples/projects/disable-project-triggers.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/projects/disable-project-triggers.mdx
@@ -1,23 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/projects/disable-project-triggers
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Disable project triggers
-description: An example script that disables a project's triggers in Octopus using the REST API and Octopus.Client.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import DisableProjectTriggersScripts from 'src/shared-content/scripts/disable-project-triggers-scripts.include.md';
-
-This script demonstrates how to programmatically disable triggers for a project in Octopus Deploy.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Name of the project
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/projects/enable-disable-project.mdx b/src/pages/docs/octopus-rest-api/examples/projects/enable-disable-project.mdx
index cea4ff93f1..53556c0bd2 100644
--- a/src/pages/docs/octopus-rest-api/examples/projects/enable-disable-project.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/projects/enable-disable-project.mdx
@@ -1,24 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/projects/enable-disable-project
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Deactivate projects
-description: An example script that enables or disables a project in Octopus.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import EnableDisableProjectScripts from 'src/shared-content/scripts/enable-disable-project-scripts.include.md';
-
-This script demonstrates how to programmatically enable or disable an Octopus [project](/docs/projects).
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Name of the project
-- Boolean value for enabled
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/projects/export-projects.mdx b/src/pages/docs/octopus-rest-api/examples/projects/export-projects.mdx
index 213ea5cb34..669c63a134 100644
--- a/src/pages/docs/octopus-rest-api/examples/projects/export-projects.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/projects/export-projects.mdx
@@ -1,35 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/projects/export-projects
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Export projects
-description: An example script that will export projects that can be imported into a different space on the same, or different Octopus instance.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import ExportProjectsScripts from 'src/shared-content/scripts/export-projects-scripts.include.md';
-
-This script will export projects from an Octopus space that can be imported into a different space on the same instance or a separate Octopus instance.
-
-:::div{.hint}
-**Note:**
-Please note there are some items to consider before using this script:
-
-- This script uses an API endpoint introduced in **Octopus 2021.1** for the [Export/Import Projects feature](/docs/projects/export-import). Using this script in earlier versions of Octopus will not work.
-- Automating the export of projects as part of a backup/restore process is **not recommended**. See our [supported scenarios](/docs/projects/export-import/#scenarios) when using the API from this feature.
-
-:::
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space where the projects to be exported can be found
-- A list of project names to be exported
-- A password to protect sensitive values in the exported data
-- Boolean whether or not to wait for the export task to finish
- - Timeout in seconds to wait before attempting to cancel the task.
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/projects/find-unused-projects.mdx b/src/pages/docs/octopus-rest-api/examples/projects/find-unused-projects.mdx
index 9afdb32fc6..c94a012940 100644
--- a/src/pages/docs/octopus-rest-api/examples/projects/find-unused-projects.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/projects/find-unused-projects.mdx
@@ -1,28 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/projects/find-unused-projects
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Find unused projects
-description: An example script that will find any project that hasn't had a release created in the previous days
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import FindUnusedProjects from 'src/shared-content/scripts/find-unused-projects.include.md';
-
-This script will search for projects who haven't had a release created in the previous set number of days.
-
-Please note, this script will exclude projects:
-
-- Without *any* releases.
-- Projects already disabled.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Disable Old Projects - indicates if the projects should be set to disabled, default is $false
-- Days Since Last Release - the number of days to allow before considering the project is inactive, default is 90
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/projects/import-projects.mdx b/src/pages/docs/octopus-rest-api/examples/projects/import-projects.mdx
index b18e29b84b..07b7c3774b 100644
--- a/src/pages/docs/octopus-rest-api/examples/projects/import-projects.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/projects/import-projects.mdx
@@ -1,36 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/projects/import-projects
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Import projects
-description: An example script that will import projects from a previously executed export task from another space on an Octopus instance.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import ImportProjectsScripts from 'src/shared-content/scripts/import-projects-scripts.include.md';
-
-This script demonstrates how you can import projects into an Octopus space. It uses a previously executed export task from another space as the source for the import.
-
-:::div{.hint}
-**Note:**
-Please note there are some items to consider before using this script:
-
-- This script uses an API endpoint introduced in **Octopus 2021.1** for the [Export/Import Projects feature](/docs/projects/export-import). Using this script in earlier versions of Octopus will not work.
-- Automating the import of projects as part of a backup/restore process is **not recommended**. See our [supported scenarios](/docs/projects/export-import/#scenarios) when using the API from this feature.
-
-:::
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space where the projects were exported from
-- Name of the space where the projects are to be exported into
-- The export Server Task Id to use as the source for import e.g. `ServerTasks-12345`
-- The password used to protect sensitive values in the exported data
-- Boolean whether or not to wait for the import task to finish
- - Timeout in seconds to wait before attempting to cancel the task.
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/projects/index.md b/src/pages/docs/octopus-rest-api/examples/projects/index.md
index f04faafde9..df76443eef 100644
--- a/src/pages/docs/octopus-rest-api/examples/projects/index.md
+++ b/src/pages/docs/octopus-rest-api/examples/projects/index.md
@@ -1,21 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/projects
pubDate: 2023-01-01
-modDate: 2023-07-04
-title: Projects
-description: This section includes examples of how to use the REST API to create and manage projects in Octopus.
-navOrder: 130
-hideInThisSectionHeader: true
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-
-You can use the REST API to create and manage your Octopus [projects](/docs/projects). Typical tasks can include:
-
-- [Coordinating multiple projects](/docs/octopus-rest-api/examples/projects/coordinating-multiple-projects)
-- [Create a project](/docs/octopus-rest-api/examples/projects/create-project)
-- [Delete a project](/docs/octopus-rest-api/examples/projects/delete-project)
-- [Delete projects with no process](/docs/octopus-rest-api/examples/projects/delete-projects-with-empty-processes)
-- [Disable project triggers](/docs/octopus-rest-api/examples/projects/disable-project-triggers)
-- [Enable/disable project](/docs/octopus-rest-api/examples/projects/enable-disable-project)
-- [Export projects](/docs/octopus-rest-api/examples/projects/export-projects)
-- [Find unused projects](/docs/octopus-rest-api/examples/projects/find-unused-projects)
-- [Import projects](/docs/octopus-rest-api/examples/projects/import-projects)
diff --git a/src/pages/docs/octopus-rest-api/examples/publish-runbook.md b/src/pages/docs/octopus-rest-api/examples/publish-runbook.md
index 685b8a5f22..338d0e85e1 100644
--- a/src/pages/docs/octopus-rest-api/examples/publish-runbook.md
+++ b/src/pages/docs/octopus-rest-api/examples/publish-runbook.md
@@ -1,8 +1,9 @@
----
+---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/runbooks/publish-runbook
-pubDate: 2023-01-01
+redirect: https://octopus.com/docs/api/examples/runbooks/publish-runbook
+pubDate: 2023-01-01
+modDate: 2026-09-01
navSearch: false
navSitemap: false
navMenu: false
diff --git a/src/pages/docs/octopus-rest-api/examples/register-listening-tentacle.md b/src/pages/docs/octopus-rest-api/examples/register-listening-tentacle.md
index 0f27819d3d..11bb9ee269 100644
--- a/src/pages/docs/octopus-rest-api/examples/register-listening-tentacle.md
+++ b/src/pages/docs/octopus-rest-api/examples/register-listening-tentacle.md
@@ -1,8 +1,9 @@
----
+---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/deployment-targets/register-listening-tentacle
-pubDate: 2023-01-01
+redirect: https://octopus.com/docs/api/examples/deployment-targets/register-listening-tentacle
+pubDate: 2023-01-01
+modDate: 2026-09-01
navSearch: false
navSitemap: false
navMenu: false
diff --git a/src/pages/docs/octopus-rest-api/examples/register-polling-tentacle.md b/src/pages/docs/octopus-rest-api/examples/register-polling-tentacle.md
index 51bedb4469..cc900a13d0 100644
--- a/src/pages/docs/octopus-rest-api/examples/register-polling-tentacle.md
+++ b/src/pages/docs/octopus-rest-api/examples/register-polling-tentacle.md
@@ -1,8 +1,9 @@
----
+---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/deployment-targets/register-polling-tentacle
-pubDate: 2023-01-01
+redirect: https://octopus.com/docs/api/examples/deployment-targets/register-polling-tentacle
+pubDate: 2023-01-01
+modDate: 2026-09-01
navSearch: false
navSitemap: false
navMenu: false
diff --git a/src/pages/docs/octopus-rest-api/examples/releases/create-release-with-specific-version.mdx b/src/pages/docs/octopus-rest-api/examples/releases/create-release-with-specific-version.mdx
index 1c7218fd95..a1f8d8ad58 100644
--- a/src/pages/docs/octopus-rest-api/examples/releases/create-release-with-specific-version.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/releases/create-release-with-specific-version.mdx
@@ -1,25 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/releases/create-release-with-specific-version
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Create a release with specific version
-description: An example script that creates a release with a specific version number.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import CreateReleaseWithVersionScripts from 'src/shared-content/scripts/create-release-with-version-scripts.include.md';
-
-This script demonstrates how to programmatically create a release with a specified version number.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Name of the project
-- Name of the channel
-- Version number of the release to create
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/releases/delete-project-releases.mdx b/src/pages/docs/octopus-rest-api/examples/releases/delete-project-releases.mdx
index ade6151640..7d4dad7ceb 100644
--- a/src/pages/docs/octopus-rest-api/examples/releases/delete-project-releases.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/releases/delete-project-releases.mdx
@@ -1,27 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/releases/delete-project-releases
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Delete project releases
-description: An example script that deletes releases for a project.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import DeleteProjectReleasesScripts from 'src/shared-content/scripts/delete-project-releases-scripts.include.md';
-
-This script demonstrates how to programmatically delete releases for a project.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Name of the project
-
-:::div{.warning}
-**This script will delete all releases for a given project. This operation is destructive and cannot be undone. Ensure you have a database backup and take care when running this script or one based on it**
-:::
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/releases/index.md b/src/pages/docs/octopus-rest-api/examples/releases/index.md
index 78b903c5db..40c27ee482 100644
--- a/src/pages/docs/octopus-rest-api/examples/releases/index.md
+++ b/src/pages/docs/octopus-rest-api/examples/releases/index.md
@@ -1,15 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/releases
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Releases
-description: This section includes examples of how to use the REST API to create and manage releases in Octopus.
-navOrder: 140
-hideInThisSectionHeader: true
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-You can use the REST API to create and manage your Octopus [releases](/docs/releases). Typical tasks can include:
-
-- [Create a release with specific version](/docs/octopus-rest-api/examples/releases/create-release-with-specific-version)
-- [Delete project releases](/docs/octopus-rest-api/examples/releases/delete-project-releases)
-- [Promote a release not in the destination](/docs/octopus-rest-api/examples/releases/promote-release-not-in-destination)
-- [Update release variable snapshot](/docs/octopus-rest-api/examples/releases/update-release-variable-snapshot)
diff --git a/src/pages/docs/octopus-rest-api/examples/releases/promote-release-not-in-destination.mdx b/src/pages/docs/octopus-rest-api/examples/releases/promote-release-not-in-destination.mdx
index 161d624866..c63f0e56d9 100644
--- a/src/pages/docs/octopus-rest-api/examples/releases/promote-release-not-in-destination.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/releases/promote-release-not-in-destination.mdx
@@ -1,25 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/releases/promote-release-not-in-destination
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Promote a release not in the destination
-description: An example script that will promote a release if it is not in the destination.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import PromoteReleasesNotInDestination from 'src/shared-content/scripts/promote-releases-not-in-destination.include.md';
-
-This script demonstrates how to programmatically find the latest deployment in each environment and compare releases. If they don't match then promote the release to the next environment.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Comma separated list of projects
-- Source Environment Name
-- Destination Environment Name
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/releases/update-release-variable-snapshot.mdx b/src/pages/docs/octopus-rest-api/examples/releases/update-release-variable-snapshot.mdx
index 280287706b..3c183d9d2d 100644
--- a/src/pages/docs/octopus-rest-api/examples/releases/update-release-variable-snapshot.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/releases/update-release-variable-snapshot.mdx
@@ -1,25 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/releases/update-release-variable-snapshot
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Update release variable snapshot
-description: An example script that updates the variable snapshot for a release.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import UpdateReleaseVariableShapshotScripts from 'src/shared-content/scripts/update-release-variable-snapshot-scripts.include.md';
-
-This script demonstrates how to programmatically update the variable snapshot for a release.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Name of the project
-- Name of the channel
-- Version of the release
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/replace-certificate.md b/src/pages/docs/octopus-rest-api/examples/replace-certificate.md
index 9dc542eeea..27f3aea62f 100644
--- a/src/pages/docs/octopus-rest-api/examples/replace-certificate.md
+++ b/src/pages/docs/octopus-rest-api/examples/replace-certificate.md
@@ -1,8 +1,9 @@
----
+---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/certificates/replace-certificate
-pubDate: 2023-01-01
+redirect: https://octopus.com/docs/api/examples/certificates/replace-certificate
+pubDate: 2023-01-01
+modDate: 2026-09-01
navSearch: false
navSitemap: false
navMenu: false
diff --git a/src/pages/docs/octopus-rest-api/examples/reports/deployments-per-target-role-report.mdx b/src/pages/docs/octopus-rest-api/examples/reports/deployments-per-target-role-report.mdx
index 220cad7032..d0a808451b 100644
--- a/src/pages/docs/octopus-rest-api/examples/reports/deployments-per-target-role-report.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/reports/deployments-per-target-role-report.mdx
@@ -1,29 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/reports/deployments-per-target-role-report
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Deployments Per Deployment Target Role Report
-description: An example script that will provide a list of all the deployment targets in a given role and their respective deployments.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import DeploymentsPerTargetRoleReport from 'src/shared-content/scripts/deployments-per-target-role-report.include.md';
-
-The Octopus Web Portal allows you to see what deployments have gone out to a specific deployment target, but it doesn't provide you with a list of deployments for all the deployment targets in a role. This script demonstrates how to generate such a report.
-
-:::figure
-
-:::
-
-**Please note:** The report is generated as a CSV file, formatting was added to the screenshot to make it easier to read.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Report Path
-- Space Name
-- Target Role
-- Days to Query
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/reports/environment-permissions-report.mdx b/src/pages/docs/octopus-rest-api/examples/reports/environment-permissions-report.mdx
index 821b42dbf4..2e5f3b888f 100644
--- a/src/pages/docs/octopus-rest-api/examples/reports/environment-permissions-report.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/reports/environment-permissions-report.mdx
@@ -1,40 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/reports/environment-permissions-report
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Environment permissions report
-description: An example script that will provide a report of which users have access to a specific permission for a specific environment.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import EnvironmentPermissionsReport from 'src/shared-content/scripts/environment-permissions-report.include.md';
-
-The Octopus Web Portal provides the ability to see the permissions from a user's point of view. This script demonstrates how to generate a report for a specific permission for specific environments. For example, what users have permissions to deploy to **Production.**
-
-This report will look for teams scoped to a role with a specific environment (Production) or no environments. For example, you want to find out all the users who have permissions to deploy to **Production**. If a user is on a team scoped to the role `Deployment Creator` with no environments that user will show up in the report with an environment scoping of **All** because they have permissions to deploy to **Production**.
-
-:::figure
-
-:::
-
-**Please note:** The report is generated as a CSV file, formatting was added to the screenshot to make it easier to read.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Report Path
-- Space Filter
-- Environment Filter
-- User Filter
-- Permission Name
-
-The filters allow you to choose which space(s), project(s), and user(s) to generate a report for. They all have the same features.
-
-- `all` will return the results for all spaces/environments.
-- Wildcard or `*` will return all spaces/environments matching the wildcard search.
-- Specific name will only show the exact matching spaces/environments.
-
-The filters support comma-separated entries. Setting the Environment Filter to `Test,Prod*` will find all environments with the display name of `Test` or that start with `Prod`.
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/reports/index.md b/src/pages/docs/octopus-rest-api/examples/reports/index.md
index e90d7267b5..973964767e 100644
--- a/src/pages/docs/octopus-rest-api/examples/reports/index.md
+++ b/src/pages/docs/octopus-rest-api/examples/reports/index.md
@@ -1,19 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/reports
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Generate reports with the Octopus REST API
-navTitle: Reports
-description: This section includes examples of how to use the REST API to generate comma separated reports using the Octopus Deploy API.
-navOrder: 150
-hideInThisSectionHeader: true
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-
-You can use the Octopus Deploy REST API to generate a number of reports.
-
-All the reports in this section will include:
-
-- 1 to N number of filters to filter out unwanted data.
-- Output results to a file (typically `.csv`) to store or share with others.
-
-Provided sample reports are:
diff --git a/src/pages/docs/octopus-rest-api/examples/reports/project-permissions-report.mdx b/src/pages/docs/octopus-rest-api/examples/reports/project-permissions-report.mdx
index ed55ca949e..8a07248806 100644
--- a/src/pages/docs/octopus-rest-api/examples/reports/project-permissions-report.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/reports/project-permissions-report.mdx
@@ -1,53 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/reports/project-permissions-report
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Project permissions report
-description: An example script that will provide a report of which users have access to specific projects.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import ProjectPermissionsReport from 'src/shared-content/scripts/project-permissions-report.include.md';
-
-The Octopus Web Portal provides the ability to see the permissions from a user's point of view. This script demonstrates how to generate a report of permissions from a project's point of view.
-
-:::figure
-
-:::
-
-**Please note:** The report is generated as a CSV file, formatting was added to the screenshot to make it easier to read.
-
-A user could be assigned to multiple teams with multiple role scopes. This script will determine the "most permissive" role scoping and display that. For example:
-
-- User A is assigned to Team B that has permissions to deploy to **Production**.
-- User A is assigned to Team C that has permissions to deploy to any environment.
-
-The report should show the user has permissions to deploy to any environment.
-
-The report will also combine environment and tenant scoping. For example:
-
-- User A is assigned to Team B that has permissions to deploy to **Production**.
-- User A is assigned to Team C that has permissions to deploy to **Staging**.
-
-The report should show the user has permissions to deploy to **Staging;Production**.
-
-Finally, if a user is scoped to an environment or tenant that is *not* associated with the project then that scoping is excluded from the report.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Report Path
-- Space Filter
-- Project Filter
-- User Filter
-
-The filters allow you to choose which space(s), project(s), and user(s) to generate a report for. They all have the same features.
-
-- `all` will return the results for all spaces/projects/users.
-- Wildcard or `*` will return all spaces/projects/users matching the wildcard search.
-- Specific name will only show the exact matching spaces/projects/users.
-
-The filters support comma-separated entries. Setting the User Filter to `Test,Bob*` will find all users with the display name of `Test` or that start with `Bob`.
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/reports/project-release-deployment-targets-report.mdx b/src/pages/docs/octopus-rest-api/examples/reports/project-release-deployment-targets-report.mdx
index 05796a7952..5784c4318b 100644
--- a/src/pages/docs/octopus-rest-api/examples/reports/project-release-deployment-targets-report.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/reports/project-release-deployment-targets-report.mdx
@@ -1,29 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/reports/project-release-deployment-targets-report
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Project Release Deployment Targets Report
-description: An example script that will provide a list of all the deployments and deployment targets deployed to.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import ProjectDeploymentTargetsReport from 'src/shared-content/scripts/project-deployment-targets-report.include.md';
-
-The Octopus Web Portal allows you to see what deployments have gone out to a specific deployment target, but it doesn't provide you with a list of deployment targets for each deployment. This script demonstrates how to generate a report of the deployment targets for a specific release version for a project.
-
-:::figure
-
-:::
-
-**Please note:** The report is generated as a CSV file, formatting was added to the screenshot to make it easier to read.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Report Path
-- Space Name
-- Project Name
-- Release Version
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/run-runbook.md b/src/pages/docs/octopus-rest-api/examples/run-runbook.md
index 861c0cc71c..c7eeefda46 100644
--- a/src/pages/docs/octopus-rest-api/examples/run-runbook.md
+++ b/src/pages/docs/octopus-rest-api/examples/run-runbook.md
@@ -1,8 +1,9 @@
----
+---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/runbooks/run-runbook
-pubDate: 2023-01-01
+redirect: https://octopus.com/docs/api/examples/runbooks/run-runbook
+pubDate: 2023-01-01
+modDate: 2026-09-01
navSearch: false
navSitemap: false
navMenu: false
diff --git a/src/pages/docs/octopus-rest-api/examples/runbooks/add-script-step-to-runbook.mdx b/src/pages/docs/octopus-rest-api/examples/runbooks/add-script-step-to-runbook.mdx
index 8958ac080b..4a137dc4ae 100644
--- a/src/pages/docs/octopus-rest-api/examples/runbooks/add-script-step-to-runbook.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/runbooks/add-script-step-to-runbook.mdx
@@ -1,29 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/runbooks/add-script-step-to-runbook
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Add a script step to runbook
-description: An example script that adds a simple PowerShell script to a runbook.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import AddScriptStepToRunbookScripts from 'src/shared-content/scripts/add-script-step-to-runbook-scripts.include.md';
-
-This script demonstrates how to programmatically add a simple PowerShell script to a runbook.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Name of the runbook
-- Source PowerShell script
-- *Optional* Target role to run the script against.
-
-:::div{.hint}
-**Note:** The source script provided to Octopus must be properly escaped.
-:::
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/runbooks/create-and-publish-runbook.mdx b/src/pages/docs/octopus-rest-api/examples/runbooks/create-and-publish-runbook.mdx
index 5d46c34c23..f5d70fc444 100644
--- a/src/pages/docs/octopus-rest-api/examples/runbooks/create-and-publish-runbook.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/runbooks/create-and-publish-runbook.mdx
@@ -1,24 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/runbooks/create-and-publish-runbook
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Create and publish a new runbook snapshot
-description: An example script to create and publish a new runbook snapshot
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import CreateAndPublishRunbookScripts from 'src/shared-content/scripts/create-and-publish-runbook-scripts.include.md';
-
-This script demonstrates how to programmatically create a new runbook snapshot and publish it for use by runbook consumers. If the runbook references any packages from the [Octopus built-in repository](/docs/packaging-applications/package-repositories/built-in-repository), then the latest package versions will be included in the snapshot.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to work with
-- Name of the project with the runbook
-- Name of the runbook
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/runbooks/create-runbook.mdx b/src/pages/docs/octopus-rest-api/examples/runbooks/create-runbook.mdx
index 69f067e662..5bc9e53b68 100644
--- a/src/pages/docs/octopus-rest-api/examples/runbooks/create-runbook.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/runbooks/create-runbook.mdx
@@ -1,24 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/runbooks/create-runbook
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Create a runbook
-description: An example script that creates a runbook.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import CreateRunbookScripts from 'src/shared-content/scripts/create-runbook-scripts.include.md';
-
-This script demonstrates how to programmatically create a runbook.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Name of the project
-- Name of the runbook to create
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/runbooks/create-scheduled-runbook-trigger.mdx b/src/pages/docs/octopus-rest-api/examples/runbooks/create-scheduled-runbook-trigger.mdx
index 4f265b5d37..dec8576085 100644
--- a/src/pages/docs/octopus-rest-api/examples/runbooks/create-scheduled-runbook-trigger.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/runbooks/create-scheduled-runbook-trigger.mdx
@@ -1,30 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/runbooks/create-scheduled-runbook-trigger
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Create a new scheduled runbook trigger
-description: An example script to create and publish a new runbook scheduled trigger
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import CreateScheduledRunbookTriggerScripts from 'src/shared-content/scripts/create-scheduled-runbook-trigger-scripts.include.md';
-
-This script demonstrates how to programmatically create a new [scheduled runbook trigger](/docs/runbooks/scheduled-runbook-trigger). The trigger will run once a day at the time specified, on the days specified, in the timezone chosen (default is `GMT Standard Time`).
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to work with
-- Name of the project with the runbook
-- Name of the runbook
-- Name of the scheduled trigger
-- Description of the scheduled trigger
-- List of environments to run the runbook in
-- Timezone for the schedule
-- List of the days of week to run the trigger on
-- The time to run the trigger each day, provided in the format `yyyy-MM-ddTHH:mm:ss.fffZ`. For example, `2021-07-22T09:00:00.000Z`.
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/runbooks/index.md b/src/pages/docs/octopus-rest-api/examples/runbooks/index.md
index 2985415453..9ca47fffbf 100644
--- a/src/pages/docs/octopus-rest-api/examples/runbooks/index.md
+++ b/src/pages/docs/octopus-rest-api/examples/runbooks/index.md
@@ -1,18 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/runbooks
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Runbooks
-description: This section includes examples of how to use the REST API to create and manage runbooks in Octopus.
-navOrder: 160
-hideInThisSectionHeader: true
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-You can use the REST API to create and manage your Octopus [runbooks](/docs/runbooks). Typical tasks can include:
-
-- [Add a script step to runbook](/docs/octopus-rest-api/examples/runbooks/add-script-step-to-runbook)
-- [Create and publish a new runbook snapshot](/docs/octopus-rest-api/examples/runbooks/create-and-publish-runbook)
-- [Create a runbook](/docs/octopus-rest-api/examples/runbooks/create-runbook)
-- [Create a new scheduled runbook trigger](/docs/octopus-rest-api/examples/runbooks/create-scheduled-runbook-trigger)
-- [Publish a runbook snapshot](/docs/octopus-rest-api/examples/runbooks/publish-runbook)
-- [Run a runbook with prompted variables](/docs/octopus-rest-api/examples/runbooks/run-runbook-with-prompted-variables)
-- [Run a published runbook](/docs/octopus-rest-api/examples/runbooks/run-runbook)
diff --git a/src/pages/docs/octopus-rest-api/examples/runbooks/publish-runbook.mdx b/src/pages/docs/octopus-rest-api/examples/runbooks/publish-runbook.mdx
index 2eccdd6c2a..338d0e85e1 100644
--- a/src/pages/docs/octopus-rest-api/examples/runbooks/publish-runbook.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/runbooks/publish-runbook.mdx
@@ -1,25 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/runbooks/publish-runbook
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Publish a runbook snapshot
-description: An example script to publish an existing runbook snapshot
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import PublishRunbookScripts from 'src/shared-content/scripts/publish-runbook-scripts.include.md';
-
-This script demonstrates how to programmatically publish an *existing* runbook snapshot. To learn how to create a new snapshot and publish it see [this example](/docs/octopus-rest-api/examples/runbooks/create-and-publish-runbook).
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to work with
-- Name of the project with the runbook
-- Name of the runbook
-- Name of the snapshot to publish
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/runbooks/run-runbook-with-prompted-variables.mdx b/src/pages/docs/octopus-rest-api/examples/runbooks/run-runbook-with-prompted-variables.mdx
index 5254323330..5610320114 100644
--- a/src/pages/docs/octopus-rest-api/examples/runbooks/run-runbook-with-prompted-variables.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/runbooks/run-runbook-with-prompted-variables.mdx
@@ -1,39 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/runbooks/run-runbook-with-prompted-variables
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Run a runbook with prompted variables
-description: An example script to run a runbook with prompted variables.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import RunARunbookWithPromptedVariables from 'src/shared-content/scripts/run-a-runbook-with-prompted-variables.include.md';
-
-This script demonstrates how to programmatically run a runbook when the runbook has prompted variables. It will also wait for the runbook run to complete.
-
-## Usage
-
-Provide values for the following:
-
-- Runbook Base URL
-- Runbook API Key
-- Name of the space
-- Name of the project
-- Name of the runbook
-- Name of the environment
-- Wait for finish
-- Use guided failure mode
-- Use a published snapshot only
-- Cancel in seconds
-- Prompted variables
-
-### Prompted variable format
-
-In the PowerShell script the prompted variables should be provided in the format `Name::Value` with a new line separating them:
-
-```text
-PromptedVariableName::My Super Awesome Value
-OtherPromptedVariable::Other Super Awesome Value
-```
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/runbooks/run-runbook.mdx b/src/pages/docs/octopus-rest-api/examples/runbooks/run-runbook.mdx
index adb6219c62..c7eeefda46 100644
--- a/src/pages/docs/octopus-rest-api/examples/runbooks/run-runbook.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/runbooks/run-runbook.mdx
@@ -1,26 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/runbooks/run-runbook
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Run a published runbook
-description: An example script to run a published runbook.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import RunRunbookScripts from 'src/shared-content/scripts/run-runbook-scripts.include.md';
-
-This script demonstrates how to programmatically run a published runbook.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space
-- Name of the project
-- Name of the runbook
-- Array of environment names
-- *Optional* tenant name
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/spaces/add-a-space-with-environments.mdx b/src/pages/docs/octopus-rest-api/examples/spaces/add-a-space-with-environments.mdx
index 5593ede404..efe595cd45 100644
--- a/src/pages/docs/octopus-rest-api/examples/spaces/add-a-space-with-environments.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/spaces/add-a-space-with-environments.mdx
@@ -1,28 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/spaces/add-a-space-with-environments
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Add a Space with environments
-description: An example script to create a new space and populate it with some default environments.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import AddASpaceWithEnvironmentsScripts from 'src/shared-content/scripts/add-a-space-with-environments-scripts.include.md';
-
-This script is a starter for bootstrapping a new [Space](/docs/administration/spaces) in your Octopus instance.
-
-It creates a new space with the provided name, description, and managers. At least one manager team or member must be provided.
-
-Then the script will create the [Environments](/docs/infrastructure/environments) provided in the newly created space.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Space Name
-- Environments
-- A combination of Manager Teams and Manager Team Members
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/spaces/delete-a-space.mdx b/src/pages/docs/octopus-rest-api/examples/spaces/delete-a-space.mdx
index b53ea32be7..34ec2c5949 100644
--- a/src/pages/docs/octopus-rest-api/examples/spaces/delete-a-space.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/spaces/delete-a-space.mdx
@@ -1,26 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/spaces/delete-a-space
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Delete a Space
-description: An example script to delete a space.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import DeleteASpaceScripts from 'src/shared-content/scripts/delete-a-space-scripts.include.md';
-
-This script deletes a [Space](/docs/administration/spaces) from your Octopus instance.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Space Name to delete the space with the given name.
-
-:::div{.warning}
-**Be very careful when deleting a Space. This operation is destructive and cannot be undone.**
-:::
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/spaces/index.md b/src/pages/docs/octopus-rest-api/examples/spaces/index.md
index bfb11579f9..7048f838e9 100644
--- a/src/pages/docs/octopus-rest-api/examples/spaces/index.md
+++ b/src/pages/docs/octopus-rest-api/examples/spaces/index.md
@@ -1,13 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/spaces
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Spaces
-description: This section includes examples of how to use the REST API to create and manage spaces in Octopus.
-navOrder: 170
-hideInThisSectionHeader: true
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-You can use the REST API to create and manage your Octopus [Spaces](/docs/administration/spaces). Typical tasks can include:
-
-- [Add a Space with environments](/docs/octopus-rest-api/examples/spaces/add-a-space-with-environments)
-- [Delete a Space](/docs/octopus-rest-api/examples/spaces/delete-a-space)
diff --git a/src/pages/docs/octopus-rest-api/examples/step-templates/export-step-templates.mdx b/src/pages/docs/octopus-rest-api/examples/step-templates/export-step-templates.mdx
index 6ed19757b9..8168e09831 100644
--- a/src/pages/docs/octopus-rest-api/examples/step-templates/export-step-templates.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/step-templates/export-step-templates.mdx
@@ -1,22 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/step-templates/export-step-templates
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Export step templates
-description: An example script that exports all step templates in a Space to files.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import ExportStepTemplatesScripts from 'src/shared-content/scripts/export-step-templates-scripts.include.md';
-
-This script demonstrates how to export all step templates in a Space to files.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the Space to use
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/step-templates/index.md b/src/pages/docs/octopus-rest-api/examples/step-templates/index.md
index 2620e3a5a3..40de7eed71 100644
--- a/src/pages/docs/octopus-rest-api/examples/step-templates/index.md
+++ b/src/pages/docs/octopus-rest-api/examples/step-templates/index.md
@@ -1,12 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/step-templates
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Step Templates
-description: This section includes examples of how to use the REST API to create and manage step templates in Octopus.
-navOrder: 180
-hideInThisSectionHeader: true
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-You can use the REST API to create and manage your Octopus [step templates](/docs/projects/custom-step-templates). Typical tasks can include:
-
-- [Export step templates](/docs/octopus-rest-api/examples/step-templates/export-step-templates)
diff --git a/src/pages/docs/octopus-rest-api/examples/tagsets/create-tagset.mdx b/src/pages/docs/octopus-rest-api/examples/tagsets/create-tagset.mdx
index ca7ae18585..eba091c595 100644
--- a/src/pages/docs/octopus-rest-api/examples/tagsets/create-tagset.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/tagsets/create-tagset.mdx
@@ -1,33 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/tagsets/create-tagset
pubDate: 2023-01-01
-modDate: 2025-10-08
-title: Create a tag set
-description: An example script that creates a tag set in Octopus Deploy.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import CreateTagsetScripts from 'src/shared-content/scripts/create-tagset-scripts.include.md';
-
-This script demonstrates how to programmatically create a tag set in Octopus Deploy.
-
-:::div{.hint}
-From Octopus Cloud version **2025.4.3897**, `Type` and `Scopes` parameters can be included to configure the type of and scoping of a tag set when created via the API.
-
-The API will ignore the `Type` and `Scopes` parameters if the `Extended Tag Sets` feature toggle is disabled.
-:::
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Name of the tag set to create
-- Type for the tag set (MultiSelect, SingleSelect, or FreeText)
-- Scopes for the tag set (Tenant, Environment, Project, or any combination)
-- Optional description for the tag set
-- Optional tags to add to the new tag set
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/tagsets/index.md b/src/pages/docs/octopus-rest-api/examples/tagsets/index.md
index 625bf3524c..bca4532c99 100644
--- a/src/pages/docs/octopus-rest-api/examples/tagsets/index.md
+++ b/src/pages/docs/octopus-rest-api/examples/tagsets/index.md
@@ -1,10 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/tagsets
pubDate: 2023-01-01
-modDate: 2025-10-08
-title: Tag sets
-description: This section includes examples of how to use the REST API to create and manage tag sets in Octopus.
-navOrder: 190
-hideInThisSectionHeader: true
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-You can use the REST API to create and manage [tag sets](/docs/tenants/tag-sets). Typical tasks can include:
diff --git a/src/pages/docs/octopus-rest-api/examples/tasks/index.md b/src/pages/docs/octopus-rest-api/examples/tasks/index.md
index 23404c9942..ab6cae972d 100644
--- a/src/pages/docs/octopus-rest-api/examples/tasks/index.md
+++ b/src/pages/docs/octopus-rest-api/examples/tasks/index.md
@@ -1,14 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/tasks
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Manage server tasks with the Octopus REST API
-navTitle: Tasks
-description: This section includes examples of how to use the REST API to create and manage Tasks in Octopus.
-navOrder: 200
-hideInThisSectionHeader: true
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-You can use the REST API to create and manage Server tasks in Octopus. Typical tasks might include:
-
-- [Reprioritize Tasks](/docs/octopus-rest-api/examples/tasks/reprioritize-tasks)
-- [Run a health check](/docs/octopus-rest-api/examples/tasks/run-healthcheck)
diff --git a/src/pages/docs/octopus-rest-api/examples/tasks/reprioritize-tasks.mdx b/src/pages/docs/octopus-rest-api/examples/tasks/reprioritize-tasks.mdx
index 5292d6720d..f1433e1967 100644
--- a/src/pages/docs/octopus-rest-api/examples/tasks/reprioritize-tasks.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/tasks/reprioritize-tasks.mdx
@@ -1,74 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/tasks/reprioritize-tasks
pubDate: 2023-01-01
-modDate: 2023-10-20
-title: Reprioritize Tasks
-description: An example script to find deployments or runbook runs for a specific environment, project, or tenant and move them to the top of the queue.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import ReprioritizeTasks from 'src/shared-content/scripts/reprioritize-tasks.include.md';
-
-:::div{.hint}
-Support for [prioritizing tasks](/docs/tasks/prioritize-tasks) directly in Octopus is available from **2023.4**.
-:::
-
-This script can be used to move critical deployments from the bottom of the queue to the top of the queue.
-
-How it works:
-
-1. Look at all the pending tasks in the queue. All in-process items are left as is.
-2. If there are any deployments or runbook runs, it will check to see if they match specified criteria.
-3. If any matching runbook runs or deployment tasks are found, it will loop through the queue and cancel all the items before them.
-4. If the script cancels any runbook runs or deployments, it will resubmit them using the same values.
-
-For example, you have this in your pending queue:
-
-1. Deployment to Dev
-2. Runbook run on Maintenance
-3. Retention policy run
-4. Deployment to Production
-
-It will cancel the deployment to `Dev`, the runbook run on `Maintenance`, and the retention policy run. It will then resubmit the deployment to `Dev,` and the runbook run on `Maintenance` using the same parameters. The user who appears in the audit log will be the one attached to the API key.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL (required)
-- Octopus API Key (required)
-
-The script looks for tasks one of two ways:
-
-1. Task Id List - comma separated list of task ids to move to the top of the queue
-2. Matching based on criteria, see below
-
-Matching based on criteria
-
-- Space List - comma separated list of spaces to look for (optional)
-- Environment List - comma separated list of environments to look for (optional)
- - Options:
- - `EnvironmentName` - eg `Production` - looks for the `Production` environment in any space from the space list.
- - `EnvironmentName::SpaceName` - eg `Production::Default` - looks for the `Production` environment in the `Default` space only.
-- Project List - comma separated list of projects to look for (optional)
- - Options:
- - `ProjectName` - eg `Hello World` - looks for the `Hello World` project in any space from the space list.
- - `ProjectName::SpaceName` - eg `Hello World::Default` - looks for the `Hello World` project in the `Default` space only.
-- Tenant List - comma separated list of tenants to look for (optional)
- - Options:
- - `TenantName` - eg `My Tenant` - looks for the `My Tenant` tenant in any space from the space list.
- - `TenantName::SpaceName` - eg `My Tenant::Default` - looks for the `My Tenant` tenant in the `Default` space only.
-- Match Type - how the match will happen
- - Options:
- - `Or` - will look for runbook run or deployment that matches any of the filters - eg `Production` OR `Hello World` OR `My Tenant`
- - `And` - will look for runbook run or deployment that matches all filters - eg `Production` AND `Hello World` AND `My Tenant`
- - If a filter isn't supplied it is excluded from the check
-- Task Type - what task type to look for
- - Options:
- - `Deploy` - looks for deployments only
- - `RunbookRun` - looks for runbook runs only
- - `Both` - looks for both deployments and runbooks runs
-
-You must supply at least one task id OR at least one filter for environments OR projects OR tenants must be supplied.
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/tasks/run-healthcheck.mdx b/src/pages/docs/octopus-rest-api/examples/tasks/run-healthcheck.mdx
index 404467f49f..21afd98146 100644
--- a/src/pages/docs/octopus-rest-api/examples/tasks/run-healthcheck.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/tasks/run-healthcheck.mdx
@@ -1,28 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/tasks/run-healthcheck
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Run a health check
-description: An example script that creates and runs a health check task.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import RunHealthcheckScripts from 'src/shared-content/scripts/run-healthcheck-scripts.include.md';
-
-This script demonstrates how to programmatically create and run a [health check](/docs/infrastructure/deployment-targets/machine-policies) task in Octopus Deploy.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Description for the health check task
-- Timeout value (in minutes) for the task
-- Machine timeout value (in minutes) for the health check to use when run against machines
-- One of:
- - An environment name to run the health check task against or
- - A list of machine names to run the health check task against or
- - A combination of both environment and machines
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/tenants/bulk-add-projects-to-tenants.md b/src/pages/docs/octopus-rest-api/examples/tenants/bulk-add-projects-to-tenants.md
index ba690fe6a5..d7f4a9f213 100644
--- a/src/pages/docs/octopus-rest-api/examples/tenants/bulk-add-projects-to-tenants.md
+++ b/src/pages/docs/octopus-rest-api/examples/tenants/bulk-add-projects-to-tenants.md
@@ -1,8 +1,9 @@
----
+---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/bulk-operations/bulk-add-projects-to-tenants
-pubDate: 2023-01-01
+redirect: https://octopus.com/docs/api/examples/bulk-operations/bulk-add-projects-to-tenants
+pubDate: 2023-01-01
+modDate: 2026-09-01
navSearch: false
navSitemap: false
navMenu: false
diff --git a/src/pages/docs/octopus-rest-api/examples/tenants/create-tenant.mdx b/src/pages/docs/octopus-rest-api/examples/tenants/create-tenant.mdx
index 05f2ed70ec..da73ec92c9 100644
--- a/src/pages/docs/octopus-rest-api/examples/tenants/create-tenant.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/tenants/create-tenant.mdx
@@ -1,36 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/tenants/create-tenant
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Create a tenant
-description: An example script that creates a tenant.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import CreateATenantScripts from 'src/shared-content/scripts/create-a-tenant-scripts.include.md';
-
-This script demonstrates how to programmatically create a new [tenant](/docs/tenants) in Octopus.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Name of the tenant to create
-- A list of Project names to connect the new tenant with
-- A list of Environment names to connect the new tenant with
-- A list of Tenant tags to use with the new tenant
-
-:::div{.hint}
-**Note:**
-In order for this script to execute correctly, please note the following:
-
-- The projects provided must have the Multi-tenanted deployment setting enabled.
-- The environments provided must exist.
-- The optional tenant tags provided must exist.
-
-:::
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/tenants/deactivate-tenant.mdx b/src/pages/docs/octopus-rest-api/examples/tenants/deactivate-tenant.mdx
index 068c8cbbb9..5f19fa40a4 100644
--- a/src/pages/docs/octopus-rest-api/examples/tenants/deactivate-tenant.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/tenants/deactivate-tenant.mdx
@@ -1,27 +1,10 @@
---
-layout: src/layouts/Default.astro
-pubDate: 2024-11-18
-modDate: 2024-11-18
-title: Deactivate tenants
-description: An example script that activates or deactivates a tenant in Octopus.
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/tenants/deactivate-tenant
+pubDate: 2023-01-01
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import DeactivateTenantScripts from 'src/shared-content/scripts/deactivate-tenant-scripts.include.md';
-
-In 2025.1 Octopus has added support for deactivating tenants. Inactive tenants do not allow deployments or runbook runs but are able to be edited. They are also removed from license calculations allowing you to effectively archive unused tenants and re-enable them in the future.
-Inactive tenants are highlighted with grayed out text and are not available for selection on the deployment or runbook run pages. If deployments are created for inactive tenants via the API or CLI an exception will be thrown.
-
-This script demonstrates how to programmatically deactivate a tenant.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Name of the tenant
-- Boolean value for enabled
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/tenants/index.md b/src/pages/docs/octopus-rest-api/examples/tenants/index.md
index 3bcdecff0d..31068723d9 100644
--- a/src/pages/docs/octopus-rest-api/examples/tenants/index.md
+++ b/src/pages/docs/octopus-rest-api/examples/tenants/index.md
@@ -1,14 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/tenants
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Tenants
-description: This section includes examples of how to use the REST API or Octopus.Client to create and manage Tenants in Octopus.
-navOrder: 210
-hideInThisSectionHeader: true
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-You can use the REST API to create and manage Server tasks in Octopus. Typical tasks might include:
-
-- [Create a tenant](/docs/octopus-rest-api/examples/tenants/create-tenant)
-- [Update tenant variables](/docs/octopus-rest-api/examples/tenants/update-tenant-variable)
-- [Deactivate tenants](/docs/octopus-rest-api/examples/tenants/deactivate-tenant)
diff --git a/src/pages/docs/octopus-rest-api/examples/tenants/update-tenant-variable.mdx b/src/pages/docs/octopus-rest-api/examples/tenants/update-tenant-variable.mdx
index 5c2aa79d8f..cc959dcbfa 100644
--- a/src/pages/docs/octopus-rest-api/examples/tenants/update-tenant-variable.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/tenants/update-tenant-variable.mdx
@@ -1,39 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/tenants/update-tenant-variable
pubDate: 2023-01-01
-modDate: 2026-01-20
-title: Update tenant variables
-description: Example scripts that update tenant variables for both project variables and common (library) variables in Octopus using the REST API and Octopus.Client.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import UpdateTenantProjectVariableScripts from 'src/shared-content/scripts/update-tenant-project-variable-scripts.include.md';
-import UpdateTenantCommonVariableScripts from 'src/shared-content/scripts/update-tenant-common-variable-scripts.include.md';
-
-These scripts demonstrate how to programmatically update tenant variables.
-
-## Update project tenant variables
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Name of the tenant
-- Name of the Project template
-- The new variable value
-- Choose whether the new variable value is bound to an Octopus variable value e.g. `#{MyVariable}`
-
-
-
-## Update common tenant variables
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Name of the tenant
-- Name of the Library template
-- The new variable value
-- Choose whether the new variable value is bound to an Octopus variable value e.g. `#{MyVariable}`
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/users-and-teams/add-azure-ad-to-users.mdx b/src/pages/docs/octopus-rest-api/examples/users-and-teams/add-azure-ad-to-users.mdx
index 823e0135ed..62877f3c7c 100644
--- a/src/pages/docs/octopus-rest-api/examples/users-and-teams/add-azure-ad-to-users.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/users-and-teams/add-azure-ad-to-users.mdx
@@ -1,63 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/users-and-teams/add-azure-ad-to-users
pubDate: 2023-01-01
-modDate: 2024-06-25
-title: Add Microsoft Entra ID login to users
-description: An example script to add Microsoft Entra ID login details to Octopus user accounts.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import AddAzureADIdentityToUsersScripts from 'src/shared-content/scripts/add-azure-ad-identity-to-users-scripts.include.md';
-
-Octopus supports a number of external [authentication providers](/docs/security/authentication/), including [Microsoft Entra ID Authentication](/docs/security/authentication/azure-ad-authentication). If you want to use Microsoft Entra ID to authenticate but re-use existing Octopus user accounts, the easiest way is to add an Azure AD login:
-
-:::figure
-
-:::
-
-This script will add Microsoft Entra ID login details to Octopus user accounts.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- A list of users, supplied from either:
- - The path to a CSV file containing user records
- - The Octopus Username, Azure email address and (optionally) Azure display name
-- (Optional) whether or not to update the Octopus user's email address
-- (Optional) whether or not to update the Octopus user's display name
-- (Optional) whether or not to continue to the next user if an error occurs
-- (Optional) whether or not to force an update of the Azure AD identity if one already exists
-- (Optional) whether or not to perform a dry run (What If?) and not perform any updates
-- (Optional) whether or not to toggle debug (Verbose) logging
-
-### Add Microsoft Entra ID identities to single user
-
-```powershell Add an identity to a single user
-AddAzureADLogins -OctopusURL "https://your-octopus-url/" -OctopusAPIKey "API-YOUR-KEY" -OctopusUsername "OctoUser" -AzureEmailAddress "octouser@exampledomain.com" -AzureDisplayName "Octo User" -ContinueOnError $False -Force $False -WhatIf $False -DebugLogging $False
-```
-
-### Add Microsoft Entra ID identities for multiple users from CSV file
-
-```powershell Add identities to every user in a CSV file
-AddAzureADLogins -OctopusURL "https://your-octopus-url/" -OctopusAPIKey "API-YOUR-KEY" -Path "/path/to/user_azure_ad_logins.csv" -ContinueOnError $False -Force $False -WhatIf $False -DebugLogging $False
-```
-
-### Example CSV file
-
-An example of the expected CSV file format is shown below:
-
-```text Expected CSV format
-OctopusUsername, AzureEmailAddress, AzureDisplayName
-OctoUser, octouser@exampledomain.com, Octo User
-```
-
-The first row should be the header row containing the following columns:
-
-- `OctopusUsername`
-- `AzureEmailAddress`
-- `AzureDisplayName`
-
-### Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/users-and-teams/add-domain-teams.mdx b/src/pages/docs/octopus-rest-api/examples/users-and-teams/add-domain-teams.mdx
index 94fdb407d7..fc7d3b5952 100644
--- a/src/pages/docs/octopus-rest-api/examples/users-and-teams/add-domain-teams.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/users-and-teams/add-domain-teams.mdx
@@ -1,23 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/users-and-teams/add-domain-teams
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Add domain teams
-description: An example script that adds teams from a new domain to existing Octopus teams.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import AddDomainTeamsScripts from 'src/shared-content/scripts/add-domain-teams-scripts.include.md';
-
-This script demonstrates how to programmatically add teams from a new domain to existing Octopus teams. This can be useful when you are migrating from one domain to another.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Maximum number of records to update
-- Name of new to domain to use
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/users-and-teams/add-environment-to-team.mdx b/src/pages/docs/octopus-rest-api/examples/users-and-teams/add-environment-to-team.mdx
index 000d069961..13d2c0e924 100644
--- a/src/pages/docs/octopus-rest-api/examples/users-and-teams/add-environment-to-team.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/users-and-teams/add-environment-to-team.mdx
@@ -1,25 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/users-and-teams/add-environment-to-team
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Add an environment to a team
-description: An example script that adds an environment to a team user role.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import AddEnvironmentToTeamScripts from 'src/shared-content/scripts/add-environment-to-team-scripts.include.md';
-
-This script demonstrates how to programmatically add an environment to a user role for a team.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to work with
-- Name of the team
-- Name of the user role
-- Array of environment names
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/users-and-teams/change-users-domain.mdx b/src/pages/docs/octopus-rest-api/examples/users-and-teams/change-users-domain.mdx
index cbefac6693..98bdc99994 100644
--- a/src/pages/docs/octopus-rest-api/examples/users-and-teams/change-users-domain.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/users-and-teams/change-users-domain.mdx
@@ -1,24 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/users-and-teams/change-users-domain
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Change users domain
-description: An example script that changes an Octopus user's Active Directory domain assignment.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import ChangeUserDomainScripts from 'src/shared-content/scripts/change-user-domain-scripts.include.md';
-
-This script demonstrates how to programmatically change an Octopus user's Active Directory domain assignment. This can be useful when you are migrating from one domain to another.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Maximum number of records to update
-- Name of the old domain to search for
-- Name of new to domain to use in place of the old domain
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/users-and-teams/create-api-key.mdx b/src/pages/docs/octopus-rest-api/examples/users-and-teams/create-api-key.mdx
index 96035312ad..26edc3add3 100644
--- a/src/pages/docs/octopus-rest-api/examples/users-and-teams/create-api-key.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/users-and-teams/create-api-key.mdx
@@ -1,27 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/users-and-teams/create-api-key
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Create an API Key
-description: An example script that creates an API Key.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import CreateApiKeyScripts from 'src/shared-content/scripts/create-api-key-scripts.include.md';
-
-This script demonstrates how to programmatically create a new API Key.
-
-:::div{.warning}
-**Note:** You can only create a new API Key for your own user account. You will also need an existing API Key to authenticate with the Octopus REST API, created from the [Octopus Web Portal](/docs/octopus-rest-api/how-to-create-an-api-key).
-:::
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Name of the user to create the API Key for
-- Description of the API Key's purpose
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/users-and-teams/find-teams-with-role.mdx b/src/pages/docs/octopus-rest-api/examples/users-and-teams/find-teams-with-role.mdx
index 7bdd005403..23209f7184 100644
--- a/src/pages/docs/octopus-rest-api/examples/users-and-teams/find-teams-with-role.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/users-and-teams/find-teams-with-role.mdx
@@ -1,23 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/users-and-teams/find-teams-with-role
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Find teams with role
-description: An example script that finds all teams using a specific role.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import FindTeamsWithRoleScripts from 'src/shared-content/scripts/find-teams-with-role-scripts.include.md';
-
-This script demonstrates how to programmatically find all teams using a specific role.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to work with
-- Name of the user role
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/users-and-teams/index.md b/src/pages/docs/octopus-rest-api/examples/users-and-teams/index.md
index 3563cf02ca..a4f8a8e197 100644
--- a/src/pages/docs/octopus-rest-api/examples/users-and-teams/index.md
+++ b/src/pages/docs/octopus-rest-api/examples/users-and-teams/index.md
@@ -1,23 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/users-and-teams
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Users and Teams
-description: This section includes examples of how to use the REST API to manage users and teams in Octopus.
-navOrder: 220
-hideInThisSectionHeader: true
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-You can use the REST API to create and manage your Octopus [Users and Teams](/docs/security/users-and-teams). Typical tasks can include:
-
-- [Add Azure Active Directory login to users](/docs/octopus-rest-api/examples/users-and-teams/add-azure-ad-to-users)
-- [Add domain teams](/docs/octopus-rest-api/examples/users-and-teams/add-domain-teams)
-- [Add an environment to a team](/docs/octopus-rest-api/examples/users-and-teams/add-environment-to-team)
-- [Change users domain](/docs/octopus-rest-api/examples/users-and-teams/change-users-domain)
-- [Create an API Key](/docs/octopus-rest-api/examples/users-and-teams/create-api-key)
-- [Find teams with role](/docs/octopus-rest-api/examples/users-and-teams/find-teams-with-role)
-- [List users with editing roles](/docs/octopus-rest-api/examples/users-and-teams/list-users-with-editing-roles)
-- [List users with role](/docs/octopus-rest-api/examples/users-and-teams/list-users-with-role)
-- [List users](/docs/octopus-rest-api/examples/users-and-teams/list-users)
-- [Remove a project from team](/docs/octopus-rest-api/examples/users-and-teams/remove-project-from-team)
-- [Swap AD group with LDAP group](/docs/octopus-rest-api/examples/users-and-teams/swap-ad-domain-group-with-ldap-group)
-- [Change users AD domain to LDAP](/docs/octopus-rest-api/examples/users-and-teams/swap-users-ad-domain-to-ldap)
diff --git a/src/pages/docs/octopus-rest-api/examples/users-and-teams/list-users-with-editing-roles.mdx b/src/pages/docs/octopus-rest-api/examples/users-and-teams/list-users-with-editing-roles.mdx
index 38f53eeec3..dc77855d8f 100644
--- a/src/pages/docs/octopus-rest-api/examples/users-and-teams/list-users-with-editing-roles.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/users-and-teams/list-users-with-editing-roles.mdx
@@ -1,22 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/users-and-teams/list-users-with-editing-roles
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: List users with editing roles
-description: An example script to list all users that have any user roles (permissions) containing the words Edit, Create or Delete.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import ListUsersWithEditingRolesScripts from 'src/shared-content/scripts/list-users-with-editing-roles-scripts.include.md';
-
-This script will list all users in an Octopus instance that have user roles (permissions) containing the words Edit, Create or Delete.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- (Optional) path to export the results to a csv file
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/users-and-teams/list-users-with-role.mdx b/src/pages/docs/octopus-rest-api/examples/users-and-teams/list-users-with-role.mdx
index 8320884497..047267ea7c 100644
--- a/src/pages/docs/octopus-rest-api/examples/users-and-teams/list-users-with-role.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/users-and-teams/list-users-with-role.mdx
@@ -1,60 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/users-and-teams/list-users-with-role
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: List users with role
-description: An example script to list all users that have a specific role by team.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import ListUsersWithRoleScripts from 'src/shared-content/scripts/list-users-with-role-scripts.include.md';
-
-This script will list all users with a given role by team. You can also filter the list by specifying a space name.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- User Role Name
-- (Optional) Space Name
-
-## Example output
-
-### All spaces with role name `Project Deployer`
-
-```text
-Team: Build Servers
-Space: Default
-TeamCity
-Build Server
-Team: Can Deploy But Not Download Packages
-Space: Default
-PackageTest
-Team: Developer Lower Environment
-Space: Default
-Paul Oliver the Developer
-Team: Devs
-Space: Default
-Team: Quick Test
-Space: Default
-Ryan Rousseau
-Team: ShawnTest
-Space: AzureDevOps
-Adam Close
-External security groups:
-TestDomain\SpecialGroup
-```
-
-### Space name AzureDevOps
-
-```text
-Team: ShawnTest
-Space: AzureDevOps
-Adam Close
-External security groups:
-TestDomain\SpecialGroup
-```
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/users-and-teams/list-users.mdx b/src/pages/docs/octopus-rest-api/examples/users-and-teams/list-users.mdx
index c51d86fb11..14a8ebdd83 100644
--- a/src/pages/docs/octopus-rest-api/examples/users-and-teams/list-users.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/users-and-teams/list-users.mdx
@@ -1,31 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/users-and-teams/list-users
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: List users
-description: An example script to list all users in an Octopus instance.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import ListUsersScripts from 'src/shared-content/scripts/list-users-scripts.include.md';
-
-This script will list all active users in an Octopus instance. In addition, there are a number of optional items you can include:
-
-- scoped user roles
-- any associated [Active Directory](/docs/security/authentication/active-directory) details
-- any associated [Azure Active Directory](/docs/security/authentication/azure-ad-authentication) details
-- inactive users
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- (Optional) whether or not to include user role details
-- (Optional) whether or not to include Active Directory details
-- (Optional) whether or not to include Azure Active Directory details
-- (Optional) whether or not to include disabled users
-- (Optional) path to export the results to a csv file
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/users-and-teams/remove-project-from-team.mdx b/src/pages/docs/octopus-rest-api/examples/users-and-teams/remove-project-from-team.mdx
index a5df6fb60b..b62772c3a7 100644
--- a/src/pages/docs/octopus-rest-api/examples/users-and-teams/remove-project-from-team.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/users-and-teams/remove-project-from-team.mdx
@@ -1,24 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/users-and-teams/remove-project-from-team
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Remove a project from team
-description: An example script that removes a project from a team.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import RemoveProjectFromTeamScripts from 'src/shared-content/scripts/remove-project-from-team-scripts.include.md';
-
-This script demonstrates how to programmatically remove a project from a team.
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to work with
-- Name of the team
-- Name of the project
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/users-and-teams/swap-ad-domain-group-with-ldap-group.mdx b/src/pages/docs/octopus-rest-api/examples/users-and-teams/swap-ad-domain-group-with-ldap-group.mdx
index 1e162f8644..69c3405382 100644
--- a/src/pages/docs/octopus-rest-api/examples/users-and-teams/swap-ad-domain-group-with-ldap-group.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/users-and-teams/swap-ad-domain-group-with-ldap-group.mdx
@@ -1,35 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/users-and-teams/swap-ad-domain-group-with-ldap-group
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Swap AD group with LDAP group
-description: An example script that swaps any active directory external group for a matching LDAP external group in each Octopus team.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import SwitchADDomainGroupToLdapGroupScripts from 'src/shared-content/scripts/switch-ad-domain-group-to-ldap-group-scripts.include.md';
-
-This script demonstrates how to programmatically swap any Active Directory external group for a matching LDAP external group in each Octopus team. This can be useful when you are migrating from the Active Directory authentication provider to the LDAP provider.
-
-We also have a script that will [swap Active Directory login records with matching LDAP ones](/docs/octopus-rest-api/examples/users-and-teams/swap-users-ad-domain-to-ldap) for Octopus users.
-
-:::div{.hint}
-**Note:**
-Please note there are some things to consider before using this script:
-
-- Both the [Active Directory](/docs/security/authentication/active-directory/) and [LDAP](/docs/security/authentication/ldap) providers must be enabled for this script to work as it queries both providers.
-- Always ensure you test the script on a non-production server first, and have a production database backup.
-
-:::
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Name of the Active Directory domain to use to look up the groups to swap
-- WhatIf - A boolean value to toggle whether or not to perform the actual updates to teams in Octopus.
-- Remove old teams - A boolean value to toggle whether or not to remove the existing Active Directory groups from each team.
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/users-and-teams/swap-users-ad-domain-to-ldap.mdx b/src/pages/docs/octopus-rest-api/examples/users-and-teams/swap-users-ad-domain-to-ldap.mdx
index e00e776902..9323f23d39 100644
--- a/src/pages/docs/octopus-rest-api/examples/users-and-teams/swap-users-ad-domain-to-ldap.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/users-and-teams/swap-users-ad-domain-to-ldap.mdx
@@ -1,39 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/users-and-teams/swap-users-ad-domain-to-ldap
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Change users AD domain to LDAP
-description: An example script that swaps an Octopus user's Active Directory login record for a matching LDAP one.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import SwitchUsersADDomainToLdapScripts from 'src/shared-content/scripts/switch-users-ad-domain-to-ldap-scripts.include.md';
-
-This script demonstrates how to programmatically swap an Octopus user's Active Directory login record for a matching LDAP one. This can be useful when you are migrating from the Active Directory authentication provider to the LDAP provider.
-
-We also have a script that will [swap Active Directory groups with matching LDAP groups](/docs/octopus-rest-api/examples/users-and-teams/swap-ad-domain-group-with-ldap-group) for Octopus teams.
-
-:::div{.hint}
-**Note:**
-Please note there are some things to consider before using this script:
-
-- The [LDAP authentication provider](/docs/security/authentication/ldap) must be enabled for this script to work as it queries for matching users in LDAP.
-- The script won't work if the LDAP server and the AD Server domains are different. For example migrating from `domain-one.local` to `domain-two.local`.
-- Always ensure you test the script on a non-production server first, and have a production database backup.
-
-:::
-
-## Usage
-
-Provide values for:
-
-- Octopus URL
-- Octopus API Key
-- Max number of records to update in the script execution.
-- Name of the domain to use to find a users existing Active Directory record to optionally remove, in the format `your-ad-domain.com`.
-- Name of the domain to use when searching LDAP for matching external user records in the format `your-ldap-domain.com`. *This is typically the same value as the Active Directory domain*.
-- LDAP username lookup - A boolean value to toggle whether or not to include the LDAP domain when matching the Active Directory username to the LDAP one.
-- WhatIf - A boolean value to toggle whether or not to perform the actual updates to users in Octopus.
-- Remove old Active Directory records - A boolean value to toggle whether or not to remove the existing active directory record from each user.
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/users/index.md b/src/pages/docs/octopus-rest-api/examples/users/index.md
index da640746c0..a4f8a8e197 100644
--- a/src/pages/docs/octopus-rest-api/examples/users/index.md
+++ b/src/pages/docs/octopus-rest-api/examples/users/index.md
@@ -1,8 +1,9 @@
----
+---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/users-and-teams
-pubDate: 2023-01-01
+redirect: https://octopus.com/docs/api/examples/users-and-teams
+pubDate: 2023-01-01
+modDate: 2026-09-01
navSearch: false
navSitemap: false
navMenu: false
diff --git a/src/pages/docs/octopus-rest-api/examples/users/list-users-with-role.md b/src/pages/docs/octopus-rest-api/examples/users/list-users-with-role.md
index 5ead862cf1..047267ea7c 100644
--- a/src/pages/docs/octopus-rest-api/examples/users/list-users-with-role.md
+++ b/src/pages/docs/octopus-rest-api/examples/users/list-users-with-role.md
@@ -1,8 +1,9 @@
----
+---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/users-and-teams/list-users-with-role
-pubDate: 2023-01-01
+redirect: https://octopus.com/docs/api/examples/users-and-teams/list-users-with-role
+pubDate: 2023-01-01
+modDate: 2026-09-01
navSearch: false
navSitemap: false
navMenu: false
diff --git a/src/pages/docs/octopus-rest-api/examples/variables/add-library-set-to-project.mdx b/src/pages/docs/octopus-rest-api/examples/variables/add-library-set-to-project.mdx
index 9b4b4332ae..52bd26c4f7 100644
--- a/src/pages/docs/octopus-rest-api/examples/variables/add-library-set-to-project.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/variables/add-library-set-to-project.mdx
@@ -1,24 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/variables/add-library-set-to-project
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Add variable set to a project
-description: An example script that adds a variable set to a project.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import AddLibrarySetToProjectScripts from 'src/shared-content/scripts/add-library-set-to-project-scripts.include.md';
-
-This script demonstrates how to programmatically add a variable set to a project.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Name of the project
-- Name of the variable set
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/variables/add-update-project-variable.mdx b/src/pages/docs/octopus-rest-api/examples/variables/add-update-project-variable.mdx
index 3a486e9807..6650818c23 100644
--- a/src/pages/docs/octopus-rest-api/examples/variables/add-update-project-variable.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/variables/add-update-project-variable.mdx
@@ -1,28 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/variables/add-update-project-variable
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Add or update project variable
-description: An example script that adds or updates a project variable.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import AddUpdateProjectVariableScripts from 'src/shared-content/scripts/add-update-project-variable-scripts.include.md';
-
-This script demonstrates how to programmatically add or update a project variable.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to use
-- Name of the project
-- The variable properties including:
- - Variable name
- - Variable value
- - Variable type
- - If the variable is sensitive
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/variables/clear-sensitive-variables.mdx b/src/pages/docs/octopus-rest-api/examples/variables/clear-sensitive-variables.mdx
index fbcf325462..34d599f384 100644
--- a/src/pages/docs/octopus-rest-api/examples/variables/clear-sensitive-variables.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/variables/clear-sensitive-variables.mdx
@@ -1,25 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/variables/clear-sensitive-variables
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Clear sensitive variables
-description: An example script that clears all sensitive variables.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import ClearSensitiveVariablesScripts from 'src/shared-content/scripts/clear-sensitive-variables-scripts.include.md';
-
-This script demonstrates how to programmatically clear all sensitive variables in Projects and Variable Sets in an Octopus instance.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-
-:::div{.warning}
-**This script will clear all sensitive variable values from an Octopus instance. Take care when running this script or one based on it.**
-:::
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/variables/find-projects-using-library-set.mdx b/src/pages/docs/octopus-rest-api/examples/variables/find-projects-using-library-set.mdx
index a65ed3fe66..a5e724ae7e 100644
--- a/src/pages/docs/octopus-rest-api/examples/variables/find-projects-using-library-set.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/variables/find-projects-using-library-set.mdx
@@ -1,23 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/variables/find-projects-using-library-set
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Find projects using variable set
-description: An example script that finds all projects using a specific variable set.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import FindProjectsUsingVariableSetScripts from 'src/shared-content/scripts/find-projects-using-variable-set-scripts.include.md';
-
-This script demonstrates how to programmatically find all projects using a specific variable set.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to search
-- Name of the Variable Set to search for
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/variables/find-variable-usage.mdx b/src/pages/docs/octopus-rest-api/examples/variables/find-variable-usage.mdx
index 450bd327e8..8cfde392de 100644
--- a/src/pages/docs/octopus-rest-api/examples/variables/find-variable-usage.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/variables/find-variable-usage.mdx
@@ -1,36 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/variables/find-variable-usage
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Find variable usage
-description: An example script that finds usages of a variable, searching in project variables, and optionally deployment processes and runbooks.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import FindVariableUsageScripts from 'src/shared-content/scripts/find-variable-usage-scripts.include.md';
-
-This script demonstrates how to programmatically find usages of a variable in all project variable sets (either a named match, or referenced in another variable), and optionally any deployment process or runbook processes.
-
-:::div{.hint}
-**Limitations:**
-Please note the limitations with this example:
-
-- It's not possible to use the REST API to search through sensitive variable values, as these values will be returned as `null`.
-- Variables that are referenced inside of any packages included as part of a deployment or runbook are not searched.
-
-:::
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to search
-- Name of the variable to search for
-- Boolean value to toggle searching in a project's deployment process
-- Boolean value to toggle searching in a project's runbook processes
-- (Optional) Boolean value to toggle searching in variable sets
-- (Optional) path to export the results to a csv file
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/variables/find-variable-value-usage.mdx b/src/pages/docs/octopus-rest-api/examples/variables/find-variable-value-usage.mdx
index ea62c3a03e..c2284f655d 100644
--- a/src/pages/docs/octopus-rest-api/examples/variables/find-variable-value-usage.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/variables/find-variable-value-usage.mdx
@@ -1,32 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/variables/find-variable-value-usage
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Find variable value usage
-description: An example script that finds all variables with a specific value in project variables and variable sets.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import FindVariableValueUsageScripts from 'src/shared-content/scripts/find-variable-value-usage-scripts.include.md';
-
-This script demonstrates how to programmatically find usages of a variable value in all projects and variable sets. You could use this to help replace values in a connection string if a server name or IP has changed.
-
-:::div{.hint}
-**Limitations:**
-Please note the limitations with this example:
-
-- It's not possible to use the REST API to search through sensitive variable values.
-
-:::
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to search
-- Name of the variable value to search for
-- Optional path to export the results to a csv file
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/variables/find-variable-vaule-usage.md b/src/pages/docs/octopus-rest-api/examples/variables/find-variable-vaule-usage.md
index b9b97ad348..c2284f655d 100644
--- a/src/pages/docs/octopus-rest-api/examples/variables/find-variable-vaule-usage.md
+++ b/src/pages/docs/octopus-rest-api/examples/variables/find-variable-vaule-usage.md
@@ -1,8 +1,9 @@
----
+---
layout: src/layouts/Redirect.astro
title: Redirect
-redirect: https://octopus.com/docs/octopus-rest-api/examples/variables/find-variable-value-usage
-pubDate: 2023-01-01
+redirect: https://octopus.com/docs/api/examples/variables/find-variable-value-usage
+pubDate: 2023-01-01
+modDate: 2026-09-01
navSearch: false
navSitemap: false
navMenu: false
diff --git a/src/pages/docs/octopus-rest-api/examples/variables/find-variableset-variables-usage.mdx b/src/pages/docs/octopus-rest-api/examples/variables/find-variableset-variables-usage.mdx
index 830dbbcebe..cab79c335e 100644
--- a/src/pages/docs/octopus-rest-api/examples/variables/find-variableset-variables-usage.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/variables/find-variableset-variables-usage.mdx
@@ -1,35 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/variables/find-variableset-variables-usage
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Find variable set variables usage
-description: An example script that loads variables from a variable set and finds usages in project variables, and optionally deployment processes and runbooks.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import FindVariableSetUsageScripts from 'src/shared-content/scripts/find-variableset-variables-usage-scripts.include.md';
-
-This script demonstrates how to programmatically find usages of variables from a variable set. It searches in all projects for a reference to each variable, and optionally deployment processes and runbook processes.
-
-:::div{.hint}
-**Limitations:**
-Please note the limitations with this example:
-
-- It's not possible to use the REST API to search through sensitive variable values, as these values will be returned as `null`.
-- Variables that are referenced inside of any packages included as part of a deployment or runbook are not searched.
-
-:::
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to search
-- Name of the variable set to use
-- Boolean value to toggle searching in a project's deployment process
-- Boolean value to toggle searching in a project's runbook processes
-- Optional path to export the results to a csv file
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/examples/variables/index.md b/src/pages/docs/octopus-rest-api/examples/variables/index.md
index 629afb48f1..57cc967b1d 100644
--- a/src/pages/docs/octopus-rest-api/examples/variables/index.md
+++ b/src/pages/docs/octopus-rest-api/examples/variables/index.md
@@ -1,19 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/variables
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Variables
-description: This section includes examples of how to use the REST API to create and manage variables in Octopus.
-navOrder: 230
-hideInThisSectionHeader: true
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-You can use the REST API to create and manage your Octopus [variables](/docs/projects/variables). Typical tasks can include:
-
-- [Add variable set to a project](/docs/octopus-rest-api/examples/variables/add-library-set-to-project)
-- [Add or update project variable](/docs/octopus-rest-api/examples/variables/add-update-project-variable)
-- [Clear sensitive variables](/docs/octopus-rest-api/examples/variables/clear-sensitive-variables)
-- [Find projects using variable set](/docs/octopus-rest-api/examples/variables/find-projects-using-library-set)
-- [Find variable usage](/docs/octopus-rest-api/examples/variables/find-variable-usage)
-- [Find variable value usage](/docs/octopus-rest-api/examples/variables/find-variable-value-usage)
-- [Find variable set variables usage](/docs/octopus-rest-api/examples/variables/find-variableset-variables-usage)
-- [Update variable set variable value](/docs/octopus-rest-api/examples/variables/update-variable-set-variable-value)
diff --git a/src/pages/docs/octopus-rest-api/examples/variables/update-variable-set-variable-value.mdx b/src/pages/docs/octopus-rest-api/examples/variables/update-variable-set-variable-value.mdx
index fdad1a1601..f74ba2e146 100644
--- a/src/pages/docs/octopus-rest-api/examples/variables/update-variable-set-variable-value.mdx
+++ b/src/pages/docs/octopus-rest-api/examples/variables/update-variable-set-variable-value.mdx
@@ -1,27 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/examples/variables/update-variable-set-variable-value
pubDate: 2023-01-01
-modDate: 2023-01-01
-title: Update variable set variable value
-description: An example script that loads variables from a variable set, looks for a match and replaces the variable value.
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-import UpdateVariableSetVariableValueScripts from 'src/shared-content/scripts/update-variable-set-variable-value-scripts.include.md';
-
-This script demonstrates how to programmatically update a matching variable value stored in a variable set.
-
-Note: This script does not alter the variable scopes, only the value.
-
-## Usage
-
-Provide values for the following:
-
-- Octopus URL
-- Octopus API Key
-- Name of the space to search
-- Name of the variable set to use
-- Variable name to search for
-- New variable value to replace existing value
-
-## Script
-
-
diff --git a/src/pages/docs/octopus-rest-api/getting-started.mdx b/src/pages/docs/octopus-rest-api/getting-started.mdx
index c06363ba4e..1e3001a215 100644
--- a/src/pages/docs/octopus-rest-api/getting-started.mdx
+++ b/src/pages/docs/octopus-rest-api/getting-started.mdx
@@ -1,147 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/
pubDate: 2024-04-10
-modDate: 2024-04-10
-title: Getting started with the Octopus REST API
-navTitle: Getting started with the Octopus REST API
-description: Getting started with the Octopus REST API
-navOrder: 10
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-
-## API clients
-
-Octopus provides API clients for popular programming languages and runtime environments. You can access the source code for these clients on GitHub:
-
-- [Go API Client for Octopus Deploy](https://github.com/OctopusDeploy/go-octopusdeploy)
-- [.NET C# API Client for Octopus Deploy](https://github.com/OctopusDeploy/OctopusClients)
-- [TypeScript API Client for Octopus Deploy](https://github.com/OctopusDeploy/api-client.ts)
-
-Code snippets using these clients for operations in the Octopus REST API are available in our [API examples](/docs/octopus-rest-api/examples) documentation.
-
-## REST API authentication \{#authentication}
-
-The Octopus Deploy API is available at:
-
-```text
-https:///api
-```
-
-Replace `` with the URL that you host your Octopus instance on.
-
-The API supports 2 methods of authentication.
-
-### Creating an API Key
-
-You can get your API key from your profile page on the Octopus Web Portal.
-
-After you have a key, you can provide it to the API in the following ways:
-
-1. Through the `X-Octopus-ApiKey` HTTP header with all requests. This is the preferred approach.
-1. As an `apikey` query string parameter with all requests. You should only be used for simple requests.
-
-:::div{.hint}
-Learn more about [how to create an API key](/docs/octopus-rest-api/how-to-create-an-api-key).
-:::
-
-### OpenID Connect
-
-OpenID Connect is a set of identity specifications that build on OAuth 2.0 to let software systems connect in a way that promotes security best practices.
-
-When using OIDC, Octopus validates an identity token from a trusted external system using [public key cryptography](https://en.wikipedia.org/wiki/Public-key_cryptography). Octopus then issues a short-lived access token that you can use to interact with the Octopus API.
-
-Some of the benefits of using OIDC in Octopus include:
-
-- You don't need to provision API keys and store them in external systems. This reduces the risk of unauthorized access to the Octopus API from exposed keys.
-- Administrators don't need to rotate API keys manually. This reduces the risk of disruption when updating to newer keys in external systems.
-- Access tokens issued by Octopus are short-lived. This reduces the risk of unauthorized access to the Octopus API.
-- Access tokens are only issued for requests from trusted external systems. This allows for controlled access to service accounts and promotes the principle of least access.
-
-We support any issuer that can generate signed OIDC tokens that can be validated anonymously. However, we provide built-in support for GitHub Actions with the [OctopusDeploy/login](https://github.com/OctopusDeploy/login) action.
-
-For more information see [Using OpenId Connect with the Octopus API](https://octopus.com/docs/octopus-rest-api/openid-connect).
-
-## REST API Swagger documentation \{#api-swagger-docs}
-
-Octopus includes the default Swagger UI for displaying the API documentation in a nice, human, readable way. To browse that UI just open your browser and go to `https:///swaggerui/`. The original Non-Swagger API page is still available and you can access it via `https:///api/`.
-
-:::figure
-
-:::
-
-You can view the API through the Octopus Demo server at [demo.octopus.app/swaggerui/index.html](https://demo.octopus.app/swaggerui/index.html).
-
-## REST API links \{#api-links}
-
-All resources returned by the REST API contain links to other resources. The idea is that instead of memorizing or hard-coding URLs when using the API, you should start with the root API resource and use links to navigate.
-
-For example, a `GET` request to `/api` returns a resource that looks like:
-
-```json
-{
- "Application": "Octopus Deploy",
- "Version": "2022.1.2386",
- "ApiVersion": "3.0.0",
- "InstallationId": "9f155416-5d9e-4e19-ba58-b710d4edf336",
- "Links": {
- "Self": "/api",
- "Accounts": "/api/Spaces-1/accounts{/id}{?skip,take,ids,partialName,accountType}",
- "Environments": "/api/Spaces-1/environments{/id}{?name,skip,ids,take,partialName}",
- "Machines": "/api/Spaces-1/machines{/id}{?skip,take,name,ids,partialName,roles,isDisabled,healthStatuses,commStyles,tenantIds,tenantTags,environmentIds,thumbprint,deploymentId,shellNames,deploymentTargetTypes}",
- "Projects": "/api/Spaces-1/projects{/id}{?name,skip,ids,clone,take,partialName,clonedFromProjectId}",
- "RunbookProcesses": "/api/Spaces-1/runbookProcesses{/id}{?skip,take,ids}",
- "RunbookRuns": "/api/Spaces-1/runbookRuns{/id}{?skip,take,ids,projects,environments,tenants,runbooks,taskState,partialName}",
- "Runbooks": "/api/Spaces-1/runbooks{/id}{?skip,take,ids,partialName,clone,projectIds}",
- "RunbookSnapshots": "/api/Spaces-1/runbookSnapshots{/id}{?skip,take,ids,publish}",
- "Feeds": "/api/feeds{/id}{?skip,take,ids,partialName,feedType,name}",
- "Tasks": "/api/tasks{/id}{?skip,active,environment,tenant,runbook,project,name,node,running,states,hasPendingInterruptions,hasWarningsOrErrors,take,ids,partialName,spaces,includeSystem,description,fromCompletedDate,toCompletedDate,fromQueueDate,toQueueDate,fromStartDate,toStartDate}",
- "Variables": "/api/Spaces-1/variables{/id}{?ids}",
- "Web": "/app"
- }
-}
-```
-
-:::div{.hint}
-Note: the `Links` collection example above has been significantly reduced in size for demonstration purposes.
-:::
-
-You can follow the links in the result to navigate around the API. For example, by following the `Projects` link, you'll find a list of the projects on your Octopus server.
-
-Since the format and structure of links may change, it's essential that clients avoid hardcoding URL's to resources, and instead rely on starting at `/api` and navigating from there.
-
-### URI templates
-
-Some links (mainly to collections) use URI templates as defined in [RFC 6570](http://tools.ietf.org/html/rfc6570). If in doubt, a client should assume that any link is a URI template.
-
-### Collections
-
-Collections of resources also include links. For example, following the `Environments` link above will give you a list of environments.
-
-```json
-{
- "ItemType": "Environment",
- "TotalResults": 20,
- "ItemsPerPage": 10,
- "NumberOfPages": 2,
- "LastPageNumber": 1,
- "Items": [
- // ... a list of environments ...
- ],
- "Links": {
- "Self": "/api/Spaces-1/environments?skip=0&take=10",
- "Template": "/api/Spaces-1/environments{?skip,ids,take,partialName}",
- "Page.All": "/api/Spaces-1/environments?skip=0&take=2147483647",
- "Page.Next": "/api/Spaces-1/environments?skip=10&take=10",
- "Page.Current": "/api/Spaces-1/environments?skip=0&take=10"
- }
-}
-```
-
-The links at the bottom of the resource allow you to traverse the pages of results. Again, instead of hard-coding query string parameters, you can look for a `Page.Next` link and follow that instead.
-
-## REST API and Spaces \{#api-and-spaces}
-
-If you are using spaces, you need to include the `SpaceID` in your API calls. If you do not include the `SpaceID`, your API calls will automatically use the default space.
-
-## REST API code samples \{#api-samples}
-
-Code snippet samples for various operations in the Octopus REST API are available both in our [API examples](/docs/octopus-rest-api/examples) and on the [OctopusDeploy-API GitHub repository](https://github.com/OctopusDeploy/OctopusDeploy-Api)
diff --git a/src/pages/docs/octopus-rest-api/how-to-create-an-api-key.md b/src/pages/docs/octopus-rest-api/how-to-create-an-api-key.md
index 30683c23c3..b803b85796 100644
--- a/src/pages/docs/octopus-rest-api/how-to-create-an-api-key.md
+++ b/src/pages/docs/octopus-rest-api/how-to-create-an-api-key.md
@@ -1,143 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/authentication/create-an-api-key
pubDate: 2023-01-01
-modDate: 2026-06-19
-title: How to Create an API Key
-description: How to create an API key to interact with Octopus without the need for a username and password.
-navOrder: 10
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-
-API keys allow you to access the Octopus Deploy [REST API](/docs/octopus-rest-api) and perform tasks such as creating and deploying releases. API keys can be saved in scripts or external tools, without having to use your username and password. Each user and service account can have multiple API keys.
-
-See the [Service Accounts docs](/docs/security/users-and-teams/service-accounts) for information about creating service accounts.
-
-## Creating an API Key
-
-[Getting Started - API Keys](https://www.youtube.com/watch?v=f3-vRjpB0cE)
-
-You can create API keys by performing the following steps:
-
-1. Log into the Octopus Web Portal, click your profile image and select **Profile**.
-1. Click **My API Keys**.
-1. Click **New API key**, state the purpose of the API key.
-1. Choose the level of **Access** to grant (see below).
-1. Click **Generate new**.
-1. Copy the new API key to your clipboard.
-
-:::div{.warning}
-**Write Your Key Down**
-After you generate an API key, it cannot be retrieved from the Octopus Web Portal again, we store only a one-way hash of the API key. If you want to use the API key again, you need to store it in a secure place such as a password manager. Read about [why we hash API keys](https://octopus.com/blog/hashing-api-keys).
-:::
-
-## Creating an agent API key {#creating-an-agent-api-key}
-
-If you're connecting an AI agent to Octopus—such as the [Octopus MCP server](/docs/octopus-ai/mcp)—create a dedicated agent API key rather than a regular one. Agent keys are tagged throughout Octopus so you can filter for and audit agent activity separately from human activity.
-
-You can also create an agent API key directly from the **API Keys** page:
-
-1. Click **New API key for AI Agent** and state the purpose of the key.
-1. Choose the level of **Access** to grant.
-1. Click **Generate new**.
-1. Copy the new API key to your clipboard.
-
-## Choosing an access level
-
-:::div{.hint}
-
-This feature is currently being rolled out to Octopus Cloud customers and will become available to self-hosted installations in Octopus Server 2026.3.
-
-If you don't see the access option when creating an API key, the API key will be created with full access and have the same permissions as your user account.
-
-:::
-
-Recent versions of Octopus Server add the ability to limit the scope of an API key, to allow only read-only access. Alternatively, you can grant the API key full access to give it the same permissions as your user account. Use the **Preview Permissions** link to see the exact list of permissions that apply to the chosen access level.
-
-Read-only scopes are useful for tooling that doesn't need to be able to make changes, perform actions or trigger deployments, such as AI agents (like Claude Code) or for external monitoring systems (like release progression dashboards).
-
-Note that it is not possible to create an API key with more permissions than your user account. For these scenarios, you should look at creating an API key under a dedicated [Service Account](/docs/security/users-and-teams/service-accounts) instead. Use this approach for tooling that is not acting on behalf of a particular user.
-
-## Setting an expiry date
-
-:::div{.hint}
-The ability to set an expiry date on new API keys was added in Octopus Deploy **2020.6**.
-:::
-By default, new API keys are valid for 180 days from the point they are created.
-
-When creating an API key in the Octopus Web Portal, you can choose from a preset list of offsets from the current date, or select a custom date. Keys will expire at the end of the selected day. When using the Octopus REST API to create a key, you can set the expiry date to your preferred date and time, including time zone offset.
-
-There are three restrictions on the expiry date:
-
-- It cannot be in the past.
-- It cannot be after the expiry date of the key being used to create it (when using the REST API).
-- **Octopus Deploy 2025.4 and newer:** It cannot exceed the server's configured maximum expiry period (defaults to 366 days, configurable)
-
-## Configure API keys for expiry notifications
-
-[Octopus Subscriptions](/docs/administration/managing-infrastructure/subscriptions) can be used to configure notifications when API keys are close to expiry or have expired.
-
-There is an "API key expiry events" event-group and three events:
-
-- API key expiry 20-day warning.
-- API key expiry 10-day warning.
-- API key expired.
-
-:::div{.info}
-
-The background task which raises the api-key-expiry events runs:
-
-- 10 minutes after the Octopus Server service starts
-- Every 4 hours
-
-:::
-
-## Configuring API Key default and maximum expiry durations
-
-:::div{.hint}
-The ability to control the default and maximum API key expiry was added in Octopus Deploy **2025.4**. The ability to create keys that never expire was removed in this version.
-
-Versions 2025.3 and below will use a default expiry of 180 days and have no maximum.
-:::
-
-Octopus administrators can change the maximum API key expiry from 366 days to a value of their choice, up to 1096 days.
-
-Octopus administrators can change the default API key expiry from 180 days to a value of their choice. The default period must be less than or equal to the maximum.
-
-To change these values in the Octopus Web Portal:
-
-1. Navigate to **Configuration ➜ Settings** and click **Authentication**.
-1. Expand the sections for **API Key default expiry (days)** and **API Key maximum expiry (days)** and alter the values.
-1. Click Save.
-
-## Managing API keys
-
-Octopus administrators can view all API keys across the instance from the **API Keys** page.
-
-### Identifying key types
-
-Each key's row shows an **API key type** column with a type tag—**User**, or **AI Agent**—so you can tell at a glance which kind of identity each key belongs to.
-
-### Filtering by agent
-
-Check **AI Agents** to filter the list to agent keys only. This is useful when you want to review the credentials your agents are using without wading through keys belonging to human users.
-
-### Last used
-
-The list shows when each key was last used. Use this to spot dormant credentials that may need rotating.
-
-### Viewing permissions
-
-Each row has an overflow menu. Select **View permissions** to open the Test Permissions page for that identity, so you can see exactly what the key can do.
-
-## Disabling API key creation for user accounts
-
-:::div{.hint}
-The ability to disable API key creation for user accounts was added in Octopus Deploy **2023.2**.
-:::
-
-Octopus administrators can disable the creation of API keys for regular user accounts. Existing API keys will continue to function, and new API keys can still be created for [Service Accounts](/docs/security/users-and-teams/service-accounts).
-
-To change the value in the Octopus Web Portal:
-
-1. Navigate to **Configuration ➜ Settings** and click **Authentication**.
-1. Expand the section for **User API Keys** and alter the value.
-1. Click Save.
diff --git a/src/pages/docs/octopus-rest-api/index.mdx b/src/pages/docs/octopus-rest-api/index.mdx
index ad1b3be062..5eb9d0fda9 100644
--- a/src/pages/docs/octopus-rest-api/index.mdx
+++ b/src/pages/docs/octopus-rest-api/index.mdx
@@ -1,37 +1,10 @@
---
-layout: src/layouts/Default.astro
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api
pubDate: 2023-01-01
-modDate: 2024-05-24
-title: Octopus REST API
-subtitle: Octopus is built API-first
-icon: fa-solid fa-circle-nodes
-navTitle: Overview
-navSection: Octopus REST API
-description: Octopus integrates with build servers, scripts, external applications and anything else with its REST API.
-navOrder: 130
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
---
-
-import RestApi from "src/shared-content/concepts/rest-api.include.md";
-
-The opinions and functionality in Octopus are designed to make you productive, but they might not work for everyone. So we've built plenty of escape hatches. You can change the default behaviors, run custom scripts in your deployment process, or use a comprehensive API that does everything the UI can do.
-
-
-
-We designed the Octopus REST API to:
-
-1. Be friendly and easy to figure out.
-2. Be [hypermedia driven](http://en.wikipedia.org/wiki/HATEOAS), using links and the occasional [URI template](http://tools.ietf.org/html/rfc6570).
-3. Be comprehensive - 100% of the actions you perform via the Octopus UI, you can perform via the API.
-4. Provide a great developer experience through [API clients](/docs/octopus-rest-api/octopus.client) and [detailed examples](/docs/octopus-rest-api/examples).
-
-## Octopus Command Line (CLI)
-
-The Octopus CLI is a command line tool that builds on top of the [Octopus Deploy REST API](/docs/octopus-rest-api). With the Octopus CLI, you can push your application packages for deployment as either zip or NuGet packages, and manage your environments, deployments, projects, and workers.
-
-The Octopus CLI can be used on Windows, Mac, Linux, and Docker. For installation options and direct downloads, visit the [CLI Readme](https://github.com/OctopusDeploy/cli/blob/main/README.md).
-
-For more information see [Octopus Command Line (CLI)](/docs/cli).
-
-## Next steps
-
-Follow our [getting started with the Octopus REST API](/docs/octopus-rest-api/getting-started) guide or learn [how to create an API key](/docs/octopus-rest-api/how-to-create-an-api-key).
diff --git a/src/pages/docs/octopus-rest-api/migration-api.md b/src/pages/docs/octopus-rest-api/migration-api.md
new file mode 100644
index 0000000000..f449fd01b1
--- /dev/null
+++ b/src/pages/docs/octopus-rest-api/migration-api.md
@@ -0,0 +1,10 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/migrations
+pubDate: 2023-01-01
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/octopus-rest-api/migration-api/index.md b/src/pages/docs/octopus-rest-api/migration-api/index.md
deleted file mode 100644
index 4ef3e178aa..0000000000
--- a/src/pages/docs/octopus-rest-api/migration-api/index.md
+++ /dev/null
@@ -1,249 +0,0 @@
----
-layout: src/layouts/Default.astro
-pubDate: 2023-01-01
-modDate: 2024-06-25
-title: Migration API in Octopus
-navTitle: Migration API
-description: Octopus includes a migration API that provides the ability to back-up and restore parts of an Octopus Deploy instance remotely.
-navOrder: 90
----
-
-Octopus includes a migration API that provides the ability to back-up and restore parts of an Octopus Deploy instance remotely.
-
-The API currently includes support for both the [partial-export](/docs/octopus-rest-api/octopus.migrator.exe-command-line/partial-export/) and [import](/docs/octopus-rest-api/octopus.migrator.exe-command-line/import/) commands. The API uses the same [Migrator.exe command line tool](/docs/octopus-rest-api/octopus.migrator.exe-command-line) that you'd typically use to migrate data manually, but the API gives you some additional parameters to orchestrate the process between remote servers.
-
-:::div{.warning}
-**Note:** the migration API is **not supported** for migrations from self-hosted Octopus Server to Octopus Cloud currently - please see [migrating from self-hosted to Octopus Cloud](/docs/octopus-cloud/migrations) for information on how to migrate to Octopus Cloud.
-:::
-
-## How it works
-
-When you trigger a migration via the API, your Octopus Server will queue up a migration task that you can view from your **Tasks** screen. During execution of this task, your Octopus Server will go into [maintenance mode](/docs/administration/managing-infrastructure/maintenance-mode) to try and minimize any data mutations during the migration. When the task is completed, it will be taken out of maintenance mode.
-
-:::div{.warning}
-We advise that you only use the migration API under the same conditions that you'd typically do a manual migration, i.e., during a maintenance period when you know that:
-
- 1. You're not going to interrupt your daily deployment operations.
- 1. You'll minimize the chance of data mutations during the migration itself.
- 1. The versions of your source and destination servers are the same (don't try and export/import between different versions of Octopus).
-
-:::
-
-The typical process for migrating projects between a source and destination server is as follows:
-
-1. Create an API key for your source server (the server you're exporting from).
-1. Create an API key for your destination server (the server you're importing to).
-1. Get a list of project names that you wish to export from your source server.
-1. Call the `partial-export` migration API against your source server, telling it the destination server URL, API key, password for your migration package, and the list of project names you want to export *(You'll receive a 200 response from the API telling you the TaskId that has been queued to do the actual work)*.
-1. At this point, your source server's task queue will then execute the `partial-export` command using `Migrator.exe`, package up the contents of your export and push it to your destination server's package feed.
-1. Watch your source server's migration task in the Octopus UI to know when this operation is complete ... *Or if you're really keen, you could write a script that queries the task API and it will let you know when the migration task is complete (as seen in the [Octopus.Clients example](#octopusclients-example) below)*.
-1. Call the `import` migration API against your destination server, telling it the package and password to import from *(You'll receive a 200 response from the API telling you the TaskId that has been queued to do the actual work)*.
-1. Your destination server's task queue will then execute an `import` command using `Migrator.exe`.
-1. *At this point, your destination server's task queue will then execute the `import` command using `Migrator.exe`.*
-
-## Partial export API
-
-Using the partial-export API, we can export one or more of our projects and choose to send the package to the destination Octopus Server's package feed.
-
-Partial Export API parameters:
-
-| Parameter | Description |
-| -------------------------------- | ------------- |
-| Password=VALUE | Password to encrypt both the migration package and any sensitive values (This is the shared key between partial-export and import migrations) |
-| Projects=VALUE | Projects to include in the migration |
-| PackageId=VALUE | [Optional] Package Name/ID for your export *(Defaults to `Octopus.Space.Migration` if not provided)* |
-| PackageVersion=VALUE | [Optional] SemVer package version for your export *(Defaults to `1.0.0-{RandomStringGenerator.Generate(8)}` if not provided)* |
-| IgnoreCertificates | [Optional] Excludes certificates from partial export |
-| IgnoreMachines | [Optional] Excludes machines from partial export |
-| IgnoreDeployments | [Optional] Excludes deployments from partial export |
-| IgnoreTenants | [Optional] Excludes tenants from partial export |
-| IncludeTaskLogs | [Optional] Include the task log folder as part of the export |
-| EncryptPackage | [Optional] Encrypt the contents of your migration package *(Uses the `Password` as a shared key so this can be decrypted by your destination server)* |
-| DestinationApiKey=VALUE | [Optional] The API key of your destination server *(Where you'll be importing this exported package)* |
-| DestinationPackageFeed=VALUE | [Optional] The destination Octopus Server base URL *(e.g. )* |
-| SuccessCallbackUri=VALUE | [Optional] A webhook URL you can add if you wish to be notified on successful completion of the migration task *(Your Octopus Server will call this URL using a GET request, appending the `packageId` and `packageVersion` to the URL as querystring parameters)* |
-| FailureCallbackUri=VALUE | [Optional] A webhook URL you can add if you wish to be notified on failure of the migration task *(Your Octopus Server will call this URL using a GET request)* |
-| TaskId | [Response only] This will be populated with the TaskId that gets queued for this migration |
-
-## Import API
-
-The import API lets you import a migration package from your Octopus Server's built-in package feed (which is where packages are pushed to when using the partial-export API).
-
-Import API parameters:
-
-| Parameter | Description |
-| -------------------------------- | ------------- |
-| Password=VALUE | Password that was used during the export migration *(This is the shared key between partial-export and import migrations)* |
-| PackageId=VALUE | Package Name/ID that we are importing |
-| PackageVersion=VALUE | SemVer package version that we are importing |
-| DestinationPackageFeedSpaceId=VALUE | [Optional] If using the Spaces feature, the ID of the Space where the package containing the data to migrate will be uploaded. This is only for the package; the data in the package specifies its own destination Space. |
-| IsEncryptedPackage | [Optional] Tells us whether the package was encrypted *(E.g. if you set `EncryptPackage` on export, you need to set this to `True`)* |
-| IsDryRun | [Optional] Do not commit changes, just print what would have happened *(This allows you to test an import without actually committing the transaction)* |
-| OverwriteExisting | [Optional] If a document with the same name already exists, it will be skipped by default |
-| DeletePackageOnCompletion | [Optional] Removes the migration package that you're importing from on successful completion of the import |
-| SuccessCallbackUri=VALUE | [Optional] A webhook URL you can add if you wish to be notified on successful completion of the migration task *(Your Octopus Server will call this URL using a GET request, appending the `packageId` and `packageVersion` to the URL)* |
-| FailureCallbackUri=VALUE | [Optional] A webhook URL you can add if you wish to be notified on failure of the migration task *(Your Octopus Server will call this URL using a GET request)* |
-| TaskId | [Response only] This will be populated with the TaskId that gets queued for this migration |
-
-## Examples
-
-### Raw request
-
-You can trigger a request however you prefer, using curl, Fiddler, or your tool of choice...
-
-#### Partial export
-
-```text
-Request Method: POST
-Request URL: https://YOUR_SOURCE_OCTOPUS_SERVER/api/migrations/partialexport
-Request Headers:
-- Content-Type: application/json
-- X-Octopus-ApiKey: API-YOUR-SOURCE-KEY
-Request Body:
-{
- "PackageId": "MyAwesomeOctopusMigration",
- "PackageVersion": "1.0.0",
- "Password": "Demo1234",
- "Projects": ["First Project", "Second Project"],
- "EncryptPackage": true,
- "IncludeTaskLogs": true,
- "DestinationApiKey": "API-YOUR-DESTINATION-KEY",
- "DestinationPackageFeed": "https://YOUR_DESTINATION_OCTOPUS_SERVER"
-}
-```
-
-#### Import
-
-```text
-Request Method: POST
-Request URL: https://YOUR_DESTINATION_OCTOPUS_SERVER/api/migrations/import
-Request Headers:
-- Content-Type: application/json
-- X-Octopus-ApiKey: API-YOUR-DESTINATION-KEY
-Request Body:
-{
- "PackageId": "MyAwesomeOctopusMigration",
- "PackageVersion": "1.0.0",
- "Password": "Demo1234",
- "IsDryRun": "true", // Only set this to false when you've reviewed the dry run and are happy to proceed with the migration for real.
- "IsEncryptedPackage": true,
-}
-```
-
-### Spaces
-
-If you are using the Spaces feature of Octopus Deploy on the source server, you should supply the appropriate SpaceID values in the example below. The destination Space cannot be specified; it will match the Source. There are two values to supply:
-
- 1. The location to look for the Projects in the source Space.
- 2. The Space that has the feed we'll be pushing the exported package to.
-
- If you are not using the Spaces feature, you do not need to supply the SpaceID values.
-
-### Octopus.Clients example
-
-The [Octopus.Clients library](/docs/octopus-rest-api/octopus.client) can also help you run a migration.
-
-Here's an example showing you how that might look, performing a `partial-export` from a *source server* and sending it to a *destination server*, then automatically running the associated `import` on the *destination server*:
-
-```powershell
-Add-Type -Path 'YOUR_LOCAL_PATH\Octopus.Client.dll'
-
-$sourceOctopusURI = 'https://SOURCE_OCTOPUS_SERVER'
-$sourceApikey = 'API-YOUR-SOURCE-KEY'
-$destinationOctopusURI = 'https://DESTINATION_OCTOPUS_SERVER'
-$destinationApikey = 'API-YOUR-DESTINATION-KEY'
-
-# Spaces related
-$sourceSpaceId = 'Spaces-1'
-$destinationPackageFeedSpaceId = 'Spaces-1'
-
-$migrationPackageId = 'MyAwesomeOctopusMigration'
-$migrationPackageVersion = '1.0.0'
-$migrationPassword = 'Demo1234'
-$isDryRun = $true # Only set this to false when you've reviewed the dry run and are happy to proceed with the migration for real.
-
-$sourceEndpoint = New-Object Octopus.Client.OctopusServerEndpoint $sourceOctopusURI,$sourceApikey
-$sourceRepository = New-Object Octopus.Client.OctopusRepository $sourceEndpoint
-
-$migrationExportResource = new-object Octopus.Client.Model.Migrations.MigrationPartialExportResource
-$migrationExportResource.PackageId = $migrationPackageId
-$migrationExportResource.PackageVersion = $migrationPackageVersion
-$migrationExportResource.Password = $migrationPassword
-$migrationExportResource.Projects = @('First Project', 'Second Project')
-$migrationExportResource.IgnoreCertificates = $false
-$migrationExportResource.IgnoreMachines = $false
-$migrationExportResource.IgnoreDeployments = $false
-$migrationExportResource.IgnoreTenants = $false
-$migrationExportResource.IncludeTaskLogs = $true
-$migrationExportResource.EncryptPackage = $true
-$migrationExportResource.DestinationPackageFeed = $destinationOctopusURI
-$migrationExportResource.DestinationApiKey = $destinationApikey
-
-$migrationExportResource.SpaceId = $sourceSpaceId
-$migrationExportResource.DestinationPackageFeedSpaceId = $destinationPackageFeedSpaceId
-
-
-$migrationExportResource = $sourceRepository.Migrations.PartialExport($migrationExportResource)
-
-Write-Host("Export task queued: $($migrationExportResource.TaskId)")
-$migrationExportTask = $sourceRepository.Tasks.Get($migrationExportResource.TaskId);
-if ($migrationExportTask -eq $null) {
- Write-Host ("Export failed. You'll need to investigate.")
- Exit
-}
-
-# Now we can poll this migration task to know when our export is complete #ScriptingFTW
-Write-Host("Export task: $($migrationExportTask.Id)")
-while($migrationExportTask -and ($migrationExportTask.State -eq 'Queued' -or $migrationExportTask.State -eq 'Executing' -or $migrationExportTask.State -eq 'Cancelling')){
- Write-Host("Export task status: $($migrationExportTask.State). Re-checking in 5 seconds...")
- start-sleep -s 5
- $migrationExportTask = $sourceRepository.Tasks.Get($migrationExportTask.Id);
-}
-Write-Host("Export task completed: $($migrationExportTask.State)")
-
-if ($migrationExportTask.State -ne 'Success' -or $migrationExportTask.HasWarningsOrErrors -eq $true) {
- Write-Host ("Export failed or has warnings/errors. You'll need to investigate.")
- Exit
-}
-
-# From here, we can proceed with an import on our destination server.
-$destinationEndpoint = New-Object Octopus.Client.OctopusServerEndpoint $destinationOctopusURI,$destinationApikey
-$destinationRepository = New-Object Octopus.Client.OctopusRepository $destinationEndpoint
-
-$migrationImportResource = new-object Octopus.Client.Model.Migrations.MigrationImportResource
-$migrationImportResource.PackageId = $migrationPackageId
-$migrationImportResource.PackageVersion = $migrationPackageVersion
-$migrationImportResource.Password = $migrationPassword
-$migrationImportResource.IsDryRun = $isDryRun
-$migrationImportResource.IsEncryptedPackage = $true
-$migrationImportResource.DeletePackageOnCompletion = $true # May as well clean up after ourselves.
-
-$migrationImportResource = $destinationRepository.Migrations.Import($migrationImportResource)
-
-Write-Host("Import task queued: $($migrationExportResource.TaskId)")
-$migrationImportTask = $destinationRepository.Tasks.Get($migrationImportResource.TaskId);
-if ($migrationImportTask -eq $null) {
- Write-Host ("Import failed. You'll need to investigate.")
- Exit
-}
-
-# Now we can poll this migration task to know when our import is complete.
-Write-Host("Import task: $($migrationImportTask.Id)")
-while($migrationImportTask -and ($migrationImportTask.State -eq 'Queued' -or $migrationImportTask.State -eq 'Executing' -or $migrationImportTask.State -eq 'Cancelling')){
- Write-Host("Import task status: $($migrationImportTask.State). Re-checking in 5 seconds...")
- start-sleep -s 5
- $migrationImportTask = $destinationRepository.Tasks.Get($migrationImportTask.Id);
-}
-Write-Host("Import task completed: $($migrationImportTask.State)")
-
-if ($migrationImportTask.State -ne 'Success' -or $migrationImportTask.HasWarningsOrErrors -eq $true) {
- Write-Host ("Import failed or has warnings/errors. You'll need to investigate.")
- Exit
-}
-
-Write-Host ("Migration complete, #GreatSuccess")
-```
-
-## Troubleshooting
-
-We do our best to log information and warnings to your task logs during a migration. An API migration follows the same path as a manual migration using [Migrator.exe command line tools](/docs/octopus-rest-api/octopus.migrator.exe-command-line/) behind the scenes, so if you are having difficulty running migrations, be sure to check your [task logs](/docs/support/get-the-raw-output-from-a-task) for information that might help.
diff --git a/src/pages/docs/octopus-rest-api/octopus.client.md b/src/pages/docs/octopus-rest-api/octopus.client.md
new file mode 100644
index 0000000000..c5eb42c68c
--- /dev/null
+++ b/src/pages/docs/octopus-rest-api/octopus.client.md
@@ -0,0 +1,10 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/octopus.client
+pubDate: 2023-01-01
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/octopus-rest-api/openid-connect.md b/src/pages/docs/octopus-rest-api/openid-connect.md
new file mode 100644
index 0000000000..427d7ce7e1
--- /dev/null
+++ b/src/pages/docs/octopus-rest-api/openid-connect.md
@@ -0,0 +1,10 @@
+---
+layout: src/layouts/Redirect.astro
+title: Redirect
+redirect: https://octopus.com/docs/api/authentication/openid-connect
+pubDate: 2023-01-01
+modDate: 2026-09-01
+navSearch: false
+navSitemap: false
+navMenu: false
+---
diff --git a/src/pages/docs/packaging-applications/build-servers/appveyor/index.md b/src/pages/docs/packaging-applications/build-servers/appveyor/index.md
index 28e8b04ac8..ef5532b4e8 100644
--- a/src/pages/docs/packaging-applications/build-servers/appveyor/index.md
+++ b/src/pages/docs/packaging-applications/build-servers/appveyor/index.md
@@ -62,7 +62,7 @@ You can use a wildcard to pick up the dynamically generated package.
Next, go to the **Deployment** page in your project's settings and click **Add deployment** and from the **Deployment providers** select **Octopus Deploy**.
-Enter the URL where the Octopus Server can be reached, and add an [API key](/docs/octopus-rest-api/how-to-create-an-api-key).
+Enter the URL where the Octopus Server can be reached, and add an [API key](/docs/api/authentication/create-an-api-key).
:::figure

diff --git a/src/pages/docs/packaging-applications/build-servers/bamboo.md b/src/pages/docs/packaging-applications/build-servers/bamboo.md
index c55038c072..f61f112e8c 100644
--- a/src/pages/docs/packaging-applications/build-servers/bamboo.md
+++ b/src/pages/docs/packaging-applications/build-servers/bamboo.md
@@ -203,7 +203,7 @@ The `Octopus URL` field defines the URL of the Octopus Server that the package w
### API key
-The `API key` field defines the API key that is used to authenticate with the Octopus Server. See [How to create an API key](/docs/octopus-rest-api/how-to-create-an-api-key) for more information.
+The `API key` field defines the API key that is used to authenticate with the Octopus Server. See [How to create an API key](/docs/api/authentication/create-an-api-key) for more information.
### Octopus CLI
diff --git a/src/pages/docs/packaging-applications/build-servers/codefresh-pipelines.md b/src/pages/docs/packaging-applications/build-servers/codefresh-pipelines.md
index a678985c05..8e4c7d2a65 100644
--- a/src/pages/docs/packaging-applications/build-servers/codefresh-pipelines.md
+++ b/src/pages/docs/packaging-applications/build-servers/codefresh-pipelines.md
@@ -324,7 +324,7 @@ Each step includes one or two examples to help with setting up a workflow. Basic
### Log into Octopus
-The **octopusdeploy-login** step authenticates to Octopus via OIDC, so your Octopus server needs a [service account with OIDC enabled](/docs/octopus-rest-api/openid-connect/other-issuers).
+The **octopusdeploy-login** step authenticates to Octopus via OIDC, so your Octopus server needs a [service account with OIDC enabled](/docs/api/authentication/openid-connect/other-issuers).
To allow connections from Codefresh, the service account's OIDC identity should have **Issuer** `https://oidc.codefresh.io` and a **Subject** matching the [Codefresh subject claim for your preferred pipeline trigger](https://codefresh.io/docs/docs/integrations/oidc-pipelines/#codefresh-trigger-types-for-subject-claims).
The **octopusdeploy-login** step requires an `ID_TOKEN`, which can be generated by running the Codefresh **obtain-oidc-id-token** Marketplace step. This step sets the token as an environment variable which can be passed into the Octopus login step as an argument. See the [Codefresh OIDC documentation](https://codefresh.io/docs/docs/integrations/oidc-pipelines/) for further details.
diff --git a/src/pages/docs/packaging-applications/build-servers/jenkins/index.mdx b/src/pages/docs/packaging-applications/build-servers/jenkins/index.mdx
index ababee5541..91562b5870 100644
--- a/src/pages/docs/packaging-applications/build-servers/jenkins/index.mdx
+++ b/src/pages/docs/packaging-applications/build-servers/jenkins/index.mdx
@@ -45,7 +45,7 @@ After you have installed the Octopus Deploy plugin. First navigate to **Manage J
:::div{.success}
**Creating API keys**
-Learn [how to create an API key](/docs/octopus-rest-api/how-to-create-an-api-key) so the plugin can interact with your Octopus Server.
+Learn [how to create an API key](/docs/api/authentication/create-an-api-key) so the plugin can interact with your Octopus Server.
:::
### Octopus CLI
@@ -71,7 +71,7 @@ Next, navigate to **Manage Jenkins ➜ Configure System**.
#### Octopus Server settings
-Here you can create the link to your Octopus Server. You can add more than one if your organization uses multiple servers. This is where you supply an API Key, select a Service Account with suitable permission and see [how to create an API key](/docs/octopus-rest-api/how-to-create-an-api-key) for it.
+Here you can create the link to your Octopus Server. You can add more than one if your organization uses multiple servers. This is where you supply an API Key, select a Service Account with suitable permission and see [how to create an API key](/docs/api/authentication/create-an-api-key) for it.
:::figure

diff --git a/src/pages/docs/packaging-applications/build-servers/teamcity.mdx b/src/pages/docs/packaging-applications/build-servers/teamcity.mdx
index 336da4fc2e..1188213670 100644
--- a/src/pages/docs/packaging-applications/build-servers/teamcity.mdx
+++ b/src/pages/docs/packaging-applications/build-servers/teamcity.mdx
@@ -37,7 +37,7 @@ The plugin is simply a wrapper for the [Octopus CLI](/docs/cli/octopus-cli), the
Octopus can be used as a [NuGet package repository](/docs/packaging-applications/package-repositories/built-in-repository), or it can be configured to use an external feed (such as retrieving them from TeamCity).
-To push packages to Octopus during the OctoPack phase, enter the NuGet endpoint URL into the **Publish packages to http** field, and [an API key](/docs/octopus-rest-api/how-to-create-an-api-key) in the **Publish API Key** field. OctoPack will then push the packages when the solution is built. You'll find the URL to your repository on the **Deploy ➜ Manage ➜ Packages** tab in Octopus. Simply click the `Show examples` link to see options to upload packages including the repository URL.
+To push packages to Octopus during the OctoPack phase, enter the NuGet endpoint URL into the **Publish packages to http** field, and [an API key](/docs/api/authentication/create-an-api-key) in the **Publish API Key** field. OctoPack will then push the packages when the solution is built. You'll find the URL to your repository on the **Deploy ➜ Manage ➜ Packages** tab in Octopus. Simply click the `Show examples` link to see options to upload packages including the repository URL.
## Consuming the TeamCity NuGet feed in Octopus \{#TeamCity-ConsumeNuGetFeedInOctopusConsumingTheTeamCityNuGetFeedInOctopus}
diff --git a/src/pages/docs/packaging-applications/build-servers/tfs-azure-devops/using-octopus-extension/index.mdx b/src/pages/docs/packaging-applications/build-servers/tfs-azure-devops/using-octopus-extension/index.mdx
index 83c9b73bcd..673d2a560d 100644
--- a/src/pages/docs/packaging-applications/build-servers/tfs-azure-devops/using-octopus-extension/index.mdx
+++ b/src/pages/docs/packaging-applications/build-servers/tfs-azure-devops/using-octopus-extension/index.mdx
@@ -55,7 +55,7 @@ You can bring your own version of the Octopus CLI and avoid the use of installer
Follow [these](https://docs.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints) instructions to create a new service connection and make sure you pick **Octopus Deploy**.
-Enter a valid [Octopus API Key](/docs/octopus-rest-api/how-to-create-an-api-key) in the **API Key** field and the Octopus Server url.
+Enter a valid [Octopus API Key](/docs/api/authentication/create-an-api-key) in the **API Key** field and the Octopus Server url.
After you've saved the connection, it should be available from the Octopus Deploy Build Tasks.
diff --git a/src/pages/docs/packaging-applications/create-packages/octopack/index.md b/src/pages/docs/packaging-applications/create-packages/octopack/index.md
index a9673b05b1..4b8a36b75e 100644
--- a/src/pages/docs/packaging-applications/create-packages/octopack/index.md
+++ b/src/pages/docs/packaging-applications/create-packages/octopack/index.md
@@ -225,7 +225,7 @@ Octopus provides a [built-in package repository](/docs/packaging-applications/pa
To push your packages to the Octopus built-in repository use the following settings:
- `/p:OctoPackPublishPackageToHttp=http://your.octopusserver.com/nuget/packages`: this is the URL to your Octopus Server noting the `/nuget/packages` path.
-- `/p:OctoPackPublishApiKey=API-YOUR-KEY`: the [Octopus API key](/docs/octopus-rest-api/how-to-create-an-api-key) you want to use for pushing packages noting [these security considerations](/docs/packaging-applications/package-repositories/built-in-repository/#security-considerations).
+- `/p:OctoPackPublishApiKey=API-YOUR-KEY`: the [Octopus API key](/docs/api/authentication/create-an-api-key) you want to use for pushing packages noting [these security considerations](/docs/packaging-applications/package-repositories/built-in-repository/#security-considerations).
## Push a NuGet package that already exists
diff --git a/src/pages/docs/packaging-applications/create-packages/octopus-cli.md b/src/pages/docs/packaging-applications/create-packages/octopus-cli.md
index 763cec8183..a07de5cdac 100644
--- a/src/pages/docs/packaging-applications/create-packages/octopus-cli.md
+++ b/src/pages/docs/packaging-applications/create-packages/octopus-cli.md
@@ -7,7 +7,7 @@ description: Using the Octopus CLI (octopus) command line tool to create package
navOrder: 30
---
-The Octopus CLI (`octopus`) is a command line tool that interacts with the [Octopus Deploy REST API](/docs/octopus-rest-api/) and includes packaging commands to create packages either as [Zip](#create-zip-packages) or [NuGet](#create-nuget-packages) packages for deployment with Octopus.
+The Octopus CLI (`octopus`) is a command line tool that interacts with the [Octopus Deploy REST API](/docs/api/) and includes packaging commands to create packages either as [Zip](#create-zip-packages) or [NuGet](#create-nuget-packages) packages for deployment with Octopus.
## Installation
diff --git a/src/pages/docs/packaging-applications/package-repositories/built-in-repository/index.md b/src/pages/docs/packaging-applications/package-repositories/built-in-repository/index.md
index eaf673d4d3..f51b191838 100644
--- a/src/pages/docs/packaging-applications/package-repositories/built-in-repository/index.md
+++ b/src/pages/docs/packaging-applications/package-repositories/built-in-repository/index.md
@@ -17,7 +17,7 @@ It is possible to manually upload a package file from your local machine via the
However, we recommend using a [build server](/docs/packaging-applications/build-servers) to build, test, package and automatically upload your release packages into the Octopus Deploy built-in repository.
-In most cases you simply provide the build server with the URL to your Octopus Server and an [Octopus API key](/docs/octopus-rest-api/how-to-create-an-api-key) with the required permissions (see [security considerations](/docs/packaging-applications/package-repositories/built-in-repository/#security-considerations)).
+In most cases you simply provide the build server with the URL to your Octopus Server and an [Octopus API key](/docs/api/authentication/create-an-api-key) with the required permissions (see [security considerations](/docs/packaging-applications/package-repositories/built-in-repository/#security-considerations)).
In addition to manually uploading packages or using your build server, you can add, upload packages to the built-in feed in the following ways:
@@ -30,7 +30,7 @@ In addition to manually uploading packages or using your build server, you can a
To push packages using these methods, you will need:
1. The URL to your Octopus Server.
-2. An [Octopus API key](/docs/octopus-rest-api/how-to-create-an-api-key) with the required permissions (see [security considerations](/docs/packaging-applications/package-repositories/built-in-repository/#security-considerations)).
+2. An [Octopus API key](/docs/api/authentication/create-an-api-key) with the required permissions (see [security considerations](/docs/packaging-applications/package-repositories/built-in-repository/#security-considerations)).
## Using the Octopus CLI {#UsingOctopusCli}
@@ -62,14 +62,14 @@ You can upload a package via the [Octopus Deploy API](/docs/octopus-rest-api) -
## Using NuGet.exe push {#UsingNuGetExePush}
-To push a package using `NuGet.exe` you'll need the URL for the Octopus NuGet feed to use with your build server or `NuGet.exe`. To find this, open the **Deploy ➜ Manage ➜ Packages** tab of the Octopus Web Portal. The Help sidebar has options and examples of how to upload packages. The screen shows an example command-line that can be used to push packages to the feed using [NuGet.exe](http://docs.nuget.org/docs/start-here/installing-nuget). You'll need to supply the NuGet package file (`.nupkg`) and an [Octopus API key](/docs/octopus-rest-api/how-to-create-an-api-key).
+To push a package using `NuGet.exe` you'll need the URL for the Octopus NuGet feed to use with your build server or `NuGet.exe`. To find this, open the **Deploy ➜ Manage ➜ Packages** tab of the Octopus Web Portal. The Help sidebar has options and examples of how to upload packages. The screen shows an example command-line that can be used to push packages to the feed using [NuGet.exe](http://docs.nuget.org/docs/start-here/installing-nuget). You'll need to supply the NuGet package file (`.nupkg`) and an [Octopus API key](/docs/api/authentication/create-an-api-key).
:::figure

:::
:::div{.success}
-If you're using a continuous integration server like TeamCity to produce packages you can use their built-in NuGet Push step. Supply the Octopus NuGet feed URL shown above and an [Octopus API key](/docs/octopus-rest-api/how-to-create-an-api-key) when prompted for the feed details.
+If you're using a continuous integration server like TeamCity to produce packages you can use their built-in NuGet Push step. Supply the Octopus NuGet feed URL shown above and an [Octopus API key](/docs/api/authentication/create-an-api-key) when prompted for the feed details.
:::
If a package with the same version exists, and you want to force the Octopus Server to replace it, you can modify the URL to include a `?replace=true` parameter:
diff --git a/src/pages/docs/platform-hub/templates/process-templates/troubleshooting.md b/src/pages/docs/platform-hub/templates/process-templates/troubleshooting.md
index dccc5bd63f..7ada915103 100644
--- a/src/pages/docs/platform-hub/templates/process-templates/troubleshooting.md
+++ b/src/pages/docs/platform-hub/templates/process-templates/troubleshooting.md
@@ -141,7 +141,7 @@ Process templates can be created and managed through our [public API](/docs/octo
We do not currently support creating or managing process templates through the CLI or the Terraform provider.
:::
-See [CreateProcessTemplateUsageStep](https://github.com/OctopusDeploy/OctopusDeploy-Api/blob/master/Octopus.Client/Csharp/DeploymentProcesses/CreateProcessTemplateUsageStep.cs) for an example of how to configure a process template on a deployment process using [Octopus.Client](/docs/octopus-rest-api/octopus.client).
+See [CreateProcessTemplateUsageStep](https://github.com/OctopusDeploy/OctopusDeploy-Api/blob/master/Octopus.Client/Csharp/DeploymentProcesses/CreateProcessTemplateUsageStep.cs) for an example of how to configure a process template on a deployment process using [Octopus.Client](/docs/api/octopus.client).
### GitHub Connections
diff --git a/src/pages/docs/projects/deployment-process/index.mdx b/src/pages/docs/projects/deployment-process/index.mdx
index adeb8307d6..2c88abb55b 100644
--- a/src/pages/docs/projects/deployment-process/index.mdx
+++ b/src/pages/docs/projects/deployment-process/index.mdx
@@ -83,7 +83,7 @@ Octopus Deploy is built API-first, which means everything you can do through the
- Steps
- Actions
-We have provided lots of helpful functions for building your deployment process in the [.NET SDK](/docs/octopus-rest-api/octopus.client), or you can use the raw HTTP API if that suits your needs better.
+We have provided lots of helpful functions for building your deployment process in the [.NET SDK](/docs/api/octopus.client), or you can use the raw HTTP API if that suits your needs better.
Learn about using the [Octopus REST API](/docs/octopus-rest-api).
diff --git a/src/pages/docs/projects/export-import/index.mdx b/src/pages/docs/projects/export-import/index.mdx
index 5aebd991f7..44d87df13e 100644
--- a/src/pages/docs/projects/export-import/index.mdx
+++ b/src/pages/docs/projects/export-import/index.mdx
@@ -249,8 +249,8 @@ You can use the [Octopus REST API](/docs/octopus-rest-api) to export or import O
To find out more take a look at our examples:
-- [Export projects](/docs/octopus-rest-api/examples/projects/export-projects)
-- [Import projects](/docs/octopus-rest-api/examples/projects/import-projects)
+- [Export projects](/docs/api/examples/projects/export-projects)
+- [Import projects](/docs/api/examples/projects/import-projects)
## Older versions
diff --git a/src/pages/docs/releases/channels/index.md b/src/pages/docs/releases/channels/index.md
index e07313c311..cd8f7f36e1 100644
--- a/src/pages/docs/releases/channels/index.md
+++ b/src/pages/docs/releases/channels/index.md
@@ -301,7 +301,7 @@ The package list allows you to select the version of each package involved in th
### Using build server extensions or the Octopus CLI
-When using one of the [build server extensions](/docs/octopus-rest-api/) or the [Octopus CLI](/docs/cli/octopus-cli/create-release) to create releases, you can either let Octopus automatically choose the correct channel for your release (this is the default behavior), or choose a specific channel yourself.
+When using one of the [build server extensions](/docs/api/) or the [Octopus CLI](/docs/cli/octopus-cli/create-release) to create releases, you can either let Octopus automatically choose the correct channel for your release (this is the default behavior), or choose a specific channel yourself.
### Built-in package repository triggers
diff --git a/src/pages/docs/runbooks/runbook-permissions/index.md b/src/pages/docs/runbooks/runbook-permissions/index.md
index 91c2d074d3..136ef9cd12 100644
--- a/src/pages/docs/runbooks/runbook-permissions/index.md
+++ b/src/pages/docs/runbooks/runbook-permissions/index.md
@@ -42,7 +42,7 @@ Octopus Deploy is built API-first, which means everything you can do through the
- RunbookSnapshots *(a runbook can have many snapshots, each with a unique name. Creating a snapshot needs RunbookSnapshotCreate, and publishing or deleting one needs RunbookEdit.)*
- RunbookRuns *(a runbook snapshot will then be run/executed against an environment, with RunbookRunCreate permissions.)*
-We have provided lots of helpful functions for building your runbook process in the [.NET SDK](/docs/octopus-rest-api/octopus.client), or you can use the raw HTTP API if that suits your needs better.
+We have provided lots of helpful functions for building your runbook process in the [.NET SDK](/docs/api/octopus.client), or you can use the raw HTTP API if that suits your needs better.
Learn about using the [Octopus REST API](/docs/octopus-rest-api).
diff --git a/src/pages/docs/runbooks/webhook-runbook-trigger/index.md b/src/pages/docs/runbooks/webhook-runbook-trigger/index.md
index e42e464452..900969134d 100644
--- a/src/pages/docs/runbooks/webhook-runbook-trigger/index.md
+++ b/src/pages/docs/runbooks/webhook-runbook-trigger/index.md
@@ -67,7 +67,7 @@ Runbook runs created this way are not attributed to an Octopus user, so no permi
### Octopus API key
-With **Octopus API key**, callers authenticate as an Octopus user by sending an [API key](/docs/octopus-rest-api/how-to-create-an-api-key) in the `X-Octopus-ApiKey` header:
+With **Octopus API key**, callers authenticate as an Octopus user by sending an [API key](/docs/api/authentication/create-an-api-key) in the `X-Octopus-ApiKey` header:
```bash
curl -X POST https://your-octopus-url/api/Spaces-1/webhook/00000000-0000-0000-0000-000000000000 \
diff --git a/src/pages/docs/security/cve/csrf-and-octopus-deploy.md b/src/pages/docs/security/cve/csrf-and-octopus-deploy.md
index fd0f1adc16..adb1c3716f 100644
--- a/src/pages/docs/security/cve/csrf-and-octopus-deploy.md
+++ b/src/pages/docs/security/cve/csrf-and-octopus-deploy.md
@@ -66,7 +66,7 @@ Octopus requires two cookies when using a web browser: the authentication cookie
### Using the Octopus REST API with raw HTTP
-If you use raw HTTP to access Octopus Deploy we recommend using an [API Key](/docs/octopus-rest-api/how-to-create-an-api-key/) to authenticate your requests. Learn about the [Octopus REST API](/docs/octopus-rest-api) including [authenticating with the Octopus REST API](/docs/octopus-rest-api/#authentication).
+If you use raw HTTP to access Octopus Deploy we recommend using an [API Key](/docs/api/authentication/create-an-api-key/) to authenticate your requests. Learn about the [Octopus REST API](/docs/octopus-rest-api) including [authenticating with the Octopus REST API](/docs/api/#authentication).
### Contact Octopus support {#support}
diff --git a/src/pages/docs/security/users-and-teams/auditing/index.md b/src/pages/docs/security/users-and-teams/auditing/index.md
index 570ee52951..18e4278e04 100644
--- a/src/pages/docs/security/users-and-teams/auditing/index.md
+++ b/src/pages/docs/security/users-and-teams/auditing/index.md
@@ -22,7 +22,7 @@ Some general points worth noting:
- Octopus **does** capture the details of every mutating action (create/edit/delete) including who initiated the action.
- Octopus **does** capture login events for specific user accounts, but **not** logout.
- Octopus **does not** capture when data is read, however certain sensitive actions like downloading a certificate with its private key is captured.
-- When an action is performed via an [agent API key](/docs/octopus-rest-api/how-to-create-an-api-key#creating-an-agent-api-key), Octopus captures the API key name alongside the action, so you can trace agent activity back to a specific credential and its owner.
+- When an action is performed via an [agent API key](/docs/api/authentication/create-an-api-key#creating-an-agent-api-key), Octopus captures the API key name alongside the action, so you can trace agent activity back to a specific credential and its owner.
If you are concerned that Octopus does not capture a specific action of interest to you, please contact our [support team](https://octopus.com/support).
diff --git a/src/pages/docs/security/users-and-teams/index.md b/src/pages/docs/security/users-and-teams/index.md
index d52b09da52..d2325afb8d 100644
--- a/src/pages/docs/security/users-and-teams/index.md
+++ b/src/pages/docs/security/users-and-teams/index.md
@@ -22,9 +22,9 @@ You can manage users and teams in the Octopus Web Portal:
## User and service accounts
-**User accounts** are allowed to use both the Octopus Web Portal and the Octopus API, and can authenticate with a username and password, [Active Directory credentials](/docs/security/authentication/active-directory/), or an [Octopus API key](/docs/octopus-rest-api/how-to-create-an-api-key).
+**User accounts** are allowed to use both the Octopus Web Portal and the Octopus API, and can authenticate with a username and password, [Active Directory credentials](/docs/security/authentication/active-directory/), or an [Octopus API key](/docs/api/authentication/create-an-api-key).
-[Service accounts](/docs/security/users-and-teams/service-accounts/) are **API-only accounts** that should be used for automated services that integrate with Octopus Deploy, and can only authenticate with an [Octopus API key](/docs/octopus-rest-api/how-to-create-an-api-key/). For more information refer to [Service accounts](/docs/security/users-and-teams/service-accounts).
+[Service accounts](/docs/security/users-and-teams/service-accounts/) are **API-only accounts** that should be used for automated services that integrate with Octopus Deploy, and can only authenticate with an [Octopus API key](/docs/api/authentication/create-an-api-key/). For more information refer to [Service accounts](/docs/security/users-and-teams/service-accounts).
:::div{.success}
You should create a different User account for each person that will use Octopus Deploy. You should create a different [Service account](/docs/security/users-and-teams/service-accounts) for each service that will integrate with Octopus Deploy.
diff --git a/src/pages/docs/security/users-and-teams/service-accounts.md b/src/pages/docs/security/users-and-teams/service-accounts.md
index 8f5bec1057..fb7834a494 100644
--- a/src/pages/docs/security/users-and-teams/service-accounts.md
+++ b/src/pages/docs/security/users-and-teams/service-accounts.md
@@ -18,7 +18,7 @@ It is best to create **Service accounts** for this purpose to provide each servi
:::div{.hint}
**Service accounts** are **API-only accounts** that can be assigned permissions in the same way you do for normal accounts, but are prevented from using the Octopus Web Portal.
-Service accounts authenticate with the Octopus API using [OpenID Connect](/docs/octopus-rest-api/openid-connect) or an [Octopus API Key](/docs/octopus-rest-api/how-to-create-an-api-key). For dedicated agent service accounts, see [Agent service accounts](/docs/security/users-and-teams/service-accounts#agent-service-accounts).
+Service accounts authenticate with the Octopus API using [OpenID Connect](/docs/api/authentication/openid-connect) or an [Octopus API Key](/docs/api/authentication/create-an-api-key). For dedicated agent service accounts, see [Agent service accounts](/docs/security/users-and-teams/service-accounts#agent-service-accounts).
:::
## Creating a service account {#ServiceAccounts-CreatingAServiceAccount}
@@ -37,12 +37,12 @@ Creating a new Service account is very similar to creating a new User account:
:::
:::div{.hint}
-This Service account is not very useful until it [belongs to one or more teams](/docs/security/users-and-teams/), and has one or more [OpenID Connect Identities](/docs/octopus-rest-api/openid-connect) or [Octopus API keys](/docs/octopus-rest-api/how-to-create-an-api-key) associated with it.
+This Service account is not very useful until it [belongs to one or more teams](/docs/security/users-and-teams/), and has one or more [OpenID Connect Identities](/docs/api/authentication/openid-connect) or [Octopus API keys](/docs/api/authentication/create-an-api-key) associated with it.
:::
## OpenID Connect (OIDC)
-You can use [OpenID Connect (OIDC)](/docs/octopus-rest-api/openid-connect) to automate Octopus with another service without needing to provision or manage API Keys. To do this you configure a specific *OIDC Identity* for the service which allows it to connect to Octopus securely. The service then exchanges an ID token with Octopus for a short-lived access token which it can then use for API requests.
+You can use [OpenID Connect (OIDC)](/docs/api/authentication/openid-connect) to automate Octopus with another service without needing to provision or manage API Keys. To do this you configure a specific *OIDC Identity* for the service which allows it to connect to Octopus securely. The service then exchanges an ID token with Octopus for a short-lived access token which it can then use for API requests.
## API Keys
@@ -50,7 +50,7 @@ You can use [OpenID Connect (OIDC)](/docs/octopus-rest-api/openid-connect) to au

:::
-Once you have created an [Octopus API key](/docs/octopus-rest-api/how-to-create-an-api-key/) and [added this Service account to a team](/docs/security/users-and-teams), you can start using this Service account to automate Octopus with another service.
+Once you have created an [Octopus API key](/docs/api/authentication/create-an-api-key/) and [added this Service account to a team](/docs/security/users-and-teams), you can start using this Service account to automate Octopus with another service.
## Agent service accounts {#agent-service-accounts}
@@ -64,7 +64,7 @@ To create an agent service account:
2. Enter a **Service Username** and **Service Display Name** for the agent.
3. Save the user.
-Once created, [add the agent service account to one or more teams](/docs/security/users-and-teams) to grant it the permissions it needs, then [create an agent API key](/docs/octopus-rest-api/how-to-create-an-api-key#creating-an-agent-api-key) for it.
+Once created, [add the agent service account to one or more teams](/docs/security/users-and-teams) to grant it the permissions it needs, then [create an agent API key](/docs/api/authentication/create-an-api-key#creating-an-agent-api-key) for it.
## Logins
diff --git a/src/pages/docs/sitemap.xml.ts b/src/pages/docs/sitemap.xml.ts
index a35166336c..a80c3e75cc 100644
--- a/src/pages/docs/sitemap.xml.ts
+++ b/src/pages/docs/sitemap.xml.ts
@@ -4,7 +4,6 @@
import { accelerator } from '@lib/accelerator';
import { SITE } from '@config';
import { PostFiltering } from 'astro-accelerator-utils';
-import { isUnderConstruction } from '@lib/underConstruction';
import { flattenGeneratedPath } from '@lib/generatedPaths';
async function getData() {
@@ -14,11 +13,6 @@ async function getData() {
let pages = [];
for (const path in allPages) {
- // Temporary - see src/lib/underConstruction.ts.
- if (isUnderConstruction(path)) {
- continue;
- }
-
const article: any = await allPages[path]();
const addToSitemap = PostFiltering.showInSitemap(article);
diff --git a/src/pages/docs/tenants/tag-sets.md b/src/pages/docs/tenants/tag-sets.md
index 87f4457008..73cd51c85e 100644
--- a/src/pages/docs/tenants/tag-sets.md
+++ b/src/pages/docs/tenants/tag-sets.md
@@ -84,7 +84,7 @@ For example:
You can use canonical names when:
-- Deploying releases using [build server integrations](/docs/octopus-rest-api/) or the [Octopus CLI](/docs/cli/octopus-cli/).
+- Deploying releases using [build server integrations](/docs/api/) or the [Octopus CLI](/docs/cli/octopus-cli/).
- Scoping variables to tags.
- Automating Octopus via the [Octopus REST API](/docs/octopus-rest-api).
@@ -98,5 +98,5 @@ You can use canonical names when:
## Learn more
-- [Create a tag set via the REST API](/docs/octopus-rest-api/examples/tagsets/create-tagset)
+- [Create a tag set via the REST API](/docs/api/examples/tagsets/create-tagset)
- [Deployment patterns blog posts](https://octopus.com/blog/tag/Deployment%20Patterns)
diff --git a/src/pages/docs/tenants/tenant-creation/index.mdx b/src/pages/docs/tenants/tenant-creation/index.mdx
index 3e6514d3e5..1ac8b8c229 100644
--- a/src/pages/docs/tenants/tenant-creation/index.mdx
+++ b/src/pages/docs/tenants/tenant-creation/index.mdx
@@ -15,7 +15,7 @@ import TenantsCreateTenant from 'src/shared-content/tenants/tenants-create-tenan
Now that you've created a tenant, you can enable [tenanted deployments](/docs/tenants/tenant-creation/tenanted-deployments/) and then [connect the tenant to a project](/docs/tenants/tenant-creation/connecting-projects).
:::div{.hint}
-It's also possible to create a tenant using the [Octopus REST API](/docs/octopus-rest-api/). Learn more in our [create a tenant](/docs/octopus-rest-api/examples/tenants/create-tenant) example.
+It's also possible to create a tenant using the [Octopus REST API](/docs/api/). Learn more in our [create a tenant](/docs/api/examples/tenants/create-tenant) example.
:::
## Tenant logo \{#tenant-logo}
diff --git a/src/pages/docs/tenants/tenant-deployment-faq.md b/src/pages/docs/tenants/tenant-deployment-faq.md
index b58d4cd2f4..685c1250ec 100644
--- a/src/pages/docs/tenants/tenant-deployment-faq.md
+++ b/src/pages/docs/tenants/tenant-deployment-faq.md
@@ -67,7 +67,7 @@ No. Each tenanted deployment is independent. There is no built-in way to perform
- I want to send an email once release **1.2.6** has been successfully deployed to all of my tenants in production.
- I want to upgrade a batch of tenants and, if one fails, I want them all to roll-back to the last known good version.
-You can achieve these behaviors using a custom script/application which leverages the [Octopus REST API](/docs/octopus-rest-api/) and taking advantage of [Subscriptions](/docs/administration/managing-infrastructure/subscriptions). This way you can use the information provided by Octopus to perform a complex deployment orchestration with any custom logic that suits your scenario perfectly. For example, you could write a script/application which starts a batch of tenanted deployments using a specific tag, then monitor the progress of those deployments, and finally take any action based on the results.
+You can achieve these behaviors using a custom script/application which leverages the [Octopus REST API](/docs/api/) and taking advantage of [Subscriptions](/docs/administration/managing-infrastructure/subscriptions). This way you can use the information provided by Octopus to perform a complex deployment orchestration with any custom logic that suits your scenario perfectly. For example, you could write a script/application which starts a batch of tenanted deployments using a specific tag, then monitor the progress of those deployments, and finally take any action based on the results.
## Can I have a combination of tenanted and untenanted projects?
diff --git a/src/pages/docs/tenants/tenant-tags.md b/src/pages/docs/tenants/tenant-tags.md
index f8f97efba6..b82933ec0f 100644
--- a/src/pages/docs/tenants/tenant-tags.md
+++ b/src/pages/docs/tenants/tenant-tags.md
@@ -75,7 +75,7 @@ octopus release deploy --project "My Project" --version "1.0.1" --tenant-tag "Re
You can use tenant tags when:
-- Deploying releases using [build server integrations](/docs/octopus-rest-api/) or the [Octopus CLI](/docs/cli/octopus-cli/deploy-release).
+- Deploying releases using [build server integrations](/docs/api/) or the [Octopus CLI](/docs/cli/octopus-cli/deploy-release).
- Scoping a deployment target to one or more tenants when registering a new Tentacle - read more in our [tenant infrastructure](/docs/tenants/tenant-infrastructure) section.
- Automating Octopus via the [Octopus REST API](/docs/octopus-rest-api).
diff --git a/src/scripts/search-engine.ts b/src/scripts/search-engine.ts
index 01fff5040d..8b52993ceb 100644
--- a/src/scripts/search-engine.ts
+++ b/src/scripts/search-engine.ts
@@ -80,7 +80,7 @@ const SECTIONS: {
prefix: RegExp;
}[] = [
{ facet: 'cli', kind: 'command', prefix: /^\/docs\/cli(\/|$)/ },
- { facet: 'api', kind: 'command', prefix: /^\/docs\/octopus-rest-api(\/|$)/ },
+ { facet: 'api', kind: 'command', prefix: /^\/docs\/api(\/|$)/ },
{
facet: 'integrations',
kind: 'page',
diff --git a/src/shared-content/installation/migrate-from-windows-to-linux-container.include.md b/src/shared-content/installation/migrate-from-windows-to-linux-container.include.md
index 19d1b70127..3f64f32acb 100644
--- a/src/shared-content/installation/migrate-from-windows-to-linux-container.include.md
+++ b/src/shared-content/installation/migrate-from-windows-to-linux-container.include.md
@@ -69,8 +69,8 @@ To migrate from Active Directory to LDAP, you will need to:
1. Enable and configure the [LDAP auth provider](/docs/security/authentication/ldap).
2. Add the LDAP auth provider to each user and group. We created two scripts to help speed that up:
- - [Swap Active Directory groups with matching LDAP groups](/docs/octopus-rest-api/examples/users-and-teams/swap-ad-domain-group-with-ldap-group) for Octopus teams.
- - [Swap Active Directory login records with matching LDAP ones](/docs/octopus-rest-api/examples/users-and-teams/swap-users-ad-domain-to-ldap) for Octopus users.
+ - [Swap Active Directory groups with matching LDAP groups](/docs/api/examples/users-and-teams/swap-ad-domain-group-with-ldap-group) for Octopus teams.
+ - [Swap Active Directory login records with matching LDAP ones](/docs/api/examples/users-and-teams/swap-users-ad-domain-to-ldap) for Octopus users.
3. Log out with your current user and log back in, ideally with a new test user.
4. Verify permissions are as expected.
5. Test a few more users out.
diff --git a/src/shared-content/octopus-rest-api/octopus-project-variables-include.mdx b/src/shared-content/octopus-rest-api/octopus-project-variables-include.mdx
index 60312f2a93..c835105855 100644
--- a/src/shared-content/octopus-rest-api/octopus-project-variables-include.mdx
+++ b/src/shared-content/octopus-rest-api/octopus-project-variables-include.mdx
@@ -38,4 +38,4 @@ octopus project variable include --variable-set "Slack Variables"
## Learn more
- [Octopus CLI](/docs/cli)
-- [Creating API keys](/docs/octopus-rest-api/how-to-create-an-api-key)
+- [Creating API keys](/docs/api/authentication/create-an-api-key)
diff --git a/src/shared-content/octopus-rest-api/project-coordination-code-samples.include.md b/src/shared-content/octopus-rest-api/project-coordination-code-samples.include.md
index 85f8ee954d..dec41746e2 100644
--- a/src/shared-content/octopus-rest-api/project-coordination-code-samples.include.md
+++ b/src/shared-content/octopus-rest-api/project-coordination-code-samples.include.md
@@ -3,7 +3,7 @@ These samples show how to perform various tasks related to project coordination.
See the [OctopusDeploy-Api](https://github.com/OctopusDeploy/OctopusDeploy-Api) repository for further API documentation and examples using the [raw REST API](https://github.com/OctopusDeploy/OctopusDeploy-Api/tree/master/REST/PowerShell) or Octopus.Client in [C#](https://github.com/OctopusDeploy/OctopusDeploy-Api/tree/master/Octopus.Client/Csharp), [PowerShell](https://github.com/OctopusDeploy/OctopusDeploy-Api/tree/master/Octopus.Client/PowerShell) or [LINQPad](https://github.com/OctopusDeploy/OctopusDeploy-Api/tree/master/Octopus.Client/LINQPad).
:::div{.success}
-These examples use the [Octopus.Client](/docs/octopus-rest-api/octopus.client/) library, see the [Loading in an Octopus Step](/docs/octopus-rest-api/octopus.client/using-client-in-octopus/) section of the [Octopus.Client](/docs/octopus-rest-api/octopus.client) documentation for details on how to load the library from inside Octopus using PowerShell or C# Script steps.
+These examples use the [Octopus.Client](/docs/api/octopus.client/) library, see the [Loading in an Octopus Step](/docs/api/octopus.client/using-client-in-octopus/) section of the [Octopus.Client](/docs/api/octopus.client) documentation for details on how to load the library from inside Octopus using PowerShell or C# Script steps.
:::
## Querying the current state
diff --git a/src/shared-content/scripts/sync-packages-scripts.include.md b/src/shared-content/scripts/sync-packages-scripts.include.md
index ec5624e14b..799013b8db 100644
--- a/src/shared-content/scripts/sync-packages-scripts.include.md
+++ b/src/shared-content/scripts/sync-packages-scripts.include.md
@@ -10,7 +10,7 @@ param (
[ValidateSet("FileVersions", "LatestVersion", "AllVersions")]
[string] $VersionSelection = "FileVersions",
- [Parameter(Mandatory, HelpMessage="See https://octopus.com/docs/octopus-rest-api/examples/feeds/synchronize-packages#usage for example file list structure.")]
+ [Parameter(Mandatory, HelpMessage="See https://octopus.com/docs/api/examples/feeds/synchronize-packages#usage for example file list structure.")]
[string] $PackageListFilePath,
[Parameter(Mandatory)]
diff --git a/src/shared-content/tentacle/configure-linux-polling-worker.include.md b/src/shared-content/tentacle/configure-linux-polling-worker.include.md
index 9935b0eb65..7b38d8df49 100644
--- a/src/shared-content/tentacle/configure-linux-polling-worker.include.md
+++ b/src/shared-content/tentacle/configure-linux-polling-worker.include.md
@@ -5,7 +5,7 @@
1. Configure the folder to store applications and press **Enter**.
1. Enter the **Octopus Server URL** (e.g. ) and press **Enter**.
1. Enter the authentication details the Tentacle will use to connect to the Octopus Server:
- i. Select **1)** if using an Octopus API key, see [How to create an API key](/docs/octopus-rest-api/how-to-create-an-api-key) or:
+ i. Select **1)** if using an Octopus API key, see [How to create an API key](/docs/api/authentication/create-an-api-key) or:
ii. Select **2)** to provide a username and password you use to log into Octopus
1. Select **2) Worker** for the type of Tentacle to setup and press **Enter**.
1. Give the **Space** you wish to register the Tentacle in and press **Enter**.
diff --git a/src/shared-content/tentacle/configure-polling-target.include.md b/src/shared-content/tentacle/configure-polling-target.include.md
index 2f711ec22e..89e6e20ec2 100644
--- a/src/shared-content/tentacle/configure-polling-target.include.md
+++ b/src/shared-content/tentacle/configure-polling-target.include.md
@@ -4,7 +4,7 @@
a. The Octopus URL: the hostname or IP address.
b. Select the authentication mode and enter the details:
i. The username and password you use to log into Octopus, or:
- i. Your Octopus API key, see [How to create an API key](/docs/octopus-rest-api/how-to-create-an-api-key).
+ i. Your Octopus API key, see [How to create an API key](/docs/api/authentication/create-an-api-key).
:::div{.hint}
The Octopus credentials specified here are only used once to configure the Tentacle. All future communication is performed over a [secure TLS connection using certificates](/docs/security/octopus-tentacle-communication/#Octopus-Tentaclecommunication-Scenario:PollingTentacles).
diff --git a/src/shared-content/tentacle/configure-windows-polling-worker.include.md b/src/shared-content/tentacle/configure-windows-polling-worker.include.md
index fa2df182f0..1d5d052037 100644
--- a/src/shared-content/tentacle/configure-windows-polling-worker.include.md
+++ b/src/shared-content/tentacle/configure-windows-polling-worker.include.md
@@ -4,7 +4,7 @@
a. The Octopus URL: the hostname or IP address.
b. Select the authentication mode and enter the details:
i. The username and password you use to log into Octopus, or:
- i. Your Octopus API key, see [How to create an API key](/docs/octopus-rest-api/how-to-create-an-api-key).
+ i. Your Octopus API key, see [How to create an API key](/docs/api/authentication/create-an-api-key).
:::div{.hint}
The Octopus credentials specified here are only used once to configure the Tentacle. All future communication is performed over a [secure TLS connection using certificates](/docs/security/octopus-tentacle-communication/#Octopus-Tentaclecommunication-Scenario:PollingTentacles).
diff --git a/tests/api-page.spec.ts b/tests/api-page.spec.ts
index 88afbd4cfa..e7cff2137b 100644
--- a/tests/api-page.spec.ts
+++ b/tests/api-page.spec.ts
@@ -61,38 +61,6 @@ test.describe('api page chrome', () => {
await expect(overlay).toBeVisible();
});
- test('the section is kept out of the search index and the sitemap', async ({
- page,
- request,
- }) => {
- // Temporary, alongside src/lib/underConstruction.ts - delete with it when
- // the API reference goes live.
- //
- // Asked through the overlay rather than of an index file, because the index
- // is now a directory of compressed chunks. What has to hold: a reader
- // searching a word the API reference is full of must not be sent into it.
- await page.goto('/docs/');
- await page
- .locator('input[data-docs-search-trigger]:visible')
- .first()
- .click();
- await page.locator('[data-docs-search-input]').fill('accounts');
-
- // The href assertion below passes on an empty list, so the visibility check
- // is what makes this test mean anything. `accounts` names pages in the API
- // reference *and* pages outside it, which is what keeps the list non-empty.
- const results = page.locator('[data-docs-search-results] [role="option"]');
- await expect(results.first()).toBeVisible({ timeout: 30_000 });
-
- const hrefs = await results.evaluateAll((rows) =>
- rows.map((row) => row.getAttribute('href') ?? '')
- );
- expect(hrefs.filter((href) => href.includes('/docs/api/'))).toEqual([]);
-
- const sitemap = await (await request.get('/docs/sitemap.xml')).text();
- expect(sitemap).not.toContain('/docs/api/');
- });
-
test('the pages Astro does not route are not published', async ({
request,
}) => {
diff --git a/tests/code-block.spec.ts b/tests/code-block.spec.ts
index f537241c17..1eea04b6b0 100644
--- a/tests/code-block.spec.ts
+++ b/tests/code-block.spec.ts
@@ -1,7 +1,7 @@
import { test, expect } from '@playwright/test';
// A page with two panels, each a lone code block
-const GROUPED = '/docs/octopus-rest-api/octopus.client/using-resources';
+const GROUPED = '/docs/api/octopus.client/using-resources';
// A page whose group panels hold prose as well as code, so they stay tabs
const TABBED = '/docs/kubernetes/targets/kubernetes-agent/permissions';