# Hyphen AI > Hyphen is a developer infrastructure platform that generates cloud infrastructure with AI and continuously optimizes it. It includes deployment, environment and secrets management, feature flags, link shortening, and team access control. Source Index: https://hyphen.ai/llms.txt ## Products ### [Hyphen Agent | Infrastructure that improves itself](https://hyphen.ai/agent) Hyphen Agent continuously observes traffic, usage, and configuration patterns and safely acts in real time to operate and optimize your infrastructure while reducing operational overhead and cloud costs. ### [Hyphen CLI (hx) | Bring Hyphen to your terminal](https://hyphen.ai/cli) Use the Hyphen CLI to create apps, configure environments, and manage secrets from your command line. ### [CMMC Level 2 Readiness | Evidence and Access Reviews](https://hyphen.ai/cmmc-compliance) Hyphen and Redapt bring identity, access, and device evidence into saved reports. Your team can explain what the systems show. Neither company certifies your organization. ### [Hyphen Deploy | Say Goodbye to Deployment Hell](https://hyphen.ai/deploy) Forget YAML files, Docker configs, Terraform, and Helm charts. With Hyphen Deploy, you define your target SLA, scale, and performance, and Deploy AI generates your cloud infrastructure automatically. ### [Hyphen ENV | Secrets Management Service](https://hyphen.ai/env) Manage secrets across your team and infrastructure with a fully auditable end-to-end encrypted secrets management service. ### [Horizon | Feature flag evaluation and env config on the edge](https://hyphen.ai/horizon) Horizon is a built-in ultra-low latency feature flag evaluation and environment config on the edge, or hosted on your own infrastructure. ### [Managed Kubernetes | Make Sense of Your Kubernetes Clusters](https://hyphen.ai/managed-kubernetes) Connect the Kubernetes clusters you already run and instantly understand what’s deployed, what’s exposed, what’s failing, and what should be cleaned up, without changing your deployment workflow. ### [Managed DevOps Services | CI/CD, K8s & Cloud](https://hyphen.ai/managed-ops) Hyphen and Redapt operate your CI/CD, Kubernetes, and AWS/GCP. The plan costs $5,000/mo for 20 hours and has a 90-day money-back guarantee. ### [Managed SaaS | Dedicated Environments Without the Overhead](https://hyphen.ai/managed-saas) Enterprise customers ask SaaS companies for dedicated environments. Hyphen Agent learns your architecture, patch process, runbooks, and tickets so you can say yes — and cut 80%+ of the operational overhead. ### [Hyphen MCP Server | Manage Hyphen from your AI tools](https://hyphen.ai/mcp) Connect Claude, Cursor, VS Code, or any MCP client to your Hyphen organization — deploy apps, manage feature flags, investigate incidents, and operate automations from your AI tools, with the same permissions you have in the app. ### [Multi-Cloud Deploy | At Your Fingertips](https://hyphen.ai/multi-cloud) Define your requirements once and run across AWS, Azure, and Google Cloud. Hyphen Deploy generates the infrastructure, DNS, SSL, and load balancing that used to take a platform team. ### [SOC 2 Readiness | Evidence and Access Reviews](https://hyphen.ai/soc-2-compliance) Bring identity, access, and device evidence into your SOC 2 preparation. Review findings, investigate saved reports, and build a clearer path to audit readiness. ### [Hyphen Toggle | Feature Flags, Simplified](https://hyphen.ai/toggle) Ship smarter and faster. Toggle lets you roll out, test, and personalize features instantly. Open Feature Compatible and Enterprise-ready with a 99.95% SLA and ability to run locally with Horizon. ## Resources - [Pricing | Hyphen AI](https://hyphen.ai/pricing): Explore Hyphen AI pricing. Pay only for what you use with transparent, usage-based pricing for deployments, feature flags, secrets management, and more. - [CMMC First-Steps Checklist | Contracts, Data, Scope, Evidence](https://hyphen.ai/resources/cmmc-first-steps-checklist): A printable worksheet for your first CMMC steps: contract review, data identification, scope, inventory, owners, evidence, and review dates. - [Getting Started with CMMC: Levels, Requirements, and First Steps](https://hyphen.ai/resources/getting-started-with-cmmc): Learn what CMMC is, how the three levels differ, how to find the level in your contract, and which first steps help most. Status checked October 21, 2026. - [Changelog](https://hyphen.ai/docs/changelog): Latest updates and releases - [Help Center](https://help.hyphen.ai): Support and FAQs ## Documentation ### Welcome to Hyphen AI 👋 URL: https://hyphen.ai/docs/ Description: A step-by-step onboarding guide to creating an account, registering an organization, installing the Slack bot, and configuring integrations in Hyphen AI. Create an account, setup your organization, install our bot, and setup your integrations! ## Create an Account and Organization 😄 If your company already is signed up then ask one of the administrators to send you an invite or they can invite you via the `@hyphen` bot on slack by typing "@hyphen can you please invite @YOUR\_SLACK\_ACCOUNT" and 💥 you will be invited! If this is the first time for your organization then go to [https://app.hyphen.ai](https://app.hyphen.ai) and go to the link to `register`. Simply fill out your user information such as email, first name, last name. After you do that you will be asked to fill out your organization information: ![](https://files.readme.io/fd99906059be37beef681dce28400994cc3fcb85ab7951e3c921bbed9ccf5108-Screenshot_2024-09-25_at_17.28.17.png) After entering this information you will need to put your companies credit card information in. Not to worry as we will not be charging your card right away. If you have questions on how we charge you can go to our [pricing page](https://hyphen.ai/pricing). > 📘 You will be sent an email to confirm your account so please remember to do that! ## Install our Bot into Slack 🤖 Now that you have an account and setup go to [https://app.hyphen.ai](https://app.hyphen.ai) and logon. From here you will see the dashboard page and the first task is to install our slack bot. 🎉 ![](https://files.readme.io/8dd0a5e99a96dd81c428100c4dae1ed24ad5a82a2505fdd5bc555c26ff5c130a-Screenshot_2024-09-25_at_17.34.08.png) Simply click on `Add To Your Slack` button and follow the integration steps to get it installed. We will talk more about how to use it below after you connect some of your services to us and watch the magic happen. ## Setup Your Integrations After you have setup the Hyphen bot you will now want to setup some integrations. This will enable Hyphen to setup access, create distribution lists, and slack channels for your teams. > 📘 It is recommended to connect your workspace such as `Google Workspace` or `Office 365`, `Github` organization, and at least one cloud provider such as `AWS`, `Google Cloud`, or `Azure`. For help with any of these integrations please go to the `Integrations` section on the left hand navigation. ## Watch the Magic Happen! 🪄 ### Dashboard Overview URL: https://hyphen.ai/docs/introduction/dashboard/ Description: Overview of the Hyphen organization dashboard, covering deployments, agent tasks awaiting decision, Kubernetes fleet health, feature flag usage, and access logs. The organization dashboard brings recent activity, operational health, and product usage into one view. Open an organization in the Hyphen App to see the dashboard. The cards you see depend on the products your organization uses and the data Hyphen can access. A card may be hidden when there is no relevant data. ## Deployments **Environments Deployed** shows deployment runs from the last 30 days. The chart groups runs by day and deployment. Select a bar or a run to open the related deployment details. ## Tasks Awaiting Decision The **Tasks awaiting decision** card lists Agent tasks that need your input, most recent first — for example, a [Kubernetes optimizer](/docs/agent/kubernetes-optimizer) scale recommendation awaiting approval, a [Kubernetes resource cleanup](/docs/agent/kubernetes-resource-cleanup) candidate awaiting a decision, a [stale feature flag cleanup](/docs/agent/stale-feature-flag-cleanup) awaiting approval, or a deployment [confirmation request](/docs/agent/safety-and-approvals). Select a task to open it, or select **All** to see the full list of tasks awaiting decision. The card shows "You're all caught up." when nothing needs a decision. ## Organization Activity **Last 5 days of activity** summarizes recent organization events by product or resource type. Expand a row to review the individual events behind its count. ## Kubernetes Fleet The **Kubernetes fleet** card appears when your organization has registered clusters. It summarizes: - Connected and healthy clusters. - Ready pods compared with total pods. - Container issues and warnings found in the latest inventory. - Each cluster's provider, latest inventory time, pod readiness, and health. Select the card title to open Kubernetes, or select a cluster to inspect its latest inventory. If no clusters are connected, the card links to the cluster registration flow. For details about the health summary, see [Kubernetes Overview](/docs/kubernetes/overview). ## Toggle Usage The **Toggle** card shows recent feature flag usage over the last 30 days. It highlights up to five flags and links each one to its flag details. Organization-level evaluation and usage charts appear below the list when telemetry is available. The card links to the Toggle quick start when the organization has no flags or no recent usage. Disabling usage telemetry in an SDK reduces the usage information available in Hyphen. See [Toggle Concepts](/docs/feature-flags/toggle-concepts#telemetry). ## ENV Access Locations **ENV Access Locations** maps recent ENV access activity when events contain location data. It also calls out denied ENV access requests from the last 30 days. The card is hidden when there are no mappable events or access denials. ## Projects and Help The dashboard includes the organization's projects and links to API documentation, guides, CLI documentation, and SDK documentation. Members who still have onboarding work may also see a dismissible walkthrough card. ### Organizations URL: https://hyphen.ai/docs/introduction/organizations/ Description: Learn about Organizations in Hyphen, including membership roles, project-based access, phone verification, and notification preferences via Slack and SMS. In Hyphen, an Organization is a collaborative workspace where your team can manage multiple projects under a shared billing account. Organizations provide a central place to control project permissions, manage billing, and invite users to collaborate on one or more projects. Each project in Hyphen belongs to an organization, and users within an organization can collaborate across projects based on their assigned roles. ## Membership Each user in Hyphen has a personal account. Multiple personal accounts can collaborate within the same organization. Organization membership allows users to contribute to projects, access resources, and, depending on their role, manage the organization itself. ### Organization Owners Members can be assigned the Organization Owner role, which grants them control over the organization’s settings, billing, and user access. A member who creates a Hyphen organization is automatically assigned the org owner role. Owners can manage permissions for both the organization and individual projects, allowing them to tailor access for team members as needed. ### Roles and Access You can invite people to join your organization and assign them a role that grants different levels of access to the organization’s resources. Role assignments can be organization-wide or specific to individual projects: * **Organization-Level Roles**: These roles govern access to the organization’s settings, including billing and overall membership. * **Project-Level Roles**: These roles define what users can do within specific projects, such as managing secrets, configurations, or code repositories. ### Project-Based Access While organization-level roles define broad access, project-specific roles allow you to fine-tune access controls within individual projects. For example, you may want someone to contribute to a project without giving them full administrative access to the organization. For more information, see "[Projects](/docs/introduction/project)" In summary, organizations in Hyphen provide a structured, scalable way for teams to collaborate on projects with clear access control and billing management. You can invite team members, assign them the appropriate roles, and manage who has access to what across both the organization and individual projects. ## Phone Verification Members can verify a phone number for their own membership from their member profile page. Enter a US or Canadian number, then confirm the SMS code sent to it. A phone number can only be linked to one organization membership at a time. Verifying a number already linked to a membership in another organization prompts you to confirm moving the link to the current organization before the new number is verified. Members can change or remove their verified number at any time. ## Member Notifications Members choose how Hyphen notifies them about activity in an organization. Open your member profile page and select **Notifications**. Preferences apply only to the current organization, and notifications are optional. ![The Notifications page on a member profile, with the Phone number, Slack, and Notification preferences cards](/introduction/member-notifications.png) Notification setup has two parts. First, enable the providers you want to use. Second, choose which groups of notifications each provider delivers. Turning on a provider does not send any notification until you select it for at least one group. ### Slack 1. Ask an organization administrator to connect Slack, if no Slack workspace is available. 2. In **Notification preferences**, turn on **Enable Slack provider**. If more than one Slack workspace is available, select the **Slack workspace**. 3. Select **Save preferences**. Hyphen finds your Slack account in the workspace using your member email. If your Slack email is different, select **Connect a different Slack account** and enter it. Hyphen sends a six-digit code to that account in Slack. Enter the code and select **Verify Slack account**. Connecting an account does not turn on notifications. Select **Use my Hyphen email** to disconnect the account. Your notification preferences stay the same. If the Slack workspace changes, the account shows **Reconnect required** until you verify it again. ### SMS 1. Verify a phone number for your membership. See [Phone Verification](#phone-verification). 2. In **Notification preferences**, turn on **Enable SMS provider**. 3. Select the checkbox to agree to receive Hyphen activity notifications by SMS. 4. Select **Save preferences**. Message frequency varies, and message and data rates can apply. Reply STOP to opt out. If you opt out, or if your carrier blocks SMS notifications, agree again to turn SMS back on. ### Notification Groups Use the table in **Notification preferences** to choose, for each group, whether notifications arrive by SMS, Slack, both, or not at all. Groups that you leave unchecked are off. | Group | Notifications | | --- | --- | | Deployments | Deployment success, failure, and cancellation. | | On-call & incidents | Pages, reminders, responder changes, and incident updates. | | Agent tasks | Approval requests, completed tasks, and failed runs. | | Infrastructure & integrations | Cluster maintenance, cleanup results, and connection failures. | | Reports & compliance | Completed reports, failed reports, and findings. | | Organization & access | Membership, team, role, and access changes. | | Billing & subscription | Invoice issues and subscription changes. | You can select all seven groups. Currently, Hyphen sends only on-call notifications through this system. Your choices for the other groups apply when those notifications become available. A provider column is unavailable until you enable that provider. If you turn off a provider, Hyphen keeps your group choices for it, but stops delivery through it. ### Projects URL: https://hyphen.ai/docs/introduction/project/ Description: Learn how Hyphen Projects organize apps, environments, and secrets, along with details on environment types and role-based access control. A Project in Hyphen is a container that groups related apps, environments, and secrets, allowing teams to manage them together under a unified workflow. Projects provide a way to organize and control access to multiple apps and their environments, ensuring that secrets and configurations are securely stored and accessible to the appropriate team members. Each project is linked to an [Organization](/docs/introduction/organizations-1) and can be accessed by users who have the appropriate permissions within that organization. ## Environments Within each project, you can define multiple Environments to segregate configurations and secrets specific to different stages of the app lifecycle. Each environment has a **type** that determines its role in the project: - **Development**: Used during the active development of an app. Secrets and configurations in this environment might include development-specific databases, API keys, and testing services. Each project can have at most one development environment. - **Production**: The live environment where the app runs in real-world use, with production-specific secrets and configurations. Each project can have at most one production environment. - **Custom**: For any specialized workflow that doesn't fit the development or production lifecycle stage. Projects can have multiple custom environments. Environments allow for flexibility and separation of concerns. Secrets and settings can be isolated per environment to ensure that, for example, development credentials do not affect the production system. Each environment maps to exactly **one deployment setting**. This one-to-one relationship means deployment behavior is fully predictable per environment — to deploy to multiple environments, create a separate deployment for each. ## Access Projects are managed using role-based access control (RBAC), which allows you to define what each team member can do within a specific project. This ensures that sensitive operations (like modifying production secrets) can only be performed by users with the appropriate permissions. ### Project Roles Project roles allow you to fine-tune access to different parts of a project, including the ability to view, modify, or manage secrets, apps, and environments. These roles may differ from organization-level roles, allowing flexibility in team collaboration. - **Project Owner**: Has full control over the project, including managing users, apps, environments, and secrets. The Project Owner can invite or remove members, modify project settings, and manage access to secrets and resources across all environments. - **Project Collaborator**: Can actively contribute to the project and manage apps, integration connections, project environments and work with secrets. However, a collaborator may not manage project access by adding or removing members. - **Project Viewer**: Can view the resources within a project, including apps, environments, but cannot view secrets or make any changes. This role is useful for team members who need to monitor the project without directly contributing. ### Hyphen CLI URL: https://hyphen.ai/docs/introduction/cli/ Description: Comprehensive guide and command reference for installing, configuring, and using the Hyphen CLI (hx) to manage apps, deployments, and encrypted environment secrets. Hyphen CLI can be installed in macOS, Windows and Linux environments. In this guide, you will learn how to install and update command-line interface (CLI). ## Installation ```Text linux/macos sh -c "$(curl -fsSL https://cdn.hyphen.ai/install/install.sh)" ``` ```Text windows powershell -c "irm https://cdn.hyphen.ai/install/install.ps1 | iex" ``` ## Commands `hyphen` The root command for the Hyphen CLI. For convenience, the alias `hx` can be used in place of `hyphen` for all commands. > 📘 For convenience, the alias `hx` can be used in place of `hyphen` for all commands. Usage: ``` hyphen [command] hx [command] ``` ### Core Commands - `app`: Manage applications - `auth`: Authenticate with Hyphen - `build`: Prepare a container or static build for a later deployment - `deploy`: Run a deployment - `entrypoint`: Generate or update the hyphen-entrypoint.sh script - `env`: Manage environments - `help`: List available commands, flags, and their descriptions - `init`: Initialize an app - `project`: Manage projects - `pull`: Retrieve and decrypt environment variables for a specific environment - `push`: Upload and encrypt environment variables for a specific environment - `set-org`: Set the organization ID - `set-project`: Set the project ID - `update`: Update the Hyphen CLI - `version`: Display the version of the Hyphen CLI ### Global Flags - `--organization`, `-o`: Organization ID - `--project`, `-p`: Project ID - `--yes`, `-y`: Automatically answer yes for prompts - `--no`: Automatically answer no for prompts ## Authentication Authenticate with Hyphen by entering the `hyphen auth` command. This will start the OAuth flow (opens a browser window and ask you to sign in with username and password) and save the credentials to your session. ``` hyphen auth ``` ### API Key Authentication If you are authenticating in a CI/CD environment and need to authenticate using an API key, you can do so in 2 ways: 1. Use API Key `--use-api-key` will look for the HYPHEN_API_KEY environment variable first and if not found it will prompt for the key. ``` hx auth --use-api-key ``` 2. Set API Key `--set-api-key VALUE` will expect an inline value. The risk in using this method is just in exposing the secret in your terminal output, but it's provided for convenience. ``` hx auth --set-api-key VALUE ``` ## Commands ### `app` Manage applications. #### Subcommands - `create`: Create a new application in Hyphen - `get`: Get an app - `list`: List applications in your organization and project
### `app create` This command allows you to: - Create a new application with a specified name - Optionally provide a custom app ID or use an automatically generated one - Associate the new app with your current organization and project ``` hyphen app create [flags] ``` #### Flags - `-h, --help` Help for `app create` command - `--id, i`: App ID (optional)
### `app get` This command allows you to: - Fetch detailed information about a specific application - Use either the application name or ID as the identifier The command will display various details about the application, including: - Project information (ID and name) - Application details (name, alternate ID, and ID) - Organization information (ID and name) ``` hyphen app get [flags] ``` #### Flags - `-h, --help` Help for `app create` command
### `app list` List applications in your organization and project ``` hyphen app list [flags] ``` #### Flags - `-h, --help` Help for `app list` - `--page`: Page number (default 1) - `--page-size`: Number of results per page (default 10) - `--table`: Display results in a table format
### `auth` Starts the OAuth flow, opens a browser window for you to sign in with a username and password and saves the credentials to your session. ``` hyphen auth ```
### `build` Prepare a container or static build for a later deployment. The default type, `docker`, builds an image and uploads it to every ready Container Registry on the project. With `--type static`, the command uploads finished website files to every ready Site Registry on the project. Hyphen records one Static build with an artifact for each registry after all uploads succeed. [Cloudflare](/docs/integrations/cloudflare/) supports static builds. ``` hx build [flags] [site-directory] ``` For a static build, run your frontend build command first. Supply its output directory as the final argument. The CLI does not run a frontend build tool or Docker for this type. The directory must contain files; archives and symbolic links are not supported. #### Flags - `--type`: Select `docker` (default) or `static`. - `--dockerfile`, `-f`: Set the Dockerfile path for a container build. - `--env`, `-e`: Associate the build with an environment ID or alternate ID. The default includes all environments. - `--preview`, `-r`: Associate the build with a preview name. - `--output json`: Return the build result as JSON. - `--help`, `-h`: Show all build flags. `--dockerfile` cannot accompany `--type static`. A standalone build with `--preview` does not create or start a preview deployment. #### Examples ```bash # Build a container image hx build # Upload finished static files hx build --type static ./dist # Associate a static build with an environment and preview hx build --env production --preview "PR 200" --type static ./dist ``` For more details about the build process, see [Builds](/docs/deploy/builds/).
### `deploy` Deploy a project environment from your local app folder. With no flags, `hx deploy` selects the environment of type **development** in the project configured in `.hx`. Its name and alternate ID may be different from `development`. ```bash hx deploy [deploymentId] [flags] [site-directory] ``` Use `--env` to select an environment by ID or alternate ID within the project linked in `.hx`. To deploy an app in another project, run from that app's initialized folder. The browser's environment selection does not affect a bare `hx deploy`. In the dashboard, select your project's environment, then open the menu beside **Deploy** → **Copy CLI command**. The copied command includes `--env` only when the environment's type isn't development; the organization and project come from your app folder's `.hx` file. Run it from the folder initialized with `hx init` for the app you want to build, and check that its `.hx` file links to the project shown in the menu. The CLI prepares the current local app's build, then starts the deployment. Other included apps use uploaded builds. GitHub integration and a Git commit are not required for a local build. - Container builds require Docker and at least one ready Container Registry on the project. Container deployments require a ready registry and Cloud Workspace for each target cloud. - Static builds require a directory of finished website files and at least one ready Site Registry. Each selected static provider needs a matching artifact. Docker and a Cloud Workspace are not required for static sites. Hyphen can create missing deployment configuration, but the required connections must be ready. In the dashboard, select **Static** and the required providers under **Deploy to** for each static app. #### Flags - `--env`: Environment ID or alternate ID; when omitted, selects the environment of type development - `--type`: Select the local build type: `docker` (default) or `static`. - `--sites`: Select static apps and optional builds from a list with comma separators. - `--apps`: Select container apps and optional builds from a list with comma separators. - `--no-build`: Use uploaded builds. Static sites do not need a local output directory with this flag. - `--preview`: Preview name; creating a preview also requires `--prefix` - `--prefix`: Preview host prefix; include it to distinguish previews with the same name - `--dockerfile`, `-f`: Set the Dockerfile path for a container build. - `--output json`: Return the deployment result as JSON. - `--help`, `-h`: Show all deployment flags #### Examples ```bash # The environment of type development in the configured project hx deploy # An environment with alternate ID production in the configured project hx deploy --env production # A preview of the configured project's development-type environment hx deploy --preview "PR 200" --prefix pr200 # Reuse uploaded builds for production hx deploy --env production --no-build # Upload finished static files and deploy them to production hx deploy --env production --type static ./dist # Deploy a static site preview hx deploy --preview "PR 200" --prefix pr200 --type static ./dist # Deploy selected container and static builds hx deploy --env production --no-build --apps api:latest --sites website:abld_123 ``` Replace `./dist` with your frontend output directory. `--type static` requires this final argument unless you use `--no-build`. The flag selects the local build type; it does not change an existing deployment member's app type. #### Select Apps and Builds Both `--apps` and `--sites` accept app IDs or alternate IDs. Add a colon and a build selector to select an uploaded build: - `latest`: The latest build. - `lastDeployed`: The last deployed build. - `latestPreview`: The latest preview build. - `abld_...`: A specific build ID. For example, `--sites website:latest,docs:lastDeployed` selects two static apps. Explicit build selectors use uploaded builds. An entry without a build selector builds the local `.hx` app when its type matches `--type`; other entries use `latest`. If either selection flag is present, the run includes only the selected apps and sites. Without these flags, the run includes all apps and sites in the deployment. The local app uses its new build unless `--no-build` applies; other members use `latest`. For a local static build, select the local app without a build selector. This example uploads `website` from the current folder and uses an uploaded container build for `api`: ```bash hx deploy --env production --type static --apps api:latest --sites website ./dist ``` The current folder's `.hx` file must identify `website`. To use only uploaded builds, select `--no-build` instead. Use the current CLI release: `hx version` checks your installation and `hx update` updates it. The `hyphen` executable remains supported; the deployment examples in this section use its `hx` alias. #### Compatibility with existing scripts A positional deployment ID or alternate ID remains supported for existing scripts. That form selects the deployment directly, so `--env` does not select its target. Use `--env` with the project linked in `.hx` for new commands and automation. See the [Deploy Quickstart](/docs/deploy/deploy-quickstart/) for your first local deployment and [Deployment Run Methods](/docs/deploy/deployment-run-methods/) for automation and dashboard runs.
### `entrypoint` Generate or update the `hyphen-entrypoint.sh` script for Docker deployments. This script is normally created automatically when you run `hx init`, but this command allows you to: - Create the entrypoint script if it's missing (e.g., from having used an older version of `hx init`) - Update the script to the latest version - Regenerate the script if it was accidentally deleted or modified ``` hyphen entrypoint [flags] ``` #### Flags - `--force`: Overwrite existing entrypoint file - `--help, -h`: Help for `entrypoint` command
### `env` Manage environment .env secrets. #### Subcommands - `list`: List environment variables in Hyphen - `list-versions`: List versions of an environment in Hyphen - `pull`: Pull and decrypt environment variables from Hyphen - `push`: Push local environment variables to Hyphen - `rotate-key`: Rotate the encryption key and update all environments - `run`: Run your app with the specified environment #### Flags - `--enivoronment, -e`: Project Environment ID (e.g., pevr_12345) - `-h, --help` Help for `project list`
### `env list` The `env list` command displays environment variables stored in Hyphen for your current project. This command allows you to: - View all environments associated with your project - See key details about each environment, including ID, version, secret count, size, and publish date - Display results in either a detailed list format or a concise table format The information displayed for each environment includes: - ID: The unique identifier for the environment (default for the main environment) - Version: The current version number of the environment - Secrets Count: The number of secret variables stored in the environment - Size: The total size of the environment data - Published: The date and time when the environment was last published ``` hyphen env list [flags] ``` #### Flags - `-h, --help`: help for `env list` - `--page`: Page number (default 1) - `--page-size`: Number of results per page (default 10) - `--table`: Display results in a table format
### `env list-versions` The `env list-versions` command displays different versions of a specific environment stored in Hyphen for your current project. This command allows you to: - View all versions of a specific environment - See key details about each version, including ID, version number, secret count, size, and publish date - Display results in either a detailed list format or a concise table format The information displayed for each version includes: - ID: The unique identifier for the environment - Version: The version number of the environment - Secrets Count: The number of secret variables stored in this version - Size: The total size of the environment data for this version - Published: The date and time when this version was published ``` hyphen env list-versions [flags] ``` #### Flags - `-h, --help`: help for `env list` - `--page`: Page number (default 1) - `--page-size`: Number of results per page (default 10) - `--table`: Display results in a table format
### `env push` Encrypt and uploads local environment variables to Hyphen. This command allows you to: - Push all environments found in local .env files when no environment is specified - Push a specific environment by name - Encrypt and securely store your environment variables in Hyphen The command looks for .env files in the current directory with the naming convention `.env.[environment_name]`. ``` hyphen env push [flags] ``` #### Flags - `--environment, -e`: Specific environment(s) to push to (e.g. development, production, default) - `--help, -h`: Help for `push` command ### `env pull` Retrieves environment variables from Hyphen and decrypts them into local .env files. This command allows you to: - Pull a specific environment by name - Pull all environments for the application The pulled environments will be decrypted and saved as `.env.[environment_name]` files in your current directory. ``` hyphen env pull [flags] ``` #### Flags - `--environment, -e`: Specific environment(s) to pull from (e.g. development, production, default) - `--force`: Force overwrite of locally modified environment files - `--version`: Specify a version to pull - `--help, -h`: Help for `pull` command
### `env rotate-key` Rotates the encryption key and updates all environments with the new key. ``` hyphen env rotate-key [flags] ``` #### Flags - `--force`: Force overwrite of locally modified environment files - `-h, --help`: help for `env list`
### `env run` Executes your application with the specified environment variables. ``` hyphen env run [environment] -- [command] ``` #### Flags - `-h, --help`: help for `env list
### `help` List available commands, flags, and their descriptions ``` hyphen help ```
### `init` Initialize an app, which creates the `.hx`, `.hxkey`, and `hyphen-entrypoint.sh` files The `hyphen-entrypoint.sh` script is designed for use in Docker containers and automates the process of downloading the Hyphen CLI, authenticating with an API key, pulling environment variables, and running your application with those variables loaded. > **Note:** If the `hyphen-entrypoint.sh` is missing (e.g. because you ran `init` with an older version of hx) or needs to be updated, you can re-create it with `hx entrypoint` (and use `--force` if needed to overwrite it). ``` hyphen init [flags] ``` #### Flags - `--id, i`: APP ID (optional) - `--help, -h`: Help for `init` command #### Examples ``` hyphen init hyphen init "My New App" hyphen init "My New App" --id my-custom-app-id ```
### `project` Manage projects within your organization. #### Subcommands - `create`: Create a new project - `get`: Get a project - `list`: List projects in your organization
### `project create` This command allows you to: - Create a new project with a specified name - Automatically generate an alternate ID based on the project name The project name: - Can include spaces and special characters - Will be trimmed of leading/trailing spaces and quotes The alternate ID: - Is automatically generated from the project name - Contains only alphanumeric characters and hyphens - Replaces spaces with hyphens and removes other special characters After creation, you'll receive a summary of the new project, including its: - Name - ID (assigned by Hyphen) - Alternate ID (generated from the name) ``` hyphen project create [flags] ``` #### Flags - `-h, --help` Help for `project create` command
### `project get` This command allows you to: - Fetch detailed information about a specific project - Use either the project name or ID as the identifier The command will display the following details about the project: - Name: The project's full name - ID: The unique identifier assigned by Hyphen - AlternateID: The human-readable identifier generated from the project name ``` hyphen project get [flags] ``` #### Flags - `-h, --help` Help for `project get` command
### `project list` This command allows you to: - View all projects in your current organization - See key details of each project at a glance For each project, the command will display: - Name: The project's full name - ID: The unique identifier assigned by Hyphen - AlternateID: The human-readable identifier generated from the project name If no projects are found in your organization, you'll be informed accordingly. The projects are displayed in a list format, with each project's details separated by an empty line for better readability. **Note**: The list is fetched based on your current organization context. Ensure you're in the correct organization before running this command. ``` hyphen project list [flags] ``` #### Flags - `-h, --help` Help for `project list`
### `pull` Retrieves environment variables from Hyphen and decrypts them into local .env files. This command allows you to: - Pull a specific environment by name - Pull all environments for the application The pulled environments will be decrypted and saved as `.env.[environment_name]` files in your current directory. ``` hyphen pull [flags] ``` #### Flags - `--environment, -e`: Specific environment(s) to pull from (e.g. development, production, default) - `--force`: Force overwrite of locally modified environment files - `--version`: Specify a version to pull - `--help, -h`: Help for `pull` command
### `push` Encrypt and uploads local environment variables to Hyphen. This command allows you to: - Push all environments found in local .env files when no environment is specified - Push a specific environment by name - Encrypt and securely store your environment variables in Hyphen The command looks for .env files in the current directory with the naming convention `.env.[environment_name]`. ``` hyphen push [flags] ``` #### Flags - `--environment, -e`: Specific environment(s) to push to (e.g. development, production, default) - `--help, -h`: Help for `push` command
### `set-org` Set the organization ID in `.hx`. ``` hyphen set-org ``` #### Flags - `--global`: Set the org ID globally - `--help, -h`: Help for `set-org` command
### `set-project` Set the project ID in `.hx`. ``` hyphen set-project ``` #### Flags - `--global`: Set the project ID globally - `--help, -h`: Help for `set-project` command
### `update` Use `update` to get the latest version of the Hyphen CLI ``` hyphen update ```
### `version` Display the current version of the Hyphen CLI ``` hyphen version ```
### Horizon URL: https://hyphen.ai/docs/introduction/horizon/ Description: Learn how to self-host Horizon on local Docker, Google Cloud Run, and Azure Container Apps for fast and secure access to feature flags and secrets. Run Horizon in your environment and at the edge for fast, secure access to your feature flags and secrets. ## Self Hosting You can self-host instances of Horizon on your own infrastructure to add redundancy and reduce latency. When you self-host Horizon, start by creating an API key and grant it access to the projects you’ll run. Horizon uses this key to make calls to Hyphen, so it must have access for every project you require.
### Create an API Key Open the Hyphen Dashboard app and navigate to settings > API Keys ![](https://files.readme.io/991821c335692aefedf501dcc04e47035b052e325e9fd6a5570b6626c113fc05-Screenshot_2025-06-25_at_19.29.43.png) Create a new API Key, giving it `project collaborator` access to the projects that will be accessed through yourself hosted instance. Don't forget to save the secret some place safe as it will not be shown to you again. ![](https://files.readme.io/ff2b82a6654b03ba9e04944f026ed21210e399977f20f254124b80338805f9e0-Screenshot_2025-06-25_at_19.30.37.png) ### Environment Variables Horizon uses environment variables, some required and show not, that you may want to customize | Name | Description | Required | | :---------------- | :------------------------------------------------------------------------------------------------------------ | :------- | | API\_KEY | Used to authenticate with Hyphen services | Yes | | HYPHEN\_BASE\_URL | Hyphen may provide you with your own URL, if that is the case use this variable to adjust Horizon's behavior. | No | ### Local Docker This is useful for testing locally and making sure everything is working. You may use whatever port mapping you like. ```powershell docker run ` -e API_KEY={you_key} ` -p {pick_a_port}:3333 us-docker.pkg.dev/hyphenai/public/horizon:latest ` -t horizon ``` ```shell docker run \ -e API_KEY={you_key} \ -p {pick_a_port}:3333 us-docker.pkg.dev/hyphenai/public/horizon:latest \ -t horizon ``` ### Deploying to the cloud #### Google Cloud Open the cloud console and navigate to Cloud Run and then Create ![](https://files.readme.io/45fc61bddd0d0670d89e7cd70ff8d6363bf9edd67a853ee4688b03fb7d424331-Screenshot_2025-06-25_at_19.59.33.png) Make the Following Selections * Deploy using Artifact Registry / Docker Hub * use the container Image url of `us-docker.pkg.dev/hyphenai/public/horizon:latest` * Give the service a meaning, to you, name * Uncheck `Use IAM to authenticate incoming requests` ![](https://files.readme.io/c341a5c1893ed903d409e2aba7b2f15d8f1c91e7ef65f53dbdcfb4056dd25fc9-Screenshot_2025-06-25_at_19.54.22.png) Make the Following Selections * If you'd like to use a different port do so, but this is optional as Horizon respects the `$PORT` variable * Add the API key secret are an Environment Variable called `API_KEY` * Click Create #### Azure Container Apps Open the Azure portal and navigate to Container App and create a new one ![](https://files.readme.io/8e1b09246250803fde94ee1d087da91d14da994112cf2cadc79c529bdc1f9659-Screenshot_2025-06-25_at_20.07.10.png) Make the Following Selections * Choose the correct Subscription * Choose the correct Resource Group or create a new one * Choose the correct region * Choose an existing App Environment or create a new one * Click Next ![](https://files.readme.io/b106050b0b0e7043c839460697245d6f3c2b4f3af3d52d07daaf5755af26cb5d-Screenshot_2025-06-25_at_20.10.37.png) Make the Following Selections * Give The Container App a meaningful, to you, name * Select `Docker Hub or other registeries` * Image type is public * login server is `us-docker.pkg.dev` * Image and Tag is `hyphenai/public/horizon:latest` * Add an environment variable with the name `API_KEY` and the value of the API Key Secret you just created. * Click Next ![](https://files.readme.io/3cbf490ad201ad9b01059b83ae724a3563765754ae55506f82efe5a145e7f62a-Screenshot_2025-06-25_at_20.11.32.png) Make the Following Selections * Enable ingress * Accept traffic from anywhere * Target Port should be `3333` * Click Review + Create ### Hyphen Deploy Coming Soon, you'll be able to deploy Horizon directly with Hyphen Deploy! ### Configuring the SDK Configuring the SDKs is dependent on which SDK you are using. As such you should look at the documentation for the specific API. Bellow is an example of using the Hyphen Node SDK ```typescript const options = { publicApiKey: config.hyphenPublicKey, applicationId: '{YOUR_APP}', context: { targetingKey: 'anonymous', }, // this my also be the URL of a load balancer, balancing multiple instances uris: ['{URL_OF_YOUR_INSTANCE}'] }; const toggle = new Toggle(options); ``` ### Agent Overview URL: https://hyphen.ai/docs/agent/agent-overview/ Description: An introduction to Hyphen Agent, an operations assistant designed to investigate activity, analyze logs, recommend optimizations, and manage cloud footprints. Hyphen Agent is an operations agent for your Hyphen organization. It helps answer questions, investigate activity, analyze logs, recommend optimization work, and prepare routine cleanup changes for review. Hyphen Agent is not a coding assistant. Coding assistants help create application code. Hyphen Agent helps operate the cloud, deployment, Kubernetes, feature flag, link, project, and integration footprint around that code. ## Where You Use Agent You can work with Agent from the Hyphen App and from Slack when the Slack integration is installed. - **Agent inbox** - Review recent Agent runs and chat sessions from the right-side Agent panel in the Hyphen App. - **Chats** - Ask questions, attach resource context, approve actions, and continue previous conversations. You can start a new chat from the Agent panel, the Agent Chats page, or the **+** create menu available throughout the Hyphen App. - **Tasks and runs** - Review scheduled or triggered Agent work, including status, findings, steps, pull requests, and approval requests. - **Slack** - DM the Hyphen bot or mention it in a channel thread to use the same organization chat functionality from Slack. ## Core Concepts | Concept | Description | | ------------- | --------------------------------------------------------------------------------------------------------------------------------------- | | Chat session | A conversation with Agent. Sessions can answer questions directly or create tasks when work needs to run. | | Agent task | A unit of work Agent creates or runs, such as log analysis, optimization, resource cleanup, or GitHub issue automation. | | Run | An execution of an Agent task. Runs show progress, findings, action requests, linked resources, and output. | | Reference | A linked Hyphen resource, such as a project, app, environment, deployment run, Kubernetes cluster, feature flag, team, member, link, domain, or Agent task. | | Input request | A structured prompt for confirmation, selection, free text, or an option with added text. | | Member memory | Durable preferences or facts that Agent can remember when explicitly asked. Do not store secrets in memory. | ## Scheduled Tasks Policy-driven Agent tasks run automatically on schedules set by organization policy, project-level policy, or project environment-level policy, depending on the task. You can also ask Agent to run supported tasks manually when you have permission to access the related resources. ## Context-Aware Answers Agent uses attached context first. If you start a chat from a project, app, or environment page, Hyphen can attach that context automatically so Agent can scope the answer without requiring you to repeat where you are. Agent also renders supported resource references as links back into Hyphen, so answers can point directly to the project, app, environment, deployment, preview deployment, feature flag, segment, link, domain, team, member, or Agent task involved. ## Action Model Agent can answer many questions directly. When a request would create, delete, change, or propose work against a resource, Agent uses structured input requests for approval or missing information. Code and configuration changes that belong in a repository are proposed through pull requests. Resource changes in Hyphen require the same permissions as the equivalent action in the app. ### Agent Capabilities URL: https://hyphen.ai/docs/agent/capabilities/ Description: An overview of Hyphen Agent capabilities, including conversational activity queries, deployment controls, log analysis, and Kubernetes optimization. Hyphen Agent combines conversational answers with task-based operations work. Availability can depend on your organization permissions, connected integrations, and the resources Agent can access. ## Task Guides For deeper task-specific guidance, see: ### Deployments - [Log Analysis](/docs/agent/log-analysis) - [Deployment Optimizer](/docs/agent/optimizer) - [Stale Feature Flag Cleanup](/docs/agent/stale-feature-flag-cleanup) - [GitHub Pull Request Automation](/docs/agent/github-pull-request-automation) ### Kubernetes - [Kubernetes Optimizer](/docs/agent/kubernetes-optimizer) - [Kubernetes Resource Cleanup](/docs/agent/kubernetes-resource-cleanup) ## Activity Answers Agent can answer questions about organization activity from recorded Hyphen events. It supports listing, counting, finding, and summarizing activity across projects, apps, environments, deployments, preview deployments, teams, members, feature flags, segments, links, domains, ENV, and Agent tasks. Example questions: - "What happened in this project today?" - "How many deployments failed this week?" - "Who created this environment?" - "What has Jordan changed recently?" - "Summarize the last 24 hours of production events." If a resource name matches multiple resources, Agent asks for clarification instead of guessing. ## Chat Sessions and Slack Agent chat sessions support ongoing organization conversations in the Hyphen App. When Slack is connected, you can also DM the Hyphen bot or mention it in a channel thread. Slack chat supports thread continuity, Hyphen resource links, Slack mentions, and input requests for confirmations or follow-up questions. ## File Attachments You can attach files to a chat message from the composer's **+** menu, choosing **Add file or photo**. Attach up to 5 files per message (25 MiB per file, 40 MiB total). Supported types include PDF, Word, Excel, and PowerPoint documents; PNG, JPEG, and WebP images; and common text and code formats. Image attachments show a thumbnail preview in the composer. Uploaded and Agent-generated files are temporary. Files returned by Agent, such as a generated report, retain a download link and show how long they remain available. Files you upload yourself appear as plain filenames next to your message, since Hyphen already has your original copy. ## Human Support Handoff From a Hyphen App chat session, you can ask Agent to bring in a person. Agent always confirms first, since a handoff shares the visible conversation (up to the last 50 messages or 20,000 characters, whichever is reached first, with authors and timestamps) with the Hyphen Support team. Once you confirm, Hyphen Support takes over the chat and the AI agent pauses. A "Hyphen Support joined" divider marks the handoff in the conversation, and support replies appear inline labeled with the support agent's name. A typing indicator shows while a support agent is composing a reply, and a status bar above the message box shows that Hyphen Support is connected and the agent is paused. When the support conversation is resolved, a "Hyphen Support session ended" divider marks the end and the AI agent becomes available again in the same chat session. If you're handed off to support more than once in a session, each handoff is preserved in the conversation timeline. Human support handoff availability depends on your organization. ## Member Memory Agent can remember durable member preferences when you explicitly ask it to remember, update, forget, or clear something. Memory is useful for preferences such as answer format, common environment names, or recurring context. Member memory is not a secret store. Do not save credentials, tokens, private keys, or sensitive personal data in memory. ## [Log Analysis](/docs/agent/log-analysis) Agent can analyze deployment logs and surface findings by severity. By default, Hyphen Agent analyzes available cloud provider container logs. If the app is connected to [New Relic](/docs/integrations/new-relic), [Datadog](/docs/integrations/datadog#apm), or [SigNoz](/docs/integrations/signoz#apm) APM, Agent can use the connected service's logs instead. Log analysis results can include: - Log coverage metrics. - Findings grouped by category and severity. - GitHub issue actions, such as created, commented, or skipped. - Repository and pull request context when a fix is proposed. ## [Deployment Optimizer](/docs/agent/optimizer) Agent can investigate project environment deployment and runtime signals, run optimizer simulations, and recommend changes such as right-sizing, consolidation, or shutting down underused resources. Optimizer recommendations are intended to preserve declared availability expectations. When an optimizer run requires approval, Hyphen presents an input request before Agent proceeds. ## [Stale Feature Flag Cleanup](/docs/agent/stale-feature-flag-cleanup) Agent can identify Toggle flags with no recent usage or unchanged return values over a 90-day window. When the relevant app has a connected GitHub repository, Agent can open a cleanup pull request to remove stale flag references from code. Perpetual feature flags are excluded from stale flag cleanup. ## [GitHub Pull Request Automation](/docs/agent/github-pull-request-automation) When GitHub is connected, Agent can connect findings to GitHub issues and pull requests. For log analysis, Agent can create a new issue, comment on a matching existing issue, or open a pull request with a proposed fix. Agent-created code changes are reviewable. Agent does not merge pull requests automatically as part of this workflow. ## [Kubernetes Optimizer](/docs/agent/kubernetes-optimizer) Agent can analyze a workload in a registered Kubernetes cluster and recommend findings or replica guidance from inventory evidence such as current replicas, ready replicas, related pods, services, warning events, sibling workloads, planned events, and autoscaling context. Kubernetes optimizer recommendations are review-first. Scale recommendations require approval before anything changes, and Agent skips manual replica guidance when matching HorizontalPodAutoscaler evidence is detected. Kubernetes optimizer runs can be scheduled per workload with a policy, or run on demand from chat or the cluster diagram. ## [Kubernetes Resource Cleanup](/docs/agent/kubernetes-resource-cleanup) Agent can scan registered Kubernetes clusters for stale, dead, or unused resources and present cleanup candidates for review. Kubernetes resource cleanup runs inspect cluster inventory, apply the configured stale threshold and ignore lists, and create approval requests before deleting any resource. Kubernetes cleanup policies can be managed at the organization level, and individual clusters can override the organization policy when a cluster needs its own schedule, threshold, or ignore list. ## Deployment Controls Agent can inspect [project environment deployment settings](/docs/deploy/deploy-quickstart#configure-your-project-environment-deployment-settings) and answer deployment readiness questions from chat. You can ask what is configured for an environment, which apps and cloud targets are included, whether the deployment is ready to run, or what the latest non-preview deployment run looked like. Agent can also start a configured deployment or [preview deployment](/docs/deploy/deployment-previews). Before creating a [deployment run](/docs/deploy/deployment-run-methods), Agent checks readiness and presents a [confirmation request](/docs/agent/safety-and-approvals) with the target project, environment, preview context, and selected builds. If builds are not specified, Agent uses the latest app build for non-preview deployments and the latest preview build for preview deployments. Follow-up deployment requests preserve the prior deployment target, including preview deployment context, so requests like "deploy again" can reuse the last confirmed project and environment. ## Deployment Resource Cleanup Agent can detect unused or stale deployment resources created or tracked by Hyphen, including orphaned containers and expired preview deployment resources. Deployment resource cleanup work is presented through Agent runs so you can review status, output, and any required approvals. ## Project Tools Agent can list projects and create a project after you provide the required details and confirmation. ## Scheduled and Recurring Work Agent tasks can be scheduled or recurring. Task and run detail views show timing, status, related resources, conversation history, and execution output. ## Related Deployment Context Hyphen also surfaces deployment settings drift on project environment views when current deployment settings differ from the latest run snapshot. Agent optimizer work can use deployment and runtime context, but the deployment drift alert itself is documented as a Hyphen Deploy surface rather than an Agent task. ### Setup and Requirements URL: https://hyphen.ai/docs/agent/setup-and-requirements/ Description: Configure setup requirements, integrations, and permissions for Hyphen Agent capabilities such as APM log analysis, Kubernetes optimization, and GitHub automation. Agent is available from the Hyphen App for your organization. Some capabilities require connected integrations or specific Hyphen permissions. ## Requirements by Capability | Capability | Requirements | | --- | --- | | Activity answers | Recorded Hyphen events and permission to view the related resources. | | Chat sessions | Access to the Hyphen organization. | | Human support handoff | A Hyphen App chat session. Availability depends on your organization. | | Slack chat | Installed Slack integration and a Slack user/workspace that Hyphen can resolve to a member and organization. | | Member memory | A signed-in Hyphen member. Memory changes must be requested explicitly. | | Log analysis | Deployment logs from the connected cloud provider, or New Relic, Datadog, or SigNoz APM when configured. | | APM log analysis | Connected New Relic, Datadog, or SigNoz integration and an app connection that maps to the Hyphen environment. | | GitHub issue automation | Connected GitHub integration and repository access. | | Pull requests from Agent findings | Connected GitHub repository for the affected app. | | Stale feature flag cleanup | Hyphen Toggle usage data and a connected GitHub repository for the app. | | Deployment optimizer | Deployment/runtime data Agent can inspect and permission to view the related resources. | | Kubernetes optimizer | A registered Kubernetes cluster with Horizon reporting inventory, a selected workload namespace, kind, and name, permission to view the cluster and run Agent tasks, and permission to approve scale changes when required. A connected New Relic, Datadog, SigNoz, or Google Cloud observability source is optional and adds runtime metrics and logs. | | Resource cleanup | Deployment resources created or tracked by Hyphen and permission to approve cleanup when required. | | Project tools | Organization permissions to list or create projects. | ## APM Configuration Hyphen Agent can analyze app logs from New Relic, Datadog, or SigNoz. Connect the integration from the **Integrations** area, then add an APM connection for the app. All three providers support a shared app or service filtered by an environment attribute, or a separate app or service mapping for every Hyphen project environment. - [New Relic](/docs/integrations/new-relic) connections use a shared New Relic APM app with an environment attribute, or an APM app name for each project environment. - [Datadog](/docs/integrations/datadog#apm) connections use exact service names and require `env` as the shared environment attribute. Each selected service must have indexed spans from the last 24 hours. - [SigNoz](/docs/integrations/signoz#apm) connections use `service.name`, an optional `service.namespace`, and the environment attribute emitted by your telemetry. SigNoz validates API access even when no matching logs have arrived. Without an APM connection for the app, Agent uses available cloud provider container logs instead. See [Log Analysis](/docs/agent/log-analysis). ## Kubernetes Observability Configuration Kubernetes Optimizer can combine cluster inventory with metrics and logs from New Relic, Datadog, SigNoz, or Google Cloud. Configure the connection from the registered cluster's **Settings** tab. - New Relic connections require the cluster name used by the New Relic Kubernetes integration. - Datadog connections require the emitted `kube_cluster_name` tag and recent Kubernetes State Core node-count samples. - SigNoz connections require the emitted `k8s.cluster.name` attribute and access to the instance's v5 query API. - Google Cloud connections require the full GKE resource name and Logs Viewer, Monitoring Viewer, and Kubernetes Engine Cluster Viewer access for the Hyphen service account. Observability is optional. If telemetry is missing, incomplete, or temporarily unavailable, Agent reports the capability gap and continues with the evidence it can safely use. See [Kubernetes Observability](/docs/kubernetes/observability). ## GitHub Configuration GitHub is required for repository-backed automation, including stale feature flag cleanup, issue automation, and pull requests from log analysis findings. Agent uses connected repository context for reviewable changes. If a repository is not connected, Agent can still surface findings where supported, but it cannot open repository pull requests. ## Slack Configuration Install the Slack integration before using Agent from Slack. You can DM the Hyphen bot or mention it in a channel thread. If Hyphen cannot resolve the Slack workspace or user to a Hyphen organization member, the bot returns a blocker message instead of starting a chat. ## Permissions Agent follows Hyphen organization permissions. A member must have permission to view, create, delete, or change the resource involved in an Agent action. When an action requires approval or more information, Agent asks through a structured input request instead of relying on freeform text. ### Safety and Approvals URL: https://hyphen.ai/docs/agent/safety-and-approvals/ Description: Learn how Hyphen Agent ensures reviewable and safe operations using confirmations, pull requests, permissions, and guardrails. Agent is designed to make operations work reviewable. Actions that create, delete, change, or propose changes use confirmations, permissions, and audit-friendly output. ## Structured Input Requests Agent uses structured input requests when it needs approval or missing information. Depending on the request, you may see: - A yes/no confirmation. - A free-text response. - A choice from available options. - A choice with additional text. In Slack, input requests render as buttons or modals. Slack input requests are scoped to the requester who started the Agent turn. ## Reviewable Code Changes When Agent changes code or repository configuration, it proposes the change through a pull request. The pull request can include the context that led to the change, such as a log analysis finding or stale feature flag detection. Review, test, and merge pull requests using your normal repository workflow. ## Resource Clarification If a prompt names a resource that matches multiple projects, apps, environments, links, feature flags, or other resources, Agent asks you to choose the intended resource. Agent uses attached chat context first. Remove context badges before sending a message if you do not want Agent to use the current project, app, or environment as the scope. ## Permissions and Access Agent follows the same access rules as the Hyphen App. If you cannot view or mutate a resource directly, Agent should not perform that action for you. Some capabilities also depend on external integration permissions, such as GitHub repository access or New Relic data access. ## Memory Safety Agent only updates member memory when you explicitly ask it to remember, update, forget, or clear a durable preference or fact. Do not store secrets in member memory. Keep credentials, tokens, private keys, and other sensitive values in the appropriate secret management system. ## Capability-Specific Guardrails - **Stale feature flag cleanup** excludes perpetual feature flags. - **Repository changes** are proposed through pull requests. - **Project changes and resource cleanup** require confirmation. - **Log analysis issue automation** is additive when matching existing issues; it comments rather than rewriting existing issue bodies. - **Slack actions** require a resolved Hyphen member and organization. ### Log Analysis URL: https://hyphen.ai/docs/agent/log-analysis/ Description: Learn how Hyphen Agent analyzes deployment and APM logs to detect runtime errors, surface prioritized findings, and automate GitHub issues and pull requests. Hyphen Agent can analyze deployment logs, summarize operational issues, and connect findings to follow-up work. Log analysis helps teams move from raw runtime data to prioritized findings without manually combing through logs, which makes incidents and recurring errors faster to understand. Use log analysis when you want Agent to investigate errors, anomalies, or recurring runtime behavior for an app or environment. ## Requirements Log analysis needs an app and environment that Agent can inspect. Agent uses the log source available for that app: - Cloud provider container logs by default. - APM logs when the app is connected to New Relic, Datadog, or SigNoz. For APM log analysis, configure the integration and map the app's telemetry to the relevant Hyphen environment. See [APM Configuration](/docs/agent/setup-and-requirements#apm-configuration) for supported connection patterns and provider requirements. ## Automatic and Manual Runs Policy-driven log analysis tasks run automatically from the effective Agent task policy for each deployment target. Hyphen resolves that policy from matching organization, project, project environment, deployment, or project-and-deployment scope, depending on how your policies are configured. By default, production environments have log analysis enabled on a daily recurring schedule. Development and custom environments are disabled until a policy enables them. When a policy is disabled or has no recurring schedule, Hyphen does not create scheduled log analysis tasks for that deployment target. Scheduled policy runs create one-off Log Analysis tasks for the resolved deployment target. The task includes the project, project environment, and deployment references that caused the scheduled run. If you have permission, ask Hyphen Agent to run log analysis manually for the relevant project and environment. Manual Log Analysis tasks are one-off tasks, not recurring tasks. Agent uses attached project and environment context first; if the request is ambiguous, Agent asks you to choose the intended resource before starting the task. ## How It Works Agent scopes the run to the selected app and environment, then analyzes the available log or APM data for patterns that may explain failures or degraded behavior. During a run, Agent can: - Review available log coverage. - Identify findings by category and severity. - Explain likely causes and affected runtime behavior. - Link findings back to the Agent task and run that produced them. If GitHub is connected for the app, Agent can also connect findings to repository follow-up. Depending on the finding and repository context, Agent may create a new issue, comment on a matching existing issue, and comment `/hyphen` so that Agent will attempt to [open a pull request](/docs/agent/github-pull-request-automation) to resolve the issue. ## Repeat Findings When Log Analysis finds an issue that matches a previous finding, Hyphen uses a fingerprint based on the repository, affected apps, and error signature to avoid creating duplicate GitHub issues. If the existing GitHub issue is open, Agent adds a new comment with the latest Log Analysis context instead of creating another issue. This updates the issue record for the latest run, but it does not enqueue another pull request automation run just because the same open issue appeared again. If the existing issue is closed, Agent checks the issue context before deciding what to do next. Issues that appear intentionally declined or not planned are skipped. Issues that appear fixed wait for a 24-hour reopen delay from the latest fix signal, such as a merged linked pull request, before Agent reopens the issue. After that delay, Agent can reopen the issue, add the latest Log Analysis comment, restore the Hyphen Agent label, and enqueue follow-up automation. If GitHub no longer returns a recorded issue, Agent skips creating a replacement issue for that fingerprint. ## Results Log analysis results appear in Agent task and run views. A run can include: - Coverage metrics showing how much data Agent analyzed. - Findings grouped by category and severity. - Issue action summaries, including created, commented, or skipped actions. - Repository and pull request context when Agent proposes a code change. ## Things to Know - Log analysis uses cloud provider container logs unless New Relic, Datadog, or SigNoz APM is connected for the app. - APM log analysis depends on the app-to-environment mapping configured in Hyphen. - Issue automation is additive. Agent can comment on matching issues, but it does not rewrite existing issue bodies. - Pull requests from log analysis require a connected GitHub repository for the affected app. - Agent-created pull requests are reviewable and are not merged automatically. ### Deployment Optimizer URL: https://hyphen.ai/docs/agent/optimizer/ Description: Learn how Hyphen Agent's Deployment Optimizer analyzes runtime signals and recommends configuration changes to reduce waste and improve reliability. Hyphen Agent can optimize a project environment by analyzing runtime signals and recommending deployment configuration changes. Optimizer runs help reduce waste, improve reliability during traffic changes, and keep deployment settings aligned with real workload behavior. Use the optimizer when you want infrastructure sizing and placement to better match current demand. This guide covers deployment optimizer runs for Hyphen project environments. For registered Kubernetes workload optimization, see [Kubernetes Optimizer](/docs/agent/kubernetes-optimizer). ## Requirements Optimizer runs need a project environment Agent can inspect, deployment and runtime data for that environment, and permission to view the related resources. The optimizer can use signals such as: - CPU usage. - Memory usage. - Requests per second. - Current deployment settings. - Recent deployment activity. - Recent optimizer run history. ## Automatic and Manual Runs Policy-driven optimizer tasks run automatically based on the Agent task policy set at the organization level. If you have permission, ask Hyphen Agent to run the optimizer manually for a project environment. When you ask manually, Agent uses attached project and environment context first. If the request is ambiguous, Agent asks you to choose the intended environment before starting the task. ## How It Works Agent creates an optimizer task for the selected project environment. The task investigates workload behavior, compares it to the current deployment configuration, and generates ranked recommendations. Recommendations can include: - Right-sizing container resources. - Adjusting minimum and maximum instance counts. - Changing provider or region-specific scale settings. - Consolidating underused capacity. - Shutting down resources that are no longer needed. Agent uses deployment context before recommending changes so results reflect the current configuration and avoid repeating recent optimizer actions. ## Approvals and Guardrails Optimizer recommendations are designed to preserve declared availability expectations. Agent cannot lower your SLA availability tier, and recommendations that touch scale require approval before they are applied. When approval is needed, Hyphen presents a structured input request. After an approved change is applied, Agent can trigger the deployment run needed to roll out the updated configuration. If you reject a recommendation with a reason, the reason appears alongside the user who responded in the recommendation's details. ## Results Optimizer task and run views show the investigation, recommended changes, approval requests, and execution output. Recommendations include the proposed change, affected scope, and risk or approval context when available. The run view includes a scope summary (the deployment analyzed and its size) and an evidence strip showing the metrics Agent used, each with its trend over the analysis window, the sample count, and the observability provider. ## Things to Know - Optimizer work is scoped to a project environment. - Agent considers current settings, recent deployment activity, and recent optimizer outcomes. - Availability remains user-owned; Agent does not change the SLA availability tier. - Scale changes require approval and are not self-approved. - Deployment settings drift alerts are shown in Hyphen Deploy surfaces, while optimizer work runs as an Agent task. - A deployment run triggered by the Agent after an approved change shows "Agent" as its creator in Hyphen Deploy's run details and run history, so you can distinguish it from a manually triggered run. ### Stale Feature Flag Cleanup URL: https://hyphen.ai/docs/agent/stale-feature-flag-cleanup/ Description: Learn how Hyphen Agent detects unused Toggle feature flags and creates pull requests to safely remove stale code. Hyphen Agent can identify stale Toggle feature flags and prepare cleanup pull requests for review. Stale feature flag cleanup reduces release risk and code complexity by turning unused or fully settled flags into reviewable removal work. Use it to reduce technical debt from flags that are no longer active or no longer changing behavior. ## Requirements Stale feature flag cleanup needs: - Hyphen Toggle usage data. - Feature flags that are not marked perpetual. - A connected GitHub repository for the app when code cleanup pull requests are needed. - Permission to run or manage the applicable Agent task policy. ## How It Works Agent analyzes Toggle flag activity and identifies flags with no recent usage or unchanged return values over a 90-day window. When Agent finds stale flags, it can: - Mark eligible flags as stale. - Exclude flags marked as perpetual. - Use connected repository context to find stale flag references in code. - Open a cleanup pull request for review. Agent delivers code changes through pull requests. Your team reviews, tests, and merges those changes through your normal repository workflow. ## Automatic and Manual Runs Policy-driven stale feature flag cleanup tasks run automatically based on the Agent task policy set at the organization level. Admins can enable or disable the cleanup policy and choose one of these schedules: - Manual only. - Every day. - Every week. - Every month. - Every quarter. If you have permission, ask Hyphen Agent to run stale feature flag cleanup manually. Teams can ask Agent to run cleanup manually even when the organization policy is set to manual only. ## Results Agent task and run views show the cleanup run, related feature flags, repository context, pull request status, and any required approvals. ## Things to Know - The stale window is based on no recent usage or unchanged return values over 90 days. - Perpetual feature flags are excluded from stale flag cleanup. - Pull request cleanup requires a connected GitHub repository for the affected app. - Cleanup changes are reviewable and are not merged automatically. - Users without policy management access may be able to view the policy but cannot change it. ### Kubernetes Optimizer URL: https://hyphen.ai/docs/agent/kubernetes-optimizer/ Description: Learn how Hyphen Agent's Kubernetes Optimizer analyzes workload inventory, signals, and telemetry to provide replica recommendations and findings. Hyphen Agent can analyze a workload in a registered Kubernetes cluster and recommend optimization changes. Kubernetes optimizer runs use cluster inventory, workload context, and connected observability signals to surface findings and replica guidance for a specific workload. Use Kubernetes Optimizer when you want Agent to review whether a workload's current replica count matches expected demand, readiness, and recent cluster signals. ## Requirements Kubernetes optimizer runs need: - A [registered Kubernetes cluster](/docs/kubernetes/add-cluster) with Horizon connected. - A recent [inventory snapshot](/docs/kubernetes/inventory-snapshots) for the cluster. - A selected Kubernetes workload, including namespace, kind, and name. - Permission to view the cluster and run Agent tasks for the organization. - Permission to approve scale changes when approval is required. For runtime metrics and logs, connect a supported provider from the cluster's **Settings** tab. See [Kubernetes Observability](/docs/kubernetes/observability). An observability connection is recommended but not required. Agent can use workload and inventory signals such as: - Current and ready replicas. - Related pods, services, and warning events. - Sibling workloads that appear to belong to the same app. - Inventory truncation state. - Active planned events that may change expected demand. - HorizontalPodAutoscaler evidence when available. - CPU and memory request utilization, restart counts, and workload logs when a supported observability source is connected. ## Automatic and Manual Runs Kubernetes optimizer runs for a workload can be scheduled with a policy, or started manually. Each Deployment or StatefulSet can have its own optimizer policy, configured from the cluster's **Settings** tab. A workload with no policy is not scanned automatically, but can still be optimized on demand. See [Optimizer Policies](/docs/kubernetes/optimizer-policies). You can start a Kubernetes optimizer run manually for a workload in a registered cluster in two ways: - Ask Hyphen Agent from chat. Agent uses attached cluster and workload context first. If the request is ambiguous, Agent asks you to identify the intended cluster or workload before creating the Kubernetes optimizer task. - Click **Optimize now** on a Deployment or StatefulSet's details panel in the cluster diagram. Example prompts: - "Run optimizer for the checkout web deployment in the production cluster." - "Analyze the `checkout/web` workload replicas." - "Should this Kubernetes workload be scaled before the launch event?" While a workload has an optimizer run in progress, the cluster diagram highlights its node. If the run needs a decision, the node also shows a badge you can use to jump to the run. ## How It Works Agent resolves the Kubernetes cluster and workload target, reads the latest workload inventory, and queries connected [New Relic](/docs/integrations/new-relic#kubernetes-observability), [Datadog](/docs/integrations/datadog#kubernetes-observability), [SigNoz](/docs/integrations/signoz#kubernetes-observability), or [Google Cloud](/docs/integrations/google-cloud-integration#kubernetes-observability) telemetry when available. It analyzes the combined evidence for optimization opportunities. Recommendations can include: - Findings about workload readiness, risk, or missing evidence. - Replica guidance when inventory supports a direct recommendation. - Capability gaps when Agent cannot make a safe recommendation from the available data. Telemetry is bounded to the target workload, relevant pods, and the analysis time range. If a provider query fails or inventory cannot attribute pods precisely, Agent reports the missing evidence instead of treating it as a healthy signal. If the workload appears to be managed by a HorizontalPodAutoscaler, Agent does not recommend manual replica changes. If autoscaling ownership is unknown, Agent calls out the uncertainty before recommending manual replica guidance. ## Approvals and Guardrails Kubernetes optimizer recommendations are review-first. Scale recommendations require explicit approval before anything changes. Before applying an approved replica change, Hyphen rechecks the workload against the replica count that was reviewed. If the workload has changed, cannot be found, or appears to be managed by autoscaling, Agent skips the change and reports why. If you reject a recommendation with a reason, the reason appears alongside the user who responded in the recommendation's details. ## Results Kubernetes optimizer task and run views show the selected cluster, workload, analyzed inventory context, findings, recommendation details, approval requests, and final output. The run view includes a scope summary (the workload analyzed and its size) and an evidence strip showing the metrics Agent used, each with its trend over the analysis window, the sample count, and the observability provider. After an approved scale change, Hyphen refreshes inventory so you can review the updated cluster state. ## Things to Know - Kubernetes optimizer work is scoped to one workload in one registered cluster per run. - Horizon must be connected before Agent can inspect workload inventory. - Agent does not request or use Kubernetes Secret data for optimizer analysis. - Inventory gaps or truncated inventory can lower recommendation confidence. - Missing or partial observability signals can lower recommendation confidence but do not prevent inventory-only analysis. - Manual replica guidance is skipped when matching HorizontalPodAutoscaler evidence is detected. ### Kubernetes Resource Cleanup URL: https://hyphen.ai/docs/agent/kubernetes-resource-cleanup/ Description: Learn how Hyphen Agent scans Kubernetes clusters to identify stale, dead, or unused resources and manage cleanup candidates through an auditable approval workflow. Hyphen Agent can scan a registered Kubernetes cluster for stale, dead, or unused resources and present cleanup candidates for review. Kubernetes resource cleanup helps reduce cluster clutter by turning risky manual cleanup work into an auditable Agent run with explicit approval for each candidate. Use Kubernetes resource cleanup when you want Agent to find cleanup candidates in a cluster. The internal Agent task type is `KubernetesResourceCleanup`. ## Requirements Kubernetes resource cleanup needs: - A [registered Kubernetes cluster](/docs/kubernetes/add-cluster) that Hyphen Agent can inspect. - Permission to view the cluster and run Agent tasks for the organization. - Permission to manage Agent task policies when changing organization or cluster cleanup policy settings. Agent must be able to collect cluster inventory, including namespaces, workloads, pods, services, endpoints, ingresses, config maps, and events. ## Automatic and Manual Runs By default, Kubernetes resource cleanup is enabled with a daily recurring schedule and a 14-day cleanup threshold. Scheduled runs are created from the effective Kubernetes cleanup policy for each registered cluster. If the effective policy is set to manual only, Hyphen does not create scheduled cleanup scans for that cluster. If you have permission, ask Hyphen Agent to scan a registered Kubernetes cluster manually. Manual cleanup scans are one-off tasks. Agent uses attached cluster context first; if the request does not identify exactly one cluster, Agent asks you to choose the intended cluster before starting the scan. ## Policies Kubernetes resource cleanup is controlled by an Agent task policy. The organization policy defines the default behavior for registered clusters. For step-by-step Kubernetes management instructions, see [Cleanup Policies in the Kubernetes section](/docs/kubernetes/cleanup-policies). The organization policy can configure: - Whether scheduled Kubernetes cleanup is enabled. - The recurring schedule, including manual-only mode. - The cleanup threshold in days. - Ignored namespaces. - Ignored Kubernetes resource UIDs. Individual Kubernetes clusters can override the organization policy. Use a cluster override when one cluster needs a different schedule, cleanup threshold, ignored namespaces, or ignored UIDs than the organization default. Cluster policy overrides apply only to that cluster. Removing the cluster override returns the cluster to the organization policy. The effective ignored namespace and UID lists also include Hyphen's built-in platform exclusions, such as Kubernetes system namespaces. ## How It Works Agent starts by collecting inventory from the selected cluster. It filters out ignored namespaces and ignored UIDs, then scores resources against the cleanup threshold and Kubernetes state signals. Agent can identify cleanup candidates such as: - Empty namespaces. - Workloads scaled to zero. - Completed or failed jobs. - Suspended cron jobs. - Terminal standalone pods. - Unreferenced config maps. - Services without endpoints. - Ingresses without live backends. - Orphan endpoint objects. - Unready workloads with warning events. Each finding includes the resource, category, confidence, reason, and evidence. If Agent finds no cleanup candidates, the run completes without requesting decisions. ## Approvals and Decisions Kubernetes cleanup scans are read-only until a cleanup candidate is explicitly approved. When Agent finds candidates, each candidate becomes an input request. Approved deletions are scoped to the single flagged Kubernetes resource. Agent does not delete related application workloads, namespaces, or other resources unless those resources are separately flagged and explicitly approved. Decision options include: - **Clean up** - Approves deletion of the candidate Kubernetes resource. - **Do nothing** - Skips the candidate for this run. - **Always ignore** - Adds the namespace or resource UID to the cleanup ignore policy when possible. - **Ignore namespace always** - Adds the candidate's namespace to the ignore policy. This option appears for namespaced resources. If an input request times out, Agent records the timeout and does not clean up that resource. If a cleanup deletion fails, the run records the failure so you can review what happened. ## Results Kubernetes resource cleanup task and run views show the scan, cluster, threshold, inventory summary, findings, approval requests, decisions, and cleanup output. Results can include counts for cleaned up resources, skipped resources, ignored resources, timed-out requests, successful deletes, already-absent resources, and delete failures. ## Things to Know - Kubernetes resource cleanup is scoped to one registered cluster per run. - The default cleanup threshold is 14 days. - Built-in platform namespaces are excluded from cleanup scans by default. - Ignored namespaces and ignored UIDs prevent matching resources from being flagged. - Agent does not delete Kubernetes resources unless a cleanup candidate is explicitly approved. - Cluster overrides are useful for clusters with different operational rules than the organization default. ### GitHub Pull Request Automation URL: https://hyphen.ai/docs/agent/github-pull-request-automation/ Description: Learn how Hyphen Agent automatically generates reviewable GitHub pull requests from log analysis findings and issue comments. Hyphen Agent can turn supported findings into reviewable GitHub pull requests. Pull request automation helps teams move from an Agent finding to a concrete code review without losing the context that produced the recommendation. This task is automatically used when an issue created by the Log Analysis task is tagged with the comment `/hyphen`. ## Requirements Pull request automation needs: - A connected GitHub integration. - A connected repository for the affected app. - Repository access for Agent to create branches and open pull requests. - Enough task context for Agent to identify the relevant code change. If a repository is not connected, Agent can still surface findings where supported, but it cannot open repository pull requests. ## What Can Trigger a Pull Request Agent can open pull requests from supported task findings, including: - Log analysis findings where Agent identifies an actionable code fix. - Any time Agent is tagged in a GitHub issue comment. The pull request includes context from the Agent task and run so reviewers can understand why Agent proposed the change. If you have the Hyphen Agent installed in your GitHub organization, you can comment `/hyphen` on an issue to ask it to prepare a pull request to address that issue. When you ask manually, Agent uses the connected repository and task context it can access. ## Review Workflow Agent-created pull requests follow your normal GitHub workflow. Reviewers can inspect the diff, run checks, approve, and merge according to your repository rules. Agent does not automatically update the pull request in response to review comments. Agent does not merge pull requests automatically as part of this workflow. ## Pull Request State Updates When a GitHub webhook reports that an Agent-created pull request was closed or reopened, Hyphen updates the matching Agent task run. The run stores the pull request state and whether GitHub reported it as merged. If the pull request is closed without being merged, the run shows the pull request as closed and not merged. If the pull request is merged, the run records the closed state with `merged` set to true. Hyphen applies this update to both GitHub issue automation runs and app-specific cleanup runs that include pull request cards. Closing a pull request does not automatically rerun Agent or merge code. Review, reopening, and merge decisions remain in GitHub and follow your repository workflow. ## Results Agent task and run views can show: - The repository and base branch Agent used. - Completed automation steps and timing. - Pull request cards with open, closed, or merged states. - Links back to the Agent task, related finding, repository, issue, and pull request. ## Things to Know - Pull requests require GitHub to be connected for the affected app. - Agent proposes code changes through pull requests instead of pushing directly to production code. - Log analysis may create or comment on issues before a pull request is opened. - Review, testing, and merge decisions remain with your team. ### MCP Overview URL: https://hyphen.ai/docs/mcp/mcp-overview/ Description: An overview of the hosted Hyphen MCP server connecting AI assistants and code agents to your organization for deployments, feature flags, and incident management. The Hyphen MCP server connects AI assistants and code agents to your organization. Claude, Cursor, and VS Code can manage feature flags, deployments, ENV metadata, Agent tasks, and audit events. Each request uses your Hyphen App permissions. [MCP (Model Context Protocol)](https://modelcontextprotocol.io) is the open standard AI clients use to call external tools. Hyphen hosts an MCP server, so there is nothing to install or run yourself: | Endpoint | URL | | --- | --- | | Production | `https://mcp.hyphen.ai/` | | Explicit organization | `https://mcp.hyphen.ai//` | The server is **authenticated by default**: every request needs a Hyphen credential, and your organization is resolved automatically from it. If you belong to multiple organizations, pin one with the `//` form of the URL. ## What You Can Do The server provides tools across the Hyphen platform. A connected agent can use these tools through conversation: - **Ship code** — "Deploy this repo to a preview environment" walks through project and app setup, Docker packaging, environment variables, the deployment run, and its logs. See [Deploy](../deploy/deploy-quickstart). - **Manage feature flags** — create and update [toggles](../feature-flags/toggle-quickstart) and [segments](../feature-flags/segments), then verify with a live edge evaluation that returns the same answer a real user would receive. - **Clean up stale flags** — telemetry-backed tools find flags that no longer vary, and a guided workflow removes them from your codebase before retiring them in Hyphen. - **Investigate incidents** — search the organization [audit log](../introduction/dashboard) and correlate it with deployment runs, logs, and metrics to answer "what changed right before things broke?" - **Operate Agent tasks** — schedule and inspect [Hyphen Agent](../agent/agent-overview) automations, review their runs, and answer their questions when a run is waiting on input. - **Answer platform questions** — search these docs live, so answers come from current documentation instead of stale training data. See the [tool reference](./tools) for documented tools. See [prompts and resources](./prompts-and-resources) for workflows. ## Access and Safety - **Your credential, your permissions.** Every tool call runs as you. What a connected agent may do is decided by the Hyphen API per request from your organization membership and roles — the same rules as the Hyphen App. Sign in with OAuth or an API key; see [Getting Connected](./getting-connected). - **Permission prompts on writes.** Tools that modify data are annotated as such, and destructive operations (deletes, deployment run triggers, agent chat) carry an additional destructive hint, so well-behaved MCP clients ask for your confirmation before running them. - **A production gate on deployments.** A deployment run that targets a production-type environment is refused unless the call explicitly acknowledges production — and agents are instructed to do that only after you confirm. - **ENV secret values never pass through the server.** Hyphen ENV values are [end-to-end encrypted](../env-secrets-management/end-to-end-encryption) with a key only you hold, so the server can only ever read secrets *metadata* (names, counts, versions). Use the [Hyphen CLI](../introduction/cli) (`hx env pull`) locally when you need values. ## Health Endpoints Two public, unauthenticated endpoints let uptime monitors probe the server: `GET /pingz` for liveness and `GET /healthz` for a health report with per-dependency detail (`200` when healthy, `503` when any dependency is down). ## Next Steps - [Getting Connected](./getting-connected) — authenticate and set up your MCP client - [Tool Reference](./tools) — documented tools by product area - [Prompts and Resources](./prompts-and-resources) — packaged workflows like `deploy_app` and `cleanup_stale_flags` The server is open source at [github.com/Hyphen/mcp](https://github.com/Hyphen/mcp) and published to the [official MCP registry](https://registry.modelcontextprotocol.io) as `ai.hyphen/mcp`. ### Getting Connected URL: https://hyphen.ai/docs/mcp/getting-connected/ Description: Learn how to connect your MCP client to Hyphen using OAuth or API keys, with setup instructions for Claude Code, Cursor, VS Code, and more. Connect your MCP client to `https://mcp.hyphen.ai/` and authenticate with your Hyphen account. This guide covers both authentication options and setup for the most common clients. ## Authentication Every MCP request needs a Hyphen credential. There are two options, and both resolve to the same identity and permissions: 1. **OAuth (recommended)** — clients that support the MCP OAuth discovery flow (Claude Code, Claude Desktop, claude.ai, Cursor) authenticate automatically: the server answers the first unauthenticated request with a challenge, and the client opens a browser window to sign you in through `auth.hyphen.ai`. 2. **API key** — create an API key in the [Hyphen App](https://app.hyphen.ai) under **Settings → API Keys** and send it as the `x-api-key` header. Use this for CI, headless agents, or clients without OAuth support. > 📘 API keys carry the access they were granted at creation time. Scope them to the projects your agent actually needs. ## Claude Code ```bash # OAuth claude mcp add --transport http hyphen https://mcp.hyphen.ai/ # or with an API key claude mcp add --transport http hyphen https://mcp.hyphen.ai/ --header "x-api-key: " ``` With OAuth, adding the server doesn't sign you in yet — inside Claude Code, run `/mcp`, select **hyphen**, and authenticate; a browser window opens the first time. ## Claude Desktop and claude.ai Go to **Settings → Connectors → Add custom connector**, paste `https://mcp.hyphen.ai/`, and sign in when prompted. ## Cursor Use the [one-click install](https://cursor.com/install-mcp?name=hyphen&config=eyJ1cmwiOiJodHRwczovL21jcC5oeXBoZW4uYWkvIn0=), or add the server to `~/.cursor/mcp.json`: ```json { "mcpServers": { "hyphen": { "url": "https://mcp.hyphen.ai/" } } } ``` ## VS Code Use the [one-click install](https://vscode.dev/redirect/mcp/install?name=hyphen&config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fmcp.hyphen.ai%2F%22%7D), or add the server to your `mcp.json` with an API key: ```json { "servers": { "hyphen": { "type": "http", "url": "https://mcp.hyphen.ai/", "headers": { "x-api-key": "" } } } } ``` > 📘 VS Code's OAuth sign-in depends on dynamic client registration, which Hyphen's authorization server doesn't offer yet (see [troubleshooting](#troubleshooting)) — the API key header is the reliable path in VS Code today. ## Other Clients Any client that speaks streamable HTTP works. The generic `mcpServers` shape, with an API key for clients that don't handle the OAuth flow: ```json { "mcpServers": { "hyphen": { "type": "streamable-http", "url": "https://mcp.hyphen.ai/", "headers": { "x-api-key": "" } } } } ``` ## Picking an Organization Your organization is resolved automatically from your credential. If you belong to more than one organization, pin the one a client should use by putting its ID in the URL: ``` https://mcp.hyphen.ai// ``` ## Verify the Connection Ask your assistant something like *"Who am I in Hyphen?"* — it should call the `whoami` tool and answer with your user, member, and organization. From there, try *"List my projects"* or *"What feature flags haven't been evaluated lately?"* ## Troubleshooting - **The OAuth sign-in fails in your client.** Some clients require OAuth dynamic client registration, which Hyphen's authorization server does not offer yet. Fall back to an [API key](#authentication) in any client that lets you set request headers — Claude Code, Cursor, VS Code, and generic `mcpServers` configs. (Claude Desktop and claude.ai don't accept custom headers, but their connector flow signs in with OAuth and doesn't need one.) - **You see a `401` before signing in.** That is the OAuth flow working as designed: the first unauthenticated request is challenged, and the challenge tells the client where to sign in. If your client never opens a browser after the `401`, configure an API key instead. - **Tools fail with permission errors.** Tool calls run with your Hyphen permissions (or the API key's). If you can't do something in the [Hyphen App](https://app.hyphen.ai), the MCP server can't do it either — ask an organization admin to adjust your role or the key's access. ### Tool Reference URL: https://hyphen.ai/docs/mcp/tools/ Description: Comprehensive reference guide detailing Hyphen Model Context Protocol (MCP) tools for managing projects, deployments, feature toggles, agents, and secrets. This reference covers MCP tools for Hyphen projects, deployments, feature flags, Agent tasks, ENV metadata, and documentation. Your assistant selects tools for each request. ## Conventions - **Organization scoped.** Every tool operates within the organization resolved from your credential (or pinned in the [server URL](./getting-connected#picking-an-organization)). - **Pagination.** List tools take `page_num` / `page_size` and return a `{ data, totalCount, totalPages }` envelope. - **Permission prompts.** Tools that modify data are annotated as writes, and destructive operations — deletes, deployment run triggers, and the chat tools that drive the platform agent — carry a destructive hint, so MCP clients ask for your confirmation before running them. - **Production gate.** On top of client-side prompts, the server refuses a deployment run that targets a production-type environment unless the call sets `acknowledge_production: true`, which agents are instructed to do only after you explicitly confirm. ## Context | Tool | What it does | | --- | --- | | `whoami` | The authenticated user, member, and organization for the session. | | `get_organization` | Details of the current organization. | ## Projects and Environments | Tool | What it does | | --- | --- | | `list_projects` | List the organization's projects. | | `get_project` | Fetch one project by ID or alternate ID. | | `create_project` | Create a project. | | `list_environments` | List a project's environments, including their types. | ## Apps | Tool | What it does | | --- | --- | | `list_apps` | List apps, optionally scoped to a project. | | `get_app` | Fetch one app. | | `create_app` | Create an app in a project. | ## Deployments Observability and control for [Hyphen Deploy](../deploy/deploy-quickstart). | Tool | What it does | | --- | --- | | `list_deployments` | List deployments with readiness (`isReady`, `readinessIssues`). | | `get_deployment` | Fetch one deployment. | | `get_deployment_metrics` | CPU, memory, requests-per-minute, and instance-count statistics per traffic region. | | `list_deployment_runs` | Run history with statuses (`queued`, `running`, `succeeded`, `failed`, …). | | `get_deployment_run` | One run with pipeline detail. | | `get_deployment_run_logs` | A run's pipeline log entries, for debugging failures. | | `start_deployment_run` | Start a run — each app's latest build by default, or pinned artifacts (`build_id` or a container image URI). Production-gated. | | `cancel_deployment_run` | Stop a run mid-flight. | | `rollback_deployment` | Redeploy the exact build artifacts of a previous successful run; the last known-good run is picked automatically when `run_id` is omitted. Production-gated. | ## Feature Toggles Manage [feature flags](../feature-flags/toggle-quickstart) and their targeting. | Tool | What it does | | --- | --- | | `list_toggles` | List a project's toggles. | | `get_toggle` | One toggle with its targeting configuration. | | `create_toggle` | Create a toggle. | | `update_toggle` | Update a toggle's values or targeting. | | `delete_toggle` | Retire a toggle. | | `evaluate_toggle` | Evaluate a flag against the Horizon edge — the same answer a real user would receive. Auto-discovers your organization's `public_…` evaluation key when you don't pass one. | ## Toggle Segments | Tool | What it does | | --- | --- | | `list_toggle_segments` | List a project's [segments](../feature-flags/segments). | | `create_toggle_segment` | Create a segment. | | `update_toggle_segment` | Update a segment's rules. | | `delete_toggle_segment` | Delete a segment. | ## Toggle Lifecycle Intelligence Hyphen records every edge evaluation as telemetry; these tools turn it into flag hygiene. | Tool | What it does | | --- | --- | | `get_toggle_usage_summary` | Evaluation counts per project and environment (`daily: true` for a time series). | | `list_unused_toggles` | Flags older than 90 days whose evaluations have collapsed to a single constant value. | | `get_toggle_usage` | One flag's daily or raw evaluation telemetry. | | `get_toggle_insights` | Classifies a flag as **dormant** (no traffic), **constant** (traffic but no varying result), or **active**. | ## Audit Events | Tool | What it does | | --- | --- | | `search_events` | Search organization audit events for resource changes and access. Filter by event type, date, or referenced entity. Results include the actor, time, IP address, and location. | ## Agent Tasks and Runs Schedule and inspect [Hyphen Agent](../agent/agent-overview) automations. Requires the agent entitlement. | Tool | What it does | | --- | --- | | `create_agent_task` | Schedule a `StaleFeatureFlagCleanup`, `Optimizer`, `LogAnalysis`, or `ResourceCleanup` task — one-shot or recurring via cron. | | `list_agent_tasks` | List scheduled tasks. | | `get_agent_task` | One task's configuration and state. | | `delete_agent_task` | Remove a scheduled task. | | `list_agent_task_threads` | Recent activity grouped by task, including pull requests the automations opened. | | `list_agent_task_runs` | Executions of one task. | | `list_runs` | Recent runs across tasks. | | `get_run` | One run's progress, findings, and output. | | `respond_to_run_input_request` | Answer a paused run's questions — runs in `action_required` are waiting on exactly that. | ## ENV Secrets (Metadata) | Tool | What it does | | --- | --- | | `list_dotenvs` | List [ENV](../env-secrets-management/env-secrets-management) environments and their metadata. | | `get_app_dotenv` | One app environment's metadata — version, secret count, size. | > 📘 **Metadata only, by design.** ENV values are [end-to-end encrypted](../env-secrets-management/end-to-end-encryption) with a key only you hold, so the server can never read or return secret values. Use the [CLI](../introduction/cli) (`hx env pull`) locally when you need them. ## Platform Agent Chat Drive [Hyphen Agent](../agent/agent-overview) chat sessions from your own assistant. Because the platform agent can create, modify, or delete organization resources server-side, these tools carry the destructive hint and prompt for permission. | Tool | What it does | | --- | --- | | `create_chat_session` | Start a chat session with the platform agent. | | `send_chat_message` | Send a message into a session. | | `respond_to_chat_input_request` | Answer the agent's structured confirmation or selection prompts. | | `list_chat_sessions` | List sessions. | | `get_chat_session` | One session's state. | | `get_chat_messages` | A session's message history. | | `close_chat_session` | Close a session when work is complete. | ## Utilities | Tool | What it does | | --- | --- | | `get_dockerfile_example` | A production-ready Dockerfile example for a language and framework (ASP.NET Core, Express, Fastify, Next.js, React). | | `get_dockerignore_example` | The matching `.dockerignore` example. | | `search_docs` | Search the live Hyphen documentation, so answers come from current docs instead of stale training data. | | `get_docs_page` | Fetch one documentation page. | | `get_migration_guide` | A step-by-step guide for migrating to Hyphen — see [prompts and resources](./prompts-and-resources#migration-guides). | ### Prompts and Resources URL: https://hyphen.ai/docs/mcp/prompts-and-resources/ Description: An overview of packaged MCP prompts, migration workflows, and read-only context resources available in the Hyphen MCP server. Beyond individual [tools](./tools), the Hyphen MCP server ships packaged **prompts** — multi-step workflows your assistant follows end to end — and **resources** it can read for context. ## Prompts MCP prompts show up natively in your client: in Claude Code they appear as slash commands (`/mcp__hyphen__deploy_app`), in Claude Desktop and Cursor they're in the prompt picker. Each one turns a multi-step operation into a guided conversation, with your confirmation gating anything that changes state. All arguments are optional unless noted — when omitted, the workflow discovers what it needs or asks you. ### `deploy_app` Turns a coding agent into a ship-it workflow for the repo it has open: detect the language, framework, and port; create the Hyphen project and app if needed; write the `.hx` link file; generate Docker packaging from the built-in examples; check ENV metadata; then deploy **preview-first** — `hx deploy` in your terminal when the working copy has uncommitted changes (only the [CLI](../introduction/cli) can package local code), a deployment run otherwise. It watches the run and logs, fixes failures, and promotes to production only after your explicit confirmation. Arguments: `project_id`, `app_id`, `environment`. ### `rollout_feature_flag` Create or update a toggle, adjust its targeting (default value, percentage, or segments), and verify the rollout with a live edge evaluation — the flag should return the expected value for a representative target. Ends with a before/after summary and how to roll back. Arguments: `toggle_key` (required), `project_id`, `environment`. ### `cleanup_stale_flags` Flag hygiene, done safely. Telemetry names the candidates ([lifecycle intelligence tools](./tools#toggle-lifecycle-intelligence) find flags that are dormant or stuck on one value), a production evaluation confirms which branch the code should collapse to, your coding agent removes the flag conditionals from the codebase it already has open — and only after that change ships does `delete_toggle` retire the flag. Arguments: `project_id`, `toggle_key`. ### `investigate_incident` Answers "what changed right before things broke?" — searches the audit log around the incident window, correlates with deployment runs, logs, and metrics, checks suspect flags with live evaluations, and presents a timeline with the most likely cause and the rollback or fix for each suspect. Arguments: `started_at`, `project_id`, `environment`. ### `migrate_to_toggle` Guided migration to [Hyphen Toggle](../feature-flags/toggle-quickstart): inventory the flags in your current system, recreate them as Hyphen toggles with equivalent targeting, swap your code to an [OpenFeature provider](../feature-flags/toggle-sdks), and verify with live edge evaluations before retiring the old system. Arguments: `source` (e.g. `launchdarkly`, `split`, `unleash`), `project_id`, `language`. ### `migrate_to_env` Guided migration to [Hyphen ENV](../env-secrets-management/env-secrets-management): export secrets from the current store into per-environment `.env` files, push them with the CLI's [end-to-end encryption](../env-secrets-management/end-to-end-encryption) (`hx push`), verify through metadata, and wire up the runtime. Secret values never pass through the server or the chat. Arguments: `source` (e.g. `dotenv`, `doppler`, `vault`), `app_id`. ## Migration Guides The `get_migration_guide` tool backs the migration prompts and also works standalone — ask your assistant *"help me migrate from LaunchDarkly to Hyphen"* and it maps the old system's concepts onto Hyphen's, orders the steps, and names the MCP tool or `hx` CLI command for each one. | Migrating to | From | | --- | --- | | **Toggle** (feature flags) | LaunchDarkly, Split, Unleash, Statsig, Flagsmith, Optimizely, DevCycle, or homegrown flags | | **ENV** (secrets) | `.env` files, Doppler, HashiCorp Vault, AWS Secrets Manager, AWS Parameter Store, Azure Key Vault, GCP Secret Manager, or Infisical | ## Resources Resources are read-only context your assistant can attach to a conversation: | Resource | Contents | | --- | --- | | `hyphen://organization` | The authenticated organization, user, and member for the session. | | `hyphen://docs` | A live index of the Hyphen documentation — every page with URL and summary. | | `dockerfile://{language}/{framework}` | Production-ready Dockerfile examples (ASP.NET Core, Express, Fastify, Next.js, React). | | `dockerignore://{language}/{framework}` | The matching `.dockerignore` examples. | ### Hyphen Deploy Quickstart URL: https://hyphen.ai/docs/deploy/deploy-quickstart/ Description: Learn how to deploy container applications and static websites from your local environment using the Hyphen CLI and dashboard. Deploy a container app or static site from your local app folder. This guide requires a Hyphen account and organization. You will need: - Your app's source files on your computer - Docker for a container build, or finished website files for a static build - Access to connect a cloud provider and configure a project in Hyphen GitHub integration and a Git commit are not required for a local CLI build. You can add [GitHub Actions](/docs/deploy/deploy-action/) later to deploy committed code automatically. Hyphen Deploy supports container apps on Amazon ECS, Azure Container Apps, and Google Cloud Run. It supports static sites on Cloudflare Workers Static Assets. ## App types Set the **App Type** for each app in the deployment: - **Static**: finished website files. Select **Cloudflare Workers** under **Deploy to**. The provider assigns a URL automatically. - **Container**: server-side code. Select a cloud under **Deploy to** and set the container deployment settings. A deployment can include static apps, container apps, or both. The **Object storage** option applies to container apps only. Include a container app and select a cloud to enable it. Use **Copy CLI command** to copy the `hx deploy` or `hx build` command for the deployment. If the deployment has missing requirements, the dialog shows build instructions for static and mixed deployments. ## Setup ### 1. Connect your cloud provider In the Hyphen app, open **Integrations** and connect your cloud provider: - [Amazon Web Services](/docs/integrations/aws-integration/) - [Google Cloud](/docs/integrations/google-cloud-integration/) - [Microsoft Azure](/docs/integrations/azure-integration-setup-guide/) - [Cloudflare](/docs/integrations/cloudflare/) for static sites A Cloudflare site requires the Cloudflare account setup described in its guide. Follow the provider's setup instructions to grant Hyphen access. For AWS, also complete the distribution-list setup needed to create a cloud workspace. ### 2. Set up your project's cloud connections Choose the [project](/docs/introduction/project/) that will contain your app, or create one using **+** → **Project**. Use this same project throughout the guide. For static sites, the project needs a ready **Site Registry** for each selected provider. Open the project's **Settings** → **Integrations** to check its connections. For Cloudflare, add a Site Registry there. Hyphen creates the private R2 bucket automatically. Static sites do not require a Container Registry or Cloud Workspace. For container deployments, the project needs a ready Container Registry and Cloud Workspace on each target cloud: - **Container Registry**: stores the container images built from your code. A build uploads an image to every ready container registry on the project (one artifact per registry). - **Cloud Workspace**: provides the cloud workspace used for deployment. For containers, you can select more than one cloud, such as AWS, Azure, and Google Cloud. When you select **Deploy to** targets, Hyphen can create the project's registry and workspace or use existing connections. The organization integration alone does not complete this project setup. During a run, each cloud instance pulls only the image artifact whose target matches that cloud. You can also review and manage these connections directly under the project's **Settings** → **Integrations**, or complete missing connections by selecting **Deploy** after saving your deployment configuration below. ### 3. Use the CLI to initialize your app Install or update the Hyphen CLI (`hx`): ```bash linux/macos sh -c "$(curl -fsSL https://cdn.hyphen.ai/install/install.sh)" ``` ```powershell windows powershell -c "irm https://cdn.hyphen.ai/install/install.ps1 | iex" ``` Use the current CLI release for the commands in this guide. Check your version with `hx version` and update an existing installation with `hx update`. Open a terminal in your app's root folder—the folder containing its source files and, for a Next.js app, `package.json`. Sign in: ```bash hx auth ``` Select the same organization and project you are configuring in the dashboard. If you need to change an existing selection, use `hx set-org` and `hx set-project`. Link the current folder to an app in Hyphen: ```bash hx init ``` Follow the prompts to select or create the app. The `.hx` file records the app, project, and organization for this folder. Initialization links the app; it does not build or deploy it. For containers, Hyphen uses an existing Dockerfile or generates one during the build. For static sites, run your frontend build command to produce the website files before you use hx. See [Builds](/docs/deploy/builds/) for both build types, and [Using ENV with Docker](/docs/env-secrets-management/using-env-with-docker/) for container secrets. ### 4. (Optional) Connect DNS Zone For a container app's custom hostname, connect your DNS zone in **Settings** → **DNS** → **Add Zone**. Static providers assign site URLs automatically. Cloudflare uses a `workers.dev` URL for each environment or preview. ## Configure Your Project Environment Deployment Settings Each deployment belongs to one project environment. Configuring development does not configure production. 1. Open your project and select the environment you want to deploy. 2. Select **Create Deployment**. 3. Include your app under **Apps in this deployment**. For a first deployment, use the local app you initialized. 4. Select **Static** or **Container** as its **App Type**. 5. For a static app, select its providers under **Deploy to**. For a container app, set the cloud targets, scale, availability, and traffic regions. 6. For each container target, select new project connections or **Use existing**. Optionally set a container hostname and path. 7. Select **Save**. Hyphen stores the configuration and creates any new connections you selected. This step does not upload code or start a run. 8. Select **Deploy** to check for missing requirements. Complete the project connections before you run the CLI command. If you include multiple apps, each needs an uploaded build. A CLI run builds the app in the current folder and uses uploaded builds for the other included apps. ### Deleted apps If you delete an app from a project, it can remain in the deployment settings of an environment. The environment view then shows a warning that names each deleted app. Future deployment runs fail until you remove the app. To repair the settings, select **Remove from deployment** on the warning or on the card of the deleted app. Confirm the removal. This action changes only the deployment settings. It does not delete anything from your cloud. ## Deploy your app 1. In the project overview, confirm the selected environment. 2. Open the menu beside **Deploy** and select **Copy CLI command**. This action is also available on the deployment details page, before your first build exists. 3. Run the copied command in the app folder initialized above. For a container app, deploy the `production` environment in the project linked in `.hx` with: ```bash hx deploy --env production ``` Use the command copied from your selected environment. It includes `--env` only when the environment's type isn't development; the organization and project come from your app folder's `.hx` file. Before running it, check that `.hx` links to the app and project you selected in the dashboard. `--env` accepts an environment ID or alternate ID; this example uses the alternate ID `production`. For a container app, the CLI builds local code, uploads the image, and starts a deployment run. For a static site, supply the finished website directory: ```bash hx deploy --env production --type static ./dist ``` Replace `./dist` with your frontend output directory. The CLI uploads the files and starts the deployment. It does not run your frontend build command. Follow the dashboard link to view the run, then open the app URL from its deployed resources. A normal environment deployment does not automatically create a preview. See [Deployment Previews](/docs/deploy/deployment-previews/) for the preview commands. The dashboard's **Deploy** button uses builds that have already been uploaded. It cannot upload code from a folder on your computer. ### Selecting an environment in the CLI From an initialized app folder, deploy the current project's environment of type **development** with: ```bash hx deploy ``` To select a specific environment in that project, use its alternate ID: ```bash hx deploy --env production ``` Both commands use the project linked in `.hx`. To deploy an app in another project, run from that app's initialized folder. Without `--env`, hx selects the environment whose **type** is development; its name or alternate ID may be different. The browser selection does not change what a bare `hx deploy` selects. Use the copied command when you want the environment selected in the dashboard. The CLI can create missing deployment configuration, but the project still needs the connections for its app types. For static sites, keep `--type static` and the output directory in the command. ### Deploy Static and Container Apps Together A deployment can include both app types. Each app needs a build with artifacts for its selected providers. Run the appropriate build command from each app's initialized folder: ```bash # From the container app folder hx build --env production # From the static app folder, after the frontend build hx build --env production --type static ./dist # From an initialized folder in the same project hx deploy --env production --no-build ``` To select specific apps or builds, use `--apps` for containers and `--sites` for static sites. See the [CLI reference](/docs/introduction/cli/#deploy) for examples. ## Next Steps - [Learn about builds](/docs/deploy/builds/) - [Understand environment variables](/docs/deploy/environment-variables/) available in your deployed application - [Set up GitHub Actions](/docs/deploy/deploy-action/) to automate deployments from a repository - [Create a deployment preview](/docs/deploy/deployment-previews/) - [Explore deployment run methods](/docs/deploy/deployment-run-methods/) ### Builds URL: https://hyphen.ai/docs/deploy/builds/ Description: Learn how the Hyphen CLI handles container and static site builds, artifact storage across cloud registries, and deployment workflows. The Hyphen CLI supports container images and static sites. Container builds use Docker and upload images to your project's container registries. Static builds upload a directory of finished website files to your project's site registries. GitHub setup is optional for local builds. ## How Builds Work Use `hx build` to prepare a build for a later deployment. Use `hx deploy` to prepare a build and start a deployment. A dashboard deployment uses uploaded builds; it does not build files from your computer. The `--type` flag selects the local build type: | Type | Input | Destination | | --- | --- | --- | | `docker` (default) | Source files and a Dockerfile, which Hyphen can generate. | Every ready Container Registry on the project. | | `static` | A directory of finished website files. | Every ready Site Registry on the project. | ## Static Site Builds Build your frontend with its own build command first. Then supply the output directory as the final argument: ```bash hx build --type static ./dist ``` Replace `./dist` with your output directory. The directory must contain the files that the website serves, such as HTML, CSS, JavaScript, and images. For a site with no build step, supply the directory that contains those files. The CLI does not run a frontend build tool for `--type static`. It does not require Docker or a Dockerfile. The directory must contain at least one regular file. The CLI rejects archives, individual files, and symbolic links as the directory argument. It also rejects symbolic links within the directory. The static build process has these steps: 1. The CLI reads the files and calculates their checksums. 2. The CLI uploads the files to each ready Site Registry on the project. 3. Hyphen records one Static build with an artifact for each registry after all uploads succeed. A failed upload prevents build registration and deployment. Each provider applies its own file and size limits. ### Site Registries A static build requires at least one ready **Site Registry** connection on the project. [Cloudflare](/docs/integrations/cloudflare/) supports site registries. A project can have one active Site Registry per provider. Open the project's **Settings** → **Integrations** to check the registry status. For Cloudflare, add a Site Registry through this project connection flow. Hyphen creates a private R2 bucket for the site's builds. The deployment must select a static provider with a matching build artifact. In the deployment form, select **Static** as the app type. Then select **Cloudflare Workers** under **Deploy to**. Static sites do not require a Container Registry or Cloud Workspace. ### Deploy a Static Build To upload the finished files and deploy the `production` environment, run: ```bash hx deploy --env production --type static ./dist ``` To deploy an uploaded build, run: ```bash hx deploy --env production --no-build --sites website:latest ``` Replace `website` with your app ID or alternate ID. `--no-build` does not need a local output directory. `--sites` selects static apps; `--apps` selects container apps. See the [CLI reference](/docs/introduction/cli/#deploy) for deployments with both app types and specific build selections. ## Container Build Process With the default `--type docker`, Hyphen: 1. Locates your Dockerfile in the app folder 2. If no Dockerfile exists, Hyphen Code generates one automatically based on your application's code 3. Builds a Docker image using your Dockerfile 4. Inspects the image to detect exposed ports 5. Lists the project's container registries 6. Authenticates with each registry and pushes the image 7. Registers the build with Hyphen (one Docker artifact per pushed image) The CLI reports build stages. Use `--verbose` when you need Docker build output for troubleshooting. ### Finding Your Dockerfile Hyphen automatically searches your app folder for a `Dockerfile`. If no Dockerfile is found, Hyphen Code will automatically generate one for you based on your application's code and dependencies. The generation process: - Analyzes your codebase and detects the programming language, framework, and build system - Creates an optimized Dockerfile tailored to your application - Saves the generated Dockerfile and .dockerignore locally (allowing you to review before committing) ### Building the Docker Image The Docker build process uses your Dockerfile to create a container image. Hyphen builds images targeting the `linux/amd64` platform by default, ensuring compatibility with the most common cloud container services including AWS ECS, Azure Container Apps, and Google Cloud Run. The image is tagged with your app alternate ID and the current Git commit SHA, shortened to 7 characters. Without Git history, the CLI uses `0000000`. This metadata does not change the source of the build: it uses the current local files, including uncommitted changes allowed by your Docker build context. ### Port Detection After building the image, Hyphen inspects it to automatically detect which ports your application exposes. This information is used to configure networking and load balancing when your application is deployed. Ports are detected from the `EXPOSE` directive in your Dockerfile. ### Pushing to Container Registries Once built, the image is pushed to **every ready container registry configured on the project**. Hyphen handles authentication automatically, logging in with the credentials configured when you set up each container registry connection. The image is tagged appropriately for each registry type: - **AWS ECR**: Uses `:` as the separator with tag format `registry:image-tag` - **Azure ACR**: Uses `/` as the separator with tag format `registry/image:tag` - **Google Artifact Registry**: Uses `/` as the separator with tag format `registry/image:tag` After each push completes, Hyphen logs out of that registry to avoid leaving credentials in your local Docker configuration. ### Registering the Build Builds can be associated with an environment or preview. A normal CLI deployment uses the build just created for the local app and uploaded builds for other included apps. Dashboard deployments and `--no-build` reuse uploaded builds for the selected deployment target. Additional metadata is recorded with each build: - Artifacts for each project registry the image was pushed to (image URI and cloud target) - Exposed ports - Git commit SHA, or a fallback value when no commit exists - Build timestamp - Associated app and environment This build record can be viewed in the Hyphen Dashboard and is used to track your deployment history. During a deployment run, each cloud instance uses only the artifact whose target matches that cloud. ## Build Triggers Builds can be triggered in several ways: ### Via CLI With the default build type, `hx deploy` builds your Docker image locally before it starts the deployment. For a static site, add `--type static` and the finished website directory. Add `--verbose` to see build details. ```bash hx deploy ``` Plain `hx deploy` selects the environment of type development in the project linked in your app folder's `.hx` file. Use `hx deploy --env production` for an explicitly selected environment in that project. Use **Copy CLI command** in the menu beside **Deploy** to copy the selected environment and organization. Run it from the app folder whose `.hx` file links to the project shown in the menu. For more details on using the CLI for deployments, see [Deployment Run Methods](/docs/deploy/deployment-run-methods/#cli). ### Via GitHub Actions In GitHub Actions, the build runs on the workflow runner. The `Hyphen/setup-hx-action` installs the Hyphen CLI. For a static site, run your frontend build command before `hx build --type static ./dist` or `hx deploy --type static ./dist`. For a detailed guide on setting up automated deployments with GitHub Actions, see [GitHub Actions Deployment](/docs/deploy/deploy-action/). ## Container Registries Build artifacts (Docker images) are stored in your project's container registries. Each registry is created in a connected cloud provider and is dedicated to your project. A container build requires at least one ready Container Registry on the project. Container deployments also require a ready registry and Cloud Workspace on each target cloud. See the [Deploy Quickstart](/docs/deploy/deploy-quickstart/#2-set-up-your-projects-cloud-connections) for setup instructions. When the project has registries on more than one cloud, a single build produces one artifact per registry and uploads each image accordingly. The build's details in the dashboard list every artifact. ## Requirements Initialize your app with `hx init` before either build type. Then check the requirements for your build type: | Requirement | Container | Static site | | --- | --- | --- | | Local input | Source files; Docker must be available in `PATH` and active. | A directory of finished website files. | | Build connection | At least one ready Container Registry. | At least one ready Site Registry. | | Deployment connections | A ready Container Registry and Cloud Workspace for each target cloud. | A ready Site Registry and a matching artifact for each selected static provider. | GitHub integration and a Git commit are not required for a local build. For container builds, Hyphen uses your Dockerfile if one exists. Otherwise, Hyphen Code generates one. `--dockerfile` cannot accompany `--type static`. ## Skipping Builds Use `--no-build` to deploy uploaded container or static builds: ```bash hx deploy --env production --no-build ``` This is useful when you want to: - Redeploy the same build to a different environment - Retry a failed deployment without rebuilding - Test deployment configuration changes without code changes When using `--no-build`, Hyphen reuses uploaded builds for the selected deployment target. It does not upload local changes. For a preview, retain both `--preview` and `--prefix` in the command. ## Standalone Builds Use `hx build` to prepare container images or static files for a later deployment. For static files, use `hx build --type static ./dist`. For more information about the build command, see [CLI documentation](/docs/introduction/cli/#build). ## Next Steps - [Deploy an environment](/docs/deploy/deploy-quickstart/#configure-your-project-environment-deployment-settings) with your uploaded builds - [Set up GitHub Actions](/docs/deploy/deploy-action/) to automate your build and deployment process - [Learn about deployment run methods](/docs/deploy/deployment-run-methods/) to understand different ways to trigger deployments ### Deployment Run Methods URL: https://hyphen.ai/docs/deploy/deployment-run-methods/ Description: Learn the different methods to trigger deployment runs in Hyphen, including GitHub Actions, the Hyphen CLI, REST API, and the Web Dashboard. A deployment run executes the configuration saved for a project environment. Run history shows its status and logs. A [preview](/docs/deploy/deployment-previews/) is an explicitly selected deployment target; a normal run does not automatically create one. ## GitHub Use [GitHub Actions](/docs/deploy/deploy-action/) to build committed code and deploy it on events such as a push or pull request. Configure the workflow and its Hyphen credentials in your repository. Connecting a repository alone does not run a deployment. GitHub setup is optional for deploying a local folder with the CLI. ## CLI Use the Hyphen CLI (`hx`) when you want to launch a deployment run directly from your terminal or a custom automation script. The CLI builds and uploads the current local app, uses uploaded builds for other included apps, and reports deployment status until the run completes. For details on the build process, see [Builds](/docs/deploy/builds/). ```bash hx deploy --env production ``` For a static site, run your frontend build command first. Then upload the finished website directory and start the deployment: ```bash hx deploy --env production --type static ./dist ``` Replace `./dist` with your frontend output directory. The CLI does not run a frontend build tool for this command. Use `--sites` to select static apps and `--apps` to select container apps. Run from the app folder initialized with `hx init`. Use the **Copy CLI command** action in the menu beside **Deploy** to copy `--env` (included only when the environment's type isn't development); the organization and project come from your app folder's `.hx` file. Check that the folder's `.hx` file links to the project shown in the menu before running it. The CLI authenticates using the credentials saved during `hx auth`. Plain `hx deploy` selects the environment of type development in the project configured in `.hx`, independent of its name and the browser selection. Use `--env production` to select an environment by alternate ID within that project. To deploy an app in another project, run from that app's initialized folder. Add `--no-build` to reuse uploaded builds. See the [CLI reference](/docs/introduction/cli/#deploy) for examples. If you are authenticating in a CI/CD environment and need to authenticate using an API key, you can do so in 2 ways: 1. **Use API Key** `--use-api-key` will look for the HYPHEN_API_KEY environment variable first and if not found it will prompt for the key. ``` hx auth --use-api-key ``` 2. **Set API Key** `--set-api-key VALUE` will expect an inline value. The risk in using this method is just in exposing the secret in your terminal output, but it's provided for convenience. ``` hx auth --set-api-key VALUE ``` Container deployments require ready Container Registry and Cloud Workspace connections for each target cloud. Static sites require a ready Site Registry and a matching build artifact for each selected static provider. Follow the CLI's dashboard link to view the run, then open the app URL from the deployed resources. Use `--preview` and `--prefix` for a [deployment preview](/docs/deploy/deployment-previews/). ## REST API Hyphen also exposes a REST API for triggering deployment runs programmatically. This is useful when you need to integrate deployments into an external build system, ticketing workflow, or release orchestration tool. Create a run by sending an authenticated `POST` request to `/api/organizations/{organizationId}/deployments/{deploymentId}/runs`, using the deployment ID shown on the deployment details page. The request body is optional; include it when you want to pin the run to specific build artifacts. Each entry must provide an `appId` and either a `buildId` (to reuse an existing Hyphen build), a build alias such as `latest`, or an `artifacts` array of published container images. When you supply images directly, include one Docker artifact per cloud you intend to deploy to (each with its own registry URI). During the run, each cloud instance uses only the artifact whose target matches that cloud. ```bash curl -X POST "https://api.hyphen.ai/api/organizations/$HYPHEN_ORG/deployments/$DEPLOYMENT_ID/runs" \ -H "Authorization: Bearer $HYPHEN_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "artifacts": [ { "appId": "app_123", "buildId": "abld_456" }, { "appId": "app_789", "artifacts": [ { "type": "Docker", "target": "aws", "image": { "uri": "123456789012.dkr.ecr.us-east-1.amazonaws.com/custom-image:latest" } }, { "type": "Docker", "target": "googleCloud", "image": { "uri": "us-docker.pkg.dev/my-project/apps/custom-image:latest" } } ] } ] }' ``` The response contains the deployment run record, including its ID, current status, and pipeline steps. Follow-up calls to `GET /api/organizations/{organizationId}/deployments/{deploymentId}/runs/{runId}` return the latest status, and `PUT /api/organizations/{organizationId}/deployments/{deploymentId}/runs/{runId}/status` (body `{ "status": "canceled" }`) lets you cancel a run that is still in progress. ## Dashboard The dashboard deploys uploaded builds; it cannot build source files from a folder on your computer. 1. Open your project and select its environment, or open the deployment details page. 2. Select **Deploy** to run the latest uploaded builds. If requirements are missing, complete them using the setup dialog. For an app without a build, use its CLI instructions from your local app folder. 3. To choose a previous build when multiple builds are available, open the menu beside **Deploy** → **Deploy previous build…**, then select the build to deploy. 4. Follow the run's status and logs. After it succeeds, open the app URL from the deployed resources. All run methods use the saved deployment configuration and appear in deployment history. Their source differs: the CLI builds local files, GitHub Actions builds the checked-out repository, and the dashboard uses uploaded builds. ![](https://files.readme.io/3a47b30178949c92fa0ebece784e8cea1b8e5ad0c7b3c12ac5cf47c664a70c19-deployment-run1.jpeg)
### Deploy with GitHub Actions URL: https://hyphen.ai/docs/deploy/deploy-action/ Description: Learn how to trigger and automate Hyphen deployments within GitHub Actions workflows using the Hyphen deploy action. This action runs a Hyphen deployment from a GitHub workflow. It wraps the `hx deploy` CLI command, waits for the deployment run to finish, and exposes the resulting deployment ID, run ID, URL, and status as step outputs so subsequent steps can act on them. ## Prerequisites Before using the deploy action, ensure that: - The [Setup hx Command Line](/docs/github-actions/setup-command-line/) action has been run. - Your repository contains a `.hx` file at the root (created by `hx init`), or you supply the project, app, and organization values as action inputs. - A deployment has been configured for the project environment you wish to deploy. - Your cloud provider has been connected to Hyphen and the project has ready container registry and cloud workspace connections for each cloud the deployment targets. - A Hyphen API key is available with appropriate permissions for deployment. A Dockerfile will be used if present, and if not, Hyphen Code will generate one automatically. See [Builds](/docs/deploy/builds/) for more details. ## Setting up GitHub Secrets Add your Hyphen API key to your repository's secrets: 1. In your GitHub repository, go to **Settings** > **Secrets and variables** > **Actions**. 2. Click **New repository secret**. 3. Name: `HYPHEN_API_KEY`. 4. Value: Your Hyphen API key from the Hyphen App. 5. Click **Add secret**. ## Parameters Use `environment` to select an environment in the project linked in the checked-out `.hx` file. Without this input, the CLI selects that project's environment of type development, regardless of its name or the browser selection. - `environment` _(optional)_: Environment ID or alternate ID, such as `production` (maps to `--env`). Omit it to select the environment of type development. - `project` _(optional)_: Project ID or alternate ID (maps to `--project`). Used when `.hx` has no project selected; the project recorded in `.hx` takes precedence. - `organization` _(optional)_: Organization ID (maps to `--organization`). - `apps` _(optional)_: A comma-separated list of apps to deploy, each optionally specifying a build (e.g., `app1,app2:latest,app3:abld_xxx`). - `noBuild` _(optional)_: Skip the build step and use the latest build. Defaults to `false`. - `dockerfile` _(optional)_: Path to the Dockerfile (e.g., `./Dockerfile` or `./docker/Dockerfile.prod`). - `preview` _(optional)_: Preview name to deploy to (maps to `--preview`). - `prefix` _(optional)_: Host prefix for the preview deployment (maps to `--prefix`). Required when creating a preview; also identifies an existing preview when names repeat. - `path` _(optional)_: Path, if changed from the default, where the repository has been cloned. - `verbose` _(optional)_: Enable verbose logging. Defaults to `false`. For compatibility with existing workflows, `deploymentId` remains available and accepts a deployment ID or alternate ID. When supplied, it selects the deployment directly and the `project` and `environment` inputs do not select the target. Prefer the `environment` input with the project linked in `.hx` for new workflows. ## Outputs The action sets the following step outputs, available to subsequent steps as `steps..outputs.`: - `deployment-id`: The deployment ID that was run. - `run-id`: The deployment run ID. - `deployment-url`: URL to the deployment run in the Hyphen dashboard. - `status`: Final status of the deployment run (`succeeded | failed | canceled`). - `reason`: Failure reason when status is not `succeeded`. Empty on success. ## Example Usage ```yml action.yml - name: Checkout id: checkout uses: actions/checkout@v4 - name: setup hx CLI id: setup uses: Hyphen/setup-hx-action@v1 with: apiKey: ${{ secrets.HYPHEN_API_KEY }} - name: Deploy id: deploy uses: Hyphen/deploy-action@v1 with: environment: production - name: Report deployment URL run: echo "Deployed at ${{ steps.deploy.outputs.deployment-url }}" ``` ### Deploying on Push to Main and on Release This workflow deploys to development when a PR is merged to `main`, and to production when a release is created. ```yaml deploy.yml name: Deploy Application on: push: branches: - main release: types: [created] jobs: deploy-dev: name: Deploy to Development if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - name: Setup Hyphen CLI uses: Hyphen/setup-hx-action@v1 with: apiKey: ${{ secrets.HYPHEN_API_KEY }} - name: Deploy to Development id: deploy uses: Hyphen/deploy-action@v1 with: environment: development - name: Report deployment URL run: echo "Deployed at ${{ steps.deploy.outputs.deployment-url }}" deploy-prod: name: Deploy to Production if: github.event_name == 'release' runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - name: Setup Hyphen CLI uses: Hyphen/setup-hx-action@v1 with: apiKey: ${{ secrets.HYPHEN_API_KEY }} - name: Deploy to Production id: deploy uses: Hyphen/deploy-action@v1 with: environment: production - name: Report deployment URL run: echo "Deployed at ${{ steps.deploy.outputs.deployment-url }}" ``` ### Pulling ENV Secrets Before Deploying If your deployment depends on Hyphen ENV secrets, add the [ENV action](/docs/env-secrets-management/env-secrets/) before the deploy step: ```yml deploy.yml - name: Checkout uses: actions/checkout@v4 - name: Setup Hyphen CLI uses: Hyphen/setup-hx-action@v1 with: apiKey: ${{ secrets.HYPHEN_API_KEY }} - name: Pull ENV secrets uses: Hyphen/env-action@v1 with: hxKeyFile: ${{ secrets.HYPHEN_KEY_FILE }} environment: production outputs: files - name: Deploy uses: Hyphen/deploy-action@v1 with: environment: production ``` ## How It Works When the deploy action runs: 1. The Hyphen CLI builds your Docker image (Hyphen Code generates a Dockerfile automatically if none exists). 2. The image is pushed to every ready container registry on the project (not limited to the clouds on this deployment). 3. The application is deployed to your cloud providers according to the project environment deployment settings. Each cloud instance uses the artifact whose target matches that cloud. 4. Build, release, and verification steps are executed. 5. The action waits for the deployment run to finish and exposes the result to subsequent steps via outputs. For details on the build process, including Hyphen Code's Dockerfile auto-generation, see [Builds](/docs/deploy/builds/). ## Next Steps - [Configure a project environment deployment](/docs/deploy/deploy-quickstart/#configure-your-project-environment-deployment-settings) - [Understand the build process](/docs/deploy/builds/) including Dockerfile auto-generation - [Manage environment variables](/docs/deploy/environment-variables/) in your deployments - [Explore CLI commands](/docs/introduction/cli/) - [Set up environment variables and secrets](/docs/env-secrets-management/using-env-with-docker/) ### Environment Variables URL: https://hyphen.ai/docs/deploy/environment-variables/ Description: Learn about system-injected HYPHEN_ variables and user-defined ENV secrets in Hyphen Deploy, including how to access and manage them securely. Hyphen Deploy provides your application with environment variables at runtime. These include system-injected variables that provide deployment context and metadata, as well as user-defined secrets that you manage through Hyphen's ENV service. ## HYPHEN\_ System Variables Hyphen automatically injects environment variables prefixed with `HYPHEN_` into your application at runtime. These variables provide deployment metadata and context that your application can use for logging, monitoring, feature flagging, or environment-specific behavior. The following variables are automatically available to your application: | Variable | Description | Example Value | | --------------------------- | ------------------------------------------------------------------- | ----------------------------------------------------- | | `HYPHEN_API_KEY` | Hyphen API key for the deployment | `a2i...Q==` | | `HYPHEN_APP_CLOUD` | The cloud provider where your app is deployed | `googleCloud`, `aws`, `azure` | | `HYPHEN_APP_ENVIRONMENT` | The deployment environment name | `development`, `production` | | `HYPHEN_APP_ID` | Unique identifier for your application | `app_1a2b3c4d5e6f7g8h9i0j1k2l` | | `HYPHEN_APP_IMAGE` | Full container image reference used for this deployment | `us-docker.pkg.dev/my-project/my-repo/my-app:a1b2c3d` | | `HYPHEN_APP_IMAGE_LOCATION` | Cloud provider hosting the container registry | `googleCloud`, `aws`, `azure` | | `HYPHEN_APP_NAME` | Human-readable name of your application | `my-app` | | `HYPHEN_APP_REGION` | Geographic region where your app is deployed | `NorthAmerica-1`, `Europe-1` | | `HYPHEN_DEPLOYMENT_ID` | Unique identifier for the deployment policy | `dply_2b3c4d5e6f7g8h9i0j1k2l3m` | | `HYPHEN_DEV` | Flag indicating if running in development mode (only set when true) | `true` | | `HYPHEN_ORGANIZATION_ID` | Unique identifier for your organization | `org_3c4d5e6f7g8h9i0j1k2l3m4n` | | `HYPHEN_ORGANIZATION_NAME` | Name of your organization | `My Organization` | | `HYPHEN_PROJECT_ID` | Unique identifier for your project | `proj_4d5e6f7g8h9i0j1k2l3m4n5o` | | `HYPHEN_PROJECT_NAME` | Name of your project | `my-project` | | `HYPHEN_REVISION_DATE` | Timestamp when this revision was deployed (ISO 8601) | `2025-01-15T14:30:00.000Z` | | `HYPHEN_RUN_ID` | Unique identifier for this deployment run | `depr_5e6f7g8h9i0j1k2l3m4n5o6p` | These variables are managed by Hyphen. You cannot modify or override them. ## ENV Secrets In addition to the system-injected HYPHEN\_ variables, you can define your own environment variables and secrets using Hyphen's ENV service. These are the variables you manage with the `hx push` and `hx pull` commands. ENV Secrets are: - **User-defined**: You control which variables exist and their values - **Encrypted**: Stored securely with end-to-end encryption - **Environment-specific**: Different values for development, production, etc. - **Version-controlled**: Track changes and roll back if needed - **Automatically loaded**: Injected into your application at runtime alongside HYPHEN\_ variables Common use cases for ENV Secrets include: - API keys and tokens - Database connection strings - Third-party service credentials - Feature flags - Application configuration ### Managing ENV Secrets To work with ENV Secrets, use the Hyphen CLI: ```bash # Push local .env files to Hyphen hx push # Pull encrypted variables from Hyphen hx pull # Push a specific environment hx push --environment production ``` ENV Secrets are stored in `.env.[environment_name]` files locally (e.g., `.env.development`, `.env.production`) and synchronized with Hyphen's secure storage. For detailed information about managing ENV Secrets, see: - [ENV Secrets Management](../env-secrets-management/env-secrets-management) - [Using ENV with Docker](../env-secrets-management/using-env-with-docker) - [Rotating Encryption Keys](../env-secrets-management/rotating-an-encryption-key) ## Accessing Variables in Your Application All environment variables (both HYPHEN\_ system variables and your ENV Secrets) are available through your programming language's standard environment variable access mechanisms: **Node.js:** ```javascript const appId = process.env.HYPHEN_APP_ID; const apiKey = process.env.MY_API_KEY; ``` **Python:** ```python import os app_id = os.environ.get('HYPHEN_APP_ID') api_key = os.environ.get('MY_API_KEY') ``` **Go:** ```go import "os" appID := os.Getenv("HYPHEN_APP_ID") apiKey := os.Getenv("MY_API_KEY") ``` ## Variable Precedence > **Warning:** If you define an ENV Secret with the same name as a `HYPHEN_` system variable, your ENV Secret will override the system variable. This may cause unexpected issues with deployment metadata and application behavior. We recommend not creating ENV Secrets that start with `HYPHEN_`. ## Best Practices - **Use HYPHEN\_ system variables** for deployment context, logging, and monitoring - **Use ENV Secrets** for sensitive data like credentials and API keys - **Never commit secrets** to version control (add `.env.*` files to `.gitignore`) - **Use different values** for different environments (development, staging, production) - **Rotate credentials regularly** using Hyphen's key rotation features ## Next Steps - [Learn about ENV Secrets Management](../env-secrets-management/env-secrets-management) - [Understand the build process](builds) - [Set up GitHub Actions deployment](github-action) - [Explore deployment run methods](deployment-run-methods) ### Storage URL: https://hyphen.ai/docs/deploy/storage/ Description: Learn how Hyphen Deploy automatically provisions and manages cloud object storage across AWS S3, Google Cloud Storage, and Azure Blob Storage. Hyphen Deploy can automatically provision and connect cloud object storage to your application as part of the deployment pipeline. When Object Storage is configured for a deployment, Hyphen creates the necessary cloud resources and injects credentials into your application — no manual bucket creation or credential management required. Supported providers: - **AWS** — Amazon S3 - **Google Cloud** — Google Cloud Storage (GCS) - **Azure** — Azure Blob Storage ## Prerequisites - A connected cloud provider integration (AWS, GCP, or Azure). See [AWS](../integrations/aws-integration), [Google Cloud](../integrations/google-cloud-integration), or [Azure](../integrations/azure-integration-setup-guide). - A Cloud Workspace connection for the target project environment. ## Enabling Object Storage for a Deployment In the deployment settings for a project environment, toggle on **Enable Object Storage**. Once enabled, two additional fields appear: - **Object storage provider** — A dropdown pre-populated with the cloud integrations connected to your deployment. Select the provider where the bucket or container should live. - **Bucket name (optional)** — Enter an existing bucket name to connect to it, or enter a preferred name for the bucket Hyphen will create. If left blank, Hyphen generates a name automatically from the project and environment alternate IDs using the pattern `{projectAlternateId}-{envAlternateId}`. ## Provisioning When a deployment run starts, Hyphen automatically: 1. Verifies the Cloud Workspace connection is ready. 2. Creates or adopts the storage bucket or container in the target cloud. 3. Creates a dedicated access identity scoped to that bucket with least-privilege permissions. 4. Generates credentials and injects them into the application as an environment variable. ### AWS (S3) Resources created: - S3 bucket - IAM user (`hx-S3-{bucketName}`) with a scoped bucket policy - Access key ID and secret key ### Google Cloud (GCS) Resources created: - GCS bucket - Service account (named after the bucket) - Storage Admin IAM role binding on the bucket - Service account key (JSON) ### Azure (Blob Storage) Resources created: - Storage account (if one does not already exist) - Blob container - Service principal in Microsoft Entra ID (`objectStorage-{storageAccount}-{container}`) - RBAC role assignment on the container - Client secret ## Application Access Credentials are injected into your application as a single environment variable: | Variable | Description | | -------- | ----------- | | `HYPHEN_OBJECT_STORAGE_CONFIG` | Base64-encoded JSON containing provider-specific connection credentials | The decoded payload structure varies by provider: **AWS:** ```json { "provider": "aws", "region": "us-east-1", "bucketName": "my-project-production", "accessKeyId": "AKIA...", "accessKeySecret": "..." } ``` **Google Cloud:** ```json { "provider": "googleCloud", "bucketName": "my-project-production", "serviceAccountJson": "{...}" } ``` **Azure:** ```json { "provider": "azure", "tenantId": "...", "storageAccountName": "myprojectprod", "containerName": "my-project-production", "accessKeyId": "...", "accessKeySecret": "..." } ``` ### Parsing the config in your application **Node.js:** ```javascript const config = JSON.parse( Buffer.from(process.env.HYPHEN_OBJECT_STORAGE_CONFIG, 'base64').toString('utf8') ); // config.provider, config.bucketName, etc. ``` **Python:** ```python import os, base64, json config = json.loads(base64.b64decode(os.environ['HYPHEN_OBJECT_STORAGE_CONFIG']).decode('utf-8')) # config['provider'], config['bucketName'], etc. ``` **Go:** ```go import ( "encoding/base64" "encoding/json" "os" ) raw, _ := base64.StdEncoding.DecodeString(os.Getenv("HYPHEN_OBJECT_STORAGE_CONFIG")) var config map[string]interface{} json.Unmarshal(raw, &config) // config["provider"], config["bucketName"], etc. ``` ### Deployment Previews URL: https://hyphen.ai/docs/deploy/deployment-previews/ Description: Learn how to create and manage isolated deployment previews using the Hyphen CLI and web app for container and static applications. ## What you get - A unique preview URL that you can set that is ready to share with teammates and reviewers - Real infrastructure in your cloud, created from your project environment deployment settings - Runtime context variables for container apps, such as the app ID, environment, run ID, and cloud - When a preview is deleted, the Hyphen Agent handles cleanup of cloud resources based on applicable retention policy --- ## Core concepts ### Deployment run A deployment run is the execution of a project environment deployment for a specific revision. ### Project environments Projects group apps, environments, and secrets. Environments (like `development` and `production`) isolate config and secrets per lifecycle stage. ### Deployment settings Deployment settings define which apps get deployed, where they run, and how they scale. Each deployment belongs to one project environment. A preview uses that saved configuration with its own name and host prefix. --- ## Prerequisites 1. A cloud provider connected to your Hyphen organization 2. Ready connections for your app type: Container Registry and Cloud Workspace for containers, or Site Registry for static sites 3. [Your app initialized](/docs/deploy/deploy-quickstart#3-use-the-cli-to-initialize-your-app) with `hx init` 4. [Project environment deployment settings](/docs/deploy/deploy-quickstart#configure-your-project-environment-deployment-settings) are configured A local preview deployment does not require GitHub integration or committed code. Repository workflows need their code and configuration available in the checked-out repository. Container builds require Docker. Static builds require a directory of finished website files. Each selected provider needs a matching artifact. See [Builds](/docs/deploy/builds/) for the requirements. Complete the setup by following the [Hyphen Deploy Quickstart](/docs/deploy/deploy-quickstart/) ---
## Creating a Deployment Preview Hyphen supports multiple ways to trigger deployment runs. ### Option 1: Use the CLI Hyphen Deployment Previews let you create isolated environments for branches, pull requests, or temporary testing. Using the CLI, you can: - Create container or static builds with a preview name - Deploy that build to a preview environment - Reuse an existing build for future deployments #### Step 1: Build with a Preview Label Use the `--preview` flag when building to associate the build with a preview name. ```bash hx build --preview "" ``` Example ``` hx build --preview "PR 200" ``` For a container app, this command: - Builds your application - Uploads artifacts to every ready container registry on the project - Tags the build with the preview name For a static site, run your frontend build command first. Then upload the output directory with the preview name: ```bash hx build --preview "PR 200" --type static ./dist ``` Replace `./dist` with your frontend output directory. The CLI uploads it to every ready Site Registry on the project. > 📘 **Important ** > > 📘 This step does not create the preview environment yet. > > 📘 The preview name is stored with the build so it can be used later during deployment. > > 📘 Builds tagged with a preview can be deployed to your production deployment. #### Step 2: Create a Deployment Preview Give the preview a name and a **host prefix**. For container apps, Hyphen adds the prefix to the deployment's existing hostname. Static providers assign the preview URL. Cloudflare creates a separate Worker with the prefix in its name. ```bash hx deploy --env development --preview "PR 200" --prefix pr200 ``` Example preview url would be: `https://pr200-my-app.demo.com` For a static site, include the build type and finished website directory: ```bash hx deploy --env development --preview "PR 200" --prefix pr200 --type static ./dist ``` This example selects the environment with alternate ID `development` in the project linked in `.hx`. To use that project's environment of type development, omit `--env`. The command creates the preview if the name/prefix pair does not exist, builds and uploads the current local app, and starts the preview run. If you already built the app in step 1, add `--no-build` as shown below. Preview names may repeat with different host prefixes. Include `--prefix` when selecting an existing preview to identify the intended one. In the dashboard, select the preview and use **Copy CLI command** in the menu beside **Deploy Preview** to copy the preview name and host prefix, plus `--env` when the environment's type isn't development. The organization and project come from your app folder's `.hx` file — run the command from an app folder whose `.hx` file links to the project shown in the menu, and keep preview names quoted when they contain spaces or shell punctuation. #### Step 3: Reuse an Existing Build If a build already exists for the preview, you can skip building again using `--no-build`. ```bash hx deploy --env development --preview "PR 200" --prefix pr200 --no-build ``` This command also supports static builds. It does not need an output directory with `--no-build`. ### Option 2: In the Hyphen App To create deployment previews in the Hyphen app: 1. Navigate to **Deploy** → then choose the deployment you want to create a preview for. 2. Open the preview selector for the environment, then select **New Preview...** ![](https://files.readme.io/be3fc8b3cc55e70b3324893c29406140a499efe65a4dd0fe9c697a0819070f82-Screenshot_2026-03-05_at_2.06.12_PM.png) 3. Give your new preview a name and host prefix and select **Create** ![](https://files.readme.io/3dcdf1ef61995bcf7a2e73c4c2b6104953e386c1321d4a9b6a5fb078a3d2f503-Screenshot_2026-03-05_at_2.07.12_PM.png) 4. Your new preview is selected. To build local code for it, open the menu beside **Deploy Preview** → **Copy CLI command** and run it from the initialized app folder. 5. To deploy uploaded builds instead, select **Deploy Preview**. Complete any missing requirements shown in the setup dialog. When multiple builds are available, **Deploy previous build…** lets you choose a previous build. ### Kubernetes Overview URL: https://hyphen.ai/docs/kubernetes/overview/ Description: An overview of Hyphen Kubernetes management, covering cluster registration via Horizon, fleet health monitoring, inventory, observability, and optimization. Hyphen Kubernetes management connects registered clusters to your organization through Horizon, then gives you a central place to review fleet health, inspect inventory, connect observability, run Agent analysis, configure cleanup policies, and remove clusters. Horizon is the lightweight agent installed in your cluster. It registers the cluster with your Hyphen organization and reports inventory back to Hyphen so the inventory and cleanup features can work. Use the Kubernetes section when you want to: - Add a cluster to Hyphen with the Horizon install command. - Review fleet health across private, AWS, Google Cloud, and Azure environments. - View inventory snapshots and compare changes over time. - Connect New Relic, Datadog, SigNoz, or Google Cloud metrics and logs to a cluster. - Run Kubernetes optimizer analysis for a specific workload, or schedule it with a policy. - Configure Kubernetes cleanup policies for the organization or for a specific cluster. - Remove a cluster from Hyphen. ![Kubernetes cluster list showing private, AWS, Google Cloud, and Azure clusters](/kubernetes/clusters-list.png) ## Fleet Health The organization dashboard and Kubernetes cluster list summarize the latest inventory across your fleet: - Connected clusters and clusters currently considered healthy. - Ready pods compared with total pods. - Container issues and warnings. - Each cluster's cloud provider, latest inventory time, pod readiness, and health status. Hyphen marks a cluster as needing attention when its latest state or inventory contains issues, warnings, or pods that are not ready. A cluster without inventory shows **Inventory pending** until its first snapshot is available. Select a cluster to investigate the underlying inventory. For the other organization cards, see [Dashboard Overview](/docs/introduction/dashboard). ## Cluster Providers Hyphen identifies the cloud provider for each registered cluster when that information is available. Provider badges appear on the cluster detail page, including Private, Amazon Web Services, Google Cloud, and Microsoft Azure clusters. ![Kubernetes cluster provider badges](/kubernetes/provider-badges.png) ## Observability Connect New Relic, Datadog, SigNoz, or Google Cloud telemetry from a cluster's **Settings** tab. Hyphen Agent can combine those runtime metrics and logs with inventory when it analyzes a Kubernetes workload. See [Kubernetes Observability](/docs/kubernetes/observability) for setup instructions and required provider access. ## Guides - [Add a Kubernetes Cluster](/docs/kubernetes/add-cluster) - [Inventory Snapshots](/docs/kubernetes/inventory-snapshots) - [Observability](/docs/kubernetes/observability) - [Kubernetes Optimizer](/docs/agent/kubernetes-optimizer) - [Optimizer Policies](/docs/kubernetes/optimizer-policies) - [Kubernetes Resource Cleanup](/docs/agent/kubernetes-resource-cleanup) - [Cleanup Policies](/docs/kubernetes/cleanup-policies) - [Remove a Cluster](/docs/kubernetes/remove-cluster) For how Agent scans clusters for stale resources, presents cleanup candidates, and handles approvals, see [Kubernetes Resource Cleanup](/docs/agent/kubernetes-resource-cleanup) in the Agent section. ## Requirements Kubernetes management requires: - A Hyphen organization with Kubernetes access enabled. - Permission to manage organization Kubernetes clusters. - Access to run `kubectl` against the cluster you want to register. - Network access from the Horizon pod to Hyphen. Inventory and cleanup features require the Horizon pod to be installed and connected. Until the cluster reports inventory, Hyphen can show the cluster record but cannot render the inventory graph or calculate inventory-based fleet health. Observability connections are optional and require a supported provider integration. ### Add a Kubernetes Cluster URL: https://hyphen.ai/docs/kubernetes/add-cluster/ Description: Learn how to connect and register a Kubernetes cluster to your Hyphen organization using the Horizon agent. Add a Kubernetes cluster by installing the Horizon pod in the cluster. Horizon registers the cluster with your Hyphen organization and reports inventory back to Hyphen. ## Start Registration From your organization: 1. Open **Kubernetes**. 2. Click **Add Kubernetes Cluster**. 3. Enter an optional cluster name. 4. Click **Next**. If you leave the cluster name blank, Horizon sends a generated name when the cluster connects. ![Add Kubernetes cluster modal](/kubernetes/add-cluster-modal.png) ## Install Horizon Hyphen creates an API key for Horizon and generates a `kubectl` command. Copy and run the command against the cluster you want to add. ![Kubernetes install command](/kubernetes/install-command.png) The command creates a bootstrap secret in the `hyphen-horizon` namespace and applies the Horizon manifest. After Horizon starts and connects, the cluster appears in the Kubernetes list. ## Things to Know - The generated command includes a one-time visible API key secret. Treat the command as sensitive. - Run the command against the Kubernetes context for the cluster you want Hyphen to manage. You need sufficient permissions, such as cluster-admin, to create namespaces, secrets, and deployments. - A cluster may take a few minutes to appear after Horizon is installed. - Inventory appears after the cluster reports its first snapshot. ### Inventory Snapshots URL: https://hyphen.ai/docs/kubernetes/inventory-snapshots/ Description: Learn how to use Hyphen inventory snapshots to view cluster topology, inspect Kubernetes resources, monitor health, and compare changes over time. Inventory snapshots show the Kubernetes resources Hyphen can see in a registered cluster. Use snapshots to inspect cluster nodes, namespaces, workloads, pods, services, ingresses, config maps, warnings, and how the cluster changes over time. ## Start the First Snapshot Open **Kubernetes**, select a cluster, and stay on the **Inventory** tab. If the cluster has not reported inventory yet, click **Start Inventory Snapshot**. ![Start the first Kubernetes inventory snapshot](/kubernetes/inventory-empty.png) Hyphen starts a snapshot workflow and shows progress while the cluster refreshes inventory. When the workflow completes, the inventory graph appears. ## View Inventory The inventory graph places cluster nodes in a top band, groups namespaced resources, and connects related workloads, ReplicaSets, pods, services, ingresses, and config maps. ![Kubernetes inventory graph](/kubernetes/inventory-graph.png) Use the graph controls to: - Choose the selected inventory snapshot. - Move to the previous or next loaded snapshot. - Load more historical snapshots when available. - Click **Refresh Inventory** to create a new snapshot. - Toggle **All Namespaces** to include namespaces hidden by the default view. - Filter resources by labels. - Click a resource node to inspect its details. ## Review Cluster Health The Kubernetes list and organization dashboard summarize the latest inventory across registered clusters. Fleet metrics include connected and healthy clusters, ready and total pods, container issues, and warnings. Within a cluster, summary rails help focus the graph: - **Nodes** centers the cluster node band. - **Workloads** groups workloads by app and namespace. - **Pods** summarizes ready and not-ready pods and calls attention to pods that need investigation. - **Exposure** and **Events** summarize reachable resources and recorded warning events. A pod keeps its warning event history even after it recovers, so past issues stay visible alongside current ones. Cluster health uses the latest cluster state and inventory. Issues take priority over warnings. A cluster with warnings or not-ready pods needs attention, while a cluster without a snapshot remains unknown and shows **Inventory pending**. ## Inspect a Resource Select a node in the graph to open its resource details. Depending on the resource, the panel can show: - Ownership hierarchy, including Deployment, ReplicaSet, and Pod relationships. - Status, readiness, creation time, labels, metadata, and related resources. - Recorded warning event history and container startup issues, including events from before a pod recovered. - A collapsible raw manifest view. The selected resource is stored in the page URL. You can copy the link to share the same resource view, and use browser back and forward navigation to move through previously selected resources. Agent references can also link directly to supported Kubernetes objects. Use **Zoom to node** in the details panel to re-center the graph on the selected resource without losing your selection. ## Compare Snapshots Turn on **Diff with Previous** to compare the selected inventory snapshot with the immediately older snapshot. Added resources and removed resources are highlighted in the graph. ![Kubernetes inventory diff with previous snapshot](/kubernetes/inventory-diff.png) If there is no earlier snapshot, or if the previous snapshot is still loading, Hyphen explains why the diff is not available. ## Things to Know - Inventory snapshots are read-only. - Refreshing inventory starts a new workflow for the selected cluster. - The latest snapshot is selected by default unless you open a link to a specific snapshot. - Historical snapshot navigation depends on the snapshots already loaded in the selector. - Inventory may omit resources when collection limits are reached. Agent reports truncated inventory as a capability gap when it affects analysis. ### Observability URL: https://hyphen.ai/docs/kubernetes/observability/ Description: Learn how to connect Kubernetes telemetry to Hyphen using New Relic, Datadog, SigNoz, and Google Cloud to power runtime workload optimization. Connect Kubernetes telemetry to a registered cluster so Hyphen Agent can use runtime metrics and logs alongside inventory. Kubernetes observability supports New Relic, Datadog, SigNoz, and Google Cloud. Observability is optional for inventory and cleanup. It gives [Kubernetes Optimizer](/docs/agent/kubernetes-optimizer) more evidence about workload utilization, restarts, and runtime behavior. ## Before You Start You need: - A [registered Kubernetes cluster](/docs/kubernetes/add-cluster) with Horizon connected. - A New Relic, Datadog, SigNoz, or Google Cloud organization integration in Hyphen. - Permission to manage organization integrations and cluster settings. - Kubernetes telemetry available in the selected provider. ## Connect an Observability Source 1. Open **Kubernetes** and select the cluster. 2. Open **Settings**. 3. In **Observability**, click **Setup connection**. 4. Select one observability integration. 5. Enter the provider-specific cluster identifier. 6. Click **Connect**. ![Connect a Kubernetes cluster to an observability integration](/changelog/kubernetes-observability-connection-setup.png) Hyphen validates the identifier and shows the connection while it is being prepared. A ready connection can supply metrics and logs to supported Agent runs. ### New Relic Enter the cluster name configured when the New Relic Kubernetes integration was installed. Hyphen verifies that the connected New Relic account contains a Kubernetes cluster sample with that name. If Horizon detects one New Relic cluster name and the organization has exactly one New Relic integration, Hyphen can create the connection automatically. A newly installed New Relic agent may take time to send its first cluster sample; Hyphen retries retryable connection failures while telemetry becomes available. See [New Relic](/docs/integrations/new-relic#kubernetes-observability) for integration requirements. ### Datadog Enter the exact lowercase `kube_cluster_name` tag value emitted by Datadog for the cluster. Hyphen requires Kubernetes State Core node-count samples with that tag from the last 24 hours to validate the connection. When observability discovery is enabled, Hyphen can create the connection automatically if Horizon detects one Datadog cluster name and the organization has exactly one Datadog integration. Otherwise, connect it from the cluster's **Settings** tab. See [Datadog](/docs/integrations/datadog#kubernetes-observability) for access-token permissions, telemetry tags, and metric requirements. ### SigNoz Enter the exact `k8s.cluster.name` resource attribute emitted by your OpenTelemetry collectors. Connect SigNoz from the cluster's **Settings** tab. Hyphen checks that the SigNoz query API accepts a log query scoped to that name. The connection can become ready with no matching logs, so verify that metrics and logs carry the cluster, namespace, and pod attributes used by the connection. See [SigNoz](/docs/integrations/signoz#kubernetes-observability) for API-key, endpoint, and collector requirements. ### Google Cloud Enter the full GKE cluster resource name: ```text projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_NAME ``` The Hyphen service account needs these roles for the selected cluster and its telemetry: - Logs Viewer (`roles/logging.viewer`) - Monitoring Viewer (`roles/monitoring.viewer`) - Kubernetes Engine Cluster Viewer (`roles/container.clusterViewer`) Hyphen can discover the resource name automatically when Horizon detects Google Cloud observability, the organization has exactly one Google Cloud integration, and Cloud Asset Inventory can resolve the cluster. See [Google Cloud](/docs/integrations/google-cloud-integration#kubernetes-observability) for integration requirements. ## Connection States and Errors - **Pending** - Hyphen is validating the provider and cluster identifier. - **Ready** - Metrics and logs are available to supported Agent analysis. - **Error** - Hyphen could not validate the cluster or query the provider. Open the connection to review the error and retry when available. A missing New Relic cluster sample may be temporary while telemetry is first ingested. A Google Cloud not-found error can mean the resource name is incorrect or the Hyphen service account is missing the required viewer roles. A Datadog not-found error means no matching Kubernetes State Core node-count samples were found in the last 24 hours. Check the cluster tag and telemetry, then retry. A ready SigNoz connection with empty results can mean telemetry has not arrived or its resource attributes do not match. ## Remove a Connection Open the cluster's **Settings** tab, find the provider under **Observability**, and remove its connection. Removing the connection does not uninstall an observability agent or delete provider telemetry. Agent continues to use Kubernetes inventory, but no longer queries that provider for the cluster. ## Things to Know - Metrics and logs are supporting evidence; missing or partial telemetry does not prevent inventory from working. - Hyphen limits telemetry queries by time, workload, and pod context. Provider query errors are reported as capability gaps instead of being treated as healthy evidence. - Connect the provider account that receives telemetry for the registered cluster. - Hyphen does not request Kubernetes Secret contents for optimizer analysis. ### Cleanup Policies URL: https://hyphen.ai/docs/kubernetes/cleanup-policies/ Description: Configure organization and cluster-level Kubernetes cleanup policies to scan and manage stale resources using Hyphen Agent. Kubernetes cleanup policies control how Hyphen Agent scans registered clusters for stale Kubernetes resources. The policy decides whether scheduled cleanup scans run, how often they run, what age threshold Agent uses, and which namespaces or resource UIDs Agent should ignore. For the run behavior, candidate categories, and approval options, see [Kubernetes Resource Cleanup in the Agent section](/docs/agent/kubernetes-resource-cleanup). ## Organization Policy The organization policy is the default Kubernetes cleanup policy for registered clusters. To manage it: 1. Open **Organization Settings**. 2. Go to **Policies**. 3. Find **Kubernetes cleanup**. 4. Use the switch to enable or disable scheduled Kubernetes cleanup. 5. Click **Settings** to edit schedule, threshold, ignored namespaces, and ignored UIDs. ![Organization Kubernetes cleanup policy settings](/kubernetes/org-cleanup-policy.png) The organization policy can configure: - **Enable Kubernetes cleanup** - turns Kubernetes cleanup task creation on or off. When disabled, Hyphen does not create scheduled cleanup scans and manual Agent cleanup requests are blocked for that policy scope. - **Schedule** - controls how often Agent runs cleanup scans. The default is a daily recurring schedule. Choose manual-only mode to disable scheduled scans while still allowing one-off manual requests. Available options are: - Manual only - Every hour - Every 6 hours - Every 12 hours - Every day - Every week - Every month - Every quarter - **Cleanup Threshold** - sets the number of stale days used when deciding whether a resource should be flagged. - **Ignored namespaces** - namespaces Agent should skip. - **Ignored UIDs** - individual Kubernetes resource UIDs Agent should skip. ## Cluster Overrides Each Kubernetes cluster can inherit the organization policy or define its own override. To manage a cluster override: 1. Open **Kubernetes**. 2. Select a cluster. 3. Open the **Settings** tab. 4. In **Policies**, find **Cleanup Policy**. 5. Turn on **Override organization policy**. 6. Edit the schedule, cleanup threshold, ignored namespaces, and ignored UIDs for that cluster. 7. Click **Save override**. ![Cluster Kubernetes cleanup policy override](/kubernetes/cluster-cleanup-policy.png) Cluster overrides apply only to the selected cluster. Removing the override returns the cluster to the organization policy. ## Policy Precedence Hyphen resolves Kubernetes cleanup policy in this order: 1. Use the cluster override when one exists. 2. Otherwise, use the organization policy. This lets most clusters share the organization default while individual clusters use stricter or looser rules when needed. ## Things to Know - Policies affect scheduled Kubernetes cleanup scans and whether manual Agent cleanup requests are allowed. Use manual-only mode, not disabled cleanup, when you want one-off cleanup scans without recurring schedules. - Ignored namespaces and ignored UIDs prevent matching resources from being flagged as cleanup candidates. - Cleanup scans are read-only until a cleanup candidate is explicitly approved in the Agent run. - Cleanup decisions include **Clean up**, **Do nothing**, **Always ignore**, and **Ignore namespace always** when the candidate is namespaced. ### Optimizer Policies URL: https://hyphen.ai/docs/kubernetes/optimizer-policies/ Description: Learn how to configure and manage recurring Kubernetes workload optimizer policies for Deployments and StatefulSets in Hyphen Agent. Kubernetes workload optimizer policies control which Deployments and StatefulSets Hyphen Agent optimizes on a recurring schedule. Policies are configured per workload, from the cluster's **Settings** tab. For what an optimizer run does and how recommendations are approved, see [Kubernetes Optimizer in the Agent section](/docs/agent/kubernetes-optimizer). ## Configure a Workload To add a policy for a workload: 1. Open **Kubernetes**. 2. Select a cluster. 3. Open the **Settings** tab. 4. In **Policies**, find **Workload Optimization**. 5. Click **Configure workload**. 6. Choose the workload, set whether optimization is enabled, and choose a schedule. 7. Click **Save**. ![Configure workload optimization modal with a workload picker, enable switch, and schedule dropdown](/kubernetes/optimizer-policies-configure.png) Only Deployments and StatefulSets from the cluster's latest inventory can be selected. A workload that already has a policy does not appear again in the picker — each workload can have at most one policy. Available schedules are: - Manual only - Every hour - Every 6 hours - Every 12 hours - Every day - Every week - Every month - Every quarter ## Managing Existing Policies Each configured workload appears as a row showing the workload's kind and namespace, its schedule, an enable/disable switch, and a remove action. - Use the schedule control to change how often Agent runs the Kubernetes optimizer for that workload. - Turn the switch off to pause scheduled runs for a workload without deleting its policy. The schedule control is hidden while a policy is disabled. - Click the remove action to delete the policy entirely. The workload becomes available again in the **Configure workload** picker. ![Cluster Settings page showing the Workload Optimization card with three policies: two enabled on different schedules and one disabled](/kubernetes/optimizer-policies.png) If a workload configured with a policy no longer appears in the cluster's latest inventory, its row is marked **Unavailable in latest inventory**. ## Manual Runs Are Always Available Workload optimizer policies only control scheduled runs. Whether or not a workload has a policy, you can still ask Hyphen Agent to run the optimizer for it from chat, or start a run on demand from the **Optimize now** action on the workload's details panel in the cluster diagram. ## Things to Know - Policies are scoped to a single Deployment or StatefulSet in one cluster. - Managing policies requires permission to manage Agent task policies for the cluster. - Disabling or removing a policy does not cancel a run that is already in progress. - Scheduled runs use the same approval and guardrail behavior as manual optimizer runs. ### Remove a Cluster URL: https://hyphen.ai/docs/kubernetes/remove-cluster/ Description: Learn how to safely remove a Kubernetes cluster from Hyphen management and handle any required cleanup. Remove a cluster when Hyphen should stop managing it. Removal starts a workflow that removes Hyphen management for the cluster. ## Remove From Hyphen To remove a cluster: 1. Open **Kubernetes**. 2. Select the cluster. 3. Open the **Settings** tab. 4. Find **Remove Cluster**. 5. Click **Remove**. 6. Type the cluster name to confirm. 7. Click **Remove** in the confirmation modal. ![Remove Kubernetes cluster confirmation](/kubernetes/remove-cluster.png) After removal starts, Hyphen returns you to the Kubernetes cluster list. ## Cleanup Needed If Horizon is still connected, the cluster can enter a **Cleanup needed** state. In that case, remove Horizon from the cluster, for example by running `kubectl delete namespace hyphen-horizon`, or wait for it to disconnect, then remove the cluster again from Hyphen. ## Things to Know - Removing a cluster stops Hyphen from managing that cluster. - Removal does not delete your application workloads. - You need permission to manage Kubernetes clusters in the organization. - If you remove the wrong cluster, reinstall Horizon to register it again. ### ENV Quick Start URL: https://hyphen.ai/docs/env-secrets-management/env-secrets-management/ Description: Get started with Hyphen ENV, an end-to-end encrypted secrets management service. Learn to install the CLI, authenticate, initialize projects, and push encrypted secrets. ENV is Hyphen’s built-in secrets management service, designed with end-to-end encryption to ensure the highest level of security for your sensitive data. Hyphen never has access to your secret values or your encryption key at any point, ensuring that only you and your team can view or manage your secrets. Your data is always stored fully encrypted, and Hyphen never sees or generates the encryption keys. These keys are created locally on your machine as 256-character long random strings. The encryption keys are used in conjunction with OpenSSL’s AES-256-CBC symmetric encryption cipher to keep your data fully encrypted at all times. ## Prerequisites Before getting started with ENV service, ensure you have: - Signed up for a Hyphen account and have access to an organization ## Install the CLI To get started, download and install the Hyphen CLI using the following command: macOS/Linux ```Text bash sh -c "$(curl -fsSL https://cdn.hyphen.ai/install/install.sh)" ``` Windows ```Text powershell powershell -c "irm https://cdn.hyphen.ai/install/install.ps1 | iex" ``` ## Sign in to your Hyphen Account After installation, sign in to your Hyphen account by running: ```Text bash hx auth ``` This will open a browser window to log in. If the window doesn’t open, copy and paste the URL from the terminal into your browser. ## Initialize your project To start using Hyphen ENV with your app, you need to initialize the app and set up encryption keys. This step creates a record of the app within your Hyphen organization and stores the secret encryption key on your machine in a `.hxkey` file. Navigate to your app’s directory and run: ```Text bash hx init ``` You will receive a confirmation message indicating that the app has been successfully initialized, similar to the following: ```Text bash App successfully initialized App Name: quick-start-app App AlternateId: quick-start-app App ID: app_6709694e54fc37367966d0ce Organization ID: org_66f30abb67ebc6bb0c5e0af7 ``` ## Manage Your .env Files Once initialized, Hyphen will create several .env files in your app’s directory. Use these files to store environment-specific secrets: ## Encrypt and Push Secrets to Hyphen Once you’ve added your secrets to the appropriate .env files, you need to encrypt them and push them to Hyphen. Run the following command: ```Text bash hx push ``` You will receive confirmation for each environment that’s been pushed. If you’ve updated the default, development, and production environments, the response will look like: ```Text bash Local environments: default, development, production Environments pushed: default, development, production ``` **Note**: .env.local is never pushed to Hyphen. ## Backup Your .hxkey file The `.hxkey` file is only stored locally and will be required for other team members or for other machines to pull the latest secrets. Make sure to save this in a secure place. ### Pulling Secrets URL: https://hyphen.ai/docs/env-secrets-management/pulling-secrets-for-an-existing-app/ Description: Learn how to retrieve and decrypt secrets for your application using the Hyphen CLI hx pull command. ## Prerequisites Before pulling down secrets, ensure you have: * You have installed the Hyphen CLI (see installation guide). * Signed in to your Hyphen account via the CLI with the `hx auth` command * You have access to an existing project that contains the app secrets in your Hyphen organization ## Navigate to your App's Directory First, navigate to the directory where your app’s source code is located: ```Text bash cd path/to/your/app ``` This is where the secrets will be synced and stored. ## Obtain the encryption key The encryption key is stored in a .hxkey file, but Hyphen never has access to this key, and is why we never see your secrets. Once you obtained the encryption key via a secure channel, place in the app's root directory. ## Fetch Secrets for the App ```Text bash hx pull ``` The pull command retrieves environment variables from Hyphen and decrypts them into local .env files. You can also pull a specific environment by name: ```Text bash hx pull production ``` ## Verify the Pulled Secrets Once the command has completed, the secrets will be available in the corresponding .env files in your app’s directory. The following files may be updated based on your environment. You can open and inspect these files to verify that the secrets have been pulled correctly. If you edit an of the `.env` files, the next time you push, a new version for that environment(s) will be added to the version history. ### Version Control URL: https://hyphen.ai/docs/env-secrets-management/version-control/ Description: Learn how version control works in Hyphen, including how to view revisions via the app or CLI, and how to restore previous secret versions safely. ## How Version Control Works Every time you update and push your `.env` files using Hyphen, a new revision is created. These revisions are securely stored and can be reverted to at any time, allowing for full traceability of secret changes. **Note**: Due to Hyphen’s End-to-End Encryption (E2EE), we cannot display the exact differences between two revisions. However, we can show the number of secrets and file size of each version to help you gauge whether information was added or removed. ## Viewing revisions in the Hyphen app To view the history of your secrets and their respective revisions, navigate to the app and select the environment (i.e. default, development, production). This will open a view that lists the versions history. ![ENV version history example for the development environment for an app named "demo-app" ](https://files.readme.io/3a5bb704c21324eaf278b38b5c5c8966dee1dfeef38b942168a19fdcc81af620-Screenshot_2024-10-14_at_11.14.00_AM.png) The file size and secrets count give you an indication of whether secrets were added or removed in that revision, even though the contents are not displayed due to encryption. ## Viewing revisions in the Hyphen CLI To view the history of your secrets and their respective revisions using the cli, use the following command: ```shell bash hx env list-versions ``` Replace `` with the specific environment ID you wish to inspect. This command will return a list of past versions for that environment, displaying key details like version number, secret count, file size, and publish date. Example output: ```shell hx env list-versions development ID: development Version: 2 Secrets Count: 3 Size: 31 bytes Published: 08/15/2025 8:50:05 PM ID: development Version: 1 Secrets Count: 0 Size: 22 bytes Published: 08/11/2025 7:35:40 PM ... ``` ## Restore a previous version's secret data Hyphen uses immutable versioning, meaning you cannot directly roll back to a previous version. However, you can pull the encrypted data from a past version and push it as a new version. To do this: ### Retrieve the secret data from the desired version Use the following command to pull down the secrets from a specific version: ```shell hx pull ``` Replace `` with the environment you are working with and `` with the ID of the version you want to restore. ### Push the fetched data as a new version Once the previous version’s data is fetched, you can push it as a new version using the command: ```shell hx push ``` This will encrypt and push the retrieved secrets as the latest version in Hyphen. Example: ```shell # Fetch the secrets from version 12 for the development environment hx pull development 12 # Push it as a new version hx push ``` This process allows you to effectively revert without altering the integrity of your version history. ### Access Log URL: https://hyphen.ai/docs/env-secrets-management/access-log/ Description: Learn how to view and use the ENV Access Log in Hyphen to audit and trace secret management actions across environments. The ENV Access Log helps users trace and audit actions related to secret management within an application. It shows who performed the action with their IP address, the version of the secrets, and the app and environment affected. This provides transparency and traceability of secret changes across default, development, production, or other environments. ## View an Environment's ENV Access Log in Hyphen App 1. Select the ENV link in the main navigation. This brings you to the ENV dashboard, which lists all apps where secrets have been pushed to Hyphen. 2. Click on any of the environments within an app to open that environment's access log. example ENV access log example ENV access log ### Using ENV with Docker URL: https://hyphen.ai/docs/env-secrets-management/using-env-with-docker/ Description: Learn how to manage and inject secrets and environment variables into Docker containers using Hyphen ENV. When building a docker image to run/deploy your application you have two options for loading secrets. ## Prerequisites Before getting started with ENV service, ensure you have: * Signed up for a Hyphen account and have access to an organization * Have the hx command line installed and authenticated ### Sample Docker configuration Here’s a basic configuration for your Docker environment. ```dockerfile FROM node:20-alpine3.16 as base ######################################### FROM base as builder WORKDIR /app COPY package.json package-lock.json ./ RUN npm ci COPY . ./ RUN npm run build ######################################### FROM base as server WORKDIR /app COPY --chown=node:node --from=builder /node_modules ./node_modules COPY --chown=node:node --from=builder /dist ./dist ENV PORT 3000 EXPOSE 3000 USER node CMD ["npm", "run", "start-prod"] ``` ```Text .dockerignore node_modules/ .hxkey ``` ## Option 1: Using hyphen-entrypoint.sh ### Pros * Secrets rotation only requires a container restart * Treats secrets like secrets and makes them available only at runtime. * One-time setup works consistently across environments and CI/CD and doesn't require changes when new secrets are added ### Cons * Differs from how the application is developed When you run `hx init`, a `hyphen-entrypoint.sh` script is automatically created in your project directory. This script is designed specifically for Docker deployments and handles: 1. Downloading the Hyphen CLI if not already present 2. Authenticating with your Hyphen API key 3. Pulling environment variables for the specified environment 4. Running your application with those variables loaded > **Note:** If the `hyphen-entrypoint.sh` is missing (e.g. because you ran `init` with an older version of hx) or needs to be updated, you can re-create it with `hx entrypoint` (and use `--force` if needed to overwrite it). ### Required Environment Variables The entrypoint script requires five environment variables to be set in your container: * `HYPHEN_API_KEY`: Your Hyphen API key for authentication * `HYPHEN_APP_ENVIRONMENT`: The environment to pull variables from (e.g., "development", "production", "default") * `HYPHEN_APP_ID`: Your application ID (e.g., "app_68f65adbb2aca958a8ff6ea9") * `HYPHEN_PROJECT_ID`: Your project ID (e.g., "proj_68ee9033968a1e3b98be5501") * `HYPHEN_ORGANIZATION_ID`: Your organization ID (e.g., "org_681bd71a0cd803794aebd33a") ### Sample Dockerfile with Entrypoint ```dockerfile FROM node:20-alpine3.16 AS base ######################################### FROM base AS builder WORKDIR /app COPY package.json package-lock.json ./ RUN npm ci COPY . ./ RUN npm run build ######################################### FROM base AS server WORKDIR /app COPY --chown=node:node --from=builder /app/package.json ./package.json COPY --chown=node:node --from=builder /app/dist ./dist COPY --chown=node:node --from=builder /app/hyphen-entrypoint.sh ./hyphen-entrypoint.sh RUN chown -R node:node /app RUN chmod +x ./hyphen-entrypoint.sh ENV PORT=3000 EXPOSE 3000 USER node ENTRYPOINT ["./hyphen-entrypoint.sh"] CMD ["npm", "run", "start-prod"] ``` ### Build and Run ```shell Build Command docker build . -t my-org/my-app ``` ```shell Run Command with Hyphen Environment Variables docker run -t my-org/my-app \ -e HYPHEN_API_KEY=$HYPHEN_API_KEY \ -e HYPHEN_APP_ENVIRONMENT=production \ -e HYPHEN_APP_ID=app_YOUR_APP_ID \ -e HYPHEN_PROJECT_ID=proj_YOUR_PROJECT_ID \ -e HYPHEN_ORGANIZATION_ID=org_YOUR_ORG_ID ``` You can find these IDs in your `.hx` file after running `hx init`, or in the Hyphen dashboard. The entrypoint script will automatically handle downloading the CLI, authenticating, pulling secrets, and starting your application with the correct environment variables loaded. ## Option 2: Including .env files ### Pros * Quickest way to get started * Mirrors how the application is developed ### Cons * Requires creating a new docker image to rotate secrets If you choose to include your .env files in the container, you will need to: 1. Pull the secrets 2. Copy them into your container 3. Use an open-source library to read them into your application. More information on .env files and the many open-source libraries can be found at [https://www.dotenv.org/](https://www.dotenv.org/)
```shell Pull Command > hx pull default && hx pull production ``` It's best practice to only pull secrets for the specific environment you're running in, which is why we didn't just run `hx pull`. ```shell Build Command docker build . -t my-org/my-app ``` Given that the `DOCKERFILE` copies the contents of the directory into the image, this will copy over the .env files, making them available to your application. ## Option 3: Exporting Secrets ### Pros * Secrets rotation only requires a container restart * Treats secrets like secrets and makes them available only at runtime. ### Cons * Differs from how the application is developed * Requires more setup Running the `hx env run` command will export all secrets as environment variables, which you can reference as needed. In this example, we pass them to the docker run command, though you could also mount them during the build. This is often how secrets are passed to cloud providers (e.g., Google Cloud Run). ```shell Build Command docker build . -t my-org/my-app ``` ```shell Run Command with Secrets # Single environment variable hx env run production -- sh -c 'docker run -t my-org/my-app -e MY_SECRET=$MY_SECRET' # Multiple environment variables hx env run production -- sh -c 'docker run -t my-org/my-app \ -e MY_SECRET=$MY_SECRET \ -e API_KEY=$API_KEY \ -e DB_PASSWORD=$DB_PASSWORD' ``` ### Deploying with ENV URL: https://hyphen.ai/docs/env-secrets-management/deploying-with-env/ Description: Learn how to use Hyphen ENV with GitHub Actions to deploy applications and manage secrets on Google Cloud Run. The following guide shows you how to use our [GitHub Actions](/docs/env-secrets-management/env-secrets) to deploy your application with secrets from ENV. ENV is designed to be incredible flexible and this is just one example of how to deploy with secrets from ENV to Google Cloud. ## Setting GitHub Secrets There are a few GitHub Secrets that you will need to set to be able to bootstrap and use env. The names of these secrets do not matter as you pass them to the various steps yourself. * `HYPHEN_API_KEY`: A Hyphen API key with access to the project, app, and environment you’re deploying. * `HYPHEN_KEY_FILE`: The contents of the `.hxkey` file. This file contains your encryption key and should **never** be checked into your repository, hence the need to include it as a secret. * `DEV_GCP_SA_KEY`: JSON credentials for deploying to GCP. Since your application won’t need this directly, we recommend not storing it in ENV. The same principle applies for other cloud providers. ## Writing the Workflow The following example workflow demonstrates a typical deployment process: 1. Clones your repository 2. Setups up Node v20 3. Installs and authenticates the hx CLI 4. Pulls the production ENV 5. Runs a build process 6. Set up and authenticate Google Cloud SDK 7. Authenticated docker with Google Cloud 8. Build a docker image using the build output 9. Push the Docker image to Google Artifact Registry 10. Deploys the image to Google Cloud Run using ENV Secrets ```yaml deploy.yml name: Deploy to Development on: workflow_dispatch: push: branches: [main] env: PROJECT_ID: my-development-environment SERVICE_NAME: my-app jobs: setup-build-deploy: name: Deploy to Dev runs-on: ubuntu-latest steps: - name: Checkout id: checkout uses: actions/checkout@v4 - name: Use Node.js 20 uses: actions/setup-node@v4 with: node-version: 20 - name: setup hx CLI id: setup uses: Hyphen/setup-hx-action@v1 with: apiKey: ${{ secrets.HYPHEN_API_KEY }} - name: Pull ENV id: pull-env uses: Hyphen/env-action@v1 with: hxKeyFile: ${{ secrets.HYPHEN_KEY_FILE }} environment: production outputs: variables - name: Run Build run: npm run build:ts - name: Authenticate with Google Cloud uses: google-github-actions/auth@v2 with: credentials_json: ${{ secrets.DEV_GCP_SA_KEY }} - name: Set up Cloud SDK uses: google-github-actions/setup-gcloud@v2 - name: Docker Auth run: gcloud auth configure-docker - name: Build Docker Image run: docker build -t gcr.io/$PROJECT_ID/$SERVICE_NAME:$GITHUB_SHA . - name: Docker Push to Google Cloud run: docker push gcr.io/$PROJECT_ID/$SERVICE_NAME:$GITHUB_SHA - name: Deploy to [us-central1] run: |- gcloud run deploy $SERVICE_NAME \ --image=gcr.io/$PROJECT_ID/$SERVICE_NAME:$GITHUB_SHA \ --cpu=1 \ --memory=2Gi \ --no-cpu-throttling \ --min-instances=1 \ --timeout=300 \ --platform=managed \ --region=us-central1 \ --allow-unauthenticated \ --set-env-vars=ONE_SECRET=$ONE_SECRET \ --set-env-vars=TWO_SECRET=$TWO_SECRET ``` ## Automatically add all secrets In the above example we are explicitly sending environment variables, exported by the env-action, to the google CLI. This is tedious and is prone to errors, forgetting to add it in the deploy script, misspelling, etc. This can easily be scripted through; We are going to add a script that iterates through all the environment variables and transforms them into the format the google CLI is looking for. If you are not using Google this script can easily be updated to transform them into the format AWS or Azure use. This script does the following 1. Looks for all environment variables with the `env` prefix. Don't forget to update the env-action step to add whatever prefix you want to use. 2. Removes the prefix from the variable name 3. Concatenates them into a `key=value, key=value` string. This is where you can change the format to match what Azure or AWS expects. 4. Echos out the result so we can use command substitution to send it to the CLI ```shell transformEnvs.sh # Initialize an empty string to store the concatenated result. result="" # Iterate over all environment variables. for var in $(env); do # Check if the variable starts with "env_" if [[ $var == env_* ]]; then # Extract the name and value by splitting at the first '='. name_with_prefix="${var%%=*}" value="${var#*=}" # Remove the "env_" prefix from the name. name="${name_with_prefix#env_}" # Concatenate the modified variable to the result string. # Append a space to separate each name=value pair. result+="${name}=${value}, " fi done # Trim any trailing spaces. result=$(echo "$result" | sed 's/, $//') # Output the concatenated result. echo "$result" ``` Next, we need to update the env-action to include our desired prefix. ```yaml deploy.yml ... - name: Pull ENV id: pull-env uses: Hyphen/env-action@v1 with: hxKeyFile: ${{ secrets.HYPHEN_KEY_FILE }} environment: production variablePrefix: env_ outputs: variables ... ``` The last thing we need to do is replace our `--set-env-vars` parameter in our deploy step ``` ... - name: Deploy to [us-central1] run: |- gcloud run deploy $SERVICE_NAME \ --image=gcr.io/$PROJECT_ID/$SERVICE_NAME:$GITHUB_SHA \ --cpu=1 \ --memory=2Gi \ --no-cpu-throttling \ --min-instances=1 \ --timeout=300 \ --platform=managed \ --region=us-central1 \ --allow-unauthenticated \ --set-env-vars="$(./.github/workflows/transformEnvs.sh)" ``` ### Rotating an Encryption Key URL: https://hyphen.ai/docs/env-secrets-management/rotating-an-encryption-key/ Description: Learn how to rotate encryption keys using the Hyphen CLI to protect application secrets and maintain compliance without causing downtime. > 🚀 Hyphen helps you prevent downtime > > When you rotate your encryption key, old versions of your secrets can still be fetched and decrypted! This allows you to change your keys and not have to rush to change every application at once. > > When you have given the new key to your applications, developers can delete the old version and you're good to go. Rotating encryption keys is a critical security practice that helps safeguard your sensitive data over time. Here are key reasons why you should rotate your encryption keys: 1. **Mitigate Potential Threats**: Over time, encryption keys can become more vulnerable, either through inadvertent exposure or prolonged use. Regular key rotation reduces the risk of keys being compromised. 2. **Compliance Requirements**: Many security standards, such as PCI-DSS and GDPR, require regular key rotation to maintain data protection and reduce vulnerabilities. 3. **Limit the Scope of Data Exposure**: In case an encryption key is ever compromised, rotating the key ensures that past data remains secure by limiting the time a single key is in use. 4. **Strengthen Security Hygiene**: Regularly rotating encryption keys is part of a healthy security practice that ensures your organization stays proactive in safeguarding its secrets. 5. **Respond to Security Events**: If there is ever a suspected breach or leak of an encryption key, rotating the key immediately helps neutralize the risk and prevent unauthorized access to your secrets. Hyphen allows you to rotate your encryption keys with minimal effort while ensuring your secrets remain secure. Here’s how to rotate an encryption key for your project. ## Prerequisites * You have installed the Hyphen CLI (see installation guide). * Signed in to your Hyphen account via the CLI with the `hx auth` command * You have access to an existing project that contains the app secrets in your Hyphen organization ## Rotate your encryption keys with the Hyphen CLI Navigate to the directory where your app’s source code is located. Run the this command: ```shell Command Line hx env rotate-key [flag] ``` This will rotate the encryption key and update all environments within your app. ## Flags and Options * `--force`: Use this flag to force overwrite locally modified environment files that haven’t been pushed yet. Without this, the CLI may warn you about unpushed changes before proceeding. * `-e`, `--environment`: Specify the environment ID (e.g., pevr\_12345) if you need to rotate keys for a specific environment. * \-p, --project: Provide the project ID (e.g., proj\_123) to rotate the key for a specific project. * \-v, --verbose: Enables verbose output to get more detailed information during the operation. * \-y, --yes: Automatically answer “yes” for prompts, allowing the key rotation process to proceed without manual confirmations. * \-n, --no: Automatically answer “no” for prompts if you want to cancel actions when asked. ### Example ```shell Command Line hyphen env rotate-key ``` This will do the following: 1. Pull the latest 2. Generate a new encryption key (always done client side) 3. Update your `.hxkey` files 4. Push new versions of your environments encrypted with the new key. ## What happens next? Share the new `.hxkey` with your team and update all your services / applications to use the new key. Once everyone has the new key simply delete the old versions of your secrets. ### End-to-End Encryption URL: https://hyphen.ai/docs/env-secrets-management/end-to-end-encryption/ Description: Learn how Hyphen ENV secures your .env files using end-to-end encryption, local secret keys, and robust network authentication. ENV is built for developers ❤️ but with enterprise features such as [Access Log](access-log), [Rotating an Encryption Key](rotating-an-encryption-key), and end-to-end encryption, ensuring it can be deployed in any environment. ## No Access to Your Secret Key All of your `.env` files are stored fully encrypted using a local **secret key** that Hyphen never has access to. Both encryption and decryption happen locally, ensuring that your `.env` files and the secrets they contain are never accessible by Hyphen. ## Secure Network with Authentication Not only are your files encrypted locally, but all data is transferred over SSL-encrypted connections and stored fully encrypted at rest. ENV includes robust user and API key authentication by default, with full [Access Log](access-log) audits on every `push` and `pull` request. For additional security, enable **IP Access Rules** in ENV so that any request from an IP address that does not match the configured rules is blocked, even if it includes valid authentication credentials. ## Why Aren't Our Secrets Visible in the Dashboard? As we’ve emphasized, the reason we don’t display secrets in the dashboard is that we have no access to your application’s **secret key**. Everything remains fully encrypted and out of Hyphen’s reach. ### ENV with GitHub Actions URL: https://hyphen.ai/docs/env-secrets-management/env-secrets/ Description: Learn how to use Hyphen's ENV GitHub Action to retrieve, decrypt, and inject environment secrets into your CI/CD pipelines. This action retrieves secrets for the specified environment, decrypts them using the provided profile's key file, and outputs them either as standard `.env` files or exports them as environment variables. ## Prerequisites Before using the ENV service, ensure that: - The [Setup hx Command Line](../github-actions/setup-command-line) action has been run. - You have access to the `.hxkey` file for decrypting the environment secrets. ## Parameters - `hxKeyFile` _(required)_: The contents of the `.hxkey` file. This will NOT be sent to Hyphen and will only be used within the action container. - `environment` _(required)_: The ENV environment to pull (e.g., `production`, `staging`). - `outputs` _(optional)_: Specifies how the secrets should be provided: - `files` _(default)_: Writes the secrets to standard `.env` files on the file system. - `variables`: Exports the secrets as environment variables. - `variablePrefix` _(optional)_: If using the `variables` option, adds a prefix to the exported environment variables. - `path` _(optional)_: Specifies the path where the source code is located, defaults to `GITHUB_WORKSPACE`. ## Example Usage ```yml action.yml - name: Checkout id: checkout uses: actions/checkout@v4 - name: setup hx CLI id: setup uses: Hyphen/setup-hx-action@v1 with: apiKey: ${{ secrets.HYPHEN_API_KEY }} - name: Pull ENV id: pull-env uses: Hyphen/env-action@v1 with: hxKeyFile: ${{ secrets.HYPHEN_KEY_FILE }} environment: production outputs: |- files variables ``` ### Toggle Quickstart URL: https://hyphen.ai/docs/feature-flags/toggle-quickstart/ Description: Learn how to get started with Hyphen Toggle, create feature flags, configure targeting rules, and integrate the OpenFeature JavaScript SDK into your application. [Toggle](https://hyphen.ai/toggle) is a seamless feature release management system built on the robust [OpenFeature](https://openfeature.dev) standard. Hyphen publishes openFeature providers for the most common languages, but our Toggle services supports and documents an open API allowing you to consume it how you see fit. Toggles are grouped and belong to a [Hyphen Project](../introduction/project); [Targeting](toggle-concepts#targeting) can be used to provide different values for a project's applications and environments. ## Get a Project's Public Key To use Toggle, you will need a project [public key](project-public-key). To get the public key for a project: 1. Navigate to your [Hyphen Dashboard](https://app.hyphen.ai). 2. Select your **Project** from the list. 3. Go to the **Access** tab. 4. Copy the **Public Key** for your project. All public keys start with `public_` to make them easy to identify. ## Creating a Feature Flag 1. From the Project Details page, navigate to **Feature Flags**, then **Create Feature Flag** button. 2. Select a type, provide a key (for SDK references), set a logical default value. 3. Mark the feature flag as **perpetual** if the flag is meant to be long-lived in your codebase and will provide control for an extended period of time after the release of a given feature. 4. While optional, adding a clear description helps team members understand the toggle’s purpose. 5. Click **Create** to save, which redirects you to the feature flag detail page. This page contains [Telemetry](toggle-concepts#telemetry) information and also allows you to configure targets. ### Targeting 1. On the feature flag detail page scroll down to the `Targets` sections click `Add a Target`. 2. In the drawer, select one or more target criteria. For each criterion, choose a value from the [context](toggle-concepts#context) to evaluate, then specify the value to match against. Feature flags can include multiple targets. Evaluation proceeds sequentially—from the first target to the last—and stops as soon as a match is found. At that point, the matching target’s value is returned. (Targets can be reordered within the application.) > ℹ️ It is recommended to use the context's application and environment properties in your targets. ## Using a feature flag in your code As mentioned above, Hyphen publishes OpenFeature providers for the most common languages. In this example we will be using the JavaScript Server provider. Provider specific documentation can be found in the left nav. ### Installation Install the provider and the OpenFeature server SDK: ```shell npm install @openfeature/server-sdk @hyphen/openfeature-server-provider ``` ### Setup and Initialization To begin using the Hyphen Provider, follow these steps: 1. Import the required modules. 2. Configure the provider with your `publicKey` and application options. 3. Register the provider with OpenFeature. ```typescript import { OpenFeature } from "@openfeature/server-sdk"; import { HyphenProvider, type HyphenProviderOptions, } from "@hyphen/openfeature-server-provider"; const publicKey = "your-public-key-here"; const options: HyphenProviderOptions = { application: "your-application-name", environment: "production", }; await OpenFeature.setProviderAndWait(new HyphenProvider(publicKey, options)); ``` ### Consume a feature flag value In this example we are providing the [context](toggle-concepts#context) object at read time but a global [context](toggle-concepts#context) object can also be set if your context does not change. ```typescript const context: HyphenEvaluationContext = { targetingKey: "user-123", ipAddress: "203.0.113.42", customAttributes: { subscriptionLevel: "premium", region: "us-east", }, user: { id: "user-123", email: "john.doe@example.com", name: "John Doe", customAttributes: { role: "admin", }, }, }; const flagDetailsWithContext = await client.getBooleanDetails( "feature-flag-key", false, context, ); console.log(flagDetailsWithContext.value); // true or false ``` ### Toggle Concepts URL: https://hyphen.ai/docs/feature-flags/toggle-concepts/ Description: Learn the core concepts of feature toggles in Hyphen, including context evaluation, targeting rules via JSON Logic, reusable segments, and telemetry. ## Context The context is a collection of properties and their values that feature flags use to determine targeting. While only a few properties are required, developers can extend the context with additional, custom properties to enable more complex targeting logic for a toggle. ## Targeting Targeting is the process of returning a value based on specific properties within the evaluated context. For example, a developer might target all users whose email address belongs to a certain domain. Hyphen uses the [JSON Logic](https://jsonlogic.com/) standard to support rich and complex targeting rules. ## Segments A segment is a reusable set of targeting rules based on context properties that can be applied across multiple feature flags within a project. Segments are useful because they let you define a common audience once and then reuse that audience across many toggles without duplicating logic. For example, “beta testers,” “premium customers,” or “users in Mexico". This makes targeting more consistent, reduces the chance of errors, and speeds up rollout changes, since updating a segment instantly updates all feature flags that reference it. Segments are especially valuable for maintaining large-scale feature flag systems where multiple teams work on different features but need to share consistent targeting criteria. ## Telemetry Hyphen collects two types of telemetry when you use toggle, Evaluation and Usage. ### Evaluations An evaluation is the result of applying a context to all toggles in a given project. Hyphen evaluates all the toggles at once for performance reasons. There are several layers of caching, invalidated by changes to the context or toggles, that allow Hyphen to provide unparalleled performance. Evaluation is the metric on which an organization is billed. ### Usage Usage telemetry is the consumption of the toggle's value for a given evaluation. This information is used to help developers determine what toggles are being used and what their values are being evaluated to. This telemetry is collected by our SDKs and may be turned off with SDK options. Doing so will reduce the information available to your developer in the hyphen application. Organizations are not billed based on usage metrics. The organization [dashboard](/docs/introduction/dashboard#toggle-usage) shows recent Toggle usage over the last 30 days and links to individual flags. Project and flag views provide more detailed evaluation and usage charts. When usage telemetry is disabled or no usage is reported, those views have less data to display. ### Segments URL: https://hyphen.ai/docs/feature-flags/segments/ Description: Learn how to define and reuse audience targeting rules across multiple feature flags using segments in Hyphen. ## Overview A segment is a reusable set of targeting rules. Segments are useful because they let you define a common audience once and then reuse that audience across many feature flags without duplicating logic. For example, “beta testers,” “premium customers,” or “users in Mexico". A segment is scoped to the project it is created in. Segment rules are based on context properties and can be used across the environments within a project. Segments make targeting more consistent, reduces the chance of errors, and speeds up rollout changes, since updating a segment instantly updates all feature flags that reference it. Segments are especially valuable for maintaining large-scale feature flag systems where multiple teams work on different features but need to share consistent targeting criteria. ### Example Scenarios Here are some example scenarios where segments would be useful: 1. **Beta Testing Programs**\ You can create a segment for users who have opted into early access or beta testing. Any feature flag that should be tested by this group can simply reference the “Beta Testers” segment with the appropriate return value. When the membership of that segment changes (new testers join, others leave), all feature flags automatically update without needing manual edits. 2. **Geographic Rollouts**\ Release a new feature only to users in Canada and Mexico. You can define a “North America (non-US)” segment once, then apply it across multiple feature flags. This makes it easy to roll out region-specific features consistently. 3. **Premium or Enterprise Customers**\ If your product differentiates between free, premium, and enterprise tiers, you might create a “Premium Customers” segment. That segment can then be reused to unlock advanced features across many parts of the application without repeating the same subscription-level check. 4. **Internal Employees**\ Many teams test features internally before exposing them to customers. You can define an “Employees” segment that targets all users with company email domains. Any feature under internal testing can be gated behind that segment. ## Create a Segment 1. In the Hyphen app, navigate to any project you have at least collaborator access on. Click the **Segments** tab, then the "**Create Segment**" button. 2. ![Create segment form](https://files.readme.io/7dea68b2afd587b594644ba50a07a0c5e3fbb76c5e9d8dbb1717fd19a3db9958-Screenshot_2025-08-18_at_10.09.17_AM.png) Give the segment a name. ### Naming Conventions | Good | Bad | Why | | --------------- | ----------------------- | ---------------------------- | | `region-mexico` | `mx` | Descriptive, clear | | `plan-premium` | `pp` | Avoids cryptic abbreviations | | `role-admins` | `new-dashboard-testers` | Avoids feature tie-in | 3. Provide an optional description if the name of the segment is not descriptive enough 4. Click "**Create Segment**" to create an empty segment. 5. On the segment details page, you'll see: * **Segment key** — reference this in your code * **Creator** — who added the segment * **Flags** — feature flags using this segment * **Rules** — the targeting criteria ![Segment details page in Hyphen app](https://files.readme.io/8a9dcfb06ace6616d743a85090e1372b5690bf62ebeea92125fbc15615af9a42-Screenshot_2025-08-18_at_11.27.44_AM.png) 6. To add a rule, click the "**Add Rule**". Then click "**Add Criteria**". You'll see a list of options to create your first rule. Select `user.email`. 7. Select the `in` operator for the rules operator and enter a email address(es) separated by commas. Click "**Save**" to add the rule to the segment. 8. You can continue to add more rules to the segment, but know that rules will be evaluated in the order they appear (top-down) and the first matching rule will result in the evaluation context falling within the segment. If none of the rules are satisfied for a given context, then the segment context will not be in the segment. ## Use a segment in a feature flag To use a segment as a target in a feature flag 1. Create or navigate to an existing feature flag in the same project you've created a segment. 2. Click "**Add Target**". For the target criteria, select **Segment** from the dropdown menu. ![](https://files.readme.io/49161b7b776c9a09222818dde658720381f9f68640b277e0f85fc71e3154d445-Screenshot_2025-08-18_at_11.38.11_AM.png) 3. Choose `in` or `not in` as the operator, and then select your segment. 4. Select the return value of the feature flag if the target criteria is met and click "**Save**". You should now see the segment target in the list of feature flag targets. ![](https://files.readme.io/038676d265081c93bbcdade64f5c37a3b151dc12565b9ca2d899b93740324f8f-Screenshot_2025-08-18_at_11.39.48_AM.png) > ❗️ **Segments that are used by feature flags can not be deleted**\ > ❗️ A segment that is in use cannot be deleted. If you'd like to delete a segment that is in use, you must first remove the segment from all feature flags that use it. ## JSON Logic Segment rules are written in [JSON logic](https://jsonlogic.com/). Once you've created rules in a segment in the Hyphen app, you can access the segment's underlying JSON logic by clicking the "Copy JSON Logic" button next. ![Screenshot of Hyphen app showing where the "copy json logic" button is](https://files.readme.io/af687178b4bbe90b38ee8b429301cdea397ac760b54334b4a26a315b360a564e-Screenshot_2025-08-18_at_11.30.45_AM.png) Here's an example: ```json Segment JSON Logic { "or": [ { "and": [{ "==": [{ "var": "application" }, "location-app"] }] }, { "and": [{ "==": [{ "var": "user.id" }, "1234"] }] }, { "and": [ { "in": [ { "var": "user.email" }, ["one@example.com", "two@example.com", "three@example.com"] ] } ] } ] } ``` ## Rules Operator Reference | Name | Description | | ---------- | ------------------------------------------------------------------- | | `==` | Checks if the value is equal to the target value. | | `!=` | Checks if the value is not equal to the target value. | | `in` | Checks if the value exists within a list of comma-separated values. | | `contains` | Checks if a list or string contains the given value. | | `>=` | Checks if the value is greater than or equal to the target value. | | `<=` | Checks if the value is less than or equal to the target value. | ## Best Practices * Reuse segments across flags, don’t duplicate logic * Keep rules broad enough to be reused * Add descriptions when names aren’t self-explanatory ## Common Pitfalls * Overlapping segments that cause conflicting flag rules * Using feature names in segment names * Forgetting that editing a segment affects all flags instantly ### Project Public Key URL: https://hyphen.ai/docs/feature-flags/project-public-key/ Description: Learn how to find and use your Hyphen Project Public Key for safe client-side API authentication. > ℹ️ This key is designed for client-side use and is safe to include in your frontend code. A Project Public Key is a unique identifier that allows developers to authenticate requests to Hyphen’s API. With this key, you have limited, read-only access to features like Toggle feature evaluations. Getting Your Project's Public Key 1. Navigate to your **Hyphen Dashboard**. 2. Select your project from the **Projects** list. 3. Your project's public key will appear on the right-hand column. 4. Your project public key is available on the project's **Access** tab. All public keys start with `public_` to make them easy to identify. ![](https://files.readme.io/992054417ee6ad40cff16b24831203f866a5135f65ee06aacd10046e528dae39-Screenshot_2025-01-03_at_5.41.41_PM.png)




To see all public keys for your organization: 1. in the main navigation, click **Settings** 2. Then click "Public Keys" to see all public keys that have been created. ### SDKs URL: https://hyphen.ai/docs/feature-flags/toggle-sdks/ Description: Overview of Hyphen's native and OpenFeature SDKs for server-side, client-side, and framework-specific feature flag evaluation. Hyphen has built out SDK's for `go`, `python`, `react`, `nodejs`, `javascript`, and `swift` either via our native support or via Open Feature. # Native SDK's ## @hyphen/sdk Server-side Node.js SDK for feature flag evaluation and management. Ideal for backend services, APIs, and server-rendered applications. **Simple use case:** ```javascript import { HyphenClient } from "@hyphen/sdk"; const client = new HyphenClient({ apiKey: "your-api-key" }); await client.initialize(); const isEnabled = await client.isEnabled("new-feature", { userId: "123" }); if (isEnabled) { // Execute new feature code } ``` ## @hyphen/browser-sdk Client-side JavaScript SDK for web browsers. Optimized for client-side feature flag evaluation with minimal bundle size. **Simple use case:** ```javascript import { HyphenBrowserClient } from "@hyphen/browser-sdk"; const client = new HyphenBrowserClient({ apiKey: "your-client-key" }); await client.initialize(); const showNewUI = await client.isEnabled("new-ui-design", { userId: user.id, }); ``` ## @hyphen/react-sdk React-specific SDK with hooks and components for seamless feature flag integration in React applications. **Simple use case:** ```javascript import { HyphenProvider, useFeatureFlag } from "@hyphen/react-sdk"; function App() { return ( ); } function MyComponent() { const isEnabled = useFeatureFlag("new-feature"); return isEnabled ? : ; } ``` We are currently planning to support native sdk's for `python`, `go`, `.net`, and `java` in the near future. # Open Feature SDK's [OpenFeature](https://openfeature.dev/) is an open standard that provides a vendor-agnostic, unified API for feature flagging. Hyphen supports OpenFeature through providers for multiple languages and frameworks. Hyphen has made the following open feature providers for you to use: - [GO](provider-go) - [Javascript (Node)](provider-javascript-node) - [Javascript (Web)](provider-javascript-web) - [Python](provider-python) - [React](provider-react) - [Swift](provider-swift) ### GO URL: https://hyphen.ai/docs/feature-flags/provider-go/ Description: Integration guide and documentation for the Hyphen Toggle Provider for Go using the OpenFeature SDK. **Hyphen Toggle Provider** for Go is an OpenFeature provider implementation that enables seamless feature flag evaluation in Go applications. This provider integrates Hyphen's feature flagging system with the OpenFeature SDK, providing robust feature management with minimal setup. ## Installation ```bash go get github.com/hyphen/openfeature-provider-go go get github.com/open-feature/go-sdk ``` ## Setup and Initialization To integrate the Hyphen Toggle provider into your application, follow these steps: 1. Configure the provider with your `PublicKey`, `Application` and `Environment`.\ You can specify the environment in one of two formats: * Alternate ID (e.g., "production", "staging") — the environment in which your application is running. * Project Environment ID (e.g., `pevr_abc123`) — useful for internal references. 2. Register the provider with OpenFeature. ```go provider, err := toggle.NewProvider(toggle.Config{ PublicKey: "your-public-key", Application: "your-app-name", Environment: "development", // or project environment ID }) openfeature.SetProvider(provider) ``` 3. Create an OpenFeature client for your application and configure the context needed for feature targeting evaluations, incorporating user or application context. ```go client := openfeature.NewClient("my-app") ctx := openfeature.NewEvaluationContext( "user-123", map[string]interface{}{ "email": "user@example.com", "plan": "premium", "age": 25, "country": "US", "beta_user": true, }, ) ``` ## Usage ### Evaluation Context Example The evaluation context allows you to pass targeting information: ```go stringFlag, _ := client.StringValue(context.Background(), "my-string-flag", "default", ctx) numberFlag, _ := client.NumberValue(context.Background(), "my-number-flag", 0, ctx) log.Printf("String Flag: %s", stringFlag) log.Printf("Number Flag: %f", numberFlag) ``` ## Configuration ### Provider Options | Option | Type | Required | Description | | ------------- | ---------- | :------- | ------------------------------------------------------------------------------------------ | | `PublicKey` | `string` | Yes | Your Hyphen API public key. | | `Application` | `string` | Yes | The application id or alternate id. | | `Environment` | `string` | Yes | The environment identifier for the Hyphen project (project environment ID or alternateId). | | `HorizonUrls` | `[]string` | No | Hyphen Horizon URLs for fetching flags. | | `EnableUsage` | `bool` | No | Enable/disable telemetry (default: true). | | `Cache` | `object` | No | Configuration for caching feature flag evaluations. | ### Caching The provider supports caching of evaluation results: | Property | Type | Default | Description | | :------- | :------- | :------ | :-------------------------------------------------------------- | | `TTL` | number | 300 | Time-to-live in seconds for cached flag evaluations. | | `KeyGen` | Function | - | Custom function to generate cache keys from evaluation context. | Example with cache configuration: ```go config := toggle.Config{ PublicKey: "your-public-key", Application: "your-app", Environment: "development", Cache: &toggle.CacheConfig{ TTL: time.Minute * 5, KeyGen: func(ctx toggle.EvaluationContext) string { return fmt.Sprintf("%s-%s", ctx.TargetingKey, ctx.GetValue("plan")) }, }, } ``` ## Example ```go package main import ( "context" "log" "github.com/open-feature/go-sdk/openfeature" "github.com/hyphen/openfeature-provider-go/pkg/toggle" ) func main() { // Initialize the provider provider, err := toggle.NewProvider(toggle.Config{ PublicKey: "your-public-key", Application: "your-app-name", Environment: "development", // or project environment ID }) if err != nil { log.Fatal(err) } // Set as global provider openfeature.SetProvider(provider) // Create a client client := openfeature.NewClient("my-app") // Create evaluation context ctx := openfeature.NewEvaluationContext( "targeting-key-user-123", map[string]interface{}{ "email": "user@example.com", "plan": "premium", }, ) // Evaluate different types of flags boolFlag, _ := client.BooleanValue(context.Background(), "my-bool-flag", false, ctx) stringFlag, _ := client.StringValue(context.Background(), "my-string-flag", "default", ctx) numberFlag, _ := client.NumberValue(context.Background(), "my-number-flag", 0, ctx) log.Printf("Bool Flag: %v", boolFlag) log.Printf("String Flag: %s", stringFlag) log.Printf("Number Flag: %f", numberFlag) } ``` ### JavaScript (Node) URL: https://hyphen.ai/docs/feature-flags/provider-javascript-node/ Description: Documentation for integrating Hyphen feature flags in Node.js applications using both the native SDK and the OpenFeature server provider. # Native SDK @hyphen/sdk The **@hyphen/sdk** is Hyphen's native server-side Node.js SDK for feature flag evaluation and management. It provides a streamlined, purpose-built interface for backend services, APIs, and server-rendered applications without requiring OpenFeature. ## Installation Install the native SDK: ```shell npm install @hyphen/sdk ``` ## Setup and Initialization Initialize the Hyphen client with your API key and configuration: ```javascript import { HyphenClient } from '@hyphen/sdk'; const client = new HyphenClient({ apiKey: 'your-api-key', application: 'your-application-name', environment: 'production' // or project environment ID }); await client.initialize(); ``` ## Usage ### Basic Feature Flag Evaluation Check if a feature is enabled for a user: ```javascript const isEnabled = await client.isEnabled('new-checkout-flow', { userId: 'user-123', email: 'john.doe@example.com' }); if (isEnabled) { // Execute new checkout flow processNewCheckout(); } else { // Use legacy checkout processLegacyCheckout(); } ``` ### Getting Feature Flag Details Retrieve detailed information about a feature flag evaluation: ```javascript const flagDetails = await client.getFlagDetails('feature-flag-key', { userId: 'user-123', customAttributes: { subscriptionLevel: 'premium', region: 'us-east' } }); console.log(flagDetails.enabled); // true or false console.log(flagDetails.variant); // variant name if applicable console.log(flagDetails.metadata); // additional flag metadata ``` ### Targeting Context Provide rich context for advanced targeting rules: ```javascript const context = { userId: 'user-456', email: 'jane.smith@example.com', name: 'Jane Smith', ipAddress: '203.0.113.42', customAttributes: { role: 'admin', subscriptionLevel: 'enterprise', region: 'us-west' } }; const showAdminPanel = await client.isEnabled('admin-panel-v2', context); ``` ## Configuration Options | Option | Type | Required | Description | | :------------------ | :--------- | :------- | :--------------------------------------------------------------- | | `apiKey` | `string` | Yes | Your Hyphen API key | | `application` | `string` | Yes | The application id or alternate ID | | `environment` | `string` | Yes | The environment identifier (project environment ID or alternate) | | `enableTelemetry` | `boolean` | No | Enable/disable usage telemetry (default: true) | | `cacheTTL` | `number` | No | Cache time-to-live in seconds (default: 300) | # Open Feature The **Hyphen Toggle Provider** for Node.js is an OpenFeature provider implementation that enables seamless feature flag evaluation. This section covers setup, usage, and configuration specific to the JavaScript implementation. ## Installation Install the provider and the OpenFeature server SDK: ```shell npm install @openfeature/server-sdk @hyphen/openfeature-server-provider ``` ## Setup and Initialization To begin using the Hyphen Provider, follow these steps: 1. Import the required modules. 2. Configure the provider with your `publicKey` , application name and environment.\ You can specify the environment in one of two formats: * Alternate ID (e.g., "production", "staging") — the environment in which your application is running. * Project Environment ID (e.g., `pevr_abc123`) — useful for internal references. 3. Register the provider with OpenFeature. ```javascript import { OpenFeature } from '@openfeature/server-sdk'; import { HyphenProvider, type HyphenProviderOptions } from '@hyphen/openfeature-server-provider'; const publicKey = "your-public-key-here"; const options: HyphenProviderOptions = { application: 'your-application-name', environment: 'production', // or project environment ID }; await OpenFeature.setProviderAndWait(new HyphenProvider(publicKey, options)); ``` 4. Configure the context needed for feature targeting evaluations, incorporating user or application context. ```typescript const context: HyphenEvaluationContext = { targetingKey: 'user-123', ipAddress: '203.0.113.42', customAttributes: { subscriptionLevel: 'premium', region: 'us-east', }, user: { id: 'user-123', email: 'john.doe@example.com', name: 'John Doe', customAttributes: { role: 'admin', }, }, }; ``` ## Usage ### Evaluation Context Example Evaluate a feature flag using the OpenFeature client and context information: ```typescript const client = OpenFeature.getClient(); const flagDetailsWithContext = await client.getBooleanDetails('feature-flag-key', false, context); console.log(flagDetailsWithContext.value); // true or false ``` ## Configuration ### Options | Option | Type | Required | Description | | :------------------ | :--------- | :------- | :----------------------------------------------------------------------------------------- | | `application` | `string` | Yes | The application id or alternate ID. | | `environment` | `string` | Yes | The environment identifier for the Hyphen project (project environment ID or alternateId). | | `horizonUrls` | `string[]` | No | Hyphen Horizon URLs for fetching flags. | | `enableToggleUsage` | `boolean` | No | Enable/disable telemetry (default: true). | | `cache` | object | No | Configuration for caching feature flag evaluations. | ### Cache Configuration The `cache` option accepts the following properties: | Property | Type | Default | Description | | -------------------- | -------- | ------- | --------------------------------------------------------------- | | `ttlSeconds` | number | 300 | Time-to-live in seconds for cached flag evaluations. | | `generateCacheKeyFn` | Function | - | Custom function to generate cache keys from evaluation context. | Example with cache configuration: ```typescript const options: HyphenProviderOptions = { application: 'your-application-name', environment: 'production', cache: { ttlSeconds: 600, // 10 minutes generateCacheKeyFn: (context: HyphenEvaluationContext) => { return `${context.targetingKey}-${context.user?.id}`; }, }, }; ``` ### Context Provide an `EvaluationContext` to pass contextual data for feature evaluation. | Field | Type | Required | Description | | ----------------------- | --------------------- | :------- | ------------------------------------------------------------------ | | `targetingKey` | `string` | Yes | The key used for caching the evaluation response. | | `ipAddress` | `string` | No | The IP address of the user making the request. | | `customAttributes` | `Record` | No | Custom attributes for additional contextual information. | | `user` | `object` | No | An object containing user-specific information for the evaluation. | | `user.id` | `string` | No | The unique identifier of the user. | | `user.email` | `string` | No | The email address of the user. | | `user.name` | `string` | No | The name of the user. | | `user.customAttributes` | `Record` | No | Custom attributes specific to the user. |
## Example ```typescript const context: HyphenEvaluationContext = { targetingKey: 'user-456', customAttributes: { subscriptionLevel: 'premium', }, }; const flagDetails = await client.getBooleanDetails('enable-discounts', false, context); if (flagDetails.value) { console.log('Discounts enabled for premium users.'); } else { console.log('No discounts available.'); } ``` ### React URL: https://hyphen.ai/docs/feature-flags/provider-react/ Description: Documentation and integration guide for using Hyphen feature flags in React applications via the native React SDK or OpenFeature provider. # Native SDK @hyphen/react-sdk The **@hyphen/react-sdk** is Hyphen's native React SDK that provides hooks and components for seamless feature flag integration in React applications. It offers a React-idiomatic interface without requiring OpenFeature. ## Installation Install the native React SDK: ```shell npm install @hyphen/react-sdk ``` ## Setup and Initialization Wrap your application with the `HyphenProvider` component: ```javascript import { HyphenProvider } from '@hyphen/react-sdk'; function App() { return ( ); } ``` ## Usage ### Basic Feature Flag Hook Use the `useFeatureFlag` hook to check if a feature is enabled: ```javascript import { useFeatureFlag } from '@hyphen/react-sdk'; function MyComponent() { const isEnabled = useFeatureFlag('new-ui-design'); return (
{isEnabled ? : }
); } ``` ### Feature Flag with User Context Provide user context for targeted feature rollouts: ```javascript import { useFeatureFlag, useHyphenContext } from '@hyphen/react-sdk'; function Dashboard() { const { setContext } = useHyphenContext(); // Set user context (typically in authentication flow) useEffect(() => { setContext({ userId: user.id, email: user.email, customAttributes: { subscriptionTier: 'premium', role: 'admin' } }); }, [user]); const showBetaFeatures = useFeatureFlag('beta-dashboard'); return showBetaFeatures ? : ; } ``` ### Getting Detailed Flag Information Use `useFeatureFlagDetails` to get additional metadata: ```javascript import { useFeatureFlagDetails } from '@hyphen/react-sdk'; function FeatureComponent() { const { enabled, variant, metadata } = useFeatureFlagDetails('ab-test-feature'); if (!enabled) return ; switch (variant) { case 'variant-a': return ; case 'variant-b': return ; default: return ; } } ``` ### Conditional Rendering Component Use the `FeatureFlag` component for declarative conditional rendering: ```javascript import { FeatureFlag } from '@hyphen/react-sdk'; function App() { return (
}> {/* With variant support */}
); } ``` ### Loading States Handle loading states while flags are being fetched: ```javascript import { useFeatureFlag, useHyphenClient } from '@hyphen/react-sdk'; function FeatureComponent() { const { isReady } = useHyphenClient(); const isEnabled = useFeatureFlag('new-feature'); if (!isReady) { return ; } return isEnabled ? : ; } ``` ### Real-time Flag Updates Subscribe to flag changes in real-time: ```javascript import { useFeatureFlag, useFeatureFlagListener } from '@hyphen/react-sdk'; function DynamicFeature() { const isEnabled = useFeatureFlag('live-chat'); useFeatureFlagListener('live-chat', (newValue) => { console.log('live-chat flag changed to:', newValue); // Optionally trigger side effects }); return isEnabled ? : null; } ``` ## HyphenProvider Configuration The `HyphenProvider` accepts the following props: | Prop | Type | Required | Description | | :---------------- | :-------- | :------- | :---------------------------------------------------------- | | `apiKey` | `string` | Yes | Your Hyphen client API key | | `application` | `string` | Yes | The application id or alternate ID | | `environment` | `string` | Yes | The environment identifier (production, staging, etc.) | | `enableTelemetry` | `boolean` | No | Enable/disable usage telemetry (default: true) | | `autoUpdate` | `boolean` | No | Enable automatic flag updates (default: true) | | `updateInterval` | `number` | No | Flag update interval in seconds (default: 60) | | `defaultContext` | `object` | No | Default user context for all flag evaluations | ## Available Hooks | Hook | Description | | :------------------------- | :---------------------------------------------------- | | `useFeatureFlag` | Get boolean value of a feature flag | | `useFeatureFlagDetails` | Get detailed flag information including variants | | `useHyphenContext` | Access and update user context | | `useHyphenClient` | Access the underlying Hyphen client instance | | `useFeatureFlagListener` | Subscribe to real-time flag changes | # Open Feature ## Installation To use the Hyphen Toggle OpenFeature Web Provider for React, install the required packages: ```shell npm install @openfeature/react-sdk @hyphen/openfeature-web-provider ``` ## Setup and Initialization To begin using the Hyphen Provider, follow these steps: 1. Import the required modules. 2. Configure the provider with your `publicKey`, application name and environment.\ You can specify the environment in one of two formats: * Alternate ID (e.g., "production", "staging") — the environment in which your application is running. * Project Environment ID (e.g., `pevr_abc123`) — useful for internal references. 3. Register the OpenFeature provider. ```typescript jsx import { OpenFeature, OpenFeatureProvider } from '@openfeature/react-sdk'; import { HyphenProvider, HyphenProviderOptions } from '@hyphen/openfeature-web-provider'; const publicKey = 'your-public-key'; // Replace with your Hyphen publicKey const options: HyphenProviderOptions = { application: 'your-app-name', environment: 'production', // or project environment ID }; await OpenFeature.setProviderAndWait(new HyphenProvider(publicKey, options)); function App() { return ( ); } ``` 4. Use `OpenFeature.setContext` to configure the context needed for feature targeting. This context should include relevant user information, typically obtained from an authentication process. ```typescript jsx const AuthContext = createContext({ isLoading: true, user: null }); export const MockAuthProvider = ({ children }: { children: React.ReactNode }) => { const [authState, setAuthState] = useState({ isLoading: true, user: null }); useEffect(() => { setTimeout(() => { const user = { id: 'user-123', name: 'John Doe', email: 'user@example.com', }; OpenFeature.setContext({ targetingKey: user.id, user, customAttributes: { role: user.role }, // Additional targeting attributes }); setAuthState({ isLoading: false, user }); }, 1000); }, []); return {children}; }; export const useAuth = () => useContext(AuthContext); ``` ## Usage ### Evaluation Context Example Use any of the OpenFeature evaluation hooks to evaluate flags. ```typescript jsx import { useFlag } from '@openfeature/react-sdk'; function Page() { const { value: isFeatureEnabled } = useFlag('your-flag-key', false); return (
{isFeatureEnabled ?

Welcome to this OpenFeature-enabled React app!

:

Welcome to this React app.

}
) } ``` ## Configuration ### Options | Option | Type | Required | Description | | :------------------ | :--------- | :------- | :----------------------------------------------------------------------------------------- | | `application` | `string` | Yes | The application id or alternate ID. | | `environment` | `string` | Yes | The environment identifier for the Hyphen project (project environment ID or alternateId). | | `horizonUrls` | `string[]` | No | Hyphen Horizon URLs for fetching flags. | | `enableToggleUsage` | `boolean` | No | Enable/disable telemetry (default: true). | ### Context Provide an `EvaluationContext` to pass contextual data for feature evaluation. | Field | Type | Required | Description | | ----------------------- | --------------------- | :------- | ------------------------------------------------------------------ | | `targetingKey` | `string` | Yes | The key used for caching the evaluation response. | | `ipAddress` | `string` | No | The IP address of the user making the request. | | `customAttributes` | `Record` | No | Custom attributes for additional contextual information. | | `user` | `object` | No | An object containing user-specific information for the evaluation. | | `user.id` | `string` | No | The unique identifier of the user. | | `user.email` | `string` | No | The email address of the user. | | `user.name` | `string` | No | The name of the user. | | `user.customAttributes` | `Record` | No | Custom attributes specific to the user. | ### Javascript (Web) URL: https://hyphen.ai/docs/feature-flags/provider-javascript-web/ Description: Comprehensive guide for integrating Hyphen feature flags in browser applications using either the native @hyphen/browser-sdk or the OpenFeature Web SDK provider. # Native SDK @hyphen/browser-sdk The **@hyphen/browser-sdk** is Hyphen's native client-side JavaScript SDK for web browsers. It provides a lightweight, optimized solution for feature flag evaluation in browser environments without requiring OpenFeature. ## Installation Install the native browser SDK: ```shell npm install @hyphen/browser-sdk ``` Or include via CDN: ```html ``` ## Setup and Initialization Initialize the Hyphen browser client with your client key and configuration: ```javascript import { HyphenBrowserClient } from '@hyphen/browser-sdk'; const client = new HyphenBrowserClient({ apiKey: 'your-client-key', application: 'your-application-name', environment: 'production' // or project environment ID }); await client.initialize(); ``` ## Usage ### Basic Feature Flag Evaluation Check if a feature is enabled for the current user: ```javascript const isEnabled = await client.isEnabled('new-ui-design', { userId: user.id, email: user.email }); if (isEnabled) { // Show new UI renderNewUI(); } else { // Show legacy UI renderLegacyUI(); } ``` ### Real-time Flag Updates Listen for feature flag changes in real-time: ```javascript client.on('flagsChanged', (flags) => { console.log('Feature flags updated:', flags); updateUIBasedOnFlags(flags); }); ``` ### Getting Feature Flag Details Retrieve detailed information about a feature flag evaluation: ```javascript const flagDetails = await client.getFlagDetails('beta-features', { userId: user.id, customAttributes: { accountType: 'premium', region: 'us-west' } }); console.log(flagDetails.enabled); // true or false console.log(flagDetails.variant); // variant name if applicable ``` ### User Context Provide user context for targeted feature rollouts: ```javascript const context = { userId: 'user-789', email: 'user@example.com', name: 'John Doe', customAttributes: { accountType: 'enterprise', betaTester: true, region: 'eu-west' } }; const showBetaFeatures = await client.isEnabled('beta-dashboard', context); ``` ### Browser-Specific Features The browser SDK automatically captures browser context: ```javascript // SDK automatically includes: // - User agent // - Screen resolution // - Browser language // - Timezone const isEnabled = await client.isEnabled('mobile-optimized-view', { userId: user.id }); ``` ## Configuration Options | Option | Type | Required | Description | | :---------------- | :-------- | :------- | :--------------------------------------------------------------- | | `apiKey` | `string` | Yes | Your Hyphen client API key (use client key, not server key) | | `application` | `string` | Yes | The application id or alternate ID | | `environment` | `string` | Yes | The environment identifier (project environment ID or alternate) | | `enableTelemetry` | `boolean` | No | Enable/disable usage telemetry (default: true) | | `autoUpdate` | `boolean` | No | Enable automatic flag updates (default: true) | | `updateInterval` | `number` | No | Flag update interval in seconds (default: 60) | # Open Feature ## Installation Install the provider and the OpenFeature server SDK: ```shell shell npm install @openfeature/web-sdk @hyphen/openfeature-web-provider ``` ## Setup and Initialization To begin using the Hyphen Provider, follow these steps: 1. Import the required modules. 2. Configure the provider with your `publicKey` , `application` and `environment`.\ You can specify the environment in one of two formats: * Alternate ID (e.g., "production", "staging") — the environment in which your application is running. * Project Environment ID (e.g., `pevr_abc123`) — useful for internal references. 3. Register the provider with OpenFeature. ```javascript import { OpenFeature } from '@openfeature/web-sdk'; import { HyphenProvider, type HyphenProviderOptions } from '@hyphen/openfeature-web-provider'; const publicKey = "your-public-key-here"; const options: HyphenProviderOptions = { application: 'your-application-name', environment: 'production', // or project environment ID }; await OpenFeature.setProviderAndWait(new HyphenProvider(publicKey, options)); ``` 4. Use `OpenFeature.setContext` to configure the required context for feature targeting evaluations, incorporating user or application context. ```javascript const context: HyphenEvaluationContext = { targetingKey: 'user-123', ipAddress: '203.0.113.42', customAttributes: { subscriptionLevel: 'premium', region: 'us-east', }, user: { id: 'user-123', email: 'john.doe@example.com', name: 'John Doe', customAttributes: { role: 'admin', }, }, }; OpenFeature.setContext(context); ``` ## Usage ### Evaluation Context Example Use the `OpenFeature.getClient()` to evaluate feature flags in your application. ```javascript const client = OpenFeature.getClient(); const isEnabled = client.getBooleanDetails('your-flag-key', false); console.log('isEnabled', isEnabled) // true or false ``` ## Configuration ### Options | Option | Type | Required | Description | | :------------------ | :--------- | :------- | :----------------------------------------------------------------------------------------- | | `application` | `string` | Yes | The application id or alternate ID. | | `environment` | `string` | Yes | The environment identifier for the Hyphen project (project environment ID or alternateId). | | `horizonUrls` | `string[]` | No | Hyphen Horizon URLs for fetching flags. | | `enableToggleUsage` | `boolean` | No | Enable/disable telemetry (default: true). | ### Context Provide an `EvaluationContext` to pass contextual data for feature evaluation. | Field | Type | Required | Description | | ----------------------- | --------------------- | :------- | ------------------------------------------------------------------ | | `targetingKey` | `string` | Yes | The key used for caching the evaluation response. | | `ipAddress` | `string` | No | The IP address of the user making the request. | | `customAttributes` | `Record` | No | Custom attributes for additional contextual information. | | `user` | `object` | No | An object containing user-specific information for the evaluation. | | `user.id` | `string` | No | The unique identifier of the user. | | `user.email` | `string` | No | The email address of the user. | | `user.name` | `string` | No | The name of the user. | | `user.customAttributes` | `Record` | No | Custom attributes specific to the user. | ### Python URL: https://hyphen.ai/docs/feature-flags/provider-python/ Description: Learn how to install, configure, and use the Hyphen OpenFeature provider in Python for feature flag management and evaluation. ## Installation Install the provider and the OpenFeature Python SDK: ```bash pip install openfeature-sdk hyphen-openfeature-provider ``` ## Setup and Initialization To begin using the Hyphen Provider, follow these steps: 1. Import the required modules 2. Configure the provider with your `publicKey`, application name and environment.\ You can specify the environment in one of two formats: * Alternate ID (e.g., "production", "staging") — the environment in which your application is running. * Project Environment ID (e.g., `pevr_abc123`) — useful for internal references. 3. Register the provider with OpenFeature and create an OpenFeature client for your application. ```python from openfeature import api from openfeature_provider_hyphen import ( HyphenProvider, HyphenProviderOptions, HyphenEvaluationContext ) # Initialize provider options options = HyphenProviderOptions( application="your-app-name", environment="production" ) # Create and set the provider provider = HyphenProvider( public_key="your-public-key", options=options ) api.set_provider(provider) # Create a client client = api.get_client() ``` 4. Use `HyphenEvaluationContext` to configure the required context for feature targeting evaluations, incorporating user or application context. ```python from openfeature_provider_hyphen import HyphenUser # Create user details user = HyphenUser( id="user-123", email="user@example.com", name="John Doe", custom_attributes={ "role": "admin", "subscription": "premium" } ) # Create evaluation context context = HyphenEvaluationContext( targeting_key="user-123", attributes={ "user": user, "ip_address": "203.0.113.42", "custom_attributes": { "device": "mobile", "platform": "ios" } } ) ``` ## Usage ### Evaluation Context Example Use the client to evaluate different types of feature flags in your application. ```python try: # Boolean flag evaluation is_enabled = client.get_boolean_value( flag_key="your-flag-key", default_value=False, evaluation_context=context ) print(f"Feature enabled: {is_enabled}") # String flag evaluation theme = client.get_string_value( flag_key="app-theme", default_value="light", evaluation_context=context ) # Integer flag evaluation max_items = client.get_integer_value( flag_key="max-items", default_value=10, evaluation_context=context ) # Object flag evaluation config = client.get_object_value( flag_key="feature-config", default_value={ "enabled": True, "timeout": 30 }, evaluation_context=context ) except Exception as e: print(f"Error evaluating flag: {e}") ``` ## Configuration ### Options | Option | Type | Required | Description | | ----------------------- | ----------- | -------- | ------------------------------------------------------------------------------------------ | | `application` | `str` | Yes | The application id or alternate ID. | | `environment` | `str` | Yes | The environment identifier for the Hyphen project (project environment ID or alternateId). | | `horizon_urls` | `List[str]` | No | Custom Hyphen server URLs. | | `enable_toggle_usage` | `bool` | No | Enable/disable telemetry (default: true). | | `cache_ttl_seconds` | `int` | No | Cache TTL in seconds (default: 300). | | `generate_cache_key_fn` | `Callable` | No | Custom cache key generation function. | ### Context | Field | Type | Required | Description | | ------------------------------ | ---------------- | -------- | ------------------------------------------------- | | `targeting_key` | `str` | Yes | The key used for caching the evaluation response. | | `attributes` | `Dict` | No | Dictionary containing context attributes. | | `attributes.user` | `HyphenUser` | No | User information for targeting. | | `attributes.ip_address` | `str` | No | The IP address of the user. | | `attributes.custom_attributes` | `Dict[str, Any]` | No | Additional contextual information. | #### HyphenUser Fields | Field | Type | Required | Description | | ------------------- | ---------------- | -------- | -------------------------------------- | | `id` | `str` | Yes | The unique identifier of the user | | `email` | `str` | No | The email address of the user | | `name` | `str` | No | The name of the user | | `custom_attributes` | `Dict[str, Any]` | No | Custom attributes specific to the user | ### .NET URL: https://hyphen.ai/docs/feature-flags/provider-dotnet/ Description: Learn how to install, configure, and evaluate feature flags in .NET applications using the Hyphen Toggle OpenFeature Provider. Hyphen Toggle OpenFeature Provider for .NET is an OpenFeature provider implementation that enables seamless feature flag evaluation in .NET applications. This provider integrates Hyphen's feature flagging system with the OpenFeature SDK, providing robust feature management with minimal setup. ## Installation Install the provider and OpenFeature using NuGet: ```shell dotnet add package Hyphen.OpenFeature.Provider dotnet add package OpenFeature ``` ## Setup and Initialization To integrate the Hyphen Toggle provider into your application, follow these steps: 1. Configure the provider with your `publicKey`, application name and environment.\ You can specify the environment in one of two formats: * Alternate ID (e.g., "production", "staging") — the environment in which your application is running. * Project Environment ID (e.g., `pevr_abc123`) — useful for internal references. 2. Register the provider with OpenFeature. ```csharp using OpenFeature; using Hyphen.OpenFeature.Provider; var publicKey = "your-public-key-here"; var options = new HyphenProviderOptions { Application = "your-application-name", Environment = "production" // or project environment ID }; await OpenFeature.SetProviderAsync(new HyphenProvider(publicKey, options)); ``` 3. Configure the context needed for feature targeting evaluations, incorporating user or application context. ```csharp HyphenEvaluationContext hyphenEvaluationContext = new HyphenEvaluationContext { TargetingKey = "user-123", IpAddress = "203.0.113.42", CustomAttributes = new Dictionary { { "subscriptionLevel", "premium" }, { "region", "us-east" } }, User = new UserContext { Id = "user-123", Email = "user@example.com", Name = "John Doe", CustomAttributes = new Dictionary { { "role", "admin" } } } }; EvaluationContext context = hyphenEvaluationContext.GetEvaluationContext(); ``` ## Usage ### Evaluation Context Example Evaluate a feature flag using the OpenFeature client and context information: ```csharp var client = OpenFeature.GetClient(); var flagValue = await client.GetBooleanValue("feature-flag-key", false, context); ``` ## Configuration ### Options | Option | Type | Required | Description | | ------------------- | -------------- | -------- | ------------------------------------------------------------------------------------------- | | `Application` | `string` | Yes | The application id or alternate id | | `Environment` | `string` | Yes | The environment identifier for the Hyphen project (project environment ID or alternate ID). | | `HorizonUrls` | `string[]` | No | Hyphen Horizon URLs for fetching flags. | | `EnableToggleUsage` | `bool?` | No | Enable/disable telemetry (default: true). | | `Cache` | `CacheOptions` | No | Configuration for caching evaluations. | ### Cache Configuration The `Cache` option accepts the following properties: | Property | Type | Default | Description | | :------------------- | :------- | :------ | :-------------------------------------------------------------- | | `TtlSeconds` | number | 300 | Time-to-live in seconds for cached flag evaluations. | | `GenerateCacheKeyFn` | Function | - | Custom function to generate cache keys from evaluation context. | Example with cache configuration: ```csharp var options = new HyphenProviderOptions { Application = "your-application-name", Environment = "production", Cache = new CacheOptions { TtlSeconds = 600, // 10 minutes GenerateCacheKeyFn = (context) => $"{context.TargetingKey}-{context.User?.Id}" } }; ``` ### Context Provide an `EvaluationContext` to pass contextual data for feature evaluation. | Field | Type | Required | Description | | ----------------------- | ---------------------------- | -------- | --------------------------------------- | | `TargetingKey` | `string` | Yes | Caching evaluation key. | | `IpAddress` | `string` | No | User's IP address. | | `CustomAttributes` | `Dictionary` | No | Additional context information. | | `User` | `UserContext` | No | User-specific information. | | `User.Id` | `string` | No | Unique identifier of the user. | | `User.Email` | `string` | No | Email address of the user. | | `User.Name` | `string` | No | Name of the user. | | `User.CustomAttributes` | `Dictionary` | No | Custom attributes specific to the user. | ### Swift URL: https://hyphen.ai/docs/feature-flags/provider-swift/ Description: A comprehensive guide to integrating and using the Hyphen Toggle Provider with OpenFeature in Swift applications on iOS and macOS. **Hyphen Toggle Provider** for Swift is an OpenFeature provider implementation that enables seamless feature flag evaluation in iOS and macOS applications. This provider integrates Hyphen's feature flagging system with the OpenFeature SDK, providing robust feature management with minimal setup. ## Installation Add the package using Swift Package Manager. Either through Xcode's UI (File > Swift Packages > Add Package Dependency) or by adding this line to your `Package.swift`: ```swift .package(url: "https://github.com/hyphen/hyphen-openfeature-swift", from: "0.2.0") ``` Select the `Toggle` target during installation. You'll also need the OpenFeature Swift SDK: ```swift .package(url: "https://github.com/open-feature/swift-sdk", from: "0.1.0") ``` ## Setup and Initialization To integrate the Hyphen Toggle provider into your application, follow these steps: 1. Configure the provider with your `publicKey`, `application` and `environment`.\ You can specify the environment in one of two formats: * Alternate ID (e.g., "production", "staging") — the environment in which your application is running. * Project Environment ID (e.g., `pevr_abc123`) — useful for internal references. 2. Register the provider with OpenFeature. ```swift import Toggle import OpenFeature let configuration = HyphenConfiguration( using: "your-public-key", application: "your-app-name", environment: "development" // or project environment ID ) let provider = HyphenProvider(using: configuration) await OpenFeatureAPI.shared.setProviderAndWait(provider: provider) ``` 3. Create an evaluation context for feature targeting evaluations, incorporating user or application context. ```swift let context = hyphenEvaluationContext( targetingKey: "user-123", values: [ "CustomAttributes": .structure([ "plan": .string("premium"), "betaAccess": .boolean(true) ]), "User": .structure([ "Email": .string("user@example.com"), "Name": .string("User Name"), "CustomAttributes": .structure([ "subscription": .string("pro") ]) ]) ] ) await OpenFeatureAPI.shared.setProviderAndWait( provider: provider, initialContext: context ) ``` ## Usage ### Basic Flag Evaluation ```swift let client = OpenFeatureAPI.shared.getClient() // Boolean flag let boolFlag = client.getBooleanValue(key: "my-bool-flag", defaultValue: false) // String flag let stringFlag = client.getStringValue(key: "my-string-flag", defaultValue: "default") // Number flag let numberFlag = client.getIntegerValue(key: "my-number-flag", defaultValue: 0) ``` ### Getting Flag Details For more detailed information about flag evaluations: ```swift let client = OpenFeatureAPI.shared.getClient() let flagDetails: FlagEvaluationDetails = client.getDetails( key: "my-feature-flag", defaultValue: false ) print("Value: \(flagDetails.value)") print("Variant: \(flagDetails.variant ?? "unknown")") print("Reason: \(flagDetails.reason ?? "unknown")") ``` ## Configuration ### Provider Options | Option | Type | Required | Description | | ------------------- | ---------- | :------- | -------------------------------------------------------------------------------------------- | | `publicKey` | `String` | Yes | Your Hyphen API public key. | | `application` | `String` | Yes | The application id or alternate id. | | `environment` | `String` | Yes | The environment identifier for the Hyphen project (project environment ID or alternateId). | | `horizonUrls` | `[String]` | No | Custom Hyphen Horizon URLs for fetching flags. | | `enableToggleUsage` | `Bool` | No | Enable/disable telemetry (default: true). | ### Network Configuration | Property | Type | Default | Description | | :----------------- | :----- | :------ | :----------------------------------- | | `useCellularAccess`| Bool | true | Allow cellular network usage. | | `timeout` | Number | 10 | Request timeout in seconds. | | `maxRetries` | Number | 3 | Maximum retry attempts. | | `retryDelay` | Number | 3 | Delay between retries in seconds. | | `cacheExpiration` | Number | 900 | Cache TTL in seconds. | ### Evaluation Context | Field | Type | Required | Description | | :----------------- | :---------------------- | :------- | :---------------------------------------------------- | | `targetingKey` | `String` | Yes | Unique identifier used for caching and targeting. | | `CustomAttributes` | `[String: Value]` | No | Custom attributes for targeting rules. | | `User` | `Structure` | No | User information including Email, Name, Id. | | `User.CustomAttributes` | `[String: Value]` | No | User-level custom properties. | ## Example ```swift import Toggle import OpenFeature @main struct MyApp: App { init() { Task { await setupFeatureFlags() } } func setupFeatureFlags() async { // Initialize the provider let configuration = HyphenConfiguration( using: "your-public-key", application: "your-app-name", environment: "development" ) let provider = HyphenProvider(using: configuration) // Create evaluation context let context = hyphenEvaluationContext( targetingKey: "user-123", values: [ "CustomAttributes": .structure([ "plan": .string("premium"), "betaAccess": .boolean(true) ]), "User": .structure([ "Email": .string("user@example.com"), "Name": .string("John Doe") ]) ] ) // Set provider with context await OpenFeatureAPI.shared.setProviderAndWait( provider: provider, initialContext: context ) // Evaluate flags let client = OpenFeatureAPI.shared.getClient() let showNewFeature = client.getBooleanValue( key: "new-feature-enabled", defaultValue: false ) let theme = client.getStringValue( key: "app-theme", defaultValue: "light" ) print("New Feature Enabled: \(showNewFeature)") print("App Theme: \(theme)") } var body: some Scene { WindowGroup { ContentView() } } } ``` ### Overview URL: https://hyphen.ai/docs/sdks/overview/ Description: An overview of native and OpenFeature SDKs for integrating Hyphen Toggle feature flags across multiple programming languages and environments. Hyphen provides native SDKs for the Hyphen platform. Use [Toggle](https://hyphen.ai/toggle) feature flags from your application code. Every SDK is open source and maintained on [GitHub](https://github.com/orgs/Hyphen/repositories). Pick your language below to get started. ## Available SDKs | Language | Package | Install | Getting started | | -------- | ------- | ------- | --------------- | | Node.js (server) | `@hyphen/sdk` | `npm install @hyphen/sdk` | [Node.js](nodejs) | | JavaScript (browser) | `@hyphen/browser-sdk` | `npm install @hyphen/browser-sdk` | [JavaScript (Browser)](browser) | | React | `@hyphen/react-sdk` | `npm install @hyphen/react-sdk` | [React](react) | | Python | `hyphen` | `pip install hyphen` | [Python](python) | | Go | `github.com/Hyphen/go-sdk` | `go get github.com/Hyphen/go-sdk` | [Go](go) | | .NET (C#) | `Hyphen.Sdk` | `dotnet add package Hyphen.Sdk` | [.NET](dotnet) | ## Authentication All native SDKs authenticate with a project **public key** (it starts with `public_`) and an **application id**. See [Get a Project's Public Key](../feature-flags/project-public-key) for where to find your public key in the Hyphen dashboard. ## Prefer OpenFeature? If you'd rather use the vendor-agnostic [OpenFeature](https://openfeature.dev) API for feature flags, Hyphen also ships OpenFeature providers for Go, JavaScript, Python, React, .NET, and Swift. See [Feature Flags → SDKs](../feature-flags/toggle-sdks) for the full list and setup guides. ### Node.js URL: https://hyphen.ai/docs/sdks/nodejs/ Description: Documentation for integrating and using Hyphen's native Node.js SDK to evaluate feature flags in server applications and APIs. The **[@hyphen/sdk](https://github.com/Hyphen/nodejs-sdk)** is Hyphen's native Node.js SDK for servers. Use [Toggle](https://hyphen.ai/toggle) feature flags from backend services, APIs, and server applications. ## Installation ```shell npm install @hyphen/sdk ``` ## Authentication The SDK authenticates with your project **public key** (it starts with `public_`) and your **application id**. See [Get a Project's Public Key](../feature-flags/project-public-key) for where to find these in the Hyphen dashboard. You can pass them directly or provide them via environment variables: ```shell HYPHEN_PUBLIC_API_KEY=public_your_api_key HYPHEN_APPLICATION_ID=your_application_id ``` ## Initialization ```javascript import { Hyphen } from '@hyphen/sdk'; const hyphen = new Hyphen({ publicApiKey: 'public_your_api_key', applicationId: 'your_application_id', }); ``` ## Usage Evaluate a boolean feature flag, falling back to a default value if it can't be resolved: ```javascript const enabled = await hyphen.toggle.getBoolean('hyphen-sdk-boolean', false); if (enabled) { // Execute new feature code } ``` ## See also - [GitHub: Hyphen/nodejs-sdk](https://github.com/Hyphen/nodejs-sdk) - Prefer [OpenFeature](https://openfeature.dev)? Use the [JavaScript (Node) provider](../feature-flags/provider-javascript-node). ### JavaScript (Browser) URL: https://hyphen.ai/docs/sdks/browser/ Description: Learn how to install, initialize, and evaluate feature flags in the browser using the official Hyphen JavaScript browser SDK. The **[@hyphen/browser-sdk](https://github.com/Hyphen/browser-sdk)** is Hyphen's native client-side JavaScript SDK for web browsers. It's optimized for evaluating [Toggle](https://hyphen.ai/toggle) feature flags in the browser with a minimal bundle size. ## Installation ```shell npm install @hyphen/browser-sdk ``` ## Authentication The SDK authenticates with your project **public key** (it starts with `public_`) and your **application id**. See [Get a Project's Public Key](../feature-flags/project-public-key) for where to find these in the Hyphen dashboard. ## Initialization Provide a `defaultContext` describing the current user so flags can be targeted correctly: ```javascript import { Toggle } from '@hyphen/browser-sdk'; const toggle = new Toggle({ publicApiKey: 'public_your-api-key-here', applicationId: 'your-app-id', environment: 'production', defaultContext: { targetingKey: 'user-123', user: { id: 'user-123', email: 'user@example.com', name: 'John Doe', }, }, }); ``` ## Usage ```javascript const isEnabled = await toggle.getBoolean('feature-flag', false); if (isEnabled) { console.log('Feature is enabled!'); } ``` ## See also - [GitHub: Hyphen/browser-sdk](https://github.com/Hyphen/browser-sdk) - Prefer [OpenFeature](https://openfeature.dev)? Use the [JavaScript (Web) provider](../feature-flags/provider-javascript-web). ### React URL: https://hyphen.ai/docs/sdks/react/ Description: Learn how to install, configure, and use the official Hyphen React SDK to evaluate feature flags in React applications. The **[@hyphen/react-sdk](https://github.com/Hyphen/react-sdk)** is Hyphen's native React SDK. It provides a provider component and hooks for evaluating [Toggle](https://hyphen.ai/toggle) feature flags in React applications. ## Installation ```shell npm install @hyphen/react-sdk ``` ## Authentication The SDK authenticates with your project **public key** (it starts with `public_`) and your **application id**. See [Get a Project's Public Key](../feature-flags/project-public-key) for where to find these in the Hyphen dashboard. ## Initialization Wrap your application in the `ToggleProvider`: ```tsx import { ToggleProvider } from '@hyphen/react-sdk'; import App from './App'; function Root() { return ( ); } ``` ## Usage Read flags anywhere inside the provider with the `useToggle` hook: ```tsx import { useToggle } from '@hyphen/react-sdk'; function MyComponent() { const toggle = useToggle(); const isNewFeatureEnabled = toggle.getBoolean('new-feature', false); return
{isNewFeatureEnabled && }
; } ``` ## See also - [GitHub: Hyphen/react-sdk](https://github.com/Hyphen/react-sdk) - Prefer [OpenFeature](https://openfeature.dev)? Use the [React provider](../feature-flags/provider-react). ### Python URL: https://hyphen.ai/docs/sdks/python/ Description: A guide to installing, configuring, and using Hyphen's native Python SDK for evaluating feature flags. The **[hyphen](https://github.com/Hyphen/python-sdk)** package is Hyphen's native Python SDK for evaluating [Toggle](https://hyphen.ai/toggle) feature flags in Python applications and services. ## Installation ```shell pip install hyphen ``` ## Authentication The SDK requires an **application id** and an **api key**. See [Get a Project's Public Key](../feature-flags/project-public-key) for where to find these in the Hyphen dashboard. You can pass them directly or provide them via environment variables: ```shell export HYPHEN_API_KEY="your_api_key" export HYPHEN_APPLICATION_ID="your_application_id" ``` ## Initialization ```python from hyphen import FeatureToggle toggle = FeatureToggle( application_id='your_application_id', api_key='your_api_key', ) ``` ## Usage Retrieve a boolean feature flag with a fallback default value: ```python enabled = toggle.get_boolean('my-feature', default=False) print('Feature enabled:', enabled) ``` ## See also - [GitHub: Hyphen/python-sdk](https://github.com/Hyphen/python-sdk) - Prefer [OpenFeature](https://openfeature.dev)? Use the [Python provider](../feature-flags/provider-python). ### Go URL: https://hyphen.ai/docs/sdks/go/ Description: Learn how to install, configure, and evaluate feature flags using Hyphen's native Go SDK. The **[go-sdk](https://github.com/Hyphen/go-sdk)** is Hyphen's native Go SDK for evaluating [Toggle](https://hyphen.ai/toggle) feature flags in Go applications and services. ## Installation ```shell go get github.com/Hyphen/go-sdk ``` ## Authentication The SDK requires a project **public key** (it starts with `public_`) and an **application id**. See [Get a Project's Public Key](../feature-flags/project-public-key) for where to find these in the Hyphen dashboard. These can be provided as options during initialization or via environment variables: ```shell HYPHEN_PUBLIC_API_KEY=public_your_api_key HYPHEN_APPLICATION_ID=your_application_id ``` ## Initialization The SDK uses functional options to configure the client: ```go client, err := hyphen.New( hyphen.WithPublicAPIKey("public_your_api_key"), hyphen.WithApplicationID("your_application_id"), ) if err != nil { log.Fatal(err) } ``` ## Usage Retrieve a boolean feature flag with a default fallback: ```go result := client.Toggle.GetBoolean( context.Background(), "hyphen-sdk-boolean", false, nil, ) fmt.Printf("Boolean toggle value: %v\n", result) ``` ## See also - [GitHub: Hyphen/go-sdk](https://github.com/Hyphen/go-sdk) - Prefer [OpenFeature](https://openfeature.dev)? Use the [Go provider](../feature-flags/provider-go). ### .NET URL: https://hyphen.ai/docs/sdks/dotnet/ Description: Learn how to install, configure, and use the Hyphen.Sdk for .NET to evaluate feature flags using native dependency injection. The **[Hyphen.Sdk](https://github.com/Hyphen/dotnet-sdk)** is Hyphen's native .NET SDK. It integrates with the standard .NET host builder and dependency injection so you can use Hyphen services — including [Toggle](https://hyphen.ai/toggle) feature flags — across your application. ## Installation ```shell dotnet add package Hyphen.Sdk ``` ## Authentication The SDK authenticates with your project **public key** and **application id**. See [Get a Project's Public Key](../feature-flags/project-public-key) for where to find these in the Hyphen dashboard. ## Initialization Register the Toggle service with the host builder and configure your credentials: ```csharp builder.Services.AddToggle(); builder.Services.Configure(options => { options.ProjectPublicKey = "public_your_public_key"; options.ApplicationId = "your_application_id"; options.Environment = "production"; }); ``` ## Usage Inject the `IToggle` service and evaluate a flag: ```csharp public class MyService { private readonly IToggle _toggle; public MyService(IToggle toggle) { _toggle = toggle; } public async Task IsEnabledAsync() { var result = await _toggle.Evaluate("your-toggle-key"); return result.Value ?? false; // fall back to a default when null } } ``` ## See also - [GitHub: Hyphen/dotnet-sdk](https://github.com/Hyphen/dotnet-sdk) - Prefer [OpenFeature](https://openfeature.dev)? Use the [.NET provider](../feature-flags/provider-dotnet). ### Integrations Overview URL: https://hyphen.ai/docs/integrations/overview/ Description: An overview of supported external integrations and connection types available in Hyphen, including cloud providers, repositories, and observability tools. An integration connects your Hyphen organization to an external service. A connection links a specific Hyphen resource to a resource in that service. For example, an AWS integration authorizes access to your AWS organization. Its Cloud Workspace connections link project environments to AWS accounts. One integration can support several connection types. See [Connection Types](/docs/integrations/connection-types/) for their purposes, provider resources, and requirements. If your service requires an IP allowlist, see [Static IP Addresses](/docs/integrations/static-ip-addresses/). ## Available Integrations The tables below list the available integrations and their current connection types. Some features depend on the features enabled for your organization. ### Cloud Infrastructure and Hosting | Integration | Purpose | Supported connections | | --- | --- | --- | | [Amazon Web Services (AWS)](/docs/integrations/aws-integration/) | Connect AWS accounts, infrastructure, and EKS telemetry. | Folder, Cloud Workspace, Container Registry, Network Group, Cloud Native Container, DNS Zone, DNS Record, Load Balancer, Backend Pool, Backend Endpoint, Custom Domain, Object Storage, Managed Kubernetes Cluster, Kubernetes Observability. | | [Cloudflare](/docs/integrations/cloudflare/) | Connect static sites, DNS, and traffic routes. | Site Registry, Static Site, DNS Zone, DNS Record, Load Balancer, Backend Pool, Backend Endpoint. | | [Google Cloud](/docs/integrations/google-cloud-integration/) | Connect Google Cloud projects, infrastructure, and GKE telemetry. | Folder, Cloud Workspace, Container Registry, Proxy Container Registry, Network Group, Cloud Native Container, DNS Zone, DNS Record, Load Balancer, Backend Pool, Backend Endpoint, Custom Domain, Object Storage, Managed Kubernetes Cluster, Kubernetes Observability. | | [Microsoft Azure](/docs/integrations/azure-integration-setup-guide/) | Connect Azure resource groups, infrastructure, and AKS telemetry. | Cloud Workspace, Container Registry, Network Group, Cloud Native Container, DNS Zone, DNS Record, Load Balancer, Backend Pool, Backend Endpoint, Custom Domain, Object Storage, Managed Kubernetes Cluster, Kubernetes Observability. | ### Code and Container Images | Integration | Purpose | Supported connections | | --- | --- | --- | | [Amazon Web Services (AWS)](/docs/integrations/aws-integration/) | Store container images in Amazon ECR. | Container Registry. | | [Docker Hub](/docs/integrations/docker-hub/) | Connect a container image repository. | Container Registry. | | [GitHub](/docs/integrations/github-integration/) | Link source repositories to Hyphen projects, apps, or Kubernetes clusters. | Code Repository. | | [Google Cloud](/docs/integrations/google-cloud-integration/) | Store container images in Artifact Registry and provide a registry proxy. | Container Registry, Proxy Container Registry. | | [Microsoft Azure](/docs/integrations/azure-integration-setup-guide/) | Store container images in Azure Container Registry. | Container Registry. | ### Communication and Collaboration | Integration | Purpose | Supported connections | | --- | --- | --- | | [Google Workspace](/docs/integrations/google-workspace-integration/) | Connect Google Groups to Hyphen resources. | Distribution List. | | [Microsoft Office 365](/docs/integrations/microsoft-office-365/) | Connect Microsoft 365 groups to Hyphen resources. | Distribution List. | | [Microsoft Teams](/docs/integrations/microsoft-teams/) | Connect team channels in Microsoft Teams. | Channel. | | [Slack](/docs/integrations/slack-integration/) | Connect team channels and use Hyphen through Slack. | Channel. | ### Application and Kubernetes Observability | Integration | Purpose | Supported connections | | --- | --- | --- | | [Amazon Web Services (AWS)](/docs/integrations/aws-integration/) | Read EKS telemetry through CloudWatch. | Kubernetes Observability. | | [Datadog](/docs/integrations/datadog/) | Read application logs and Kubernetes telemetry. | APM, Kubernetes Observability. | | [Google Cloud](/docs/integrations/google-cloud-integration/) | Read GKE telemetry through Google Cloud services. | Kubernetes Observability. | | [Microsoft Azure](/docs/integrations/azure-integration-setup-guide/) | Read AKS telemetry through Azure Monitor. | Kubernetes Observability. | | [New Relic](/docs/integrations/new-relic/) | Read application logs and Kubernetes telemetry. | APM, Kubernetes Observability. | | [SigNoz](/docs/integrations/signoz/) | Read telemetry from SigNoz Cloud or your own SigNoz instance. | APM, Kubernetes Observability. | ### Identity, Access, and Device Reports Integrations can support reports in addition to their other connection types. Reports use the organization integration directly and do not require separate resource connections. | Integration | Report data | | --- | --- | | [GitHub](/docs/integrations/github-integration/) | Access assignments for comparison with an identity directory. Device inventory reports are not supported. | | [Google Workspace](/docs/integrations/google-workspace-integration/) | Identity and access data. Device inventory reports are not supported. | | [Microsoft Azure](/docs/integrations/azure-integration-setup-guide/) | Microsoft Entra ID identity, access, and device inventory data. | | [Microsoft Office 365](/docs/integrations/microsoft-office-365/) | Microsoft Entra ID identity, access, and device inventory data. | | [Mosyle Business](/docs/integrations/mosyle/) | Apple device inventory. | | [Okta](/docs/integrations/okta/) | Users, groups, applications, and access assignments. | Reports read provider data. They do not create users, groups, or devices. Okta and Mosyle Business do not support separate resource connections. Mosyle Manager for education is not supported. ## Connect an Integration 1. Open **Integrations** in your Hyphen organization. 2. Select an integration. 3. Complete its authorization or credential setup. 4. Open the team, project, app, or cluster that needs a connection. 5. Select the required connection type. 6. Supply the provider resource identifier when required. Some types can connect to existing resources or create new resources. Others require an existing resource, such as an APM application or managed Kubernetes cluster. The provider guide describes the required input and any verification steps. A connection must reach **Ready** before Hyphen can use it. ## Retired Integrations Jira, npm, and incident.io are retired integrations. They are not available for new integration setup. Their guides remain as references for older configurations: - [Jira](/docs/integrations/jira/) - [npm](/docs/integrations/npm/) - [incident.io](/docs/integrations/incidentio/) ### Connection Types URL: https://hyphen.ai/docs/integrations/connection-types/ Description: A comprehensive reference guide to Hyphen connection types across collaboration, cloud infrastructure, registries, deployment, and telemetry integrations. A connection links a Hyphen resource to a resource in an external service. Each integration supports a specific set of connection types. See [Integrations Overview](/docs/integrations/overview/) for the available integrations and the types that each supports. The connection type determines which resource Hyphen connects and how Hyphen uses it. The same type can refer to different resources in different services. If your service requires an IP allowlist, see [Static IP Addresses](/docs/integrations/static-ip-addresses/). ## Collaboration and Source Code | Connection type | What it connects | Supported integrations | | --- | --- | --- | | Distribution List | A Hyphen organization, team, project, project environment, or app connects to a group with an email address. | Google Workspace: Google Group. Microsoft Office 365: Microsoft 365 group. | | Channel | A Hyphen team connects to a conversation channel. | Slack: Slack channel. Microsoft Teams: channel within a Microsoft team. | | Code Repository | A Hyphen project, app, or Kubernetes cluster connects to a source repository. A connection alone does not start a deployment. | GitHub. | ## Cloud Organization and Build Artifacts | Connection type | Purpose | Supported integrations and resources | | --- | --- | --- | | Folder | Organize the cloud resources for a Hyphen project. | AWS: organizational unit. Google Cloud: folder. | | Cloud Workspace | Provide the cloud resource scope for a project or project environment. | AWS: account. Azure: resource group. Google Cloud: project. | | Container Registry | Store container images for a Hyphen project. | AWS: ECR. Azure: Container Registry. Google Cloud: Artifact Registry. Docker Hub: repository. | | Proxy Container Registry | Provide a registry proxy for a project environment. | Google Cloud. | | Site Registry | Store static site builds for a Hyphen project. | Cloudflare. | | Static Site | Connect a static site deployment to its hosted site and URL. | Cloudflare. | Container Registry stores container images. Site Registry stores static site builds. Static Site represents the hosted site that serves a deployment. See [Builds](/docs/deploy/builds/) for container images and [Deployment Previews](/docs/deploy/deployment-previews/) for preview deployments. ## Deployment Infrastructure Hyphen can prepare these connections as part of a deployment. You do not need to add each infrastructure connection manually. | Connection type | Purpose | Supported integrations | | --- | --- | --- | | Network Group | Provide network resources for an environment or region. | AWS, Azure, Google Cloud. | | Cloud Native Container | Run an app deployment instance as a container service. | AWS: ECS. Azure: Container Apps. Google Cloud: Cloud Run. | | DNS Zone | Connect a Hyphen zone to a provider DNS zone. | AWS, Azure, Google Cloud, Cloudflare. | | DNS Record | Connect a resource record or value to a provider DNS record. | AWS, Azure, Google Cloud, Cloudflare. | | Load Balancer | Route traffic through an environment ingress. | AWS, Azure, Google Cloud, Cloudflare. | | Backend Pool | Group the backends for an app deployment. | AWS, Azure, Google Cloud, Cloudflare. | | Backend Endpoint | Connect an ingress or app deployment instance to a traffic destination. | AWS, Azure, Google Cloud, Cloudflare. | | Custom Domain | Connect a domain and its HTTPS configuration to an environment ingress. | AWS, Azure, Google Cloud. | | Object Storage | Connect environment storage to a provider bucket or container. | AWS: S3. Azure: Blob Storage. Google Cloud: Cloud Storage. | See [Deploy Quickstart](/docs/deploy/deploy-quickstart/) and [Storage](/docs/deploy/storage/) for deployment requirements and storage configuration. ## Telemetry and Managed Kubernetes | Connection type | Purpose | Supported integrations | | --- | --- | --- | | APM | Map a Hyphen app to existing application names or services so Agent can read logs for a selected environment. | New Relic, Datadog, SigNoz. | | Kubernetes Observability | Link a registered Kubernetes cluster to its runtime metrics and logs. | AWS, Azure, Google Cloud, New Relic, Datadog, SigNoz. | | Managed Kubernetes Cluster | Link a registered cluster to its existing managed cloud cluster. This connection does not create a cluster. | AWS: EKS. Azure: AKS. Google Cloud: GKE. | APM supports two modes: - **Shared by environment attribute:** All environments use one application or service name. An attribute separates their logs. - **Per environment:** Each project environment maps to a separate application or service name. Kubernetes Observability and Managed Kubernetes Cluster serve different purposes. Observability supplies telemetry; the managed cluster connection identifies the cluster in its cloud provider. AWS uses the EKS cluster ARN. Azure uses the AKS resource ID. Google Cloud uses the full GKE resource name. The cloud integrations use CloudWatch, Azure Monitor, or Google Cloud telemetry. New Relic, Datadog, and SigNoz use their own cluster identifiers. These connections require an existing cluster and the required provider permissions. Telemetry connections also require data collection in the provider. See [Log Analysis](/docs/agent/log-analysis/) and [Kubernetes Observability](/docs/kubernetes/observability/) for telemetry configuration. ### Static IP Addresses URL: https://hyphen.ai/docs/integrations/static-ip-addresses/ Description: Static IP addresses and CIDR blocks used by Hyphen integrations for allowlisting external network requests. Hyphen integrations use these static external IP addresses for requests to external services. If your service restricts access by source IP address, add these addresses to its allowlist. Hyphen updates this list periodically. You can use the file URLs below to automate updates to your allowlist. Each text file contains one entry per line and no headers. ## IP Addresses Copy the list with its copy button. To download the list, save the [IP address file](/docs/downloads/integration-ip-addresses.txt). ```text 34.169.25.8 136.66.221.149 136.87.198.124 136.109.200.238 34.123.110.184 35.226.249.254 136.112.56.176 136.65.211.169 ``` ## CIDR Notation Use this list if your service requires CIDR notation. Each `/32` entry specifies one IPv4 address. Copy the list with its copy button. To download the list, save the [CIDR file](/docs/downloads/integration-ip-addresses-cidr.txt). ```text 34.169.25.8/32 136.66.221.149/32 136.87.198.124/32 136.109.200.238/32 34.123.110.184/32 35.226.249.254/32 136.112.56.176/32 136.65.211.169/32 ``` ### AWS URL: https://hyphen.ai/docs/integrations/aws-integration/ Description: Step-by-step documentation for integrating AWS with Hyphen using CloudFormation, IAM Identity Center, and automated resource provisioning. # Prerequisites This AWS integration relies on [IAM Identity Center](https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html) to manage access. An Identity Store must be set up before the integration can be added to Hyphen. # Setup ### 1. Create or sign into your Amazon Web Services account [Sign in to the AWS console](https://console.aws.amazon.com/) _or_ [Create a new AWS account](https://aws.amazon.com/free) *** ### 2. Create an Organization in your AWS account If your account is not already part of an AWS Organization, [create one here](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_create.html). *** ### 3. Launch the CloudFormation Stack Click the button in the integration setup guide to open the pre-filled CloudFormation stack creation page. > The stack will automatically provision the required IAM Role, permissions, SSO Instance ID, and Administrator permission set for Hyphen. *** ### 4. Confirm IAM Resource Creation On the AWS CloudFormation page: * Scroll down to the **Capabilities** section. * Check the following box: **“I acknowledge that AWS CloudFormation might create IAM resources with custom names.”** Then click **Create stack**. *** ### 5. What Resources Will Be Created? When you launch the integration stack, Hyphen automatically provisions the following resources in your AWS account via CloudFormation: #### ✅ **IAM Role: `hyphen`** * Grants Hyphen access to perform specific actions in your AWS Organization and SSO. * Can only be assumed by Hyphen service principals: * `arn:aws:iam::640168453690:user/hyphen` * `arn:aws:iam::640168453690:role/hyphen-integration-role-prod` #### ✅ **Attached IAM Policy** * Grants only the minimum required permissions to: * Manage AWS Organizations (list/move/create accounts and OUs) * Access AWS SSO (list and assign permission sets) * Interact with AWS Identity Store (groups and memberships) > ⚠️ **Note:** All permissions are scoped to the minimum necessary for the integration to work securely. #### ✅ **Administrator SSO Permission Set** * Creates a new `AdministratorAccess` permission set in your AWS SSO instance. * Grants full admin access using AWS’s managed `AdministratorAccess` policy. * Used to assign roles to users through Hyphen. #### ✅ **SSO Instance Auto-Detection** * If multiple SSO instances exist, the oldest one is selected automatically. #### ✅ **Integration Registration** * The stack reports back to Hyphen with integration metadata: * AWS Account ID and Region * IAM Role ARN * SSO Instance ID * Admin Permission Set ARN *** ### Why Are These Resources Needed? Hyphen uses these resources to securely automate user, account, and permission management in your AWS environment — without requiring you to set things up manually. *** ### 6. Wait for Completion Once the stack is launched, the setup will run automatically in the background. > Please wait a moment — Hyphen will redirect you to the integration details page as soon as the setup is complete. *** # Configuration | **Field** | **Type** | **Description** | | ------------------ | ------------------- | ------------------------------------------------------------------------ | | `region` | `string` (required) | AWS region provided by the user, used for future requests. | | `accountId` | `string` (required) | AWS account ID provided by the user, used for future requests. | | `name` | `string` | Management account name, pulled during setup for reference and display. | | `identityStoreId` | `string` | Identity store ID, pulled during setup for reference and display. | | `identityStoreArn` | `string` | Identity store ARN, pulled during setup for reference and display. | | `permissionSetArn` | `string` | Admin permission set ARN, pulled during setup for reference and display. | *** # Connections ## Permission Group Permission Group connections link to AWS Groups in AWS IAM Identity Center. Hyphen will automatically create a new group if a connection input is not provided. When creating a new group, Hyphen will use the Team name. ### Configuration | **Field** | **Type** | **Description** | | ------------ | -------- | ------------------------------------------------------------ | | `groupId` | `string` | Unique group ID in AWS, used for reference and future calls. | | `instanceId` | `string` | `identityStoreId` from the integration configuration. | | `groupName` | `string` | Group name in AWS, used for display. | ### Connection Input Provide the AWS Group name to connect to an existing Group. ### Verification A verification email will be sent to the AWS Management Account email to verify existing groups. ### Access A User connection will be added as a member when added to the group. *** ## Folder Folder connections link to existing Organization Units in AWS or create a new one if none is provided. When creating a new organization unit, the Hyphen Project name will be used as the folder name, adjusted to contain only alphanumeric characters. ### Configuration | **Field** | **Type** | **Description** | | -------------------- | -------- | -------------------------------------------------------------- | | `organizationUnitId` | `string` | Unique organization unit ID in AWS, used for reference. | | `name` | `string` | Organization unit name in AWS, used for display and reference. | ### Connection Input Provide the AWS organization unit ID to connect to an existing Organization Unit. *** ## Cloud Workspace Cloud Workspace connections link to existing AWS Accounts or create a new one if none is provided. An AWS account relies on a Folder connection. If no Folder connection exists for the Hyphen project environment, a new Folder will be created. A Cloud Workspace connection requires a Google Workspace or Office 365 Distribution List. If neither exists, a new one will be created. When creating a new account, the account name will combine the Hyphen project name and environment name. ### Configuration | **Field** | **Type** | **Description** | | ----------- | -------- | ----------------------------------------------------------------- | | `accountId` | `string` | Unique account ID in AWS, used for reference and future requests. | | `name` | `string` | Account name in AWS, used for display and future requests. | | `parentId` | `string` | Parent folder connection `organizationUnitId`. | | `email` | `string` | Account or distribution list email, used for future requests. | ### Connection Input Provide the AWS account ID to connect to an existing Account. ### Verification A verification email will be sent to the AWS account email to verify existing accounts. ### Smart Access A Team connection will be added as a group when added to the account. *** ## User User connections link to AWS Users in AWS IAM Identity Center. Hyphen will not automatically create Users in AWS. If no connection input is provided, the Hyphen Member's email address will be used to look up the AWS User. ### Configuration | **Field** | **Type** | **Description** | | ------------ | -------- | ----------------------------------------------------- | | `userId` | `string` | Unique user ID in AWS. | | `email` | `string` | Email in AWS. | | `instanceId` | `string` | `identityStoreId` from the integration configuration. | | `username` | `string` | Unique username of the User in AWS | ### Connection Input Provide the username of the AWS User account to connect to an existing User. ## Object Storage Object Storage connections link to existing S3 buckets in AWS or create a new one if none is provided. Object Storage requires a Cloud Workspace connection for the target project environment. When creating a new bucket, the name is derived from the Hyphen project and environment alternate IDs (e.g. `{projectAlternateId}-{envAlternateId}`). ### Configuration | **Field** | **Type** | **Description** | | ------------ | -------- | ------------------------------------------------------ | | `bucketName` | `string` | S3 bucket name. | | `bucketArn` | `string` | ARN of the S3 bucket. | | `region` | `string` | AWS region where the bucket is located (e.g. `us-east-1`). | | `username` | `string` | IAM user name created for bucket access. | ### Connection Input Provide the S3 bucket name to connect to an existing bucket. ### Access Hyphen creates a dedicated IAM user with a scoped bucket policy and generates access credentials (access key ID and secret) that are injected into the application at runtime. *** ## First Deployment: Why It May Take Longer During the first deployment, the platform must provision and initialize new infrastructure components required to run the application (such as compute, networking, and traffic routing services). These components need time to be created, validated, and become fully available across the system. In some cases, they also require global propagation before traffic can be routed reliably. As a result, even if the deployment reports success, the application may take a few additional minutes to become responsive on its first run. Subsequent deployments reuse the existing infrastructure and typically become available much faster. ### Azure URL: https://hyphen.ai/docs/integrations/azure-integration-setup-guide/ Description: Learn how to connect and configure Microsoft Azure with Hyphen, covering setup requirements, permissions, and resource connections. ## Setup 1. **Create or sign into your Azure account** 2. **Connect your Azure organization to Hyphen** - Sign in with your Azure account - Select the Azure tenant you wish to connect - Select a subscription to use for resource management > ⚠️ **Important:** The user performing the integration **must have the Global Administrator role** in the Azure Active Directory tenant and **must be assigned as Owner** on the subscription that will be used. That's it! After you've completed these steps, Hyphen will automatically: - Verify the credentials and selected tenant - Grant necessary permissions to the Hyphen service - Configure the required role assignments for resource management ## Required Permissions The one-click installation requires the following Microsoft Graph API permissions: - `CrossTenantInformation.ReadBasic.All` - `AppRoleAssignment.ReadWrite.All` - `Application.ReadWrite.All` - `RoleManagement.ReadWrite.Directory` ## Required OAuth Scopes To perform the setup and ongoing management securely, Hyphen requires access to the following Azure scope: ### `https://management.azure.com/user_impersonation` This scope allows Hyphen to manage resources across your Azure organization. It is required to: - List subscriptions and tenants - Create and manage resource groups - Assign roles and permissions to users and groups - Manage Azure resources on your behalf These permissions are necessary to let Hyphen create and manage Azure resources and access control on your behalf. *** # Configuration | **Field** | **Type** | **Description** | | ---------------- | ------------------- | --------------------------------------------------------------------------- | | `azureTenantId` | `string` (required) | Azure Tenant ID provided by the user, used to authenticate future requests. | | `subscriptionId` | `string` (required) | Azure Subscription ID provided by the user, used for future requests. | | `name` | `string` | Name pulled during setup, used for reference and display. | *** # Connections ## Permission Group Permission Group connections link to existing Azure Groups or create a new group if none is provided. When creating a new group in Azure, the name will be the Hyphen Team name. ### Configuration | **Field** | **Type** | **Description** | | ----------- | -------- | -------------------------------------------------------------- | | `groupId` | `string` | Unique group ID in Azure, used for reference and future calls. | | `groupName` | `string` | Group name in Azure, used for display. | ### Connection Input Provide the Azure group ID to connect to an existing group. ### Verification A verification email will be sent to the group owners' emails to verify existing groups. ### Access A Member connection will be added as a member when added to the group. *** ## Cloud Workspace Cloud Workspace connections link to existing Resource Groups in Azure or create a new one if none is provided. When creating a new resource group, the name will combine the Hyphen project name and the Hyphen project environment name. ### Configuration | **Field** | **Type** | **Description** | | ------------------- | -------- | -------------------------------------------------------------------------- | | `resourceGroupId` | `string` | Unique resource group ID in Azure, used for reference and future requests. | | `resourceGroupName` | `string` | Unique resource group name in Azure, used for display and reference. | ### Connection Input Provide the Azure resource group name to connect to an existing Resource Group. ### Access A Team connection will be added with the “Owner” role when added to the resource group. *** ## User User connections link to existing Azure Users. If no input is provided, the member email will be used to find the existing User. ### Configuration | **Field** | **Type** | **Description** | | --------- | -------- | --------------------------- | | `userId` | `string` | Unique user ID in Azure. | | `email` | `string` | Unique user email in Azure. | ### Connection Input Provide the Azure member email to connect to an existing User. *** ## Object Storage Object Storage connections link to existing Blob Storage containers in Azure or create a new one if none is provided. Object Storage requires a Cloud Workspace connection for the target project environment. When creating a new container, both the storage account name and container name are derived from the Hyphen project and environment alternate IDs. ### Configuration | **Field** | **Type** | **Description** | | --------------------- | -------- | ------------------------------------------------------------ | | `storageAccountName` | `string` | Azure Storage Account name. | | `storageAccountId` | `string` | Unique resource ID of the storage account. | | `containerName` | `string` | Blob container name within the storage account. | | `resourceGroupName` | `string` | Resource group containing the storage account. | | `tenantId` | `string` | Azure tenant ID. | ### Connection Input Provide the Blob container name to connect to an existing container. ### Access Hyphen creates a dedicated service principal (Microsoft Entra ID) with a scoped RBAC role assignment on the container and generates a client secret that is injected into the application at runtime. ### Cloudflare URL: https://hyphen.ai/docs/integrations/cloudflare/ Description: Configure and deploy static websites to Cloudflare Workers Static Assets and R2 using Hyphen. The Cloudflare integration supports static sites, DNS, and traffic routes. Hyphen stores static builds in a private R2 bucket and publishes them through [Workers Static Assets](https://developers.cloudflare.com/workers/static-assets/). ## Connect Your Account ### Prepare Cloudflare 1. Configure a `workers.dev` subdomain in your Cloudflare account. 2. Enable [R2](https://developers.cloudflare.com/r2/get-started/) in that account. 3. Create an [account API token](https://dash.cloudflare.com/?to=/:account/api-tokens) with the permissions below. | Scope | Permission | Purpose | | --- | --- | --- | | Account | `Account Settings:Read` | Check account access. | | Account | `Workers:Admin` | Create Workers and publish static sites. | | Account | `Workers R2 Storage:Edit` | Create a private site registry and upload builds. | | Account | `Load Balancing: Monitors And Pools:Edit` | Manage load balancer monitors and pools. | | Zone | `Zone:Read` | Read DNS zones. | | Zone | `Load Balancers:Edit` | Manage load balancers. | | Zone | `DNS:Edit` | Manage DNS records. | Scope `Workers:Admin` to all current and future Workers in the selected account. Scope `Workers R2 Storage:Edit` to all current and future buckets. See [Workers permissions](https://developers.cloudflare.com/workers/authorization/workers/) for the provider's scope controls. For DNS and load balancers, grant access to each zone that Hyphen will manage. Static sites use the account's `workers.dev` subdomain without a custom DNS zone. ### Add the Integration 1. Open **Integrations** in your Hyphen organization. 2. Select **Cloudflare**. 3. Enter your **Account ID**. 4. Enter the account token in **API Token**. 5. If required, set **R2 jurisdiction (optional)** to `eu`, `us`, or `fedramp`. 6. Complete the account connection. Leave the jurisdiction field empty to use the default R2 endpoint. Hyphen manages R2 authentication with the account token; separate R2 access keys are not required. The account test checks account access. It does not verify a file upload or a site deployment. ## Create a Site Registry 1. Open your project's **Settings** → **Integrations**. 2. Add a **Site Registry** connection for Cloudflare. 3. Wait for the connection to reach **Ready**. Hyphen creates a private R2 bucket for the project's builds. A project can have one active Cloudflare Site Registry. A **Static Site** connection represents the deployed site and its public URL. See [Connection Types](/docs/integrations/connection-types/) for these resource types. ## Build and Deploy a Static Site 1. Initialize your local app folder with `hx init`. 2. Run your frontend build command to produce the website files. 3. Open the project's environment deployment in Hyphen. 4. Include the app with **App Type** set to **Static**. 5. Select **Cloudflare Workers** under **Deploy to**. 6. Save the deployment configuration. 7. Run this command from the initialized app folder: ```bash hx deploy --env production --type static ./dist ``` Replace `production` with your environment ID or alternate ID. Replace `./dist` with your frontend output directory. The CLI requires finished files; it does not run the frontend build command or Docker. To upload a build for a later deployment, run: ```bash hx build --type static ./dist ``` To deploy an uploaded build, run: ```bash hx deploy --env production --no-build --sites website:latest ``` Replace `website` with your app ID or alternate ID. The build must contain an artifact from the Cloudflare Site Registry for this project. The CLI uploads static files to every ready Site Registry on the project. Hyphen reads the retained files from R2 and publishes a Worker version with static assets. The deployment serves the site at `https://..workers.dev`. Each environment or preview has its own Worker. Open the URL from the deployment's resources after the run succeeds. ## Supported Files and Routes This deployment type serves static files. It does not run server code or publish executable Worker bundles. - Include HTML, CSS, browser JavaScript, images, and other static assets in the output directory. - Supply a directory of regular files, without symbolic links. - Include `_headers` or `_redirects` at the directory root for custom headers or redirects. - Include a root `404.html` for a custom error page. Without it, a root `index.html` enables the single-page application fallback. Hyphen applies these limits to Cloudflare site builds: | Limit | Maximum | | --- | --- | | Files per build | 10,000 | | Size per file | 25 MiB | | Total file size | 1 GiB | ## Check a Failed Build or Deployment - For a missing registry, check the project's Site Registry connection and its **Ready** status. - For a failed upload, check that R2 is enabled and the token has `Workers R2 Storage:Edit` access. - For a failed publication, check the `workers.dev` subdomain and the token's `Workers:Admin` scope. - For a missing artifact, upload the site again after the Cloudflare Site Registry is ready. See [Builds](/docs/deploy/builds/) for build requirements and the [CLI reference](/docs/introduction/cli/#deploy) for static and container selections. ### Docker Hub URL: https://hyphen.ai/docs/integrations/docker-hub/ Description: Step-by-step instructions for connecting and configuring a Docker Hub organization with Hyphen. # Setup 1. **Create or sign into your Docker Hub organization** 2. **Create an organization access token** While logged in as a user with administrative rights to the Docker Hub organization, use the Docker Hub Admin Console to create an Organization Access Token with these permissions: **Expiration Date** * None **Repository**: * Repository: All organization repositories * Scopes: check all boxes **Organization** * Scopes: check all boxes 3. **Create an admin user personal access token** **Expiration Date** * None **Access Permissions**: * Read, Write, Delete 4. **Connect Your Docker Hub organization to Hyphen** * Verify and enter the Organization name, access token, admin user name, and admin personal access token That's it! After you've completed these steps, Hyphen will automatically: * Grant necessary permissions to the Hyphen service * Configure the required role assignments for resource management
***
# Configuration
**Field** **Type** **Description**
`organizationName` `string` (required) Organization name
`adminUsername` `string` (required)
`secrets.encryptedOrganizationAccessToken` `string` (required) Organization access token with: * No expiration date * Access to all repositories and scopes * Access to all organization scopes
`secrets.encryptedPersonalAccessToken` `string` (required) Personal access token of Docker Hub organization admin user with: * No expiration date * Read, Write, Delete permissions
*** ### Google Cloud URL: https://hyphen.ai/docs/integrations/google-cloud-integration/ Description: Learn how to connect and configure your Google Cloud organization with Hyphen, manage required IAM permissions and OAuth scopes, and configure resource connections. # Setup ## 1. **Create or sign into your Google Cloud account** * [Sign in to Google Cloud console](https://console.cloud.google.com/)\ or * [Create a new Google Cloud account](https://cloud.google.com/docs/get-started) ## 2. **Connect your Google Cloud organization to Hyphen** * Sign in with your Google account * Select the GCP organization you wish to connect * (Optional) Select a billing account That's it! After you've completed these steps, Hyphen will automatically: * Verify the credentials and selected organization * Grant necessary permissions to the Hyphen service * Configure the domain-restricted sharing policy to allow access from Hyphen ## Required Permissions The one-click installation requires the following permissions: ``` resourcemanager.organizations.getIamPolicy resourcemanager.organizations.setIamPolicy resourcemanager.organizations.get billing.accounts.list orgpolicy.policies.create orgpolicy.policies.update orgpolicy.policies.get orgpolicy.policies.list resourcemanager.tagKeys.create resourcemanager.tagKeys.get resourcemanager.tagKeys.list resourcemanager.tagValues.create resourcemanager.tagValues.get resourcemanager.tagValues.list ``` ## Required OAuth Scopes To perform the setup and ongoing management securely, Hyphen requires access to specific Google Cloud scopes: ### `https://www.googleapis.com/auth/cloud-platform` This broad scope allows Hyphen to manage resources across your GCP organization. It is required to: * List organizations * Set the domain restricted sharing policy * Assign roles to the Hyphen service account, including: * Artifact Registry Administrator (`roles/artifactregistry.admin`) * Billing Account User (`roles/billing.user`) * Cloud Run Admin (`roles/run.admin`) * Compute Network Admin (`roles/compute.networkAdmin`) * Folder Admin (`roles/resourcemanager.folderAdmin`) * Organization Administrator (`roles/resourcemanager.organizationAdmin`) * Project Creator (`roles/resourcemanager.projectCreator`) * Secret Manager Admin (`roles/secretmanager.admin`) * Secret Manager Secret Version Manager (`roles/secretmanager.secretVersionManager`) * Service Account Admin (`roles/iam.serviceAccountAdmin`) * Service Account Key Admin (`roles/iam.serviceAccountKeyAdmin`) * Service Usage Admin (`roles/serviceusage.serviceUsageAdmin`) * Tag Viewer (`roles/resourcemanager.tagViewer`) * Tag User (`roles/resourcemanager.tagUser`) * Compute Load Balancer Admin (`roles/compute.loadBalancerAdmin`) * Cloud Asset Viewer (`roles/cloudasset.viewer`) * Kubernetes Engine Viewer (`roles/container.viewer`) * DNS Administrator (`roles/dns.admin`) * Certificate Manager Owner (`roles/certificatemanager.owner`) * Storage Admin (`roles/storage.admin`) * Logs Viewer (`roles/logging.viewer`) * Monitoring Viewer (`roles/monitoring.viewer`) * Kubernetes Engine Cluster Viewer (`roles/container.clusterViewer`) These roles are necessary to let Hyphen create and manage GCP projects and resources on your behalf. ### `https://www.googleapis.com/auth/cloud-billing.readonly` This scope allows Hyphen to: * List available billing accounts This is optional but recommended to allow you to associate a billing account during project creation. *** # Connections ## Permission Group Permission group connections correspond to Google Workspace distribution lists and require an existing Google Workspace integration within the Hyphen organization. Connections can link to existing Groups in Google Workspace, or a new group will be created if no input is provided. If a distribution list already exists for the same resource in Google Workspace, it will be used as the Permission Group connection. When creating a new Group in Google Workspace, the Hyphen team name will be used as the group name. ### Configuration | **Field** | **Type** | **Description** | | ------------ | -------- | --------------------------------------------------------- | | `groupId` | `string` | Unique group ID in Google Workspace. | | `groupName` | `string` | Display name of the group in Google Workspace. | | `groupEmail` | `string` | Unique group email used for reference in future requests. | ### Connection Input Provide the Google Workspace group email to create a connection to an existing Group. ### Verification | **Scenario** | **Action** | | ------------------ | ------------------------------------------------ | | Group has an owner | Verification handled by the owner. | | No owner exists | A verification email is sent to the group email. | *** ## Folder Folder connections can link to existing folders in Google Cloud, or a new folder will be created if no input is provided. When creating a new folder in Google Cloud, the Hyphen project name will be used as the folder name, adjusted to include only alphanumeric characters. ### Configuration | **Field** | **Type** | **Description** | | ------------ | -------- | ------------------------------------------- | | `folderId` | `string` | Unique folder ID in Google Cloud. | | `folderPath` | `string` | Path in the format `folders/{folderId}`. | | `folderName` | `string` | Display name of the folder in Google Cloud. | ### Connection Input Provide the Google Cloud folder ID to create a connection to an existing Folder. *** ## Cloud Workspace Cloud Workspace connections can link to existing projects in Google Cloud, or a new project will be created if no input is provided. A Google Cloud project relies on a Folder. If no Folder connection exists for the Hyphen project, a new Folder will be created. When creating a new project in Google Cloud, the project name will combine the Hyphen project name and the Hyphen project environment name. ### Configuration | **Field** | **Type** | **Description** | | ------------- | -------- | -------------------------------------------- | | `projectId` | `string` | Unique project ID in Google Cloud. | | `projectPath` | `string` | Path in the format `projects/{projectId}`. | | `projectName` | `string` | Display name of the project in Google Cloud. | ### Connection Input Provide the Google Cloud project ID to create a connection to an existing Project. ### Access A Team connection will be added with the "Owner" role when added to the project. *** ## User User connections correspond to Google Workspace users and require an existing Google Workspace integration within the Hyphen organization. User connections can only link to existing users in Google Workspace. If no input is provided, the member email will be used to locate the user. ### Configuration | **Field** | **Type** | **Description** | | --------- | -------- | -------------------------------------- | | `userId` | `string` | Unique user ID in Google Workspace. | | `email` | `string` | Unique user email in Google Workspace. | ### Connection Input A connection to an existing user can be created by providing the user email. *** ## Object Storage Object Storage connections link to existing GCS buckets in Google Cloud or create a new one if none is provided. Object Storage requires a Cloud Workspace connection for the target project environment. When creating a new bucket, the name is derived from the Hyphen project and environment alternate IDs (e.g. `{projectAlternateId}-{envAlternateId}`). ### Configuration | **Field** | **Type** | **Description** | | ------------ | -------- | ------------------------------------------------------ | | `bucketName` | `string` | GCS bucket name. | | `bucketPath` | `string` | Full bucket path in `gs://{bucketName}` format. | | `projectId` | `string` | GCP project ID where the bucket resides. | ### Connection Input Provide the GCS bucket name to connect to an existing bucket. ### Access Hyphen creates a dedicated service account with the Storage Admin role scoped to the bucket and generates a service account key (JSON) that is injected into the application at runtime. *** ## Kubernetes Observability Kubernetes Observability connections let Hyphen Agent query Google Cloud Monitoring metrics and Cloud Logging entries for a registered GKE cluster. ### Connection Input Provide the full GKE cluster resource name: ```text projects/PROJECT_ID/locations/LOCATION/clusters/CLUSTER_NAME ``` Hyphen validates that the cluster exists and stores its project, location, and cluster name with the connection. ### Required Access The Hyphen service account needs: - Logs Viewer (`roles/logging.viewer`) - Monitoring Viewer (`roles/monitoring.viewer`) - Kubernetes Engine Cluster Viewer (`roles/container.clusterViewer`) The Google Cloud one-click setup assigns these roles. If the connection reports that the cluster cannot be found, verify the resource name and confirm the roles are present. Hyphen may create the connection automatically when Horizon detects Google Cloud observability, the organization has one Google Cloud integration, and Cloud Asset Inventory can resolve the GKE cluster. Otherwise, connect it from the cluster's **Settings** tab. For complete setup instructions, see [Kubernetes Observability](/docs/kubernetes/observability). [Test](#) [Connect](#) ### Google Workspace URL: https://hyphen.ai/docs/integrations/google-workspace-integration/ Description: Learn how to connect and configure Google Workspace with Hyphen using domain-wide delegation, manage distribution lists, and set up user connections. # Setup ### 1. **Create or sign into your Google Workspace account** * [Sign in to Google Admin Console](https://admin.google.com)\ or * [Create a new Google Workspace](https://workspace.google.com/) ### 2. **Authorize a service account for Hyphen to your Google Workspace** * In the Admin console, go to **Menu > Security > Access and data control > API controls > Manage Domain Wide Delegation**. *You must be signed in as a super administrator for this task.* * Click **Add new**. * Enter the service account ID for either the service account or the OAuth2 client. * In **OAuth Scopes**, add the following OAuth scopes and click **Authorize**. ``` https://www.googleapis.com/auth/admin.directory.group, https://www.googleapis.com/auth/admin.directory.group.member, https://www.googleapis.com/auth/admin.directory.user.alias.readonly, https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly, https://www.googleapis.com/auth/admin.directory.group.member.readonly, https://www.googleapis.com/auth/admin.directory.group.readonly, https://www.googleapis.com/auth/admin.directory.user.readonly, https://www.googleapis.com/auth/admin.directory.domain.readonly, https://www.googleapis.com/auth/admin.reports.audit.readonly, https://www.googleapis.com/auth/apps.groups.settings ``` * Point to the new client ID, click **View details**, and make sure that every scope is listed. If a scope is not listed, click **Edit**, enter the missing scope, and click **Authorize**. *You can't edit the client ID.* More detailed information can be found at the Google Workspace documentation for [Setting up domain-wide delegation for a client](https://support.google.com/a/answer/162106?hl=en#zippy=%2Cset-up-domain-wide-delegation-for-a-client).\ Changes can take up to 24 hours but typically happen more quickly. ### 3. **Connect Workspace** Enter your workspace domain and admin user email to connect your Google Workspace account to Hyphen. * **Domain** * **Admin User Email** --- # Configuration | **Field** | **Type** | **Description** | | ---------------- | ------------------- | ---------------------------------------------------- | | `domain` | `string` (required) | Unique Google Workspace domain set by the user. | | `adminUserEmail` | `string` (required) | Unique Google Workspace admin email set by the user. | --- # Connections ## Distribution List Distribution List connections can link to existing Groups in Google Workspace, or a new group will be created if no input is provided. If a Permission Group already exists for the same resource within a Google Cloud integration, it will be used as the Distribution List connection. When creating a new Group in Google Workspace, the name will be a combination of the Hyphen project name and the Hyphen project environment name, or just the Hyphen project environment name. ### Configuration | **Field** | **Type** | **Description** | | -------------------- | -------- | --------------------------------------------------------- | | `distributionListId` | `string` | Unique group ID in Google Workspace used for reference. | | `name` | `string` | Group name in Google Workspace used for display. | | `email` | `string` | Unique group email used for reference in future requests. | ### Connection Input Provide the Google Workspace group email to create a connection to an existing Group. ### Verification | **Scenario** | **Action** | | ------------------ | ------------------------------------------- | | Group has an owner | Verification handled by the group owner. | | No owner exists | Verification email sent to the group email. | ### Access A Member connection will be added with the "Member" role when added to the group. *** ## User User connections can only link to existing Users in Google Workspace. If no input is provided to connect to an existing User, the member email will be used to locate the user. ### Configuration | **Field** | **Type** | **Description** | | --------- | -------- | -------------------------------------- | | `userId` | `string` | Unique user ID in Google Workspace. | | `email` | `string` | Unique user email in Google Workspace. | ### Connection Input Provide the Google Workspace email to create a connection to an existing User. [Test](#) [Connect](#) ### GitHub URL: https://hyphen.ai/docs/integrations/github-integration/ Description: Learn how to configure and manage the GitHub integration in Hyphen, including user mapping, permission groups, code repositories, and project boards. # Setup On the Github integration page in the Hyphen app: 1. [Add Hyphen to your Github organization](https://github.com/apps/hyphen). 2. Submit your **GitHub Installation ID** and **Backup Verification Email** to connect it to Hyphen. If an integration connection cannot be automatically setup, the backup verification email will be sent a link where it can be verified manually. *** # Configuration | **Field** | **Type** | **Description** | | ------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `installationId` | `number` (required) | Unique installation ID generated when installing an application in GitHub. Used for generating an access token and pulling `githubOrgId` and `githubOrgName`. | | `githubOrgId` | `number` | Pulled during the integration setup. Used for reference. | | `githubOrgName` | `string` | Pulled during the integration setup. Used for requests that reference this key. | | `verificationEmail` | `string` (required) | Backup email address used to verify ownership of a resource when no associated email address is available. | *** # Connections ## User User connections can only connect to existing users in GitHub. If no input is provided to connect to an existing user, the member email will be used. **Prerequisites:** * Users must be "active" in the GitHub organization. ### Configuration | **Field** | **Type** | **Description** | | ------------ | ------------------- | ------------------------------------------------------------------------------------------------------ | | `userId` | `string` (optional) | GitHub username. | | `email` | `string` | Public email address of the GitHub user. Defaults to member email in Hyphen if not publicly available. | | `orgSlug` | `string` | The `githubOrgName` from the integration configuration. | | `profileUrl` | `string` | URL of the GitHub public profile page. | ### Connection Input A connection can be created by providing the GitHub username. ### Verification | **Scenario** | **Action** | | -------------------------------------------- | ----------------------------------------------------------------------------- | | Public email matches the member email | No verification needed. | | Public email does not match the member email | A verification email is sent to the GitHub user email address. | | No public email available | A verification email is sent to the integration's backup `verificationEmail`. | *** ## Permission Group These can connect to existing teams in GitHub, or a new team will be created if no input is provided. #### Configuration | **Field** | **Type** | **Description** | | ---------- | -------- | ----------------------------------------------------------------- | | `teamSlug` | `string` | Unique team slug in GitHub used for reference in future requests. | | `orgSlug` | `string` | The `githubOrgName` from the integration configuration. | | `teamName` | `string` | Display name of the team in GitHub. | | `teamId` | `number` | Unique team ID in GitHub. | ### Connection Input Provide the GitHub team name to create a connection to an existing team. ### Verification | **Scenario** | **Action** | | ------------------------------ | ------------------------------------------------------------------------ | | Admin with public email exists | Verification handled by the admin. | | No admin with public email | Verification email sent to the integration's backup `verificationEmail`. | #### Access A User connection will be added as the default “Member” role when added to the team. *** ## Code Repository These can connect to existing repositories in GitHub, or a new repository will be created if no input is provided. ### Configuration | **Field** | **Type** | **Description** | | ---------------- | -------- | ------------------------------------------------------- | | `repositoryId` | `string` | Unique repository ID in GitHub. | | `orgSlug` | `string` | The `githubOrgName` from the integration configuration. | | `repositoryName` | `string` | Repository name in GitHub for display and reference. | ### Connection Input Provide the GitHub repository name to create a connection to an existing repository. ### Verification A verification email is sent to the integration's `verificationEmail` for existing repositories. ### Access A Team connection will be added as a “Maintain” role when added to the code repository. *** ## Project Board These can connect to existing projects in GitHub, or a new project will be created if no input is provided. ### Configuration | **Field** | **Type** | **Description** | | ---------------- | -------- | ------------------------------------------------------------ | | `id` | `string` | Unique project ID in GitHub. | | `projectSlug` | `string` | GitHub project number used for reference in future requests. | | `orgSlug` | `string` | The `githubOrgName` from the integration configuration. | | `repositoryName` | `string` | Repository name in GitHub for display and reference. | ### Connection Input Provide the GitHub project slug to create a connection to an existing project. ### Verification A verification email is sent to the integration's `verificationEmail` for existing projects. ### Access A Team connection will be added as a “Read” role when added to the project. ### incident.io URL: https://hyphen.ai/docs/integrations/incidentio/ Description: Learn how to connect and configure incident.io with Hyphen, including API key generation, configuration fields, and resource connections. # Setup ### 1. Sign in or create your incident.io account - [Sign in to incident.io](https://app.incident.io/login) _or_ - [Create an incident.io account](https://incident.io/) ### 2. Generate an API key 1. In the incident.io dashboard, go to **Settings** > **API keys**. - _You need admin permissions to access this section._ 2. Click **+ Add new** and provide a name for the API key (e.g., "Hyphen Integration"). 3. Select the following permissions for the API key: `catalog_editor` and `catalog_viewer`. These permissions ensure the API key has the necessary access to integrate with catalog teams and catalog services. 4. Once created, you will see the generated API key. Copy the API key and save it securely, as it won't be shown again. ### 3. Connect incident.io Enter the API key you generated to connect incident.io to Hyphen. --- # Configuration | **Field** | **Type** | **Description** | | ----------------------- | ------------------- | ------------------------------------------------------------------------------- | | `apiKey` | `string` (required) | Secret API key provided by the user. Encrypted and stored as `encryptedToken`. | | `organizationName` | `string` | Name of the organization pulled during integration setup for reference. | | `dashboardUrl` | `string` | URL of the dashboard pulled during integration setup for reference. | | `catalogServiceTypeId` | `string` | Service catalog type ID used for reference and future requests. | | `catalogUserTypeId` | `string` | User catalog type ID used for reference and future requests. | | `catalogTeamType` | `object` | Contains team catalog details. | |   `id` | `string` | ID used for future requests. | |   `memberAttributeId` | `string` | ID used for future access requests. | | `secrets` | `object` | Built during integration setup containing: | |   `encryptedToken` | `string` | Encrypted `apiKey` used to authenticate future requests. | --- # Connections ## Permission Group Permission groups connect to existing entries in the Teams catalog or create new entries if none are provided. When creating a new Teams entry, the name will match the Hyphen Team name. ### Configuration | **Field** | **Type** | **Description** | | --------------- | -------- | --------------------------------------------------- | | `teamId` | `string` | Unique ID in the Teams catalog used for reference. | | `teamName` | `string` | Name in the Teams catalog used for display. | ### Connection Input Provide the incident.io team entry ID to connect to an existing Teams entry. ### Access A Member connection will be added as a new attribute value when included in the Teams entry. --- ## User User connections link to existing Users in incident.io. If no input is provided, the member email will be used to search for an existing User. ### Configuration | **Field** | **Type** | **Description** | | --------------- | -------- | --------------------------------------------------- | | `userId` | `string` | Unique user ID in incident.io. | | `email` | `string` | Unique user email in incident.io. | ### Connection Input Provide the incident.io member email to connect to an existing User. --- ## Incident Management Incident management connections link to existing entries in the Service catalog or create new entries if none are provided. When creating a new Service entry, the name will match the Hyphen App name. ### Configuration | **Field** | **Type** | **Description** | | --------------- | -------- | ----------------------------------------------------- | | `serviceId` | `string` | Unique ID in the Service catalog used for reference. | | `serviceName` | `string` | Name in the Service catalog used for display. | ### Connection Input Provide the incident.io service entry ID to connect to an existing Service entry. ### JIRA URL: https://hyphen.ai/docs/integrations/jira/ Description: Step-by-step instructions and configuration schema for integrating Atlassian Jira, including API setup, users, permission groups, and project boards. # Setup ### 1. Create or sign into your Jira account [Sign in to Jira](https://www.atlassian.com/software/jira)\ *or* [Create a new Jira Cloud account](https://www.atlassian.com/try/cloud/signup) ### 2. Generate an API token 1. Go to [Atlassian API tokens](https://id.atlassian.com/manage/api-tokens) 2. Click "Create API token" 3. Give your token a label (e.g., "Hyphen Integration") 4. Copy the generated token - you'll need it in the next step ### 3. Get your Cloud ID and Organization ID 1. Go to [Atlassian Home](https://home.atlassian.com) 2. After logging in, check your browser's URL bar 3. Your Organization ID can be found in the URL:\ `https://home.atlassian.com/o/[your-org-id]` 4. Your Cloud ID can be found in your Jira instance URL:\ `https://[your-cloud-id].atlassian.net` ### 4. Connect Jira Enter your API token and IDs below to complete the integration. --- # Configuration | **Field** | **Type** | **Description** | | ---------------- | ------------------- | ------------------------------------------------------------------------------------ | | `cloudId` | `string` (required) | JIRA cloud ID provided by the user, used for future requests. | | `email` | `string` (required) | JIRA admin email provided by the user, used for reference and to authenticate future requests. | | `organizationId` | `string` (required) | Atlassian organization ID provided by the user, used for reference and future requests. | | `apiToken` | `string` (required) | Secret Atlassian API Token provided by the user. Encrypted and stored as `encryptedToken`. | | `secrets` | `object` | Built during integration config setup containing: | |   `encryptedToken` | `string` | Encrypted `apiToken` used to authenticate future requests. | | `accountId` | `string` | JIRA admin account ID, used for reference and display. | --- # Connections ### User User connections can only connect to existing Users in JIRA. If a connection is created without providing input to connect to an existing User, the member email will be used to try and find the existing User. #### Configuration | **Field** | **Type** | **Description** | | ---------------- | -------- | ------------------------------------------------ | | `userId` | `string` | JIRA user account ID. | | `email` | `string` | JIRA user email address or Hyphen member email. | | `displayName` | `string` | Display name of the JIRA user. | #### Connection Input Provide the JIRA email to connect to an existing User. #### Verification - No verification needed if the user's public email matches the member’s email. - If the emails don't match, a verification email will be sent to the JIRA user's email. --- ### Permission Group Permission Group Connections can connect to existing Groups in JIRA or one will be created if no connection input is provided. When creating a new group in JIRA, the Hyphen team name will be used as the group name. #### Configuration | **Field** | **Type** | **Description** | | ---------------- | -------- | ------------------------------------------------- | | `organizationId` | `string` | `organizationId` from the integration configuration. | | `groupName` | `string` | Group name in JIRA used for display. | | `groupId` | `number` | Unique group ID in JIRA. | #### Connection Input Provide the JIRA group name to connect to an existing Group. #### Verification Existing groups will be verified by the organization admin who set the email in the integration config. #### Access A User connection will be added as a member when added to the group. --- ### Project Board Project Board Connections can connect to existing Project Boards in JIRA or one will be created if no connection input is provided. When creating a new project board, the Hyphen App or Project name will be used as the project board name. The name will be converted to uppercase, spaces and hyphens will be removed, and only the first ten characters will be used. #### Configuration | **Field** | **Type** | **Description** | | ---------------- | -------- | ------------------------------------------------ | | `projectId` | `string` | Unique code project board ID in JIRA. | | `projectKey` | `string` | Unique code project board key in JIRA. | | `orgSlug` | `string` | `githubOrgName` from the integration configuration. | | `projectName` | `string` | Project board name in JIRA, used for display and reference. | #### Connection Input Provide the JIRA project board name to connect to an existing Project Board. #### Verification A verification email will be sent to the lead email to verify the existing project board. #### Access A Team connection will be added with a "Member" role when added to the project board. ### Microsoft Office 365 URL: https://hyphen.ai/docs/integrations/microsoft-office-365/ Description: Guide for integrating Microsoft Office 365 with Hyphen, including setup steps, required permissions, and configuration options. # Setup 1. **Create or sign into your Microsoft 365 account** To integrate with Microsoft Office 365, you'll need to sign in using an **educational or enterprise account** that has **Global Administrator** permissions on the tenant. 2. **Connect your Microsoft 365 tenant to Hyphen** * Sign in with your Microsoft 365 administrator account * Grant the required admin consent for the application * Select the Microsoft 365 tenant you wish to connect That's it! After you've completed these steps, Hyphen will automatically: * Verify the credentials and selected tenant * Grant necessary permissions to the Hyphen service ## Required Admin Consent Permissions During the authentication process, Hyphen will request the following permissions: - Application.ReadWrite.All - User.Read - AppRoleAssignment.ReadWrite.All - CrossTenantInformation.ReadBasic.All These permissions are required to: * Create the Hyphen service principal * Assign application roles to the service principal * Read tenant and organizational information * Obtain tenant information by ID ## Microsoft Graph API Permissions Granted by Hyphen Once the user is authenticated, Hyphen will automatically create a **service principal** in your tenant and consent the following Microsoft Graph permissions on your behalf: - Directory.Read.All - Group.ReadWrite.All - User.Read.All - Channel.Create - ChannelMember.ReadWrite.All - ChannelSettings.Read.All - Team.ReadBasic.All These permissions are necessary to: * Manage Azure AD groups and users * Read organization and tenant information * Create and manage distribution lists * Synchronize team membership with Office 365 groups These permissions enable Hyphen to create and manage Microsoft 365 groups and users on your behalf. *** # Configuration | **Field** | **Type** | **Description** | | --------------- | ------------------- | -------------------------------------------------------------------- | | `azureTenantId` | `string` (required) | Azure Tenant ID provided by the user for authentication purposes. | | `name` | `string` | Display name pulled during integration setup for reference purposes. | *** # Connections ## Distribution List Distribution list connections link to existing Azure Groups or create a new group if none is provided. When creating a new group, the name will match the Hyphen Organization, Team, Project, App, or Project Environment name. ### Configuration | **Field** | **Type** | **Description** | | -------------- | -------- | -------------------------------------------------------------- | | `groupId` | `string` | Unique group ID in Azure, used for reference and future calls. | | `groupName` | `string` | Group name in Azure, used for display and future requests. | | `emailAddress` | `string` | Group email address in Azure, used for display. | ### Connection Input Provide the Azure group ID to connect to an existing Group. ### Verification A verification email will be sent to the group email address to confirm ownership for existing groups. ### Access A Member connection will be added as a member when included in the group. *** ## User User connections link to existing Azure Users. If no input is provided, the member email will be used to search for an existing User. ### Configuration | **Field** | **Type** | **Description** | | --------- | -------- | --------------------------- | | `userId` | `string` | Unique user ID in Azure. | | `email` | `string` | Unique user email in Azure. | ### Connection Input Provide the Azure user email to connect to an existing User. ### Microsoft Teams URL: https://hyphen.ai/docs/integrations/microsoft-teams/ Description: Learn how to connect and configure Microsoft Teams with Hyphen, including required admin consent permissions, Graph API setup, and entity connections. # Setup 1. **Create or sign into your Microsoft 365 account** To integrate with Microsoft Office 365, you'll need to sign in using an **educational or enterprise account** that has **Global Administrator** permissions on the tenant. 2. **Connect your Microsoft 365 tenant to Hyphen** * Sign in with your Microsoft 365 administrator account * Grant the required admin consent for the application * Select the Microsoft 365 tenant you wish to connect That's it! After you've completed these steps, Hyphen will automatically: * Verify the credentials and selected tenant * Grant necessary permissions to the Hyphen service ## Required Admin Consent Permissions During the authentication process, Hyphen will request the following permissions: - Application.ReadWrite.All - User.Read - AppRoleAssignment.ReadWrite.All - CrossTenantInformation.ReadBasic.All These permissions are required to: * Create the Hyphen service principal * Assign application roles to the service principal * Read tenant and organizational information * Obtain tenant information by ID ## Microsoft Graph API Permissions Granted by Hyphen Once the user is authenticated, Hyphen will automatically create a **service principal** in your tenant and consent the following Microsoft Graph permissions on your behalf: - Directory.Read.All - Group.ReadWrite.All - User.Read.All - Channel.Create - ChannelMember.ReadWrite.All - ChannelSettings.Read.All - Team.ReadBasic.All These permissions are necessary to: * Manage Azure AD groups and users * Read organization and tenant information * Create and manage distribution lists * Synchronize team membership with Office 365 groups These permissions enable Hyphen to create and manage Microsoft 365 groups and users on your behalf. *** # Configuration | **Field** | **Type** | **Description** | | --------------- | ------------------- | ------------------------------------------------------------------------ | | `azureTenantId` | `string` (required) | Azure Tenant ID provided by the user. | | `name` | `string` | Name pulled during setup, used for reference and display. | | `defaultTeamId` | `string` | Default Team ID to create channels in when creating channel connections. | *** # Connections ## Permission Group Distribution list connections link to existing Microsoft Teams or create a new team if none is provided. When creating a new Team, the name will be the Hyphen Organization, Team, Project, App, or Project Environment name. ### Configuration | **Field** | **Type** | **Description** | | ------------- | -------- | -------------------------------------------------------------------------------- | | `groupId` | `string` | Unique group ID in the Azure tenant associated with the team, used for requests. | | `teamId` | `string` | Unique Team ID, used for future requests. | | `name` | `string` | Team name used for display. | | `externalUrl` | `string` | Direct URL to the associated Team, used for verification and dashboard links. | ### Connection Input Provide the Azure group ID to connect to an existing Group. If a Team exists for the Group, it will be used; otherwise, a new Team will be created for the Group. ### Verification A verification email will be sent to the group email to verify existing groups. ### Access A Member connection will be added as a member when added to the group. *** ## Channel Channel connections link to an existing Microsoft Teams channel or create a new private channel if none is provided. When creating a new Channel, the name will be the Hyphen Organization, Team, Project, App, or Project Environment name. ### Configuration | **Field** | **Type** | **Description** | | ------------- | -------- | -------------------------------------------------------------------------------- | | `name` | `string` | Name of the channel in Teams, used for display. | | `channelId` | `string` | Unique ID for the channel in Teams, used for future requests. | | `teamId` | `string` | Unique ID for the Team this channel is a part of, used for requests. | | `externalUrl` | `string` | Direct URL to the associated Channel, used for verification and dashboard links. | ### Connection Input Provide the channel name to connect to an existing Channel. ### Verification A verification email will be sent to the channel admin emails to verify existing channels. ### Access A member connection created for the associated Hyphen entity will automatically add or remove members in the Teams channel. *** ## User User connections link to existing Users in the associated Azure tenant. If no input is provided, the member email will be used to find the existing User. ### Configuration | **Field** | **Type** | **Description** | | --------- | -------- | --------------------------- | | `userId` | `string` | Unique user ID in Azure. | | `email` | `string` | Unique user email in Azure. | ### Connection Input Provide the Azure member email to connect to an existing User. ### New Relic URL: https://hyphen.ai/docs/integrations/new-relic/ Description: Step-by-step guide for connecting and configuring New Relic integration with Hyphen, including API setup, permission groups, users, and Kubernetes observability. # Setup ### 1. Create or sign into your New Relic account New Relic uses API keys to authenticate and verify your identity. These keys allow approved people to: - Access and query your data [Sign in to New Relic](https://login.newrelic.com/login) _or_ [Create a new New Relic account](https://newrelic.com/signup) ### 2. Generate User API Key You'll need a User API key to access NerdGraph, New Relic's GraphQL API. This key is essential for: - Resolving the New Relic account connected to Hyphen - Querying the account's entities, metrics, and logs [Go to API Keys UI to generate your key](https://one.newrelic.com/launcher/api-keys-ui.api-keys-launcher) The New Relic user that owns the key must be able to access the account and query the telemetry Hyphen will use. Hyphen does not require user-management, authentication-domain-management, or group-management permissions for observability queries. #### Security Recommendations: - Keep your API keys secure and treat them like passwords - Rotate the User API key according to your organization's credential policy - Remove or rotate keys when the owning user's access changes ### 3. Connect New Relic Account Enter your User API key below to complete the integration. This key will be used to: - Authenticate your account - Resolve the New Relic account available to the key - Query telemetry for connected apps and Kubernetes clusters --- # Configuration | **Field** | **Type** | **Description** | | ------------------ | ------------------- | ------------------------------------------------------------------------------------ | | `apiKey` | `string` (required) | Secret New Relic API key provided by the user. Encrypted and stored as `encryptedToken`. | | `accountId` | `string` | Account ID pulled during integration config setup for reference. | | `accountName` | `string` | Account name pulled during integration config setup for reference. | | `secrets` | `object` | Built during integration setup containing: | |   `encryptedToken` | `string` | Encrypted `apiKey` used to authenticate future requests. | --- # Connections ## Permission Group Permission groups can connect to existing New Relic Groups or create new ones if no connection input is provided. When creating a new Group in New Relic, the name will be the Hyphen Team name. ### Configuration | **Field** | **Type** | **Description** | | ---------------- | -------- | ------------------------------------------------- | | `groupId` | `string` | Unique group ID in the New Relic group. | | `groupName` | `string` | Group name in the New Relic group. | ### Connection Input Provide the New Relic group ID to connect to an existing Group. ### Access A Member connection will be added as a member when added to the group. --- ## User User connections link to existing Users in New Relic. If no input is provided, the member email will be used to try and find the existing User. ### Configuration | **Field** | **Type** | **Description** | | ---------------- | -------- | ------------------------------------------------ | | `userId` | `string` | Unique user ID in New Relic. | | `email` | `string` | Unique user email in New Relic. | ### Connection Input Provide the New Relic member email to connect to an existing User. --- ## Kubernetes Observability Kubernetes Observability connections let Hyphen Agent query New Relic metrics and logs for a registered cluster. ### Before You Connect - Install and configure the New Relic Kubernetes integration for the cluster. - Wait for New Relic to receive its first Kubernetes cluster sample. - Connect the New Relic account that receives the cluster's telemetry to the Hyphen organization. ### Connection Input Provide the cluster name configured when the New Relic Kubernetes integration was installed. Hyphen searches the connected account for a Kubernetes cluster sample with that name. If the cluster sample has not arrived yet, the connection can remain in a retryable error state while New Relic begins ingesting telemetry. An incorrect cluster name produces a not-found error. Hyphen may create the connection automatically when Horizon detects exactly one New Relic cluster name and the organization has exactly one New Relic integration. Otherwise, connect it from the registered cluster's **Settings** tab. For complete setup instructions, see [Kubernetes Observability](/docs/kubernetes/observability). ### NPM URL: https://hyphen.ai/docs/integrations/npm/ Description: Step-by-step guide to setting up and configuring the NPM integration, including access tokens, permission groups, users, and code registry connections. # Setup ### 1. Create or sign into your NPM account [Sign in to NPM](https://www.npmjs.com/login) _or_ [Create a new NPM account](https://www.npmjs.com/signup) ### 2. Generate Access Token [Follow the NPM documentation to create an access token](https://docs.npmjs.com/creating-and-viewing-access-tokens) Make sure to grant the following permissions: - Read and write organization members - Read and write teams - Read and write packages ### 3. Connect NPM Organization Enter your Access Token below to complete the integration. --- # Configuration | **Field** | **Type** | **Description** | | ---------------- | ------------------- | ------------------------------------------------------------------------------------ | | `accessToken` | `string` (required) | Secret NPM access token provided by the user. Encrypted and stored as `encryptedToken`. | | `organizationName`| `string` (required) | NPM organization name provided by the user, used for reference in future requests. | | `secrets` | `object` | Built during integration config setup containing: | |   `encryptedToken` | `string` | Encrypted `accessToken` used to authenticate future requests. | --- # Connections ## Permission Group Permission group connections can link to existing NPM Teams or create new ones if no connection input is provided. When creating a new Team in NPM, the name will be the Hyphen Team name. ### Configuration | **Field** | **Type** | **Description** | | ---------------- | -------- | ------------------------------------------------- | | `teamId` | `string` | Unique team ID in the NPM team. | | `teamName` | `string` | Team name in the NPM team, used for reference. | ### Connection Input Provide the NPM team name to connect to an existing Team. ### Access A Member connection will be added as a member when added to the NPM team. --- ## User User connections can only connect to existing Users in NPM by providing input. ### Configuration | **Field** | **Type** | **Description** | | ---------------- | -------- | ------------------------------------------------ | | `userId` | `string` | Unique username in NPM. | | `email` | `string` | Hyphen member email, used for display. | ### Connection Input Provide the NPM username to connect to an existing User. --- ## Code Registry Code registry connections can only connect to existing NPM packages within the NPM organization using a provided input. ### Configuration | **Field** | **Type** | **Description** | | ---------------- | -------- | ------------------------------------------------- | | `packageId` | `string` | Unique package name in the NPM organization. | | `packageName` | `string` | Unique package name in the NPM organization, used for display. | ### Connection Input Provide the NPM package name to connect to an existing Package. ### Access A Team connection will be added with ‘read-write’ permissions when added to the NPM package. ### Slack URL: https://hyphen.ai/docs/integrations/slack-integration/ Description: Learn how to set up and configure the Slack integration for Hyphen, including channel and user connection settings. # Setup ### 1. **Add Hyphen to your Slack workspace** * [Install the App](#) *** # Configuration | **Field** | **Type** | **Description** | | ---------------- | ------------------- | -------------------------------------------------------------------------------- | | `workspaceId` | `string` | Unique workspace ID pulled during setup, used for reference and future requests. | | `workspaceName` | `string` | Workspace name pulled during setup, used for reference and display. | | `secrets` | `object` (required) | Contains authentication information for future requests. | | `encryptedToken` | `string` (required) | Encrypted Slack token, retrieved when installing a Slack app. | *** # Connections ## Channel Channel connections link to existing Slack Channels or create a new public channel if none is provided. When creating a new channel, the name will be normalized to include only lowercase letters, numbers, hyphens, and underscores, and must be 80 characters or fewer. The name will match the Hyphen Organization, Team, Project, or App name. ### Configuration | **Field** | **Type** | **Description** | | ------------- | -------- | ---------------------------------------------------------------- | | `id` | `string` | Unique channel ID in Slack, used for reference and future calls. | | `name` | `string` | Channel name in Slack, used for display and future requests. | | `workspaceId` | `string` | `workspaceId` from the integration configuration. | ### Connection Input Provide the Slack channel name to connect to an existing channel. ### Verification * Existing public channels do not require verification. * Private channels require verification from an admin with a public email in their profile. ### Access A Member connection will be invited to the channel. *** ## User User connections link to existing Slack Users. If no input is provided, the member email will be used to search for the existing User. ### Configuration | **Field** | **Type** | **Description** | | ------------- | -------- | ------------------------------------------------- | | `userId` | `string` | Unique user ID in Slack. | | `email` | `string` | Unique user email in Slack. | | `userName` | `string` | User's display name in Slack. | | `workspaceId` | `string` | `workspaceId` from the integration configuration. | ### Connection Input Provide the Slack user email to connect to an existing User. ### Datadog URL: https://hyphen.ai/docs/integrations/datadog/ Description: Learn how to connect Datadog to Hyphen, configure APM and Kubernetes Observability connections, and authenticate using service tokens. # Setup ### 1. Sign into your Datadog account Use the Datadog organization that receives your app and Kubernetes telemetry. Note its site domain, such as `datadoghq.com` or `datadoghq.eu`. ### 2. Create an access token Create a [Service Access Token](https://docs.datadoghq.com/account_management/service-access-tokens/) for a Datadog service account: 1. Open **Organization Settings** > **Service Accounts** and select the service account. 2. Under **Access Tokens**, click **+ New Token**. 3. Give the token a name, choose an expiration, and select its scopes. 4. Save and copy the token while it is visible. A [Personal Access Token](https://docs.datadoghq.com/account_management/personal-access-tokens/) can also authenticate the integration. Hyphen sends the token using Bearer authentication. Grant the [Datadog scopes](https://docs.datadoghq.com/api/latest/scopes/) needed for the connections you will use: | **Scope** | **Used for** | | --- | --- | | `logs_read_data` | Integration validation and querying app or Kubernetes logs. | | `apm_read` | Validating the services selected for APM connections. | | `timeseries_query` | Validating Kubernetes clusters and querying their metrics. | The token's owner must also have access to the telemetry Hyphen will query. Keep the token secure and replace it in Hyphen when it expires or is rotated. ### 3. Connect Datadog In Hyphen's **Integrations** area, select Datadog and enter the site domain and access token. Hyphen validates access with a log query before saving the integration. Use the site domain without a protocol or `api.` prefix. Hyphen supports these [Datadog sites](https://docs.datadoghq.com/getting_started/site/): `datadoghq.com`, `us3.datadoghq.com`, `us5.datadoghq.com`, `datadoghq.eu`, `ap1.datadoghq.com`, `ap2.datadoghq.com`, `uk1.datadoghq.com`, `ddog-gov.com`, and `us2.ddog-gov.com`. --- # Configuration | **Field** | **Type** | **Description** | | --- | --- | --- | | `site` | `string` | Datadog site domain. Defaults to `datadoghq.com`. | | `accessToken` | `string` (required) | Access token supplied during setup. | | `secrets` | `object` | Built during integration setup containing: | |   `accessToken` | `string` | Stored token used to authenticate future requests. | --- # Connections ## APM APM connections map a Hyphen app to existing Datadog services so Hyphen Agent can query its logs for the selected environment. ### Before You Connect - Send app traces and logs to the connected Datadog organization. - Ensure each selected service has indexed spans from the last 24 hours. Hyphen uses those spans to validate the service name. - Include the `service` tag on logs. For a shared service, include an `env` tag whose value matches the Hyphen project environment identifier, such as `production`. ### Configuration | **Field** | **Type** | **Description** | | --- | --- | --- | | `mode` | `string` (required) | `sharedByEnvironmentAttribute` or `perEnvironment`. | | `entityName` | `string` | Exact Datadog service name for shared mode. | | `environmentAttribute` | `string` | Must be `env` for shared mode. | | `environments` | `object` | Required in per-environment mode. Maps every project environment identifier to an object containing its service's `entityName`. | ### Connection Input Provide a JSON service mapping when connecting APM for the app. Use exact service names without wildcards or search expressions. For one service shared across environments: ```json { "mode": "sharedByEnvironmentAttribute", "entityName": "checkout-api", "environmentAttribute": "env" } ``` For separate services in a project with `development` and `production` environments: ```json { "mode": "perEnvironment", "environments": { "development": { "entityName": "checkout-api-development" }, "production": { "entityName": "checkout-api-production" } } } ``` The mapping must cover all project environments exactly. If service validation returns a not-found error, check the service name and confirm indexed spans have arrived within the last 24 hours. See [Log Analysis](/docs/agent/log-analysis) for using the connection with Hyphen Agent. --- ## Kubernetes Observability Kubernetes Observability connections let Hyphen Agent query Datadog metrics and logs for a registered cluster. ### Before You Connect - Install and configure Datadog's Kubernetes monitoring, including Kubernetes State Core and log collection. - Ensure the connected organization receives `kubernetes_state.node.count` samples tagged with the cluster's `kube_cluster_name`. - Include `kube_cluster_name`, `kube_namespace`, and `pod_name` on workload telemetry. Container metrics also use `kube_container_name`. - Collect container CPU and memory usage, resource requests, and restart metrics so Agent can assess utilization. ### Configuration | **Field** | **Type** | **Description** | | --- | --- | --- | | `clusterName` | `string` | Cluster name stored after connection validation. Matches the emitted `kube_cluster_name` tag. | ### Connection Input Provide the exact lowercase `kube_cluster_name` tag value. Hyphen checks for Kubernetes State Core node-count samples with that name in the last 24 hours. If none are available, the connection returns a not-found error; correct the name or wait for telemetry, then retry. When observability discovery is enabled, Hyphen may create the connection automatically if Horizon detects exactly one Datadog cluster name and the organization has exactly one Datadog integration. Otherwise, connect it from the registered cluster's **Settings** tab. For complete setup instructions, see [Kubernetes Observability](/docs/kubernetes/observability). ### SigNoz URL: https://hyphen.ai/docs/integrations/signoz/ Description: Learn how to integrate SigNoz with Hyphen to query application logs and Kubernetes telemetry across cloud and self-hosted instances. # Setup ### 1. Sign into your SigNoz instance Use the SigNoz Cloud or self-hosted instance that receives your app and Kubernetes telemetry. Hyphen requires an instance with the v5 query API (`/api/v5/query_range`). For SigNoz Cloud, set `apiBaseUrl` to your instance's HTTPS URL, such as `https://your-instance.signoz.cloud`. SigNoz's [Logs API](https://signoz.io/docs/logs-management/logs-api/overview/#api-endpoint) uses the instance URL for queries. Hyphen accepts Cloud instance URLs on `signoz.cloud` or `signoz.io` without a custom port. For self-hosted SigNoz, use an HTTP(S) endpoint reachable by Hyphen, such as `https://observability.example.com`. Private-network and localhost endpoints are not supported by the hosted integration. ### 2. Generate an API key Create a [SigNoz service account and API key](https://signoz.io/docs/manage/administrator-guide/iam/service-accounts/): 1. Open **Settings** > **Service Accounts** and create or select a service account. 2. Assign a role that can read the logs and metrics Hyphen will query, such as `signoz-viewer`. 3. Open the account's **Keys** tab and click **Add Key**. 4. Name the key, choose an expiration if needed, and copy it when it is created. The key needs query access to the instance's telemetry. See SigNoz's [read-only API key guide](https://signoz.io/docs/manage/administrator-guide/iam/user-guides/self-service-api-keys-for-viewers/) for viewer permissions. Keep the key secure and replace it in Hyphen when it expires or is rotated. ### 3. Connect SigNoz In Hyphen's **Integrations** area, select SigNoz, choose Cloud or self-hosted, and enter the API base URL and API key. Enter only the base URL in `apiBaseUrl`; Hyphen appends `/api/v5/query_range`. If your UI uses a separate address, enter it in the optional `uiBaseUrl` field. URLs must not contain embedded credentials, query parameters, or fragments. The API endpoint must respond directly; redirects are not followed. Hyphen validates the key and query API with a log query. An empty result is allowed, so successful setup does not guarantee that app or cluster telemetry has arrived. --- # Configuration | **Field** | **Type** | **Description** | | --- | --- | --- | | `hosting` | `string` (required) | `cloud` or `selfHosted`. | | `apiBaseUrl` | `string` (required) | Base URL of the SigNoz instance serving the v5 query API. | | `uiBaseUrl` | `string` | Optional base URL for the SigNoz UI. | | `apiKey` | `string` (required) | API key supplied during setup. | | `secrets` | `object` | Built during integration setup containing: | |   `apiKey` | `string` | Stored key used to authenticate future requests. | --- # Connections ## APM APM connections map a Hyphen app to existing SigNoz services so Hyphen Agent can query its logs for the selected environment. ### Before You Connect - Send app logs to the connected SigNoz instance with the `service.name` resource attribute. - If a service name is shared across namespaces, include `service.namespace` and specify it in the connection. - For a service shared across environments, emit an environment attribute whose values match the Hyphen project environment identifiers, such as `production`. ### Configuration | **Field** | **Type** | **Description** | | --- | --- | --- | | `mode` | `string` (required) | `sharedByEnvironmentAttribute` or `perEnvironment`. | | `entityName` | `string` | Exact `service.name` for shared mode. | | `entityNamespace` | `string` | Optional `service.namespace` for shared mode or an individual environment mapping. | | `environmentAttribute` | `string` | Required in shared mode. The emitted attribute used to distinguish environments, such as `deployment.environment.name`. | | `environments` | `object` | Required in per-environment mode. Maps every project environment identifier to an object containing `entityName` and optionally `entityNamespace`. | ### Connection Input Provide a JSON service mapping when connecting APM for the app. For one service shared across environments: ```json { "mode": "sharedByEnvironmentAttribute", "entityName": "checkout-api", "entityNamespace": "storefront", "environmentAttribute": "deployment.environment.name" } ``` For separate services in a project with `development` and `production` environments: ```json { "mode": "perEnvironment", "environments": { "development": { "entityName": "checkout-api-development" }, "production": { "entityName": "checkout-api-production" } } } ``` The mapping must cover all project environments exactly. Hyphen validates the mapping and API access, but does not require matching service logs during setup. If analysis returns no logs, check the service name, optional namespace, environment attribute, and emitted values. See [Log Analysis](/docs/agent/log-analysis) for using the connection with Hyphen Agent. --- ## Kubernetes Observability Kubernetes Observability connections let Hyphen Agent query SigNoz metrics and logs for a registered cluster. ### Before You Connect - Configure your OpenTelemetry collectors to send Kubernetes metrics and logs to the connected SigNoz instance. - Include `k8s.cluster.name`, `k8s.namespace.name`, and `k8s.pod.name` on workload telemetry. - Collect `k8s.container.cpu_request_utilization`, `k8s.container.memory_request_utilization`, and `k8s.container.restarts` for workload analysis. Restart metrics also need `k8s.pod.uid` and `k8s.container.name` to distinguish containers. ### Configuration | **Field** | **Type** | **Description** | | --- | --- | --- | | `clusterName` | `string` | Cluster name stored after connection validation. Matches the emitted `k8s.cluster.name` attribute. | ### Connection Input From the registered cluster's **Settings** tab, provide the exact `k8s.cluster.name` value emitted by your collectors. Hyphen validates query access using that cluster name. The connection can become ready before matching logs arrive. If metrics or logs are missing, check collector configuration and Kubernetes resource attributes; Agent reports missing telemetry as a capability gap. For complete setup instructions, see [Kubernetes Observability](/docs/kubernetes/observability). ### Mosyle Business URL: https://hyphen.ai/docs/integrations/mosyle/ Description: Learn how to connect and configure the Mosyle Business integration in Hyphen to import Apple device inventory and view device compliance reports. ## Setup The Mosyle Business integration reads Apple device inventory for [Agent reports](/docs/agent/capabilities/). Hyphen only reads device inventory. Mosyle Business is supported. Mosyle Manager for education is not supported. ### 1. Create an API account In Mosyle Business, create a dedicated administrator account for Hyphen with API access and permission to view devices. ### 2. Create and enable an API token Go to **Organization** > **Integrations** > **Mosyle API**, add a token for Hyphen, and enable it. Copy the access token. ### 3. Connect Mosyle Business In Hyphen's **Integrations** area, select Mosyle Business and enter: | **Field** | **Description** | | --- | --- | | API account email | The email of the dedicated API account. | | API account password | The password of the API account. | | API access token | The token you enabled in Mosyle. | Select **Test** to check the values, then **Connect**. The integration details page shows the API account email. --- ## Device inventory reports A device inventory report can use Mosyle Business as its source. Its results show Mosyle posture, compliance state, last sync, a Mosyle record ID, and whether the device is supervised. Devices without a Mosyle record show that no record was collected. ## Removing the integration After you remove the integration, revoke the Hyphen API token and disable its dedicated API account in Mosyle Business. ### Okta URL: https://hyphen.ai/docs/integrations/okta/ Description: Step-by-step guide to installing, configuring, and connecting the Okta API Service Integration with Hyphen. # Setup ### 1. Install Hyphen in your Okta organization Sign in to the Okta Admin Console with administrator access to install an API Service Integration. 1. Go to **Applications and Resources** > **API Service Integrations**. 2. Select **Add Integration**. 3. Find **Hyphen**. 4. Select **Next**. 5. Select **Install & Authorize**. See [Okta installation instructions](https://help.okta.com/oie/en-us/content/topics/apiservice/add-api-service-integration.htm) for details. Authorize all four [Okta read scopes](https://developer.okta.com/docs/api/oauth2/) before you connect: | **Scope** | **Used for** | | --- | --- | | `okta.users.read` | Read users and their profiles. | | `okta.groups.read` | Read groups and their members. | | `okta.apps.read` | Read applications and their assignments. | | `okta.roles.read` | Read administrator role assignments. | ### 2. Copy your Okta credentials Copy the client secret when Okta displays it. Okta displays the secret only once. On the integration's **General** tab, copy the **Okta Domain** and **Client ID**. See the [Okta API service integration guide](https://developer.okta.com/docs/guides/build-api-integration/main/#save-customer-credentials) for credential details. ### 3. Connect Okta In Hyphen's **Integrations** area, select Okta. Enter the organization URL, client ID, and client secret. Use the tenant URL with the `https://` prefix, such as `https://customer.okta.com`. Custom domains and Admin Console domains are not supported. Do not include a path, query, fragment, or custom port in the URL. Select **Test** to check the values. Select **Connect** after the test succeeds. Hyphen verifies access to users, groups, applications, and administrator assignments. The integration details page shows the organization URL and client ID. --- # Configuration | **Field** | **Type** | **Description** | | --- | --- | --- | | `orgUrl` | `string` (required) | Okta organization URL, such as `https://customer.okta.com`. | | `clientId` | `string` (required) | Client ID from the Hyphen API Service Integration in Okta. | | `clientSecret` | `string` (required) | Client secret supplied during setup. | | `secrets` | `object` | Built during integration setup with the stored client secret. | |   `clientSecret` | `string` | Stored secret used to authenticate future requests. | --- # Connections Okta does not support separate resource connections. Reports use the organization integration directly to read users, groups, applications, and access assignments. Okta can act as the identity directory or as a comparison source in supported reports. Hyphen does not create or change Okta users, groups, or applications. Device inventory reports are not supported through this integration. See [Integrations Overview](/docs/integrations/overview/#identity-access-and-device-reports) for other report sources. ### hx Command Line URL: https://hyphen.ai/docs/github-actions/setup-command-line/ Description: Configure the Hyphen command line tool (hx) within your GitHub Actions workflows for authentication and execution. This GitHub Action downloads, installs, and authenticates the Hyphen command line tool (hx) using the provided API Key. Once the action is run, the `hx` CLI will be available in the path of the action container and can be used in subsequent steps. > 📘 Many other Hyphen actions require this action to be run first, as they rely on the `hx` CLI being available in the container's path. ## Prerequisites Before getting started, ensure you have: * Signed up for a Hyphen account and have access to an organization * You have access to a Hyphen API key for the organization ## Parameters * **`apiKey`***(required)*: The API key used to authenticate the command line tool. * **`version`** *(optional)*: The specific version of the command line to install. If not set, the latest version will be installed. ## Example Usage ```yml action.yml steps: - name: Checkout id: checkout uses: actions/checkout@v4 - name: Setup Hyphen CLI id: setup-hx uses: Hyphen/setup-hx-action@v1 with: apiKey: ${{ secrets.HYPHEN_API_KEY }} - name: List Projects id: list-projects run: hx project list ``` ### Specifying a Version ```Text action.yml steps: - name: Setup Hyphen CLI with Specific Version uses: Hyphen/setup-hx-action@v1 with: apiKey: ${{ secrets.HYPHEN_API_KEY }} version: "1.2.3" # specify the desired version here ``` ### Security & Technology URL: https://hyphen.ai/docs/policies/security-and-technology/ Description: An overview of Hyphen AI's comprehensive security policies, zero-knowledge encryption architecture, access controls, and compliance practices. Hyphen AI is committed to providing a secure, reliable platform for managing your application deployments, secrets, and infrastructure. This document outlines our security policies and practices. ## Security Policy, Risk, and Governance Hyphen AI conducts regular risk assessments covering: - Information security risks - Operational and infrastructure risks - Compliance and regulatory risks - Third-party and vendor risks Identified risks are classified by severity and prioritized for remediation based on likelihood and impact. Risk register is maintained and reviewed on a regular cadence. Regular compliance validation activities include: - Backup restoration testing - Access reviews across all systems - Vendor management review - Risk assessment and monitoring - Technical compliance validation - Policy and documentation review - Recovery objective validation ## Access Management ### Authentication & Authorization Access to Hyphen AI systems and customer data is controlled through: - Role-based access control with defined permissions - Multi-factor authentication (MFA) enforced for all accounts - Single sign-on (SSO) integration capabilities - API key authentication with audit trails ### Access Control Principles **Internal access follows:** - **Least Privilege:** Users granted minimum access needed for their role - **Need-to-Know:** Access based on job function and business need - **Regular Review:** Periodic verification that access remains appropriate **Administrative access:** - Limited to essential personnel - Subject to additional controls and monitoring - All administrative actions logged and auditable ### Access Review Process - Regular reviews of user accounts, administrative access, and infrastructure permissions - Dormant account detection and remediation - Timely access removal upon identification of unnecessary permissions - Access revocation procedures for departing team members ### Audit Logging All access to systems and customer data is logged, including: - Authentication events and access attempts - Administrative actions and configuration changes - Data access and modifications - Access logs are retained and available for audit purposes ## Business Continuity & Disaster Recovery ### Operations - Fully remote operations with no dependency on physical office locations - Distributed team structure for operational resilience - Communication and collaboration infrastructure with high availability ### Backup & Recovery - Automated database backups with defined retention policies - Configuration and infrastructure definitions version controlled - Multi-zone data replication for redundancy - Defined Recovery Time Objectives (RTO) for critical services - Defined Recovery Point Objectives (RPO) to limit data loss - Regular backup restoration testing to validate recovery procedures ### Service Dependencies Hyphen AI infrastructure relies on enterprise-grade cloud platforms with: - Multi-zone and multi-region deployment capabilities - High availability service level agreements - Built-in redundancy and automatic failover - Established disaster recovery capabilities *Note: These recovery objectives apply to Hyphen AI systems. Customer-specific data recovery scenarios are addressed through product capabilities documented separately.* ## Communications Security ### Network Security - All communications encrypted in transit using industry-standard protocols - API endpoints secured with SSL/TLS - Network segmentation and access controls - Multi-zone deployments for availability and resilience ### Monitoring - Continuous monitoring of systems and infrastructure - Security event logging and analysis - Automated alerting for anomalous activity - Centralized log aggregation and retention ## Cryptography & Encryption ### Encryption Architecture Hyphen AI employs a zero-knowledge encryption architecture for secrets management: - Customer secrets encrypted locally using either Hyphen AI-managed or customer-managed encryption keys - Encryption and decryption operations performed client-side - Sensitive data never accessible to Hyphen AI in plaintext ### Data Protection - Data encrypted at rest using industry-standard encryption - Data encrypted in transit using SSL/TLS - Encryption key rotation capabilities available - Cryptographic operations follow industry best practices ### Customer Data Isolation - Customer data logically isolated and access-controlled - Cloud provider integrations follow principle of least privilege - Temporary credentials and role assumption where applicable - Permissions scoped to minimum required for functionality ## Operations ### Infrastructure Hyphen AI infrastructure is deployed across multiple cloud providers: - Multi-zone deployments for high availability - Regional redundancy for critical services - Automated deployment and configuration management - Infrastructure as code for consistency and auditability ### Change Management All changes to production systems follow a defined process: - Peer review required before deployment - Automated testing and validation - Staged rollout procedures - Documented rollback capabilities - Emergency change procedures with appropriate approval and documentation ### Version Control - All code and configuration changes version controlled - Full audit trail of changes with attribution - Rollback capabilities for recovery - Protection against unauthorized modifications ## Privacy Hyphen AI's architecture is designed to protect customer privacy: - Customer data encrypted end-to-end with either Hyphen AI-managaed or customer-managed keys - Customers maintain complete control over their sensitive data - Data collection limited to what is necessary to provide services - Compliance with applicable data protection regulations ## Security Incident Management ### Incident Classification Security incidents are classified by severity with corresponding response procedures: - **Critical** incidents: Active breach, data exposure, complete service outage - **Major** incidents: Suspected compromise, significant service degradation - **Minor** incidents: Security vulnerability, limited impact ### Response Process Hyphen AI follows a structured incident response process: 1. **Detection & Reporting** - Incident declaration and team mobilization 2. **Assessment** - Severity determination and scope identification 3. **Containment** - Immediate actions to limit impact 4. **Investigation** - Root cause analysis and impact assessment 5. **Resolution** - Remediation and service restoration 6. **Post-Incident Review** - Lessons learned and preventive measures ### Customer Communication Customers are notified promptly for: - Data breaches or potential exposure of customer data - Extended service outages affecting availability - Security incidents that may impact customer operations Breach notifications follow applicable regulatory requirements including GDPR, CCPA, and other relevant data protection laws. ## Supplier Management Third-party vendors that process, store, or transmit data are evaluated for: - Security posture and certifications (SOC 2, ISO 27001, or equivalent) - Data handling and privacy practices - Access controls and audit capabilities - Availability commitments and historical reliability - Compliance with data protection regulations (GDPR, CCPA) Critical vendors are reviewed regularly to ensure: - Security certifications remain current - Service quality meets commitments - No material changes to data handling or security practices - Continued alignment with Hyphen AI security standards ## System Acquisition, Development, and Maintenance ### Secure Development Practices - Security considerations integrated throughout development lifecycle - Code review requirements for all changes - Automated security testing in deployment pipelines - Dependency scanning and vulnerability management - Secure coding standards and developer training ### Change Control Production changes are managed through: - Documented change control processes - Peer review and approval requirements - Automated testing and validation - Rollback procedures for failed changes - Exception processes for emergency security fixes with appropriate oversight ## Questions & Support For questions about our security practices or to report a security concern email help@hyphen.ai. --- *Last updated: 2025-10-30* ## API Reference URL: https://hyphen.ai/docs/api OpenAPI Spec Source: /app/docs-site/api/hyphen/swagger.json { "openapi": "3.0.3", "info": { "title": "Hyphen Engine", "description": "Hyphen Engine API explorer", "version": "1.0.0" }, "components": { "securitySchemes": { "Cookie": { "type": "apiKey", "in": "cookie", "name": "access_token", "description": "Authenticate with a Hyphen Cookie available from login." }, "AccessToken": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Authenticate with a Hyphen Access Token." }, "ApiKey": { "type": "apiKey", "in": "header", "name": "x-api-key", "description": "Authenticate with a Hyphen API Key." } }, "schemas": {} }, "paths": { "/api/auth/login": { "get": { "summary": "Get a login", "tags": [ "OAuth2" ], "description": "Get a user login for the given client id and scope. The user login will generate a code challenge and redirect to the auth provider login page for the user to complete the login. The Login will also set the callback url to the token exchange endpoint.", "parameters": [ { "schema": { "type": "string", "default": "openid offline_access profile email" }, "in": "query", "name": "scope", "required": false, "description": "The scopes of the token to be generated. You can request multiple scopes by separating them with a space." }, { "schema": { "type": "string" }, "in": "query", "name": "state", "required": false, "description": "The state to be passed back to client." }, { "schema": { "type": "string", "default": "login" }, "in": "query", "name": "prompt", "required": false, "description": "The oauth2 prompt." } ], "security": [], "responses": { "302": { "description": "Successfully got a login", "headers": { "Set-Cookie": { "schema": { "type": "string", "example": "state=kb0HpIfASYi7er9w:; Path=/; HttpOnly; Secure; SameSite=Lax,redirect_url=http://hyphen.ai/api/auth/token-exchange; Path=/; HttpOnly; Secure; SameSite=Lax" }, "description": "The cookies set for the login." } } } } } }, "/api/auth/token-exchange": { "get": { "summary": "Get a token", "tags": [ "OAuth2" ], "parameters": [ { "schema": { "type": "string" }, "in": "query", "name": "code", "required": false, "description": "The code from the auth provider login." }, { "schema": { "type": "string" }, "in": "query", "name": "state", "required": true, "description": "The state from the auth provider login." } ], "security": [], "responses": { "302": { "description": "Successfully got a token", "headers": { "Set-Cookie": { "schema": { "type": "string" }, "description": "The cookies set for the token." } } }, "403": { "description": "Unable to get a token" } } } }, "/api/auth/jwt-refresh": { "post": { "summary": "Create a token refresh", "tags": [ "OAuth2" ], "description": "Create a token refresh. This will use a refresh token from the cookies set in the token exchange and return a new token with a new expiration.", "security": [], "responses": { "204": { "description": "Successfully created a token refresh.", "headers": { "Set-Cookie": { "schema": { "type": "string" }, "description": "The cookies set for the token." } } }, "403": { "description": "Unable to create a token refresh" } } } }, "/api/auth/logout": { "get": { "summary": "Get a logout", "tags": [ "OAuth2" ], "description": "Get a user logout. This will clear the cookies and redirect to the auth provider logout page.", "security": [], "responses": { "302": { "description": "Successfully got a logout", "headers": { "Set-Cookie": { "schema": { "type": "string" }, "description": "The cookies set for the logout" } } } } } }, "/api/auth/m2m": { "post": { "summary": "Create a m2m token", "tags": [ "OAuth2" ], "description": "Create a m2m token using the client id and client secret.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "clientId", "clientSecret" ], "properties": { "clientId": { "description": "The client Id.", "type": "string" }, "clientSecret": { "description": "The client secret.", "type": "string" } } } } } }, "security": [], "responses": { "201": { "description": "Successfully created an m2m token", "content": { "application/json": { "schema": { "description": "Successfully created an m2m token", "type": "object", "additionalProperties": false, "properties": { "access_token": { "description": "The access token to use for the bearer token.", "type": "string" }, "id_token": { "description": "The Id token.", "type": "string" }, "token_type": { "description": "The token type.", "type": "string" }, "access_token_expires_in": { "description": "The milliseconds until the access token expires.", "type": "number" }, "access_token_expires_at": { "description": "The of milliseconds since EPOC.", "type": "number" } }, "required": [ "access_token", "id_token", "token_type", "access_token_expires_in", "access_token_expires_at" ] } } } } } } }, "/api/billing-accounts/": { "get": { "summary": "Get a list of billing accounts", "tags": [ "Billing Accounts" ], "parameters": [ { "schema": { "type": "integer", "minimum": 1, "default": 1 }, "in": "query", "name": "pageNum", "required": false, "description": "The page number." }, { "schema": { "type": "integer", "minimum": 5, "maximum": 200, "default": 50 }, "in": "query", "name": "pageSize", "required": false, "description": "The page size." } ], "responses": { "200": { "description": "Successfully got a list of billing accounts", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "description": "Successfully got a list of billing accounts", "properties": { "total": { "description": "The total number of records.", "type": "number" }, "pageNum": { "description": "The page number.", "type": "number" }, "pageSize": { "description": "The page size.", "type": "number" }, "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^bila_[a-fA-F0-9]{24}$", "description": "The billing account Id." }, "name": { "description": "The billing name.", "type": "string" }, "email": { "description": "The billing email address.", "type": "string", "format": "email" }, "phone": { "description": "The billing phone number.", "type": "string" }, "address": { "type": "object", "additionalProperties": false, "properties": { "streetAddress": { "description": "The street address.", "type": "string", "minLength": 1 }, "locality": { "description": "The city, town, or village.", "type": "string", "minLength": 1 }, "region": { "description": "The state, providence, or territory.", "type": "string", "minLength": 1 }, "postalCode": { "description": "The postal code.", "type": "string", "minLength": 1 }, "country": { "description": "The country.", "type": "string", "enum": [ "US" ] } }, "required": [ "streetAddress", "locality", "region", "postalCode", "country" ], "description": "The billing address." }, "provider": { "description": "The billing provider.", "type": "string", "enum": [ "Stripe", "Azure" ] }, "providerId": { "description": "The billing provider Id.", "type": "string" }, "paymentMethods": { "description": "The payment methods.", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "providerId": { "description": "The payment method provider Id.", "type": "string" }, "type": { "description": "The payment method type.", "type": "string", "enum": [ "Card", "ACH", "External" ] }, "last4": { "description": "The last four digits of credit card or bank account", "type": "string" }, "cardType": { "description": "The card type.", "type": "string", "enum": [ "Visa", "Amex", "Mastercard", "Discover" ] }, "expiration": { "description": "The expiration date of the card.", "type": "string" }, "isDefault": { "description": "The default payment method.", "type": "boolean" } }, "required": [ "providerId", "type" ] } }, "subscription": { "description": "The billing subscription.", "type": "object", "additionalProperties": false, "properties": { "providerId": { "description": "The subscription provider Id.", "type": "string" }, "startDate": { "description": "The subscription start date.", "type": "string", "format": "date-time" }, "status": { "description": "The subscription status.", "type": "string" }, "cycles": { "description": "The subscription cycles.", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The billing cycle Id.", "type": "number" }, "startDate": { "description": "The billing cycle start date.", "type": "string", "format": "date-time" }, "endDate": { "description": "The billing cycle end date.", "type": "string", "format": "date-time" }, "invoicePreviewAmountDue": { "description": "The billing cycle invoice preview amount due.", "type": "number" } }, "required": [ "id", "startDate", "endDate" ] } }, "isDelinquent": { "description": "Indicates if the subscription is delinquent.", "type": "boolean" } }, "required": [ "providerId", "startDate", "status" ] }, "owners": { "description": "The billing owners.", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "userId": { "description": "The user Id.", "type": "string" }, "name": { "description": "The owner full name.", "type": "string" }, "email": { "description": "The owner email address", "type": "string", "format": "email" } }, "required": [ "userId", "name", "email" ] } }, "invoices": { "description": "The billing account invoices.", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "providerId": { "description": "The invoice provider Id.", "type": "string" }, "amount": { "description": "The invoice amount.", "type": "number" }, "createdDate": { "description": "The invoice created date.", "type": "string", "format": "date-time" }, "subTotal": { "description": "The invoice sub total.", "type": "number" }, "total": { "description": "The invoice total.", "type": "number" }, "discount": { "description": "The invoice discount.", "type": "number" }, "credit": { "description": "The invoice credit.", "type": "number" }, "status": { "description": "The invoice status.", "type": "string", "enum": [ "Draft", "Open", "Paid", "Void" ] }, "periodEnd": { "description": "The invoice period end date.", "type": "string", "format": "date-time" }, "periodStart": { "description": "The invoice period start date.", "type": "string", "format": "date-time" }, "cycleId": { "description": "The invoice cycle Id.", "type": "number" }, "tax": { "description": "The invoice tax.", "type": "number" }, "dueDate": { "description": "The invoice due date.", "type": "string", "format": "date-time" } }, "required": [ "providerId", "amount", "createdDate", "subTotal", "total", "discount", "credit", "status", "periodEnd", "periodStart" ] } } }, "required": [ "id", "name", "email", "provider", "paymentMethods", "owners" ] } } }, "required": [ "total", "pageNum", "pageSize", "data" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/billing-accounts/{billingAccountId}/": { "get": { "summary": "Get the billing account", "tags": [ "Billing Accounts" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^bila_[a-fA-F0-9]{24}$" }, "in": "path", "name": "billingAccountId", "required": true, "description": "The billing account Id." } ], "responses": { "200": { "description": "Successfully got a billing account", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^bila_[a-fA-F0-9]{24}$", "description": "The billing account Id." }, "name": { "description": "The billing name.", "type": "string" }, "email": { "description": "The billing email address.", "type": "string", "format": "email" }, "phone": { "description": "The billing phone number.", "type": "string" }, "address": { "type": "object", "additionalProperties": false, "properties": { "streetAddress": { "description": "The street address.", "type": "string", "minLength": 1 }, "locality": { "description": "The city, town, or village.", "type": "string", "minLength": 1 }, "region": { "description": "The state, providence, or territory.", "type": "string", "minLength": 1 }, "postalCode": { "description": "The postal code.", "type": "string", "minLength": 1 }, "country": { "description": "The country.", "type": "string", "enum": [ "US" ] } }, "required": [ "streetAddress", "locality", "region", "postalCode", "country" ], "description": "The billing address." }, "provider": { "description": "The billing provider.", "type": "string", "enum": [ "Stripe", "Azure" ] }, "providerId": { "description": "The billing provider Id.", "type": "string" }, "paymentMethods": { "description": "The payment methods.", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "providerId": { "description": "The payment method provider Id.", "type": "string" }, "type": { "description": "The payment method type.", "type": "string", "enum": [ "Card", "ACH", "External" ] }, "last4": { "description": "The last four digits of credit card or bank account", "type": "string" }, "cardType": { "description": "The card type.", "type": "string", "enum": [ "Visa", "Amex", "Mastercard", "Discover" ] }, "expiration": { "description": "The expiration date of the card.", "type": "string" }, "isDefault": { "description": "The default payment method.", "type": "boolean" } }, "required": [ "providerId", "type" ] } }, "subscription": { "description": "The billing subscription.", "type": "object", "additionalProperties": false, "properties": { "providerId": { "description": "The subscription provider Id.", "type": "string" }, "startDate": { "description": "The subscription start date.", "type": "string", "format": "date-time" }, "status": { "description": "The subscription status.", "type": "string" }, "cycles": { "description": "The subscription cycles.", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The billing cycle Id.", "type": "number" }, "startDate": { "description": "The billing cycle start date.", "type": "string", "format": "date-time" }, "endDate": { "description": "The billing cycle end date.", "type": "string", "format": "date-time" }, "invoicePreviewAmountDue": { "description": "The billing cycle invoice preview amount due.", "type": "number" } }, "required": [ "id", "startDate", "endDate" ] } }, "isDelinquent": { "description": "Indicates if the subscription is delinquent.", "type": "boolean" } }, "required": [ "providerId", "startDate", "status" ] }, "owners": { "description": "The billing owners.", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "userId": { "description": "The user Id.", "type": "string" }, "name": { "description": "The owner full name.", "type": "string" }, "email": { "description": "The owner email address", "type": "string", "format": "email" } }, "required": [ "userId", "name", "email" ] } }, "invoices": { "description": "The billing account invoices.", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "providerId": { "description": "The invoice provider Id.", "type": "string" }, "amount": { "description": "The invoice amount.", "type": "number" }, "createdDate": { "description": "The invoice created date.", "type": "string", "format": "date-time" }, "subTotal": { "description": "The invoice sub total.", "type": "number" }, "total": { "description": "The invoice total.", "type": "number" }, "discount": { "description": "The invoice discount.", "type": "number" }, "credit": { "description": "The invoice credit.", "type": "number" }, "status": { "description": "The invoice status.", "type": "string", "enum": [ "Draft", "Open", "Paid", "Void" ] }, "periodEnd": { "description": "The invoice period end date.", "type": "string", "format": "date-time" }, "periodStart": { "description": "The invoice period start date.", "type": "string", "format": "date-time" }, "cycleId": { "description": "The invoice cycle Id.", "type": "number" }, "tax": { "description": "The invoice tax.", "type": "number" }, "dueDate": { "description": "The invoice due date.", "type": "string", "format": "date-time" } }, "required": [ "providerId", "amount", "createdDate", "subTotal", "total", "discount", "credit", "status", "periodEnd", "periodStart" ] } } }, "required": [ "id", "name", "email", "provider", "paymentMethods", "owners" ], "description": "Successfully got a billing account" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "patch": { "summary": "Update the billing account", "tags": [ "Billing Accounts" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "name": { "description": "The billing name.", "type": "string" }, "email": { "description": "The billing email address.", "type": "string", "format": "email" }, "phone": { "description": "The billing phone number.", "type": "string" }, "address": { "type": "object", "additionalProperties": false, "properties": { "streetAddress": { "description": "The street address.", "type": "string", "minLength": 1 }, "locality": { "description": "The city, town, or village.", "type": "string", "minLength": 1 }, "region": { "description": "The state, providence, or territory.", "type": "string", "minLength": 1 }, "postalCode": { "description": "The postal code.", "type": "string", "minLength": 1 }, "country": { "description": "The country.", "type": "string", "enum": [ "US" ] } }, "required": [ "streetAddress", "locality", "region", "postalCode", "country" ], "description": "The billing address." }, "promoCodes": { "description": "The billing promo codes.", "type": "array", "items": { "type": "string" } } } } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^bila_[a-fA-F0-9]{24}$" }, "in": "path", "name": "billingAccountId", "required": true, "description": "The billing account Id." } ], "responses": { "200": { "description": "Successfully updated a billing account", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^bila_[a-fA-F0-9]{24}$", "description": "The billing account Id." }, "name": { "description": "The billing name.", "type": "string" }, "email": { "description": "The billing email address.", "type": "string", "format": "email" }, "phone": { "description": "The billing phone number.", "type": "string" }, "address": { "type": "object", "additionalProperties": false, "properties": { "streetAddress": { "description": "The street address.", "type": "string", "minLength": 1 }, "locality": { "description": "The city, town, or village.", "type": "string", "minLength": 1 }, "region": { "description": "The state, providence, or territory.", "type": "string", "minLength": 1 }, "postalCode": { "description": "The postal code.", "type": "string", "minLength": 1 }, "country": { "description": "The country.", "type": "string", "enum": [ "US" ] } }, "required": [ "streetAddress", "locality", "region", "postalCode", "country" ], "description": "The billing address." }, "provider": { "description": "The billing provider.", "type": "string", "enum": [ "Stripe", "Azure" ] }, "providerId": { "description": "The billing provider Id.", "type": "string" }, "paymentMethods": { "description": "The payment methods.", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "providerId": { "description": "The payment method provider Id.", "type": "string" }, "type": { "description": "The payment method type.", "type": "string", "enum": [ "Card", "ACH", "External" ] }, "last4": { "description": "The last four digits of credit card or bank account", "type": "string" }, "cardType": { "description": "The card type.", "type": "string", "enum": [ "Visa", "Amex", "Mastercard", "Discover" ] }, "expiration": { "description": "The expiration date of the card.", "type": "string" }, "isDefault": { "description": "The default payment method.", "type": "boolean" } }, "required": [ "providerId", "type" ] } }, "subscription": { "description": "The billing subscription.", "type": "object", "additionalProperties": false, "properties": { "providerId": { "description": "The subscription provider Id.", "type": "string" }, "startDate": { "description": "The subscription start date.", "type": "string", "format": "date-time" }, "status": { "description": "The subscription status.", "type": "string" }, "cycles": { "description": "The subscription cycles.", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The billing cycle Id.", "type": "number" }, "startDate": { "description": "The billing cycle start date.", "type": "string", "format": "date-time" }, "endDate": { "description": "The billing cycle end date.", "type": "string", "format": "date-time" }, "invoicePreviewAmountDue": { "description": "The billing cycle invoice preview amount due.", "type": "number" } }, "required": [ "id", "startDate", "endDate" ] } }, "isDelinquent": { "description": "Indicates if the subscription is delinquent.", "type": "boolean" } }, "required": [ "providerId", "startDate", "status" ] }, "owners": { "description": "The billing owners.", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "userId": { "description": "The user Id.", "type": "string" }, "name": { "description": "The owner full name.", "type": "string" }, "email": { "description": "The owner email address", "type": "string", "format": "email" } }, "required": [ "userId", "name", "email" ] } }, "invoices": { "description": "The billing account invoices.", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "providerId": { "description": "The invoice provider Id.", "type": "string" }, "amount": { "description": "The invoice amount.", "type": "number" }, "createdDate": { "description": "The invoice created date.", "type": "string", "format": "date-time" }, "subTotal": { "description": "The invoice sub total.", "type": "number" }, "total": { "description": "The invoice total.", "type": "number" }, "discount": { "description": "The invoice discount.", "type": "number" }, "credit": { "description": "The invoice credit.", "type": "number" }, "status": { "description": "The invoice status.", "type": "string", "enum": [ "Draft", "Open", "Paid", "Void" ] }, "periodEnd": { "description": "The invoice period end date.", "type": "string", "format": "date-time" }, "periodStart": { "description": "The invoice period start date.", "type": "string", "format": "date-time" }, "cycleId": { "description": "The invoice cycle Id.", "type": "number" }, "tax": { "description": "The invoice tax.", "type": "number" }, "dueDate": { "description": "The invoice due date.", "type": "string", "format": "date-time" } }, "required": [ "providerId", "amount", "createdDate", "subTotal", "total", "discount", "credit", "status", "periodEnd", "periodStart" ] } } }, "required": [ "id", "name", "email", "provider", "paymentMethods", "owners" ], "description": "Successfully updated a billing account" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/billing-accounts/{billingAccountId}/usage": { "get": { "summary": "Get the usage for a billing account", "tags": [ "Billing Accounts" ], "parameters": [ { "schema": { "type": "number" }, "in": "query", "name": "billingCycle", "required": false, "description": "The billing cycle number." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^bila_[a-fA-F0-9]{24}$" }, "in": "path", "name": "billingAccountId", "required": true, "description": "The billing account id" } ], "responses": { "200": { "description": "Successfully got a billing account usage", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "billingCycle": { "description": "The billing cycle number.", "type": "number", "example": 1 }, "totalDays": { "description": "The total days in the billing cycle.", "type": "number", "example": 30 }, "remainingDays": { "description": "The remaining days in the billing cycle.", "type": "number", "example": 15 }, "startDate": { "description": "The start date of the billing cycle.", "type": "string", "format": "date-time", "example": "2021-01-01T00:00:00Z" }, "endDate": { "description": "The end date of the billing cycle.", "type": "string", "format": "date-time", "example": "2021-01-31T23:59:59Z" }, "lastUpdated": { "description": "The last updated date of the usage.", "type": "string", "format": "date-time", "example": "2021-01-01T00:00:00Z" }, "organizations": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "lastUpdated": { "description": "The last updated date of the usage.", "type": "string", "format": "date-time", "example": "2021-01-01T00:00:00Z" }, "total": { "type": "object", "additionalProperties": false, "properties": { "user": { "type": "object", "additionalProperties": false, "properties": { "active": { "type": "number", "description": "The number of active users in the billing cycle.", "required": [ "active" ], "example": 100 } } }, "seat": { "type": "object", "additionalProperties": false, "properties": { "total": { "type": "number", "description": "The total number of seats in the billing cycle.", "required": [ "total" ], "example": 100 }, "open": { "type": "number", "description": "The number of open seats in the billing cycle.", "required": [ "open" ], "example": 50 } } }, "env": { "type": "object", "additionalProperties": false, "properties": { "pull": { "type": "number", "description": "The number of pulls in the billing cycle.", "required": [ "pull" ], "example": 100 }, "push": { "type": "number", "description": "The number of pushes in the billing cycle.", "required": [ "push" ], "example": 100 } } }, "link": { "type": "object", "additionalProperties": false, "properties": { "created": { "type": "number", "description": "The number of links created in the billing cycle.", "required": [ "created" ], "example": 100 } } }, "netInfo": { "type": "object", "additionalProperties": false, "properties": { "requests": { "type": "number", "description": "The number of requests in the billing cycle.", "required": [ "requests" ], "example": 100 } } }, "toggle": { "type": "object", "additionalProperties": false, "properties": { "evaluations": { "type": "number", "description": "The number of evaluations in the billing cycle.", "required": [ "evaluations" ], "example": 100 } } }, "deploy": { "type": "object", "additionalProperties": false, "properties": { "seconds": { "type": "number", "description": "The total number of deploy seconds in the billing cycle.", "required": [ "seconds" ], "example": 1000 } } }, "agent": { "type": "object", "additionalProperties": false, "properties": { "seconds": { "type": "number", "description": "The total number of agent seconds in the billing cycle.", "required": [ "seconds" ], "example": 1000 } } } }, "required": [ "user", "seat", "env", "link", "netInfo", "toggle", "deploy", "agent" ] } }, "required": [ "organization", "total", "lastUpdated" ] } }, "total": { "type": "object", "additionalProperties": false, "properties": { "user": { "type": "object", "additionalProperties": false, "properties": { "active": { "type": "number", "description": "The number of active users in the billing cycle.", "required": [ "active" ], "example": 100 } } }, "seat": { "type": "object", "additionalProperties": false, "properties": { "total": { "type": "number", "description": "The total number of seats in the billing cycle.", "required": [ "total" ], "example": 100 }, "open": { "type": "number", "description": "The number of open seats in the billing cycle.", "required": [ "open" ], "example": 50 } } }, "env": { "type": "object", "additionalProperties": false, "properties": { "pull": { "type": "number", "description": "The total number of pulls in the billing cycle.", "required": [ "pull" ], "example": 100 }, "push": { "type": "number", "description": "The total number of pushes in the billing cycle.", "required": [ "push" ], "example": 100 } } }, "link": { "type": "object", "additionalProperties": false, "properties": { "created": { "type": "number", "description": "The total number of links created in the billing cycle.", "required": [ "created" ], "example": 100 } } }, "netInfo": { "type": "object", "additionalProperties": false, "properties": { "requests": { "type": "number", "description": "The total number of requests in the billing cycle.", "required": [ "requests" ], "example": 100 } } }, "toggle": { "type": "object", "additionalProperties": false, "properties": { "evaluations": { "type": "number", "description": "The number of evaluations in the billing cycle.", "required": [ "evaluations" ], "example": 100 } } }, "deploy": { "type": "object", "additionalProperties": false, "properties": { "seconds": { "type": "number", "description": "The total number of deploy seconds in the billing cycle.", "required": [ "seconds" ], "example": 1000 } } }, "agent": { "type": "object", "additionalProperties": false, "properties": { "seconds": { "type": "number", "description": "The total number of agent seconds in the billing cycle.", "required": [ "seconds" ], "example": 1000 } } } }, "required": [ "user", "seat", "env", "link", "netInfo", "toggle", "deploy", "agent" ] } }, "required": [ "billingCycle", "totalDays", "remainingDays", "startDate", "endDate", "lastUpdated", "organizations", "total" ], "description": "Successfully got a billing account usage" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/billing-accounts/{billingAccountId}/subscription/status": { "put": { "summary": "Update the status for a subscription", "tags": [ "Billing Accounts" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "status": { "description": "The new status for the billing account subscription", "type": "string", "enum": [ "Active", "Cancelling" ] } }, "required": [ "status" ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^bila_[a-fA-F0-9]{24}$" }, "in": "path", "name": "billingAccountId", "required": true, "description": "The billing account Id." } ], "responses": { "204": { "description": "Successfully updated billing account subscription status" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/billing-accounts/{billingAccountId}/invoices/{invoiceProviderId}/urls": { "get": { "summary": "Get urls for invoice", "tags": [ "Billing Accounts" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^bila_[a-fA-F0-9]{24}$" }, "in": "path", "name": "billingAccountId", "required": true, "description": "The billing account Id." }, { "schema": { "type": "string" }, "in": "path", "name": "invoiceProviderId", "required": true, "description": "The invoice provider Id." } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "http": { "type": [ "null", "string" ], "description": "URL to view the HTTP invoice" }, "pdf": { "type": [ "null", "string" ], "description": "URL to download the PDF invoice" } } } } } } } } }, "/api/billing-accounts/{billingAccountId}/organizations/": { "get": { "summary": "Get the organizations for a billing account", "tags": [ "Billing Accounts" ], "parameters": [ { "schema": { "type": "integer", "minimum": 1, "default": 1 }, "in": "query", "name": "pageNum", "required": false, "description": "The page number." }, { "schema": { "type": "integer", "minimum": 5, "maximum": 200, "default": 50 }, "in": "query", "name": "pageSize", "required": false, "description": "The page size." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^bila_[a-fA-F0-9]{24}$" }, "in": "path", "name": "billingAccountId", "required": true, "description": "The billing account Id." } ], "responses": { "200": { "description": "Successfully got a list of organizations", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "description": "Successfully got a list of organizations", "properties": { "total": { "description": "The total number of records.", "type": "number" }, "pageNum": { "description": "The page number.", "type": "number" }, "pageSize": { "description": "The page size.", "type": "number" }, "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." }, "logoUrl": { "type": "string", "description": "The URL of the organization logo." }, "defaultEnvironments": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "description": "The environment name. Must be unique within the project.\n\nMust have a length between 1 and 100 characters.", "type": "string", "minLength": 1, "maxLength": 100 }, "alternateId": { "description": "The environment alternate id. This id is set by the user and can be used to retrieve an environment.\n\nMust be unique within the project.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "color": { "description": "The environment color.\n\nMust be a valid hex color.", "type": "string", "pattern": "^#(?:[0-9a-fA-F]{3}){1,2}$" }, "type": { "description": "The environment type. Only one environment of type \"development\" or \"production\" is allowed per project", "type": "string", "enum": [ "development", "production", "custom" ] } }, "required": [ "name", "alternateId", "color", "type" ] } }, "billingAccount": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^bila_[a-fA-F0-9]{24}$", "description": "The billing account Id." }, "name": { "description": "The billing name.", "type": "string" } }, "required": [ "id", "name" ] } }, "required": [ "id", "name" ] } } }, "required": [ "total", "pageNum", "pageSize", "data" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/billing-accounts/{billingAccountId}/owners/": { "post": { "summary": "Create an owner for a billing account", "tags": [ "Billing Accounts" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "email": { "description": "The owner email address", "type": "string", "format": "email" } }, "required": [ "email" ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^bila_[a-fA-F0-9]{24}$" }, "in": "path", "name": "billingAccountId", "required": true, "description": "The billing account Id." } ], "responses": { "200": { "description": "Successfully created an owner", "content": { "application/json": { "schema": { "description": "Successfully created an owner", "type": "object", "additionalProperties": false, "properties": { "userId": { "description": "The user Id.", "type": "string" }, "name": { "description": "The owner full name.", "type": "string" }, "email": { "description": "The owner email address", "type": "string", "format": "email" } }, "required": [ "userId", "name", "email" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/billing-accounts/{billingAccountId}/owners/{userId}/": { "delete": { "summary": "Delete the owner for a billing account", "tags": [ "Billing Accounts" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^bila_[a-fA-F0-9]{24}$" }, "in": "path", "name": "billingAccountId", "required": true, "description": "The billing account Id." }, { "schema": { "type": "string" }, "in": "path", "name": "userId", "required": true, "description": "The user Id." } ], "responses": { "204": { "description": "Successfully deleted an owner" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/billing-accounts/{billingAccountId}/payment-methods/": { "post": { "summary": "Create a payment method for a billing account", "tags": [ "Billing Accounts" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "confirmationToken": { "description": "The confirmation token for the payment method", "type": "string" } }, "required": [ "confirmationToken" ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^bila_[a-fA-F0-9]{24}$" }, "in": "path", "name": "billingAccountId", "required": true, "description": "The billing account Id." } ], "responses": { "200": { "description": "Successfully created a payment method", "content": { "application/json": { "schema": { "description": "Successfully created a payment method", "type": "object", "additionalProperties": false, "properties": { "providerId": { "description": "The payment method provider Id.", "type": "string" }, "type": { "description": "The payment method type.", "type": "string", "enum": [ "Card", "ACH", "External" ] }, "last4": { "description": "The last four digits of credit card or bank account", "type": "string" }, "cardType": { "description": "The card type.", "type": "string", "enum": [ "Visa", "Amex", "Mastercard", "Discover" ] }, "expiration": { "description": "The expiration date of the card.", "type": "string" }, "isDefault": { "description": "The default payment method.", "type": "boolean" } }, "required": [ "providerId", "type" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/billing-accounts/{billingAccountId}/payment-methods/{providerId}/": { "patch": { "summary": "Update the payment method for a billing account", "tags": [ "Billing Accounts" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "isDefault": { "description": "The default payment method.", "type": "boolean", "enum": [ true ] } }, "required": [ "isDefault" ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^bila_[a-fA-F0-9]{24}$" }, "in": "path", "name": "billingAccountId", "required": true, "description": "The billing account Id." }, { "schema": { "type": "string" }, "in": "path", "name": "providerId", "required": true, "description": "The payment method provider Id." } ], "responses": { "200": { "description": "Successfully updated a payment method", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "providerId": { "description": "The payment method provider Id.", "type": "string" }, "type": { "description": "The payment method type.", "type": "string", "enum": [ "Card", "ACH", "External" ] }, "last4": { "description": "The last four digits of credit card or bank account", "type": "string" }, "cardType": { "description": "The card type.", "type": "string", "enum": [ "Visa", "Amex", "Mastercard", "Discover" ] }, "expiration": { "description": "The expiration date of the card.", "type": "string" }, "isDefault": { "description": "The default payment method.", "type": "boolean" } }, "required": [ "providerId", "type" ], "description": "Successfully updated a payment method" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "delete": { "summary": "Delete the payment method for a billing account", "tags": [ "Billing Accounts" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^bila_[a-fA-F0-9]{24}$" }, "in": "path", "name": "billingAccountId", "required": true, "description": "The billing account Id." }, { "schema": { "type": "string" }, "in": "path", "name": "providerId", "required": true, "description": "The payment method provider Id." } ], "responses": { "204": { "description": "Successfully deleted a payment method" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/downloads/{packageName}/{version}": { "get": { "summary": "Get the download URL for the specified package and version", "tags": [ "Package Download" ], "parameters": [ { "schema": { "type": "string" }, "in": "query", "name": "os", "required": false }, { "schema": { "type": "string" }, "in": "path", "name": "packageName", "required": true }, { "schema": { "type": "string" }, "in": "path", "name": "version", "required": true } ], "security": [], "responses": { "302": { "description": "Redirects to the download URL" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": "Error: Internal Server Error", "type": "string" } } } } } } }, "/api/downloads/{packageName}/versions": { "get": { "summary": "Get a list of versions for the specified package.", "tags": [ "Package Download" ], "parameters": [ { "schema": { "type": "string" }, "in": "query", "name": "latest", "required": false }, { "schema": { "type": "string" }, "in": "path", "name": "packageName", "required": true } ], "security": [], "responses": { "200": { "description": "Successfully got a list of versions", "content": { "application/json": { "schema": { "description": "Successfully got a list of versions", "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "packageName": { "type": "string" }, "version": { "type": "string" }, "latest": { "type": "boolean" }, "published": { "type": "string" } } } } }, "example": { "data": [ { "packageName": "something", "version": "1.0.0", "latest": true, "published": "2024-05-30" }, { "packageName": "something", "version": "0.9.0", "latest": false, "published": "2024-05-29" } ] } } } } }, "404": { "description": "Package not found", "content": { "application/json": { "schema": { "description": "Package not found", "example": "Package not found", "type": "string" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": "Error: Internal Server Error", "type": "string" } } } } } } }, "/api/events/{organizationId}/search": { "post": { "summary": "Get a list of events for an organization", "tags": [ "Events" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "types": { "type": "array", "items": { "type": "string", "enum": [ "DATABASE", "FILE-ACCESS", "USER.ADOPT-MEMBERS", "BILLING-ACCOUNT.CREATE", "BILLING-ACCOUNT.OWNER.ADD", "BILLING-ACCOUNT.OWNER.REMOVE", "BILLING-ACCOUNT.INVOICE.PAYMENT-FAILED", "BILLING-ACCOUNT.SUBSCRIPTION.CHANGE", "INCIDENT.CREATE", "ORGANIZATION.CREATE", "ORGANIZATION.DELETE", "ORGANIZATION.UPDATE", "ORGANIZATION.MEMBER.ADD", "ORGANIZATION.MEMBER.DELETE", "ORGANIZATION.MEMBER.CREATE", "ORGANIZATION.MEMBER.UPDATE", "ORGANIZATION.ACCESS.CHANGE", "ORGANIZATION.TEAM.CREATE", "ORGANIZATION.TEAM.DELETE", "ORGANIZATION.TEAM.MEMBER.ADD", "ORGANIZATION.TEAM.MEMBER.REMOVE", "LINK.DOMAIN.CREATE", "LINK.DOMAIN.DELETE", "LINK.DOMAIN.UPDATE", "LINK.CODE.CREATE", "LINK.CODE.DELETE", "LINK.CODE.UPDATE", "LINK.QR.CREATE", "LINK.QR.DELETE", "ENV.CREATE", "ENV.DELETE", "ENV.GET", "ENV.GET.DENY", "APP.CREATE", "APP.UPDATE", "APP.DELETE", "PROJECT.CREATE", "PROJECT.UPDATE", "PROJECT.DELETE", "PROJECT.ENVIRONMENT.CREATE", "PROJECT.ENVIRONMENT.UPDATE", "PROJECT.ENVIRONMENT.DELETE", "ORGANIZATION.INTEGRATION.CREATE", "ORGANIZATION.INTEGRATION.DELETE", "ORGANIZATION.INTEGRATION.CONNECTION.CREATE", "ORGANIZATION.INTEGRATION.CONNECTION.UPDATE", "ORGANIZATION.INTEGRATION.CONNECTION.DELETE", "ORGANIZATION.INTEGRATION.CONNECTION.DECOMMISSION", "ORGANIZATION.INTEGRATION.CONNECTION.FAILED", "ORGANIZATION.INTEGRATION.CONNECTION.ACCESS.CREATE", "ORGANIZATION.INTEGRATION.CONNECTION.ACCESS.UPDATE", "ORGANIZATION.INTEGRATION.CONNECTION.ACCESS.DELETE", "PUBLIC-KEY.CREATE", "PUBLIC-KEY.DELETE", "TOGGLE.CREATE", "TOGGLE.UPDATE", "TOGGLE.DELETE", "SEGMENT.CREATE", "SEGMENT.UPDATE", "SEGMENT.DELETE", "DEPLOYMENT.CREATE", "DEPLOYMENT.UPDATE", "DEPLOYMENT.DELETE", "DEPLOYMENT.RUN.CREATE", "DEPLOYMENT.RUN.UPDATE", "DEPLOYMENT.RUN.DELETE", "DEPLOYMENT.RUN.FINISHED", "ENVIRONMENT.RESOURCE.CREATE", "ENVIRONMENT.RESOURCE.UPDATE", "BILLING-ACCOUNT.INVOICE.CREATE", "BILLING-ACCOUNT.INVOICE.UPDATE", "BILLING-ACCOUNT.INVOICE.UPSERT", "RUN.CREATE", "RUN.UPDATE", "RUN.DELETE", "RUN.CANCEL", "RUN.FINISHED", "RUN.INPUT.REQUEST", "REPORT.RUN.FINISHED", "INCIDENT.ACKNOWLEDGE", "INCIDENT.RESOLVE", "INCIDENT.RESPONDER.REASSIGN", "INCIDENT.UPDATE", "AGENT-TASK.CREATE", "AGENT-TASK.UPDATE", "AGENT-TASK.DELETE", "KUBERNETES.CLUSTER.CREATE", "KUBERNETES.CLUSTER.DELETE", "KUBERNETES.INVENTORY.CREATE", "KUBERNETES.STALE-RESOURCE.CLEANUP", "KUBERNETES.STALE-RESOURCE.IGNORE", "KUBERNETES.STALE-RESOURCE.NAMESPACE-IGNORE" ] }, "description": "The type of events to filter by." }, "references": { "type": "array", "default": [], "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The reference Id.", "type": "string" }, "type": { "description": "The reference type.", "type": "string" }, "view": { "description": "Display data for the reference (e.g., name, labels, etc).", "type": "object", "additionalProperties": true } }, "required": [ "id", "type" ] }, "description": "The references for the event." }, "referenceOperation": { "type": "string", "enum": [ "AND", "OR" ], "default": "AND", "description": "Specifies whether to match all (AND) or any (OR) of the references." }, "startDate": { "type": "string", "format": "date-time", "description": "The start date for the events." }, "endDate": { "type": "string", "format": "date-time", "description": "The end date for the events." }, "pageSize": { "description": "The page size.", "type": "number" }, "pageCursor": { "type": "string", "description": "The page cursor.", "example": "evnt_60b3b3f4c4b3f00001f3b3f4" } } } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "Successfully got a list of events for an organization", "content": { "application/json": { "schema": { "description": "Successfully got a list of events for an organization", "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The event ID.", "type": "string", "example": "evnt_60b3b3f4c4b3f00001f3b3f4" }, "type": { "description": "The event type.", "type": "string", "enum": [ "DATABASE", "FILE-ACCESS", "USER.ADOPT-MEMBERS", "BILLING-ACCOUNT.CREATE", "BILLING-ACCOUNT.OWNER.ADD", "BILLING-ACCOUNT.OWNER.REMOVE", "BILLING-ACCOUNT.INVOICE.PAYMENT-FAILED", "BILLING-ACCOUNT.SUBSCRIPTION.CHANGE", "INCIDENT.CREATE", "ORGANIZATION.CREATE", "ORGANIZATION.DELETE", "ORGANIZATION.UPDATE", "ORGANIZATION.MEMBER.ADD", "ORGANIZATION.MEMBER.DELETE", "ORGANIZATION.MEMBER.CREATE", "ORGANIZATION.MEMBER.UPDATE", "ORGANIZATION.ACCESS.CHANGE", "ORGANIZATION.TEAM.CREATE", "ORGANIZATION.TEAM.DELETE", "ORGANIZATION.TEAM.MEMBER.ADD", "ORGANIZATION.TEAM.MEMBER.REMOVE", "LINK.DOMAIN.CREATE", "LINK.DOMAIN.DELETE", "LINK.DOMAIN.UPDATE", "LINK.CODE.CREATE", "LINK.CODE.DELETE", "LINK.CODE.UPDATE", "LINK.QR.CREATE", "LINK.QR.DELETE", "ENV.CREATE", "ENV.DELETE", "ENV.GET", "ENV.GET.DENY", "APP.CREATE", "APP.UPDATE", "APP.DELETE", "PROJECT.CREATE", "PROJECT.UPDATE", "PROJECT.DELETE", "PROJECT.ENVIRONMENT.CREATE", "PROJECT.ENVIRONMENT.UPDATE", "PROJECT.ENVIRONMENT.DELETE", "ORGANIZATION.INTEGRATION.CREATE", "ORGANIZATION.INTEGRATION.DELETE", "ORGANIZATION.INTEGRATION.CONNECTION.CREATE", "ORGANIZATION.INTEGRATION.CONNECTION.UPDATE", "ORGANIZATION.INTEGRATION.CONNECTION.DELETE", "ORGANIZATION.INTEGRATION.CONNECTION.DECOMMISSION", "ORGANIZATION.INTEGRATION.CONNECTION.FAILED", "ORGANIZATION.INTEGRATION.CONNECTION.ACCESS.CREATE", "ORGANIZATION.INTEGRATION.CONNECTION.ACCESS.UPDATE", "ORGANIZATION.INTEGRATION.CONNECTION.ACCESS.DELETE", "PUBLIC-KEY.CREATE", "PUBLIC-KEY.DELETE", "TOGGLE.CREATE", "TOGGLE.UPDATE", "TOGGLE.DELETE", "SEGMENT.CREATE", "SEGMENT.UPDATE", "SEGMENT.DELETE", "DEPLOYMENT.CREATE", "DEPLOYMENT.UPDATE", "DEPLOYMENT.DELETE", "DEPLOYMENT.RUN.CREATE", "DEPLOYMENT.RUN.UPDATE", "DEPLOYMENT.RUN.DELETE", "DEPLOYMENT.RUN.FINISHED", "ENVIRONMENT.RESOURCE.CREATE", "ENVIRONMENT.RESOURCE.UPDATE", "BILLING-ACCOUNT.INVOICE.CREATE", "BILLING-ACCOUNT.INVOICE.UPDATE", "BILLING-ACCOUNT.INVOICE.UPSERT", "RUN.CREATE", "RUN.UPDATE", "RUN.DELETE", "RUN.CANCEL", "RUN.FINISHED", "RUN.INPUT.REQUEST", "REPORT.RUN.FINISHED", "INCIDENT.ACKNOWLEDGE", "INCIDENT.RESOLVE", "INCIDENT.RESPONDER.REASSIGN", "INCIDENT.UPDATE", "AGENT-TASK.CREATE", "AGENT-TASK.UPDATE", "AGENT-TASK.DELETE", "KUBERNETES.CLUSTER.CREATE", "KUBERNETES.CLUSTER.DELETE", "KUBERNETES.INVENTORY.CREATE", "KUBERNETES.STALE-RESOURCE.CLEANUP", "KUBERNETES.STALE-RESOURCE.IGNORE", "KUBERNETES.STALE-RESOURCE.NAMESPACE-IGNORE" ] }, "timestamp": { "description": "The timestamp of when the event occurred.", "type": "string", "format": "date-time" }, "references": { "description": "The references for the event.", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The reference Id.", "type": "string" }, "type": { "description": "The reference type.", "type": "string" }, "view": { "description": "Display data for the reference (e.g., name, labels, etc).", "type": "object", "additionalProperties": true } }, "required": [ "id", "type" ] } }, "requestId": { "description": "The event request Id.", "type": "string" }, "actor": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "user": { "description": "The user that performed the event.", "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The user Id.", "type": "string" }, "name": { "description": "The user name.", "type": "string" } }, "required": [ "id", "name" ] }, "member": { "description": "The member that performed the event. This is only present if the event was performed by an organization member or on behalf of an organization member.", "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The member Id.", "type": "string" }, "name": { "description": "The member name.", "type": "string" } }, "required": [ "id", "name" ] }, "data": { "type": "object", "additionalProperties": true }, "ipAddress": { "description": "The IP address of the client that created the event.", "type": "string" }, "location": { "type": "object", "properties": { "country": { "description": "The country of the client.", "type": "string" }, "region": { "description": "The region of the client.", "type": "string" }, "city": { "description": "The city of the client.", "type": "string" }, "lat": { "description": "The lat of the client.", "type": "number" }, "lng": { "description": "The lng of the client.", "type": "number" }, "postalCode": { "description": "The postal code of the client.", "type": "string" }, "timezone": { "description": "The timezone of the client.", "type": "string" } } }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] } }, "required": [ "id", "type", "timestamp", "references", "user" ], "example": { "id": "evnt_60b3b3f4c4b3f00001f3b3f4", "type": "ORGANIZATION.CREATE", "timestamp": "2021-09-14T15:00:00Z", "organization": { "id": "org_66bf99b72a0043f841769880", "name": "My Org" }, "requestId": "12345", "references": [ { "id": "usr_60b3b3f4c4b3f00001f3b3f4", "type": "User", "view": { "name": "John Doe", "email": "john@example.com" } } ], "actor": { "id": "ca1c9bbd-9dd4-4119-81df-6a8ceea5dea0", "name": "John Doe" }, "user": { "id": "mem_66bf99b72a0043f841769880", "name": "John Doe" }, "data": { "id": "org_66bf99b72a0043f841769880", "name": "My Org" } } } }, "pageSize": { "description": "The page size.", "type": "number" }, "nextPageCursor": { "type": "string", "description": "The next page cursor.", "example": "evnt_60b3b3f4c4b3f00001f3b3f4" } }, "required": [ "data", "pageSize" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/integrations/": { "get": { "summary": "Get a list of integrations", "tags": [ "Integrations" ], "responses": { "200": { "description": "Successfully got a list of available integrations", "content": { "application/json": { "schema": { "type": "object", "description": "Successfully got a list of available integrations", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "hyphenCloud", "aws", "azure", "googleCloud", "googleWorkspace", "github", "slack", "office365", "newRelic", "signoz", "datadog", "incidentIo", "npm", "microsoftTeams", "jira", "cloudflare", "dockerHub", "okta", "mosyle" ] }, "name": { "type": "string" }, "description": { "type": "string" }, "image": { "type": "string" }, "backgroundImage": { "type": "string" }, "provides": { "type": "array", "items": { "type": "object", "properties": { "connectionType": { "type": "string", "enum": [ "DistributionList", "Channel", "PermissionGroup", "Folder", "Tag", "CloudWorkspace", "CodeRepository", "ProjectBoard", "User", "IncidentManagement", "APM", "CodeRegistry", "ContainerRegistry", "SiteRegistry", "StaticSite", "ProxyContainerRegistry", "NetworkGroup", "CloudNativeContainer", "DNSRecord", "DNSZone", "LoadBalancer", "BackendPool", "BackendEndpoint", "CustomDomain", "SSLCertificate", "ObjectStorage", "KubernetesObservability", "ManagedKubernetesCluster" ] }, "for": { "type": "array", "items": { "type": "string", "enum": [ "Organization", "Team", "Project", "ProjectEnvironment", "App", "KubernetesCluster", "Member", "SiteDeployment", "EnvironmentResources", "EnvironmentRegion", "AppDeploymentInstance", "ResourceRecord", "ResourceRecordValue", "Zone", "EnvironmentIngress", "AppDeployment", "EnvironmentStorage" ] } } }, "required": [ "connectionType", "for" ] } } }, "required": [ "type", "name", "description", "image", "backgroundImage", "provides" ] } } }, "required": [ "data" ] } } } } } } }, "/api/me/": { "get": { "summary": "Get the current user information", "tags": [ "Users" ], "responses": { "200": { "description": "Successfully got the current user information", "content": { "application/json": { "schema": { "type": "object", "properties": { "isImpersonating": { "type": "boolean" }, "isHyphenInternal": { "type": "boolean" }, "decodedIdToken": { "type": "object", "properties": { "email_verified": { "type": "boolean" }, "name": { "type": "string" }, "preferred_username": { "type": "string" }, "given_name": { "type": "string" }, "family_name": { "type": "string" }, "email": { "type": "string" } } }, "accessTokenExpiresIn": { "type": "number" }, "accessTokenExpiresAt": { "type": "number" }, "decodedToken": { "type": "object", "properties": { "exp": { "type": "number" }, "iat": { "type": "number" }, "iss": { "type": "string" }, "aud": { "type": "string" }, "sub": { "type": "string" }, "scope": { "type": "string" }, "email_verified": { "type": "boolean" }, "name": { "type": "string" }, "preferred_username": { "type": "string" }, "given_name": { "type": "string" }, "family_name": { "type": "string" }, "email": { "type": "string" } } }, "memberships": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "firstName": { "type": "string" }, "lastName": { "type": "string" }, "email": { "type": "string" }, "nickname": { "type": "string" }, "connectedAccounts": { "type": "array", "items": { "type": "object", "properties": { "identifier": { "type": "string" }, "type": { "type": "string", "enum": [ "idp", "apiKey", "discord", "hyphenCloud", "aws", "azure", "googleCloud", "googleWorkspace", "github", "slack", "office365", "newRelic", "signoz", "datadog", "incidentIo", "npm", "microsoftTeams", "jira", "cloudflare", "dockerHub", "okta", "mosyle" ] }, "email": { "type": "string", "nullable": true }, "profileUrl": { "type": "string", "nullable": true } }, "required": [ "identifier", "type" ] } }, "organization": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "isOrganizationAdmin": { "type": "boolean" } } }, "favorites": { "type": "array", "items": { "type": "object", "additionalProperties": true } }, "teams": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "name" ] } }, "resources": { "type": "array", "items": { "type": "object" } }, "organizationRoles": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": [ "OrganizationAdmin", "OrganizationMember" ] } } } } } }, "description": "Successfully got the current user information" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/": { "get": { "summary": "Get a list of organizations", "tags": [ "Organizations" ], "parameters": [ { "schema": { "type": "string" }, "in": "query", "name": "name", "required": false, "description": "Filter by organization name starts with (case insensitive)" }, { "schema": { "type": "integer", "minimum": 1, "default": 1 }, "in": "query", "name": "pageNum", "required": false, "description": "The page number." }, { "schema": { "type": "integer", "minimum": 5, "maximum": 200, "default": 50 }, "in": "query", "name": "pageSize", "required": false, "description": "The page size." } ], "responses": { "200": { "description": "Successfully got a list of organizations", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "description": "Successfully got a list of organizations", "properties": { "total": { "description": "The total number of records.", "type": "number" }, "pageNum": { "description": "The page number.", "type": "number" }, "pageSize": { "description": "The page size.", "type": "number" }, "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." }, "logoUrl": { "type": "string", "description": "The URL of the organization logo." }, "defaultEnvironments": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "description": "The environment name. Must be unique within the project.\n\nMust have a length between 1 and 100 characters.", "type": "string", "minLength": 1, "maxLength": 100 }, "alternateId": { "description": "The environment alternate id. This id is set by the user and can be used to retrieve an environment.\n\nMust be unique within the project.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "color": { "description": "The environment color.\n\nMust be a valid hex color.", "type": "string", "pattern": "^#(?:[0-9a-fA-F]{3}){1,2}$" }, "type": { "description": "The environment type. Only one environment of type \"development\" or \"production\" is allowed per project", "type": "string", "enum": [ "development", "production", "custom" ] } }, "required": [ "name", "alternateId", "color", "type" ] } }, "billingAccount": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^bila_[a-fA-F0-9]{24}$", "description": "The billing account Id." }, "name": { "description": "The billing name.", "type": "string" } }, "required": [ "id", "name" ] } }, "required": [ "id", "name" ] } } }, "required": [ "total", "pageNum", "pageSize", "data" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "post": { "summary": "Create an organization", "tags": [ "Organizations" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "The name of the organization." }, "defaultEnvironments": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "description": "The environment name. Must be unique within the project.\n\nMust have a length between 1 and 100 characters.", "type": "string", "minLength": 1, "maxLength": 100 }, "alternateId": { "description": "The environment alternate id. This id is set by the user and can be used to retrieve an environment.\n\nMust be unique within the project.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "color": { "description": "The environment color.\n\nMust be a valid hex color.", "type": "string", "pattern": "^#(?:[0-9a-fA-F]{3}){1,2}$" }, "type": { "description": "The environment type. Only one environment of type \"development\" or \"production\" is allowed per project", "type": "string", "enum": [ "development", "production", "custom" ] } }, "required": [ "name", "alternateId", "color", "type" ] } }, "billingAccount": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "name": { "description": "The billing name.", "type": "string" }, "email": { "description": "The billing email address.", "type": "string", "format": "email" }, "phone": { "description": "The billing phone number.", "type": "string" }, "address": { "type": "object", "additionalProperties": false, "properties": { "streetAddress": { "description": "The street address.", "type": "string", "minLength": 1 }, "locality": { "description": "The city, town, or village.", "type": "string", "minLength": 1 }, "region": { "description": "The state, providence, or territory.", "type": "string", "minLength": 1 }, "postalCode": { "description": "The postal code.", "type": "string", "minLength": 1 }, "country": { "description": "The country.", "type": "string", "enum": [ "US" ] } }, "required": [ "streetAddress", "locality", "region", "postalCode", "country" ], "description": "The billing address." }, "promoCodes": { "description": "The billing promo codes.", "type": "array", "items": { "type": "string" } }, "provider": { "description": "The billing provider for this account. Defaults to Stripe.", "type": "string", "enum": [ "Stripe", "Azure" ] }, "confirmationToken": { "type": "string", "description": "The payment method confirmation token." } }, "required": [ "name", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^bila_[a-fA-F0-9]{24}$", "description": "The billing account Id." } }, "required": [ "id" ] } ] }, "createDefaultProject": { "type": "boolean", "description": "Flag to create a default project when no project is specified." } }, "required": [ "name", "billingAccount" ] } } } }, "responses": { "201": { "description": "Successfully created an organization", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." }, "logoUrl": { "type": "string", "description": "The URL of the organization logo." }, "defaultEnvironments": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "description": "The environment name. Must be unique within the project.\n\nMust have a length between 1 and 100 characters.", "type": "string", "minLength": 1, "maxLength": 100 }, "alternateId": { "description": "The environment alternate id. This id is set by the user and can be used to retrieve an environment.\n\nMust be unique within the project.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "color": { "description": "The environment color.\n\nMust be a valid hex color.", "type": "string", "pattern": "^#(?:[0-9a-fA-F]{3}){1,2}$" }, "type": { "description": "The environment type. Only one environment of type \"development\" or \"production\" is allowed per project", "type": "string", "enum": [ "development", "production", "custom" ] } }, "required": [ "name", "alternateId", "color", "type" ] } }, "billingAccount": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^bila_[a-fA-F0-9]{24}$", "description": "The billing account Id." }, "name": { "description": "The billing name.", "type": "string" } }, "required": [ "id", "name" ] } }, "required": [ "id", "name" ], "description": "Successfully created an organization" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/": { "get": { "summary": "Get an organization", "tags": [ "Organizations" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "Successfully got an organization", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." }, "logoUrl": { "type": "string", "description": "The URL of the organization logo." }, "defaultEnvironments": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "description": "The environment name. Must be unique within the project.\n\nMust have a length between 1 and 100 characters.", "type": "string", "minLength": 1, "maxLength": 100 }, "alternateId": { "description": "The environment alternate id. This id is set by the user and can be used to retrieve an environment.\n\nMust be unique within the project.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "color": { "description": "The environment color.\n\nMust be a valid hex color.", "type": "string", "pattern": "^#(?:[0-9a-fA-F]{3}){1,2}$" }, "type": { "description": "The environment type. Only one environment of type \"development\" or \"production\" is allowed per project", "type": "string", "enum": [ "development", "production", "custom" ] } }, "required": [ "name", "alternateId", "color", "type" ] } }, "billingAccount": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^bila_[a-fA-F0-9]{24}$", "description": "The billing account Id." }, "name": { "description": "The billing name.", "type": "string" } }, "required": [ "id", "name" ] } }, "required": [ "id", "name" ], "description": "Successfully got an organization" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "patch": { "summary": "Update an organization", "tags": [ "Organizations" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "The name of the organization." }, "defaultEnvironments": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "description": "The environment name. Must be unique within the project.\n\nMust have a length between 1 and 100 characters.", "type": "string", "minLength": 1, "maxLength": 100 }, "alternateId": { "description": "The environment alternate id. This id is set by the user and can be used to retrieve an environment.\n\nMust be unique within the project.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "color": { "description": "The environment color.\n\nMust be a valid hex color.", "type": "string", "pattern": "^#(?:[0-9a-fA-F]{3}){1,2}$" }, "type": { "description": "The environment type. Only one environment of type \"development\" or \"production\" is allowed per project", "type": "string", "enum": [ "development", "production", "custom" ] } }, "required": [ "name", "alternateId", "color", "type" ] } } } } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "Successfully updated an organization", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." }, "logoUrl": { "type": "string", "description": "The URL of the organization logo." }, "defaultEnvironments": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "description": "The environment name. Must be unique within the project.\n\nMust have a length between 1 and 100 characters.", "type": "string", "minLength": 1, "maxLength": 100 }, "alternateId": { "description": "The environment alternate id. This id is set by the user and can be used to retrieve an environment.\n\nMust be unique within the project.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "color": { "description": "The environment color.\n\nMust be a valid hex color.", "type": "string", "pattern": "^#(?:[0-9a-fA-F]{3}){1,2}$" }, "type": { "description": "The environment type. Only one environment of type \"development\" or \"production\" is allowed per project", "type": "string", "enum": [ "development", "production", "custom" ] } }, "required": [ "name", "alternateId", "color", "type" ] } }, "billingAccount": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^bila_[a-fA-F0-9]{24}$", "description": "The billing account Id." }, "name": { "description": "The billing name.", "type": "string" } }, "required": [ "id", "name" ] } }, "required": [ "id", "name" ], "description": "Successfully updated an organization" } } } } } } }, "/api/organizations/{organizationId}/logo": { "put": { "summary": "Update the logo for an organization", "tags": [ "Organizations" ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "additionalProperties": false, "properties": { "logo": { "type": "string", "format": "binary" } }, "required": [ "logo" ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "Successfully updated the logo for an organization", "content": { "application/json": { "schema": { "description": "Successfully updated the logo for an organization", "type": "object", "additionalProperties": false, "properties": { "logoUrl": { "type": "string", "description": "The URL of the organization logo" } }, "required": [ "logoUrl" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/usage": { "get": { "summary": "Get an organization usage", "tags": [ "Organizations" ], "parameters": [ { "schema": { "type": "number" }, "in": "query", "name": "billingCycle", "required": false, "description": "The billing cycle number." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "Successfully got the usage for an organization", "content": { "application/json": { "schema": { "description": "Successfully got the usage for an organization", "type": "object", "additionalProperties": false, "properties": { "billingCycle": { "description": "The billing cycle number.", "type": "number", "example": 1 }, "totalDays": { "description": "The total days in the billing cycle.", "type": "number", "example": 30 }, "remainingDays": { "description": "The remaining days in the billing cycle.", "type": "number", "example": 15 }, "startDate": { "description": "The start date of the billing cycle.", "type": "string", "format": "date-time", "example": "2021-01-01T00:00:00Z" }, "endDate": { "description": "The end date of the billing cycle.", "type": "string", "format": "date-time", "example": "2021-01-31T23:59:59Z" }, "lastUpdated": { "description": "The last updated date of the usage.", "type": "string", "format": "date-time", "example": "2021-01-01T00:00:00Z" }, "total": { "type": "object", "additionalProperties": false, "properties": { "user": { "type": "object", "additionalProperties": false, "properties": { "active": { "type": "number", "description": "The number of active users in the billing cycle.", "required": [ "active" ], "example": 100 } } }, "seat": { "type": "object", "additionalProperties": false, "properties": { "total": { "type": "number", "description": "The total number of seats in the billing cycle.", "required": [ "total" ], "example": 100 }, "open": { "type": "number", "description": "The number of open seats in the billing cycle.", "required": [ "open" ], "example": 10 } } }, "env": { "type": "object", "additionalProperties": false, "properties": { "pull": { "type": "number", "description": "The total number of pulls in the billing cycle.", "required": [ "pull" ], "example": 100 }, "push": { "type": "number", "description": "The total number of pushes in the billing cycle.", "required": [ "push" ], "example": 100 } } }, "link": { "type": "object", "additionalProperties": false, "properties": { "created": { "type": "number", "description": "The total number of links created in the billing cycle.", "required": [ "created" ], "example": 100 } } }, "netInfo": { "type": "object", "additionalProperties": false, "properties": { "requests": { "type": "number", "description": "The total number of requests in the billing cycle.", "required": [ "requests" ], "example": 100 } } }, "toggle": { "type": "object", "additionalProperties": false, "properties": { "evaluations": { "type": "number", "description": "The number of evaluations in the billing cycle.", "required": [ "evaluations" ], "example": 100 } } }, "deploy": { "type": "object", "additionalProperties": false, "properties": { "seconds": { "type": "number", "description": "The total number of deploy seconds in the billing cycle.", "required": [ "seconds" ], "example": 7200 } } }, "agent": { "type": "object", "additionalProperties": false, "properties": { "seconds": { "type": "number", "description": "The total number of agent seconds in the billing cycle.", "required": [ "seconds" ], "example": 7200 } } } }, "required": [ "user", "seat", "env", "link", "netInfo", "toggle", "deploy", "agent" ] }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] } }, "required": [ "billingCycle", "totalDays", "remainingDays", "startDate", "endDate", "lastUpdated", "total", "organization" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/kubernetes/clusters": { "get": { "summary": "Get Kubernetes clusters for an organization", "tags": [ "Organizations" ], "parameters": [ { "schema": { "type": "integer", "minimum": 1, "default": 1 }, "in": "query", "name": "pageNum", "required": false, "description": "The page number." }, { "schema": { "type": "integer", "minimum": 5, "maximum": 200, "default": 50 }, "in": "query", "name": "pageSize", "required": false, "description": "The page size." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "Successfully got a list of Kubernetes clusters for an organization", "content": { "application/json": { "schema": { "description": "Successfully got a list of Kubernetes clusters for an organization", "type": "object", "additionalProperties": false, "properties": { "total": { "description": "The total number of records.", "type": "number" }, "pageNum": { "description": "The page number.", "type": "number" }, "pageSize": { "description": "The page size.", "type": "number" }, "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "alternateId": { "type": "string" }, "name": { "type": "string" }, "taskQueue": { "type": "string" }, "state": { "type": "string", "enum": [ "unknown", "ready", "removing", "cleanup_needed" ] }, "cloudProvider": { "type": "string", "enum": [ "googleCloud", "azure", "aws", "private" ] }, "source": { "type": "string", "enum": [ "horizon" ] }, "kubernetes": { "type": "object", "additionalProperties": false, "properties": { "clusterUid": { "type": "string" }, "identitySource": { "type": "string", "enum": [ "kube-system-namespace-uid" ] } }, "required": [ "clusterUid", "identitySource" ] }, "temporal": { "type": "object", "additionalProperties": false, "properties": { "namespace": { "type": "string" }, "address": { "type": "string" }, "serviceAccountId": { "type": "string" }, "serviceAccountName": { "type": "string" }, "apiKeyId": { "type": "string" }, "apiKeyExpiresAt": { "type": "string", "format": "date-time" } }, "required": [ "namespace", "address", "serviceAccountId", "serviceAccountName", "apiKeyId" ] }, "lastSeenAt": { "type": "string", "format": "date-time" }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "example": "2024-07-08T15:58:34.219+00:00" }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "example": "2024-07-08T15:58:34.219+00:00" }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "example": "2024-07-08T15:58:34.219+00:00" }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "id", "organization", "alternateId", "name", "taskQueue", "state", "cloudProvider", "source", "kubernetes", "temporal", "lastSeenAt", "meta" ] } } }, "required": [ "total", "pageNum", "pageSize", "data" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/kubernetes/clusters/{clusterId}": { "get": { "summary": "Get a Kubernetes cluster for an organization", "tags": [ "Organizations" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "in": "path", "name": "clusterId", "required": true, "description": "The Kubernetes cluster Id." } ], "responses": { "200": { "description": "Successfully got a Kubernetes cluster for an organization", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "alternateId": { "type": "string" }, "name": { "type": "string" }, "taskQueue": { "type": "string" }, "state": { "type": "string", "enum": [ "unknown", "ready", "removing", "cleanup_needed" ] }, "cloudProvider": { "type": "string", "enum": [ "googleCloud", "azure", "aws", "private" ] }, "source": { "type": "string", "enum": [ "horizon" ] }, "kubernetes": { "type": "object", "additionalProperties": false, "properties": { "clusterUid": { "type": "string" }, "identitySource": { "type": "string", "enum": [ "kube-system-namespace-uid" ] } }, "required": [ "clusterUid", "identitySource" ] }, "temporal": { "type": "object", "additionalProperties": false, "properties": { "namespace": { "type": "string" }, "address": { "type": "string" }, "serviceAccountId": { "type": "string" }, "serviceAccountName": { "type": "string" }, "apiKeyId": { "type": "string" }, "apiKeyExpiresAt": { "type": "string", "format": "date-time" } }, "required": [ "namespace", "address", "serviceAccountId", "serviceAccountName", "apiKeyId" ] }, "lastSeenAt": { "type": "string", "format": "date-time" }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "example": "2024-07-08T15:58:34.219+00:00" }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "example": "2024-07-08T15:58:34.219+00:00" }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "example": "2024-07-08T15:58:34.219+00:00" }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "id", "organization", "alternateId", "name", "taskQueue", "state", "cloudProvider", "source", "kubernetes", "temporal", "lastSeenAt", "meta" ], "description": "Successfully got a Kubernetes cluster for an organization" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "delete": { "summary": "Delete a Kubernetes cluster for an organization", "tags": [ "Organizations" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "in": "path", "name": "clusterId", "required": true, "description": "The Kubernetes cluster Id." } ], "responses": { "202": { "description": "Successfully started Kubernetes cluster deletion", "content": { "application/json": { "schema": { "description": "Successfully started Kubernetes cluster deletion", "type": "object", "additionalProperties": false, "properties": { "workflowId": { "type": "string" }, "runId": { "type": "string" }, "namespace": { "type": "string" }, "workflowTaskQueue": { "type": "string" }, "clusterTaskQueue": { "type": "string" }, "alreadyDeleted": { "type": "boolean" } }, "required": [ "workflowId", "runId", "namespace", "workflowTaskQueue", "clusterTaskQueue" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/kubernetes/clusters/{clusterId}/inventory": { "get": { "summary": "Get Kubernetes cluster inventory snapshots for an organization", "tags": [ "Organizations" ], "parameters": [ { "schema": { "type": "integer", "minimum": 1, "default": 1 }, "in": "query", "name": "pageNum", "required": false, "description": "The page number." }, { "schema": { "type": "integer", "minimum": 5, "maximum": 200, "default": 50 }, "in": "query", "name": "pageSize", "required": false, "description": "The page size." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "in": "path", "name": "clusterId", "required": true, "description": "The Kubernetes cluster Id." } ], "responses": { "200": { "description": "Successfully got Kubernetes cluster inventory snapshots for an organization", "content": { "application/json": { "schema": { "description": "Successfully got Kubernetes cluster inventory snapshots for an organization", "type": "object", "additionalProperties": false, "properties": { "total": { "description": "The total number of records.", "type": "number" }, "pageNum": { "description": "The page number.", "type": "number" }, "pageSize": { "description": "The page size.", "type": "number" }, "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The inventory snapshot ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "cluster": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster Id." }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "collectedAt": { "type": "string", "format": "date-time" }, "storedAt": { "type": "string", "format": "date-time" }, "workflow": { "type": "object", "additionalProperties": false, "properties": { "workflowId": { "type": "string" }, "runId": { "type": "string" } }, "required": [ "workflowId", "runId" ] } }, "required": [ "id", "organization", "cluster", "collectedAt", "storedAt", "workflow" ] } } }, "required": [ "total", "pageNum", "pageSize", "data" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/kubernetes/clusters/{clusterId}/inventory/{snapshotId}": { "get": { "summary": "Get a Kubernetes cluster inventory snapshot for an organization", "tags": [ "Organizations" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "in": "path", "name": "clusterId", "required": true, "description": "The Kubernetes cluster Id." }, { "schema": { "type": "string", "format": "ObjectId" }, "in": "path", "name": "snapshotId", "required": true, "description": "The Kubernetes inventory snapshot ID." } ], "responses": { "200": { "description": "Successfully got a Kubernetes cluster inventory snapshot for an organization", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The inventory snapshot ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "cluster": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster Id." }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "collectedAt": { "type": "string", "format": "date-time" }, "storedAt": { "type": "string", "format": "date-time" }, "workflow": { "type": "object", "additionalProperties": false, "properties": { "workflowId": { "type": "string" }, "runId": { "type": "string" } }, "required": [ "workflowId", "runId" ] }, "inventory": { "type": "object", "additionalProperties": true } }, "required": [ "id", "organization", "cluster", "collectedAt", "storedAt", "workflow", "inventory" ], "description": "Successfully got a Kubernetes cluster inventory snapshot for an organization" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/kubernetes/clusters/{clusterId}/inventory/refresh": { "post": { "summary": "Refresh Kubernetes cluster inventory", "tags": [ "Organizations" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "in": "path", "name": "clusterId", "required": true, "description": "The Kubernetes cluster Id." } ], "responses": { "202": { "description": "Successfully started a Kubernetes inventory refresh or returned the already-running workflow", "content": { "application/json": { "schema": { "description": "Successfully started a Kubernetes inventory refresh or returned the already-running workflow", "type": "object", "additionalProperties": false, "properties": { "workflowId": { "type": "string" }, "runId": { "type": "string" }, "namespace": { "type": "string" }, "workflowTaskQueue": { "type": "string" }, "clusterTaskQueue": { "type": "string" } }, "required": [ "workflowId", "runId", "namespace", "workflowTaskQueue", "clusterTaskQueue" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/kubernetes/clusters/{clusterId}/upgrade-plans": { "post": { "summary": "Create a Kubernetes cluster upgrade plan", "tags": [ "Organizations" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "in": "path", "name": "clusterId", "required": true, "description": "The Kubernetes cluster Id." } ], "responses": { "202": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "agentTaskId": { "type": "string", "minLength": 1, "pattern": "^agta_[a-fA-F0-9]{24}$" }, "runId": { "type": "string", "minLength": 1, "pattern": "^run_[a-fA-F0-9]{24}$" }, "workflowId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running" ] } }, "required": [ "agentTaskId", "runId", "workflowId", "status" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/access/": { "get": { "summary": "Get a list of access for an organization", "tags": [ "Access" ], "parameters": [ { "schema": { "type": "integer", "minimum": 1, "default": 1 }, "in": "query", "name": "pageNum", "required": false, "description": "The page number." }, { "schema": { "type": "integer", "minimum": 5, "maximum": 200, "default": 50 }, "in": "query", "name": "pageSize", "required": false, "description": "The page size." }, { "schema": { "type": "array", "items": { "oneOf": [ { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, { "type": "string", "minLength": 1, "pattern": "^team_[a-fA-F0-9]{24}$" }, { "type": "string", "enum": [ "*" ] } ] } }, "in": "query", "name": "entityIds", "required": false, "description": "The entity Ids." }, { "schema": { "type": "array", "items": { "oneOf": [ { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, { "type": "string", "minLength": 1, "pattern": "^team_[a-fA-F0-9]{24}$" } ] } }, "in": "query", "name": "assignmentIds", "required": false, "description": "The assignment Ids." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "Successfully got a list of access for an organization", "content": { "application/json": { "schema": { "description": "Successfully got a list of access for an organization", "type": "object", "additionalProperties": false, "properties": { "total": { "description": "The total number of records.", "type": "number" }, "pageNum": { "description": "The page number.", "type": "number" }, "pageSize": { "description": "The page size.", "type": "number" }, "data": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The access Id.", "type": "string" }, "type": { "description": "The type of access.", "type": "string", "enum": [ "Role" ] }, "assignment": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Organization" ] }, "id": { "description": "The organization Id.", "type": "string", "pattern": "^org_[a-fA-F0-9]{24}$" }, "name": { "description": "The organization name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Team" ] }, "id": { "description": "The team Id.", "type": "string", "pattern": "^team_[a-fA-F0-9]{24}$" }, "name": { "description": "The team name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Member" ] }, "id": { "description": "The member Id.", "type": "string", "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "description": "The member name.", "type": "string" } }, "required": [ "type", "id", "name" ] } ] }, "entity": { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The entity type.", "type": "string", "enum": [ "Organization" ] }, "id": { "description": "The organization Id.", "type": "string", "pattern": "^org_[a-fA-F0-9]{24}$" }, "name": { "description": "The Organization name.", "type": "string" } }, "required": [ "type", "name", "id" ] }, "roles": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": [ "OrganizationAdmin", "OrganizationMember" ] } } }, "required": [ "id", "type", "assignment", "entity", "roles" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The access Id.", "type": "string" }, "type": { "description": "The type of access.", "type": "string", "enum": [ "Role" ] }, "assignment": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Organization" ] }, "id": { "description": "The organization Id.", "type": "string", "pattern": "^org_[a-fA-F0-9]{24}$" }, "name": { "description": "The organization name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Team" ] }, "id": { "description": "The team Id.", "type": "string", "pattern": "^team_[a-fA-F0-9]{24}$" }, "name": { "description": "The team name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Member" ] }, "id": { "description": "The member Id.", "type": "string", "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "description": "The member name.", "type": "string" } }, "required": [ "type", "id", "name" ] } ] }, "entity": { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The entity type.", "type": "string", "enum": [ "Project" ] }, "id": { "description": "The project Id or \"*\" for all projects in the organization.", "type": "string", "pattern": "^(proj_[a-fA-F0-9]{24}|\\*)$" }, "name": { "description": "The project name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, "roles": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": [ "ProjectOwner", "ProjectCollaborator", "ProjectViewer" ] } } }, "required": [ "id", "type", "assignment", "entity", "roles" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The access Id.", "type": "string" }, "type": { "description": "The type of access.", "type": "string", "enum": [ "Role" ] }, "assignment": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Organization" ] }, "id": { "description": "The organization Id.", "type": "string", "pattern": "^org_[a-fA-F0-9]{24}$" }, "name": { "description": "The organization name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Team" ] }, "id": { "description": "The team Id.", "type": "string", "pattern": "^team_[a-fA-F0-9]{24}$" }, "name": { "description": "The team name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Member" ] }, "id": { "description": "The member Id.", "type": "string", "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "description": "The member name.", "type": "string" } }, "required": [ "type", "id", "name" ] } ] }, "entity": { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The entity type.", "type": "string", "enum": [ "Team" ] }, "id": { "description": "The team Id or \"*\" for all teams in the organization.", "type": "string", "pattern": "^(team_[a-fA-F0-9]{24}|\\*)$" }, "name": { "description": "The team name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, "roles": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": [ "TeamOwner", "TeamMember" ] } } }, "required": [ "id", "type", "assignment", "entity", "roles" ] } ] } } }, "required": [ "total", "pageNum", "pageSize", "data" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "post": { "summary": "Create access for an organization", "tags": [ "Access" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "assignment": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Organization" ] }, "id": { "description": "The organization Id.", "type": "string", "pattern": "^org_[a-fA-F0-9]{24}$" } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Team" ] }, "id": { "description": "The team Id.", "type": "string", "pattern": "^team_[a-fA-F0-9]{24}$" } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Member" ] }, "id": { "description": "The member Id.", "type": "string", "pattern": "^memb_[a-fA-F0-9]{24}$" } }, "required": [ "type", "id" ] } ] }, "entity": { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The entity type.", "type": "string", "enum": [ "Organization" ] }, "id": { "description": "The organization Id.", "type": "string", "pattern": "^org_[a-fA-F0-9]{24}$" } }, "required": [ "type", "id" ] }, "roles": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": [ "OrganizationAdmin", "OrganizationMember" ] } } }, "required": [ "assignment", "entity", "roles" ] }, { "type": "object", "additionalProperties": false, "properties": { "assignment": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Organization" ] }, "id": { "description": "The organization Id.", "type": "string", "pattern": "^org_[a-fA-F0-9]{24}$" } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Team" ] }, "id": { "description": "The team Id.", "type": "string", "pattern": "^team_[a-fA-F0-9]{24}$" } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Member" ] }, "id": { "description": "The member Id.", "type": "string", "pattern": "^memb_[a-fA-F0-9]{24}$" } }, "required": [ "type", "id" ] } ] }, "entity": { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The entity type.", "type": "string", "enum": [ "Project" ] }, "id": { "description": "The project Id or \"*\" for all projects in the organization.", "type": "string", "pattern": "^(proj_[a-fA-F0-9]{24}|\\*)$" } }, "required": [ "type", "id" ] }, "roles": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": [ "ProjectOwner", "ProjectCollaborator", "ProjectViewer" ] } } }, "required": [ "assignment", "entity", "roles" ] }, { "type": "object", "additionalProperties": false, "properties": { "assignment": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Organization" ] }, "id": { "description": "The organization Id.", "type": "string", "pattern": "^org_[a-fA-F0-9]{24}$" } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Team" ] }, "id": { "description": "The team Id.", "type": "string", "pattern": "^team_[a-fA-F0-9]{24}$" } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Member" ] }, "id": { "description": "The member Id.", "type": "string", "pattern": "^memb_[a-fA-F0-9]{24}$" } }, "required": [ "type", "id" ] } ] }, "entity": { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The entity type.", "type": "string", "enum": [ "Team" ] }, "id": { "description": "The team Id or \"*\" for all teams in the organization.", "type": "string", "pattern": "^(team_[a-fA-F0-9]{24}|\\*)$" } }, "required": [ "type", "id" ] }, "roles": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": [ "TeamOwner", "TeamMember" ] } } }, "required": [ "assignment", "entity", "roles" ] } ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "201": { "description": "Successfully created access for an organization", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The access Id.", "type": "string" }, "type": { "description": "The type of access.", "type": "string", "enum": [ "Role" ] }, "assignment": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Organization" ] }, "id": { "description": "The organization Id.", "type": "string", "pattern": "^org_[a-fA-F0-9]{24}$" }, "name": { "description": "The organization name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Team" ] }, "id": { "description": "The team Id.", "type": "string", "pattern": "^team_[a-fA-F0-9]{24}$" }, "name": { "description": "The team name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Member" ] }, "id": { "description": "The member Id.", "type": "string", "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "description": "The member name.", "type": "string" } }, "required": [ "type", "id", "name" ] } ] }, "entity": { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The entity type.", "type": "string", "enum": [ "Organization" ] }, "id": { "description": "The organization Id.", "type": "string", "pattern": "^org_[a-fA-F0-9]{24}$" }, "name": { "description": "The Organization name.", "type": "string" } }, "required": [ "type", "name", "id" ] }, "roles": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": [ "OrganizationAdmin", "OrganizationMember" ] } } }, "required": [ "id", "type", "assignment", "entity", "roles" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The access Id.", "type": "string" }, "type": { "description": "The type of access.", "type": "string", "enum": [ "Role" ] }, "assignment": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Organization" ] }, "id": { "description": "The organization Id.", "type": "string", "pattern": "^org_[a-fA-F0-9]{24}$" }, "name": { "description": "The organization name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Team" ] }, "id": { "description": "The team Id.", "type": "string", "pattern": "^team_[a-fA-F0-9]{24}$" }, "name": { "description": "The team name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Member" ] }, "id": { "description": "The member Id.", "type": "string", "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "description": "The member name.", "type": "string" } }, "required": [ "type", "id", "name" ] } ] }, "entity": { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The entity type.", "type": "string", "enum": [ "Project" ] }, "id": { "description": "The project Id or \"*\" for all projects in the organization.", "type": "string", "pattern": "^(proj_[a-fA-F0-9]{24}|\\*)$" }, "name": { "description": "The project name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, "roles": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": [ "ProjectOwner", "ProjectCollaborator", "ProjectViewer" ] } } }, "required": [ "id", "type", "assignment", "entity", "roles" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The access Id.", "type": "string" }, "type": { "description": "The type of access.", "type": "string", "enum": [ "Role" ] }, "assignment": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Organization" ] }, "id": { "description": "The organization Id.", "type": "string", "pattern": "^org_[a-fA-F0-9]{24}$" }, "name": { "description": "The organization name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Team" ] }, "id": { "description": "The team Id.", "type": "string", "pattern": "^team_[a-fA-F0-9]{24}$" }, "name": { "description": "The team name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Member" ] }, "id": { "description": "The member Id.", "type": "string", "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "description": "The member name.", "type": "string" } }, "required": [ "type", "id", "name" ] } ] }, "entity": { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The entity type.", "type": "string", "enum": [ "Team" ] }, "id": { "description": "The team Id or \"*\" for all teams in the organization.", "type": "string", "pattern": "^(team_[a-fA-F0-9]{24}|\\*)$" }, "name": { "description": "The team name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, "roles": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": [ "TeamOwner", "TeamMember" ] } } }, "required": [ "id", "type", "assignment", "entity", "roles" ] } ], "description": "Successfully created access for an organization" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/access/{accessId}/": { "get": { "summary": "Get the access for an organization", "tags": [ "Access" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^acc_[a-fA-F0-9]{24}$" }, "in": "path", "name": "accessId", "required": true, "description": "The access Id." } ], "responses": { "200": { "description": "Successfully got the access for an organization", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The access Id.", "type": "string" }, "type": { "description": "The type of access.", "type": "string", "enum": [ "Role" ] }, "assignment": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Organization" ] }, "id": { "description": "The organization Id.", "type": "string", "pattern": "^org_[a-fA-F0-9]{24}$" }, "name": { "description": "The organization name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Team" ] }, "id": { "description": "The team Id.", "type": "string", "pattern": "^team_[a-fA-F0-9]{24}$" }, "name": { "description": "The team name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Member" ] }, "id": { "description": "The member Id.", "type": "string", "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "description": "The member name.", "type": "string" } }, "required": [ "type", "id", "name" ] } ] }, "entity": { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The entity type.", "type": "string", "enum": [ "Organization" ] }, "id": { "description": "The organization Id.", "type": "string", "pattern": "^org_[a-fA-F0-9]{24}$" }, "name": { "description": "The Organization name.", "type": "string" } }, "required": [ "type", "name", "id" ] }, "roles": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": [ "OrganizationAdmin", "OrganizationMember" ] } } }, "required": [ "id", "type", "assignment", "entity", "roles" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The access Id.", "type": "string" }, "type": { "description": "The type of access.", "type": "string", "enum": [ "Role" ] }, "assignment": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Organization" ] }, "id": { "description": "The organization Id.", "type": "string", "pattern": "^org_[a-fA-F0-9]{24}$" }, "name": { "description": "The organization name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Team" ] }, "id": { "description": "The team Id.", "type": "string", "pattern": "^team_[a-fA-F0-9]{24}$" }, "name": { "description": "The team name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Member" ] }, "id": { "description": "The member Id.", "type": "string", "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "description": "The member name.", "type": "string" } }, "required": [ "type", "id", "name" ] } ] }, "entity": { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The entity type.", "type": "string", "enum": [ "Project" ] }, "id": { "description": "The project Id or \"*\" for all projects in the organization.", "type": "string", "pattern": "^(proj_[a-fA-F0-9]{24}|\\*)$" }, "name": { "description": "The project name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, "roles": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": [ "ProjectOwner", "ProjectCollaborator", "ProjectViewer" ] } } }, "required": [ "id", "type", "assignment", "entity", "roles" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The access Id.", "type": "string" }, "type": { "description": "The type of access.", "type": "string", "enum": [ "Role" ] }, "assignment": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Organization" ] }, "id": { "description": "The organization Id.", "type": "string", "pattern": "^org_[a-fA-F0-9]{24}$" }, "name": { "description": "The organization name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Team" ] }, "id": { "description": "The team Id.", "type": "string", "pattern": "^team_[a-fA-F0-9]{24}$" }, "name": { "description": "The team name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Member" ] }, "id": { "description": "The member Id.", "type": "string", "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "description": "The member name.", "type": "string" } }, "required": [ "type", "id", "name" ] } ] }, "entity": { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The entity type.", "type": "string", "enum": [ "Team" ] }, "id": { "description": "The team Id or \"*\" for all teams in the organization.", "type": "string", "pattern": "^(team_[a-fA-F0-9]{24}|\\*)$" }, "name": { "description": "The team name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, "roles": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": [ "TeamOwner", "TeamMember" ] } } }, "required": [ "id", "type", "assignment", "entity", "roles" ] } ], "description": "Successfully got the access for an organization" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "patch": { "summary": "Update the access for an organization", "tags": [ "Access" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "roles": { "description": "The roles for the assignment.", "oneOf": [ { "type": "array", "minItems": 1, "items": { "type": "string", "enum": [ "OrganizationAdmin", "OrganizationMember" ] } }, { "type": "array", "minItems": 1, "items": { "type": "string", "enum": [ "TeamOwner", "TeamMember" ] } }, { "type": "array", "minItems": 1, "items": { "type": "string", "enum": [ "ProjectOwner", "ProjectCollaborator", "ProjectViewer" ] } } ] } }, "required": [ "roles" ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^acc_[a-fA-F0-9]{24}$" }, "in": "path", "name": "accessId", "required": true, "description": "The access Id." } ], "responses": { "200": { "description": "Successfully updated the access for an organization", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The access Id.", "type": "string" }, "type": { "description": "The type of access.", "type": "string", "enum": [ "Role" ] }, "assignment": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Organization" ] }, "id": { "description": "The organization Id.", "type": "string", "pattern": "^org_[a-fA-F0-9]{24}$" }, "name": { "description": "The organization name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Team" ] }, "id": { "description": "The team Id.", "type": "string", "pattern": "^team_[a-fA-F0-9]{24}$" }, "name": { "description": "The team name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Member" ] }, "id": { "description": "The member Id.", "type": "string", "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "description": "The member name.", "type": "string" } }, "required": [ "type", "id", "name" ] } ] }, "entity": { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The entity type.", "type": "string", "enum": [ "Organization" ] }, "id": { "description": "The organization Id.", "type": "string", "pattern": "^org_[a-fA-F0-9]{24}$" }, "name": { "description": "The Organization name.", "type": "string" } }, "required": [ "type", "name", "id" ] }, "roles": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": [ "OrganizationAdmin", "OrganizationMember" ] } } }, "required": [ "id", "type", "assignment", "entity", "roles" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The access Id.", "type": "string" }, "type": { "description": "The type of access.", "type": "string", "enum": [ "Role" ] }, "assignment": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Organization" ] }, "id": { "description": "The organization Id.", "type": "string", "pattern": "^org_[a-fA-F0-9]{24}$" }, "name": { "description": "The organization name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Team" ] }, "id": { "description": "The team Id.", "type": "string", "pattern": "^team_[a-fA-F0-9]{24}$" }, "name": { "description": "The team name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Member" ] }, "id": { "description": "The member Id.", "type": "string", "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "description": "The member name.", "type": "string" } }, "required": [ "type", "id", "name" ] } ] }, "entity": { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The entity type.", "type": "string", "enum": [ "Project" ] }, "id": { "description": "The project Id or \"*\" for all projects in the organization.", "type": "string", "pattern": "^(proj_[a-fA-F0-9]{24}|\\*)$" }, "name": { "description": "The project name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, "roles": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": [ "ProjectOwner", "ProjectCollaborator", "ProjectViewer" ] } } }, "required": [ "id", "type", "assignment", "entity", "roles" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The access Id.", "type": "string" }, "type": { "description": "The type of access.", "type": "string", "enum": [ "Role" ] }, "assignment": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Organization" ] }, "id": { "description": "The organization Id.", "type": "string", "pattern": "^org_[a-fA-F0-9]{24}$" }, "name": { "description": "The organization name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Team" ] }, "id": { "description": "The team Id.", "type": "string", "pattern": "^team_[a-fA-F0-9]{24}$" }, "name": { "description": "The team name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The type of entity.", "type": "string", "enum": [ "Member" ] }, "id": { "description": "The member Id.", "type": "string", "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "description": "The member name.", "type": "string" } }, "required": [ "type", "id", "name" ] } ] }, "entity": { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The entity type.", "type": "string", "enum": [ "Team" ] }, "id": { "description": "The team Id or \"*\" for all teams in the organization.", "type": "string", "pattern": "^(team_[a-fA-F0-9]{24}|\\*)$" }, "name": { "description": "The team name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, "roles": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": [ "TeamOwner", "TeamMember" ] } } }, "required": [ "id", "type", "assignment", "entity", "roles" ] } ], "description": "Successfully updated the access for an organization" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "delete": { "summary": "Delete the access for an organization", "tags": [ "Access" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^acc_[a-fA-F0-9]{24}$" }, "in": "path", "name": "accessId", "required": true, "description": "The access Id." } ], "responses": { "204": { "description": "Successfully deleted the access for an organization" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/agent-tasks/": { "post": { "summary": "Create agent tasks", "tags": [ "Agent Tasks" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "tasks": { "type": "array", "items": { "type": "object", "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "The name of the agent task.", "minLength": 1 }, "description": { "type": "string", "description": "The description of the agent task." }, "scheduledStart": { "type": "string", "format": "date-time", "description": "The start of the scheduled agent task" }, "recurring": { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string", "description": "Cron expression for the schedule (e.g., \"0 9 * * MON-FRI\" for weekdays at 9am)." }, "timezone": { "type": "string", "description": "IANA timezone name (e.g., \"US/Pacific\"). Defaults to UTC." }, "startAt": { "type": "string", "format": "date-time", "description": "Start of the schedule window (ISO 8601 format). Times before this are skipped." }, "endAt": { "type": "string", "format": "date-time", "description": "End of the schedule window (ISO 8601 format). Times after this are skipped." } }, "required": [ "cron" ] }, "references": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident" ], "description": "The type of the associated resource." }, "id": { "type": "string", "description": "The unique identifier of the associated resource." } }, "required": [ "type", "id" ] }, "minItems": 0, "description": "The references that provide context to this agent task." }, "type": { "type": "string", "description": "The agent task type.", "enum": [ "StaleFeatureFlagCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": {} } }, "required": [ "name", "type" ] }, { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "The name of the agent task.", "minLength": 1 }, "description": { "type": "string", "description": "The description of the agent task." }, "scheduledStart": { "type": "string", "format": "date-time", "description": "The start of the scheduled agent task" }, "recurring": { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string", "description": "Cron expression for the schedule (e.g., \"0 9 * * MON-FRI\" for weekdays at 9am)." }, "timezone": { "type": "string", "description": "IANA timezone name (e.g., \"US/Pacific\"). Defaults to UTC." }, "startAt": { "type": "string", "format": "date-time", "description": "Start of the schedule window (ISO 8601 format). Times before this are skipped." }, "endAt": { "type": "string", "format": "date-time", "description": "End of the schedule window (ISO 8601 format). Times after this are skipped." } }, "required": [ "cron" ] }, "references": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident" ], "description": "The type of the associated resource." }, "id": { "type": "string", "description": "The unique identifier of the associated resource." } }, "required": [ "type", "id" ] }, "minItems": 0, "description": "The references that provide context to this agent task." }, "type": { "type": "string", "description": "The agent task type.", "enum": [ "Optimizer" ] }, "config": { "type": "object", "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "project": { "type": "string", "description": "The project ID or alternate ID.", "minLength": 1 }, "environment": { "type": "string", "description": "The environment ID or alternate ID within the project.", "minLength": 1 } }, "required": [ "project", "environment" ] }, { "type": "object", "additionalProperties": false, "properties": { "target": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "kubernetesWorkload" ] }, "cluster": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" } }, "required": [ "id" ] }, "workload": { "type": "object", "additionalProperties": false, "properties": { "namespace": { "type": "string", "minLength": 1 }, "kind": { "type": "string", "minLength": 1 }, "name": { "type": "string", "minLength": 1 }, "apiVersion": { "type": "string", "minLength": 1 }, "uid": { "type": "string", "minLength": 1 } }, "required": [ "namespace", "kind", "name" ] } }, "required": [ "type", "cluster", "workload" ] } }, "required": [ "target" ] } ] } }, "required": [ "name", "type", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "The name of the agent task.", "minLength": 1 }, "description": { "type": "string", "description": "The description of the agent task." }, "scheduledStart": { "type": "string", "format": "date-time", "description": "The start of the scheduled agent task" }, "recurring": { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string", "description": "Cron expression for the schedule (e.g., \"0 9 * * MON-FRI\" for weekdays at 9am)." }, "timezone": { "type": "string", "description": "IANA timezone name (e.g., \"US/Pacific\"). Defaults to UTC." }, "startAt": { "type": "string", "format": "date-time", "description": "Start of the schedule window (ISO 8601 format). Times before this are skipped." }, "endAt": { "type": "string", "format": "date-time", "description": "End of the schedule window (ISO 8601 format). Times after this are skipped." } }, "required": [ "cron" ] }, "references": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident" ], "description": "The type of the associated resource." }, "id": { "type": "string", "description": "The unique identifier of the associated resource." } }, "required": [ "type", "id" ] }, "minItems": 0, "description": "The references that provide context to this agent task." }, "type": { "type": "string", "description": "The agent task type.", "enum": [ "LogAnalysis" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "project": { "type": "string", "description": "The project ID or alternate ID.", "minLength": 1 }, "environment": { "type": "string", "description": "The environment ID or alternate ID within the project.", "minLength": 1 } }, "required": [ "project", "environment" ] } }, "required": [ "name", "type", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "The name of the agent task.", "minLength": 1 }, "description": { "type": "string", "description": "The description of the agent task." }, "scheduledStart": { "type": "string", "format": "date-time", "description": "The start of the scheduled agent task" }, "recurring": { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string", "description": "Cron expression for the schedule (e.g., \"0 9 * * MON-FRI\" for weekdays at 9am)." }, "timezone": { "type": "string", "description": "IANA timezone name (e.g., \"US/Pacific\"). Defaults to UTC." }, "startAt": { "type": "string", "format": "date-time", "description": "Start of the schedule window (ISO 8601 format). Times before this are skipped." }, "endAt": { "type": "string", "format": "date-time", "description": "End of the schedule window (ISO 8601 format). Times after this are skipped." } }, "required": [ "cron" ] }, "references": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident" ], "description": "The type of the associated resource." }, "id": { "type": "string", "description": "The unique identifier of the associated resource." } }, "required": [ "type", "id" ] }, "minItems": 0, "description": "The references that provide context to this agent task." }, "type": { "type": "string", "description": "The agent task type.", "enum": [ "ResourceCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "archivedPriorTo": { "type": "string", "format": "date-time", "description": "Resources archived before this ISO 8601 date-time will be eligible for cleanup." } }, "required": [ "archivedPriorTo" ] } }, "required": [ "name", "type", "config" ] }, { "type": "object", "additionalProperties": false, "not": { "anyOf": [ { "required": [ "scheduledStart" ] }, { "required": [ "recurring" ] } ] }, "properties": { "name": { "type": "string", "description": "The name of the agent task.", "minLength": 1 }, "description": { "type": "string", "description": "The description of the agent task." }, "references": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident" ], "description": "The type of the associated resource." }, "id": { "type": "string", "description": "The unique identifier of the associated resource." } }, "required": [ "type", "id" ] }, "minItems": 0, "description": "The references that provide context to this agent task." }, "type": { "type": "string", "description": "The agent task type.", "enum": [ "KubernetesUpgradePlanning" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "cluster": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" } }, "required": [ "id" ] } }, "required": [ "cluster" ] } }, "required": [ "name", "type", "config" ] } ] }, "description": "Array of agent tasks to create as a chain.", "minItems": 1 } }, "required": [ "tasks" ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "Successfully created agent tasks", "content": { "application/json": { "schema": { "description": "Successfully created agent tasks", "type": "object", "additionalProperties": false, "properties": { "tasks": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^agta_[a-fA-F0-9]{24}$", "description": "The agent task ID." }, "name": { "type": "string", "description": "The name of the agent task." }, "conversation": { "type": "array", "items": { "type": "object", "properties": { "role": { "type": "string", "enum": [ "user", "system" ], "description": "The role of the message sender." }, "message": { "type": "string", "description": "The message content." }, "sentAt": { "type": "string", "format": "date-time", "description": "A timestamp of when the message was sent." } }, "required": [ "role", "message", "sentAt" ] }, "description": "The conversation history for this agent task." }, "description": { "type": "string", "description": "The description of the agent task." }, "scheduledStart": { "type": "string", "format": "date-time", "description": "The start of the scheduled agent task" }, "scheduledEnd": { "type": "string", "format": "date-time", "description": "The end of the scheduled agent task" }, "recurring": { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string", "description": "Cron expression for the schedule (e.g., \"0 9 * * MON-FRI\" for weekdays at 9am)." }, "timezone": { "type": "string", "description": "IANA timezone name (e.g., \"US/Pacific\"). Defaults to UTC." }, "startAt": { "type": "string", "format": "date-time", "description": "Start of the schedule window (ISO 8601 format). Times before this are skipped." }, "endAt": { "type": "string", "format": "date-time", "description": "End of the schedule window (ISO 8601 format). Times after this are skipped." } }, "required": [ "cron" ] }, "status": { "type": "string", "enum": [ "pending", "scheduled", "completed", "canceled" ], "description": "The current status of the agent task." }, "source": { "type": "string", "enum": [ "policy", "user" ], "description": "Whether the agent task was created by a user or policy machinery." }, "policyId": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "Most-specific explicit policy row that spawned this task, when one exists." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "references": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident" ], "description": "The type of the associated resource." }, "id": { "type": "string", "description": "The unique identifier of the associated resource." } }, "required": [ "type", "id" ] }, "minItems": 0, "description": "The references that provide context to this agent task." }, "chatSessionId": { "type": "string", "minLength": 1, "pattern": "^llms_[a-fA-F0-9]{24}$", "description": "The ID of the chat session that originated this agent task, if created from a chat session." }, "type": { "type": "string", "enum": [ "Event", "StaleFeatureFlagCleanup", "RotateSecrets", "ResourceCleanup", "KubernetesResourceCleanup", "KubernetesUpgradePlanning", "Optimizer", "OptimizerSimulation", "LogAnalysis", "ApplicationMonitor", "GitHubIssueAutomation", "SignalsInvestigation", "Analysis", "OptimizerExecutor" ], "description": "The agent task type" }, "config": { "type": "object", "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "eventName": { "type": "string", "description": "The name of the event." } }, "required": [ "eventName" ] }, { "type": "object", "additionalProperties": false, "properties": {} }, { "type": "object", "additionalProperties": true, "not": { "required": [ "target" ] }, "properties": { "project": { "type": "object", "additionalProperties": true }, "environment": { "type": "object", "additionalProperties": true } }, "required": [ "project", "environment" ] }, { "type": "object", "additionalProperties": true, "properties": { "target": { "type": "object", "additionalProperties": true, "properties": { "type": { "type": "string", "enum": [ "kubernetesWorkload" ] }, "cluster": { "type": "object", "additionalProperties": true, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id" ] }, "workload": { "type": "object", "additionalProperties": true, "properties": { "namespace": { "type": "string" }, "kind": { "type": "string" }, "name": { "type": "string" }, "apiVersion": { "type": "string" }, "uid": { "type": "string" } }, "required": [ "namespace", "kind", "name" ] } }, "required": [ "type", "cluster", "workload" ] } }, "required": [ "target" ] }, { "type": "object", "additionalProperties": false, "properties": { "cluster": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] } }, "required": [ "cluster" ] }, { "type": "object", "additionalProperties": false, "properties": { "cluster": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "defaultThresholdDays": { "type": "number" }, "ignoredNamespaces": { "type": "array", "items": { "type": "string" } }, "ignoredUids": { "type": "array", "items": { "type": "string" } } }, "required": [ "cluster", "defaultThresholdDays" ] }, { "type": "object", "additionalProperties": false, "properties": { "archivedPriorTo": { "type": "string", "format": "date-time", "description": "Resources archived before this ISO 8601 date-time will be eligible for cleanup." } }, "required": [ "archivedPriorTo" ] }, { "type": "object", "additionalProperties": true, "not": { "anyOf": [ { "required": [ "archivedPriorTo" ] }, { "required": [ "eventName" ] }, { "required": [ "project", "environment" ] }, { "required": [ "target" ] }, { "required": [ "cluster" ] } ] } } ], "description": "The agent task config" } }, "required": [ "id", "name", "conversation", "status", "type", "config", "organization" ] }, "description": "The agent tasks that were created." } }, "required": [ "tasks" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "get": { "summary": "Get a list of agentTasks for an organization", "tags": [ "Agent Tasks" ], "parameters": [ { "schema": { "type": "integer", "minimum": 1, "default": 1 }, "in": "query", "name": "pageNum", "required": false, "description": "The page number." }, { "schema": { "type": "integer", "minimum": 5, "maximum": 200, "default": 50 }, "in": "query", "name": "pageSize", "required": false, "description": "The page size." }, { "schema": { "type": "string", "enum": [ "pending", "scheduled", "completed", "canceled" ] }, "in": "query", "name": "status", "required": false, "description": "Filter by agent task status." }, { "schema": { "type": "string", "format": "date-time" }, "in": "query", "name": "startsAfter", "required": false, "description": "Filter for tasks that will run after this date." }, { "schema": { "type": "string", "format": "date-time" }, "in": "query", "name": "endsBefore", "required": false, "description": "Filter for tasks that will run before this date." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "Successfully retrieved list of agent tasks", "content": { "application/json": { "schema": { "description": "Successfully retrieved list of agent tasks", "type": "object", "additionalProperties": false, "properties": { "total": { "description": "The total number of records.", "type": "number" }, "pageNum": { "description": "The page number.", "type": "number" }, "pageSize": { "description": "The page size.", "type": "number" }, "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^agta_[a-fA-F0-9]{24}$", "description": "The agent task ID." }, "name": { "type": "string", "description": "The name of the agent task." }, "conversation": { "type": "array", "items": { "type": "object", "properties": { "role": { "type": "string", "enum": [ "user", "system" ], "description": "The role of the message sender." }, "message": { "type": "string", "description": "The message content." }, "sentAt": { "type": "string", "format": "date-time", "description": "A timestamp of when the message was sent." } }, "required": [ "role", "message", "sentAt" ] }, "description": "The conversation history for this agent task." }, "description": { "type": "string", "description": "The description of the agent task." }, "scheduledStart": { "type": "string", "format": "date-time", "description": "The start of the scheduled agent task" }, "scheduledEnd": { "type": "string", "format": "date-time", "description": "The end of the scheduled agent task" }, "recurring": { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string", "description": "Cron expression for the schedule (e.g., \"0 9 * * MON-FRI\" for weekdays at 9am)." }, "timezone": { "type": "string", "description": "IANA timezone name (e.g., \"US/Pacific\"). Defaults to UTC." }, "startAt": { "type": "string", "format": "date-time", "description": "Start of the schedule window (ISO 8601 format). Times before this are skipped." }, "endAt": { "type": "string", "format": "date-time", "description": "End of the schedule window (ISO 8601 format). Times after this are skipped." } }, "required": [ "cron" ] }, "status": { "type": "string", "enum": [ "pending", "scheduled", "completed", "canceled" ], "description": "The current status of the agent task." }, "source": { "type": "string", "enum": [ "policy", "user" ], "description": "Whether the agent task was created by a user or policy machinery." }, "policyId": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "Most-specific explicit policy row that spawned this task, when one exists." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "references": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident" ], "description": "The type of the associated resource." }, "id": { "type": "string", "description": "The unique identifier of the associated resource." } }, "required": [ "type", "id" ] }, "minItems": 0, "description": "The references that provide context to this agent task." }, "chatSessionId": { "type": "string", "minLength": 1, "pattern": "^llms_[a-fA-F0-9]{24}$", "description": "The ID of the chat session that originated this agent task, if created from a chat session." }, "type": { "type": "string", "enum": [ "Event", "StaleFeatureFlagCleanup", "RotateSecrets", "ResourceCleanup", "KubernetesResourceCleanup", "KubernetesUpgradePlanning", "Optimizer", "OptimizerSimulation", "LogAnalysis", "ApplicationMonitor", "GitHubIssueAutomation", "SignalsInvestigation", "Analysis", "OptimizerExecutor" ], "description": "The agent task type" }, "config": { "type": "object", "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "eventName": { "type": "string", "description": "The name of the event." } }, "required": [ "eventName" ] }, { "type": "object", "additionalProperties": false, "properties": {} }, { "type": "object", "additionalProperties": true, "not": { "required": [ "target" ] }, "properties": { "project": { "type": "object", "additionalProperties": true }, "environment": { "type": "object", "additionalProperties": true } }, "required": [ "project", "environment" ] }, { "type": "object", "additionalProperties": true, "properties": { "target": { "type": "object", "additionalProperties": true, "properties": { "type": { "type": "string", "enum": [ "kubernetesWorkload" ] }, "cluster": { "type": "object", "additionalProperties": true, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id" ] }, "workload": { "type": "object", "additionalProperties": true, "properties": { "namespace": { "type": "string" }, "kind": { "type": "string" }, "name": { "type": "string" }, "apiVersion": { "type": "string" }, "uid": { "type": "string" } }, "required": [ "namespace", "kind", "name" ] } }, "required": [ "type", "cluster", "workload" ] } }, "required": [ "target" ] }, { "type": "object", "additionalProperties": false, "properties": { "cluster": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] } }, "required": [ "cluster" ] }, { "type": "object", "additionalProperties": false, "properties": { "cluster": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "defaultThresholdDays": { "type": "number" }, "ignoredNamespaces": { "type": "array", "items": { "type": "string" } }, "ignoredUids": { "type": "array", "items": { "type": "string" } } }, "required": [ "cluster", "defaultThresholdDays" ] }, { "type": "object", "additionalProperties": false, "properties": { "archivedPriorTo": { "type": "string", "format": "date-time", "description": "Resources archived before this ISO 8601 date-time will be eligible for cleanup." } }, "required": [ "archivedPriorTo" ] }, { "type": "object", "additionalProperties": true, "not": { "anyOf": [ { "required": [ "archivedPriorTo" ] }, { "required": [ "eventName" ] }, { "required": [ "project", "environment" ] }, { "required": [ "target" ] }, { "required": [ "cluster" ] } ] } } ], "description": "The agent task config" } }, "required": [ "id", "name", "conversation", "status", "type", "config", "organization" ] } } }, "required": [ "total", "pageNum", "pageSize", "data" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/agent-tasks/{agentTaskId}/": { "get": { "summary": "Get an agentTask by ID", "tags": [ "Agent Tasks" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^agta_[a-fA-F0-9]{24}$" }, "in": "path", "name": "agentTaskId", "required": true, "description": "The agentTask ID." } ], "responses": { "200": { "description": "Successfully retrieved agentTask", "content": { "application/json": { "schema": { "description": "Successfully retrieved agentTask", "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^agta_[a-fA-F0-9]{24}$", "description": "The agent task ID." }, "name": { "type": "string", "description": "The name of the agent task." }, "conversation": { "type": "array", "items": { "type": "object", "properties": { "role": { "type": "string", "enum": [ "user", "system" ], "description": "The role of the message sender." }, "message": { "type": "string", "description": "The message content." }, "sentAt": { "type": "string", "format": "date-time", "description": "A timestamp of when the message was sent." } }, "required": [ "role", "message", "sentAt" ] }, "description": "The conversation history for this agent task." }, "description": { "type": "string", "description": "The description of the agent task." }, "scheduledStart": { "type": "string", "format": "date-time", "description": "The start of the scheduled agent task" }, "scheduledEnd": { "type": "string", "format": "date-time", "description": "The end of the scheduled agent task" }, "recurring": { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string", "description": "Cron expression for the schedule (e.g., \"0 9 * * MON-FRI\" for weekdays at 9am)." }, "timezone": { "type": "string", "description": "IANA timezone name (e.g., \"US/Pacific\"). Defaults to UTC." }, "startAt": { "type": "string", "format": "date-time", "description": "Start of the schedule window (ISO 8601 format). Times before this are skipped." }, "endAt": { "type": "string", "format": "date-time", "description": "End of the schedule window (ISO 8601 format). Times after this are skipped." } }, "required": [ "cron" ] }, "status": { "type": "string", "enum": [ "pending", "scheduled", "completed", "canceled" ], "description": "The current status of the agent task." }, "source": { "type": "string", "enum": [ "policy", "user" ], "description": "Whether the agent task was created by a user or policy machinery." }, "policyId": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "Most-specific explicit policy row that spawned this task, when one exists." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "references": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident" ], "description": "The type of the associated resource." }, "id": { "type": "string", "description": "The unique identifier of the associated resource." } }, "required": [ "type", "id" ] }, "minItems": 0, "description": "The references that provide context to this agent task." }, "chatSessionId": { "type": "string", "minLength": 1, "pattern": "^llms_[a-fA-F0-9]{24}$", "description": "The ID of the chat session that originated this agent task, if created from a chat session." }, "type": { "type": "string", "enum": [ "Event", "StaleFeatureFlagCleanup", "RotateSecrets", "ResourceCleanup", "KubernetesResourceCleanup", "KubernetesUpgradePlanning", "Optimizer", "OptimizerSimulation", "LogAnalysis", "ApplicationMonitor", "GitHubIssueAutomation", "SignalsInvestigation", "Analysis", "OptimizerExecutor" ], "description": "The agent task type" }, "config": { "type": "object", "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "eventName": { "type": "string", "description": "The name of the event." } }, "required": [ "eventName" ] }, { "type": "object", "additionalProperties": false, "properties": {} }, { "type": "object", "additionalProperties": true, "not": { "required": [ "target" ] }, "properties": { "project": { "type": "object", "additionalProperties": true }, "environment": { "type": "object", "additionalProperties": true } }, "required": [ "project", "environment" ] }, { "type": "object", "additionalProperties": true, "properties": { "target": { "type": "object", "additionalProperties": true, "properties": { "type": { "type": "string", "enum": [ "kubernetesWorkload" ] }, "cluster": { "type": "object", "additionalProperties": true, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id" ] }, "workload": { "type": "object", "additionalProperties": true, "properties": { "namespace": { "type": "string" }, "kind": { "type": "string" }, "name": { "type": "string" }, "apiVersion": { "type": "string" }, "uid": { "type": "string" } }, "required": [ "namespace", "kind", "name" ] } }, "required": [ "type", "cluster", "workload" ] } }, "required": [ "target" ] }, { "type": "object", "additionalProperties": false, "properties": { "cluster": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] } }, "required": [ "cluster" ] }, { "type": "object", "additionalProperties": false, "properties": { "cluster": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "defaultThresholdDays": { "type": "number" }, "ignoredNamespaces": { "type": "array", "items": { "type": "string" } }, "ignoredUids": { "type": "array", "items": { "type": "string" } } }, "required": [ "cluster", "defaultThresholdDays" ] }, { "type": "object", "additionalProperties": false, "properties": { "archivedPriorTo": { "type": "string", "format": "date-time", "description": "Resources archived before this ISO 8601 date-time will be eligible for cleanup." } }, "required": [ "archivedPriorTo" ] }, { "type": "object", "additionalProperties": true, "not": { "anyOf": [ { "required": [ "archivedPriorTo" ] }, { "required": [ "eventName" ] }, { "required": [ "project", "environment" ] }, { "required": [ "target" ] }, { "required": [ "cluster" ] } ] } } ], "description": "The agent task config" } }, "required": [ "id", "name", "conversation", "status", "type", "config", "organization" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "delete": { "summary": "Delete an agentTask", "tags": [ "Agent Tasks" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^agta_[a-fA-F0-9]{24}$" }, "in": "path", "name": "agentTaskId", "required": true, "description": "The agentTask ID." } ], "responses": { "204": { "description": "Successfully deleted agent task" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/agent-tasks/{agentTaskId}/runs": { "get": { "summary": "Get a list of runs for an agent task", "tags": [ "Runs" ], "parameters": [ { "schema": { "type": "number" }, "in": "query", "name": "pageSize", "required": false, "description": "The page size." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^run_[a-fA-F0-9]{24}$" }, "example": "run_67a3c68e9137f944f073fef8", "in": "query", "name": "pageCursor", "required": false, "description": "The page cursor." }, { "schema": { "type": "array", "items": { "type": "string", "enum": [ "pending", "queued", "running", "action_required", "succeeded", "failed", "canceled" ] } }, "in": "query", "name": "status", "required": false }, { "schema": { "type": "boolean", "default": false }, "in": "query", "name": "openPullRequestOnly", "required": false, "description": "If true, only returns runs that have an open pull request." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^agta_[a-fA-F0-9]{24}$" }, "in": "path", "name": "agentTaskId", "required": true, "description": "Filter runs by agent task ID." } ], "responses": { "200": { "description": "A cursor-paginated list of runs.", "content": { "application/json": { "schema": { "description": "A cursor-paginated list of runs.", "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The unique identifier for the run.", "type": "string", "minLength": 1, "pattern": "^run_[a-fA-F0-9]{24}$" }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "^org_[a-fA-F0-9]{24}$", "description": "The unique identifier for the organization." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "status": { "type": "string", "enum": [ "pending", "queued", "running", "action_required", "succeeded", "failed", "canceled" ] }, "type": { "type": "string", "enum": [ "deployment", "generateDockerfile", "resourceCleanup", "agentCode", "agentTask", "connection" ] }, "action": { "type": "string", "enum": [ "connectionCreated", "deployContainerRevision", "deploySiteRevision", "assignDnsRecordContent", "assignBackendPoolEndpoints", "assignLoadBalancerPools" ] }, "references": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident" ], "description": "The type of the associated resource." }, "id": { "type": "string", "description": "The unique identifier of the associated resource." } }, "required": [ "type", "id" ] }, "minItems": 0 }, "workflowId": { "type": "string", "description": "The identifier of the workflow associated with the run.", "nullable": true }, "timing": { "type": "object", "additionalProperties": false, "description": "The timing information for the run execution.", "properties": { "startTime": { "type": "string", "format": "date-time", "description": "The start time of the run execution in ISO 8601 format." }, "endTime": { "type": "string", "format": "date-time", "description": "The end time of the run execution in ISO 8601 format." } }, "required": [] }, "input": { "description": "The input data for the run.", "additionalProperties": true, "type": "object" }, "data": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": [ "kubernetes-upgrade-planning" ] }, "phase": { "type": "string", "enum": [ "queued", "refreshing-inventory", "collecting-facts", "resolving-provider", "solving", "completed", "failed" ] }, "cluster": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "workflow": { "type": "object", "additionalProperties": false, "properties": { "workflowId": { "type": "string" }, "temporalRunId": { "type": "string" }, "namespace": { "type": "string" } }, "required": [ "workflowId", "temporalRunId", "namespace" ] }, "artifact": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "kubernetes-upgrade-plan" ] }, "schemaVersion": { "type": "string", "enum": [ "hyphen.kubernetes-upgrade-plan/v1" ] }, "createdAt": { "type": "string", "format": "date-time" }, "validUntil": { "type": "string", "format": "date-time" }, "observation": { "type": "object", "additionalProperties": false, "properties": { "factsSchemaVersion": { "type": "string" }, "factsCollectedAt": { "type": "string", "format": "date-time" }, "factsComplete": { "type": "boolean" } }, "required": [ "factsSchemaVersion", "factsCollectedAt", "factsComplete" ] }, "providerSnapshot": { "type": "object", "additionalProperties": false, "properties": { "provider": { "type": "string", "enum": [ "gke", "eks", "aks", "private", "unresolved" ] }, "observedAt": { "type": "string", "format": "date-time" }, "availableKubernetesVersions": { "type": "array", "items": { "type": "string" } }, "currentControlPlaneVersion": { "type": "string" }, "nodePools": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "version": { "type": "string" }, "availableVersions": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "version" ] } }, "releaseChannel": { "type": "string" }, "canonicalResourceId": { "type": "string" }, "availabilityVerified": { "type": "boolean", "description": "Whether the provider proved version availability. Private plans may be ready with false when an upstream-catalog assumption warning is present." }, "versionMetadata": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "version": { "type": "string" }, "status": { "type": "string" }, "standardSupportEndsAt": { "type": "string" }, "extendedSupportEndsAt": { "type": "string" } }, "required": [ "version", "status" ] } }, "managedAddons": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "version": { "type": "string" }, "availableVersions": { "type": "array", "items": { "type": "string" } }, "versionCompatibility": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "version": { "type": "string" }, "kubernetesVersions": { "type": "array", "items": { "type": "string" } } }, "required": [ "version", "kubernetesVersions" ] } }, "workloadNames": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "version", "availableVersions", "versionCompatibility" ] } }, "managedResources": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": [ "workload", "crd", "webhook", "api-service" ] }, "name": { "type": "string" }, "namespace": { "type": "string" } }, "required": [ "kind", "name" ] } } }, "required": [ "provider", "observedAt", "availableKubernetesVersions" ] }, "optimizationPolicy": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ] }, "readiness": { "type": "string", "enum": [ "ready", "blocked" ], "description": "Ready means no blocking issues remain; warnings, unknown platform resources, and private upstream-catalog assumptions may still require manual verification." }, "catalog": { "type": "object", "additionalProperties": false, "properties": { "schemaVersion": { "type": "string" }, "contentHash": { "type": "string" }, "importedAt": { "type": "string", "format": "date-time" } }, "required": [ "schemaVersion", "contentHash", "importedAt" ] }, "currentState": { "type": "object", "additionalProperties": false, "properties": { "kubernetesVersion": { "type": "string" }, "componentVersions": { "type": "object", "additionalProperties": false, "properties": { "istio": { "type": "string" }, "cert-manager": { "type": "string" }, "ingress-nginx": { "type": "string" }, "metrics-server": { "type": "string" } } }, "istioDataPlaneVersions": { "type": "array", "items": { "type": "string" } }, "nodeVersions": { "type": "array", "items": { "type": "string" } }, "nodeAgentGroups": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "agent": { "type": "string", "enum": [ "kubelet", "kube-proxy" ] }, "version": { "type": "string" }, "total": { "type": "number" }, "ready": { "type": "number" }, "operatingSystem": { "type": "string" }, "architecture": { "type": "string" }, "providerPoolId": { "type": "string" }, "nodeNames": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "agent", "version", "total", "ready", "operatingSystem", "architecture" ] } }, "providerAddonVersions": { "type": "object", "additionalProperties": { "type": "string" } }, "istioInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "role": { "type": "string", "enum": [ "atomic", "control-plane", "gateway", "data-plane", "cni", "database", "cache" ] }, "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "role", "instance", "version" ] } }, "postgresqlInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "instance", "version" ] } }, "redisInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "instance", "version" ] } } }, "required": [ "kubernetesVersion", "componentVersions", "nodeVersions" ] }, "targetState": { "type": "object", "additionalProperties": false, "properties": { "kubernetesVersion": { "type": "string" }, "componentVersions": { "type": "object", "additionalProperties": false, "properties": { "istio": { "type": "string" }, "cert-manager": { "type": "string" }, "ingress-nginx": { "type": "string" }, "metrics-server": { "type": "string" } } }, "istioDataPlaneVersions": { "type": "array", "items": { "type": "string" } }, "nodeVersions": { "type": "array", "items": { "type": "string" } }, "nodeAgentGroups": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "agent": { "type": "string", "enum": [ "kubelet", "kube-proxy" ] }, "version": { "type": "string" }, "total": { "type": "number" }, "ready": { "type": "number" }, "operatingSystem": { "type": "string" }, "architecture": { "type": "string" }, "providerPoolId": { "type": "string" }, "nodeNames": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "agent", "version", "total", "ready", "operatingSystem", "architecture" ] } }, "providerAddonVersions": { "type": "object", "additionalProperties": { "type": "string" } }, "istioInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "role": { "type": "string", "enum": [ "atomic", "control-plane", "gateway", "data-plane", "cni", "database", "cache" ] }, "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "role", "instance", "version" ] } }, "postgresqlInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "instance", "version" ] } }, "redisInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "instance", "version" ] } } }, "required": [ "kubernetesVersion", "componentVersions", "nodeVersions" ] }, "detectedComponents": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "component": { "type": "string", "enum": [ "istio", "cert-manager", "ingress-nginx", "metrics-server", "postgresql", "redis" ] }, "role": { "type": "string", "enum": [ "atomic", "control-plane", "gateway", "data-plane", "cni", "database", "cache" ] }, "instance": { "type": "string" }, "version": { "type": "string" }, "confidence": { "type": "string", "enum": [ "digest", "metadata", "image-tag", "conflict" ] }, "installationMethod": { "type": "string", "enum": [ "helm", "operator", "manifest", "unknown" ] }, "evidence": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "source": { "type": "string", "enum": [ "resolved-digest", "helm-metadata", "application-metadata", "image-tag", "istio-revision" ] }, "value": { "type": "string" }, "workload": { "type": "object", "additionalProperties": false, "properties": { "namespace": { "type": "string" }, "kind": { "type": "string" }, "name": { "type": "string" }, "container": { "type": "string" } }, "required": [ "namespace", "kind", "name" ] } }, "required": [ "source", "value" ] } } }, "required": [ "component", "role", "instance", "confidence", "installationMethod", "evidence" ] } }, "graph": { "type": "object", "additionalProperties": false, "properties": { "nodes": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "kind": { "type": "string", "enum": [ "state", "action", "constraint" ] }, "label": { "type": "string" }, "state": { "type": "object", "additionalProperties": false, "properties": { "kubernetesVersion": { "type": "string" }, "componentVersions": { "type": "object", "additionalProperties": false, "properties": { "istio": { "type": "string" }, "cert-manager": { "type": "string" }, "ingress-nginx": { "type": "string" }, "metrics-server": { "type": "string" } } }, "istioDataPlaneVersions": { "type": "array", "items": { "type": "string" } }, "nodeVersions": { "type": "array", "items": { "type": "string" } }, "nodeAgentGroups": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "agent": { "type": "string", "enum": [ "kubelet", "kube-proxy" ] }, "version": { "type": "string" }, "total": { "type": "number" }, "ready": { "type": "number" }, "operatingSystem": { "type": "string" }, "architecture": { "type": "string" }, "providerPoolId": { "type": "string" }, "nodeNames": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "agent", "version", "total", "ready", "operatingSystem", "architecture" ] } }, "providerAddonVersions": { "type": "object", "additionalProperties": { "type": "string" } }, "istioInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "role": { "type": "string", "enum": [ "atomic", "control-plane", "gateway", "data-plane", "cni", "database", "cache" ] }, "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "role", "instance", "version" ] } }, "postgresqlInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "instance", "version" ] } }, "redisInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "instance", "version" ] } } }, "required": [ "kubernetesVersion", "componentVersions", "nodeVersions" ] }, "actionStepId": { "type": "string" }, "sourceIds": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "kind", "label" ] } }, "edges": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "from": { "type": "string" }, "to": { "type": "string" }, "type": { "type": "string", "enum": [ "transition", "requires", "validated-by" ] }, "label": { "type": "string" } }, "required": [ "from", "to", "type" ] } } }, "required": [ "nodes", "edges" ] }, "steps": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "phase": { "type": "string", "enum": [ "preflight", "bridge-addon", "control-plane", "node-pool", "data-plane", "post-upgrade", "validation" ] }, "component": { "type": "string", "enum": [ "kubernetes", "istio", "cert-manager", "ingress-nginx", "metrics-server", "postgresql", "redis" ] }, "fromVersion": { "type": "string" }, "toVersion": { "type": "string" }, "prerequisites": { "type": "array", "items": { "type": "string" } }, "reason": { "type": "string" }, "disruption": { "type": "string", "enum": [ "none", "rolling", "control-plane", "unknown" ] }, "validation": { "type": "array", "items": { "type": "string" } }, "rollback": { "type": "string" }, "commands": { "type": "array", "items": { "type": "string" } }, "verificationCommands": { "type": "array", "items": { "type": "string" } }, "rollbackCommands": { "type": "array", "items": { "type": "string" } }, "recoveryCommands": { "type": "array", "items": { "type": "string" } }, "commandStatus": { "type": "string", "enum": [ "executable", "template", "manual", "not-applicable" ] }, "rollbackStatus": { "type": "string", "enum": [ "executable", "template", "manual", "unsupported", "not-applicable" ] }, "requiredCommandInputs": { "type": "array", "items": { "type": "string" } }, "sourceIds": { "type": "array", "items": { "type": "string" } }, "target": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": [ "kubelet-group", "kube-proxy-group", "provider-addon", "istio-instance" ] }, "id": { "type": "string" }, "role": { "type": "string", "enum": [ "atomic", "control-plane", "gateway", "data-plane", "cni", "database", "cache" ] }, "providerPoolId": { "type": "string" }, "nodeNames": { "type": "array", "items": { "type": "string" } } }, "required": [ "kind", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": [ "postgresql-instance", "redis-instance" ] }, "id": { "type": "string" }, "image": { "type": "string" } }, "required": [ "kind", "id", "image" ] } ] }, "operation": { "type": "string", "enum": [ "install", "upgrade", "migrate", "cleanup" ] }, "resultingTargetId": { "type": "string" } }, "required": [ "id", "phase", "component", "prerequisites", "reason", "disruption", "validation", "rollback", "sourceIds" ] } }, "blockers": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "code": { "type": "string" }, "message": { "type": "string" }, "component": { "type": "string" }, "sourceIds": { "type": "array", "items": { "type": "string" } }, "details": { "type": "object", "additionalProperties": true } }, "required": [ "code", "message" ] } }, "warnings": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "code": { "type": "string" }, "message": { "type": "string" }, "component": { "type": "string" }, "sourceIds": { "type": "array", "items": { "type": "string" } }, "details": { "type": "object", "additionalProperties": true } }, "required": [ "code", "message" ] } }, "unmodeledContainers": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "namespace": { "type": "string" }, "workloadKind": { "type": "string" }, "workloadName": { "type": "string" }, "containerName": { "type": "string" }, "image": { "type": "string" } }, "required": [ "namespace", "workloadKind", "workloadName", "containerName", "image" ] } }, "unknownPlatformResources": { "type": "array", "description": "Unrecognized platform resources that require manual compatibility verification and do not independently block readiness.", "items": { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": [ "workload", "crd", "webhook", "api-service" ] }, "name": { "type": "string" }, "namespace": { "type": "string" } }, "required": [ "kind", "name" ] } } }, "required": [ "type", "schemaVersion", "createdAt", "validUntil", "observation", "optimizationPolicy", "readiness", "catalog", "currentState", "targetState", "detectedComponents", "graph", "steps", "blockers", "warnings", "unmodeledContainers", "unknownPlatformResources" ] }, "error": { "type": "string", "maxLength": 2048 } }, "required": [ "kind", "phase", "cluster" ] }, { "type": "object", "properties": { "prUrl": { "type": "string", "description": "The URL of the pull request." }, "ChangedFiles": { "type": "object", "additionalProperties": true, "description": "A mapping of changed file paths to their statuses." } }, "additionalProperties": false }, { "type": "object", "properties": { "staleFeatureFlags": { "type": "object", "description": "A mapping of project IDs to their stale feature flags.", "additionalProperties": true }, "apps": { "type": "array", "description": "An array of code pull requests associated with the stale feature flags.", "items": { "type": "object", "additionalProperties": false, "properties": { "branch": { "type": "string", "description": "The branch name of the pull request." }, "repositoryUrl": { "type": "string", "description": "The URL of the repository." }, "prUrl": { "type": "string", "description": "[DEPRECATED] use pr.url." }, "pullRequest": { "type": "object", "description": "Details of the pull request.", "properties": { "id": { "type": "number", "description": "The unique identifier for the pull request." }, "title": { "type": "string", "description": "The title of the pull request." }, "url": { "type": "string", "description": "The URL of the pull request." }, "body": { "type": "string", "description": "The body/description of the pull request." }, "merged": { "type": "boolean", "description": "Indicates whether the pull request has been merged." }, "state": { "type": "string", "description": "The current state of the pull request.", "enum": [ "open", "closed" ] } }, "additionalProperties": false }, "status": { "type": "string", "enum": [ "pending", "in_progress", "completed", "failed" ] }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] } } } } }, "additionalProperties": false }, { "type": "object", "description": "An object containing arbitrary key-value pairs.", "not": { "properties": { "kind": { "enum": [ "kubernetes-upgrade-planning" ] } }, "required": [ "kind" ] }, "properties": { "llmGatewaySessionId": { "description": "The LLMGateway session associated with the run.", "type": "string", "minLength": 1, "pattern": "^llms_[a-fA-F0-9]{24}$" } }, "additionalProperties": true } ] }, "inputRequests": { "type": "array", "description": "Input requests issued during the run, including any responses.", "items": { "type": "object", "discriminator": { "propertyName": "type" }, "required": [ "type" ], "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "boolean" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "trueLabel": { "type": "string" }, "falseLabel": { "type": "string" }, "response": { "type": "boolean" } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "string" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "validation": { "type": "object", "additionalProperties": false, "properties": { "pattern": { "type": "string" }, "minLength": { "type": "integer", "minimum": 0 }, "maxLength": { "type": "integer", "minimum": 0 } } }, "response": { "type": "string" } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "options" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "value": { "type": "string" }, "label": { "type": "string" } }, "required": [ "value", "label" ] } }, "response": { "type": "string" } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "optionsWithText" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "value": { "type": "string" }, "label": { "type": "string" }, "requiresText": { "type": "boolean" }, "textValidation": { "type": "object", "additionalProperties": false, "properties": { "pattern": { "type": "string" }, "minLength": { "type": "integer", "minimum": 0 }, "maxLength": { "type": "integer", "minimum": 0 } } } }, "required": [ "value", "label" ] } }, "response": { "type": "object", "additionalProperties": false, "properties": { "value": { "type": "string" }, "text": { "type": "string" } }, "required": [ "value" ] } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] } ] } } }, "required": [ "id", "organization", "status", "type" ] } }, "pageSize": { "description": "The page size.", "type": "number" }, "nextPageCursor": { "type": "string", "minLength": 1, "pattern": "^run_[a-fA-F0-9]{24}$", "description": "The next page cursor.", "example": "run_67a3c68e9137f944f073fef8" } }, "required": [ "data", "pageSize" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/api-keys/": { "get": { "summary": "Get a list of API keys for an organization", "tags": [ "API Keys" ], "parameters": [ { "schema": { "type": "string" }, "in": "query", "name": "name", "required": false, "description": "Filter by api key name starts with (case insensitive)" }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "Successfully got a list of API keys for an organization", "content": { "application/json": { "schema": { "description": "Successfully got a list of API keys for an organization", "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Identifier for the API Key used to modify or delete the API Key." }, "name": { "type": "string", "description": "Friendly and descriptive name for the API key." }, "createdAt": { "type": "string", "description": "The time the API key was created." }, "memberId": { "type": "string", "description": "The ID of the member associated with this API key" }, "secrets": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Identifier for the secret used to delete the secret." }, "hint": { "type": "string", "description": "Last four characters of the secrete, helpful for identifying which API key is being used." }, "lastUsed": { "type": "string", "description": "The last time this secret was used to authenticate." } } } }, "roles": { "type": "array", "items": { "type": "string" } } } } }, "total": { "type": "number" }, "pageNum": { "type": "number" }, "pageSize": { "type": "number" } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "post": { "summary": "Create an API key for an organization", "tags": [ "API Keys" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "Friendly and descriptive name for the API key." } }, "required": [ "name" ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "201": { "description": "Successfully created an API key for an organization", "content": { "application/json": { "schema": { "description": "Successfully created an API key for an organization", "type": "object", "properties": { "id": { "type": "string", "description": "Identifier for the API Key used to modify or delete the API Key." }, "name": { "type": "string", "description": "Friendly and descriptive name for the API key." }, "createdAt": { "type": "string", "description": "The time the API key was created." }, "memberId": { "type": "string", "description": "The ID of the member associated with this API key" }, "secrets": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Identifier for the secret used to delete the secret." }, "hint": { "type": "string", "description": "Last four characters of the secrete, helpful for identifying which API key is being used." }, "lastUsed": { "type": "string", "description": "The last time this secret was used to authenticate." }, "value": { "type": "string", "description": "The secret" } } } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/api-keys/{apiKeyId}/": { "get": { "summary": "Get an API key for an organization", "tags": [ "API Keys" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^api_[a-fA-F0-9]{24}$" }, "in": "path", "name": "apiKeyId", "required": true, "description": "The API Key ID" } ], "responses": { "200": { "description": "Successfully got an API key for an organization", "content": { "application/json": { "schema": { "description": "Successfully got an API key for an organization", "type": "object", "properties": { "id": { "type": "string", "description": "Identifier for the API Key used to modify or delete the API Key." }, "name": { "type": "string", "description": "Friendly and descriptive name for the API key." }, "createdAt": { "type": "string", "description": "The time the API key was created." }, "memberId": { "type": "string", "description": "The ID of the member associated with this API key" }, "secrets": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Identifier for the secret used to delete the secret." }, "hint": { "type": "string", "description": "Last four characters of the secrete, helpful for identifying which API key is being used." }, "lastUsed": { "type": "string", "description": "The last time this secret was used to authenticate." } } } }, "roles": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "delete": { "summary": "Delete an API key for an organization", "tags": [ "API Keys" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^api_[a-fA-F0-9]{24}$" }, "in": "path", "name": "apiKeyId", "required": true, "description": "The API Key ID" } ], "responses": { "204": { "description": "Successfully deleted an API key for an organization" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/api-keys/{apiKeyId}/secrets/": { "put": { "summary": "Create a secret for an API Key", "tags": [ "API Keys" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^api_[a-fA-F0-9]{24}$" }, "in": "path", "name": "apiKeyId", "required": true, "description": "The API Key ID" } ], "responses": { "200": { "description": "Successfully created a secret for an API Key", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Identifier for the secret used to delete the secret." }, "hint": { "type": "string", "description": "Last four characters of the secrete, helpful for identifying which API key is being used." }, "lastUsed": { "type": "string", "description": "The last time this secret was used to authenticate." }, "value": { "type": "string", "description": "The secret" } }, "description": "Successfully created a secret for an API Key" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/api-keys/{apiKeyId}/secrets/{secretId}": { "delete": { "summary": "Delete a secret for an API key", "tags": [ "API Keys" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^api_[a-fA-F0-9]{24}$" }, "in": "path", "name": "apiKeyId", "required": true, "description": "The API Key ID" }, { "schema": { "type": "string", "minLength": 1, "pattern": "^scrt_[a-fA-F0-9]{24}$" }, "in": "path", "name": "secretId", "required": true, "description": "The API Key Secret ID" } ], "responses": { "204": { "description": "Successfully deleted a secret for an API key" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/apps/": { "get": { "summary": "Get a list of apps for an organization", "tags": [ "Apps" ], "parameters": [ { "schema": { "type": "array", "items": { "type": "string" } }, "in": "query", "name": "projectIds", "required": false, "description": "The project Ids or alternate Ids." }, { "schema": { "type": "array", "items": { "type": "string" } }, "in": "query", "name": "appIds", "required": false, "description": "The app Ids or alternate Ids" }, { "schema": { "type": "integer", "minimum": 1, "default": 1 }, "in": "query", "name": "pageNum", "required": false, "description": "The page number." }, { "schema": { "type": "integer", "minimum": 5, "maximum": 200, "default": 50 }, "in": "query", "name": "pageSize", "required": false, "description": "The page size." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "Successfully got a list of apps for an organization", "content": { "application/json": { "schema": { "description": "Successfully got a list of apps for an organization", "type": "object", "additionalProperties": false, "properties": { "total": { "description": "The total number of records.", "type": "number" }, "pageNum": { "description": "The page number.", "type": "number" }, "pageSize": { "description": "The page size.", "type": "number" }, "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 }, "settings": { "description": "The app settings.", "type": "object", "properties": { "env": { "type": "object", "properties": { "accessControls": { "type": "object", "properties": { "allow": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } }, "deny": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } }, "environments": { "type": "object", "additionalProperties": { "type": "object", "properties": { "allow": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } }, "deny": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } } }, "additionalProperties": false } } }, "additionalProperties": false } }, "additionalProperties": false }, "deploy": { "type": "object", "properties": { "healthChecks": { "type": "object", "properties": { "startup": { "type": "object", "properties": { "path": { "type": "string" }, "headers": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "string" } }, "required": [ "name", "value" ], "additionalProperties": false } } }, "required": [ "path" ], "additionalProperties": false }, "liveness": { "type": "object", "properties": { "path": { "type": "string" }, "headers": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "string" } }, "required": [ "name", "value" ], "additionalProperties": false } } }, "required": [ "path" ], "additionalProperties": false } } } }, "additionalProperties": false } }, "additionalProperties": false }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "example": "2024-07-08T15:58:34.219+00:00" }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "example": "2024-07-08T15:58:34.219+00:00" }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "example": "2024-07-08T15:58:34.219+00:00" }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "id", "alternateId", "name", "organization", "project", "meta" ], "example": { "id": "app_66bf99b72a0043f841769880", "alternateId": "my-app", "name": "My App", "settings": { "env": { "accessControls": { "environments": { "production": { "allow": [ { "description": "Prod servers", "type": "cidr", "cidr": "10.10.0.0/16" } ], "deny": [ { "description": "Block all", "type": "cidr", "cidr": "0.0.0.0/0" } ] } } } } }, "organization": { "id": "org_66bf99b72a0043f841769880", "name": "My Org" }, "project": { "id": "proj_66bf99b72a0043f841769880", "alternateId": "my-project", "name": "My Project" }, "meta": { "createdAt": "2025-01-14T22:56:14.234Z", "createdBy": "memb_66f30abb67ebc6bb0c5e0af9" } } } } }, "required": [ "total", "pageNum", "pageSize", "data" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/apps/{appId}/": { "get": { "summary": "Get the app for an organization", "tags": [ "Apps" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "appId", "required": true, "description": "The app Id or alternate Id." } ], "responses": { "200": { "description": "Successfully got the app for an organization", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 }, "settings": { "description": "The app settings.", "type": "object", "properties": { "env": { "type": "object", "properties": { "accessControls": { "type": "object", "properties": { "allow": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } }, "deny": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } }, "environments": { "type": "object", "additionalProperties": { "type": "object", "properties": { "allow": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } }, "deny": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } } }, "additionalProperties": false } } }, "additionalProperties": false } }, "additionalProperties": false }, "deploy": { "type": "object", "properties": { "healthChecks": { "type": "object", "properties": { "startup": { "type": "object", "properties": { "path": { "type": "string" }, "headers": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "string" } }, "required": [ "name", "value" ], "additionalProperties": false } } }, "required": [ "path" ], "additionalProperties": false }, "liveness": { "type": "object", "properties": { "path": { "type": "string" }, "headers": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "string" } }, "required": [ "name", "value" ], "additionalProperties": false } } }, "required": [ "path" ], "additionalProperties": false } } } }, "additionalProperties": false } }, "additionalProperties": false }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "example": "2024-07-08T15:58:34.219+00:00" }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "example": "2024-07-08T15:58:34.219+00:00" }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "example": "2024-07-08T15:58:34.219+00:00" }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "id", "alternateId", "name", "organization", "project", "meta" ], "description": "Successfully got the app for an organization" }, "example": { "id": "app_66bf99b72a0043f841769880", "alternateId": "my-app", "name": "My App", "settings": { "env": { "accessControls": { "environments": { "production": { "allow": [ { "description": "Prod servers", "type": "cidr", "cidr": "10.10.0.0/16" } ], "deny": [ { "description": "Block all", "type": "cidr", "cidr": "0.0.0.0/0" } ] } } } } }, "organization": { "id": "org_66bf99b72a0043f841769880", "name": "My Org" }, "project": { "id": "proj_66bf99b72a0043f841769880", "alternateId": "my-project", "name": "My Project" }, "meta": { "createdAt": "2025-01-14T22:56:14.234Z", "createdBy": "memb_66f30abb67ebc6bb0c5e0af9" } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "delete": { "summary": "Delete the app for an organization", "tags": [ "Apps" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "appId", "required": true, "description": "The app Id or alternate Id." } ], "responses": { "204": { "description": "Successfully deleted the app for an organization" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "patch": { "summary": "Update the app for an organization", "tags": [ "Apps" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 }, "settings": { "description": "The app settings.", "type": "object", "properties": { "env": { "type": "object", "properties": { "accessControls": { "type": "object", "properties": { "allow": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } }, "deny": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } }, "environments": { "type": "object", "additionalProperties": { "type": "object", "properties": { "allow": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } }, "deny": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } } }, "additionalProperties": false } } }, "additionalProperties": false } }, "additionalProperties": false }, "deploy": { "type": "object", "properties": { "healthChecks": { "type": "object", "properties": { "startup": { "type": "object", "properties": { "path": { "type": "string" }, "headers": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "string" } }, "required": [ "name", "value" ], "additionalProperties": false } } }, "required": [ "path" ], "additionalProperties": false }, "liveness": { "type": "object", "properties": { "path": { "type": "string" }, "headers": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "string" } }, "required": [ "name", "value" ], "additionalProperties": false } } }, "required": [ "path" ], "additionalProperties": false } } } }, "additionalProperties": false } }, "additionalProperties": false } } }, "example": { "name": "My App", "settings": { "env": { "accessControls": { "allow": [], "deny": [ { "type": "cidr", "description": "Deny all default", "value": "0.0.0.0/0" } ], "environments": { "production": { "allow": [ { "type": "cidr", "description": "Prod servers", "value": "10.10.0.0/16" } ], "deny": [] } } } } } } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "appId", "required": true, "description": "The app Id or alternate Id." } ], "responses": { "200": { "description": "Successfully updated the app for an organization", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 }, "settings": { "description": "The app settings.", "type": "object", "properties": { "env": { "type": "object", "properties": { "accessControls": { "type": "object", "properties": { "allow": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } }, "deny": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } }, "environments": { "type": "object", "additionalProperties": { "type": "object", "properties": { "allow": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } }, "deny": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } } }, "additionalProperties": false } } }, "additionalProperties": false } }, "additionalProperties": false }, "deploy": { "type": "object", "properties": { "healthChecks": { "type": "object", "properties": { "startup": { "type": "object", "properties": { "path": { "type": "string" }, "headers": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "string" } }, "required": [ "name", "value" ], "additionalProperties": false } } }, "required": [ "path" ], "additionalProperties": false }, "liveness": { "type": "object", "properties": { "path": { "type": "string" }, "headers": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "string" } }, "required": [ "name", "value" ], "additionalProperties": false } } }, "required": [ "path" ], "additionalProperties": false } } } }, "additionalProperties": false } }, "additionalProperties": false }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "example": "2024-07-08T15:58:34.219+00:00" }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "example": "2024-07-08T15:58:34.219+00:00" }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "example": "2024-07-08T15:58:34.219+00:00" }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "id", "alternateId", "name", "organization", "project", "meta" ], "description": "Successfully updated the app for an organization" }, "example": { "id": "app_66bf99b72a0043f841769880", "alternateId": "my-app", "name": "My App", "settings": { "env": { "accessControls": { "environments": { "production": { "allow": [ { "description": "Prod servers", "type": "cidr", "cidr": "10.10.0.0/16" } ], "deny": [ { "description": "Block all", "type": "cidr", "cidr": "0.0.0.0/0" } ] } } } } }, "organization": { "id": "org_66bf99b72a0043f841769880", "name": "My Org" }, "project": { "id": "proj_66bf99b72a0043f841769880", "alternateId": "my-project", "name": "My Project" }, "meta": { "createdAt": "2025-01-14T22:56:14.234Z", "createdBy": "memb_66f30abb67ebc6bb0c5e0af9" } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/apps/{appId}/builds/uploads": { "post": { "summary": "Authorize a short-lived site upload", "tags": [ "App Builds" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "registryId", "files" ], "properties": { "registryId": { "type": "string", "pattern": "^conn_[a-fA-F0-9]{24}$" }, "revision": { "type": "string", "pattern": "^[a-f0-9]{24}$" }, "environmentId": { "type": "string", "pattern": "^pevr_[a-fA-F0-9]{24}$" }, "previewHash": { "type": "string", "minLength": 1, "maxLength": 63, "pattern": "^[a-zA-Z0-9-]+$" }, "files": { "type": "array", "minItems": 1, "maxItems": 10000, "items": { "type": "object", "additionalProperties": false, "required": [ "path", "size", "sha256" ], "properties": { "path": { "type": "string", "minLength": 1, "maxLength": 1024 }, "size": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" } } } } } } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "appId", "required": true, "description": "The app Id or alternate Id." } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "additionalProperties": false, "required": [ "provider", "appId", "revision", "uri", "expiresAt", "endpoint", "bucketName", "credentials", "uploads", "manifest", "limits" ], "properties": { "provider": { "enum": [ "cloudflare" ] }, "appId": { "type": "string" }, "revision": { "type": "string", "pattern": "^[a-f0-9]{24}$" }, "uri": { "type": "string", "minLength": 1 }, "expiresAt": { "type": "string", "format": "date-time" }, "endpoint": { "type": "string" }, "bucketName": { "type": "string" }, "credentials": { "type": "object", "additionalProperties": false, "required": [ "accessKeyId", "secretAccessKey", "sessionToken", "expiresAt" ], "properties": { "accessKeyId": { "type": "string" }, "secretAccessKey": { "type": "string" }, "sessionToken": { "type": "string" }, "expiresAt": { "type": "string", "format": "date-time" } } }, "manifest": { "type": "object", "additionalProperties": false, "required": [ "key", "content" ], "properties": { "key": { "type": "string" }, "content": { "type": "string" } } }, "limits": { "type": "object", "additionalProperties": false, "required": [ "maxFiles", "maxBytes", "maxFileBytes" ], "properties": { "maxFiles": { "type": "integer" }, "maxBytes": { "type": "integer" }, "maxFileBytes": { "type": "integer" } } }, "uploads": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "path", "key", "contentType" ], "properties": { "path": { "type": "string" }, "key": { "type": "string" }, "contentType": { "type": "string" } } } } } }, { "type": "object", "additionalProperties": false, "required": [ "sessionId", "revision", "uri", "token", "expiresAt", "uploadUrl", "finalizeUrl", "abortUrl", "limits" ], "properties": { "sessionId": { "type": "string" }, "revision": { "type": "string" }, "uri": { "type": "string", "minLength": 1 }, "token": { "type": "string" }, "expiresAt": { "type": "string" }, "uploadUrl": { "type": "string" }, "finalizeUrl": { "type": "string" }, "abortUrl": { "type": "string" }, "limits": { "type": "object", "required": [ "maxFiles", "maxBytes", "maxFileBytes" ], "properties": { "maxFiles": { "type": "integer" }, "maxBytes": { "type": "integer" }, "maxFileBytes": { "type": "integer" } } } } } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/apps/{appId}/dockerfile/": { "post": { "summary": "Create or continue a Dockerfile and dockerignore generation session for an app", "tags": [ "Apps" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "sessionId": { "type": "string" }, "results": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "properties": { "tool_call_id": { "type": "string" }, "output": { "anyOf": [ { "type": "object", "additionalProperties": true }, { "type": "array", "items": {} }, { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" } ] }, "error": { "type": "string" } }, "required": [ "tool_call_id" ] } } }, "required": [], "description": "Send an empty object to start a Dockerfile and dockerignore generation session, or include `sessionId` and `results` to continue one." } } }, "description": "Send an empty object to start a Dockerfile and dockerignore generation session, or include `sessionId` and `results` to continue one." }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "appId", "required": true, "description": "The app Id or alternate Id." } ], "responses": { "200": { "description": "Successfully continued the Dockerfile and dockerignore generation session.", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "session_id": { "type": "string" }, "provider": { "type": "string" }, "model": { "type": "string" }, "conversation_mode": { "type": "string", "enum": [ "provider_native", "gateway_managed" ] }, "status": { "type": "string", "enum": [ "ready", "requires_tool_results", "failed", "closed" ] }, "finish_reason": { "type": [ "null", "string" ] }, "message": { "type": "object", "additionalProperties": false, "properties": { "role": { "type": "string", "enum": [ "assistant" ] }, "content": { "type": [ "null", "string" ] }, "tool_calls": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "function" ] }, "function": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "arguments": { "type": "string" } }, "required": [ "name", "arguments" ] } }, "required": [ "id", "type", "function" ] } } }, "required": [ "role", "content", "tool_calls" ] } }, "required": [ "session_id", "provider", "model", "conversation_mode", "status", "finish_reason", "message" ], "description": "Successfully continued the Dockerfile and dockerignore generation session." } } } }, "201": { "description": "Successfully started the Dockerfile and dockerignore generation session.", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "session": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "provider": { "type": "string" }, "model": { "type": "string" }, "conversation_mode": { "type": "string", "enum": [ "provider_native", "gateway_managed" ] }, "status": { "type": "string", "enum": [ "ready", "requires_tool_results", "failed", "closed" ] }, "metadata": { "type": "object", "additionalProperties": true }, "provider_session_id": { "type": [ "null", "string" ] }, "provider_cursor": { "type": [ "null", "string" ] }, "pending_tool_calls": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "function" ] }, "function": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "arguments": { "type": "string" } }, "required": [ "name", "arguments" ] } }, "required": [ "id", "type", "function" ] } }, "created_at": { "type": "string" }, "updated_at": { "type": "string" }, "last_error": { "type": [ "null", "string" ] } }, "required": [ "id", "provider", "model", "conversation_mode", "status", "metadata", "provider_session_id", "provider_cursor", "pending_tool_calls", "created_at", "updated_at", "last_error" ] }, "output": { "type": "object", "additionalProperties": false, "properties": { "session_id": { "type": "string" }, "provider": { "type": "string" }, "model": { "type": "string" }, "conversation_mode": { "type": "string", "enum": [ "provider_native", "gateway_managed" ] }, "status": { "type": "string", "enum": [ "ready", "requires_tool_results", "failed", "closed" ] }, "finish_reason": { "type": [ "null", "string" ] }, "message": { "type": "object", "additionalProperties": false, "properties": { "role": { "type": "string", "enum": [ "assistant" ] }, "content": { "type": [ "null", "string" ] }, "tool_calls": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "function" ] }, "function": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "arguments": { "type": "string" } }, "required": [ "name", "arguments" ] } }, "required": [ "id", "type", "function" ] } } }, "required": [ "role", "content", "tool_calls" ] } }, "required": [ "session_id", "provider", "model", "conversation_mode", "status", "finish_reason", "message" ] } }, "required": [ "session", "output" ], "description": "Successfully started the Dockerfile and dockerignore generation session." } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/apps/{appId}/dot-env/": { "put": { "summary": "Replace the latest .env file for an app", "tags": [ ".Env Files" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "countVariables": { "type": "number", "description": "The number of variables in the .env file.", "example": 1 }, "size": { "type": "string", "description": "The size of the .env file.", "example": "1kb" }, "data": { "type": "string", "description": "The encrypted content of the env file.", "example": "encrypted content" }, "version": { "type": "number", "description": "The version of the .env file.", "minimum": 1, "example": 1 }, "secretKeyId": { "type": "number", "description": "The secret key id used to encrypt the .env file.", "minimum": 1, "example": 123 } }, "required": [ "countVariables", "size", "data", "version", "secretKeyId" ] }, "example": { "countVariables": 1, "size": "1kb", "data": "encrypted content", "version": 1, "secretKeyId": 123 } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "query", "name": "environmentId", "required": false, "description": "The environment Id. If not provided, the default \"all\" environment will be used." }, { "schema": { "type": "number", "minimum": 1 }, "example": 123, "in": "query", "name": "secretKeyId", "required": true, "description": "The secret key id used to encrypt the env file." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "appId", "required": true, "description": "The app Id or alternate Id." } ], "responses": { "201": { "description": "Successfully replaced the latest .env file for an app", "content": { "application/json": { "schema": { "type": "object", "properties": { "size": { "type": "string", "description": "The size of the .env file.", "example": "1kb" }, "countVariables": { "type": "number", "description": "The number of variables in the .env file.", "example": 1 }, "version": { "type": "number", "description": "The version of the .env file.", "minimum": 1, "example": 1 }, "secretKeyId": { "type": "number", "description": "The secret key id used to encrypt the .env file.", "minimum": 1, "example": 123 }, "published": { "type": "string", "format": "date-time", "description": "The date the .env file was published.", "example": "2024-01-01T00:00:00Z" }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The environment Id.", "type": "string" }, "alternateId": { "description": "The environment alternate id. This id is set by the user and can be used to retrieve an environment.\n\nMust be unique within the project.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "name": { "description": "The environment name. Must be unique within the project.\n\nMust have a length between 1 and 100 characters.", "type": "string", "minLength": 1, "maxLength": 100 } }, "required": [ "id", "alternateId", "name" ] }, "data": { "type": "string", "description": "The encrypted content of the env file.", "example": "encrypted content" } }, "required": [ "size", "countVariables", "version", "secretKeyId", "published", "organization", "project", "app", "data" ], "additionalProperties": false, "description": "Successfully replaced the latest .env file for an app" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "get": { "summary": "Get the .env file for an app", "tags": [ ".Env Files" ], "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "query", "name": "environmentId", "required": false, "description": "The environment Id. If not provided, the default \"all\" environment will be used." }, { "schema": { "type": "number", "minimum": 1 }, "example": 123, "in": "query", "name": "secretKeyId", "required": false, "description": "The secret key id used to encrypt the env file." }, { "schema": { "type": "number", "minimum": 1 }, "example": 1, "in": "query", "name": "version", "required": false, "description": "The version of the .env file." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "appId", "required": true, "description": "The app Id or alternate Id." } ], "responses": { "200": { "description": "Successfully got the latest .env file for an app", "content": { "application/json": { "schema": { "type": "object", "properties": { "size": { "type": "string", "description": "The size of the .env file.", "example": "1kb" }, "countVariables": { "type": "number", "description": "The number of variables in the .env file.", "example": 1 }, "version": { "type": "number", "description": "The version of the .env file.", "minimum": 1, "example": 1 }, "secretKeyId": { "type": "number", "description": "The secret key id used to encrypt the .env file.", "minimum": 1, "example": 123 }, "published": { "type": "string", "format": "date-time", "description": "The date the .env file was published.", "example": "2024-01-01T00:00:00Z" }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The environment Id.", "type": "string" }, "alternateId": { "description": "The environment alternate id. This id is set by the user and can be used to retrieve an environment.\n\nMust be unique within the project.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "name": { "description": "The environment name. Must be unique within the project.\n\nMust have a length between 1 and 100 characters.", "type": "string", "minLength": 1, "maxLength": 100 } }, "required": [ "id", "alternateId", "name" ] }, "data": { "type": "string", "description": "The encrypted content of the env file.", "example": "encrypted content" } }, "required": [ "size", "countVariables", "version", "secretKeyId", "published", "organization", "project", "app", "data" ], "additionalProperties": false, "description": "Successfully got the latest .env file for an app" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "delete": { "summary": "Delete the .env file for an app", "tags": [ ".Env Files" ], "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "query", "name": "environmentId", "required": false, "description": "The environment Id. If not provided, the default \"all\" environment will be used." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "appId", "required": true, "description": "The app Id or alternate Id." } ], "responses": { "204": { "description": "Successfully deleted the .env file for an app" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/apps/{appId}/dot-env/versions/": { "get": { "summary": "Get a list of versions for an .env file", "tags": [ ".Env Files" ], "parameters": [ { "schema": { "type": "integer", "minimum": 1, "default": 1 }, "in": "query", "name": "pageNum", "required": false, "description": "The page number." }, { "schema": { "type": "integer", "minimum": 5, "maximum": 200, "default": 50 }, "in": "query", "name": "pageSize", "required": false, "description": "The page size." }, { "schema": { "type": "string", "minLength": 1 }, "in": "query", "name": "environmentId", "required": false, "description": "The environment Id. If not provided, the default \"all\" environment will be used." }, { "schema": { "type": "number", "minimum": 1 }, "example": 123, "in": "query", "name": "secretKeyId", "required": false, "description": "The secret key id used to encrypt the env file." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "appId", "required": true, "description": "The app Id or alternate Id." } ], "responses": { "200": { "description": "Successfully got a list of versions for .env file", "content": { "application/json": { "schema": { "description": "Successfully got a list of versions for .env file", "type": "object", "additionalProperties": false, "properties": { "total": { "description": "The total number of records.", "type": "number" }, "pageNum": { "description": "The page number.", "type": "number" }, "pageSize": { "description": "The page size.", "type": "number" }, "data": { "type": "array", "items": { "type": "object", "properties": { "size": { "type": "string", "description": "The size of the .env file.", "example": "1kb" }, "countVariables": { "type": "number", "description": "The number of variables in the .env file.", "example": 1 }, "version": { "type": "number", "description": "The version of the .env file.", "minimum": 1, "example": 1 }, "secretKeyId": { "type": "number", "description": "The secret key id used to encrypt the .env file.", "minimum": 1, "example": 123 }, "published": { "type": "string", "format": "date-time", "description": "The date the .env file was published.", "example": "2024-01-01T00:00:00Z" }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The environment Id.", "type": "string" }, "alternateId": { "description": "The environment alternate id. This id is set by the user and can be used to retrieve an environment.\n\nMust be unique within the project.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "name": { "description": "The environment name. Must be unique within the project.\n\nMust have a length between 1 and 100 characters.", "type": "string", "minLength": 1, "maxLength": 100 } }, "required": [ "id", "alternateId", "name" ] } }, "required": [ "size", "countVariables", "version", "secretKeyId", "published", "organization", "project", "app" ], "additionalProperties": false } } }, "required": [ "total", "pageNum", "pageSize", "data" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "delete": { "summary": "Deleted a list of versions for an .env file", "tags": [ ".Env Files" ], "parameters": [ { "schema": { "type": "string", "minLength": 1 }, "in": "query", "name": "environmentId", "required": false, "description": "The environment Id. If not provided, the default \"all\" environment will be used." }, { "schema": { "type": "number", "minimum": 1 }, "example": 123, "in": "query", "name": "secretKeyId", "required": true, "description": "The secret key id used to encrypt the env file." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "appId", "required": true, "description": "The app Id or alternate Id." } ], "responses": { "204": { "description": "Successfully deleted a list of versions for an .env file" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/apps/{appId}/environments/": { "get": { "summary": "Get a list of environments for an app", "tags": [ "Apps" ], "parameters": [ { "schema": { "type": "integer", "minimum": 1, "default": 1 }, "in": "query", "name": "pageNum", "required": false, "description": "The page number." }, { "schema": { "type": "integer", "minimum": 5, "maximum": 200, "default": 50 }, "in": "query", "name": "pageSize", "required": false, "description": "The page size." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "appId", "required": true, "description": "The app Id or alternate Id." } ], "responses": { "200": { "description": "Successfully got a list of environments for an app", "content": { "application/json": { "schema": { "description": "Successfully got a list of environments for an app", "type": "object", "additionalProperties": false, "properties": { "total": { "description": "The total number of records.", "type": "number" }, "pageNum": { "description": "The page number.", "type": "number" }, "pageSize": { "description": "The page size.", "type": "number" }, "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The environment Id.", "type": "string" }, "alternateId": { "description": "The environment alternate id. This id is set by the user and can be used to retrieve an environment.\n\nMust be unique within the project.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "color": { "description": "The environment color.\n\nMust be a valid hex color.", "type": "string", "pattern": "^#(?:[0-9a-fA-F]{3}){1,2}$" }, "name": { "description": "The environment name. Must be unique within the project.\n\nMust have a length between 1 and 100 characters.", "type": "string", "minLength": 1, "maxLength": 100 }, "type": { "description": "The environment type. Only one environment of type \"development\" or \"production\" is allowed per project", "type": "string", "enum": [ "development", "production", "custom" ] }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] } }, "required": [ "id", "alternateId", "name", "color", "type", "organization", "project" ], "example": { "id": "env_66bf99b72a0043f841769880", "alternateId": "production", "name": "Production", "color": "#00FF00", "organization": { "id": "org_66bf99b72a0043f841769880", "name": "My Org" }, "project": { "id": "proj_66bf99b72a0043f841769880", "alternateId": "my-project", "name": "My Project" } } } } }, "required": [ "total", "pageNum", "pageSize", "data" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/apps/{appId}/environments/{environmentId}/": { "get": { "summary": "Get the environment for an app", "tags": [ "Apps" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "appId", "required": true, "description": "The app Id or alternate Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "environmentId", "required": true, "description": "The environment Id or alternate Id." } ], "responses": { "200": { "description": "Successfully got the environment for an app", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The environment Id.", "type": "string" }, "alternateId": { "description": "The environment alternate id. This id is set by the user and can be used to retrieve an environment.\n\nMust be unique within the project.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "color": { "description": "The environment color.\n\nMust be a valid hex color.", "type": "string", "pattern": "^#(?:[0-9a-fA-F]{3}){1,2}$" }, "name": { "description": "The environment name. Must be unique within the project.\n\nMust have a length between 1 and 100 characters.", "type": "string", "minLength": 1, "maxLength": 100 }, "type": { "description": "The environment type. Only one environment of type \"development\" or \"production\" is allowed per project", "type": "string", "enum": [ "development", "production", "custom" ] }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] } }, "required": [ "id", "alternateId", "name", "color", "type", "organization", "project" ], "description": "Successfully got the environment for an app" }, "example": { "id": "env_66bf99b72a0043f841769880", "alternateId": "production", "name": "Production", "color": "#00FF00", "organization": { "id": "org_66bf99b72a0043f841769880", "name": "My Org" }, "project": { "id": "proj_66bf99b72a0043f841769880", "alternateId": "my-project", "name": "My Project" } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/apps/{appId}/runs/": { "get": { "summary": "Get runs for an app", "tags": [ "Runs" ], "parameters": [ { "schema": { "type": "integer", "minimum": 1, "default": 1 }, "in": "query", "name": "pageNum", "required": false, "description": "The page number." }, { "schema": { "type": "integer", "minimum": 5, "maximum": 200, "default": 50 }, "in": "query", "name": "pageSize", "required": false, "description": "The page size." }, { "schema": { "type": "string", "enum": [ "generateDockerfile", "agentCode" ] }, "in": "query", "name": "type", "required": false, "description": "The run type." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "appId", "required": true, "description": "The app Id or alternate Id." } ], "responses": { "200": { "description": "Run created successfully", "content": { "application/json": { "schema": { "description": "Run created successfully", "properties": { "total": { "description": "The total number of records.", "type": "number" }, "pageNum": { "description": "The page number.", "type": "number" }, "pageSize": { "description": "The page size.", "type": "number" }, "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The unique identifier for the run.", "type": "string", "minLength": 1, "pattern": "^run_[a-fA-F0-9]{24}$" }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "^org_[a-fA-F0-9]{24}$", "description": "The unique identifier for the organization." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "status": { "type": "string", "enum": [ "pending", "queued", "running", "action_required", "succeeded", "failed", "canceled" ] }, "type": { "type": "string", "enum": [ "deployment", "generateDockerfile", "resourceCleanup", "agentCode", "agentTask", "connection" ] }, "action": { "type": "string", "enum": [ "connectionCreated", "deployContainerRevision", "deploySiteRevision", "assignDnsRecordContent", "assignBackendPoolEndpoints", "assignLoadBalancerPools" ] }, "references": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident" ], "description": "The type of the associated resource." }, "id": { "type": "string", "description": "The unique identifier of the associated resource." } }, "required": [ "type", "id" ] }, "minItems": 0 }, "workflowId": { "type": "string", "description": "The identifier of the workflow associated with the run.", "nullable": true }, "timing": { "type": "object", "additionalProperties": false, "description": "The timing information for the run execution.", "properties": { "startTime": { "type": "string", "format": "date-time", "description": "The start time of the run execution in ISO 8601 format." }, "endTime": { "type": "string", "format": "date-time", "description": "The end time of the run execution in ISO 8601 format." } }, "required": [] }, "input": { "description": "The input data for the run.", "additionalProperties": true, "type": "object" }, "data": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": [ "kubernetes-upgrade-planning" ] }, "phase": { "type": "string", "enum": [ "queued", "refreshing-inventory", "collecting-facts", "resolving-provider", "solving", "completed", "failed" ] }, "cluster": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "workflow": { "type": "object", "additionalProperties": false, "properties": { "workflowId": { "type": "string" }, "temporalRunId": { "type": "string" }, "namespace": { "type": "string" } }, "required": [ "workflowId", "temporalRunId", "namespace" ] }, "artifact": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "kubernetes-upgrade-plan" ] }, "schemaVersion": { "type": "string", "enum": [ "hyphen.kubernetes-upgrade-plan/v1" ] }, "createdAt": { "type": "string", "format": "date-time" }, "validUntil": { "type": "string", "format": "date-time" }, "observation": { "type": "object", "additionalProperties": false, "properties": { "factsSchemaVersion": { "type": "string" }, "factsCollectedAt": { "type": "string", "format": "date-time" }, "factsComplete": { "type": "boolean" } }, "required": [ "factsSchemaVersion", "factsCollectedAt", "factsComplete" ] }, "providerSnapshot": { "type": "object", "additionalProperties": false, "properties": { "provider": { "type": "string", "enum": [ "gke", "eks", "aks", "private", "unresolved" ] }, "observedAt": { "type": "string", "format": "date-time" }, "availableKubernetesVersions": { "type": "array", "items": { "type": "string" } }, "currentControlPlaneVersion": { "type": "string" }, "nodePools": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "version": { "type": "string" }, "availableVersions": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "version" ] } }, "releaseChannel": { "type": "string" }, "canonicalResourceId": { "type": "string" }, "availabilityVerified": { "type": "boolean", "description": "Whether the provider proved version availability. Private plans may be ready with false when an upstream-catalog assumption warning is present." }, "versionMetadata": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "version": { "type": "string" }, "status": { "type": "string" }, "standardSupportEndsAt": { "type": "string" }, "extendedSupportEndsAt": { "type": "string" } }, "required": [ "version", "status" ] } }, "managedAddons": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "version": { "type": "string" }, "availableVersions": { "type": "array", "items": { "type": "string" } }, "versionCompatibility": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "version": { "type": "string" }, "kubernetesVersions": { "type": "array", "items": { "type": "string" } } }, "required": [ "version", "kubernetesVersions" ] } }, "workloadNames": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "version", "availableVersions", "versionCompatibility" ] } }, "managedResources": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": [ "workload", "crd", "webhook", "api-service" ] }, "name": { "type": "string" }, "namespace": { "type": "string" } }, "required": [ "kind", "name" ] } } }, "required": [ "provider", "observedAt", "availableKubernetesVersions" ] }, "optimizationPolicy": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ] }, "readiness": { "type": "string", "enum": [ "ready", "blocked" ], "description": "Ready means no blocking issues remain; warnings, unknown platform resources, and private upstream-catalog assumptions may still require manual verification." }, "catalog": { "type": "object", "additionalProperties": false, "properties": { "schemaVersion": { "type": "string" }, "contentHash": { "type": "string" }, "importedAt": { "type": "string", "format": "date-time" } }, "required": [ "schemaVersion", "contentHash", "importedAt" ] }, "currentState": { "type": "object", "additionalProperties": false, "properties": { "kubernetesVersion": { "type": "string" }, "componentVersions": { "type": "object", "additionalProperties": false, "properties": { "istio": { "type": "string" }, "cert-manager": { "type": "string" }, "ingress-nginx": { "type": "string" }, "metrics-server": { "type": "string" } } }, "istioDataPlaneVersions": { "type": "array", "items": { "type": "string" } }, "nodeVersions": { "type": "array", "items": { "type": "string" } }, "nodeAgentGroups": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "agent": { "type": "string", "enum": [ "kubelet", "kube-proxy" ] }, "version": { "type": "string" }, "total": { "type": "number" }, "ready": { "type": "number" }, "operatingSystem": { "type": "string" }, "architecture": { "type": "string" }, "providerPoolId": { "type": "string" }, "nodeNames": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "agent", "version", "total", "ready", "operatingSystem", "architecture" ] } }, "providerAddonVersions": { "type": "object", "additionalProperties": { "type": "string" } }, "istioInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "role": { "type": "string", "enum": [ "atomic", "control-plane", "gateway", "data-plane", "cni", "database", "cache" ] }, "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "role", "instance", "version" ] } }, "postgresqlInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "instance", "version" ] } }, "redisInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "instance", "version" ] } } }, "required": [ "kubernetesVersion", "componentVersions", "nodeVersions" ] }, "targetState": { "type": "object", "additionalProperties": false, "properties": { "kubernetesVersion": { "type": "string" }, "componentVersions": { "type": "object", "additionalProperties": false, "properties": { "istio": { "type": "string" }, "cert-manager": { "type": "string" }, "ingress-nginx": { "type": "string" }, "metrics-server": { "type": "string" } } }, "istioDataPlaneVersions": { "type": "array", "items": { "type": "string" } }, "nodeVersions": { "type": "array", "items": { "type": "string" } }, "nodeAgentGroups": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "agent": { "type": "string", "enum": [ "kubelet", "kube-proxy" ] }, "version": { "type": "string" }, "total": { "type": "number" }, "ready": { "type": "number" }, "operatingSystem": { "type": "string" }, "architecture": { "type": "string" }, "providerPoolId": { "type": "string" }, "nodeNames": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "agent", "version", "total", "ready", "operatingSystem", "architecture" ] } }, "providerAddonVersions": { "type": "object", "additionalProperties": { "type": "string" } }, "istioInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "role": { "type": "string", "enum": [ "atomic", "control-plane", "gateway", "data-plane", "cni", "database", "cache" ] }, "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "role", "instance", "version" ] } }, "postgresqlInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "instance", "version" ] } }, "redisInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "instance", "version" ] } } }, "required": [ "kubernetesVersion", "componentVersions", "nodeVersions" ] }, "detectedComponents": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "component": { "type": "string", "enum": [ "istio", "cert-manager", "ingress-nginx", "metrics-server", "postgresql", "redis" ] }, "role": { "type": "string", "enum": [ "atomic", "control-plane", "gateway", "data-plane", "cni", "database", "cache" ] }, "instance": { "type": "string" }, "version": { "type": "string" }, "confidence": { "type": "string", "enum": [ "digest", "metadata", "image-tag", "conflict" ] }, "installationMethod": { "type": "string", "enum": [ "helm", "operator", "manifest", "unknown" ] }, "evidence": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "source": { "type": "string", "enum": [ "resolved-digest", "helm-metadata", "application-metadata", "image-tag", "istio-revision" ] }, "value": { "type": "string" }, "workload": { "type": "object", "additionalProperties": false, "properties": { "namespace": { "type": "string" }, "kind": { "type": "string" }, "name": { "type": "string" }, "container": { "type": "string" } }, "required": [ "namespace", "kind", "name" ] } }, "required": [ "source", "value" ] } } }, "required": [ "component", "role", "instance", "confidence", "installationMethod", "evidence" ] } }, "graph": { "type": "object", "additionalProperties": false, "properties": { "nodes": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "kind": { "type": "string", "enum": [ "state", "action", "constraint" ] }, "label": { "type": "string" }, "state": { "type": "object", "additionalProperties": false, "properties": { "kubernetesVersion": { "type": "string" }, "componentVersions": { "type": "object", "additionalProperties": false, "properties": { "istio": { "type": "string" }, "cert-manager": { "type": "string" }, "ingress-nginx": { "type": "string" }, "metrics-server": { "type": "string" } } }, "istioDataPlaneVersions": { "type": "array", "items": { "type": "string" } }, "nodeVersions": { "type": "array", "items": { "type": "string" } }, "nodeAgentGroups": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "agent": { "type": "string", "enum": [ "kubelet", "kube-proxy" ] }, "version": { "type": "string" }, "total": { "type": "number" }, "ready": { "type": "number" }, "operatingSystem": { "type": "string" }, "architecture": { "type": "string" }, "providerPoolId": { "type": "string" }, "nodeNames": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "agent", "version", "total", "ready", "operatingSystem", "architecture" ] } }, "providerAddonVersions": { "type": "object", "additionalProperties": { "type": "string" } }, "istioInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "role": { "type": "string", "enum": [ "atomic", "control-plane", "gateway", "data-plane", "cni", "database", "cache" ] }, "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "role", "instance", "version" ] } }, "postgresqlInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "instance", "version" ] } }, "redisInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "instance", "version" ] } } }, "required": [ "kubernetesVersion", "componentVersions", "nodeVersions" ] }, "actionStepId": { "type": "string" }, "sourceIds": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "kind", "label" ] } }, "edges": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "from": { "type": "string" }, "to": { "type": "string" }, "type": { "type": "string", "enum": [ "transition", "requires", "validated-by" ] }, "label": { "type": "string" } }, "required": [ "from", "to", "type" ] } } }, "required": [ "nodes", "edges" ] }, "steps": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "phase": { "type": "string", "enum": [ "preflight", "bridge-addon", "control-plane", "node-pool", "data-plane", "post-upgrade", "validation" ] }, "component": { "type": "string", "enum": [ "kubernetes", "istio", "cert-manager", "ingress-nginx", "metrics-server", "postgresql", "redis" ] }, "fromVersion": { "type": "string" }, "toVersion": { "type": "string" }, "prerequisites": { "type": "array", "items": { "type": "string" } }, "reason": { "type": "string" }, "disruption": { "type": "string", "enum": [ "none", "rolling", "control-plane", "unknown" ] }, "validation": { "type": "array", "items": { "type": "string" } }, "rollback": { "type": "string" }, "commands": { "type": "array", "items": { "type": "string" } }, "verificationCommands": { "type": "array", "items": { "type": "string" } }, "rollbackCommands": { "type": "array", "items": { "type": "string" } }, "recoveryCommands": { "type": "array", "items": { "type": "string" } }, "commandStatus": { "type": "string", "enum": [ "executable", "template", "manual", "not-applicable" ] }, "rollbackStatus": { "type": "string", "enum": [ "executable", "template", "manual", "unsupported", "not-applicable" ] }, "requiredCommandInputs": { "type": "array", "items": { "type": "string" } }, "sourceIds": { "type": "array", "items": { "type": "string" } }, "target": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": [ "kubelet-group", "kube-proxy-group", "provider-addon", "istio-instance" ] }, "id": { "type": "string" }, "role": { "type": "string", "enum": [ "atomic", "control-plane", "gateway", "data-plane", "cni", "database", "cache" ] }, "providerPoolId": { "type": "string" }, "nodeNames": { "type": "array", "items": { "type": "string" } } }, "required": [ "kind", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": [ "postgresql-instance", "redis-instance" ] }, "id": { "type": "string" }, "image": { "type": "string" } }, "required": [ "kind", "id", "image" ] } ] }, "operation": { "type": "string", "enum": [ "install", "upgrade", "migrate", "cleanup" ] }, "resultingTargetId": { "type": "string" } }, "required": [ "id", "phase", "component", "prerequisites", "reason", "disruption", "validation", "rollback", "sourceIds" ] } }, "blockers": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "code": { "type": "string" }, "message": { "type": "string" }, "component": { "type": "string" }, "sourceIds": { "type": "array", "items": { "type": "string" } }, "details": { "type": "object", "additionalProperties": true } }, "required": [ "code", "message" ] } }, "warnings": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "code": { "type": "string" }, "message": { "type": "string" }, "component": { "type": "string" }, "sourceIds": { "type": "array", "items": { "type": "string" } }, "details": { "type": "object", "additionalProperties": true } }, "required": [ "code", "message" ] } }, "unmodeledContainers": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "namespace": { "type": "string" }, "workloadKind": { "type": "string" }, "workloadName": { "type": "string" }, "containerName": { "type": "string" }, "image": { "type": "string" } }, "required": [ "namespace", "workloadKind", "workloadName", "containerName", "image" ] } }, "unknownPlatformResources": { "type": "array", "description": "Unrecognized platform resources that require manual compatibility verification and do not independently block readiness.", "items": { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": [ "workload", "crd", "webhook", "api-service" ] }, "name": { "type": "string" }, "namespace": { "type": "string" } }, "required": [ "kind", "name" ] } } }, "required": [ "type", "schemaVersion", "createdAt", "validUntil", "observation", "optimizationPolicy", "readiness", "catalog", "currentState", "targetState", "detectedComponents", "graph", "steps", "blockers", "warnings", "unmodeledContainers", "unknownPlatformResources" ] }, "error": { "type": "string", "maxLength": 2048 } }, "required": [ "kind", "phase", "cluster" ] }, { "type": "object", "properties": { "prUrl": { "type": "string", "description": "The URL of the pull request." }, "ChangedFiles": { "type": "object", "additionalProperties": true, "description": "A mapping of changed file paths to their statuses." } }, "additionalProperties": false }, { "type": "object", "properties": { "staleFeatureFlags": { "type": "object", "description": "A mapping of project IDs to their stale feature flags.", "additionalProperties": true }, "apps": { "type": "array", "description": "An array of code pull requests associated with the stale feature flags.", "items": { "type": "object", "additionalProperties": false, "properties": { "branch": { "type": "string", "description": "The branch name of the pull request." }, "repositoryUrl": { "type": "string", "description": "The URL of the repository." }, "prUrl": { "type": "string", "description": "[DEPRECATED] use pr.url." }, "pullRequest": { "type": "object", "description": "Details of the pull request.", "properties": { "id": { "type": "number", "description": "The unique identifier for the pull request." }, "title": { "type": "string", "description": "The title of the pull request." }, "url": { "type": "string", "description": "The URL of the pull request." }, "body": { "type": "string", "description": "The body/description of the pull request." }, "merged": { "type": "boolean", "description": "Indicates whether the pull request has been merged." }, "state": { "type": "string", "description": "The current state of the pull request.", "enum": [ "open", "closed" ] } }, "additionalProperties": false }, "status": { "type": "string", "enum": [ "pending", "in_progress", "completed", "failed" ] }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] } } } } }, "additionalProperties": false }, { "type": "object", "description": "An object containing arbitrary key-value pairs.", "not": { "properties": { "kind": { "enum": [ "kubernetes-upgrade-planning" ] } }, "required": [ "kind" ] }, "properties": { "llmGatewaySessionId": { "description": "The LLMGateway session associated with the run.", "type": "string", "minLength": 1, "pattern": "^llms_[a-fA-F0-9]{24}$" } }, "additionalProperties": true } ] }, "inputRequests": { "type": "array", "description": "Input requests issued during the run, including any responses.", "items": { "type": "object", "discriminator": { "propertyName": "type" }, "required": [ "type" ], "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "boolean" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "trueLabel": { "type": "string" }, "falseLabel": { "type": "string" }, "response": { "type": "boolean" } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "string" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "validation": { "type": "object", "additionalProperties": false, "properties": { "pattern": { "type": "string" }, "minLength": { "type": "integer", "minimum": 0 }, "maxLength": { "type": "integer", "minimum": 0 } } }, "response": { "type": "string" } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "options" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "value": { "type": "string" }, "label": { "type": "string" } }, "required": [ "value", "label" ] } }, "response": { "type": "string" } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "optionsWithText" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "value": { "type": "string" }, "label": { "type": "string" }, "requiresText": { "type": "boolean" }, "textValidation": { "type": "object", "additionalProperties": false, "properties": { "pattern": { "type": "string" }, "minLength": { "type": "integer", "minimum": 0 }, "maxLength": { "type": "integer", "minimum": 0 } } } }, "required": [ "value", "label" ] } }, "response": { "type": "object", "additionalProperties": false, "properties": { "value": { "type": "string" }, "text": { "type": "string" } }, "required": [ "value" ] } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] } ] } } }, "required": [ "id", "organization", "status", "type" ] } } }, "type": "object" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "post": { "summary": "Create a run for an app", "tags": [ "Runs" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "discriminator": { "propertyName": "type" }, "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": [ "generateDockerfile" ] }, "targetBranch": { "type": "string", "minLength": 1, "description": "The target branch for the run." } }, "required": [ "type" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "agentCode" ] }, "targetBranch": { "type": "string", "minLength": 1, "description": "The target branch for the run." }, "prompt": { "type": "string", "minLength": 1, "description": "The prompt for agent code." } }, "required": [ "type", "prompt" ], "additionalProperties": false } ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "appId", "required": true, "description": "The app Id or alternate Id." } ], "responses": { "200": { "description": "Run created successfully", "content": { "application/json": { "schema": { "description": "Run created successfully", "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The unique identifier for the run.", "type": "string", "minLength": 1, "pattern": "^run_[a-fA-F0-9]{24}$" }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "^org_[a-fA-F0-9]{24}$", "description": "The unique identifier for the organization." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "status": { "type": "string", "enum": [ "pending", "queued", "running", "action_required", "succeeded", "failed", "canceled" ] }, "type": { "type": "string", "enum": [ "deployment", "generateDockerfile", "resourceCleanup", "agentCode", "agentTask", "connection" ] }, "action": { "type": "string", "enum": [ "connectionCreated", "deployContainerRevision", "deploySiteRevision", "assignDnsRecordContent", "assignBackendPoolEndpoints", "assignLoadBalancerPools" ] }, "references": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident" ], "description": "The type of the associated resource." }, "id": { "type": "string", "description": "The unique identifier of the associated resource." } }, "required": [ "type", "id" ] }, "minItems": 0 }, "workflowId": { "type": "string", "description": "The identifier of the workflow associated with the run.", "nullable": true }, "timing": { "type": "object", "additionalProperties": false, "description": "The timing information for the run execution.", "properties": { "startTime": { "type": "string", "format": "date-time", "description": "The start time of the run execution in ISO 8601 format." }, "endTime": { "type": "string", "format": "date-time", "description": "The end time of the run execution in ISO 8601 format." } }, "required": [] }, "input": { "description": "The input data for the run.", "additionalProperties": true, "type": "object" }, "data": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": [ "kubernetes-upgrade-planning" ] }, "phase": { "type": "string", "enum": [ "queued", "refreshing-inventory", "collecting-facts", "resolving-provider", "solving", "completed", "failed" ] }, "cluster": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "workflow": { "type": "object", "additionalProperties": false, "properties": { "workflowId": { "type": "string" }, "temporalRunId": { "type": "string" }, "namespace": { "type": "string" } }, "required": [ "workflowId", "temporalRunId", "namespace" ] }, "artifact": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "kubernetes-upgrade-plan" ] }, "schemaVersion": { "type": "string", "enum": [ "hyphen.kubernetes-upgrade-plan/v1" ] }, "createdAt": { "type": "string", "format": "date-time" }, "validUntil": { "type": "string", "format": "date-time" }, "observation": { "type": "object", "additionalProperties": false, "properties": { "factsSchemaVersion": { "type": "string" }, "factsCollectedAt": { "type": "string", "format": "date-time" }, "factsComplete": { "type": "boolean" } }, "required": [ "factsSchemaVersion", "factsCollectedAt", "factsComplete" ] }, "providerSnapshot": { "type": "object", "additionalProperties": false, "properties": { "provider": { "type": "string", "enum": [ "gke", "eks", "aks", "private", "unresolved" ] }, "observedAt": { "type": "string", "format": "date-time" }, "availableKubernetesVersions": { "type": "array", "items": { "type": "string" } }, "currentControlPlaneVersion": { "type": "string" }, "nodePools": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "version": { "type": "string" }, "availableVersions": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "version" ] } }, "releaseChannel": { "type": "string" }, "canonicalResourceId": { "type": "string" }, "availabilityVerified": { "type": "boolean", "description": "Whether the provider proved version availability. Private plans may be ready with false when an upstream-catalog assumption warning is present." }, "versionMetadata": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "version": { "type": "string" }, "status": { "type": "string" }, "standardSupportEndsAt": { "type": "string" }, "extendedSupportEndsAt": { "type": "string" } }, "required": [ "version", "status" ] } }, "managedAddons": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "version": { "type": "string" }, "availableVersions": { "type": "array", "items": { "type": "string" } }, "versionCompatibility": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "version": { "type": "string" }, "kubernetesVersions": { "type": "array", "items": { "type": "string" } } }, "required": [ "version", "kubernetesVersions" ] } }, "workloadNames": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "version", "availableVersions", "versionCompatibility" ] } }, "managedResources": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": [ "workload", "crd", "webhook", "api-service" ] }, "name": { "type": "string" }, "namespace": { "type": "string" } }, "required": [ "kind", "name" ] } } }, "required": [ "provider", "observedAt", "availableKubernetesVersions" ] }, "optimizationPolicy": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ] }, "readiness": { "type": "string", "enum": [ "ready", "blocked" ], "description": "Ready means no blocking issues remain; warnings, unknown platform resources, and private upstream-catalog assumptions may still require manual verification." }, "catalog": { "type": "object", "additionalProperties": false, "properties": { "schemaVersion": { "type": "string" }, "contentHash": { "type": "string" }, "importedAt": { "type": "string", "format": "date-time" } }, "required": [ "schemaVersion", "contentHash", "importedAt" ] }, "currentState": { "type": "object", "additionalProperties": false, "properties": { "kubernetesVersion": { "type": "string" }, "componentVersions": { "type": "object", "additionalProperties": false, "properties": { "istio": { "type": "string" }, "cert-manager": { "type": "string" }, "ingress-nginx": { "type": "string" }, "metrics-server": { "type": "string" } } }, "istioDataPlaneVersions": { "type": "array", "items": { "type": "string" } }, "nodeVersions": { "type": "array", "items": { "type": "string" } }, "nodeAgentGroups": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "agent": { "type": "string", "enum": [ "kubelet", "kube-proxy" ] }, "version": { "type": "string" }, "total": { "type": "number" }, "ready": { "type": "number" }, "operatingSystem": { "type": "string" }, "architecture": { "type": "string" }, "providerPoolId": { "type": "string" }, "nodeNames": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "agent", "version", "total", "ready", "operatingSystem", "architecture" ] } }, "providerAddonVersions": { "type": "object", "additionalProperties": { "type": "string" } }, "istioInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "role": { "type": "string", "enum": [ "atomic", "control-plane", "gateway", "data-plane", "cni", "database", "cache" ] }, "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "role", "instance", "version" ] } }, "postgresqlInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "instance", "version" ] } }, "redisInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "instance", "version" ] } } }, "required": [ "kubernetesVersion", "componentVersions", "nodeVersions" ] }, "targetState": { "type": "object", "additionalProperties": false, "properties": { "kubernetesVersion": { "type": "string" }, "componentVersions": { "type": "object", "additionalProperties": false, "properties": { "istio": { "type": "string" }, "cert-manager": { "type": "string" }, "ingress-nginx": { "type": "string" }, "metrics-server": { "type": "string" } } }, "istioDataPlaneVersions": { "type": "array", "items": { "type": "string" } }, "nodeVersions": { "type": "array", "items": { "type": "string" } }, "nodeAgentGroups": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "agent": { "type": "string", "enum": [ "kubelet", "kube-proxy" ] }, "version": { "type": "string" }, "total": { "type": "number" }, "ready": { "type": "number" }, "operatingSystem": { "type": "string" }, "architecture": { "type": "string" }, "providerPoolId": { "type": "string" }, "nodeNames": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "agent", "version", "total", "ready", "operatingSystem", "architecture" ] } }, "providerAddonVersions": { "type": "object", "additionalProperties": { "type": "string" } }, "istioInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "role": { "type": "string", "enum": [ "atomic", "control-plane", "gateway", "data-plane", "cni", "database", "cache" ] }, "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "role", "instance", "version" ] } }, "postgresqlInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "instance", "version" ] } }, "redisInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "instance", "version" ] } } }, "required": [ "kubernetesVersion", "componentVersions", "nodeVersions" ] }, "detectedComponents": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "component": { "type": "string", "enum": [ "istio", "cert-manager", "ingress-nginx", "metrics-server", "postgresql", "redis" ] }, "role": { "type": "string", "enum": [ "atomic", "control-plane", "gateway", "data-plane", "cni", "database", "cache" ] }, "instance": { "type": "string" }, "version": { "type": "string" }, "confidence": { "type": "string", "enum": [ "digest", "metadata", "image-tag", "conflict" ] }, "installationMethod": { "type": "string", "enum": [ "helm", "operator", "manifest", "unknown" ] }, "evidence": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "source": { "type": "string", "enum": [ "resolved-digest", "helm-metadata", "application-metadata", "image-tag", "istio-revision" ] }, "value": { "type": "string" }, "workload": { "type": "object", "additionalProperties": false, "properties": { "namespace": { "type": "string" }, "kind": { "type": "string" }, "name": { "type": "string" }, "container": { "type": "string" } }, "required": [ "namespace", "kind", "name" ] } }, "required": [ "source", "value" ] } } }, "required": [ "component", "role", "instance", "confidence", "installationMethod", "evidence" ] } }, "graph": { "type": "object", "additionalProperties": false, "properties": { "nodes": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "kind": { "type": "string", "enum": [ "state", "action", "constraint" ] }, "label": { "type": "string" }, "state": { "type": "object", "additionalProperties": false, "properties": { "kubernetesVersion": { "type": "string" }, "componentVersions": { "type": "object", "additionalProperties": false, "properties": { "istio": { "type": "string" }, "cert-manager": { "type": "string" }, "ingress-nginx": { "type": "string" }, "metrics-server": { "type": "string" } } }, "istioDataPlaneVersions": { "type": "array", "items": { "type": "string" } }, "nodeVersions": { "type": "array", "items": { "type": "string" } }, "nodeAgentGroups": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "agent": { "type": "string", "enum": [ "kubelet", "kube-proxy" ] }, "version": { "type": "string" }, "total": { "type": "number" }, "ready": { "type": "number" }, "operatingSystem": { "type": "string" }, "architecture": { "type": "string" }, "providerPoolId": { "type": "string" }, "nodeNames": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "agent", "version", "total", "ready", "operatingSystem", "architecture" ] } }, "providerAddonVersions": { "type": "object", "additionalProperties": { "type": "string" } }, "istioInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "role": { "type": "string", "enum": [ "atomic", "control-plane", "gateway", "data-plane", "cni", "database", "cache" ] }, "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "role", "instance", "version" ] } }, "postgresqlInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "instance", "version" ] } }, "redisInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "instance", "version" ] } } }, "required": [ "kubernetesVersion", "componentVersions", "nodeVersions" ] }, "actionStepId": { "type": "string" }, "sourceIds": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "kind", "label" ] } }, "edges": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "from": { "type": "string" }, "to": { "type": "string" }, "type": { "type": "string", "enum": [ "transition", "requires", "validated-by" ] }, "label": { "type": "string" } }, "required": [ "from", "to", "type" ] } } }, "required": [ "nodes", "edges" ] }, "steps": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "phase": { "type": "string", "enum": [ "preflight", "bridge-addon", "control-plane", "node-pool", "data-plane", "post-upgrade", "validation" ] }, "component": { "type": "string", "enum": [ "kubernetes", "istio", "cert-manager", "ingress-nginx", "metrics-server", "postgresql", "redis" ] }, "fromVersion": { "type": "string" }, "toVersion": { "type": "string" }, "prerequisites": { "type": "array", "items": { "type": "string" } }, "reason": { "type": "string" }, "disruption": { "type": "string", "enum": [ "none", "rolling", "control-plane", "unknown" ] }, "validation": { "type": "array", "items": { "type": "string" } }, "rollback": { "type": "string" }, "commands": { "type": "array", "items": { "type": "string" } }, "verificationCommands": { "type": "array", "items": { "type": "string" } }, "rollbackCommands": { "type": "array", "items": { "type": "string" } }, "recoveryCommands": { "type": "array", "items": { "type": "string" } }, "commandStatus": { "type": "string", "enum": [ "executable", "template", "manual", "not-applicable" ] }, "rollbackStatus": { "type": "string", "enum": [ "executable", "template", "manual", "unsupported", "not-applicable" ] }, "requiredCommandInputs": { "type": "array", "items": { "type": "string" } }, "sourceIds": { "type": "array", "items": { "type": "string" } }, "target": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": [ "kubelet-group", "kube-proxy-group", "provider-addon", "istio-instance" ] }, "id": { "type": "string" }, "role": { "type": "string", "enum": [ "atomic", "control-plane", "gateway", "data-plane", "cni", "database", "cache" ] }, "providerPoolId": { "type": "string" }, "nodeNames": { "type": "array", "items": { "type": "string" } } }, "required": [ "kind", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": [ "postgresql-instance", "redis-instance" ] }, "id": { "type": "string" }, "image": { "type": "string" } }, "required": [ "kind", "id", "image" ] } ] }, "operation": { "type": "string", "enum": [ "install", "upgrade", "migrate", "cleanup" ] }, "resultingTargetId": { "type": "string" } }, "required": [ "id", "phase", "component", "prerequisites", "reason", "disruption", "validation", "rollback", "sourceIds" ] } }, "blockers": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "code": { "type": "string" }, "message": { "type": "string" }, "component": { "type": "string" }, "sourceIds": { "type": "array", "items": { "type": "string" } }, "details": { "type": "object", "additionalProperties": true } }, "required": [ "code", "message" ] } }, "warnings": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "code": { "type": "string" }, "message": { "type": "string" }, "component": { "type": "string" }, "sourceIds": { "type": "array", "items": { "type": "string" } }, "details": { "type": "object", "additionalProperties": true } }, "required": [ "code", "message" ] } }, "unmodeledContainers": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "namespace": { "type": "string" }, "workloadKind": { "type": "string" }, "workloadName": { "type": "string" }, "containerName": { "type": "string" }, "image": { "type": "string" } }, "required": [ "namespace", "workloadKind", "workloadName", "containerName", "image" ] } }, "unknownPlatformResources": { "type": "array", "description": "Unrecognized platform resources that require manual compatibility verification and do not independently block readiness.", "items": { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": [ "workload", "crd", "webhook", "api-service" ] }, "name": { "type": "string" }, "namespace": { "type": "string" } }, "required": [ "kind", "name" ] } } }, "required": [ "type", "schemaVersion", "createdAt", "validUntil", "observation", "optimizationPolicy", "readiness", "catalog", "currentState", "targetState", "detectedComponents", "graph", "steps", "blockers", "warnings", "unmodeledContainers", "unknownPlatformResources" ] }, "error": { "type": "string", "maxLength": 2048 } }, "required": [ "kind", "phase", "cluster" ] }, { "type": "object", "properties": { "prUrl": { "type": "string", "description": "The URL of the pull request." }, "ChangedFiles": { "type": "object", "additionalProperties": true, "description": "A mapping of changed file paths to their statuses." } }, "additionalProperties": false }, { "type": "object", "properties": { "staleFeatureFlags": { "type": "object", "description": "A mapping of project IDs to their stale feature flags.", "additionalProperties": true }, "apps": { "type": "array", "description": "An array of code pull requests associated with the stale feature flags.", "items": { "type": "object", "additionalProperties": false, "properties": { "branch": { "type": "string", "description": "The branch name of the pull request." }, "repositoryUrl": { "type": "string", "description": "The URL of the repository." }, "prUrl": { "type": "string", "description": "[DEPRECATED] use pr.url." }, "pullRequest": { "type": "object", "description": "Details of the pull request.", "properties": { "id": { "type": "number", "description": "The unique identifier for the pull request." }, "title": { "type": "string", "description": "The title of the pull request." }, "url": { "type": "string", "description": "The URL of the pull request." }, "body": { "type": "string", "description": "The body/description of the pull request." }, "merged": { "type": "boolean", "description": "Indicates whether the pull request has been merged." }, "state": { "type": "string", "description": "The current state of the pull request.", "enum": [ "open", "closed" ] } }, "additionalProperties": false }, "status": { "type": "string", "enum": [ "pending", "in_progress", "completed", "failed" ] }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] } } } } }, "additionalProperties": false }, { "type": "object", "description": "An object containing arbitrary key-value pairs.", "not": { "properties": { "kind": { "enum": [ "kubernetes-upgrade-planning" ] } }, "required": [ "kind" ] }, "properties": { "llmGatewaySessionId": { "description": "The LLMGateway session associated with the run.", "type": "string", "minLength": 1, "pattern": "^llms_[a-fA-F0-9]{24}$" } }, "additionalProperties": true } ] }, "inputRequests": { "type": "array", "description": "Input requests issued during the run, including any responses.", "items": { "type": "object", "discriminator": { "propertyName": "type" }, "required": [ "type" ], "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "boolean" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "trueLabel": { "type": "string" }, "falseLabel": { "type": "string" }, "response": { "type": "boolean" } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "string" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "validation": { "type": "object", "additionalProperties": false, "properties": { "pattern": { "type": "string" }, "minLength": { "type": "integer", "minimum": 0 }, "maxLength": { "type": "integer", "minimum": 0 } } }, "response": { "type": "string" } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "options" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "value": { "type": "string" }, "label": { "type": "string" } }, "required": [ "value", "label" ] } }, "response": { "type": "string" } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "optionsWithText" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "value": { "type": "string" }, "label": { "type": "string" }, "requiresText": { "type": "boolean" }, "textValidation": { "type": "object", "additionalProperties": false, "properties": { "pattern": { "type": "string" }, "minLength": { "type": "integer", "minimum": 0 }, "maxLength": { "type": "integer", "minimum": 0 } } } }, "required": [ "value", "label" ] } }, "response": { "type": "object", "additionalProperties": false, "properties": { "value": { "type": "string" }, "text": { "type": "string" } }, "required": [ "value" ] } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] } ] } } }, "required": [ "id", "organization", "status", "type" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/apps/{appId}/runs/{runId}/": { "get": { "summary": "Get a run by Id for an app", "tags": [ "Runs" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "appId", "required": true, "description": "The app Id or alternate Id." }, { "schema": { "type": "string", "pattern": "^run_[a-fA-F0-9]{24}$", "minLength": 1 }, "in": "path", "name": "runId", "required": true, "description": "The run Id." } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The unique identifier for the run.", "type": "string", "minLength": 1, "pattern": "^run_[a-fA-F0-9]{24}$" }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "^org_[a-fA-F0-9]{24}$", "description": "The unique identifier for the organization." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "status": { "type": "string", "enum": [ "pending", "queued", "running", "action_required", "succeeded", "failed", "canceled" ] }, "type": { "type": "string", "enum": [ "deployment", "generateDockerfile", "resourceCleanup", "agentCode", "agentTask", "connection" ] }, "action": { "type": "string", "enum": [ "connectionCreated", "deployContainerRevision", "deploySiteRevision", "assignDnsRecordContent", "assignBackendPoolEndpoints", "assignLoadBalancerPools" ] }, "references": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident" ], "description": "The type of the associated resource." }, "id": { "type": "string", "description": "The unique identifier of the associated resource." } }, "required": [ "type", "id" ] }, "minItems": 0 }, "workflowId": { "type": "string", "description": "The identifier of the workflow associated with the run.", "nullable": true }, "timing": { "type": "object", "additionalProperties": false, "description": "The timing information for the run execution.", "properties": { "startTime": { "type": "string", "format": "date-time", "description": "The start time of the run execution in ISO 8601 format." }, "endTime": { "type": "string", "format": "date-time", "description": "The end time of the run execution in ISO 8601 format." } }, "required": [] }, "input": { "description": "The input data for the run.", "additionalProperties": true, "type": "object" }, "data": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": [ "kubernetes-upgrade-planning" ] }, "phase": { "type": "string", "enum": [ "queued", "refreshing-inventory", "collecting-facts", "resolving-provider", "solving", "completed", "failed" ] }, "cluster": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "workflow": { "type": "object", "additionalProperties": false, "properties": { "workflowId": { "type": "string" }, "temporalRunId": { "type": "string" }, "namespace": { "type": "string" } }, "required": [ "workflowId", "temporalRunId", "namespace" ] }, "artifact": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "kubernetes-upgrade-plan" ] }, "schemaVersion": { "type": "string", "enum": [ "hyphen.kubernetes-upgrade-plan/v1" ] }, "createdAt": { "type": "string", "format": "date-time" }, "validUntil": { "type": "string", "format": "date-time" }, "observation": { "type": "object", "additionalProperties": false, "properties": { "factsSchemaVersion": { "type": "string" }, "factsCollectedAt": { "type": "string", "format": "date-time" }, "factsComplete": { "type": "boolean" } }, "required": [ "factsSchemaVersion", "factsCollectedAt", "factsComplete" ] }, "providerSnapshot": { "type": "object", "additionalProperties": false, "properties": { "provider": { "type": "string", "enum": [ "gke", "eks", "aks", "private", "unresolved" ] }, "observedAt": { "type": "string", "format": "date-time" }, "availableKubernetesVersions": { "type": "array", "items": { "type": "string" } }, "currentControlPlaneVersion": { "type": "string" }, "nodePools": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "version": { "type": "string" }, "availableVersions": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "version" ] } }, "releaseChannel": { "type": "string" }, "canonicalResourceId": { "type": "string" }, "availabilityVerified": { "type": "boolean", "description": "Whether the provider proved version availability. Private plans may be ready with false when an upstream-catalog assumption warning is present." }, "versionMetadata": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "version": { "type": "string" }, "status": { "type": "string" }, "standardSupportEndsAt": { "type": "string" }, "extendedSupportEndsAt": { "type": "string" } }, "required": [ "version", "status" ] } }, "managedAddons": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "version": { "type": "string" }, "availableVersions": { "type": "array", "items": { "type": "string" } }, "versionCompatibility": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "version": { "type": "string" }, "kubernetesVersions": { "type": "array", "items": { "type": "string" } } }, "required": [ "version", "kubernetesVersions" ] } }, "workloadNames": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "version", "availableVersions", "versionCompatibility" ] } }, "managedResources": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": [ "workload", "crd", "webhook", "api-service" ] }, "name": { "type": "string" }, "namespace": { "type": "string" } }, "required": [ "kind", "name" ] } } }, "required": [ "provider", "observedAt", "availableKubernetesVersions" ] }, "optimizationPolicy": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ] }, "readiness": { "type": "string", "enum": [ "ready", "blocked" ], "description": "Ready means no blocking issues remain; warnings, unknown platform resources, and private upstream-catalog assumptions may still require manual verification." }, "catalog": { "type": "object", "additionalProperties": false, "properties": { "schemaVersion": { "type": "string" }, "contentHash": { "type": "string" }, "importedAt": { "type": "string", "format": "date-time" } }, "required": [ "schemaVersion", "contentHash", "importedAt" ] }, "currentState": { "type": "object", "additionalProperties": false, "properties": { "kubernetesVersion": { "type": "string" }, "componentVersions": { "type": "object", "additionalProperties": false, "properties": { "istio": { "type": "string" }, "cert-manager": { "type": "string" }, "ingress-nginx": { "type": "string" }, "metrics-server": { "type": "string" } } }, "istioDataPlaneVersions": { "type": "array", "items": { "type": "string" } }, "nodeVersions": { "type": "array", "items": { "type": "string" } }, "nodeAgentGroups": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "agent": { "type": "string", "enum": [ "kubelet", "kube-proxy" ] }, "version": { "type": "string" }, "total": { "type": "number" }, "ready": { "type": "number" }, "operatingSystem": { "type": "string" }, "architecture": { "type": "string" }, "providerPoolId": { "type": "string" }, "nodeNames": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "agent", "version", "total", "ready", "operatingSystem", "architecture" ] } }, "providerAddonVersions": { "type": "object", "additionalProperties": { "type": "string" } }, "istioInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "role": { "type": "string", "enum": [ "atomic", "control-plane", "gateway", "data-plane", "cni", "database", "cache" ] }, "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "role", "instance", "version" ] } }, "postgresqlInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "instance", "version" ] } }, "redisInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "instance", "version" ] } } }, "required": [ "kubernetesVersion", "componentVersions", "nodeVersions" ] }, "targetState": { "type": "object", "additionalProperties": false, "properties": { "kubernetesVersion": { "type": "string" }, "componentVersions": { "type": "object", "additionalProperties": false, "properties": { "istio": { "type": "string" }, "cert-manager": { "type": "string" }, "ingress-nginx": { "type": "string" }, "metrics-server": { "type": "string" } } }, "istioDataPlaneVersions": { "type": "array", "items": { "type": "string" } }, "nodeVersions": { "type": "array", "items": { "type": "string" } }, "nodeAgentGroups": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "agent": { "type": "string", "enum": [ "kubelet", "kube-proxy" ] }, "version": { "type": "string" }, "total": { "type": "number" }, "ready": { "type": "number" }, "operatingSystem": { "type": "string" }, "architecture": { "type": "string" }, "providerPoolId": { "type": "string" }, "nodeNames": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "agent", "version", "total", "ready", "operatingSystem", "architecture" ] } }, "providerAddonVersions": { "type": "object", "additionalProperties": { "type": "string" } }, "istioInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "role": { "type": "string", "enum": [ "atomic", "control-plane", "gateway", "data-plane", "cni", "database", "cache" ] }, "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "role", "instance", "version" ] } }, "postgresqlInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "instance", "version" ] } }, "redisInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "instance", "version" ] } } }, "required": [ "kubernetesVersion", "componentVersions", "nodeVersions" ] }, "detectedComponents": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "component": { "type": "string", "enum": [ "istio", "cert-manager", "ingress-nginx", "metrics-server", "postgresql", "redis" ] }, "role": { "type": "string", "enum": [ "atomic", "control-plane", "gateway", "data-plane", "cni", "database", "cache" ] }, "instance": { "type": "string" }, "version": { "type": "string" }, "confidence": { "type": "string", "enum": [ "digest", "metadata", "image-tag", "conflict" ] }, "installationMethod": { "type": "string", "enum": [ "helm", "operator", "manifest", "unknown" ] }, "evidence": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "source": { "type": "string", "enum": [ "resolved-digest", "helm-metadata", "application-metadata", "image-tag", "istio-revision" ] }, "value": { "type": "string" }, "workload": { "type": "object", "additionalProperties": false, "properties": { "namespace": { "type": "string" }, "kind": { "type": "string" }, "name": { "type": "string" }, "container": { "type": "string" } }, "required": [ "namespace", "kind", "name" ] } }, "required": [ "source", "value" ] } } }, "required": [ "component", "role", "instance", "confidence", "installationMethod", "evidence" ] } }, "graph": { "type": "object", "additionalProperties": false, "properties": { "nodes": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "kind": { "type": "string", "enum": [ "state", "action", "constraint" ] }, "label": { "type": "string" }, "state": { "type": "object", "additionalProperties": false, "properties": { "kubernetesVersion": { "type": "string" }, "componentVersions": { "type": "object", "additionalProperties": false, "properties": { "istio": { "type": "string" }, "cert-manager": { "type": "string" }, "ingress-nginx": { "type": "string" }, "metrics-server": { "type": "string" } } }, "istioDataPlaneVersions": { "type": "array", "items": { "type": "string" } }, "nodeVersions": { "type": "array", "items": { "type": "string" } }, "nodeAgentGroups": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "agent": { "type": "string", "enum": [ "kubelet", "kube-proxy" ] }, "version": { "type": "string" }, "total": { "type": "number" }, "ready": { "type": "number" }, "operatingSystem": { "type": "string" }, "architecture": { "type": "string" }, "providerPoolId": { "type": "string" }, "nodeNames": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "agent", "version", "total", "ready", "operatingSystem", "architecture" ] } }, "providerAddonVersions": { "type": "object", "additionalProperties": { "type": "string" } }, "istioInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "role": { "type": "string", "enum": [ "atomic", "control-plane", "gateway", "data-plane", "cni", "database", "cache" ] }, "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "role", "instance", "version" ] } }, "postgresqlInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "instance", "version" ] } }, "redisInstances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "instance": { "type": "string" }, "version": { "type": "string" } }, "required": [ "instance", "version" ] } } }, "required": [ "kubernetesVersion", "componentVersions", "nodeVersions" ] }, "actionStepId": { "type": "string" }, "sourceIds": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "kind", "label" ] } }, "edges": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "from": { "type": "string" }, "to": { "type": "string" }, "type": { "type": "string", "enum": [ "transition", "requires", "validated-by" ] }, "label": { "type": "string" } }, "required": [ "from", "to", "type" ] } } }, "required": [ "nodes", "edges" ] }, "steps": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "phase": { "type": "string", "enum": [ "preflight", "bridge-addon", "control-plane", "node-pool", "data-plane", "post-upgrade", "validation" ] }, "component": { "type": "string", "enum": [ "kubernetes", "istio", "cert-manager", "ingress-nginx", "metrics-server", "postgresql", "redis" ] }, "fromVersion": { "type": "string" }, "toVersion": { "type": "string" }, "prerequisites": { "type": "array", "items": { "type": "string" } }, "reason": { "type": "string" }, "disruption": { "type": "string", "enum": [ "none", "rolling", "control-plane", "unknown" ] }, "validation": { "type": "array", "items": { "type": "string" } }, "rollback": { "type": "string" }, "commands": { "type": "array", "items": { "type": "string" } }, "verificationCommands": { "type": "array", "items": { "type": "string" } }, "rollbackCommands": { "type": "array", "items": { "type": "string" } }, "recoveryCommands": { "type": "array", "items": { "type": "string" } }, "commandStatus": { "type": "string", "enum": [ "executable", "template", "manual", "not-applicable" ] }, "rollbackStatus": { "type": "string", "enum": [ "executable", "template", "manual", "unsupported", "not-applicable" ] }, "requiredCommandInputs": { "type": "array", "items": { "type": "string" } }, "sourceIds": { "type": "array", "items": { "type": "string" } }, "target": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": [ "kubelet-group", "kube-proxy-group", "provider-addon", "istio-instance" ] }, "id": { "type": "string" }, "role": { "type": "string", "enum": [ "atomic", "control-plane", "gateway", "data-plane", "cni", "database", "cache" ] }, "providerPoolId": { "type": "string" }, "nodeNames": { "type": "array", "items": { "type": "string" } } }, "required": [ "kind", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": [ "postgresql-instance", "redis-instance" ] }, "id": { "type": "string" }, "image": { "type": "string" } }, "required": [ "kind", "id", "image" ] } ] }, "operation": { "type": "string", "enum": [ "install", "upgrade", "migrate", "cleanup" ] }, "resultingTargetId": { "type": "string" } }, "required": [ "id", "phase", "component", "prerequisites", "reason", "disruption", "validation", "rollback", "sourceIds" ] } }, "blockers": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "code": { "type": "string" }, "message": { "type": "string" }, "component": { "type": "string" }, "sourceIds": { "type": "array", "items": { "type": "string" } }, "details": { "type": "object", "additionalProperties": true } }, "required": [ "code", "message" ] } }, "warnings": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "code": { "type": "string" }, "message": { "type": "string" }, "component": { "type": "string" }, "sourceIds": { "type": "array", "items": { "type": "string" } }, "details": { "type": "object", "additionalProperties": true } }, "required": [ "code", "message" ] } }, "unmodeledContainers": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "namespace": { "type": "string" }, "workloadKind": { "type": "string" }, "workloadName": { "type": "string" }, "containerName": { "type": "string" }, "image": { "type": "string" } }, "required": [ "namespace", "workloadKind", "workloadName", "containerName", "image" ] } }, "unknownPlatformResources": { "type": "array", "description": "Unrecognized platform resources that require manual compatibility verification and do not independently block readiness.", "items": { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "enum": [ "workload", "crd", "webhook", "api-service" ] }, "name": { "type": "string" }, "namespace": { "type": "string" } }, "required": [ "kind", "name" ] } } }, "required": [ "type", "schemaVersion", "createdAt", "validUntil", "observation", "optimizationPolicy", "readiness", "catalog", "currentState", "targetState", "detectedComponents", "graph", "steps", "blockers", "warnings", "unmodeledContainers", "unknownPlatformResources" ] }, "error": { "type": "string", "maxLength": 2048 } }, "required": [ "kind", "phase", "cluster" ] }, { "type": "object", "properties": { "prUrl": { "type": "string", "description": "The URL of the pull request." }, "ChangedFiles": { "type": "object", "additionalProperties": true, "description": "A mapping of changed file paths to their statuses." } }, "additionalProperties": false }, { "type": "object", "properties": { "staleFeatureFlags": { "type": "object", "description": "A mapping of project IDs to their stale feature flags.", "additionalProperties": true }, "apps": { "type": "array", "description": "An array of code pull requests associated with the stale feature flags.", "items": { "type": "object", "additionalProperties": false, "properties": { "branch": { "type": "string", "description": "The branch name of the pull request." }, "repositoryUrl": { "type": "string", "description": "The URL of the repository." }, "prUrl": { "type": "string", "description": "[DEPRECATED] use pr.url." }, "pullRequest": { "type": "object", "description": "Details of the pull request.", "properties": { "id": { "type": "number", "description": "The unique identifier for the pull request." }, "title": { "type": "string", "description": "The title of the pull request." }, "url": { "type": "string", "description": "The URL of the pull request." }, "body": { "type": "string", "description": "The body/description of the pull request." }, "merged": { "type": "boolean", "description": "Indicates whether the pull request has been merged." }, "state": { "type": "string", "description": "The current state of the pull request.", "enum": [ "open", "closed" ] } }, "additionalProperties": false }, "status": { "type": "string", "enum": [ "pending", "in_progress", "completed", "failed" ] }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] } } } } }, "additionalProperties": false }, { "type": "object", "description": "An object containing arbitrary key-value pairs.", "not": { "properties": { "kind": { "enum": [ "kubernetes-upgrade-planning" ] } }, "required": [ "kind" ] }, "properties": { "llmGatewaySessionId": { "description": "The LLMGateway session associated with the run.", "type": "string", "minLength": 1, "pattern": "^llms_[a-fA-F0-9]{24}$" } }, "additionalProperties": true } ] }, "inputRequests": { "type": "array", "description": "Input requests issued during the run, including any responses.", "items": { "type": "object", "discriminator": { "propertyName": "type" }, "required": [ "type" ], "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "boolean" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "trueLabel": { "type": "string" }, "falseLabel": { "type": "string" }, "response": { "type": "boolean" } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "string" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "validation": { "type": "object", "additionalProperties": false, "properties": { "pattern": { "type": "string" }, "minLength": { "type": "integer", "minimum": 0 }, "maxLength": { "type": "integer", "minimum": 0 } } }, "response": { "type": "string" } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "options" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "value": { "type": "string" }, "label": { "type": "string" } }, "required": [ "value", "label" ] } }, "response": { "type": "string" } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "optionsWithText" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "value": { "type": "string" }, "label": { "type": "string" }, "requiresText": { "type": "boolean" }, "textValidation": { "type": "object", "additionalProperties": false, "properties": { "pattern": { "type": "string" }, "minLength": { "type": "integer", "minimum": 0 }, "maxLength": { "type": "integer", "minimum": 0 } } } }, "required": [ "value", "label" ] } }, "response": { "type": "object", "additionalProperties": false, "properties": { "value": { "type": "string" }, "text": { "type": "string" } }, "required": [ "value" ] } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] } ] } } }, "required": [ "id", "organization", "status", "type" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/billing-account/": { "get": { "summary": "Get the billing account for an organization", "tags": [ "Billing Accounts" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "Successfully got the billing account for an organization", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^bila_[a-fA-F0-9]{24}$", "description": "The billing account Id." }, "name": { "description": "The billing name.", "type": "string" }, "email": { "description": "The billing email address.", "type": "string", "format": "email" }, "phone": { "description": "The billing phone number.", "type": "string" }, "address": { "type": "object", "additionalProperties": false, "properties": { "streetAddress": { "description": "The street address.", "type": "string", "minLength": 1 }, "locality": { "description": "The city, town, or village.", "type": "string", "minLength": 1 }, "region": { "description": "The state, providence, or territory.", "type": "string", "minLength": 1 }, "postalCode": { "description": "The postal code.", "type": "string", "minLength": 1 }, "country": { "description": "The country.", "type": "string", "enum": [ "US" ] } }, "required": [ "streetAddress", "locality", "region", "postalCode", "country" ], "description": "The billing address." }, "provider": { "description": "The billing provider.", "type": "string", "enum": [ "Stripe", "Azure" ] }, "providerId": { "description": "The billing provider Id.", "type": "string" }, "paymentMethods": { "description": "The payment methods.", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "providerId": { "description": "The payment method provider Id.", "type": "string" }, "type": { "description": "The payment method type.", "type": "string", "enum": [ "Card", "ACH", "External" ] }, "last4": { "description": "The last four digits of credit card or bank account", "type": "string" }, "cardType": { "description": "The card type.", "type": "string", "enum": [ "Visa", "Amex", "Mastercard", "Discover" ] }, "expiration": { "description": "The expiration date of the card.", "type": "string" }, "isDefault": { "description": "The default payment method.", "type": "boolean" } }, "required": [ "providerId", "type" ] } }, "subscription": { "description": "The billing subscription.", "type": "object", "additionalProperties": false, "properties": { "providerId": { "description": "The subscription provider Id.", "type": "string" }, "startDate": { "description": "The subscription start date.", "type": "string", "format": "date-time" }, "status": { "description": "The subscription status.", "type": "string" }, "cycles": { "description": "The subscription cycles.", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The billing cycle Id.", "type": "number" }, "startDate": { "description": "The billing cycle start date.", "type": "string", "format": "date-time" }, "endDate": { "description": "The billing cycle end date.", "type": "string", "format": "date-time" }, "invoicePreviewAmountDue": { "description": "The billing cycle invoice preview amount due.", "type": "number" } }, "required": [ "id", "startDate", "endDate" ] } }, "isDelinquent": { "description": "Indicates if the subscription is delinquent.", "type": "boolean" } }, "required": [ "providerId", "startDate", "status" ] }, "owners": { "description": "The billing owners.", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "userId": { "description": "The user Id.", "type": "string" }, "name": { "description": "The owner full name.", "type": "string" }, "email": { "description": "The owner email address", "type": "string", "format": "email" } }, "required": [ "userId", "name", "email" ] } }, "invoices": { "description": "The billing account invoices.", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "providerId": { "description": "The invoice provider Id.", "type": "string" }, "amount": { "description": "The invoice amount.", "type": "number" }, "createdDate": { "description": "The invoice created date.", "type": "string", "format": "date-time" }, "subTotal": { "description": "The invoice sub total.", "type": "number" }, "total": { "description": "The invoice total.", "type": "number" }, "discount": { "description": "The invoice discount.", "type": "number" }, "credit": { "description": "The invoice credit.", "type": "number" }, "status": { "description": "The invoice status.", "type": "string", "enum": [ "Draft", "Open", "Paid", "Void" ] }, "periodEnd": { "description": "The invoice period end date.", "type": "string", "format": "date-time" }, "periodStart": { "description": "The invoice period start date.", "type": "string", "format": "date-time" }, "cycleId": { "description": "The invoice cycle Id.", "type": "number" }, "tax": { "description": "The invoice tax.", "type": "number" }, "dueDate": { "description": "The invoice due date.", "type": "string", "format": "date-time" } }, "required": [ "providerId", "amount", "createdDate", "subTotal", "total", "discount", "credit", "status", "periodEnd", "periodStart" ] } } }, "required": [ "id", "name", "email", "provider", "paymentMethods", "owners" ], "description": "Successfully got the billing account for an organization" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/billing-account/invoices/{invoiceProviderId}/urls": { "get": { "summary": "Get urls for invoice", "tags": [ "Billing Accounts" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string" }, "in": "path", "name": "invoiceProviderId", "required": true, "description": "The invoice provider Id." } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "http": { "type": [ "null", "string" ], "description": "URL to view the HTTP invoice" }, "pdf": { "type": [ "null", "string" ], "description": "URL to download the PDF invoice" } } } } } } } } }, "/api/organizations/{organizationId}/chat-sessions/": { "post": { "summary": "Create a new chat session for an organization", "tags": [ "Chat Sessions" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "content": { "type": "string" }, "attachmentIds": { "type": "array", "maxItems": 5, "uniqueItems": true, "items": { "type": "string", "format": "uuid" } }, "clientMessageId": { "type": "string", "format": "uuid" }, "references": { "type": "array", "maxItems": 50, "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident", "ReportRun" ] }, "id": { "type": "string" }, "reportId": { "type": "string", "format": "uuid" } }, "required": [ "type", "id" ], "oneOf": [ { "properties": { "type": { "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident" ] } } }, { "properties": { "type": { "enum": [ "ReportRun" ] }, "id": { "type": "string", "format": "uuid" } }, "required": [ "reportId" ] } ] } }, "system_instruction": { "type": "string" }, "tools": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "function" ] }, "function": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "short_description": { "type": "string" }, "description": { "type": "string" }, "parameters": { "type": "object", "additionalProperties": true } }, "required": [ "name" ] } }, "required": [ "type", "function" ] } }, "toolsets": { "type": "array", "items": { "type": "string", "enum": [ "file-system-tools", "hyphen-docs", "hyphen-resources" ] } } }, "anyOf": [ { "properties": { "content": { "type": "string", "pattern": "\\S" } }, "required": [ "content" ] }, { "properties": { "attachmentIds": { "type": "array", "minItems": 1 } }, "required": [ "attachmentIds" ] } ], "if": { "properties": { "attachmentIds": { "type": "array", "minItems": 1 } }, "required": [ "attachmentIds" ] }, "then": { "required": [ "clientMessageId" ] } } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "201": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "session": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^llms_[a-fA-F0-9]{24}$", "description": "The chat session ID." }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "ready", "requires_tool_results", "failed", "closed" ] }, "createdByMemberId": { "type": [ "null", "string" ] }, "references": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident", "ReportRun" ] }, "id": { "type": "string" }, "reportId": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "origin": { "type": "string", "enum": [ "context", "created", "observed" ] }, "messageId": { "type": "string", "minLength": 1, "pattern": "^llmm_[a-fA-F0-9]{24}$" }, "createdAt": { "type": "string", "format": "date-time" } }, "required": [ "type", "id", "origin", "createdAt" ] } }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "lastMessageAt": { "type": [ "null", "string" ], "format": "date-time" }, "lastMessagePreview": { "type": [ "null", "string" ] }, "displayMessageCount": { "type": "integer" }, "lastError": { "type": [ "null", "string" ] }, "pendingToolCalls": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "function" ] }, "function": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "arguments": { "type": "string" } }, "required": [ "name", "arguments" ] } }, "required": [ "id", "type", "function" ] } }, "activeResponder": { "type": "string", "enum": [ "agent", "support" ] }, "supportHandoffs": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "status": { "type": "string", "enum": [ "active" ] }, "startedAt": { "type": "string", "format": "date-time" }, "resolvedAt": { "type": "null" } }, "required": [ "status", "startedAt", "resolvedAt" ] }, { "type": "object", "additionalProperties": false, "properties": { "status": { "type": "string", "enum": [ "resolved" ] }, "startedAt": { "type": "string", "format": "date-time" }, "resolvedAt": { "type": "string", "format": "date-time" } }, "required": [ "status", "startedAt", "resolvedAt" ] } ] } } }, "required": [ "id", "title", "status", "createdByMemberId", "references", "createdAt", "updatedAt", "lastMessageAt", "lastMessagePreview", "displayMessageCount", "lastError", "pendingToolCalls", "activeResponder", "supportHandoffs" ] }, "message": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^llmm_[a-fA-F0-9]{24}$", "description": "The chat session message ID." }, "sessionId": { "type": "string", "minLength": 1, "pattern": "^llms_[a-fA-F0-9]{24}$" }, "role": { "type": "string", "enum": [ "user", "assistant" ] }, "content": { "type": [ "null", "string" ] }, "contentBlocks": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "text" ] }, "text": { "type": "string" } }, "required": [ "type", "text" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "datetime" ] }, "text": { "type": "string" }, "timestampIso": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" } }, "required": [ "type", "text", "timestampIso" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "entityReference" ] }, "text": { "type": "string" }, "referenceId": { "type": "string" }, "referenceType": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident", "ReportRun" ] }, "targetView": { "type": "string", "enum": [ "projectAccessSettings" ] } }, "required": [ "type", "text", "referenceId", "referenceType" ] } ] } }, "files": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "filename": { "type": "string" }, "mimeType": { "type": "string" }, "sizeBytes": { "type": "integer", "minimum": 0 }, "downloadUrl": { "type": "string" }, "expiresAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "filename", "mimeType", "downloadUrl" ] } }, "createdAt": { "type": "string", "format": "date-time" }, "references": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident", "ReportRun" ] }, "id": { "type": "string" }, "reportId": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "origin": { "type": "string", "enum": [ "context", "created", "observed" ] }, "messageId": { "type": "string", "minLength": 1, "pattern": "^llmm_[a-fA-F0-9]{24}$" }, "createdAt": { "type": "string", "format": "date-time" } }, "required": [ "type", "id", "origin", "createdAt" ] } }, "inputRequests": { "type": "array", "items": { "type": "object", "discriminator": { "propertyName": "type" }, "required": [ "type" ], "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "boolean" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "trueLabel": { "type": "string" }, "falseLabel": { "type": "string" }, "response": { "type": "boolean" } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "string" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "validation": { "type": "object", "additionalProperties": false, "properties": { "pattern": { "type": "string" }, "minLength": { "type": "integer", "minimum": 0 }, "maxLength": { "type": "integer", "minimum": 0 } } }, "response": { "type": "string" } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "options" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "value": { "type": "string" }, "label": { "type": "string" } }, "required": [ "value", "label" ] } }, "response": { "type": "string" } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "optionsWithText" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "value": { "type": "string" }, "label": { "type": "string" }, "requiresText": { "type": "boolean" }, "textValidation": { "type": "object", "additionalProperties": false, "properties": { "pattern": { "type": "string" }, "minLength": { "type": "integer", "minimum": 0 }, "maxLength": { "type": "integer", "minimum": 0 } } } }, "required": [ "value", "label" ] } }, "response": { "type": "object", "additionalProperties": false, "properties": { "value": { "type": "string" }, "text": { "type": "string" } }, "required": [ "value" ] } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] } ] } }, "toolCalls": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "function" ] }, "function": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "arguments": { "type": "string" } }, "required": [ "name", "arguments" ] } }, "required": [ "id", "type", "function" ] } }, "author": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "member", "agent", "support" ] }, "name": { "type": "string" } }, "required": [ "type" ] }, "clientMessageId": { "type": "string", "format": "uuid" } }, "required": [ "id", "sessionId", "role", "content", "createdAt", "references", "inputRequests", "toolCalls", "author" ] } }, "required": [ "session", "message" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "get": { "summary": "List chat sessions for an organization", "tags": [ "Chat Sessions" ], "parameters": [ { "schema": { "type": "integer", "minimum": 1, "default": 1 }, "in": "query", "name": "pageNum", "required": false, "description": "The page number." }, { "schema": { "type": "integer", "minimum": 5, "maximum": 200, "default": 50 }, "in": "query", "name": "pageSize", "required": false, "description": "The page size." }, { "schema": { "type": "array", "items": { "type": "string", "enum": [ "ready", "requires_tool_results", "failed", "closed" ] } }, "in": "query", "name": "status", "required": false }, { "schema": { "type": "boolean" }, "in": "query", "name": "hasCreatedReferences", "required": false }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "A paginated list of chat sessions.", "content": { "application/json": { "schema": { "description": "A paginated list of chat sessions.", "type": "object", "additionalProperties": false, "properties": { "total": { "description": "The total number of records.", "type": "number" }, "pageNum": { "description": "The page number.", "type": "number" }, "pageSize": { "description": "The page size.", "type": "number" }, "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^llms_[a-fA-F0-9]{24}$", "description": "The chat session ID." }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "ready", "requires_tool_results", "failed", "closed" ] }, "createdByMemberId": { "type": [ "null", "string" ] }, "references": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident", "ReportRun" ] }, "id": { "type": "string" }, "reportId": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "origin": { "type": "string", "enum": [ "context", "created", "observed" ] }, "messageId": { "type": "string", "minLength": 1, "pattern": "^llmm_[a-fA-F0-9]{24}$" }, "createdAt": { "type": "string", "format": "date-time" } }, "required": [ "type", "id", "origin", "createdAt" ] } }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "lastMessageAt": { "type": [ "null", "string" ], "format": "date-time" }, "lastMessagePreview": { "type": [ "null", "string" ] }, "displayMessageCount": { "type": "integer" }, "lastError": { "type": [ "null", "string" ] }, "pendingToolCalls": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "function" ] }, "function": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "arguments": { "type": "string" } }, "required": [ "name", "arguments" ] } }, "required": [ "id", "type", "function" ] } }, "activeResponder": { "type": "string", "enum": [ "agent", "support" ] }, "supportHandoffs": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "status": { "type": "string", "enum": [ "active" ] }, "startedAt": { "type": "string", "format": "date-time" }, "resolvedAt": { "type": "null" } }, "required": [ "status", "startedAt", "resolvedAt" ] }, { "type": "object", "additionalProperties": false, "properties": { "status": { "type": "string", "enum": [ "resolved" ] }, "startedAt": { "type": "string", "format": "date-time" }, "resolvedAt": { "type": "string", "format": "date-time" } }, "required": [ "status", "startedAt", "resolvedAt" ] } ] } } }, "required": [ "id", "title", "status", "createdByMemberId", "references", "createdAt", "updatedAt", "lastMessageAt", "lastMessagePreview", "displayMessageCount", "lastError", "pendingToolCalls", "activeResponder", "supportHandoffs" ] } } }, "required": [ "data", "total", "pageNum", "pageSize" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/chat-sessions/uploads": { "post": { "summary": "Upload a file for chat context", "tags": [ "Chat Sessions" ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "additionalProperties": false, "properties": { "file": { "type": "string", "format": "binary" } }, "required": [ "file" ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "201": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "uuid" }, "filename": { "type": "string" }, "mimeType": { "type": "string" }, "sizeBytes": { "type": "integer", "minimum": 1 }, "expiresAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "filename", "mimeType", "sizeBytes", "expiresAt" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "413": { "description": "The upload exceeds the file size or multipart limits.", "content": { "application/json": { "schema": { "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } }, "description": "The upload exceeds the file size or multipart limits." } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/chat-sessions/{sessionId}/files/{fileId}": { "get": { "summary": "Download a chat session file", "tags": [ "Chat Sessions" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^llms_[a-fA-F0-9]{24}$" }, "in": "path", "name": "sessionId", "required": true, "description": "The chat session ID." }, { "schema": { "type": "string", "format": "uuid" }, "in": "path", "name": "fileId", "required": true } ], "responses": { "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/chat-sessions/{sessionId}/": { "get": { "summary": "Get a chat session", "tags": [ "Chat Sessions" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^llms_[a-fA-F0-9]{24}$" }, "in": "path", "name": "sessionId", "required": true, "description": "The chat session ID." } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^llms_[a-fA-F0-9]{24}$", "description": "The chat session ID." }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "ready", "requires_tool_results", "failed", "closed" ] }, "createdByMemberId": { "type": [ "null", "string" ] }, "references": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident", "ReportRun" ] }, "id": { "type": "string" }, "reportId": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "origin": { "type": "string", "enum": [ "context", "created", "observed" ] }, "messageId": { "type": "string", "minLength": 1, "pattern": "^llmm_[a-fA-F0-9]{24}$" }, "createdAt": { "type": "string", "format": "date-time" } }, "required": [ "type", "id", "origin", "createdAt" ] } }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "lastMessageAt": { "type": [ "null", "string" ], "format": "date-time" }, "lastMessagePreview": { "type": [ "null", "string" ] }, "displayMessageCount": { "type": "integer" }, "lastError": { "type": [ "null", "string" ] }, "pendingToolCalls": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "function" ] }, "function": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "arguments": { "type": "string" } }, "required": [ "name", "arguments" ] } }, "required": [ "id", "type", "function" ] } }, "activeResponder": { "type": "string", "enum": [ "agent", "support" ] }, "supportHandoffs": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "status": { "type": "string", "enum": [ "active" ] }, "startedAt": { "type": "string", "format": "date-time" }, "resolvedAt": { "type": "null" } }, "required": [ "status", "startedAt", "resolvedAt" ] }, { "type": "object", "additionalProperties": false, "properties": { "status": { "type": "string", "enum": [ "resolved" ] }, "startedAt": { "type": "string", "format": "date-time" }, "resolvedAt": { "type": "string", "format": "date-time" } }, "required": [ "status", "startedAt", "resolvedAt" ] } ] } } }, "required": [ "id", "title", "status", "createdByMemberId", "references", "createdAt", "updatedAt", "lastMessageAt", "lastMessagePreview", "displayMessageCount", "lastError", "pendingToolCalls", "activeResponder", "supportHandoffs" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "delete": { "summary": "Close a chat session", "tags": [ "Chat Sessions" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^llms_[a-fA-F0-9]{24}$" }, "in": "path", "name": "sessionId", "required": true, "description": "The chat session ID." } ], "responses": { "204": { "description": "Successfully closed chat session" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/chat-sessions/{sessionId}/messages/": { "post": { "summary": "Send a message to an existing chat session", "tags": [ "Chat Sessions" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "not": { "anyOf": [ { "required": [ "attachmentIds", "results" ] }, { "required": [ "attachmentIds", "inputRequestResponse" ] } ] }, "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "content": { "type": "string" }, "attachmentIds": { "type": "array", "maxItems": 5, "uniqueItems": true, "items": { "type": "string", "format": "uuid" } }, "references": { "type": "array", "maxItems": 50, "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident", "ReportRun" ] }, "id": { "type": "string" }, "reportId": { "type": "string", "format": "uuid" } }, "required": [ "type", "id" ], "oneOf": [ { "properties": { "type": { "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident" ] } } }, { "properties": { "type": { "enum": [ "ReportRun" ] }, "id": { "type": "string", "format": "uuid" } }, "required": [ "reportId" ] } ] } }, "clientMessageId": { "type": "string", "format": "uuid" } }, "anyOf": [ { "properties": { "content": { "type": "string", "pattern": "\\S" } }, "required": [ "content" ] }, { "properties": { "attachmentIds": { "type": "array", "minItems": 1 } }, "required": [ "attachmentIds" ] } ], "if": { "properties": { "attachmentIds": { "type": "array", "minItems": 1 } }, "required": [ "attachmentIds" ] }, "then": { "required": [ "clientMessageId" ] } }, { "type": "object", "additionalProperties": false, "properties": { "results": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "properties": { "tool_call_id": { "type": "string" }, "output": { "anyOf": [ { "type": "object", "additionalProperties": true }, { "type": "array", "items": {} }, { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" } ] }, "error": { "type": "string" } }, "required": [ "tool_call_id" ] } } }, "required": [ "results" ] }, { "type": "object", "additionalProperties": false, "properties": { "inputRequestResponse": { "type": "object", "additionalProperties": false, "properties": { "inputRequestId": { "type": "string", "format": "ObjectId" }, "response": { "type": "object", "discriminator": { "propertyName": "type" }, "required": [ "type" ], "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "boolean" ] }, "response": { "type": "boolean" } }, "required": [ "type", "response" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "string" ] }, "response": { "type": "string" } }, "required": [ "type", "response" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "options" ] }, "response": { "type": "string", "minLength": 1 } }, "required": [ "type", "response" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "optionsWithText" ] }, "response": { "type": "object", "additionalProperties": false, "properties": { "value": { "type": "string", "minLength": 1 }, "text": { "type": "string" } }, "required": [ "value" ] } }, "required": [ "type", "response" ] } ] } }, "required": [ "inputRequestId", "response" ] } }, "required": [ "inputRequestResponse" ] } ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^llms_[a-fA-F0-9]{24}$" }, "in": "path", "name": "sessionId", "required": true, "description": "The chat session ID." } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "session": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^llms_[a-fA-F0-9]{24}$", "description": "The chat session ID." }, "title": { "type": "string" }, "status": { "type": "string", "enum": [ "ready", "requires_tool_results", "failed", "closed" ] }, "createdByMemberId": { "type": [ "null", "string" ] }, "references": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident", "ReportRun" ] }, "id": { "type": "string" }, "reportId": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "origin": { "type": "string", "enum": [ "context", "created", "observed" ] }, "messageId": { "type": "string", "minLength": 1, "pattern": "^llmm_[a-fA-F0-9]{24}$" }, "createdAt": { "type": "string", "format": "date-time" } }, "required": [ "type", "id", "origin", "createdAt" ] } }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "lastMessageAt": { "type": [ "null", "string" ], "format": "date-time" }, "lastMessagePreview": { "type": [ "null", "string" ] }, "displayMessageCount": { "type": "integer" }, "lastError": { "type": [ "null", "string" ] }, "pendingToolCalls": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "function" ] }, "function": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "arguments": { "type": "string" } }, "required": [ "name", "arguments" ] } }, "required": [ "id", "type", "function" ] } }, "activeResponder": { "type": "string", "enum": [ "agent", "support" ] }, "supportHandoffs": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "status": { "type": "string", "enum": [ "active" ] }, "startedAt": { "type": "string", "format": "date-time" }, "resolvedAt": { "type": "null" } }, "required": [ "status", "startedAt", "resolvedAt" ] }, { "type": "object", "additionalProperties": false, "properties": { "status": { "type": "string", "enum": [ "resolved" ] }, "startedAt": { "type": "string", "format": "date-time" }, "resolvedAt": { "type": "string", "format": "date-time" } }, "required": [ "status", "startedAt", "resolvedAt" ] } ] } } }, "required": [ "id", "title", "status", "createdByMemberId", "references", "createdAt", "updatedAt", "lastMessageAt", "lastMessagePreview", "displayMessageCount", "lastError", "pendingToolCalls", "activeResponder", "supportHandoffs" ] }, "message": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^llmm_[a-fA-F0-9]{24}$", "description": "The chat session message ID." }, "sessionId": { "type": "string", "minLength": 1, "pattern": "^llms_[a-fA-F0-9]{24}$" }, "role": { "type": "string", "enum": [ "user", "assistant" ] }, "content": { "type": [ "null", "string" ] }, "contentBlocks": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "text" ] }, "text": { "type": "string" } }, "required": [ "type", "text" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "datetime" ] }, "text": { "type": "string" }, "timestampIso": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" } }, "required": [ "type", "text", "timestampIso" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "entityReference" ] }, "text": { "type": "string" }, "referenceId": { "type": "string" }, "referenceType": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident", "ReportRun" ] }, "targetView": { "type": "string", "enum": [ "projectAccessSettings" ] } }, "required": [ "type", "text", "referenceId", "referenceType" ] } ] } }, "files": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "filename": { "type": "string" }, "mimeType": { "type": "string" }, "sizeBytes": { "type": "integer", "minimum": 0 }, "downloadUrl": { "type": "string" }, "expiresAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "filename", "mimeType", "downloadUrl" ] } }, "createdAt": { "type": "string", "format": "date-time" }, "references": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident", "ReportRun" ] }, "id": { "type": "string" }, "reportId": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "origin": { "type": "string", "enum": [ "context", "created", "observed" ] }, "messageId": { "type": "string", "minLength": 1, "pattern": "^llmm_[a-fA-F0-9]{24}$" }, "createdAt": { "type": "string", "format": "date-time" } }, "required": [ "type", "id", "origin", "createdAt" ] } }, "inputRequests": { "type": "array", "items": { "type": "object", "discriminator": { "propertyName": "type" }, "required": [ "type" ], "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "boolean" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "trueLabel": { "type": "string" }, "falseLabel": { "type": "string" }, "response": { "type": "boolean" } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "string" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "validation": { "type": "object", "additionalProperties": false, "properties": { "pattern": { "type": "string" }, "minLength": { "type": "integer", "minimum": 0 }, "maxLength": { "type": "integer", "minimum": 0 } } }, "response": { "type": "string" } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "options" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "value": { "type": "string" }, "label": { "type": "string" } }, "required": [ "value", "label" ] } }, "response": { "type": "string" } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "optionsWithText" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "value": { "type": "string" }, "label": { "type": "string" }, "requiresText": { "type": "boolean" }, "textValidation": { "type": "object", "additionalProperties": false, "properties": { "pattern": { "type": "string" }, "minLength": { "type": "integer", "minimum": 0 }, "maxLength": { "type": "integer", "minimum": 0 } } } }, "required": [ "value", "label" ] } }, "response": { "type": "object", "additionalProperties": false, "properties": { "value": { "type": "string" }, "text": { "type": "string" } }, "required": [ "value" ] } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] } ] } }, "toolCalls": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "function" ] }, "function": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "arguments": { "type": "string" } }, "required": [ "name", "arguments" ] } }, "required": [ "id", "type", "function" ] } }, "author": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "member", "agent", "support" ] }, "name": { "type": "string" } }, "required": [ "type" ] }, "clientMessageId": { "type": "string", "format": "uuid" } }, "required": [ "id", "sessionId", "role", "content", "createdAt", "references", "inputRequests", "toolCalls", "author" ] } }, "required": [ "session", "message" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "get": { "summary": "Get the display transcript for a chat session", "tags": [ "Chat Sessions" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^llms_[a-fA-F0-9]{24}$" }, "in": "path", "name": "sessionId", "required": true, "description": "The chat session ID." } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "sessionId": { "type": "string", "minLength": 1, "pattern": "^llms_[a-fA-F0-9]{24}$" }, "messages": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^llmm_[a-fA-F0-9]{24}$", "description": "The chat session message ID." }, "sessionId": { "type": "string", "minLength": 1, "pattern": "^llms_[a-fA-F0-9]{24}$" }, "role": { "type": "string", "enum": [ "user", "assistant" ] }, "content": { "type": [ "null", "string" ] }, "contentBlocks": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "text" ] }, "text": { "type": "string" } }, "required": [ "type", "text" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "datetime" ] }, "text": { "type": "string" }, "timestampIso": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" } }, "required": [ "type", "text", "timestampIso" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "entityReference" ] }, "text": { "type": "string" }, "referenceId": { "type": "string" }, "referenceType": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident", "ReportRun" ] }, "targetView": { "type": "string", "enum": [ "projectAccessSettings" ] } }, "required": [ "type", "text", "referenceId", "referenceType" ] } ] } }, "files": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "filename": { "type": "string" }, "mimeType": { "type": "string" }, "sizeBytes": { "type": "integer", "minimum": 0 }, "downloadUrl": { "type": "string" }, "expiresAt": { "type": "string", "format": "date-time" } }, "required": [ "id", "filename", "mimeType", "downloadUrl" ] } }, "createdAt": { "type": "string", "format": "date-time" }, "references": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident", "ReportRun" ] }, "id": { "type": "string" }, "reportId": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "origin": { "type": "string", "enum": [ "context", "created", "observed" ] }, "messageId": { "type": "string", "minLength": 1, "pattern": "^llmm_[a-fA-F0-9]{24}$" }, "createdAt": { "type": "string", "format": "date-time" } }, "required": [ "type", "id", "origin", "createdAt" ] } }, "inputRequests": { "type": "array", "items": { "type": "object", "discriminator": { "propertyName": "type" }, "required": [ "type" ], "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "boolean" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "trueLabel": { "type": "string" }, "falseLabel": { "type": "string" }, "response": { "type": "boolean" } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "string" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "validation": { "type": "object", "additionalProperties": false, "properties": { "pattern": { "type": "string" }, "minLength": { "type": "integer", "minimum": 0 }, "maxLength": { "type": "integer", "minimum": 0 } } }, "response": { "type": "string" } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "options" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "value": { "type": "string" }, "label": { "type": "string" } }, "required": [ "value", "label" ] } }, "response": { "type": "string" } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "ObjectId" }, "type": { "type": "string", "enum": [ "optionsWithText" ] }, "status": { "type": "string", "enum": [ "pending", "answered", "timedOut" ] }, "prompt": { "type": "string" }, "requestedAt": { "type": "string", "format": "date-time" }, "respondedAt": { "type": "string", "format": "date-time" }, "respondedBy": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "value": { "type": "string" }, "label": { "type": "string" }, "requiresText": { "type": "boolean" }, "textValidation": { "type": "object", "additionalProperties": false, "properties": { "pattern": { "type": "string" }, "minLength": { "type": "integer", "minimum": 0 }, "maxLength": { "type": "integer", "minimum": 0 } } } }, "required": [ "value", "label" ] } }, "response": { "type": "object", "additionalProperties": false, "properties": { "value": { "type": "string" }, "text": { "type": "string" } }, "required": [ "value" ] } }, "required": [ "id", "type", "status", "prompt", "requestedAt" ] } ] } }, "toolCalls": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "function" ] }, "function": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "arguments": { "type": "string" } }, "required": [ "name", "arguments" ] } }, "required": [ "id", "type", "function" ] } }, "author": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "member", "agent", "support" ] }, "name": { "type": "string" } }, "required": [ "type" ] }, "clientMessageId": { "type": "string", "format": "uuid" } }, "required": [ "id", "sessionId", "role", "content", "createdAt", "references", "inputRequests", "toolCalls", "author" ] } } }, "required": [ "sessionId", "messages" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/deployments/": { "get": { "summary": "Get a list of deployments for an organization", "tags": [ "Deployments" ], "parameters": [ { "schema": { "type": "integer", "minimum": 1, "default": 1 }, "in": "query", "name": "pageNum", "required": false, "description": "The page number." }, { "schema": { "type": "integer", "minimum": 5, "maximum": 200, "default": 50 }, "in": "query", "name": "pageSize", "required": false, "description": "The page size." }, { "schema": { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "The project id." }, { "type": "string", "description": "The project alternate id." } ] } }, "in": "query", "name": "projects", "required": false, "description": "The project ids to filter by." }, { "schema": { "type": "array", "items": { "anyOf": [ { "type": "string", "description": "The app id." }, { "type": "string", "description": "The app alternate id." } ] } }, "in": "query", "name": "apps", "required": false, "description": "The app ids to filter by." }, { "schema": { "type": "string" }, "in": "query", "name": "search", "required": false, "description": "The search by name, id, or alternate id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "Successfully got a list of deployments for an organization", "content": { "application/json": { "schema": { "description": "Successfully got a list of deployments for an organization", "type": "object", "additionalProperties": false, "properties": { "total": { "description": "The total number of records.", "type": "number" }, "pageNum": { "description": "The page number.", "type": "number" }, "pageSize": { "description": "The page size.", "type": "number" }, "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment Id." }, "name": { "type": "string", "description": "The name of the deployment." }, "alternateId": { "type": "string", "description": "The alternate ID of the deployment." }, "description": { "type": "string", "description": "The description of the deployment." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The environment Id.", "type": "string" }, "alternateId": { "description": "The environment alternate id. This id is set by the user and can be used to retrieve an environment.\n\nMust be unique within the project.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "name": { "description": "The environment name. Must be unique within the project.\n\nMust have a length between 1 and 100 characters.", "type": "string", "minLength": 1, "maxLength": 100 } }, "required": [ "id", "alternateId", "name" ] }, "apps": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "deploymentSettings": { "type": "object", "additionalProperties": false, "properties": { "targets": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The integration Id.", "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "description": "The organization integration type.", "type": "string" } }, "required": [ "id" ] } }, "path": { "type": "string", "description": "The path of the app." }, "hostname": { "type": "string", "description": "The hostname of the app." }, "dns": { "type": "object", "additionalProperties": false, "properties": { "zoneName": { "type": "string", "description": "The DNS zone name of the hostname." }, "zoneId": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$", "description": "The DNS zone Id." }, "recordId": { "type": "string", "minLength": 1, "pattern": "^rrec_[a-fA-F0-9]{24}$", "description": "The resource record Id." }, "recordValueId": { "type": "string", "minLength": 1, "pattern": "^rrev_[a-fA-F0-9]{24}$", "description": "The resource record value Id." } }, "required": [ "zoneName" ], "description": "The DNS settings for the app." }, "availability": { "type": "string", "enum": [ "99.000", "99.900", "99.990", "99.999" ], "description": "The availability of the app." }, "scale": { "type": "string", "enum": [ "small", "medium", "large", "extra-large" ], "description": "The scale of the app." }, "trafficRegions": { "type": "array", "items": { "type": "string", "enum": [ "na", "eu", "ap", "sa" ], "description": "The deployment region (na = North America, eu = Europe, ap = Asia/Pacific, sa = South America)." }, "minItems": 1 }, "advanced": { "type": "object", "description": "Advanced deployment settings.", "additionalProperties": false, "properties": { "scale": { "type": "object", "description": "Per-cloud-provider, per-region instance scaling overrides. Keyed by integration type (googleCloud, azure), then by RegionLocation. Overrides the Scale-derived defaults when present.", "additionalProperties": false, "properties": { "googleCloud": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } }, "azure": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } }, "aws": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } } } } } }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The project environment id." }, "alternateId": { "type": "string", "description": "The project environment alternate id." }, "name": { "type": "string", "description": "The project environment name." } }, "required": [ "id" ] } }, "required": [ "targets", "availability", "scale", "trafficRegions", "projectEnvironment" ] } }, "required": [ "app", "project" ] }, "description": "The projects associated with the deployment." }, "sites": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "deploymentSettings": { "type": "object", "additionalProperties": false, "propertyNames": { "enum": [ "targets" ] }, "properties": { "targets": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "type": "string", "enum": [ "hyphenCloud", "cloudflare" ] } }, "required": [ "id", "type" ] } } }, "required": [ "targets" ] } }, "required": [ "app", "project", "deploymentSettings" ] }, "description": "The websites associated with the deployment." }, "isReady": { "type": "boolean", "description": "Whether the deployment has all required connections ready for deployment." }, "readinessIssues": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "error": { "type": "string", "description": "The error message describing the readiness issue." }, "target": { "type": "string", "description": "The cloud provider name (e.g., AWS, Azure, Google Cloud)." }, "projectId": { "type": "string", "description": "The project ID associated with the issue." } }, "required": [ "error", "projectId" ] }, "description": "List of issues preventing the deployment from being ready." }, "previews": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^pdpl_[a-fA-F0-9]{24}$", "description": "The preview deployment id." }, "name": { "type": "string", "description": "The preview deployment name. Must be unique within the deployment.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "hostPrefix": { "type": "string", "description": "The host prefix for the preview deployment. Must be unique within the deployment.\n\nMust have a length between 1 and 25 characters.\n\nMust start and end with an alphanumeric character (a-z, 0-9).\n\nMay contain hyphens in the middle.", "minLength": 1, "maxLength": 25, "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$" }, "dns": { "type": "array", "description": "DNS records generated for this preview from the deployment app hostnames.", "items": { "type": "object", "additionalProperties": false, "properties": { "zoneName": { "type": "string", "description": "The DNS zone name of the hostname." }, "zoneId": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$", "description": "The DNS zone Id." }, "recordId": { "type": "string", "minLength": 1, "pattern": "^rrec_[a-fA-F0-9]{24}$", "description": "The resource record Id." }, "recordValueId": { "type": "string", "minLength": 1, "pattern": "^rrev_[a-fA-F0-9]{24}$", "description": "The resource record value Id." }, "appId": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" } }, "required": [ "zoneName", "zoneId", "recordId", "recordValueId", "appId" ] } } }, "required": [ "id", "name", "hostPrefix" ] }, "description": "The preview deployments associated with the deployment." }, "storage": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "object", "file" ], "description": "The storage type (object or file)." }, "target": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$", "description": "The organization integration id." }, "type": { "type": "string", "enum": [ "googleCloud", "azure", "aws" ], "description": "The cloud integration type." } }, "required": [ "id", "type" ] }, "bucketName": { "type": "string", "description": "The storage bucket name." } }, "required": [ "type", "target" ] }, "description": "The storage configurations associated with the deployment." } }, "required": [ "id", "name", "alternateId", "apps", "sites", "organization", "project", "projectEnvironment" ] } } }, "required": [ "total", "pageNum", "pageSize", "data" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "post": { "summary": "Create a new deployment", "tags": [ "Deployments" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "sites": { "type": "array", "items": { "type": "object", "additionalProperties": false, "propertyNames": { "enum": [ "app", "deploymentSettings" ] }, "properties": { "app": { "type": "object", "additionalProperties": false, "propertyNames": { "enum": [ "id" ] }, "properties": { "id": { "type": "string", "minLength": 1 } }, "required": [ "id" ] }, "deploymentSettings": { "type": "object", "additionalProperties": false, "propertyNames": { "enum": [ "targets" ] }, "properties": { "targets": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "object", "additionalProperties": false, "propertyNames": { "enum": [ "id" ] }, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" } }, "required": [ "id" ] } } }, "required": [ "targets" ] } }, "required": [ "app", "deploymentSettings" ] } }, "name": { "type": "string", "description": "The name of the deployment." }, "alternateId": { "description": "The deployment alternate id. This id is set by the user and can be used to retrieve a deployment.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the words \"test\" or \"demo\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!^(test|demo)$)[a-z0-9\\-_]+$" }, "description": { "type": "string", "description": "The description of the deployment." }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The project id or alternate ID." } }, "required": [ "id" ], "description": "The project associated with the deployment." }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The project environment id or alternate ID." } }, "required": [ "id" ], "description": "The project environment associated with the deployment." }, "apps": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The app id or alternate ID." } }, "required": [ "id" ] }, "deploymentSettings": { "type": "object", "additionalProperties": false, "properties": { "targets": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The integration Id.", "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "description": "The organization integration type.", "type": "string" } }, "required": [ "id" ] } }, "path": { "type": "string", "description": "The path of the app." }, "hostname": { "type": "string", "description": "The hostname of the app." }, "dns": { "type": "object", "additionalProperties": false, "properties": { "zoneName": { "type": "string", "description": "The DNS zone name of the hostname." }, "zoneId": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$", "description": "The DNS zone Id." }, "recordId": { "type": "string", "minLength": 1, "pattern": "^rrec_[a-fA-F0-9]{24}$", "description": "The resource record Id." }, "recordValueId": { "type": "string", "minLength": 1, "pattern": "^rrev_[a-fA-F0-9]{24}$", "description": "The resource record value Id." } }, "required": [ "zoneName" ], "description": "The DNS settings for the app." }, "availability": { "type": "string", "enum": [ "99.000", "99.900", "99.990", "99.999" ], "description": "The availability of the app." }, "scale": { "type": "string", "enum": [ "small", "medium", "large", "extra-large" ], "description": "The scale of the app." }, "trafficRegions": { "type": "array", "items": { "type": "string", "enum": [ "na", "eu", "ap", "sa" ], "description": "The deployment region (na = North America, eu = Europe, ap = Asia/Pacific, sa = South America)." }, "minItems": 1 }, "advanced": { "type": "object", "description": "Advanced deployment settings.", "additionalProperties": false, "properties": { "scale": { "type": "object", "description": "Per-cloud-provider, per-region instance scaling overrides. Keyed by integration type (googleCloud, azure), then by RegionLocation. Overrides the Scale-derived defaults when present.", "additionalProperties": false, "properties": { "googleCloud": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } }, "azure": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } }, "aws": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } } } } } } }, "required": [ "targets", "availability", "scale", "trafficRegions" ] } }, "required": [ "app" ] }, "description": "The projects associated with the deployment." }, "storage": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "object", "file" ], "description": "The storage type (object or file)." }, "target": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$", "description": "The organization integration id." }, "type": { "type": "string", "enum": [ "googleCloud", "azure", "aws" ], "description": "The cloud integration type." } }, "required": [ "id", "type" ] }, "bucketName": { "type": "string", "description": "The storage bucket name." } }, "required": [ "type", "target" ] }, "description": "The storage configurations associated with the deployment." } }, "required": [ "name", "alternateId", "project", "projectEnvironment", "apps" ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "201": { "description": "Successfully created a deployment for an organization", "content": { "application/json": { "schema": { "description": "Successfully created a deployment for an organization", "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment Id." }, "name": { "type": "string", "description": "The name of the deployment." }, "alternateId": { "type": "string", "description": "The alternate ID of the deployment." }, "description": { "type": "string", "description": "The description of the deployment." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The environment Id.", "type": "string" }, "alternateId": { "description": "The environment alternate id. This id is set by the user and can be used to retrieve an environment.\n\nMust be unique within the project.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "name": { "description": "The environment name. Must be unique within the project.\n\nMust have a length between 1 and 100 characters.", "type": "string", "minLength": 1, "maxLength": 100 } }, "required": [ "id", "alternateId", "name" ] }, "apps": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "deploymentSettings": { "type": "object", "additionalProperties": false, "properties": { "targets": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The integration Id.", "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "description": "The organization integration type.", "type": "string" } }, "required": [ "id" ] } }, "path": { "type": "string", "description": "The path of the app." }, "hostname": { "type": "string", "description": "The hostname of the app." }, "dns": { "type": "object", "additionalProperties": false, "properties": { "zoneName": { "type": "string", "description": "The DNS zone name of the hostname." }, "zoneId": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$", "description": "The DNS zone Id." }, "recordId": { "type": "string", "minLength": 1, "pattern": "^rrec_[a-fA-F0-9]{24}$", "description": "The resource record Id." }, "recordValueId": { "type": "string", "minLength": 1, "pattern": "^rrev_[a-fA-F0-9]{24}$", "description": "The resource record value Id." } }, "required": [ "zoneName" ], "description": "The DNS settings for the app." }, "availability": { "type": "string", "enum": [ "99.000", "99.900", "99.990", "99.999" ], "description": "The availability of the app." }, "scale": { "type": "string", "enum": [ "small", "medium", "large", "extra-large" ], "description": "The scale of the app." }, "trafficRegions": { "type": "array", "items": { "type": "string", "enum": [ "na", "eu", "ap", "sa" ], "description": "The deployment region (na = North America, eu = Europe, ap = Asia/Pacific, sa = South America)." }, "minItems": 1 }, "advanced": { "type": "object", "description": "Advanced deployment settings.", "additionalProperties": false, "properties": { "scale": { "type": "object", "description": "Per-cloud-provider, per-region instance scaling overrides. Keyed by integration type (googleCloud, azure), then by RegionLocation. Overrides the Scale-derived defaults when present.", "additionalProperties": false, "properties": { "googleCloud": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } }, "azure": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } }, "aws": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } } } } } }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The project environment id." }, "alternateId": { "type": "string", "description": "The project environment alternate id." }, "name": { "type": "string", "description": "The project environment name." } }, "required": [ "id" ] } }, "required": [ "targets", "availability", "scale", "trafficRegions", "projectEnvironment" ] } }, "required": [ "app", "project" ] }, "description": "The projects associated with the deployment." }, "sites": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "deploymentSettings": { "type": "object", "additionalProperties": false, "propertyNames": { "enum": [ "targets" ] }, "properties": { "targets": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "type": "string", "enum": [ "hyphenCloud", "cloudflare" ] } }, "required": [ "id", "type" ] } } }, "required": [ "targets" ] } }, "required": [ "app", "project", "deploymentSettings" ] }, "description": "The websites associated with the deployment." }, "isReady": { "type": "boolean", "description": "Whether the deployment has all required connections ready for deployment." }, "readinessIssues": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "error": { "type": "string", "description": "The error message describing the readiness issue." }, "target": { "type": "string", "description": "The cloud provider name (e.g., AWS, Azure, Google Cloud)." }, "projectId": { "type": "string", "description": "The project ID associated with the issue." } }, "required": [ "error", "projectId" ] }, "description": "List of issues preventing the deployment from being ready." }, "previews": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^pdpl_[a-fA-F0-9]{24}$", "description": "The preview deployment id." }, "name": { "type": "string", "description": "The preview deployment name. Must be unique within the deployment.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "hostPrefix": { "type": "string", "description": "The host prefix for the preview deployment. Must be unique within the deployment.\n\nMust have a length between 1 and 25 characters.\n\nMust start and end with an alphanumeric character (a-z, 0-9).\n\nMay contain hyphens in the middle.", "minLength": 1, "maxLength": 25, "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$" }, "dns": { "type": "array", "description": "DNS records generated for this preview from the deployment app hostnames.", "items": { "type": "object", "additionalProperties": false, "properties": { "zoneName": { "type": "string", "description": "The DNS zone name of the hostname." }, "zoneId": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$", "description": "The DNS zone Id." }, "recordId": { "type": "string", "minLength": 1, "pattern": "^rrec_[a-fA-F0-9]{24}$", "description": "The resource record Id." }, "recordValueId": { "type": "string", "minLength": 1, "pattern": "^rrev_[a-fA-F0-9]{24}$", "description": "The resource record value Id." }, "appId": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" } }, "required": [ "zoneName", "zoneId", "recordId", "recordValueId", "appId" ] } } }, "required": [ "id", "name", "hostPrefix" ] }, "description": "The preview deployments associated with the deployment." }, "storage": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "object", "file" ], "description": "The storage type (object or file)." }, "target": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$", "description": "The organization integration id." }, "type": { "type": "string", "enum": [ "googleCloud", "azure", "aws" ], "description": "The cloud integration type." } }, "required": [ "id", "type" ] }, "bucketName": { "type": "string", "description": "The storage bucket name." } }, "required": [ "type", "target" ] }, "description": "The storage configurations associated with the deployment." } }, "required": [ "id", "name", "alternateId", "apps", "sites", "organization", "project", "projectEnvironment" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/deployments/containerRegistries": { "get": { "summary": "Get the list of container registries", "tags": [ "Deployments" ], "parameters": [ { "schema": { "type": "string" }, "in": "query", "name": "projectId", "required": false, "description": "The project id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "The container registry connections for the organization", "content": { "application/json": { "schema": { "type": "array", "description": "The container registry connections for the organization", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The connection id." }, "name": { "type": "string", "description": "The connection name." }, "url": { "type": "string", "description": "The container registry URL." }, "auth": { "type": "object", "additionalProperties": false, "properties": { "server": { "type": "string", "description": "The container registry server." }, "username": { "type": "string", "description": "The username for the container registry." }, "password": { "type": "string", "description": "The password for the container registry." } } }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The project environment id." }, "alternateId": { "type": "string", "description": "The project environment alternate id." }, "name": { "type": "string", "description": "The project environment name." } } } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/deployments/{deploymentId}": { "get": { "summary": "Get a deployment by id", "tags": [ "Deployments" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "deploymentId", "required": true, "description": "The deployment Id or alternate Id." } ], "responses": { "200": { "description": "Successfully got deployment for an organization", "content": { "application/json": { "schema": { "description": "Successfully got deployment for an organization", "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment Id." }, "name": { "type": "string", "description": "The name of the deployment." }, "alternateId": { "type": "string", "description": "The alternate ID of the deployment." }, "description": { "type": "string", "description": "The description of the deployment." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The environment Id.", "type": "string" }, "alternateId": { "description": "The environment alternate id. This id is set by the user and can be used to retrieve an environment.\n\nMust be unique within the project.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "name": { "description": "The environment name. Must be unique within the project.\n\nMust have a length between 1 and 100 characters.", "type": "string", "minLength": 1, "maxLength": 100 } }, "required": [ "id", "alternateId", "name" ] }, "apps": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "deploymentSettings": { "type": "object", "additionalProperties": false, "properties": { "targets": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The integration Id.", "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "description": "The organization integration type.", "type": "string" } }, "required": [ "id" ] } }, "path": { "type": "string", "description": "The path of the app." }, "hostname": { "type": "string", "description": "The hostname of the app." }, "dns": { "type": "object", "additionalProperties": false, "properties": { "zoneName": { "type": "string", "description": "The DNS zone name of the hostname." }, "zoneId": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$", "description": "The DNS zone Id." }, "recordId": { "type": "string", "minLength": 1, "pattern": "^rrec_[a-fA-F0-9]{24}$", "description": "The resource record Id." }, "recordValueId": { "type": "string", "minLength": 1, "pattern": "^rrev_[a-fA-F0-9]{24}$", "description": "The resource record value Id." } }, "required": [ "zoneName" ], "description": "The DNS settings for the app." }, "availability": { "type": "string", "enum": [ "99.000", "99.900", "99.990", "99.999" ], "description": "The availability of the app." }, "scale": { "type": "string", "enum": [ "small", "medium", "large", "extra-large" ], "description": "The scale of the app." }, "trafficRegions": { "type": "array", "items": { "type": "string", "enum": [ "na", "eu", "ap", "sa" ], "description": "The deployment region (na = North America, eu = Europe, ap = Asia/Pacific, sa = South America)." }, "minItems": 1 }, "advanced": { "type": "object", "description": "Advanced deployment settings.", "additionalProperties": false, "properties": { "scale": { "type": "object", "description": "Per-cloud-provider, per-region instance scaling overrides. Keyed by integration type (googleCloud, azure), then by RegionLocation. Overrides the Scale-derived defaults when present.", "additionalProperties": false, "properties": { "googleCloud": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } }, "azure": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } }, "aws": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } } } } } }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The project environment id." }, "alternateId": { "type": "string", "description": "The project environment alternate id." }, "name": { "type": "string", "description": "The project environment name." } }, "required": [ "id" ] } }, "required": [ "targets", "availability", "scale", "trafficRegions", "projectEnvironment" ] } }, "required": [ "app", "project" ] }, "description": "The projects associated with the deployment." }, "sites": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "deploymentSettings": { "type": "object", "additionalProperties": false, "propertyNames": { "enum": [ "targets" ] }, "properties": { "targets": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "type": "string", "enum": [ "hyphenCloud", "cloudflare" ] } }, "required": [ "id", "type" ] } } }, "required": [ "targets" ] } }, "required": [ "app", "project", "deploymentSettings" ] }, "description": "The websites associated with the deployment." }, "isReady": { "type": "boolean", "description": "Whether the deployment has all required connections ready for deployment." }, "readinessIssues": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "error": { "type": "string", "description": "The error message describing the readiness issue." }, "target": { "type": "string", "description": "The cloud provider name (e.g., AWS, Azure, Google Cloud)." }, "projectId": { "type": "string", "description": "The project ID associated with the issue." } }, "required": [ "error", "projectId" ] }, "description": "List of issues preventing the deployment from being ready." }, "previews": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^pdpl_[a-fA-F0-9]{24}$", "description": "The preview deployment id." }, "name": { "type": "string", "description": "The preview deployment name. Must be unique within the deployment.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "hostPrefix": { "type": "string", "description": "The host prefix for the preview deployment. Must be unique within the deployment.\n\nMust have a length between 1 and 25 characters.\n\nMust start and end with an alphanumeric character (a-z, 0-9).\n\nMay contain hyphens in the middle.", "minLength": 1, "maxLength": 25, "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$" }, "dns": { "type": "array", "description": "DNS records generated for this preview from the deployment app hostnames.", "items": { "type": "object", "additionalProperties": false, "properties": { "zoneName": { "type": "string", "description": "The DNS zone name of the hostname." }, "zoneId": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$", "description": "The DNS zone Id." }, "recordId": { "type": "string", "minLength": 1, "pattern": "^rrec_[a-fA-F0-9]{24}$", "description": "The resource record Id." }, "recordValueId": { "type": "string", "minLength": 1, "pattern": "^rrev_[a-fA-F0-9]{24}$", "description": "The resource record value Id." }, "appId": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" } }, "required": [ "zoneName", "zoneId", "recordId", "recordValueId", "appId" ] } } }, "required": [ "id", "name", "hostPrefix" ] }, "description": "The preview deployments associated with the deployment." }, "storage": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "object", "file" ], "description": "The storage type (object or file)." }, "target": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$", "description": "The organization integration id." }, "type": { "type": "string", "enum": [ "googleCloud", "azure", "aws" ], "description": "The cloud integration type." } }, "required": [ "id", "type" ] }, "bucketName": { "type": "string", "description": "The storage bucket name." } }, "required": [ "type", "target" ] }, "description": "The storage configurations associated with the deployment." } }, "required": [ "id", "name", "alternateId", "apps", "sites", "organization", "project", "projectEnvironment" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "patch": { "summary": "Update a deployment by id", "tags": [ "Deployments" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "sites": { "type": "array", "items": { "type": "object", "additionalProperties": false, "propertyNames": { "enum": [ "app", "deploymentSettings" ] }, "properties": { "app": { "type": "object", "additionalProperties": false, "propertyNames": { "enum": [ "id" ] }, "properties": { "id": { "type": "string", "minLength": 1 } }, "required": [ "id" ] }, "deploymentSettings": { "type": "object", "additionalProperties": false, "propertyNames": { "enum": [ "targets" ] }, "properties": { "targets": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "object", "additionalProperties": false, "propertyNames": { "enum": [ "id" ] }, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" } }, "required": [ "id" ] } } }, "required": [ "targets" ] } }, "required": [ "app", "deploymentSettings" ] } }, "name": { "type": "string", "description": "The name of the deployment." }, "description": { "type": "string", "description": "The description of the deployment." }, "apps": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The app id or alternate ID." }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id" ] }, "deploymentSettings": { "type": "object", "additionalProperties": false, "properties": { "targets": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The integration Id.", "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "description": "The organization integration type.", "type": "string" } }, "required": [ "id" ] } }, "path": { "type": "string", "description": "The path of the app." }, "hostname": { "type": "string", "description": "The hostname of the app." }, "dns": { "type": "object", "additionalProperties": false, "properties": { "zoneName": { "type": "string", "description": "The DNS zone name of the hostname." }, "zoneId": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$", "description": "The DNS zone Id." }, "recordId": { "type": "string", "minLength": 1, "pattern": "^rrec_[a-fA-F0-9]{24}$", "description": "The resource record Id." }, "recordValueId": { "type": "string", "minLength": 1, "pattern": "^rrev_[a-fA-F0-9]{24}$", "description": "The resource record value Id." } }, "required": [ "zoneName" ], "description": "The DNS settings for the app." }, "availability": { "type": "string", "enum": [ "99.000", "99.900", "99.990", "99.999" ], "description": "The availability of the app." }, "scale": { "type": "string", "enum": [ "small", "medium", "large", "extra-large" ], "description": "The scale of the app." }, "trafficRegions": { "type": "array", "items": { "type": "string", "enum": [ "na", "eu", "ap", "sa" ], "description": "The deployment region (na = North America, eu = Europe, ap = Asia/Pacific, sa = South America)." }, "minItems": 1 }, "advanced": { "type": "object", "description": "Advanced deployment settings.", "additionalProperties": false, "properties": { "scale": { "type": "object", "description": "Per-cloud-provider, per-region instance scaling overrides. Keyed by integration type (googleCloud, azure), then by RegionLocation. Overrides the Scale-derived defaults when present.", "additionalProperties": false, "properties": { "googleCloud": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } }, "azure": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } }, "aws": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } } } } } } }, "required": [ "targets", "availability", "scale", "trafficRegions" ] } }, "required": [ "app" ] }, "description": "The apps associated with the deployment." }, "storage": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "object", "file" ], "description": "The storage type (object or file)." }, "target": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$", "description": "The organization integration id." }, "type": { "type": "string", "enum": [ "googleCloud", "azure", "aws" ], "description": "The cloud integration type." } }, "required": [ "id", "type" ] }, "bucketName": { "type": "string", "description": "The storage bucket name." } }, "required": [ "type", "target" ] }, "description": "The storage configurations associated with the deployment." } } } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "deploymentId", "required": true, "description": "The deployment Id or alternate Id." } ], "responses": { "200": { "description": "Successfully updated deployment for an organization", "content": { "application/json": { "schema": { "description": "Successfully updated deployment for an organization", "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment Id." }, "name": { "type": "string", "description": "The name of the deployment." }, "alternateId": { "type": "string", "description": "The alternate ID of the deployment." }, "description": { "type": "string", "description": "The description of the deployment." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The environment Id.", "type": "string" }, "alternateId": { "description": "The environment alternate id. This id is set by the user and can be used to retrieve an environment.\n\nMust be unique within the project.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "name": { "description": "The environment name. Must be unique within the project.\n\nMust have a length between 1 and 100 characters.", "type": "string", "minLength": 1, "maxLength": 100 } }, "required": [ "id", "alternateId", "name" ] }, "apps": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "deploymentSettings": { "type": "object", "additionalProperties": false, "properties": { "targets": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The integration Id.", "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "description": "The organization integration type.", "type": "string" } }, "required": [ "id" ] } }, "path": { "type": "string", "description": "The path of the app." }, "hostname": { "type": "string", "description": "The hostname of the app." }, "dns": { "type": "object", "additionalProperties": false, "properties": { "zoneName": { "type": "string", "description": "The DNS zone name of the hostname." }, "zoneId": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$", "description": "The DNS zone Id." }, "recordId": { "type": "string", "minLength": 1, "pattern": "^rrec_[a-fA-F0-9]{24}$", "description": "The resource record Id." }, "recordValueId": { "type": "string", "minLength": 1, "pattern": "^rrev_[a-fA-F0-9]{24}$", "description": "The resource record value Id." } }, "required": [ "zoneName" ], "description": "The DNS settings for the app." }, "availability": { "type": "string", "enum": [ "99.000", "99.900", "99.990", "99.999" ], "description": "The availability of the app." }, "scale": { "type": "string", "enum": [ "small", "medium", "large", "extra-large" ], "description": "The scale of the app." }, "trafficRegions": { "type": "array", "items": { "type": "string", "enum": [ "na", "eu", "ap", "sa" ], "description": "The deployment region (na = North America, eu = Europe, ap = Asia/Pacific, sa = South America)." }, "minItems": 1 }, "advanced": { "type": "object", "description": "Advanced deployment settings.", "additionalProperties": false, "properties": { "scale": { "type": "object", "description": "Per-cloud-provider, per-region instance scaling overrides. Keyed by integration type (googleCloud, azure), then by RegionLocation. Overrides the Scale-derived defaults when present.", "additionalProperties": false, "properties": { "googleCloud": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } }, "azure": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } }, "aws": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } } } } } }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The project environment id." }, "alternateId": { "type": "string", "description": "The project environment alternate id." }, "name": { "type": "string", "description": "The project environment name." } }, "required": [ "id" ] } }, "required": [ "targets", "availability", "scale", "trafficRegions", "projectEnvironment" ] } }, "required": [ "app", "project" ] }, "description": "The projects associated with the deployment." }, "sites": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "deploymentSettings": { "type": "object", "additionalProperties": false, "propertyNames": { "enum": [ "targets" ] }, "properties": { "targets": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "type": "string", "enum": [ "hyphenCloud", "cloudflare" ] } }, "required": [ "id", "type" ] } } }, "required": [ "targets" ] } }, "required": [ "app", "project", "deploymentSettings" ] }, "description": "The websites associated with the deployment." }, "isReady": { "type": "boolean", "description": "Whether the deployment has all required connections ready for deployment." }, "readinessIssues": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "error": { "type": "string", "description": "The error message describing the readiness issue." }, "target": { "type": "string", "description": "The cloud provider name (e.g., AWS, Azure, Google Cloud)." }, "projectId": { "type": "string", "description": "The project ID associated with the issue." } }, "required": [ "error", "projectId" ] }, "description": "List of issues preventing the deployment from being ready." }, "previews": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^pdpl_[a-fA-F0-9]{24}$", "description": "The preview deployment id." }, "name": { "type": "string", "description": "The preview deployment name. Must be unique within the deployment.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "hostPrefix": { "type": "string", "description": "The host prefix for the preview deployment. Must be unique within the deployment.\n\nMust have a length between 1 and 25 characters.\n\nMust start and end with an alphanumeric character (a-z, 0-9).\n\nMay contain hyphens in the middle.", "minLength": 1, "maxLength": 25, "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$" }, "dns": { "type": "array", "description": "DNS records generated for this preview from the deployment app hostnames.", "items": { "type": "object", "additionalProperties": false, "properties": { "zoneName": { "type": "string", "description": "The DNS zone name of the hostname." }, "zoneId": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$", "description": "The DNS zone Id." }, "recordId": { "type": "string", "minLength": 1, "pattern": "^rrec_[a-fA-F0-9]{24}$", "description": "The resource record Id." }, "recordValueId": { "type": "string", "minLength": 1, "pattern": "^rrev_[a-fA-F0-9]{24}$", "description": "The resource record value Id." }, "appId": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" } }, "required": [ "zoneName", "zoneId", "recordId", "recordValueId", "appId" ] } } }, "required": [ "id", "name", "hostPrefix" ] }, "description": "The preview deployments associated with the deployment." }, "storage": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "object", "file" ], "description": "The storage type (object or file)." }, "target": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$", "description": "The organization integration id." }, "type": { "type": "string", "enum": [ "googleCloud", "azure", "aws" ], "description": "The cloud integration type." } }, "required": [ "id", "type" ] }, "bucketName": { "type": "string", "description": "The storage bucket name." } }, "required": [ "type", "target" ] }, "description": "The storage configurations associated with the deployment." } }, "required": [ "id", "name", "alternateId", "apps", "sites", "organization", "project", "projectEnvironment" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "delete": { "summary": "Delete a deployment", "tags": [ "Deployments" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "deploymentId", "required": true, "description": "The deployment Id or alternate Id." } ], "responses": { "204": { "description": "Successfully deleted deployment" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/deployments/{deploymentId}/previews/": { "post": { "summary": "Create a new preview deployment", "tags": [ "Deployments" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "The preview deployment name. Must be unique within the deployment.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "hostPrefix": { "type": "string", "description": "The host prefix for the preview deployment. Must be unique within the deployment.\n\nMust have a length between 1 and 25 characters.\n\nMust start and end with an alphanumeric character (a-z, 0-9).\n\nMay contain hyphens in the middle.", "minLength": 1, "maxLength": 25, "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$" } }, "required": [ "name", "hostPrefix" ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "deploymentId", "required": true, "description": "The deployment Id or alternate Id." } ], "responses": { "200": { "description": "Successfully created a preview deployment", "content": { "application/json": { "schema": { "description": "Successfully created a preview deployment", "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^pdpl_[a-fA-F0-9]{24}$", "description": "The preview deployment id." }, "name": { "type": "string", "description": "The preview deployment name. Must be unique within the deployment.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "hostPrefix": { "type": "string", "description": "The host prefix for the preview deployment. Must be unique within the deployment.\n\nMust have a length between 1 and 25 characters.\n\nMust start and end with an alphanumeric character (a-z, 0-9).\n\nMay contain hyphens in the middle.", "minLength": 1, "maxLength": 25, "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$" }, "dns": { "type": "array", "description": "DNS records generated for this preview from the deployment app hostnames.", "items": { "type": "object", "additionalProperties": false, "properties": { "zoneName": { "type": "string", "description": "The DNS zone name of the hostname." }, "zoneId": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$", "description": "The DNS zone Id." }, "recordId": { "type": "string", "minLength": 1, "pattern": "^rrec_[a-fA-F0-9]{24}$", "description": "The resource record Id." }, "recordValueId": { "type": "string", "minLength": 1, "pattern": "^rrev_[a-fA-F0-9]{24}$", "description": "The resource record value Id." }, "appId": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" } }, "required": [ "zoneName", "zoneId", "recordId", "recordValueId", "appId" ] } } }, "required": [ "id", "name", "hostPrefix" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/deployments/{deploymentId}/previews/{previewId}": { "delete": { "summary": "Delete a preview deployment", "tags": [ "Deployments" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "deploymentId", "required": true, "description": "The deployment Id or alternate Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "previewId", "required": true, "description": "The preview Id or name." } ], "responses": { "204": { "description": "Successfully deleted preview deployment" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/deployments/{deploymentId}/runs/": { "get": { "summary": "Get a list of runs for a deployment", "tags": [ "Deployments" ], "parameters": [ { "schema": { "type": "integer", "minimum": 1, "default": 1 }, "in": "query", "name": "pageNum", "required": false, "description": "The page number." }, { "schema": { "type": "integer", "minimum": 5, "maximum": 200, "default": 50 }, "in": "query", "name": "pageSize", "required": false, "description": "The page size." }, { "schema": { "type": "string", "minLength": 1 }, "in": "query", "name": "previewId", "required": false, "description": "The preview Id or name." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "deploymentId", "required": true, "description": "The deployment Id or alternate Id." } ], "responses": { "200": { "description": "Successfully got a list of deployment runs for an organization", "content": { "application/json": { "schema": { "description": "Successfully got a list of deployment runs for an organization", "type": "object", "additionalProperties": false, "properties": { "total": { "description": "The total number of records.", "type": "number" }, "pageNum": { "description": "The page number.", "type": "number" }, "pageSize": { "description": "The page size.", "type": "number" }, "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The ID of the run." }, "status": { "type": "string", "description": "The status of the run.", "enum": [ "creating", "queued", "pending", "running", "succeeded", "failed", "canceling", "canceled" ] }, "timing": { "type": "object", "additionalProperties": false, "properties": { "startTime": { "type": "string", "format": "date-time", "description": "The start time of the task." }, "endTime": { "type": "string", "format": "date-time", "description": "The end time of the task." } } }, "deploymentId": { "type": "string", "description": "The ID of the deployment." }, "previewId": { "type": "string", "minLength": 1, "pattern": "^pdpl_[a-fA-F0-9]{24}$" }, "triggeredBy": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "optimizer" ], "description": "The system that triggered the deployment run." }, "runId": { "type": "string", "minLength": 1, "pattern": "^run_[a-fA-F0-9]{24}$" } }, "required": [ "type" ] }, "deploymentSnapshot": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment Id." }, "name": { "type": "string", "description": "The name of the deployment." }, "alternateId": { "type": "string", "description": "The alternate ID of the deployment." }, "description": { "type": "string", "description": "The description of the deployment." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The environment Id.", "type": "string" }, "alternateId": { "description": "The environment alternate id. This id is set by the user and can be used to retrieve an environment.\n\nMust be unique within the project.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "name": { "description": "The environment name. Must be unique within the project.\n\nMust have a length between 1 and 100 characters.", "type": "string", "minLength": 1, "maxLength": 100 } }, "required": [ "id", "alternateId", "name" ] }, "apps": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "deploymentSettings": { "type": "object", "additionalProperties": false, "properties": { "targets": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The integration Id.", "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "description": "The organization integration type.", "type": "string" } }, "required": [ "id" ] } }, "path": { "type": "string", "description": "The path of the app." }, "hostname": { "type": "string", "description": "The hostname of the app." }, "dns": { "type": "object", "additionalProperties": false, "properties": { "zoneName": { "type": "string", "description": "The DNS zone name of the hostname." }, "zoneId": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$", "description": "The DNS zone Id." }, "recordId": { "type": "string", "minLength": 1, "pattern": "^rrec_[a-fA-F0-9]{24}$", "description": "The resource record Id." }, "recordValueId": { "type": "string", "minLength": 1, "pattern": "^rrev_[a-fA-F0-9]{24}$", "description": "The resource record value Id." } }, "required": [ "zoneName" ], "description": "The DNS settings for the app." }, "availability": { "type": "string", "enum": [ "99.000", "99.900", "99.990", "99.999" ], "description": "The availability of the app." }, "scale": { "type": "string", "enum": [ "small", "medium", "large", "extra-large" ], "description": "The scale of the app." }, "trafficRegions": { "type": "array", "items": { "type": "string", "enum": [ "na", "eu", "ap", "sa" ], "description": "The deployment region (na = North America, eu = Europe, ap = Asia/Pacific, sa = South America)." }, "minItems": 1 }, "advanced": { "type": "object", "description": "Advanced deployment settings.", "additionalProperties": false, "properties": { "scale": { "type": "object", "description": "Per-cloud-provider, per-region instance scaling overrides. Keyed by integration type (googleCloud, azure), then by RegionLocation. Overrides the Scale-derived defaults when present.", "additionalProperties": false, "properties": { "googleCloud": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } }, "azure": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } }, "aws": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } } } } } }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The project environment id." }, "alternateId": { "type": "string", "description": "The project environment alternate id." }, "name": { "type": "string", "description": "The project environment name." } }, "required": [ "id" ] } }, "required": [ "targets", "availability", "scale", "trafficRegions", "projectEnvironment" ] } }, "required": [ "app", "project" ] }, "description": "The projects associated with the deployment." }, "sites": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "deploymentSettings": { "type": "object", "additionalProperties": false, "propertyNames": { "enum": [ "targets" ] }, "properties": { "targets": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "type": "string", "enum": [ "hyphenCloud", "cloudflare" ] } }, "required": [ "id", "type" ] } } }, "required": [ "targets" ] } }, "required": [ "app", "project", "deploymentSettings" ] }, "description": "The websites associated with the deployment." }, "isReady": { "type": "boolean", "description": "Whether the deployment has all required connections ready for deployment." }, "readinessIssues": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "error": { "type": "string", "description": "The error message describing the readiness issue." }, "target": { "type": "string", "description": "The cloud provider name (e.g., AWS, Azure, Google Cloud)." }, "projectId": { "type": "string", "description": "The project ID associated with the issue." } }, "required": [ "error", "projectId" ] }, "description": "List of issues preventing the deployment from being ready." }, "previews": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^pdpl_[a-fA-F0-9]{24}$", "description": "The preview deployment id." }, "name": { "type": "string", "description": "The preview deployment name. Must be unique within the deployment.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "hostPrefix": { "type": "string", "description": "The host prefix for the preview deployment. Must be unique within the deployment.\n\nMust have a length between 1 and 25 characters.\n\nMust start and end with an alphanumeric character (a-z, 0-9).\n\nMay contain hyphens in the middle.", "minLength": 1, "maxLength": 25, "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$" }, "dns": { "type": "array", "description": "DNS records generated for this preview from the deployment app hostnames.", "items": { "type": "object", "additionalProperties": false, "properties": { "zoneName": { "type": "string", "description": "The DNS zone name of the hostname." }, "zoneId": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$", "description": "The DNS zone Id." }, "recordId": { "type": "string", "minLength": 1, "pattern": "^rrec_[a-fA-F0-9]{24}$", "description": "The resource record Id." }, "recordValueId": { "type": "string", "minLength": 1, "pattern": "^rrev_[a-fA-F0-9]{24}$", "description": "The resource record value Id." }, "appId": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" } }, "required": [ "zoneName", "zoneId", "recordId", "recordValueId", "appId" ] } } }, "required": [ "id", "name", "hostPrefix" ] }, "description": "The preview deployments associated with the deployment." }, "storage": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "object", "file" ], "description": "The storage type (object or file)." }, "target": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$", "description": "The organization integration id." }, "type": { "type": "string", "enum": [ "googleCloud", "azure", "aws" ], "description": "The cloud integration type." } }, "required": [ "id", "type" ] }, "bucketName": { "type": "string", "description": "The storage bucket name." } }, "required": [ "type", "target" ] }, "description": "The storage configurations associated with the deployment." } }, "required": [ "id", "name", "alternateId", "apps", "sites", "organization", "project", "projectEnvironment" ] }, "appsSnapshot": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 }, "settings": { "description": "The app settings.", "type": "object", "properties": { "env": { "type": "object", "properties": { "accessControls": { "type": "object", "properties": { "allow": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } }, "deny": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } }, "environments": { "type": "object", "additionalProperties": { "type": "object", "properties": { "allow": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } }, "deny": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } } }, "additionalProperties": false } } }, "additionalProperties": false } }, "additionalProperties": false }, "deploy": { "type": "object", "properties": { "healthChecks": { "type": "object", "properties": { "startup": { "type": "object", "properties": { "path": { "type": "string" }, "headers": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "string" } }, "required": [ "name", "value" ], "additionalProperties": false } } }, "required": [ "path" ], "additionalProperties": false }, "liveness": { "type": "object", "properties": { "path": { "type": "string" }, "headers": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "string" } }, "required": [ "name", "value" ], "additionalProperties": false } } }, "required": [ "path" ], "additionalProperties": false } } } }, "additionalProperties": false } }, "additionalProperties": false }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "example": "2024-07-08T15:58:34.219+00:00" }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "example": "2024-07-08T15:58:34.219+00:00" }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "example": "2024-07-08T15:58:34.219+00:00" }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "id", "alternateId", "name", "organization", "project", "meta" ], "example": { "id": "app_66bf99b72a0043f841769880", "alternateId": "my-app", "name": "My App", "settings": { "env": { "accessControls": { "environments": { "production": { "allow": [ { "description": "Prod servers", "type": "cidr", "cidr": "10.10.0.0/16" } ], "deny": [ { "description": "Block all", "type": "cidr", "cidr": "0.0.0.0/0" } ] } } } } }, "organization": { "id": "org_66bf99b72a0043f841769880", "name": "My Org" }, "project": { "id": "proj_66bf99b72a0043f841769880", "alternateId": "my-project", "name": "My Project" }, "meta": { "createdAt": "2025-01-14T22:56:14.234Z", "createdBy": "memb_66f30abb67ebc6bb0c5e0af9" } } }, "description": "A snapshot of the apps at the time of the deployment run." }, "artifacts": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "appId": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "buildId": { "type": "string", "minLength": 1, "pattern": "^abld_[a-fA-F0-9]{24}$" }, "artifacts": { "type": "array", "minItems": 1, "items": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of the artifact.", "enum": [ "Docker" ] }, "target": { "type": "string", "description": "The target of the artifact.", "enum": [ "googleCloud", "azure", "aws" ] }, "ports": { "type": "array", "description": "The ports exposed by the artifact.", "items": { "type": "integer" }, "minItems": 0 }, "image": { "type": "object", "additionalProperties": false, "properties": { "uri": { "type": "string", "description": "The uri of the image." } }, "required": [ "uri" ] } }, "required": [ "type", "image" ] }, { "type": "object", "additionalProperties": false, "required": [ "type", "target", "site" ], "properties": { "type": { "enum": [ "Static" ] }, "target": { "enum": [ "hyphenCloud", "cloudflare" ] }, "site": { "type": "object", "additionalProperties": false, "required": [ "registryId", "uri" ], "properties": { "registryId": { "type": "string", "minLength": 1, "pattern": "^conn_[a-fA-F0-9]{24}$" }, "uri": { "type": "string", "minLength": 1, "description": "Artifact identifier, not a public serving URL." } } } } } ] } } }, "required": [ "appId", "artifacts" ] } }, "pipeline": { "type": "object", "additionalProperties": false, "properties": { "steps": { "type": "array", "items": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The ID of the step." }, "name": { "type": "string", "description": "The name of the step." }, "type": { "type": "string", "description": "The type of the step.", "enum": [ "SetupCloud", "SetupProxy", "SetupNetwork", "Deploy", "ManageTraffic", "CleanUp" ] }, "status": { "type": "string", "description": "The status of the step.", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "timing": { "type": "object", "additionalProperties": false, "properties": { "startTime": { "type": "string", "format": "date-time", "description": "The start time of the task." }, "endTime": { "type": "string", "format": "date-time", "description": "The end time of the task." } } }, "tasks": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The ID of the task." }, "type": { "type": "string", "description": "The type of the task.", "enum": [ "EnsureSiteRegistry", "EnsureStaticSite", "DeployStaticSite", "EnsureCloudWorkspace", "EnsureContainerRegistry", "EnsureProxyContainerRegistry", "EnsureNetworkGroup", "EnsureDNSRecord", "EnsureLoadBalancer", "EnsureCustomDomain", "EnsureSSLCertificate", "EnsureBackendPool", "EnsureBackendEndpoint", "EnsureCloudNativeContainer", "DeployCloudNativeContainerRevision", "AssignDNSRecord", "AssignLoadBalancerPools", "AssignBackendPoolEndpoints", "EnsureObjectStorage", "CleanUpSecrets", "CleanUpResources" ] }, "name": { "type": "string", "description": "The name of the task." }, "status": { "type": "string", "description": "The status of the task.", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "timing": { "type": "object", "additionalProperties": false, "properties": { "startTime": { "type": "string", "format": "date-time", "description": "The start time of the task." }, "endTime": { "type": "string", "format": "date-time", "description": "The end time of the task." } } } }, "required": [ "id", "status", "type" ] } } }, "required": [ "id", "name", "status", "tasks", "type" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The ID of the step." }, "name": { "type": "string", "description": "The name of the step." }, "type": { "type": "string", "description": "The type of the step.", "enum": [ "SetupCloud", "SetupProxy", "SetupNetwork", "Deploy", "ManageTraffic", "CleanUp" ] }, "status": { "type": "string", "description": "The status of the step.", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "timing": { "type": "object", "additionalProperties": false, "properties": { "startTime": { "type": "string", "format": "date-time", "description": "The start time of the task." }, "endTime": { "type": "string", "format": "date-time", "description": "The end time of the task." } } }, "parallelSteps": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The ID of the step." }, "name": { "type": "string", "description": "The name of the step." }, "type": { "type": "string", "description": "The type of the step.", "enum": [ "SetupCloud", "SetupProxy", "SetupNetwork", "Deploy", "ManageTraffic", "CleanUp" ] }, "status": { "type": "string", "description": "The status of the step.", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "timing": { "type": "object", "additionalProperties": false, "properties": { "startTime": { "type": "string", "format": "date-time", "description": "The start time of the task." }, "endTime": { "type": "string", "format": "date-time", "description": "The end time of the task." } } }, "tasks": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The ID of the task." }, "type": { "type": "string", "description": "The type of the task.", "enum": [ "EnsureSiteRegistry", "EnsureStaticSite", "DeployStaticSite", "EnsureCloudWorkspace", "EnsureContainerRegistry", "EnsureProxyContainerRegistry", "EnsureNetworkGroup", "EnsureDNSRecord", "EnsureLoadBalancer", "EnsureCustomDomain", "EnsureSSLCertificate", "EnsureBackendPool", "EnsureBackendEndpoint", "EnsureCloudNativeContainer", "DeployCloudNativeContainerRevision", "AssignDNSRecord", "AssignLoadBalancerPools", "AssignBackendPoolEndpoints", "EnsureObjectStorage", "CleanUpSecrets", "CleanUpResources" ] }, "name": { "type": "string", "description": "The name of the task." }, "status": { "type": "string", "description": "The status of the task.", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "timing": { "type": "object", "additionalProperties": false, "properties": { "startTime": { "type": "string", "format": "date-time", "description": "The start time of the task." }, "endTime": { "type": "string", "format": "date-time", "description": "The end time of the task." } } } }, "required": [ "id", "status", "type" ] } } }, "required": [ "id", "name", "status", "tasks", "type" ] } } }, "required": [ "id", "name", "status", "type", "parallelSteps" ] } ] } } }, "required": [] }, "environmentResourcesSnapshot": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^eres_[a-fA-F0-9]{24}$" }, "deployment": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } } }, "status": { "type": "string", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "lastDeploymentRunId": { "type": "string", "minLength": 1, "pattern": "^depr_[a-fA-F0-9]{24}$" }, "regions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^ereg_[a-fA-F0-9]{24}$" }, "location": { "type": "string" }, "archivedAt": { "type": "string", "format": "date-time" } } } }, "ingresses": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^eigs_[a-fA-F0-9]{24}$" }, "type": { "type": "string", "enum": [ "cloud", "crossCloud", "dns" ] }, "hostname": { "type": "string" }, "dns": { "type": "object", "additionalProperties": false, "properties": { "zoneName": { "type": "string", "description": "The DNS zone name of the hostname." }, "zoneId": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$", "description": "The DNS zone Id." }, "recordId": { "type": "string", "minLength": 1, "pattern": "^rrec_[a-fA-F0-9]{24}$", "description": "The resource record Id." }, "recordValueId": { "type": "string", "minLength": 1, "pattern": "^rrev_[a-fA-F0-9]{24}$", "description": "The resource record value Id." } }, "required": [ "zoneName" ] }, "ipAddress": { "type": "string" }, "target": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "type": "string", "enum": [ "hyphenCloud", "aws", "azure", "googleCloud", "googleWorkspace", "github", "slack", "office365", "newRelic", "signoz", "datadog", "incidentIo", "npm", "microsoftTeams", "jira", "cloudflare", "dockerHub", "okta", "mosyle" ] } } }, "status": { "type": "string", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "archivedAt": { "type": "string", "format": "date-time" } } } }, "storage": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^esto_[a-fA-F0-9]{24}$" }, "type": { "type": "string", "enum": [ "object", "file" ] }, "target": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "type": "string", "enum": [ "hyphenCloud", "aws", "azure", "googleCloud", "googleWorkspace", "github", "slack", "office365", "newRelic", "signoz", "datadog", "incidentIo", "npm", "microsoftTeams", "jira", "cloudflare", "dockerHub", "okta", "mosyle" ] } } }, "bucketName": { "type": "string" }, "status": { "type": "string", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "archivedAt": { "type": "string", "format": "date-time" } } } }, "apps": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^appd_[a-fA-F0-9]{24}$" }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } } }, "hostname": { "type": "string" }, "dns": { "type": "object", "additionalProperties": false, "properties": { "zoneName": { "type": "string", "description": "The DNS zone name of the hostname." }, "zoneId": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$", "description": "The DNS zone Id." }, "recordId": { "type": "string", "minLength": 1, "pattern": "^rrec_[a-fA-F0-9]{24}$", "description": "The resource record Id." }, "recordValueId": { "type": "string", "minLength": 1, "pattern": "^rrev_[a-fA-F0-9]{24}$", "description": "The resource record value Id." } }, "required": [ "zoneName" ] }, "path": { "type": "string" }, "instances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^apdi_[a-fA-F0-9]{24}$" }, "location": { "type": "string" }, "target": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "type": "string", "enum": [ "hyphenCloud", "aws", "azure", "googleCloud", "googleWorkspace", "github", "slack", "office365", "newRelic", "signoz", "datadog", "incidentIo", "npm", "microsoftTeams", "jira", "cloudflare", "dockerHub", "okta", "mosyle" ] } } }, "status": { "type": "string", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "url": { "type": "string" }, "buildId": { "type": "string", "minLength": 1, "pattern": "^abld_[a-fA-F0-9]{24}$" }, "archivedAt": { "type": "string", "format": "date-time" }, "min": { "type": "number" }, "max": { "type": "number" }, "cpu": { "type": "number" }, "memory": { "type": "number" } } } } } } }, "sites": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "buildId": { "type": "string", "minLength": 1, "pattern": "^abld_[a-fA-F0-9]{24}$" }, "id": { "type": "string", "pattern": "^sitd_[a-f0-9]{24}$" }, "connectionId": { "type": "string", "minLength": 1, "pattern": "^conn_[a-fA-F0-9]{24}$" }, "registryId": { "type": "string", "minLength": 1, "pattern": "^conn_[a-fA-F0-9]{24}$" }, "uri": { "type": "string", "minLength": 1, "description": "Artifact identifier, not a public serving URL." }, "siteId": { "type": "string" }, "url": { "type": "string", "format": "uri" }, "lastDeploymentRunId": { "type": "string", "minLength": 1, "pattern": "^depr_[a-fA-F0-9]{24}$" }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "target": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "type": "string", "enum": [ "hyphenCloud", "cloudflare" ] } }, "required": [ "id", "type" ] }, "status": { "type": "string", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "archivedAt": { "type": "string", "format": "date-time" } }, "required": [ "app", "target", "status" ] } }, "firstSuccessfulDeploymentRun": { "type": "string", "format": "date-time" }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The environment Id.", "type": "string" }, "alternateId": { "description": "The environment alternate id. This id is set by the user and can be used to retrieve an environment.\n\nMust be unique within the project.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "name": { "description": "The environment name. Must be unique within the project.\n\nMust have a length between 1 and 100 characters.", "type": "string", "minLength": 1, "maxLength": 100 } }, "required": [ "id", "alternateId", "name" ] } } } }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "example": "2024-07-08T15:58:34.219+00:00" }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "example": "2024-07-08T15:58:34.219+00:00" }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "example": "2024-07-08T15:58:34.219+00:00" }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "id", "status", "deploymentId", "organization" ] } } }, "required": [ "total", "pageNum", "pageSize", "data" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "post": { "summary": "Triggers the creation of a new run. This is an asynchronous operation.", "tags": [ "Deployments" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "artifacts": { "type": "array", "minItems": 1, "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "appId": { "type": "string", "description": "The ID of the app.", "minLength": 1 }, "artifacts": { "type": "array", "minItems": 1, "items": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of the artifact.", "enum": [ "Docker" ] }, "target": { "type": "string", "description": "The target of the artifact.", "enum": [ "googleCloud", "azure", "aws" ] }, "ports": { "type": "array", "description": "The ports exposed by the artifact.", "items": { "type": "integer" }, "minItems": 0 }, "image": { "type": "object", "additionalProperties": false, "properties": { "uri": { "type": "string", "description": "The uri of the image." } }, "required": [ "uri" ] } }, "required": [ "type", "image" ] }, { "type": "object", "additionalProperties": false, "required": [ "type", "target", "site" ], "properties": { "type": { "enum": [ "Static" ] }, "target": { "enum": [ "hyphenCloud", "cloudflare" ] }, "site": { "type": "object", "additionalProperties": false, "required": [ "registryId", "uri" ], "properties": { "registryId": { "type": "string", "minLength": 1, "pattern": "^conn_[a-fA-F0-9]{24}$" }, "uri": { "type": "string", "minLength": 1, "description": "Artifact identifier, not a public serving URL." } } } } } ] } } }, "required": [ "appId", "artifacts" ] }, { "type": "object", "additionalProperties": false, "properties": { "appId": { "type": "string", "description": "The ID of the app.", "minLength": 1 }, "artifact": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of the artifact.", "enum": [ "Docker" ] }, "target": { "type": "string", "description": "The target of the artifact.", "enum": [ "googleCloud", "azure", "aws" ] }, "ports": { "type": "array", "description": "The ports exposed by the artifact.", "items": { "type": "integer" }, "minItems": 0 }, "image": { "type": "object", "additionalProperties": false, "properties": { "uri": { "type": "string", "description": "The uri of the image." } }, "required": [ "uri" ] } }, "required": [ "type", "image" ] }, { "type": "object", "additionalProperties": false, "required": [ "type", "target", "site" ], "properties": { "type": { "enum": [ "Static" ] }, "target": { "enum": [ "hyphenCloud", "cloudflare" ] }, "site": { "type": "object", "additionalProperties": false, "required": [ "registryId", "uri" ], "properties": { "registryId": { "type": "string", "minLength": 1, "pattern": "^conn_[a-fA-F0-9]{24}$" }, "uri": { "type": "string", "minLength": 1, "description": "Artifact identifier, not a public serving URL." } } } } } ] } }, "required": [ "appId", "artifact" ] }, { "type": "object", "additionalProperties": false, "properties": { "appId": { "type": "string", "description": "The ID of the app.", "minLength": 1 }, "buildId": { "type": "string", "minLength": 1, "pattern": "^abld_[a-fA-F0-9]{24}$" } }, "required": [ "appId", "buildId" ] }, { "type": "object", "additionalProperties": false, "properties": { "appId": { "type": "string", "description": "The ID of the app.", "minLength": 1 }, "build": { "type": "string", "description": "Deploy using a known build alias.", "enum": [ "latest", "latestPreview", "lastDeployed" ] } }, "required": [ "appId", "build" ] } ] } }, "previewId": { "type": "string", "minLength": 1, "pattern": "^pdpl_[a-fA-F0-9]{24}$" } }, "required": [ "artifacts" ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "deploymentId", "required": true, "description": "The deployment Id or alternate Id." } ], "responses": { "200": { "description": "Successfully created a deployment run", "content": { "application/json": { "schema": { "description": "Successfully created a deployment run", "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The ID of the run." }, "status": { "type": "string", "description": "The status of the run.", "enum": [ "creating", "queued", "pending", "running", "succeeded", "failed", "canceling", "canceled" ] }, "timing": { "type": "object", "additionalProperties": false, "properties": { "startTime": { "type": "string", "format": "date-time", "description": "The start time of the task." }, "endTime": { "type": "string", "format": "date-time", "description": "The end time of the task." } } }, "deploymentId": { "type": "string", "description": "The ID of the deployment." }, "previewId": { "type": "string", "minLength": 1, "pattern": "^pdpl_[a-fA-F0-9]{24}$" }, "triggeredBy": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "optimizer" ], "description": "The system that triggered the deployment run." }, "runId": { "type": "string", "minLength": 1, "pattern": "^run_[a-fA-F0-9]{24}$" } }, "required": [ "type" ] }, "deploymentSnapshot": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment Id." }, "name": { "type": "string", "description": "The name of the deployment." }, "alternateId": { "type": "string", "description": "The alternate ID of the deployment." }, "description": { "type": "string", "description": "The description of the deployment." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The environment Id.", "type": "string" }, "alternateId": { "description": "The environment alternate id. This id is set by the user and can be used to retrieve an environment.\n\nMust be unique within the project.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "name": { "description": "The environment name. Must be unique within the project.\n\nMust have a length between 1 and 100 characters.", "type": "string", "minLength": 1, "maxLength": 100 } }, "required": [ "id", "alternateId", "name" ] }, "apps": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "deploymentSettings": { "type": "object", "additionalProperties": false, "properties": { "targets": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The integration Id.", "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "description": "The organization integration type.", "type": "string" } }, "required": [ "id" ] } }, "path": { "type": "string", "description": "The path of the app." }, "hostname": { "type": "string", "description": "The hostname of the app." }, "dns": { "type": "object", "additionalProperties": false, "properties": { "zoneName": { "type": "string", "description": "The DNS zone name of the hostname." }, "zoneId": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$", "description": "The DNS zone Id." }, "recordId": { "type": "string", "minLength": 1, "pattern": "^rrec_[a-fA-F0-9]{24}$", "description": "The resource record Id." }, "recordValueId": { "type": "string", "minLength": 1, "pattern": "^rrev_[a-fA-F0-9]{24}$", "description": "The resource record value Id." } }, "required": [ "zoneName" ], "description": "The DNS settings for the app." }, "availability": { "type": "string", "enum": [ "99.000", "99.900", "99.990", "99.999" ], "description": "The availability of the app." }, "scale": { "type": "string", "enum": [ "small", "medium", "large", "extra-large" ], "description": "The scale of the app." }, "trafficRegions": { "type": "array", "items": { "type": "string", "enum": [ "na", "eu", "ap", "sa" ], "description": "The deployment region (na = North America, eu = Europe, ap = Asia/Pacific, sa = South America)." }, "minItems": 1 }, "advanced": { "type": "object", "description": "Advanced deployment settings.", "additionalProperties": false, "properties": { "scale": { "type": "object", "description": "Per-cloud-provider, per-region instance scaling overrides. Keyed by integration type (googleCloud, azure), then by RegionLocation. Overrides the Scale-derived defaults when present.", "additionalProperties": false, "properties": { "googleCloud": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } }, "azure": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } }, "aws": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } } } } } }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The project environment id." }, "alternateId": { "type": "string", "description": "The project environment alternate id." }, "name": { "type": "string", "description": "The project environment name." } }, "required": [ "id" ] } }, "required": [ "targets", "availability", "scale", "trafficRegions", "projectEnvironment" ] } }, "required": [ "app", "project" ] }, "description": "The projects associated with the deployment." }, "sites": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "deploymentSettings": { "type": "object", "additionalProperties": false, "propertyNames": { "enum": [ "targets" ] }, "properties": { "targets": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "type": "string", "enum": [ "hyphenCloud", "cloudflare" ] } }, "required": [ "id", "type" ] } } }, "required": [ "targets" ] } }, "required": [ "app", "project", "deploymentSettings" ] }, "description": "The websites associated with the deployment." }, "isReady": { "type": "boolean", "description": "Whether the deployment has all required connections ready for deployment." }, "readinessIssues": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "error": { "type": "string", "description": "The error message describing the readiness issue." }, "target": { "type": "string", "description": "The cloud provider name (e.g., AWS, Azure, Google Cloud)." }, "projectId": { "type": "string", "description": "The project ID associated with the issue." } }, "required": [ "error", "projectId" ] }, "description": "List of issues preventing the deployment from being ready." }, "previews": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^pdpl_[a-fA-F0-9]{24}$", "description": "The preview deployment id." }, "name": { "type": "string", "description": "The preview deployment name. Must be unique within the deployment.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "hostPrefix": { "type": "string", "description": "The host prefix for the preview deployment. Must be unique within the deployment.\n\nMust have a length between 1 and 25 characters.\n\nMust start and end with an alphanumeric character (a-z, 0-9).\n\nMay contain hyphens in the middle.", "minLength": 1, "maxLength": 25, "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$" }, "dns": { "type": "array", "description": "DNS records generated for this preview from the deployment app hostnames.", "items": { "type": "object", "additionalProperties": false, "properties": { "zoneName": { "type": "string", "description": "The DNS zone name of the hostname." }, "zoneId": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$", "description": "The DNS zone Id." }, "recordId": { "type": "string", "minLength": 1, "pattern": "^rrec_[a-fA-F0-9]{24}$", "description": "The resource record Id." }, "recordValueId": { "type": "string", "minLength": 1, "pattern": "^rrev_[a-fA-F0-9]{24}$", "description": "The resource record value Id." }, "appId": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" } }, "required": [ "zoneName", "zoneId", "recordId", "recordValueId", "appId" ] } } }, "required": [ "id", "name", "hostPrefix" ] }, "description": "The preview deployments associated with the deployment." }, "storage": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "object", "file" ], "description": "The storage type (object or file)." }, "target": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$", "description": "The organization integration id." }, "type": { "type": "string", "enum": [ "googleCloud", "azure", "aws" ], "description": "The cloud integration type." } }, "required": [ "id", "type" ] }, "bucketName": { "type": "string", "description": "The storage bucket name." } }, "required": [ "type", "target" ] }, "description": "The storage configurations associated with the deployment." } }, "required": [ "id", "name", "alternateId", "apps", "sites", "organization", "project", "projectEnvironment" ] }, "appsSnapshot": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 }, "settings": { "description": "The app settings.", "type": "object", "properties": { "env": { "type": "object", "properties": { "accessControls": { "type": "object", "properties": { "allow": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } }, "deny": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } }, "environments": { "type": "object", "additionalProperties": { "type": "object", "properties": { "allow": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } }, "deny": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } } }, "additionalProperties": false } } }, "additionalProperties": false } }, "additionalProperties": false }, "deploy": { "type": "object", "properties": { "healthChecks": { "type": "object", "properties": { "startup": { "type": "object", "properties": { "path": { "type": "string" }, "headers": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "string" } }, "required": [ "name", "value" ], "additionalProperties": false } } }, "required": [ "path" ], "additionalProperties": false }, "liveness": { "type": "object", "properties": { "path": { "type": "string" }, "headers": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "string" } }, "required": [ "name", "value" ], "additionalProperties": false } } }, "required": [ "path" ], "additionalProperties": false } } } }, "additionalProperties": false } }, "additionalProperties": false }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "example": "2024-07-08T15:58:34.219+00:00" }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "example": "2024-07-08T15:58:34.219+00:00" }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "example": "2024-07-08T15:58:34.219+00:00" }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "id", "alternateId", "name", "organization", "project", "meta" ], "example": { "id": "app_66bf99b72a0043f841769880", "alternateId": "my-app", "name": "My App", "settings": { "env": { "accessControls": { "environments": { "production": { "allow": [ { "description": "Prod servers", "type": "cidr", "cidr": "10.10.0.0/16" } ], "deny": [ { "description": "Block all", "type": "cidr", "cidr": "0.0.0.0/0" } ] } } } } }, "organization": { "id": "org_66bf99b72a0043f841769880", "name": "My Org" }, "project": { "id": "proj_66bf99b72a0043f841769880", "alternateId": "my-project", "name": "My Project" }, "meta": { "createdAt": "2025-01-14T22:56:14.234Z", "createdBy": "memb_66f30abb67ebc6bb0c5e0af9" } } }, "description": "A snapshot of the apps at the time of the deployment run." }, "artifacts": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "appId": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "buildId": { "type": "string", "minLength": 1, "pattern": "^abld_[a-fA-F0-9]{24}$" }, "artifacts": { "type": "array", "minItems": 1, "items": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of the artifact.", "enum": [ "Docker" ] }, "target": { "type": "string", "description": "The target of the artifact.", "enum": [ "googleCloud", "azure", "aws" ] }, "ports": { "type": "array", "description": "The ports exposed by the artifact.", "items": { "type": "integer" }, "minItems": 0 }, "image": { "type": "object", "additionalProperties": false, "properties": { "uri": { "type": "string", "description": "The uri of the image." } }, "required": [ "uri" ] } }, "required": [ "type", "image" ] }, { "type": "object", "additionalProperties": false, "required": [ "type", "target", "site" ], "properties": { "type": { "enum": [ "Static" ] }, "target": { "enum": [ "hyphenCloud", "cloudflare" ] }, "site": { "type": "object", "additionalProperties": false, "required": [ "registryId", "uri" ], "properties": { "registryId": { "type": "string", "minLength": 1, "pattern": "^conn_[a-fA-F0-9]{24}$" }, "uri": { "type": "string", "minLength": 1, "description": "Artifact identifier, not a public serving URL." } } } } } ] } } }, "required": [ "appId", "artifacts" ] } }, "pipeline": { "type": "object", "additionalProperties": false, "properties": { "steps": { "type": "array", "items": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The ID of the step." }, "name": { "type": "string", "description": "The name of the step." }, "type": { "type": "string", "description": "The type of the step.", "enum": [ "SetupCloud", "SetupProxy", "SetupNetwork", "Deploy", "ManageTraffic", "CleanUp" ] }, "status": { "type": "string", "description": "The status of the step.", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "timing": { "type": "object", "additionalProperties": false, "properties": { "startTime": { "type": "string", "format": "date-time", "description": "The start time of the task." }, "endTime": { "type": "string", "format": "date-time", "description": "The end time of the task." } } }, "tasks": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The ID of the task." }, "type": { "type": "string", "description": "The type of the task.", "enum": [ "EnsureSiteRegistry", "EnsureStaticSite", "DeployStaticSite", "EnsureCloudWorkspace", "EnsureContainerRegistry", "EnsureProxyContainerRegistry", "EnsureNetworkGroup", "EnsureDNSRecord", "EnsureLoadBalancer", "EnsureCustomDomain", "EnsureSSLCertificate", "EnsureBackendPool", "EnsureBackendEndpoint", "EnsureCloudNativeContainer", "DeployCloudNativeContainerRevision", "AssignDNSRecord", "AssignLoadBalancerPools", "AssignBackendPoolEndpoints", "EnsureObjectStorage", "CleanUpSecrets", "CleanUpResources" ] }, "name": { "type": "string", "description": "The name of the task." }, "status": { "type": "string", "description": "The status of the task.", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "timing": { "type": "object", "additionalProperties": false, "properties": { "startTime": { "type": "string", "format": "date-time", "description": "The start time of the task." }, "endTime": { "type": "string", "format": "date-time", "description": "The end time of the task." } } } }, "required": [ "id", "status", "type" ] } } }, "required": [ "id", "name", "status", "tasks", "type" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The ID of the step." }, "name": { "type": "string", "description": "The name of the step." }, "type": { "type": "string", "description": "The type of the step.", "enum": [ "SetupCloud", "SetupProxy", "SetupNetwork", "Deploy", "ManageTraffic", "CleanUp" ] }, "status": { "type": "string", "description": "The status of the step.", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "timing": { "type": "object", "additionalProperties": false, "properties": { "startTime": { "type": "string", "format": "date-time", "description": "The start time of the task." }, "endTime": { "type": "string", "format": "date-time", "description": "The end time of the task." } } }, "parallelSteps": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The ID of the step." }, "name": { "type": "string", "description": "The name of the step." }, "type": { "type": "string", "description": "The type of the step.", "enum": [ "SetupCloud", "SetupProxy", "SetupNetwork", "Deploy", "ManageTraffic", "CleanUp" ] }, "status": { "type": "string", "description": "The status of the step.", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "timing": { "type": "object", "additionalProperties": false, "properties": { "startTime": { "type": "string", "format": "date-time", "description": "The start time of the task." }, "endTime": { "type": "string", "format": "date-time", "description": "The end time of the task." } } }, "tasks": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The ID of the task." }, "type": { "type": "string", "description": "The type of the task.", "enum": [ "EnsureSiteRegistry", "EnsureStaticSite", "DeployStaticSite", "EnsureCloudWorkspace", "EnsureContainerRegistry", "EnsureProxyContainerRegistry", "EnsureNetworkGroup", "EnsureDNSRecord", "EnsureLoadBalancer", "EnsureCustomDomain", "EnsureSSLCertificate", "EnsureBackendPool", "EnsureBackendEndpoint", "EnsureCloudNativeContainer", "DeployCloudNativeContainerRevision", "AssignDNSRecord", "AssignLoadBalancerPools", "AssignBackendPoolEndpoints", "EnsureObjectStorage", "CleanUpSecrets", "CleanUpResources" ] }, "name": { "type": "string", "description": "The name of the task." }, "status": { "type": "string", "description": "The status of the task.", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "timing": { "type": "object", "additionalProperties": false, "properties": { "startTime": { "type": "string", "format": "date-time", "description": "The start time of the task." }, "endTime": { "type": "string", "format": "date-time", "description": "The end time of the task." } } } }, "required": [ "id", "status", "type" ] } } }, "required": [ "id", "name", "status", "tasks", "type" ] } } }, "required": [ "id", "name", "status", "type", "parallelSteps" ] } ] } } }, "required": [] }, "environmentResourcesSnapshot": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^eres_[a-fA-F0-9]{24}$" }, "deployment": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } } }, "status": { "type": "string", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "lastDeploymentRunId": { "type": "string", "minLength": 1, "pattern": "^depr_[a-fA-F0-9]{24}$" }, "regions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^ereg_[a-fA-F0-9]{24}$" }, "location": { "type": "string" }, "archivedAt": { "type": "string", "format": "date-time" } } } }, "ingresses": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^eigs_[a-fA-F0-9]{24}$" }, "type": { "type": "string", "enum": [ "cloud", "crossCloud", "dns" ] }, "hostname": { "type": "string" }, "dns": { "type": "object", "additionalProperties": false, "properties": { "zoneName": { "type": "string", "description": "The DNS zone name of the hostname." }, "zoneId": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$", "description": "The DNS zone Id." }, "recordId": { "type": "string", "minLength": 1, "pattern": "^rrec_[a-fA-F0-9]{24}$", "description": "The resource record Id." }, "recordValueId": { "type": "string", "minLength": 1, "pattern": "^rrev_[a-fA-F0-9]{24}$", "description": "The resource record value Id." } }, "required": [ "zoneName" ] }, "ipAddress": { "type": "string" }, "target": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "type": "string", "enum": [ "hyphenCloud", "aws", "azure", "googleCloud", "googleWorkspace", "github", "slack", "office365", "newRelic", "signoz", "datadog", "incidentIo", "npm", "microsoftTeams", "jira", "cloudflare", "dockerHub", "okta", "mosyle" ] } } }, "status": { "type": "string", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "archivedAt": { "type": "string", "format": "date-time" } } } }, "storage": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^esto_[a-fA-F0-9]{24}$" }, "type": { "type": "string", "enum": [ "object", "file" ] }, "target": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "type": "string", "enum": [ "hyphenCloud", "aws", "azure", "googleCloud", "googleWorkspace", "github", "slack", "office365", "newRelic", "signoz", "datadog", "incidentIo", "npm", "microsoftTeams", "jira", "cloudflare", "dockerHub", "okta", "mosyle" ] } } }, "bucketName": { "type": "string" }, "status": { "type": "string", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "archivedAt": { "type": "string", "format": "date-time" } } } }, "apps": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^appd_[a-fA-F0-9]{24}$" }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } } }, "hostname": { "type": "string" }, "dns": { "type": "object", "additionalProperties": false, "properties": { "zoneName": { "type": "string", "description": "The DNS zone name of the hostname." }, "zoneId": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$", "description": "The DNS zone Id." }, "recordId": { "type": "string", "minLength": 1, "pattern": "^rrec_[a-fA-F0-9]{24}$", "description": "The resource record Id." }, "recordValueId": { "type": "string", "minLength": 1, "pattern": "^rrev_[a-fA-F0-9]{24}$", "description": "The resource record value Id." } }, "required": [ "zoneName" ] }, "path": { "type": "string" }, "instances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^apdi_[a-fA-F0-9]{24}$" }, "location": { "type": "string" }, "target": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "type": "string", "enum": [ "hyphenCloud", "aws", "azure", "googleCloud", "googleWorkspace", "github", "slack", "office365", "newRelic", "signoz", "datadog", "incidentIo", "npm", "microsoftTeams", "jira", "cloudflare", "dockerHub", "okta", "mosyle" ] } } }, "status": { "type": "string", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "url": { "type": "string" }, "buildId": { "type": "string", "minLength": 1, "pattern": "^abld_[a-fA-F0-9]{24}$" }, "archivedAt": { "type": "string", "format": "date-time" }, "min": { "type": "number" }, "max": { "type": "number" }, "cpu": { "type": "number" }, "memory": { "type": "number" } } } } } } }, "sites": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "buildId": { "type": "string", "minLength": 1, "pattern": "^abld_[a-fA-F0-9]{24}$" }, "id": { "type": "string", "pattern": "^sitd_[a-f0-9]{24}$" }, "connectionId": { "type": "string", "minLength": 1, "pattern": "^conn_[a-fA-F0-9]{24}$" }, "registryId": { "type": "string", "minLength": 1, "pattern": "^conn_[a-fA-F0-9]{24}$" }, "uri": { "type": "string", "minLength": 1, "description": "Artifact identifier, not a public serving URL." }, "siteId": { "type": "string" }, "url": { "type": "string", "format": "uri" }, "lastDeploymentRunId": { "type": "string", "minLength": 1, "pattern": "^depr_[a-fA-F0-9]{24}$" }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "target": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "type": "string", "enum": [ "hyphenCloud", "cloudflare" ] } }, "required": [ "id", "type" ] }, "status": { "type": "string", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "archivedAt": { "type": "string", "format": "date-time" } }, "required": [ "app", "target", "status" ] } }, "firstSuccessfulDeploymentRun": { "type": "string", "format": "date-time" }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The environment Id.", "type": "string" }, "alternateId": { "description": "The environment alternate id. This id is set by the user and can be used to retrieve an environment.\n\nMust be unique within the project.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "name": { "description": "The environment name. Must be unique within the project.\n\nMust have a length between 1 and 100 characters.", "type": "string", "minLength": 1, "maxLength": 100 } }, "required": [ "id", "alternateId", "name" ] } } } }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "example": "2024-07-08T15:58:34.219+00:00" }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "example": "2024-07-08T15:58:34.219+00:00" }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "example": "2024-07-08T15:58:34.219+00:00" }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "id", "status", "deploymentId", "organization" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/deployments/{deploymentId}/runs/{runId}": { "get": { "summary": "Get a run by id for a deployment", "tags": [ "Deployments" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "deploymentId", "required": true, "description": "The deployment Id or alternate Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^depr_[a-fA-F0-9]{24}$" }, "in": "path", "name": "runId", "required": true } ], "responses": { "200": { "description": "Successfully got a deployment run", "content": { "application/json": { "schema": { "description": "Successfully got a deployment run", "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The ID of the run." }, "status": { "type": "string", "description": "The status of the run.", "enum": [ "creating", "queued", "pending", "running", "succeeded", "failed", "canceling", "canceled" ] }, "timing": { "type": "object", "additionalProperties": false, "properties": { "startTime": { "type": "string", "format": "date-time", "description": "The start time of the task." }, "endTime": { "type": "string", "format": "date-time", "description": "The end time of the task." } } }, "deploymentId": { "type": "string", "description": "The ID of the deployment." }, "previewId": { "type": "string", "minLength": 1, "pattern": "^pdpl_[a-fA-F0-9]{24}$" }, "triggeredBy": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "optimizer" ], "description": "The system that triggered the deployment run." }, "runId": { "type": "string", "minLength": 1, "pattern": "^run_[a-fA-F0-9]{24}$" } }, "required": [ "type" ] }, "deploymentSnapshot": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment Id." }, "name": { "type": "string", "description": "The name of the deployment." }, "alternateId": { "type": "string", "description": "The alternate ID of the deployment." }, "description": { "type": "string", "description": "The description of the deployment." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The environment Id.", "type": "string" }, "alternateId": { "description": "The environment alternate id. This id is set by the user and can be used to retrieve an environment.\n\nMust be unique within the project.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "name": { "description": "The environment name. Must be unique within the project.\n\nMust have a length between 1 and 100 characters.", "type": "string", "minLength": 1, "maxLength": 100 } }, "required": [ "id", "alternateId", "name" ] }, "apps": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "deploymentSettings": { "type": "object", "additionalProperties": false, "properties": { "targets": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The integration Id.", "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "description": "The organization integration type.", "type": "string" } }, "required": [ "id" ] } }, "path": { "type": "string", "description": "The path of the app." }, "hostname": { "type": "string", "description": "The hostname of the app." }, "dns": { "type": "object", "additionalProperties": false, "properties": { "zoneName": { "type": "string", "description": "The DNS zone name of the hostname." }, "zoneId": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$", "description": "The DNS zone Id." }, "recordId": { "type": "string", "minLength": 1, "pattern": "^rrec_[a-fA-F0-9]{24}$", "description": "The resource record Id." }, "recordValueId": { "type": "string", "minLength": 1, "pattern": "^rrev_[a-fA-F0-9]{24}$", "description": "The resource record value Id." } }, "required": [ "zoneName" ], "description": "The DNS settings for the app." }, "availability": { "type": "string", "enum": [ "99.000", "99.900", "99.990", "99.999" ], "description": "The availability of the app." }, "scale": { "type": "string", "enum": [ "small", "medium", "large", "extra-large" ], "description": "The scale of the app." }, "trafficRegions": { "type": "array", "items": { "type": "string", "enum": [ "na", "eu", "ap", "sa" ], "description": "The deployment region (na = North America, eu = Europe, ap = Asia/Pacific, sa = South America)." }, "minItems": 1 }, "advanced": { "type": "object", "description": "Advanced deployment settings.", "additionalProperties": false, "properties": { "scale": { "type": "object", "description": "Per-cloud-provider, per-region instance scaling overrides. Keyed by integration type (googleCloud, azure), then by RegionLocation. Overrides the Scale-derived defaults when present.", "additionalProperties": false, "properties": { "googleCloud": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } }, "azure": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } }, "aws": { "type": "object", "description": "Per-region scaling overrides, keyed by RegionLocation.", "additionalProperties": false, "properties": { "NA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "NA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "SA3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "EU3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP1": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP2": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } }, "AP3": { "type": "object", "additionalProperties": false, "properties": { "minInstances": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Minimum number of instances for this region." }, "maxInstances": { "type": "integer", "minimum": 1, "maximum": 1000, "description": "Maximum number of instances for this region." }, "cpu": { "type": "number", "minimum": 0.25, "maximum": 8, "description": "CPU limit in vCPU units (e.g., 0.25, 0.5, 1, 2, 4)." }, "memory": { "type": "integer", "minimum": 128, "maximum": 32768, "description": "Memory limit in MiB (e.g., 512, 1024, 2048, 4096)." } } } } } } } } }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The project environment id." }, "alternateId": { "type": "string", "description": "The project environment alternate id." }, "name": { "type": "string", "description": "The project environment name." } }, "required": [ "id" ] } }, "required": [ "targets", "availability", "scale", "trafficRegions", "projectEnvironment" ] } }, "required": [ "app", "project" ] }, "description": "The projects associated with the deployment." }, "sites": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "deploymentSettings": { "type": "object", "additionalProperties": false, "propertyNames": { "enum": [ "targets" ] }, "properties": { "targets": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "type": "string", "enum": [ "hyphenCloud", "cloudflare" ] } }, "required": [ "id", "type" ] } } }, "required": [ "targets" ] } }, "required": [ "app", "project", "deploymentSettings" ] }, "description": "The websites associated with the deployment." }, "isReady": { "type": "boolean", "description": "Whether the deployment has all required connections ready for deployment." }, "readinessIssues": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "error": { "type": "string", "description": "The error message describing the readiness issue." }, "target": { "type": "string", "description": "The cloud provider name (e.g., AWS, Azure, Google Cloud)." }, "projectId": { "type": "string", "description": "The project ID associated with the issue." } }, "required": [ "error", "projectId" ] }, "description": "List of issues preventing the deployment from being ready." }, "previews": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^pdpl_[a-fA-F0-9]{24}$", "description": "The preview deployment id." }, "name": { "type": "string", "description": "The preview deployment name. Must be unique within the deployment.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "hostPrefix": { "type": "string", "description": "The host prefix for the preview deployment. Must be unique within the deployment.\n\nMust have a length between 1 and 25 characters.\n\nMust start and end with an alphanumeric character (a-z, 0-9).\n\nMay contain hyphens in the middle.", "minLength": 1, "maxLength": 25, "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$" }, "dns": { "type": "array", "description": "DNS records generated for this preview from the deployment app hostnames.", "items": { "type": "object", "additionalProperties": false, "properties": { "zoneName": { "type": "string", "description": "The DNS zone name of the hostname." }, "zoneId": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$", "description": "The DNS zone Id." }, "recordId": { "type": "string", "minLength": 1, "pattern": "^rrec_[a-fA-F0-9]{24}$", "description": "The resource record Id." }, "recordValueId": { "type": "string", "minLength": 1, "pattern": "^rrev_[a-fA-F0-9]{24}$", "description": "The resource record value Id." }, "appId": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" } }, "required": [ "zoneName", "zoneId", "recordId", "recordValueId", "appId" ] } } }, "required": [ "id", "name", "hostPrefix" ] }, "description": "The preview deployments associated with the deployment." }, "storage": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "object", "file" ], "description": "The storage type (object or file)." }, "target": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$", "description": "The organization integration id." }, "type": { "type": "string", "enum": [ "googleCloud", "azure", "aws" ], "description": "The cloud integration type." } }, "required": [ "id", "type" ] }, "bucketName": { "type": "string", "description": "The storage bucket name." } }, "required": [ "type", "target" ] }, "description": "The storage configurations associated with the deployment." } }, "required": [ "id", "name", "alternateId", "apps", "sites", "organization", "project", "projectEnvironment" ] }, "appsSnapshot": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 }, "settings": { "description": "The app settings.", "type": "object", "properties": { "env": { "type": "object", "properties": { "accessControls": { "type": "object", "properties": { "allow": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } }, "deny": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } }, "environments": { "type": "object", "additionalProperties": { "type": "object", "properties": { "allow": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } }, "deny": { "type": "array", "items": { "type": "object", "properties": { "description": { "type": "string" }, "type": { "type": "string", "enum": [ "cidr" ] }, "cidr": { "type": "string", "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$|^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}/[0-9]{1,3}$" } }, "additionalProperties": false, "required": [ "description", "type", "cidr" ] } } }, "additionalProperties": false } } }, "additionalProperties": false } }, "additionalProperties": false }, "deploy": { "type": "object", "properties": { "healthChecks": { "type": "object", "properties": { "startup": { "type": "object", "properties": { "path": { "type": "string" }, "headers": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "string" } }, "required": [ "name", "value" ], "additionalProperties": false } } }, "required": [ "path" ], "additionalProperties": false }, "liveness": { "type": "object", "properties": { "path": { "type": "string" }, "headers": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "string" } }, "required": [ "name", "value" ], "additionalProperties": false } } }, "required": [ "path" ], "additionalProperties": false } } } }, "additionalProperties": false } }, "additionalProperties": false }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "example": "2024-07-08T15:58:34.219+00:00" }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "example": "2024-07-08T15:58:34.219+00:00" }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "example": "2024-07-08T15:58:34.219+00:00" }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "id", "alternateId", "name", "organization", "project", "meta" ], "example": { "id": "app_66bf99b72a0043f841769880", "alternateId": "my-app", "name": "My App", "settings": { "env": { "accessControls": { "environments": { "production": { "allow": [ { "description": "Prod servers", "type": "cidr", "cidr": "10.10.0.0/16" } ], "deny": [ { "description": "Block all", "type": "cidr", "cidr": "0.0.0.0/0" } ] } } } } }, "organization": { "id": "org_66bf99b72a0043f841769880", "name": "My Org" }, "project": { "id": "proj_66bf99b72a0043f841769880", "alternateId": "my-project", "name": "My Project" }, "meta": { "createdAt": "2025-01-14T22:56:14.234Z", "createdBy": "memb_66f30abb67ebc6bb0c5e0af9" } } }, "description": "A snapshot of the apps at the time of the deployment run." }, "artifacts": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "appId": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "buildId": { "type": "string", "minLength": 1, "pattern": "^abld_[a-fA-F0-9]{24}$" }, "artifacts": { "type": "array", "minItems": 1, "items": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of the artifact.", "enum": [ "Docker" ] }, "target": { "type": "string", "description": "The target of the artifact.", "enum": [ "googleCloud", "azure", "aws" ] }, "ports": { "type": "array", "description": "The ports exposed by the artifact.", "items": { "type": "integer" }, "minItems": 0 }, "image": { "type": "object", "additionalProperties": false, "properties": { "uri": { "type": "string", "description": "The uri of the image." } }, "required": [ "uri" ] } }, "required": [ "type", "image" ] }, { "type": "object", "additionalProperties": false, "required": [ "type", "target", "site" ], "properties": { "type": { "enum": [ "Static" ] }, "target": { "enum": [ "hyphenCloud", "cloudflare" ] }, "site": { "type": "object", "additionalProperties": false, "required": [ "registryId", "uri" ], "properties": { "registryId": { "type": "string", "minLength": 1, "pattern": "^conn_[a-fA-F0-9]{24}$" }, "uri": { "type": "string", "minLength": 1, "description": "Artifact identifier, not a public serving URL." } } } } } ] } } }, "required": [ "appId", "artifacts" ] } }, "pipeline": { "type": "object", "additionalProperties": false, "properties": { "steps": { "type": "array", "items": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The ID of the step." }, "name": { "type": "string", "description": "The name of the step." }, "type": { "type": "string", "description": "The type of the step.", "enum": [ "SetupCloud", "SetupProxy", "SetupNetwork", "Deploy", "ManageTraffic", "CleanUp" ] }, "status": { "type": "string", "description": "The status of the step.", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "timing": { "type": "object", "additionalProperties": false, "properties": { "startTime": { "type": "string", "format": "date-time", "description": "The start time of the task." }, "endTime": { "type": "string", "format": "date-time", "description": "The end time of the task." } } }, "tasks": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The ID of the task." }, "type": { "type": "string", "description": "The type of the task.", "enum": [ "EnsureSiteRegistry", "EnsureStaticSite", "DeployStaticSite", "EnsureCloudWorkspace", "EnsureContainerRegistry", "EnsureProxyContainerRegistry", "EnsureNetworkGroup", "EnsureDNSRecord", "EnsureLoadBalancer", "EnsureCustomDomain", "EnsureSSLCertificate", "EnsureBackendPool", "EnsureBackendEndpoint", "EnsureCloudNativeContainer", "DeployCloudNativeContainerRevision", "AssignDNSRecord", "AssignLoadBalancerPools", "AssignBackendPoolEndpoints", "EnsureObjectStorage", "CleanUpSecrets", "CleanUpResources" ] }, "name": { "type": "string", "description": "The name of the task." }, "status": { "type": "string", "description": "The status of the task.", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "timing": { "type": "object", "additionalProperties": false, "properties": { "startTime": { "type": "string", "format": "date-time", "description": "The start time of the task." }, "endTime": { "type": "string", "format": "date-time", "description": "The end time of the task." } } } }, "required": [ "id", "status", "type" ] } } }, "required": [ "id", "name", "status", "tasks", "type" ] }, { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The ID of the step." }, "name": { "type": "string", "description": "The name of the step." }, "type": { "type": "string", "description": "The type of the step.", "enum": [ "SetupCloud", "SetupProxy", "SetupNetwork", "Deploy", "ManageTraffic", "CleanUp" ] }, "status": { "type": "string", "description": "The status of the step.", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "timing": { "type": "object", "additionalProperties": false, "properties": { "startTime": { "type": "string", "format": "date-time", "description": "The start time of the task." }, "endTime": { "type": "string", "format": "date-time", "description": "The end time of the task." } } }, "parallelSteps": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The ID of the step." }, "name": { "type": "string", "description": "The name of the step." }, "type": { "type": "string", "description": "The type of the step.", "enum": [ "SetupCloud", "SetupProxy", "SetupNetwork", "Deploy", "ManageTraffic", "CleanUp" ] }, "status": { "type": "string", "description": "The status of the step.", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "timing": { "type": "object", "additionalProperties": false, "properties": { "startTime": { "type": "string", "format": "date-time", "description": "The start time of the task." }, "endTime": { "type": "string", "format": "date-time", "description": "The end time of the task." } } }, "tasks": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The ID of the task." }, "type": { "type": "string", "description": "The type of the task.", "enum": [ "EnsureSiteRegistry", "EnsureStaticSite", "DeployStaticSite", "EnsureCloudWorkspace", "EnsureContainerRegistry", "EnsureProxyContainerRegistry", "EnsureNetworkGroup", "EnsureDNSRecord", "EnsureLoadBalancer", "EnsureCustomDomain", "EnsureSSLCertificate", "EnsureBackendPool", "EnsureBackendEndpoint", "EnsureCloudNativeContainer", "DeployCloudNativeContainerRevision", "AssignDNSRecord", "AssignLoadBalancerPools", "AssignBackendPoolEndpoints", "EnsureObjectStorage", "CleanUpSecrets", "CleanUpResources" ] }, "name": { "type": "string", "description": "The name of the task." }, "status": { "type": "string", "description": "The status of the task.", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "timing": { "type": "object", "additionalProperties": false, "properties": { "startTime": { "type": "string", "format": "date-time", "description": "The start time of the task." }, "endTime": { "type": "string", "format": "date-time", "description": "The end time of the task." } } } }, "required": [ "id", "status", "type" ] } } }, "required": [ "id", "name", "status", "tasks", "type" ] } } }, "required": [ "id", "name", "status", "type", "parallelSteps" ] } ] } } }, "required": [] }, "environmentResourcesSnapshot": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^eres_[a-fA-F0-9]{24}$" }, "deployment": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } } }, "status": { "type": "string", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "lastDeploymentRunId": { "type": "string", "minLength": 1, "pattern": "^depr_[a-fA-F0-9]{24}$" }, "regions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^ereg_[a-fA-F0-9]{24}$" }, "location": { "type": "string" }, "archivedAt": { "type": "string", "format": "date-time" } } } }, "ingresses": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^eigs_[a-fA-F0-9]{24}$" }, "type": { "type": "string", "enum": [ "cloud", "crossCloud", "dns" ] }, "hostname": { "type": "string" }, "dns": { "type": "object", "additionalProperties": false, "properties": { "zoneName": { "type": "string", "description": "The DNS zone name of the hostname." }, "zoneId": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$", "description": "The DNS zone Id." }, "recordId": { "type": "string", "minLength": 1, "pattern": "^rrec_[a-fA-F0-9]{24}$", "description": "The resource record Id." }, "recordValueId": { "type": "string", "minLength": 1, "pattern": "^rrev_[a-fA-F0-9]{24}$", "description": "The resource record value Id." } }, "required": [ "zoneName" ] }, "ipAddress": { "type": "string" }, "target": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "type": "string", "enum": [ "hyphenCloud", "aws", "azure", "googleCloud", "googleWorkspace", "github", "slack", "office365", "newRelic", "signoz", "datadog", "incidentIo", "npm", "microsoftTeams", "jira", "cloudflare", "dockerHub", "okta", "mosyle" ] } } }, "status": { "type": "string", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "archivedAt": { "type": "string", "format": "date-time" } } } }, "storage": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^esto_[a-fA-F0-9]{24}$" }, "type": { "type": "string", "enum": [ "object", "file" ] }, "target": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "type": "string", "enum": [ "hyphenCloud", "aws", "azure", "googleCloud", "googleWorkspace", "github", "slack", "office365", "newRelic", "signoz", "datadog", "incidentIo", "npm", "microsoftTeams", "jira", "cloudflare", "dockerHub", "okta", "mosyle" ] } } }, "bucketName": { "type": "string" }, "status": { "type": "string", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "archivedAt": { "type": "string", "format": "date-time" } } } }, "apps": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^appd_[a-fA-F0-9]{24}$" }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } } }, "hostname": { "type": "string" }, "dns": { "type": "object", "additionalProperties": false, "properties": { "zoneName": { "type": "string", "description": "The DNS zone name of the hostname." }, "zoneId": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$", "description": "The DNS zone Id." }, "recordId": { "type": "string", "minLength": 1, "pattern": "^rrec_[a-fA-F0-9]{24}$", "description": "The resource record Id." }, "recordValueId": { "type": "string", "minLength": 1, "pattern": "^rrev_[a-fA-F0-9]{24}$", "description": "The resource record value Id." } }, "required": [ "zoneName" ] }, "path": { "type": "string" }, "instances": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^apdi_[a-fA-F0-9]{24}$" }, "location": { "type": "string" }, "target": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "type": "string", "enum": [ "hyphenCloud", "aws", "azure", "googleCloud", "googleWorkspace", "github", "slack", "office365", "newRelic", "signoz", "datadog", "incidentIo", "npm", "microsoftTeams", "jira", "cloudflare", "dockerHub", "okta", "mosyle" ] } } }, "status": { "type": "string", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "url": { "type": "string" }, "buildId": { "type": "string", "minLength": 1, "pattern": "^abld_[a-fA-F0-9]{24}$" }, "archivedAt": { "type": "string", "format": "date-time" }, "min": { "type": "number" }, "max": { "type": "number" }, "cpu": { "type": "number" }, "memory": { "type": "number" } } } } } } }, "sites": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "buildId": { "type": "string", "minLength": 1, "pattern": "^abld_[a-fA-F0-9]{24}$" }, "id": { "type": "string", "pattern": "^sitd_[a-f0-9]{24}$" }, "connectionId": { "type": "string", "minLength": 1, "pattern": "^conn_[a-fA-F0-9]{24}$" }, "registryId": { "type": "string", "minLength": 1, "pattern": "^conn_[a-fA-F0-9]{24}$" }, "uri": { "type": "string", "minLength": 1, "description": "Artifact identifier, not a public serving URL." }, "siteId": { "type": "string" }, "url": { "type": "string", "format": "uri" }, "lastDeploymentRunId": { "type": "string", "minLength": 1, "pattern": "^depr_[a-fA-F0-9]{24}$" }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "target": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "type": "string", "enum": [ "hyphenCloud", "cloudflare" ] } }, "required": [ "id", "type" ] }, "status": { "type": "string", "enum": [ "Pending", "Running", "Success", "Error", "Canceled", "Queued" ] }, "archivedAt": { "type": "string", "format": "date-time" } }, "required": [ "app", "target", "status" ] } }, "firstSuccessfulDeploymentRun": { "type": "string", "format": "date-time" }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The environment Id.", "type": "string" }, "alternateId": { "description": "The environment alternate id. This id is set by the user and can be used to retrieve an environment.\n\nMust be unique within the project.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "name": { "description": "The environment name. Must be unique within the project.\n\nMust have a length between 1 and 100 characters.", "type": "string", "minLength": 1, "maxLength": 100 } }, "required": [ "id", "alternateId", "name" ] } } } }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "example": "2024-07-08T15:58:34.219+00:00" }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "example": "2024-07-08T15:58:34.219+00:00" }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "example": "2024-07-08T15:58:34.219+00:00" }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "id", "status", "deploymentId", "organization" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/deployments/{deploymentId}/runs/{runId}/status": { "put": { "summary": "Update the status for a deployment run", "tags": [ "Deployments" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "status": { "type": "string", "description": "The status of the run.", "enum": [ "canceling" ] } }, "required": [ "status" ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "deploymentId", "required": true, "description": "The deployment Id or alternate Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^depr_[a-fA-F0-9]{24}$" }, "in": "path", "name": "runId", "required": true } ], "responses": { "204": { "description": "Successfully updated deployment run status" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/deployments/{deploymentId}/runs/{runId}/logs": { "get": { "summary": "Get the logs for a given deployment run.", "tags": [ "Deployments" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1 }, "in": "path", "name": "deploymentId", "required": true, "description": "The deployment Id or alternate Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^depr_[a-fA-F0-9]{24}$" }, "in": "path", "name": "runId", "required": true } ], "responses": { "200": { "description": "Successfully got the logs for a deployment run", "content": { "application/json": { "schema": { "description": "Successfully got the logs for a deployment run", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "level": { "type": "string", "description": "The level of the log message.", "enum": [ "INFO", "WARN", "ERROR", "DEBUG" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dlog_[a-fA-F0-9]{24}$" }, "runId": { "type": "string", "minLength": 1, "pattern": "^depr_[a-fA-F0-9]{24}$" }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "message": { "type": "string", "description": "The log message." }, "timestamp": { "type": "number", "description": "The timestamp of the log message." }, "parents": { "type": "array", "items": { "type": "string", "minLength": 1, "pattern": "^dlog_[a-fA-F0-9]{24}$" } }, "stepId": { "type": "string", "description": "The id of the step associated with this log message." }, "parallelStepId": { "type": "string", "description": "The id of the parallel step associated with this log message." }, "taskId": { "type": "string", "description": "The id of the task associated with this log message." }, "userFacingErrorMessage": { "type": "string", "description": "Additional details related to the error" }, "retryable": { "type": "boolean", "description": "Whether or not the step can be retried for the given error" } }, "required": [ "level", "message", "timestamp", "id", "runId", "organization" ] } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/dns/zones/": { "get": { "summary": "Get a list of zones for an organization", "tags": [ "Zones" ], "parameters": [ { "schema": { "type": "integer", "minimum": 1, "default": 1 }, "in": "query", "name": "pageNum", "required": false, "description": "The page number." }, { "schema": { "type": "integer", "minimum": 5, "maximum": 200, "default": 50 }, "in": "query", "name": "pageSize", "required": false, "description": "The page size." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "Successfully got a list of zones for an organization", "content": { "application/json": { "schema": { "description": "Successfully got a list of zones for an organization", "type": "object", "additionalProperties": false, "properties": { "total": { "description": "The total number of records.", "type": "number" }, "pageNum": { "description": "The page number.", "type": "number" }, "pageSize": { "description": "The page size.", "type": "number" }, "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$", "description": "The zone Id." }, "name": { "type": "string", "description": "The DNS zone name (e.g., example.com)." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "example": "2024-07-08T15:58:34.219+00:00" }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "example": "2024-07-08T15:58:34.219+00:00" }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "example": "2024-07-08T15:58:34.219+00:00" }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "id", "name", "organization", "meta" ] } } }, "required": [ "total", "pageNum", "pageSize", "data" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/dns/zones/{zoneId}/": { "get": { "summary": "Get a zone for an organization", "tags": [ "Zones" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$" }, "in": "path", "name": "zoneId", "required": true, "description": "The zone Id." } ], "responses": { "200": { "description": "Successfully retrieved a zone for an organization", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$", "description": "The zone Id." }, "name": { "type": "string", "description": "The DNS zone name (e.g., example.com)." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "example": "2024-07-08T15:58:34.219+00:00" }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "example": "2024-07-08T15:58:34.219+00:00" }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "example": "2024-07-08T15:58:34.219+00:00" }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "id", "name", "organization", "meta" ], "description": "Successfully retrieved a zone for an organization" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "delete": { "summary": "Delete a zone for an organization", "tags": [ "Zones" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$" }, "in": "path", "name": "zoneId", "required": true, "description": "The zone Id." } ], "responses": { "204": { "description": "Successfully deleted the zone for an organization" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/dns/zones/{zoneId}/resource-records/": { "get": { "summary": "Get a list of resource records for a zone", "tags": [ "Resource Records" ], "parameters": [ { "schema": { "type": "integer", "minimum": 1, "default": 1 }, "in": "query", "name": "pageNum", "required": false, "description": "The page number." }, { "schema": { "type": "integer", "minimum": 5, "maximum": 200, "default": 50 }, "in": "query", "name": "pageSize", "required": false, "description": "The page size." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$" }, "in": "path", "name": "zoneId", "required": true, "description": "The zone Id." } ], "responses": { "200": { "description": "Successfully got a list of resource records for a zone", "content": { "application/json": { "schema": { "description": "Successfully got a list of resource records for a zone", "type": "object", "additionalProperties": false, "properties": { "total": { "description": "The total number of records.", "type": "number" }, "pageNum": { "description": "The page number.", "type": "number" }, "pageSize": { "description": "The page size.", "type": "number" }, "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^rrec_[a-fA-F0-9]{24}$", "description": "The resource record Id." }, "name": { "type": "string", "description": "Record name (e.g., @, www, _acme-challenge)." }, "type": { "type": "string", "enum": [ "A", "CNAME", "TXT" ], "description": "DNS record type." }, "values": { "type": "array", "description": "List of record values.", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The resource record value Id." }, "data": { "type": "string", "description": "The resource record data." }, "ttl": { "type": "number", "description": "Time to live for the record." } }, "required": [ "id", "data", "ttl" ] } }, "zone": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^zone_[a-fA-F0-9]{24}$", "description": "The zone Id." }, "name": { "type": "string", "description": "The DNS zone name (e.g., example.com)." } }, "required": [ "id", "name" ] }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "example": "2024-07-08T15:58:34.219+00:00" }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "example": "2024-07-08T15:58:34.219+00:00" }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "example": "2024-07-08T15:58:34.219+00:00" }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "id", "name", "type", "values", "zone", "organization", "meta" ] } } }, "required": [ "total", "pageNum", "pageSize", "data" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/dot-envs/": { "get": { "summary": "Get a list of the latest .env files for an organization", "tags": [ ".Env Files" ], "parameters": [ { "schema": { "type": "integer", "minimum": 1, "default": 1 }, "in": "query", "name": "pageNum", "required": false, "description": "The page number." }, { "schema": { "type": "integer", "minimum": 5, "maximum": 200, "default": 50 }, "in": "query", "name": "pageSize", "required": false, "description": "The page size." }, { "schema": { "type": "array", "items": { "type": "string" } }, "in": "query", "name": "projectIds", "required": false, "description": "The project Ids or alternate Ids." }, { "schema": { "type": "array", "items": { "type": "string" } }, "in": "query", "name": "appIds", "required": false, "description": "The app Ids or alternate Ids." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "Successfully got a list of the latest .env files for an organization", "content": { "application/json": { "schema": { "description": "Successfully got a list of the latest .env files for an organization", "type": "object", "additionalProperties": false, "properties": { "total": { "description": "The total number of records.", "type": "number" }, "pageNum": { "description": "The page number.", "type": "number" }, "pageSize": { "description": "The page size.", "type": "number" }, "data": { "type": "array", "items": { "type": "object", "properties": { "size": { "type": "string", "description": "The size of the .env file.", "example": "1kb" }, "countVariables": { "type": "number", "description": "The number of variables in the .env file.", "example": 1 }, "version": { "type": "number", "description": "The version of the .env file.", "minimum": 1, "example": 1 }, "secretKeyId": { "type": "number", "description": "The secret key id used to encrypt the .env file.", "minimum": 1, "example": 123 }, "published": { "type": "string", "format": "date-time", "description": "The date the .env file was published.", "example": "2024-01-01T00:00:00Z" }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The environment Id.", "type": "string" }, "alternateId": { "description": "The environment alternate id. This id is set by the user and can be used to retrieve an environment.\n\nMust be unique within the project.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "name": { "description": "The environment name. Must be unique within the project.\n\nMust have a length between 1 and 100 characters.", "type": "string", "minLength": 1, "maxLength": 100 } }, "required": [ "id", "alternateId", "name" ] } }, "required": [ "size", "countVariables", "version", "secretKeyId", "published", "organization", "project", "app" ], "additionalProperties": false } } }, "required": [ "total", "pageNum", "pageSize", "data" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/dot-envs/summary": { "get": { "summary": "Get a summary of .env usage for an organization", "tags": [ ".Env Files" ], "parameters": [ { "schema": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" } }, "in": "query", "name": "projectIds", "required": false, "description": "The project Ids." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "Successfully retrieved environment summary for the organization", "content": { "application/json": { "schema": { "description": "Successfully retrieved environment summary for the organization", "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 }, "apps": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The app Id.", "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The app alternate id. This id is set by the user and can be used to retrieve an app.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"projects\", \"apps\", \"environments\" or \"envs\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(projects|apps|environments|envs)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The app name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 }, "dotEnvData": { "type": "object", "additionalProperties": { "type": "object", "additionalProperties": false, "properties": { "countVariables": { "type": "number", "description": "The number of variables in the .env file.", "examples": [ 1, 5, 10 ] }, "version": { "type": "number", "description": "The version of the .env file.", "examples": [ 1 ], "minimum": 1 }, "size": { "type": "string", "description": "The size of the .env file.", "examples": [ "1kb", "1mb", "1gb" ] } }, "required": [ "countVariables", "version", "size" ] } }, "lastEvents": { "type": "object", "additionalProperties": false, "properties": { "push": { "type": "object", "additionalProperties": false, "properties": { "timestamp": { "description": "The timestamp of when the event occurred.", "type": "string", "format": "date-time" }, "member": { "description": "The member that performed the event. This is only present if the event was performed by an organization member or on behalf of an organization member.", "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The member Id.", "type": "string" }, "name": { "description": "The member name.", "type": "string" } }, "required": [ "id", "name" ] } }, "required": [ "timestamp" ] }, "pull": { "type": "object", "additionalProperties": false, "properties": { "timestamp": { "description": "The timestamp of when the event occurred.", "type": "string", "format": "date-time" }, "member": { "description": "The member that performed the event. This is only present if the event was performed by an organization member or on behalf of an organization member.", "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The member Id.", "type": "string" }, "name": { "description": "The member name.", "type": "string" } }, "required": [ "id", "name" ] } }, "required": [ "timestamp" ] }, "deny": { "type": "object", "additionalProperties": false, "properties": { "timestamp": { "description": "The timestamp of when the event occurred.", "type": "string", "format": "date-time" }, "member": { "description": "The member that performed the event. This is only present if the event was performed by an organization member or on behalf of an organization member.", "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The member Id.", "type": "string" }, "name": { "description": "The member name.", "type": "string" } }, "required": [ "id", "name" ] } }, "required": [ "timestamp" ] } } } }, "required": [ "id", "alternateId", "name", "dotEnvData", "lastEvents" ] } }, "projectEnvironments": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The environment Id.", "type": "string" }, "alternateId": { "description": "The environment alternate id. This id is set by the user and can be used to retrieve an environment.\n\nMust be unique within the project.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^[a-z0-9\\-_]+$" }, "name": { "description": "The environment name. Must be unique within the project.\n\nMust have a length between 1 and 100 characters.", "type": "string", "minLength": 1, "maxLength": 100 }, "color": { "description": "The environment color.\n\nMust be a valid hex color.", "type": "string", "pattern": "^#(?:[0-9a-fA-F]{3}){1,2}$" }, "type": { "description": "The environment type. Only one environment of type \"development\" or \"production\" is allowed per project", "type": "string", "enum": [ "development", "production", "custom" ] } }, "required": [ "id", "alternateId", "name", "color", "type" ] } } }, "required": [ "id", "alternateId", "name", "apps" ] } } }, "required": [ "data" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/incidents/": { "get": { "tags": [ "Incidents" ], "parameters": [ { "schema": { "type": "string", "enum": [ "open", "all", "unacknowledged", "acknowledged", "resolved" ], "default": "open" }, "in": "query", "name": "status", "required": false }, { "schema": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "in": "query", "name": "projectId", "required": false }, { "schema": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$" }, "in": "query", "name": "projectEnvironmentId", "required": false }, { "schema": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "in": "query", "name": "currentAssigneeMemberId", "required": false }, { "schema": { "type": "integer", "minimum": 1, "default": 1 }, "in": "query", "name": "pageNum", "required": false }, { "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 25 }, "in": "query", "name": "pageSize", "required": false }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "total": { "description": "The total number of records.", "type": "number" }, "pageNum": { "description": "The page number.", "type": "number" }, "pageSize": { "description": "The page size.", "type": "number" }, "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^inci_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "alternateId", "name" ] }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "alternateId", "name" ] }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "alternateId", "name" ] }, "source": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": [ "manual" ] }, "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" } }, "required": [ "type", "memberId" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": [ "agent" ] } }, "required": [ "type" ] } ] }, "status": { "type": "string", "enum": [ "unacknowledged", "acknowledged", "resolved" ] }, "responderMemberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "acknowledgment": { "type": "object", "additionalProperties": false, "properties": { "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "at": { "type": "string", "format": "date-time" } }, "required": [ "memberId", "at" ] }, "resolution": { "type": "object", "additionalProperties": false, "properties": { "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "at": { "type": "string", "format": "date-time" } }, "required": [ "memberId", "at" ] }, "currentAssignee": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "responder": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "canManage": { "type": "boolean" }, "isScopeAvailable": { "type": "boolean" }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "example": "2024-07-08T15:58:34.219+00:00" }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "example": "2024-07-08T15:58:34.219+00:00" }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "example": "2024-07-08T15:58:34.219+00:00" }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "id", "alternateId", "title", "description", "organization", "project", "projectEnvironment", "source", "status", "canManage", "isScopeAvailable", "meta" ] } } }, "required": [ "total", "pageNum", "pageSize", "data" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "post": { "tags": [ "Incidents" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "requestId": { "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }, "projectId": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "projectEnvironmentId": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$" }, "appId": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "title": { "type": "string", "minLength": 1, "maxLength": 200 }, "description": { "type": "string", "minLength": 1, "maxLength": 10000 } }, "required": [ "requestId", "projectId", "projectEnvironmentId", "title", "description" ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "201": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^inci_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "alternateId", "name" ] }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "alternateId", "name" ] }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "alternateId", "name" ] }, "source": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": [ "manual" ] }, "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" } }, "required": [ "type", "memberId" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": [ "agent" ] } }, "required": [ "type" ] } ] }, "status": { "type": "string", "enum": [ "unacknowledged", "acknowledged", "resolved" ] }, "responderMemberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "acknowledgment": { "type": "object", "additionalProperties": false, "properties": { "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "at": { "type": "string", "format": "date-time" } }, "required": [ "memberId", "at" ] }, "resolution": { "type": "object", "additionalProperties": false, "properties": { "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "at": { "type": "string", "format": "date-time" } }, "required": [ "memberId", "at" ] }, "currentAssignee": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "responder": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "canManage": { "type": "boolean" }, "isScopeAvailable": { "type": "boolean" }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "example": "2024-07-08T15:58:34.219+00:00" }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "example": "2024-07-08T15:58:34.219+00:00" }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "example": "2024-07-08T15:58:34.219+00:00" }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } }, "timeline": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "organizationId": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "incidentId": { "type": "string", "minLength": 1, "pattern": "^inci_[a-fA-F0-9]{24}$" }, "timestamp": { "type": "string", "format": "date-time" }, "type": { "type": "string", "enum": [ "created", "investigationStarted", "agentFindingsUpdated", "acknowledged", "responderReassigned", "resolved", "updateAdded" ] }, "actor": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "member", "agent" ] }, "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "type" ] }, "previousResponderMemberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "responderMemberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "message": { "type": "string" }, "summary": { "type": "string" } }, "required": [ "id", "organizationId", "incidentId", "timestamp", "type", "actor" ] } }, "notifications": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "organizationId": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "attemptedAt": { "type": "string", "format": "date-time" }, "recipientMemberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "recipient": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "status": { "type": "string", "enum": [ "pending", "accepted", "skipped", "failed" ] }, "code": { "type": "string" }, "results": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "channel": { "type": "string", "enum": [ "slack", "sms" ] }, "status": { "type": "string", "enum": [ "pending", "accepted", "skipped", "failed" ] }, "attemptedAt": { "type": "string", "format": "date-time" }, "completedAt": { "type": "string", "format": "date-time" }, "code": { "type": "string" } }, "required": [ "channel", "status" ] } }, "incidentId": { "type": "string", "minLength": 1, "pattern": "^inci_[a-fA-F0-9]{24}$" } }, "required": [ "id", "organizationId", "attemptedAt", "status", "results", "incidentId" ] } }, "nextReminderAt": { "type": "string", "format": "date-time" }, "candidates": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] } } }, "required": [ "id", "alternateId", "title", "description", "organization", "project", "projectEnvironment", "source", "status", "canManage", "isScopeAvailable", "meta", "timeline", "candidates", "notifications" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/incidents/coverage": { "get": { "tags": [ "Incidents" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "projects": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" }, "canManage": { "type": "boolean" }, "isEnabled": { "type": "boolean" }, "currentAssignee": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "openIncidentCount": { "type": "integer", "minimum": 0 }, "environments": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" }, "isSelected": { "type": "boolean" }, "openIncidentCount": { "type": "integer", "minimum": 0 } }, "required": [ "id", "alternateId", "name", "isSelected", "openIncidentCount" ] } } }, "required": [ "id", "alternateId", "name", "canManage", "isEnabled", "openIncidentCount", "environments" ] } } }, "required": [ "projects" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/incidents/{incidentId}": { "get": { "tags": [ "Incidents" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "maxLength": 200 }, "in": "path", "name": "incidentId", "required": true } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^inci_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "alternateId", "name" ] }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "alternateId", "name" ] }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "alternateId", "name" ] }, "source": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": [ "manual" ] }, "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" } }, "required": [ "type", "memberId" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": [ "agent" ] } }, "required": [ "type" ] } ] }, "status": { "type": "string", "enum": [ "unacknowledged", "acknowledged", "resolved" ] }, "responderMemberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "acknowledgment": { "type": "object", "additionalProperties": false, "properties": { "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "at": { "type": "string", "format": "date-time" } }, "required": [ "memberId", "at" ] }, "resolution": { "type": "object", "additionalProperties": false, "properties": { "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "at": { "type": "string", "format": "date-time" } }, "required": [ "memberId", "at" ] }, "currentAssignee": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "responder": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "canManage": { "type": "boolean" }, "isScopeAvailable": { "type": "boolean" }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "example": "2024-07-08T15:58:34.219+00:00" }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "example": "2024-07-08T15:58:34.219+00:00" }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "example": "2024-07-08T15:58:34.219+00:00" }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } }, "timeline": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "organizationId": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "incidentId": { "type": "string", "minLength": 1, "pattern": "^inci_[a-fA-F0-9]{24}$" }, "timestamp": { "type": "string", "format": "date-time" }, "type": { "type": "string", "enum": [ "created", "investigationStarted", "agentFindingsUpdated", "acknowledged", "responderReassigned", "resolved", "updateAdded" ] }, "actor": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "member", "agent" ] }, "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "type" ] }, "previousResponderMemberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "responderMemberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "message": { "type": "string" }, "summary": { "type": "string" } }, "required": [ "id", "organizationId", "incidentId", "timestamp", "type", "actor" ] } }, "notifications": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "organizationId": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "attemptedAt": { "type": "string", "format": "date-time" }, "recipientMemberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "recipient": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "status": { "type": "string", "enum": [ "pending", "accepted", "skipped", "failed" ] }, "code": { "type": "string" }, "results": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "channel": { "type": "string", "enum": [ "slack", "sms" ] }, "status": { "type": "string", "enum": [ "pending", "accepted", "skipped", "failed" ] }, "attemptedAt": { "type": "string", "format": "date-time" }, "completedAt": { "type": "string", "format": "date-time" }, "code": { "type": "string" } }, "required": [ "channel", "status" ] } }, "incidentId": { "type": "string", "minLength": 1, "pattern": "^inci_[a-fA-F0-9]{24}$" } }, "required": [ "id", "organizationId", "attemptedAt", "status", "results", "incidentId" ] } }, "nextReminderAt": { "type": "string", "format": "date-time" }, "candidates": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] } } }, "required": [ "id", "alternateId", "title", "description", "organization", "project", "projectEnvironment", "source", "status", "canManage", "isScopeAvailable", "meta", "timeline", "candidates", "notifications" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/incidents/{incidentId}/acknowledge": { "post": { "tags": [ "Incidents" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "requestId": { "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" } }, "required": [ "requestId" ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "maxLength": 200 }, "in": "path", "name": "incidentId", "required": true } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^inci_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "alternateId", "name" ] }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "alternateId", "name" ] }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "alternateId", "name" ] }, "source": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": [ "manual" ] }, "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" } }, "required": [ "type", "memberId" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": [ "agent" ] } }, "required": [ "type" ] } ] }, "status": { "type": "string", "enum": [ "unacknowledged", "acknowledged", "resolved" ] }, "responderMemberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "acknowledgment": { "type": "object", "additionalProperties": false, "properties": { "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "at": { "type": "string", "format": "date-time" } }, "required": [ "memberId", "at" ] }, "resolution": { "type": "object", "additionalProperties": false, "properties": { "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "at": { "type": "string", "format": "date-time" } }, "required": [ "memberId", "at" ] }, "currentAssignee": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "responder": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "canManage": { "type": "boolean" }, "isScopeAvailable": { "type": "boolean" }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "example": "2024-07-08T15:58:34.219+00:00" }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "example": "2024-07-08T15:58:34.219+00:00" }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "example": "2024-07-08T15:58:34.219+00:00" }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } }, "timeline": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "organizationId": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "incidentId": { "type": "string", "minLength": 1, "pattern": "^inci_[a-fA-F0-9]{24}$" }, "timestamp": { "type": "string", "format": "date-time" }, "type": { "type": "string", "enum": [ "created", "investigationStarted", "agentFindingsUpdated", "acknowledged", "responderReassigned", "resolved", "updateAdded" ] }, "actor": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "member", "agent" ] }, "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "type" ] }, "previousResponderMemberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "responderMemberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "message": { "type": "string" }, "summary": { "type": "string" } }, "required": [ "id", "organizationId", "incidentId", "timestamp", "type", "actor" ] } }, "notifications": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "organizationId": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "attemptedAt": { "type": "string", "format": "date-time" }, "recipientMemberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "recipient": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "status": { "type": "string", "enum": [ "pending", "accepted", "skipped", "failed" ] }, "code": { "type": "string" }, "results": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "channel": { "type": "string", "enum": [ "slack", "sms" ] }, "status": { "type": "string", "enum": [ "pending", "accepted", "skipped", "failed" ] }, "attemptedAt": { "type": "string", "format": "date-time" }, "completedAt": { "type": "string", "format": "date-time" }, "code": { "type": "string" } }, "required": [ "channel", "status" ] } }, "incidentId": { "type": "string", "minLength": 1, "pattern": "^inci_[a-fA-F0-9]{24}$" } }, "required": [ "id", "organizationId", "attemptedAt", "status", "results", "incidentId" ] } }, "nextReminderAt": { "type": "string", "format": "date-time" }, "candidates": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] } } }, "required": [ "id", "alternateId", "title", "description", "organization", "project", "projectEnvironment", "source", "status", "canManage", "isScopeAvailable", "meta", "timeline", "candidates", "notifications" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/incidents/{incidentId}/reassign": { "post": { "tags": [ "Incidents" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "requestId": { "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }, "responderMemberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" } }, "required": [ "requestId", "responderMemberId" ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "maxLength": 200 }, "in": "path", "name": "incidentId", "required": true } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^inci_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "alternateId", "name" ] }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "alternateId", "name" ] }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "alternateId", "name" ] }, "source": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": [ "manual" ] }, "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" } }, "required": [ "type", "memberId" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": [ "agent" ] } }, "required": [ "type" ] } ] }, "status": { "type": "string", "enum": [ "unacknowledged", "acknowledged", "resolved" ] }, "responderMemberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "acknowledgment": { "type": "object", "additionalProperties": false, "properties": { "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "at": { "type": "string", "format": "date-time" } }, "required": [ "memberId", "at" ] }, "resolution": { "type": "object", "additionalProperties": false, "properties": { "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "at": { "type": "string", "format": "date-time" } }, "required": [ "memberId", "at" ] }, "currentAssignee": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "responder": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "canManage": { "type": "boolean" }, "isScopeAvailable": { "type": "boolean" }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "example": "2024-07-08T15:58:34.219+00:00" }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "example": "2024-07-08T15:58:34.219+00:00" }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "example": "2024-07-08T15:58:34.219+00:00" }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } }, "timeline": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "organizationId": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "incidentId": { "type": "string", "minLength": 1, "pattern": "^inci_[a-fA-F0-9]{24}$" }, "timestamp": { "type": "string", "format": "date-time" }, "type": { "type": "string", "enum": [ "created", "investigationStarted", "agentFindingsUpdated", "acknowledged", "responderReassigned", "resolved", "updateAdded" ] }, "actor": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "member", "agent" ] }, "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "type" ] }, "previousResponderMemberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "responderMemberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "message": { "type": "string" }, "summary": { "type": "string" } }, "required": [ "id", "organizationId", "incidentId", "timestamp", "type", "actor" ] } }, "notifications": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "organizationId": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "attemptedAt": { "type": "string", "format": "date-time" }, "recipientMemberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "recipient": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "status": { "type": "string", "enum": [ "pending", "accepted", "skipped", "failed" ] }, "code": { "type": "string" }, "results": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "channel": { "type": "string", "enum": [ "slack", "sms" ] }, "status": { "type": "string", "enum": [ "pending", "accepted", "skipped", "failed" ] }, "attemptedAt": { "type": "string", "format": "date-time" }, "completedAt": { "type": "string", "format": "date-time" }, "code": { "type": "string" } }, "required": [ "channel", "status" ] } }, "incidentId": { "type": "string", "minLength": 1, "pattern": "^inci_[a-fA-F0-9]{24}$" } }, "required": [ "id", "organizationId", "attemptedAt", "status", "results", "incidentId" ] } }, "nextReminderAt": { "type": "string", "format": "date-time" }, "candidates": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] } } }, "required": [ "id", "alternateId", "title", "description", "organization", "project", "projectEnvironment", "source", "status", "canManage", "isScopeAvailable", "meta", "timeline", "candidates", "notifications" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/incidents/{incidentId}/resolve": { "post": { "tags": [ "Incidents" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "requestId": { "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" } }, "required": [ "requestId" ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "maxLength": 200 }, "in": "path", "name": "incidentId", "required": true } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^inci_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "alternateId", "name" ] }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "alternateId", "name" ] }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "alternateId", "name" ] }, "source": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": [ "manual" ] }, "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" } }, "required": [ "type", "memberId" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": [ "agent" ] } }, "required": [ "type" ] } ] }, "status": { "type": "string", "enum": [ "unacknowledged", "acknowledged", "resolved" ] }, "responderMemberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "acknowledgment": { "type": "object", "additionalProperties": false, "properties": { "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "at": { "type": "string", "format": "date-time" } }, "required": [ "memberId", "at" ] }, "resolution": { "type": "object", "additionalProperties": false, "properties": { "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "at": { "type": "string", "format": "date-time" } }, "required": [ "memberId", "at" ] }, "currentAssignee": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "responder": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "canManage": { "type": "boolean" }, "isScopeAvailable": { "type": "boolean" }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "example": "2024-07-08T15:58:34.219+00:00" }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "example": "2024-07-08T15:58:34.219+00:00" }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "example": "2024-07-08T15:58:34.219+00:00" }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } }, "timeline": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "organizationId": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "incidentId": { "type": "string", "minLength": 1, "pattern": "^inci_[a-fA-F0-9]{24}$" }, "timestamp": { "type": "string", "format": "date-time" }, "type": { "type": "string", "enum": [ "created", "investigationStarted", "agentFindingsUpdated", "acknowledged", "responderReassigned", "resolved", "updateAdded" ] }, "actor": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "member", "agent" ] }, "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "type" ] }, "previousResponderMemberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "responderMemberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "message": { "type": "string" }, "summary": { "type": "string" } }, "required": [ "id", "organizationId", "incidentId", "timestamp", "type", "actor" ] } }, "notifications": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "organizationId": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "attemptedAt": { "type": "string", "format": "date-time" }, "recipientMemberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "recipient": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "status": { "type": "string", "enum": [ "pending", "accepted", "skipped", "failed" ] }, "code": { "type": "string" }, "results": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "channel": { "type": "string", "enum": [ "slack", "sms" ] }, "status": { "type": "string", "enum": [ "pending", "accepted", "skipped", "failed" ] }, "attemptedAt": { "type": "string", "format": "date-time" }, "completedAt": { "type": "string", "format": "date-time" }, "code": { "type": "string" } }, "required": [ "channel", "status" ] } }, "incidentId": { "type": "string", "minLength": 1, "pattern": "^inci_[a-fA-F0-9]{24}$" } }, "required": [ "id", "organizationId", "attemptedAt", "status", "results", "incidentId" ] } }, "nextReminderAt": { "type": "string", "format": "date-time" }, "candidates": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] } } }, "required": [ "id", "alternateId", "title", "description", "organization", "project", "projectEnvironment", "source", "status", "canManage", "isScopeAvailable", "meta", "timeline", "candidates", "notifications" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/incidents/{incidentId}/updates": { "post": { "tags": [ "Incidents" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "requestId": { "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }, "message": { "type": "string", "minLength": 1, "maxLength": 10000 } }, "required": [ "requestId", "message" ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "maxLength": 200 }, "in": "path", "name": "incidentId", "required": true } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^inci_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "alternateId", "name" ] }, "projectEnvironment": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "alternateId", "name" ] }, "app": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "id", "alternateId", "name" ] }, "source": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": [ "manual" ] }, "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" } }, "required": [ "type", "memberId" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "enum": [ "agent" ] } }, "required": [ "type" ] } ] }, "status": { "type": "string", "enum": [ "unacknowledged", "acknowledged", "resolved" ] }, "responderMemberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "acknowledgment": { "type": "object", "additionalProperties": false, "properties": { "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "at": { "type": "string", "format": "date-time" } }, "required": [ "memberId", "at" ] }, "resolution": { "type": "object", "additionalProperties": false, "properties": { "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "at": { "type": "string", "format": "date-time" } }, "required": [ "memberId", "at" ] }, "currentAssignee": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "responder": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "canManage": { "type": "boolean" }, "isScopeAvailable": { "type": "boolean" }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "example": "2024-07-08T15:58:34.219+00:00" }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "example": "2024-07-08T15:58:34.219+00:00" }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "example": "2024-07-08T15:58:34.219+00:00" }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } }, "timeline": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "organizationId": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "incidentId": { "type": "string", "minLength": 1, "pattern": "^inci_[a-fA-F0-9]{24}$" }, "timestamp": { "type": "string", "format": "date-time" }, "type": { "type": "string", "enum": [ "created", "investigationStarted", "agentFindingsUpdated", "acknowledged", "responderReassigned", "resolved", "updateAdded" ] }, "actor": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "member", "agent" ] }, "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "type" ] }, "previousResponderMemberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "responderMemberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "message": { "type": "string" }, "summary": { "type": "string" } }, "required": [ "id", "organizationId", "incidentId", "timestamp", "type", "actor" ] } }, "notifications": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "organizationId": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "attemptedAt": { "type": "string", "format": "date-time" }, "recipientMemberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "recipient": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] }, "status": { "type": "string", "enum": [ "pending", "accepted", "skipped", "failed" ] }, "code": { "type": "string" }, "results": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "channel": { "type": "string", "enum": [ "slack", "sms" ] }, "status": { "type": "string", "enum": [ "pending", "accepted", "skipped", "failed" ] }, "attemptedAt": { "type": "string", "format": "date-time" }, "completedAt": { "type": "string", "format": "date-time" }, "code": { "type": "string" } }, "required": [ "channel", "status" ] } }, "incidentId": { "type": "string", "minLength": 1, "pattern": "^inci_[a-fA-F0-9]{24}$" } }, "required": [ "id", "organizationId", "attemptedAt", "status", "results", "incidentId" ] } }, "nextReminderAt": { "type": "string", "format": "date-time" }, "candidates": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "id", "name" ] } } }, "required": [ "id", "alternateId", "title", "description", "organization", "project", "projectEnvironment", "source", "status", "canManage", "isScopeAvailable", "meta", "timeline", "candidates", "notifications" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/integration-invites/": { "post": { "summary": "Get an integration invite for an organization", "tags": [ "Organization Integrations" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "slack", "googleCloud", "azure", "googleWorkspace", "office365", "microsoftTeams", "aws" ] }, "codeChallenge": { "type": "string" }, "region": { "type": "string" } } } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "201": { "description": "Successfully got an integration invite for an organization", "content": { "application/json": { "schema": { "description": "Successfully got an integration invite for an organization", "type": "object", "additionalProperties": false, "required": [ "type", "url" ], "properties": { "type": { "type": "string", "enum": [ "slack", "googleCloud", "azure", "googleWorkspace", "office365", "microsoftTeams", "aws" ] }, "url": { "type": "string" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/integrations/": { "post": { "summary": "Create an integration for an organization", "tags": [ "Organization Integrations" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "oneOf": [ { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "github" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "githubOrgId": { "description": "The GitHub organization id.", "type": "integer" }, "githubOrgName": { "description": "The GitHub organization name.", "type": "string" }, "installationId": { "description": "The GitHub installation id received after installing Hyphen app.", "type": "integer" }, "verificationEmail": { "description": "The email address to verify connections.", "type": "string", "format": "email" } }, "required": [ "installationId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "aws" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "region": { "description": "The AWS default region", "type": "string" }, "managementAccountId": { "description": "The AWS management account id", "type": "string" }, "name": { "description": "The AWS account id", "type": "string" }, "identityProvider": { "description": "The identity provider type.", "type": "string", "enum": [ "googleWorkspace" ] }, "identityStoreId": { "description": "The identity store id.", "type": [ "string", "null" ] }, "identityStoreArn": { "description": "The identity store ARN.", "type": [ "string", "null" ] }, "permissionSetArn": { "description": "The permission set ARN.", "type": [ "string", "null" ] }, "username": { "description": "The username for accessing AWS resources.", "type": "string" }, "accessKeyId": { "description": "The access key id for accessing AWS resources.", "type": "string" } }, "required": [ "managementAccountId", "region" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "slack" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "token": { "description": "The bot user token.", "type": "string" } }, "required": [ "token" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "jira" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "cloudId": { "description": "The Jira cloud id.", "type": "string" }, "email": { "description": "The Jira admin email.", "type": "string" }, "apiToken": { "description": "The Jira API token.", "type": "string" }, "organizationId": { "description": "The Jira organization id.", "type": "string" } }, "required": [ "cloudId", "email", "apiToken", "organizationId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "datadog" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "site": { "type": "string", "enum": [ "datadoghq.com", "us3.datadoghq.com", "us5.datadoghq.com", "datadoghq.eu", "ap1.datadoghq.com", "ap2.datadoghq.com", "uk1.datadoghq.com", "ddog-gov.com", "us2.ddog-gov.com" ] }, "accessToken": { "type": "string", "minLength": 1, "maxLength": 4096 } }, "required": [ "accessToken" ] }, "options": { "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "signoz" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "hosting": { "type": "string", "enum": [ "cloud", "selfHosted" ] }, "apiBaseUrl": { "type": "string", "format": "uri", "maxLength": 2048 }, "uiBaseUrl": { "type": "string", "format": "uri", "maxLength": 2048 }, "apiKey": { "type": "string", "minLength": 1, "maxLength": 4096 } }, "required": [ "hosting", "apiBaseUrl", "apiKey" ] }, "options": { "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "newRelic" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "token": { "description": "The New Relic API token.", "type": "string" }, "accountId": { "description": "The New Relic account id.", "type": "number" }, "accountName": { "description": "The New Relic account name.", "type": "string" } }, "required": [ "token" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "mosyle" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "email": { "description": "Mosyle API account email.", "type": "string", "format": "email" }, "password": { "description": "Mosyle API account password.", "type": "string", "minLength": 1 }, "accessToken": { "description": "Mosyle Business API access token.", "type": "string", "minLength": 1 } }, "required": [ "email", "password", "accessToken" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "okta" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "orgUrl": { "description": "The Okta-managed organization URL.", "type": "string" }, "clientId": { "description": "The Okta OAuth client id.", "type": "string" }, "clientSecret": { "description": "The Okta OAuth client secret.", "type": "string" } }, "required": [ "orgUrl", "clientId", "clientSecret" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "npm" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "organizationName": { "description": "The NPM organization name.", "type": "string" }, "token": { "description": "The NPM access token.", "type": "string" } }, "required": [ "organizationName", "token" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "incidentIo" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "token": { "description": "The incident.io user token.", "type": "string" } }, "required": [ "token" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "microsoftTeams" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "azureTenantId": { "description": "The Azure tenant id.", "type": "string" }, "token": { "description": "The Microsoft Teams API token.", "type": "string" } }, "required": [ "azureTenantId", "token" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "cloudflare" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "accountId": { "description": "The Cloudflare account id.", "type": "string" }, "r2": { "type": "object", "additionalProperties": false, "properties": { "jurisdiction": { "type": "string", "enum": [ "eu", "us", "fedramp" ] } } }, "zoneId": { "description": "The Cloudflare zone id.", "type": "string", "deprecated": true }, "apiToken": { "description": "The Cloudflare API token.", "type": "string" } }, "required": [ "accountId", "apiToken" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "googleCloud" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "googleCloudOrganizationId": { "description": "The Google Cloud organization id.", "type": "string" }, "googleCloudBillingAccountId": { "description": "The Google Cloud billing account id.", "type": "string" }, "token": { "description": "The Google user token", "type": "string" } }, "required": [ "googleCloudOrganizationId", "token" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "googleWorkspace" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "domain": { "description": "The Google Workspace domain.", "type": "string" }, "adminUserEmail": { "description": "The Google Workspace administrator's email address.", "type": "string" }, "token": { "description": "The Google user token", "type": "string" } }, "required": [ "domain", "adminUserEmail", "token" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "azure" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "azureTenantId": { "description": "The Azure tenant id.", "type": "string" }, "subscriptionId": { "description": "The Azure subscription id.", "type": "string" }, "token": { "description": "The Azure API token.", "type": "string" } }, "required": [ "azureTenantId", "token" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "office365" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "azureTenantId": { "description": "The Azure tenant id for Office 365.", "type": "string" }, "name": { "description": "The Office 365 tenant name.", "type": "string" }, "token": { "description": "The Office 365 API token.", "type": "string" } }, "required": [ "azureTenantId", "token" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "dockerHub" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "organizationName": { "description": "The DockerHub organization name.", "type": "string" }, "organizationAccessToken": { "description": "The DockerHub organization access token.", "type": "string" }, "adminUsername": { "description": "The username of the admin user", "type": "string" }, "adminPersonalAccessToken": { "description": "The personal access token for the admin user.", "type": "string" } }, "required": [ "organizationName", "organizationAccessToken", "adminUsername", "adminPersonalAccessToken" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] } ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "201": { "description": "Successfully created an integration for an organization", "content": { "application/json": { "schema": { "type": "object", "oneOf": [ { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "aws" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "region": { "description": "The AWS default region", "type": "string" }, "managementAccountId": { "description": "The AWS management account id", "type": "string" }, "name": { "description": "The AWS account id", "type": "string" }, "identityProvider": { "description": "The identity provider type.", "type": "string", "enum": [ "googleWorkspace" ] }, "identityStoreId": { "description": "The identity store id.", "type": [ "string", "null" ] }, "identityStoreArn": { "description": "The identity store ARN.", "type": [ "string", "null" ] }, "permissionSetArn": { "description": "The permission set ARN.", "type": [ "string", "null" ] }, "username": { "description": "The username for accessing AWS resources.", "type": "string" }, "accessKeyId": { "description": "The access key id for accessing AWS resources.", "type": "string" } }, "required": [ "managementAccountId", "region" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "cloudflare" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "accountId": { "description": "The Cloudflare account id.", "type": "string" }, "r2": { "type": "object", "additionalProperties": false, "properties": { "jurisdiction": { "type": "string", "enum": [ "eu", "us", "fedramp" ] } } }, "zoneId": { "description": "The Cloudflare zone id.", "type": "string", "deprecated": true }, "hostname": { "description": "The Cloudflare zone hostname.", "type": "string" } }, "required": [ "accountId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "github" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "githubOrgId": { "description": "The GitHub organization id.", "type": "integer" }, "githubOrgName": { "description": "The GitHub organization name.", "type": "string" }, "installationId": { "description": "The GitHub installation id received after installing Hyphen app.", "type": "integer" }, "verificationEmail": { "description": "The email address to verify connections.", "type": "string", "format": "email" } }, "required": [ "installationId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "slack" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "workspaceId": { "description": "The Slack workspace id.", "type": "string" }, "workspaceName": { "description": "The Slack workspace name.", "type": "string" } }, "required": [ "workspaceId", "workspaceName" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "jira" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "cloudId": { "description": "The Jira cloud id.", "type": "string" }, "email": { "description": "The Jira admin email.", "type": "string" }, "organizationId": { "description": "The Jira organization id.", "type": "string" }, "accountId": { "description": "The Jira account id.", "type": "string" } }, "required": [ "cloudId", "email", "organizationId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "datadog" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "site": { "type": "string", "enum": [ "datadoghq.com", "us3.datadoghq.com", "us5.datadoghq.com", "datadoghq.eu", "ap1.datadoghq.com", "ap2.datadoghq.com", "uk1.datadoghq.com", "ddog-gov.com", "us2.ddog-gov.com" ] } }, "required": [ "site" ] }, "options": { "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "signoz" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "hosting": { "type": "string", "enum": [ "cloud", "selfHosted" ] }, "apiBaseUrl": { "type": "string", "format": "uri", "maxLength": 2048 }, "uiBaseUrl": { "type": "string", "format": "uri", "maxLength": 2048 } }, "required": [ "hosting", "apiBaseUrl" ] }, "options": { "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "newRelic" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "accountId": { "description": "The New Relic account id.", "type": "number" }, "accountName": { "description": "The New Relic account name.", "type": "string" } }, "required": [ "accountId", "accountName" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "mosyle" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "email": { "description": "Mosyle API account email.", "type": "string", "format": "email" } }, "required": [ "email" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "okta" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "orgUrl": { "description": "The Okta-managed organization URL.", "type": "string" }, "clientId": { "description": "The Okta OAuth client id.", "type": "string" } }, "required": [ "orgUrl", "clientId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "npm" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "organizationName": { "description": "The NPM organization name.", "type": "string" }, "organizationId": { "description": "The NPM organization id.", "type": "string" } }, "required": [ "organizationName", "organizationId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "incidentIo" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "organizationName": { "description": "The incident.io organization name.", "type": "string" }, "dashboardUrl": { "description": "The incident.io dashboard URL.", "type": "string" }, "catalogServiceTypeId": { "description": "The catalog service type id.", "type": "string" }, "catalogUserTypeId": { "description": "The catalog user type id.", "type": "string" }, "catalogTeamType": { "description": "The catalog team type.", "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The catalog team type id.", "type": "string" }, "memberAttributeId": { "description": "The catalog team member attribute id.", "type": "string" } }, "required": [ "id", "memberAttributeId" ] } }, "required": [ "catalogServiceTypeId", "catalogUserTypeId", "catalogTeamType", "dashboardUrl", "organizationName" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "microsoftTeams" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "azureTenantId": { "description": "The Azure tenant id.", "type": "string" }, "name": { "description": "The Azure tenant name.", "type": "string" }, "defaultTeamId": { "description": "The default Microsoft Teams Id to manage channels within.", "type": "string" } }, "required": [ "azureTenantId", "name", "defaultTeamId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "googleCloud" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "googleCloudOrganizationId": { "description": "The Google Cloud organization id.", "type": "string" }, "googleCloudOrganizationName": { "description": "The Google Cloud organization name.", "type": "string" }, "googleCloudBillingAccountId": { "description": "The Google Cloud billing account id.", "type": "string" }, "googleCloudBillingAccountName": { "description": "The Google Cloud billing account name.", "type": "string" }, "tags": { "description": "The Google Cloud tags to apply to resources.", "type": "object", "properties": { "hxAllUsersIngress": { "description": "The tag to apply to all users ingress resources.", "type": "string" } }, "additionalProperties": false } }, "required": [ "googleCloudOrganizationId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "googleWorkspace" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "domain": { "description": "The Google Workspace domain.", "type": "string" }, "adminUserEmail": { "description": "The Google Workspace administrator's email address.", "type": "string" }, "customerId": { "description": "The Google Workspace customer id.", "type": "string" } }, "required": [ "domain", "adminUserEmail" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "azure" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "azureTenantId": { "description": "The Azure tenant id.", "type": "string" }, "subscriptionId": { "description": "The Azure subscription id.", "type": "string" }, "name": { "description": "The Azure tenant name.", "type": "string" } }, "required": [ "azureTenantId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "office365" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "azureTenantId": { "description": "The Azure tenant id for Office 365.", "type": "string" }, "name": { "description": "The Office 365 tenant name.", "type": "string" } }, "required": [ "azureTenantId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "dockerHub" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "organizationName": { "description": "The DockerHub organization name" }, "adminUsername": { "description": "The username of the admin user" } }, "required": [ "organizationName", "adminUsername" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "hyphenCloud" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "orgId": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" } }, "required": [ "orgId" ] } }, "required": [ "type", "config" ] } ], "properties": { "id": { "description": "The integration Id.", "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "provides": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "connectionType": { "description": "The connection type.", "type": "string", "enum": [ "DistributionList", "Channel", "PermissionGroup", "Folder", "Tag", "CloudWorkspace", "CodeRepository", "ProjectBoard", "User", "IncidentManagement", "APM", "CodeRegistry", "ContainerRegistry", "SiteRegistry", "StaticSite", "ProxyContainerRegistry", "NetworkGroup", "CloudNativeContainer", "DNSRecord", "DNSZone", "LoadBalancer", "BackendPool", "BackendEndpoint", "CustomDomain", "SSLCertificate", "ObjectStorage", "KubernetesObservability", "ManagedKubernetesCluster" ] }, "for": { "type": "array", "items": { "type": "string", "enum": [ "Organization", "Team", "Project", "ProjectEnvironment", "App", "KubernetesCluster", "Member", "SiteDeployment", "EnvironmentResources", "EnvironmentRegion", "AppDeploymentInstance", "ResourceRecord", "ResourceRecordValue", "Zone", "EnvironmentIngress", "AppDeployment", "EnvironmentStorage" ] } } } } } }, "required": [ "id" ], "description": "Successfully created an integration for an organization" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "get": { "summary": "Get a list of integrations for an organization", "tags": [ "Organization Integrations" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "Successfully got a list of integrations for an organization", "content": { "application/json": { "schema": { "type": "object", "description": "Successfully got a list of integrations for an organization", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "oneOf": [ { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "aws" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "region": { "description": "The AWS default region", "type": "string" }, "managementAccountId": { "description": "The AWS management account id", "type": "string" }, "name": { "description": "The AWS account id", "type": "string" }, "identityProvider": { "description": "The identity provider type.", "type": "string", "enum": [ "googleWorkspace" ] }, "identityStoreId": { "description": "The identity store id.", "type": [ "string", "null" ] }, "identityStoreArn": { "description": "The identity store ARN.", "type": [ "string", "null" ] }, "permissionSetArn": { "description": "The permission set ARN.", "type": [ "string", "null" ] }, "username": { "description": "The username for accessing AWS resources.", "type": "string" }, "accessKeyId": { "description": "The access key id for accessing AWS resources.", "type": "string" } }, "required": [ "managementAccountId", "region" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "cloudflare" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "accountId": { "description": "The Cloudflare account id.", "type": "string" }, "r2": { "type": "object", "additionalProperties": false, "properties": { "jurisdiction": { "type": "string", "enum": [ "eu", "us", "fedramp" ] } } }, "zoneId": { "description": "The Cloudflare zone id.", "type": "string", "deprecated": true }, "hostname": { "description": "The Cloudflare zone hostname.", "type": "string" } }, "required": [ "accountId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "github" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "githubOrgId": { "description": "The GitHub organization id.", "type": "integer" }, "githubOrgName": { "description": "The GitHub organization name.", "type": "string" }, "installationId": { "description": "The GitHub installation id received after installing Hyphen app.", "type": "integer" }, "verificationEmail": { "description": "The email address to verify connections.", "type": "string", "format": "email" } }, "required": [ "installationId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "slack" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "workspaceId": { "description": "The Slack workspace id.", "type": "string" }, "workspaceName": { "description": "The Slack workspace name.", "type": "string" } }, "required": [ "workspaceId", "workspaceName" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "jira" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "cloudId": { "description": "The Jira cloud id.", "type": "string" }, "email": { "description": "The Jira admin email.", "type": "string" }, "organizationId": { "description": "The Jira organization id.", "type": "string" }, "accountId": { "description": "The Jira account id.", "type": "string" } }, "required": [ "cloudId", "email", "organizationId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "datadog" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "site": { "type": "string", "enum": [ "datadoghq.com", "us3.datadoghq.com", "us5.datadoghq.com", "datadoghq.eu", "ap1.datadoghq.com", "ap2.datadoghq.com", "uk1.datadoghq.com", "ddog-gov.com", "us2.ddog-gov.com" ] } }, "required": [ "site" ] }, "options": { "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "signoz" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "hosting": { "type": "string", "enum": [ "cloud", "selfHosted" ] }, "apiBaseUrl": { "type": "string", "format": "uri", "maxLength": 2048 }, "uiBaseUrl": { "type": "string", "format": "uri", "maxLength": 2048 } }, "required": [ "hosting", "apiBaseUrl" ] }, "options": { "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "newRelic" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "accountId": { "description": "The New Relic account id.", "type": "number" }, "accountName": { "description": "The New Relic account name.", "type": "string" } }, "required": [ "accountId", "accountName" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "mosyle" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "email": { "description": "Mosyle API account email.", "type": "string", "format": "email" } }, "required": [ "email" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "okta" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "orgUrl": { "description": "The Okta-managed organization URL.", "type": "string" }, "clientId": { "description": "The Okta OAuth client id.", "type": "string" } }, "required": [ "orgUrl", "clientId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "npm" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "organizationName": { "description": "The NPM organization name.", "type": "string" }, "organizationId": { "description": "The NPM organization id.", "type": "string" } }, "required": [ "organizationName", "organizationId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "incidentIo" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "organizationName": { "description": "The incident.io organization name.", "type": "string" }, "dashboardUrl": { "description": "The incident.io dashboard URL.", "type": "string" }, "catalogServiceTypeId": { "description": "The catalog service type id.", "type": "string" }, "catalogUserTypeId": { "description": "The catalog user type id.", "type": "string" }, "catalogTeamType": { "description": "The catalog team type.", "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The catalog team type id.", "type": "string" }, "memberAttributeId": { "description": "The catalog team member attribute id.", "type": "string" } }, "required": [ "id", "memberAttributeId" ] } }, "required": [ "catalogServiceTypeId", "catalogUserTypeId", "catalogTeamType", "dashboardUrl", "organizationName" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "microsoftTeams" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "azureTenantId": { "description": "The Azure tenant id.", "type": "string" }, "name": { "description": "The Azure tenant name.", "type": "string" }, "defaultTeamId": { "description": "The default Microsoft Teams Id to manage channels within.", "type": "string" } }, "required": [ "azureTenantId", "name", "defaultTeamId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "googleCloud" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "googleCloudOrganizationId": { "description": "The Google Cloud organization id.", "type": "string" }, "googleCloudOrganizationName": { "description": "The Google Cloud organization name.", "type": "string" }, "googleCloudBillingAccountId": { "description": "The Google Cloud billing account id.", "type": "string" }, "googleCloudBillingAccountName": { "description": "The Google Cloud billing account name.", "type": "string" }, "tags": { "description": "The Google Cloud tags to apply to resources.", "type": "object", "properties": { "hxAllUsersIngress": { "description": "The tag to apply to all users ingress resources.", "type": "string" } }, "additionalProperties": false } }, "required": [ "googleCloudOrganizationId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "googleWorkspace" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "domain": { "description": "The Google Workspace domain.", "type": "string" }, "adminUserEmail": { "description": "The Google Workspace administrator's email address.", "type": "string" }, "customerId": { "description": "The Google Workspace customer id.", "type": "string" } }, "required": [ "domain", "adminUserEmail" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "azure" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "azureTenantId": { "description": "The Azure tenant id.", "type": "string" }, "subscriptionId": { "description": "The Azure subscription id.", "type": "string" }, "name": { "description": "The Azure tenant name.", "type": "string" } }, "required": [ "azureTenantId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "office365" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "azureTenantId": { "description": "The Azure tenant id for Office 365.", "type": "string" }, "name": { "description": "The Office 365 tenant name.", "type": "string" } }, "required": [ "azureTenantId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "dockerHub" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "organizationName": { "description": "The DockerHub organization name" }, "adminUsername": { "description": "The username of the admin user" } }, "required": [ "organizationName", "adminUsername" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "hyphenCloud" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "orgId": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" } }, "required": [ "orgId" ] } }, "required": [ "type", "config" ] } ], "properties": { "id": { "description": "The integration Id.", "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "provides": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "connectionType": { "description": "The connection type.", "type": "string", "enum": [ "DistributionList", "Channel", "PermissionGroup", "Folder", "Tag", "CloudWorkspace", "CodeRepository", "ProjectBoard", "User", "IncidentManagement", "APM", "CodeRegistry", "ContainerRegistry", "SiteRegistry", "StaticSite", "ProxyContainerRegistry", "NetworkGroup", "CloudNativeContainer", "DNSRecord", "DNSZone", "LoadBalancer", "BackendPool", "BackendEndpoint", "CustomDomain", "SSLCertificate", "ObjectStorage", "KubernetesObservability", "ManagedKubernetesCluster" ] }, "for": { "type": "array", "items": { "type": "string", "enum": [ "Organization", "Team", "Project", "ProjectEnvironment", "App", "KubernetesCluster", "Member", "SiteDeployment", "EnvironmentResources", "EnvironmentRegion", "AppDeploymentInstance", "ResourceRecord", "ResourceRecordValue", "Zone", "EnvironmentIngress", "AppDeployment", "EnvironmentStorage" ] } } } } } }, "required": [ "id" ] } }, "total": { "description": "The total number of records.", "type": "number" }, "pageNum": { "description": "The page number.", "type": "number" }, "pageSize": { "description": "The page size.", "type": "number" } }, "required": [ "total", "pageNum", "pageSize", "data" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/integrations/test": { "post": { "summary": "Test an integration for an organization", "tags": [ "Organization Integrations" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "oneOf": [ { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "github" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "githubOrgId": { "description": "The GitHub organization id.", "type": "integer" }, "githubOrgName": { "description": "The GitHub organization name.", "type": "string" }, "installationId": { "description": "The GitHub installation id received after installing Hyphen app.", "type": "integer" }, "verificationEmail": { "description": "The email address to verify connections.", "type": "string", "format": "email" } }, "required": [ "installationId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "aws" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "region": { "description": "The AWS default region", "type": "string" }, "managementAccountId": { "description": "The AWS management account id", "type": "string" }, "name": { "description": "The AWS account id", "type": "string" }, "identityProvider": { "description": "The identity provider type.", "type": "string", "enum": [ "googleWorkspace" ] }, "identityStoreId": { "description": "The identity store id.", "type": [ "string", "null" ] }, "identityStoreArn": { "description": "The identity store ARN.", "type": [ "string", "null" ] }, "permissionSetArn": { "description": "The permission set ARN.", "type": [ "string", "null" ] }, "username": { "description": "The username for accessing AWS resources.", "type": "string" }, "accessKeyId": { "description": "The access key id for accessing AWS resources.", "type": "string" } }, "required": [ "managementAccountId", "region" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "slack" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "token": { "description": "The bot user token.", "type": "string" } }, "required": [ "token" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "jira" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "cloudId": { "description": "The Jira cloud id.", "type": "string" }, "email": { "description": "The Jira admin email.", "type": "string" }, "apiToken": { "description": "The Jira API token.", "type": "string" }, "organizationId": { "description": "The Jira organization id.", "type": "string" } }, "required": [ "cloudId", "email", "apiToken", "organizationId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "datadog" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "site": { "type": "string", "enum": [ "datadoghq.com", "us3.datadoghq.com", "us5.datadoghq.com", "datadoghq.eu", "ap1.datadoghq.com", "ap2.datadoghq.com", "uk1.datadoghq.com", "ddog-gov.com", "us2.ddog-gov.com" ] }, "accessToken": { "type": "string", "minLength": 1, "maxLength": 4096 } }, "required": [ "accessToken" ] }, "options": { "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "signoz" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "hosting": { "type": "string", "enum": [ "cloud", "selfHosted" ] }, "apiBaseUrl": { "type": "string", "format": "uri", "maxLength": 2048 }, "uiBaseUrl": { "type": "string", "format": "uri", "maxLength": 2048 }, "apiKey": { "type": "string", "minLength": 1, "maxLength": 4096 } }, "required": [ "hosting", "apiBaseUrl", "apiKey" ] }, "options": { "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "newRelic" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "token": { "description": "The New Relic API token.", "type": "string" }, "accountId": { "description": "The New Relic account id.", "type": "number" }, "accountName": { "description": "The New Relic account name.", "type": "string" } }, "required": [ "token" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "mosyle" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "email": { "description": "Mosyle API account email.", "type": "string", "format": "email" }, "password": { "description": "Mosyle API account password.", "type": "string", "minLength": 1 }, "accessToken": { "description": "Mosyle Business API access token.", "type": "string", "minLength": 1 } }, "required": [ "email", "password", "accessToken" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "okta" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "orgUrl": { "description": "The Okta-managed organization URL.", "type": "string" }, "clientId": { "description": "The Okta OAuth client id.", "type": "string" }, "clientSecret": { "description": "The Okta OAuth client secret.", "type": "string" } }, "required": [ "orgUrl", "clientId", "clientSecret" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "npm" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "organizationName": { "description": "The NPM organization name.", "type": "string" }, "token": { "description": "The NPM access token.", "type": "string" } }, "required": [ "organizationName", "token" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "incidentIo" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "token": { "description": "The incident.io user token.", "type": "string" } }, "required": [ "token" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "microsoftTeams" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "azureTenantId": { "description": "The Azure tenant id.", "type": "string" }, "token": { "description": "The Microsoft Teams API token.", "type": "string" } }, "required": [ "azureTenantId", "token" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "cloudflare" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "accountId": { "description": "The Cloudflare account id.", "type": "string" }, "r2": { "type": "object", "additionalProperties": false, "properties": { "jurisdiction": { "type": "string", "enum": [ "eu", "us", "fedramp" ] } } }, "zoneId": { "description": "The Cloudflare zone id.", "type": "string", "deprecated": true }, "apiToken": { "description": "The Cloudflare API token.", "type": "string" } }, "required": [ "accountId", "apiToken" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "googleCloud" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "googleCloudOrganizationId": { "description": "The Google Cloud organization id.", "type": "string" }, "googleCloudBillingAccountId": { "description": "The Google Cloud billing account id.", "type": "string" }, "token": { "description": "The Google user token", "type": "string" } }, "required": [ "googleCloudOrganizationId", "token" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "googleWorkspace" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "domain": { "description": "The Google Workspace domain.", "type": "string" }, "adminUserEmail": { "description": "The Google Workspace administrator's email address.", "type": "string" }, "token": { "description": "The Google user token", "type": "string" } }, "required": [ "domain", "adminUserEmail", "token" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "azure" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "azureTenantId": { "description": "The Azure tenant id.", "type": "string" }, "subscriptionId": { "description": "The Azure subscription id.", "type": "string" }, "token": { "description": "The Azure API token.", "type": "string" } }, "required": [ "azureTenantId", "token" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "office365" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "azureTenantId": { "description": "The Azure tenant id for Office 365.", "type": "string" }, "name": { "description": "The Office 365 tenant name.", "type": "string" }, "token": { "description": "The Office 365 API token.", "type": "string" } }, "required": [ "azureTenantId", "token" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "dockerHub" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "organizationName": { "description": "The DockerHub organization name.", "type": "string" }, "organizationAccessToken": { "description": "The DockerHub organization access token.", "type": "string" }, "adminUsername": { "description": "The username of the admin user", "type": "string" }, "adminPersonalAccessToken": { "description": "The personal access token for the admin user.", "type": "string" } }, "required": [ "organizationName", "organizationAccessToken", "adminUsername", "adminPersonalAccessToken" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] } ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "204": { "description": "Successfully tested an integration for an organization" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/integrations/connections": { "get": { "summary": "Get a list of connections for an organization", "tags": [ "Integration Connections" ], "parameters": [ { "schema": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" } }, "in": "query", "name": "projectIds", "required": false, "description": "The project Ids." }, { "schema": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" } }, "in": "query", "name": "integrationIds", "required": false, "description": "The integration Ids." }, { "schema": { "type": "array", "uniqueItems": true, "items": { "type": "string", "enum": [ "hyphenCloud", "aws", "azure", "googleCloud", "googleWorkspace", "github", "slack", "office365", "newRelic", "signoz", "datadog", "incidentIo", "npm", "microsoftTeams", "jira", "cloudflare", "dockerHub", "okta", "mosyle" ] } }, "in": "query", "name": "integrationTypes", "required": false, "description": "The integration types." }, { "schema": { "type": "array", "uniqueItems": true, "items": { "type": "string", "anyOf": [ { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, { "type": "string", "minLength": 1, "pattern": "^team_[a-fA-F0-9]{24}$" }, { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$" }, { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, { "type": "string", "minLength": 1, "pattern": "^eres_[a-fA-F0-9]{24}$" }, { "type": "string", "minLength": 1, "pattern": "^ereg_[a-fA-F0-9]{24}$" }, { "type": "string", "minLength": 1, "pattern": "^eigs_[a-fA-F0-9]{24}$" }, { "type": "string", "minLength": 1, "pattern": "^appd_[a-fA-F0-9]{24}$" }, { "type": "string", "minLength": 1, "pattern": "^apdi_[a-fA-F0-9]{24}$" }, { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" } ] } }, "in": "query", "name": "entityIds", "required": false, "description": "The entity Ids." }, { "schema": { "type": "array", "uniqueItems": true, "items": { "type": "string", "enum": [ "DistributionList", "Channel", "PermissionGroup", "Folder", "Tag", "CloudWorkspace", "CodeRepository", "ProjectBoard", "User", "IncidentManagement", "APM", "CodeRegistry", "ContainerRegistry", "SiteRegistry", "StaticSite", "ProxyContainerRegistry", "NetworkGroup", "CloudNativeContainer", "DNSRecord", "DNSZone", "LoadBalancer", "BackendPool", "BackendEndpoint", "CustomDomain", "SSLCertificate", "ObjectStorage", "KubernetesObservability", "ManagedKubernetesCluster" ] } }, "in": "query", "name": "types", "required": false, "description": "The connection types." }, { "schema": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1, "pattern": "^conn_[a-fA-F0-9]{24}$" } }, "in": "query", "name": "connectionIds", "required": false, "description": "The connection Ids." }, { "schema": { "type": "integer", "minimum": 1, "default": 1 }, "in": "query", "name": "pageNum", "required": false, "description": "The page number." }, { "schema": { "type": "integer", "minimum": 5, "maximum": 200, "default": 50 }, "in": "query", "name": "pageSize", "required": false, "description": "The page size." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "Successfully got a list of integration connections for an organization", "content": { "application/json": { "schema": { "type": "object", "description": "Successfully got a list of integration connections for an organization", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^conn_[a-fA-F0-9]{24}$", "description": "The integration connection Id." }, "status": { "description": "The connection status.", "type": "string", "enum": [ "Pending", "Ready", "Error", "Verifying", "Decommissioning" ] }, "type": { "description": "The type of connection.", "type": "string", "enum": [ "DistributionList", "Channel", "PermissionGroup", "Folder", "Tag", "CloudWorkspace", "CodeRepository", "ProjectBoard", "User", "IncidentManagement", "APM", "CodeRegistry", "ContainerRegistry", "SiteRegistry", "StaticSite", "ProxyContainerRegistry", "NetworkGroup", "CloudNativeContainer", "DNSRecord", "DNSZone", "LoadBalancer", "BackendPool", "BackendEndpoint", "CustomDomain", "SSLCertificate", "ObjectStorage", "KubernetesObservability", "ManagedKubernetesCluster" ] }, "entity": { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The entity type.", "type": "string", "enum": [ "Organization", "Team", "Project", "ProjectEnvironment", "App", "KubernetesCluster", "Member", "SiteDeployment", "EnvironmentResources", "EnvironmentRegion", "AppDeploymentInstance", "ResourceRecord", "ResourceRecordValue", "Zone", "EnvironmentIngress", "AppDeployment", "EnvironmentStorage" ] }, "id": { "description": "The entity Id.", "type": "string" }, "name": { "description": "The entity name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, "organizationIntegration": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "description": "The integration type.", "type": "string", "enum": [ "hyphenCloud", "aws", "azure", "googleCloud", "googleWorkspace", "github", "slack", "office365", "newRelic", "signoz", "datadog", "incidentIo", "npm", "microsoftTeams", "jira", "cloudflare", "dockerHub", "okta", "mosyle" ] } }, "required": [ "id", "type" ] }, "config": { "type": "object", "additionalProperties": true, "description": "The connection config." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "errors": { "type": "array", "items": { "oneOf": [ { "type": "string", "description": "Legacy error format (backward compatibility)" }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "badRequest", "conflict", "databaseError", "dataCorruption", "dependencyError", "forbidden", "notFound", "notSupported", "serverError", "timedOut", "unauthorized", "unprocessableEntity", "unknown" ], "description": "Generic error type (e.g., notFound, conflict)" }, "code": { "type": "string", "description": "Specific error code (e.g., aws.group.notFound)" }, "description": { "type": "string", "description": "Human-readable error description" } }, "required": [ "type", "code", "description" ], "description": "Structured error object" } ] }, "description": "The connection errors." }, "input": { "type": "string", "description": "The connection input." }, "verification": { "type": "object", "properties": { "emails": { "type": "array", "items": { "type": "string" }, "description": "The verification emails." } }, "description": "The connection verification details." }, "isRetryable": { "type": "boolean", "description": "Whether the connection is retryable." } }, "required": [ "id", "type", "entity", "organizationIntegration", "config" ] } }, "total": { "description": "The total number of records.", "type": "number" }, "pageNum": { "description": "The page number.", "type": "number" }, "pageSize": { "description": "The page size.", "type": "number" } }, "required": [ "total", "pageNum", "pageSize", "data" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/integrations/connections/access": { "get": { "summary": "Get a list of integration connection access for an organization", "tags": [ "Integration Connections" ], "parameters": [ { "schema": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1, "pattern": "^conn_[a-fA-F0-9]{24}$" } }, "in": "query", "name": "entityConnectionIds", "required": false, "description": "The entity connection Ids." }, { "schema": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1, "pattern": "^conn_[a-fA-F0-9]{24}$" } }, "in": "query", "name": "assignmentConnectionIds", "required": false, "description": "The assignment connection Ids." }, { "schema": { "type": "array", "uniqueItems": true, "items": { "type": "string", "anyOf": [ { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, { "type": "string", "minLength": 1, "pattern": "^team_[a-fA-F0-9]{24}$" }, { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$" }, { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" } ] } }, "in": "query", "name": "entityIds", "required": false, "description": "The connection entity Ids." }, { "schema": { "type": "array", "uniqueItems": true, "items": { "type": "string", "anyOf": [ { "type": "string", "minLength": 1, "pattern": "^team_[a-fA-F0-9]{24}$" }, { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" } ] } }, "in": "query", "name": "assignmentIds", "required": false, "description": "The assignment entity Ids." }, { "schema": { "type": "integer", "minimum": 1, "default": 1 }, "in": "query", "name": "pageNum", "required": false, "description": "The page number." }, { "schema": { "type": "integer", "minimum": 5, "maximum": 200, "default": 50 }, "in": "query", "name": "pageSize", "required": false, "description": "The page size." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "Successfully got a list of integration connection access for an organization", "content": { "application/json": { "schema": { "type": "object", "description": "Successfully got a list of integration connection access for an organization", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^cona_[a-fA-F0-9]{24}$", "description": "The integration connection access Id." }, "status": { "description": "The connection access status.", "type": "string", "enum": [ "Pending", "Deleting", "Ready", "Deleted", "CreationError", "DeletingError" ] }, "integrationType": { "description": "The integration type of connection access.", "type": "string", "enum": [ "hyphenCloud", "aws", "azure", "googleCloud", "googleWorkspace", "github", "slack", "office365", "newRelic", "signoz", "datadog", "incidentIo", "npm", "microsoftTeams", "jira", "cloudflare", "dockerHub", "okta", "mosyle" ] }, "entityConnection": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^conn_[a-fA-F0-9]{24}$" }, "type": { "description": "The connection type.", "type": "string", "enum": [ "User", "PermissionGroup" ] }, "entity": { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The entity type.", "type": "string", "enum": [ "Organization", "Team", "Project", "ProjectEnvironment", "App", "KubernetesCluster", "Member", "SiteDeployment", "EnvironmentResources", "EnvironmentRegion", "AppDeploymentInstance", "ResourceRecord", "ResourceRecordValue", "Zone", "EnvironmentIngress", "AppDeployment", "EnvironmentStorage" ] }, "id": { "description": "The entity Id.", "type": "string" }, "name": { "description": "The entity name.", "type": "string" } }, "required": [ "type", "id", "name" ] } }, "required": [ "type", "id", "entity" ] }, "assignmentConnection": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^conn_[a-fA-F0-9]{24}$" }, "type": { "description": "The connection type.", "type": "string", "enum": [ "User", "PermissionGroup" ] }, "entity": { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The entity type.", "type": "string", "enum": [ "Member", "Team" ] }, "id": { "description": "The entity Id.", "type": "string" }, "name": { "description": "The entity name.", "type": "string" } }, "required": [ "type", "id", "name" ] } }, "required": [ "type", "id", "entity" ] }, "config": { "type": "object", "additionalProperties": true, "description": "The connection access config." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "errors": { "type": "array", "items": { "type": "string" }, "description": "The connection access errors." } }, "required": [ "id", "integrationType", "entityConnection", "assignmentConnection", "organization", "status", "config" ] } }, "total": { "description": "The total number of records.", "type": "number" }, "pageNum": { "description": "The page number.", "type": "number" }, "pageSize": { "description": "The page size.", "type": "number" } }, "required": [ "total", "pageNum", "pageSize", "data" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/integrations/azure/context": { "post": { "summary": "Get the azure context for a user", "tags": [ "Organization Integrations" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "token": { "type": "string", "description": "The token to use for authentication", "minLength": 1 } }, "required": [ "token" ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "Successfully got the azure context for the user", "content": { "application/json": { "schema": { "type": "object", "description": "Successfully got the azure context for the user", "additionalProperties": false, "properties": { "tenants": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The tenant id" }, "name": { "type": "string", "description": "The tenant name" } }, "required": [ "id", "name" ] } }, "subscriptions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The subscription id" }, "name": { "type": "string", "description": "The subscription name" } }, "required": [ "id", "name" ] } } }, "required": [ "tenants", "subscriptions" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/integrations/{integrationId}/": { "delete": { "summary": "Delete the integration for an organization", "tags": [ "Organization Integrations" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "in": "path", "name": "integrationId", "required": true, "description": "The integration Id." } ], "responses": { "204": { "description": "Successfully deleted the integration for an organization" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "get": { "summary": "Get an integration for an organization", "tags": [ "Organization Integrations" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "in": "path", "name": "integrationId", "required": true, "description": "The integration Id." } ], "responses": { "200": { "description": "Successfully got the integration for an organization", "content": { "application/json": { "schema": { "type": "object", "oneOf": [ { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "aws" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "region": { "description": "The AWS default region", "type": "string" }, "managementAccountId": { "description": "The AWS management account id", "type": "string" }, "name": { "description": "The AWS account id", "type": "string" }, "identityProvider": { "description": "The identity provider type.", "type": "string", "enum": [ "googleWorkspace" ] }, "identityStoreId": { "description": "The identity store id.", "type": [ "string", "null" ] }, "identityStoreArn": { "description": "The identity store ARN.", "type": [ "string", "null" ] }, "permissionSetArn": { "description": "The permission set ARN.", "type": [ "string", "null" ] }, "username": { "description": "The username for accessing AWS resources.", "type": "string" }, "accessKeyId": { "description": "The access key id for accessing AWS resources.", "type": "string" } }, "required": [ "managementAccountId", "region" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "cloudflare" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "accountId": { "description": "The Cloudflare account id.", "type": "string" }, "r2": { "type": "object", "additionalProperties": false, "properties": { "jurisdiction": { "type": "string", "enum": [ "eu", "us", "fedramp" ] } } }, "zoneId": { "description": "The Cloudflare zone id.", "type": "string", "deprecated": true }, "hostname": { "description": "The Cloudflare zone hostname.", "type": "string" } }, "required": [ "accountId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "github" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "githubOrgId": { "description": "The GitHub organization id.", "type": "integer" }, "githubOrgName": { "description": "The GitHub organization name.", "type": "string" }, "installationId": { "description": "The GitHub installation id received after installing Hyphen app.", "type": "integer" }, "verificationEmail": { "description": "The email address to verify connections.", "type": "string", "format": "email" } }, "required": [ "installationId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "slack" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "workspaceId": { "description": "The Slack workspace id.", "type": "string" }, "workspaceName": { "description": "The Slack workspace name.", "type": "string" } }, "required": [ "workspaceId", "workspaceName" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "jira" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "cloudId": { "description": "The Jira cloud id.", "type": "string" }, "email": { "description": "The Jira admin email.", "type": "string" }, "organizationId": { "description": "The Jira organization id.", "type": "string" }, "accountId": { "description": "The Jira account id.", "type": "string" } }, "required": [ "cloudId", "email", "organizationId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "datadog" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "site": { "type": "string", "enum": [ "datadoghq.com", "us3.datadoghq.com", "us5.datadoghq.com", "datadoghq.eu", "ap1.datadoghq.com", "ap2.datadoghq.com", "uk1.datadoghq.com", "ddog-gov.com", "us2.ddog-gov.com" ] } }, "required": [ "site" ] }, "options": { "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "signoz" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "hosting": { "type": "string", "enum": [ "cloud", "selfHosted" ] }, "apiBaseUrl": { "type": "string", "format": "uri", "maxLength": 2048 }, "uiBaseUrl": { "type": "string", "format": "uri", "maxLength": 2048 } }, "required": [ "hosting", "apiBaseUrl" ] }, "options": { "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "newRelic" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "accountId": { "description": "The New Relic account id.", "type": "number" }, "accountName": { "description": "The New Relic account name.", "type": "string" } }, "required": [ "accountId", "accountName" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "mosyle" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "email": { "description": "Mosyle API account email.", "type": "string", "format": "email" } }, "required": [ "email" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "okta" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "orgUrl": { "description": "The Okta-managed organization URL.", "type": "string" }, "clientId": { "description": "The Okta OAuth client id.", "type": "string" } }, "required": [ "orgUrl", "clientId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "npm" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "organizationName": { "description": "The NPM organization name.", "type": "string" }, "organizationId": { "description": "The NPM organization id.", "type": "string" } }, "required": [ "organizationName", "organizationId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "incidentIo" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "organizationName": { "description": "The incident.io organization name.", "type": "string" }, "dashboardUrl": { "description": "The incident.io dashboard URL.", "type": "string" }, "catalogServiceTypeId": { "description": "The catalog service type id.", "type": "string" }, "catalogUserTypeId": { "description": "The catalog user type id.", "type": "string" }, "catalogTeamType": { "description": "The catalog team type.", "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The catalog team type id.", "type": "string" }, "memberAttributeId": { "description": "The catalog team member attribute id.", "type": "string" } }, "required": [ "id", "memberAttributeId" ] } }, "required": [ "catalogServiceTypeId", "catalogUserTypeId", "catalogTeamType", "dashboardUrl", "organizationName" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "microsoftTeams" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "azureTenantId": { "description": "The Azure tenant id.", "type": "string" }, "name": { "description": "The Azure tenant name.", "type": "string" }, "defaultTeamId": { "description": "The default Microsoft Teams Id to manage channels within.", "type": "string" } }, "required": [ "azureTenantId", "name", "defaultTeamId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "googleCloud" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "googleCloudOrganizationId": { "description": "The Google Cloud organization id.", "type": "string" }, "googleCloudOrganizationName": { "description": "The Google Cloud organization name.", "type": "string" }, "googleCloudBillingAccountId": { "description": "The Google Cloud billing account id.", "type": "string" }, "googleCloudBillingAccountName": { "description": "The Google Cloud billing account name.", "type": "string" }, "tags": { "description": "The Google Cloud tags to apply to resources.", "type": "object", "properties": { "hxAllUsersIngress": { "description": "The tag to apply to all users ingress resources.", "type": "string" } }, "additionalProperties": false } }, "required": [ "googleCloudOrganizationId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "googleWorkspace" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "domain": { "description": "The Google Workspace domain.", "type": "string" }, "adminUserEmail": { "description": "The Google Workspace administrator's email address.", "type": "string" }, "customerId": { "description": "The Google Workspace customer id.", "type": "string" } }, "required": [ "domain", "adminUserEmail" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "azure" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "azureTenantId": { "description": "The Azure tenant id.", "type": "string" }, "subscriptionId": { "description": "The Azure subscription id.", "type": "string" }, "name": { "description": "The Azure tenant name.", "type": "string" } }, "required": [ "azureTenantId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "office365" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "azureTenantId": { "description": "The Azure tenant id for Office 365.", "type": "string" }, "name": { "description": "The Office 365 tenant name.", "type": "string" } }, "required": [ "azureTenantId" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "description": "The integration type.", "type": "string", "enum": [ "dockerHub" ] }, "config": { "description": "The integration configuration.", "type": "object", "additionalProperties": false, "properties": { "organizationName": { "description": "The DockerHub organization name" }, "adminUsername": { "description": "The username of the admin user" } }, "required": [ "organizationName", "adminUsername" ] }, "options": { "description": "The integration options.", "type": "object" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "hyphenCloud" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "orgId": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" } }, "required": [ "orgId" ] } }, "required": [ "type", "config" ] } ], "properties": { "id": { "description": "The integration Id.", "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "provides": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "connectionType": { "description": "The connection type.", "type": "string", "enum": [ "DistributionList", "Channel", "PermissionGroup", "Folder", "Tag", "CloudWorkspace", "CodeRepository", "ProjectBoard", "User", "IncidentManagement", "APM", "CodeRegistry", "ContainerRegistry", "SiteRegistry", "StaticSite", "ProxyContainerRegistry", "NetworkGroup", "CloudNativeContainer", "DNSRecord", "DNSZone", "LoadBalancer", "BackendPool", "BackendEndpoint", "CustomDomain", "SSLCertificate", "ObjectStorage", "KubernetesObservability", "ManagedKubernetesCluster" ] }, "for": { "type": "array", "items": { "type": "string", "enum": [ "Organization", "Team", "Project", "ProjectEnvironment", "App", "KubernetesCluster", "Member", "SiteDeployment", "EnvironmentResources", "EnvironmentRegion", "AppDeploymentInstance", "ResourceRecord", "ResourceRecordValue", "Zone", "EnvironmentIngress", "AppDeployment", "EnvironmentStorage" ] } } } } } }, "required": [ "id" ], "description": "Successfully got the integration for an organization" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/integrations/{integrationId}/connections/": { "post": { "summary": "Create an integration connection", "tags": [ "Integration Connections" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "type": { "description": "The type of connection.", "type": "string", "enum": [ "DistributionList", "Channel", "PermissionGroup", "Folder", "Tag", "CloudWorkspace", "CodeRepository", "ProjectBoard", "User", "IncidentManagement", "APM", "CodeRegistry", "ContainerRegistry", "SiteRegistry", "StaticSite", "ProxyContainerRegistry", "NetworkGroup", "CloudNativeContainer", "DNSRecord", "DNSZone", "LoadBalancer", "BackendPool", "BackendEndpoint", "CustomDomain", "SSLCertificate", "ObjectStorage", "KubernetesObservability", "ManagedKubernetesCluster" ] }, "entity": { "type": "object", "properties": { "id": { "description": "The entity Id.", "type": "string" } }, "required": [ "id" ] }, "input": { "type": "string", "description": "The connection input." }, "config": { "type": "object", "additionalProperties": true, "description": "The connection config." } }, "required": [ "type", "entity" ], "not": { "required": [ "apiKey" ] }, "allOf": [ { "if": { "properties": { "type": { "enum": [ "ManagedKubernetesCluster" ] } }, "required": [ "type" ] }, "then": { "required": [ "input" ], "properties": { "entity": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" } }, "required": [ "id" ] } } } } ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "in": "path", "name": "integrationId", "required": true, "description": "The integration Id." } ], "responses": { "201": { "description": "Successfully created access for an organization", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^conn_[a-fA-F0-9]{24}$", "description": "The integration connection Id." }, "status": { "description": "The connection status.", "type": "string", "enum": [ "Pending", "Ready", "Error", "Verifying", "Decommissioning" ] }, "type": { "description": "The type of connection.", "type": "string", "enum": [ "DistributionList", "Channel", "PermissionGroup", "Folder", "Tag", "CloudWorkspace", "CodeRepository", "ProjectBoard", "User", "IncidentManagement", "APM", "CodeRegistry", "ContainerRegistry", "SiteRegistry", "StaticSite", "ProxyContainerRegistry", "NetworkGroup", "CloudNativeContainer", "DNSRecord", "DNSZone", "LoadBalancer", "BackendPool", "BackendEndpoint", "CustomDomain", "SSLCertificate", "ObjectStorage", "KubernetesObservability", "ManagedKubernetesCluster" ] }, "entity": { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The entity type.", "type": "string", "enum": [ "Organization", "Team", "Project", "ProjectEnvironment", "App", "KubernetesCluster", "Member", "SiteDeployment", "EnvironmentResources", "EnvironmentRegion", "AppDeploymentInstance", "ResourceRecord", "ResourceRecordValue", "Zone", "EnvironmentIngress", "AppDeployment", "EnvironmentStorage" ] }, "id": { "description": "The entity Id.", "type": "string" }, "name": { "description": "The entity name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, "organizationIntegration": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "description": "The integration type.", "type": "string", "enum": [ "hyphenCloud", "aws", "azure", "googleCloud", "googleWorkspace", "github", "slack", "office365", "newRelic", "signoz", "datadog", "incidentIo", "npm", "microsoftTeams", "jira", "cloudflare", "dockerHub", "okta", "mosyle" ] } }, "required": [ "id", "type" ] }, "config": { "type": "object", "additionalProperties": true, "description": "The connection config." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "errors": { "type": "array", "items": { "oneOf": [ { "type": "string", "description": "Legacy error format (backward compatibility)" }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "badRequest", "conflict", "databaseError", "dataCorruption", "dependencyError", "forbidden", "notFound", "notSupported", "serverError", "timedOut", "unauthorized", "unprocessableEntity", "unknown" ], "description": "Generic error type (e.g., notFound, conflict)" }, "code": { "type": "string", "description": "Specific error code (e.g., aws.group.notFound)" }, "description": { "type": "string", "description": "Human-readable error description" } }, "required": [ "type", "code", "description" ], "description": "Structured error object" } ] }, "description": "The connection errors." }, "input": { "type": "string", "description": "The connection input." }, "verification": { "type": "object", "properties": { "emails": { "type": "array", "items": { "type": "string" }, "description": "The verification emails." } }, "description": "The connection verification details." }, "isRetryable": { "type": "boolean", "description": "Whether the connection is retryable." } }, "required": [ "id", "type", "entity", "organizationIntegration", "config" ], "description": "Successfully created access for an organization" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/integrations/{integrationId}/connections/{connectionId}/": { "get": { "summary": "Get the connection for an integration", "tags": [ "Integration Connections" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "in": "path", "name": "integrationId", "required": true, "description": "The integration Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^conn_[a-fA-F0-9]{24}$" }, "in": "path", "name": "connectionId", "required": true, "description": "The integration connection Id." } ], "responses": { "200": { "description": "Successfully got the connection for an integration", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^conn_[a-fA-F0-9]{24}$", "description": "The integration connection Id." }, "status": { "description": "The connection status.", "type": "string", "enum": [ "Pending", "Ready", "Error", "Verifying", "Decommissioning" ] }, "type": { "description": "The type of connection.", "type": "string", "enum": [ "DistributionList", "Channel", "PermissionGroup", "Folder", "Tag", "CloudWorkspace", "CodeRepository", "ProjectBoard", "User", "IncidentManagement", "APM", "CodeRegistry", "ContainerRegistry", "SiteRegistry", "StaticSite", "ProxyContainerRegistry", "NetworkGroup", "CloudNativeContainer", "DNSRecord", "DNSZone", "LoadBalancer", "BackendPool", "BackendEndpoint", "CustomDomain", "SSLCertificate", "ObjectStorage", "KubernetesObservability", "ManagedKubernetesCluster" ] }, "entity": { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The entity type.", "type": "string", "enum": [ "Organization", "Team", "Project", "ProjectEnvironment", "App", "KubernetesCluster", "Member", "SiteDeployment", "EnvironmentResources", "EnvironmentRegion", "AppDeploymentInstance", "ResourceRecord", "ResourceRecordValue", "Zone", "EnvironmentIngress", "AppDeployment", "EnvironmentStorage" ] }, "id": { "description": "The entity Id.", "type": "string" }, "name": { "description": "The entity name.", "type": "string" } }, "required": [ "type", "id", "name" ] }, "organizationIntegration": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "type": { "description": "The integration type.", "type": "string", "enum": [ "hyphenCloud", "aws", "azure", "googleCloud", "googleWorkspace", "github", "slack", "office365", "newRelic", "signoz", "datadog", "incidentIo", "npm", "microsoftTeams", "jira", "cloudflare", "dockerHub", "okta", "mosyle" ] } }, "required": [ "id", "type" ] }, "config": { "type": "object", "additionalProperties": true, "description": "The connection config." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] }, "errors": { "type": "array", "items": { "oneOf": [ { "type": "string", "description": "Legacy error format (backward compatibility)" }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "badRequest", "conflict", "databaseError", "dataCorruption", "dependencyError", "forbidden", "notFound", "notSupported", "serverError", "timedOut", "unauthorized", "unprocessableEntity", "unknown" ], "description": "Generic error type (e.g., notFound, conflict)" }, "code": { "type": "string", "description": "Specific error code (e.g., aws.group.notFound)" }, "description": { "type": "string", "description": "Human-readable error description" } }, "required": [ "type", "code", "description" ], "description": "Structured error object" } ] }, "description": "The connection errors." }, "input": { "type": "string", "description": "The connection input." }, "verification": { "type": "object", "properties": { "emails": { "type": "array", "items": { "type": "string" }, "description": "The verification emails." } }, "description": "The connection verification details." }, "isRetryable": { "type": "boolean", "description": "Whether the connection is retryable." } }, "required": [ "id", "type", "entity", "organizationIntegration", "config" ], "description": "Successfully got the connection for an integration" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "delete": { "summary": "Delete the connection for an integration", "tags": [ "Integration Connections" ], "parameters": [ { "schema": "object", "in": "query", "name": "type" }, { "schema": false, "in": "query", "name": "additionalProperties" }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "in": "path", "name": "integrationId", "required": true, "description": "The integration Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^conn_[a-fA-F0-9]{24}$" }, "in": "path", "name": "connectionId", "required": true, "description": "The integration connection Id." } ], "responses": { "204": { "description": "Successfully delete the connection for an integration" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/integrations/{integrationId}/connections/{connectionId}/origin-logs": { "get": { "summary": "Read up to 100 recent APM logs for a connection", "tags": [ "Integration Connections" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$" }, "in": "query", "name": "environmentId", "required": true }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "in": "path", "name": "integrationId", "required": true, "description": "The integration Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^conn_[a-fA-F0-9]{24}$" }, "in": "path", "name": "connectionId", "required": true, "description": "The integration connection Id." } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "available", "unavailable" ] }, "timeRange": { "type": "object", "properties": { "start": { "type": "string", "format": "date-time" }, "end": { "type": "string", "format": "date-time" } }, "required": [ "start", "end" ], "additionalProperties": false }, "logs": { "type": "array", "maxItems": 100, "items": { "type": "object", "properties": { "timestamp": { "type": "string", "format": "date-time" }, "message": { "type": "string" }, "severity": { "type": "string" }, "stream": { "type": "string" } }, "required": [ "timestamp", "message" ], "additionalProperties": false } }, "error": { "type": "string" }, "truncated": { "type": "boolean" }, "redacted": { "type": "boolean" } }, "required": [ "status", "timeRange", "redacted" ], "additionalProperties": false } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/integrations/{integrationId}/connections/{connectionId}/origin-observability": { "get": { "summary": "Test a Kubernetes observability connection with recent workload logs and metrics", "tags": [ "Integration Connections" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "maxLength": 253 }, "in": "query", "name": "namespace", "required": true }, { "schema": { "type": "string", "enum": [ "Deployment", "ReplicaSet", "StatefulSet", "DaemonSet", "Job", "CronJob" ] }, "in": "query", "name": "kind", "required": true }, { "schema": { "type": "string", "minLength": 1, "maxLength": 253 }, "in": "query", "name": "name", "required": true }, { "schema": { "type": "string", "minLength": 1, "maxLength": 253 }, "in": "query", "name": "apiVersion", "required": false }, { "schema": { "type": "string", "minLength": 1, "maxLength": 253 }, "in": "query", "name": "uid", "required": false }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "in": "path", "name": "integrationId", "required": true, "description": "The integration Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^conn_[a-fA-F0-9]{24}$" }, "in": "path", "name": "connectionId", "required": true, "description": "The integration connection Id." } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "timeRange": { "type": "object", "properties": { "start": { "type": "string", "format": "date-time" }, "end": { "type": "string", "format": "date-time" } }, "required": [ "start", "end" ], "additionalProperties": false }, "metrics": { "type": "object", "properties": { "cpuUtilization": { "type": "array", "items": { "type": "object", "properties": { "timestamp": { "type": "string", "format": "date-time" }, "value": { "type": "number" } }, "required": [ "timestamp", "value" ], "additionalProperties": false } }, "memoryUtilization": { "type": "array", "items": { "type": "object", "properties": { "timestamp": { "type": "string", "format": "date-time" }, "value": { "type": "number" } }, "required": [ "timestamp", "value" ], "additionalProperties": false } }, "restartCountDelta": { "type": "array", "items": { "type": "object", "properties": { "timestamp": { "type": "string", "format": "date-time" }, "value": { "type": "number" } }, "required": [ "timestamp", "value" ], "additionalProperties": false } }, "replicaCount": { "type": "array", "items": { "type": "object", "properties": { "timestamp": { "type": "string", "format": "date-time" }, "value": { "type": "number" } }, "required": [ "timestamp", "value" ], "additionalProperties": false } }, "latestDataAt": { "type": "string", "format": "date-time" } }, "additionalProperties": false }, "logs": { "type": "object", "properties": { "entries": { "type": "array", "maxItems": 100, "items": { "type": "object", "properties": { "timestamp": { "type": "string", "format": "date-time" }, "message": { "type": "string" }, "severity": { "type": "string" }, "stream": { "type": "string" }, "podName": { "type": "string" }, "containerName": { "type": "string" } }, "required": [ "timestamp", "message" ], "additionalProperties": false } }, "truncated": { "type": "boolean" }, "redacted": { "type": "boolean" } }, "required": [ "entries" ], "additionalProperties": false }, "queryErrors": { "type": "array", "items": { "type": "object", "properties": { "source": { "type": "string", "enum": [ "workload", "metrics", "logs" ] }, "timedOut": { "type": "boolean" } }, "required": [ "source", "timedOut" ], "additionalProperties": false } }, "warnings": { "type": "array", "items": { "type": "string" } } }, "required": [ "timeRange", "warnings" ], "additionalProperties": false } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/integrations/{integrationId}/connections/{connectionId}/verify": { "post": { "summary": "Accept the connection verification for an integration", "tags": [ "Integration Connections" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "description": "The verification code" } }, "required": [ "code" ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "in": "path", "name": "integrationId", "required": true, "description": "The integration Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^conn_[a-fA-F0-9]{24}$" }, "in": "path", "name": "connectionId", "required": true, "description": "The integration connection Id." } ], "responses": { "204": { "description": "Successfully accepted verification the connection for an integration" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/integrations/{integrationId}/evidence-pages/": { "post": { "summary": "Request a page of integration evidence", "tags": [ "Organization Integrations" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "capabilityId" ], "properties": { "capabilityId": { "type": "string", "enum": [ "identity.principals", "identity.groups", "identity.group-memberships", "identity.applications", "identity.application-assignments", "identity.roles", "identity.role-assignments", "identity.devices", "devices.inventory", "identity.authentication-methods", "identity.authentication-policies", "identity.session-policies", "identity.sign-in-events", "identity.audit-events" ] }, "pageSize": { "type": "integer", "minimum": 5, "maximum": 200 }, "pageCursor": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "\\S" }, "principalProperty": { "type": "string", "minLength": 1, "maxLength": 256 } } } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "in": "path", "name": "integrationId", "required": true, "description": "The integration Id." }, { "schema": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "\\S" }, "in": "header", "name": "idempotency-key", "required": true } ], "responses": { "202": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "operationId", "status", "expiresAt" ], "properties": { "operationId": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "\\S" }, "status": { "type": "string", "enum": [ "pending", "collecting", "collected", "unavailable", "failed" ] }, "expiresAt": { "type": "string", "format": "date-time" }, "progress": { "type": "object", "additionalProperties": false, "required": [ "phase", "pagesCollected", "recordsCollected", "recordsAssembled" ], "properties": { "phase": { "type": "string", "enum": [ "collect", "materialize" ] }, "pagesCollected": { "type": "integer", "minimum": 0 }, "recordsCollected": { "type": "integer", "minimum": 0 }, "recordsAssembled": { "type": "integer", "minimum": 0 }, "recordsTotal": { "type": "integer", "minimum": 0 }, "updatedAt": { "type": "string", "format": "date-time" }, "phaseStartedAt": { "type": "string", "format": "date-time" }, "retryAt": { "type": "string", "format": "date-time" }, "waitReason": { "type": "string", "enum": [ "rate-limit", "throttled" ] } } }, "provenance": { "type": "object", "additionalProperties": false, "required": [ "collectionId", "capabilityId", "integrationType", "targetId" ], "properties": { "collectionId": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "\\S" }, "capabilityId": { "type": "string", "enum": [ "identity.principals", "identity.groups", "identity.group-memberships", "identity.applications", "identity.application-assignments", "identity.roles", "identity.role-assignments", "identity.devices", "devices.inventory", "identity.authentication-methods", "identity.authentication-policies", "identity.session-policies", "identity.sign-in-events", "identity.audit-events" ] }, "integrationType": { "type": "string" }, "targetId": { "type": "string" } } }, "result": { "type": "object", "additionalProperties": false, "required": [ "data", "pageSize" ], "properties": { "data": { "type": "array", "items": {} }, "pageSize": { "type": "integer", "minimum": 5, "maximum": 200 }, "nextPageCursor": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "\\S" } } }, "unavailableReason": { "type": "string", "enum": [ "unsupported", "permission", "license", "configuration" ] } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/integrations/{integrationId}/evidence-pages/{operationId}": { "get": { "summary": "Read an integration evidence page operation", "tags": [ "Organization Integrations" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "in": "path", "name": "integrationId", "required": true, "description": "The integration Id." }, { "schema": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "\\S" }, "in": "path", "name": "operationId", "required": true } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "operationId", "status", "expiresAt" ], "properties": { "operationId": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "\\S" }, "status": { "type": "string", "enum": [ "pending", "collecting", "collected", "unavailable", "failed" ] }, "expiresAt": { "type": "string", "format": "date-time" }, "progress": { "type": "object", "additionalProperties": false, "required": [ "phase", "pagesCollected", "recordsCollected", "recordsAssembled" ], "properties": { "phase": { "type": "string", "enum": [ "collect", "materialize" ] }, "pagesCollected": { "type": "integer", "minimum": 0 }, "recordsCollected": { "type": "integer", "minimum": 0 }, "recordsAssembled": { "type": "integer", "minimum": 0 }, "recordsTotal": { "type": "integer", "minimum": 0 }, "updatedAt": { "type": "string", "format": "date-time" }, "phaseStartedAt": { "type": "string", "format": "date-time" }, "retryAt": { "type": "string", "format": "date-time" }, "waitReason": { "type": "string", "enum": [ "rate-limit", "throttled" ] } } }, "provenance": { "type": "object", "additionalProperties": false, "required": [ "collectionId", "capabilityId", "integrationType", "targetId" ], "properties": { "collectionId": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "\\S" }, "capabilityId": { "type": "string", "enum": [ "identity.principals", "identity.groups", "identity.group-memberships", "identity.applications", "identity.application-assignments", "identity.roles", "identity.role-assignments", "identity.devices", "devices.inventory", "identity.authentication-methods", "identity.authentication-policies", "identity.session-policies", "identity.sign-in-events", "identity.audit-events" ] }, "integrationType": { "type": "string" }, "targetId": { "type": "string" } } }, "result": { "type": "object", "additionalProperties": false, "required": [ "data", "pageSize" ], "properties": { "data": { "type": "array", "items": {} }, "pageSize": { "type": "integer", "minimum": 5, "maximum": 200 }, "nextPageCursor": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "\\S" } } }, "unavailableReason": { "type": "string", "enum": [ "unsupported", "permission", "license", "configuration" ] } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/integrations/{integrationId}/import/": { "post": { "summary": "Import selected resources for an integration", "tags": [ "Organization Integrations" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "DistributionList", "Channel", "PermissionGroup", "Folder", "Tag", "CloudWorkspace", "CodeRepository", "ProjectBoard", "User", "IncidentManagement", "APM", "CodeRegistry", "ContainerRegistry", "SiteRegistry", "StaticSite", "ProxyContainerRegistry", "NetworkGroup", "CloudNativeContainer", "DNSRecord", "DNSZone", "LoadBalancer", "BackendPool", "BackendEndpoint", "CustomDomain", "SSLCertificate", "ObjectStorage", "KubernetesObservability", "ManagedKubernetesCluster" ], "description": "The connection type being imported." }, "parentId": { "type": "string", "description": "Optional parent provider resource identifier (e.g., zoneId for DNSRecord)." }, "resources": { "type": "array", "items": { "type": "object", "additionalProperties": true, "properties": { "id": { "type": "string", "description": "Provider resource identifier" } }, "required": [ "id" ] }, "description": "List of provider resources to import." } }, "required": [ "type", "resources" ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "in": "path", "name": "integrationId", "required": true, "description": "The integration Id." } ], "responses": { "202": { "description": "Import accepted for processing", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "description": "Import accepted for processing", "properties": { "status": { "type": "string" } }, "required": [ "status" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/integrations/{integrationId}/resources/": { "get": { "summary": "List resources for an integration by connection type", "tags": [ "Organization Integrations" ], "parameters": [ { "schema": { "type": "string", "enum": [ "DistributionList", "Channel", "PermissionGroup", "Folder", "Tag", "CloudWorkspace", "CodeRepository", "ProjectBoard", "User", "IncidentManagement", "APM", "CodeRegistry", "ContainerRegistry", "SiteRegistry", "StaticSite", "ProxyContainerRegistry", "NetworkGroup", "CloudNativeContainer", "DNSRecord", "DNSZone", "LoadBalancer", "BackendPool", "BackendEndpoint", "CustomDomain", "SSLCertificate", "ObjectStorage", "KubernetesObservability", "ManagedKubernetesCluster" ] }, "in": "query", "name": "type", "required": true, "description": "The connection type to list resources for." }, { "schema": { "type": "string" }, "in": "query", "name": "parentId", "required": false, "description": "Optional parent provider resource identifier (e.g., zoneId for DNSRecord)." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "in": "path", "name": "integrationId", "required": true, "description": "The integration Id." } ], "responses": { "200": { "description": "Successfully got a list of resources for the integration and type", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "description": "Successfully got a list of resources for the integration and type", "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "Provider resource identifier" }, "name": { "type": "string", "description": "Human-friendly resource name" } }, "required": [ "id", "name" ] } } }, "required": [ "data" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/members/": { "post": { "summary": "Create a member for an organization", "tags": [ "Members" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "firstName": { "description": "The member first name.", "type": "string" }, "lastName": { "description": "The member last name.", "type": "string" }, "email": { "description": "The member primary email address.", "type": "string", "format": "email" }, "connectedAccounts": { "description": "The connected accounts of the member.", "type": "array", "items": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "github" ] }, "identifier": { "description": "The GitHub username.", "type": "string" }, "email": { "description": "The GitHub email.", "type": "string", "format": "email" }, "profileUrl": { "description": "The GitHub profile url.", "type": "string", "format": "uri" } }, "required": [ "type", "identifier", "profileUrl" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "slack" ] }, "identifier": { "description": "The slack account Id.", "type": "string" }, "email": { "description": "The slack email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "discord" ] }, "identifier": { "description": "The Discord account Id.", "type": "string" } }, "required": [ "type", "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "idp" ] }, "identifier": { "description": "The user Id.", "type": "string" } }, "required": [ "type", "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "apiKey" ] }, "identifier": { "description": "The API key Id.", "type": "string" } }, "required": [ "type", "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "googleWorkspace" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "googleCloud" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "office365" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "azure" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "aws" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "npm" ] }, "identifier": { "description": "The npm username.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "jira" ] }, "identifier": { "description": "The Jira account ID.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "newRelic" ] }, "identifier": { "description": "The New Relic user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "incidentIo" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "microsoftTeams" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "dockerHub" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] } ] } } }, "required": [ "email" ] }, "example": { "firstName": "John", "lastName": "Doe", "email": "john.doe@hyphen.ai" } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "201": { "description": "Successfully created a member for an organization", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The member Id.", "type": "string" }, "firstName": { "description": "The member first name.", "type": "string" }, "lastName": { "description": "The member last name.", "type": "string" }, "nickname": { "description": "The member nickname.", "type": "string" }, "email": { "description": "The member primary email address.", "type": "string", "format": "email" }, "memory": { "description": "Plain-text memory used as contextual data for member-created LLM sessions.", "type": [ "null", "string" ], "maxLength": 8000 }, "favorites": { "description": "The member favorite items.", "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "type", "id", "alternateId", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Team" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^team_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "LinkCode" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^code_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "App" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] } }, "required": [ "type", "id", "alternateId", "name", "project" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Toggle" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^tggl_[a-fA-F0-9]{24}$" }, "key": { "type": "string" }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] } }, "required": [ "type", "id", "key", "project" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "type", "id", "name" ] } ] } }, "connectedAccounts": { "description": "The connected accounts of the member.", "type": "array", "items": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "github" ] }, "identifier": { "description": "The GitHub username.", "type": "string" }, "email": { "description": "The GitHub email.", "type": "string", "format": "email" }, "profileUrl": { "description": "The GitHub profile url.", "type": "string", "format": "uri" } }, "required": [ "type", "identifier", "profileUrl" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "slack" ] }, "identifier": { "description": "The slack account Id.", "type": "string" }, "email": { "description": "The slack email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "discord" ] }, "identifier": { "description": "The Discord account Id.", "type": "string" } }, "required": [ "type", "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "idp" ] }, "identifier": { "description": "The user Id.", "type": "string" } }, "required": [ "type", "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "apiKey" ] }, "identifier": { "description": "The API key Id.", "type": "string" } }, "required": [ "type", "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "googleWorkspace" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "googleCloud" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "office365" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "azure" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "aws" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "npm" ] }, "identifier": { "description": "The npm username.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "jira" ] }, "identifier": { "description": "The Jira account ID.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "newRelic" ] }, "identifier": { "description": "The New Relic user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "incidentIo" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "microsoftTeams" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "dockerHub" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] } ] } }, "organizationRoles": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": [ "OrganizationAdmin", "OrganizationMember" ] } }, "teams": { "description": "The teams the member belongs to.", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The team Id." }, "name": { "type": "string", "description": "The name of the team", "minLength": 1 } }, "required": [ "id", "name" ] } }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] } }, "required": [ "id", "email", "connectedAccounts", "organization", "favorites" ], "description": "Successfully created a member for an organization" }, "example": { "id": "memb_66bf99b72a0043f841769880", "firstName": "John", "lastName": "Doe", "nickname": "John Doe", "email": "john.doe@hyphen.ai", "organization": { "id": "org_66bf99b72a0043f841769880", "name": "Organization Name" }, "connectedAccounts": [ { "type": "github", "identifier": "hyphenated-username", "profileUrl": "https://github.com/hyphenated-username" }, { "type": "npm", "identifier": "npm-username", "email": "john.doe@hyphen.ai" }, { "type": "newRelic", "identifier": "newrelic-userid", "email": "john.doe@hyphen.ai" }, { "type": "incidentIo", "identifier": "incident-io-userid", "email": "john.doe@hyphen.ai" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "get": { "summary": "Get a list of members for an organization", "tags": [ "Members" ], "parameters": [ { "schema": { "type": "integer", "minimum": 1, "default": 1 }, "in": "query", "name": "pageNum", "required": false, "description": "The page number." }, { "schema": { "type": "integer", "minimum": 5, "maximum": 200, "default": 50 }, "in": "query", "name": "pageSize", "required": false, "description": "The page size." }, { "schema": { "type": "string" }, "in": "query", "name": "search", "required": false, "description": "Search by name or email" }, { "schema": { "type": "boolean" }, "in": "query", "name": "includeApiKeys", "required": false, "description": "Include API keys Members." }, { "schema": { "type": "boolean" }, "in": "query", "name": "includeOrganizationRoles", "required": false, "description": "Include organization roles for each member." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "Successfully got a list of members for an organization", "content": { "application/json": { "schema": { "description": "Successfully got a list of members for an organization", "type": "object", "additionalProperties": false, "properties": { "total": { "description": "The total number of records.", "type": "number" }, "pageNum": { "description": "The page number.", "type": "number" }, "pageSize": { "description": "The page size.", "type": "number" }, "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The member Id.", "type": "string" }, "firstName": { "description": "The member first name.", "type": "string" }, "lastName": { "description": "The member last name.", "type": "string" }, "nickname": { "description": "The member nickname.", "type": "string" }, "email": { "description": "The member primary email address.", "type": "string", "format": "email" }, "memory": { "description": "Plain-text memory used as contextual data for member-created LLM sessions.", "type": [ "null", "string" ], "maxLength": 8000 }, "favorites": { "description": "The member favorite items.", "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "type", "id", "alternateId", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Team" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^team_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "LinkCode" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^code_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "App" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] } }, "required": [ "type", "id", "alternateId", "name", "project" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Toggle" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^tggl_[a-fA-F0-9]{24}$" }, "key": { "type": "string" }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] } }, "required": [ "type", "id", "key", "project" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "type", "id", "name" ] } ] } }, "connectedAccounts": { "description": "The connected accounts of the member.", "type": "array", "items": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "github" ] }, "identifier": { "description": "The GitHub username.", "type": "string" }, "email": { "description": "The GitHub email.", "type": "string", "format": "email" }, "profileUrl": { "description": "The GitHub profile url.", "type": "string", "format": "uri" } }, "required": [ "type", "identifier", "profileUrl" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "slack" ] }, "identifier": { "description": "The slack account Id.", "type": "string" }, "email": { "description": "The slack email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "discord" ] }, "identifier": { "description": "The Discord account Id.", "type": "string" } }, "required": [ "type", "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "idp" ] }, "identifier": { "description": "The user Id.", "type": "string" } }, "required": [ "type", "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "apiKey" ] }, "identifier": { "description": "The API key Id.", "type": "string" } }, "required": [ "type", "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "googleWorkspace" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "googleCloud" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "office365" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "azure" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "aws" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "npm" ] }, "identifier": { "description": "The npm username.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "jira" ] }, "identifier": { "description": "The Jira account ID.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "newRelic" ] }, "identifier": { "description": "The New Relic user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "incidentIo" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "microsoftTeams" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "dockerHub" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] } ] } }, "organizationRoles": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": [ "OrganizationAdmin", "OrganizationMember" ] } }, "teams": { "description": "The teams the member belongs to.", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The team Id." }, "name": { "type": "string", "description": "The name of the team", "minLength": 1 } }, "required": [ "id", "name" ] } }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] } }, "required": [ "id", "email", "connectedAccounts", "organization", "favorites" ], "example": { "id": "memb_66bf99b72a0043f841769880", "firstName": "John", "lastName": "Doe", "nickname": "John Doe", "email": "john.doe@hyphen.ai", "organization": { "id": "org_66bf99b72a0043f841769880", "name": "Organization Name" }, "connectedAccounts": [ { "type": "github", "identifier": "hyphenated-username", "profileUrl": "https://github.com/hyphenated-username" }, { "type": "npm", "identifier": "npm-username", "email": "john.doe@hyphen.ai" }, { "type": "newRelic", "identifier": "newrelic-userid", "email": "john.doe@hyphen.ai" }, { "type": "incidentIo", "identifier": "incident-io-userid", "email": "john.doe@hyphen.ai" } ] } } } }, "required": [ "total", "pageNum", "pageSize", "data" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/members/{memberId}/": { "get": { "summary": "Get the member for an organization", "tags": [ "Members" ], "parameters": [ { "schema": { "type": "boolean" }, "in": "query", "name": "includeOrganizationRoles", "required": false, "description": "Include organization roles for the member." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "in": "path", "name": "memberId", "required": true, "description": "The member Id." } ], "responses": { "200": { "description": "Successfully got the member for an organization", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The member Id.", "type": "string" }, "firstName": { "description": "The member first name.", "type": "string" }, "lastName": { "description": "The member last name.", "type": "string" }, "nickname": { "description": "The member nickname.", "type": "string" }, "email": { "description": "The member primary email address.", "type": "string", "format": "email" }, "memory": { "description": "Plain-text memory used as contextual data for member-created LLM sessions.", "type": [ "null", "string" ], "maxLength": 8000 }, "favorites": { "description": "The member favorite items.", "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "type", "id", "alternateId", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Team" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^team_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "LinkCode" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^code_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "App" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] } }, "required": [ "type", "id", "alternateId", "name", "project" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Toggle" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^tggl_[a-fA-F0-9]{24}$" }, "key": { "type": "string" }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] } }, "required": [ "type", "id", "key", "project" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "type", "id", "name" ] } ] } }, "connectedAccounts": { "description": "The connected accounts of the member.", "type": "array", "items": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "github" ] }, "identifier": { "description": "The GitHub username.", "type": "string" }, "email": { "description": "The GitHub email.", "type": "string", "format": "email" }, "profileUrl": { "description": "The GitHub profile url.", "type": "string", "format": "uri" } }, "required": [ "type", "identifier", "profileUrl" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "slack" ] }, "identifier": { "description": "The slack account Id.", "type": "string" }, "email": { "description": "The slack email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "discord" ] }, "identifier": { "description": "The Discord account Id.", "type": "string" } }, "required": [ "type", "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "idp" ] }, "identifier": { "description": "The user Id.", "type": "string" } }, "required": [ "type", "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "apiKey" ] }, "identifier": { "description": "The API key Id.", "type": "string" } }, "required": [ "type", "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "googleWorkspace" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "googleCloud" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "office365" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "azure" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "aws" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "npm" ] }, "identifier": { "description": "The npm username.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "jira" ] }, "identifier": { "description": "The Jira account ID.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "newRelic" ] }, "identifier": { "description": "The New Relic user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "incidentIo" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "microsoftTeams" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "dockerHub" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] } ] } }, "organizationRoles": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": [ "OrganizationAdmin", "OrganizationMember" ] } }, "teams": { "description": "The teams the member belongs to.", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The team Id." }, "name": { "type": "string", "description": "The name of the team", "minLength": 1 } }, "required": [ "id", "name" ] } }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] } }, "required": [ "id", "email", "connectedAccounts", "organization", "favorites" ], "description": "Successfully got the member for an organization" }, "example": { "id": "memb_66bf99b72a0043f841769880", "firstName": "John", "lastName": "Doe", "nickname": "John Doe", "email": "john.doe@hyphen.ai", "organization": { "id": "org_66bf99b72a0043f841769880", "name": "Organization Name" }, "connectedAccounts": [ { "type": "github", "identifier": "hyphenated-username", "profileUrl": "https://github.com/hyphenated-username" }, { "type": "npm", "identifier": "npm-username", "email": "john.doe@hyphen.ai" }, { "type": "newRelic", "identifier": "newrelic-userid", "email": "john.doe@hyphen.ai" }, { "type": "incidentIo", "identifier": "incident-io-userid", "email": "john.doe@hyphen.ai" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "patch": { "summary": "Update the member for an organization", "tags": [ "Members" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "firstName": { "description": "The member first name.", "type": "string" }, "lastName": { "description": "The member last name.", "type": "string" }, "email": { "description": "The member primary email address.", "type": "string", "format": "email" }, "memory": { "description": "Plain-text memory used as contextual data for member-created LLM sessions.", "type": [ "null", "string" ], "maxLength": 8000 } } }, "example": { "firstName": "John" } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "in": "path", "name": "memberId", "required": true, "description": "The member Id." } ], "responses": { "200": { "description": "Successfully updated the member for an organization", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The member Id.", "type": "string" }, "firstName": { "description": "The member first name.", "type": "string" }, "lastName": { "description": "The member last name.", "type": "string" }, "nickname": { "description": "The member nickname.", "type": "string" }, "email": { "description": "The member primary email address.", "type": "string", "format": "email" }, "memory": { "description": "Plain-text memory used as contextual data for member-created LLM sessions.", "type": [ "null", "string" ], "maxLength": 8000 }, "favorites": { "description": "The member favorite items.", "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "type", "id", "alternateId", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Team" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^team_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "LinkCode" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^code_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "App" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] } }, "required": [ "type", "id", "alternateId", "name", "project" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Toggle" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^tggl_[a-fA-F0-9]{24}$" }, "key": { "type": "string" }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] } }, "required": [ "type", "id", "key", "project" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "type", "id", "name" ] } ] } }, "connectedAccounts": { "description": "The connected accounts of the member.", "type": "array", "items": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "github" ] }, "identifier": { "description": "The GitHub username.", "type": "string" }, "email": { "description": "The GitHub email.", "type": "string", "format": "email" }, "profileUrl": { "description": "The GitHub profile url.", "type": "string", "format": "uri" } }, "required": [ "type", "identifier", "profileUrl" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "slack" ] }, "identifier": { "description": "The slack account Id.", "type": "string" }, "email": { "description": "The slack email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "discord" ] }, "identifier": { "description": "The Discord account Id.", "type": "string" } }, "required": [ "type", "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "idp" ] }, "identifier": { "description": "The user Id.", "type": "string" } }, "required": [ "type", "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "apiKey" ] }, "identifier": { "description": "The API key Id.", "type": "string" } }, "required": [ "type", "identifier" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "googleWorkspace" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "googleCloud" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "office365" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "azure" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "aws" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "npm" ] }, "identifier": { "description": "The npm username.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "jira" ] }, "identifier": { "description": "The Jira account ID.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "newRelic" ] }, "identifier": { "description": "The New Relic user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "incidentIo" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "microsoftTeams" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "The connected account type.", "type": "string", "enum": [ "dockerHub" ] }, "identifier": { "description": "The user id.", "type": "string" }, "email": { "description": "The user email.", "type": "string", "format": "email" } }, "required": [ "type", "identifier", "email" ] } ] } }, "organizationRoles": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": [ "OrganizationAdmin", "OrganizationMember" ] } }, "teams": { "description": "The teams the member belongs to.", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The team Id." }, "name": { "type": "string", "description": "The name of the team", "minLength": 1 } }, "required": [ "id", "name" ] } }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] } }, "required": [ "id", "email", "connectedAccounts", "organization", "favorites" ], "description": "Successfully updated the member for an organization" }, "example": { "id": "memb_66bf99b72a0043f841769880", "firstName": "John", "lastName": "Doe", "nickname": "John Doe", "email": "john.doe@hyphen.ai", "organization": { "id": "org_66bf99b72a0043f841769880", "name": "Organization Name" }, "connectedAccounts": [ { "type": "github", "identifier": "hyphenated-username", "profileUrl": "https://github.com/hyphenated-username" }, { "type": "npm", "identifier": "npm-username", "email": "john.doe@hyphen.ai" }, { "type": "newRelic", "identifier": "newrelic-userid", "email": "john.doe@hyphen.ai" }, { "type": "incidentIo", "identifier": "incident-io-userid", "email": "john.doe@hyphen.ai" } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "delete": { "summary": "Delete the member for an organization", "tags": [ "Members" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "in": "path", "name": "memberId", "required": true, "description": "The member Id." } ], "responses": { "204": { "description": "Successfully deleted the member for an organization" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/members/{memberId}/favorites": { "post": { "summary": "Add a favorite to the member", "tags": [ "Members" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "id": { "oneOf": [ { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "project id" }, { "type": "string", "minLength": 1, "pattern": "^team_[a-fA-F0-9]{24}$", "description": "team id" }, { "type": "string", "minLength": 1, "pattern": "^code_[a-fA-F0-9]{24}$", "description": "link id" }, { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$", "description": "app id" }, { "type": "string", "minLength": 1, "pattern": "^tggl_[a-fA-F0-9]{24}$", "description": "toggle id" }, { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "deployment id" }, { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "Kubernetes cluster id" } ], "description": "The favorite to post for the member." } }, "required": [ "id" ] }, "example": { "id": "team_123" } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "in": "path", "name": "memberId", "required": true, "description": "The member Id." } ], "responses": { "201": { "description": "Successfully created the favorite for the member", "content": { "application/json": { "schema": { "description": "Successfully created the favorite for the member", "type": "object", "additionalProperties": false, "properties": { "favorites": { "description": "The member favorite items.", "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" } }, "required": [ "type", "id", "alternateId", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Team" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^team_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "LinkCode" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^code_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "App" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$" }, "alternateId": { "type": "string" }, "name": { "type": "string" }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] } }, "required": [ "type", "id", "alternateId", "name", "project" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Toggle" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^tggl_[a-fA-F0-9]{24}$" }, "key": { "type": "string" }, "project": { "type": "object", "additionalProperties": false, "properties": { "id": { "description": "The project Id.", "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "alternateId": { "description": "The project alternate id. This id is set by the user and can be used to retrieve a project.\n\nMust be unique within the organization.\n\nMust have a length between 1 and 25 characters.\n\nMust only contain lowercase letters, numbers, hyphens, and underscores.\n\nMust not be the word \"environments\".", "type": "string", "maxLength": 25, "minLength": 1, "pattern": "^(?!.*\\b(environments)\\b)[a-z0-9\\-_]+$" }, "name": { "description": "The project name.\n\nMust have a length between 1 and 100 characters.", "type": "string", "maxLength": 100, "minLength": 1 } }, "required": [ "id", "alternateId", "name" ] } }, "required": [ "type", "id", "key", "project" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "type", "id", "name" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "name": { "type": "string" } }, "required": [ "type", "id", "name" ] } ] } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/members/{memberId}/favorites/{favoriteId}": { "patch": { "summary": "Update the favorite for a member", "tags": [ "Members" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "index": { "type": "number", "description": "The index for the favorite.", "minimum": 0 } }, "required": [ "index" ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "in": "path", "name": "memberId", "required": true, "description": "The member Id." }, { "schema": { "oneOf": [ { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "project id" }, { "type": "string", "minLength": 1, "pattern": "^team_[a-fA-F0-9]{24}$", "description": "team id" }, { "type": "string", "minLength": 1, "pattern": "^code_[a-fA-F0-9]{24}$", "description": "link id" }, { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$", "description": "app id" }, { "type": "string", "minLength": 1, "pattern": "^tggl_[a-fA-F0-9]{24}$", "description": "toggle id" }, { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "deployment id" }, { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "Kubernetes cluster id" } ] }, "in": "path", "name": "favoriteId", "required": true, "description": "The favorite to update for the member." } ], "responses": { "204": { "description": "Successfully updated the favorite for the member" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "delete": { "summary": "Delete the favorite for a member", "tags": [ "Members" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "in": "path", "name": "memberId", "required": true, "description": "The member Id." }, { "schema": { "oneOf": [ { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "project id" }, { "type": "string", "minLength": 1, "pattern": "^team_[a-fA-F0-9]{24}$", "description": "team id" }, { "type": "string", "minLength": 1, "pattern": "^code_[a-fA-F0-9]{24}$", "description": "link id" }, { "type": "string", "minLength": 1, "pattern": "^app_[a-fA-F0-9]{24}$", "description": "app id" }, { "type": "string", "minLength": 1, "pattern": "^tggl_[a-fA-F0-9]{24}$", "description": "toggle id" }, { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "deployment id" }, { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "Kubernetes cluster id" } ] }, "in": "path", "name": "favoriteId", "required": true, "description": "The favorite to delete for the member." } ], "responses": { "204": { "description": "Successfully deleted the favorite for the member" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/members/{memberId}/notifications/": { "get": { "summary": "Get your member notification settings", "tags": [ "Members" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "in": "path", "name": "memberId", "required": true, "description": "The member Id." } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "preferences", "slackWorkspaces", "connections", "verification", "sms", "notificationGroups" ], "properties": { "notificationGroups": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "label", "description" ], "properties": { "id": { "type": "string", "enum": [ "deployments", "onCall", "agentTasks", "infrastructure", "reports", "organization", "billing" ] }, "label": { "type": "string" }, "description": { "type": "string" } } } }, "sms": { "type": "object", "additionalProperties": false, "required": [ "state", "disclosureVersion", "syncPending", "pendingConsent" ], "properties": { "state": { "type": "string", "enum": [ "enabled", "disabled", "blocked" ] }, "disclosureVersion": { "type": "string", "enum": [ "member-sms-v1" ] }, "verificationId": { "type": "string" }, "agreedAt": { "type": "string", "format": "date-time" }, "optOutAt": { "type": "string", "format": "date-time" }, "optOutSource": { "type": "string", "enum": [ "member", "stop", "carrier" ] }, "syncPending": { "type": "boolean" }, "pendingConsent": { "anyOf": [ { "type": "object", "additionalProperties": false, "required": [ "id", "verificationId", "agreedAt", "expiresAt" ], "properties": { "id": { "type": "string", "format": "uuid" }, "verificationId": { "type": "string", "format": "uuid" }, "agreedAt": { "type": "string", "format": "date-time" }, "expiresAt": { "type": "string", "format": "date-time" } } }, { "type": "null" } ] } } }, "preferences": { "type": "object", "additionalProperties": false, "required": [ "channels", "groups" ], "properties": { "groups": { "type": "object", "additionalProperties": false, "properties": { "deployments": { "type": "array", "maxItems": 2, "uniqueItems": true, "items": { "type": "string", "enum": [ "slack", "sms" ] } }, "onCall": { "type": "array", "maxItems": 2, "uniqueItems": true, "items": { "type": "string", "enum": [ "slack", "sms" ] } }, "agentTasks": { "type": "array", "maxItems": 2, "uniqueItems": true, "items": { "type": "string", "enum": [ "slack", "sms" ] } }, "infrastructure": { "type": "array", "maxItems": 2, "uniqueItems": true, "items": { "type": "string", "enum": [ "slack", "sms" ] } }, "reports": { "type": "array", "maxItems": 2, "uniqueItems": true, "items": { "type": "string", "enum": [ "slack", "sms" ] } }, "organization": { "type": "array", "maxItems": 2, "uniqueItems": true, "items": { "type": "string", "enum": [ "slack", "sms" ] } }, "billing": { "type": "array", "maxItems": 2, "uniqueItems": true, "items": { "type": "string", "enum": [ "slack", "sms" ] } } }, "required": [ "deployments", "onCall", "agentTasks", "infrastructure", "reports", "organization", "billing" ] }, "channels": { "type": "array", "maxItems": 2, "uniqueItems": true, "items": { "type": "object", "if": { "type": "object", "properties": { "type": { "enum": [ "sms" ] } }, "required": [ "type" ] }, "then": { "type": "object", "additionalProperties": false, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "sms" ] } } }, "else": { "type": "object", "additionalProperties": false, "required": [ "type", "integrationId" ], "properties": { "type": { "type": "string", "enum": [ "slack" ] }, "integrationId": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" } } } } } } }, "slackWorkspaces": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "integrationId", "workspaceId", "name" ], "properties": { "integrationId": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "workspaceId": { "type": "string" }, "name": { "type": "string" } } } }, "connections": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "channel", "destination", "email", "verifiedAt" ], "properties": { "id": { "type": "string" }, "channel": { "type": "object", "additionalProperties": false, "required": [ "type", "integrationId" ], "properties": { "type": { "type": "string", "enum": [ "slack" ] }, "integrationId": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" } } }, "destination": { "type": "object", "additionalProperties": false, "required": [ "type", "workspaceId", "userId" ], "properties": { "type": { "type": "string", "enum": [ "slack" ] }, "workspaceId": { "type": "string" }, "userId": { "type": "string" } } }, "email": { "type": "string", "format": "email", "maxLength": 254 }, "verifiedAt": { "type": "string", "format": "date-time" } } } }, "verification": { "type": [ "null", "object" ], "additionalProperties": false, "required": [ "id", "integrationId", "email", "expiresAt", "resendAt" ], "properties": { "id": { "type": "string", "format": "uuid" }, "integrationId": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "email": { "type": "string", "format": "email", "maxLength": 254 }, "expiresAt": { "type": "string", "format": "date-time" }, "resendAt": { "type": "string", "format": "date-time" } } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "429": { "description": "Too many Slack verification attempts", "content": { "application/json": { "schema": { "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } }, "description": "Too many Slack verification attempts" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "502": { "description": "Slack verification is temporarily unavailable", "content": { "application/json": { "schema": { "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } }, "description": "Slack verification is temporarily unavailable" } } } } } }, "put": { "summary": "Update your member notification preferences", "tags": [ "Members" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "channels" ], "properties": { "channels": { "type": "array", "maxItems": 2, "uniqueItems": true, "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "required": [ "type", "integrationId" ], "properties": { "type": { "type": "string", "enum": [ "slack" ] }, "integrationId": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" } } }, { "type": "object", "additionalProperties": false, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "sms" ] } } } ] } } } } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "in": "path", "name": "memberId", "required": true, "description": "The member Id." } ], "responses": { "204": { "description": "Default Response" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "429": { "description": "Too many Slack verification attempts", "content": { "application/json": { "schema": { "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } }, "description": "Too many Slack verification attempts" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "502": { "description": "Slack verification is temporarily unavailable", "content": { "application/json": { "schema": { "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } }, "description": "Slack verification is temporarily unavailable" } } } } } } }, "/api/organizations/{organizationId}/members/{memberId}/notifications/test": { "post": { "summary": "Send a test notification to your enabled channels", "tags": [ "Members" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "requestId" ], "properties": { "requestId": { "type": "string", "format": "uuid" }, "channel": { "type": "string", "enum": [ "sms" ] }, "group": { "type": "string", "enum": [ "deployments", "onCall", "agentTasks", "infrastructure", "reports", "organization", "billing" ] } } } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "in": "path", "name": "memberId", "required": true, "description": "The member Id." } ], "responses": { "202": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "notificationId", "outcome" ], "properties": { "notificationId": { "type": "string", "format": "uuid" }, "outcome": { "type": "string", "enum": [ "queued", "suppressed", "completed" ] } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/members/{memberId}/notifications/slack/verifications": { "post": { "summary": "Verify your Slack account for member notifications", "tags": [ "Members" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "integrationId", "email" ], "properties": { "integrationId": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "email": { "type": "string", "format": "email", "maxLength": 254 } } } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "in": "path", "name": "memberId", "required": true, "description": "The member Id." } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "preferences", "slackWorkspaces", "connections", "verification", "sms", "notificationGroups" ], "properties": { "notificationGroups": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "label", "description" ], "properties": { "id": { "type": "string", "enum": [ "deployments", "onCall", "agentTasks", "infrastructure", "reports", "organization", "billing" ] }, "label": { "type": "string" }, "description": { "type": "string" } } } }, "sms": { "type": "object", "additionalProperties": false, "required": [ "state", "disclosureVersion", "syncPending", "pendingConsent" ], "properties": { "state": { "type": "string", "enum": [ "enabled", "disabled", "blocked" ] }, "disclosureVersion": { "type": "string", "enum": [ "member-sms-v1" ] }, "verificationId": { "type": "string" }, "agreedAt": { "type": "string", "format": "date-time" }, "optOutAt": { "type": "string", "format": "date-time" }, "optOutSource": { "type": "string", "enum": [ "member", "stop", "carrier" ] }, "syncPending": { "type": "boolean" }, "pendingConsent": { "anyOf": [ { "type": "object", "additionalProperties": false, "required": [ "id", "verificationId", "agreedAt", "expiresAt" ], "properties": { "id": { "type": "string", "format": "uuid" }, "verificationId": { "type": "string", "format": "uuid" }, "agreedAt": { "type": "string", "format": "date-time" }, "expiresAt": { "type": "string", "format": "date-time" } } }, { "type": "null" } ] } } }, "preferences": { "type": "object", "additionalProperties": false, "required": [ "channels", "groups" ], "properties": { "groups": { "type": "object", "additionalProperties": false, "properties": { "deployments": { "type": "array", "maxItems": 2, "uniqueItems": true, "items": { "type": "string", "enum": [ "slack", "sms" ] } }, "onCall": { "type": "array", "maxItems": 2, "uniqueItems": true, "items": { "type": "string", "enum": [ "slack", "sms" ] } }, "agentTasks": { "type": "array", "maxItems": 2, "uniqueItems": true, "items": { "type": "string", "enum": [ "slack", "sms" ] } }, "infrastructure": { "type": "array", "maxItems": 2, "uniqueItems": true, "items": { "type": "string", "enum": [ "slack", "sms" ] } }, "reports": { "type": "array", "maxItems": 2, "uniqueItems": true, "items": { "type": "string", "enum": [ "slack", "sms" ] } }, "organization": { "type": "array", "maxItems": 2, "uniqueItems": true, "items": { "type": "string", "enum": [ "slack", "sms" ] } }, "billing": { "type": "array", "maxItems": 2, "uniqueItems": true, "items": { "type": "string", "enum": [ "slack", "sms" ] } } }, "required": [ "deployments", "onCall", "agentTasks", "infrastructure", "reports", "organization", "billing" ] }, "channels": { "type": "array", "maxItems": 2, "uniqueItems": true, "items": { "type": "object", "if": { "type": "object", "properties": { "type": { "enum": [ "sms" ] } }, "required": [ "type" ] }, "then": { "type": "object", "additionalProperties": false, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "sms" ] } } }, "else": { "type": "object", "additionalProperties": false, "required": [ "type", "integrationId" ], "properties": { "type": { "type": "string", "enum": [ "slack" ] }, "integrationId": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" } } } } } } }, "slackWorkspaces": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "integrationId", "workspaceId", "name" ], "properties": { "integrationId": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "workspaceId": { "type": "string" }, "name": { "type": "string" } } } }, "connections": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "channel", "destination", "email", "verifiedAt" ], "properties": { "id": { "type": "string" }, "channel": { "type": "object", "additionalProperties": false, "required": [ "type", "integrationId" ], "properties": { "type": { "type": "string", "enum": [ "slack" ] }, "integrationId": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" } } }, "destination": { "type": "object", "additionalProperties": false, "required": [ "type", "workspaceId", "userId" ], "properties": { "type": { "type": "string", "enum": [ "slack" ] }, "workspaceId": { "type": "string" }, "userId": { "type": "string" } } }, "email": { "type": "string", "format": "email", "maxLength": 254 }, "verifiedAt": { "type": "string", "format": "date-time" } } } }, "verification": { "type": [ "null", "object" ], "additionalProperties": false, "required": [ "id", "integrationId", "email", "expiresAt", "resendAt" ], "properties": { "id": { "type": "string", "format": "uuid" }, "integrationId": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "email": { "type": "string", "format": "email", "maxLength": 254 }, "expiresAt": { "type": "string", "format": "date-time" }, "resendAt": { "type": "string", "format": "date-time" } } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "429": { "description": "Too many Slack verification attempts", "content": { "application/json": { "schema": { "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } }, "description": "Too many Slack verification attempts" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "502": { "description": "Slack verification is temporarily unavailable", "content": { "application/json": { "schema": { "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } }, "description": "Slack verification is temporarily unavailable" } } } } } } }, "/api/organizations/{organizationId}/members/{memberId}/notifications/slack/verifications/{verificationId}/confirm": { "post": { "summary": "Confirm your Slack account for member notifications", "tags": [ "Members" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "code" ], "properties": { "code": { "type": "string", "pattern": "^[0-9]{6}$" } } } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "in": "path", "name": "memberId", "required": true, "description": "The member Id." }, { "schema": { "type": "string", "format": "uuid" }, "in": "path", "name": "verificationId", "required": true } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "preferences", "slackWorkspaces", "connections", "verification", "sms", "notificationGroups" ], "properties": { "notificationGroups": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "label", "description" ], "properties": { "id": { "type": "string", "enum": [ "deployments", "onCall", "agentTasks", "infrastructure", "reports", "organization", "billing" ] }, "label": { "type": "string" }, "description": { "type": "string" } } } }, "sms": { "type": "object", "additionalProperties": false, "required": [ "state", "disclosureVersion", "syncPending", "pendingConsent" ], "properties": { "state": { "type": "string", "enum": [ "enabled", "disabled", "blocked" ] }, "disclosureVersion": { "type": "string", "enum": [ "member-sms-v1" ] }, "verificationId": { "type": "string" }, "agreedAt": { "type": "string", "format": "date-time" }, "optOutAt": { "type": "string", "format": "date-time" }, "optOutSource": { "type": "string", "enum": [ "member", "stop", "carrier" ] }, "syncPending": { "type": "boolean" }, "pendingConsent": { "anyOf": [ { "type": "object", "additionalProperties": false, "required": [ "id", "verificationId", "agreedAt", "expiresAt" ], "properties": { "id": { "type": "string", "format": "uuid" }, "verificationId": { "type": "string", "format": "uuid" }, "agreedAt": { "type": "string", "format": "date-time" }, "expiresAt": { "type": "string", "format": "date-time" } } }, { "type": "null" } ] } } }, "preferences": { "type": "object", "additionalProperties": false, "required": [ "channels", "groups" ], "properties": { "groups": { "type": "object", "additionalProperties": false, "properties": { "deployments": { "type": "array", "maxItems": 2, "uniqueItems": true, "items": { "type": "string", "enum": [ "slack", "sms" ] } }, "onCall": { "type": "array", "maxItems": 2, "uniqueItems": true, "items": { "type": "string", "enum": [ "slack", "sms" ] } }, "agentTasks": { "type": "array", "maxItems": 2, "uniqueItems": true, "items": { "type": "string", "enum": [ "slack", "sms" ] } }, "infrastructure": { "type": "array", "maxItems": 2, "uniqueItems": true, "items": { "type": "string", "enum": [ "slack", "sms" ] } }, "reports": { "type": "array", "maxItems": 2, "uniqueItems": true, "items": { "type": "string", "enum": [ "slack", "sms" ] } }, "organization": { "type": "array", "maxItems": 2, "uniqueItems": true, "items": { "type": "string", "enum": [ "slack", "sms" ] } }, "billing": { "type": "array", "maxItems": 2, "uniqueItems": true, "items": { "type": "string", "enum": [ "slack", "sms" ] } } }, "required": [ "deployments", "onCall", "agentTasks", "infrastructure", "reports", "organization", "billing" ] }, "channels": { "type": "array", "maxItems": 2, "uniqueItems": true, "items": { "type": "object", "if": { "type": "object", "properties": { "type": { "enum": [ "sms" ] } }, "required": [ "type" ] }, "then": { "type": "object", "additionalProperties": false, "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "sms" ] } } }, "else": { "type": "object", "additionalProperties": false, "required": [ "type", "integrationId" ], "properties": { "type": { "type": "string", "enum": [ "slack" ] }, "integrationId": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" } } } } } } }, "slackWorkspaces": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "integrationId", "workspaceId", "name" ], "properties": { "integrationId": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "workspaceId": { "type": "string" }, "name": { "type": "string" } } } }, "connections": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "channel", "destination", "email", "verifiedAt" ], "properties": { "id": { "type": "string" }, "channel": { "type": "object", "additionalProperties": false, "required": [ "type", "integrationId" ], "properties": { "type": { "type": "string", "enum": [ "slack" ] }, "integrationId": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" } } }, "destination": { "type": "object", "additionalProperties": false, "required": [ "type", "workspaceId", "userId" ], "properties": { "type": { "type": "string", "enum": [ "slack" ] }, "workspaceId": { "type": "string" }, "userId": { "type": "string" } } }, "email": { "type": "string", "format": "email", "maxLength": 254 }, "verifiedAt": { "type": "string", "format": "date-time" } } } }, "verification": { "type": [ "null", "object" ], "additionalProperties": false, "required": [ "id", "integrationId", "email", "expiresAt", "resendAt" ], "properties": { "id": { "type": "string", "format": "uuid" }, "integrationId": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$" }, "email": { "type": "string", "format": "email", "maxLength": 254 }, "expiresAt": { "type": "string", "format": "date-time" }, "resendAt": { "type": "string", "format": "date-time" } } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "429": { "description": "Too many Slack verification attempts", "content": { "application/json": { "schema": { "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } }, "description": "Too many Slack verification attempts" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "502": { "description": "Slack verification is temporarily unavailable", "content": { "application/json": { "schema": { "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } }, "description": "Slack verification is temporarily unavailable" } } } } } } }, "/api/organizations/{organizationId}/members/{memberId}/notifications/slack/connection": { "delete": { "summary": "Disconnect your Slack account from member notifications", "tags": [ "Members" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "in": "path", "name": "memberId", "required": true, "description": "The member Id." } ], "responses": { "204": { "description": "Default Response" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "429": { "description": "Too many Slack verification attempts", "content": { "application/json": { "schema": { "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } }, "description": "Too many Slack verification attempts" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "502": { "description": "Slack verification is temporarily unavailable", "content": { "application/json": { "schema": { "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } }, "description": "Slack verification is temporarily unavailable" } } } } } } }, "/api/organizations/{organizationId}/members/{memberId}/phone/": { "get": { "summary": "Get your member phone settings", "tags": [ "Members" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "in": "path", "name": "memberId", "required": true, "description": "The member Id." } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "phone", "verification" ], "properties": { "phone": { "type": [ "null", "object" ], "additionalProperties": false, "required": [ "phoneNumber", "verifiedAt", "verificationId", "memberId", "organization" ], "properties": { "phoneNumber": { "type": "string", "minLength": 1, "maxLength": 64, "pattern": "\\S" }, "verifiedAt": { "type": "string", "format": "date-time" }, "verificationId": { "type": "string", "format": "uuid" }, "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$", "description": "The member Id." }, "organization": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$", "description": "The organization Id." }, "name": { "type": "string" } } } } }, "verification": { "type": [ "null", "object" ], "additionalProperties": false, "required": [ "id", "phoneNumber", "expiresAt", "resendAt", "requiresMoveConfirmation" ], "properties": { "id": { "type": "string", "format": "uuid" }, "phoneNumber": { "type": "string", "minLength": 1, "maxLength": 64, "pattern": "\\S" }, "expiresAt": { "type": "string", "format": "date-time" }, "resendAt": { "type": "string", "format": "date-time" }, "requiresMoveConfirmation": { "type": "boolean" }, "previousOrganizationName": { "type": "string" } } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "429": { "description": "Too many phone verification attempts", "content": { "application/json": { "schema": { "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } }, "description": "Too many phone verification attempts" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "503": { "description": "Phone verification is temporarily unavailable", "content": { "application/json": { "schema": { "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } }, "description": "Phone verification is temporarily unavailable" } } } } } }, "delete": { "summary": "Remove your member phone number", "tags": [ "Members" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "in": "path", "name": "memberId", "required": true, "description": "The member Id." } ], "responses": { "204": { "description": "Default Response" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "429": { "description": "Too many phone verification attempts", "content": { "application/json": { "schema": { "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } }, "description": "Too many phone verification attempts" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "503": { "description": "Phone verification is temporarily unavailable", "content": { "application/json": { "schema": { "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } }, "description": "Phone verification is temporarily unavailable" } } } } } } }, "/api/organizations/{organizationId}/members/{memberId}/phone/verifications": { "post": { "summary": "Verify a phone number for your member", "tags": [ "Members" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "phoneNumber" ], "properties": { "phoneNumber": { "type": "string", "minLength": 1, "maxLength": 64, "pattern": "\\S" } } } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "in": "path", "name": "memberId", "required": true, "description": "The member Id." } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "phone", "verification" ], "properties": { "phone": { "type": [ "null", "object" ], "additionalProperties": false, "required": [ "phoneNumber", "verifiedAt", "verificationId", "memberId", "organization" ], "properties": { "phoneNumber": { "type": "string", "minLength": 1, "maxLength": 64, "pattern": "\\S" }, "verifiedAt": { "type": "string", "format": "date-time" }, "verificationId": { "type": "string", "format": "uuid" }, "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$", "description": "The member Id." }, "organization": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$", "description": "The organization Id." }, "name": { "type": "string" } } } } }, "verification": { "type": [ "null", "object" ], "additionalProperties": false, "required": [ "id", "phoneNumber", "expiresAt", "resendAt", "requiresMoveConfirmation" ], "properties": { "id": { "type": "string", "format": "uuid" }, "phoneNumber": { "type": "string", "minLength": 1, "maxLength": 64, "pattern": "\\S" }, "expiresAt": { "type": "string", "format": "date-time" }, "resendAt": { "type": "string", "format": "date-time" }, "requiresMoveConfirmation": { "type": "boolean" }, "previousOrganizationName": { "type": "string" } } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "429": { "description": "Too many phone verification attempts", "content": { "application/json": { "schema": { "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } }, "description": "Too many phone verification attempts" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "503": { "description": "Phone verification is temporarily unavailable", "content": { "application/json": { "schema": { "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } }, "description": "Phone verification is temporarily unavailable" } } } } } } }, "/api/organizations/{organizationId}/members/{memberId}/phone/verifications/{verificationId}/resend": { "post": { "summary": "Resend your phone verification code", "tags": [ "Members" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "in": "path", "name": "memberId", "required": true, "description": "The member Id." }, { "schema": { "type": "string", "format": "uuid" }, "in": "path", "name": "verificationId", "required": true } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "phone", "verification" ], "properties": { "phone": { "type": [ "null", "object" ], "additionalProperties": false, "required": [ "phoneNumber", "verifiedAt", "verificationId", "memberId", "organization" ], "properties": { "phoneNumber": { "type": "string", "minLength": 1, "maxLength": 64, "pattern": "\\S" }, "verifiedAt": { "type": "string", "format": "date-time" }, "verificationId": { "type": "string", "format": "uuid" }, "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$", "description": "The member Id." }, "organization": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$", "description": "The organization Id." }, "name": { "type": "string" } } } } }, "verification": { "type": [ "null", "object" ], "additionalProperties": false, "required": [ "id", "phoneNumber", "expiresAt", "resendAt", "requiresMoveConfirmation" ], "properties": { "id": { "type": "string", "format": "uuid" }, "phoneNumber": { "type": "string", "minLength": 1, "maxLength": 64, "pattern": "\\S" }, "expiresAt": { "type": "string", "format": "date-time" }, "resendAt": { "type": "string", "format": "date-time" }, "requiresMoveConfirmation": { "type": "boolean" }, "previousOrganizationName": { "type": "string" } } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "429": { "description": "Too many phone verification attempts", "content": { "application/json": { "schema": { "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } }, "description": "Too many phone verification attempts" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "503": { "description": "Phone verification is temporarily unavailable", "content": { "application/json": { "schema": { "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } }, "description": "Phone verification is temporarily unavailable" } } } } } } }, "/api/organizations/{organizationId}/members/{memberId}/phone/verifications/{verificationId}/confirm": { "post": { "summary": "Confirm your member phone number", "tags": [ "Members" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "code" ], "properties": { "code": { "type": "string", "pattern": "^[0-9]{4,10}$" }, "confirmMove": { "type": "boolean" } } } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$" }, "in": "path", "name": "memberId", "required": true, "description": "The member Id." }, { "schema": { "type": "string", "format": "uuid" }, "in": "path", "name": "verificationId", "required": true } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": [ "phone", "verification" ], "properties": { "phone": { "type": [ "null", "object" ], "additionalProperties": false, "required": [ "phoneNumber", "verifiedAt", "verificationId", "memberId", "organization" ], "properties": { "phoneNumber": { "type": "string", "minLength": 1, "maxLength": 64, "pattern": "\\S" }, "verifiedAt": { "type": "string", "format": "date-time" }, "verificationId": { "type": "string", "format": "uuid" }, "memberId": { "type": "string", "minLength": 1, "pattern": "^memb_[a-fA-F0-9]{24}$", "description": "The member Id." }, "organization": { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$", "description": "The organization Id." }, "name": { "type": "string" } } } } }, "verification": { "type": [ "null", "object" ], "additionalProperties": false, "required": [ "id", "phoneNumber", "expiresAt", "resendAt", "requiresMoveConfirmation" ], "properties": { "id": { "type": "string", "format": "uuid" }, "phoneNumber": { "type": "string", "minLength": 1, "maxLength": 64, "pattern": "\\S" }, "expiresAt": { "type": "string", "format": "date-time" }, "resendAt": { "type": "string", "format": "date-time" }, "requiresMoveConfirmation": { "type": "boolean" }, "previousOrganizationName": { "type": "string" } } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "429": { "description": "Too many phone verification attempts", "content": { "application/json": { "schema": { "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } }, "description": "Too many phone verification attempts" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "503": { "description": "Phone verification is temporarily unavailable", "content": { "application/json": { "schema": { "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } }, "description": "Phone verification is temporarily unavailable" } } } } } } }, "/api/organizations/{organizationId}/planned-events/": { "get": { "summary": "Get a list of planned events for an organization", "tags": [ "Planned Events" ], "parameters": [ { "schema": { "type": "string", "enum": [ "active", "completed", "canceled" ] }, "in": "query", "name": "status", "required": false, "description": "Filter by planned event status." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "Successfully retrieved list of planned events", "content": { "application/json": { "schema": { "description": "Successfully retrieved list of planned events", "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^plev_[a-fA-F0-9]{24}$", "description": "The planned event ID." }, "name": { "type": "string", "description": "The name of the planned event." }, "description": { "type": "string", "description": "A description of the planned event." }, "status": { "type": "string", "enum": [ "active", "completed", "canceled" ], "description": "The current status of the planned event." }, "scheduledStart": { "type": "string", "format": "date-time", "description": "When the event is scheduled to start (ISO 8601)." }, "scheduledEnd": { "type": "string", "format": "date-time", "description": "When the event is scheduled to end (ISO 8601)." }, "recurring": { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string", "description": "Cron expression for the schedule (e.g., \"0 9 * * MON-FRI\")." }, "timezone": { "type": "string", "description": "IANA timezone name (e.g., \"US/Pacific\")." }, "startAt": { "type": "string", "format": "date-time", "description": "Start of the schedule window (ISO 8601)." }, "endAt": { "type": "string", "format": "date-time", "description": "End of the schedule window (ISO 8601)." } }, "required": [ "cron" ], "description": "Recurring schedule for events that repeat (e.g., weekly traffic spike)." }, "references": { "type": "array", "items": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident" ], "description": "The type of the associated resource." }, "id": { "type": "string", "description": "The unique identifier of the associated resource." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "Reference type for a Kubernetes workload selector.", "enum": [ "KubernetesWorkloadSelector" ] }, "clusterId": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster containing the workload." }, "namespace": { "type": "string", "minLength": 1, "description": "The Kubernetes namespace containing the workload." }, "kind": { "type": "string", "minLength": 1, "description": "The Kubernetes workload kind." }, "name": { "type": "string", "minLength": 1, "description": "The Kubernetes workload name." }, "apiVersion": { "type": "string", "minLength": 1, "description": "The Kubernetes API version for disambiguating workloads with the same kind/name." }, "uid": { "type": "string", "minLength": 1, "description": "The workload UID observed when the planned event was created." } }, "required": [ "type", "clusterId", "namespace", "kind", "name" ] } ] }, "description": "References that scope this event to specific resources or Kubernetes workload selectors." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "example": "2024-07-08T15:58:34.219+00:00" }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "example": "2024-07-08T15:58:34.219+00:00" }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "example": "2024-07-08T15:58:34.219+00:00" }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "id", "name", "status", "organization", "meta" ] } } }, "required": [ "data" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "post": { "summary": "Create a planned event", "tags": [ "Planned Events" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "minLength": 1, "description": "The name of the planned event." }, "description": { "type": "string", "description": "A description of the planned event." }, "scheduledStart": { "type": "string", "format": "date-time", "description": "When the event is scheduled to start (ISO 8601)." }, "scheduledEnd": { "type": "string", "format": "date-time", "description": "When the event is scheduled to end (ISO 8601)." }, "recurring": { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string", "description": "Cron expression (e.g., \"0 9 * * MON-FRI\")." }, "timezone": { "type": "string", "description": "IANA timezone name (e.g., \"US/Pacific\")." }, "startAt": { "type": "string", "format": "date-time", "description": "Start of schedule window (ISO 8601)." }, "endAt": { "type": "string", "format": "date-time", "description": "End of schedule window (ISO 8601)." } }, "required": [ "cron" ], "description": "Recurring schedule. Mutually exclusive with scheduledStart." }, "references": { "type": "array", "items": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident" ], "description": "The type of the associated resource." }, "id": { "type": "string", "description": "The unique identifier of the associated resource." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "Reference type for a Kubernetes workload selector.", "enum": [ "KubernetesWorkloadSelector" ] }, "clusterId": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster containing the workload." }, "namespace": { "type": "string", "minLength": 1, "description": "The Kubernetes namespace containing the workload." }, "kind": { "type": "string", "minLength": 1, "description": "The Kubernetes workload kind." }, "name": { "type": "string", "minLength": 1, "description": "The Kubernetes workload name." }, "apiVersion": { "type": "string", "minLength": 1, "description": "The Kubernetes API version for disambiguating workloads with the same kind/name." }, "uid": { "type": "string", "minLength": 1, "description": "The workload UID observed when the planned event was created." } }, "required": [ "type", "clusterId", "namespace", "kind", "name" ] } ] }, "description": "References that scope this event to specific resources or Kubernetes workload selectors.", "minItems": 1 } }, "anyOf": [ { "required": [ "scheduledStart" ] }, { "required": [ "recurring" ] } ], "required": [ "name" ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "201": { "description": "Successfully created a planned event", "content": { "application/json": { "schema": { "description": "Successfully created a planned event", "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^plev_[a-fA-F0-9]{24}$", "description": "The planned event ID." }, "name": { "type": "string", "description": "The name of the planned event." }, "description": { "type": "string", "description": "A description of the planned event." }, "status": { "type": "string", "enum": [ "active", "completed", "canceled" ], "description": "The current status of the planned event." }, "scheduledStart": { "type": "string", "format": "date-time", "description": "When the event is scheduled to start (ISO 8601)." }, "scheduledEnd": { "type": "string", "format": "date-time", "description": "When the event is scheduled to end (ISO 8601)." }, "recurring": { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string", "description": "Cron expression for the schedule (e.g., \"0 9 * * MON-FRI\")." }, "timezone": { "type": "string", "description": "IANA timezone name (e.g., \"US/Pacific\")." }, "startAt": { "type": "string", "format": "date-time", "description": "Start of the schedule window (ISO 8601)." }, "endAt": { "type": "string", "format": "date-time", "description": "End of the schedule window (ISO 8601)." } }, "required": [ "cron" ], "description": "Recurring schedule for events that repeat (e.g., weekly traffic spike)." }, "references": { "type": "array", "items": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident" ], "description": "The type of the associated resource." }, "id": { "type": "string", "description": "The unique identifier of the associated resource." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "Reference type for a Kubernetes workload selector.", "enum": [ "KubernetesWorkloadSelector" ] }, "clusterId": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster containing the workload." }, "namespace": { "type": "string", "minLength": 1, "description": "The Kubernetes namespace containing the workload." }, "kind": { "type": "string", "minLength": 1, "description": "The Kubernetes workload kind." }, "name": { "type": "string", "minLength": 1, "description": "The Kubernetes workload name." }, "apiVersion": { "type": "string", "minLength": 1, "description": "The Kubernetes API version for disambiguating workloads with the same kind/name." }, "uid": { "type": "string", "minLength": 1, "description": "The workload UID observed when the planned event was created." } }, "required": [ "type", "clusterId", "namespace", "kind", "name" ] } ] }, "description": "References that scope this event to specific resources or Kubernetes workload selectors." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "example": "2024-07-08T15:58:34.219+00:00" }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "example": "2024-07-08T15:58:34.219+00:00" }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "example": "2024-07-08T15:58:34.219+00:00" }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "id", "name", "status", "organization", "meta" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/planned-events/{plannedEventId}/": { "get": { "summary": "Get a planned event by ID", "tags": [ "Planned Events" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^plev_[a-fA-F0-9]{24}$" }, "in": "path", "name": "plannedEventId", "required": true, "description": "The planned event ID." } ], "responses": { "200": { "description": "Successfully retrieved planned event", "content": { "application/json": { "schema": { "description": "Successfully retrieved planned event", "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^plev_[a-fA-F0-9]{24}$", "description": "The planned event ID." }, "name": { "type": "string", "description": "The name of the planned event." }, "description": { "type": "string", "description": "A description of the planned event." }, "status": { "type": "string", "enum": [ "active", "completed", "canceled" ], "description": "The current status of the planned event." }, "scheduledStart": { "type": "string", "format": "date-time", "description": "When the event is scheduled to start (ISO 8601)." }, "scheduledEnd": { "type": "string", "format": "date-time", "description": "When the event is scheduled to end (ISO 8601)." }, "recurring": { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string", "description": "Cron expression for the schedule (e.g., \"0 9 * * MON-FRI\")." }, "timezone": { "type": "string", "description": "IANA timezone name (e.g., \"US/Pacific\")." }, "startAt": { "type": "string", "format": "date-time", "description": "Start of the schedule window (ISO 8601)." }, "endAt": { "type": "string", "format": "date-time", "description": "End of the schedule window (ISO 8601)." } }, "required": [ "cron" ], "description": "Recurring schedule for events that repeat (e.g., weekly traffic spike)." }, "references": { "type": "array", "items": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident" ], "description": "The type of the associated resource." }, "id": { "type": "string", "description": "The unique identifier of the associated resource." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "Reference type for a Kubernetes workload selector.", "enum": [ "KubernetesWorkloadSelector" ] }, "clusterId": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster containing the workload." }, "namespace": { "type": "string", "minLength": 1, "description": "The Kubernetes namespace containing the workload." }, "kind": { "type": "string", "minLength": 1, "description": "The Kubernetes workload kind." }, "name": { "type": "string", "minLength": 1, "description": "The Kubernetes workload name." }, "apiVersion": { "type": "string", "minLength": 1, "description": "The Kubernetes API version for disambiguating workloads with the same kind/name." }, "uid": { "type": "string", "minLength": 1, "description": "The workload UID observed when the planned event was created." } }, "required": [ "type", "clusterId", "namespace", "kind", "name" ] } ] }, "description": "References that scope this event to specific resources or Kubernetes workload selectors." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "example": "2024-07-08T15:58:34.219+00:00" }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "example": "2024-07-08T15:58:34.219+00:00" }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "example": "2024-07-08T15:58:34.219+00:00" }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "id", "name", "status", "organization", "meta" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "patch": { "summary": "Update a planned event", "tags": [ "Planned Events" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "minLength": 1, "description": "The name of the planned event." }, "description": { "type": "string", "description": "A description of the planned event." }, "scheduledStart": { "type": "string", "format": "date-time", "description": "When the event starts (ISO 8601)." }, "scheduledEnd": { "type": "string", "format": "date-time", "description": "When the event ends (ISO 8601)." }, "status": { "type": "string", "enum": [ "active", "completed", "canceled" ], "description": "The status of the planned event." }, "recurring": { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string", "description": "Cron expression (e.g., \"0 9 * * MON-FRI\")." }, "timezone": { "type": "string", "description": "IANA timezone name (e.g., \"US/Pacific\")." }, "startAt": { "type": "string", "format": "date-time", "description": "Start of schedule window (ISO 8601)." }, "endAt": { "type": "string", "format": "date-time", "description": "End of schedule window (ISO 8601)." } }, "required": [ "cron" ], "description": "Recurring schedule for the planned event." }, "references": { "type": "array", "items": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident" ], "description": "The type of the associated resource." }, "id": { "type": "string", "description": "The unique identifier of the associated resource." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "Reference type for a Kubernetes workload selector.", "enum": [ "KubernetesWorkloadSelector" ] }, "clusterId": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster containing the workload." }, "namespace": { "type": "string", "minLength": 1, "description": "The Kubernetes namespace containing the workload." }, "kind": { "type": "string", "minLength": 1, "description": "The Kubernetes workload kind." }, "name": { "type": "string", "minLength": 1, "description": "The Kubernetes workload name." }, "apiVersion": { "type": "string", "minLength": 1, "description": "The Kubernetes API version for disambiguating workloads with the same kind/name." }, "uid": { "type": "string", "minLength": 1, "description": "The workload UID observed when the planned event was created." } }, "required": [ "type", "clusterId", "namespace", "kind", "name" ] } ] }, "description": "References that scope this event to specific resources or Kubernetes workload selectors.", "minItems": 1 } }, "minProperties": 1 } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^plev_[a-fA-F0-9]{24}$" }, "in": "path", "name": "plannedEventId", "required": true, "description": "The planned event ID." } ], "responses": { "200": { "description": "Successfully updated planned event", "content": { "application/json": { "schema": { "description": "Successfully updated planned event", "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "pattern": "^plev_[a-fA-F0-9]{24}$", "description": "The planned event ID." }, "name": { "type": "string", "description": "The name of the planned event." }, "description": { "type": "string", "description": "A description of the planned event." }, "status": { "type": "string", "enum": [ "active", "completed", "canceled" ], "description": "The current status of the planned event." }, "scheduledStart": { "type": "string", "format": "date-time", "description": "When the event is scheduled to start (ISO 8601)." }, "scheduledEnd": { "type": "string", "format": "date-time", "description": "When the event is scheduled to end (ISO 8601)." }, "recurring": { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string", "description": "Cron expression for the schedule (e.g., \"0 9 * * MON-FRI\")." }, "timezone": { "type": "string", "description": "IANA timezone name (e.g., \"US/Pacific\")." }, "startAt": { "type": "string", "format": "date-time", "description": "Start of the schedule window (ISO 8601)." }, "endAt": { "type": "string", "format": "date-time", "description": "End of the schedule window (ISO 8601)." } }, "required": [ "cron" ], "description": "Recurring schedule for events that repeat (e.g., weekly traffic spike)." }, "references": { "type": "array", "items": { "anyOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "Lead", "Deal", "BillingAccount", "Organization", "Member", "Team", "ApiKey", "ApiKeySecret", "PublicKey", "Access", "Project", "ProjectEnvironment", "App", "AppBuild", "EnvironmentResources", "EnvironmentIngress", "EnvironmentRegion", "EnvironmentStorage", "AppDeployment", "AppDeploymentInstance", "DeploymentRun", "DeploymentRunLog", "DeploymentPipeline", "Deployment", "Env", "Domain", "LinkCode", "LinkQrCode", "LinkRequest", "LLMSession", "LLMMessage", "NetInfoRequest", "Toggle", "ToggleTelemetry", "Segment", "OrganizationIntegration", "KubernetesCluster", "KubernetesNamespace", "KubernetesApp", "KubernetesNode", "KubernetesDeployment", "KubernetesReplicaSet", "KubernetesStatefulSet", "KubernetesDaemonSet", "KubernetesJob", "KubernetesCronJob", "KubernetesPod", "KubernetesService", "KubernetesEndpoints", "KubernetesIngress", "KubernetesHorizontalPodAutoscaler", "KubernetesConfigMap", "KubernetesEvent", "IntegrationConnection", "IntegrationConnectionAccess", "Event", "Usage", "Zone", "ResourceRecord", "ResourceRecordValue", "Run", "RunLog", "Policy", "Promo", "AgentTask", "PreviewDeployment", "WebhookEvent", "PlannedEvent", "Incident" ], "description": "The type of the associated resource." }, "id": { "type": "string", "description": "The unique identifier of the associated resource." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "Reference type for a Kubernetes workload selector.", "enum": [ "KubernetesWorkloadSelector" ] }, "clusterId": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster containing the workload." }, "namespace": { "type": "string", "minLength": 1, "description": "The Kubernetes namespace containing the workload." }, "kind": { "type": "string", "minLength": 1, "description": "The Kubernetes workload kind." }, "name": { "type": "string", "minLength": 1, "description": "The Kubernetes workload name." }, "apiVersion": { "type": "string", "minLength": 1, "description": "The Kubernetes API version for disambiguating workloads with the same kind/name." }, "uid": { "type": "string", "minLength": 1, "description": "The workload UID observed when the planned event was created." } }, "required": [ "type", "clusterId", "namespace", "kind", "name" ] } ] }, "description": "References that scope this event to specific resources or Kubernetes workload selectors." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "example": "2024-07-08T15:58:34.219+00:00" }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "example": "2024-07-08T15:58:34.219+00:00" }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "example": "2024-07-08T15:58:34.219+00:00" }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "id", "name", "status", "organization", "meta" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "delete": { "summary": "Delete a planned event", "tags": [ "Planned Events" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^plev_[a-fA-F0-9]{24}$" }, "in": "path", "name": "plannedEventId", "required": true, "description": "The planned event ID." } ], "responses": { "204": { "description": "Successfully deleted planned event" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/policies/": { "get": { "summary": "List policies for an organization", "tags": [ "Policies" ], "parameters": [ { "schema": { "type": "string", "enum": [ "deploy", "agentTask", "kubernetesObservabilityDiscovery" ] }, "in": "query", "name": "type", "required": false }, { "schema": { "type": "string", "enum": [ "Event", "StaleFeatureFlagCleanup", "RotateSecrets", "ResourceCleanup", "KubernetesResourceCleanup", "KubernetesUpgradePlanning", "Optimizer", "OptimizerSimulation", "LogAnalysis", "ApplicationMonitor", "GitHubIssueAutomation", "SignalsInvestigation", "Analysis", "OptimizerExecutor" ] }, "in": "query", "name": "taskType", "required": false }, { "schema": { "type": "string", "minLength": 1 }, "in": "query", "name": "referenceId", "required": false }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy", "enum": [ "deploy" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "retentionMinutes": { "type": "number", "description": "Number of minutes to retain resources before cleanup", "minimum": 0 } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for a policy" }, "description": "Entity references this policy applies" }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "kubernetesObservabilityDiscovery" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean", "description": "Whether detected Kubernetes observability sources are connected automatically." } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "OrganizationIntegration" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$", "description": "The integration ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ] }, "maxItems": 0, "description": "Kubernetes observability discovery policies are organization scoped." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "Optimizer" ] }, "environmentType": { "type": "string", "enum": [ "development", "production", "custom" ], "description": "Optional environment type scope for task policies that target project environments." }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "target": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "KubernetesWorkloadSelector" ] }, "namespace": { "type": "string", "minLength": 1 }, "kind": { "type": "string", "enum": [ "Deployment", "StatefulSet" ] }, "name": { "type": "string", "minLength": 1 } }, "required": [ "type", "namespace", "kind", "name" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "LogAnalysis" ] }, "environmentType": { "type": "string", "enum": [ "development", "production", "custom" ], "description": "Optional environment type scope for task policies that target project environments." }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "StaleFeatureFlagCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "ResourceCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "retentionMinutes": { "type": "number", "minimum": 0 } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "KubernetesResourceCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] }, "thresholdDays": { "type": "number", "minimum": 0 }, "ignoredNamespaces": { "type": "array", "items": { "type": "string" } }, "ignoredUids": { "type": "array", "items": { "type": "string" } } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] } ] } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "post": { "summary": "Create a policy for an organization", "tags": [ "Policies" ], "description": "Creates a new policy with the specified configuration and references. The policy type is determined by the URL path parameter.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "discriminator": { "propertyName": "type" }, "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "description": "The type of policy", "enum": [ "deploy" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "retentionMinutes": { "type": "number", "description": "Number of minutes to retain resources before cleanup", "minimum": 0 } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for a policy" }, "description": "Entity references this policy applies" } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] } }, "required": [ "type" ], "allOf": [ { "not": { "properties": { "taskType": { "enum": [ "StaleFeatureFlagCleanup", "ResourceCleanup", "KubernetesResourceCleanup" ] }, "environmentType": {} }, "required": [ "taskType", "environmentType" ] } } ], "discriminator": { "propertyName": "taskType" }, "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "Optimizer" ] }, "environmentType": { "type": "string", "enum": [ "development", "production", "custom" ], "description": "Optional environment type scope for task policies that target project environments." }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "target": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "KubernetesWorkloadSelector" ] }, "namespace": { "type": "string", "minLength": 1 }, "kind": { "type": "string", "enum": [ "Deployment", "StatefulSet" ] }, "name": { "type": "string", "minLength": 1 } }, "required": [ "type", "namespace", "kind", "name" ] } }, "required": [ "type", "taskType", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "LogAnalysis" ] }, "environmentType": { "type": "string", "enum": [ "development", "production", "custom" ], "description": "Optional environment type scope for task policies that target project environments." }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." } }, "required": [ "type", "taskType", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "StaleFeatureFlagCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." } }, "required": [ "type", "taskType", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "ResourceCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "retentionMinutes": { "type": "number", "minimum": 0 } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." } }, "required": [ "type", "taskType", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "KubernetesResourceCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] }, "thresholdDays": { "type": "number", "minimum": 0 }, "ignoredNamespaces": { "type": "array", "items": { "type": "string" } }, "ignoredUids": { "type": "array", "items": { "type": "string" } } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." } }, "required": [ "type", "taskType", "config" ] } ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "kubernetesObservabilityDiscovery" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean", "description": "Whether detected Kubernetes observability sources are connected automatically." } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "OrganizationIntegration" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$", "description": "The integration ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ] }, "maxItems": 0, "description": "Kubernetes observability discovery policies are organization scoped." } }, "required": [ "type", "config" ] } ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "201": { "description": "Successfully created a policy", "content": { "application/json": { "schema": { "type": "object", "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy", "enum": [ "deploy" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "retentionMinutes": { "type": "number", "description": "Number of minutes to retain resources before cleanup", "minimum": 0 } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for a policy" }, "description": "Entity references this policy applies" }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "kubernetesObservabilityDiscovery" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean", "description": "Whether detected Kubernetes observability sources are connected automatically." } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "OrganizationIntegration" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$", "description": "The integration ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ] }, "maxItems": 0, "description": "Kubernetes observability discovery policies are organization scoped." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "Optimizer" ] }, "environmentType": { "type": "string", "enum": [ "development", "production", "custom" ], "description": "Optional environment type scope for task policies that target project environments." }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "target": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "KubernetesWorkloadSelector" ] }, "namespace": { "type": "string", "minLength": 1 }, "kind": { "type": "string", "enum": [ "Deployment", "StatefulSet" ] }, "name": { "type": "string", "minLength": 1 } }, "required": [ "type", "namespace", "kind", "name" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "LogAnalysis" ] }, "environmentType": { "type": "string", "enum": [ "development", "production", "custom" ], "description": "Optional environment type scope for task policies that target project environments." }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "StaleFeatureFlagCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "ResourceCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "retentionMinutes": { "type": "number", "minimum": 0 } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "KubernetesResourceCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] }, "thresholdDays": { "type": "number", "minimum": 0 }, "ignoredNamespaces": { "type": "array", "items": { "type": "string" } }, "ignoredUids": { "type": "array", "items": { "type": "string" } } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] } ], "description": "Successfully created a policy" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "description": "Conflict", "example": { "message": "The resource could not be created because of a conflict.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/policies/{policyId}/": { "get": { "summary": "Get the policy for an organization", "tags": [ "Policies" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$" }, "in": "path", "name": "policyId", "required": true, "description": "The policy ID." } ], "responses": { "200": { "description": "Successfully retrieved the policy", "content": { "application/json": { "schema": { "type": "object", "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy", "enum": [ "deploy" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "retentionMinutes": { "type": "number", "description": "Number of minutes to retain resources before cleanup", "minimum": 0 } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for a policy" }, "description": "Entity references this policy applies" }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "kubernetesObservabilityDiscovery" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean", "description": "Whether detected Kubernetes observability sources are connected automatically." } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "OrganizationIntegration" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$", "description": "The integration ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ] }, "maxItems": 0, "description": "Kubernetes observability discovery policies are organization scoped." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "Optimizer" ] }, "environmentType": { "type": "string", "enum": [ "development", "production", "custom" ], "description": "Optional environment type scope for task policies that target project environments." }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "target": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "KubernetesWorkloadSelector" ] }, "namespace": { "type": "string", "minLength": 1 }, "kind": { "type": "string", "enum": [ "Deployment", "StatefulSet" ] }, "name": { "type": "string", "minLength": 1 } }, "required": [ "type", "namespace", "kind", "name" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "LogAnalysis" ] }, "environmentType": { "type": "string", "enum": [ "development", "production", "custom" ], "description": "Optional environment type scope for task policies that target project environments." }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "StaleFeatureFlagCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "ResourceCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "retentionMinutes": { "type": "number", "minimum": 0 } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "KubernetesResourceCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] }, "thresholdDays": { "type": "number", "minimum": 0 }, "ignoredNamespaces": { "type": "array", "items": { "type": "string" } }, "ignoredUids": { "type": "array", "items": { "type": "string" } } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] } ], "description": "Successfully retrieved the policy" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "patch": { "summary": "Update the policy for an organization", "tags": [ "Policies" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "discriminator": { "propertyName": "type" }, "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy", "enum": [ "deploy" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "retentionMinutes": { "type": "number", "description": "Number of minutes to retain resources before cleanup", "minimum": 0 } } } }, "required": [ "type", "config" ] }, { "type": "object", "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] } }, "required": [ "type" ], "discriminator": { "propertyName": "taskType" }, "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "Optimizer" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "target": { "not": {}, "description": "Workload policy targets are immutable; replace the policy to change its target." } }, "required": [ "type", "taskType", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "LogAnalysis" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } } }, "required": [ "type", "taskType", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "StaleFeatureFlagCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } } }, "required": [ "type", "taskType", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "ResourceCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "retentionMinutes": { "type": "number", "minimum": 0 } } } }, "required": [ "type", "taskType", "config" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "KubernetesResourceCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] }, "thresholdDays": { "type": "number", "minimum": 0 }, "ignoredNamespaces": { "type": "array", "items": { "type": "string" } }, "ignoredUids": { "type": "array", "items": { "type": "string" } } } } }, "required": [ "type", "taskType", "config" ] } ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "kubernetesObservabilityDiscovery" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean", "description": "Whether detected Kubernetes observability sources are connected automatically." } } } }, "required": [ "type", "config" ] } ] } } } }, "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$" }, "in": "path", "name": "policyId", "required": true, "description": "The policy ID." } ], "responses": { "200": { "description": "Successfully updated the policy", "content": { "application/json": { "schema": { "type": "object", "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy", "enum": [ "deploy" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "retentionMinutes": { "type": "number", "description": "Number of minutes to retain resources before cleanup", "minimum": 0 } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for a policy" }, "description": "Entity references this policy applies" }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "kubernetesObservabilityDiscovery" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean", "description": "Whether detected Kubernetes observability sources are connected automatically." } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "OrganizationIntegration" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$", "description": "The integration ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ] }, "maxItems": 0, "description": "Kubernetes observability discovery policies are organization scoped." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "Optimizer" ] }, "environmentType": { "type": "string", "enum": [ "development", "production", "custom" ], "description": "Optional environment type scope for task policies that target project environments." }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "target": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "KubernetesWorkloadSelector" ] }, "namespace": { "type": "string", "minLength": 1 }, "kind": { "type": "string", "enum": [ "Deployment", "StatefulSet" ] }, "name": { "type": "string", "minLength": 1 } }, "required": [ "type", "namespace", "kind", "name" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "LogAnalysis" ] }, "environmentType": { "type": "string", "enum": [ "development", "production", "custom" ], "description": "Optional environment type scope for task policies that target project environments." }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "StaleFeatureFlagCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "ResourceCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "retentionMinutes": { "type": "number", "minimum": 0 } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "KubernetesResourceCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] }, "thresholdDays": { "type": "number", "minimum": 0 }, "ignoredNamespaces": { "type": "array", "items": { "type": "string" } }, "ignoredUids": { "type": "array", "items": { "type": "string" } } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] } ], "description": "Successfully updated the policy" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "description": "Bad Request", "example": { "message": "Invalid request body or query parameters", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } }, "delete": { "summary": "Delete the policy for an organization", "tags": [ "Policies" ], "parameters": [ { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$" }, "in": "path", "name": "policyId", "required": true, "description": "The policy ID." } ], "responses": { "204": { "description": "Successfully deleted the policy" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "description": "Unauthorized", "example": { "message": "Unable to validate JWT. Please make sure a valid JWT is sent as an Authorization header or access token cookie.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "description": "Forbidden", "example": { "message": "The resource could not be created because you do not have permission to create it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "description": "Not Found", "example": { "message": "Resource with id 'a1b2c3d4' not found or you do not have permission to access it.", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "description": "Internal Server Error", "example": { "message": "An unknown error occurred", "requestId": "a1b2c3d4", "errorCode": "a1b2c3d4" }, "type": "object", "required": [ "message", "requestId", "errorCode" ], "properties": { "message": { "type": "string" }, "requestId": { "type": "string" }, "errorCode": { "type": "string" }, "errors": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "/api/organizations/{organizationId}/policies/resolved/": { "get": { "summary": "Get resolved policy config for an organization", "tags": [ "Policies" ], "parameters": [ { "schema": { "type": "string", "enum": [ "agentTask", "deploy", "kubernetesObservabilityDiscovery" ] }, "in": "query", "name": "type", "required": true, "description": "The policy type to resolve." }, { "schema": { "type": "string", "enum": [ "Optimizer", "LogAnalysis", "StaleFeatureFlagCleanup", "KubernetesResourceCleanup" ] }, "in": "query", "name": "taskType", "required": false, "description": "The AgentTask policy task type to resolve." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "in": "query", "name": "projectId", "required": false, "description": "Optional project ID to resolve policy scope." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$" }, "in": "query", "name": "projectEnvironmentId", "required": false, "description": "Optional project environment ID to resolve policy scope." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$" }, "in": "query", "name": "deploymentId", "required": false, "description": "Optional deployment ID to resolve policy scope." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "in": "query", "name": "kubernetesClusterId", "required": false, "description": "Optional Kubernetes cluster ID to resolve policy scope." }, { "schema": { "type": "string", "enum": [ "development", "production", "custom" ] }, "in": "query", "name": "environmentType", "required": false, "description": "Optional environment type to resolve environment-scoped AgentTask policy defaults." }, { "schema": { "type": "string", "minLength": 1, "pattern": "^org_[a-fA-F0-9]{24}$" }, "in": "path", "name": "organizationId", "required": true, "description": "The organization Id." } ], "responses": { "200": { "description": "Successfully resolved policy config for a scope.", "content": { "application/json": { "schema": { "type": "object", "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "Optimizer", "LogAnalysis", "StaleFeatureFlagCleanup", "KubernetesResourceCleanup" ] }, "scope": { "type": "object", "additionalProperties": false, "properties": { "projectId": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "projectEnvironmentId": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$" }, "deploymentId": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$" }, "kubernetesClusterId": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "environmentType": { "type": "string", "enum": [ "development", "production", "custom" ] } } }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } }, "required": [ "cron" ] }, { "type": "null" } ] }, "thresholdDays": { "type": "number", "minimum": 0 }, "ignoredNamespaces": { "type": "array", "items": { "type": "string" } }, "ignoredUids": { "type": "array", "items": { "type": "string" } } }, "required": [ "enabled" ] }, "mostSpecificPolicy": { "oneOf": [ { "type": "object", "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy", "enum": [ "deploy" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "retentionMinutes": { "type": "number", "description": "Number of minutes to retain resources before cleanup", "minimum": 0 } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for a policy" }, "description": "Entity references this policy applies" }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "kubernetesObservabilityDiscovery" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean", "description": "Whether detected Kubernetes observability sources are connected automatically." } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "OrganizationIntegration" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$", "description": "The integration ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ] }, "maxItems": 0, "description": "Kubernetes observability discovery policies are organization scoped." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "Optimizer" ] }, "environmentType": { "type": "string", "enum": [ "development", "production", "custom" ], "description": "Optional environment type scope for task policies that target project environments." }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "target": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "KubernetesWorkloadSelector" ] }, "namespace": { "type": "string", "minLength": 1 }, "kind": { "type": "string", "enum": [ "Deployment", "StatefulSet" ] }, "name": { "type": "string", "minLength": 1 } }, "required": [ "type", "namespace", "kind", "name" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "LogAnalysis" ] }, "environmentType": { "type": "string", "enum": [ "development", "production", "custom" ], "description": "Optional environment type scope for task policies that target project environments." }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "StaleFeatureFlagCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "ResourceCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "retentionMinutes": { "type": "number", "minimum": 0 } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "KubernetesResourceCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] }, "thresholdDays": { "type": "number", "minimum": 0 }, "ignoredNamespaces": { "type": "array", "items": { "type": "string" } }, "ignoredUids": { "type": "array", "items": { "type": "string" } } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] } ] }, { "type": "null" } ] }, "exactPolicy": { "oneOf": [ { "type": "object", "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy", "enum": [ "deploy" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "retentionMinutes": { "type": "number", "description": "Number of minutes to retain resources before cleanup", "minimum": 0 } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for a policy" }, "description": "Entity references this policy applies" }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "kubernetesObservabilityDiscovery" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean", "description": "Whether detected Kubernetes observability sources are connected automatically." } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "OrganizationIntegration" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$", "description": "The integration ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ] }, "maxItems": 0, "description": "Kubernetes observability discovery policies are organization scoped." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "Optimizer" ] }, "environmentType": { "type": "string", "enum": [ "development", "production", "custom" ], "description": "Optional environment type scope for task policies that target project environments." }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "target": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "KubernetesWorkloadSelector" ] }, "namespace": { "type": "string", "minLength": 1 }, "kind": { "type": "string", "enum": [ "Deployment", "StatefulSet" ] }, "name": { "type": "string", "minLength": 1 } }, "required": [ "type", "namespace", "kind", "name" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "LogAnalysis" ] }, "environmentType": { "type": "string", "enum": [ "development", "production", "custom" ], "description": "Optional environment type scope for task policies that target project environments." }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "StaleFeatureFlagCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "ResourceCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "retentionMinutes": { "type": "number", "minimum": 0 } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "KubernetesResourceCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] }, "thresholdDays": { "type": "number", "minimum": 0 }, "ignoredNamespaces": { "type": "array", "items": { "type": "string" } }, "ignoredUids": { "type": "array", "items": { "type": "string" } } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] } ] }, { "type": "null" } ] } }, "required": [ "type", "taskType", "scope", "config", "mostSpecificPolicy", "exactPolicy" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "deploy" ] }, "scope": { "type": "object", "additionalProperties": false, "properties": { "projectId": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "projectEnvironmentId": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$" }, "deploymentId": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$" }, "kubernetesClusterId": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "environmentType": { "type": "string", "enum": [ "development", "production", "custom" ] } } }, "config": { "type": "object", "additionalProperties": false, "properties": { "retentionMinutes": { "type": "number", "description": "Number of minutes to retain resources before cleanup", "minimum": 0 } } }, "mostSpecificPolicy": { "oneOf": [ { "type": "object", "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy", "enum": [ "deploy" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "retentionMinutes": { "type": "number", "description": "Number of minutes to retain resources before cleanup", "minimum": 0 } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for a policy" }, "description": "Entity references this policy applies" }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "kubernetesObservabilityDiscovery" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean", "description": "Whether detected Kubernetes observability sources are connected automatically." } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "OrganizationIntegration" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$", "description": "The integration ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ] }, "maxItems": 0, "description": "Kubernetes observability discovery policies are organization scoped." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "Optimizer" ] }, "environmentType": { "type": "string", "enum": [ "development", "production", "custom" ], "description": "Optional environment type scope for task policies that target project environments." }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "target": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "KubernetesWorkloadSelector" ] }, "namespace": { "type": "string", "minLength": 1 }, "kind": { "type": "string", "enum": [ "Deployment", "StatefulSet" ] }, "name": { "type": "string", "minLength": 1 } }, "required": [ "type", "namespace", "kind", "name" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "LogAnalysis" ] }, "environmentType": { "type": "string", "enum": [ "development", "production", "custom" ], "description": "Optional environment type scope for task policies that target project environments." }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "StaleFeatureFlagCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "ResourceCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "retentionMinutes": { "type": "number", "minimum": 0 } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "KubernetesResourceCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] }, "thresholdDays": { "type": "number", "minimum": 0 }, "ignoredNamespaces": { "type": "array", "items": { "type": "string" } }, "ignoredUids": { "type": "array", "items": { "type": "string" } } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] } ] }, { "type": "null" } ] }, "exactPolicy": { "oneOf": [ { "type": "object", "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy", "enum": [ "deploy" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "retentionMinutes": { "type": "number", "description": "Number of minutes to retain resources before cleanup", "minimum": 0 } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for a policy" }, "description": "Entity references this policy applies" }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "kubernetesObservabilityDiscovery" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean", "description": "Whether detected Kubernetes observability sources are connected automatically." } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "OrganizationIntegration" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$", "description": "The integration ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ] }, "maxItems": 0, "description": "Kubernetes observability discovery policies are organization scoped." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "Optimizer" ] }, "environmentType": { "type": "string", "enum": [ "development", "production", "custom" ], "description": "Optional environment type scope for task policies that target project environments." }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "target": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "KubernetesWorkloadSelector" ] }, "namespace": { "type": "string", "minLength": 1 }, "kind": { "type": "string", "enum": [ "Deployment", "StatefulSet" ] }, "name": { "type": "string", "minLength": 1 } }, "required": [ "type", "namespace", "kind", "name" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "LogAnalysis" ] }, "environmentType": { "type": "string", "enum": [ "development", "production", "custom" ], "description": "Optional environment type scope for task policies that target project environments." }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "StaleFeatureFlagCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "ResourceCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "retentionMinutes": { "type": "number", "minimum": 0 } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "KubernetesResourceCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] }, "thresholdDays": { "type": "number", "minimum": 0 }, "ignoredNamespaces": { "type": "array", "items": { "type": "string" } }, "ignoredUids": { "type": "array", "items": { "type": "string" } } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] } ] }, { "type": "null" } ] } }, "required": [ "type", "scope", "config", "mostSpecificPolicy", "exactPolicy" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "kubernetesObservabilityDiscovery" ] }, "scope": { "type": "object", "additionalProperties": false, "properties": { "projectId": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$" }, "projectEnvironmentId": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$" }, "deploymentId": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$" }, "kubernetesClusterId": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$" }, "environmentType": { "type": "string", "enum": [ "development", "production", "custom" ] } } }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean", "description": "Whether detected Kubernetes observability sources are connected automatically." } }, "required": [ "enabled" ] }, "mostSpecificPolicy": { "oneOf": [ { "type": "object", "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy", "enum": [ "deploy" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "retentionMinutes": { "type": "number", "description": "Number of minutes to retain resources before cleanup", "minimum": 0 } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for a policy" }, "description": "Entity references this policy applies" }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "kubernetesObservabilityDiscovery" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean", "description": "Whether detected Kubernetes observability sources are connected automatically." } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "OrganizationIntegration" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^oint_[a-fA-F0-9]{24}$", "description": "The integration ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ] }, "maxItems": 0, "description": "Kubernetes observability discovery policies are organization scoped." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "Optimizer" ] }, "environmentType": { "type": "string", "enum": [ "development", "production", "custom" ], "description": "Optional environment type scope for task policies that target project environments." }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "target": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "KubernetesWorkloadSelector" ] }, "namespace": { "type": "string", "minLength": 1 }, "kind": { "type": "string", "enum": [ "Deployment", "StatefulSet" ] }, "name": { "type": "string", "minLength": 1 } }, "required": [ "type", "namespace", "kind", "name" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "LogAnalysis" ] }, "environmentType": { "type": "string", "enum": [ "development", "production", "custom" ], "description": "Optional environment type scope for task policies that target project environments." }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "StaleFeatureFlagCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "ResourceCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "retentionMinutes": { "type": "number", "minimum": 0 } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^kcls_[a-fA-F0-9]{24}$", "description": "The Kubernetes cluster ID." } }, "required": [ "type", "id" ] } ], "description": "Entity reference for an agent task policy. Org-scoped policies use references: []." }, "description": "Entity references this policy applies to. Empty array = org-wide." }, "id": { "type": "string", "minLength": 1, "pattern": "^polc_[a-fA-F0-9]{24}$", "description": "The policy ID." }, "organization": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "description": "The organization Id." }, "name": { "type": "string", "description": "The name of the organization." } }, "required": [ "id", "name" ] }, "meta": { "type": "object", "additionalProperties": false, "properties": { "createdAt": { "type": "string", "format": "date-time", "description": "The date the entity was created.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "createdBy": { "type": "string", "description": "The member ID that created the entity. 'system' will be returned if the entity was created by a Hyphen job." }, "modifiedAt": { "type": "string", "format": "date-time", "description": "The date the entity was last modified.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "modifiedBy": { "type": "string", "description": "The member ID that modified the entity. 'system' will be returned if the entity was modified by a Hyphen job." }, "deletedAt": { "type": "string", "format": "date-time", "description": "The date the entity was deleted.", "examples": [ "2024-07-08T15:58:34.219+00:00" ] }, "deletedBy": { "type": "string", "description": "The member ID that deleted the entity. 'system' will be returned if the entity was deleted by a Hyphen job." } } } }, "required": [ "type", "taskType", "config", "id", "organization", "meta" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The type of policy.", "enum": [ "agentTask" ] }, "taskType": { "type": "string", "enum": [ "KubernetesResourceCleanup" ] }, "config": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "recurring": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "cron": { "type": "string" }, "timezone": { "type": "string" } } }, { "type": "null" } ] }, "thresholdDays": { "type": "number", "minimum": 0 }, "ignoredNamespaces": { "type": "array", "items": { "type": "string" } }, "ignoredUids": { "type": "array", "items": { "type": "string" } } } }, "references": { "type": "array", "items": { "oneOf": [ { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Project" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^proj_[a-fA-F0-9]{24}$", "description": "The project ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "ProjectEnvironment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^pevr_[a-fA-F0-9]{24}$", "description": "The project environment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "Deployment" ] }, "id": { "type": "string", "minLength": 1, "pattern": "^dply_[a-fA-F0-9]{24}$", "description": "The deployment ID." } }, "required": [ "type", "id" ] }, { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string", "description": "The entity type.", "enum": [ "KubernetesCluster" ] }, "id": { "type": "string", "minLen