canonical: https://jentic.com/apis/octopus.com/octopus

# Octopus Server API

Octopus Server API powers Octopus Deploy, a release orchestration and continuous deployment platform used to ship software to any environment. The API exposes 1,775 endpoints covering projects, releases, deployments, runbooks, environments, accounts, certificates, build information, tenants, and audit streams. Use it to automate release creation, trigger deployments to dev/staging/production, manage variable sets and accounts across spaces, and enforce compliance and approval policies.

## For AI agents

Trigger releases and deployments, manage Octopus Deploy projects and runbooks, and inspect environment and tenant state programmatically.

## Scope

Does not handle source control, build execution, or incident management - use for release orchestration and deployment automation only.

## Capabilities

- Create releases and trigger deployments to specific environments and tenants
- Run runbooks for operational tasks like backups, restarts, or DR drills
- Manage projects, channels, lifecycles, and deployment processes
- Push build information and package metadata into Octopus from CI pipelines
- Audit deployment activity through the audit stream and compliance policy endpoints
- Manage accounts, certificates, and worker pools for cloud and on-prem targets

## Use cases

### Automated release promotion

Promote a build through dev, staging, and production environments without manual handoffs. CI pipelines push build information and packages, then call the Octopus API to create a release and trigger deployments in sequence, gated by approvals or runbook health checks. This compresses a multi-day manual release process into minutes while preserving the audit trail.

Example prompt: Create a release of project Acme-Web with the package version 1.4.2, then deploy it to the Production environment for tenant US-East and confirm the task completes successfully

### Runbook-driven operations

Execute operational runbooks like database backups, certificate rotations, or service restarts on demand or on a schedule. Operators or agents call the runbook-run endpoints with the target environment and tenant, and Octopus handles step execution, variable scoping, and logging. This replaces ad-hoc scripts and shared SSH keys with auditable, role-scoped operations.

Example prompt: Run the rotate-certificates runbook against the Production environment for tenant EU-West and report the outcome

### Compliance and audit reporting

Pull audit stream events and deployment history to feed compliance dashboards or SOC2 evidence packs. The audit endpoints return who changed what, which deployments ran where, and which approvals fired. Combined with compliance policy endpoints, teams can prove that production changes followed approved processes.

Example prompt: Retrieve all deployments to the Production environment in the last 30 days along with the user who triggered each one and export them as a CSV

### Multi-tenant SaaS deployments

Deploy the same application to dozens of customer-specific tenants with isolated variables and environments. The Octopus tenants API lets you onboard new customers, link them to projects and environments, and target deployments at specific tenant tags. New customer onboarding drops from days of manual configuration to a single API call sequence.

Example prompt: Create a new tenant named Customer-42, link it to the Acme-Web project in the Production environment, and seed the customer-specific variables

### AI agent release orchestration via Jentic

AI agents managing software delivery use Jentic to discover and execute Octopus operations without browsing the 1,775-endpoint surface. An agent searches for a release intent, Jentic returns the matching endpoint and input schema, and the agent calls it with scoped credentials from your Jentic One instance. This turns Octopus into a structured tool an LLM can drive reliably.

Example prompt: Search Jentic for the create-release operation, load its input schema, and execute it for project Acme-Web with package version 1.4.2

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/releases` | Create a release for a project |
| POST | `/deployments` | Trigger a deployment of a release to an environment |
| GET | `/projects` | List projects in a space |
| POST | `/runbookRuns` | Run a runbook against an environment and tenant |
| GET | `/tasks/{id}` | Poll a server task for status and logs |
| POST | `/tenants` | Create a tenant |
| GET | `/events` | Query the audit event stream |

## Key resources

- **Projects** — Define applications, deployment processes, channels, and lifecycles
- **Releases** — Snapshot a project's deployment process and packages for promotion
- **Deployments** — Execute a release against a specific environment and tenant
- **Runbooks** — Run operational tasks like backups, rotations, and restarts
- **Environments** — Logical targets such as Dev, Staging, and Production
- **Tenants** — Isolate variables and deployments per customer or region
- **Accounts** — Cloud, SSH, and certificate credentials for deployment targets
- **Audit Stream** — Append-only log of changes and deployment activity

## Why Jentic

- **Setup:** Wiring the Octopus Server API by hand means setting up its X-Octopus-ApiKey header, pointing at your own Octopus host, and navigating a surface of over a thousand endpoints across releases, deployments, and runbooks yourself. Through Jentic you install once, import Octopus from the API Directory, store the API key once, and your agent calls it.
- **Permission scoping:** Octopus puts resource ids in the URL path (for example `/tasks/{id}`), so a rule can pin your agent to a specific resource, and across the release surface you limit it to the operations it needs, such as creating a release or running a runbook. You choose the operations it may call, so destructive ones like tenant creation are not included unless you add them.
- **Credential handling:** Your Octopus API key is stored once, encrypted, by your own Jentic One instance and injected into the X-Octopus-ApiKey header at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a release' or 'run a runbook', and Jentic returns the single matching Octopus operation with its input schema so the agent calls the right endpoint without scanning over a thousand paths.

## Related APIs

- **GitHub REST API** — Source control and CI side of the pipeline that feeds builds into Octopus deployments
- **CircleCI API** — CI service that produces build artefacts which Octopus then promotes to environments
- **GitLab API** — GitLab includes its own CI/CD and environment deployment surface as an alternative to Octopus

## FAQ

### What authentication does the Octopus Server API use?

The API uses an API key passed in the X-Octopus-ApiKey header (or as a query parameter), and a separate NuGet API key header for package feed operations. Through Jentic, your Octopus API key is stored encrypted in the vault and injected at request time, so the raw key never enters the agent's context.

### Can I trigger a deployment to a specific tenant with the Octopus Server API?

Yes. Create a release on the project, then POST to the deployments endpoint with the EnvironmentId and TenantId fields populated. The API enforces project-tenant linkage and lifecycle phase rules, so misconfigured targets are rejected before the deployment task is queued.

### What are the rate limits for the Octopus Server API?

Octopus Server does not publish a global rate limit; throughput is bounded by the server's task cap and database performance. For self-hosted instances you control the limit. For Octopus Cloud, large bursts of release or deployment creates can queue behind the task processor - design agents to poll task status rather than retry aggressively.

### How do I create a release through Jentic?

Search Jentic for 'create octopus release', load the schema for the POST /releases endpoint, then execute with ProjectId, Version, and SelectedPackages. Jentic returns the release Id, which you then use to call the deployments endpoint. The full search to execute flow takes one tool call per step.

### Does the Octopus Server API support runbooks?

Yes. Runbooks are first-class resources with their own snapshots, runs, and process definitions. Use POST to the runbook-runs endpoint with the RunbookId, EnvironmentId, and optional TenantId to execute. Runs return a ServerTaskId you can poll to track progress and capture logs.

### Can I use the Octopus Server API across multiple Spaces?

Yes. Most resources are scoped to a Space, and the API exposes Space management endpoints to create, update, and partition them. Pass the SpaceId as a path segment (for example `/api/Spaces-1/projects`) when targeting a non-default space, otherwise calls run against the default Space.

### Can I limit what my agent is allowed to do with the Octopus Server API?

Yes. Because you run Jentic One yourself, your own rules decide which Octopus operations the agent may call, so you can allow just what a task needs, such as creating a release or running a runbook, while excluding destructive operations like tenant creation. Octopus puts resource ids in the URL path, for example `/tasks/{id}` or a specific project, so a rule can also pin the agent to a particular resource rather than the whole surface. Your Octopus API key stays stored encrypted by your own instance and is injected into the X-Octopus-ApiKey header at request time, never entering the agent's context.
