{
  "version": "v1",
  "title": "Cloud API resource families",
  "source_pages": [
    "/cloud/api-reference"
  ],
  "base_urls": [
    "https://api.byteor.com/v1",
    "https://api.staging.byteor.com/v1",
    "https://api.dev.byteor.com/v1"
  ],
  "families": [
    {
      "id": "health-observability",
      "display_name": "Health & Observability",
      "auth": [
        "none"
      ],
      "operations": [
        {
          "method": "GET",
          "path_template": "/readyz",
          "description": "Returns 200 when the service is ready to accept traffic."
        },
        {
          "method": "GET",
          "path_template": "/healthz",
          "description": "Returns 200 when the service is alive."
        },
        {
          "method": "GET",
          "path_template": "/metrics",
          "description": "Prometheus-format metrics scrape endpoint."
        }
      ]
    },
    {
      "id": "auth",
      "display_name": "Auth",
      "auth": [
        "none"
      ],
      "operations": [
        {
          "method": "GET",
          "path_template": "/auth/login",
          "description": "Initiates the OAuth login flow."
        },
        {
          "method": "GET",
          "path_template": "/auth/callback",
          "description": "OAuth callback and session-token exchange."
        }
      ]
    },
    {
      "id": "organizations",
      "display_name": "Organizations",
      "auth": [
        "bearer"
      ],
      "operations": [
        {
          "method": "GET",
          "path_template": "/api/v1/orgs",
          "description": "List organizations the caller has access to."
        },
        {
          "method": "POST",
          "path_template": "/api/v1/orgs",
          "description": "Create a new organization."
        },
        {
          "method": "GET",
          "path_template": "/api/v1/orgs/{org_id}",
          "description": "Retrieve a single organization by ID."
        },
        {
          "method": "PUT",
          "path_template": "/api/v1/orgs/{org_id}",
          "description": "Update organization metadata."
        }
      ]
    },
    {
      "id": "projects",
      "display_name": "Projects",
      "auth": [
        "bearer"
      ],
      "operations": [
        {
          "method": "GET",
          "path_template": "/api/v1/orgs/{org_id}/projects",
          "description": "List all projects in the organization."
        },
        {
          "method": "POST",
          "path_template": "/api/v1/orgs/{org_id}/projects",
          "description": "Create a new project."
        },
        {
          "method": "GET",
          "path_template": "/api/v1/orgs/{org_id}/projects/{project_id}",
          "description": "Retrieve a project by ID."
        },
        {
          "method": "PUT",
          "path_template": "/api/v1/orgs/{org_id}/projects/{project_id}",
          "description": "Update project metadata."
        },
        {
          "method": "DELETE",
          "path_template": "/api/v1/orgs/{org_id}/projects/{project_id}",
          "description": "Delete a project and all nested resources."
        }
      ]
    },
    {
      "id": "environments",
      "display_name": "Environments",
      "auth": [
        "bearer"
      ],
      "operations": [
        {
          "method": "GET",
          "path_template": ".../projects/{project_id}/environments",
          "description": "List environments in a project."
        },
        {
          "method": "POST",
          "path_template": ".../projects/{project_id}/environments",
          "description": "Create a new environment."
        },
        {
          "method": "GET",
          "path_template": ".../environments/{env_id}",
          "description": "Retrieve an environment by ID."
        },
        {
          "method": "PUT",
          "path_template": ".../environments/{env_id}",
          "description": "Update environment settings."
        },
        {
          "method": "DELETE",
          "path_template": ".../environments/{env_id}",
          "description": "Delete an environment."
        }
      ]
    },
    {
      "id": "pipeline-drafts-and-versions",
      "display_name": "Pipeline Drafts & Versions",
      "auth": [
        "bearer"
      ],
      "operations": [
        {
          "method": "GET",
          "path_template": ".../environments/{env_id}/drafts",
          "description": "List pipeline drafts in an environment."
        },
        {
          "method": "POST",
          "path_template": ".../environments/{env_id}/drafts",
          "description": "Create a new pipeline draft."
        },
        {
          "method": "PUT",
          "path_template": ".../drafts/{id}",
          "description": "Update a draft spec or metadata."
        },
        {
          "method": "POST",
          "path_template": ".../drafts/{id}/preview",
          "description": "Dry-run validation without persisting a version."
        },
        {
          "method": "POST",
          "path_template": ".../drafts/{id}/version",
          "description": "Promote the draft to an immutable pipeline version."
        },
        {
          "method": "GET",
          "path_template": ".../environments/{env_id}/versions",
          "description": "List all pipeline versions in an environment."
        }
      ]
    },
    {
      "id": "config-bundles",
      "display_name": "Config Bundles",
      "auth": [
        "bearer"
      ],
      "operations": [
        {
          "method": "GET",
          "path_template": ".../environments/{env_id}/config-bundles",
          "description": "List config bundles."
        },
        {
          "method": "POST",
          "path_template": ".../environments/{env_id}/config-bundles",
          "description": "Create a config bundle from a pipeline version."
        },
        {
          "method": "GET",
          "path_template": ".../config-bundles/{id}",
          "description": "Retrieve a config bundle by ID."
        }
      ]
    },
    {
      "id": "agents",
      "display_name": "Agents",
      "auth": [
        "enrollment token",
        "bearer",
        "agent key"
      ],
      "operations": [
        {
          "method": "POST",
          "path_template": ".../environments/{env_id}/agents",
          "description": "Enroll a new agent and return an agent ID plus API key."
        },
        {
          "method": "GET",
          "path_template": ".../environments/{env_id}/agents",
          "description": "List agents in an environment."
        },
        {
          "method": "GET",
          "path_template": "/api/v1/agents/{id}",
          "description": "Retrieve the agent's own record."
        },
        {
          "method": "POST",
          "path_template": "/api/v1/agents/{id}/heartbeat",
          "description": "Send a heartbeat with status and resource usage."
        },
        {
          "method": "POST",
          "path_template": "/api/v1/agents/{id}/artifacts",
          "description": "Upload runtime artifacts."
        },
        {
          "method": "POST",
          "path_template": "/api/v1/agents/{id}/deployment",
          "description": "Report deployment status back to the control plane."
        },
        {
          "method": "GET",
          "path_template": "/api/v1/agents/{id}/signing-key",
          "description": "Retrieve the current artifact signing key."
        }
      ]
    },
    {
      "id": "deployments",
      "display_name": "Deployments",
      "auth": [
        "bearer"
      ],
      "operations": [
        {
          "method": "GET",
          "path_template": ".../environments/{env_id}/deployments",
          "description": "List deployments in an environment."
        },
        {
          "method": "POST",
          "path_template": ".../environments/{env_id}/deployments",
          "description": "Create a deployment request."
        },
        {
          "method": "GET",
          "path_template": ".../deployments/{id}",
          "description": "Retrieve deployment details and status."
        },
        {
          "method": "POST",
          "path_template": ".../deployments/{id}/rollback",
          "description": "Initiate rollback to the previously active deployment."
        }
      ]
    },
    {
      "id": "artifacts-and-replay",
      "display_name": "Artifacts & Replay",
      "auth": [
        "bearer"
      ],
      "operations": [
        {
          "method": "GET",
          "path_template": ".../environments/{env_id}/artifacts",
          "description": "List artifacts in an environment."
        },
        {
          "method": "GET",
          "path_template": ".../artifacts/{id}",
          "description": "Retrieve a single artifact by ID."
        },
        {
          "method": "POST",
          "path_template": ".../artifacts/{id}/replay",
          "description": "Submit the artifact for deterministic replay."
        }
      ]
    },
    {
      "id": "approvals",
      "display_name": "Approvals",
      "auth": [
        "bearer"
      ],
      "operations": [
        {
          "method": "GET",
          "path_template": ".../environments/{env_id}/approvals",
          "description": "List approvals for an environment."
        },
        {
          "method": "POST",
          "path_template": ".../environments/{env_id}/approvals",
          "description": "Create an approval decision."
        },
        {
          "method": "GET",
          "path_template": ".../approvals/{id}",
          "description": "Retrieve an approval record by ID."
        }
      ]
    }
  ]
}
