diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d3a95af7..7a7de795 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,6 +73,10 @@ jobs: if: ${{ !cancelled() }} run: make check-schema + - name: Check the mock API's OpenAPI spec is up to date + if: ${{ !cancelled() }} + run: make check-openapi-spec + legacy-php: runs-on: ubuntu-latest diff --git a/CLAUDE.md b/CLAUDE.md index 827571a1..94c69810 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -158,6 +158,8 @@ Tests use github.com/stretchr/testify for assertions. Table-driven tests are pre Integration tests (`integration-tests/`) call `t.Parallel()`, so they must not share state: no `t.Setenv` or unsynchronized package variables, and use `cmdFactory.useConfig` to change the CLI config file. Write output with `t.Log` (e.g. `mockapi.RequestLogger`), not to stdout or stderr: it is then attributed to its test, and shown only on failure or with `-v`. Tests of environment operations use `setUpProject`, and tests of Git commands (push, clone, fetch) use `setUpGitProject`, which also serves a bare repository over the mock SSH server. Tests of other SSH commands use `serveSSH` with an app from `sshEnv`, and fake remote executables from `remoteEnv`. The mock SSH server can also serve SFTP (`SFTPDir`) and forward connections (`DialTCP`, `ListenUnix`); tests of commands that start background processes (tunnels) must make sure they exit. +The mock API (`pkg/mockapi`) validates each successful request and response against the API's OpenAPI spec (`pkg/mockapi/openapi.json`, refreshed with `make update-openapi-spec`; CI's non-blocking `lint-upstream` job checks that it is up to date), and reports failures through the test. Responses may leave out required properties. Routes that are not in the spec are listed in `notInSpec`, and differences between the spec and the API are patched in `patchSpec`. + `make test-integration-coverage` runs the integration tests with a CLI built with `-cover`, and prints a report (`scripts/coverage-report`): Go statement coverage per package, and the commands and command-specific options that the tests run (logged by `buildCommand` when `INTEGRATION_TESTS_ARGS_LOG` is set). CI runs both integration test runs this way, and writes the report to the job summary. ### Configuration diff --git a/Makefile b/Makefile index 9bf348c4..9002a6bd 100644 --- a/Makefile +++ b/Makefile @@ -272,6 +272,16 @@ update-schema: ## Refresh the embedded Flex config schema from meta.upsun.com check-schema: update-schema git diff --exit-code -- internal/schema/upsun-config-schema.json +# The API's OpenAPI spec, used to validate the mock API in tests, is from https://meta.upsun.com/openapi-spec. +.PHONY: update-openapi-spec +update-openapi-spec: ## Refresh the OpenAPI spec used by the mock API + cd pkg/mockapi && go run gen.go + +# Fail if the OpenAPI spec is stale. Only a summary is printed, as the diff can be large. +.PHONY: check-openapi-spec +check-openapi-spec: update-openapi-spec + git diff --exit-code --stat -- pkg/mockapi/openapi.json + # Installs dev dependencies, which a phar build removes. PHPStan's binary marks that they are installed. .PHONY: composer-dev composer-dev: legacy/vendor/bin/phpstan diff --git a/go.mod b/go.mod index 8c5ad77f..8f6410c1 100644 --- a/go.mod +++ b/go.mod @@ -11,6 +11,7 @@ require ( github.com/charmbracelet/x/ansi v0.11.9 github.com/dlclark/regexp2/v2 v2.9.1 github.com/fatih/color v1.19.0 + github.com/getkin/kin-openapi v0.151.0 github.com/go-chi/chi/v5 v5.5.0 github.com/go-playground/validator/v10 v10.30.5 github.com/godbus/dbus/v5 v5.2.4 @@ -72,12 +73,15 @@ require ( github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.9.2 // indirect github.com/go-git/go-git/v5 v5.19.3 // indirect + github.com/go-openapi/jsonpointer v0.22.5 // indirect + github.com/go-openapi/swag/jsonname v0.25.5 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-viper/mapstructure/v2 v2.5.0 // indirect github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect github.com/google/cel-go v0.31.0 // indirect github.com/google/uuid v1.6.0 // indirect + github.com/gorilla/mux v1.8.0 // indirect github.com/h2non/filetype v1.1.3 // indirect github.com/hashicorp/go-version v1.9.0 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect @@ -103,12 +107,15 @@ require ( github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/muesli/termenv v0.16.0 // indirect github.com/nwaples/rardecode/v2 v2.2.2 // indirect + github.com/oasdiff/yaml v0.1.1 // indirect + github.com/oasdiff/yaml3 v0.0.14 // indirect github.com/pierrec/lz4/v4 v4.1.26 // indirect github.com/pjbgf/sha1cd v0.7.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/rs/zerolog v1.35.1 // indirect github.com/sagikazarmark/locafero v0.12.0 // indirect + github.com/santhosh-tekuri/jsonschema/v6 v6.0.3 // indirect github.com/sergi/go-diff v1.4.0 // indirect github.com/shopspring/decimal v1.4.0 // indirect github.com/skeema/knownhosts v1.3.2 // indirect diff --git a/go.sum b/go.sum index 643a0b56..b8c50976 100644 --- a/go.sum +++ b/go.sum @@ -75,6 +75,8 @@ github.com/danieljoos/wincred v1.2.3 h1:v7dZC2x32Ut3nEfRH+vhoZGvN72+dQ/snVXo/vMF github.com/danieljoos/wincred v1.2.3/go.mod h1:6qqX0WNrS4RzPZ1tnroDzq9kY3fu1KwE7MRLQK4X0bs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI= +github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/dlclark/regexp2/v2 v2.9.1 h1:q6bZW/NN9VodqMjYXpuic2lZxdHPfFTzGS+MJxIJmKQ= github.com/dlclark/regexp2/v2 v2.9.1/go.mod h1:avUrQvPaLz2DrFNHJF0taWAFFX2C1GMSSoeiqFjcBmU= github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707 h1:2tV76y6Q9BB+NEBasnqvs7e49aEBFI8ejC89PSnWH+4= @@ -94,6 +96,8 @@ github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/gabriel-vasile/mimetype v1.4.15 h1:05iP/CYtZ/w455R/KZM6rZ5ieAdh99UPtd+d3YzLmaI= github.com/gabriel-vasile/mimetype v1.4.15/go.mod h1:azpTcoLcDZRNgFou5j+APrqQx9HqVPWa6ijYQIIVswQ= +github.com/getkin/kin-openapi v0.151.0 h1:p8NIstL53h620DnlO9R4pR4QRkEzJ3jbw9flb4kc1hg= +github.com/getkin/kin-openapi v0.151.0/go.mod h1:1+BHDzstro+P5CKtPy1X4PfofnFgmRe6uvMy9+r9fKY= github.com/getsentry/sentry-go v0.46.0 h1:mbdDaarbUdOt9X+dx6kDdntkShLEX3/+KyOsVDTPDj0= github.com/getsentry/sentry-go v0.46.0/go.mod h1:evVbw2qotNUdYG8KxXbAdjOQWWvWIwKxpjdZZIvcIPw= github.com/gitleaks/go-gitdiff v0.9.1 h1:ni6z6/3i9ODT685OLCTf+s/ERlWUNWQF4x1pvoNICw0= @@ -112,6 +116,12 @@ github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMj github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= github.com/go-git/go-git/v5 v5.19.3 h1:qHttbZ+Am7wEjdTpR1XMQ4rl42FK9SIXzZ4o9x7s6M4= github.com/go-git/go-git/v5 v5.19.3/go.mod h1:Ye4C8dVigkqrv9UsB4NMdSLV4yAIkLiIhW61gcOyhl4= +github.com/go-openapi/jsonpointer v0.22.5 h1:8on/0Yp4uTb9f4XvTrM2+1CPrV05QPZXu+rvu2o9jcA= +github.com/go-openapi/jsonpointer v0.22.5/go.mod h1:gyUR3sCvGSWchA2sUBJGluYMbe1zazrYWIkWPjjMUY0= +github.com/go-openapi/swag/jsonname v0.25.5 h1:8p150i44rv/Drip4vWI3kGi9+4W9TdI3US3uUYSFhSo= +github.com/go-openapi/swag/jsonname v0.25.5/go.mod h1:jNqqikyiAK56uS7n8sLkdaNY/uq6+D2m2LANat09pKU= +github.com/go-openapi/testify/v2 v2.4.0 h1:8nsPrHVCWkQ4p8h1EsRVymA2XABB4OT40gcvAu+voFM= +github.com/go-openapi/testify/v2 v2.4.0/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= @@ -137,6 +147,8 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/h2non/filetype v1.1.3 h1:FKkx9QbD7HR/zjK1Ia5XiBsq9zdLi5Kf3zGyFTAFkGg= github.com/h2non/filetype v1.1.3/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY= github.com/hashicorp/go-version v1.9.0 h1:CeOIz6k+LoN3qX9Z0tyQrPtiB1DFYRPfCIBtaXPSCnA= @@ -205,6 +217,10 @@ github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk= github.com/nwaples/rardecode/v2 v2.2.2 h1:/5oL8dzYivRM/tqX9VcTSWfbpwcbwKG1QtSJr3b3KcU= github.com/nwaples/rardecode/v2 v2.2.2/go.mod h1:7uz379lSxPe6j9nvzxUZ+n7mnJNgjsRNb6IbvGVHRmw= +github.com/oasdiff/yaml v0.1.1 h1:6nHx+pn9gBRM6YpBlFZFQGCCd1nuvqOBtTD3KKTgGxY= +github.com/oasdiff/yaml v0.1.1/go.mod h1:EYJNoyktvWMJ0Hmhx+6qTaqMOsalUaRGT8Sj1hNcegU= +github.com/oasdiff/yaml3 v0.0.14 h1:aLJee3hxBK2H5wdXd9iPcIXb93Nty1Ge0pT171eHtkw= +github.com/oasdiff/yaml3 v0.0.14/go.mod h1:csto2xfDjYccdUn/yw/bPjj/cYTdp6HtFA0J4TWG+gg= github.com/oklog/ulid/v2 v2.1.2 h1:IEclFb9JNvzYA6MW2SCxbLzcHTVsfqm3PrqGQJH5zec= github.com/oklog/ulid/v2 v2.1.2/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8= @@ -232,6 +248,8 @@ github.com/rs/zerolog v1.35.1/go.mod h1:EjML9kdfa/RMA7h/6z6pYmq1ykOuA8/mjWaEvGI+ github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.12.0 h1:/NQhBAkUb4+fH1jivKHWusDYFjMOOKU88eegjfxfHb4= github.com/sagikazarmark/locafero v0.12.0/go.mod h1:sZh36u/YSZ918v0Io+U9ogLYQJ9tLLBmM4eneO6WwsI= +github.com/santhosh-tekuri/jsonschema/v6 v6.0.3 h1:1EYB5IzjZawrrnELUi78f9fPu57HuXjmddZPjrls/28= +github.com/santhosh-tekuri/jsonschema/v6 v6.0.3/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU= github.com/sergi/go-diff v1.4.0 h1:n/SP9D5ad1fORl+llWyN+D6qoUETXNZARKjyY2/KVCw= github.com/sergi/go-diff v1.4.0/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= diff --git a/integration-tests/app_list_test.go b/integration-tests/app_list_test.go index bcc31104..49349011 100644 --- a/integration-tests/app_list_test.go +++ b/integration-tests/app_list_test.go @@ -38,7 +38,7 @@ func TestAppList(t *testing.T) { WebApps: map[string]mockapi.App{ "app": {Name: "app", Type: "golang:1.23", Size: "AUTO"}, }, - Services: map[string]mockapi.App{}, + Services: map[string]mockapi.Service{}, Routes: map[string]any{}, Workers: map[string]mockapi.Worker{ "app--worker1": { @@ -98,7 +98,7 @@ func TestAppListEmptyLocalConfig(t *testing.T) { main := makeEnv(layoutProjectID, "main", "production", "active", nil) main.SetCurrentDeployment(&mockapi.Deployment{ WebApps: map[string]mockapi.App{"app": {Name: "app", Type: "golang:1.23", Size: "AUTO"}}, - Services: map[string]mockapi.App{}, + Services: map[string]mockapi.Service{}, Routes: map[string]any{}, Workers: map[string]mockapi.Worker{}, Links: mockapi.MakeHALLinks("self=/projects/" + layoutProjectID + "/environments/main/deployment/current"), diff --git a/integration-tests/db_ssh_test.go b/integration-tests/db_ssh_test.go index 171d5a0f..cb973121 100644 --- a/integration-tests/db_ssh_test.go +++ b/integration-tests/db_ssh_test.go @@ -44,9 +44,9 @@ func setUpDBProject(t *testing.T, clients map[string]string) *testProject { WebApps: map[string]mockapi.App{ "app": {Name: "app", Type: "golang:1.23", Size: "M", Mounts: map[string]mockapi.Mount{}}, }, - Services: map[string]mockapi.App{ - "db": {Name: "db", Type: "mariadb:11.4", Size: "M", Disk: 1024}, - "pg": {Name: "pg", Type: "postgresql:16", Size: "M", Disk: 2048}, + Services: map[string]mockapi.Service{ + "db": {Type: "mariadb:11.4", Size: "M", Disk: 1024}, + "pg": {Type: "postgresql:16", Size: "M", Disk: 2048}, }, })) p.serveSSH(t, mockssh.ExecHandler(t.TempDir(), remoteEnv(t, clients, dbRelationships()))) diff --git a/integration-tests/domain_add_test.go b/integration-tests/domain_add_test.go index 81ff11fd..abaef0a6 100644 --- a/integration-tests/domain_add_test.go +++ b/integration-tests/domain_add_test.go @@ -50,7 +50,10 @@ func TestDomainAdd(t *testing.T) { require.NoError(t, err) require.NoError(t, json.Unmarshal(body, &captured)) w.WriteHeader(http.StatusCreated) - _ = json.NewEncoder(w).Encode(map[string]any{"name": captured["name"]}) + _ = json.NewEncoder(w).Encode(map[string]any{ + "status": "created", "code": http.StatusCreated, + "_embedded": map[string]any{"entity": map[string]any{"name": captured["name"]}}, + }) }) apiServer := httptest.NewServer(apiHandler) diff --git a/integration-tests/domain_update_test.go b/integration-tests/domain_update_test.go index 06270752..a503fc5b 100644 --- a/integration-tests/domain_update_test.go +++ b/integration-tests/domain_update_test.go @@ -55,6 +55,8 @@ func TestDomainUpdateProjectScope(t *testing.T) { _ = json.NewEncoder(w).Encode(map[string]any{ "id": "example.com", "name": "example.com", + "type": "production", + "is_default": false, "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z", "ssl": map[string]any{ @@ -111,6 +113,8 @@ func TestDomainGetProjectScope(t *testing.T) { _ = json.NewEncoder(w).Encode(map[string]any{ "id": "example.com", "name": "example.com", + "type": "production", + "is_default": false, "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z", "ssl": map[string]any{ diff --git a/integration-tests/environment_http_access_test.go b/integration-tests/environment_http_access_test.go index 0eb37764..a96006d7 100644 --- a/integration-tests/environment_http_access_test.go +++ b/integration-tests/environment_http_access_test.go @@ -41,7 +41,7 @@ func TestEnvironmentHTTPAccess(t *testing.T) { assert.Contains(t, stdOut, "is_enabled: false") httpAccess := p.env("main").HTTPAccess assert.Equal(t, false, httpAccess["is_enabled"]) - assert.Nil(t, httpAccess["basic_auth"]) + assert.Equal(t, map[string]any{}, httpAccess["basic_auth"]) assert.Len(t, httpAccess["addresses"], 2) _, stdErr, err = p.f.RunCombinedOutput("httpaccess", "-p", layoutProjectID, "-e", "main", "--auth", "user1:short") diff --git a/integration-tests/environment_log_test.go b/integration-tests/environment_log_test.go index c6434165..2b9fdbe3 100644 --- a/integration-tests/environment_log_test.go +++ b/integration-tests/environment_log_test.go @@ -47,8 +47,8 @@ func TestEnvironmentLogAPI(t *testing.T) { } mainEnv.SetCurrentDeployment(&mockapi.Deployment{ WebApps: map[string]mockapi.App{"app": webApp("app"), "admin": webApp("admin")}, - Services: map[string]mockapi.App{ - "db": {Name: "db", Type: "mariadb:11.4", Size: "S", Disk: 1024}, + Services: map[string]mockapi.Service{ + "db": {Type: "mariadb:11.4", Size: "S", Disk: 1024}, }, Workers: map[string]mockapi.Worker{ "app--queue": worker("app--queue"), @@ -321,7 +321,7 @@ func TestEnvironmentLogSSHFallback(t *testing.T) { WebApps: map[string]mockapi.App{ "app": {Name: "app", Type: "golang:1.23", Size: "M", Disk: 2048, Mounts: map[string]mockapi.Mount{}}, }, - Services: map[string]mockapi.App{}, + Services: map[string]mockapi.Service{}, Workers: map[string]mockapi.Worker{}, Routes: mockRoutes(), Links: mockapi.MakeHALLinks("self=/projects/" + projectID + "/environments/main/deployment/current"), diff --git a/integration-tests/environment_relationships_test.go b/integration-tests/environment_relationships_test.go index e33d1746..51beaf7b 100644 --- a/integration-tests/environment_relationships_test.go +++ b/integration-tests/environment_relationships_test.go @@ -103,7 +103,7 @@ func TestRelationshipsRemote(t *testing.T) { WebApps: map[string]mockapi.App{ "app": {Name: "app", Type: "golang:1.23", Size: "M", Disk: 2048, Mounts: map[string]mockapi.Mount{}}, }, - Services: map[string]mockapi.App{}, + Services: map[string]mockapi.Service{}, Workers: map[string]mockapi.Worker{}, Routes: make(map[string]any), Links: mockapi.MakeHALLinks("self=/projects/" + projectID + "/environments/main/deployment/current"), diff --git a/integration-tests/environment_xdebug_test.go b/integration-tests/environment_xdebug_test.go index aa5cdfb2..d38a50eb 100644 --- a/integration-tests/environment_xdebug_test.go +++ b/integration-tests/environment_xdebug_test.go @@ -77,7 +77,7 @@ func TestEnvironmentXdebug(t *testing.T) { env := makeEnv(projectID, name, "development", "active", nil) env.SetCurrentDeployment(&mockapi.Deployment{ WebApps: map[string]mockapi.App{"app": app}, - Services: map[string]mockapi.App{}, + Services: map[string]mockapi.Service{}, Workers: map[string]mockapi.Worker{ "app--queue": {App: mockapi.App{Name: "app--queue", Type: app.Type, Runtime: app.Runtime, Stack: app.Stack}}, }, diff --git a/integration-tests/metrics_storage_test.go b/integration-tests/metrics_storage_test.go index f29fe458..27ae0c3d 100644 --- a/integration-tests/metrics_storage_test.go +++ b/integration-tests/metrics_storage_test.go @@ -68,8 +68,8 @@ func setupMetricsTest(t *testing.T, withStorage, withStorageMount bool) (f *cmdF WebApps: map[string]mockapi.App{ "app": app, }, - Services: map[string]mockapi.App{ - "db": {Name: "db", Type: "mariadb:11.4", Size: "AUTO"}, + Services: map[string]mockapi.Service{ + "db": {Type: "mariadb:11.4", Size: "AUTO"}, }, Workers: map[string]mockapi.Worker{}, Routes: map[string]any{}, diff --git a/integration-tests/metrics_test.go b/integration-tests/metrics_test.go index d8d2e675..e6bac0ae 100644 --- a/integration-tests/metrics_test.go +++ b/integration-tests/metrics_test.go @@ -35,7 +35,7 @@ func TestMetricsLatest(t *testing.T) { main := makeEnv(projectID, "main", "production", "active", nil) main.SetCurrentDeployment(&mockapi.Deployment{ WebApps: map[string]mockapi.App{"app": {Name: "app", Type: "golang:1.23", Size: "AUTO"}}, - Services: map[string]mockapi.App{"db": {Name: "db", Type: "mariadb:11.4", Size: "AUTO"}}, + Services: map[string]mockapi.Service{"db": {Type: "mariadb:11.4", Size: "AUTO"}}, Workers: map[string]mockapi.Worker{}, Routes: map[string]any{}, Links: mockapi.MakeHALLinks("self=" + envPath + "/deployment/current"), @@ -155,7 +155,7 @@ func TestMetricsMemory(t *testing.T) { main := makeEnv(projectID, "main", "production", "active", nil) main.SetCurrentDeployment(&mockapi.Deployment{ WebApps: map[string]mockapi.App{"app": {Name: "app", Type: "golang:1.23", Size: "AUTO"}}, - Services: map[string]mockapi.App{}, + Services: map[string]mockapi.Service{}, Workers: map[string]mockapi.Worker{}, Routes: map[string]any{}, Links: mockapi.MakeHALLinks("self=" + envPath + "/deployment/current"), diff --git a/integration-tests/mount_download_test.go b/integration-tests/mount_download_test.go index 513e3f4e..3f97a761 100644 --- a/integration-tests/mount_download_test.go +++ b/integration-tests/mount_download_test.go @@ -57,7 +57,7 @@ func TestMountDownloadToNewRelativeTarget(t *testing.T) { "/var/log": {Source: "storage", SourcePath: "logs"}, }}, }, - Services: map[string]mockapi.App{}, + Services: map[string]mockapi.Service{}, Routes: map[string]any{}, Workers: map[string]mockapi.Worker{}, Links: mockapi.MakeHALLinks("self=/projects/" + projectID + "/environments/main/deployment/current"), diff --git a/integration-tests/mount_list_test.go b/integration-tests/mount_list_test.go index ee9b4c27..46d44b70 100644 --- a/integration-tests/mount_list_test.go +++ b/integration-tests/mount_list_test.go @@ -40,7 +40,7 @@ func TestMountList(t *testing.T) { "/public/sites/default/files": {Source: "local", SourcePath: "files"}, }}, }, - Services: map[string]mockapi.App{}, + Services: map[string]mockapi.Service{}, Routes: map[string]any{}, Workers: map[string]mockapi.Worker{}, Links: mockapi.MakeHALLinks("self=/projects/" + projectID + "/environments/main/deployment/current"), diff --git a/integration-tests/org_user_projects_test.go b/integration-tests/org_user_projects_test.go index 61e8a2a2..7c8da9af 100644 --- a/integration-tests/org_user_projects_test.go +++ b/integration-tests/org_user_projects_test.go @@ -67,7 +67,7 @@ func TestOrgUserProjects(t *testing.T) { "id": "member-1", "organization_id": orgID, "user_id": targetUserID, - "permissions": []string{"members:viewer"}, + "permissions": []string{"members"}, "owner": false, "created_at": "2024-01-01T00:00:00+00:00", "updated_at": "2024-01-01T00:00:00+00:00", @@ -76,7 +76,7 @@ func TestOrgUserProjects(t *testing.T) { "id": "member-2", "organization_id": orgID, "user_id": missingUserID, - "permissions": []string{"members:viewer"}, + "permissions": []string{"members"}, "owner": false, "created_at": "2024-01-01T00:00:00+00:00", "updated_at": "2024-01-01T00:00:00+00:00", @@ -84,7 +84,7 @@ func TestOrgUserProjects(t *testing.T) { }, "_links": map[string]any{ "self": map[string]string{"href": "/organizations/" + orgID + "/members"}, - "ref:users:0": map[string]string{"href": "/ref/users?in=" + targetUserID}, + "ref:users:0": map[string]string{"href": "/ref/users?in=" + targetUserID + "&sig=mock-signature"}, // Deliberately omit missingUserID from the ref:users lookup. }, } diff --git a/integration-tests/project_setup_test.go b/integration-tests/project_setup_test.go index 233c57b2..9fbd0e1b 100644 --- a/integration-tests/project_setup_test.go +++ b/integration-tests/project_setup_test.go @@ -133,7 +133,7 @@ func remoteEnv(t *testing.T, scripts map[string]string, relationships map[string func sshEnv(d *mockapi.Deployment) *mockapi.Environment { env := makeEnv(layoutProjectID, "main", "production", "active", nil) if d.Services == nil { - d.Services = map[string]mockapi.App{} + d.Services = map[string]mockapi.Service{} } if d.Workers == nil { d.Workers = map[string]mockapi.Worker{} diff --git a/integration-tests/resources_get_test.go b/integration-tests/resources_get_test.go index b509d0cc..0714114d 100644 --- a/integration-tests/resources_get_test.go +++ b/integration-tests/resources_get_test.go @@ -28,7 +28,7 @@ func TestResourcesGet(t *testing.T) { }, }, map[string]any{ "BALANCED": map[string]any{ - "0.1": map[string]any{"cpu": "0.1", "memory": "256", "cpu_type": "guaranteed"}, + "0.1": map[string]any{"cpu": 0.1, "memory": 256, "cpu_type": "guaranteed"}, }, })) f := serveAPI(t, apiHandler) diff --git a/integration-tests/resources_set_interactive_test.go b/integration-tests/resources_set_interactive_test.go index 018585f9..2a7bd0e6 100644 --- a/integration-tests/resources_set_interactive_test.go +++ b/integration-tests/resources_set_interactive_test.go @@ -31,8 +31,8 @@ func TestResourcesSet_Interactive(t *testing.T) { }, }, map[string]any{ "HIGH_CPU": map[string]any{ - "0.5": map[string]any{"cpu": "0.5", "memory": "224", "cpu_type": "shared"}, - "1": map[string]any{"cpu": "1", "memory": "384", "cpu_type": "shared"}, + "0.5": map[string]any{"cpu": 0.5, "memory": 224, "cpu_type": "shared"}, + "1": map[string]any{"cpu": 1, "memory": 384, "cpu_type": "shared"}, }, })) f := serveAPI(t, apiHandler) diff --git a/integration-tests/resources_set_test.go b/integration-tests/resources_set_test.go index 3c1d0087..be866361 100644 --- a/integration-tests/resources_set_test.go +++ b/integration-tests/resources_set_test.go @@ -43,7 +43,7 @@ func TestResourcesSet_CurrentSizeMissingFromContainerProfiles(t *testing.T) { }, }, map[string]any{ "BALANCED": map[string]any{ - "0.1": map[string]any{"cpu": "0.1", "memory": "256", "cpu_type": "guaranteed"}, + "0.1": map[string]any{"cpu": 0.1, "memory": 256, "cpu_type": "guaranteed"}, }, })) f := serveAPI(t, apiHandler) diff --git a/integration-tests/resources_set_trial_test.go b/integration-tests/resources_set_trial_test.go index 61c327bd..c885adf3 100644 --- a/integration-tests/resources_set_trial_test.go +++ b/integration-tests/resources_set_trial_test.go @@ -30,11 +30,11 @@ func setUpResourcesSetOrgWithSize(apiHandler *mockapi.Handler, orgID, currentSiz }, }, map[string]any{ "BALANCED": map[string]any{ - "0.1": map[string]any{"cpu": "0.1", "memory": "64", "cpu_type": "shared"}, - "0.5": map[string]any{"cpu": "0.5", "memory": "128", "cpu_type": "shared"}, - "1": map[string]any{"cpu": "1", "memory": "256", "cpu_type": "shared"}, + "0.1": map[string]any{"cpu": 0.1, "memory": 64, "cpu_type": "shared"}, + "0.5": map[string]any{"cpu": 0.5, "memory": 128, "cpu_type": "shared"}, + "1": map[string]any{"cpu": 1, "memory": 256, "cpu_type": "shared"}, // Filtered out: the project does not support guaranteed CPU. - "2": map[string]any{"cpu": "2", "memory": "512", "cpu_type": "guaranteed"}, + "2": map[string]any{"cpu": 2, "memory": 512, "cpu_type": "guaranteed"}, }, })) return projectID diff --git a/integration-tests/resources_set_values_test.go b/integration-tests/resources_set_values_test.go index 59dd7f8d..50e7497a 100644 --- a/integration-tests/resources_set_values_test.go +++ b/integration-tests/resources_set_values_test.go @@ -39,7 +39,7 @@ func TestResourcesSet_DiskKeywords(t *testing.T) { }, }, map[string]any{ "HIGH_CPU": map[string]any{ - "1": map[string]any{"cpu": "1", "memory": "384", "cpu_type": "shared"}, + "1": map[string]any{"cpu": 1, "memory": 384, "cpu_type": "shared"}, }, })) f := serveAPI(t, apiHandler) @@ -75,9 +75,9 @@ func TestResourcesSet_InteractiveIntegerProfileSizes(t *testing.T) { }, }, map[string]any{ "HIGH_CPU": map[string]any{ - "0.5": map[string]any{"cpu": "0.5", "memory": "224", "cpu_type": "shared"}, - "1": map[string]any{"cpu": "1", "memory": "384", "cpu_type": "shared"}, - "2": map[string]any{"cpu": "2", "memory": "768", "cpu_type": "shared"}, + "0.5": map[string]any{"cpu": 0.5, "memory": 224, "cpu_type": "shared"}, + "1": map[string]any{"cpu": 1, "memory": 384, "cpu_type": "shared"}, + "2": map[string]any{"cpu": 2, "memory": 768, "cpu_type": "shared"}, }, })) f := serveAPI(t, apiHandler) diff --git a/integration-tests/resources_size_list_test.go b/integration-tests/resources_size_list_test.go index 7c4ca8ca..9172da47 100644 --- a/integration-tests/resources_size_list_test.go +++ b/integration-tests/resources_size_list_test.go @@ -54,8 +54,8 @@ func TestResourcesSizeListGuaranteedCPU(t *testing.T) { }, }, map[string]any{ "BALANCED": map[string]any{ - "0.5": map[string]any{"cpu": "0.5", "memory": "128", "cpu_type": "shared"}, - "2": map[string]any{"cpu": "2", "memory": "512", "cpu_type": "guaranteed"}, + "0.5": map[string]any{"cpu": 0.5, "memory": 128, "cpu_type": "shared"}, + "2": map[string]any{"cpu": 2, "memory": 512, "cpu_type": "guaranteed"}, }, }) next["project_info"] = map[string]any{"settings": c.settings, "capabilities": c.capabilities} diff --git a/integration-tests/route_list_test.go b/integration-tests/route_list_test.go index 802ea76d..a148cf36 100644 --- a/integration-tests/route_list_test.go +++ b/integration-tests/route_list_test.go @@ -87,12 +87,6 @@ func mockRoutes() map[string]any { "attributes": map[string]any{}, "type": "upstream", "original_url": "https://{default}", - "http_access": map[string]any{ - "is_enabled": true, - "addresses": []string{}, - "basic_auth": map[string]any{}, - }, - "restrict_robots": true, "cache": map[string]any{ "enabled": true, "default_ttl": 0, @@ -111,13 +105,7 @@ func mockRoutes() map[string]any { "attributes": map[string]any{}, "type": "redirect", "original_url": "http://{default}", - "http_access": map[string]any{ - "is_enabled": true, - "addresses": []string{}, - "basic_auth": map[string]any{}, - }, - "restrict_robots": true, - "to": "https://main.example.com/", + "to": "https://main.example.com/", }, } } diff --git a/integration-tests/runtime_operation_test.go b/integration-tests/runtime_operation_test.go index aab439dc..9817f8ae 100644 --- a/integration-tests/runtime_operation_test.go +++ b/integration-tests/runtime_operation_test.go @@ -58,7 +58,7 @@ func TestRuntimeOperationRun(t *testing.T) { "type": "golang:1.23", "operations": map[string]any{ "migrate": map[string]any{ - "role": "app", + "role": "viewer", "commands": map[string]any{ "start": "php migrate.php", "stop": nil, @@ -72,13 +72,13 @@ func TestRuntimeOperationRun(t *testing.T) { "routes": map[string]any{}, "_links": map[string]any{ "self": map[string]any{"href": base + deploymentPath}, - "#operations": map[string]any{"href": base + envPath + "/runtime-operations"}, + "#operations": map[string]any{"href": base + deploymentPath + "/operations"}, }, }) }) var receivedBody atomic.Value // map[string]any - apiHandler.Post(envPath+"/runtime-operations", func(w http.ResponseWriter, r *http.Request) { + apiHandler.Post(deploymentPath+"/operations", func(w http.ResponseWriter, r *http.Request) { b, err := io.ReadAll(r.Body) require.NoError(t, err) var body map[string]any diff --git a/integration-tests/ssh_test.go b/integration-tests/ssh_test.go index 24c03b4e..a6978768 100644 --- a/integration-tests/ssh_test.go +++ b/integration-tests/ssh_test.go @@ -52,7 +52,7 @@ func TestSSH(t *testing.T) { WebApps: map[string]mockapi.App{ "app": {Name: "app", Type: "golang:1.23", Size: "M", Disk: 2048, Mounts: map[string]mockapi.Mount{}}, }, - Services: map[string]mockapi.App{}, + Services: map[string]mockapi.Service{}, Workers: map[string]mockapi.Worker{}, Routes: mockRoutes(), Links: mockapi.MakeHALLinks("self=/projects/" + projectID + "/environments/main/deployment/current"), diff --git a/integration-tests/valkey_test.go b/integration-tests/valkey_test.go index fa80777d..fb1b45ac 100644 --- a/integration-tests/valkey_test.go +++ b/integration-tests/valkey_test.go @@ -85,7 +85,7 @@ func TestValkey(t *testing.T) { WebApps: map[string]mockapi.App{ "app": {Name: "app", Type: "golang:1.23", Size: "M", Disk: 2048, Mounts: map[string]mockapi.Mount{}}, }, - Services: map[string]mockapi.App{}, + Services: map[string]mockapi.Service{}, Workers: map[string]mockapi.Worker{}, Routes: mockRoutes(), Links: mockapi.MakeHALLinks("self=/projects/" + projectID + "/environments/main/deployment/current"), diff --git a/legacy/composer.lock b/legacy/composer.lock index 526097a2..d8d81f36 100644 --- a/legacy/composer.lock +++ b/legacy/composer.lock @@ -794,12 +794,12 @@ "source": { "type": "git", "url": "https://github.com/platformsh/platformsh-client-php.git", - "reference": "a263eb88563b3aeb1f9fdcae627144e2acb51e30" + "reference": "6d8f2dec7a32ce4525c5eeb3e87dcdce23d896e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/platformsh/platformsh-client-php/zipball/a263eb88563b3aeb1f9fdcae627144e2acb51e30", - "reference": "a263eb88563b3aeb1f9fdcae627144e2acb51e30", + "url": "https://api.github.com/repos/platformsh/platformsh-client-php/zipball/6d8f2dec7a32ce4525c5eeb3e87dcdce23d896e9", + "reference": "6d8f2dec7a32ce4525c5eeb3e87dcdce23d896e9", "shasum": "" }, "require": { @@ -835,7 +835,7 @@ "issues": "https://github.com/platformsh/platformsh-client-php/issues", "source": "https://github.com/platformsh/platformsh-client-php/tree/3.x" }, - "time": "2026-10-01T00:14:21+00:00" + "time": "2026-10-22T12:58:35+00:00" }, { "name": "platformsh/console-form", diff --git a/legacy/phpstan-baseline.neon b/legacy/phpstan-baseline.neon index 8661fc84..4fbb2c17 100644 --- a/legacy/phpstan-baseline.neon +++ b/legacy/phpstan-baseline.neon @@ -2695,7 +2695,7 @@ parameters: path: src/Command/Project/ProjectCreateCommand.php - - message: '#^Parameter \#1 \$options of static method Platformsh\\Client\\Model\\Subscription\\SubscriptionOptions\:\:fromArray\(\) expects array\{project_region\: string\|null, project_title\: string\|null, default_branch\: string\|null, options_url\: string\|null, options_custom\: array\|null, plan\: string\|null, environments\: int\|null, storage\: int\|null, \.\.\.\}, array\{organization_id\: string\|null, project_title\: mixed, project_region\: mixed, default_branch\: mixed, plan\: mixed, storage\: int, environments\: int, options_custom\: array\{initialize\: array\{repository\: mixed\}\}\|null, \.\.\.\} given\.$#' + message: '#^Parameter \#1 \$options of static method Platformsh\\Client\\Model\\Subscription\\SubscriptionOptions\:\:fromArray\(\) expects array\{project_region\: string\|null, project_title\: string\|null, default_branch\: string\|null, options_url\: string\|null, options_custom\: array\|null, plan\: string\|null, environments\: int\|null, storage\: int\|null, \.\.\.\}, array\{organization_id\: string\|null, project_title\: mixed, project_region\: mixed, default_branch\: mixed, plan\: mixed, storage\: int, environments\: int, options_custom\: array\{initialize\: array\{repository\: mixed\}\}\|null\} given\.$#' identifier: argument.type count: 1 path: src/Command/Project/ProjectCreateCommand.php diff --git a/legacy/src/Command/Project/ProjectCreateCommand.php b/legacy/src/Command/Project/ProjectCreateCommand.php index 854872d6..ada13791 100644 --- a/legacy/src/Command/Project/ProjectCreateCommand.php +++ b/legacy/src/Command/Project/ProjectCreateCommand.php @@ -213,7 +213,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int 'storage' => (int) $options['storage'] * 1024, 'environments' => (int) $options['environments'], 'options_custom' => $options_custom, - 'options_url' => null, ])); $this->api->clearProjectsCache(); diff --git a/pkg/mockapi/api_server.go b/pkg/mockapi/api_server.go index d1992981..e508e672 100644 --- a/pkg/mockapi/api_server.go +++ b/pkg/mockapi/api_server.go @@ -72,6 +72,8 @@ func NewHandler(t *testing.T) *Handler { }) }) + h.Use(validateOpenAPI(t)) + h.Get("/users/me", h.handleUsersMe) h.Get("/me", h.handleUsersMe) h.Get("/users/{user_id}/extended-access", h.handleUserExtendedAccess) @@ -167,7 +169,7 @@ func NewHandler(t *testing.T) *Handler { h.Get("/projects/{project_id}/environments/{environment_id}/deployments/current", h.handleGetCurrentDeployment) h.Get("/projects/{project_id}/environments/{environment_id}/deployments/next", h.handleGetNextDeployment) h.Patch("/projects/{project_id}/environments/{environment_id}/deployments/next", h.handlePatchNextDeployment) - h.Get("/projects/{project_id}/environments/{environment_id}/autoscaling", h.handleGetAutoscalingSettings) + h.Get("/projects/{project_id}/environments/{environment_id}/autoscaling/settings", h.handleGetAutoscalingSettings) h.Get("/projects/{project_id}/domains", h.handleListProjectDomains) h.Get("/projects/{project_id}/domains/{name}", h.handleGetProjectDomain) h.Get("/projects/{project_id}/integrations", h.handleListProjectIntegrations) diff --git a/pkg/mockapi/environments.go b/pkg/mockapi/environments.go index e3ff62ed..2eb38377 100644 --- a/pkg/mockapi/environments.go +++ b/pkg/mockapi/environments.go @@ -38,7 +38,7 @@ func (h *Handler) handleGetEnvironment(w http.ResponseWriter, req *http.Request) for id, e := range h.environments { if e.Project == projectID && id == environmentID { _ = json.NewEncoder(w).Encode(e) - break + return } } w.WriteHeader(http.StatusNotFound) @@ -53,14 +53,35 @@ func (h *Handler) handlePatchEnvironment(w http.ResponseWriter, req *http.Reques h.Lock() defer h.Unlock() + body, err := io.ReadAll(req.Body) + if err != nil { + w.WriteHeader(http.StatusBadRequest) + return + } patched := *env - patched.HTTPAccess = maps.Clone(env.HTTPAccess) + patched.HTTPAccess = nil // Merged below. patched.MergeInfo = maps.Clone(env.MergeInfo) - err := json.NewDecoder(req.Body).Decode(&patched) - if err != nil { + var patch struct { + HTTPAccess json.RawMessage `json:"http_access"` + } + if json.Unmarshal(body, &patched) != nil || json.Unmarshal(body, &patch) != nil { w.WriteHeader(http.StatusBadRequest) return } + // Like the API, http_access is a JSON merge patch, and basic_auth defaults to an empty object. As http_access + // has no default, the API rejects null. + patched.HTTPAccess = env.HTTPAccess + if patch.HTTPAccess != nil { + var httpAccess map[string]any + if err := json.Unmarshal(patch.HTTPAccess, &httpAccess); err != nil || httpAccess == nil { + w.WriteHeader(http.StatusBadRequest) + return + } + patched.HTTPAccess = mergePatch(env.HTTPAccess, httpAccess) + if patched.HTTPAccess["basic_auth"] == nil { + patched.HTTPAccess["basic_auth"] = map[string]any{} + } + } patched.UpdatedAt = time.Now() h.environments[patched.ID] = &patched @@ -133,13 +154,13 @@ func (h *Handler) handleEnvironmentAction(activityType string) http.HandlerFunc } // activityResponse returns a response with an empty list of embedded activities. -func activityResponse() map[string]any { +func activityResponse() apiResponse { return embedded("activities", []Activity{}) } -// embedded returns a response that embeds a value under a key. -func embedded(key string, value any) map[string]any { - return map[string]any{"_embedded": map[string]any{key: value}} +// embedded returns an accepted response that embeds a value under a key. +func embedded(key string, value any) apiResponse { + return apiResponse{Status: "OK", Code: http.StatusOK, Embedded: map[string]any{key: value}} } func (h *Handler) handleGetCurrentDeployment(w http.ResponseWriter, req *http.Request) { @@ -259,7 +280,7 @@ func (h *Handler) handleListBackups(w http.ResponseWriter, req *http.Request) { defer h.RUnlock() projectID := chi.URLParam(req, "project_id") environmentID := chi.URLParam(req, "environment_id") - var backups []*Backup + backups := []*Backup{} if projectBackups, ok := h.projectBackups[projectID]; ok { for _, b := range projectBackups { if b.EnvironmentID == environmentID { diff --git a/pkg/mockapi/environments_test.go b/pkg/mockapi/environments_test.go new file mode 100644 index 00000000..5f704034 --- /dev/null +++ b/pkg/mockapi/environments_test.go @@ -0,0 +1,34 @@ +package mockapi + +import ( + "net/http" + "net/http/httptest" + "strings" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestPatchEnvironmentHTTPAccess(t *testing.T) { + h := NewHandler(t) + env := &Environment{ID: "main", Project: "p", HTTPAccess: map[string]any{ + "is_enabled": true, "addresses": []any{}, "basic_auth": map[string]any{"user": "password"}, + }} + h.SetEnvironments([]*Environment{env}) + + patch := func(body string) int { + req := httptest.NewRequest(http.MethodPatch, "/projects/p/environments/main", strings.NewReader(body)) + req.Header.Set("Authorization", "Bearer token") + req.Header.Set("Content-Type", "application/json") + w := httptest.NewRecorder() + h.ServeHTTP(w, req) + return w.Code + } + + assert.Equal(t, http.StatusBadRequest, patch(`{"http_access": null}`)) + assert.Equal(t, map[string]any{"user": "password"}, h.environments["main"].HTTPAccess["basic_auth"]) + + assert.Equal(t, http.StatusOK, patch(`{"http_access": {"basic_auth": null}}`)) + assert.Equal(t, map[string]any{}, h.environments["main"].HTTPAccess["basic_auth"]) + assert.Equal(t, true, h.environments["main"].HTTPAccess["is_enabled"]) +} diff --git a/pkg/mockapi/gen.go b/pkg/mockapi/gen.go new file mode 100644 index 00000000..600ab3f2 --- /dev/null +++ b/pkg/mockapi/gen.go @@ -0,0 +1,49 @@ +//go:build ignore + +// Command gen fetches the Upsun API's OpenAPI spec from meta.upsun.com and +// writes it, indented, to openapi.json. +// +// Run it with: go run gen.go (or `make update-openapi-spec`). +package main + +import ( + "bytes" + "encoding/json" + "fmt" + "io" + "net/http" + "os" + "time" +) + +const specURL = "https://meta.upsun.com/openapi-spec" + +func main() { + if err := run(); err != nil { + fmt.Fprintln(os.Stderr, "error:", err) + os.Exit(1) + } +} + +func run() error { + client := &http.Client{Timeout: 60 * time.Second} + resp, err := client.Get(specURL) + if err != nil { + return err + } + defer resp.Body.Close() + if resp.StatusCode != http.StatusOK { + return fmt.Errorf("unexpected status %s from %s", resp.Status, specURL) + } + body, err := io.ReadAll(resp.Body) + if err != nil { + return err + } + + var out bytes.Buffer + if err := json.Indent(&out, body, "", " "); err != nil { + return err + } + out.WriteByte('\n') + return os.WriteFile("openapi.json", out.Bytes(), 0o644) +} diff --git a/pkg/mockapi/model.go b/pkg/mockapi/model.go index 168a1be7..07eff345 100644 --- a/pkg/mockapi/model.go +++ b/pkg/mockapi/model.go @@ -9,6 +9,9 @@ import ( "time" ) +// refSig is the signature that the API adds to reference links. +const refSig = "&sig=mock-signature" + type HALLink struct { HREF string `json:"href"` } @@ -27,7 +30,7 @@ func MakeHALLinks(nameAndPath ...string) HalLinks { type Subscription struct { ID string `json:"id"` - Links HalLinks `json:"_links"` + Links HalLinks `json:"_links,omitempty"` ProjectID string `json:"project_id"` ProjectRegion string `json:"project_region"` ProjectTitle string `json:"project_title"` @@ -60,7 +63,7 @@ type Project struct { Vendor string `json:"vendor"` Repository ProjectRepository `json:"repository"` DefaultBranch string `json:"default_branch"` - Links HalLinks `json:"_links"` + Links HalLinks `json:"_links,omitempty"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` @@ -112,7 +115,7 @@ type Environment struct { Project string `json:"project"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` - Links HalLinks `json:"_links"` + Links HalLinks `json:"_links,omitempty"` HTTPAccess map[string]any `json:"http_access,omitempty"` HeadCommit string `json:"head_commit,omitempty"` @@ -145,7 +148,7 @@ func (e *Environment) SetAutoscalingSettings(s map[string]any) { if e.Links == nil { e.Links = make(HalLinks) } - path := "/projects/" + url.PathEscape(e.Project) + "/environments/" + url.PathEscape(e.ID) + "/autoscaling" + path := "/projects/" + url.PathEscape(e.Project) + "/environments/" + url.PathEscape(e.ID) + "/autoscaling/settings" e.Links["#autoscaling"] = HALLink{HREF: path} e.Links["#manage-autoscaling"] = HALLink{HREF: path} } @@ -165,7 +168,7 @@ type Mount struct { type App struct { Name string `json:"name"` Type string `json:"type"` - Size string `json:"size"` + Size string `json:"size,omitempty"` Disk int `json:"disk"` Mounts map[string]Mount `json:"mounts"` @@ -174,6 +177,14 @@ type App struct { Stack any `json:"stack,omitempty"` } +// withMounts returns a copy of the app with an empty mounts object instead of null. +func (a App) withMounts() App { //nolint:gocritic // A copy is returned. + if a.Mounts == nil { + a.Mounts = map[string]Mount{} + } + return a +} + type Commands struct { Start string `json:"start"` } @@ -187,15 +198,44 @@ type Worker struct { Worker WorkerInfo `json:"worker"` } +// Service is a service in a deployment. +type Service struct { + Type string `json:"type"` + Size string `json:"size,omitempty"` + Disk int `json:"disk,omitempty"` +} + type Deployment struct { - WebApps map[string]App `json:"webapps"` - Services map[string]App `json:"services"` - Workers map[string]Worker `json:"workers"` - Tasks map[string]App `json:"tasks,omitempty"` + WebApps map[string]App `json:"webapps"` + Services map[string]Service `json:"services"` + Workers map[string]Worker `json:"workers"` + Tasks map[string]App `json:"tasks,omitempty"` Routes map[string]any `json:"routes"` - Links HalLinks `json:"_links"` + Links HalLinks `json:"_links,omitempty"` +} + +// MarshalJSON outputs empty objects instead of null, as the API does. +func (d Deployment) MarshalJSON() ([]byte, error) { + type deployment Deployment + c := deployment(d) + c.WebApps = make(map[string]App, len(d.WebApps)) + for name, a := range d.WebApps { + c.WebApps[name] = a.withMounts() + } + c.Workers = make(map[string]Worker, len(d.Workers)) + for name, w := range d.Workers { + w.App = w.withMounts() + c.Workers[name] = w + } + if c.Services == nil { + c.Services = map[string]Service{} + } + if c.Routes == nil { + c.Routes = map[string]any{} + } + return json.Marshal(c) } type Org struct { @@ -205,12 +245,22 @@ type Org struct { Label string `json:"label"` Owner string `json:"owner_id"` Capabilities []string `json:"capabilities"` - Links HalLinks `json:"_links"` + Links HalLinks `json:"_links,omitempty"` BillingLegacy *bool `json:"billing_legacy,omitempty"` BillingProfileID string `json:"billing_profile_id,omitempty"` } +// MarshalJSON outputs an empty list of capabilities instead of null. +func (o Org) MarshalJSON() ([]byte, error) { //nolint:gocritic // So that it applies to values too. + type org Org + c := org(o) + if c.Capabilities == nil { + c.Capabilities = []string{} + } + return json.Marshal(c) +} + func (o *Org) AsRef() *OrgRef { return &OrgRef{ ID: o.ID, @@ -281,14 +331,14 @@ type User struct { Email string `json:"email"` EmailVerified bool `json:"email_verified"` Picture string `json:"picture"` - Country string `json:"country"` + Country string `json:"country,omitempty"` PhoneNumberVerified bool `json:"phone_number_verified"` MFAEnabled bool `json:"mfa_enabled"` SSOEnabled bool `json:"sso_enabled"` - ConsentMethod string `json:"consent_method"` + ConsentMethod string `json:"consent_method,omitempty"` ConsentedAt time.Time `json:"consented_at"` CreatedAt time.Time `json:"created_at"` @@ -305,7 +355,7 @@ type Backup struct { CommitID string `json:"commit_id"` ExpiresAt time.Time `json:"expires_at"` - Links HalLinks `json:"_links"` + Links HalLinks `json:"_links,omitempty"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` @@ -343,6 +393,9 @@ type Activity struct { func (a Activity) MarshalJSON() ([]byte, error) { //nolint:gocritic // See above. type activity Activity c := activity(a) + if c.Payload == nil { + c.Payload = map[string]any{} + } if c.Links == nil { path := "/projects/" + url.PathEscape(a.Project) + "/activities/" + url.PathEscape(a.ID) c.Links = MakeHALLinks("self="+path, "log="+path+"/log") @@ -350,7 +403,15 @@ func (a Activity) MarshalJSON() ([]byte, error) { //nolint:gocritic // See above c.Links["#cancel"] = HALLink{HREF: path + "/cancel"} } } - return json.Marshal(c) + // An activity has no result until it completes. + var result *string + if c.Result != "" { + result = &c.Result + } + return json.Marshal(struct { + activity + Result *string `json:"result"` + }{c, result}) } func (a *Activity) cancellable() bool { @@ -369,7 +430,22 @@ type Domain struct { SSL *DomainSSL `json:"ssl"` - Links HalLinks `json:"_links"` + Links HalLinks `json:"_links,omitempty"` +} + +// MarshalJSON leaves out is_default from replacement domains, as the API does. +func (d Domain) MarshalJSON() ([]byte, error) { //nolint:gocritic // So that it applies to values too. + type domain Domain + b, err := json.Marshal(domain(d)) + if err != nil || d.ReplacementFor == "" { + return b, err + } + var m map[string]any + if err := json.Unmarshal(b, &m); err != nil { + return nil, err + } + delete(m, "is_default") + return json.Marshal(m) } // DomainSSL is computed from the project's certificates, as the API does. @@ -393,7 +469,7 @@ type Integration struct { CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` - Links HalLinks `json:"_links"` + Links HalLinks `json:"_links,omitempty"` } type Certificate struct { @@ -411,7 +487,26 @@ type Certificate struct { CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` - Links HalLinks `json:"_links"` + Links HalLinks `json:"_links,omitempty"` +} + +// MarshalJSON outputs empty lists instead of null. +func (c Certificate) MarshalJSON() ([]byte, error) { //nolint:gocritic // So that it applies to values too. + type certificate Certificate + v := certificate(c) + if v.AuthType == nil { + v.AuthType = []string{} + } + if v.Chain == nil { + v.Chain = []string{} + } + if v.Domains == nil { + v.Domains = []string{} + } + if v.Issuer == nil { + v.Issuer = []NameAttr{} + } + return json.Marshal(v) } // NameAttr is an attribute of an X.509 name, such as the certificate issuer. @@ -422,25 +517,30 @@ type NameAttr struct { } type Variable struct { - Name string `json:"name"` - Value string `json:"value,omitempty"` - IsSensitive bool `json:"is_sensitive"` - VisibleBuild bool `json:"visible_build"` - VisibleRuntime bool `json:"visible_runtime"` - ApplicationScope []string `json:"application_scope,omitempty"` + ID string `json:"id"` + Name string `json:"name"` + Value string `json:"value,omitempty"` + Attributes map[string]string `json:"attributes"` + IsJSON bool `json:"is_json"` + IsSensitive bool `json:"is_sensitive"` + VisibleBuild bool `json:"visible_build"` + VisibleRuntime bool `json:"visible_runtime"` + ApplicationScope []string `json:"application_scope"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` - Links HalLinks `json:"_links"` + Links HalLinks `json:"_links,omitempty"` } type EnvLevelVariable struct { Variable - IsEnabled bool `json:"is_enabled"` - Inherited bool `json:"inherited"` - IsInheritable bool `json:"is_inheritable"` + Project string `json:"project"` + Environment string `json:"environment"` + IsEnabled bool `json:"is_enabled"` + Inherited bool `json:"inherited"` + IsInheritable bool `json:"is_inheritable"` } // BillingProfile is a billing profile on the new billing system. diff --git a/pkg/mockapi/openapi.go b/pkg/mockapi/openapi.go new file mode 100644 index 00000000..4c449e89 --- /dev/null +++ b/pkg/mockapi/openapi.go @@ -0,0 +1,340 @@ +package mockapi + +import ( + "bytes" + "context" + _ "embed" + "fmt" + "io" + "net/http" + "path" + "strings" + "sync" + "testing" + + "github.com/getkin/kin-openapi/openapi3" + "github.com/getkin/kin-openapi/openapi3filter" + "github.com/getkin/kin-openapi/routers" + "github.com/getkin/kin-openapi/routers/gorillamux" +) + +// The API's OpenAPI spec, from https://meta.upsun.com/openapi-spec (refresh it with `make update-openapi-spec`). +// +//go:embed openapi.json +var openAPISpec []byte + +// notInSpec lists requests that are not in the OpenAPI spec, so they are not validated. +// They are "METHOD /path" patterns for path.Match, where "*" matches one path segment. +var notInSpec = []string{ + "GET /billing/profiles/*", + "PATCH /billing/profiles/*", + "GET /organizations/*/setup/options", + "GET /organizations/*/trial", + "GET /organizations/*/usage", + "GET /subscriptions/*", + "DELETE /subscriptions/*", + "PATCH /projects/*", + "GET /projects/*/activities/*/log", + "POST /projects/*/environments/*/backups", + "PATCH /projects/*/environments/*/deployments/next", + "GET /projects/*/environments/*/settings", + "PATCH /projects/*/environments/*/settings", + "POST /projects/*/integrations/*/validate", + // The CLI follows an entrypoint link to /observability/, with a trailing slash, and to logs/query. + "GET /projects/*/environments/*/observability/", + "GET /projects/*/environments/*/observability/logs/query", + // Test routes. + "POST /projects/*/integrations/*/check", + "* /curl-test", + "* /organizations/*/curl-test", + "* /projects/*/curl-test", + "* /projects/*/environments/*/curl-test", +} + +func isInSpec(req *http.Request) bool { + for _, p := range notInSpec { + // Match the escaped path, as the router does, so that "*" also matches IDs with an encoded slash. + if ok, _ := path.Match(p, req.Method+" "+req.URL.EscapedPath()); ok { + return false + } + } + return true +} + +// The requests router validates requests, and the responses router validates responses, with the spec's required +// properties removed: mock responses only include the properties that tests need. +var ( + loadRequestsRouter = sync.OnceValues(func() (routers.Router, error) { return loadOpenAPIRouter(false) }) + loadResponsesRouter = sync.OnceValues(func() (routers.Router, error) { return loadOpenAPIRouter(true) }) +) + +func loadOpenAPIRouter(ignoreRequired bool) (routers.Router, error) { + doc, err := openapi3.NewLoader().LoadFromData(openAPISpec) + if err != nil { + return nil, err + } + // Match paths on any host, as the mock server listens on localhost. + doc.Servers = nil + for _, p := range doc.Paths.Map() { + p.Servers = nil + } + if err := patchSpec(doc); err != nil { + return nil, err + } + if ignoreRequired { + seen := map[*openapi3.Schema]bool{} + for _, s := range doc.Components.Schemas { + removeRequired(s, seen) + } + for _, p := range doc.Paths.Map() { + for _, op := range p.Operations() { + for _, r := range op.Responses.Map() { + if r.Value != nil { + for _, c := range r.Value.Content { + removeRequired(c.Schema, seen) + } + } + } + } + } + } + return gorillamux.NewRouter(doc) +} + +func removeRequired(ref *openapi3.SchemaRef, seen map[*openapi3.Schema]bool) { + if ref == nil || ref.Value == nil || seen[ref.Value] { + return + } + s := ref.Value + seen[s] = true + s.Required = nil + for _, p := range s.Properties { + removeRequired(p, seen) + } + removeRequired(s.Items, seen) + removeRequired(s.AdditionalProperties.Schema, seen) + removeRequired(s.Not, seen) + for _, l := range []openapi3.SchemaRefs{s.AllOf, s.AnyOf, s.OneOf} { + for _, r := range l { + removeRequired(r, seen) + } + } +} + +// integrationTypes maps the spec's integration schema names (without "Integration") to their types. +var integrationTypes = map[string]string{ + "Bitbucket": "bitbucket", + "BitbucketServer": "bitbucket_server", + "Blackfire": "blackfire", + "Email": "health.email", + "Fastly": "fastly", + "GitLab": "gitlab", + "Github": "github", + "HealthWebHook": "health.webhook", + "HttpLog": "httplog", + "NewRelic": "newrelic", + "OtlpLog": "otlplog", + "PagerDuty": "health.pagerduty", + "Script": "script", + "Slack": "health.slack", + "Splunk": "splunk", + "Sumologic": "sumologic", + "Syslog": "syslog", + "WebHook": "webhook", +} + +// patchSpec fixes differences between the spec and the API, where the API client depends on them. +func patchSpec(doc *openapi3.T) error { //nolint:funlen // A list of patches. + schemas := doc.Components.Schemas + object := openapi3.NewObjectSchema().NewRef() + str := openapi3.NewStringSchema().NewRef() + for _, s := range schemas { + v := s.Value + if v.AdditionalProperties.Has != nil && !*v.AdditionalProperties.Has && v.Properties["_links"] == nil { + // HAL links, on any resource. + v.WithPropertyRef("_links", object) + } + } + // The activities started by an operation, or the resource it created or updated (see the client's Result class). + schemas["AcceptedResponse"].Value.WithPropertyRef("_embedded", object) + // Shown by project:info, and used by the api.vendor_filter config. + schemas["Project"].Value.WithPropertyRef("vendor", str) + schemas["ProjectReference"].Value.WithPropertyRef("vendor", str) + // Only the type tells integrations apart, but the spec doesn't restrict it. + for _, name := range []string{"Integration", "IntegrationCreateCreateInput"} { + for _, ref := range schemas[name].Value.OneOf { + prefix := strings.TrimPrefix(ref.Ref, "#/components/schemas/") + prefix, _, _ = strings.Cut(prefix, "Integration") + t, ok := integrationTypes[prefix] + if !ok { + return fmt.Errorf("unknown integration schema: %s", ref.Ref) + } + typ := *ref.Value.Properties["type"].Value + typ.Enum = []any{t} + ref.Value.Properties["type"] = typ.NewRef() + } + } + // An update can leave out properties, including the type (and secrets, which the client can't read). + integrationPatch := schemas["IntegrationPatch"].Value + for _, ref := range integrationPatch.OneOf { + ref.Value.Required = nil + } + integrationPatch.AnyOf, integrationPatch.OneOf = integrationPatch.OneOf, nil + // The API returns an app's stack as configured, which the CLI supports in several forms (see TestEnvironmentXdebug). + for _, kind := range []string{"webapps", "workers"} { + app := schemas["Deployment"].Value.Properties[kind].Value.AdditionalProperties.Schema.Value + app.Properties["stack"] = openapi3.NewSchema().NewRef() + } + // Domains have an ssl property, which adds a certificate when it is written (used by domain:add and domain:update). + for _, name := range []string{ + "ProdDomainStorage", "ReplacementDomainStorage", + "ProdDomainStorageCreateInput", "ReplacementDomainStorageCreateInput", + "ProdDomainStoragePatch", "ReplacementDomainStoragePatch", + } { + schemas[name].Value.WithPropertyRef("ssl", object) + } + // An update can match both variants, as it applies to an existing domain. + domainPatch := schemas["DomainPatch"].Value + domainPatch.AnyOf, domainPatch.OneOf = domainPatch.OneOf, nil + // An environment update is a JSON merge patch, so null removes the basic auth credentials. + httpAccess := schemas["EnvironmentPatch"].Value.Properties["http_access"].Value + basicAuth := *httpAccess.Properties["basic_auth"].Value + basicAuth.Nullable = true + httpAccess.Properties["basic_auth"] = basicAuth.NewRef() + // A replacement domain has a replacement_for, otherwise a domain matches both variants. + r := schemas["ReplacementDomainStorageCreateInput"].Value + r.Required = append(r.Required, "replacement_for") + // The spec only has the tasks' sizing, but the API returns their whole config (see the client's Task class). + schemas["Deployment"].Value.Properties["tasks"].Value.AdditionalProperties.Schema = object + // The spec nests each service's settings and triggers one level too deep, and omits the service's "enabled". + services := schemas["AutoscalerSettings"].Value.Properties["services"].Value + services.AdditionalProperties.Schema = schemas["AutoscalerServiceSettings"] + for name, p := range schemas["AutoscalerTriggers"].Value.Properties { + if trigger := p.Value.AdditionalProperties.Schema; trigger != nil { + schemas["AutoscalerTriggers"].Value.Properties[name] = trigger + } + } + // Each route type has its own schema, and an original_url (shown by route:list). + routeTypes := map[string]string{"ProxyRoute": "proxy", "RedirectRoute": "redirect", "UpstreamRoute": "upstream"} + for name, t := range routeTypes { + route := schemas[name].Value + typ := *route.Properties["type"].Value + typ.Enum = []any{t} + route.Properties["type"] = typ.NewRef() + route.WithPropertyRef("original_url", str) + } + return nil +} + +var validationOptions = &openapi3filter.Options{ + MultiError: true, + // Check that the status is in the spec, otherwise the response isn't validated. + IncludeResponseStatus: true, + // Authentication is checked by the mock itself. + AuthenticationFunc: openapi3filter.NoopAuthenticationFunc, + // Don't modify the request. + SkipSettingDefaults: true, + // Leave out the schema and value from errors, as they can be large. + SchemaValidationOptions: []openapi3.SchemaValidationOption{openapi3.DisableSchemaErrorDetails()}, +} + +// validateOpenAPI checks requests and responses against the OpenAPI spec, and reports failures through the test. +func validateOpenAPI(t testing.TB) func(http.Handler) http.Handler { + reqRouter, err := loadRequestsRouter() + if err != nil { + t.Fatalf("failed to load OpenAPI spec: %v", err) + } + respRouter, err := loadResponsesRouter() + if err != nil { + t.Fatalf("failed to load OpenAPI spec: %v", err) + } + return func(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + reqBody, err := io.ReadAll(req.Body) + if err != nil { + t.Errorf("failed to read request body: %v", err) + w.WriteHeader(http.StatusBadRequest) + return + } + req.Body = io.NopCloser(bytes.NewReader(reqBody)) + + // The API returns JSON, unless a handler says otherwise. + w.Header().Set("Content-Type", "application/json") + rec := &responseRecorder{ResponseWriter: w, status: http.StatusOK} + next.ServeHTTP(rec, req) + + // Only successful exchanges are checked: the spec describes few errors, and some only by "default" responses + // that are meant for success. + if rec.status < 300 && isInSpec(req) { + validateExchange(t, reqRouter, respRouter, req, reqBody, rec) + } + + w.WriteHeader(rec.status) + _, _ = w.Write(rec.body.Bytes()) + }) + } +} + +func validateExchange( + t testing.TB, reqRouter, respRouter routers.Router, req *http.Request, reqBody []byte, rec *responseRecorder, +) { + input, err := requestValidationInput(reqRouter, req, reqBody) + if err != nil { + t.Errorf("OpenAPI: %s %s: %v", req.Method, req.URL.Path, err) + return + } + if err := openapi3filter.ValidateRequest(context.Background(), input); err != nil { + t.Errorf("OpenAPI: invalid request: %s %s: %v", req.Method, req.URL, err) + } + input, err = requestValidationInput(respRouter, req, reqBody) + if err != nil { + t.Errorf("OpenAPI: %s %s: %v", req.Method, req.URL.Path, err) + return + } + respInput := &openapi3filter.ResponseValidationInput{ + RequestValidationInput: input, + Status: rec.status, + Header: rec.Header(), + Options: validationOptions, + } + respInput.SetBodyBytes(rec.body.Bytes()) + if err := openapi3filter.ValidateResponse(context.Background(), respInput); err != nil { + t.Errorf("OpenAPI: invalid response: %s %s (%d): %v", req.Method, req.URL, rec.status, err) + } +} + +func requestValidationInput( + router routers.Router, req *http.Request, body []byte, +) (*openapi3filter.RequestValidationInput, error) { + vReq := req.Clone(context.Background()) + vReq.Body = io.NopCloser(bytes.NewReader(body)) + route, pathParams, err := router.FindRoute(vReq) + if err != nil { + return nil, err + } + return &openapi3filter.RequestValidationInput{ + Request: vReq, + PathParams: pathParams, + Route: route, + Options: validationOptions, + }, nil +} + +// responseRecorder buffers a response, so that it can be validated before it is sent. +type responseRecorder struct { + http.ResponseWriter + status int + wroteHeader bool + body bytes.Buffer +} + +func (r *responseRecorder) WriteHeader(status int) { + if !r.wroteHeader { + r.status, r.wroteHeader = status, true + } +} + +func (r *responseRecorder) Write(b []byte) (int, error) { + r.wroteHeader = true + return r.body.Write(b) +} diff --git a/pkg/mockapi/openapi.json b/pkg/mockapi/openapi.json new file mode 100644 index 00000000..26350db9 --- /dev/null +++ b/pkg/mockapi/openapi.json @@ -0,0 +1,45432 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Upsun.com Rest API", + "version": "1.0", + "contact": { + "name": "Support", + "url": "https://upsun.com/contact-us/" + }, + "termsOfService": "https://upsun.com/trust-center/legal/tos/", + "description": "# Introduction\n\nUpsun, formerly Platform.sh, is a container-based Platform-as-a-Service. Our main API\nis simply Git. With a single `git push` and a couple of YAML files in\nyour repository you can deploy an arbitrarily complex cluster.\nEvery [**Project**](#tag/Project) can have multiple applications (PHP,\nNode.js, Python, Ruby, Go, etc.) and managed, automatically\nprovisioned services (databases, message queues, etc.).\n\nEach project also comes with multiple concurrent\nlive staging/development [**Environments**](#tag/Environment).\nThese ephemeral development environments\nare automatically created every time you push a new branch or create a\npull request, and each has a full copy of the data of its parent branch,\nwhich is created on-the-fly in seconds.\n\nOur Git implementation supports integrations with third party Git\nproviders such as GitHub, Bitbucket, or GitLab, allowing you to simply\nintegrate Upsun into your existing workflow.\n\n## Using the REST API\n\nIn addition to the Git API, we also offer a REST API that allows you to manage\nevery aspect of the platform, from managing projects and environments,\nto accessing accounts and subscriptions, to creating robust workflows\nand integrations with your CI systems and internal services.\n\nThese API docs are generated from a standard **OpenAPI (Swagger)** Specification document\nwhich you can find here in [YAML](openapispec-upsun.yaml) and in [JSON](openapispec-upsun.json) formats.\n\nThis RESTful API consumes and produces HAL-style JSON over HTTPS,\nand any REST library can be used to access it. On GitHub, we also host\na few API libraries that you can use to make API access easier, such as our\n[PHP API client](https://github.com/upsun/upsun-sdk-php).\n\nIn order to use the API you will first need to have an [Upsun account](https://auth.upsun.com/register/)\nand [create an API Token](https://docs.upsun.com/anchors/cli/api-token/).\n\n# Authentication\n\n## OAuth2\n\nAPI authentication is done with OAuth2 access tokens.\n\n### API tokens\n\nYou can use an API token as one way to get an OAuth2 access token. This\nis particularly useful in scripts, e.g. for CI pipelines.\n\nTo create an API token, go to the \"API Tokens\" section\nof the \"Account Settings\" tab on the [Console](https://console.upsun.com).\n\nTo exchange this API token for an access token, a `POST` request\nmust be made to `https://auth.upsun.com/oauth2/token`.\n\nThe request will look like this in cURL:\n\n
\ncurl -u platform-api-user: \\\n -d 'grant_type=api_token&api_token=API_TOKEN' \\\n https://auth.upsun.com/oauth2/token\n\n\nThis will return a \"Bearer\" access token that\ncan be used to authenticate further API requests, for example:\n\n
\n{\n \"access_token\": \"abcdefghij1234567890\",\n \"expires_in\": 900,\n \"token_type\": \"bearer\"\n}\n\n\n### Using the Access Token\n\nTo authenticate further API requests, include this returned bearer token\nin the `Authorization` header. For example, to retrieve a list of\n[Projects](#tag/Project)\naccessible by the current user, you can make the following request\n(substituting the dummy token for your own):\n\n\ncurl -H \"Authorization: Bearer abcdefghij1234567890\" \\\n https://api.upsun.com/projects\n\n\n# HAL Links\n\nMost endpoints in the API return fields which defines a HAL\n(Hypertext Application Language) schema for the requested endpoint.\nThe particular objects returns and their contents can vary by endpoint.\nThe payload examples we give here for the requests do not show these\nelements. These links can allow you to create a fully dynamic API client\nthat does not need to hardcode any method or schema.\n\nUnless they are used for pagination we do not show the HAL links in the\npayload examples in this documentation for brevity and as their content\nis contextual (based on the permissions of the user).\n\n## _links Objects\n\nMost endpoints that respond to `GET` requests will include a `_links` object\nin their response. The `_links` object contains a key-object pair labelled `self`, which defines\ntwo further key-value pairs:\n\n* `href` - A URL string referring to the fully qualified name of the returned object. For many endpoints, this will be the direct link to the API endpoint on the region gateway, rather than on the general API gateway. This means it may reference a host of, for example, `eu-2.platform.sh` rather than `api.upsun.com`.\n* `meta` - An object defining the OpenAPI Specification (OAS) [schema object](https://swagger.io/specification/#schemaObject) of the component returned by the endpoint.\n\nThere may be zero or more other fields in the `_links` object resembling fragment identifiers\nbeginning with a hash mark, e.g. `#edit` or `#delete`. Each of these keys\nrefers to a JSON object containing two key-value pairs:\n\n* `href` - A URL string referring to the path name of endpoint which can perform the action named in the key.\n* `meta` - An object defining the OAS schema of the endpoint. This consists of a key-value pair, with the key defining an HTTP method and the value defining the [operation object](https://swagger.io/specification/#operationObject) of the endpoint.\n\nTo use one of these HAL links, you must send a new request to the URL defined\nin the `href` field which contains a body defined the schema object in the `meta` field.\n\nFor example, if you make a request such as `GET /projects/abcdefghij1234567890`, the `_links`\nobject in the returned response will include the key `#delete`. That object\nwill look something like this fragment:\n\n```\n\"#delete\": {\n \"href\": \"/api/projects/abcdefghij1234567890\",\n \"meta\": {\n \"delete\": {\n \"responses\": {\n . . . // Response definition omitted for space\n },\n \"parameters\": []\n }\n }\n}\n```\n\nTo use this information to delete a project, you would then send a `DELETE`\nrequest to the endpoint `https://api.upsun.com/api/projects/abcdefghij1234567890`\nwith no body or parameters to delete the project that was originally requested.\n\n## _embedded Objects\n\nRequests to endpoints which create or modify objects, such as `POST`, `PATCH`, or `DELETE`\nrequests, will include an `_embedded` key in their response. The object\nrepresented by this key will contain the created or modified object. This\nobject is identical to what would be returned by a subsequent `GET` request\nfor the object referred to by the endpoint.\n", + "x-logo": { + "url": "https://docs.upsun.com/images/upsun-api.svg", + "href": "https://upsun.com/#section/Introduction", + "altText": "Upsun logo" + } + }, + "servers": [ + { + "url": "{schemes}://api.upsun.com", + "description": "The Upsun.com API gateway", + "variables": { + "schemes": { + "default": "https" + } + } + } + ], + "security": [ + { + "BearerAuth": [] + } + ], + "tags": [ + { + "name": "Cert Management", + "description": "User-supplied SSL/TLS certificates can be managed using these\nendpoints. You can now list and modify certificate provisioners\nusing the `/projects/{projectId}/provisioners` and\n`/projects/{projectId}/provisioners/{certificateProvisionerDocumentId}`\nendpoints. For more information, see our\n[Third-party TLS certificate](https://docs.upsun.com/anchors/domains/custom/custom-certificates/)\ndocumentation. These endpoints are not for managing certificates\nthat are automatically supplied by Upsun via Let's Encrypt.\n" + }, + { + "name": "Environment", + "description": "On Upsun, an environment encompasses a single instance of your\nentire application stack, the services used by the application,\nthe application's data storage, and the environment's backups.\n\nIn general, an environment represents a single branch or merge request\nin the Git repository backing a project. It is a virtual cluster\nof read-only application and service containers with read-write\nmounts for application and service data.\n\nOn Upsun, the default branch is your production environment—thus,\nmerging changes to this branch will put those changes to production.\n" + }, + { + "name": "Environment Type", + "description": "Environment Types is the way Upsun manages access. We currently have 3 environment types:\n* Development\n* Staging\n* Production\n\nEach environment type will contain a group of users and their accesses. We manage access,\nadding, updating and removing users and their roles, here.\n\nEach environment will have a type, pointing to one of these 3 environment types.\nSee `type` in [Environments](#tag/Environment).\n\nIn general:\n* Production will be reserved for the default branch, and cannot be set manually.\n* An environment can be set to be type `staging` or development manually and when branching.\n\nDedicated Generation 2 projects have different rules for environment types. If your project\ncontains at least one of those Dedicated Generation 2 environments, the rules are slightly different:\n* All non-dedicated environments in your project can be `development` or `staging`, but never `production`.\n* Dedicated Generation 2 environments can be set either to `staging` or `production`, but never `development`.\n* The default branch is not considered to be a special case.\n" + }, + { + "name": "Environment Backups", + "description": "A snapshot is a complete backup of an environment, including all the\npersistent data from all services running in an environment and all\nfiles present in mounted volumes.\n\nThese endpoints can be used to trigger the creation of new backups,\nget information about existing backups, delete existing backups or\nrestore a backup.\nMore information about backups can be found in our\n[documentation](https://docs.upsun.com/anchors/environments/backup/).\n" + }, + { + "name": "Environment Variables", + "description": "These endpoints manipulate user-defined variables which are bound to a\nspecific environment, as well as (optionally) the children of an\nenvironment. These variables can be made available at both build time\nand runtime. For more information on environment variables,\nsee the [Variables](https://docs.upsun.com/anchors/variables/set/environment/create/)\nsection of the documentation.\n" + }, + { + "name": "Autoscaling", + "description": "Upsun provides native support for autoscaling, allowing your applications to automatically adjust based on resource usage.\nThis ensures that your apps remain responsive under load while helping you optimize costs.\nYou can configure thresholds for metrics such as CPU, RAM, and request latency.\nResources will automatically scale to meet demand.\nEach container profile assigned to an application or service provides a specific combination of CPU and RAM, which you can select via the Upsun UI or CLI.\n\nThese endpoints manage autoscaling configurations that are tied to a\nspecific environment, and optionally to its child environments.\nYou can define scaling rules based on metrics like CPU, memory, or\nrequest latency, and these rules will be applied at both build time\nand runtime. For more information on configuring autoscaling for your\nenvironments, see the [Autoscaling](https://docs.upsun.com/manage-resources/autoscaling.html) section\nof the documentation.\n" + }, + { + "name": "Task", + "description": "These endpoints can be used to manage tasks, which are one-off commands that can be run in the context of\nan environment. Tasks are useful for running database migrations, executing maintenance scripts, or performing\nany ad-hoc operations that need to be executed within the environment. For more information on how to use tasks,\nsee the [Tasks](https://docs.upsun.com/anchors/environments/actions#environment-actions/) section of the\ndocumentation.\n" + }, + { + "name": "Project", + "description": "## Project Overview\n\nOn Upsun, a Project is backed by a single Git repository\nand encompasses your entire application stack, the services\nused by your application, the application's data storage,\nthe production and staging environments, and the backups of those\nenvironments.\n\nWhen you create a new project, you start with a single\n[Environment](#tag/Environment) called *Master*,\ncorresponding to the master branch in the Git repository of\nthe project—this will be your production environment.\n\nIf you connect your project to an external Git repo\nusing one of our [Third-Party Integrations](#tag/Third-Party-Integrations)\na new development environment can be created for each branch\nor pull request created in the repository. When a new development\nenvironment is created, the production environment's data\nwill be cloned on-the-fly, giving you an isolated, production-ready\ntest environment.\n\nThis set of API endpoints can be used to retrieve a list of projects\nassociated with an API key, as well as create and update the parameters\nof existing projects.\n\n> **Note**:\n>\n> To list projects or to create a new project, use [`/subscriptions`](#tag/Subscriptions).\n" + }, + { + "name": "Project Variables", + "description": "These endpoints manipulate user-defined variables which are bound to an\nentire project. These variables are accessible to all environments\nwithin a single project, and they can be made available at both build\ntime and runtime. For more information on project variables,\nsee the [Variables](https://docs.upsun.com/anchors/variables/set/project/create/)\nsection of the documentation.\n" + }, + { + "name": "Project Settings", + "description": "These endpoints can be used to retrieve and manipulate project-level\nsettings. Only the `initialize` property can be set by end users. It is used\nto initialize a project from an existing Git repository.\n\nThe other properties can only be set by a privileged user.\n" + }, + { + "name": "Repository", + "description": "The Git repository backing projects hosted on Upsun can be\naccessed in a **read-only** manner through the `/projects/{projectId}/git/*`\nfamily of endpoints. With these endpoints, you can retrieve objects from\nthe Git repository in the same way that you would in a local environment.\n" + }, + { + "name": "Domain Claim", + "description": "These endpoints can be used to add, modify, or remove domain claims from\na project. For more information on how domains function on\nUpsun, see the [Domains](https://docs.upsun.com/anchors/domains/custom/)\nsection of our documentation.\n" + }, + { + "name": "Domain Management", + "description": "These endpoints can be used to add, modify, or remove domains from\na project. For more information on how domains function on\nUpsun, see the [Domains](https://docs.upsun.com/anchors/domains/custom/)\nsection of our documentation.\n" + }, + { + "name": "Routing", + "description": "These endpoints modify an environment's `routes:` section of the `.upsun/config.yaml` file.\nFor routes to propagate to child environments, the child environments\nmust be synchronized with their parent.\n\nMore information about routing can be found in the [Routes](https://docs.upsun.com/anchors/routes/)\nsection of the documentation.\n" + }, + { + "name": "Source Operations", + "description": "These endpoints interact with source code operations as defined in the `source.operations`\nkey in a project's `.upsun/config.yaml` configuration. More information\non source code operations is\n[available in our user documentation](https://docs.upsun.com/anchors/app/source-operations/).\n" + }, + { + "name": "Deployment Target", + "description": "Upsun is capable of deploying the production environments of\nprojects in multiple topologies: both in clusters of containers, and\nas dedicated virtual machines. This is an internal API that can\nonly be used by privileged users.\n" + }, + { + "name": "Deployments", + "description": "The deployments endpoints gives detailed information about the actual\ndeployment of an active environment. Currently, it returns the _current_\ndeployment with information about the different apps, services, and\nroutes contained within.\n" + }, + { + "name": "Third-Party Integrations", + "description": "Upsun can easily integrate with many third-party services, including\nGit hosting services (GitHub, GitLab, and Bitbucket),\nhealth notification services (email, Slack, PagerDuty),\nperformance analytics platforms (New Relic, Blackfire, Tideways),\nand webhooks.\n\nFor clarification about what information each field requires, see the\n[External Integrations](https://docs.upsun.com/anchors/integrations/)\ndocumentation. NOTE: The names of the CLI arguments listed in the\ndocumentation are not always named exactly the same as the\nrequired body fields in the API request.\n" + }, + { + "name": "MFA", + "description": "Multi-Factor Authentication (MFA) requires the user to present two (or more) types of evidence (or factors) to prove their identity.\n\nFor example, the evidence might be a password and a device-generated code, which show the user has the knowledge factor (\"something you know\")\nas well as the possession factor (\"something you have\"). In this way MFA offers good protection against the compromise of any single factor,\nsuch as a stolen password.\n\nUsing the MFA API you can set up time-based one-time passcodes (TOTP), which can be generated on a single registered device (\"something you have\") such as a mobile phone.\n" + }, + { + "name": "Subscriptions", + "description": "Each project is represented by a subscription that holds the plan information.\nThese endpoints can be used to go to a larger plan, add more storage, or subscribe to\noptional features.\n" + }, + { + "name": "Orders", + "description": "These endpoints can be used to retrieve order information from our billing\nsystem. Here you can view information about your bill for our services,\ninclude the billed amount and a link to a PDF of the bill.\n" + }, + { + "name": "Invoices", + "description": "These endpoints can be used to retrieve invoices from our billing system.\nAn invoice of type \"invoice\" is generated automatically every month, if the customer has active projects.\nInvoices of type \"credit_memo\" are a result of manual action when there was a refund or an invoice correction.\n" + }, + { + "name": "Vouchers", + "description": "These endpoints can be used to retrieve vouchers associated with a particular\nuser as well as apply a voucher to a particular user.\n" + }, + { + "name": "Records", + "description": "These endpoints retrieve information about which plans were assigned to a particular\nproject at which time.\n" + }, + { + "name": "Support", + "description": "These endpoints can be used to retrieve information about support ticket priority\nand allow you to submit new ticket to the Upsun Support Team.\n" + }, + { + "name": "System Information", + "description": "These endpoints can be used to retrieve low-level information and interact with the\ncore component of Upsun infrastructure.\n\nThis is an internal API that can only be used by privileged users.\n" + }, + { + "name": "Billing Profile Projects", + "description": "These endpoints can be used to retrieve the projects associated with a particular billing profile, as well as\nto add or remove projects from a billing profile.\n" + } + ], + "paths": { + "/organizations/{organization_id}/metrics/carbon": { + "get": { + "summary": "Query project carbon emissions metrics for an entire organization", + "description": "Queries the carbon emission data for all projects owned by the specified organiation.", + "operationId": "query-organiation-carbon", + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/TimeRangeFrom" + }, + { + "$ref": "#/components/parameters/TimeRangeTo" + }, + { + "$ref": "#/components/parameters/TimeRangeInterval" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationCarbon" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + } + } + }, + "/organizations/{organization_id}/addons": { + "get": { + "summary": "Get add-ons", + "description": "Retrieves information about the add-ons for an organization.", + "operationId": "get-org-addons", + "deprecated": true, + "tags": [ + "Add-ons" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationAddonsObject" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-vendor": "upsun" + } + }, + "/alerts/subscriptions/{subscriptionId}/usage": { + "get": { + "tags": [ + "Alerts" + ], + "summary": "Get usage alerts for a subscription", + "operationId": "get-usage-alerts", + "parameters": [ + { + "$ref": "#/components/parameters/subscription_id" + } + ], + "responses": { + "200": { + "description": "The list of current and available alerts for the subscription.", + "content": { + "application/json": { + "schema": { + "properties": { + "available": { + "description": "The list of available usage alerts.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Alert" + } + }, + "current": { + "description": "The list of the current usage alerts.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Alert" + } + } + }, + "type": "object" + } + } + } + } + } + }, + "patch": { + "tags": [ + "Alerts" + ], + "summary": "Update usage alerts.", + "operationId": "update-usage-alerts", + "parameters": [ + { + "$ref": "#/components/parameters/subscription_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "alerts": { + "description": "The list of usage alerts to create or update.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Alert" + } + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "The list of current and available alerts for the subscription.", + "content": { + "application/json": { + "schema": { + "properties": { + "available": { + "description": "The list of available usage alerts.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Alert" + } + }, + "current": { + "description": "The list of the current usage alerts.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Alert" + } + } + }, + "type": "object" + } + } + } + } + } + } + }, + "/users/{user_id}/api-tokens": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], + "get": { + "summary": "List a user's API tokens", + "description": "Retrieves a list of API tokens associated with a single user.", + "operationId": "list-api-tokens", + "tags": [ + "API Tokens" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIToken" + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "post": { + "summary": "Create an API token", + "description": "Creates an API token", + "operationId": "create-api-token", + "tags": [ + "API Tokens" + ], + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIToken" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The token name." + } + }, + "required": [ + "name" + ] + } + } + } + } + } + }, + "/users/{user_id}/api-tokens/{token_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + }, + { + "schema": { + "type": "string", + "format": "uuid" + }, + "name": "token_id", + "in": "path", + "required": true, + "description": "The ID of the token." + } + ], + "get": { + "summary": "Get an API token", + "description": "Retrieves the specified API token.", + "operationId": "get-api-token", + "tags": [ + "API Tokens" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIToken" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + } + }, + "delete": { + "summary": "Delete an API token", + "description": "Deletes an API token", + "operationId": "delete-api-token", + "tags": [ + "API Tokens" + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + } + } + }, + "/projects/{projectId}/environments/{environmentId}/autoscaling/settings": { + "get": { + "tags": [ + "Autoscaling" + ], + "description": "Retrieves Autoscaler settings", + "operationId": "get-autoscaler-settings", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "A string that uniquely identifies the project", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "environmentId", + "in": "path", + "description": "A string that uniquely identifies the project environment", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "Autoscaler settings", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutoscalerSettings" + } + } + } + } + }, + "summary": "Retrieves Autoscaler settings" + }, + "post": { + "tags": [ + "Autoscaling" + ], + "description": "Updates Autoscaler settings", + "operationId": "post-autoscaler-settings", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "A string that uniquely identifies the project", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "environmentId", + "in": "path", + "description": "A string that uniquely identifies the project environment", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Settings to update", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutoscalerSettings" + } + } + } + }, + "responses": { + "200": { + "description": "Updated Autoscaler settings", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutoscalerSettings" + } + } + } + } + }, + "summary": "Updates Autoscaler settings" + }, + "patch": { + "tags": [ + "Autoscaling" + ], + "description": "Modifies Autoscaler settings", + "operationId": "patch-autoscaler-settings", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "A string that uniquely identifies the project", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "environmentId", + "in": "path", + "description": "A string that uniquely identifies the project environment", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Settings to modify", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutoscalerSettings" + } + } + } + }, + "responses": { + "200": { + "description": "Updated Autoscaler settings", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutoscalerSettings" + } + } + } + } + }, + "summary": "Modifies Autoscaler settings" + } + }, + "/projects/{projectId}/environments/{environmentId}/observability/server/caches": { + "get": { + "tags": [ + "Blackfire Monitoring" + ], + "summary": "Get server cache metrics", + "description": "Returns time-series PHP cache usage ratios (0.0-1.0) for OPcache memory, OPcache interned strings buffer (ISB), APCu memory, realpath cache, and PCRE cache. Includes hit rate ratios (0.0-1.0) for APCu and OPcache. Each data point contains `timestamp` and optional data fields. Fields are omitted for timestamps with no data - this indicates no data was received. Filtered by agent ID and execution contexts (web, cli, etc.).", + "operationId": "blackfire_php_server_caches", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The unique identifier of the Upsun project", + "required": true, + "schema": { + "type": "string", + "pattern": "[a-z0-9]+", + "example": "abc123def456" + } + }, + { + "name": "environmentId", + "in": "path", + "description": "The environment identifier", + "required": true, + "schema": { + "type": "string", + "pattern": ".+", + "example": "main" + } + }, + { + "name": "from", + "in": "query", + "description": "Start timestamp for the time range (Unix timestamp in seconds)", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "example": 1704067200 + } + }, + { + "name": "to", + "in": "query", + "description": "End timestamp for the time range (Unix timestamp in seconds)", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "example": 1704153600 + } + }, + { + "name": "grain", + "in": "query", + "description": "Granularity of data points in seconds. Auto-calculated if omitted.", + "required": false, + "schema": { + "type": "integer", + "example": 10 + } + }, + { + "name": "contexts[]", + "in": "query", + "description": "Filter by execution contexts. Defaults to [\"web\"] with additive mode when neither contexts nor contexts_mode is specified.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "web", + "enum": [ + "web", + "cli" + ] + } + } + }, + { + "name": "contexts_mode", + "in": "query", + "description": "Filter mode for contexts parameter. \"1\" (additive, default) includes only specified contexts. \"-1\" (subtractive) excludes specified contexts and includes all others. When neither contexts nor contexts_mode is specified, defaults to \"1\" (additive) with contexts=[\"web\"].", + "required": false, + "schema": { + "type": "string", + "example": "1", + "default": null, + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "applications[]", + "in": "query", + "description": "Filter by application names", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "app-frontend" + } + } + }, + { + "name": "applications_mode", + "in": "query", + "description": "Filter mode for applications parameter. \"1\" (additive) includes only specified applications. \"-1\" (subtractive) excludes specified applications and includes all others. When omitted: defaults to \"-1\" if no applications values are provided; defaults to \"1\" (additive) if at least one applications value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "instances[]", + "in": "query", + "description": "Filter by instance names", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "app-frontend.0" + } + } + }, + { + "name": "instances_mode", + "in": "query", + "description": "Filter mode for instances parameter. \"1\" (additive) includes only specified instances. \"-1\" (subtractive) excludes specified instances and includes all others. When omitted: defaults to \"-1\" if no instances values are provided; defaults to \"1\" (additive) if at least one instances value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "distribution_cost", + "in": "query", + "description": "Cost distribution dimension for server load distribution.", + "required": false, + "schema": { + "type": "string", + "default": null, + "enum": [ + "wt", + "pmu" + ] + } + } + ], + "responses": { + "200": { + "description": "PHP server cache metrics retrieved successfully", + "content": { + "application/json": { + "schema": { + "required": [ + "_grain", + "_from", + "_to", + "_agent", + "_distribution_cost", + "_project_id", + "_environment_id", + "_branch_machine_name", + "data" + ], + "properties": { + "_grain": { + "description": "Data granularity in seconds", + "type": "integer", + "example": 5 + }, + "_from": { + "description": "Query start timestamp", + "type": "integer", + "example": 1704067200 + }, + "_to": { + "description": "Query end timestamp", + "type": "integer", + "example": 1704153600 + }, + "_agent": { + "description": "Blackfire Agent UUID", + "type": "string", + "format": "uuid", + "example": "a38f69ca-3b56-4ea6-beac-272b2568164a" + }, + "_project_id": { + "description": "Project identifier", + "type": "string", + "example": "abc123def456" + }, + "_environment_id": { + "description": "Environment identifier", + "type": "string", + "example": "main" + }, + "_branch_machine_name": { + "description": "Branch machine name", + "type": "string", + "example": "main-bvxea6i" + }, + "_contexts": { + "description": "Applied context filter values", + "type": "array", + "items": { + "type": "string", + "example": "web" + }, + "nullable": true + }, + "_contexts_mode": { + "description": "Context filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_applications": { + "description": "Applied application filter values", + "type": "array", + "items": { + "type": "string", + "example": "app-frontend" + }, + "nullable": true + }, + "_applications_mode": { + "description": "Application filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_instances": { + "description": "Applied instance filter values", + "type": "array", + "items": { + "type": "string", + "example": "app-frontend.0" + }, + "nullable": true + }, + "_instances_mode": { + "description": "Instance filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_distribution_cost": { + "description": "Applied distribution cost dimension (wt=wall time, pmu=peak memory usage)", + "type": "string", + "enum": [ + "wt", + "pmu" + ] + }, + "data": { + "description": "Time-series cache usage metrics. Each data point contains `timestamp` and optional data fields. Fields are omitted for timestamps with no data - this indicates no data was received.", + "type": "array", + "items": { + "required": [ + "timestamp" + ], + "properties": { + "timestamp": { + "description": "Data point timestamp (Unix timestamp in seconds)", + "type": "integer", + "example": 1764083014 + }, + "opcache_usage": { + "description": "OPcache memory usage ratio (0.0-1.0, where 1.0 = 100% full)", + "type": "number", + "format": "float", + "example": 0.308, + "nullable": true + }, + "opcache_isb_usage": { + "description": "OPcache interned strings buffer usage ratio (0.0-1.0)", + "type": "number", + "format": "float", + "example": 0.629, + "nullable": true + }, + "apcu_usage": { + "description": "APCu memory usage ratio (0.0-1.0)", + "type": "number", + "format": "float", + "example": 0.008, + "nullable": true + }, + "realpath_usage": { + "description": "Realpath cache usage ratio (0.0-1.0)", + "type": "number", + "format": "float", + "example": 0.109, + "nullable": true + }, + "pcre_usage": { + "description": "PCRE (Perl Compatible Regular Expressions) cache usage ratio (0.0-1.0)", + "type": "number", + "format": "float", + "example": 0.304, + "nullable": true + }, + "apcu_hitrate": { + "description": "APCu cache hit rate ratio (0.0-1.0, where 1.0 = 100% hits)", + "type": "number", + "format": "float", + "example": 0.999, + "nullable": true + }, + "opcache_hitrate": { + "description": "OPcache hit rate ratio (0.0-1.0, where 1.0 = 100% hits)", + "type": "number", + "format": "float", + "example": 0.9998, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + } + } + }, + "type": "object", + "additionalProperties": false + }, + "example": { + "_grain": 2, + "_from": 1764083002, + "_to": 1764083092, + "_agent": "4b5266a2-fd71-468b-bf05-87b342079cbf", + "_project_id": "abc123def456", + "_environment_id": "main", + "_branch_machine_name": "main-bvxea6i", + "_contexts": [ + "web" + ], + "_contexts_mode": "additive", + "_distribution_cost": "wt", + "data": [ + { + "timestamp": 1764083002 + }, + { + "timestamp": 1764083014, + "opcache_usage": 0.308, + "opcache_isb_usage": 0.629, + "apcu_usage": 0.008, + "realpath_usage": 0.109, + "pcre_usage": 0.304, + "apcu_hitrate": 0.999, + "opcache_hitrate": 0.9998 + }, + { + "timestamp": 1764083024, + "opcache_usage": 0.308, + "opcache_isb_usage": 0.629, + "apcu_usage": 0.008, + "realpath_usage": 0.105, + "pcre_usage": 0.313, + "apcu_hitrate": 0.999, + "opcache_hitrate": 0.9998 + } + ] + } + } + } + }, + "400": { + "description": "Bad request - Invalid parameters. Please consult the API documentation to fix the request parameters.", + "content": { + "application/json": { + "schema": { + "required": [ + "type", + "title", + "status", + "violations" + ], + "properties": { + "type": { + "description": "RFC 2616 reference URL identifying the error type", + "type": "string", + "format": "uri", + "example": "https://tools.ietf.org/html/rfc2616#section-1" + }, + "title": { + "description": "Human-readable summary of the validation error", + "type": "string", + "example": "Please ensure parameters are correct." + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "violations": { + "description": "Map of parameter names to their validation errors. Each parameter can have multiple error messages.", + "type": "object", + "example": { + "grain": [ + "Grain can not be larger than the selection windows." + ], + "from": [ + "The from timestamp must be in the past." + ], + "to": [ + "The to timestamp must be greater than the from timestamp." + ] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "The from timestamp must be in the past." + } + } + } + }, + "type": "object", + "additionalProperties": false + } + } + } + }, + "403": { + "description": "Forbidden - Access denied due to insufficient permissions, or the requested project/environment does not exist (to prevent information disclosure)" + }, + "499": { + "description": "Too much data fetched - The query is attempting to retrieve too much data. Please narrow down the query by reducing the time range or adding more specific filters to retrieve less data.", + "content": { + "application/json": { + "schema": { + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "example": "Too much data fetched" + }, + "message": { + "type": "string", + "example": "Please reduce the time range or add more filters to narrow down the query" + } + }, + "type": "object", + "additionalProperties": false + } + } + } + } + } + } + }, + "/projects/{projectId}/environments/{environmentId}/observability/server": { + "get": { + "tags": [ + "Blackfire Monitoring" + ], + "summary": "Get server monitoring overview", + "description": "Returns time-series server monitoring data for the specified metrics (wall time, memory usage, peak memory usage, CPU load, stdout, requests per minute). Includes alert evaluations and APM quota usage. Data points contain metric values aggregated at the requested granularity.", + "operationId": "blackfire_server_global", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The unique identifier of the Upsun project", + "required": true, + "schema": { + "type": "string", + "pattern": "[a-z0-9]+", + "example": "abc123def456" + } + }, + { + "name": "environmentId", + "in": "path", + "description": "The environment identifier", + "required": true, + "schema": { + "type": "string", + "pattern": ".+", + "example": "main" + } + }, + { + "name": "from", + "in": "query", + "description": "Start timestamp for the time range (Unix timestamp in seconds)", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "example": 1704067200 + } + }, + { + "name": "to", + "in": "query", + "description": "End timestamp for the time range (Unix timestamp in seconds)", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "example": 1704153600 + } + }, + { + "name": "keys[]", + "in": "query", + "description": "Metrics to retrieve (wall time, memory usage, peak memory, CPU load, stdout, requests per minute)", + "required": true, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "wt", + "mu", + "pmu", + "load", + "stdout", + "rpms" + ] + } + } + }, + { + "name": "grain", + "in": "query", + "description": "Granularity of data points in seconds. Auto-calculated if omitted.", + "required": false, + "schema": { + "type": "integer", + "example": 10 + } + }, + { + "name": "contexts[]", + "in": "query", + "description": "Filter by execution contexts. Defaults to [\"web\"] with additive mode when neither contexts nor contexts_mode is specified.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "web", + "enum": [ + "web", + "cli" + ] + } + } + }, + { + "name": "contexts_mode", + "in": "query", + "description": "Filter mode for contexts parameter. \"1\" (additive, default) includes only specified contexts. \"-1\" (subtractive) excludes specified contexts and includes all others. When neither contexts nor contexts_mode is specified, defaults to \"1\" (additive) with contexts=[\"web\"].", + "required": false, + "schema": { + "type": "string", + "example": "1", + "default": null, + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "applications[]", + "in": "query", + "description": "Filter by application names", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "app-frontend" + } + } + }, + { + "name": "applications_mode", + "in": "query", + "description": "Filter mode for applications parameter. \"1\" (additive) includes only specified applications. \"-1\" (subtractive) excludes specified applications and includes all others. When omitted: defaults to \"-1\" if no applications values are provided; defaults to \"1\" (additive) if at least one applications value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "instances[]", + "in": "query", + "description": "Filter by instance names", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "app-frontend.0" + } + } + }, + { + "name": "instances_mode", + "in": "query", + "description": "Filter mode for instances parameter. \"1\" (additive) includes only specified instances. \"-1\" (subtractive) excludes specified instances and includes all others. When omitted: defaults to \"-1\" if no instances values are provided; defaults to \"1\" (additive) if at least one instances value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "distribution_cost", + "in": "query", + "description": "Cost distribution dimension for server load distribution.", + "required": false, + "schema": { + "type": "string", + "default": null, + "enum": [ + "wt", + "pmu" + ] + } + } + ], + "responses": { + "200": { + "description": "Server global metrics retrieved successfully", + "content": { + "application/json": { + "schema": { + "required": [ + "_quota", + "_grain", + "_from", + "_to", + "_keys", + "_agent", + "_contexts", + "_contexts_mode", + "_project_id", + "_environment_id", + "_branch_machine_name", + "alert_evaluations", + "server" + ], + "properties": { + "_quota": { + "description": "APM quota usage information", + "required": [ + "allowed", + "used", + "exceeded", + "period_started_at", + "period_ends_at" + ], + "properties": { + "allowed": { + "description": "APM quota limit", + "type": "integer", + "example": 2147000000 + }, + "used": { + "description": "Traces used in current period", + "type": "integer", + "example": 103139 + }, + "exceeded": { + "description": "Whether quota is exceeded", + "type": "boolean", + "example": false + }, + "period_started_at": { + "description": "Billing period start", + "type": "string", + "format": "date-time", + "example": "2026-02-01T00:00:00+00:00", + "nullable": true + }, + "period_ends_at": { + "description": "Billing period end", + "type": "string", + "format": "date-time", + "example": "2026-03-01T00:00:00+00:00", + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "_grain": { + "description": "Data granularity in seconds", + "type": "integer", + "example": 5 + }, + "_from": { + "description": "Query start timestamp", + "type": "integer", + "example": 1704067200 + }, + "_to": { + "description": "Query end timestamp", + "type": "integer", + "example": 1704153600 + }, + "_keys": { + "description": "Requested metric keys", + "type": "array", + "items": { + "type": "string", + "example": "wt" + }, + "example": [ + "wt", + "rpms" + ] + }, + "_agent": { + "description": "Blackfire Agent UUID", + "type": "string", + "format": "uuid", + "example": "a38f69ca-3b56-4ea6-beac-272b2568164a" + }, + "_contexts": { + "description": "Applied context filter values", + "type": "array", + "items": { + "type": "string", + "example": "web" + }, + "nullable": true + }, + "_contexts_mode": { + "description": "Context filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_applications": { + "description": "Applied application filter values", + "type": "array", + "items": { + "type": "string", + "example": "app-frontend" + }, + "nullable": true + }, + "_applications_mode": { + "description": "Application filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_instances": { + "description": "Applied instance filter values", + "type": "array", + "items": { + "type": "string", + "example": "app-frontend.0" + }, + "nullable": true + }, + "_instances_mode": { + "description": "Instance filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_distribution_cost": { + "description": "Applied distribution cost dimension (wt=wall time, pmu=peak memory usage)", + "type": "string", + "enum": [ + "wt", + "pmu" + ] + }, + "_project_id": { + "description": "Project identifier", + "type": "string", + "example": "abc123def456" + }, + "_environment_id": { + "description": "Environment identifier", + "type": "string", + "example": "main" + }, + "_branch_machine_name": { + "description": "Branch machine name", + "type": "string", + "example": "main-bvxea6i" + }, + "alert_evaluations": { + "description": "Alert rule evaluations for the time range", + "type": "array", + "items": { + "required": [ + "timestamp", + "alert_rule_uuid", + "value", + "state" + ], + "properties": { + "timestamp": { + "description": "Evaluation timestamp", + "type": "integer", + "example": 1771435030 + }, + "alert_rule_uuid": { + "description": "Alert rule UUID", + "type": "string", + "format": "uuid", + "example": "b534721b-9751-49bf-ad86-e3bf50d6ec39" + }, + "value": { + "description": "Evaluated metric value", + "type": "number", + "format": "float", + "example": 92395.49 + }, + "state": { + "description": "Alert state", + "type": "string", + "enum": [ + "normal", + "warn", + "alarm" + ] + } + }, + "type": "object", + "additionalProperties": false + } + }, + "server": { + "description": "Server metrics data", + "required": [ + "total", + "data" + ], + "properties": { + "total": { + "description": "Total trace count (float because APM may be sampled)", + "type": "number", + "format": "float", + "example": 136328 + }, + "data": { + "description": "Time-series metric data points. Properties vary based on requested keys.", + "type": "array", + "items": { + "required": [ + "timestamp" + ], + "properties": { + "timestamp": { + "description": "Data point timestamp (Unix timestamp in seconds)", + "type": "integer", + "example": 1771435020 + }, + "wt": { + "description": "Wall time in microseconds", + "type": "number", + "format": "float", + "example": 89698.03, + "nullable": true + }, + "mu": { + "description": "Memory usage in bytes", + "type": "number", + "format": "float", + "example": 4521234, + "nullable": true + }, + "pmu": { + "description": "Peak memory usage in bytes", + "type": "number", + "format": "float", + "example": 6789012, + "nullable": true + }, + "load": { + "description": "CPU load", + "type": "number", + "format": "float", + "example": 0.45, + "nullable": true + }, + "stdout": { + "description": "Standard output size", + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "rpms": { + "description": "Requests per minute", + "type": "number", + "format": "float", + "example": 672, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + } + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + }, + "example": { + "_quota": { + "allowed": 2147000000, + "used": 103139, + "exceeded": false, + "period_started_at": "2026-02-01T00:00:00+00:00", + "period_ends_at": "2026-03-01T00:00:00+00:00" + }, + "_grain": 10, + "_from": 1771435023, + "_to": 1771440423, + "_keys": [ + "wt", + "rpms" + ], + "_agent": "a38f69ca-3b56-4ea6-beac-272b2568164a", + "_contexts": [ + "web" + ], + "_contexts_mode": "additive", + "_project_id": "abc123def456", + "_environment_id": "main", + "_branch_machine_name": "main-bvxea6i", + "alert_evaluations": [ + { + "timestamp": 1771435030, + "alert_rule_uuid": "b534721b-9751-49bf-ad86-e3bf50d6ec39", + "value": 92395.49, + "state": "normal" + } + ], + "server": { + "total": 136328, + "data": [ + { + "timestamp": 1771435020, + "rpms": 672, + "wt": 89698.03 + }, + { + "timestamp": 1771435030, + "rpms": 1338, + "wt": 82021.59 + } + ] + } + } + } + } + }, + "400": { + "description": "Bad request - Invalid parameters. Please consult the API documentation to fix the request parameters.", + "content": { + "application/json": { + "schema": { + "required": [ + "type", + "title", + "status", + "violations" + ], + "properties": { + "type": { + "description": "RFC 2616 reference URL identifying the error type", + "type": "string", + "format": "uri", + "example": "https://tools.ietf.org/html/rfc2616#section-1" + }, + "title": { + "description": "Human-readable summary of the validation error", + "type": "string", + "example": "Please ensure parameters are correct." + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "violations": { + "description": "Map of parameter names to their validation errors. Each parameter can have multiple error messages.", + "type": "object", + "example": { + "grain": [ + "Grain can not be larger than the selection windows." + ], + "from": [ + "The from timestamp must be in the past." + ], + "to": [ + "The to timestamp must be greater than the from timestamp." + ] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "The from timestamp must be in the past." + } + } + } + }, + "type": "object", + "additionalProperties": false + } + } + } + }, + "403": { + "description": "Forbidden - Access denied due to insufficient permissions, or the requested project/environment does not exist (to prevent information disclosure)" + }, + "499": { + "description": "Too much data fetched - The query is attempting to retrieve too much data. Please narrow down the query by reducing the time range or adding more specific filters to retrieve less data.", + "content": { + "application/json": { + "schema": { + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "example": "Too much data fetched" + }, + "message": { + "type": "string", + "example": "Please reduce the time range or add more filters to narrow down the query" + } + }, + "type": "object", + "additionalProperties": false + } + } + } + } + } + } + }, + "/projects/{projectId}/environments/{environmentId}/observability/server/transactions-break-down": { + "get": { + "tags": [ + "Blackfire Monitoring" + ], + "summary": "Get server transaction breakdown", + "description": "Returns transaction breakdown with impact scores, showing how each transaction contributes to overall resource consumption. Includes time-series data for top-hit transactions and aggregated metrics per transaction. Use breakdown_dimension to analyze by wall time (wt), memory (pmu), or stdout. Supports extensive filtering by context, transaction, host, framework, runtime, HTTP method, status code, and more.", + "operationId": "blackfire_server_transactions_breakdown", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The unique identifier of the Upsun project", + "required": true, + "schema": { + "type": "string", + "pattern": "[a-z0-9]+", + "example": "abc123def456" + } + }, + { + "name": "environmentId", + "in": "path", + "description": "The environment identifier", + "required": true, + "schema": { + "type": "string", + "pattern": ".+", + "example": "main" + } + }, + { + "name": "from", + "in": "query", + "description": "Start timestamp for the time range (Unix timestamp in seconds)", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "example": 1704067200 + } + }, + { + "name": "to", + "in": "query", + "description": "End timestamp for the time range (Unix timestamp in seconds)", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "example": 1704153600 + } + }, + { + "name": "grain", + "in": "query", + "description": "Granularity of data points in seconds. Auto-calculated if omitted.", + "required": false, + "schema": { + "type": "integer", + "example": 10 + } + }, + { + "name": "breakdown_dimension", + "in": "query", + "description": "Dimension for transaction breakdown calculations.", + "required": false, + "schema": { + "type": "string", + "default": null, + "enum": [ + "wt", + "pmu", + "stdout" + ] + } + }, + { + "name": "sort", + "in": "query", + "description": "Sort order for the transaction breakdown.", + "required": false, + "schema": { + "type": "string", + "default": null, + "enum": [ + "impact", + "total_requests", + "avg_wt", + "avg_pmu", + "avg_stdout", + "total_errors", + "wt_96th_percentile" + ] + } + }, + { + "name": "breakdown_limit", + "in": "query", + "description": "Maximum number of transactions to return in the breakdown.", + "required": false, + "schema": { + "type": "integer", + "default": null, + "maximum": 300, + "minimum": 1 + } + }, + { + "name": "contexts[]", + "in": "query", + "description": "Filter by execution contexts. Defaults to [\"web\"] with additive mode when neither contexts nor contexts_mode is specified.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "web", + "enum": [ + "web", + "cli" + ] + } + } + }, + { + "name": "contexts_mode", + "in": "query", + "description": "Filter mode for contexts parameter. \"1\" (additive, default) includes only specified contexts. \"-1\" (subtractive) excludes specified contexts and includes all others. When neither contexts nor contexts_mode is specified, defaults to \"1\" (additive) with contexts=[\"web\"].", + "required": false, + "schema": { + "type": "string", + "example": "1", + "default": null, + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "applications[]", + "in": "query", + "description": "Filter by application names", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "app-frontend" + } + } + }, + { + "name": "applications_mode", + "in": "query", + "description": "Filter mode for applications parameter. \"1\" (additive) includes only specified applications. \"-1\" (subtractive) excludes specified applications and includes all others. When omitted: defaults to \"-1\" if no applications values are provided; defaults to \"1\" (additive) if at least one applications value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "instances[]", + "in": "query", + "description": "Filter by instance names", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "app-frontend.0" + } + } + }, + { + "name": "instances_mode", + "in": "query", + "description": "Filter mode for instances parameter. \"1\" (additive) includes only specified instances. \"-1\" (subtractive) excludes specified instances and includes all others. When omitted: defaults to \"-1\" if no instances values are provided; defaults to \"1\" (additive) if at least one instances value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "transactions[]", + "in": "query", + "description": "Filter by transaction names", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "App\\Controller::index" + } + } + }, + { + "name": "transactions_mode", + "in": "query", + "description": "Filter mode for transactions parameter. \"1\" (additive) includes only specified transactions. \"-1\" (subtractive) excludes specified transactions and includes all others. When omitted: defaults to \"-1\" if no transactions values are provided; defaults to \"1\" (additive) if at least one transactions value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "wt_slots[]", + "in": "query", + "description": "Filter by wall-time distribution slots", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "0-50" + } + } + }, + { + "name": "wt_slots_mode", + "in": "query", + "description": "Filter mode for wt_slots parameter. \"1\" (additive) includes only specified wt_slots. \"-1\" (subtractive) excludes specified wt_slots and includes all others. When omitted: defaults to \"-1\" if no wt_slots values are provided; defaults to \"1\" (additive) if at least one wt_slots value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "pmu_slots[]", + "in": "query", + "description": "Filter by peak memory usage distribution slots", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "0-8" + } + } + }, + { + "name": "pmu_slots_mode", + "in": "query", + "description": "Filter mode for pmu_slots parameter. \"1\" (additive) includes only specified pmu_slots. \"-1\" (subtractive) excludes specified pmu_slots and includes all others. When omitted: defaults to \"-1\" if no pmu_slots values are provided; defaults to \"1\" (additive) if at least one pmu_slots value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "http_status_codes[]", + "in": "query", + "description": "Filter by HTTP status codes or ranges (e.g., 200, 5xx)", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "200" + } + } + }, + { + "name": "http_status_codes_mode", + "in": "query", + "description": "Filter mode for http_status_codes parameter. \"1\" (additive) includes only specified http_status_codes. \"-1\" (subtractive) excludes specified http_status_codes and includes all others. When omitted: defaults to \"-1\" if no http_status_codes values are provided; defaults to \"1\" (additive) if at least one http_status_codes value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "http_hosts[]", + "in": "query", + "description": "Filter by HTTP hosts", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "api.example.com" + } + } + }, + { + "name": "http_hosts_mode", + "in": "query", + "description": "Filter mode for http_hosts parameter. \"1\" (additive) includes only specified http_hosts. \"-1\" (subtractive) excludes specified http_hosts and includes all others. When omitted: defaults to \"-1\" if no http_hosts values are provided; defaults to \"1\" (additive) if at least one http_hosts value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "hosts[]", + "in": "query", + "description": "Filter by server hosts", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "frontend-0.prod" + } + } + }, + { + "name": "hosts_mode", + "in": "query", + "description": "Filter mode for hosts parameter. \"1\" (additive) includes only specified hosts. \"-1\" (subtractive) excludes specified hosts and includes all others. When omitted: defaults to \"-1\" if no hosts values are provided; defaults to \"1\" (additive) if at least one hosts value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "frameworks[]", + "in": "query", + "description": "Filter by frameworks. Can be specified multiple times for multiple values (e.g., ?frameworks[]=symfony&frameworks[]=laravel). Use frameworks_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "symfony" + } + } + }, + { + "name": "frameworks_mode", + "in": "query", + "description": "Filter mode for frameworks parameter. \"1\" (additive) includes only specified frameworks. \"-1\" (subtractive) excludes specified frameworks and includes all others. When omitted: defaults to \"-1\" if no frameworks values are provided; defaults to \"1\" (additive) if at least one frameworks value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "languages[]", + "in": "query", + "description": "Filter by programming languages. Can be specified multiple times for multiple values (e.g., ?languages[]=php&languages[]=python). Use languages_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "php" + } + } + }, + { + "name": "languages_mode", + "in": "query", + "description": "Filter mode for languages parameter. \"1\" (additive) includes only specified languages. \"-1\" (subtractive) excludes specified languages and includes all others. When omitted: defaults to \"-1\" if no languages values are provided; defaults to \"1\" (additive) if at least one languages value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "methods[]", + "in": "query", + "description": "Filter by HTTP methods. Can be specified multiple times for multiple values (e.g., ?methods[]=get&methods[]=post). Use methods_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "get" + } + } + }, + { + "name": "methods_mode", + "in": "query", + "description": "Filter mode for methods parameter. \"1\" (additive) includes only specified methods. \"-1\" (subtractive) excludes specified methods and includes all others. When omitted: defaults to \"-1\" if no methods values are provided; defaults to \"1\" (additive) if at least one methods value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "runtimes[]", + "in": "query", + "description": "Filter by runtimes. Can be specified multiple times for multiple values (e.g., ?runtimes[]=PHP 8.4.17 (fpm-fcgi)). Use runtimes_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "PHP 8.4.17 (fpm-fcgi)" + } + } + }, + { + "name": "runtimes_mode", + "in": "query", + "description": "Filter mode for runtimes parameter. \"1\" (additive) includes only specified runtimes. \"-1\" (subtractive) excludes specified runtimes and includes all others. When omitted: defaults to \"-1\" if no runtimes values are provided; defaults to \"1\" (additive) if at least one runtimes value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "oss[]", + "in": "query", + "description": "Filter by operating systems. Can be specified multiple times for multiple values (e.g., ?oss[]=Linux&oss[]=Darwin). Use oss_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "Linux" + } + } + }, + { + "name": "oss_mode", + "in": "query", + "description": "Filter mode for oss parameter. \"1\" (additive) includes only specified operating systems. \"-1\" (subtractive) excludes specified operating systems and includes all others. When omitted: defaults to \"-1\" if no oss values are provided; defaults to \"1\" (additive) if at least one oss value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "distribution_cost", + "in": "query", + "description": "Cost distribution dimension for server load distribution.", + "required": false, + "schema": { + "type": "string", + "default": null, + "enum": [ + "wt", + "pmu" + ] + } + } + ], + "responses": { + "200": { + "description": "Transaction breakdown retrieved successfully", + "content": { + "application/json": { + "schema": { + "required": [ + "_grain", + "_from", + "_to", + "_agent", + "_project_id", + "_environment_id", + "_branch_machine_name", + "_breakdown_dimension", + "_sort", + "_breakdown_limit", + "_breakdown_top_hits", + "transactions", + "top_hits_timeline" + ], + "properties": { + "_grain": { + "description": "Data granularity in seconds", + "type": "integer", + "example": 5 + }, + "_from": { + "description": "Query start timestamp", + "type": "integer", + "example": 1704067200 + }, + "_to": { + "description": "Query end timestamp", + "type": "integer", + "example": 1704153600 + }, + "_agent": { + "description": "Blackfire Agent UUID", + "type": "string", + "format": "uuid", + "example": "a38f69ca-3b56-4ea6-beac-272b2568164a" + }, + "_project_id": { + "description": "Project identifier", + "type": "string", + "example": "abc123def456" + }, + "_environment_id": { + "description": "Environment identifier", + "type": "string", + "example": "main" + }, + "_branch_machine_name": { + "description": "Branch machine name", + "type": "string", + "example": "main-bvxea6i" + }, + "_contexts": { + "description": "Applied context filter values", + "type": "array", + "items": { + "type": "string", + "example": "web" + }, + "nullable": true + }, + "_contexts_mode": { + "description": "Context filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_applications": { + "description": "Applied application filter values", + "type": "array", + "items": { + "type": "string", + "example": "app-frontend" + }, + "nullable": true + }, + "_applications_mode": { + "description": "Application filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_instances": { + "description": "Applied instance filter values", + "type": "array", + "items": { + "type": "string", + "example": "app-frontend.0" + }, + "nullable": true + }, + "_instances_mode": { + "description": "Instance filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_transactions": { + "description": "Applied transaction filter values", + "type": "array", + "items": { + "type": "string", + "example": "App\\Controller\\ProductController::list" + }, + "nullable": true + }, + "_transactions_mode": { + "description": "Transaction filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_wt_slot": { + "description": "Applied wall-time slot filter values", + "type": "array", + "items": { + "type": "string", + "example": "0-50" + }, + "nullable": true + }, + "_wt_slot_mode": { + "description": "Wall-time slot filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_pmu_slot": { + "description": "Applied peak memory slot filter values", + "type": "array", + "items": { + "type": "string", + "example": "0-1MB" + }, + "nullable": true + }, + "_pmu_slot_mode": { + "description": "Peak memory slot filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_http_status_codes": { + "description": "Applied HTTP status code filter values", + "type": "array", + "items": { + "type": "string", + "example": "200" + }, + "nullable": true + }, + "_http_status_codes_mode": { + "description": "HTTP status code filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_http_hosts": { + "description": "Applied HTTP host filter values", + "type": "array", + "items": { + "type": "string", + "example": "api.example.com" + }, + "nullable": true + }, + "_http_hosts_mode": { + "description": "HTTP host filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_hosts": { + "description": "Applied host filter values", + "type": "array", + "items": { + "type": "string", + "example": "app.0" + }, + "nullable": true + }, + "_hosts_mode": { + "description": "Host filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_frameworks": { + "description": "Applied framework filter values", + "type": "array", + "items": { + "type": "string", + "example": "symfony" + }, + "nullable": true + }, + "_frameworks_mode": { + "description": "Framework filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_languages": { + "description": "Applied language filter values", + "type": "array", + "items": { + "type": "string", + "example": "php" + }, + "nullable": true + }, + "_languages_mode": { + "description": "Language filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_methods": { + "description": "Applied method filter values", + "type": "array", + "items": { + "type": "string", + "example": "get" + }, + "nullable": true + }, + "_methods_mode": { + "description": "Method filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_runtimes": { + "description": "Applied runtime filter values", + "type": "array", + "items": { + "type": "string", + "example": "8.2.15" + }, + "nullable": true + }, + "_runtimes_mode": { + "description": "Runtime filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_oss": { + "description": "Applied OS filter values", + "type": "array", + "items": { + "type": "string", + "example": "linux" + }, + "nullable": true + }, + "_oss_mode": { + "description": "OS filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_distribution_cost": { + "description": "Applied distribution cost dimension (wt=wall time, pmu=peak memory usage)", + "type": "string", + "enum": [ + "wt", + "pmu" + ] + }, + "_breakdown_dimension": { + "description": "Applied dimension for transaction breakdown calculations", + "type": "string", + "nullable": false, + "enum": [ + "wt", + "pmu", + "stdout" + ] + }, + "_sort": { + "description": "Applied sort order for the transaction breakdown", + "type": "string", + "nullable": true, + "enum": [ + "impact", + "total_requests", + "avg_wt", + "avg_pmu", + "avg_stdout", + "total_errors", + "wt_96th_percentile" + ] + }, + "_breakdown_limit": { + "description": "Maximum number of transactions returned", + "type": "integer", + "example": 200 + }, + "_breakdown_top_hits": { + "description": "Configuration for top hits selection", + "required": [ + "max_quantity", + "max_percentage" + ], + "properties": { + "max_quantity": { + "description": "Maximum number of top hit transactions", + "type": "integer", + "example": 15 + }, + "max_percentage": { + "description": "Maximum cumulative impact percentage for top hits", + "type": "number", + "format": "float", + "example": 98 + } + }, + "type": "object", + "additionalProperties": false + }, + "transactions": { + "description": "Transaction breakdown data", + "required": [ + "data" + ], + "properties": { + "data": { + "description": "List of transactions with metrics", + "type": "array", + "items": { + "required": [ + "transaction", + "wt_96th_percentile", + "avg_wt", + "avg_pmu", + "avg_stdout", + "total_requests", + "total_requests_unnamed", + "total_errors", + "impact", + "top_hit", + "_links" + ], + "properties": { + "transaction": { + "description": "Transaction name", + "type": "string", + "example": "App\\Controller\\ProductController::list" + }, + "wt_96th_percentile": { + "description": "96th percentile wall time in microseconds", + "type": "number", + "format": "float", + "example": 245123.5 + }, + "avg_wt": { + "description": "Average wall time in microseconds", + "type": "number", + "format": "float", + "example": 89234.12 + }, + "avg_pmu": { + "description": "Average peak memory usage in bytes", + "type": "number", + "format": "float", + "example": 4521234 + }, + "avg_stdout": { + "description": "Average stdout size in bytes", + "type": "number", + "format": "float", + "example": 0 + }, + "total_requests": { + "description": "Total request count (float because APM may be sampled)", + "type": "number", + "format": "float", + "example": 45231.5 + }, + "total_requests_unnamed": { + "description": "Unnamed requests count (float because APM may be sampled)", + "type": "number", + "format": "float", + "example": 0 + }, + "total_errors": { + "description": "Total 5xx error count (float because APM may be sampled)", + "type": "number", + "format": "float", + "example": 12.3 + }, + "impact": { + "description": "Impact score as percentage of total resource consumption", + "type": "number", + "format": "float", + "example": 35.67, + "nullable": true + }, + "top_hit": { + "description": "Whether this transaction is included in the top hits timeline", + "type": "boolean", + "example": true + }, + "_links": { + "description": "HATEOAS navigation links for this transaction", + "required": [ + "top_spans", + "recommendations", + "profiles" + ], + "properties": { + "top_spans": { + "description": "Link to top spans filtered by this transaction", + "required": [ + "href" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123/environments/main/observability/server/top-spans?transactions%5B0%5D=App%5CController%3A%3Alist&from=1771348620&to=1771435020" + } + }, + "type": "object", + "additionalProperties": false + }, + "recommendations": { + "description": "Link to recommendations filtered by this transaction", + "required": [ + "href" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123/environments/main/observability/profiles/recommendations?transaction=App%5CController%3A%3Alist" + } + }, + "type": "object", + "additionalProperties": false + }, + "profiles": { + "description": "Link to profiles filtered by this transaction", + "required": [ + "href" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123/environments/main/observability/profiles?transaction=App%5CController%3A%3Alist" + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + } + } + }, + "type": "object", + "additionalProperties": false + }, + "top_hits_timeline": { + "description": "Time-series data for top hit transactions", + "required": [ + "data" + ], + "properties": { + "data": { + "description": "Time-series data points with per-transaction breakdown. Each data point contains `timestamp` and optional data fields. Fields are omitted for timestamps with no data - this indicates no data was received.", + "type": "array", + "items": { + "required": [ + "timestamp" + ], + "properties": { + "timestamp": { + "description": "Data point timestamp (Unix timestamp in seconds)", + "type": "integer", + "example": 1771435020 + }, + "_total_consumed": { + "description": "Total resource consumption for this interval (omitted for timestamps with no data)", + "type": "number", + "format": "float", + "example": 1234567890.5 + }, + "_total_count": { + "description": "Total request count for this interval (omitted for timestamps with no data, float because APM may be sampled)", + "type": "number", + "format": "float", + "example": 45231.5 + }, + "_transactions": { + "description": "Per-transaction metrics for this interval, keyed by transaction name (omitted for timestamps with no data)", + "type": "object", + "additionalProperties": { + "required": [ + "average", + "count" + ], + "properties": { + "average": { + "description": "Average value for the breakdown dimension", + "type": "number", + "format": "float", + "example": 89234.12 + }, + "count": { + "description": "Request count for this transaction in this interval (float because APM may be sampled)", + "type": "number", + "format": "float", + "example": 1523.5 + } + }, + "type": "object", + "additionalProperties": false + } + } + }, + "type": "object", + "additionalProperties": false + } + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + }, + "example": { + "_grain": 60, + "_from": 1771435023, + "_to": 1771440423, + "_agent": "a38f69ca-3b56-4ea6-beac-272b2568164a", + "_contexts": [ + "web" + ], + "_contexts_mode": "additive", + "_distribution_cost": "wt", + "_project_id": "abc123def456", + "_environment_id": "main", + "_branch_machine_name": "main-bvxea6i", + "_breakdown_dimension": "wt", + "_sort": "impact", + "_breakdown_limit": 200, + "_breakdown_top_hits": { + "max_quantity": 15, + "max_percentage": 98 + }, + "transactions": { + "data": [ + { + "transaction": "App\\Controller\\ProductController::list", + "wt_96th_percentile": 245123.5, + "avg_wt": 89234.12, + "avg_pmu": 4521234, + "avg_stdout": 0, + "total_requests": 45231, + "total_requests_unnamed": 0, + "total_errors": 12, + "impact": 35.67, + "top_hit": true, + "_links": { + "top_spans": { + "href": "https://api.upsun.com/projects/abc123def456/environments/main/observability/server/top-spans?transactions%5B0%5D=App%5CController%5CProductController%3A%3Alist&from=1771348620&to=1771435020" + }, + "recommendations": { + "href": "https://api.upsun.com/projects/abc123def456/environments/main/observability/profiles/recommendations?transaction=App%5CController%5CProductController%3A%3Alist" + }, + "profiles": { + "href": "https://api.upsun.com/projects/abc123def456/environments/main/observability/profiles?transaction=App%5CController%5CProductController%3A%3Alist" + } + } + }, + { + "transaction": "App\\Controller\\CartController::checkout", + "wt_96th_percentile": 523456.2, + "avg_wt": 245678.34, + "avg_pmu": 8912345, + "avg_stdout": 0, + "total_requests": 12543, + "total_requests_unnamed": 0, + "total_errors": 45, + "impact": 22.45, + "top_hit": true, + "_links": { + "top_spans": { + "href": "https://api.upsun.com/projects/abc123def456/environments/main/observability/server/top-spans?transactions%5B0%5D=App%5CController%5CCartController%3A%3Acheckout&from=1771348620&to=1771435020" + }, + "recommendations": { + "href": "https://api.upsun.com/projects/abc123def456/environments/main/observability/profiles/recommendations?transaction=App%5CController%5CCartController%3A%3Acheckout" + }, + "profiles": { + "href": "https://api.upsun.com/projects/abc123def456/environments/main/observability/profiles?transaction=App%5CController%5CCartController%3A%3Acheckout" + } + } + }, + { + "transaction": "App\\Controller\\UserController::profile", + "wt_96th_percentile": 89234.1, + "avg_wt": 34567.89, + "avg_pmu": 2345678, + "avg_stdout": 0, + "total_requests": 8932, + "total_requests_unnamed": 123, + "total_errors": 2, + "impact": 3.21, + "top_hit": false, + "_links": { + "top_spans": { + "href": "https://api.upsun.com/projects/abc123def456/environments/main/observability/server/top-spans?transactions%5B0%5D=App%5CController%5CUserController%3A%3Aprofile&from=1771348620&to=1771435020" + }, + "recommendations": { + "href": "https://api.upsun.com/projects/abc123def456/environments/main/observability/profiles/recommendations?transaction=App%5CController%5CUserController%3A%3Aprofile" + }, + "profiles": { + "href": "https://api.upsun.com/projects/abc123def456/environments/main/observability/profiles?transaction=App%5CController%5CUserController%3A%3Aprofile" + } + } + } + ] + }, + "top_hits_timeline": { + "data": [ + { + "timestamp": 1771435020, + "_total_consumed": 1234567890.5, + "_total_count": 45231, + "_transactions": { + "App\\Controller\\ProductController::list": { + "average": 89234.12, + "count": 1523 + }, + "App\\Controller\\CartController::checkout": { + "average": 245678.34, + "count": 423 + } + } + }, + { + "timestamp": 1771435080, + "_total_consumed": 1345678901.2, + "_total_count": 48532, + "_transactions": { + "App\\Controller\\ProductController::list": { + "average": 92345.67, + "count": 1678 + }, + "App\\Controller\\CartController::checkout": { + "average": 234567.89, + "count": 456 + } + } + } + ] + } + } + } + } + }, + "400": { + "description": "Bad request - Invalid parameters. Please consult the API documentation to fix the request parameters.", + "content": { + "application/json": { + "schema": { + "required": [ + "type", + "title", + "status", + "violations" + ], + "properties": { + "type": { + "description": "RFC 2616 reference URL identifying the error type", + "type": "string", + "format": "uri", + "example": "https://tools.ietf.org/html/rfc2616#section-1" + }, + "title": { + "description": "Human-readable summary of the validation error", + "type": "string", + "example": "Please ensure parameters are correct." + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "violations": { + "description": "Map of parameter names to their validation errors. Each parameter can have multiple error messages.", + "type": "object", + "example": { + "grain": [ + "Grain can not be larger than the selection windows." + ], + "from": [ + "The from timestamp must be in the past." + ], + "to": [ + "The to timestamp must be greater than the from timestamp." + ] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "The from timestamp must be in the past." + } + } + } + }, + "type": "object", + "additionalProperties": false + } + } + } + }, + "403": { + "description": "Forbidden - Access denied due to insufficient permissions, or the requested project/environment does not exist (to prevent information disclosure)" + }, + "499": { + "description": "Too much data fetched - The query is attempting to retrieve too much data. Please narrow down the query by reducing the time range or adding more specific filters to retrieve less data.", + "content": { + "application/json": { + "schema": { + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "example": "Too much data fetched" + }, + "message": { + "type": "string", + "example": "Please reduce the time range or add more filters to narrow down the query" + } + }, + "type": "object", + "additionalProperties": false + } + } + } + } + } + } + }, + "/projects/{projectId}/environments/{environmentId}/observability/server/top-spans": { + "get": { + "tags": [ + "Blackfire Monitoring" + ], + "summary": "Get top spans", + "description": "Returns the top spans aggregated across traces, sorted by impact or other metrics. Each span includes wall time, P96, call count, percentage of traces containing the span, and impact score. Supports filtering by context, transaction, host, framework, runtime, HTTP method/status, and service layer.", + "operationId": "blackfire_server_top_spans", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The unique identifier of the Upsun project", + "required": true, + "schema": { + "type": "string", + "pattern": "[a-z0-9]+", + "example": "abc123def456" + } + }, + { + "name": "environmentId", + "in": "path", + "description": "The environment identifier", + "required": true, + "schema": { + "type": "string", + "pattern": ".+", + "example": "main" + } + }, + { + "name": "from", + "in": "query", + "description": "Start timestamp for the time range (Unix timestamp in seconds)", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "example": 1704067200 + } + }, + { + "name": "to", + "in": "query", + "description": "End timestamp for the time range (Unix timestamp in seconds)", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "example": 1704153600 + } + }, + { + "name": "grain", + "in": "query", + "description": "Granularity of data points in seconds. Auto-calculated if omitted.", + "required": false, + "schema": { + "type": "integer", + "example": 10 + } + }, + { + "name": "sort", + "in": "query", + "description": "Sort field for top spans.", + "required": false, + "schema": { + "type": "string", + "default": null, + "enum": [ + "percentage", + "p_96", + "count", + "wt", + "exec-time", + "impact" + ] + } + }, + { + "name": "contexts[]", + "in": "query", + "description": "Filter by execution contexts. Defaults to [\"web\"] with additive mode when neither contexts nor contexts_mode is specified.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "web", + "enum": [ + "web", + "cli" + ] + } + } + }, + { + "name": "contexts_mode", + "in": "query", + "description": "Filter mode for contexts parameter. \"1\" (additive, default) includes only specified contexts. \"-1\" (subtractive) excludes specified contexts and includes all others. When neither contexts nor contexts_mode is specified, defaults to \"1\" (additive) with contexts=[\"web\"].", + "required": false, + "schema": { + "type": "string", + "example": "1", + "default": null, + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "applications[]", + "in": "query", + "description": "Filter by application names", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "app-frontend" + } + } + }, + { + "name": "applications_mode", + "in": "query", + "description": "Filter mode for applications parameter. \"1\" (additive) includes only specified applications. \"-1\" (subtractive) excludes specified applications and includes all others. When omitted: defaults to \"-1\" if no applications values are provided; defaults to \"1\" (additive) if at least one applications value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "instances[]", + "in": "query", + "description": "Filter by instance names", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "app-frontend.0" + } + } + }, + { + "name": "instances_mode", + "in": "query", + "description": "Filter mode for instances parameter. \"1\" (additive) includes only specified instances. \"-1\" (subtractive) excludes specified instances and includes all others. When omitted: defaults to \"-1\" if no instances values are provided; defaults to \"1\" (additive) if at least one instances value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "transactions[]", + "in": "query", + "description": "Filter by transaction names", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "App\\Controller::index" + } + } + }, + { + "name": "transactions_mode", + "in": "query", + "description": "Filter mode for transactions parameter. \"1\" (additive) includes only specified transactions. \"-1\" (subtractive) excludes specified transactions and includes all others. When omitted: defaults to \"-1\" if no transactions values are provided; defaults to \"1\" (additive) if at least one transactions value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "wt_slots[]", + "in": "query", + "description": "Filter by wall-time distribution slots", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "0-50" + } + } + }, + { + "name": "wt_slots_mode", + "in": "query", + "description": "Filter mode for wt_slots parameter. \"1\" (additive) includes only specified wt_slots. \"-1\" (subtractive) excludes specified wt_slots and includes all others. When omitted: defaults to \"-1\" if no wt_slots values are provided; defaults to \"1\" (additive) if at least one wt_slots value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "pmu_slots[]", + "in": "query", + "description": "Filter by peak memory usage distribution slots", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "0-8" + } + } + }, + { + "name": "pmu_slots_mode", + "in": "query", + "description": "Filter mode for pmu_slots parameter. \"1\" (additive) includes only specified pmu_slots. \"-1\" (subtractive) excludes specified pmu_slots and includes all others. When omitted: defaults to \"-1\" if no pmu_slots values are provided; defaults to \"1\" (additive) if at least one pmu_slots value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "http_status_codes[]", + "in": "query", + "description": "Filter by HTTP status codes or ranges (e.g., 200, 5xx)", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "200" + } + } + }, + { + "name": "http_status_codes_mode", + "in": "query", + "description": "Filter mode for http_status_codes parameter. \"1\" (additive) includes only specified http_status_codes. \"-1\" (subtractive) excludes specified http_status_codes and includes all others. When omitted: defaults to \"-1\" if no http_status_codes values are provided; defaults to \"1\" (additive) if at least one http_status_codes value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "http_hosts[]", + "in": "query", + "description": "Filter by HTTP hosts", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "api.example.com" + } + } + }, + { + "name": "http_hosts_mode", + "in": "query", + "description": "Filter mode for http_hosts parameter. \"1\" (additive) includes only specified http_hosts. \"-1\" (subtractive) excludes specified http_hosts and includes all others. When omitted: defaults to \"-1\" if no http_hosts values are provided; defaults to \"1\" (additive) if at least one http_hosts value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "hosts[]", + "in": "query", + "description": "Filter by server hosts", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "frontend-0.prod" + } + } + }, + { + "name": "hosts_mode", + "in": "query", + "description": "Filter mode for hosts parameter. \"1\" (additive) includes only specified hosts. \"-1\" (subtractive) excludes specified hosts and includes all others. When omitted: defaults to \"-1\" if no hosts values are provided; defaults to \"1\" (additive) if at least one hosts value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "frameworks[]", + "in": "query", + "description": "Filter by frameworks. Can be specified multiple times for multiple values (e.g., ?frameworks[]=symfony&frameworks[]=laravel). Use frameworks_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "symfony" + } + } + }, + { + "name": "frameworks_mode", + "in": "query", + "description": "Filter mode for frameworks parameter. \"1\" (additive) includes only specified frameworks. \"-1\" (subtractive) excludes specified frameworks and includes all others. When omitted: defaults to \"-1\" if no frameworks values are provided; defaults to \"1\" (additive) if at least one frameworks value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "languages[]", + "in": "query", + "description": "Filter by programming languages. Can be specified multiple times for multiple values (e.g., ?languages[]=php&languages[]=python). Use languages_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "php" + } + } + }, + { + "name": "languages_mode", + "in": "query", + "description": "Filter mode for languages parameter. \"1\" (additive) includes only specified languages. \"-1\" (subtractive) excludes specified languages and includes all others. When omitted: defaults to \"-1\" if no languages values are provided; defaults to \"1\" (additive) if at least one languages value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "methods[]", + "in": "query", + "description": "Filter by HTTP methods. Can be specified multiple times for multiple values (e.g., ?methods[]=get&methods[]=post). Use methods_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "get" + } + } + }, + { + "name": "methods_mode", + "in": "query", + "description": "Filter mode for methods parameter. \"1\" (additive) includes only specified methods. \"-1\" (subtractive) excludes specified methods and includes all others. When omitted: defaults to \"-1\" if no methods values are provided; defaults to \"1\" (additive) if at least one methods value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "runtimes[]", + "in": "query", + "description": "Filter by runtimes. Can be specified multiple times for multiple values (e.g., ?runtimes[]=PHP 8.4.17 (fpm-fcgi)). Use runtimes_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "PHP 8.4.17 (fpm-fcgi)" + } + } + }, + { + "name": "runtimes_mode", + "in": "query", + "description": "Filter mode for runtimes parameter. \"1\" (additive) includes only specified runtimes. \"-1\" (subtractive) excludes specified runtimes and includes all others. When omitted: defaults to \"-1\" if no runtimes values are provided; defaults to \"1\" (additive) if at least one runtimes value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "oss[]", + "in": "query", + "description": "Filter by operating systems. Can be specified multiple times for multiple values (e.g., ?oss[]=Linux&oss[]=Darwin). Use oss_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "Linux" + } + } + }, + { + "name": "oss_mode", + "in": "query", + "description": "Filter mode for oss parameter. \"1\" (additive) includes only specified operating systems. \"-1\" (subtractive) excludes specified operating systems and includes all others. When omitted: defaults to \"-1\" if no oss values are provided; defaults to \"1\" (additive) if at least one oss value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "distribution_cost", + "in": "query", + "description": "Cost distribution dimension for server load distribution.", + "required": false, + "schema": { + "type": "string", + "default": null, + "enum": [ + "wt", + "pmu" + ] + } + } + ], + "responses": { + "200": { + "description": "Top spans retrieved successfully", + "content": { + "application/json": { + "schema": { + "required": [ + "_grain", + "_from", + "_to", + "_agent", + "_project_id", + "_environment_id", + "_branch_machine_name", + "_sort", + "top_spans", + "advanced_filters" + ], + "properties": { + "_grain": { + "description": "Data granularity in seconds", + "type": "integer", + "example": 5 + }, + "_from": { + "description": "Query start timestamp", + "type": "integer", + "example": 1704067200 + }, + "_to": { + "description": "Query end timestamp", + "type": "integer", + "example": 1704153600 + }, + "_agent": { + "description": "Blackfire Agent UUID", + "type": "string", + "format": "uuid", + "example": "a38f69ca-3b56-4ea6-beac-272b2568164a" + }, + "_project_id": { + "description": "Project identifier", + "type": "string", + "example": "abc123def456" + }, + "_environment_id": { + "description": "Environment identifier", + "type": "string", + "example": "main" + }, + "_branch_machine_name": { + "description": "Branch machine name", + "type": "string", + "example": "main-bvxea6i" + }, + "_contexts": { + "description": "Applied context filter values", + "type": "array", + "items": { + "type": "string", + "example": "web" + }, + "nullable": true + }, + "_contexts_mode": { + "description": "Context filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_applications": { + "description": "Applied application filter values", + "type": "array", + "items": { + "type": "string", + "example": "app-frontend" + }, + "nullable": true + }, + "_applications_mode": { + "description": "Application filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_instances": { + "description": "Applied instance filter values", + "type": "array", + "items": { + "type": "string", + "example": "app-frontend.0" + }, + "nullable": true + }, + "_instances_mode": { + "description": "Instance filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_transactions": { + "description": "Applied transaction filter values", + "type": "array", + "items": { + "type": "string", + "example": "App\\Controller\\ProductController::list" + }, + "nullable": true + }, + "_transactions_mode": { + "description": "Transaction filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_wt_slot": { + "description": "Applied wall-time slot filter values", + "type": "array", + "items": { + "type": "string", + "example": "0-50" + }, + "nullable": true + }, + "_wt_slot_mode": { + "description": "Wall-time slot filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_pmu_slot": { + "description": "Applied peak memory slot filter values", + "type": "array", + "items": { + "type": "string", + "example": "0-1MB" + }, + "nullable": true + }, + "_pmu_slot_mode": { + "description": "Peak memory slot filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_http_status_codes": { + "description": "Applied HTTP status code filter values", + "type": "array", + "items": { + "type": "string", + "example": "200" + }, + "nullable": true + }, + "_http_status_codes_mode": { + "description": "HTTP status code filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_http_hosts": { + "description": "Applied HTTP host filter values", + "type": "array", + "items": { + "type": "string", + "example": "api.example.com" + }, + "nullable": true + }, + "_http_hosts_mode": { + "description": "HTTP host filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_hosts": { + "description": "Applied host filter values", + "type": "array", + "items": { + "type": "string", + "example": "app.0" + }, + "nullable": true + }, + "_hosts_mode": { + "description": "Host filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_frameworks": { + "description": "Applied framework filter values", + "type": "array", + "items": { + "type": "string", + "example": "symfony" + }, + "nullable": true + }, + "_frameworks_mode": { + "description": "Framework filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_languages": { + "description": "Applied language filter values", + "type": "array", + "items": { + "type": "string", + "example": "php" + }, + "nullable": true + }, + "_languages_mode": { + "description": "Language filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_methods": { + "description": "Applied method filter values", + "type": "array", + "items": { + "type": "string", + "example": "get" + }, + "nullable": true + }, + "_methods_mode": { + "description": "Method filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_runtimes": { + "description": "Applied runtime filter values", + "type": "array", + "items": { + "type": "string", + "example": "8.2.15" + }, + "nullable": true + }, + "_runtimes_mode": { + "description": "Runtime filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_oss": { + "description": "Applied OS filter values", + "type": "array", + "items": { + "type": "string", + "example": "linux" + }, + "nullable": true + }, + "_oss_mode": { + "description": "OS filter mode (additive=include only, subtractive=exclude)", + "type": "string", + "nullable": true, + "enum": [ + "additive", + "subtractive" + ] + }, + "_distribution_cost": { + "description": "Applied distribution cost dimension (wt=wall time, pmu=peak memory usage)", + "type": "string", + "enum": [ + "wt", + "pmu" + ] + }, + "_sort": { + "description": "Applied sort field for top spans", + "type": "string", + "nullable": true, + "enum": [ + "percentage", + "p_96", + "count", + "wt", + "exec-time", + "impact" + ] + }, + "top_spans": { + "description": "Top spans aggregated data", + "required": [ + "data" + ], + "properties": { + "data": { + "description": "List of top spans with metrics", + "type": "array", + "items": { + "required": [ + "id", + "label", + "percentage", + "wt", + "p_96", + "count", + "request_wt", + "metrics", + "service_name", + "impact" + ], + "properties": { + "id": { + "description": "Span identifier (span name)", + "type": "string", + "example": "sql.queries" + }, + "label": { + "description": "Human-readable service label", + "type": "string", + "example": "SQL" + }, + "percentage": { + "description": "Fraction of traces containing this span (0.0–1.0)", + "type": "number", + "format": "float", + "example": 0.98, + "nullable": true + }, + "wt": { + "description": "Average wall time in microseconds", + "type": "number", + "example": 23400 + }, + "p_96": { + "description": "96th percentile wall time in microseconds", + "type": "number", + "example": 45000 + }, + "count": { + "description": "Total call count", + "type": "integer", + "example": 12 + }, + "request_wt": { + "description": "Average request wall time in microseconds", + "type": "number", + "example": 120000 + }, + "metrics": { + "description": "Associated metric names", + "type": "array", + "items": { + "type": "string", + "example": "sql.queries" + }, + "example": [ + "sql.queries" + ] + }, + "service_name": { + "description": "Service/layer name", + "type": "string", + "example": "sql" + }, + "impact": { + "description": "Relative impact score (fraction of total wall time consumed)", + "type": "number", + "format": "float", + "example": 0.452 + } + }, + "type": "object", + "additionalProperties": false + } + } + }, + "type": "object", + "additionalProperties": false + }, + "advanced_filters": { + "description": "Available filter values for refining queries", + "required": [ + "fields", + "max_applicable_filters" + ], + "properties": { + "fields": { + "description": "Filter fields with available values", + "type": "object", + "additionalProperties": { + "required": [ + "distinct_values", + "type", + "values" + ], + "properties": { + "distinct_values": { + "description": "Number of distinct values", + "type": "integer", + "example": 4 + }, + "type": { + "description": "Value type", + "type": "string", + "example": "string" + }, + "values": { + "description": "Filter values with counts", + "type": "array", + "items": { + "required": [ + "value", + "count" + ], + "properties": { + "value": { + "description": "Filter value", + "type": "string", + "example": "get" + }, + "count": { + "description": "Occurrence count", + "type": "integer", + "example": 26585 + } + }, + "type": "object", + "additionalProperties": false + } + } + }, + "type": "object", + "additionalProperties": false + } + }, + "max_applicable_filters": { + "description": "Maximum number of applicable filters", + "type": "integer", + "example": 50 + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + }, + "example": { + "_grain": 60, + "_from": 1771435023, + "_to": 1771440423, + "_agent": "a38f69ca-3b56-4ea6-beac-272b2568164a", + "_contexts": [ + "web" + ], + "_contexts_mode": "additive", + "_distribution_cost": "wt", + "_project_id": "abc123def456", + "_environment_id": "main", + "_branch_machine_name": "main-bvxea6i", + "_sort": "impact", + "top_spans": { + "data": [ + { + "id": "sql.queries", + "label": "SQL", + "percentage": 0.98, + "wt": 23400, + "p_96": 45000, + "count": 12, + "request_wt": 120000, + "metrics": [ + "sql.queries" + ], + "service_name": "sql", + "impact": 0.452 + }, + { + "id": "http.requests", + "label": "HTTP", + "percentage": 0.75, + "wt": 45600, + "p_96": 89000, + "count": 8, + "request_wt": 120000, + "metrics": [ + "http.requests" + ], + "service_name": "http", + "impact": 0.304 + } + ] + }, + "advanced_filters": { + "fields": { + "service": { + "values": [ + { + "value": "sql", + "count": 1234 + }, + { + "value": "http", + "count": 567 + } + ], + "distinct_values": 2, + "type": "string" + } + }, + "max_applicable_filters": 50 + } + } + } + } + }, + "400": { + "description": "Bad request - Invalid parameters. Please consult the API documentation to fix the request parameters.", + "content": { + "application/json": { + "schema": { + "required": [ + "type", + "title", + "status", + "violations" + ], + "properties": { + "type": { + "description": "RFC 2616 reference URL identifying the error type", + "type": "string", + "format": "uri", + "example": "https://tools.ietf.org/html/rfc2616#section-1" + }, + "title": { + "description": "Human-readable summary of the validation error", + "type": "string", + "example": "Please ensure parameters are correct." + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "violations": { + "description": "Map of parameter names to their validation errors. Each parameter can have multiple error messages.", + "type": "object", + "example": { + "grain": [ + "Grain can not be larger than the selection windows." + ], + "from": [ + "The from timestamp must be in the past." + ], + "to": [ + "The to timestamp must be greater than the from timestamp." + ] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "The from timestamp must be in the past." + } + } + } + }, + "type": "object", + "additionalProperties": false + } + } + } + }, + "403": { + "description": "Forbidden - Access denied due to insufficient permissions, or the requested project/environment does not exist (to prevent information disclosure)" + }, + "499": { + "description": "Too much data fetched - The query is attempting to retrieve too much data. Please narrow down the query by reducing the time range or adding more specific filters to retrieve less data.", + "content": { + "application/json": { + "schema": { + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "example": "Too much data fetched" + }, + "message": { + "type": "string", + "example": "Please reduce the time range or add more filters to narrow down the query" + } + }, + "type": "object", + "additionalProperties": false + } + } + } + } + } + } + }, + "/projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/timeline": { + "get": { + "tags": [ + "Blackfire Profiling" + ], + "summary": "Get profile timeline data", + "description": "Returns timeline visualization data for a Blackfire profile, showing the execution flow over time.", + "operationId": "blackfire_profile_timeline", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The unique identifier of the Upsun project", + "required": true, + "schema": { + "type": "string", + "pattern": "[a-z0-9]+", + "example": "abc123def456" + } + }, + { + "name": "environmentId", + "in": "path", + "description": "The environment identifier", + "required": true, + "schema": { + "type": "string", + "pattern": ".+", + "example": "main" + } + }, + { + "name": "uuid", + "in": "path", + "description": "The profile UUID", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", + "example": "4b5266a2-fd71-468b-bf05-87b342079cbf" + } + } + ], + "responses": { + "200": { + "description": "Timeline data retrieved successfully", + "content": { + "application/json": { + "schema": { + "required": [ + "_project_id", + "_environment_id", + "_branch_machine_name", + "_agent", + "_uuid", + "timeline", + "dimension", + "time", + "language" + ], + "properties": { + "_project_id": { + "description": "Project identifier", + "type": "string", + "example": "abc123def456" + }, + "_environment_id": { + "description": "Environment identifier", + "type": "string", + "example": "main" + }, + "_branch_machine_name": { + "description": "Branch machine name", + "type": "string", + "example": "main-bvxea6i" + }, + "_agent": { + "description": "Blackfire Agent UUID", + "type": "string", + "format": "uuid", + "example": "a38f69ca-3b56-4ea6-beac-272b2568164a" + }, + "_uuid": { + "description": "Profile UUID", + "type": "string", + "format": "uuid", + "example": "4b5266a2-fd71-468b-bf05-87b342079cbf" + }, + "timeline": { + "description": "Timeline event data including stack frames, memory graph, labels, markers, spans, and hierarchy", + "type": "object" + }, + "dimension": { + "description": "Active timeline dimension", + "type": "string", + "example": "wt" + }, + "time": { + "description": "Total time for the active dimension in microseconds", + "type": "integer", + "example": 4329972 + }, + "language": { + "description": "Profiled application language", + "type": "string", + "example": "php", + "enum": [ + "php", + "python" + ] + } + }, + "type": "object", + "additionalProperties": false + } + } + } + }, + "403": { + "description": "Forbidden - Access denied due to insufficient permissions, or the requested project/environment does not exist (to prevent information disclosure)" + } + } + } + }, + "/projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/subprofiles": { + "get": { + "tags": [ + "Blackfire Profiling" + ], + "summary": "Get profile subprofiles", + "description": "Returns subprofiles (child profiles) associated with a Blackfire profile.", + "operationId": "blackfire_profile_subprofiles", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The unique identifier of the Upsun project", + "required": true, + "schema": { + "type": "string", + "pattern": "[a-z0-9]+", + "example": "abc123def456" + } + }, + { + "name": "environmentId", + "in": "path", + "description": "The environment identifier", + "required": true, + "schema": { + "type": "string", + "pattern": ".+", + "example": "main" + } + }, + { + "name": "uuid", + "in": "path", + "description": "The profile UUID", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", + "example": "4b5266a2-fd71-468b-bf05-87b342079cbf" + } + } + ], + "responses": { + "200": { + "description": "Subprofiles retrieved successfully", + "content": { + "application/json": { + "schema": { + "required": [ + "_project_id", + "_environment_id", + "_branch_machine_name", + "_agent", + "_uuid", + "subprofiles" + ], + "properties": { + "_project_id": { + "description": "Project identifier", + "type": "string", + "example": "abc123def456" + }, + "_environment_id": { + "description": "Environment identifier", + "type": "string", + "example": "main" + }, + "_branch_machine_name": { + "description": "Branch machine name", + "type": "string", + "example": "main-bvxea6i" + }, + "_agent": { + "description": "Blackfire Agent UUID", + "type": "string", + "format": "uuid", + "example": "a38f69ca-3b56-4ea6-beac-272b2568164a" + }, + "_uuid": { + "description": "Profile UUID", + "type": "string", + "format": "uuid", + "example": "4b5266a2-fd71-468b-bf05-87b342079cbf" + }, + "subprofiles": { + "description": "Profile tree with context, metrics, recommendations, and child profiles", + "type": "object" + } + }, + "type": "object", + "additionalProperties": false + } + } + } + }, + "403": { + "description": "Forbidden - Access denied due to insufficient permissions, or the requested project/environment does not exist (to prevent information disclosure)" + } + } + } + }, + "/projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/profile": { + "get": { + "tags": [ + "Blackfire Profiling" + ], + "summary": "Get profile details", + "description": "Returns full profile data including metrics, metadata, and recommendations.", + "operationId": "blackfire_profile_profile", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The unique identifier of the Upsun project", + "required": true, + "schema": { + "type": "string", + "pattern": "[a-z0-9]+", + "example": "abc123def456" + } + }, + { + "name": "environmentId", + "in": "path", + "description": "The environment identifier", + "required": true, + "schema": { + "type": "string", + "pattern": ".+", + "example": "main" + } + }, + { + "name": "uuid", + "in": "path", + "description": "The profile UUID", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", + "example": "4b5266a2-fd71-468b-bf05-87b342079cbf" + } + } + ], + "responses": { + "200": { + "description": "Profile details retrieved successfully", + "content": { + "application/json": { + "schema": { + "required": [ + "_project_id", + "_environment_id", + "_branch_machine_name", + "_agent", + "_uuid", + "profile" + ], + "properties": { + "_project_id": { + "description": "Project identifier", + "type": "string", + "example": "abc123def456" + }, + "_environment_id": { + "description": "Environment identifier", + "type": "string", + "example": "main" + }, + "_branch_machine_name": { + "description": "Branch machine name", + "type": "string", + "example": "main-bvxea6i" + }, + "_agent": { + "description": "Blackfire Agent UUID", + "type": "string", + "format": "uuid", + "example": "a38f69ca-3b56-4ea6-beac-272b2568164a" + }, + "_uuid": { + "description": "Profile UUID", + "type": "string", + "format": "uuid", + "example": "4b5266a2-fd71-468b-bf05-87b342079cbf" + }, + "profile": { + "description": "Profile data including links, metadata, metrics, recommendations, and status information", + "type": "object" + } + }, + "type": "object", + "additionalProperties": false + } + } + } + }, + "403": { + "description": "Forbidden - Access denied due to insufficient permissions, or the requested project/environment does not exist (to prevent information disclosure)" + } + } + } + }, + "/projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/graph": { + "get": { + "tags": [ + "Blackfire Profiling" + ], + "summary": "Get profile call graph", + "description": "Returns the call graph data for a Blackfire profile, showing function calls and their performance metrics.", + "operationId": "blackfire_profile_graph", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The unique identifier of the Upsun project", + "required": true, + "schema": { + "type": "string", + "pattern": "[a-z0-9]+", + "example": "abc123def456" + } + }, + { + "name": "environmentId", + "in": "path", + "description": "The environment identifier", + "required": true, + "schema": { + "type": "string", + "pattern": ".+", + "example": "main" + } + }, + { + "name": "uuid", + "in": "path", + "description": "The profile UUID", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", + "example": "4b5266a2-fd71-468b-bf05-87b342079cbf" + } + } + ], + "responses": { + "200": { + "description": "Call graph retrieved successfully", + "content": { + "application/json": { + "schema": { + "required": [ + "_project_id", + "_environment_id", + "_branch_machine_name", + "_agent", + "_uuid", + "dimensions", + "root", + "nodes", + "edges", + "comparison", + "language" + ], + "properties": { + "_project_id": { + "description": "Project identifier", + "type": "string", + "example": "abc123def456" + }, + "_environment_id": { + "description": "Environment identifier", + "type": "string", + "example": "main" + }, + "_branch_machine_name": { + "description": "Branch machine name", + "type": "string", + "example": "main-bvxea6i" + }, + "_agent": { + "description": "Blackfire Agent UUID", + "type": "string", + "format": "uuid", + "example": "a38f69ca-3b56-4ea6-beac-272b2568164a" + }, + "_uuid": { + "description": "Profile UUID", + "type": "string", + "format": "uuid", + "example": "4b5266a2-fd71-468b-bf05-87b342079cbf" + }, + "dimensions": { + "description": "Available metric dimensions (wt, cpu, mu, pmu, io, nw, ct)", + "type": "object" + }, + "root": { + "description": "Root node identifier", + "type": "string", + "example": "main()" + }, + "nodes": { + "description": "Call graph nodes with inclusive/exclusive costs and percentages", + "type": "object" + }, + "edges": { + "description": "Call graph edges linking caller to callee nodes", + "type": "object" + }, + "comparison": { + "description": "Whether this is a comparison graph", + "type": "boolean", + "example": false + }, + "peaks": { + "description": "Peak inclusive and exclusive costs", + "type": "object" + }, + "arguments": { + "description": "Function arguments and metric data", + "type": "object", + "nullable": true + }, + "layers": { + "description": "Layer information", + "type": "object", + "nullable": true + }, + "labels": { + "description": "Timespan labels", + "type": "object" + }, + "spans": { + "description": "Span metadata", + "type": "object" + }, + "spans-ot": { + "description": "OpenTelemetry span data", + "type": "object" + }, + "hierarchy": { + "description": "Profile hierarchy data", + "type": "object" + }, + "language": { + "description": "Profiled application language", + "type": "string", + "example": "php", + "enum": [ + "php", + "python" + ] + } + }, + "type": "object", + "additionalProperties": false + } + } + } + }, + "403": { + "description": "Forbidden - Access denied due to insufficient permissions, or the requested project/environment does not exist (to prevent information disclosure)" + } + } + } + }, + "/projects/{projectId}/environments/{environmentId}/observability/profiles/recommendations": { + "get": { + "tags": [ + "Blackfire Profiling" + ], + "summary": "Get recommendation statistics", + "description": "Returns recommendation statistics for the environment, optionally filtered by transaction. Proxied from the Blackfire API. Each recommendation includes the constraint details, occurrence count, and links to the latest profile and documentation.", + "operationId": "blackfire_profiles_recommendations", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The unique identifier of the Upsun project", + "required": true, + "schema": { + "type": "string", + "pattern": "[a-z0-9]+", + "example": "abc123def456" + } + }, + { + "name": "environmentId", + "in": "path", + "description": "The environment identifier", + "required": true, + "schema": { + "type": "string", + "pattern": ".+", + "example": "main" + } + }, + { + "name": "from", + "in": "query", + "description": "Start of time range (Unix timestamp). Defaults to 2 weeks ago.", + "required": false, + "schema": { + "type": "integer", + "example": 1704067200 + } + }, + { + "name": "to", + "in": "query", + "description": "End of time range (Unix timestamp). Defaults to now.", + "required": false, + "schema": { + "type": "integer", + "example": 1704326400 + } + }, + { + "name": "transaction", + "in": "query", + "description": "Filter recommendations to a specific transaction name.", + "required": false, + "schema": { + "type": "string", + "example": "App\\Controller\\ProductController::list" + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of recommendation results to return. Clamped to range 10–200. Defaults to 10 (or 200 when filtering by transaction).", + "required": false, + "schema": { + "type": "integer", + "example": 50, + "maximum": 200, + "minimum": 10 + } + } + ], + "responses": { + "200": { + "description": "Recommendation statistics retrieved successfully", + "content": { + "application/json": { + "schema": { + "required": [ + "_project_id", + "_environment_id", + "_branch_machine_name", + "_agent", + "_from", + "_to", + "recommendations", + "total" + ], + "properties": { + "_project_id": { + "description": "Project identifier", + "type": "string", + "example": "abc123def456" + }, + "_environment_id": { + "description": "Environment identifier", + "type": "string", + "example": "main" + }, + "_branch_machine_name": { + "description": "Branch machine name", + "type": "string", + "example": "main-bvxea6i" + }, + "_agent": { + "description": "Blackfire Agent UUID", + "type": "string", + "format": "uuid", + "example": "a38f69ca-3b56-4ea6-beac-272b2568164a" + }, + "_from": { + "description": "Start of time range (Unix timestamp)", + "type": "integer", + "example": 1704067200 + }, + "_to": { + "description": "End of time range (Unix timestamp)", + "type": "integer", + "example": 1704326400 + }, + "_transaction": { + "description": "Filtered transaction name (only present when transaction filter is applied)", + "type": "string", + "example": "App\\Controller\\ProductController::list" + }, + "recommendations": { + "description": "List of failing recommendations", + "type": "array", + "items": { + "required": [ + "name", + "total" + ], + "properties": { + "name": { + "description": "Recommendation constraint name", + "type": "string", + "example": "tests.symfony.kernel.secret_is_set" + }, + "constraint": { + "description": "Constraint details", + "type": "object", + "nullable": true + }, + "total": { + "description": "Number of profiles failing this recommendation", + "type": "integer", + "example": 15 + }, + "_links": { + "description": "API links to the latest profile that triggered this recommendation. Only present when a latest profile is available.", + "required": [ + "api_subprofiles", + "api_profile", + "api_graph" + ], + "properties": { + "api_timeline": { + "description": "API endpoint for timeline data (JSON)", + "required": [ + "href", + "type" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123/environments/main/observability/profiles/4b5266a2-fd71-468b-bf05-87b342079cbf/timeline" + }, + "type": { + "type": "string", + "example": "application/json", + "enum": [ + "application/json" + ] + } + }, + "type": "object", + "additionalProperties": false + }, + "api_subprofiles": { + "description": "API endpoint for subprofiles data (JSON)", + "required": [ + "href", + "type" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123/environments/main/observability/profiles/4b5266a2-fd71-468b-bf05-87b342079cbf/subprofiles" + }, + "type": { + "type": "string", + "example": "application/json", + "enum": [ + "application/json" + ] + } + }, + "type": "object", + "additionalProperties": false + }, + "api_profile": { + "description": "API endpoint for profile details (JSON)", + "required": [ + "href", + "type" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123/environments/main/observability/profiles/4b5266a2-fd71-468b-bf05-87b342079cbf/profile" + }, + "type": { + "type": "string", + "example": "application/json", + "enum": [ + "application/json" + ] + } + }, + "type": "object", + "additionalProperties": false + }, + "api_graph": { + "description": "API endpoint for call graph data (JSON)", + "required": [ + "href", + "type" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123/environments/main/observability/profiles/4b5266a2-fd71-468b-bf05-87b342079cbf/graph" + }, + "type": { + "type": "string", + "example": "application/json", + "enum": [ + "application/json" + ] + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + } + }, + "tested_transactions": { + "description": "List of transaction names that have been tested by recommendations", + "type": "array", + "items": { + "type": "string" + } + }, + "untested_top_transactions": { + "description": "List of top transaction names that have not been tested by recommendations", + "type": "array", + "items": { + "type": "string" + } + }, + "total": { + "description": "Total number of profiles with failing recommendations", + "type": "integer", + "example": 42 + } + }, + "type": "object", + "additionalProperties": false + }, + "example": { + "_project_id": "abc123def456", + "_environment_id": "main", + "_branch_machine_name": "main-bvxea6i", + "_agent": "a38f69ca-3b56-4ea6-beac-272b2568164a", + "_from": 1704067200, + "_to": 1704326400, + "recommendations": [ + { + "name": "tests.symfony.kernel.secret_is_set", + "constraint": { + "id": "tests.symfony.kernel.secret_is_set", + "name": "tests.symfony.kernel.secret_is_set" + }, + "total": 15, + "_links": { + "api_timeline": { + "href": "https://api.upsun.com/projects/abc123def456/environments/main/observability/profiles/4b5266a2-fd71-468b-bf05-87b342079cbf/timeline", + "type": "application/json" + }, + "api_subprofiles": { + "href": "https://api.upsun.com/projects/abc123def456/environments/main/observability/profiles/4b5266a2-fd71-468b-bf05-87b342079cbf/subprofiles", + "type": "application/json" + }, + "api_profile": { + "href": "https://api.upsun.com/projects/abc123def456/environments/main/observability/profiles/4b5266a2-fd71-468b-bf05-87b342079cbf/profile", + "type": "application/json" + }, + "api_graph": { + "href": "https://api.upsun.com/projects/abc123def456/environments/main/observability/profiles/4b5266a2-fd71-468b-bf05-87b342079cbf/graph", + "type": "application/json" + } + } + } + ], + "total": 42 + } + } + } + }, + "400": { + "description": "Bad request - Invalid parameters. Please consult the API documentation to fix the request parameters.", + "content": { + "application/json": { + "schema": { + "required": [ + "type", + "title", + "status", + "violations" + ], + "properties": { + "type": { + "description": "RFC 2616 reference URL identifying the error type", + "type": "string", + "format": "uri", + "example": "https://tools.ietf.org/html/rfc2616#section-1" + }, + "title": { + "description": "Human-readable summary of the validation error", + "type": "string", + "example": "Please ensure parameters are correct." + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "violations": { + "description": "Map of parameter names to their validation errors. Each parameter can have multiple error messages.", + "type": "object", + "example": { + "grain": [ + "Grain can not be larger than the selection windows." + ], + "from": [ + "The from timestamp must be in the past." + ], + "to": [ + "The to timestamp must be greater than the from timestamp." + ] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "The from timestamp must be in the past." + } + } + } + }, + "type": "object", + "additionalProperties": false + } + } + } + }, + "403": { + "description": "Forbidden - Access denied due to insufficient permissions, or the requested project/environment does not exist (to prevent information disclosure)" + } + } + } + }, + "/projects/{projectId}/environments/{environmentId}/observability/profiles": { + "get": { + "tags": [ + "Blackfire Profiling" + ], + "summary": "List profiling results", + "description": "Returns a paginated list of profiles for the environment, optionally filtered by transaction name. Proxied from the Blackfire API.", + "operationId": "blackfire_profiles_list", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The unique identifier of the Upsun project", + "required": true, + "schema": { + "type": "string", + "pattern": "[a-z0-9]+", + "example": "abc123def456" + } + }, + { + "name": "environmentId", + "in": "path", + "description": "The environment identifier", + "required": true, + "schema": { + "type": "string", + "pattern": ".+", + "example": "main" + } + }, + { + "name": "transaction", + "in": "query", + "description": "Filter by transaction name (exact match).", + "required": false, + "schema": { + "type": "string", + "example": "App\\Controller\\ProductController::list" + } + }, + { + "name": "page", + "in": "query", + "description": "Page number for pagination.", + "required": false, + "schema": { + "type": "integer", + "default": null, + "minimum": 1 + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of profiles per page.", + "required": false, + "schema": { + "type": "integer", + "default": null, + "maximum": 100, + "minimum": 1 + } + }, + { + "name": "url", + "in": "query", + "description": "Wildcard search across URI, name, and transaction name.", + "required": false, + "schema": { + "type": "string", + "example": "/api/products" + } + }, + { + "name": "is_auto", + "in": "query", + "description": "When false, excludes auto-triggered (APM) profiles from results.", + "required": false, + "schema": { + "type": "boolean", + "example": false + } + }, + { + "name": "is_public", + "in": "query", + "description": "Filter to public profiles only when set to \"true\".", + "required": false, + "schema": { + "type": "string", + "example": "true", + "enum": [ + "true", + "false" + ] + } + }, + { + "name": "sort_by", + "in": "query", + "description": "Field to sort results by.", + "required": false, + "schema": { + "type": "string", + "example": "date", + "default": null, + "enum": [ + "date", + "wt", + "io", + "cpu", + "pmu", + "nw", + "sql", + "http" + ] + } + }, + { + "name": "sort_order", + "in": "query", + "description": "Sort direction.", + "required": false, + "schema": { + "type": "string", + "example": "desc", + "default": null, + "enum": [ + "asc", + "desc" + ] + } + }, + { + "name": "start_date", + "in": "query", + "description": "Filter profiles created after this date (ISO 8601).", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "example": "2026-01-01T00:00:00+00:00" + } + }, + { + "name": "end_date", + "in": "query", + "description": "Filter profiles created before this date (ISO 8601).", + "required": false, + "schema": { + "type": "string", + "format": "date-time", + "example": "2026-12-31T23:59:59+00:00" + } + }, + { + "name": "status_code", + "in": "query", + "description": "Filter by profile status code: -1=empty, 0=todo, 16=payment_required, 32=too_many_subprofiles, 64=done, 128=failed, 192=rejected.", + "required": false, + "schema": { + "type": "integer", + "example": 64, + "enum": [ + -1, + 0, + 16, + 32, + 64, + 128, + 192 + ] + } + }, + { + "name": "owner", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/FilterSelect" + } + }, + { + "name": "languages", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/FilterSelect" + } + }, + { + "name": "frameworks", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/FilterSelect" + } + }, + { + "name": "items_per_page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": null, + "maximum": 100, + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "Profiles retrieved successfully", + "content": { + "application/json": { + "schema": { + "required": [ + "_project_id", + "_environment_id", + "_branch_machine_name", + "_agent", + "profiles", + "page", + "pages", + "total" + ], + "properties": { + "_project_id": { + "description": "Project identifier", + "type": "string", + "example": "abc123def456" + }, + "_environment_id": { + "description": "Environment identifier", + "type": "string", + "example": "main" + }, + "_branch_machine_name": { + "description": "Branch machine name", + "type": "string", + "example": "main-bvxea6i" + }, + "_agent": { + "description": "Blackfire Agent UUID", + "type": "string", + "format": "uuid", + "example": "a38f69ca-3b56-4ea6-beac-272b2568164a" + }, + "profiles": { + "description": "List of profiles", + "type": "array", + "items": { + "required": [ + "uuid", + "name", + "_links" + ], + "properties": { + "uuid": { + "description": "Profile UUID", + "type": "string", + "format": "uuid", + "example": "4b5266a2-fd71-468b-bf05-87b342079cbf" + }, + "name": { + "description": "Profile name", + "type": "string", + "example": "POST /api/cart" + }, + "created_at": { + "description": "Profile creation date (ISO 8601)", + "type": "string", + "format": "date-time", + "example": "2026-03-26T14:31:49+0000" + }, + "updated_at": { + "description": "Profile last update date (ISO 8601)", + "type": "string", + "format": "date-time", + "example": "2026-03-26T14:31:52+0000" + }, + "metadata": { + "description": "Profile metadata (language, framework, transaction name, etc.)", + "type": "object" + }, + "data": { + "description": "Profile performance data", + "properties": { + "envelope": { + "description": "Aggregate performance metrics", + "properties": { + "wt": { + "description": "Wall time (microseconds)", + "type": "number", + "example": 143341 + }, + "cpu": { + "description": "CPU time (microseconds)", + "type": "number", + "example": 113242 + }, + "io": { + "description": "I/O time (microseconds)", + "type": "number", + "example": 30099 + }, + "pmu": { + "description": "Peak memory usage (bytes)", + "type": "number", + "example": 5990880 + }, + "mu": { + "description": "Memory usage (bytes)", + "type": "number", + "example": 6301320 + }, + "nw": { + "description": "Network I/O (bytes)", + "type": "number", + "example": 739 + }, + "ct": { + "description": "Call count", + "type": "number", + "example": 1 + } + }, + "type": "object" + }, + "important_metrics": { + "description": "Pre-aggregated SQL and HTTP metrics", + "properties": { + "sql_queries": { + "properties": { + "ct": { + "description": "Number of SQL queries", + "type": "number", + "example": 5 + }, + "wt": { + "description": "Total SQL wall time (microseconds)", + "type": "number", + "example": 7004 + } + }, + "type": "object" + }, + "http_requests": { + "properties": { + "ct": { + "description": "Number of HTTP requests", + "type": "number", + "example": 1 + }, + "wt": { + "description": "Total HTTP wall time (microseconds)", + "type": "number", + "example": 11 + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "recommendations": { + "description": "Number of recommendation constraints evaluated", + "type": "integer", + "example": 4, + "nullable": true + }, + "context": { + "description": "Request context (HTTP or CLI)", + "properties": { + "uri": { + "description": "Full request URI (HTTP profiles)", + "type": "string", + "example": "https://example.com/api/v2/builds" + }, + "method": { + "description": "HTTP method", + "type": "string", + "example": "POST" + }, + "status_code": { + "description": "HTTP response status code", + "type": "integer", + "example": 200 + }, + "path": { + "description": "Request path", + "type": "string", + "example": "/api/v2/builds" + }, + "type": { + "description": "Context type", + "type": "string", + "example": "http-request", + "enum": [ + "http-request", + "cli", + "no-op" + ] + }, + "args": { + "description": "Command arguments (CLI profiles)", + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + }, + "status_code": { + "description": "Profile processing status: 64=done, 128=failed, 0=todo, -1=empty, 16=payment_required, 32=too_many_subprofiles, 192=rejected", + "type": "integer", + "example": 64 + }, + "status_name": { + "description": "Human-readable profile status", + "type": "string", + "example": "finished" + }, + "owner": { + "description": "Profile owner", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "example": "John Doe" + }, + "avatar": { + "type": "string", + "format": "uri" + } + }, + "type": "object" + }, + "agent": { + "description": "Blackfire agent/environment info", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "env_uuid": { + "type": "string", + "format": "uuid" + }, + "is_env": { + "type": "boolean" + } + }, + "type": "object" + }, + "has_timeline": { + "description": "Whether the profile has timeline data", + "type": "boolean", + "example": true + }, + "is_public": { + "description": "Whether the profile is publicly shared", + "type": "boolean", + "example": false + }, + "is_readonly": { + "description": "Whether the profile is read-only", + "type": "boolean", + "example": false + }, + "is_comparison": { + "description": "Whether this is a comparison profile", + "type": "boolean", + "example": false + }, + "caches": { + "description": "Cache statistics (OPcache, APCu, realpath, PCRE)", + "type": "object" + }, + "report": { + "description": "Test report with constraints and assertions", + "type": "object", + "nullable": true + }, + "key_page": { + "description": "Key page / transaction configuration", + "type": "object" + }, + "_links": { + "description": "Profile navigation links. Links with type \"text/html\" are web pages for humans. Links with type \"application/json\" are API endpoints returning JSON.", + "required": [ + "api_subprofiles", + "api_profile", + "api_graph" + ], + "properties": { + "graph_url": { + "required": [ + "href", + "type" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://blackfire.io/profiles/4b5266a2-fd71-468b-bf05-87b342079cbf/graph" + }, + "type": { + "type": "string", + "example": "text/html", + "enum": [ + "text/html" + ] + } + }, + "type": "object", + "additionalProperties": false + }, + "api_timeline": { + "description": "API endpoint for timeline data (JSON)", + "required": [ + "href", + "type" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123/environments/main/observability/profiles/4b5266a2-fd71-468b-bf05-87b342079cbf/timeline" + }, + "type": { + "type": "string", + "example": "application/json", + "enum": [ + "application/json" + ] + } + }, + "type": "object", + "additionalProperties": false + }, + "api_subprofiles": { + "description": "API endpoint for subprofiles data (JSON)", + "required": [ + "href", + "type" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123/environments/main/observability/profiles/4b5266a2-fd71-468b-bf05-87b342079cbf/subprofiles" + }, + "type": { + "type": "string", + "example": "application/json", + "enum": [ + "application/json" + ] + } + }, + "type": "object", + "additionalProperties": false + }, + "api_profile": { + "description": "API endpoint for profile details (JSON)", + "required": [ + "href", + "type" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123/environments/main/observability/profiles/4b5266a2-fd71-468b-bf05-87b342079cbf/profile" + }, + "type": { + "type": "string", + "example": "application/json", + "enum": [ + "application/json" + ] + } + }, + "type": "object", + "additionalProperties": false + }, + "api_graph": { + "description": "API endpoint for call graph data (JSON)", + "required": [ + "href", + "type" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123/environments/main/observability/profiles/4b5266a2-fd71-468b-bf05-87b342079cbf/graph" + }, + "type": { + "type": "string", + "example": "application/json", + "enum": [ + "application/json" + ] + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "page": { + "description": "Current page number", + "type": "integer", + "example": 1 + }, + "pages": { + "description": "Total number of pages", + "type": "integer", + "example": 3 + }, + "total": { + "description": "Total number of profiles", + "type": "integer", + "example": 25 + } + }, + "type": "object", + "additionalProperties": false + }, + "example": { + "_project_id": "abc123def456", + "_environment_id": "main", + "_branch_machine_name": "main-bvxea6i", + "_agent": "a38f69ca-3b56-4ea6-beac-272b2568164a", + "profiles": [ + { + "uuid": "4b5266a2-fd71-468b-bf05-87b342079cbf", + "name": "POST /api/cart", + "created_at": "2026-03-26T14:31:49+0000", + "updated_at": "2026-03-26T14:31:52+0000", + "metadata": { + "Triggered by": "apm", + "Transaction Name": "App\\Controller\\CartController::add", + "Language": "php", + "Frameworks": [ + "symfony_framework" + ] + }, + "data": { + "envelope": { + "wt": 143341, + "cpu": 113242, + "io": 30099, + "pmu": 5990880, + "mu": 6301320, + "nw": 739, + "ct": 1 + }, + "important_metrics": { + "sql_queries": { + "ct": 5, + "wt": 7004 + }, + "http_requests": { + "ct": 1, + "wt": 11 + } + } + }, + "recommendations": 4, + "context": { + "uri": "https://example.com/api/cart", + "method": "POST", + "status_code": 200, + "path": "/api/cart", + "type": "http-request" + }, + "status_code": 64, + "status_name": "finished", + "owner": { + "uuid": "4aed4f5d-e0cb-4320-902f-885fddaa7d15", + "name": "John Doe" + }, + "agent": { + "uuid": "a38f69ca-3b56-4ea6-beac-272b2568164a", + "name": "Production", + "env_uuid": "a38f69ca-3b56-4ea6-beac-272b2568164a", + "is_env": true + }, + "has_timeline": true, + "is_public": false, + "is_readonly": false, + "is_comparison": false, + "caches": { + "opcache": { + "enabled": true, + "hitrate": 0.99, + "items": 5128 + } + }, + "_links": { + "graph_url": { + "href": "https://blackfire.io/profiles/4b5266a2-fd71-468b-bf05-87b342079cbf/graph", + "type": "text/html" + }, + "api_timeline": { + "href": "https://api.upsun.com/projects/abc123def456/environments/main/observability/profiles/4b5266a2-fd71-468b-bf05-87b342079cbf/timeline", + "type": "application/json" + }, + "api_subprofiles": { + "href": "https://api.upsun.com/projects/abc123def456/environments/main/observability/profiles/4b5266a2-fd71-468b-bf05-87b342079cbf/subprofiles", + "type": "application/json" + }, + "api_profile": { + "href": "https://api.upsun.com/projects/abc123def456/environments/main/observability/profiles/4b5266a2-fd71-468b-bf05-87b342079cbf/profile", + "type": "application/json" + }, + "api_graph": { + "href": "https://api.upsun.com/projects/abc123def456/environments/main/observability/profiles/4b5266a2-fd71-468b-bf05-87b342079cbf/graph", + "type": "application/json" + } + } + } + ], + "page": 1, + "pages": 3, + "total": 25 + } + } + } + }, + "400": { + "description": "Bad request - Invalid parameters. Please consult the API documentation to fix the request parameters.", + "content": { + "application/json": { + "schema": { + "required": [ + "type", + "title", + "status", + "violations" + ], + "properties": { + "type": { + "description": "RFC 2616 reference URL identifying the error type", + "type": "string", + "format": "uri", + "example": "https://tools.ietf.org/html/rfc2616#section-1" + }, + "title": { + "description": "Human-readable summary of the validation error", + "type": "string", + "example": "Please ensure parameters are correct." + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "violations": { + "description": "Map of parameter names to their validation errors. Each parameter can have multiple error messages.", + "type": "object", + "example": { + "grain": [ + "Grain can not be larger than the selection windows." + ], + "from": [ + "The from timestamp must be in the past." + ], + "to": [ + "The to timestamp must be greater than the from timestamp." + ] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "The from timestamp must be in the past." + } + } + } + }, + "type": "object", + "additionalProperties": false + } + } + } + }, + "403": { + "description": "Forbidden - Access denied due to insufficient permissions, or the requested project/environment does not exist (to prevent information disclosure)" + } + } + } + }, + "/projects/{projectId}/certificates": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-certificates", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CertificateCollection" + } + } + } + } + }, + "tags": [ + "Cert Management" + ], + "summary": "Get list of SSL certificates", + "description": "Retrieve a list of objects representing the SSL certificates\nassociated with a project.\n" + }, + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "create-projects-certificates", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CertificateCreateInput" + } + } + } + }, + "tags": [ + "Cert Management" + ], + "summary": "Add an SSL certificate", + "description": "Add a single SSL certificate to a project.\n" + } + }, + "/projects/{projectId}/certificates/{certificateId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "certificateId" + } + ], + "operationId": "get-projects-certificates", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Certificate" + } + } + } + } + }, + "tags": [ + "Cert Management" + ], + "summary": "Get an SSL certificate", + "description": "Retrieve information about a single SSL certificate\nassociated with a project.\n" + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CertificatePatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "certificateId" + } + ], + "operationId": "update-projects-certificates", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Cert Management" + ], + "summary": "Update an SSL certificate", + "description": "Update a single SSL certificate associated with a project.\n" + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "certificateId" + } + ], + "operationId": "delete-projects-certificates", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Cert Management" + ], + "summary": "Delete an SSL certificate", + "description": "Delete a single SSL certificate associated with a project.\n" + } + }, + "/projects/{projectId}/provisioners": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-provisioners", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CertificateProvisionerCollection" + } + } + } + } + }, + "tags": [ + "Cert Management" + ] + } + }, + "/projects/{projectId}/provisioners/{certificateProvisionerDocumentId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "certificateProvisionerDocumentId" + } + ], + "operationId": "get-projects-provisioners", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CertificateProvisioner" + } + } + } + } + }, + "tags": [ + "Cert Management" + ] + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CertificateProvisionerPatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "certificateProvisionerDocumentId" + } + ], + "operationId": "update-projects-provisioners", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Cert Management" + ] + } + }, + "/users/{user_id}/connections": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], + "get": { + "summary": "List federated login connections", + "description": "Retrieves a list of connections associated with a single user.", + "operationId": "list-login-connections", + "tags": [ + "Connections" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Connection" + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/users/{user_id}/connections/{provider}": { + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "provider", + "in": "path", + "required": true, + "description": "The name of the federation provider." + }, + { + "$ref": "#/components/parameters/UserID" + } + ], + "get": { + "summary": "Get a federated login connection", + "description": "Retrieves the specified connection.", + "operationId": "get-login-connection", + "tags": [ + "Connections" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Connection" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + } + }, + "delete": { + "summary": "Delete a federated login connection", + "description": "Deletes the specified connection.", + "operationId": "delete-login-connection", + "tags": [ + "Connections" + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + } + } + }, + "/projects/{projectId}/environments/{envId}/continuous-profiling": { + "get": { + "operationId": "list_applications", + "summary": "List profiled applications", + "description": "Returns all applications reporting continuous profiling data for the authenticated agent, scoped to the given time range. Each application includes its available profile types (with unit and aggregation metadata) and detected languages", + "tags": [ + "Continuous Profiling" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "required": true, + "description": "The unique identifier of the Upsun project", + "schema": { + "type": "string", + "pattern": "[a-z0-9]+", + "example": "22sdxmbrs4lai" + } + }, + { + "name": "envId", + "in": "path", + "required": true, + "description": "The environment identifier", + "schema": { + "type": "string", + "pattern": ".+", + "example": "main" + } + }, + { + "name": "from", + "in": "query", + "description": "Start of the time range as a Unix timestamp, defaults to now minus 30 minutes.", + "schema": { + "type": "integer", + "format": "int64", + "example": 1700000000 + } + }, + { + "name": "to", + "in": "query", + "description": "End of the time range as a Unix timestamp, defaults to now.", + "schema": { + "type": "integer", + "format": "int64", + "example": 1700003600 + } + } + ], + "responses": { + "200": { + "description": "Applications listed successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "applications" + ], + "properties": { + "applications": { + "type": "object", + "description": "Map of application name to application details", + "example": { + "ingester": { + "name": "ingester", + "profile_types": { + "cpu": { + "name": "cpu", + "description": "Time spent running on the CPU", + "title": "CPU Time", + "unit": "nanoseconds", + "aggregation": "sum" + }, + "alloc_objects": { + "name": "alloc_objects", + "description": "Number of objects allocated", + "title": "Allocations", + "unit": "count", + "aggregation": "sum" + } + }, + "languages": [ + "go" + ] + }, + "admin-pipeline": { + "name": "admin-pipeline", + "profile_types": { + "cpu": { + "name": "cpu", + "description": "Time spent running on the CPU", + "title": "CPU Time", + "unit": "nanoseconds", + "aggregation": "sum" + }, + "wall-time": { + "name": "wall-time", + "description": "Wall clock time spent executing", + "title": "Wall Time", + "unit": "nanoseconds", + "aggregation": "sum" + } + }, + "languages": [ + "php" + ] + } + }, + "additionalProperties": { + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "profile_types", + "languages" + ], + "properties": { + "name": { + "type": "string", + "example": "my-app" + }, + "profile_types": { + "type": "object", + "description": "Map of profile type name to profile type details", + "example": { + "cpu": { + "name": "cpu", + "description": "Time spent running on the CPU", + "title": "CPU Time", + "unit": "nanoseconds", + "aggregation": "sum" + }, + "alloc_objects": { + "name": "alloc_objects", + "description": "Number of objects allocated", + "title": "Allocations", + "unit": "count", + "aggregation": "sum" + } + }, + "additionalProperties": { + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "description", + "title", + "unit", + "aggregation" + ], + "properties": { + "name": { + "type": "string", + "example": "cpu" + }, + "description": { + "type": "string", + "example": "Time spent running on the CPU" + }, + "title": { + "type": "string", + "example": "CPU Time" + }, + "unit": { + "type": "string", + "example": "nanoseconds" + }, + "aggregation": { + "type": "string", + "enum": [ + "avg", + "sum" + ], + "example": "sum" + } + } + } + }, + "languages": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "go", + "python" + ] + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad request - Invalid parameters. Please consult the API documentation to fix the request parameters.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "example": 400 + }, + "message": { + "type": "string", + "example": "invalid 'from' parameter" + } + } + } + } + } + }, + "403": { + "description": "Forbidden - Access denied due to insufficient permissions, or the requested project/environment does not exist (to prevent information disclosure)" + }, + "499": { + "description": "Query timeout - The query exceeded the server timeout limit. Please narrow down the query by reducing the time range or adding more specific filters", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "example": 499 + }, + "message": { + "type": "string", + "example": "Timeout while querying data" + } + } + } + } + } + } + } + } + }, + "/projects/{projectId}/environments/{envId}/continuous-profiling/app/{app}": { + "get": { + "operationId": "get_application_timeline", + "summary": "Get application timeline", + "description": "Returns timeline data points for the given application and profile type, scoped to the authenticated agent. Points are aggregated at a computed grain (60s to 1h) based on the time range. The response includes the bounded time range, aggregation metadata, and the agent retention period", + "tags": [ + "Continuous Profiling" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "required": true, + "description": "The unique identifier of the Upsun project", + "schema": { + "type": "string", + "pattern": "[a-z0-9]+", + "example": "22sdxmbrs4lai" + } + }, + { + "name": "envId", + "in": "path", + "required": true, + "description": "The environment identifier", + "schema": { + "type": "string", + "pattern": ".+", + "example": "main" + } + }, + { + "name": "app", + "in": "path", + "required": true, + "description": "URL-encoded application name", + "schema": { + "type": "string", + "pattern": ".+", + "example": "my-app" + } + }, + { + "name": "from", + "in": "query", + "description": "Start of the time range as a Unix timestamp, defaults to now minus 30 minutes.", + "schema": { + "type": "integer", + "format": "int64", + "example": 1700000000 + } + }, + { + "name": "to", + "in": "query", + "description": "End of the time range as a Unix timestamp, defaults to now.", + "schema": { + "type": "integer", + "format": "int64", + "example": 1700003600 + } + }, + { + "name": "profile_type", + "in": "query", + "description": "Profile type to query.", + "schema": { + "type": "string", + "enum": [ + "cpu", + "wall-time", + "wall", + "goroutine", + "alloc_objects", + "alloc_space", + "inuse_objects", + "inuse_space", + "space" + ], + "default": null, + "example": "cpu" + } + }, + { + "$ref": "#/components/parameters/RuntimeMode" + }, + { + "$ref": "#/components/parameters/RuntimeValues" + }, + { + "$ref": "#/components/parameters/RuntimeVersionMode" + }, + { + "$ref": "#/components/parameters/RuntimeVersionValues" + }, + { + "$ref": "#/components/parameters/RuntimeArchMode" + }, + { + "$ref": "#/components/parameters/RuntimeArchValues" + }, + { + "$ref": "#/components/parameters/RuntimeOsMode" + }, + { + "$ref": "#/components/parameters/RuntimeOsValues" + }, + { + "$ref": "#/components/parameters/ProbeVersionMode" + }, + { + "$ref": "#/components/parameters/ProbeVersionValues" + } + ], + "responses": { + "200": { + "description": "Timeline data retrieved successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "from", + "to", + "grain", + "unit", + "aggregation_type", + "retention", + "points" + ], + "properties": { + "from": { + "type": "integer", + "format": "int64", + "description": "Actual start of the time range as a Unix timestamp", + "example": 1700000000 + }, + "to": { + "type": "integer", + "format": "int64", + "description": "Actual end of the time range as a Unix timestamp", + "example": 1700003600 + }, + "grain": { + "type": "integer", + "description": "Granularity of data points in seconds", + "example": 1800 + }, + "unit": { + "type": "string", + "description": "Unit of the sample values, suffixed with `_per_second` for sum aggregation types", + "example": "nanoseconds_per_second" + }, + "aggregation_type": { + "type": "string", + "enum": [ + "avg", + "sum" + ], + "example": "sum" + }, + "retention": { + "type": "integer", + "description": "Agent retention period in minutes", + "example": 80640 + }, + "points": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "timestamp" + ], + "properties": { + "timestamp": { + "type": "integer", + "format": "int64", + "example": 1700000000 + }, + "value": { + "type": "integer", + "format": "int64", + "description": "Aggregated sample value for this time slot. When no profiling data was collected during this slot, the key is entirely absent from the JSON object (not present as null or zero). The frontend should render such points as gaps in the timeline chart, not as zero-value data points", + "example": 15733333 + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad request - Invalid parameters. Please consult the API documentation to fix the request parameters.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "example": 400 + }, + "message": { + "type": "string", + "example": "Invalid filters" + } + } + } + } + } + }, + "403": { + "description": "Forbidden - Access denied due to insufficient permissions, or the requested project/environment does not exist (to prevent information disclosure)" + }, + "499": { + "description": "Query timeout - The query exceeded the server timeout limit. Please narrow down the query by reducing the time range or adding more specific filters", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "example": 499 + }, + "message": { + "type": "string", + "example": "Timeout while querying data" + } + } + } + } + } + } + } + } + }, + "/projects/{projectId}/environments/{envId}/continuous-profiling/app/{app}/merge": { + "get": { + "operationId": "get_application_merge", + "summary": "Get merged profile", + "description": "Returns a merged profile for the given application over the specified time range. The output format is controlled by the `out` query parameter: `pprof` returns a gzipped protobuf with Content-Disposition header, `dot` returns a GraphViz DOT graph, `flamebearerv2` returns JSON flame graph data", + "tags": [ + "Continuous Profiling" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "required": true, + "description": "The unique identifier of the Upsun project", + "schema": { + "type": "string", + "pattern": "[a-z0-9]+", + "example": "22sdxmbrs4lai" + } + }, + { + "name": "envId", + "in": "path", + "required": true, + "description": "The environment identifier", + "schema": { + "type": "string", + "pattern": ".+", + "example": "main" + } + }, + { + "name": "app", + "in": "path", + "required": true, + "description": "URL-encoded application name", + "schema": { + "type": "string", + "pattern": ".+", + "example": "my-app" + } + }, + { + "name": "from", + "in": "query", + "description": "Start of the time range as a Unix timestamp, defaults to now minus 30 minutes.", + "schema": { + "type": "integer", + "format": "int64", + "example": 1700000000 + } + }, + { + "name": "to", + "in": "query", + "description": "End of the time range as a Unix timestamp, defaults to now.", + "schema": { + "type": "integer", + "format": "int64", + "example": 1700003600 + } + }, + { + "name": "profile_type", + "in": "query", + "description": "Profile type to query.", + "schema": { + "type": "string", + "enum": [ + "cpu", + "wall-time", + "wall", + "goroutine", + "alloc_objects", + "alloc_space", + "inuse_objects", + "inuse_space", + "space" + ], + "default": null, + "example": "cpu" + } + }, + { + "name": "out", + "in": "query", + "description": "Output format for the merged profile.", + "schema": { + "type": "string", + "enum": [ + "pprof", + "dot", + "flamebearerv2" + ], + "default": null, + "example": "pprof" + } + }, + { + "$ref": "#/components/parameters/RuntimeMode" + }, + { + "$ref": "#/components/parameters/RuntimeValues" + }, + { + "$ref": "#/components/parameters/RuntimeVersionMode" + }, + { + "$ref": "#/components/parameters/RuntimeVersionValues" + }, + { + "$ref": "#/components/parameters/RuntimeArchMode" + }, + { + "$ref": "#/components/parameters/RuntimeArchValues" + }, + { + "$ref": "#/components/parameters/RuntimeOsMode" + }, + { + "$ref": "#/components/parameters/RuntimeOsValues" + }, + { + "$ref": "#/components/parameters/ProbeVersionMode" + }, + { + "$ref": "#/components/parameters/ProbeVersionValues" + } + ], + "responses": { + "200": { + "description": "Merged profile retrieved successfully", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "Gzipped pprof protobuf when `out=pprof`" + } + }, + "text/vnd.graphviz": { + "schema": { + "type": "string", + "description": "GraphViz DOT graph when `out=dot`" + } + }, + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "description": "Flame graph JSON when `out=flamebearerv2`", + "required": [ + "version", + "flamebearer", + "metadata", + "_profile_type", + "_sample_unit" + ], + "properties": { + "version": { + "type": "integer", + "description": "Flamebearer format version", + "example": 1 + }, + "flamebearer": { + "type": "object", + "additionalProperties": false, + "description": "Core flame graph data structure containing function names and the hierarchical call tree encoded as levels of 4-tuples", + "required": [ + "names", + "levels", + "numTicks", + "maxSelf" + ], + "properties": { + "names": { + "type": "array", + "description": "Array of function identifiers referenced by index in `levels`. Each entry is a JSON-encoded location object with `filename`, `name`, and `line` fields", + "items": { + "type": "string", + "example": "sync/atomic.(*Pointer).Store" + }, + "example": [ + "total", + "time.now", + "sync/atomic.(*Pointer).Store" + ] + }, + "levels": { + "type": "array", + "description": "Flame graph call tree encoded as levels. Each level is a flat array of 4-tuples `[offset, total, self, name_index]` where `offset` is the gap from the left edge in sample units, `total` is the inclusive sample count, `self` is the exclusive sample count, and `name_index` references the `names` array", + "items": { + "type": "array", + "example": [ + 0, + 7361350000000, + 5310000000, + 0 + ], + "items": { + "type": "integer", + "example": 0 + } + }, + "example": [ + [ + 0, + 7361350000000, + 5310000000, + 0 + ], + [ + 5310000000, + 160000000, + 0, + 1, + 0, + 483950000000, + 0, + 2 + ] + ] + }, + "numTicks": { + "type": "integer", + "description": "Total number of samples across the entire profile", + "example": 7361350000000 + }, + "maxSelf": { + "type": "integer", + "description": "Maximum exclusive (self) sample count across all nodes", + "example": 333800000000 + } + } + }, + "metadata": { + "type": "object", + "additionalProperties": false, + "description": "Profile metadata describing the format and sampling configuration", + "required": [ + "format", + "spyName", + "sampleRate", + "units", + "name" + ], + "properties": { + "format": { + "type": "string", + "description": "Profile format. Always `single` for merged profiles (`double` is used for diff profiles)", + "example": "single" + }, + "spyName": { + "type": "string", + "description": "Name of the profiling agent that collected the data. Always `unknown` for pprof-based profiles", + "example": "unknown" + }, + "sampleRate": { + "type": "integer", + "description": "Sampling rate in Hz used during profiling", + "example": 100 + }, + "units": { + "type": "string", + "description": "Unit of measure for sample values (e.g. `nanoseconds`, `bytes`, `count`)", + "example": "nanoseconds" + }, + "name": { + "type": "string", + "description": "Human-readable name for the profile", + "example": "merged_profile" + } + } + }, + "timeline": { + "type": "object", + "nullable": true, + "description": "Present for pyroscope flamebearer format compatibility. Always null for merged profiles returned by this endpoint — do not build UI to render this field", + "additionalProperties": false, + "required": [ + "startTime", + "samples", + "durationDelta" + ], + "properties": { + "startTime": { + "type": "integer", + "format": "int64", + "description": "Start of the timeline as a Unix timestamp in seconds", + "example": 1700000000 + }, + "samples": { + "type": "array", + "description": "Sequence of sample counts, one per time bucket starting at `startTime` and spaced by `durationDelta`", + "items": { + "type": "integer", + "example": 100 + }, + "example": [ + 100, + 200, + 150 + ] + }, + "durationDelta": { + "type": "integer", + "format": "int64", + "description": "Time interval between consecutive samples in seconds", + "example": 10 + }, + "watermarks": { + "type": "object", + "description": "Map of sample index to watermark timestamp", + "additionalProperties": { + "type": "integer", + "format": "int64" + } + } + }, + "example": null + }, + "groups": { + "type": "object", + "description": "Present for pyroscope flamebearer format compatibility. Always an empty object for merged profiles returned by this endpoint — do not build UI to render this field", + "additionalProperties": { + "type": "object", + "additionalProperties": false, + "required": [ + "startTime", + "samples", + "durationDelta" + ], + "properties": { + "startTime": { + "type": "integer", + "format": "int64", + "description": "Start of the timeline as a Unix timestamp in seconds", + "example": 1700000000 + }, + "samples": { + "type": "array", + "description": "Sequence of sample counts, one per time bucket starting at `startTime` and spaced by `durationDelta`", + "items": { + "type": "integer", + "example": 100 + }, + "example": [ + 100, + 200, + 150 + ] + }, + "durationDelta": { + "type": "integer", + "format": "int64", + "description": "Time interval between consecutive samples in seconds", + "example": 10 + }, + "watermarks": { + "type": "object", + "description": "Map of sample index to watermark timestamp", + "additionalProperties": { + "type": "integer", + "format": "int64" + } + } + } + }, + "example": {} + }, + "heatmap": { + "type": "object", + "nullable": true, + "description": "Present for pyroscope flamebearer format compatibility. Always null for merged profiles returned by this endpoint — do not build UI to render this field", + "additionalProperties": false, + "required": [ + "values", + "timeBuckets", + "valueBuckets", + "startTime", + "endTime", + "minValue", + "maxValue", + "minDepth", + "maxDepth" + ], + "properties": { + "values": { + "type": "array", + "description": "2D matrix of occurrence counts indexed as `values[time_bucket][value_bucket]`", + "items": { + "type": "array", + "example": [ + 0, + 1, + 3, + 0 + ], + "items": { + "type": "integer", + "example": 0 + } + } + }, + "timeBuckets": { + "type": "integer", + "format": "int64", + "description": "Number of bins on the time (X) axis", + "example": 10 + }, + "valueBuckets": { + "type": "integer", + "format": "int64", + "description": "Number of bins on the value (Y) axis", + "example": 20 + }, + "startTime": { + "type": "integer", + "format": "int64", + "description": "Start of the time axis as Unix nanoseconds", + "example": 1700000000000000000 + }, + "endTime": { + "type": "integer", + "format": "int64", + "description": "End of the time axis as Unix nanoseconds", + "example": 1700003600000000000 + }, + "minValue": { + "type": "integer", + "description": "Minimum value axis boundary", + "example": 0 + }, + "maxValue": { + "type": "integer", + "description": "Maximum value axis boundary", + "example": 1000000 + }, + "minDepth": { + "type": "integer", + "description": "Minimum non-zero count in the values matrix", + "example": 1 + }, + "maxDepth": { + "type": "integer", + "description": "Maximum count in the values matrix", + "example": 500 + } + }, + "example": null + }, + "_profile_type": { + "type": "string", + "description": "Profile type name", + "example": "cpu" + }, + "_sample_unit": { + "type": "string", + "description": "Unit of the sample values", + "example": "nanoseconds" + }, + "_aggregation_type": { + "type": "string", + "description": "Aggregation method for timeline data", + "enum": [ + "avg", + "sum" + ], + "example": "sum" + }, + "_application": { + "type": "string", + "description": "Application name the profile was collected from", + "example": "ingester" + }, + "_from": { + "type": "string", + "format": "date-time", + "description": "Start of the merged time range", + "example": "2026-03-25T15:18:53Z" + }, + "_to": { + "type": "string", + "format": "date-time", + "description": "End of the merged time range", + "example": "2026-04-01T14:18:53Z" + }, + "_scale_factor": { + "type": "integer", + "description": "Scale factor applied to sample values", + "example": 1 + } + } + } + } + } + }, + "400": { + "description": "Bad request - Invalid parameters. Please consult the API documentation to fix the request parameters.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "example": 400 + }, + "message": { + "type": "string", + "example": "invalid 'profile_type' parameter (invalid)" + } + } + } + } + } + }, + "403": { + "description": "Forbidden - Access denied due to insufficient permissions, or the requested project/environment does not exist (to prevent information disclosure)" + }, + "499": { + "description": "Query timeout - The query exceeded the server timeout limit. Please narrow down the query by reducing the time range or adding more specific filters", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "example": 499 + }, + "message": { + "type": "string", + "example": "Timeout while querying data" + } + } + } + } + } + } + } + } + }, + "/projects/{projectId}/environments/{envId}/continuous-profiling/app/{app}/filter": { + "get": { + "operationId": "get_application_filter", + "summary": "Get application filter values", + "description": "Returns available label filter fields and their distinct values for the given application. Use these values to build filter parameters (`runtime[]`, `runtime_version[]`, etc.) on the timeline and merge endpoints", + "tags": [ + "Continuous Profiling" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "required": true, + "description": "The unique identifier of the Upsun project", + "schema": { + "type": "string", + "pattern": "[a-z0-9]+", + "example": "22sdxmbrs4lai" + } + }, + { + "name": "envId", + "in": "path", + "required": true, + "description": "The environment identifier", + "schema": { + "type": "string", + "pattern": ".+", + "example": "main" + } + }, + { + "name": "app", + "in": "path", + "required": true, + "description": "URL-encoded application name", + "schema": { + "type": "string", + "pattern": ".+", + "example": "my-app" + } + }, + { + "name": "from", + "in": "query", + "description": "Start of the time range as a Unix timestamp, defaults to now minus 30 minutes.", + "schema": { + "type": "integer", + "format": "int64", + "example": 1700000000 + } + }, + { + "name": "to", + "in": "query", + "description": "End of the time range as a Unix timestamp, defaults to now.", + "schema": { + "type": "integer", + "format": "int64", + "example": 1700003600 + } + }, + { + "name": "profile_type", + "in": "query", + "description": "Profile type to query.", + "schema": { + "type": "string", + "enum": [ + "cpu", + "wall-time", + "wall", + "goroutine", + "alloc_objects", + "alloc_space", + "inuse_objects", + "inuse_space", + "space" + ], + "default": null, + "example": "cpu" + } + }, + { + "$ref": "#/components/parameters/RuntimeMode" + }, + { + "$ref": "#/components/parameters/RuntimeValues" + }, + { + "$ref": "#/components/parameters/RuntimeVersionMode" + }, + { + "$ref": "#/components/parameters/RuntimeVersionValues" + }, + { + "$ref": "#/components/parameters/RuntimeArchMode" + }, + { + "$ref": "#/components/parameters/RuntimeArchValues" + }, + { + "$ref": "#/components/parameters/RuntimeOsMode" + }, + { + "$ref": "#/components/parameters/RuntimeOsValues" + }, + { + "$ref": "#/components/parameters/ProbeVersionMode" + }, + { + "$ref": "#/components/parameters/ProbeVersionValues" + } + ], + "responses": { + "200": { + "description": "Filter values retrieved successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "fields", + "max_applicable_filters" + ], + "properties": { + "fields": { + "type": "object", + "description": "Map of filter field name to its distinct values and counts", + "example": { + "runtime": { + "distinct_values": 2, + "values": [ + { + "value": "go", + "count": 1500 + }, + { + "value": "python", + "count": 500 + } + ] + }, + "runtime_version": { + "distinct_values": 3, + "values": [ + { + "value": "1.21", + "count": 1000 + }, + { + "value": "1.22", + "count": 400 + }, + { + "value": "3.12", + "count": 600 + } + ] + } + }, + "additionalProperties": { + "type": "object", + "additionalProperties": false, + "required": [ + "distinct_values", + "values" + ], + "properties": { + "distinct_values": { + "type": "integer", + "description": "Total number of distinct values for this field", + "example": 2 + }, + "values": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "value", + "count" + ], + "properties": { + "value": { + "type": "string", + "example": "go" + }, + "count": { + "type": "integer", + "example": 1000 + } + } + } + } + } + } + }, + "max_applicable_filters": { + "type": "integer", + "description": "Maximum number of applicable filters", + "example": 45 + } + } + } + } + } + }, + "400": { + "description": "Bad request - Invalid parameters. Please consult the API documentation to fix the request parameters.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "example": 400 + }, + "message": { + "type": "string", + "example": "Invalid filters" + } + } + } + } + } + }, + "403": { + "description": "Forbidden - Access denied due to insufficient permissions, or the requested project/environment does not exist (to prevent information disclosure)" + }, + "499": { + "description": "Query timeout - The query exceeded the server timeout limit. Please narrow down the query by reducing the time range or adding more specific filters", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "example": 499 + }, + "message": { + "type": "string", + "example": "Timeout while querying data" + } + } + } + } + } + } + } + } + }, + "/projects/{projectId}/environments/{environmentId}/deployments": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "list-projects-environments-deployments", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentCollection" + } + } + } + } + }, + "tags": [ + "Deployment" + ], + "summary": "Get an environment's deployment information", + "description": "Retrieve the read-only configuration of an environment's deployment.\nThe returned information is everything required to\nrecreate a project's current deployment.\n\nMore specifically, the objects\nreturned by this endpoint contain the configuration derived from the\nrepository's YAML configuration file: `.upsun/config.yaml`.\n\nAdditionally, any values deriving from environment variables, the\ndomains attached to a project, project access settings, etc. are\nincluded here.\n\nThis endpoint currently returns a list containing a single deployment\nconfiguration with an `id` of `current`. This may be subject to change\nin the future.\n" + } + }, + "/projects/{projectId}/environments/{environmentId}/deployments/{deploymentId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "deploymentId" + } + ], + "operationId": "get-projects-environments-deployments", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deployment" + } + } + } + } + }, + "tags": [ + "Deployment" + ], + "summary": "Get a single environment deployment", + "description": "Retrieve a single deployment configuration with an id of `current`. This may be subject to change in the future.\nOnly `current` can be queried.\n" + } + }, + "/projects/{projectId}/deployments": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-deployments", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentTargetCollection" + } + } + } + } + }, + "tags": [ + "Deployment Target" + ], + "summary": "Get project deployment target info", + "description": "The deployment target information for the project.\n" + }, + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "create-projects-deployments", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentTargetCreateInput" + } + } + } + }, + "tags": [ + "Deployment Target" + ], + "summary": "Create a project deployment target", + "description": "Set the deployment target information for a project.\n" + } + }, + "/projects/{projectId}/deployments/{deploymentTargetConfigurationId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "deploymentTargetConfigurationId" + } + ], + "operationId": "get-projects-deployments", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentTarget" + } + } + } + } + }, + "tags": [ + "Deployment Target" + ], + "summary": "Get a single project deployment target", + "description": "Get a single deployment target configuration of a project.\n" + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentTargetPatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "deploymentTargetConfigurationId" + } + ], + "operationId": "update-projects-deployments", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Deployment Target" + ], + "summary": "Update a project deployment" + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "deploymentTargetConfigurationId" + } + ], + "operationId": "delete-projects-deployments", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Deployment Target" + ], + "summary": "Delete a single project deployment target", + "description": "Delete a single deployment target configuration associated with a specific project.\n" + } + }, + "/projects/{projectId}/git/diffs/{diffBaseId}/{diffTargetId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "diffBaseId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "diffTargetId" + } + ], + "operationId": "list-projects-git-diffs", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DiffCollection" + } + } + } + } + }, + "tags": [ + "Diff" + ] + } + }, + "/discounts/{id}": { + "get": { + "tags": [ + "Discounts" + ], + "summary": "Get an organization discount", + "operationId": "get-discount", + "parameters": [ + { + "$ref": "#/components/parameters/discountId" + } + ], + "responses": { + "200": { + "description": "A discount object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Discount" + } + } + } + } + }, + "x-vendor": "upsun" + } + }, + "/discounts/types/allowance": { + "get": { + "tags": [ + "Discounts" + ], + "summary": "Get the value of the First Project Incentive discount", + "operationId": "get-type-allowance", + "responses": { + "200": { + "description": "A discount object", + "content": { + "application/json": { + "schema": { + "properties": { + "currencies": { + "description": "Discount values per currency.", + "properties": { + "EUR": { + "description": "Discount value in EUR.", + "properties": { + "formatted": { + "description": "The discount amount formatted.", + "type": "string" + }, + "amount": { + "description": "The discount amount.", + "type": "number", + "format": "float" + }, + "currency": { + "description": "The currency.", + "type": "string" + }, + "currency_symbol": { + "description": "Currency symbol.", + "type": "string" + } + }, + "type": "object" + }, + "USD": { + "description": "Discount value in USD.", + "properties": { + "formatted": { + "description": "The discount amount formatted.", + "type": "string" + }, + "amount": { + "description": "The discount amount.", + "type": "number", + "format": "float" + }, + "currency": { + "description": "The currency.", + "type": "string" + }, + "currency_symbol": { + "description": "Currency symbol.", + "type": "string" + } + }, + "type": "object" + }, + "GBP": { + "description": "Discount value in GBP.", + "properties": { + "formatted": { + "description": "The discount amount formatted.", + "type": "string" + }, + "amount": { + "description": "The discount amount.", + "type": "number", + "format": "float" + }, + "currency": { + "description": "The currency.", + "type": "string" + }, + "currency_symbol": { + "description": "Currency symbol.", + "type": "string" + } + }, + "type": "object" + }, + "AUD": { + "description": "Discount value in AUD.", + "properties": { + "formatted": { + "description": "The discount amount formatted.", + "type": "string" + }, + "amount": { + "description": "The discount amount.", + "type": "number", + "format": "float" + }, + "currency": { + "description": "The currency.", + "type": "string" + }, + "currency_symbol": { + "description": "Currency symbol.", + "type": "string" + } + }, + "type": "object" + }, + "CAD": { + "description": "Discount value in CAD.", + "properties": { + "formatted": { + "description": "The discount amount formatted.", + "type": "string" + }, + "amount": { + "description": "The discount amount.", + "type": "number", + "format": "float" + }, + "currency": { + "description": "The currency.", + "type": "string" + }, + "currency_symbol": { + "description": "Currency symbol.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + } + } + }, + "x-vendor": "upsun" + } + }, + "/organizations/{organization_id}/discounts": { + "get": { + "summary": "List organization discounts", + "description": "Retrieves all applicable discounts granted to the specified organization.", + "operationId": "list-org-discounts", + "deprecated": true, + "tags": [ + "Discounts" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Discount" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-vendor": "upsun" + } + }, + "/projects/{projectId}/domain-claims": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-domain-claims", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainClaimCollection" + } + } + } + } + }, + "tags": [ + "Domain Claim" + ] + }, + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "create-projects-domain-claims", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainClaimCreateInput" + } + } + } + }, + "tags": [ + "Domain Claim" + ] + } + }, + "/projects/{projectId}/domain-claims/{domainClaimId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "domainClaimId" + } + ], + "operationId": "get-projects-domain-claims", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainClaim" + } + } + } + } + }, + "tags": [ + "Domain Claim" + ] + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainClaimPatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "domainClaimId" + } + ], + "operationId": "update-projects-domain-claims", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Domain Claim" + ] + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "domainClaimId" + } + ], + "operationId": "delete-projects-domain-claims", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Domain Claim" + ] + } + }, + "/projects/{projectId}/domains": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainCollection" + } + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Get list of project domains", + "description": "Retrieve a list of objects representing the user-specified domains\nassociated with a project. Note that this does *not* return the\ndomains automatically assigned to a project that appear under\n\"Access site\" on the user interface.\n" + }, + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "create-projects-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainCreateInput" + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Add a project domain", + "description": "Add a single domain to a project.\nIf the `ssl` field is left blank without an object containing\na PEM-encoded SSL certificate, a certificate will\n[be provisioned for you via Let's Encrypt.](https://docs.upsun.com/anchors/routes/https/certificates/)\n" + } + }, + "/projects/{projectId}/domains/{domainId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "domainId" + } + ], + "operationId": "get-projects-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Domain" + } + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Get a project domain", + "description": "Retrieve information about a single user-specified domain\nassociated with a project.\n" + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainPatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "domainId" + } + ], + "operationId": "update-projects-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Update a project domain", + "description": "Update the information associated with a single user-specified\ndomain associated with a project.\n" + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "domainId" + } + ], + "operationId": "delete-projects-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Delete a project domain", + "description": "Delete a single user-specified domain associated with a project.\n" + } + }, + "/projects/{projectId}/environments/{environmentId}/domains": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "list-projects-environments-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainCollection" + } + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Get a list of environment domains", + "description": "Retrieve a list of objects representing the user-specified domains\nassociated with an environment. Note that this does *not* return the\n`.platformsh.site` subdomains, which are automatically assigned to\nthe environment.\n" + }, + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "create-projects-environments-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainCreateInput" + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Add an environment domain", + "description": "Add a single domain to an environment.\nIf the environment is not production, the `replacement_for` field\nis required, which binds a new domain to an existing one from a\nproduction environment.\nIf the `ssl` field is left blank without an object containing\na PEM-encoded SSL certificate, a certificate will\n[be provisioned for you via Let's Encrypt](https://docs.upsun.com/anchors/routes/https/certificates/).\n" + } + }, + "/projects/{projectId}/environments/{environmentId}/domains/{domainId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "domainId" + } + ], + "operationId": "get-projects-environments-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Domain" + } + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Get an environment domain", + "description": "Retrieve information about a single user-specified domain\nassociated with an environment.\n" + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainPatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "domainId" + } + ], + "operationId": "update-projects-environments-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Update an environment domain", + "description": "Update the information associated with a single user-specified\ndomain associated with an environment.\n" + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "domainId" + } + ], + "operationId": "delete-projects-environments-domains", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Domain Management" + ], + "summary": "Delete an environment domain", + "description": "Delete a single user-specified domain associated with an environment.\n" + } + }, + "/projects/{projectId}/environments/{environmentId}/observability": { + "get": { + "tags": [ + "Entrypoint" + ], + "summary": "Get observability entrypoint", + "description": "Returns API entrypoint with hypermedia links to all observability endpoints (resources, logs, HTTP traffic, continuous profiling, server metrics) following HATEOAS principles. Includes data retention policies per metric type (retention_period, max_range, recommended_default_range in minutes), environment metadata (project_id, environment_id, environment_type, vendor), and per-service resource links. Use _links for API navigation.", + "operationId": "observability_entrypoint", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The unique identifier of the Upsun project", + "required": true, + "schema": { + "type": "string", + "pattern": "[a-z0-9]+", + "example": "abc123def456" + } + }, + { + "name": "environmentId", + "in": "path", + "description": "The environment identifier", + "required": true, + "schema": { + "type": "string", + "pattern": ".+", + "example": "main" + } + } + ], + "responses": { + "200": { + "description": "Observability entrypoint retrieved successfully", + "content": { + "application/json": { + "schema": { + "required": [ + "message", + "project_id", + "branch_machine_name", + "environment_id", + "environment_type", + "vendor", + "psh_user_identifier", + "_links", + "retention", + "data_retention" + ], + "properties": { + "message": { + "description": "Welcome message", + "type": "string", + "example": "bonjour, monde!" + }, + "project_id": { + "description": "Project identifier", + "type": "string", + "example": "abc123def456" + }, + "branch_machine_name": { + "description": "Branch machine name", + "type": "string", + "example": "main" + }, + "environment_id": { + "description": "Environment identifier", + "type": "string", + "example": "main" + }, + "environment_type": { + "description": "Environment type classification", + "type": "string", + "example": "production", + "enum": [ + "production", + "staging", + "development" + ] + }, + "vendor": { + "description": "Platform vendor identifier", + "type": "string", + "example": "upsun", + "enum": [ + "upsun", + "platformsh" + ] + }, + "psh_user_identifier": { + "description": "Authenticated user identifier", + "type": "string", + "example": "user@example.com" + }, + "_links": { + "description": "HATEOAS navigation links to all observability endpoints", + "required": [ + "_self", + "resources_by_service", + "resources_overview", + "resources_summary", + "blackfire_php_server_caches", + "blackfire_server_global", + "blackfire_server_transactions_breakdown", + "logs_query", + "logs_overview", + "http_metrics_timeline_urls", + "http_metrics_timeline_ips", + "http_metrics_timeline_user_agents", + "console_sandbox_access", + "conprof_applications", + "conprof_application_filters", + "conprof_timeline", + "conprof_flamegraph" + ], + "properties": { + "_self": { + "description": "Link to this entrypoint resource", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "URL to this resource", + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123def456/environments/main/observability" + } + }, + "type": "object", + "additionalProperties": false + }, + "resources_by_service": { + "description": "Per-service resource metrics endpoints with service names as keys", + "type": "object", + "example": { + "app": { + "name": "app", + "href": "https://api.upsun.com/projects/abc123def456/environments/main/observability/resources/service/app" + }, + "database": { + "name": "database", + "href": "https://api.upsun.com/projects/abc123def456/environments/main/observability/resources/service/database" + } + }, + "additionalProperties": { + "required": [ + "name", + "href" + ], + "properties": { + "name": { + "description": "Service name", + "type": "string", + "example": "app" + }, + "href": { + "description": "URL to service metrics endpoint", + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123def456/environments/main/observability/resources/service/app" + } + }, + "type": "object", + "additionalProperties": false + } + }, + "resources_overview": { + "required": [ + "href" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123def456/environments/main/observability/resources/overview" + } + }, + "type": "object", + "additionalProperties": false + }, + "resources_summary": { + "required": [ + "href" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123def456/environments/main/observability/resources/summary" + } + }, + "type": "object", + "additionalProperties": false + }, + "blackfire_php_server_caches": { + "required": [ + "href" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123def456/environments/main/observability/server/caches" + } + }, + "type": "object", + "additionalProperties": false + }, + "blackfire_server_global": { + "required": [ + "href" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123def456/environments/main/observability/server" + } + }, + "type": "object", + "additionalProperties": false + }, + "blackfire_server_transactions_breakdown": { + "required": [ + "href" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123def456/environments/main/observability/server/transactions-break-down" + } + }, + "type": "object", + "additionalProperties": false + }, + "logs_query": { + "required": [ + "href" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123def456/environments/main/observability/logs/query" + } + }, + "type": "object", + "additionalProperties": false + }, + "logs_overview": { + "required": [ + "href" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123def456/environments/main/observability/logs/overview" + } + }, + "type": "object", + "additionalProperties": false + }, + "http_metrics_timeline_urls": { + "required": [ + "href" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123def456/environments/main/observability/http/breakdown/urls" + } + }, + "type": "object", + "additionalProperties": false + }, + "http_metrics_timeline_ips": { + "required": [ + "href" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123def456/environments/main/observability/http/breakdown/ips" + } + }, + "type": "object", + "additionalProperties": false + }, + "http_metrics_timeline_user_agents": { + "required": [ + "href" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123def456/environments/main/observability/http/breakdown/user-agents" + } + }, + "type": "object", + "additionalProperties": false + }, + "console_sandbox_access": { + "required": [ + "href" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123def456/environments/main/observability/console/sandbox-access" + } + }, + "type": "object", + "additionalProperties": false + }, + "conprof_applications": { + "required": [ + "href" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123def456/environments/main/continuous-profiling" + } + }, + "type": "object", + "additionalProperties": false + }, + "conprof_application_filters": { + "required": [ + "href" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123def456/environments/main/continuous-profiling/app/myapp/filter" + } + }, + "type": "object", + "additionalProperties": false + }, + "conprof_timeline": { + "required": [ + "href" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123def456/environments/main/continuous-profiling/app/myapp" + } + }, + "type": "object", + "additionalProperties": false + }, + "conprof_flamegraph": { + "required": [ + "href" + ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.upsun.com/projects/abc123def456/environments/main/continuous-profiling/app/myapp/merge" + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + }, + "retention": { + "description": "DEPRECATED: Data retention periods in minutes per resource type. Use data_retention instead.", + "required": [ + "resources", + "logs", + "http_traffic", + "continuous_profiling" + ], + "properties": { + "resources": { + "type": "integer", + "example": 43200 + }, + "logs": { + "type": "integer", + "example": 43200 + }, + "http_traffic": { + "type": "integer", + "example": 43200 + }, + "continuous_profiling": { + "type": "integer", + "example": 80640 + } + }, + "type": "object", + "additionalProperties": false + }, + "data_retention": { + "description": "Data retention policies per metric type with periods in minutes", + "required": [ + "_unit", + "_unit_in_seconds", + "resources", + "server_monitoring", + "logs", + "http_traffic", + "continuous_profiling" + ], + "properties": { + "_unit": { + "description": "Time unit for all retention values", + "type": "string", + "example": "minute" + }, + "_unit_in_seconds": { + "description": "Unit conversion to seconds", + "type": "integer", + "example": 60 + }, + "resources": { + "description": "Resource metrics retention policy in minutes", + "required": [ + "retention_period", + "max_range", + "recommended_default_range" + ], + "properties": { + "retention_period": { + "description": "Data storage duration in minutes", + "type": "integer", + "example": 43200 + }, + "max_range": { + "description": "Maximum query time range in minutes", + "type": "integer", + "example": 43200 + }, + "recommended_default_range": { + "description": "Recommended default query time range in minutes, for user interfaces", + "type": "integer", + "example": 43200 + } + }, + "type": "object", + "additionalProperties": false + }, + "server_monitoring": { + "description": "Server monitoring retention policy in minutes", + "required": [ + "retention_period", + "max_range", + "recommended_default_range" + ], + "properties": { + "retention_period": { + "description": "Data storage duration in minutes", + "type": "integer", + "example": 80640 + }, + "max_range": { + "description": "Maximum query time range in minutes", + "type": "integer", + "example": 20160 + }, + "recommended_default_range": { + "description": "Recommended default query time range in minutes, for user interfaces", + "type": "integer", + "example": 1440 + } + }, + "type": "object", + "additionalProperties": false + }, + "logs": { + "description": "Logs retention policy in minutes", + "required": [ + "retention_period", + "max_range", + "recommended_default_range" + ], + "properties": { + "retention_period": { + "description": "Data storage duration in minutes", + "type": "integer", + "example": 43200 + }, + "max_range": { + "description": "Maximum query time range in minutes", + "type": "integer", + "example": 43200 + }, + "recommended_default_range": { + "description": "Recommended default query time range in minutes, for user interfaces", + "type": "integer", + "example": 43200 + } + }, + "type": "object", + "additionalProperties": false + }, + "http_traffic": { + "description": "HTTP traffic retention policy in minutes", + "required": [ + "retention_period", + "max_range", + "recommended_default_range" + ], + "properties": { + "retention_period": { + "description": "Data storage duration in minutes", + "type": "integer", + "example": 43200 + }, + "max_range": { + "description": "Maximum query time range in minutes", + "type": "integer", + "example": 43200 + }, + "recommended_default_range": { + "description": "Recommended default query time range in minutes, for user interfaces", + "type": "integer", + "example": 43200 + } + }, + "type": "object", + "additionalProperties": false + }, + "continuous_profiling": { + "description": "Continuous profiling retention policy in minutes", + "required": [ + "retention_period", + "max_range", + "recommended_default_range" + ], + "properties": { + "retention_period": { + "description": "Data storage duration in minutes", + "type": "integer", + "example": 43200 + }, + "max_range": { + "description": "Maximum query time range in minutes", + "type": "integer", + "example": 43200 + }, + "recommended_default_range": { + "description": "Recommended default query time range in minutes, for user interfaces", + "type": "integer", + "example": 43200 + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + } + } + } + }, + "403": { + "description": "Forbidden - Access denied due to insufficient permissions, or the requested project/environment does not exist (to prevent information disclosure)" + } + } + } + }, + "/projects/{projectId}/environments": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-environments", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentCollection" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Get list of project environments", + "description": "Retrieve a list of a project's existing environments and the\ninformation associated with each environment.\n" + } + }, + "/projects/{projectId}/environments/{environmentId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "get-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Environment" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Get an environment", + "description": "Retrieve the details of a single existing environment." + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentPatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "update-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Update an environment", + "description": "Update the details of a single existing environment." + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "delete-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Delete an environment", + "description": "Delete a specified environment." + } + }, + "/projects/{projectId}/environments/{environmentId}/activate": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "activate-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentActivateInput" + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Activate an environment", + "description": "Set the specified environment's status to active" + } + }, + "/projects/{projectId}/environments/{environmentId}/branch": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "branch-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentBranchInput" + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Branch an environment", + "description": "Create a new environment as a branch of the current environment.\n" + } + }, + "/projects/{projectId}/environments/{environmentId}/deactivate": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "deactivate-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Deactivate an environment", + "description": "Destroy all services and data running on this environment so that\nonly the Git branch remains. The environment can be reactivated\nlater at any time; reactivating an environment will sync data\nfrom the parent environment and redeploy.\n\n**NOTE: ALL DATA IN THIS ENVIRONMENT WILL BE IRREVOCABLY LOST**\n" + } + }, + "/projects/{projectId}/environments/{environmentId}/deploy": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "deploy-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentDeployInput" + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Deploy an environment", + "description": "Trigger a controlled [manual deployment](https://docs.upsun.com/learn/overview/build-deploy.html#manual-deployment)\nto release all the staged changes\n" + } + }, + "/projects/{projectId}/environments/{environmentId}/initialize": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "initialize-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentInitializeInput" + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Initialize a new environment", + "description": "Initialize and configure a new environment with an existing repository.\nThe payload is the url of a git repository with a profile name:\n\n```\n{\n \"repository\": \"git@github.com:platformsh/a-project-template.git@master\",\n \"profile\": \"Example Project\",\n \"files\": [\n {\n \"mode\": 0600,\n \"path\": \"config.json\",\n \"contents\": \"XXXXXXXX\"\n }\n ]\n}\n```\nIt can optionally carry additional files that will be committed to the\nrepository, the POSIX file mode to set on each file, and the base64-encoded\ncontents of each file.\n\nThis endpoint can also add a second repository\nURL in the `config` parameter that will be added to the contents of the first.\nThis allows you to put your application in one repository and the Upsun\nYAML configuration files in another.\n" + } + }, + "/projects/{projectId}/environments/{environmentId}/maintenance-redeploy": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "maintenance-redeploy-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment" + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/merge": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "merge-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentMergeInput" + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Merge an environment", + "description": "Merge an environment into its parent. This means that code changes\nfrom the branch environment will be merged into the parent branch, and\nthe parent branch will be rebuilt and deployed with the new code changes,\nretaining the existing data in the parent environment.\n" + } + }, + "/projects/{projectId}/environments/{environmentId}/pause": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "pause-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Pause an environment", + "description": "Pause an environment, stopping all services and applications (except the router).\n\nDevelopment environments are often used for a limited time and then abandoned.\nTo prevent unnecessary consumption of resources, development environments that\nhaven't been redeployed in 14 days are automatically paused.\n\nYou can pause an environment manually at any time using this endpoint. Further\ninformation is available in our [public documentation](https://docs.upsun.com/anchors/environments/paused/).\n" + } + }, + "/projects/{projectId}/environments/{environmentId}/redeploy": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "redeploy-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Redeploy an environment", + "description": "Trigger the redeployment sequence of an environment." + } + }, + "/projects/{projectId}/environments/{environmentId}/resume": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "resume-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Resume a paused environment", + "description": "Resume a paused environment, restarting all services and applications.\n\nDevelopment environments that haven't been used for 14 days will be paused\nautomatically. They can be resumed via a redeployment or manually using this\nendpoint or the CLI as described in the [public documentation](https://docs.upsun.com/anchors/environments/paused/).\n" + } + }, + "/projects/{projectId}/environments/{environmentId}/synchronize": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "synchronize-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentSynchronizeInput" + } + } + } + }, + "tags": [ + "Environment" + ], + "summary": "Synchronize a child environment with its parent", + "description": "This synchronizes the code and/or data of an environment with that of\nits parent, then redeploys the environment. Synchronization is only\npossible if a branch has no unmerged commits and it can be fast-forwarded.\n\nIf data synchronization is specified, the data in the environment will\nbe overwritten with that of its parent.\n" + } + }, + "/projects/{projectId}/environments/{environmentId}/activities": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "list-projects-environments-activities", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivityCollection" + } + } + } + } + }, + "tags": [ + "Environment Activity" + ], + "summary": "Get environment activity log", + "description": "Retrieve an environment's activity log. This returns a list of object\nwith records of actions such as:\n\n- Commits being pushed to the repository\n- A new environment being branched out from the specified environment\n- A snapshot being created of the specified environment\n\nThe object includes a timestamp of when the action occurred\n(`created_at`), when the action concluded (`updated_at`),\nthe current `state` of the action, the action's completion\npercentage (`completion_percent`), and other related information in\nthe `payload`.\n\nThe contents of the `payload` varies based on the `type` of the\nactivity. For example:\n\n- An `environment.branch` action's `payload` can contain objects\nrepresenting the `parent` environment and the branching action's\n`outcome`.\n\n- An `environment.push` action's `payload` can contain objects\nrepresenting the `environment`, the specific `commits` included in\nthe push, and the `user` who pushed.\n" + } + }, + "/projects/{projectId}/environments/{environmentId}/activities/{activityId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "activityId" + } + ], + "operationId": "get-projects-environments-activities", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Activity" + } + } + } + } + }, + "tags": [ + "Environment Activity" + ], + "summary": "Get an environment activity log entry", + "description": "Retrieve a single environment activity entry as specified by an\n`id` returned by the\n[Get environment activities list](#tag/Environment-Activity%2Fpaths%2F~1projects~1%7BprojectId%7D~1environments~1%7BenvironmentId%7D~1activities%2Fget)\nendpoint. See the documentation on that endpoint for details about\nthe information this endpoint can return.\n" + } + }, + "/projects/{projectId}/environments/{environmentId}/activities/{activityId}/cancel": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "activityId" + } + ], + "operationId": "action-projects-environments-activities-cancel", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment Activity" + ], + "summary": "Cancel an environment activity", + "description": "Cancel a single activity as specified by an `id` returned by the\n[Get environment activities list](#tag/Environment-Activity%2Fpaths%2F~1projects~1%7BprojectId%7D~1environments~1%7BenvironmentId%7D~1activities%2Fget)\nendpoint.\n\nPlease note that not all activities are cancelable.\n" + } + }, + "/projects/{projectId}/environments/{environmentId}/backup": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "backup-environment", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentBackupInput" + } + } + } + }, + "tags": [ + "Environment Backups" + ], + "summary": "Create backup of environment", + "description": "Trigger a new backup of an environment to be created. See the\n[Backups](https://docs.upsun.com/anchors/environments/backup/)\nsection of the documentation for more information.\n" + } + }, + "/projects/{projectId}/environments/{environmentId}/backups": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "list-projects-environments-backups", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BackupCollection" + } + } + } + } + }, + "tags": [ + "Environment Backups" + ], + "summary": "Get an environment's backup list", + "description": "Retrieve a list of objects representing backups of this environment.\n", + "x-stability": "EXPERIMENTAL" + } + }, + "/projects/{projectId}/environments/{environmentId}/backups/{backupId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "backupId" + } + ], + "operationId": "get-projects-environments-backups", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Backup" + } + } + } + } + }, + "tags": [ + "Environment Backups" + ], + "summary": "Get an environment backup's info", + "description": "Get the details of a specific backup from an environment using the `id`\nof the entry retrieved by the\n[Get backups list](#tag/Environment-Backups%2Fpaths%2F~1projects~1%7BprojectId%7D~1environments~1%7BenvironmentId%7D~1backups%2Fget)\nendpoint.\n", + "x-stability": "EXPERIMENTAL" + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "backupId" + } + ], + "operationId": "delete-projects-environments-backups", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment Backups" + ], + "summary": "Delete an environment backup", + "description": "Delete a specific backup from an environment using the `id`\nof the entry retrieved by the\n[Get backups list](#tag/Environment-Backups%2Fpaths%2F~1projects~1%7BprojectId%7D~1environments~1%7BenvironmentId%7D~1backups%2Fget)\nendpoint.\n", + "x-stability": "EXPERIMENTAL" + } + }, + "/projects/{projectId}/environments/{environmentId}/backups/{backupId}/restore": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "backupId" + } + ], + "operationId": "restore-backup", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentRestoreInput" + } + } + } + }, + "tags": [ + "Environment Backups" + ], + "summary": "Restore an environment snapshot", + "description": "Restore a specific backup from an environment using the `id`\nof the entry retrieved by the\n[Get backups list](#tag/Environment-Backups%2Fpaths%2F~1projects~1%7BprojectId%7D~1environments~1%7BenvironmentId%7D~1backups%2Fget)\nendpoint.\n", + "x-stability": "EXPERIMENTAL" + } + }, + "/projects/{projectId}/environment-types": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-environment-types", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentTypeCollection" + } + } + } + } + }, + "tags": [ + "Environment Type" + ], + "summary": "Get environment types", + "description": "List all available environment types" + } + }, + "/projects/{projectId}/environment-types/{environmentTypeId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentTypeId" + } + ], + "operationId": "get-environment-type", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentType" + } + } + } + } + }, + "tags": [ + "Environment Type" + ], + "summary": "Get environment type links", + "description": "Lists the endpoints used to retrieve info about the environment type." + } + }, + "/projects/{projectId}/environments/{environmentId}/variables": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "list-projects-environments-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariableCollection" + } + } + } + } + }, + "tags": [ + "Environment Variables" + ], + "summary": "Get list of environment variables", + "description": "Retrieve a list of objects representing the user-defined variables\nwithin an environment.\n" + }, + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "create-projects-environments-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariableCreateInput" + } + } + } + }, + "tags": [ + "Environment Variables" + ], + "summary": "Add an environment variable", + "description": "Add a variable to an environment. The `value` can be either a string or a JSON\nobject (default: string), as specified by the `is_json` boolean flag.\nAdditionally, the inheritability of an environment variable can be\ndetermined through the `is_inheritable` flag (default: true).\nSee the [Environment Variables](https://docs.upsun.com/anchors/variables/set/environment/create/)\nsection in our documentation for more information.\n" + } + }, + "/projects/{projectId}/environments/{environmentId}/variables/{variableId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "variableId" + } + ], + "operationId": "get-projects-environments-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariable" + } + } + } + } + }, + "tags": [ + "Environment Variables" + ], + "summary": "Get an environment variable", + "description": "Retrieve a single user-defined environment variable." + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariablePatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "variableId" + } + ], + "operationId": "update-projects-environments-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment Variables" + ], + "summary": "Update an environment variable", + "description": "Update a single user-defined environment variable.\nThe `value` can be either a string or a JSON\nobject (default: string), as specified by the `is_json` boolean flag.\nAdditionally, the inheritability of an environment variable can be\ndetermined through the `is_inheritable` flag (default: true).\nSee the [Variables](https://docs.upsun.com/anchors/variables/)\nsection in our documentation for more information.\n" + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "variableId" + } + ], + "operationId": "delete-projects-environments-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Environment Variables" + ], + "summary": "Delete an environment variable", + "description": "Delete a single user-defined environment variable." + } + }, + "/users/{user_id}/extended-access": { + "get": { + "summary": "List extended access of a user", + "description": "List extended access of the given user, which includes both individual and team access to project and organization.", + "operationId": "list-user-extended-access", + "tags": [ + "Grants" + ], + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + }, + { + "in": "query", + "name": "filter[resource_type]", + "description": "Allows filtering by `resource_type` (project or organization) using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[organization_id]", + "description": "Allows filtering by `organization_id` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[permissions]", + "description": "Allows filtering by `permissions` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "x-examples": { + "example-1": { + "user_id": "ff9c8376-0227-4928-9b52-b08bc5426689", + "resource_id": "an3sjsfwfbgkm", + "resource_type": "project", + "organization_id": "01H2X80DMRDZWR6CX753YQHTND", + "granted_at": "2022-04-01T10:11:30.783289Z", + "updated_at": "2022-04-03T22:12:59.937864Z", + "permissions": [ + "viewer", + "staging:contributor" + ] + } + }, + "properties": { + "user_id": { + "type": "string", + "format": "uuid", + "description": "The ID of the user." + }, + "resource_id": { + "type": "string", + "description": "The ID of the resource." + }, + "resource_type": { + "type": "string", + "description": "The type of the resource access to which is granted.", + "enum": [ + "project", + "organization" + ] + }, + "organization_id": { + "type": "string", + "description": "The ID of the organization owning the resource." + }, + "permissions": { + "type": "array", + "description": "List of project permissions.", + "items": { + "type": "string" + } + }, + "granted_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the access was granted." + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the access was updated." + } + } + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/access/{access_id}": { + "get": { + "summary": "Get access document by access ID", + "description": "Returns the full access document referenced by token claim `access_id`.", + "operationId": "get-access-document", + "tags": [ + "Grants" + ], + "parameters": [ + { + "in": "path", + "name": "access_id", + "required": true, + "description": "Access document identifier.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Full access document." + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/urls": { + "get": { + "tags": [ + "Http Traffic" + ], + "summary": "Get HTTP traffic timeline by URL", + "description": "Returns HTTP traffic analytics with URLs ranked by impact (response time × request count), aggregated metrics (average, median, p96 response times in milliseconds), status code distributions, and time-series data. Use limit parameter to control total items returned (default: 200, max: 300) and top_hits_count to control how many items are flagged as top hits and tracked in the timeline (default: 10, max: 15). Items with index < top_hits_count are flagged with top_hit: true and tracked in top_hits_timeline; the remainder (up to limit) are returned with top_hit: false.", + "operationId": "http_metrics_timeline_urls", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The unique identifier of the Upsun project", + "required": true, + "schema": { + "type": "string", + "pattern": "[a-z0-9]+", + "example": "abc123def456" + } + }, + { + "name": "environmentId", + "in": "path", + "description": "The environment identifier", + "required": true, + "schema": { + "type": "string", + "pattern": ".+", + "example": "main" + } + }, + { + "name": "from", + "in": "query", + "description": "Start timestamp for the time range (Unix timestamp in seconds)", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "example": 1704067200 + } + }, + { + "name": "to", + "in": "query", + "description": "End timestamp for the time range (Unix timestamp in seconds)", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "example": 1704153600 + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of items to return (default: 200, max: 300)", + "required": false, + "schema": { + "type": "integer", + "default": null, + "maximum": 300, + "minimum": 1 + } + }, + { + "name": "top_hits_count", + "in": "query", + "description": "Number of items to flag as top hits and track in the timeline (default: 10, max: 15). Items with index < top_hits_count have top_hit=true; the remainder up to limit are returned with top_hit=false.", + "required": false, + "schema": { + "type": "integer", + "default": null, + "maximum": 15, + "minimum": 1 + } + }, + { + "name": "applications[]", + "in": "query", + "description": "Filter by application. Can be specified multiple times for multiple values (e.g., ?applications[]=app1&applications[]=app2). Use applications_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "app" + } + } + }, + { + "name": "applications_mode", + "in": "query", + "description": "Filter mode for applications parameter. \"1\" (additive) includes only specified applications. \"-1\" (subtractive) excludes specified applications and includes all others. When omitted: defaults to \"-1\" if no applications values are provided; defaults to \"1\" (additive) if at least one applications value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "methods[]", + "in": "query", + "description": "Filter by HTTP methods. Can be specified multiple times for multiple values (e.g., ?methods[]=GET&methods[]=POST). Use methods_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "GET", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "HEAD", + "OPTIONS" + ] + } + } + }, + { + "name": "methods_mode", + "in": "query", + "description": "Filter mode for methods parameter. \"1\" (additive) includes only specified methods. \"-1\" (subtractive) excludes specified methods and includes all others. When omitted: defaults to \"-1\" if no methods values are provided; defaults to \"1\" (additive) if at least one methods value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "domains[]", + "in": "query", + "description": "Filter by request domains/hosts. Can be specified multiple times for multiple values (e.g., ?domains[]=api.example.com&domains[]=www.example.com). Use domains_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "api.example.com" + } + } + }, + { + "name": "domains_mode", + "in": "query", + "description": "Filter mode for domains parameter. \"1\" (additive) includes only specified domains. \"-1\" (subtractive) excludes specified domains and includes all others. When omitted: defaults to \"-1\" if no domains values are provided; defaults to \"1\" (additive) if at least one domains value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "code_slots[]", + "in": "query", + "description": "Filter by HTTP status code groups. Can be specified multiple times for multiple values (e.g., ?code_slots[]=4XX&code_slots[]=5XX). Use code_slots_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "2XX", + "enum": [ + "1XX", + "2XX", + "3XX", + "4XX", + "5XX" + ] + } + } + }, + { + "name": "code_slots_mode", + "in": "query", + "description": "Filter mode for code_slots parameter. \"1\" (additive) includes only specified code groups. \"-1\" (subtractive) excludes specified code groups and includes all others. When omitted: defaults to \"-1\" if no code_slots values are provided; defaults to \"1\" (additive) if at least one code_slots value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "codes[]", + "in": "query", + "description": "Filter by specific HTTP status codes. Can be specified multiple times for multiple values (e.g., ?codes[]=200&codes[]=404). Use codes_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "200" + } + } + }, + { + "name": "codes_mode", + "in": "query", + "description": "Filter mode for codes parameter. \"1\" (additive) includes only specified codes. \"-1\" (subtractive) excludes specified codes and includes all others. When omitted: defaults to \"-1\" if no codes values are provided; defaults to \"1\" (additive) if at least one codes value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "request_duration_slots[]", + "in": "query", + "description": "Filter by response time ranges (in milliseconds). Can be specified multiple times for multiple values (e.g., ?request_duration_slots[]=0-50&request_duration_slots[]=1600+). Use request_duration_slots_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "0-50", + "enum": [ + "0-50", + "50-100", + "100-200", + "200-400", + "400-800", + "800-1600", + "1600+" + ] + } + } + }, + { + "name": "request_duration_slots_mode", + "in": "query", + "description": "Filter mode for request_duration_slots parameter. \"1\" (additive) includes only specified duration ranges. \"-1\" (subtractive) excludes specified duration ranges and includes all others. When omitted: defaults to \"-1\" if no request_duration_slots values are provided; defaults to \"1\" (additive) if at least one request_duration_slots value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + } + ], + "responses": { + "200": { + "description": "HTTP traffic timeline by URL retrieved successfully", + "content": { + "application/json": { + "schema": { + "required": [ + "_grain", + "_from", + "_to", + "_project_id", + "_environment_id", + "_environment_type", + "_branch_machine_name", + "_breakdown_limit", + "_breakdown_top_hits", + "breakdown", + "top_hits_timeline", + "filters" + ], + "properties": { + "_grain": { + "description": "Data granularity in seconds", + "type": "integer", + "example": 5 + }, + "_from": { + "description": "Query start timestamp", + "type": "integer", + "example": 1704067200 + }, + "_to": { + "description": "Query end timestamp", + "type": "integer", + "example": 1704153600 + }, + "_project_id": { + "description": "Project identifier", + "type": "string", + "example": "abc123def456" + }, + "_environment_id": { + "description": "Environment identifier", + "type": "string", + "example": "main" + }, + "_environment_type": { + "description": "Environment type", + "type": "string", + "example": "production", + "enum": [ + "production", + "staging", + "development" + ] + }, + "_branch_machine_name": { + "description": "Branch machine name", + "type": "string", + "example": "main-bvxea6i" + }, + "_breakdown_limit": { + "description": "Maximum number of items returned", + "type": "integer", + "example": 200 + }, + "_breakdown_top_hits": { + "description": "Number of items flagged as top hits (top_hit=true) and tracked in top_hits_timeline.", + "type": "integer", + "example": 10 + }, + "_applications": { + "description": "Applied application filter values", + "type": "array", + "items": { + "type": "string", + "example": "app" + }, + "nullable": true + }, + "_applications_mode": { + "description": "Application filter mode (1=additive, -1=subtractive)", + "type": "string", + "nullable": true, + "enum": [ + "1", + "-1" + ] + }, + "_methods": { + "description": "Applied method filter values", + "type": "array", + "items": { + "type": "string", + "example": "GET" + }, + "nullable": true + }, + "_methods_mode": { + "description": "Method filter mode (1=additive, -1=subtractive)", + "type": "string", + "nullable": true, + "enum": [ + "1", + "-1" + ] + }, + "_domains": { + "description": "Applied domain filter values", + "type": "array", + "items": { + "type": "string", + "example": "example.com" + }, + "nullable": true + }, + "_domains_mode": { + "description": "Domain filter mode (1=additive, -1=subtractive)", + "type": "string", + "nullable": true, + "enum": [ + "1", + "-1" + ] + }, + "_code_slots": { + "description": "Applied code slot filter values", + "type": "array", + "items": { + "type": "string", + "example": "2XX" + }, + "nullable": true + }, + "_code_slots_mode": { + "description": "Code slot filter mode (1=additive, -1=subtractive)", + "type": "string", + "nullable": true, + "enum": [ + "1", + "-1" + ] + }, + "_codes": { + "description": "Applied HTTP status code filter values", + "type": "array", + "items": { + "type": "string", + "example": "200" + }, + "nullable": true + }, + "_codes_mode": { + "description": "Code filter mode (1=additive, -1=subtractive)", + "type": "string", + "nullable": true, + "enum": [ + "1", + "-1" + ] + }, + "_request_duration_slots": { + "description": "Applied request duration slot filter values", + "type": "array", + "items": { + "type": "string", + "example": "0-100" + }, + "nullable": true + }, + "_request_duration_slots_mode": { + "description": "Request duration slot filter mode (1=additive, -1=subtractive)", + "type": "string", + "nullable": true, + "enum": [ + "1", + "-1" + ] + }, + "breakdown": { + "description": "URLs ranked by impact", + "required": [ + "kind", + "total", + "data" + ], + "properties": { + "kind": { + "description": "The kind of grouping", + "type": "string", + "example": "url", + "enum": [ + "url" + ] + }, + "total": { + "description": "Total request count across all URLs", + "type": "integer", + "example": 396519 + }, + "data": { + "description": "List of URLs ranked by impact. Items with index < top_hits_count are tracked in top_hits_timeline (flagged with top_hit: true); the remainder are returned for reference only.", + "type": "array", + "items": { + "required": [ + "url", + "method", + "impact", + "average", + "p_50", + "p_96", + "count", + "top_hit" + ], + "properties": { + "url": { + "description": "Request URL", + "type": "string", + "example": "https://example.com/api/products" + }, + "method": { + "description": "HTTP method", + "type": "string", + "example": "GET", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "HEAD", + "OPTIONS" + ] + }, + "impact": { + "description": "Performance impact score (ms x count)", + "type": "number", + "format": "float", + "example": 15234.67, + "nullable": true + }, + "average": { + "description": "Average response time in milliseconds", + "type": "number", + "format": "float", + "example": 245.3 + }, + "p_50": { + "description": "Median (50th percentile) response time in milliseconds", + "type": "number", + "format": "float", + "example": 198.5 + }, + "p_96": { + "description": "96th percentile response time in milliseconds", + "type": "number", + "format": "float", + "example": 512.8 + }, + "count": { + "description": "Total number of requests", + "type": "integer", + "example": 62143 + }, + "top_hit": { + "description": "Whether this URL is tracked in top_hits_timeline", + "type": "boolean", + "example": true + } + }, + "type": "object", + "additionalProperties": false + }, + "example": [ + { + "url": "https://example.com/api/products", + "method": "GET", + "impact": 15234.67, + "average": 245.3, + "p_50": 198.5, + "p_96": 512.8, + "count": 62143, + "top_hit": true + }, + { + "url": "https://example.com/api/orders", + "method": "POST", + "impact": 6543.21, + "average": 312.5, + "p_50": 267.8, + "p_96": 678.4, + "count": 20945, + "top_hit": false + } + ] + } + }, + "type": "object", + "additionalProperties": false + }, + "top_hits_timeline": { + "description": "Time-series data for top hit URLs", + "required": [ + "data" + ], + "properties": { + "data": { + "description": "Time-series HTTP traffic metrics for top hit URLs. Fields are omitted for timestamps with no data.", + "type": "array", + "items": { + "required": [ + "timestamp" + ], + "properties": { + "timestamp": { + "description": "Data point timestamp", + "type": "integer", + "example": 1704067200 + }, + "_total_consumed": { + "description": "Total wall-time consumed across all URLs at this interval", + "type": "number", + "format": "float", + "example": 5678.9 + }, + "_total_count": { + "description": "Total request count at this timestamp", + "type": "integer", + "example": 4120 + }, + "request_size": { + "description": "Total request payload size in bytes", + "type": "integer", + "example": 524288 + }, + "response_size": { + "description": "Total response payload size in bytes", + "type": "integer", + "example": 2097152 + }, + "urls": { + "description": "Per-URL metrics at this timestamp. Only includes top hit items.", + "type": "object", + "example": { + "GET-https://example.com/api/products": { + "count": 1543, + "impact": 378.45 + } + }, + "additionalProperties": { + "required": [ + "count", + "impact" + ], + "properties": { + "count": { + "description": "Request count for this URL", + "type": "integer", + "example": 1543 + }, + "impact": { + "description": "Performance impact score", + "type": "number", + "format": "float", + "example": 378.45, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + } + }, + "codes": { + "description": "HTTP status code distribution", + "required": [ + "UNKNOWN", + "1XX", + "2XX", + "3XX", + "4XX", + "5XX" + ], + "properties": { + "UNKNOWN": { + "description": "Count of unknown/unclassified status codes", + "type": "integer", + "example": 0 + }, + "1XX": { + "description": "Count of informational responses (100-199)", + "type": "integer", + "example": 0 + }, + "2XX": { + "description": "Count of successful responses (200-299)", + "type": "integer", + "example": 58234 + }, + "3XX": { + "description": "Count of redirect responses (300-399)", + "type": "integer", + "example": 1245 + }, + "4XX": { + "description": "Count of client error responses (400-499)", + "type": "integer", + "example": 847 + }, + "5XX": { + "description": "Count of server error responses (500-599)", + "type": "integer", + "example": 23 + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + }, + "example": [ + { + "timestamp": 1704067200, + "_total_consumed": 5678.9, + "_total_count": 1543, + "request_size": 524288, + "response_size": 2097152, + "urls": { + "GET-https://example.com/api/products": { + "count": 1543, + "impact": 378.45 + } + }, + "codes": { + "UNKNOWN": 0, + "1XX": 0, + "2XX": 1543, + "3XX": 0, + "4XX": 0, + "5XX": 0 + } + }, + { + "timestamp": 1704070800 + } + ] + } + }, + "type": "object", + "additionalProperties": false + }, + "filters": { + "required": [ + "max_applicable_filters" + ], + "properties": { + "fields": { + "type": "object", + "example": { + "severity": { + "distinct_values": 3, + "type": "string", + "values": [ + { + "value": "INFO", + "count": 297 + }, + { + "value": "ERROR", + "count": 2 + } + ] + } + }, + "additionalProperties": { + "required": [ + "distinct_values", + "type", + "values" + ], + "properties": { + "distinct_values": { + "type": "integer", + "example": 5 + }, + "type": { + "type": "string", + "example": "string" + }, + "values": { + "type": "array", + "items": { + "required": [ + "value", + "count" + ], + "properties": { + "value": { + "type": "string", + "example": "INFO" + }, + "count": { + "type": "integer", + "example": 297 + } + }, + "type": "object", + "additionalProperties": false + } + } + }, + "type": "object", + "additionalProperties": false + } + }, + "max_applicable_filters": { + "type": "integer", + "example": 45 + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Bad request - Invalid parameters. Please consult the API documentation to fix the request parameters.", + "content": { + "application/json": { + "schema": { + "required": [ + "type", + "title", + "status", + "violations" + ], + "properties": { + "type": { + "description": "RFC 2616 reference URL identifying the error type", + "type": "string", + "format": "uri", + "example": "https://tools.ietf.org/html/rfc2616#section-1" + }, + "title": { + "description": "Human-readable summary of the validation error", + "type": "string", + "example": "Please ensure parameters are correct." + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "violations": { + "description": "Map of parameter names to their validation errors. Each parameter can have multiple error messages.", + "type": "object", + "example": { + "grain": [ + "Grain can not be larger than the selection windows." + ], + "from": [ + "The from timestamp must be in the past." + ], + "to": [ + "The to timestamp must be greater than the from timestamp." + ] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "The from timestamp must be in the past." + } + } + } + }, + "type": "object", + "additionalProperties": false + } + } + } + }, + "403": { + "description": "Forbidden - Access denied due to insufficient permissions, or the requested project/environment does not exist (to prevent information disclosure)" + }, + "499": { + "description": "Too much data fetched - The query is attempting to retrieve too much data. Please narrow down the query by reducing the time range or adding more specific filters to retrieve less data.", + "content": { + "application/json": { + "schema": { + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "example": "Too much data fetched" + }, + "message": { + "type": "string", + "example": "Please reduce the time range or add more filters to narrow down the query" + } + }, + "type": "object", + "additionalProperties": false + } + } + } + } + } + } + }, + "/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/ips": { + "get": { + "tags": [ + "Http Traffic" + ], + "summary": "Get HTTP traffic timeline by IP", + "description": "Returns HTTP traffic analytics grouped by IP address with IPs ranked by impact (response time × request count). Use limit parameter to control total items returned (default: 200, max: 300) and top_hits_count to control how many items are flagged as top hits and tracked in the timeline (default: 10, max: 15). Items with index < top_hits_count are flagged with top_hit: true and tracked in top_hits_timeline; the remainder (up to limit) are returned with top_hit: false.", + "operationId": "http_metrics_timeline_ips", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The unique identifier of the Upsun project", + "required": true, + "schema": { + "type": "string", + "pattern": "[a-z0-9]+", + "example": "abc123def456" + } + }, + { + "name": "environmentId", + "in": "path", + "description": "The environment identifier", + "required": true, + "schema": { + "type": "string", + "pattern": ".+", + "example": "main" + } + }, + { + "name": "from", + "in": "query", + "description": "Start timestamp for the time range (Unix timestamp in seconds)", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "example": 1704067200 + } + }, + { + "name": "to", + "in": "query", + "description": "End timestamp for the time range (Unix timestamp in seconds)", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "example": 1704153600 + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of items to return (default: 200, max: 300)", + "required": false, + "schema": { + "type": "integer", + "default": null, + "maximum": 300, + "minimum": 1 + } + }, + { + "name": "top_hits_count", + "in": "query", + "description": "Number of items to flag as top hits and track in the timeline (default: 10, max: 15). Items with index < top_hits_count have top_hit=true; the remainder up to limit are returned with top_hit=false.", + "required": false, + "schema": { + "type": "integer", + "default": null, + "maximum": 15, + "minimum": 1 + } + }, + { + "name": "applications[]", + "in": "query", + "description": "Filter by application. Can be specified multiple times for multiple values (e.g., ?applications[]=app1&applications[]=app2). Use applications_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "app" + } + } + }, + { + "name": "applications_mode", + "in": "query", + "description": "Filter mode for applications parameter. \"1\" (additive) includes only specified applications. \"-1\" (subtractive) excludes specified applications and includes all others. When omitted: defaults to \"-1\" if no applications values are provided; defaults to \"1\" (additive) if at least one applications value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "methods[]", + "in": "query", + "description": "Filter by HTTP methods. Can be specified multiple times for multiple values (e.g., ?methods[]=GET&methods[]=POST). Use methods_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "GET", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "HEAD", + "OPTIONS" + ] + } + } + }, + { + "name": "methods_mode", + "in": "query", + "description": "Filter mode for methods parameter. \"1\" (additive) includes only specified methods. \"-1\" (subtractive) excludes specified methods and includes all others. When omitted: defaults to \"-1\" if no methods values are provided; defaults to \"1\" (additive) if at least one methods value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "domains[]", + "in": "query", + "description": "Filter by request domains/hosts. Can be specified multiple times for multiple values (e.g., ?domains[]=api.example.com&domains[]=www.example.com). Use domains_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "api.example.com" + } + } + }, + { + "name": "domains_mode", + "in": "query", + "description": "Filter mode for domains parameter. \"1\" (additive) includes only specified domains. \"-1\" (subtractive) excludes specified domains and includes all others. When omitted: defaults to \"-1\" if no domains values are provided; defaults to \"1\" (additive) if at least one domains value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "code_slots[]", + "in": "query", + "description": "Filter by HTTP status code groups. Can be specified multiple times for multiple values (e.g., ?code_slots[]=4XX&code_slots[]=5XX). Use code_slots_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "2XX", + "enum": [ + "1XX", + "2XX", + "3XX", + "4XX", + "5XX" + ] + } + } + }, + { + "name": "code_slots_mode", + "in": "query", + "description": "Filter mode for code_slots parameter. \"1\" (additive) includes only specified code groups. \"-1\" (subtractive) excludes specified code groups and includes all others. When omitted: defaults to \"-1\" if no code_slots values are provided; defaults to \"1\" (additive) if at least one code_slots value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "codes[]", + "in": "query", + "description": "Filter by specific HTTP status codes. Can be specified multiple times for multiple values (e.g., ?codes[]=200&codes[]=404). Use codes_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "200" + } + } + }, + { + "name": "codes_mode", + "in": "query", + "description": "Filter mode for codes parameter. \"1\" (additive) includes only specified codes. \"-1\" (subtractive) excludes specified codes and includes all others. When omitted: defaults to \"-1\" if no codes values are provided; defaults to \"1\" (additive) if at least one codes value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "request_duration_slots[]", + "in": "query", + "description": "Filter by response time ranges (in milliseconds). Can be specified multiple times for multiple values (e.g., ?request_duration_slots[]=0-50&request_duration_slots[]=1600+). Use request_duration_slots_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "0-50", + "enum": [ + "0-50", + "50-100", + "100-200", + "200-400", + "400-800", + "800-1600", + "1600+" + ] + } + } + }, + { + "name": "request_duration_slots_mode", + "in": "query", + "description": "Filter mode for request_duration_slots parameter. \"1\" (additive) includes only specified duration ranges. \"-1\" (subtractive) excludes specified duration ranges and includes all others. When omitted: defaults to \"-1\" if no request_duration_slots values are provided; defaults to \"1\" (additive) if at least one request_duration_slots value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + } + ], + "responses": { + "200": { + "description": "HTTP traffic timeline by IP retrieved successfully", + "content": { + "application/json": { + "schema": { + "required": [ + "_grain", + "_from", + "_to", + "_project_id", + "_environment_id", + "_environment_type", + "_branch_machine_name", + "_breakdown_limit", + "_breakdown_top_hits", + "breakdown", + "top_hits_timeline" + ], + "properties": { + "_grain": { + "description": "Data granularity in seconds", + "type": "integer", + "example": 5 + }, + "_from": { + "description": "Query start timestamp", + "type": "integer", + "example": 1704067200 + }, + "_to": { + "description": "Query end timestamp", + "type": "integer", + "example": 1704153600 + }, + "_project_id": { + "description": "Project identifier", + "type": "string", + "example": "abc123def456" + }, + "_environment_id": { + "description": "Environment identifier", + "type": "string", + "example": "main" + }, + "_environment_type": { + "description": "Environment type", + "type": "string", + "example": "production", + "enum": [ + "production", + "staging", + "development" + ] + }, + "_branch_machine_name": { + "description": "Branch machine name", + "type": "string", + "example": "main-bvxea6i" + }, + "_breakdown_limit": { + "description": "Maximum number of items returned", + "type": "integer", + "example": 200 + }, + "_breakdown_top_hits": { + "description": "Number of items flagged as top hits (top_hit=true) and tracked in top_hits_timeline.", + "type": "integer", + "example": 10 + }, + "_applications": { + "description": "Applied application filter values", + "type": "array", + "items": { + "type": "string", + "example": "app" + }, + "nullable": true + }, + "_applications_mode": { + "description": "Application filter mode (1=additive, -1=subtractive)", + "type": "string", + "nullable": true, + "enum": [ + "1", + "-1" + ] + }, + "_methods": { + "description": "Applied method filter values", + "type": "array", + "items": { + "type": "string", + "example": "GET" + }, + "nullable": true + }, + "_methods_mode": { + "description": "Method filter mode (1=additive, -1=subtractive)", + "type": "string", + "nullable": true, + "enum": [ + "1", + "-1" + ] + }, + "_domains": { + "description": "Applied domain filter values", + "type": "array", + "items": { + "type": "string", + "example": "example.com" + }, + "nullable": true + }, + "_domains_mode": { + "description": "Domain filter mode (1=additive, -1=subtractive)", + "type": "string", + "nullable": true, + "enum": [ + "1", + "-1" + ] + }, + "_code_slots": { + "description": "Applied code slot filter values", + "type": "array", + "items": { + "type": "string", + "example": "2XX" + }, + "nullable": true + }, + "_code_slots_mode": { + "description": "Code slot filter mode (1=additive, -1=subtractive)", + "type": "string", + "nullable": true, + "enum": [ + "1", + "-1" + ] + }, + "_codes": { + "description": "Applied HTTP status code filter values", + "type": "array", + "items": { + "type": "string", + "example": "200" + }, + "nullable": true + }, + "_codes_mode": { + "description": "Code filter mode (1=additive, -1=subtractive)", + "type": "string", + "nullable": true, + "enum": [ + "1", + "-1" + ] + }, + "_request_duration_slots": { + "description": "Applied request duration slot filter values", + "type": "array", + "items": { + "type": "string", + "example": "0-100" + }, + "nullable": true + }, + "_request_duration_slots_mode": { + "description": "Request duration slot filter mode (1=additive, -1=subtractive)", + "type": "string", + "nullable": true, + "enum": [ + "1", + "-1" + ] + }, + "breakdown": { + "description": "IP addresses ranked by impact", + "required": [ + "kind", + "total", + "data" + ], + "properties": { + "kind": { + "description": "The kind of grouping", + "type": "string", + "example": "ip", + "enum": [ + "ip" + ] + }, + "total": { + "description": "Total request count across all IPs", + "type": "integer", + "example": 396519 + }, + "data": { + "description": "List of items ranked by impact. Items with index < top_hits_count are tracked in top_hits_timeline (flagged with top_hit: true); the remainder are returned for reference only.", + "type": "array", + "items": { + "required": [ + "name", + "impact", + "average", + "p_50", + "p_96", + "count", + "top_hit" + ], + "properties": { + "name": { + "description": "The IP address", + "type": "string", + "example": "192.168.1.1" + }, + "impact": { + "description": "Impact score as percentage of total wall time consumed", + "type": "number", + "format": "float", + "example": 15.67 + }, + "average": { + "description": "Average request duration in seconds", + "type": "number", + "format": "float", + "example": 0.234 + }, + "p_50": { + "description": "50th percentile (median) request duration in seconds", + "type": "number", + "format": "float", + "example": 0.156 + }, + "p_96": { + "description": "96th percentile request duration in seconds", + "type": "number", + "format": "float", + "example": 0.892 + }, + "count": { + "description": "Total number of requests from this IP", + "type": "integer", + "example": 62143 + }, + "top_hit": { + "description": "Whether this item is tracked in top_hits_timeline", + "type": "boolean", + "example": true + } + }, + "type": "object", + "additionalProperties": false + }, + "example": [ + { + "name": "192.168.1.1", + "impact": 15.67, + "average": 0.234, + "p_50": 0.156, + "p_96": 0.892, + "count": 62143, + "top_hit": true + }, + { + "name": "10.0.0.5", + "impact": 12.34, + "average": 0.189, + "p_50": 0.123, + "p_96": 0.756, + "count": 48921, + "top_hit": true + }, + { + "name": "172.16.0.10", + "impact": 8.45, + "average": 0.312, + "p_50": 0.201, + "p_96": 1.234, + "count": 33512, + "top_hit": false + } + ] + } + }, + "type": "object", + "additionalProperties": false + }, + "top_hits_timeline": { + "description": "Time-series data for top hit items", + "required": [ + "data" + ], + "properties": { + "data": { + "description": "Time-series HTTP traffic metrics for top hit IPs. Fields are omitted for timestamps with no data.", + "type": "array", + "items": { + "required": [ + "timestamp" + ], + "properties": { + "timestamp": { + "description": "Data point timestamp", + "type": "integer", + "example": 1704067200 + }, + "_total_consumed": { + "description": "Total wall-time consumed across all items at this interval", + "type": "number", + "format": "float", + "example": 5678.9 + }, + "_total_count": { + "description": "Total request count at this timestamp across all IPs. Consider 0 if absent", + "type": "integer", + "example": 4120 + }, + "data": { + "description": "Per-IP metrics at this timestamp. Only includes top hit items.", + "type": "object", + "example": { + "192.168.1.1": { + "count": 1543, + "impact": 37.45 + }, + "10.0.0.5": { + "count": 1247, + "impact": 30.26 + } + }, + "additionalProperties": { + "required": [ + "count", + "impact" + ], + "properties": { + "count": { + "description": "Request count from this IP at this timestamp", + "type": "integer", + "example": 1543 + }, + "impact": { + "description": "Impact score as percentage of wall time consumed at this timestamp", + "type": "number", + "format": "float", + "example": 37.45, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + } + } + }, + "type": "object", + "additionalProperties": false + }, + "example": [ + { + "timestamp": 1704067200, + "_total_consumed": 5678.9, + "_total_count": 4120, + "data": { + "192.168.1.1": { + "count": 1543, + "impact": 37.45 + } + } + }, + { + "timestamp": 1704070800 + }, + { + "timestamp": 1704074400, + "_total_consumed": 4321.2, + "_total_count": 3891, + "data": { + "10.0.0.5": { + "count": 1247, + "impact": 30.26 + } + } + } + ] + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Bad request - Invalid parameters. Please consult the API documentation to fix the request parameters.", + "content": { + "application/json": { + "schema": { + "required": [ + "type", + "title", + "status", + "violations" + ], + "properties": { + "type": { + "description": "RFC 2616 reference URL identifying the error type", + "type": "string", + "format": "uri", + "example": "https://tools.ietf.org/html/rfc2616#section-1" + }, + "title": { + "description": "Human-readable summary of the validation error", + "type": "string", + "example": "Please ensure parameters are correct." + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "violations": { + "description": "Map of parameter names to their validation errors. Each parameter can have multiple error messages.", + "type": "object", + "example": { + "grain": [ + "Grain can not be larger than the selection windows." + ], + "from": [ + "The from timestamp must be in the past." + ], + "to": [ + "The to timestamp must be greater than the from timestamp." + ] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "The from timestamp must be in the past." + } + } + } + }, + "type": "object", + "additionalProperties": false + } + } + } + }, + "403": { + "description": "Forbidden - Access denied due to insufficient permissions, or the requested project/environment does not exist (to prevent information disclosure)" + }, + "499": { + "description": "Too much data fetched - The query is attempting to retrieve too much data. Please narrow down the query by reducing the time range or adding more specific filters to retrieve less data.", + "content": { + "application/json": { + "schema": { + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "example": "Too much data fetched" + }, + "message": { + "type": "string", + "example": "Please reduce the time range or add more filters to narrow down the query" + } + }, + "type": "object", + "additionalProperties": false + } + } + } + } + } + } + }, + "/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/user-agents": { + "get": { + "tags": [ + "Http Traffic" + ], + "summary": "Get HTTP traffic timeline by user agent", + "description": "Returns HTTP traffic analytics grouped by User Agent with User Agents ranked by impact (response time × request count). Use limit parameter to control total items returned (default: 200, max: 300) and top_hits_count to control how many items are flagged as top hits and tracked in the timeline (default: 10, max: 15). Items with index < top_hits_count are flagged with top_hit: true and tracked in top_hits_timeline; the remainder (up to limit) are returned with top_hit: false.", + "operationId": "http_metrics_timeline_user_agents", + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The unique identifier of the Upsun project", + "required": true, + "schema": { + "type": "string", + "pattern": "[a-z0-9]+", + "example": "abc123def456" + } + }, + { + "name": "environmentId", + "in": "path", + "description": "The environment identifier", + "required": true, + "schema": { + "type": "string", + "pattern": ".+", + "example": "main" + } + }, + { + "name": "from", + "in": "query", + "description": "Start timestamp for the time range (Unix timestamp in seconds)", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "example": 1704067200 + } + }, + { + "name": "to", + "in": "query", + "description": "End timestamp for the time range (Unix timestamp in seconds)", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "example": 1704153600 + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of items to return (default: 200, max: 300)", + "required": false, + "schema": { + "type": "integer", + "default": null, + "maximum": 300, + "minimum": 1 + } + }, + { + "name": "top_hits_count", + "in": "query", + "description": "Number of items to flag as top hits and track in the timeline (default: 10, max: 15). Items with index < top_hits_count have top_hit=true; the remainder up to limit are returned with top_hit=false.", + "required": false, + "schema": { + "type": "integer", + "default": null, + "maximum": 15, + "minimum": 1 + } + }, + { + "name": "applications[]", + "in": "query", + "description": "Filter by application. Can be specified multiple times for multiple values (e.g., ?applications[]=app1&applications[]=app2). Use applications_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "app" + } + } + }, + { + "name": "applications_mode", + "in": "query", + "description": "Filter mode for applications parameter. \"1\" (additive) includes only specified applications. \"-1\" (subtractive) excludes specified applications and includes all others. When omitted: defaults to \"-1\" if no applications values are provided; defaults to \"1\" (additive) if at least one applications value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "methods[]", + "in": "query", + "description": "Filter by HTTP methods. Can be specified multiple times for multiple values (e.g., ?methods[]=GET&methods[]=POST). Use methods_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "GET", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "HEAD", + "OPTIONS" + ] + } + } + }, + { + "name": "methods_mode", + "in": "query", + "description": "Filter mode for methods parameter. \"1\" (additive) includes only specified methods. \"-1\" (subtractive) excludes specified methods and includes all others. When omitted: defaults to \"-1\" if no methods values are provided; defaults to \"1\" (additive) if at least one methods value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "domains[]", + "in": "query", + "description": "Filter by request domains/hosts. Can be specified multiple times for multiple values (e.g., ?domains[]=api.example.com&domains[]=www.example.com). Use domains_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "api.example.com" + } + } + }, + { + "name": "domains_mode", + "in": "query", + "description": "Filter mode for domains parameter. \"1\" (additive) includes only specified domains. \"-1\" (subtractive) excludes specified domains and includes all others. When omitted: defaults to \"-1\" if no domains values are provided; defaults to \"1\" (additive) if at least one domains value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "code_slots[]", + "in": "query", + "description": "Filter by HTTP status code groups. Can be specified multiple times for multiple values (e.g., ?code_slots[]=4XX&code_slots[]=5XX). Use code_slots_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "2XX", + "enum": [ + "1XX", + "2XX", + "3XX", + "4XX", + "5XX" + ] + } + } + }, + { + "name": "code_slots_mode", + "in": "query", + "description": "Filter mode for code_slots parameter. \"1\" (additive) includes only specified code groups. \"-1\" (subtractive) excludes specified code groups and includes all others. When omitted: defaults to \"-1\" if no code_slots values are provided; defaults to \"1\" (additive) if at least one code_slots value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "codes[]", + "in": "query", + "description": "Filter by specific HTTP status codes. Can be specified multiple times for multiple values (e.g., ?codes[]=200&codes[]=404). Use codes_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "200" + } + } + }, + { + "name": "codes_mode", + "in": "query", + "description": "Filter mode for codes parameter. \"1\" (additive) includes only specified codes. \"-1\" (subtractive) excludes specified codes and includes all others. When omitted: defaults to \"-1\" if no codes values are provided; defaults to \"1\" (additive) if at least one codes value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "request_duration_slots[]", + "in": "query", + "description": "Filter by response time ranges (in milliseconds). Can be specified multiple times for multiple values (e.g., ?request_duration_slots[]=0-50&request_duration_slots[]=1600+). Use request_duration_slots_mode to control inclusion/exclusion behavior.", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "0-50", + "enum": [ + "0-50", + "50-100", + "100-200", + "200-400", + "400-800", + "800-1600", + "1600+" + ] + } + } + }, + { + "name": "request_duration_slots_mode", + "in": "query", + "description": "Filter mode for request_duration_slots parameter. \"1\" (additive) includes only specified duration ranges. \"-1\" (subtractive) excludes specified duration ranges and includes all others. When omitted: defaults to \"-1\" if no request_duration_slots values are provided; defaults to \"1\" (additive) if at least one request_duration_slots value is provided.", + "required": false, + "schema": { + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + } + ], + "responses": { + "200": { + "description": "HTTP traffic timeline by User Agent retrieved successfully", + "content": { + "application/json": { + "schema": { + "required": [ + "_grain", + "_from", + "_to", + "_project_id", + "_environment_id", + "_environment_type", + "_branch_machine_name", + "_breakdown_limit", + "_breakdown_top_hits", + "breakdown", + "top_hits_timeline" + ], + "properties": { + "_grain": { + "description": "Data granularity in seconds", + "type": "integer", + "example": 5 + }, + "_from": { + "description": "Query start timestamp", + "type": "integer", + "example": 1704067200 + }, + "_to": { + "description": "Query end timestamp", + "type": "integer", + "example": 1704153600 + }, + "_project_id": { + "description": "Project identifier", + "type": "string", + "example": "abc123def456" + }, + "_environment_id": { + "description": "Environment identifier", + "type": "string", + "example": "main" + }, + "_environment_type": { + "description": "Environment type", + "type": "string", + "example": "production", + "enum": [ + "production", + "staging", + "development" + ] + }, + "_branch_machine_name": { + "description": "Branch machine name", + "type": "string", + "example": "main-bvxea6i" + }, + "_breakdown_limit": { + "description": "Maximum number of items returned", + "type": "integer", + "example": 200 + }, + "_breakdown_top_hits": { + "description": "Number of items flagged as top hits (top_hit=true) and tracked in top_hits_timeline.", + "type": "integer", + "example": 10 + }, + "_applications": { + "description": "Applied application filter values", + "type": "array", + "items": { + "type": "string", + "example": "app" + }, + "nullable": true + }, + "_applications_mode": { + "description": "Application filter mode (1=additive, -1=subtractive)", + "type": "string", + "nullable": true, + "enum": [ + "1", + "-1" + ] + }, + "_methods": { + "description": "Applied method filter values", + "type": "array", + "items": { + "type": "string", + "example": "GET" + }, + "nullable": true + }, + "_methods_mode": { + "description": "Method filter mode (1=additive, -1=subtractive)", + "type": "string", + "nullable": true, + "enum": [ + "1", + "-1" + ] + }, + "_domains": { + "description": "Applied domain filter values", + "type": "array", + "items": { + "type": "string", + "example": "example.com" + }, + "nullable": true + }, + "_domains_mode": { + "description": "Domain filter mode (1=additive, -1=subtractive)", + "type": "string", + "nullable": true, + "enum": [ + "1", + "-1" + ] + }, + "_code_slots": { + "description": "Applied code slot filter values", + "type": "array", + "items": { + "type": "string", + "example": "2XX" + }, + "nullable": true + }, + "_code_slots_mode": { + "description": "Code slot filter mode (1=additive, -1=subtractive)", + "type": "string", + "nullable": true, + "enum": [ + "1", + "-1" + ] + }, + "_codes": { + "description": "Applied HTTP status code filter values", + "type": "array", + "items": { + "type": "string", + "example": "200" + }, + "nullable": true + }, + "_codes_mode": { + "description": "Code filter mode (1=additive, -1=subtractive)", + "type": "string", + "nullable": true, + "enum": [ + "1", + "-1" + ] + }, + "_request_duration_slots": { + "description": "Applied request duration slot filter values", + "type": "array", + "items": { + "type": "string", + "example": "0-100" + }, + "nullable": true + }, + "_request_duration_slots_mode": { + "description": "Request duration slot filter mode (1=additive, -1=subtractive)", + "type": "string", + "nullable": true, + "enum": [ + "1", + "-1" + ] + }, + "breakdown": { + "description": "User Agents ranked by impact", + "required": [ + "kind", + "total", + "data" + ], + "properties": { + "kind": { + "description": "The kind of grouping", + "type": "string", + "example": "user_agent", + "enum": [ + "user_agent" + ] + }, + "total": { + "description": "Total request count across all User Agents", + "type": "integer", + "example": 396519 + }, + "data": { + "description": "List of items ranked by impact. Items with index < top_hits_count are tracked in top_hits_timeline (flagged with top_hit: true); the remainder are returned for reference only.", + "type": "array", + "items": { + "required": [ + "name", + "impact", + "average", + "p_50", + "p_96", + "count", + "top_hit" + ], + "properties": { + "name": { + "description": "The User Agent string", + "type": "string", + "example": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" + }, + "impact": { + "description": "Impact score as percentage of total wall time consumed", + "type": "number", + "format": "float", + "example": 45.67 + }, + "average": { + "description": "Average request duration in seconds", + "type": "number", + "format": "float", + "example": 0.234 + }, + "p_50": { + "description": "50th percentile (median) request duration in seconds", + "type": "number", + "format": "float", + "example": 0.156 + }, + "p_96": { + "description": "96th percentile request duration in seconds", + "type": "number", + "format": "float", + "example": 0.892 + }, + "count": { + "description": "Total number of requests from this User Agent", + "type": "integer", + "example": 62143 + }, + "top_hit": { + "description": "Whether this item is tracked in top_hits_timeline", + "type": "boolean", + "example": true + } + }, + "type": "object", + "additionalProperties": false + }, + "example": [ + { + "name": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", + "impact": 45.67, + "average": 0.234, + "p_50": 0.156, + "p_96": 0.892, + "count": 62143, + "top_hit": true + }, + { + "name": "curl/7.68.0", + "impact": 8.45, + "average": 0.312, + "p_50": 0.201, + "p_96": 1.234, + "count": 11512, + "top_hit": false + } + ] + } + }, + "type": "object", + "additionalProperties": false + }, + "top_hits_timeline": { + "description": "Time-series data for top hit items", + "required": [ + "data" + ], + "properties": { + "data": { + "description": "Time-series HTTP traffic metrics for top hit User Agents. Fields are omitted for timestamps with no data.", + "type": "array", + "items": { + "required": [ + "timestamp" + ], + "properties": { + "timestamp": { + "description": "Data point timestamp", + "type": "integer", + "example": 1704067200 + }, + "_total_consumed": { + "description": "Total wall-time consumed across all items at this interval", + "type": "number", + "format": "float", + "example": 5678.9 + }, + "_total_count": { + "description": "Total request count at this timestamp. Consider 0 if absent", + "type": "integer", + "example": 4120 + }, + "data": { + "description": "Per-User Agent metrics at this timestamp. Only includes top hit items.", + "type": "object", + "example": { + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36": { + "count": 1543, + "impact": 47.45 + } + }, + "additionalProperties": { + "required": [ + "count", + "impact" + ], + "properties": { + "count": { + "description": "Request count at this timestamp", + "type": "integer", + "example": 1543 + }, + "impact": { + "description": "Impact score as percentage of wall time consumed", + "type": "number", + "format": "float", + "example": 47.45, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + } + } + }, + "type": "object", + "additionalProperties": false + }, + "example": [ + { + "timestamp": 1704067200, + "_total_consumed": 5678.9, + "_total_count": 4120, + "data": { + "Mozilla/5.0 (Windows NT 10.0; Win64; x64)": { + "count": 1543, + "impact": 47.45 + } + } + }, + { + "timestamp": 1704070800 + } + ] + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Bad request - Invalid parameters. Please consult the API documentation to fix the request parameters.", + "content": { + "application/json": { + "schema": { + "required": [ + "type", + "title", + "status", + "violations" + ], + "properties": { + "type": { + "description": "RFC 2616 reference URL identifying the error type", + "type": "string", + "format": "uri", + "example": "https://tools.ietf.org/html/rfc2616#section-1" + }, + "title": { + "description": "Human-readable summary of the validation error", + "type": "string", + "example": "Please ensure parameters are correct." + }, + "status": { + "description": "HTTP status code", + "type": "integer", + "example": 400 + }, + "violations": { + "description": "Map of parameter names to their validation errors. Each parameter can have multiple error messages.", + "type": "object", + "example": { + "grain": [ + "Grain can not be larger than the selection windows." + ], + "from": [ + "The from timestamp must be in the past." + ], + "to": [ + "The to timestamp must be greater than the from timestamp." + ] + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "example": "The from timestamp must be in the past." + } + } + } + }, + "type": "object", + "additionalProperties": false + } + } + } + }, + "403": { + "description": "Forbidden - Access denied due to insufficient permissions, or the requested project/environment does not exist (to prevent information disclosure)" + }, + "499": { + "description": "Too much data fetched - The query is attempting to retrieve too much data. Please narrow down the query by reducing the time range or adding more specific filters to retrieve less data.", + "content": { + "application/json": { + "schema": { + "required": [ + "error", + "message" + ], + "properties": { + "error": { + "type": "string", + "example": "Too much data fetched" + }, + "message": { + "type": "string", + "example": "Please reduce the time range or add more filters to narrow down the query" + } + }, + "type": "object", + "additionalProperties": false + } + } + } + } + } + } + }, + "/organizations/{organization_id}/invoices": { + "get": { + "summary": "List invoices", + "description": "Retrieves a list of invoices for the specified organization.", + "operationId": "list-org-invoices", + "deprecated": true, + "tags": [ + "Invoices" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "$ref": "#/components/parameters/filter_invoice_status" + }, + { + "$ref": "#/components/parameters/filter_invoice_type" + }, + { + "$ref": "#/components/parameters/filter_order_id" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Invoice" + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/organizations/{organization_id}/invoices/{invoice_id}": { + "get": { + "summary": "Get invoice", + "description": "Retrieves an invoice for the specified organization.", + "operationId": "get-org-invoice", + "deprecated": true, + "tags": [ + "Invoices" + ], + "parameters": [ + { + "$ref": "#/components/parameters/InvoiceID" + }, + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Invoice" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/users/{user_id}/totp": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], + "get": { + "summary": "Get information about TOTP enrollment", + "description": "Retrieves TOTP enrollment information.", + "operationId": "get-totp-enrollment", + "tags": [ + "MFA" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "issuer": { + "type": "string", + "format": "uri", + "description": "" + }, + "account_name": { + "type": "string", + "description": "Account name for the enrollment." + }, + "secret": { + "type": "string", + "description": "The secret seed for the enrollment" + }, + "qr_code": { + "type": "string", + "format": "byte", + "description": "Data URI of a PNG QR code image for the enrollment." + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict" + } + } + }, + "post": { + "summary": "Confirm TOTP enrollment", + "description": "Confirms the given TOTP enrollment.", + "operationId": "confirm-totp-enrollment", + "tags": [ + "MFA" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "recovery_codes": { + "type": "array", + "description": "A list of recovery codes for the MFA enrollment.", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "secret": { + "type": "string", + "description": "The secret seed for the enrollment" + }, + "passcode": { + "type": "string", + "description": "TOTP passcode for the enrollment" + } + }, + "required": [ + "secret", + "passcode" + ] + } + } + }, + "description": "" + } + }, + "delete": { + "summary": "Withdraw TOTP enrollment", + "description": "Withdraws from the TOTP enrollment.", + "operationId": "withdraw-totp-enrollment", + "tags": [ + "MFA" + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + } + } + }, + "/users/{user_id}/codes": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], + "post": { + "summary": "Re-create recovery codes", + "description": "Re-creates recovery codes for the MFA enrollment.", + "operationId": "recreate-recovery-codes", + "tags": [ + "MFA" + ], + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "recovery_codes": { + "type": "array", + "description": "A list of recovery codes for the MFA enrollment.", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + } + } + }, + "/organizations/{organization_id}/mfa-enforcement": { + "get": { + "summary": "Get organization MFA settings", + "description": "Retrieves MFA settings for the specified organization.", + "operationId": "get-org-mfa-enforcement", + "tags": [ + "MFA" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationMFAEnforcement" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/organizations/{organization_id}/mfa-enforcement/enable": { + "post": { + "summary": "Enable organization MFA enforcement", + "description": "Enables MFA enforcement for the specified organization.", + "operationId": "enable-org-mfa-enforcement", + "tags": [ + "MFA" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/organizations/{organization_id}/mfa-enforcement/disable": { + "post": { + "summary": "Disable organization MFA enforcement", + "description": "Disables MFA enforcement for the specified organization.", + "operationId": "disable-org-mfa-enforcement", + "tags": [ + "MFA" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/organizations/{organization_id}/mfa/remind": { + "post": { + "summary": "Send MFA reminders to organization members", + "description": "Sends a reminder about setting up MFA to the specified organization members.", + "operationId": "send-org-mfa-reminders", + "tags": [ + "MFA" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "user_ids": { + "type": "array", + "description": "The organization members.", + "items": { + "type": "string", + "format": "uuid", + "description": "The ID of the user." + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "An HTTP-like status code referring to the result of the operation for the specific user." + }, + "message": { + "type": "string", + "description": "A human-readable message describing the result of the operation for the specific user" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/orders/download": { + "get": { + "tags": [ + "Orders" + ], + "summary": "Download an invoice.", + "operationId": "download-invoice", + "parameters": [ + { + "name": "token", + "in": "query", + "description": "JWT for invoice.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "An invoice PDF.", + "content": { + "application/pdf": {} + } + } + } + } + }, + "/organizations/{organization_id}/orders": { + "get": { + "summary": "List orders", + "description": "Retrieves orders for the specified organization.", + "operationId": "list-org-orders", + "deprecated": true, + "tags": [ + "Orders" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "$ref": "#/components/parameters/filter_order_status" + }, + { + "$ref": "#/components/parameters/filter_order_total" + }, + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/mode" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Order" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/organizations/{organization_id}/orders/{order_id}": { + "get": { + "summary": "Get order", + "description": "Retrieves an order for the specified organization.", + "operationId": "get-org-order", + "deprecated": true, + "tags": [ + "Orders" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "$ref": "#/components/parameters/OrderID" + }, + { + "$ref": "#/components/parameters/mode" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Order" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/organizations/{organization_id}/orders/{order_id}/authorize": { + "post": { + "summary": "Create confirmation credentials for for 3D-Secure", + "description": "Creates confirmation credentials for payments that require online authorization", + "operationId": "create-authorization-credentials", + "deprecated": true, + "tags": [ + "Orders" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "$ref": "#/components/parameters/OrderID" + } + ], + "responses": { + "200": { + "description": "Payment authorization credentials, if the payment is pending", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "redirect_to_url": { + "type": "object", + "description": "URL information to complete the payment.", + "properties": { + "return_url": { + "type": "string", + "description": "Return URL after payment completion." + }, + "url": { + "type": "string", + "description": "URL for payment finalization." + } + } + }, + "type": { + "type": "string", + "description": "Required payment action type." + } + } + } + } + } + }, + "400": { + "description": "Bad Request when no authorization is required.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/organizations/{organization_id}/invitations": { + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "post": { + "summary": "Invite user to an organization by email", + "description": "Creates an invitation to an organization for a user with the specified email address.", + "operationId": "create-org-invite", + "tags": [ + "Organization Invitations" + ], + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationInvitation" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict when there already is a pending invitation for the invitee", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "description": "The email address of the invitee." + }, + "permissions": { + "$ref": "#/components/schemas/OrganizationPermissions" + }, + "force": { + "type": "boolean", + "description": "Whether to cancel any pending invitation for the specified invitee, and create a new invitation." + } + }, + "required": [ + "email", + "permissions" + ] + } + } + } + } + }, + "get": { + "summary": "List invitations to an organization", + "description": "Returns a list of invitations to an organization.", + "operationId": "list-org-invites", + "tags": [ + "Organization Invitations" + ], + "parameters": [ + { + "in": "query", + "name": "filter[state]", + "description": "Allows filtering by `state` of the invtations: \"pending\" (default), \"error\".", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "page[size]", + "description": "Determines the number of items to show.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": null + } + }, + { + "in": "query", + "name": "page[before]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page[after]", + "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
_links object with a key like ref:users:0.",
+ "operationId": "list-referenced-users",
+ "tags": [
+ "References"
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "description": "A map of referenced users indexed by the user ID.",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/UserReference"
+ }
+ },
+ "examples": {
+ "example-1": {
+ "value": {
+ "497f6eca-6276-4993-bfeb-53cbbbba6f08": {
+ "email": "user@example.com",
+ "first_name": "string",
+ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
+ "last_name": "string",
+ "picture": "https://accounts.platform.sh/profiles/blimp_profile/themes/platformsh_theme/images/mail/logo.png",
+ "username": "string",
+ "mfa_enabled": false,
+ "sso_enabled": false
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Bad Request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ }
+ }
+ },
+ "parameters": [
+ {
+ "schema": {
+ "type": "string"
+ },
+ "in": "query",
+ "name": "in",
+ "description": "The list of comma-separated user IDs generated by a trusted service.",
+ "required": true
+ },
+ {
+ "schema": {
+ "type": "string"
+ },
+ "in": "query",
+ "name": "sig",
+ "description": "The signature of this request generated by a trusted service.",
+ "required": true
+ }
+ ]
+ }
+ },
+ "/ref/teams": {
+ "get": {
+ "summary": "List referenced teams",
+ "description": "Retrieves a list of teams referenced by a trusted service. Clients cannot construct the URL themselves. The correct URL will be provided in the HAL links of another API response, in the _links object with a key like ref:teams:0.",
+ "operationId": "list-referenced-teams",
+ "tags": [
+ "References"
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "description": "A map of referenced teams indexed by the team ID.",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/TeamReference"
+ }
+ },
+ "examples": {
+ "example-1": {
+ "value": {
+ "01FVMKN9KHVWWVY488AVKDWHR3": {
+ "id": "01FVMKN9KHVWWVY488AVKDWHR3",
+ "label": "Contractors"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Bad Request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ }
+ }
+ },
+ "parameters": [
+ {
+ "schema": {
+ "type": "string"
+ },
+ "in": "query",
+ "name": "in",
+ "description": "The list of comma-separated team IDs generated by a trusted service.",
+ "required": true
+ },
+ {
+ "schema": {
+ "type": "string"
+ },
+ "in": "query",
+ "name": "sig",
+ "description": "The signature of this request generated by a trusted service.",
+ "required": true
+ }
+ ]
+ }
+ },
+ "/ref/organizations": {
+ "get": {
+ "summary": "List referenced organizations",
+ "description": "Retrieves a list of organizations referenced by a trusted service. Clients cannot construct the URL themselves. The correct URL will be provided in the HAL links of another API response, in the _links object with a key like ref:organizations:0.",
+ "operationId": "list-referenced-orgs",
+ "tags": [
+ "References"
+ ],
+ "parameters": [
+ {
+ "schema": {
+ "type": "string"
+ },
+ "in": "query",
+ "name": "in",
+ "description": "The list of comma-separated organization IDs generated by a trusted service.",
+ "required": true
+ },
+ {
+ "schema": {
+ "type": "string"
+ },
+ "in": "query",
+ "name": "sig",
+ "description": "The signature of this request generated by a trusted service.",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "description": "A map of referenced organizations indexed by the organization ID.",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/OrganizationReference"
+ }
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Bad Request",
+ "content": {
+ "application/problem+json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/problem+json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/ref/projects": {
+ "get": {
+ "summary": "List referenced projects",
+ "description": "Retrieves a list of projects referenced by a trusted service. Clients cannot construct the URL themselves. The correct URL will be provided in the HAL links of another API response, in the _links object with a key like ref:projects:0.",
+ "operationId": "list-referenced-projects",
+ "tags": [
+ "References"
+ ],
+ "parameters": [
+ {
+ "schema": {
+ "type": "string"
+ },
+ "in": "query",
+ "name": "in",
+ "description": "The list of comma-separated project IDs generated by a trusted service.",
+ "required": true
+ },
+ {
+ "schema": {
+ "type": "string"
+ },
+ "in": "query",
+ "name": "sig",
+ "description": "The signature of this request generated by a trusted service.",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "description": "A map of referenced projects indexed by the organization ID.",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/ProjectReference"
+ }
+ }
+ }
+ }
+ },
+ "400": {
+ "$ref": "#/components/responses/BadRequest"
+ },
+ "403": {
+ "$ref": "#/components/responses/Forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/NotFound"
+ }
+ }
+ }
+ },
+ "/ref/regions": {
+ "get": {
+ "summary": "List referenced regions",
+ "description": "Retrieves a list of regions referenced by a trusted service. Clients cannot construct the URL themselves. The correct URL will be provided in the HAL links of another API response, in the _links object with a key like ref:regions:0.",
+ "operationId": "list-referenced-regions",
+ "tags": [
+ "References"
+ ],
+ "parameters": [
+ {
+ "schema": {
+ "type": "string"
+ },
+ "in": "query",
+ "name": "in",
+ "description": "The list of comma-separated region IDs generated by a trusted service.",
+ "required": true
+ },
+ {
+ "schema": {
+ "type": "string"
+ },
+ "in": "query",
+ "name": "sig",
+ "description": "The signature of this request generated by a trusted service.",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "description": "A map of referenced projects indexed by the organization ID.",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/RegionReference"
+ }
+ }
+ }
+ }
+ },
+ "400": {
+ "$ref": "#/components/responses/BadRequest"
+ },
+ "403": {
+ "$ref": "#/components/responses/Forbidden"
+ },
+ "404": {
+ "$ref": "#/components/responses/NotFound"
+ }
+ }
+ }
+ },
+ "/regions": {
+ "get": {
+ "summary": "List regions",
+ "description": "Retrieves a list of available regions.",
+ "operationId": "list-regions",
+ "tags": [
+ "Regions"
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "filter[available]",
+ "description": "Allows filtering by `available` using one or more operators.",
+ "style": "deepObject",
+ "explode": true,
+ "schema": {
+ "$ref": "#/components/schemas/StringFilter"
+ }
+ },
+ {
+ "in": "query",
+ "name": "filter[private]",
+ "description": "Allows filtering by `private` using one or more operators.",
+ "style": "deepObject",
+ "explode": true,
+ "schema": {
+ "$ref": "#/components/schemas/StringFilter"
+ }
+ },
+ {
+ "in": "query",
+ "name": "filter[zone]",
+ "description": "Allows filtering by `zone` using one or more operators.",
+ "style": "deepObject",
+ "explode": true,
+ "schema": {
+ "$ref": "#/components/schemas/StringFilter"
+ }
+ },
+ {
+ "$ref": "#/components/parameters/PageSize"
+ },
+ {
+ "$ref": "#/components/parameters/PageBefore"
+ },
+ {
+ "$ref": "#/components/parameters/PageAfter"
+ },
+ {
+ "in": "query",
+ "name": "sort",
+ "description": "Allows sorting by a single field.null for a token which has never been used, or not used since this API property was added. Note: After an API token is used, the derived access token may continue to be used until its expiry. This also applies to SSH certificate(s) derived from the access token.\n"
+ }
+ },
+ "x-examples": {
+ "example-1": {
+ "created_at": "2019-01-29T08:17:47Z",
+ "id": "660aa36d-23cf-402b-8889-63af71967f2b",
+ "name": "Token for CI",
+ "updated_at": "2019-01-29T08:17:47Z"
+ }
+ }
+ },
+ "Connection": {
+ "description": "",
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "The name of the federation provider."
+ },
+ "provider_type": {
+ "type": "string",
+ "description": "The type of the federation provider."
+ },
+ "is_mandatory": {
+ "type": "boolean",
+ "description": "Whether the federated login connection is mandatory."
+ },
+ "subject": {
+ "type": "string",
+ "description": "The identity on the federation provider."
+ },
+ "email_address": {
+ "type": "string",
+ "description": "The email address presented on the federated login connection."
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "description": "The date and time when the connection was created."
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "description": "The date and time when the connection was last updated."
+ }
+ },
+ "x-examples": {
+ "example-1": {
+ "created_at": "2021-05-24T07:20:35.683264Z",
+ "provider": "acme-inc-oidc",
+ "provider_type": "okta",
+ "subject": "1621840835647277693",
+ "email_address": "name@example.com",
+ "updated_at": "2021-05-24T07:20:35.683264Z"
+ }
+ }
+ },
+ "OrganizationMFAEnforcement": {
+ "description": "The MFA enforcement for the organization.",
+ "type": "object",
+ "properties": {
+ "enforce_mfa": {
+ "type": "boolean",
+ "description": "Whether the MFA enforcement is enabled."
+ }
+ },
+ "x-examples": {
+ "example-1": {
+ "enforce_mfa": true
+ }
+ }
+ },
+ "Team": {
+ "description": "",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "ulid",
+ "description": "The ID of the team."
+ },
+ "organization_id": {
+ "type": "string",
+ "format": "ulid",
+ "description": "The ID of the parent organization."
+ },
+ "label": {
+ "type": "string",
+ "description": "The human-readable label of the team."
+ },
+ "project_permissions": {
+ "type": "array",
+ "description": "Project permissions that are granted to the team.",
+ "items": {
+ "type": "string",
+ "enum": [
+ "admin",
+ "viewer",
+ "development:admin",
+ "development:contributor",
+ "development:viewer",
+ "staging:admin",
+ "staging:contributor",
+ "staging:viewer",
+ "production:admin",
+ "production:contributor",
+ "production:viewer"
+ ]
+ }
+ },
+ "counts": {
+ "type": "object",
+ "properties": {
+ "member_count": {
+ "type": "integer",
+ "description": "Total count of members of the team."
+ },
+ "project_count": {
+ "type": "integer",
+ "description": "Total count of projects that the team has access to."
+ }
+ }
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "description": "The date and time when the team was created."
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "description": "The date and time when the team was last updated."
+ }
+ },
+ "x-examples": {
+ "example-1": {
+ "id": "01FVMKN9KHVWWVY488AVKDWHR3",
+ "organization_id": "01EY8BWRSQ56EY1TDC32PARAJS",
+ "counts": {
+ "member_count": 12,
+ "project_count": 5
+ },
+ "label": "Contractors",
+ "created_at": "2021-05-24T07:20:35.683264Z",
+ "updated_at": "2021-05-24T07:20:35.683264Z",
+ "project_permissions": [
+ "viewer",
+ "staging:contributor",
+ "development:admin"
+ ]
+ }
+ }
+ },
+ "TeamMember": {
+ "type": "object",
+ "properties": {
+ "team_id": {
+ "type": "string",
+ "format": "ulid",
+ "description": "The ID of the team."
+ },
+ "user_id": {
+ "type": "string",
+ "format": "uuid",
+ "description": "The ID of the user."
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "description": "The date and time when the team member was created."
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "description": "The date and time when the team member was last updated."
+ }
+ }
+ },
+ "UserReference": {
+ "description": "The referenced user, or null if it no longer exists.",
+ "type": "object",
+ "nullable": true,
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "description": "The ID of the user."
+ },
+ "username": {
+ "type": "string",
+ "description": "The user's username."
+ },
+ "email": {
+ "type": "string",
+ "format": "email",
+ "description": "The user's email address."
+ },
+ "first_name": {
+ "type": "string",
+ "description": "The user's first name."
+ },
+ "last_name": {
+ "type": "string",
+ "description": "The user's last name."
+ },
+ "picture": {
+ "type": "string",
+ "format": "uri",
+ "description": "The user's picture."
+ },
+ "mfa_enabled": {
+ "type": "boolean",
+ "description": "Whether the user has enabled MFA. Note: the built-in MFA feature may not be necessary if the user is linked to a mandatory SSO provider that itself supports MFA (see \"sso_enabled\\\")."
+ },
+ "sso_enabled": {
+ "type": "boolean",
+ "description": "Whether the user is linked to a mandatory SSO provider."
+ }
+ },
+ "x-examples": {
+ "example-1": {
+ "email": "hello@platform.sh",
+ "first_name": "Hello",
+ "id": "d81c8ee2-44b3-429f-b944-a33ad7437690",
+ "last_name": "World",
+ "picture": "https://accounts.platform.sh/profiles/blimp_profile/themes/platformsh_theme/images/mail/logo.png",
+ "username": "platform-sh",
+ "mfa_enabled": true,
+ "sso_enabled": true
+ }
+ }
+ },
+ "TeamReference": {
+ "description": "The referenced team, or null if it no longer exists.",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "ulid",
+ "description": "The ID of the team."
+ },
+ "organization_id": {
+ "type": "string",
+ "format": "ulid",
+ "description": "The ID of the parent organization."
+ },
+ "label": {
+ "type": "string",
+ "description": "The human-readable label of the team."
+ },
+ "project_permissions": {
+ "type": "array",
+ "description": "Project permissions that are granted to the team.",
+ "items": {
+ "type": "string",
+ "enum": [
+ "admin",
+ "viewer",
+ "development:admin",
+ "development:contributor",
+ "development:viewer",
+ "staging:admin",
+ "staging:contributor",
+ "staging:viewer",
+ "production:admin",
+ "production:contributor",
+ "production:viewer"
+ ]
+ }
+ },
+ "counts": {
+ "type": "object",
+ "properties": {
+ "member_count": {
+ "type": "integer",
+ "description": "Total count of members of the team."
+ },
+ "project_count": {
+ "type": "integer",
+ "description": "Total count of projects that the team has access to."
+ }
+ }
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "description": "The date and time when the team was created."
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "description": "The date and time when the team was last updated."
+ }
+ },
+ "x-examples": {
+ "example-1": {
+ "id": "01FVMKN9KHVWWVY488AVKDWHR3",
+ "organization_id": "01EY8BWRSQ56EY1TDC32PARAJS",
+ "counts": {
+ "member_count": 12,
+ "project_count": 5
+ },
+ "label": "Contractors",
+ "project_permissions": [
+ "viewer",
+ "staging:contributor",
+ "development:admin"
+ ],
+ "created_at": "2021-05-24T07:20:35.683264Z",
+ "updated_at": "2021-05-24T07:20:35.683264Z"
+ }
+ }
+ },
+ "DateTimeFilter": {
+ "type": "object",
+ "properties": {
+ "eq": {
+ "type": "string",
+ "description": "Equal"
+ },
+ "ne": {
+ "type": "string",
+ "description": "Not equal"
+ },
+ "between": {
+ "type": "string",
+ "description": "Between (comma-separated list)"
+ },
+ "gt": {
+ "type": "string",
+ "description": "Greater than"
+ },
+ "gte": {
+ "type": "string",
+ "description": "Greater than or equal"
+ },
+ "lt": {
+ "type": "string",
+ "description": "Less than"
+ },
+ "lte": {
+ "type": "string",
+ "description": "Less than or equal"
+ }
+ }
+ },
+ "StringFilter": {
+ "type": "object",
+ "properties": {
+ "eq": {
+ "type": "string",
+ "description": "Equal"
+ },
+ "ne": {
+ "type": "string",
+ "description": "Not equal"
+ },
+ "in": {
+ "type": "string",
+ "description": "In (comma-separated list)"
+ },
+ "nin": {
+ "type": "string",
+ "description": "Not in (comma-separated list)"
+ },
+ "between": {
+ "type": "string",
+ "description": "Between (comma-separated list)"
+ },
+ "contains": {
+ "type": "string",
+ "description": "Contains"
+ },
+ "starts": {
+ "type": "string",
+ "description": "Starts with"
+ },
+ "ends": {
+ "type": "string",
+ "description": "Ends with"
+ }
+ }
+ },
+ "AcceptedResponse": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "title": "Status text",
+ "description": "The status text of the response"
+ },
+ "code": {
+ "type": "integer",
+ "title": "Status code",
+ "description": "The status code of the response"
+ }
+ },
+ "required": [
+ "status",
+ "code"
+ ],
+ "additionalProperties": false
+ },
+ "Activity": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "Activity Identifier",
+ "description": "The identifier of Activity"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "type": {
+ "type": "string",
+ "title": "Type",
+ "description": "The type of the activity"
+ },
+ "parameters": {
+ "type": "object",
+ "title": "Parameters",
+ "description": "The parameters of the activity"
+ },
+ "project": {
+ "type": "string",
+ "title": "Project",
+ "description": "The project the activity belongs to"
+ },
+ "integration": {
+ "type": "string",
+ "title": "Integration",
+ "description": "The integration the activity belongs to"
+ },
+ "environments": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Environments",
+ "description": "The environments related to the activity"
+ },
+ "state": {
+ "type": "string",
+ "enum": [
+ "cancelled",
+ "complete",
+ "in_progress",
+ "pending",
+ "scheduled",
+ "staged"
+ ],
+ "title": "State",
+ "description": "The state of the activity"
+ },
+ "result": {
+ "type": "string",
+ "enum": [
+ "failure",
+ "success"
+ ],
+ "nullable": true,
+ "title": "Result",
+ "description": "The result of the activity"
+ },
+ "failure_reason": {
+ "type": "string",
+ "enum": [
+ "error",
+ "shell"
+ ],
+ "nullable": true,
+ "title": "Failure Reason",
+ "description": "The reason for activity failure"
+ },
+ "started_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Start date",
+ "description": "The start date of the activity"
+ },
+ "completed_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Completion date",
+ "description": "The completion date of the activity"
+ },
+ "completion_percent": {
+ "type": "integer",
+ "title": "Completion percentage",
+ "description": "The completion percentage of the activity"
+ },
+ "cancelled_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Cancellation date",
+ "description": "The Cancellation date of the activity"
+ },
+ "timings": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "number",
+ "format": "float"
+ },
+ "title": "Timings",
+ "description": "Timings related to different phases of the activity"
+ },
+ "log": {
+ "type": "string",
+ "title": "Log",
+ "description": "The log of the activity",
+ "deprecated": true,
+ "x-stability": "DEPRECATED"
+ },
+ "payload": {
+ "type": "object",
+ "title": "Payload",
+ "description": "The payload of the activity"
+ },
+ "description": {
+ "type": "string",
+ "nullable": true,
+ "title": "Activity HTML description",
+ "description": "The description of the activity, formatted with HTML"
+ },
+ "text": {
+ "type": "string",
+ "nullable": true,
+ "title": "Activity text description",
+ "description": "The description of the activity, formatted as plain text"
+ },
+ "expires_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Expiration date",
+ "description": "The date at which the activity will expire"
+ },
+ "commands": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "app": {
+ "type": "string",
+ "title": "Application",
+ "description": ""
+ },
+ "type": {
+ "type": "string",
+ "title": "Type",
+ "description": ""
+ },
+ "exit_code": {
+ "type": "integer",
+ "title": "Exit status code",
+ "description": ""
+ }
+ },
+ "required": [
+ "app",
+ "type",
+ "exit_code"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Commands",
+ "description": "The commands of the activity"
+ }
+ },
+ "required": [
+ "id",
+ "created_at",
+ "updated_at",
+ "type",
+ "parameters",
+ "project",
+ "state",
+ "result",
+ "failure_reason",
+ "started_at",
+ "completed_at",
+ "completion_percent",
+ "cancelled_at",
+ "timings",
+ "log",
+ "payload",
+ "description",
+ "text",
+ "expires_at",
+ "commands"
+ ],
+ "additionalProperties": false
+ },
+ "ActivityCollection": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Activity"
+ }
+ },
+ "Backup": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "Backup Identifier",
+ "description": "The identifier of Backup"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "attributes": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Arbitrary attributes",
+ "description": "Arbitrary attributes attached to this resource"
+ },
+ "status": {
+ "type": "string",
+ "enum": [
+ "CREATED",
+ "DELETING"
+ ],
+ "title": "Status",
+ "description": "The status of the backup"
+ },
+ "expires_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Expires At",
+ "description": "Expiration date of the backup"
+ },
+ "index": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Index",
+ "description": "The index of this automated backup"
+ },
+ "commit_id": {
+ "type": "string",
+ "title": "Commit ID",
+ "description": "The ID of the code commit attached to the backup"
+ },
+ "environment": {
+ "type": "string",
+ "title": "Environment",
+ "description": "The environment the backup belongs to"
+ },
+ "safe": {
+ "type": "boolean",
+ "title": "Safe",
+ "description": "Whether this backup was taken in a safe way"
+ },
+ "size_of_volumes": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Size of volumes",
+ "description": "Total size of volumes backed up"
+ },
+ "size_used": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Size used",
+ "description": "Total size of space used on volumes backed up"
+ },
+ "size_object_storage": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Size of object storage",
+ "description": "Total object-storage quota configured on webapps at backup time"
+ },
+ "deployment": {
+ "type": "string",
+ "nullable": true,
+ "title": "Deployment",
+ "description": "The current deployment at the time of backup"
+ },
+ "restorable": {
+ "type": "boolean",
+ "title": "Is restorable",
+ "description": "Whether the backup is restorable"
+ },
+ "automated": {
+ "type": "boolean",
+ "title": "Is automated",
+ "description": "Whether the backup is automated"
+ }
+ },
+ "required": [
+ "id",
+ "created_at",
+ "updated_at",
+ "attributes",
+ "status",
+ "expires_at",
+ "index",
+ "commit_id",
+ "environment",
+ "safe",
+ "size_of_volumes",
+ "size_used",
+ "size_object_storage",
+ "deployment",
+ "restorable",
+ "automated"
+ ],
+ "additionalProperties": false
+ },
+ "BackupCollection": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Backup"
+ }
+ },
+ "BitbucketIntegration": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "BitbucketIntegration Identifier",
+ "description": "The identifier of BitbucketIntegration"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "role": {
+ "type": "string",
+ "title": "Integration role",
+ "description": "The role of the integration"
+ },
+ "fetch_branches": {
+ "type": "boolean",
+ "title": "Fetch Branches",
+ "description": "Whether or not to fetch branches"
+ },
+ "prune_branches": {
+ "type": "boolean",
+ "title": "Prune Branches",
+ "description": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`)"
+ },
+ "environment_init_resources": {
+ "type": "string",
+ "enum": [
+ "default",
+ "manual",
+ "minimum",
+ "parent"
+ ],
+ "title": "Environment Init Resources",
+ "description": "The resources used when initializing a new service"
+ },
+ "app_credentials": {
+ "type": "object",
+ "properties": {
+ "key": {
+ "type": "string",
+ "title": "OAuth consumer key.",
+ "description": "The OAuth consumer key."
+ }
+ },
+ "required": [
+ "key"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "OAuth2 consumer",
+ "description": "The OAuth2 consumer information (optional)"
+ },
+ "addon_credentials": {
+ "type": "object",
+ "properties": {
+ "addon_key": {
+ "type": "string",
+ "title": "Addon key",
+ "description": "The addon key (public identifier)."
+ },
+ "client_key": {
+ "type": "string",
+ "title": "Client key",
+ "description": "The client key (public identifier)."
+ }
+ },
+ "required": [
+ "addon_key",
+ "client_key"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Addon credential",
+ "description": "The addon credential information (optional)"
+ },
+ "repository": {
+ "type": "string",
+ "title": "Bitbucket repository",
+ "description": "The Bitbucket repository (in the form `user/repo`)"
+ },
+ "build_pull_requests": {
+ "type": "boolean",
+ "title": "Build pull requests",
+ "description": "Whether or not to build pull requests"
+ },
+ "pull_requests_clone_parent_data": {
+ "type": "boolean",
+ "title": "Clone parent data",
+ "description": "Whether or not to clone parent data when building merge requests"
+ },
+ "pull_requests_max_pages": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Maximum pull request pages to fetch during full sync",
+ "description": "Maximum number of Bitbucket pull request pages to iterate when syncing pull requests. Null means no limit"
+ },
+ "resync_pull_requests": {
+ "type": "boolean",
+ "title": "Sync environment data",
+ "description": "Whether or not pull request environment data should be re-synced on every build"
+ }
+ },
+ "required": [
+ "created_at",
+ "updated_at",
+ "type",
+ "role",
+ "fetch_branches",
+ "prune_branches",
+ "environment_init_resources",
+ "repository",
+ "build_pull_requests",
+ "pull_requests_clone_parent_data",
+ "pull_requests_max_pages",
+ "resync_pull_requests"
+ ],
+ "additionalProperties": false
+ },
+ "BitbucketIntegrationCreateInput": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "fetch_branches": {
+ "type": "boolean",
+ "title": "Fetch Branches",
+ "description": "Whether or not to fetch branches"
+ },
+ "prune_branches": {
+ "type": "boolean",
+ "title": "Prune Branches",
+ "description": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`)"
+ },
+ "environment_init_resources": {
+ "type": "string",
+ "enum": [
+ "default",
+ "manual",
+ "minimum",
+ "parent"
+ ],
+ "title": "Environment Init Resources",
+ "description": "The resources used when initializing a new service"
+ },
+ "app_credentials": {
+ "type": "object",
+ "properties": {
+ "key": {
+ "type": "string",
+ "title": "OAuth consumer key.",
+ "description": "The OAuth consumer key."
+ },
+ "secret": {
+ "type": "string",
+ "title": "OAuth consumer secret.",
+ "description": "The OAuth consumer secret."
+ }
+ },
+ "required": [
+ "key",
+ "secret"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "OAuth2 consumer",
+ "description": "The OAuth2 consumer information (optional)"
+ },
+ "addon_credentials": {
+ "type": "object",
+ "properties": {
+ "addon_key": {
+ "type": "string",
+ "title": "Addon key",
+ "description": "The addon key (public identifier)."
+ },
+ "client_key": {
+ "type": "string",
+ "title": "Client key",
+ "description": "The client key (public identifier)."
+ },
+ "shared_secret": {
+ "type": "string",
+ "title": "Client secret",
+ "description": "The secret of the client."
+ }
+ },
+ "required": [
+ "addon_key",
+ "client_key",
+ "shared_secret"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Addon credential",
+ "description": "The addon credential information (optional)"
+ },
+ "repository": {
+ "type": "string",
+ "title": "Bitbucket repository",
+ "description": "The Bitbucket repository (in the form `user/repo`)"
+ },
+ "build_pull_requests": {
+ "type": "boolean",
+ "title": "Build pull requests",
+ "description": "Whether or not to build pull requests"
+ },
+ "pull_requests_clone_parent_data": {
+ "type": "boolean",
+ "title": "Clone parent data",
+ "description": "Whether or not to clone parent data when building merge requests"
+ },
+ "pull_requests_max_pages": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Maximum pull request pages to fetch during full sync",
+ "description": "Maximum number of Bitbucket pull request pages to iterate when syncing pull requests. Null means no limit"
+ },
+ "resync_pull_requests": {
+ "type": "boolean",
+ "title": "Sync environment data",
+ "description": "Whether or not pull request environment data should be re-synced on every build"
+ }
+ },
+ "required": [
+ "type",
+ "repository"
+ ],
+ "additionalProperties": false
+ },
+ "BitbucketIntegrationPatch": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "fetch_branches": {
+ "type": "boolean",
+ "title": "Fetch Branches",
+ "description": "Whether or not to fetch branches"
+ },
+ "prune_branches": {
+ "type": "boolean",
+ "title": "Prune Branches",
+ "description": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`)"
+ },
+ "environment_init_resources": {
+ "type": "string",
+ "enum": [
+ "default",
+ "manual",
+ "minimum",
+ "parent"
+ ],
+ "title": "Environment Init Resources",
+ "description": "The resources used when initializing a new service"
+ },
+ "app_credentials": {
+ "type": "object",
+ "properties": {
+ "key": {
+ "type": "string",
+ "title": "OAuth consumer key.",
+ "description": "The OAuth consumer key."
+ },
+ "secret": {
+ "type": "string",
+ "title": "OAuth consumer secret.",
+ "description": "The OAuth consumer secret."
+ }
+ },
+ "required": [
+ "key",
+ "secret"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "OAuth2 consumer",
+ "description": "The OAuth2 consumer information (optional)"
+ },
+ "addon_credentials": {
+ "type": "object",
+ "properties": {
+ "addon_key": {
+ "type": "string",
+ "title": "Addon key",
+ "description": "The addon key (public identifier)."
+ },
+ "client_key": {
+ "type": "string",
+ "title": "Client key",
+ "description": "The client key (public identifier)."
+ },
+ "shared_secret": {
+ "type": "string",
+ "title": "Client secret",
+ "description": "The secret of the client."
+ }
+ },
+ "required": [
+ "addon_key",
+ "client_key",
+ "shared_secret"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Addon credential",
+ "description": "The addon credential information (optional)"
+ },
+ "repository": {
+ "type": "string",
+ "title": "Bitbucket repository",
+ "description": "The Bitbucket repository (in the form `user/repo`)"
+ },
+ "build_pull_requests": {
+ "type": "boolean",
+ "title": "Build pull requests",
+ "description": "Whether or not to build pull requests"
+ },
+ "pull_requests_clone_parent_data": {
+ "type": "boolean",
+ "title": "Clone parent data",
+ "description": "Whether or not to clone parent data when building merge requests"
+ },
+ "pull_requests_max_pages": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Maximum pull request pages to fetch during full sync",
+ "description": "Maximum number of Bitbucket pull request pages to iterate when syncing pull requests. Null means no limit"
+ },
+ "resync_pull_requests": {
+ "type": "boolean",
+ "title": "Sync environment data",
+ "description": "Whether or not pull request environment data should be re-synced on every build"
+ }
+ },
+ "required": [
+ "type",
+ "repository"
+ ],
+ "additionalProperties": false
+ },
+ "BitbucketServerIntegration": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "BitbucketServerIntegration Identifier",
+ "description": "The identifier of BitbucketServerIntegration"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "role": {
+ "type": "string",
+ "title": "Integration role",
+ "description": "The role of the integration"
+ },
+ "fetch_branches": {
+ "type": "boolean",
+ "title": "Fetch Branches",
+ "description": "Whether or not to fetch branches"
+ },
+ "prune_branches": {
+ "type": "boolean",
+ "title": "Prune Branches",
+ "description": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`)"
+ },
+ "environment_init_resources": {
+ "type": "string",
+ "enum": [
+ "default",
+ "manual",
+ "minimum",
+ "parent"
+ ],
+ "title": "Environment Init Resources",
+ "description": "The resources used when initializing a new service"
+ },
+ "url": {
+ "type": "string",
+ "title": "URL",
+ "description": "The base URL of the Bitbucket Server installation"
+ },
+ "username": {
+ "type": "string",
+ "title": "Username",
+ "description": "The Bitbucket Server user"
+ },
+ "project": {
+ "type": "string",
+ "title": "Project",
+ "description": "The Bitbucket Server project"
+ },
+ "repository": {
+ "type": "string",
+ "title": "Repository",
+ "description": "The Bitbucket Server repository"
+ },
+ "build_pull_requests": {
+ "type": "boolean",
+ "title": "Build Pull Requests",
+ "description": "Whether or not to build pull requests"
+ },
+ "pull_requests_clone_parent_data": {
+ "type": "boolean",
+ "title": "Clone Parent Data",
+ "description": "Whether or not to clone parent data when building merge requests"
+ }
+ },
+ "required": [
+ "created_at",
+ "updated_at",
+ "type",
+ "role",
+ "fetch_branches",
+ "prune_branches",
+ "environment_init_resources",
+ "url",
+ "username",
+ "project",
+ "repository",
+ "build_pull_requests",
+ "pull_requests_clone_parent_data"
+ ],
+ "additionalProperties": false
+ },
+ "BitbucketServerIntegrationCreateInput": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "fetch_branches": {
+ "type": "boolean",
+ "title": "Fetch Branches",
+ "description": "Whether or not to fetch branches"
+ },
+ "prune_branches": {
+ "type": "boolean",
+ "title": "Prune Branches",
+ "description": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`)"
+ },
+ "environment_init_resources": {
+ "type": "string",
+ "enum": [
+ "default",
+ "manual",
+ "minimum",
+ "parent"
+ ],
+ "title": "Environment Init Resources",
+ "description": "The resources used when initializing a new service"
+ },
+ "url": {
+ "type": "string",
+ "title": "URL",
+ "description": "The base URL of the Bitbucket Server installation"
+ },
+ "username": {
+ "type": "string",
+ "title": "Username",
+ "description": "The Bitbucket Server user"
+ },
+ "token": {
+ "type": "string",
+ "title": "Token",
+ "description": "The Bitbucket Server personal access token"
+ },
+ "project": {
+ "type": "string",
+ "title": "Project",
+ "description": "The Bitbucket Server project"
+ },
+ "repository": {
+ "type": "string",
+ "title": "Repository",
+ "description": "The Bitbucket Server repository"
+ },
+ "build_pull_requests": {
+ "type": "boolean",
+ "title": "Build Pull Requests",
+ "description": "Whether or not to build pull requests"
+ },
+ "pull_requests_clone_parent_data": {
+ "type": "boolean",
+ "title": "Clone Parent Data",
+ "description": "Whether or not to clone parent data when building merge requests"
+ }
+ },
+ "required": [
+ "type",
+ "url",
+ "username",
+ "token",
+ "project",
+ "repository"
+ ],
+ "additionalProperties": false
+ },
+ "BitbucketServerIntegrationPatch": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "fetch_branches": {
+ "type": "boolean",
+ "title": "Fetch Branches",
+ "description": "Whether or not to fetch branches"
+ },
+ "prune_branches": {
+ "type": "boolean",
+ "title": "Prune Branches",
+ "description": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`)"
+ },
+ "environment_init_resources": {
+ "type": "string",
+ "enum": [
+ "default",
+ "manual",
+ "minimum",
+ "parent"
+ ],
+ "title": "Environment Init Resources",
+ "description": "The resources used when initializing a new service"
+ },
+ "url": {
+ "type": "string",
+ "title": "URL",
+ "description": "The base URL of the Bitbucket Server installation"
+ },
+ "username": {
+ "type": "string",
+ "title": "Username",
+ "description": "The Bitbucket Server user"
+ },
+ "token": {
+ "type": "string",
+ "title": "Token",
+ "description": "The Bitbucket Server personal access token"
+ },
+ "project": {
+ "type": "string",
+ "title": "Project",
+ "description": "The Bitbucket Server project"
+ },
+ "repository": {
+ "type": "string",
+ "title": "Repository",
+ "description": "The Bitbucket Server repository"
+ },
+ "build_pull_requests": {
+ "type": "boolean",
+ "title": "Build Pull Requests",
+ "description": "Whether or not to build pull requests"
+ },
+ "pull_requests_clone_parent_data": {
+ "type": "boolean",
+ "title": "Clone Parent Data",
+ "description": "Whether or not to clone parent data when building merge requests"
+ }
+ },
+ "required": [
+ "type",
+ "url",
+ "username",
+ "token",
+ "project",
+ "repository"
+ ],
+ "additionalProperties": false
+ },
+ "BlackfireIntegration": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "BlackfireIntegration Identifier",
+ "description": "The identifier of BlackfireIntegration"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "role": {
+ "type": "string",
+ "title": "Integration role",
+ "description": "The role of the integration"
+ },
+ "environments_credentials": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "server_uuid": {
+ "type": "string",
+ "title": "Server UUID",
+ "description": "The environment server UUID"
+ },
+ "server_token": {
+ "type": "string",
+ "title": "Server Token",
+ "description": "Environment server token"
+ }
+ },
+ "required": [
+ "server_uuid",
+ "server_token"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Environments Credentials",
+ "description": "Blackfire environments credentials"
+ },
+ "continuous_profiling": {
+ "type": "boolean",
+ "title": "Continuous Profiling",
+ "description": "Whether continuous profiling is enabled for the project"
+ }
+ },
+ "required": [
+ "created_at",
+ "updated_at",
+ "type",
+ "role",
+ "environments_credentials",
+ "continuous_profiling"
+ ],
+ "additionalProperties": false
+ },
+ "BlackfireIntegrationCreateInput": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "BlackfireIntegrationPatch": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "Blob": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "Blob Identifier",
+ "description": "The identifier of Blob"
+ },
+ "sha": {
+ "type": "string",
+ "title": "SHA",
+ "description": "The identifier of the tag"
+ },
+ "size": {
+ "type": "integer",
+ "title": "Size",
+ "description": "The size of the blob"
+ },
+ "encoding": {
+ "type": "string",
+ "enum": [
+ "base64",
+ "utf-8"
+ ],
+ "title": "Encoding",
+ "description": "The encoding of the contents"
+ },
+ "content": {
+ "type": "string",
+ "title": "Content",
+ "description": "The contents"
+ }
+ },
+ "required": [
+ "id",
+ "sha",
+ "size",
+ "encoding",
+ "content"
+ ],
+ "additionalProperties": false
+ },
+ "Certificate": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "Certificate Identifier",
+ "description": "The identifier of Certificate"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "certificate": {
+ "type": "string",
+ "title": "Certificate",
+ "description": "The PEM-encoded certificate"
+ },
+ "chain": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Certificate chain",
+ "description": "The certificate chain"
+ },
+ "is_provisioned": {
+ "type": "boolean",
+ "title": "Is Provisioned",
+ "description": "Whether this certificate is automatically provisioned"
+ },
+ "is_invalid": {
+ "type": "boolean",
+ "title": "Is Invalid",
+ "description": "Whether this certificate should be skipped during provisioning"
+ },
+ "is_root": {
+ "type": "boolean",
+ "title": "Is Root",
+ "description": "Whether this certificate is root type"
+ },
+ "domains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Domains",
+ "description": "The domains covered by this certificate"
+ },
+ "auth_type": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Authentication Type",
+ "description": "The type of authentication the certificate supports"
+ },
+ "issuer": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "oid": {
+ "type": "string",
+ "title": "OID",
+ "description": "The OID of the attribute"
+ },
+ "alias": {
+ "type": "string",
+ "nullable": true,
+ "title": "Alias",
+ "description": "The alias of the attribute, if known"
+ },
+ "value": {
+ "type": "string",
+ "title": "Value",
+ "description": "The value"
+ }
+ },
+ "required": [
+ "oid",
+ "alias",
+ "value"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Issuer",
+ "description": "The issuer of the certificate"
+ },
+ "expires_at": {
+ "type": "string",
+ "format": "date-time",
+ "title": "Expiration date",
+ "description": "Expiration date"
+ }
+ },
+ "required": [
+ "id",
+ "created_at",
+ "updated_at",
+ "certificate",
+ "chain",
+ "is_provisioned",
+ "is_invalid",
+ "is_root",
+ "domains",
+ "auth_type",
+ "issuer",
+ "expires_at"
+ ],
+ "additionalProperties": false
+ },
+ "CertificateCollection": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Certificate"
+ }
+ },
+ "CertificateCreateInput": {
+ "type": "object",
+ "properties": {
+ "certificate": {
+ "type": "string",
+ "title": "Certificate",
+ "description": "The PEM-encoded certificate"
+ },
+ "key": {
+ "type": "string",
+ "title": "Private Key",
+ "description": "The PEM-encoded private key"
+ },
+ "chain": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Certificate chain",
+ "description": "The certificate chain"
+ },
+ "is_invalid": {
+ "type": "boolean",
+ "title": "Is Invalid",
+ "description": "Whether this certificate should be skipped during provisioning"
+ }
+ },
+ "required": [
+ "certificate",
+ "key"
+ ],
+ "additionalProperties": false
+ },
+ "CertificatePatch": {
+ "type": "object",
+ "properties": {
+ "chain": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Certificate chain",
+ "description": "The certificate chain"
+ },
+ "is_invalid": {
+ "type": "boolean",
+ "title": "Is Invalid",
+ "description": "Whether this certificate should be skipped during provisioning"
+ }
+ },
+ "additionalProperties": false
+ },
+ "CertificateProvisioner": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "CertificateProvisioner Identifier",
+ "description": "The identifier of CertificateProvisioner"
+ },
+ "directory_url": {
+ "type": "string",
+ "title": "ACME directory url",
+ "description": "The URL to the ACME directory"
+ },
+ "email": {
+ "type": "string",
+ "title": "Contacted email address",
+ "description": "The email address for contact information"
+ },
+ "eab_kid": {
+ "type": "string",
+ "nullable": true,
+ "title": "EAB Key identifier",
+ "description": "The key identifier for Entity Attestation Binding"
+ },
+ "eab_hmac_key": {
+ "type": "string",
+ "nullable": true,
+ "title": "EAB HMAC Key",
+ "description": "The Keyed-'Hashing Message Authentication Code' for Entity Attestation Binding"
+ }
+ },
+ "required": [
+ "id",
+ "directory_url",
+ "email",
+ "eab_kid",
+ "eab_hmac_key"
+ ],
+ "additionalProperties": false
+ },
+ "CertificateProvisionerCollection": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/CertificateProvisioner"
+ }
+ },
+ "CertificateProvisionerPatch": {
+ "type": "object",
+ "properties": {
+ "directory_url": {
+ "type": "string",
+ "title": "ACME directory url",
+ "description": "The URL to the ACME directory"
+ },
+ "email": {
+ "type": "string",
+ "title": "Contacted email address",
+ "description": "The email address for contact information"
+ },
+ "eab_kid": {
+ "type": "string",
+ "nullable": true,
+ "title": "EAB Key identifier",
+ "description": "The key identifier for Entity Attestation Binding"
+ },
+ "eab_hmac_key": {
+ "type": "string",
+ "nullable": true,
+ "title": "EAB HMAC Key",
+ "description": "The Keyed-'Hashing Message Authentication Code' for Entity Attestation Binding"
+ }
+ },
+ "additionalProperties": false
+ },
+ "Commit": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "Commit Identifier",
+ "description": "The identifier of Commit"
+ },
+ "sha": {
+ "type": "string",
+ "title": "SHA",
+ "description": "The identifier of the commit"
+ },
+ "author": {
+ "type": "object",
+ "properties": {
+ "date": {
+ "type": "string",
+ "format": "date-time",
+ "title": "Date",
+ "description": "The time of the author or committer"
+ },
+ "name": {
+ "type": "string",
+ "title": "Name",
+ "description": "The name of the author or committer"
+ },
+ "email": {
+ "type": "string",
+ "title": "Email",
+ "description": "The email of the author or committer"
+ }
+ },
+ "required": [
+ "date",
+ "name",
+ "email"
+ ],
+ "additionalProperties": false,
+ "title": "Author",
+ "description": "The information about the author"
+ },
+ "committer": {
+ "type": "object",
+ "properties": {
+ "date": {
+ "type": "string",
+ "format": "date-time",
+ "title": "Date",
+ "description": "The time of the author or committer"
+ },
+ "name": {
+ "type": "string",
+ "title": "Name",
+ "description": "The name of the author or committer"
+ },
+ "email": {
+ "type": "string",
+ "title": "Email",
+ "description": "The email of the author or committer"
+ }
+ },
+ "required": [
+ "date",
+ "name",
+ "email"
+ ],
+ "additionalProperties": false,
+ "title": "Committer",
+ "description": "The information about the committer"
+ },
+ "message": {
+ "type": "string",
+ "title": "Message",
+ "description": "The commit message"
+ },
+ "tree": {
+ "type": "string",
+ "title": "Tree identifier",
+ "description": "The identifier of the tree"
+ },
+ "parents": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Parent identifiers",
+ "description": "The identifiers of the parents of the commit"
+ }
+ },
+ "required": [
+ "id",
+ "sha",
+ "author",
+ "committer",
+ "message",
+ "tree",
+ "parents"
+ ],
+ "additionalProperties": false
+ },
+ "DedicatedDeploymentTarget": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "DedicatedDeploymentTarget Identifier",
+ "description": "The identifier of DedicatedDeploymentTarget"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "dedicated",
+ "enterprise",
+ "foundation",
+ "kubernetes"
+ ],
+ "title": "Deployment target type",
+ "description": "The type of the deployment target"
+ },
+ "name": {
+ "type": "string",
+ "title": "Deployment target name",
+ "description": "The name of the deployment target"
+ },
+ "deploy_host": {
+ "type": "string",
+ "nullable": true,
+ "title": "Host",
+ "description": "The host to deploy to"
+ },
+ "deploy_port": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Port",
+ "description": "The port to deploy to"
+ },
+ "ssh_host": {
+ "type": "string",
+ "nullable": true,
+ "title": "SSH Host",
+ "description": "The host to use to SSH to app containers"
+ },
+ "hosts": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "nullable": true,
+ "title": "Host identifier",
+ "description": "The identifier of the host."
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "core",
+ "satellite"
+ ],
+ "title": "Deployment type",
+ "description": "The type of the deployment to this host."
+ },
+ "services": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "nullable": true,
+ "title": "Assigned services",
+ "description": "The services assigned to this host"
+ }
+ },
+ "required": [
+ "id",
+ "type",
+ "services"
+ ],
+ "additionalProperties": false
+ },
+ "nullable": true,
+ "title": "Hosts",
+ "description": "The hosts of the deployment target"
+ },
+ "auto_mounts": {
+ "type": "boolean",
+ "title": "Auto Mounts",
+ "description": "Whether to take application mounts from the pushed data or the deployment target"
+ },
+ "excluded_mounts": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Mounts",
+ "description": "Directories that should not be mounted"
+ },
+ "enforced_mounts": {
+ "type": "object",
+ "title": "Enforced Mounts",
+ "description": "Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount)"
+ },
+ "auto_crons": {
+ "type": "boolean",
+ "title": "Auto Crons",
+ "description": "Whether to take application crons from the pushed data or the deployment target"
+ },
+ "auto_nginx": {
+ "type": "boolean",
+ "title": "Auto Nginx",
+ "description": "Whether to take application crons from the pushed data or the deployment target"
+ },
+ "maintenance_mode": {
+ "type": "boolean",
+ "title": "Maintenance Mode",
+ "description": "Whether to perform deployments or not"
+ },
+ "guardrails_phase": {
+ "type": "integer",
+ "title": "Guardrails Phase",
+ "description": "which phase of guardrails are we in"
+ }
+ },
+ "required": [
+ "type",
+ "name",
+ "deploy_host",
+ "deploy_port",
+ "ssh_host",
+ "hosts",
+ "auto_mounts",
+ "excluded_mounts",
+ "enforced_mounts",
+ "auto_crons",
+ "auto_nginx",
+ "maintenance_mode",
+ "guardrails_phase"
+ ],
+ "additionalProperties": false
+ },
+ "DedicatedDeploymentTargetCreateInput": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "dedicated",
+ "enterprise",
+ "foundation",
+ "kubernetes"
+ ],
+ "title": "Deployment target type",
+ "description": "The type of the deployment target"
+ },
+ "name": {
+ "type": "string",
+ "title": "Deployment target name",
+ "description": "The name of the deployment target"
+ },
+ "enforced_mounts": {
+ "type": "object",
+ "title": "Enforced Mounts",
+ "description": "Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount)"
+ }
+ },
+ "required": [
+ "type",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ "DedicatedDeploymentTargetPatch": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "dedicated",
+ "enterprise",
+ "foundation",
+ "kubernetes"
+ ],
+ "title": "Deployment target type",
+ "description": "The type of the deployment target"
+ },
+ "name": {
+ "type": "string",
+ "title": "Deployment target name",
+ "description": "The name of the deployment target"
+ },
+ "enforced_mounts": {
+ "type": "object",
+ "title": "Enforced Mounts",
+ "description": "Mounts which are always injected into pushed (e.g. enforce /var/log to be a local mount)"
+ }
+ },
+ "required": [
+ "type",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ "Deployment": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "Deployment Identifier",
+ "description": "The identifier of Deployment"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date of the deployment"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date of the deployment"
+ },
+ "fingerprint": {
+ "type": "string",
+ "title": "Deployment fingerprint",
+ "description": "The fingerprint of the deployment"
+ },
+ "cluster_name": {
+ "type": "string",
+ "title": "Cluster name",
+ "description": "The name of the cluster"
+ },
+ "project_info": {
+ "type": "object",
+ "properties": {
+ "title": {
+ "type": "string",
+ "title": "Title",
+ "description": ""
+ },
+ "name": {
+ "type": "string",
+ "title": "Name",
+ "description": ""
+ },
+ "namespace": {
+ "type": "string",
+ "nullable": true,
+ "title": "Namespace",
+ "description": ""
+ },
+ "organization": {
+ "type": "string",
+ "nullable": true,
+ "title": "Organization",
+ "description": ""
+ },
+ "capabilities": {
+ "type": "object",
+ "title": "Capabilities",
+ "description": ""
+ },
+ "settings": {
+ "type": "object",
+ "title": "Settings",
+ "description": ""
+ }
+ },
+ "required": [
+ "title",
+ "name",
+ "namespace",
+ "organization",
+ "capabilities",
+ "settings"
+ ],
+ "additionalProperties": false,
+ "title": "Project info",
+ "description": "The project information"
+ },
+ "environment_info": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "title": "Environment name",
+ "description": "The machine name of the environment"
+ },
+ "status": {
+ "type": "string",
+ "title": "Environment status",
+ "description": "The enviroment status"
+ },
+ "is_main": {
+ "type": "boolean",
+ "title": "Is main environment",
+ "description": "Is this environment the main environment"
+ },
+ "is_production": {
+ "type": "boolean",
+ "title": "Is production environment",
+ "description": "Is this environment a production environment"
+ },
+ "constraints": {
+ "type": "object",
+ "title": "Environment constraints",
+ "description": "Constraints of the environment's deployment"
+ },
+ "reference": {
+ "type": "string",
+ "title": "Git reference",
+ "description": "The reference in Git for this environment"
+ },
+ "machine_name": {
+ "type": "string",
+ "title": "Machine name",
+ "description": "The machine name of the environment"
+ },
+ "environment_type": {
+ "type": "string",
+ "title": "Environment type",
+ "description": "The type of environment (Production, Staging or Development)"
+ },
+ "links": {
+ "type": "object",
+ "title": "Links",
+ "description": ""
+ }
+ },
+ "required": [
+ "name",
+ "status",
+ "is_main",
+ "is_production",
+ "constraints",
+ "reference",
+ "machine_name",
+ "environment_type",
+ "links"
+ ],
+ "additionalProperties": false,
+ "title": "Environment info",
+ "description": "The environment information"
+ },
+ "deployment_target": {
+ "type": "string",
+ "title": "Deployment target",
+ "description": "The deployment target"
+ },
+ "vpn": {
+ "type": "object",
+ "properties": {
+ "version": {
+ "type": "integer",
+ "enum": [
+ 1,
+ 2
+ ],
+ "title": "IKE Version",
+ "description": "The IKE version to use (1 or 2)"
+ },
+ "aggressive": {
+ "type": "string",
+ "enum": [
+ "no",
+ "yes"
+ ],
+ "title": "Aggressive Mode",
+ "description": "Whether to use IKEv1 Aggressive or Main Mode"
+ },
+ "modeconfig": {
+ "type": "string",
+ "enum": [
+ "pull",
+ "push"
+ ],
+ "title": "Mode Config",
+ "description": "Defines which mode is used to assign a virtual IP (must be the same on both sides)"
+ },
+ "authentication": {
+ "type": "string",
+ "title": "Authentication scheme",
+ "description": "The authentication scheme"
+ },
+ "gateway_ip": {
+ "type": "string",
+ "title": "Remote gateway IP",
+ "description": ""
+ },
+ "identity": {
+ "type": "string",
+ "nullable": true,
+ "title": "Identity",
+ "description": "The identity of the ipsec participant"
+ },
+ "second_identity": {
+ "type": "string",
+ "nullable": true,
+ "title": "Second Identity",
+ "description": "The second identity of the ipsec participant"
+ },
+ "remote_identity": {
+ "type": "string",
+ "nullable": true,
+ "title": "Remote Identity",
+ "description": "The identity of the remote ipsec participant"
+ },
+ "remote_subnets": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Remote Subnets",
+ "description": "Remote subnets (CIDR notation)"
+ },
+ "ike": {
+ "type": "string",
+ "title": "IKE algorithms",
+ "description": "The IKE algorithms to negotiate for this VPN connection."
+ },
+ "esp": {
+ "type": "string",
+ "title": "ESP algorithms",
+ "description": "The ESP algorithms to negotiate for this VPN connection."
+ },
+ "ikelifetime": {
+ "type": "string",
+ "title": "IKE Lifetime",
+ "description": "The lifetime of the IKE exchange."
+ },
+ "lifetime": {
+ "type": "string",
+ "title": "ESP Lifetime",
+ "description": "The lifetime of the ESP exchange."
+ },
+ "margintime": {
+ "type": "string",
+ "title": "Margin Time",
+ "description": "The margin time for re-keying."
+ }
+ },
+ "required": [
+ "version",
+ "aggressive",
+ "modeconfig",
+ "authentication",
+ "gateway_ip",
+ "identity",
+ "second_identity",
+ "remote_identity",
+ "remote_subnets",
+ "ike",
+ "esp",
+ "ikelifetime",
+ "lifetime",
+ "margintime"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "VPN configuration",
+ "description": "The configuration of the VPN"
+ },
+ "http_access": {
+ "type": "object",
+ "properties": {
+ "is_enabled": {
+ "type": "boolean",
+ "title": "Is enabled",
+ "description": "Whether http_access control is enabled"
+ },
+ "addresses": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "permission": {
+ "type": "string",
+ "enum": [
+ "allow",
+ "deny"
+ ],
+ "title": "Permission",
+ "description": ""
+ },
+ "address": {
+ "type": "string",
+ "title": "Address",
+ "description": "IP address or CIDR"
+ }
+ },
+ "required": [
+ "permission",
+ "address"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Address grants",
+ "description": ""
+ },
+ "basic_auth": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Basic auth grants",
+ "description": ""
+ }
+ },
+ "required": [
+ "is_enabled",
+ "addresses",
+ "basic_auth"
+ ],
+ "additionalProperties": false,
+ "title": "HTTP access permissions",
+ "description": "The permissions of the HTTP access"
+ },
+ "enable_smtp": {
+ "type": "boolean",
+ "title": "Enable SMTP",
+ "description": "Whether to configure SMTP for this environment"
+ },
+ "restrict_robots": {
+ "type": "boolean",
+ "title": "Restrict robots",
+ "description": "Whether to restrict robots for this environment"
+ },
+ "variables": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "title": "Variable name",
+ "description": "Name of the variable"
+ },
+ "value": {
+ "type": "string",
+ "title": "Variable value",
+ "description": "Value of the variable"
+ },
+ "is_sensitive": {
+ "type": "boolean",
+ "title": "Is sensitive",
+ "description": "The variable is sensitive"
+ },
+ "is_json": {
+ "type": "boolean",
+ "title": "Is JSON",
+ "description": "The variable is a JSON string"
+ },
+ "visible_build": {
+ "type": "boolean",
+ "title": "Visible at build time",
+ "description": "The variable is visible during build"
+ },
+ "visible_runtime": {
+ "type": "boolean",
+ "title": "Visible at runtime",
+ "description": "The variable is visible at runtime"
+ }
+ },
+ "required": [
+ "name",
+ "is_sensitive",
+ "is_json",
+ "visible_build",
+ "visible_runtime"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Environment variables",
+ "description": "The variables applying to this environment"
+ },
+ "access": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "entity_id": {
+ "type": "string",
+ "title": "Entity ID",
+ "description": ""
+ },
+ "role": {
+ "type": "string",
+ "enum": [
+ "admin",
+ "contributor",
+ "viewer"
+ ],
+ "title": "Role",
+ "description": ""
+ }
+ },
+ "required": [
+ "entity_id",
+ "role"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Access control",
+ "description": "Access control definition for this enviroment"
+ },
+ "subscription": {
+ "type": "object",
+ "properties": {
+ "license_uri": {
+ "type": "string",
+ "title": "Subscription URI",
+ "description": "URI of the subscription"
+ },
+ "plan": {
+ "type": "string",
+ "enum": [
+ "2xlarge",
+ "2xlarge-high-memory",
+ "4xlarge",
+ "8xlarge",
+ "development",
+ "large",
+ "large-high-memory",
+ "medium",
+ "medium-high-memory",
+ "standard",
+ "standard-high-memory",
+ "xlarge",
+ "xlarge-high-memory"
+ ],
+ "title": "Plan level",
+ "description": ""
+ },
+ "environments": {
+ "type": "integer",
+ "title": "Environments number",
+ "description": "Number of environments"
+ },
+ "storage": {
+ "type": "integer",
+ "title": "Storage",
+ "description": "Size of storage (in MB)"
+ },
+ "included_users": {
+ "type": "integer",
+ "title": "Included users",
+ "description": "Number of users"
+ },
+ "subscription_management_uri": {
+ "type": "string",
+ "title": "Subscription management URI",
+ "description": "URI for managing the subscription"
+ },
+ "restricted": {
+ "type": "boolean",
+ "title": "Is subscription attributes frozen",
+ "description": "True if subscription attributes, like number of users, are frozen"
+ },
+ "suspended": {
+ "type": "boolean",
+ "title": "Is subscription suspended",
+ "description": "Whether or not the subscription is suspended"
+ },
+ "user_licenses": {
+ "type": "integer",
+ "title": "Current number of users",
+ "description": "Current number of users"
+ },
+ "resources": {
+ "type": "object",
+ "properties": {
+ "container_profiles": {
+ "type": "boolean",
+ "title": "Is Container profiles enabled",
+ "description": "Enable support for customizable container profiles"
+ },
+ "production": {
+ "type": "object",
+ "properties": {
+ "legacy_development": {
+ "type": "boolean",
+ "title": "Legacy development sizing",
+ "description": "Enable legacy development sizing for this environment type"
+ },
+ "max_cpu": {
+ "type": "number",
+ "format": "float",
+ "nullable": true,
+ "title": "Maximum CPU units",
+ "description": "Maximum number of allocated CPU units"
+ },
+ "max_memory": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Maximum RAM",
+ "description": "Maximum amount of allocated RAM"
+ },
+ "max_environments": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Maximum environments",
+ "description": "Maximum number of environments"
+ }
+ },
+ "required": [
+ "legacy_development",
+ "max_cpu",
+ "max_memory",
+ "max_environments"
+ ],
+ "additionalProperties": false,
+ "title": "Production resources",
+ "description": "Resources for production environments"
+ },
+ "development": {
+ "type": "object",
+ "properties": {
+ "legacy_development": {
+ "type": "boolean",
+ "title": "Legacy development sizing",
+ "description": "Enable legacy development sizing for this environment type"
+ },
+ "max_cpu": {
+ "type": "number",
+ "format": "float",
+ "nullable": true,
+ "title": "Maximum CPU units",
+ "description": "Maximum number of allocated CPU units"
+ },
+ "max_memory": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Maximum RAM",
+ "description": "Maximum amount of allocated RAM"
+ },
+ "max_environments": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Maximum environments",
+ "description": "Maximum number of environments"
+ }
+ },
+ "required": [
+ "legacy_development",
+ "max_cpu",
+ "max_memory",
+ "max_environments"
+ ],
+ "additionalProperties": false,
+ "title": "Development resources",
+ "description": "Resources for development environments"
+ }
+ },
+ "required": [
+ "container_profiles",
+ "production",
+ "development"
+ ],
+ "additionalProperties": false,
+ "title": "Resources limits",
+ "description": "Resources limits"
+ },
+ "resource_validation_url": {
+ "type": "string",
+ "title": "Resource validation URL",
+ "description": "URL for resources validation"
+ },
+ "image_types": {
+ "type": "object",
+ "properties": {
+ "only": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Allowed image types",
+ "description": "Image types to be allowed use."
+ },
+ "exclude": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Denied image types",
+ "description": "Image types to be denied use."
+ }
+ },
+ "additionalProperties": false,
+ "title": "Image type restrictions",
+ "description": "Restricted and denied image types"
+ }
+ },
+ "required": [
+ "license_uri",
+ "storage",
+ "included_users",
+ "subscription_management_uri",
+ "restricted",
+ "suspended",
+ "user_licenses"
+ ],
+ "additionalProperties": false,
+ "title": "Subscription",
+ "description": "Subscription"
+ },
+ "services": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Service type",
+ "description": "The service type."
+ },
+ "size": {
+ "type": "string",
+ "enum": [
+ "2XL",
+ "4XL",
+ "AUTO",
+ "L",
+ "M",
+ "S",
+ "XL"
+ ],
+ "title": "Service size",
+ "description": "The service size."
+ },
+ "disk": {
+ "type": "integer",
+ "nullable": true,
+ "title": "The size of the disk.",
+ "description": ""
+ },
+ "access": {
+ "type": "object",
+ "title": "Access configuration",
+ "description": "The configuration of the service."
+ },
+ "configuration": {
+ "type": "object",
+ "title": "Service configuration",
+ "description": "The configuration of the service."
+ },
+ "relationships": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Service relationships",
+ "description": "The relationships of the service to other services."
+ },
+ "firewall": {
+ "type": "object",
+ "properties": {
+ "outbound": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "protocol": {
+ "type": "string",
+ "enum": [
+ "tcp"
+ ],
+ "title": "IP Protocol",
+ "description": "The IP protocol to apply the restriction on."
+ },
+ "ips": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "IP Ranges",
+ "description": "The IP range in CIDR notation to apply the restriction on."
+ },
+ "domains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Domains",
+ "description": "Domains of the restriction."
+ },
+ "ports": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ },
+ "title": "Ports",
+ "description": "The port to apply the restriction on."
+ }
+ },
+ "required": [
+ "protocol",
+ "ips",
+ "domains",
+ "ports"
+ ],
+ "additionalProperties": false
+ },
+ "nullable": true,
+ "title": "Outbound Firewall Restrictions",
+ "description": "Outbound firewall restrictions"
+ }
+ },
+ "required": [
+ "outbound"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Firewall",
+ "description": ""
+ },
+ "resources": {
+ "type": "object",
+ "properties": {
+ "base_memory": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Base memory",
+ "description": "The base memory for the container"
+ },
+ "memory_ratio": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Memory ratio",
+ "description": "The amount of memory to allocate per units of CPU"
+ },
+ "profile_size": {
+ "type": "string",
+ "nullable": true,
+ "title": "Profile size",
+ "description": "Selected size from container profile"
+ },
+ "minimum": {
+ "type": "object",
+ "properties": {
+ "cpu": {
+ "type": "number",
+ "format": "float",
+ "title": "CPU",
+ "description": "Cpu value"
+ },
+ "memory": {
+ "type": "integer",
+ "title": "Memory",
+ "description": "Memory in MB"
+ },
+ "cpu_type": {
+ "type": "string",
+ "enum": [
+ "guaranteed",
+ "shared"
+ ],
+ "title": "Type",
+ "description": "resource type"
+ },
+ "disk": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Disk size",
+ "description": "Disk size in MB"
+ },
+ "profile_size": {
+ "type": "string",
+ "nullable": true,
+ "title": "Profile size",
+ "description": "The closest profile size that matches the resources"
+ }
+ },
+ "required": [
+ "cpu",
+ "memory",
+ "cpu_type",
+ "disk",
+ "profile_size"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Minimum resources",
+ "description": "The minimum resources for this service"
+ },
+ "default": {
+ "type": "object",
+ "properties": {
+ "cpu": {
+ "type": "number",
+ "format": "float",
+ "title": "CPU",
+ "description": "Cpu value"
+ },
+ "memory": {
+ "type": "integer",
+ "title": "Memory",
+ "description": "Memory in MB"
+ },
+ "cpu_type": {
+ "type": "string",
+ "enum": [
+ "guaranteed",
+ "shared"
+ ],
+ "title": "Type",
+ "description": "resource type"
+ },
+ "disk": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Disk size",
+ "description": "Disk size in MB"
+ },
+ "profile_size": {
+ "type": "string",
+ "nullable": true,
+ "title": "Profile size",
+ "description": "The closest profile size that matches the resources"
+ }
+ },
+ "required": [
+ "cpu",
+ "memory",
+ "cpu_type",
+ "disk",
+ "profile_size"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Default resources",
+ "description": "The default resources for this service"
+ },
+ "disk": {
+ "type": "object",
+ "properties": {
+ "temporary": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Temporary",
+ "description": ""
+ },
+ "instance": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Instance",
+ "description": ""
+ },
+ "storage": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Storage",
+ "description": ""
+ }
+ },
+ "required": [
+ "temporary",
+ "instance",
+ "storage"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Disk resources",
+ "description": "The disks resources"
+ }
+ },
+ "required": [
+ "base_memory",
+ "memory_ratio",
+ "profile_size",
+ "minimum",
+ "default",
+ "disk"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Resources",
+ "description": ""
+ },
+ "container_profile": {
+ "type": "string",
+ "nullable": true,
+ "title": "Container profile",
+ "description": "Selected container profile for the service"
+ },
+ "endpoints": {
+ "type": "object",
+ "nullable": true,
+ "title": "Endpoints",
+ "description": ""
+ },
+ "instance_count": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Instance count",
+ "description": "Instance replication count of this service"
+ },
+ "supports_horizontal_scaling": {
+ "type": "boolean",
+ "title": "Supports horizontal scaling",
+ "description": "Whether this service type supports horizontal scaling"
+ }
+ },
+ "required": [
+ "type",
+ "size",
+ "disk",
+ "access",
+ "configuration",
+ "relationships",
+ "firewall",
+ "resources",
+ "container_profile",
+ "endpoints",
+ "instance_count",
+ "supports_horizontal_scaling"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Services",
+ "description": "The services"
+ },
+ "routes": {
+ "type": "object",
+ "additionalProperties": {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/ProxyRoute"
+ },
+ {
+ "$ref": "#/components/schemas/RedirectRoute"
+ },
+ {
+ "$ref": "#/components/schemas/UpstreamRoute"
+ }
+ ]
+ },
+ "title": "Routes",
+ "description": "The routes"
+ },
+ "webapps": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "resources": {
+ "type": "object",
+ "properties": {
+ "base_memory": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Base memory",
+ "description": "The base memory for the container"
+ },
+ "memory_ratio": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Memory ratio",
+ "description": "The amount of memory to allocate per units of CPU"
+ },
+ "profile_size": {
+ "type": "string",
+ "nullable": true,
+ "title": "Profile size",
+ "description": "Selected size from container profile"
+ },
+ "minimum": {
+ "type": "object",
+ "properties": {
+ "cpu": {
+ "type": "number",
+ "format": "float",
+ "title": "CPU",
+ "description": "Cpu value"
+ },
+ "memory": {
+ "type": "integer",
+ "title": "Memory",
+ "description": "Memory in MB"
+ },
+ "cpu_type": {
+ "type": "string",
+ "enum": [
+ "guaranteed",
+ "shared"
+ ],
+ "title": "Type",
+ "description": "resource type"
+ },
+ "disk": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Disk size",
+ "description": "Disk size in MB"
+ },
+ "profile_size": {
+ "type": "string",
+ "nullable": true,
+ "title": "Profile size",
+ "description": "The closest profile size that matches the resources"
+ }
+ },
+ "required": [
+ "cpu",
+ "memory",
+ "cpu_type",
+ "disk",
+ "profile_size"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Minimum resources",
+ "description": "The minimum resources for this service"
+ },
+ "default": {
+ "type": "object",
+ "properties": {
+ "cpu": {
+ "type": "number",
+ "format": "float",
+ "title": "CPU",
+ "description": "Cpu value"
+ },
+ "memory": {
+ "type": "integer",
+ "title": "Memory",
+ "description": "Memory in MB"
+ },
+ "cpu_type": {
+ "type": "string",
+ "enum": [
+ "guaranteed",
+ "shared"
+ ],
+ "title": "Type",
+ "description": "resource type"
+ },
+ "disk": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Disk size",
+ "description": "Disk size in MB"
+ },
+ "profile_size": {
+ "type": "string",
+ "nullable": true,
+ "title": "Profile size",
+ "description": "The closest profile size that matches the resources"
+ }
+ },
+ "required": [
+ "cpu",
+ "memory",
+ "cpu_type",
+ "disk",
+ "profile_size"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Default resources",
+ "description": "The default resources for this service"
+ },
+ "disk": {
+ "type": "object",
+ "properties": {
+ "temporary": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Temporary",
+ "description": ""
+ },
+ "instance": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Instance",
+ "description": ""
+ },
+ "storage": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Storage",
+ "description": ""
+ },
+ "object": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Object storage size",
+ "description": ""
+ }
+ },
+ "required": [
+ "temporary",
+ "instance",
+ "storage",
+ "object"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Disk resources",
+ "description": "The disks resources"
+ }
+ },
+ "required": [
+ "base_memory",
+ "memory_ratio",
+ "profile_size",
+ "minimum",
+ "default",
+ "disk"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Resources",
+ "description": ""
+ },
+ "authorizations": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "env",
+ "task"
+ ],
+ "title": "Authorization Type",
+ "description": "The resource type for this authorization."
+ },
+ "action": {
+ "type": "string",
+ "title": "Authorization Action",
+ "description": "The action to authorize on the target resource."
+ },
+ "resource": {
+ "type": "string",
+ "nullable": true,
+ "title": "Authorization Resource",
+ "description": "The target resource for this authorization."
+ }
+ },
+ "required": [
+ "type",
+ "action",
+ "resource"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Authorizations",
+ "description": "Authorizations available to this container"
+ },
+ "relationships": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "service": {
+ "type": "string",
+ "nullable": true,
+ "title": "Service Name",
+ "description": "The name of the service."
+ },
+ "endpoint": {
+ "type": "string",
+ "nullable": true,
+ "title": "Endpoint Name",
+ "description": "The name of the endpoint on the service."
+ }
+ },
+ "required": [
+ "service",
+ "endpoint"
+ ],
+ "additionalProperties": false,
+ "nullable": true
+ },
+ "title": "Service Relationships",
+ "description": "The relationships of the container to defined services"
+ },
+ "additional_hosts": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Additional hosts",
+ "description": "A mapping of hostname to ip address to be added to the container's hosts file"
+ },
+ "mounts": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "source": {
+ "type": "string",
+ "enum": [
+ "instance",
+ "local",
+ "service",
+ "storage",
+ "temporary",
+ "tmp"
+ ],
+ "title": "Mount type",
+ "description": "The type of mount that will provide the data."
+ },
+ "source_path": {
+ "type": "string",
+ "title": "Source Path",
+ "description": "The path to be mounted, relative to the root directory of the volume that's being mounted from."
+ },
+ "service": {
+ "type": "string",
+ "nullable": true,
+ "title": "Service Name",
+ "description": "The name of the service that the volume will be mounted from. Must be a service in `services.yaml` of type `network-storage`."
+ }
+ },
+ "required": [
+ "source",
+ "source_path"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Mounts",
+ "description": "Filesystem mounts of this container. If not specified the container will have no writeable disk space"
+ },
+ "timezone": {
+ "type": "string",
+ "nullable": true,
+ "title": "Timezone",
+ "description": "The timezone of the application. This primarily affects the timezone in which cron tasks will run. It will not affect the application itself. Defaults to UTC if not specified."
+ },
+ "variables": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "additionalProperties": {}
+ },
+ "title": "Environment Variables",
+ "description": "Variables provide environment-sensitive information to control how this container behaves. To set a Unix environment variable, specify a key of `env:`, and then each sub-item of that is a key/value pair that will be injected into the environment"
+ },
+ "container_profile": {
+ "type": "string",
+ "nullable": true,
+ "title": "Container Profile",
+ "description": "Selected container profile for this container"
+ },
+ "size": {
+ "type": "string",
+ "enum": [
+ "2XL",
+ "4XL",
+ "AUTO",
+ "L",
+ "M",
+ "S",
+ "XL",
+ "XS"
+ ],
+ "title": "Container Size",
+ "description": "The container size for this application in production. Leave blank to allow it to be set dynamically."
+ },
+ "disk": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Disk size",
+ "description": "The size of the disk."
+ },
+ "access": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string",
+ "enum": [
+ "admin",
+ "contributor",
+ "viewer"
+ ]
+ },
+ "title": "Access Information",
+ "description": "Access information, a mapping between access type and roles."
+ },
+ "firewall": {
+ "type": "object",
+ "properties": {
+ "outbound": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "protocol": {
+ "type": "string",
+ "enum": [
+ "tcp"
+ ],
+ "title": "IP Protocol",
+ "description": "The IP protocol to apply the restriction on."
+ },
+ "ips": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "IP Ranges",
+ "description": "The IP range in CIDR notation to apply the restriction on."
+ },
+ "domains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Domains",
+ "description": "Domains of the restriction."
+ },
+ "ports": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ },
+ "title": "Ports",
+ "description": "The port to apply the restriction on."
+ }
+ },
+ "required": [
+ "protocol",
+ "ips",
+ "domains",
+ "ports"
+ ],
+ "additionalProperties": false
+ },
+ "nullable": true,
+ "title": "Outbound Firewall Restrictions",
+ "description": "Outbound firewall restrictions"
+ }
+ },
+ "required": [
+ "outbound"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Firewall",
+ "description": ""
+ },
+ "egress": {
+ "type": "object",
+ "properties": {
+ "build": {
+ "type": "object",
+ "properties": {
+ "allowed_domains": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "host": {
+ "type": "string",
+ "title": "Hostname",
+ "description": "The destination hostname."
+ },
+ "port": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Port",
+ "description": "Destination port. Omit for the default web ports (80/443), or specify explicitly for non-HTTP destinations (e.g. databases) reached over a CONNECT tunnel."
+ }
+ },
+ "required": [
+ "host",
+ "port"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Allowed Domains",
+ "description": "Destinations the container is permitted to reach."
+ }
+ },
+ "required": [
+ "allowed_domains"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Build-phase egress",
+ "description": "Egress allowlist applied to build containers."
+ },
+ "runtime": {
+ "type": "object",
+ "properties": {
+ "allowed_domains": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "host": {
+ "type": "string",
+ "title": "Hostname",
+ "description": "The destination hostname."
+ },
+ "port": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Port",
+ "description": "Destination port. Omit for the default web ports (80/443), or specify explicitly for non-HTTP destinations (e.g. databases) reached over a CONNECT tunnel."
+ }
+ },
+ "required": [
+ "host",
+ "port"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Allowed Domains",
+ "description": "Destinations the container is permitted to reach."
+ }
+ },
+ "required": [
+ "allowed_domains"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Runtime-phase egress",
+ "description": "Egress allowlist applied to runtime containers."
+ }
+ },
+ "required": [
+ "build",
+ "runtime"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Egress",
+ "description": ""
+ },
+ "operations": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "commands": {
+ "type": "object",
+ "properties": {
+ "start": {
+ "type": "string",
+ "title": "Start Command",
+ "description": "The command used to start the operation."
+ },
+ "stop": {
+ "type": "string",
+ "nullable": true,
+ "title": "Stop Command",
+ "description": "The command used to stop the operation."
+ }
+ },
+ "required": [
+ "start"
+ ],
+ "additionalProperties": false,
+ "title": "Commands",
+ "description": "The commands definition."
+ },
+ "timeout": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Timeout",
+ "description": "The maximum timeout in seconds after which the operation will be forcefully killed."
+ },
+ "role": {
+ "type": "string",
+ "enum": [
+ "admin",
+ "contributor",
+ "viewer"
+ ],
+ "title": "Role",
+ "description": "The minimum role necessary to trigger this operation."
+ }
+ },
+ "required": [
+ "commands",
+ "timeout",
+ "role"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Operations",
+ "description": "Operations that can be triggered on this application"
+ },
+ "name": {
+ "type": "string",
+ "title": "Application Name",
+ "description": "The name of the application. Must be unique within a project."
+ },
+ "type": {
+ "type": "string",
+ "title": "Type",
+ "description": "The base runtime and version to use for this worker."
+ },
+ "preflight": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enable Preflight Security Blocks",
+ "description": "Whether the preflight security blocks are enabled."
+ },
+ "ignored_rules": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Ignored Rules",
+ "description": "Specific rules to ignore during preflight security checks. See the documentation for options."
+ }
+ },
+ "required": [
+ "enabled",
+ "ignored_rules"
+ ],
+ "additionalProperties": false,
+ "title": "Preflight Checks",
+ "description": "Configuration for pre-flight checks."
+ },
+ "tree_id": {
+ "type": "string",
+ "title": "Source Tree ID",
+ "description": "The identifier of the source tree of the application"
+ },
+ "app_dir": {
+ "type": "string",
+ "title": "Application Directory",
+ "description": "The path of the application in the container"
+ },
+ "endpoints": {
+ "type": "object",
+ "nullable": true,
+ "title": "Endpoints",
+ "description": ""
+ },
+ "runtime": {
+ "type": "object",
+ "title": "Runtime Configuration",
+ "description": "Runtime-specific configuration."
+ },
+ "web": {
+ "type": "object",
+ "properties": {
+ "locations": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "root": {
+ "type": "string",
+ "nullable": true,
+ "title": "Document Root",
+ "description": "The folder from which to serve static assets for this location relative to the application root."
+ },
+ "expires": {
+ "type": "string",
+ "title": "Expires",
+ "description": "Amount of time to cache static assets."
+ },
+ "passthru": {
+ "type": "string",
+ "title": "Passthru",
+ "description": "Whether to forward disallowed and missing resources from this location to the application. On PHP, set to the PHP front controller script, as a URL fragment. Otherwise set to `true`/`false`."
+ },
+ "scripts": {
+ "type": "boolean",
+ "title": "Scripts",
+ "description": "Whether to execute scripts in this location (for script based runtimes). The default value depends on the project setting `locations_script_default`"
+ },
+ "index": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "nullable": true,
+ "title": "Index Files",
+ "description": "Files to look for to serve directories."
+ },
+ "allow": {
+ "type": "boolean",
+ "title": "Allow access",
+ "description": "Whether to allow access to this location by default."
+ },
+ "headers": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Headers",
+ "description": "A set of header fields set to the HTTP response. Applies only to static files, not responses from the application."
+ },
+ "rules": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "expires": {
+ "type": "string",
+ "nullable": true,
+ "title": "Expires",
+ "description": "Amount of time to cache static assets."
+ },
+ "passthru": {
+ "type": "string",
+ "title": "Passthru",
+ "description": "Whether to forward disallowed and missing resources from this location to the application. On PHP, set to the PHP front controller script, as a URL fragment. Otherwise set to `true`/`false`."
+ },
+ "scripts": {
+ "type": "boolean",
+ "title": "Scripts",
+ "description": "Whether to execute scripts in this location (for script based runtimes)."
+ },
+ "allow": {
+ "type": "boolean",
+ "title": "Allow access",
+ "description": "Whether to allow access to this location by default."
+ },
+ "headers": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Headers",
+ "description": "A set of header fields set to the HTTP response. Replaces headers set on the location block."
+ }
+ },
+ "additionalProperties": false
+ },
+ "title": "Specific overrides",
+ "description": "Specific overrides."
+ },
+ "request_buffering": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enable Request Buffering",
+ "description": "Enable request buffering."
+ },
+ "max_request_size": {
+ "type": "string",
+ "nullable": true,
+ "title": "Maximum request size",
+ "description": "The maximum size request that can be buffered. Supports K, M, and G suffixes."
+ }
+ },
+ "required": [
+ "enabled",
+ "max_request_size"
+ ],
+ "additionalProperties": false,
+ "title": "Request Buffering",
+ "description": "Configuration for supporting request buffering."
+ }
+ },
+ "required": [
+ "root",
+ "expires",
+ "passthru",
+ "scripts",
+ "allow",
+ "headers",
+ "rules"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Web Locations",
+ "description": "The specification of the web locations served by this application."
+ },
+ "commands": {
+ "type": "object",
+ "properties": {
+ "pre_start": {
+ "type": "string",
+ "nullable": true,
+ "title": "Pre-start Command",
+ "description": "A command executed before the application is started"
+ },
+ "start": {
+ "type": "string",
+ "nullable": true,
+ "title": "Start Command",
+ "description": "The command used to start the application. It will be restarted if it terminates. Do not use on PHP unless using a custom persistent process like React PHP."
+ },
+ "post_start": {
+ "type": "string",
+ "nullable": true,
+ "title": "Post-start Command",
+ "description": "A command executed after the application is started"
+ }
+ },
+ "additionalProperties": false,
+ "title": "Commands",
+ "description": "Commands to manage the application's lifecycle."
+ },
+ "upstream": {
+ "type": "object",
+ "properties": {
+ "socket_family": {
+ "type": "string",
+ "enum": [
+ "tcp",
+ "unix"
+ ],
+ "title": "Socket Family",
+ "description": "If `tcp`, check the PORT environment variable on application startup. If `unix`, check SOCKET."
+ },
+ "protocol": {
+ "type": "string",
+ "enum": [
+ "fastcgi",
+ "http"
+ ],
+ "nullable": true,
+ "title": "Protocol",
+ "description": ""
+ }
+ },
+ "required": [
+ "socket_family",
+ "protocol"
+ ],
+ "additionalProperties": false,
+ "title": "Upstream Configuration",
+ "description": "Configuration on how the web server communicates with the application."
+ },
+ "document_root": {
+ "type": "string",
+ "nullable": true,
+ "title": "Document Root",
+ "description": "The document root of this application, relative to its root."
+ },
+ "passthru": {
+ "type": "string",
+ "nullable": true,
+ "title": "Passthru",
+ "description": "The URL to use as a passthru if a file doesn't match the whitelist."
+ },
+ "index_files": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "nullable": true,
+ "title": "Index Files",
+ "description": "Files to look for to serve directories."
+ },
+ "whitelist": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "nullable": true,
+ "title": "Whitelisted entries",
+ "description": "Whitelisted entries."
+ },
+ "blacklist": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "nullable": true,
+ "title": "Blacklisted entries",
+ "description": "Blacklisted entries."
+ },
+ "expires": {
+ "type": "string",
+ "nullable": true,
+ "title": "Expires",
+ "description": "Amount of time to cache static assets."
+ },
+ "move_to_root": {
+ "type": "boolean",
+ "title": "Move to root",
+ "description": "Whether to move the whole root of the app to the document root."
+ }
+ },
+ "required": [
+ "locations",
+ "move_to_root"
+ ],
+ "additionalProperties": false,
+ "title": "Web Configuration",
+ "description": "Configuration for accessing this application via HTTP."
+ },
+ "hooks": {
+ "type": "object",
+ "properties": {
+ "build": {
+ "type": "string",
+ "nullable": true,
+ "title": "Build Hook",
+ "description": "Hook executed after the build process."
+ },
+ "deploy": {
+ "type": "string",
+ "nullable": true,
+ "title": "Deploy Hook",
+ "description": "Hook executed after the deployment of new code."
+ },
+ "post_deploy": {
+ "type": "string",
+ "nullable": true,
+ "title": "Post-deploy Hook",
+ "description": "Hook executed after an environment is fully deployed."
+ }
+ },
+ "required": [
+ "build",
+ "deploy",
+ "post_deploy"
+ ],
+ "additionalProperties": false,
+ "title": "Hooks",
+ "description": "Hooks executed at various point in the lifecycle of the application."
+ },
+ "crons": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "spec": {
+ "type": "string",
+ "title": "Specification",
+ "description": "The cron schedule specification."
+ },
+ "commands": {
+ "type": "object",
+ "properties": {
+ "start": {
+ "type": "string",
+ "title": "Start Command",
+ "description": "The command used to start the operation."
+ },
+ "stop": {
+ "type": "string",
+ "nullable": true,
+ "title": "Stop Command",
+ "description": "The command used to stop the operation."
+ }
+ },
+ "required": [
+ "start"
+ ],
+ "additionalProperties": false,
+ "title": "Commands",
+ "description": "The commands definition."
+ },
+ "shutdown_timeout": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Shutdown Timeout",
+ "description": "The timeout in seconds after which the cron job will be forcefully killed."
+ },
+ "timeout": {
+ "type": "integer",
+ "title": "Timeout",
+ "description": "The maximum timeout in seconds after which the cron job will be forcefully killed."
+ },
+ "cmd": {
+ "type": "string",
+ "title": "Command",
+ "description": "The command to execute."
+ }
+ },
+ "required": [
+ "spec",
+ "commands",
+ "timeout"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Crons",
+ "description": "Scheduled cron tasks executed by this application."
+ },
+ "source": {
+ "type": "object",
+ "properties": {
+ "root": {
+ "type": "string",
+ "nullable": true,
+ "title": "Application Source Root",
+ "description": "The root of the application relative to the repository root."
+ },
+ "operations": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "command": {
+ "type": "string",
+ "nullable": true,
+ "title": "Update Command",
+ "description": "The command to use to update this application."
+ }
+ },
+ "required": [
+ "command"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Source Operations",
+ "description": "Operations that can be applied to the source code."
+ }
+ },
+ "required": [
+ "root",
+ "operations"
+ ],
+ "additionalProperties": false,
+ "title": "Source Code Configuration",
+ "description": "Configuration related to the source code of the application."
+ },
+ "build": {
+ "type": "object",
+ "properties": {
+ "flavor": {
+ "type": "string",
+ "nullable": true,
+ "title": "Build Flavor",
+ "description": "The pre-set build tasks to use for this application."
+ },
+ "caches": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "directory": {
+ "type": "string",
+ "nullable": true,
+ "title": "Cache Directory",
+ "description": "The directory, relative to the application root, that should be cached."
+ },
+ "watch": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Watch Files",
+ "description": "The file or files whose hashed contents should be considered part of the cache key."
+ },
+ "allow_stale": {
+ "type": "boolean",
+ "title": "Allow Stale Cache",
+ "description": "If true, on a cache miss the last cache version will be used and can be updated in place."
+ },
+ "share_between_apps": {
+ "type": "boolean",
+ "title": "Share Between Applications",
+ "description": "Whether multiple applications in the project should share cached directories."
+ }
+ },
+ "required": [
+ "directory",
+ "watch",
+ "allow_stale",
+ "share_between_apps"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Build Caches",
+ "description": "The configuration of paths managed by the build cache."
+ }
+ },
+ "required": [
+ "flavor",
+ "caches"
+ ],
+ "additionalProperties": false,
+ "title": "Build Configuration",
+ "description": "The build configuration of the application."
+ },
+ "dependencies": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object"
+ },
+ "title": "Dependencies",
+ "description": "External global dependencies of this application. They will be downloaded by the language's package manager."
+ },
+ "stack": {
+ "type": "object",
+ "properties": {
+ "runtimes": {
+ "type": "array",
+ "items": {
+ "type": "object"
+ },
+ "title": "Runtime packages",
+ "description": ""
+ },
+ "packages": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "object"
+ }
+ ]
+ },
+ "title": "Community packages",
+ "description": ""
+ }
+ },
+ "required": [
+ "runtimes",
+ "packages"
+ ],
+ "additionalProperties": false,
+ "title": "Composable images",
+ "description": ""
+ },
+ "image": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "nullable": true,
+ "title": "Image name",
+ "description": "Image name with version to be deployed"
+ },
+ "buildfile": {
+ "type": "string",
+ "nullable": true,
+ "title": "Dockerfile",
+ "description": "Path to the dockerfile to use to build the container from"
+ }
+ },
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "OCI image",
+ "description": "OCI image configuration"
+ },
+ "is_across_submodule": {
+ "type": "boolean",
+ "title": "Is Across Submodule",
+ "description": "Is this application coming from a submodule"
+ },
+ "instance_count": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Instance replication count",
+ "description": "Instance replication count of this application"
+ },
+ "config_id": {
+ "type": "string",
+ "title": "Config Id",
+ "description": ""
+ },
+ "slug_id": {
+ "type": "string",
+ "title": "Artifact Identifier",
+ "description": "The identifier of the built artifact of the application"
+ },
+ "supports_horizontal_scaling": {
+ "type": "boolean",
+ "title": "Supports horizontal scaling",
+ "description": "Whether this service type supports horizontal scaling"
+ }
+ },
+ "required": [
+ "resources",
+ "authorizations",
+ "relationships",
+ "additional_hosts",
+ "mounts",
+ "timezone",
+ "variables",
+ "container_profile",
+ "size",
+ "disk",
+ "access",
+ "firewall",
+ "egress",
+ "operations",
+ "name",
+ "type",
+ "preflight",
+ "tree_id",
+ "app_dir",
+ "endpoints",
+ "runtime",
+ "web",
+ "hooks",
+ "crons",
+ "source",
+ "build",
+ "dependencies",
+ "stack",
+ "image",
+ "is_across_submodule",
+ "instance_count",
+ "config_id",
+ "slug_id",
+ "supports_horizontal_scaling"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Web applications",
+ "description": "The Web applications"
+ },
+ "workers": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "resources": {
+ "type": "object",
+ "properties": {
+ "base_memory": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Base memory",
+ "description": "The base memory for the container"
+ },
+ "memory_ratio": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Memory ratio",
+ "description": "The amount of memory to allocate per units of CPU"
+ },
+ "profile_size": {
+ "type": "string",
+ "nullable": true,
+ "title": "Profile size",
+ "description": "Selected size from container profile"
+ },
+ "minimum": {
+ "type": "object",
+ "properties": {
+ "cpu": {
+ "type": "number",
+ "format": "float",
+ "title": "CPU",
+ "description": "Cpu value"
+ },
+ "memory": {
+ "type": "integer",
+ "title": "Memory",
+ "description": "Memory in MB"
+ },
+ "cpu_type": {
+ "type": "string",
+ "enum": [
+ "guaranteed",
+ "shared"
+ ],
+ "title": "Type",
+ "description": "resource type"
+ },
+ "disk": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Disk size",
+ "description": "Disk size in MB"
+ },
+ "profile_size": {
+ "type": "string",
+ "nullable": true,
+ "title": "Profile size",
+ "description": "The closest profile size that matches the resources"
+ }
+ },
+ "required": [
+ "cpu",
+ "memory",
+ "cpu_type",
+ "disk",
+ "profile_size"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Minimum resources",
+ "description": "The minimum resources for this service"
+ },
+ "default": {
+ "type": "object",
+ "properties": {
+ "cpu": {
+ "type": "number",
+ "format": "float",
+ "title": "CPU",
+ "description": "Cpu value"
+ },
+ "memory": {
+ "type": "integer",
+ "title": "Memory",
+ "description": "Memory in MB"
+ },
+ "cpu_type": {
+ "type": "string",
+ "enum": [
+ "guaranteed",
+ "shared"
+ ],
+ "title": "Type",
+ "description": "resource type"
+ },
+ "disk": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Disk size",
+ "description": "Disk size in MB"
+ },
+ "profile_size": {
+ "type": "string",
+ "nullable": true,
+ "title": "Profile size",
+ "description": "The closest profile size that matches the resources"
+ }
+ },
+ "required": [
+ "cpu",
+ "memory",
+ "cpu_type",
+ "disk",
+ "profile_size"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Default resources",
+ "description": "The default resources for this service"
+ },
+ "disk": {
+ "type": "object",
+ "properties": {
+ "temporary": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Temporary",
+ "description": ""
+ },
+ "instance": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Instance",
+ "description": ""
+ },
+ "storage": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Storage",
+ "description": ""
+ }
+ },
+ "required": [
+ "temporary",
+ "instance",
+ "storage"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Disk resources",
+ "description": "The disks resources"
+ }
+ },
+ "required": [
+ "base_memory",
+ "memory_ratio",
+ "profile_size",
+ "minimum",
+ "default",
+ "disk"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Resources",
+ "description": ""
+ },
+ "authorizations": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "env",
+ "task"
+ ],
+ "title": "Authorization Type",
+ "description": "The resource type for this authorization."
+ },
+ "action": {
+ "type": "string",
+ "title": "Authorization Action",
+ "description": "The action to authorize on the target resource."
+ },
+ "resource": {
+ "type": "string",
+ "nullable": true,
+ "title": "Authorization Resource",
+ "description": "The target resource for this authorization."
+ }
+ },
+ "required": [
+ "type",
+ "action",
+ "resource"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Authorizations",
+ "description": "Authorizations available to this container"
+ },
+ "relationships": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "service": {
+ "type": "string",
+ "nullable": true,
+ "title": "Service Name",
+ "description": "The name of the service."
+ },
+ "endpoint": {
+ "type": "string",
+ "nullable": true,
+ "title": "Endpoint Name",
+ "description": "The name of the endpoint on the service."
+ }
+ },
+ "required": [
+ "service",
+ "endpoint"
+ ],
+ "additionalProperties": false,
+ "nullable": true
+ },
+ "title": "Service Relationships",
+ "description": "The relationships of the container to defined services"
+ },
+ "additional_hosts": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Additional hosts",
+ "description": "A mapping of hostname to ip address to be added to the container's hosts file"
+ },
+ "mounts": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "source": {
+ "type": "string",
+ "enum": [
+ "instance",
+ "local",
+ "service",
+ "storage",
+ "temporary",
+ "tmp"
+ ],
+ "title": "Mount type",
+ "description": "The type of mount that will provide the data."
+ },
+ "source_path": {
+ "type": "string",
+ "title": "Source Path",
+ "description": "The path to be mounted, relative to the root directory of the volume that's being mounted from."
+ },
+ "service": {
+ "type": "string",
+ "nullable": true,
+ "title": "Service Name",
+ "description": "The name of the service that the volume will be mounted from. Must be a service in `services.yaml` of type `network-storage`."
+ }
+ },
+ "required": [
+ "source",
+ "source_path"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Mounts",
+ "description": "Filesystem mounts of this container. If not specified the container will have no writeable disk space"
+ },
+ "timezone": {
+ "type": "string",
+ "nullable": true,
+ "title": "Timezone",
+ "description": "The timezone of the application. This primarily affects the timezone in which cron tasks will run. It will not affect the application itself. Defaults to UTC if not specified."
+ },
+ "variables": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "additionalProperties": {}
+ },
+ "title": "Environment Variables",
+ "description": "Variables provide environment-sensitive information to control how this container behaves. To set a Unix environment variable, specify a key of `env:`, and then each sub-item of that is a key/value pair that will be injected into the environment"
+ },
+ "container_profile": {
+ "type": "string",
+ "nullable": true,
+ "title": "Container Profile",
+ "description": "Selected container profile for this container"
+ },
+ "size": {
+ "type": "string",
+ "enum": [
+ "2XL",
+ "4XL",
+ "AUTO",
+ "L",
+ "M",
+ "S",
+ "XL",
+ "XS"
+ ],
+ "title": "Container Size",
+ "description": "The container size for this application in production. Leave blank to allow it to be set dynamically."
+ },
+ "disk": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Disk size",
+ "description": "The writeable disk size to reserve on this application container."
+ },
+ "access": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string",
+ "enum": [
+ "admin",
+ "contributor",
+ "viewer"
+ ]
+ },
+ "title": "Access Information",
+ "description": "Access information, a mapping between access type and roles."
+ },
+ "firewall": {
+ "type": "object",
+ "properties": {
+ "outbound": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "protocol": {
+ "type": "string",
+ "enum": [
+ "tcp"
+ ],
+ "title": "IP Protocol",
+ "description": "The IP protocol to apply the restriction on."
+ },
+ "ips": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "IP Ranges",
+ "description": "The IP range in CIDR notation to apply the restriction on."
+ },
+ "domains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Domains",
+ "description": "Domains of the restriction."
+ },
+ "ports": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ },
+ "title": "Ports",
+ "description": "The port to apply the restriction on."
+ }
+ },
+ "required": [
+ "protocol",
+ "ips",
+ "domains",
+ "ports"
+ ],
+ "additionalProperties": false
+ },
+ "nullable": true,
+ "title": "Outbound Firewall Restrictions",
+ "description": "Outbound firewall restrictions"
+ }
+ },
+ "required": [
+ "outbound"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Firewall",
+ "description": ""
+ },
+ "egress": {
+ "type": "object",
+ "properties": {
+ "build": {
+ "type": "object",
+ "properties": {
+ "allowed_domains": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "host": {
+ "type": "string",
+ "title": "Hostname",
+ "description": "The destination hostname."
+ },
+ "port": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Port",
+ "description": "Destination port. Omit for the default web ports (80/443), or specify explicitly for non-HTTP destinations (e.g. databases) reached over a CONNECT tunnel."
+ }
+ },
+ "required": [
+ "host",
+ "port"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Allowed Domains",
+ "description": "Destinations the container is permitted to reach."
+ }
+ },
+ "required": [
+ "allowed_domains"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Build-phase egress",
+ "description": "Egress allowlist applied to build containers."
+ },
+ "runtime": {
+ "type": "object",
+ "properties": {
+ "allowed_domains": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "host": {
+ "type": "string",
+ "title": "Hostname",
+ "description": "The destination hostname."
+ },
+ "port": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Port",
+ "description": "Destination port. Omit for the default web ports (80/443), or specify explicitly for non-HTTP destinations (e.g. databases) reached over a CONNECT tunnel."
+ }
+ },
+ "required": [
+ "host",
+ "port"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Allowed Domains",
+ "description": "Destinations the container is permitted to reach."
+ }
+ },
+ "required": [
+ "allowed_domains"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Runtime-phase egress",
+ "description": "Egress allowlist applied to runtime containers."
+ }
+ },
+ "required": [
+ "build",
+ "runtime"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Egress",
+ "description": ""
+ },
+ "operations": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "commands": {
+ "type": "object",
+ "properties": {
+ "start": {
+ "type": "string",
+ "title": "Start Command",
+ "description": "The command used to start the operation."
+ },
+ "stop": {
+ "type": "string",
+ "nullable": true,
+ "title": "Stop Command",
+ "description": "The command used to stop the operation."
+ }
+ },
+ "required": [
+ "start"
+ ],
+ "additionalProperties": false,
+ "title": "Commands",
+ "description": "The commands definition."
+ },
+ "timeout": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Timeout",
+ "description": "The maximum timeout in seconds after which the operation will be forcefully killed."
+ },
+ "role": {
+ "type": "string",
+ "enum": [
+ "admin",
+ "contributor",
+ "viewer"
+ ],
+ "title": "Role",
+ "description": "The minimum role necessary to trigger this operation."
+ }
+ },
+ "required": [
+ "commands",
+ "timeout",
+ "role"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Operations",
+ "description": "Operations that can be triggered on this application"
+ },
+ "name": {
+ "type": "string",
+ "title": "Worker Name",
+ "description": "The name of the worker."
+ },
+ "type": {
+ "type": "string",
+ "title": "Type",
+ "description": "The base runtime and version to use for this worker."
+ },
+ "preflight": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enable Preflight Security Blocks",
+ "description": "Whether the preflight security blocks are enabled."
+ },
+ "ignored_rules": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Ignored Rules",
+ "description": "Specific rules to ignore during preflight security checks. See the documentation for options."
+ }
+ },
+ "required": [
+ "enabled",
+ "ignored_rules"
+ ],
+ "additionalProperties": false,
+ "title": "Preflight Checks",
+ "description": "Configuration for pre-flight checks."
+ },
+ "tree_id": {
+ "type": "string",
+ "title": "Source Tree ID",
+ "description": "The identifier of the source tree of the application"
+ },
+ "app_dir": {
+ "type": "string",
+ "title": "Application Directory",
+ "description": "The path of the application in the container"
+ },
+ "endpoints": {
+ "type": "object",
+ "nullable": true,
+ "title": "Endpoints",
+ "description": ""
+ },
+ "runtime": {
+ "type": "object",
+ "title": "Runtime Configuration",
+ "description": "Runtime-specific configuration."
+ },
+ "worker": {
+ "type": "object",
+ "properties": {
+ "commands": {
+ "type": "object",
+ "properties": {
+ "pre_start": {
+ "type": "string",
+ "nullable": true,
+ "title": "Pre-start Command",
+ "description": "A command executed before the worker is started"
+ },
+ "start": {
+ "type": "string",
+ "title": "Start Command",
+ "description": "The command used to start the worker."
+ },
+ "post_start": {
+ "type": "string",
+ "nullable": true,
+ "title": "Post-start Command",
+ "description": "A command executed after the worker is started"
+ }
+ },
+ "required": [
+ "start"
+ ],
+ "additionalProperties": false,
+ "title": "Commands",
+ "description": "The commands to manage the worker."
+ },
+ "disk": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Disk Size",
+ "description": "The writeable disk size to reserve on this application container."
+ }
+ },
+ "required": [
+ "commands"
+ ],
+ "additionalProperties": false,
+ "title": "Worker Configuration",
+ "description": "Configuration of a worker container instance."
+ },
+ "app": {
+ "type": "string",
+ "title": "App",
+ "description": ""
+ },
+ "stack": {
+ "type": "object",
+ "properties": {
+ "runtimes": {
+ "type": "array",
+ "items": {
+ "type": "object"
+ },
+ "title": "Runtime packages",
+ "description": ""
+ },
+ "packages": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "object"
+ }
+ ]
+ },
+ "title": "Community packages",
+ "description": ""
+ }
+ },
+ "required": [
+ "runtimes",
+ "packages"
+ ],
+ "additionalProperties": false,
+ "title": "Composable images",
+ "description": ""
+ },
+ "image": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "nullable": true,
+ "title": "Image name",
+ "description": "Image name with version to be deployed"
+ },
+ "buildfile": {
+ "type": "string",
+ "nullable": true,
+ "title": "Dockerfile",
+ "description": "Path to the dockerfile to use to build the container from"
+ }
+ },
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "OCI image",
+ "description": "OCI image configuration"
+ },
+ "instance_count": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Instance replication count",
+ "description": "Instance replication count of this worker"
+ },
+ "slug_id": {
+ "type": "string",
+ "title": "Artifact Identifier",
+ "description": "The identifier of the built artifact of the application"
+ },
+ "supports_horizontal_scaling": {
+ "type": "boolean",
+ "title": "Supports horizontal scaling",
+ "description": "Whether this service type supports horizontal scaling"
+ }
+ },
+ "required": [
+ "resources",
+ "authorizations",
+ "relationships",
+ "additional_hosts",
+ "mounts",
+ "timezone",
+ "variables",
+ "container_profile",
+ "size",
+ "disk",
+ "access",
+ "firewall",
+ "egress",
+ "operations",
+ "name",
+ "type",
+ "preflight",
+ "tree_id",
+ "app_dir",
+ "endpoints",
+ "runtime",
+ "worker",
+ "app",
+ "stack",
+ "image",
+ "instance_count",
+ "slug_id",
+ "supports_horizontal_scaling"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Workers",
+ "description": "The workers"
+ },
+ "container_profiles": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "cpu": {
+ "type": "number",
+ "format": "float",
+ "title": "CPU",
+ "description": "Cpu value"
+ },
+ "memory": {
+ "type": "integer",
+ "title": "Memory",
+ "description": "Memory in MB"
+ },
+ "cpu_type": {
+ "type": "string",
+ "enum": [
+ "guaranteed",
+ "shared"
+ ],
+ "title": "Type",
+ "description": "resource type"
+ }
+ },
+ "required": [
+ "cpu",
+ "memory",
+ "cpu_type"
+ ],
+ "additionalProperties": false
+ }
+ },
+ "title": "Container profiles",
+ "description": "The profiles of the containers"
+ },
+ "tasks": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "resources": {
+ "type": "object",
+ "properties": {
+ "profile_size": {
+ "type": "string",
+ "nullable": true,
+ "title": "Profile size",
+ "description": "Profile size of the service."
+ }
+ },
+ "required": [
+ "profile_size"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Resources",
+ "description": ""
+ }
+ },
+ "required": [
+ "resources"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Tasks",
+ "description": "The tasks sizing (applied at task run time)"
+ }
+ },
+ "required": [
+ "id",
+ "cluster_name",
+ "project_info",
+ "environment_info",
+ "deployment_target",
+ "vpn",
+ "http_access",
+ "enable_smtp",
+ "restrict_robots",
+ "variables",
+ "access",
+ "subscription",
+ "services",
+ "routes",
+ "webapps",
+ "workers",
+ "container_profiles",
+ "tasks"
+ ],
+ "additionalProperties": false
+ },
+ "DeploymentCollection": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Deployment"
+ }
+ },
+ "DeploymentTarget": {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/DedicatedDeploymentTarget"
+ },
+ {
+ "$ref": "#/components/schemas/EnterpriseDeploymentTarget"
+ },
+ {
+ "$ref": "#/components/schemas/FoundationDeploymentTarget"
+ },
+ {
+ "$ref": "#/components/schemas/KubernetesDeploymentTargetStorage"
+ }
+ ]
+ },
+ "DeploymentTargetCollection": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/DeploymentTarget"
+ }
+ },
+ "DeploymentTargetCreateInput": {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/DedicatedDeploymentTargetCreateInput"
+ },
+ {
+ "$ref": "#/components/schemas/EnterpriseDeploymentTargetCreateInput"
+ },
+ {
+ "$ref": "#/components/schemas/FoundationDeploymentTargetCreateInput"
+ },
+ {
+ "$ref": "#/components/schemas/KubernetesDeploymentTargetStorageCreateInput"
+ }
+ ]
+ },
+ "DeploymentTargetPatch": {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/DedicatedDeploymentTargetPatch"
+ },
+ {
+ "$ref": "#/components/schemas/EnterpriseDeploymentTargetPatch"
+ },
+ {
+ "$ref": "#/components/schemas/FoundationDeploymentTargetPatch"
+ },
+ {
+ "$ref": "#/components/schemas/KubernetesDeploymentTargetStoragePatch"
+ }
+ ]
+ },
+ "Diff": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "Diff Identifier",
+ "description": "The identifier of Diff"
+ },
+ "diff": {
+ "type": "string",
+ "title": "Unified diff",
+ "description": "The unified diff between two trees"
+ },
+ "new_path": {
+ "type": "string",
+ "nullable": true,
+ "title": "New Path",
+ "description": "The new path of the file in the diff"
+ },
+ "new_id": {
+ "type": "string",
+ "nullable": true,
+ "title": "New ID",
+ "description": "The new object ID of the file in the diff"
+ },
+ "old_path": {
+ "type": "string",
+ "nullable": true,
+ "title": "Old Path",
+ "description": "The old path of the file in the diff"
+ },
+ "old_id": {
+ "type": "string",
+ "nullable": true,
+ "title": "Old ID",
+ "description": "The old object ID of the file in the diff"
+ }
+ },
+ "required": [
+ "id",
+ "diff",
+ "new_path",
+ "new_id",
+ "old_path",
+ "old_id"
+ ],
+ "additionalProperties": false
+ },
+ "DiffCollection": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Diff"
+ }
+ },
+ "Domain": {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/ProdDomainStorage"
+ },
+ {
+ "$ref": "#/components/schemas/ReplacementDomainStorage"
+ }
+ ]
+ },
+ "DomainClaim": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "DomainClaim Identifier",
+ "description": "The identifier of DomainClaim"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "name": {
+ "type": "string",
+ "title": "Domain name",
+ "description": "The claimed domain name"
+ },
+ "count": {
+ "type": "integer",
+ "title": "Claim count",
+ "description": "Number of domains using this claim"
+ }
+ },
+ "required": [
+ "id",
+ "created_at",
+ "updated_at",
+ "name",
+ "count"
+ ],
+ "additionalProperties": false
+ },
+ "DomainClaimCollection": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/DomainClaim"
+ }
+ },
+ "DomainClaimCreateInput": {
+ "type": "object",
+ "additionalProperties": false
+ },
+ "DomainClaimPatch": {
+ "type": "object",
+ "additionalProperties": false
+ },
+ "DomainCollection": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Domain"
+ }
+ },
+ "DomainCreateInput": {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/ProdDomainStorageCreateInput"
+ },
+ {
+ "$ref": "#/components/schemas/ReplacementDomainStorageCreateInput"
+ }
+ ]
+ },
+ "DomainPatch": {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/ProdDomainStoragePatch"
+ },
+ {
+ "$ref": "#/components/schemas/ReplacementDomainStoragePatch"
+ }
+ ]
+ },
+ "EmailIntegration": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "EmailIntegration Identifier",
+ "description": "The identifier of EmailIntegration"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "role": {
+ "type": "string",
+ "title": "Integration role",
+ "description": "The role of the integration"
+ },
+ "from_address": {
+ "type": "string",
+ "nullable": true,
+ "title": "From Address",
+ "description": "The email address to use"
+ },
+ "recipients": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Recipients",
+ "description": "Recipients of the email"
+ }
+ },
+ "required": [
+ "created_at",
+ "updated_at",
+ "type",
+ "role",
+ "from_address",
+ "recipients"
+ ],
+ "additionalProperties": false
+ },
+ "EmailIntegrationCreateInput": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "from_address": {
+ "type": "string",
+ "nullable": true,
+ "title": "From Address",
+ "description": "The email address to use"
+ },
+ "recipients": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Recipients",
+ "description": "Recipients of the email"
+ }
+ },
+ "required": [
+ "type",
+ "recipients"
+ ],
+ "additionalProperties": false
+ },
+ "EmailIntegrationPatch": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "from_address": {
+ "type": "string",
+ "nullable": true,
+ "title": "From Address",
+ "description": "The email address to use"
+ },
+ "recipients": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Recipients",
+ "description": "Recipients of the email"
+ }
+ },
+ "required": [
+ "type",
+ "recipients"
+ ],
+ "additionalProperties": false
+ },
+ "EnterpriseDeploymentTarget": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "EnterpriseDeploymentTarget Identifier",
+ "description": "The identifier of EnterpriseDeploymentTarget"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "dedicated",
+ "enterprise",
+ "foundation",
+ "kubernetes"
+ ],
+ "title": "Deployment target type",
+ "description": "The type of the deployment target"
+ },
+ "name": {
+ "type": "string",
+ "title": "Deployment target name",
+ "description": "The name of the deployment target"
+ },
+ "deploy_host": {
+ "type": "string",
+ "nullable": true,
+ "title": "Deploy Host",
+ "description": "The host to deploy to"
+ },
+ "docroots": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "active_docroot": {
+ "type": "string",
+ "nullable": true,
+ "title": "Active docroot",
+ "description": "The enterprise docroot, that is associated with this application/cluster."
+ },
+ "docroot_versions": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "nullable": true,
+ "title": "Docroot versions",
+ "description": "Versions of the enterprise docroot. When a new environment version is created the active_docroot is updated from these values."
+ }
+ },
+ "required": [
+ "active_docroot",
+ "docroot_versions"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Docroots",
+ "description": "Mapping of clusters to Enterprise applications"
+ },
+ "site_urls": {
+ "type": "object",
+ "title": "Site URLs",
+ "description": "List of URLs of the site"
+ },
+ "ssh_hosts": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "SSH Hosts",
+ "description": "List of SSH Hosts"
+ },
+ "maintenance_mode": {
+ "type": "boolean",
+ "title": "Maintenance Mode",
+ "description": "Whether to perform deployments or not"
+ },
+ "enterprise_environments_mapping": {
+ "type": "object",
+ "title": "Enterprise Environments Mapping",
+ "description": "Mapping of clusters to Enterprise applications",
+ "deprecated": true,
+ "x-stability": "DEPRECATED"
+ }
+ },
+ "required": [
+ "type",
+ "name",
+ "deploy_host",
+ "docroots",
+ "site_urls",
+ "ssh_hosts",
+ "maintenance_mode"
+ ],
+ "additionalProperties": false
+ },
+ "EnterpriseDeploymentTargetCreateInput": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "dedicated",
+ "enterprise",
+ "foundation",
+ "kubernetes"
+ ],
+ "title": "Deployment target type",
+ "description": "The type of the deployment target"
+ },
+ "name": {
+ "type": "string",
+ "title": "Deployment target name",
+ "description": "The name of the deployment target"
+ },
+ "site_urls": {
+ "type": "object",
+ "title": "Site URLs",
+ "description": "List of URLs of the site"
+ },
+ "ssh_hosts": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "SSH Hosts",
+ "description": "List of SSH Hosts"
+ },
+ "enterprise_environments_mapping": {
+ "type": "object",
+ "title": "Enterprise Environments Mapping",
+ "description": "Mapping of clusters to Enterprise applications",
+ "deprecated": true,
+ "x-stability": "DEPRECATED"
+ }
+ },
+ "required": [
+ "type",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ "EnterpriseDeploymentTargetPatch": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "dedicated",
+ "enterprise",
+ "foundation",
+ "kubernetes"
+ ],
+ "title": "Deployment target type",
+ "description": "The type of the deployment target"
+ },
+ "name": {
+ "type": "string",
+ "title": "Deployment target name",
+ "description": "The name of the deployment target"
+ },
+ "site_urls": {
+ "type": "object",
+ "title": "Site URLs",
+ "description": "List of URLs of the site"
+ },
+ "ssh_hosts": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "SSH Hosts",
+ "description": "List of SSH Hosts"
+ },
+ "enterprise_environments_mapping": {
+ "type": "object",
+ "title": "Enterprise Environments Mapping",
+ "description": "Mapping of clusters to Enterprise applications",
+ "deprecated": true,
+ "x-stability": "DEPRECATED"
+ }
+ },
+ "required": [
+ "type",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ "Environment": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "Environment Identifier",
+ "description": "The identifier of Environment"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "name": {
+ "type": "string",
+ "title": "Name",
+ "description": "The name of the environment"
+ },
+ "machine_name": {
+ "type": "string",
+ "title": "Machine name",
+ "description": "The machine name for the environment"
+ },
+ "title": {
+ "type": "string",
+ "title": "Title",
+ "description": "The title of the environment"
+ },
+ "attributes": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Arbitrary attributes",
+ "description": "Arbitrary attributes attached to this resource"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "development",
+ "production",
+ "staging"
+ ],
+ "title": "Type",
+ "description": "The type of environment (`production`, `staging` or `development`), if not provided, a default will be calculated"
+ },
+ "parent": {
+ "type": "string",
+ "nullable": true,
+ "title": "Parent environment",
+ "description": "The name of the parent environment"
+ },
+ "default_domain": {
+ "type": "string",
+ "nullable": true,
+ "title": "Default domain",
+ "description": "The default domain"
+ },
+ "has_domains": {
+ "type": "boolean",
+ "title": "Has domains",
+ "description": "Whether the environment has domains"
+ },
+ "clone_parent_on_create": {
+ "type": "boolean",
+ "title": "Clone parent on create",
+ "description": "Clone data when creating that environment"
+ },
+ "deployment_target": {
+ "type": "string",
+ "nullable": true,
+ "title": "Deployment target",
+ "description": "Deployment target of the environment"
+ },
+ "is_pr": {
+ "type": "boolean",
+ "title": "Is pull or merge request",
+ "description": "Is this environment a pull request / merge request"
+ },
+ "has_remote": {
+ "type": "boolean",
+ "title": "Has remote",
+ "description": "Does this environment have a remote repository"
+ },
+ "status": {
+ "type": "string",
+ "enum": [
+ "active",
+ "deleting",
+ "dirty",
+ "inactive",
+ "paused"
+ ],
+ "title": "Status",
+ "description": "The status of the environment"
+ },
+ "http_access": {
+ "type": "object",
+ "properties": {
+ "is_enabled": {
+ "type": "boolean",
+ "title": "Is enabled",
+ "description": "Whether http_access control is enabled"
+ },
+ "addresses": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "permission": {
+ "type": "string",
+ "enum": [
+ "allow",
+ "deny"
+ ],
+ "title": "Permission",
+ "description": ""
+ },
+ "address": {
+ "type": "string",
+ "title": "Address",
+ "description": "IP address or CIDR"
+ }
+ },
+ "required": [
+ "permission",
+ "address"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Address grants",
+ "description": ""
+ },
+ "basic_auth": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Basic auth grants",
+ "description": ""
+ }
+ },
+ "required": [
+ "is_enabled",
+ "addresses",
+ "basic_auth"
+ ],
+ "additionalProperties": false,
+ "title": "HTTP access permissions",
+ "description": "The HTTP access permissions for this environment"
+ },
+ "enable_smtp": {
+ "type": "boolean",
+ "title": "Enable SMTP",
+ "description": "Whether to configure SMTP for this environment"
+ },
+ "restrict_robots": {
+ "type": "boolean",
+ "title": "Restrict robots",
+ "description": "Whether to restrict robots for this environment"
+ },
+ "edge_hostname": {
+ "type": "string",
+ "title": "Edge hostname",
+ "description": "The hostname to use as the CNAME"
+ },
+ "deployment_state": {
+ "type": "object",
+ "properties": {
+ "last_state_update_successful": {
+ "type": "boolean",
+ "title": "Last state update successful",
+ "description": "Whether the last deployment has correctly switched state (does not mean it was successful)"
+ },
+ "last_deployment_successful": {
+ "type": "boolean",
+ "title": "Last deployment successful",
+ "description": "Whether the last deployment was successful"
+ },
+ "last_deployment_failure_reason": {
+ "type": "string",
+ "enum": [
+ "error",
+ "shell"
+ ],
+ "nullable": true,
+ "title": "Last deployment failure reason",
+ "description": "The reason for failure of the last deployment"
+ },
+ "last_deployment_commands": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "app": {
+ "type": "string",
+ "title": "Application",
+ "description": "The application name"
+ },
+ "type": {
+ "type": "string",
+ "title": "Type",
+ "description": "The command type"
+ },
+ "exit_code": {
+ "type": "integer",
+ "title": "Exit status code",
+ "description": "The exit status code of the command"
+ }
+ },
+ "required": [
+ "app",
+ "type",
+ "exit_code"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Last deployment commands",
+ "description": "The commands executed during the last deployment"
+ },
+ "last_deployment_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Last deployment datetime",
+ "description": "Datetime of the last deployment"
+ },
+ "last_autoscale_up_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Last autoscale up datetime",
+ "description": "Datetime of the last autoscale up deployment"
+ },
+ "last_autoscale_down_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Last autoscale down datetime",
+ "description": "Datetime of the last autoscale down deployment"
+ },
+ "last_maintenance_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Last maintenance datetime",
+ "description": "Datetime of the last maintenance"
+ },
+ "crons": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Is enabled",
+ "description": "Enabled or disabled"
+ },
+ "status": {
+ "type": "string",
+ "enum": [
+ "paused",
+ "running",
+ "sleeping"
+ ],
+ "title": "Status",
+ "description": "The status of the crons"
+ }
+ },
+ "required": [
+ "enabled",
+ "status"
+ ],
+ "additionalProperties": false,
+ "title": "Crons deployment state",
+ "description": "The crons deployment state"
+ }
+ },
+ "required": [
+ "last_state_update_successful",
+ "last_deployment_successful",
+ "last_deployment_failure_reason",
+ "last_deployment_commands",
+ "last_deployment_at",
+ "last_autoscale_up_at",
+ "last_autoscale_down_at",
+ "last_maintenance_at",
+ "crons"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Deployment state",
+ "description": "The environment deployment state"
+ },
+ "sizing": {
+ "type": "object",
+ "properties": {
+ "services": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "resources": {
+ "type": "object",
+ "properties": {
+ "profile_size": {
+ "type": "string",
+ "nullable": true,
+ "title": "Profile size",
+ "description": "Profile size of the service."
+ }
+ },
+ "required": [
+ "profile_size"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Resources",
+ "description": ""
+ },
+ "instance_count": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Instance count",
+ "description": "Instance replication count of this application"
+ },
+ "disk": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Disk size",
+ "description": "The size of the disk."
+ }
+ },
+ "required": [
+ "resources",
+ "instance_count",
+ "disk"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Services",
+ "description": ""
+ },
+ "webapps": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "resources": {
+ "type": "object",
+ "properties": {
+ "profile_size": {
+ "type": "string",
+ "nullable": true,
+ "title": "Profile size",
+ "description": "Profile size of the application."
+ },
+ "disk": {
+ "type": "object",
+ "properties": {
+ "object": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Object storage size",
+ "description": ""
+ }
+ },
+ "required": [
+ "object"
+ ],
+ "additionalProperties": false,
+ "title": "Disk resources",
+ "description": ""
+ }
+ },
+ "required": [
+ "profile_size",
+ "disk"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Resources",
+ "description": ""
+ },
+ "instance_count": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Instance count",
+ "description": "Instance replication count of this application"
+ },
+ "disk": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Disk size",
+ "description": "The size of the disk."
+ }
+ },
+ "required": [
+ "resources",
+ "instance_count",
+ "disk"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Web applications",
+ "description": ""
+ },
+ "workers": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "resources": {
+ "type": "object",
+ "properties": {
+ "profile_size": {
+ "type": "string",
+ "nullable": true,
+ "title": "Profile size",
+ "description": "Profile size of the service."
+ }
+ },
+ "required": [
+ "profile_size"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Resources",
+ "description": ""
+ },
+ "instance_count": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Instance count",
+ "description": "Instance replication count of this application"
+ },
+ "disk": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Disk size",
+ "description": "The size of the disk."
+ }
+ },
+ "required": [
+ "resources",
+ "instance_count",
+ "disk"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Workers",
+ "description": ""
+ },
+ "tasks": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "resources": {
+ "type": "object",
+ "properties": {
+ "profile_size": {
+ "type": "string",
+ "nullable": true,
+ "title": "Profile size",
+ "description": "Profile size of the service."
+ }
+ },
+ "required": [
+ "profile_size"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Resources",
+ "description": ""
+ }
+ },
+ "required": [
+ "resources"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Tasks",
+ "description": ""
+ }
+ },
+ "required": [
+ "services",
+ "webapps",
+ "workers",
+ "tasks"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Sizing",
+ "description": "The environment sizing configuration"
+ },
+ "resources_overrides": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "services": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "cpu": {
+ "type": "number",
+ "format": "float",
+ "nullable": true,
+ "title": "CPU",
+ "description": ""
+ },
+ "memory": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Memory",
+ "description": ""
+ },
+ "disk": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Disk",
+ "description": ""
+ }
+ },
+ "required": [
+ "cpu",
+ "memory",
+ "disk"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Pre-service resources overrides",
+ "description": "Per-service resources overrides."
+ },
+ "starts_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Start date",
+ "description": "Date when the override will apply. When null, don't do an auto redeployment but still be effective to redeploys initiated otherwise."
+ },
+ "ends_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "End date",
+ "description": "Date when the override will be reverted. When null, the overrides will never go out of effect."
+ },
+ "redeployed_start": {
+ "type": "boolean",
+ "title": "Is starting redeploy activity fired",
+ "description": "Whether the starting redeploy activity has been fired for this override."
+ },
+ "redeployed_end": {
+ "type": "boolean",
+ "title": "Is ending redeploy activity fired",
+ "description": "Whether the ending redeploy activity has been fired for this override."
+ }
+ },
+ "required": [
+ "services",
+ "starts_at",
+ "ends_at",
+ "redeployed_start",
+ "redeployed_end"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Resources overrides",
+ "description": "Resources overrides"
+ },
+ "max_instance_count": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Max instances",
+ "description": "Max number of instances for this environment"
+ },
+ "last_active_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Last activity date",
+ "description": "Last activity date"
+ },
+ "last_backup_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Last backup date",
+ "description": "Last backup date"
+ },
+ "project": {
+ "type": "string",
+ "title": "Project",
+ "description": "The project the environment belongs to"
+ },
+ "is_main": {
+ "type": "boolean",
+ "title": "Is main environment",
+ "description": "Is this environment the main environment"
+ },
+ "is_dirty": {
+ "type": "boolean",
+ "title": "Is dirty",
+ "description": "Is there any pending activity on this environment"
+ },
+ "has_staged_activities": {
+ "type": "boolean",
+ "title": "Has staged activities",
+ "description": "Is there any staged activity on this environment"
+ },
+ "can_rolling_deploy": {
+ "type": "boolean",
+ "title": "Can perform rolling deployments",
+ "description": "If the environment has rolling deployments ready for use"
+ },
+ "supports_rolling_deployments": {
+ "type": "boolean",
+ "title": "Supports rolling deployments",
+ "description": "If the environment supports rolling deployments"
+ },
+ "has_code": {
+ "type": "boolean",
+ "title": "Has code",
+ "description": "Does this environment have code"
+ },
+ "head_commit": {
+ "type": "string",
+ "nullable": true,
+ "title": "Head commit",
+ "description": "The SHA of the head commit for this environment"
+ },
+ "merge_info": {
+ "type": "object",
+ "properties": {
+ "commits_ahead": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Commits ahead",
+ "description": "The amount of commits that are in the environment but not in the parent"
+ },
+ "commits_behind": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Commits behind",
+ "description": "The amount of commits that are in the parent but not in the environment"
+ },
+ "parent_ref": {
+ "type": "string",
+ "nullable": true,
+ "title": "Parent ref",
+ "description": "The reference in Git for the parent environment"
+ }
+ },
+ "required": [
+ "commits_ahead",
+ "commits_behind",
+ "parent_ref"
+ ],
+ "additionalProperties": false,
+ "title": "Merge info",
+ "description": "The commit distance info between parent and child environments"
+ },
+ "has_deployment": {
+ "type": "boolean",
+ "title": "Has deployment",
+ "description": "Whether this environment had a successful deployment"
+ },
+ "supports_restrict_robots": {
+ "type": "boolean",
+ "title": "Supports restrict_robots",
+ "description": "Does this environment support configuring restrict_robots"
+ }
+ },
+ "required": [
+ "id",
+ "created_at",
+ "updated_at",
+ "name",
+ "machine_name",
+ "title",
+ "attributes",
+ "type",
+ "parent",
+ "default_domain",
+ "has_domains",
+ "clone_parent_on_create",
+ "deployment_target",
+ "is_pr",
+ "has_remote",
+ "status",
+ "http_access",
+ "enable_smtp",
+ "restrict_robots",
+ "edge_hostname",
+ "deployment_state",
+ "sizing",
+ "resources_overrides",
+ "max_instance_count",
+ "last_active_at",
+ "last_backup_at",
+ "project",
+ "is_main",
+ "is_dirty",
+ "has_staged_activities",
+ "can_rolling_deploy",
+ "supports_rolling_deployments",
+ "has_code",
+ "head_commit",
+ "merge_info",
+ "has_deployment",
+ "supports_restrict_robots"
+ ],
+ "additionalProperties": false
+ },
+ "EnvironmentActivateInput": {
+ "type": "object",
+ "properties": {
+ "resources": {
+ "type": "object",
+ "properties": {
+ "init": {
+ "type": "string",
+ "enum": [
+ "default",
+ "minimum",
+ "parent"
+ ],
+ "nullable": true,
+ "title": "Init Resources",
+ "description": "The resources used when activating an environment"
+ }
+ },
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Resources",
+ "description": ""
+ }
+ },
+ "additionalProperties": false
+ },
+ "EnvironmentBackupInput": {
+ "type": "object",
+ "properties": {
+ "safe": {
+ "type": "boolean",
+ "title": "Safe or live backup",
+ "description": "Take a safe or a live backup"
+ }
+ },
+ "additionalProperties": false
+ },
+ "EnvironmentBranchInput": {
+ "type": "object",
+ "properties": {
+ "title": {
+ "type": "string",
+ "title": "Title",
+ "description": ""
+ },
+ "name": {
+ "type": "string",
+ "title": "Name",
+ "description": ""
+ },
+ "clone_parent": {
+ "type": "boolean",
+ "title": "Clone parent",
+ "description": "Clone data from the parent environment"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "development",
+ "staging"
+ ],
+ "title": "Type",
+ "description": "The type of environment (`staging` or `development`)"
+ },
+ "resources": {
+ "type": "object",
+ "properties": {
+ "init": {
+ "type": "string",
+ "enum": [
+ "default",
+ "minimum",
+ "parent"
+ ],
+ "nullable": true,
+ "title": "Init Resources",
+ "description": "The resources used when initializing services of the new environment"
+ }
+ },
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Resources",
+ "description": ""
+ }
+ },
+ "required": [
+ "title",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ "EnvironmentCollection": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Environment"
+ }
+ },
+ "EnvironmentDeployInput": {
+ "type": "object",
+ "properties": {
+ "strategy": {
+ "type": "string",
+ "enum": [
+ "rolling",
+ "stopstart"
+ ],
+ "title": "Deployment strategy",
+ "description": "The deployment strategy (`rolling` or `stopstart`)"
+ }
+ },
+ "additionalProperties": false
+ },
+ "EnvironmentInitializeInput": {
+ "type": "object",
+ "properties": {
+ "profile": {
+ "type": "string",
+ "title": "Profile",
+ "description": "Name of the profile to show in the UI"
+ },
+ "repository": {
+ "type": "string",
+ "title": "Repository",
+ "description": "Repository to clone from"
+ },
+ "config": {
+ "type": "string",
+ "nullable": true,
+ "title": "Configuration repository",
+ "description": "Repository to clone the configuration files from"
+ },
+ "files": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "path": {
+ "type": "string",
+ "title": "Path",
+ "description": "The path to the file."
+ },
+ "mode": {
+ "type": "integer",
+ "title": "Mode",
+ "description": "The octal value of the file protection mode."
+ },
+ "contents": {
+ "type": "string",
+ "title": "Contents",
+ "description": "The contents of the file (base64 encoded)."
+ }
+ },
+ "required": [
+ "path"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Files",
+ "description": "A list of files to add to the repository during initialization"
+ },
+ "resources": {
+ "type": "object",
+ "properties": {
+ "init": {
+ "type": "string",
+ "enum": [
+ "default",
+ "minimum"
+ ],
+ "nullable": true,
+ "title": "Init Resources",
+ "description": "The resources used when initializing the environment"
+ }
+ },
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Resources",
+ "description": ""
+ }
+ },
+ "required": [
+ "profile",
+ "repository"
+ ],
+ "additionalProperties": false
+ },
+ "EnvironmentMergeInput": {
+ "type": "object",
+ "properties": {
+ "resources": {
+ "type": "object",
+ "properties": {
+ "init": {
+ "type": "string",
+ "enum": [
+ "child",
+ "default",
+ "manual",
+ "minimum"
+ ],
+ "nullable": true,
+ "title": "Init Resources",
+ "description": "The resources used when merging an environment"
+ }
+ },
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Resources",
+ "description": ""
+ }
+ },
+ "additionalProperties": false
+ },
+ "EnvironmentOperationInput": {
+ "type": "object",
+ "properties": {
+ "service": {
+ "type": "string",
+ "title": "Application or worker name",
+ "description": "The name of the application or worker to run the operation on"
+ },
+ "operation": {
+ "type": "string",
+ "title": "Operation name",
+ "description": "The name of the operation"
+ },
+ "parameters": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Operation parameters",
+ "description": "The parameters to run the operation with"
+ }
+ },
+ "required": [
+ "service",
+ "operation"
+ ],
+ "additionalProperties": false
+ },
+ "EnvironmentPatch": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "title": "Name",
+ "description": "The name of the environment"
+ },
+ "title": {
+ "type": "string",
+ "title": "Title",
+ "description": "The title of the environment"
+ },
+ "attributes": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Arbitrary attributes",
+ "description": "Arbitrary attributes attached to this resource"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "development",
+ "production",
+ "staging"
+ ],
+ "title": "Type",
+ "description": "The type of environment (`production`, `staging` or `development`), if not provided, a default will be calculated"
+ },
+ "parent": {
+ "type": "string",
+ "nullable": true,
+ "title": "Parent environment",
+ "description": "The name of the parent environment"
+ },
+ "clone_parent_on_create": {
+ "type": "boolean",
+ "title": "Clone parent on create",
+ "description": "Clone data when creating that environment"
+ },
+ "http_access": {
+ "type": "object",
+ "properties": {
+ "is_enabled": {
+ "type": "boolean",
+ "title": "Is enabled",
+ "description": "Whether http_access control is enabled"
+ },
+ "addresses": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "permission": {
+ "type": "string",
+ "enum": [
+ "allow",
+ "deny"
+ ],
+ "title": "Permission",
+ "description": ""
+ },
+ "address": {
+ "type": "string",
+ "title": "Address",
+ "description": "IP address or CIDR"
+ }
+ },
+ "required": [
+ "permission",
+ "address"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Address grants",
+ "description": ""
+ },
+ "basic_auth": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Basic auth grants",
+ "description": ""
+ }
+ },
+ "additionalProperties": false,
+ "title": "HTTP access permissions",
+ "description": "The HTTP access permissions for this environment"
+ },
+ "enable_smtp": {
+ "type": "boolean",
+ "title": "Enable SMTP",
+ "description": "Whether to configure SMTP for this environment"
+ },
+ "restrict_robots": {
+ "type": "boolean",
+ "title": "Restrict robots",
+ "description": "Whether to restrict robots for this environment"
+ }
+ },
+ "additionalProperties": false
+ },
+ "EnvironmentRestoreInput": {
+ "type": "object",
+ "properties": {
+ "environment_name": {
+ "type": "string",
+ "nullable": true,
+ "title": "Environment name",
+ "description": ""
+ },
+ "branch_from": {
+ "type": "string",
+ "nullable": true,
+ "title": "Branch from",
+ "description": ""
+ },
+ "restore_code": {
+ "type": "boolean",
+ "title": "Is code or data restored",
+ "description": "Whether we should restore the code or only the data"
+ },
+ "restore_resources": {
+ "type": "boolean",
+ "title": "Is resources restored",
+ "description": "Whether we should restore resources configuration from the backup"
+ },
+ "resources": {
+ "type": "object",
+ "properties": {
+ "init": {
+ "type": "string",
+ "enum": [
+ "backup",
+ "default",
+ "minimum",
+ "parent"
+ ],
+ "nullable": true,
+ "title": "Init Resources",
+ "description": "The resources used when initializing services of the environment"
+ }
+ },
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Resources",
+ "description": ""
+ }
+ },
+ "additionalProperties": false
+ },
+ "EnvironmentSourceOperation": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "EnvironmentSourceOperation Identifier",
+ "description": "The identifier of EnvironmentSourceOperation"
+ },
+ "app": {
+ "type": "string",
+ "title": "Application name",
+ "description": "The name of the application"
+ },
+ "operation": {
+ "type": "string",
+ "title": "Source operation name",
+ "description": "The name of the source operation"
+ },
+ "command": {
+ "type": "string",
+ "title": "Command",
+ "description": "The command that will be triggered"
+ }
+ },
+ "required": [
+ "id",
+ "app",
+ "operation",
+ "command"
+ ],
+ "additionalProperties": false
+ },
+ "EnvironmentSourceOperationCollection": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/EnvironmentSourceOperation"
+ }
+ },
+ "EnvironmentSourceOperationInput": {
+ "type": "object",
+ "properties": {
+ "operation": {
+ "type": "string",
+ "title": "Operation name",
+ "description": "The name of the operation to execute"
+ },
+ "variables": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "additionalProperties": {}
+ },
+ "title": "Variables",
+ "description": "The variables of the application."
+ }
+ },
+ "required": [
+ "operation"
+ ],
+ "additionalProperties": false
+ },
+ "EnvironmentSynchronizeInput": {
+ "type": "object",
+ "properties": {
+ "synchronize_code": {
+ "type": "boolean",
+ "title": "Is code synchronized",
+ "description": "Synchronize code?"
+ },
+ "rebase": {
+ "type": "boolean",
+ "title": "Is code rebased",
+ "description": "Synchronize code by rebasing instead of merging"
+ },
+ "synchronize_data": {
+ "type": "boolean",
+ "title": "Is data synchronized",
+ "description": "Synchronize data?"
+ },
+ "synchronize_resources": {
+ "type": "boolean",
+ "title": "Are resources synchronized",
+ "description": "Synchronize resources?"
+ }
+ },
+ "additionalProperties": false
+ },
+ "EnvironmentType": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "EnvironmentType Identifier",
+ "description": "The identifier of EnvironmentType"
+ },
+ "attributes": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Arbitrary attributes",
+ "description": "Arbitrary attributes attached to this resource"
+ }
+ },
+ "required": [
+ "id",
+ "attributes"
+ ],
+ "additionalProperties": false
+ },
+ "EnvironmentTypeCollection": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/EnvironmentType"
+ }
+ },
+ "EnvironmentVariable": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "EnvironmentVariable Identifier",
+ "description": "The identifier of EnvironmentVariable"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "name": {
+ "type": "string",
+ "title": "Name",
+ "description": "Name of the variable"
+ },
+ "attributes": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Arbitrary attributes",
+ "description": "Arbitrary attributes attached to this resource"
+ },
+ "value": {
+ "type": "string",
+ "title": "Value",
+ "description": "Value of the variable"
+ },
+ "is_json": {
+ "type": "boolean",
+ "title": "Is JSON",
+ "description": "The variable is a JSON string"
+ },
+ "is_sensitive": {
+ "type": "boolean",
+ "title": "Is Sensitive",
+ "description": "The variable is sensitive"
+ },
+ "visible_build": {
+ "type": "boolean",
+ "title": "Is visible during build",
+ "description": "The variable is visible during build"
+ },
+ "visible_runtime": {
+ "type": "boolean",
+ "title": "Visible at runtime",
+ "description": "The variable is visible at runtime"
+ },
+ "application_scope": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Application Scope",
+ "description": "Applications that have access to this variable"
+ },
+ "project": {
+ "type": "string",
+ "title": "Project name",
+ "description": "The name of the project"
+ },
+ "environment": {
+ "type": "string",
+ "title": "Environment name",
+ "description": "The name of the environment"
+ },
+ "inherited": {
+ "type": "boolean",
+ "title": "Is inherited",
+ "description": "The variable is inherited from a parent environment"
+ },
+ "is_enabled": {
+ "type": "boolean",
+ "title": "Is enabled",
+ "description": "The variable is enabled on this environment"
+ },
+ "is_inheritable": {
+ "type": "boolean",
+ "title": "Is inheritable",
+ "description": "The variable is inheritable to child environments"
+ }
+ },
+ "required": [
+ "id",
+ "created_at",
+ "updated_at",
+ "name",
+ "attributes",
+ "is_json",
+ "is_sensitive",
+ "visible_build",
+ "visible_runtime",
+ "application_scope",
+ "project",
+ "environment",
+ "inherited",
+ "is_enabled",
+ "is_inheritable"
+ ],
+ "additionalProperties": false
+ },
+ "EnvironmentVariableCollection": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/EnvironmentVariable"
+ }
+ },
+ "EnvironmentVariableCreateInput": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "title": "Name",
+ "description": "Name of the variable"
+ },
+ "attributes": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Arbitrary attributes",
+ "description": "Arbitrary attributes attached to this resource"
+ },
+ "value": {
+ "type": "string",
+ "title": "Value",
+ "description": "Value of the variable"
+ },
+ "is_json": {
+ "type": "boolean",
+ "title": "Is JSON",
+ "description": "The variable is a JSON string"
+ },
+ "is_sensitive": {
+ "type": "boolean",
+ "title": "Is Sensitive",
+ "description": "The variable is sensitive"
+ },
+ "visible_build": {
+ "type": "boolean",
+ "title": "Is visible during build",
+ "description": "The variable is visible during build"
+ },
+ "visible_runtime": {
+ "type": "boolean",
+ "title": "Visible at runtime",
+ "description": "The variable is visible at runtime"
+ },
+ "application_scope": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Application Scope",
+ "description": "Applications that have access to this variable"
+ },
+ "is_enabled": {
+ "type": "boolean",
+ "title": "Is enabled",
+ "description": "The variable is enabled on this environment"
+ },
+ "is_inheritable": {
+ "type": "boolean",
+ "title": "Is inheritable",
+ "description": "The variable is inheritable to child environments"
+ }
+ },
+ "required": [
+ "name",
+ "value"
+ ],
+ "additionalProperties": false
+ },
+ "EnvironmentVariablePatch": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "title": "Name",
+ "description": "Name of the variable"
+ },
+ "attributes": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Arbitrary attributes",
+ "description": "Arbitrary attributes attached to this resource"
+ },
+ "value": {
+ "type": "string",
+ "title": "Value",
+ "description": "Value of the variable"
+ },
+ "is_json": {
+ "type": "boolean",
+ "title": "Is JSON",
+ "description": "The variable is a JSON string"
+ },
+ "is_sensitive": {
+ "type": "boolean",
+ "title": "Is Sensitive",
+ "description": "The variable is sensitive"
+ },
+ "visible_build": {
+ "type": "boolean",
+ "title": "Is visible during build",
+ "description": "The variable is visible during build"
+ },
+ "visible_runtime": {
+ "type": "boolean",
+ "title": "Visible at runtime",
+ "description": "The variable is visible at runtime"
+ },
+ "application_scope": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Application Scope",
+ "description": "Applications that have access to this variable"
+ },
+ "is_enabled": {
+ "type": "boolean",
+ "title": "Is enabled",
+ "description": "The variable is enabled on this environment"
+ },
+ "is_inheritable": {
+ "type": "boolean",
+ "title": "Is inheritable",
+ "description": "The variable is inheritable to child environments"
+ }
+ },
+ "additionalProperties": false
+ },
+ "FastlyIntegration": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "FastlyIntegration Identifier",
+ "description": "The identifier of FastlyIntegration"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "role": {
+ "type": "string",
+ "title": "Integration role",
+ "description": "The role of the integration"
+ },
+ "events": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Events",
+ "description": "Events to execute the hook on"
+ },
+ "environments": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Environments",
+ "description": "The environments to execute the hook on"
+ },
+ "excluded_environments": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Environments",
+ "description": "The environments to not execute the hook on"
+ },
+ "states": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "States",
+ "description": "Events to execute the hook on"
+ },
+ "result": {
+ "type": "string",
+ "enum": [
+ "*",
+ "failure",
+ "success"
+ ],
+ "title": "Result",
+ "description": "Result to execute the hook on"
+ },
+ "service_id": {
+ "type": "string",
+ "title": "Fastly Service ID",
+ "description": "The Fastly Service ID"
+ },
+ "tls_certificates": {
+ "type": "boolean",
+ "title": "TLS Certificates",
+ "description": "Push platform-provisioned TLS certificates to Fastly. Requires a Fastly API token with TLS management permissions"
+ }
+ },
+ "required": [
+ "created_at",
+ "updated_at",
+ "type",
+ "role",
+ "events",
+ "environments",
+ "excluded_environments",
+ "states",
+ "result",
+ "service_id",
+ "tls_certificates"
+ ],
+ "additionalProperties": false
+ },
+ "FastlyIntegrationCreateInput": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "events": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Events",
+ "description": "Events to execute the hook on"
+ },
+ "environments": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Environments",
+ "description": "The environments to execute the hook on"
+ },
+ "excluded_environments": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Environments",
+ "description": "The environments to not execute the hook on"
+ },
+ "states": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "States",
+ "description": "Events to execute the hook on"
+ },
+ "result": {
+ "type": "string",
+ "enum": [
+ "*",
+ "failure",
+ "success"
+ ],
+ "title": "Result",
+ "description": "Result to execute the hook on"
+ },
+ "token": {
+ "type": "string",
+ "title": "Token",
+ "description": "Fastly API Token"
+ },
+ "service_id": {
+ "type": "string",
+ "title": "Fastly Service ID",
+ "description": "The Fastly Service ID"
+ },
+ "tls_certificates": {
+ "type": "boolean",
+ "title": "TLS Certificates",
+ "description": "Push platform-provisioned TLS certificates to Fastly. Requires a Fastly API token with TLS management permissions"
+ }
+ },
+ "required": [
+ "type",
+ "token",
+ "service_id"
+ ],
+ "additionalProperties": false
+ },
+ "FastlyIntegrationPatch": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "events": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Events",
+ "description": "Events to execute the hook on"
+ },
+ "environments": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Environments",
+ "description": "The environments to execute the hook on"
+ },
+ "excluded_environments": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Environments",
+ "description": "The environments to not execute the hook on"
+ },
+ "states": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "States",
+ "description": "Events to execute the hook on"
+ },
+ "result": {
+ "type": "string",
+ "enum": [
+ "*",
+ "failure",
+ "success"
+ ],
+ "title": "Result",
+ "description": "Result to execute the hook on"
+ },
+ "token": {
+ "type": "string",
+ "title": "Token",
+ "description": "Fastly API Token"
+ },
+ "service_id": {
+ "type": "string",
+ "title": "Fastly Service ID",
+ "description": "The Fastly Service ID"
+ },
+ "tls_certificates": {
+ "type": "boolean",
+ "title": "TLS Certificates",
+ "description": "Push platform-provisioned TLS certificates to Fastly. Requires a Fastly API token with TLS management permissions"
+ }
+ },
+ "required": [
+ "type",
+ "token",
+ "service_id"
+ ],
+ "additionalProperties": false
+ },
+ "FoundationDeploymentTarget": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "FoundationDeploymentTarget Identifier",
+ "description": "The identifier of FoundationDeploymentTarget"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "dedicated",
+ "enterprise",
+ "foundation",
+ "kubernetes"
+ ],
+ "title": "Deployment target type",
+ "description": "The type of the deployment target"
+ },
+ "name": {
+ "type": "string",
+ "title": "Deployment target name",
+ "description": "The name of the deployment target"
+ },
+ "hosts": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "nullable": true,
+ "title": "Host identifier",
+ "description": "The identifier of the host."
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "core",
+ "satellite"
+ ],
+ "title": "Deployment type",
+ "description": "The type of the deployment to this host."
+ },
+ "services": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "nullable": true,
+ "title": "Assigned services",
+ "description": "The services assigned to this host"
+ }
+ },
+ "required": [
+ "id",
+ "type",
+ "services"
+ ],
+ "additionalProperties": false
+ },
+ "nullable": true,
+ "title": "Deployment hosts",
+ "description": "The hosts of the deployment target"
+ },
+ "use_dedicated_grid": {
+ "type": "boolean",
+ "title": "Whether the deployment should target dedicated Grid hosts.",
+ "description": "When true, the deployment will be pinned to Grid hosts dedicated to the environment using this deployment target.\n\nDedicated Grid hosts must be created prior to deploying the environment.\n\nThe constraints that will be set are as follows:\n\n* `cluster_type` is set to `environment-custom`.\n* `cluster` is set to the environment's cluster name."
+ },
+ "storage_type": {
+ "type": "string",
+ "nullable": true,
+ "title": "Storage Type",
+ "description": "The storage type"
+ }
+ },
+ "required": [
+ "type",
+ "name",
+ "hosts",
+ "use_dedicated_grid",
+ "storage_type"
+ ],
+ "additionalProperties": false
+ },
+ "FoundationDeploymentTargetCreateInput": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "dedicated",
+ "enterprise",
+ "foundation",
+ "kubernetes"
+ ],
+ "title": "Deployment target type",
+ "description": "The type of the deployment target"
+ },
+ "name": {
+ "type": "string",
+ "title": "Deployment target name",
+ "description": "The name of the deployment target"
+ },
+ "hosts": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "nullable": true,
+ "title": "Host identifier",
+ "description": "The identifier of the host."
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "core",
+ "satellite"
+ ],
+ "title": "Deployment type",
+ "description": "The type of the deployment to this host."
+ },
+ "services": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "nullable": true,
+ "title": "Assigned services",
+ "description": "The services assigned to this host"
+ }
+ },
+ "required": [
+ "id",
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "nullable": true,
+ "title": "Deployment hosts",
+ "description": "The hosts of the deployment target"
+ },
+ "use_dedicated_grid": {
+ "type": "boolean",
+ "title": "Whether the deployment should target dedicated Grid hosts.",
+ "description": "When true, the deployment will be pinned to Grid hosts dedicated to the environment using this deployment target.\n\nDedicated Grid hosts must be created prior to deploying the environment.\n\nThe constraints that will be set are as follows:\n\n* `cluster_type` is set to `environment-custom`.\n* `cluster` is set to the environment's cluster name."
+ }
+ },
+ "required": [
+ "type",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ "FoundationDeploymentTargetPatch": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "dedicated",
+ "enterprise",
+ "foundation",
+ "kubernetes"
+ ],
+ "title": "Deployment target type",
+ "description": "The type of the deployment target"
+ },
+ "name": {
+ "type": "string",
+ "title": "Deployment target name",
+ "description": "The name of the deployment target"
+ },
+ "hosts": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "nullable": true,
+ "title": "Host identifier",
+ "description": "The identifier of the host."
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "core",
+ "satellite"
+ ],
+ "title": "Deployment type",
+ "description": "The type of the deployment to this host."
+ },
+ "services": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "nullable": true,
+ "title": "Assigned services",
+ "description": "The services assigned to this host"
+ }
+ },
+ "required": [
+ "id",
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "nullable": true,
+ "title": "Deployment hosts",
+ "description": "The hosts of the deployment target"
+ },
+ "use_dedicated_grid": {
+ "type": "boolean",
+ "title": "Whether the deployment should target dedicated Grid hosts.",
+ "description": "When true, the deployment will be pinned to Grid hosts dedicated to the environment using this deployment target.\n\nDedicated Grid hosts must be created prior to deploying the environment.\n\nThe constraints that will be set are as follows:\n\n* `cluster_type` is set to `environment-custom`.\n* `cluster` is set to the environment's cluster name."
+ }
+ },
+ "required": [
+ "type",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ "GitLabIntegration": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "GitLabIntegration Identifier",
+ "description": "The identifier of GitLabIntegration"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "role": {
+ "type": "string",
+ "title": "Integration role",
+ "description": "The role of the integration"
+ },
+ "fetch_branches": {
+ "type": "boolean",
+ "title": "Fetch Branches",
+ "description": "Whether or not to fetch branches"
+ },
+ "prune_branches": {
+ "type": "boolean",
+ "title": "Prune Branches",
+ "description": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`)"
+ },
+ "environment_init_resources": {
+ "type": "string",
+ "enum": [
+ "default",
+ "manual",
+ "minimum",
+ "parent"
+ ],
+ "title": "Environment Init Resources",
+ "description": "The resources used when initializing a new service"
+ },
+ "token_expires_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "GitLab token expiration date",
+ "description": "'expires_at' value of the current token"
+ },
+ "rotate_token": {
+ "type": "boolean",
+ "title": "Enable token rotation",
+ "description": "Whether or not to rotate token automatically using Gitlab API"
+ },
+ "rotate_token_validity_in_weeks": {
+ "type": "integer",
+ "title": "GitLab token vality after rotation",
+ "description": "Validity in weeks of a new token after rotation"
+ },
+ "base_url": {
+ "type": "string",
+ "title": "GitLab Base URL",
+ "description": "The base URL of the GitLab installation"
+ },
+ "project": {
+ "type": "string",
+ "title": "Project",
+ "description": "The GitLab project (in the form `namespace/repo`)"
+ },
+ "build_merge_requests": {
+ "type": "boolean",
+ "title": "Build Merge Requests",
+ "description": "Whether or not to build merge requests"
+ },
+ "build_wip_merge_requests": {
+ "type": "boolean",
+ "title": "Build WIP Merge Requests",
+ "description": "Whether or not to build work in progress merge requests (requires `build_merge_requests`)"
+ },
+ "merge_requests_clone_parent_data": {
+ "type": "boolean",
+ "title": "Clone Parent Data",
+ "description": "Whether or not to clone parent data when building merge requests"
+ }
+ },
+ "required": [
+ "created_at",
+ "updated_at",
+ "type",
+ "role",
+ "fetch_branches",
+ "prune_branches",
+ "environment_init_resources",
+ "token_expires_at",
+ "rotate_token",
+ "rotate_token_validity_in_weeks",
+ "base_url",
+ "project",
+ "build_merge_requests",
+ "build_wip_merge_requests",
+ "merge_requests_clone_parent_data"
+ ],
+ "additionalProperties": false
+ },
+ "GitLabIntegrationCreateInput": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "fetch_branches": {
+ "type": "boolean",
+ "title": "Fetch Branches",
+ "description": "Whether or not to fetch branches"
+ },
+ "prune_branches": {
+ "type": "boolean",
+ "title": "Prune Branches",
+ "description": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`)"
+ },
+ "environment_init_resources": {
+ "type": "string",
+ "enum": [
+ "default",
+ "manual",
+ "minimum",
+ "parent"
+ ],
+ "title": "Environment Init Resources",
+ "description": "The resources used when initializing a new service"
+ },
+ "token": {
+ "type": "string",
+ "title": "GitLab Private Token",
+ "description": "The GitLab private token"
+ },
+ "rotate_token": {
+ "type": "boolean",
+ "title": "Enable token rotation",
+ "description": "Whether or not to rotate token automatically using Gitlab API"
+ },
+ "rotate_token_validity_in_weeks": {
+ "type": "integer",
+ "title": "GitLab token vality after rotation",
+ "description": "Validity in weeks of a new token after rotation"
+ },
+ "base_url": {
+ "type": "string",
+ "title": "GitLab Base URL",
+ "description": "The base URL of the GitLab installation"
+ },
+ "project": {
+ "type": "string",
+ "title": "Project",
+ "description": "The GitLab project (in the form `namespace/repo`)"
+ },
+ "build_merge_requests": {
+ "type": "boolean",
+ "title": "Build Merge Requests",
+ "description": "Whether or not to build merge requests"
+ },
+ "build_wip_merge_requests": {
+ "type": "boolean",
+ "title": "Build WIP Merge Requests",
+ "description": "Whether or not to build work in progress merge requests (requires `build_merge_requests`)"
+ },
+ "merge_requests_clone_parent_data": {
+ "type": "boolean",
+ "title": "Clone Parent Data",
+ "description": "Whether or not to clone parent data when building merge requests"
+ }
+ },
+ "required": [
+ "type",
+ "token",
+ "project"
+ ],
+ "additionalProperties": false
+ },
+ "GitLabIntegrationPatch": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "fetch_branches": {
+ "type": "boolean",
+ "title": "Fetch Branches",
+ "description": "Whether or not to fetch branches"
+ },
+ "prune_branches": {
+ "type": "boolean",
+ "title": "Prune Branches",
+ "description": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`)"
+ },
+ "environment_init_resources": {
+ "type": "string",
+ "enum": [
+ "default",
+ "manual",
+ "minimum",
+ "parent"
+ ],
+ "title": "Environment Init Resources",
+ "description": "The resources used when initializing a new service"
+ },
+ "token": {
+ "type": "string",
+ "title": "GitLab Private Token",
+ "description": "The GitLab private token"
+ },
+ "rotate_token": {
+ "type": "boolean",
+ "title": "Enable token rotation",
+ "description": "Whether or not to rotate token automatically using Gitlab API"
+ },
+ "rotate_token_validity_in_weeks": {
+ "type": "integer",
+ "title": "GitLab token vality after rotation",
+ "description": "Validity in weeks of a new token after rotation"
+ },
+ "base_url": {
+ "type": "string",
+ "title": "GitLab Base URL",
+ "description": "The base URL of the GitLab installation"
+ },
+ "project": {
+ "type": "string",
+ "title": "Project",
+ "description": "The GitLab project (in the form `namespace/repo`)"
+ },
+ "build_merge_requests": {
+ "type": "boolean",
+ "title": "Build Merge Requests",
+ "description": "Whether or not to build merge requests"
+ },
+ "build_wip_merge_requests": {
+ "type": "boolean",
+ "title": "Build WIP Merge Requests",
+ "description": "Whether or not to build work in progress merge requests (requires `build_merge_requests`)"
+ },
+ "merge_requests_clone_parent_data": {
+ "type": "boolean",
+ "title": "Clone Parent Data",
+ "description": "Whether or not to clone parent data when building merge requests"
+ }
+ },
+ "required": [
+ "type",
+ "token",
+ "project"
+ ],
+ "additionalProperties": false
+ },
+ "GithubIntegration": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "GithubIntegration Identifier",
+ "description": "The identifier of GithubIntegration"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "role": {
+ "type": "string",
+ "title": "Integration role",
+ "description": "The role of the integration"
+ },
+ "fetch_branches": {
+ "type": "boolean",
+ "title": "Fetch Branches",
+ "description": "Whether or not to fetch branches"
+ },
+ "prune_branches": {
+ "type": "boolean",
+ "title": "Prune Branches",
+ "description": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`)"
+ },
+ "environment_init_resources": {
+ "type": "string",
+ "enum": [
+ "default",
+ "manual",
+ "minimum",
+ "parent"
+ ],
+ "title": "Environment Init Resources",
+ "description": "The resources used when initializing a new service"
+ },
+ "base_url": {
+ "type": "string",
+ "nullable": true,
+ "title": "Base URL",
+ "description": "The base URL of the Github API endpoint"
+ },
+ "repository": {
+ "type": "string",
+ "title": "Repository",
+ "description": "The GitHub repository (in the form `user/repo`)"
+ },
+ "build_pull_requests": {
+ "type": "boolean",
+ "title": "Build Pull Requests",
+ "description": "Whether or not to build pull requests"
+ },
+ "build_draft_pull_requests": {
+ "type": "boolean",
+ "title": "Build Draft Pull Requests",
+ "description": "Whether or not to build draft pull requests (requires `build_pull_requests`)"
+ },
+ "build_pull_requests_post_merge": {
+ "type": "boolean",
+ "title": "Build PR Post-Merge",
+ "description": "Whether to build pull requests post-merge (if true) or pre-merge (if false)"
+ },
+ "pull_requests_clone_parent_data": {
+ "type": "boolean",
+ "title": "Clone Parent Data",
+ "description": "Whether or not to clone parent data when building pull requests"
+ },
+ "token_type": {
+ "type": "string",
+ "enum": [
+ "classic_personal_token",
+ "github_app"
+ ],
+ "title": "Token Type",
+ "description": "The type of the token of this GitHub integration"
+ }
+ },
+ "required": [
+ "created_at",
+ "updated_at",
+ "type",
+ "role",
+ "fetch_branches",
+ "prune_branches",
+ "environment_init_resources",
+ "base_url",
+ "repository",
+ "build_pull_requests",
+ "build_draft_pull_requests",
+ "build_pull_requests_post_merge",
+ "pull_requests_clone_parent_data",
+ "token_type"
+ ],
+ "additionalProperties": false
+ },
+ "GithubIntegrationCreateInput": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "fetch_branches": {
+ "type": "boolean",
+ "title": "Fetch Branches",
+ "description": "Whether or not to fetch branches"
+ },
+ "prune_branches": {
+ "type": "boolean",
+ "title": "Prune Branches",
+ "description": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`)"
+ },
+ "environment_init_resources": {
+ "type": "string",
+ "enum": [
+ "default",
+ "manual",
+ "minimum",
+ "parent"
+ ],
+ "title": "Environment Init Resources",
+ "description": "The resources used when initializing a new service"
+ },
+ "token": {
+ "type": "string",
+ "title": "Token",
+ "description": "The GitHub token."
+ },
+ "base_url": {
+ "type": "string",
+ "nullable": true,
+ "title": "Base URL",
+ "description": "The base URL of the Github API endpoint"
+ },
+ "repository": {
+ "type": "string",
+ "title": "Repository",
+ "description": "The GitHub repository (in the form `user/repo`)"
+ },
+ "build_pull_requests": {
+ "type": "boolean",
+ "title": "Build Pull Requests",
+ "description": "Whether or not to build pull requests"
+ },
+ "build_draft_pull_requests": {
+ "type": "boolean",
+ "title": "Build Draft Pull Requests",
+ "description": "Whether or not to build draft pull requests (requires `build_pull_requests`)"
+ },
+ "build_pull_requests_post_merge": {
+ "type": "boolean",
+ "title": "Build PR Post-Merge",
+ "description": "Whether to build pull requests post-merge (if true) or pre-merge (if false)"
+ },
+ "pull_requests_clone_parent_data": {
+ "type": "boolean",
+ "title": "Clone Parent Data",
+ "description": "Whether or not to clone parent data when building pull requests"
+ }
+ },
+ "required": [
+ "type",
+ "token",
+ "repository"
+ ],
+ "additionalProperties": false
+ },
+ "GithubIntegrationPatch": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "fetch_branches": {
+ "type": "boolean",
+ "title": "Fetch Branches",
+ "description": "Whether or not to fetch branches"
+ },
+ "prune_branches": {
+ "type": "boolean",
+ "title": "Prune Branches",
+ "description": "Whether or not to remove branches that disappeared remotely (requires `fetch_branches`)"
+ },
+ "environment_init_resources": {
+ "type": "string",
+ "enum": [
+ "default",
+ "manual",
+ "minimum",
+ "parent"
+ ],
+ "title": "Environment Init Resources",
+ "description": "The resources used when initializing a new service"
+ },
+ "token": {
+ "type": "string",
+ "title": "Token",
+ "description": "The GitHub token."
+ },
+ "base_url": {
+ "type": "string",
+ "nullable": true,
+ "title": "Base URL",
+ "description": "The base URL of the Github API endpoint"
+ },
+ "repository": {
+ "type": "string",
+ "title": "Repository",
+ "description": "The GitHub repository (in the form `user/repo`)"
+ },
+ "build_pull_requests": {
+ "type": "boolean",
+ "title": "Build Pull Requests",
+ "description": "Whether or not to build pull requests"
+ },
+ "build_draft_pull_requests": {
+ "type": "boolean",
+ "title": "Build Draft Pull Requests",
+ "description": "Whether or not to build draft pull requests (requires `build_pull_requests`)"
+ },
+ "build_pull_requests_post_merge": {
+ "type": "boolean",
+ "title": "Build PR Post-Merge",
+ "description": "Whether to build pull requests post-merge (if true) or pre-merge (if false)"
+ },
+ "pull_requests_clone_parent_data": {
+ "type": "boolean",
+ "title": "Clone Parent Data",
+ "description": "Whether or not to clone parent data when building pull requests"
+ }
+ },
+ "required": [
+ "type",
+ "token",
+ "repository"
+ ],
+ "additionalProperties": false
+ },
+ "HealthWebHookIntegration": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "HealthWebHookIntegration Identifier",
+ "description": "The identifier of HealthWebHookIntegration"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "role": {
+ "type": "string",
+ "title": "Integration role",
+ "description": "The role of the integration"
+ },
+ "url": {
+ "type": "string",
+ "title": "WebHook URL",
+ "description": "The URL of the webhook"
+ }
+ },
+ "required": [
+ "created_at",
+ "updated_at",
+ "type",
+ "role",
+ "url"
+ ],
+ "additionalProperties": false
+ },
+ "HealthWebHookIntegrationCreateInput": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "shared_key": {
+ "type": "string",
+ "nullable": true,
+ "title": "Shared Key",
+ "description": "The JWS shared secret key"
+ },
+ "url": {
+ "type": "string",
+ "title": "WebHook URL",
+ "description": "The URL of the webhook"
+ }
+ },
+ "required": [
+ "type",
+ "url"
+ ],
+ "additionalProperties": false
+ },
+ "HealthWebHookIntegrationPatch": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "shared_key": {
+ "type": "string",
+ "nullable": true,
+ "title": "Shared Key",
+ "description": "The JWS shared secret key"
+ },
+ "url": {
+ "type": "string",
+ "title": "WebHook URL",
+ "description": "The URL of the webhook"
+ }
+ },
+ "required": [
+ "type",
+ "url"
+ ],
+ "additionalProperties": false
+ },
+ "HttpLogIntegration": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "HttpLogIntegration Identifier",
+ "description": "The identifier of HttpLogIntegration"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "role": {
+ "type": "string",
+ "title": "Integration role",
+ "description": "The role of the integration"
+ },
+ "extra": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Extra",
+ "description": "Arbitrary key/value pairs to include with forwarded logs"
+ },
+ "url": {
+ "type": "string",
+ "title": "HTTP endpoint",
+ "description": "The HTTP endpoint"
+ },
+ "headers": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "HTTP Headers",
+ "description": "HTTP headers to use in POST requests"
+ },
+ "tls_verify": {
+ "type": "boolean",
+ "title": "TLS Verify",
+ "description": "Enable/Disable HTTPS certificate verification"
+ },
+ "excluded_services": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Services",
+ "description": "Comma separated list of service and application names to exclude from logging"
+ }
+ },
+ "required": [
+ "created_at",
+ "updated_at",
+ "type",
+ "role",
+ "extra",
+ "url",
+ "headers",
+ "tls_verify",
+ "excluded_services"
+ ],
+ "additionalProperties": false
+ },
+ "HttpLogIntegrationCreateInput": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "extra": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Extra",
+ "description": "Arbitrary key/value pairs to include with forwarded logs"
+ },
+ "url": {
+ "type": "string",
+ "title": "HTTP endpoint",
+ "description": "The HTTP endpoint"
+ },
+ "headers": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "HTTP Headers",
+ "description": "HTTP headers to use in POST requests"
+ },
+ "tls_verify": {
+ "type": "boolean",
+ "title": "TLS Verify",
+ "description": "Enable/Disable HTTPS certificate verification"
+ },
+ "excluded_services": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Services",
+ "description": "Comma separated list of service and application names to exclude from logging"
+ }
+ },
+ "required": [
+ "type",
+ "url"
+ ],
+ "additionalProperties": false
+ },
+ "HttpLogIntegrationPatch": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "extra": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Extra",
+ "description": "Arbitrary key/value pairs to include with forwarded logs"
+ },
+ "url": {
+ "type": "string",
+ "title": "HTTP endpoint",
+ "description": "The HTTP endpoint"
+ },
+ "headers": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "HTTP Headers",
+ "description": "HTTP headers to use in POST requests"
+ },
+ "tls_verify": {
+ "type": "boolean",
+ "title": "TLS Verify",
+ "description": "Enable/Disable HTTPS certificate verification"
+ },
+ "excluded_services": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Services",
+ "description": "Comma separated list of service and application names to exclude from logging"
+ }
+ },
+ "required": [
+ "type",
+ "url"
+ ],
+ "additionalProperties": false
+ },
+ "Integration": {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/BitbucketIntegration"
+ },
+ {
+ "$ref": "#/components/schemas/BitbucketServerIntegration"
+ },
+ {
+ "$ref": "#/components/schemas/BlackfireIntegration"
+ },
+ {
+ "$ref": "#/components/schemas/FastlyIntegration"
+ },
+ {
+ "$ref": "#/components/schemas/GithubIntegration"
+ },
+ {
+ "$ref": "#/components/schemas/GitLabIntegration"
+ },
+ {
+ "$ref": "#/components/schemas/EmailIntegration"
+ },
+ {
+ "$ref": "#/components/schemas/PagerDutyIntegration"
+ },
+ {
+ "$ref": "#/components/schemas/SlackIntegration"
+ },
+ {
+ "$ref": "#/components/schemas/HealthWebHookIntegration"
+ },
+ {
+ "$ref": "#/components/schemas/HttpLogIntegration"
+ },
+ {
+ "$ref": "#/components/schemas/NewRelicIntegration"
+ },
+ {
+ "$ref": "#/components/schemas/OtlpLogIntegration"
+ },
+ {
+ "$ref": "#/components/schemas/ScriptIntegration"
+ },
+ {
+ "$ref": "#/components/schemas/SplunkIntegration"
+ },
+ {
+ "$ref": "#/components/schemas/SumologicIntegration"
+ },
+ {
+ "$ref": "#/components/schemas/SyslogIntegration"
+ },
+ {
+ "$ref": "#/components/schemas/WebHookIntegration"
+ }
+ ]
+ },
+ "IntegrationCollection": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Integration"
+ }
+ },
+ "IntegrationCreateCreateInput": {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/BitbucketIntegrationCreateInput"
+ },
+ {
+ "$ref": "#/components/schemas/BitbucketServerIntegrationCreateInput"
+ },
+ {
+ "$ref": "#/components/schemas/BlackfireIntegrationCreateInput"
+ },
+ {
+ "$ref": "#/components/schemas/FastlyIntegrationCreateInput"
+ },
+ {
+ "$ref": "#/components/schemas/GithubIntegrationCreateInput"
+ },
+ {
+ "$ref": "#/components/schemas/GitLabIntegrationCreateInput"
+ },
+ {
+ "$ref": "#/components/schemas/EmailIntegrationCreateInput"
+ },
+ {
+ "$ref": "#/components/schemas/PagerDutyIntegrationCreateInput"
+ },
+ {
+ "$ref": "#/components/schemas/SlackIntegrationCreateInput"
+ },
+ {
+ "$ref": "#/components/schemas/HealthWebHookIntegrationCreateInput"
+ },
+ {
+ "$ref": "#/components/schemas/HttpLogIntegrationCreateInput"
+ },
+ {
+ "$ref": "#/components/schemas/NewRelicIntegrationCreateInput"
+ },
+ {
+ "$ref": "#/components/schemas/OtlpLogIntegrationCreateCreateInput"
+ },
+ {
+ "$ref": "#/components/schemas/ScriptIntegrationCreateInput"
+ },
+ {
+ "$ref": "#/components/schemas/SplunkIntegrationCreateInput"
+ },
+ {
+ "$ref": "#/components/schemas/SumologicIntegrationCreateInput"
+ },
+ {
+ "$ref": "#/components/schemas/SyslogIntegrationCreateInput"
+ },
+ {
+ "$ref": "#/components/schemas/WebHookIntegrationCreateInput"
+ }
+ ]
+ },
+ "IntegrationPatch": {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/BitbucketIntegrationPatch"
+ },
+ {
+ "$ref": "#/components/schemas/BitbucketServerIntegrationPatch"
+ },
+ {
+ "$ref": "#/components/schemas/BlackfireIntegrationPatch"
+ },
+ {
+ "$ref": "#/components/schemas/FastlyIntegrationPatch"
+ },
+ {
+ "$ref": "#/components/schemas/GithubIntegrationPatch"
+ },
+ {
+ "$ref": "#/components/schemas/GitLabIntegrationPatch"
+ },
+ {
+ "$ref": "#/components/schemas/EmailIntegrationPatch"
+ },
+ {
+ "$ref": "#/components/schemas/PagerDutyIntegrationPatch"
+ },
+ {
+ "$ref": "#/components/schemas/SlackIntegrationPatch"
+ },
+ {
+ "$ref": "#/components/schemas/HealthWebHookIntegrationPatch"
+ },
+ {
+ "$ref": "#/components/schemas/HttpLogIntegrationPatch"
+ },
+ {
+ "$ref": "#/components/schemas/NewRelicIntegrationPatch"
+ },
+ {
+ "$ref": "#/components/schemas/OtlpLogIntegrationPatch"
+ },
+ {
+ "$ref": "#/components/schemas/ScriptIntegrationPatch"
+ },
+ {
+ "$ref": "#/components/schemas/SplunkIntegrationPatch"
+ },
+ {
+ "$ref": "#/components/schemas/SumologicIntegrationPatch"
+ },
+ {
+ "$ref": "#/components/schemas/SyslogIntegrationPatch"
+ },
+ {
+ "$ref": "#/components/schemas/WebHookIntegrationPatch"
+ }
+ ]
+ },
+ "KubernetesDeploymentTargetStorage": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "KubernetesDeploymentTargetStorage Identifier",
+ "description": "The identifier of KubernetesDeploymentTargetStorage"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "dedicated",
+ "enterprise",
+ "foundation",
+ "kubernetes"
+ ],
+ "title": "Deployment target type",
+ "description": "The type of the deployment target"
+ },
+ "name": {
+ "type": "string",
+ "title": "Deployment target name",
+ "description": "The name of the deployment target"
+ },
+ "k8s_config": {
+ "type": "string",
+ "nullable": true,
+ "title": "K8S config",
+ "description": "K8S config"
+ },
+ "bastion_nodes_user": {
+ "type": "string",
+ "nullable": true,
+ "title": "The bastion-nodes ssh user",
+ "description": "The bastion-nodes ssh user"
+ },
+ "bastion_nodes_host": {
+ "type": "string",
+ "nullable": true,
+ "title": "The bastion node endpoint",
+ "description": "The bastion node endpoint"
+ }
+ },
+ "required": [
+ "type",
+ "name",
+ "k8s_config",
+ "bastion_nodes_user",
+ "bastion_nodes_host"
+ ],
+ "additionalProperties": false
+ },
+ "KubernetesDeploymentTargetStorageCreateInput": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "dedicated",
+ "enterprise",
+ "foundation",
+ "kubernetes"
+ ],
+ "title": "Deployment target type",
+ "description": "The type of the deployment target"
+ },
+ "name": {
+ "type": "string",
+ "title": "Deployment target name",
+ "description": "The name of the deployment target"
+ }
+ },
+ "required": [
+ "type",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ "KubernetesDeploymentTargetStoragePatch": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "dedicated",
+ "enterprise",
+ "foundation",
+ "kubernetes"
+ ],
+ "title": "Deployment target type",
+ "description": "The type of the deployment target"
+ },
+ "name": {
+ "type": "string",
+ "title": "Deployment target name",
+ "description": "The name of the deployment target"
+ }
+ },
+ "required": [
+ "type",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ "NewRelicIntegration": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "NewRelicIntegration Identifier",
+ "description": "The identifier of NewRelicIntegration"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "role": {
+ "type": "string",
+ "title": "Integration role",
+ "description": "The role of the integration"
+ },
+ "extra": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Extra",
+ "description": "Arbitrary key/value pairs to include with forwarded logs"
+ },
+ "url": {
+ "type": "string",
+ "title": "NewRelic Logs endpoint",
+ "description": "The NewRelic Logs endpoint"
+ },
+ "tls_verify": {
+ "type": "boolean",
+ "title": "TLS Verify",
+ "description": "Enable/Disable HTTPS certificate verification"
+ },
+ "excluded_services": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Services",
+ "description": "Comma separated list of service and application names to exclude from logging"
+ }
+ },
+ "required": [
+ "created_at",
+ "updated_at",
+ "type",
+ "role",
+ "extra",
+ "url",
+ "tls_verify",
+ "excluded_services"
+ ],
+ "additionalProperties": false
+ },
+ "NewRelicIntegrationCreateInput": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "extra": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Extra",
+ "description": "Arbitrary key/value pairs to include with forwarded logs"
+ },
+ "url": {
+ "type": "string",
+ "title": "NewRelic Logs endpoint",
+ "description": "The NewRelic Logs endpoint"
+ },
+ "license_key": {
+ "type": "string",
+ "title": "License Key",
+ "description": "The NewRelic Logs License Key"
+ },
+ "tls_verify": {
+ "type": "boolean",
+ "title": "TLS Verify",
+ "description": "Enable/Disable HTTPS certificate verification"
+ },
+ "excluded_services": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Services",
+ "description": "Comma separated list of service and application names to exclude from logging"
+ }
+ },
+ "required": [
+ "type",
+ "url",
+ "license_key"
+ ],
+ "additionalProperties": false
+ },
+ "NewRelicIntegrationPatch": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "extra": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Extra",
+ "description": "Arbitrary key/value pairs to include with forwarded logs"
+ },
+ "url": {
+ "type": "string",
+ "title": "NewRelic Logs endpoint",
+ "description": "The NewRelic Logs endpoint"
+ },
+ "license_key": {
+ "type": "string",
+ "title": "License Key",
+ "description": "The NewRelic Logs License Key"
+ },
+ "tls_verify": {
+ "type": "boolean",
+ "title": "TLS Verify",
+ "description": "Enable/Disable HTTPS certificate verification"
+ },
+ "excluded_services": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Services",
+ "description": "Comma separated list of service and application names to exclude from logging"
+ }
+ },
+ "required": [
+ "type",
+ "url",
+ "license_key"
+ ],
+ "additionalProperties": false
+ },
+ "OtlpLogIntegration": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "OtlpLogIntegration Identifier",
+ "description": "The identifier of OtlpLogIntegration"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "role": {
+ "type": "string",
+ "title": "Integration role",
+ "description": "The role of the integration"
+ },
+ "extra": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Extra",
+ "description": "Arbitrary key/value pairs to include with forwarded logs"
+ },
+ "url": {
+ "type": "string",
+ "title": "HTTP endpoint",
+ "description": "The HTTP endpoint"
+ },
+ "headers": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "HTTP Headers",
+ "description": "HTTP headers to use in POST requests"
+ },
+ "tls_verify": {
+ "type": "boolean",
+ "title": "TLS Verify",
+ "description": "Enable/Disable HTTPS certificate verification"
+ },
+ "excluded_services": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Services",
+ "description": "Comma separated list of service and application names to exclude from logging"
+ }
+ },
+ "required": [
+ "created_at",
+ "updated_at",
+ "type",
+ "role",
+ "extra",
+ "url",
+ "headers",
+ "tls_verify",
+ "excluded_services"
+ ],
+ "additionalProperties": false
+ },
+ "OtlpLogIntegrationCreateCreateInput": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "extra": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Extra",
+ "description": "Arbitrary key/value pairs to include with forwarded logs"
+ },
+ "url": {
+ "type": "string",
+ "title": "HTTP endpoint",
+ "description": "The HTTP endpoint"
+ },
+ "headers": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "HTTP Headers",
+ "description": "HTTP headers to use in POST requests"
+ },
+ "tls_verify": {
+ "type": "boolean",
+ "title": "TLS Verify",
+ "description": "Enable/Disable HTTPS certificate verification"
+ },
+ "excluded_services": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Services",
+ "description": "Comma separated list of service and application names to exclude from logging"
+ }
+ },
+ "required": [
+ "type",
+ "url"
+ ],
+ "additionalProperties": false
+ },
+ "OtlpLogIntegrationPatch": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "extra": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Extra",
+ "description": "Arbitrary key/value pairs to include with forwarded logs"
+ },
+ "url": {
+ "type": "string",
+ "title": "HTTP endpoint",
+ "description": "The HTTP endpoint"
+ },
+ "headers": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "HTTP Headers",
+ "description": "HTTP headers to use in POST requests"
+ },
+ "tls_verify": {
+ "type": "boolean",
+ "title": "TLS Verify",
+ "description": "Enable/Disable HTTPS certificate verification"
+ },
+ "excluded_services": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Services",
+ "description": "Comma separated list of service and application names to exclude from logging"
+ }
+ },
+ "required": [
+ "type",
+ "url"
+ ],
+ "additionalProperties": false
+ },
+ "PagerDutyIntegration": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "PagerDutyIntegration Identifier",
+ "description": "The identifier of PagerDutyIntegration"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "role": {
+ "type": "string",
+ "title": "Integration role",
+ "description": "The role of the integration"
+ },
+ "routing_key": {
+ "type": "string",
+ "title": "Routing Key",
+ "description": "The PagerDuty routing key"
+ }
+ },
+ "required": [
+ "created_at",
+ "updated_at",
+ "type",
+ "role",
+ "routing_key"
+ ],
+ "additionalProperties": false
+ },
+ "PagerDutyIntegrationCreateInput": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "routing_key": {
+ "type": "string",
+ "title": "Routing Key",
+ "description": "The PagerDuty routing key"
+ }
+ },
+ "required": [
+ "type",
+ "routing_key"
+ ],
+ "additionalProperties": false
+ },
+ "PagerDutyIntegrationPatch": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "routing_key": {
+ "type": "string",
+ "title": "Routing Key",
+ "description": "The PagerDuty routing key"
+ }
+ },
+ "required": [
+ "type",
+ "routing_key"
+ ],
+ "additionalProperties": false
+ },
+ "ProdDomainStorage": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "ProdDomainStorage Identifier",
+ "description": "The identifier of ProdDomainStorage"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "type": {
+ "type": "string",
+ "title": "Domain type",
+ "description": "The type of domain"
+ },
+ "project": {
+ "type": "string",
+ "title": "Project name",
+ "description": "The name of the project"
+ },
+ "name": {
+ "type": "string",
+ "title": "Domain name",
+ "description": "The domain name"
+ },
+ "registered_name": {
+ "type": "string",
+ "title": "Claimed domain name",
+ "description": "The claimed domain name"
+ },
+ "attributes": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Arbitrary attributes",
+ "description": "Arbitrary attributes attached to this resource"
+ },
+ "is_default": {
+ "type": "boolean",
+ "title": "Is Default",
+ "description": "Is this domain default"
+ }
+ },
+ "required": [
+ "created_at",
+ "updated_at",
+ "type",
+ "name",
+ "attributes"
+ ],
+ "additionalProperties": false
+ },
+ "ProdDomainStorageCreateInput": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "title": "Domain name",
+ "description": "The domain name"
+ },
+ "attributes": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Arbitrary attributes",
+ "description": "Arbitrary attributes attached to this resource"
+ },
+ "is_default": {
+ "type": "boolean",
+ "title": "Is Default",
+ "description": "Is this domain default"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ "ProdDomainStoragePatch": {
+ "type": "object",
+ "properties": {
+ "attributes": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Arbitrary attributes",
+ "description": "Arbitrary attributes attached to this resource"
+ },
+ "is_default": {
+ "type": "boolean",
+ "title": "Is Default",
+ "description": "Is this domain default"
+ }
+ },
+ "additionalProperties": false
+ },
+ "Project": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "Project Identifier",
+ "description": "The identifier of Project"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "attributes": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Arbitrary attributes",
+ "description": "Arbitrary attributes attached to this resource"
+ },
+ "title": {
+ "type": "string",
+ "title": "Title",
+ "description": "The title of the project"
+ },
+ "description": {
+ "type": "string",
+ "title": "Description",
+ "description": "The description of the project"
+ },
+ "owner": {
+ "type": "string",
+ "title": "Owner",
+ "description": "The owner of the project",
+ "deprecated": true,
+ "x-stability": "DEPRECATED"
+ },
+ "namespace": {
+ "type": "string",
+ "nullable": true,
+ "title": "Namespace",
+ "description": "The namespace the project belongs in",
+ "x-stability": "EXPERIMENTAL"
+ },
+ "organization": {
+ "type": "string",
+ "nullable": true,
+ "title": "Organization",
+ "description": "The organization the project belongs in",
+ "x-stability": "EXPERIMENTAL"
+ },
+ "default_branch": {
+ "type": "string",
+ "nullable": true,
+ "title": "Default branch",
+ "description": "The default branch of the project"
+ },
+ "status": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "string",
+ "title": "Status code",
+ "description": ""
+ },
+ "message": {
+ "type": "string",
+ "title": "Status text",
+ "description": ""
+ }
+ },
+ "required": [
+ "code",
+ "message"
+ ],
+ "additionalProperties": false,
+ "title": "Status",
+ "description": "The status of the project"
+ },
+ "timezone": {
+ "type": "string",
+ "title": "Timezone",
+ "description": "Timezone of the project"
+ },
+ "region": {
+ "type": "string",
+ "title": "Region",
+ "description": "The region of the project"
+ },
+ "repository": {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string",
+ "title": "Git URL",
+ "description": "The Git URL"
+ },
+ "client_ssh_key": {
+ "type": "string",
+ "nullable": true,
+ "title": "SSH Key",
+ "description": "SSH Key used to access external private repositories"
+ }
+ },
+ "required": [
+ "url",
+ "client_ssh_key"
+ ],
+ "additionalProperties": false,
+ "title": "Repository information",
+ "description": "The repository information of the project"
+ },
+ "default_domain": {
+ "type": "string",
+ "nullable": true,
+ "title": "Default domain",
+ "description": "The default domain of the project"
+ },
+ "subscription": {
+ "type": "object",
+ "properties": {
+ "license_uri": {
+ "type": "string",
+ "title": "Subscription URI",
+ "description": "URI of the subscription"
+ },
+ "plan": {
+ "type": "string",
+ "enum": [
+ "2xlarge",
+ "2xlarge-high-memory",
+ "4xlarge",
+ "8xlarge",
+ "development",
+ "large",
+ "large-high-memory",
+ "medium",
+ "medium-high-memory",
+ "standard",
+ "standard-high-memory",
+ "xlarge",
+ "xlarge-high-memory"
+ ],
+ "title": "Plan level",
+ "description": ""
+ },
+ "environments": {
+ "type": "integer",
+ "title": "Environments number",
+ "description": "Number of environments"
+ },
+ "storage": {
+ "type": "integer",
+ "title": "Storage",
+ "description": "Size of storage (in MB)"
+ },
+ "included_users": {
+ "type": "integer",
+ "title": "Included users",
+ "description": "Number of users"
+ },
+ "subscription_management_uri": {
+ "type": "string",
+ "title": "Subscription management URI",
+ "description": "URI for managing the subscription"
+ },
+ "restricted": {
+ "type": "boolean",
+ "title": "Is subscription attributes frozen",
+ "description": "True if subscription attributes, like number of users, are frozen"
+ },
+ "suspended": {
+ "type": "boolean",
+ "title": "Is subscription suspended",
+ "description": "Whether or not the subscription is suspended"
+ },
+ "user_licenses": {
+ "type": "integer",
+ "title": "Current number of users",
+ "description": "Current number of users"
+ },
+ "resources": {
+ "type": "object",
+ "properties": {
+ "container_profiles": {
+ "type": "boolean",
+ "title": "Is Container profiles enabled",
+ "description": "Enable support for customizable container profiles"
+ },
+ "production": {
+ "type": "object",
+ "properties": {
+ "legacy_development": {
+ "type": "boolean",
+ "title": "Legacy development sizing",
+ "description": "Enable legacy development sizing for this environment type"
+ },
+ "max_cpu": {
+ "type": "number",
+ "format": "float",
+ "nullable": true,
+ "title": "Maximum CPU units",
+ "description": "Maximum number of allocated CPU units"
+ },
+ "max_memory": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Maximum RAM",
+ "description": "Maximum amount of allocated RAM"
+ },
+ "max_environments": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Maximum environments",
+ "description": "Maximum number of environments"
+ }
+ },
+ "required": [
+ "legacy_development",
+ "max_cpu",
+ "max_memory",
+ "max_environments"
+ ],
+ "additionalProperties": false,
+ "title": "Production resources",
+ "description": "Resources for production environments"
+ },
+ "development": {
+ "type": "object",
+ "properties": {
+ "legacy_development": {
+ "type": "boolean",
+ "title": "Legacy development sizing",
+ "description": "Enable legacy development sizing for this environment type"
+ },
+ "max_cpu": {
+ "type": "number",
+ "format": "float",
+ "nullable": true,
+ "title": "Maximum CPU units",
+ "description": "Maximum number of allocated CPU units"
+ },
+ "max_memory": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Maximum RAM",
+ "description": "Maximum amount of allocated RAM"
+ },
+ "max_environments": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Maximum environments",
+ "description": "Maximum number of environments"
+ }
+ },
+ "required": [
+ "legacy_development",
+ "max_cpu",
+ "max_memory",
+ "max_environments"
+ ],
+ "additionalProperties": false,
+ "title": "Development resources",
+ "description": "Resources for development environments"
+ }
+ },
+ "required": [
+ "container_profiles",
+ "production",
+ "development"
+ ],
+ "additionalProperties": false,
+ "title": "Resources limits",
+ "description": "Resources limits"
+ },
+ "resource_validation_url": {
+ "type": "string",
+ "title": "Resource validation URL",
+ "description": "URL for resources validation"
+ },
+ "image_types": {
+ "type": "object",
+ "properties": {
+ "only": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Allowed image types",
+ "description": "Image types to be allowed use."
+ },
+ "exclude": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Denied image types",
+ "description": "Image types to be denied use."
+ }
+ },
+ "additionalProperties": false,
+ "title": "Image type restrictions",
+ "description": "Restricted and denied image types"
+ }
+ },
+ "required": [
+ "license_uri",
+ "storage",
+ "included_users",
+ "subscription_management_uri",
+ "restricted",
+ "suspended",
+ "user_licenses"
+ ],
+ "additionalProperties": false,
+ "title": "Subscription information",
+ "description": "The subscription information of the project"
+ },
+ "maintenance": {
+ "type": "object",
+ "properties": {
+ "next_maintenance": {
+ "type": "string",
+ "format": "date-time",
+ "title": "Next maintenance date and time",
+ "description": "Estimated date and time of the next maintenance activity"
+ }
+ },
+ "required": [
+ "next_maintenance"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Maintenance",
+ "description": "The maintenance information of the project"
+ }
+ },
+ "required": [
+ "id",
+ "created_at",
+ "updated_at",
+ "attributes",
+ "title",
+ "description",
+ "owner",
+ "namespace",
+ "organization",
+ "default_branch",
+ "status",
+ "timezone",
+ "region",
+ "repository",
+ "default_domain",
+ "subscription",
+ "maintenance"
+ ],
+ "additionalProperties": false
+ },
+ "ProjectCapabilities": {
+ "type": "object",
+ "properties": {
+ "custom_domains": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "If true, custom domains can be added to the project."
+ },
+ "environments_with_domains_limit": {
+ "type": "integer",
+ "title": "Domains limit",
+ "description": "Limit on the amount of non-production environments that can have domains set"
+ }
+ },
+ "required": [
+ "enabled",
+ "environments_with_domains_limit"
+ ],
+ "additionalProperties": false,
+ "title": "Custom Domains",
+ "description": ""
+ },
+ "source_operations": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "If true, source operations can be triggered."
+ }
+ },
+ "required": [
+ "enabled"
+ ],
+ "additionalProperties": false,
+ "title": "Source Operations",
+ "description": ""
+ },
+ "runtime_operations": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "If true, runtime operations can be triggered."
+ }
+ },
+ "required": [
+ "enabled"
+ ],
+ "additionalProperties": false,
+ "title": "Runtime Operations",
+ "description": ""
+ },
+ "tasks": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "If true, background tasks can be triggered."
+ }
+ },
+ "required": [
+ "enabled"
+ ],
+ "additionalProperties": false,
+ "title": "Tasks",
+ "description": ""
+ },
+ "outbound_firewall": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "If true, outbound firewall can be used."
+ }
+ },
+ "required": [
+ "enabled"
+ ],
+ "additionalProperties": false,
+ "title": "Outbound Firewall",
+ "description": ""
+ },
+ "egress_proxy": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "If true, the egress proxy is on for every container in the project: outbound traffic is denied by default and must traverse the proxy. Applies project-wide regardless of whether an application declares an egress allowlist."
+ }
+ },
+ "required": [
+ "enabled"
+ ],
+ "additionalProperties": false,
+ "title": "Egress Proxy",
+ "description": ""
+ },
+ "metrics": {
+ "type": "object",
+ "properties": {
+ "max_range": {
+ "type": "string",
+ "title": "Max range",
+ "description": "Limit on the maximum time range allowed in metrics retrieval"
+ }
+ },
+ "required": [
+ "max_range"
+ ],
+ "additionalProperties": false,
+ "title": "Metrics",
+ "description": ""
+ },
+ "logs_forwarding": {
+ "type": "object",
+ "properties": {
+ "max_extra_payload_size": {
+ "type": "integer",
+ "title": "Max extra payload size",
+ "description": "Limit on the maximum size for the custom extra attributes added to the forwarded logs payload"
+ }
+ },
+ "required": [
+ "max_extra_payload_size"
+ ],
+ "additionalProperties": false,
+ "title": "Logs Forwarding",
+ "description": ""
+ },
+ "guaranteed_resources": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "If true, guaranteed resources can be used"
+ },
+ "instance_limit": {
+ "type": "integer",
+ "title": "Instance limit",
+ "description": "Instance limit for guaranteed resources"
+ }
+ },
+ "required": [
+ "enabled",
+ "instance_limit"
+ ],
+ "additionalProperties": false,
+ "title": "Guaranteed Resources",
+ "description": ""
+ },
+ "images": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "available": {
+ "type": "boolean",
+ "title": "Available",
+ "description": "The image is available for deployment"
+ }
+ },
+ "required": [
+ "available"
+ ],
+ "additionalProperties": false
+ }
+ },
+ "title": "Images",
+ "description": ""
+ },
+ "instance_limit": {
+ "type": "integer",
+ "title": "Instance limit",
+ "description": "Maximum number of instance per service"
+ },
+ "build_resources": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "If true, build resources can be modified."
+ },
+ "max_cpu": {
+ "type": "number",
+ "format": "float",
+ "title": "CPU",
+ "description": ""
+ },
+ "max_memory": {
+ "type": "integer",
+ "title": "Memory",
+ "description": ""
+ }
+ },
+ "required": [
+ "enabled",
+ "max_cpu",
+ "max_memory"
+ ],
+ "additionalProperties": false,
+ "title": "Build Resources",
+ "description": ""
+ },
+ "object_storage": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "If true, implicit object-storage can be used."
+ },
+ "min_storage": {
+ "type": "integer",
+ "title": "Minimum storage",
+ "description": "Lower bound for the size of implicit object-storage on the project, in MiB."
+ },
+ "max_storage": {
+ "type": "integer",
+ "title": "Maximum storage",
+ "description": "Upper bound for the size of implicit object-storage on the project, in MiB."
+ },
+ "storage_step": {
+ "type": "integer",
+ "title": "Storage step",
+ "description": "Granularity of implicit object-storage allocations, in MiB. resources.disk.object, min_storage and max_storage must all be multiples of this value."
+ },
+ "cpu_per_step": {
+ "type": "number",
+ "format": "float",
+ "title": "CPU per step",
+ "description": "CPU granted to the implicit object-storage service for each storage_step of allocated quota."
+ },
+ "memory_per_step": {
+ "type": "integer",
+ "title": "Memory per step",
+ "description": "Memory granted to the implicit object-storage service for each storage_step of allocated quota, in MiB."
+ },
+ "max_cpu": {
+ "type": "number",
+ "format": "float",
+ "title": "Maximum CPU",
+ "description": "Upper bound on the CPU granted to the implicit object-storage service, regardless of the configured quota."
+ },
+ "max_memory": {
+ "type": "integer",
+ "title": "Maximum memory",
+ "description": "Upper bound on the memory granted to the implicit object-storage service, in MiB, regardless of the configured quota."
+ }
+ },
+ "required": [
+ "enabled",
+ "min_storage",
+ "max_storage",
+ "storage_step",
+ "cpu_per_step",
+ "memory_per_step",
+ "max_cpu",
+ "max_memory"
+ ],
+ "additionalProperties": false,
+ "title": "Object Storage",
+ "description": ""
+ },
+ "data_retention": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "If true, data retention configuration can be modified."
+ }
+ },
+ "required": [
+ "enabled"
+ ],
+ "additionalProperties": false,
+ "title": "Data Retention",
+ "description": ""
+ },
+ "autoscaling": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "If true, autoscaling can be configured."
+ },
+ "supports_horizontal_scaling_services": {
+ "type": "boolean",
+ "title": "Enable autoscaling for services",
+ "description": "Allow autoscaling to be configured for services (not just apps and workers)"
+ }
+ },
+ "required": [
+ "enabled",
+ "supports_horizontal_scaling_services"
+ ],
+ "additionalProperties": false,
+ "title": "Autoscaling",
+ "description": ""
+ },
+ "integrations": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "If true, integrations can be used"
+ },
+ "config": {
+ "type": "object",
+ "properties": {
+ "newrelic": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "The integration is enabled."
+ },
+ "role": {
+ "type": "string",
+ "title": "Role",
+ "description": "Minimum required role for creating the integration."
+ }
+ },
+ "additionalProperties": false,
+ "title": "New Relic",
+ "description": "New Relic log-forwarding integration configurations"
+ },
+ "sumologic": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "The integration is enabled."
+ },
+ "role": {
+ "type": "string",
+ "title": "Role",
+ "description": "Minimum required role for creating the integration."
+ }
+ },
+ "additionalProperties": false,
+ "title": "Sumo Logic",
+ "description": "Sumo Logic log-forwarding integration configurations"
+ },
+ "splunk": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "The integration is enabled."
+ },
+ "role": {
+ "type": "string",
+ "title": "Role",
+ "description": "Minimum required role for creating the integration."
+ }
+ },
+ "additionalProperties": false,
+ "title": "Splunk",
+ "description": "Splunk log-forwarding integration configurations"
+ },
+ "httplog": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "The integration is enabled."
+ },
+ "role": {
+ "type": "string",
+ "title": "Role",
+ "description": "Minimum required role for creating the integration."
+ }
+ },
+ "additionalProperties": false,
+ "title": "HTTP log-forwarding",
+ "description": "HTTP log-forwarding integration configurations"
+ },
+ "syslog": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "The integration is enabled."
+ },
+ "role": {
+ "type": "string",
+ "title": "Role",
+ "description": "Minimum required role for creating the integration."
+ }
+ },
+ "additionalProperties": false,
+ "title": "Syslog",
+ "description": "Syslog log-forwarding integration configurations"
+ },
+ "webhook": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "The integration is enabled."
+ },
+ "role": {
+ "type": "string",
+ "title": "Role",
+ "description": "Minimum required role for creating the integration."
+ }
+ },
+ "additionalProperties": false,
+ "title": "Webhook",
+ "description": "Webhook integration configurations"
+ },
+ "script": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "The integration is enabled."
+ },
+ "role": {
+ "type": "string",
+ "title": "Role",
+ "description": "Minimum required role for creating the integration."
+ }
+ },
+ "additionalProperties": false,
+ "title": "Script",
+ "description": "Script integration configurations"
+ },
+ "github": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "The integration is enabled."
+ },
+ "role": {
+ "type": "string",
+ "title": "Role",
+ "description": "Minimum required role for creating the integration."
+ }
+ },
+ "additionalProperties": false,
+ "title": "GitHub",
+ "description": "GitHub integration configurations"
+ },
+ "gitlab": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "The integration is enabled."
+ },
+ "role": {
+ "type": "string",
+ "title": "Role",
+ "description": "Minimum required role for creating the integration."
+ }
+ },
+ "additionalProperties": false,
+ "title": "GitLab",
+ "description": "GitLab integration configurations"
+ },
+ "bitbucket": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "The integration is enabled."
+ },
+ "role": {
+ "type": "string",
+ "title": "Role",
+ "description": "Minimum required role for creating the integration."
+ }
+ },
+ "additionalProperties": false,
+ "title": "Bitbucket",
+ "description": "Bitbucket integration configurations"
+ },
+ "bitbucket_server": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "The integration is enabled."
+ },
+ "role": {
+ "type": "string",
+ "title": "Role",
+ "description": "Minimum required role for creating the integration."
+ }
+ },
+ "additionalProperties": false,
+ "title": "Bitbucket Server",
+ "description": "Bitbucket server integration configurations"
+ },
+ "health.email": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "The integration is enabled."
+ },
+ "role": {
+ "type": "string",
+ "title": "Role",
+ "description": "Minimum required role for creating the integration."
+ }
+ },
+ "additionalProperties": false,
+ "title": "Health Email",
+ "description": "Health Email notification integration configurations"
+ },
+ "health.webhook": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "The integration is enabled."
+ },
+ "role": {
+ "type": "string",
+ "title": "Role",
+ "description": "Minimum required role for creating the integration."
+ }
+ },
+ "additionalProperties": false,
+ "title": "Health WebHook",
+ "description": "Health Webhook notification integration configurations"
+ },
+ "health.pagerduty": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "The integration is enabled."
+ },
+ "role": {
+ "type": "string",
+ "title": "Role",
+ "description": "Minimum required role for creating the integration."
+ }
+ },
+ "additionalProperties": false,
+ "title": "Health PagerDuty",
+ "description": "Health PagerDuty notification integration configurations"
+ },
+ "health.slack": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "The integration is enabled."
+ },
+ "role": {
+ "type": "string",
+ "title": "Role",
+ "description": "Minimum required role for creating the integration."
+ }
+ },
+ "additionalProperties": false,
+ "title": "Health Slack",
+ "description": "Health Slack notification integration configurations"
+ },
+ "cdn.fastly": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "The integration is enabled."
+ },
+ "role": {
+ "type": "string",
+ "title": "Role",
+ "description": "Minimum required role for creating the integration."
+ }
+ },
+ "additionalProperties": false,
+ "title": "Fastly CDN",
+ "description": "Fastly CDN integration configurations"
+ },
+ "blackfire": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "The integration is enabled."
+ },
+ "role": {
+ "type": "string",
+ "title": "Role",
+ "description": "Minimum required role for creating the integration."
+ }
+ },
+ "additionalProperties": false,
+ "title": "Blackfire",
+ "description": "Blackfire integration configurations"
+ },
+ "otlplog": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Enabled",
+ "description": "The integration is enabled."
+ },
+ "role": {
+ "type": "string",
+ "title": "Role",
+ "description": "Minimum required role for creating the integration."
+ }
+ },
+ "additionalProperties": false,
+ "title": "OpenTelemetry",
+ "description": "OpenTelemetry log-forwarding integration configurations"
+ }
+ },
+ "additionalProperties": false,
+ "title": "Config",
+ "description": ""
+ },
+ "allowed_integrations": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Allowed Integrations",
+ "description": "List of integrations allowed to be created"
+ }
+ },
+ "required": [
+ "enabled"
+ ],
+ "additionalProperties": false,
+ "title": "Integrations",
+ "description": ""
+ }
+ },
+ "required": [
+ "tasks",
+ "metrics",
+ "logs_forwarding",
+ "guaranteed_resources",
+ "images",
+ "instance_limit",
+ "build_resources",
+ "object_storage",
+ "data_retention",
+ "autoscaling"
+ ],
+ "additionalProperties": false
+ },
+ "ProjectSettings": {
+ "type": "object",
+ "properties": {
+ "initialize": {
+ "type": "object",
+ "title": "Initialization key",
+ "description": ""
+ },
+ "product_name": {
+ "type": "string",
+ "title": "Product Name",
+ "description": "The name of the product."
+ },
+ "product_code": {
+ "type": "string",
+ "title": "Product Code",
+ "description": "The lowercase ASCII code of the product."
+ },
+ "ui_uri_template": {
+ "type": "string",
+ "title": "UI URI Template",
+ "description": "The template of the project UI uri"
+ },
+ "variables_prefix": {
+ "type": "string",
+ "title": "Variables Prefix",
+ "description": "The prefix of the generated environment variables."
+ },
+ "bot_email": {
+ "type": "string",
+ "title": "Bot Email",
+ "description": "The email of the bot."
+ },
+ "application_config_file": {
+ "type": "string",
+ "title": "Application Config File",
+ "description": "The name of the application-specific configuration file."
+ },
+ "project_config_dir": {
+ "type": "string",
+ "title": "Project Config Directory",
+ "description": "The name of the project configuration directory."
+ },
+ "use_drupal_defaults": {
+ "type": "boolean",
+ "title": "Use Drupal Defaults",
+ "description": "Whether to use the default Drupal-centric configuration files when missing from the repository."
+ },
+ "use_legacy_subdomains": {
+ "type": "boolean",
+ "title": "Use Legacy Subdomains",
+ "description": "Whether to use legacy subdomain scheme, that replaces `.` by `---` in development subdomains."
+ },
+ "development_service_size": {
+ "type": "string",
+ "enum": [
+ "2XL",
+ "4XL",
+ "L",
+ "M",
+ "S",
+ "XL"
+ ],
+ "title": "Development Service Size",
+ "description": "The size of development services."
+ },
+ "development_application_size": {
+ "type": "string",
+ "enum": [
+ "2XL",
+ "4XL",
+ "L",
+ "M",
+ "S",
+ "XL"
+ ],
+ "title": "Development Application Size",
+ "description": "The size of development applications."
+ },
+ "enable_certificate_provisioning": {
+ "type": "boolean",
+ "title": "Enable Certificate Provisioning",
+ "description": "Enable automatic certificate provisioning."
+ },
+ "certificate_style": {
+ "type": "string",
+ "enum": [
+ "ecdsa",
+ "rsa"
+ ],
+ "title": "Certificate Style",
+ "description": ""
+ },
+ "certificate_renewal_activity": {
+ "type": "boolean",
+ "title": "Certificate Renewal Activity",
+ "description": "Create an activity for certificate renewal"
+ },
+ "development_domain_template": {
+ "type": "string",
+ "nullable": true,
+ "title": "Development Domain Template",
+ "description": "The template of the development domain, can include {project} and {environment} placeholders."
+ },
+ "enable_state_api_deployments": {
+ "type": "boolean",
+ "title": "Enable State API Deployments",
+ "description": "Enable the State API-driven deployments on regions that support them."
+ },
+ "temporary_disk_size": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Temporary Disk Size",
+ "description": "Set the size of the temporary disk (/tmp, in MB)."
+ },
+ "local_disk_size": {
+ "type": "integer",
+ "nullable": true,
+ "title": "Local Disk Size",
+ "description": "Set the size of the instance disk (in MB)."
+ },
+ "cron_minimum_interval": {
+ "type": "integer",
+ "title": "Minimum cron interval",
+ "description": "Minimum interval between cron runs (in minutes)"
+ },
+ "cron_maximum_jitter": {
+ "type": "integer",
+ "title": "Maximum cron jitter",
+ "description": "Maximum jitter inserted in cron runs (in minutes)"
+ },
+ "cron_production_expiry_interval": {
+ "type": "integer",
+ "title": "Cron Production Expiry Interval",
+ "description": "The interval (in days) for which cron activity and logs are kept around"
+ },
+ "cron_non_production_expiry_interval": {
+ "type": "integer",
+ "title": "Cron Non-Production Expiry Interval",
+ "description": "The interval (in days) for which cron activity and logs are kept around"
+ },
+ "concurrency_limits": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "integer",
+ "nullable": true
+ },
+ "title": "Concurrency Limits",
+ "description": "The concurrency limits applied to different kind of activities"
+ },
+ "flexible_build_cache": {
+ "type": "boolean",
+ "title": "Enable Flexible Build Cache",
+ "description": "Enable the flexible build cache implementation"
+ },
+ "strict_configuration": {
+ "type": "boolean",
+ "title": "Enable Strict Configuration",
+ "description": "Strict configuration validation."
+ },
+ "has_sleepy_crons": {
+ "type": "boolean",
+ "title": "Enable sleepy crons.",
+ "description": ""
+ },
+ "crons_in_git": {
+ "type": "boolean",
+ "title": "Enable crons from git.",
+ "description": ""
+ },
+ "custom_error_template": {
+ "type": "string",
+ "nullable": true,
+ "title": "Custom error template",
+ "description": "Custom error template for the router."
+ },
+ "app_error_page_template": {
+ "type": "string",
+ "nullable": true,
+ "title": "Application error template",
+ "description": "Custom error template for the application."
+ },
+ "environment_name_strategy": {
+ "type": "string",
+ "enum": [
+ "hash",
+ "name-and-hash"
+ ],
+ "title": "Environment Name Strategy",
+ "description": "The strategy used to generate environment machine names"
+ },
+ "data_retention": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "max_backups": {
+ "type": "integer",
+ "title": "Maximum Backups",
+ "description": "The maximum number of backups per environment"
+ },
+ "default_config": {
+ "type": "object",
+ "properties": {
+ "manual_count": {
+ "type": "integer",
+ "title": "Manual Count",
+ "description": "The number of manual backups to keep."
+ },
+ "schedule": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "interval": {
+ "type": "string",
+ "title": "Interval",
+ "description": "The policy interval specification."
+ },
+ "count": {
+ "type": "integer",
+ "title": "Count",
+ "description": "The number of backups to keep under this interval."
+ }
+ },
+ "required": [
+ "interval",
+ "count"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Schedule",
+ "description": "The backup schedule specification."
+ }
+ },
+ "required": [
+ "manual_count",
+ "schedule"
+ ],
+ "additionalProperties": false,
+ "title": "Default Config",
+ "description": "",
+ "x-stability": "EXPERIMENTAL"
+ }
+ },
+ "required": [
+ "max_backups",
+ "default_config"
+ ],
+ "additionalProperties": false
+ },
+ "nullable": true,
+ "title": "Data retention configuration",
+ "description": "Data retention configuration"
+ },
+ "enable_codesource_integration_push": {
+ "type": "boolean",
+ "title": "Enable pushing commits",
+ "description": "Enable pushing commits to codesource integration."
+ },
+ "enforce_mfa": {
+ "type": "boolean",
+ "title": "Enforce multi-factor authentication.",
+ "description": "Enforce multi-factor authentication."
+ },
+ "systemd": {
+ "type": "boolean",
+ "title": "Use systemd",
+ "description": "Use systemd images."
+ },
+ "router_gen2": {
+ "type": "boolean",
+ "title": "Router v2",
+ "description": "Use the router v2 image."
+ },
+ "build_resources": {
+ "type": "object",
+ "properties": {
+ "cpu": {
+ "type": "number",
+ "format": "float",
+ "title": "CPU",
+ "description": ""
+ },
+ "memory": {
+ "type": "integer",
+ "title": "Memory",
+ "description": ""
+ }
+ },
+ "required": [
+ "cpu",
+ "memory"
+ ],
+ "additionalProperties": false,
+ "title": "Build Resources",
+ "description": ""
+ },
+ "outbound_restrictions_default_policy": {
+ "type": "string",
+ "enum": [
+ "allow",
+ "deny"
+ ],
+ "title": "Outbound Restrictions Default Policy",
+ "description": "The default policy for firewall outbound restrictions"
+ },
+ "self_upgrade": {
+ "type": "boolean",
+ "title": "Self Upgrade",
+ "description": "Whether self-upgrades are enabled"
+ },
+ "self_upgrade_latest_major": {
+ "type": "boolean",
+ "title": "Whether to check for n+1 major version when self-upgrades are enabled",
+ "description": ""
+ },
+ "additional_hosts": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Additional Hosts",
+ "description": "A mapping of hostname to ip address to be added to the container's hosts file"
+ },
+ "max_allowed_routes": {
+ "type": "integer",
+ "title": "Maximum allowed routes",
+ "description": "Maximum number of routes allowed"
+ },
+ "max_allowed_redirects_paths": {
+ "type": "integer",
+ "title": "Maximum allowed redirect paths",
+ "description": "Maximum number of redirect paths allowed"
+ },
+ "enable_incremental_backups": {
+ "type": "boolean",
+ "title": "Enable incremental backups",
+ "description": "Enable incremental backups on regions that support them."
+ },
+ "sizing_api_enabled": {
+ "type": "boolean",
+ "title": "Enable sizing api",
+ "description": "Enable sizing api."
+ },
+ "enable_cache_grace_period": {
+ "type": "boolean",
+ "title": "Enable cache grace period",
+ "description": "Enable cache grace period."
+ },
+ "enable_zero_downtime_deployments": {
+ "type": "boolean",
+ "title": "Enable zero-downtime deployments",
+ "description": "Enable zero-downtime deployments for resource-only changes."
+ },
+ "enable_admin_agent": {
+ "type": "boolean",
+ "title": "Enable admin agent",
+ "description": ""
+ },
+ "certifier_url": {
+ "type": "string",
+ "title": "Certifier URL",
+ "description": "The certifier url"
+ },
+ "centralized_permissions": {
+ "type": "boolean",
+ "title": "Centralized Permissions",
+ "description": "Whether centralized permissions are enabled"
+ },
+ "glue_server_max_request_size": {
+ "type": "integer",
+ "title": "Glue Server Max Request Size",
+ "description": "Maximum size of request to glue-server (in MB)"
+ },
+ "persistent_endpoints_ssh": {
+ "type": "boolean",
+ "title": "Persistent Endpoints SSH",
+ "description": "Enable SSH access update with persistent endpoint"
+ },
+ "persistent_endpoints_ssl_certificates": {
+ "type": "boolean",
+ "title": "Persistent Endpoints SSL Certificates",
+ "description": "Enable SSL certificate update with persistent endpoint"
+ },
+ "enable_disk_health_monitoring": {
+ "type": "boolean",
+ "title": "Enable disk health monitoring",
+ "description": ""
+ },
+ "enable_paused_environments": {
+ "type": "boolean",
+ "title": "Enable paused environments",
+ "description": ""
+ },
+ "enable_unified_configuration": {
+ "type": "boolean",
+ "title": "Enable unified configuration files",
+ "description": ""
+ },
+ "enable_explicit_empty_routes": {
+ "type": "boolean",
+ "title": "Enable explicit empty routes",
+ "description": "When enabled, explicitly empty routes configuration (routes: or routes: {}) will result in no routes being generated instead of fallback routes."
+ },
+ "enable_routes_tracing": {
+ "type": "boolean",
+ "title": "Enable routes tracing",
+ "description": "Enable tracing support in routes"
+ },
+ "image_deployment_validation": {
+ "type": "boolean",
+ "title": "Image Deployment Validation",
+ "description": "Enable extended deployment validation by images"
+ },
+ "support_generic_images": {
+ "type": "boolean",
+ "title": "Support composable images",
+ "description": ""
+ },
+ "enable_github_app_token_exchange": {
+ "type": "boolean",
+ "title": "Enable GitHub App token exchange",
+ "description": "Enable fetching the GitHub App token from SIA."
+ },
+ "continuous_profiling": {
+ "type": "object",
+ "properties": {
+ "supported_runtimes": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Supported runtimes",
+ "description": "List of images supported for continuous profiling"
+ }
+ },
+ "required": [
+ "supported_runtimes"
+ ],
+ "additionalProperties": false,
+ "title": "Continuous profiling configuration",
+ "description": "The continuous profiling configuration"
+ },
+ "disable_agent_error_reporter": {
+ "type": "boolean",
+ "title": "Disable agent error reporter",
+ "description": ""
+ },
+ "requires_domain_ownership": {
+ "type": "boolean",
+ "title": "Require domain ownership",
+ "description": "Require ownership proof before domains are added to environments."
+ },
+ "enable_guaranteed_resources": {
+ "type": "boolean",
+ "title": "Enable guaranteed resources feature",
+ "description": "Enable guaranteed resources feature"
+ },
+ "git_server": {
+ "type": "object",
+ "properties": {
+ "push_size_hard_limit": {
+ "type": "integer",
+ "title": "Push Size Hard Limit",
+ "description": "Push Size Reject Limit"
+ }
+ },
+ "required": [
+ "push_size_hard_limit"
+ ],
+ "additionalProperties": false,
+ "title": "Git Server configuration",
+ "description": ""
+ },
+ "activity_logs_max_size": {
+ "type": "integer",
+ "title": "Activity Logs Max Size",
+ "description": "The maximum size of activity logs in bytes. This limit is applied on the pre-compressed log size."
+ },
+ "allow_manual_deployments": {
+ "type": "boolean",
+ "title": "Allow Manual Deployments",
+ "description": "If deployments can be manual, i.e. explicitly triggered by user"
+ },
+ "allow_rolling_deployments": {
+ "type": "boolean",
+ "title": "Allow Rolling Deployments",
+ "description": "If the project can use rolling deployments"
+ },
+ "maintenance_window": {
+ "type": "object",
+ "properties": {
+ "recurrence": {
+ "type": "object",
+ "properties": {
+ "interval": {
+ "type": "string",
+ "title": "Interval",
+ "description": "Interval in weeks, either 2w or 4w"
+ },
+ "day_of_week": {
+ "type": "integer",
+ "title": "Day of week",
+ "description": "Day of week, where Monday is 0"
+ },
+ "time": {
+ "type": "string",
+ "title": "Time",
+ "description": "Exact time in HH:MM format"
+ }
+ },
+ "required": [
+ "interval",
+ "day_of_week",
+ "time"
+ ],
+ "additionalProperties": false,
+ "title": "Recurrence",
+ "description": "Defines the recurring schedule for the maintenance window"
+ }
+ },
+ "required": [
+ "recurrence"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Maintenance window configuration",
+ "description": "Configuration for the maintenance window schedule"
+ },
+ "allow_activity_reschedule": {
+ "type": "boolean",
+ "title": "Allow activity reschedule",
+ "description": "Allow certain types of activities to be rescheduled"
+ },
+ "allow_burst": {
+ "type": "boolean",
+ "title": "Allow burst",
+ "description": ""
+ },
+ "router_resources": {
+ "type": "object",
+ "properties": {
+ "baseline_cpu": {
+ "type": "number",
+ "format": "float",
+ "title": "Baseline CPU",
+ "description": "Router baseline CPU for flex plan"
+ },
+ "baseline_memory": {
+ "type": "integer",
+ "title": "Baseline Memory",
+ "description": "Router baseline memory (MB) for flex plan"
+ },
+ "max_cpu": {
+ "type": "number",
+ "format": "float",
+ "title": "Max CPU",
+ "description": "Router max CPU for flex plan"
+ },
+ "max_memory": {
+ "type": "integer",
+ "title": "Max Memory",
+ "description": "Router max memory (MB) for flex plan"
+ }
+ },
+ "required": [
+ "baseline_cpu",
+ "baseline_memory",
+ "max_cpu",
+ "max_memory"
+ ],
+ "additionalProperties": false,
+ "title": "Router Resources",
+ "description": "Router resource settings for flex plan"
+ },
+ "allow_scaling_to_zero": {
+ "type": "boolean",
+ "title": "Allow scaling apps and workers without a relationship pointing to them to 0",
+ "description": ""
+ },
+ "save_applications_vendors": {
+ "type": "boolean",
+ "title": "Save Applications Vendors",
+ "description": "Save vendors.json files locally after builds for SBOM generation."
+ },
+ "locations_script_default": {
+ "type": "boolean",
+ "title": "Set the default for script execution in web locations",
+ "description": ""
+ },
+ "support_oci_images": {
+ "type": "boolean",
+ "title": "Support OCI images",
+ "description": ""
+ }
+ },
+ "required": [
+ "initialize",
+ "product_name",
+ "product_code",
+ "ui_uri_template",
+ "variables_prefix",
+ "bot_email",
+ "application_config_file",
+ "project_config_dir",
+ "use_drupal_defaults",
+ "use_legacy_subdomains",
+ "development_service_size",
+ "development_application_size",
+ "enable_certificate_provisioning",
+ "certificate_style",
+ "certificate_renewal_activity",
+ "development_domain_template",
+ "enable_state_api_deployments",
+ "temporary_disk_size",
+ "local_disk_size",
+ "cron_minimum_interval",
+ "cron_maximum_jitter",
+ "cron_production_expiry_interval",
+ "cron_non_production_expiry_interval",
+ "concurrency_limits",
+ "flexible_build_cache",
+ "strict_configuration",
+ "has_sleepy_crons",
+ "crons_in_git",
+ "custom_error_template",
+ "app_error_page_template",
+ "environment_name_strategy",
+ "data_retention",
+ "enable_codesource_integration_push",
+ "enforce_mfa",
+ "systemd",
+ "router_gen2",
+ "build_resources",
+ "outbound_restrictions_default_policy",
+ "self_upgrade",
+ "self_upgrade_latest_major",
+ "additional_hosts",
+ "max_allowed_routes",
+ "max_allowed_redirects_paths",
+ "enable_incremental_backups",
+ "sizing_api_enabled",
+ "enable_cache_grace_period",
+ "enable_zero_downtime_deployments",
+ "enable_admin_agent",
+ "certifier_url",
+ "centralized_permissions",
+ "glue_server_max_request_size",
+ "persistent_endpoints_ssh",
+ "persistent_endpoints_ssl_certificates",
+ "enable_disk_health_monitoring",
+ "enable_paused_environments",
+ "enable_unified_configuration",
+ "enable_explicit_empty_routes",
+ "enable_routes_tracing",
+ "image_deployment_validation",
+ "support_generic_images",
+ "enable_github_app_token_exchange",
+ "continuous_profiling",
+ "disable_agent_error_reporter",
+ "requires_domain_ownership",
+ "enable_guaranteed_resources",
+ "git_server",
+ "activity_logs_max_size",
+ "allow_manual_deployments",
+ "allow_rolling_deployments",
+ "maintenance_window",
+ "allow_activity_reschedule",
+ "allow_burst",
+ "router_resources",
+ "allow_scaling_to_zero",
+ "save_applications_vendors",
+ "locations_script_default",
+ "support_oci_images"
+ ],
+ "additionalProperties": false
+ },
+ "ProjectSettingsPatch": {
+ "type": "object",
+ "properties": {
+ "initialize": {
+ "type": "object",
+ "title": "Initialization key",
+ "description": ""
+ },
+ "data_retention": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "max_backups": {
+ "type": "integer",
+ "title": "Maximum Backups",
+ "description": "The maximum number of backups per environment"
+ },
+ "default_config": {
+ "type": "object",
+ "properties": {
+ "manual_count": {
+ "type": "integer",
+ "title": "Manual Count",
+ "description": "The number of manual backups to keep."
+ },
+ "schedule": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "interval": {
+ "type": "string",
+ "title": "Interval",
+ "description": "The policy interval specification."
+ },
+ "count": {
+ "type": "integer",
+ "title": "Count",
+ "description": "The number of backups to keep under this interval."
+ }
+ },
+ "required": [
+ "interval",
+ "count"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Schedule",
+ "description": "The backup schedule specification."
+ }
+ },
+ "additionalProperties": false,
+ "title": "Default Config",
+ "description": "",
+ "x-stability": "EXPERIMENTAL"
+ }
+ },
+ "required": [
+ "default_config"
+ ],
+ "additionalProperties": false
+ },
+ "nullable": true,
+ "title": "Data retention configuration",
+ "description": "Data retention configuration"
+ },
+ "build_resources": {
+ "type": "object",
+ "properties": {
+ "cpu": {
+ "type": "number",
+ "format": "float",
+ "title": "CPU",
+ "description": ""
+ },
+ "memory": {
+ "type": "integer",
+ "title": "Memory",
+ "description": ""
+ }
+ },
+ "additionalProperties": false,
+ "title": "Build Resources",
+ "description": ""
+ },
+ "maintenance_window": {
+ "type": "object",
+ "properties": {
+ "recurrence": {
+ "type": "object",
+ "properties": {
+ "interval": {
+ "type": "string",
+ "title": "Interval",
+ "description": "Interval in weeks, either 2w or 4w"
+ },
+ "day_of_week": {
+ "type": "integer",
+ "title": "Day of week",
+ "description": "Day of week, where Monday is 0"
+ },
+ "time": {
+ "type": "string",
+ "title": "Time",
+ "description": "Exact time in HH:MM format"
+ }
+ },
+ "required": [
+ "interval",
+ "day_of_week",
+ "time"
+ ],
+ "additionalProperties": false,
+ "title": "Recurrence",
+ "description": "Defines the recurring schedule for the maintenance window"
+ }
+ },
+ "required": [
+ "recurrence"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Maintenance window configuration",
+ "description": "Configuration for the maintenance window schedule"
+ }
+ },
+ "additionalProperties": false
+ },
+ "ProjectVariable": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "ProjectVariable Identifier",
+ "description": "The identifier of ProjectVariable"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "name": {
+ "type": "string",
+ "title": "Name",
+ "description": "Name of the variable"
+ },
+ "attributes": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Arbitrary attributes",
+ "description": "Arbitrary attributes attached to this resource"
+ },
+ "value": {
+ "type": "string",
+ "title": "Value",
+ "description": "Value of the variable"
+ },
+ "is_json": {
+ "type": "boolean",
+ "title": "Is JSON",
+ "description": "The variable is a JSON string"
+ },
+ "is_sensitive": {
+ "type": "boolean",
+ "title": "Is Sensitive",
+ "description": "The variable is sensitive"
+ },
+ "visible_build": {
+ "type": "boolean",
+ "title": "Visible during build",
+ "description": "The variable is visible during build"
+ },
+ "visible_runtime": {
+ "type": "boolean",
+ "title": "Visible at runtime",
+ "description": "The variable is visible at runtime"
+ },
+ "application_scope": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Application Scope",
+ "description": "Applications that have access to this variable"
+ }
+ },
+ "required": [
+ "id",
+ "created_at",
+ "updated_at",
+ "name",
+ "attributes",
+ "is_json",
+ "is_sensitive",
+ "visible_build",
+ "visible_runtime",
+ "application_scope"
+ ],
+ "additionalProperties": false
+ },
+ "ProjectVariableCollection": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ProjectVariable"
+ }
+ },
+ "ProjectVariableCreateInput": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "title": "Name",
+ "description": "Name of the variable"
+ },
+ "attributes": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Arbitrary attributes",
+ "description": "Arbitrary attributes attached to this resource"
+ },
+ "value": {
+ "type": "string",
+ "title": "Value",
+ "description": "Value of the variable"
+ },
+ "is_json": {
+ "type": "boolean",
+ "title": "Is JSON",
+ "description": "The variable is a JSON string"
+ },
+ "is_sensitive": {
+ "type": "boolean",
+ "title": "Is Sensitive",
+ "description": "The variable is sensitive"
+ },
+ "visible_build": {
+ "type": "boolean",
+ "title": "Visible during build",
+ "description": "The variable is visible during build"
+ },
+ "visible_runtime": {
+ "type": "boolean",
+ "title": "Visible at runtime",
+ "description": "The variable is visible at runtime"
+ },
+ "application_scope": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Application Scope",
+ "description": "Applications that have access to this variable"
+ }
+ },
+ "required": [
+ "name",
+ "value"
+ ],
+ "additionalProperties": false
+ },
+ "ProjectVariablePatch": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "title": "Name",
+ "description": "Name of the variable"
+ },
+ "attributes": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Arbitrary attributes",
+ "description": "Arbitrary attributes attached to this resource"
+ },
+ "value": {
+ "type": "string",
+ "title": "Value",
+ "description": "Value of the variable"
+ },
+ "is_json": {
+ "type": "boolean",
+ "title": "Is JSON",
+ "description": "The variable is a JSON string"
+ },
+ "is_sensitive": {
+ "type": "boolean",
+ "title": "Is Sensitive",
+ "description": "The variable is sensitive"
+ },
+ "visible_build": {
+ "type": "boolean",
+ "title": "Visible during build",
+ "description": "The variable is visible during build"
+ },
+ "visible_runtime": {
+ "type": "boolean",
+ "title": "Visible at runtime",
+ "description": "The variable is visible at runtime"
+ },
+ "application_scope": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Application Scope",
+ "description": "Applications that have access to this variable"
+ }
+ },
+ "additionalProperties": false
+ },
+ "ProxyRoute": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "ProxyRoute Identifier",
+ "description": "The identifier of ProxyRoute"
+ },
+ "primary": {
+ "type": "boolean",
+ "nullable": true,
+ "title": "Is primary",
+ "description": "This route is the primary route of the environment"
+ },
+ "production_url": {
+ "type": "string",
+ "nullable": true,
+ "title": "Production URL",
+ "description": "How this URL route would look on production environment"
+ },
+ "attributes": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Arbitrary attributes",
+ "description": "Arbitrary attributes attached to this resource"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "proxy",
+ "redirect",
+ "upstream"
+ ],
+ "title": "Route type",
+ "description": "Route type"
+ },
+ "tls": {
+ "type": "object",
+ "properties": {
+ "strict_transport_security": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "nullable": true,
+ "title": "Is enabled",
+ "description": "Whether strict transport security is enabled or not"
+ },
+ "include_subdomains": {
+ "type": "boolean",
+ "nullable": true,
+ "title": "Is subdomains included",
+ "description": "Whether the strict transport security policy should include all subdomains"
+ },
+ "preload": {
+ "type": "boolean",
+ "nullable": true,
+ "title": "Is strict transport security preloaded",
+ "description": "Whether the strict transport security policy should be preloaded in browsers"
+ }
+ },
+ "required": [
+ "enabled",
+ "include_subdomains",
+ "preload"
+ ],
+ "additionalProperties": false,
+ "title": "Strict-Transport-Security options.",
+ "description": ""
+ },
+ "min_version": {
+ "type": "string",
+ "enum": [
+ "TLSv1.0",
+ "TLSv1.1",
+ "TLSv1.2",
+ "TLSv1.3"
+ ],
+ "nullable": true,
+ "title": "Minimum TLS version",
+ "description": "The minimum TLS version to support."
+ },
+ "client_authentication": {
+ "type": "string",
+ "enum": [
+ "request",
+ "require"
+ ],
+ "nullable": true,
+ "title": "Client authentication",
+ "description": "The type of client authentication to request."
+ },
+ "client_certificate_authorities": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Client certificate authorities",
+ "description": "Certificate authorities to validate the client certificate against. If not specified, a default set of trusted CAs will be used."
+ }
+ },
+ "required": [
+ "strict_transport_security",
+ "min_version",
+ "client_authentication",
+ "client_certificate_authorities"
+ ],
+ "additionalProperties": false,
+ "title": "TLS settings",
+ "description": "TLS settings for the route"
+ },
+ "to": {
+ "type": "string",
+ "title": "Proxy destination",
+ "description": "The destination of the proxy"
+ }
+ },
+ "required": [
+ "primary",
+ "id",
+ "production_url",
+ "attributes",
+ "type",
+ "tls",
+ "to"
+ ],
+ "additionalProperties": false
+ },
+ "RedirectRoute": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "RedirectRoute Identifier",
+ "description": "The identifier of RedirectRoute"
+ },
+ "primary": {
+ "type": "boolean",
+ "nullable": true,
+ "title": "Is primary",
+ "description": "This route is the primary route of the environment"
+ },
+ "production_url": {
+ "type": "string",
+ "nullable": true,
+ "title": "Production URL",
+ "description": "How this URL route would look on production environment"
+ },
+ "attributes": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Arbitrary attributes",
+ "description": "Arbitrary attributes attached to this resource"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "proxy",
+ "redirect",
+ "upstream"
+ ],
+ "title": "Route type",
+ "description": "Route type"
+ },
+ "tls": {
+ "type": "object",
+ "properties": {
+ "strict_transport_security": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "nullable": true,
+ "title": "Is enabled",
+ "description": "Whether strict transport security is enabled or not"
+ },
+ "include_subdomains": {
+ "type": "boolean",
+ "nullable": true,
+ "title": "Is subdomains included",
+ "description": "Whether the strict transport security policy should include all subdomains"
+ },
+ "preload": {
+ "type": "boolean",
+ "nullable": true,
+ "title": "Is strict transport security preloaded",
+ "description": "Whether the strict transport security policy should be preloaded in browsers"
+ }
+ },
+ "required": [
+ "enabled",
+ "include_subdomains",
+ "preload"
+ ],
+ "additionalProperties": false,
+ "title": "Strict-Transport-Security options.",
+ "description": ""
+ },
+ "min_version": {
+ "type": "string",
+ "enum": [
+ "TLSv1.0",
+ "TLSv1.1",
+ "TLSv1.2",
+ "TLSv1.3"
+ ],
+ "nullable": true,
+ "title": "Minimum TLS version",
+ "description": "The minimum TLS version to support."
+ },
+ "client_authentication": {
+ "type": "string",
+ "enum": [
+ "request",
+ "require"
+ ],
+ "nullable": true,
+ "title": "Client authentication",
+ "description": "The type of client authentication to request."
+ },
+ "client_certificate_authorities": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Client certificate authorities",
+ "description": "Certificate authorities to validate the client certificate against. If not specified, a default set of trusted CAs will be used."
+ }
+ },
+ "required": [
+ "strict_transport_security",
+ "min_version",
+ "client_authentication",
+ "client_certificate_authorities"
+ ],
+ "additionalProperties": false,
+ "title": "TLS settings",
+ "description": "TLS settings for the route"
+ },
+ "to": {
+ "type": "string",
+ "title": "Redirect destination",
+ "description": "The destination of the proxy"
+ },
+ "redirects": {
+ "type": "object",
+ "properties": {
+ "expires": {
+ "type": "string",
+ "title": "Expires",
+ "description": "The amount of time, in seconds, to cache the redirects"
+ },
+ "paths": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "regexp": {
+ "type": "boolean",
+ "title": "Is regexp",
+ "description": "Whether the path is a regular expression."
+ },
+ "to": {
+ "type": "string",
+ "title": "Redirect URL",
+ "description": "The URL to redirect to."
+ },
+ "prefix": {
+ "type": "boolean",
+ "nullable": true,
+ "title": "Is prefix",
+ "description": "Whether to redirect all the paths that start with the path."
+ },
+ "append_suffix": {
+ "type": "boolean",
+ "nullable": true,
+ "title": "Append suffix",
+ "description": "Whether to append the incoming suffix to the redirected URL."
+ },
+ "code": {
+ "type": "integer",
+ "enum": [
+ 301,
+ 302,
+ 307,
+ 308
+ ],
+ "title": "Redirect code",
+ "description": "The redirect code to use."
+ },
+ "expires": {
+ "type": "string",
+ "nullable": true,
+ "title": "Expires",
+ "description": "The amount of time, in seconds, to cache the redirects."
+ }
+ },
+ "required": [
+ "regexp",
+ "to",
+ "prefix",
+ "append_suffix",
+ "code",
+ "expires"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Path",
+ "description": "The paths to redirect"
+ }
+ },
+ "required": [
+ "expires",
+ "paths"
+ ],
+ "additionalProperties": false,
+ "title": "Redirect configuration",
+ "description": "The configuration of the redirects"
+ }
+ },
+ "required": [
+ "primary",
+ "id",
+ "production_url",
+ "attributes",
+ "type",
+ "tls",
+ "to",
+ "redirects"
+ ],
+ "additionalProperties": false
+ },
+ "Ref": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "Ref Identifier",
+ "description": "The identifier of Ref"
+ },
+ "ref": {
+ "type": "string",
+ "title": "Name",
+ "description": "The name of the reference"
+ },
+ "object": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Type",
+ "description": "The type of object pointed to"
+ },
+ "sha": {
+ "type": "string",
+ "title": "The SHA of the object pointed to",
+ "description": ""
+ }
+ },
+ "required": [
+ "type",
+ "sha"
+ ],
+ "additionalProperties": false,
+ "title": "Object",
+ "description": "The object the reference points to"
+ },
+ "sha": {
+ "type": "string",
+ "title": "SHA",
+ "description": "The commit sha of the ref"
+ }
+ },
+ "required": [
+ "id",
+ "ref",
+ "object",
+ "sha"
+ ],
+ "additionalProperties": false
+ },
+ "RefCollection": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Ref"
+ }
+ },
+ "ReplacementDomainStorage": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "ReplacementDomainStorage Identifier",
+ "description": "The identifier of ReplacementDomainStorage"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "type": {
+ "type": "string",
+ "title": "Type",
+ "description": "Domain type"
+ },
+ "project": {
+ "type": "string",
+ "title": "Project name",
+ "description": "The name of the project"
+ },
+ "name": {
+ "type": "string",
+ "title": "Domain name",
+ "description": "The domain name"
+ },
+ "registered_name": {
+ "type": "string",
+ "title": "Claimed domain name",
+ "description": "The claimed domain name"
+ },
+ "attributes": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Arbitrary attributes",
+ "description": "Arbitrary attributes attached to this resource"
+ },
+ "replacement_for": {
+ "type": "string",
+ "title": "Replacement For",
+ "description": "Prod domain which will be replaced by this domain"
+ }
+ },
+ "required": [
+ "created_at",
+ "updated_at",
+ "type",
+ "name",
+ "attributes"
+ ],
+ "additionalProperties": false
+ },
+ "ReplacementDomainStorageCreateInput": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "title": "Domain name",
+ "description": "The domain name"
+ },
+ "attributes": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Arbitrary attributes",
+ "description": "Arbitrary attributes attached to this resource"
+ },
+ "replacement_for": {
+ "type": "string",
+ "title": "Replacement For",
+ "description": "Prod domain which will be replaced by this domain"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ "ReplacementDomainStoragePatch": {
+ "type": "object",
+ "properties": {
+ "attributes": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Arbitrary attributes",
+ "description": "Arbitrary attributes attached to this resource"
+ }
+ },
+ "additionalProperties": false
+ },
+ "Route": {
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/ProxyRoute"
+ },
+ {
+ "$ref": "#/components/schemas/RedirectRoute"
+ },
+ {
+ "$ref": "#/components/schemas/UpstreamRoute"
+ }
+ ]
+ },
+ "RouteCollection": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Route"
+ }
+ },
+ "ScriptIntegration": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "ScriptIntegration Identifier",
+ "description": "The identifier of ScriptIntegration"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "role": {
+ "type": "string",
+ "title": "Integration role",
+ "description": "The role of the integration"
+ },
+ "events": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Events",
+ "description": "Events to execute the hook on"
+ },
+ "environments": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Environments",
+ "description": "The environments to execute the hook on"
+ },
+ "excluded_environments": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Environments",
+ "description": "The environments to not execute the hook on"
+ },
+ "states": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "States",
+ "description": "Events to execute the hook on"
+ },
+ "result": {
+ "type": "string",
+ "enum": [
+ "*",
+ "failure",
+ "success"
+ ],
+ "title": "Result",
+ "description": "Result to execute the hook on"
+ },
+ "script": {
+ "type": "string",
+ "title": "script",
+ "description": "The script to run"
+ }
+ },
+ "required": [
+ "created_at",
+ "updated_at",
+ "type",
+ "role",
+ "events",
+ "environments",
+ "excluded_environments",
+ "states",
+ "result",
+ "script"
+ ],
+ "additionalProperties": false
+ },
+ "ScriptIntegrationCreateInput": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "events": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Events",
+ "description": "Events to execute the hook on"
+ },
+ "environments": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Environments",
+ "description": "The environments to execute the hook on"
+ },
+ "excluded_environments": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Environments",
+ "description": "The environments to not execute the hook on"
+ },
+ "states": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "States",
+ "description": "Events to execute the hook on"
+ },
+ "result": {
+ "type": "string",
+ "enum": [
+ "*",
+ "failure",
+ "success"
+ ],
+ "title": "Result",
+ "description": "Result to execute the hook on"
+ },
+ "script": {
+ "type": "string",
+ "title": "script",
+ "description": "The script to run"
+ }
+ },
+ "required": [
+ "type",
+ "script"
+ ],
+ "additionalProperties": false
+ },
+ "ScriptIntegrationPatch": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "events": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Events",
+ "description": "Events to execute the hook on"
+ },
+ "environments": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Environments",
+ "description": "The environments to execute the hook on"
+ },
+ "excluded_environments": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Environments",
+ "description": "The environments to not execute the hook on"
+ },
+ "states": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "States",
+ "description": "Events to execute the hook on"
+ },
+ "result": {
+ "type": "string",
+ "enum": [
+ "*",
+ "failure",
+ "success"
+ ],
+ "title": "Result",
+ "description": "Result to execute the hook on"
+ },
+ "script": {
+ "type": "string",
+ "title": "script",
+ "description": "The script to run"
+ }
+ },
+ "required": [
+ "type",
+ "script"
+ ],
+ "additionalProperties": false
+ },
+ "SlackIntegration": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "SlackIntegration Identifier",
+ "description": "The identifier of SlackIntegration"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "role": {
+ "type": "string",
+ "title": "Integration role",
+ "description": "The role of the integration"
+ },
+ "channel": {
+ "type": "string",
+ "title": "Slack Channel",
+ "description": "The Slack channel to post messages to"
+ }
+ },
+ "required": [
+ "created_at",
+ "updated_at",
+ "type",
+ "role",
+ "channel"
+ ],
+ "additionalProperties": false
+ },
+ "SlackIntegrationCreateInput": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "token": {
+ "type": "string",
+ "title": "Slack Token",
+ "description": "The Slack token to use"
+ },
+ "channel": {
+ "type": "string",
+ "title": "Slack Channel",
+ "description": "The Slack channel to post messages to"
+ }
+ },
+ "required": [
+ "type",
+ "token",
+ "channel"
+ ],
+ "additionalProperties": false
+ },
+ "SlackIntegrationPatch": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "token": {
+ "type": "string",
+ "title": "Slack Token",
+ "description": "The Slack token to use"
+ },
+ "channel": {
+ "type": "string",
+ "title": "Slack Channel",
+ "description": "The Slack channel to post messages to"
+ }
+ },
+ "required": [
+ "type",
+ "token",
+ "channel"
+ ],
+ "additionalProperties": false
+ },
+ "SplunkIntegration": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "SplunkIntegration Identifier",
+ "description": "The identifier of SplunkIntegration"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "role": {
+ "type": "string",
+ "title": "Integration role",
+ "description": "The role of the integration"
+ },
+ "extra": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Extra",
+ "description": "Arbitrary key/value pairs to include with forwarded logs"
+ },
+ "url": {
+ "type": "string",
+ "title": "URL",
+ "description": "The Splunk HTTP Event Connector REST API endpoint"
+ },
+ "index": {
+ "type": "string",
+ "title": "Index",
+ "description": "The Splunk Index"
+ },
+ "sourcetype": {
+ "type": "string",
+ "title": "Sourcetype",
+ "description": "The event 'sourcetype'"
+ },
+ "tls_verify": {
+ "type": "boolean",
+ "title": "TLS Verify",
+ "description": "Enable/Disable HTTPS certificate verification"
+ },
+ "excluded_services": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Services",
+ "description": "Comma separated list of service and application names to exclude from logging"
+ }
+ },
+ "required": [
+ "created_at",
+ "updated_at",
+ "type",
+ "role",
+ "extra",
+ "url",
+ "index",
+ "sourcetype",
+ "tls_verify",
+ "excluded_services"
+ ],
+ "additionalProperties": false
+ },
+ "SplunkIntegrationCreateInput": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "extra": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Extra",
+ "description": "Arbitrary key/value pairs to include with forwarded logs"
+ },
+ "url": {
+ "type": "string",
+ "title": "URL",
+ "description": "The Splunk HTTP Event Connector REST API endpoint"
+ },
+ "index": {
+ "type": "string",
+ "title": "Index",
+ "description": "The Splunk Index"
+ },
+ "token": {
+ "type": "string",
+ "title": "Authorization Token",
+ "description": "The Splunk Authorization Token"
+ },
+ "sourcetype": {
+ "type": "string",
+ "title": "Sourcetype",
+ "description": "The event 'sourcetype'"
+ },
+ "tls_verify": {
+ "type": "boolean",
+ "title": "TLS Verify",
+ "description": "Enable/Disable HTTPS certificate verification"
+ },
+ "excluded_services": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Services",
+ "description": "Comma separated list of service and application names to exclude from logging"
+ }
+ },
+ "required": [
+ "type",
+ "url",
+ "index",
+ "token"
+ ],
+ "additionalProperties": false
+ },
+ "SplunkIntegrationPatch": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "extra": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Extra",
+ "description": "Arbitrary key/value pairs to include with forwarded logs"
+ },
+ "url": {
+ "type": "string",
+ "title": "URL",
+ "description": "The Splunk HTTP Event Connector REST API endpoint"
+ },
+ "index": {
+ "type": "string",
+ "title": "Index",
+ "description": "The Splunk Index"
+ },
+ "token": {
+ "type": "string",
+ "title": "Authorization Token",
+ "description": "The Splunk Authorization Token"
+ },
+ "sourcetype": {
+ "type": "string",
+ "title": "Sourcetype",
+ "description": "The event 'sourcetype'"
+ },
+ "tls_verify": {
+ "type": "boolean",
+ "title": "TLS Verify",
+ "description": "Enable/Disable HTTPS certificate verification"
+ },
+ "excluded_services": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Services",
+ "description": "Comma separated list of service and application names to exclude from logging"
+ }
+ },
+ "required": [
+ "type",
+ "url",
+ "index",
+ "token"
+ ],
+ "additionalProperties": false
+ },
+ "SumologicIntegration": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "SumologicIntegration Identifier",
+ "description": "The identifier of SumologicIntegration"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "role": {
+ "type": "string",
+ "title": "Integration role",
+ "description": "The role of the integration"
+ },
+ "extra": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Extra",
+ "description": "Arbitrary key/value pairs to include with forwarded logs"
+ },
+ "url": {
+ "type": "string",
+ "title": "Sumologic HTTPS endpoint",
+ "description": "The Sumologic HTTPS endpoint"
+ },
+ "category": {
+ "type": "string",
+ "title": "Category",
+ "description": "The Category used to easy filtering (sent as X-Sumo-Category header)"
+ },
+ "tls_verify": {
+ "type": "boolean",
+ "title": "TLS Verify",
+ "description": "Enable/Disable HTTPS certificate verification"
+ },
+ "excluded_services": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Services",
+ "description": "Comma separated list of service and application names to exclude from logging"
+ }
+ },
+ "required": [
+ "created_at",
+ "updated_at",
+ "type",
+ "role",
+ "extra",
+ "url",
+ "category",
+ "tls_verify",
+ "excluded_services"
+ ],
+ "additionalProperties": false
+ },
+ "SumologicIntegrationCreateInput": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "extra": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Extra",
+ "description": "Arbitrary key/value pairs to include with forwarded logs"
+ },
+ "url": {
+ "type": "string",
+ "title": "Sumologic HTTPS endpoint",
+ "description": "The Sumologic HTTPS endpoint"
+ },
+ "category": {
+ "type": "string",
+ "title": "Category",
+ "description": "The Category used to easy filtering (sent as X-Sumo-Category header)"
+ },
+ "tls_verify": {
+ "type": "boolean",
+ "title": "TLS Verify",
+ "description": "Enable/Disable HTTPS certificate verification"
+ },
+ "excluded_services": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Services",
+ "description": "Comma separated list of service and application names to exclude from logging"
+ }
+ },
+ "required": [
+ "type",
+ "url"
+ ],
+ "additionalProperties": false
+ },
+ "SumologicIntegrationPatch": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "extra": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Extra",
+ "description": "Arbitrary key/value pairs to include with forwarded logs"
+ },
+ "url": {
+ "type": "string",
+ "title": "Sumologic HTTPS endpoint",
+ "description": "The Sumologic HTTPS endpoint"
+ },
+ "category": {
+ "type": "string",
+ "title": "Category",
+ "description": "The Category used to easy filtering (sent as X-Sumo-Category header)"
+ },
+ "tls_verify": {
+ "type": "boolean",
+ "title": "TLS Verify",
+ "description": "Enable/Disable HTTPS certificate verification"
+ },
+ "excluded_services": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Services",
+ "description": "Comma separated list of service and application names to exclude from logging"
+ }
+ },
+ "required": [
+ "type",
+ "url"
+ ],
+ "additionalProperties": false
+ },
+ "SyslogIntegration": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "SyslogIntegration Identifier",
+ "description": "The identifier of SyslogIntegration"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "role": {
+ "type": "string",
+ "title": "Integration role",
+ "description": "The role of the integration"
+ },
+ "extra": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Extra",
+ "description": "Arbitrary key/value pairs to include with forwarded logs"
+ },
+ "host": {
+ "type": "string",
+ "title": "Host",
+ "description": "Syslog relay/collector host"
+ },
+ "port": {
+ "type": "integer",
+ "title": "Port",
+ "description": "Syslog relay/collector port"
+ },
+ "protocol": {
+ "type": "string",
+ "enum": [
+ "tcp",
+ "tls",
+ "udp"
+ ],
+ "title": "Protocol",
+ "description": "Transport protocol"
+ },
+ "facility": {
+ "type": "integer",
+ "title": "Facility",
+ "description": "Syslog facility"
+ },
+ "message_format": {
+ "type": "string",
+ "enum": [
+ "rfc3164",
+ "rfc5424"
+ ],
+ "title": "Message format",
+ "description": "Syslog message format"
+ },
+ "tls_verify": {
+ "type": "boolean",
+ "title": "TLS Verify",
+ "description": "Enable/Disable HTTPS certificate verification"
+ },
+ "excluded_services": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Services",
+ "description": "Comma separated list of service and application names to exclude from logging"
+ }
+ },
+ "required": [
+ "created_at",
+ "updated_at",
+ "type",
+ "role",
+ "extra",
+ "host",
+ "port",
+ "protocol",
+ "facility",
+ "message_format",
+ "tls_verify",
+ "excluded_services"
+ ],
+ "additionalProperties": false
+ },
+ "SyslogIntegrationCreateInput": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "extra": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Extra",
+ "description": "Arbitrary key/value pairs to include with forwarded logs"
+ },
+ "host": {
+ "type": "string",
+ "title": "Host",
+ "description": "Syslog relay/collector host"
+ },
+ "port": {
+ "type": "integer",
+ "title": "Port",
+ "description": "Syslog relay/collector port"
+ },
+ "protocol": {
+ "type": "string",
+ "enum": [
+ "tcp",
+ "tls",
+ "udp"
+ ],
+ "title": "Protocol",
+ "description": "Transport protocol"
+ },
+ "facility": {
+ "type": "integer",
+ "title": "Facility",
+ "description": "Syslog facility"
+ },
+ "message_format": {
+ "type": "string",
+ "enum": [
+ "rfc3164",
+ "rfc5424"
+ ],
+ "title": "Message format",
+ "description": "Syslog message format"
+ },
+ "auth_token": {
+ "type": "string",
+ "title": "Authentication token",
+ "description": ""
+ },
+ "auth_mode": {
+ "type": "string",
+ "enum": [
+ "prefix",
+ "structured_data"
+ ],
+ "title": "Authentication mode",
+ "description": ""
+ },
+ "tls_verify": {
+ "type": "boolean",
+ "title": "TLS Verify",
+ "description": "Enable/Disable HTTPS certificate verification"
+ },
+ "excluded_services": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Services",
+ "description": "Comma separated list of service and application names to exclude from logging"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "SyslogIntegrationPatch": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "extra": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Extra",
+ "description": "Arbitrary key/value pairs to include with forwarded logs"
+ },
+ "host": {
+ "type": "string",
+ "title": "Host",
+ "description": "Syslog relay/collector host"
+ },
+ "port": {
+ "type": "integer",
+ "title": "Port",
+ "description": "Syslog relay/collector port"
+ },
+ "protocol": {
+ "type": "string",
+ "enum": [
+ "tcp",
+ "tls",
+ "udp"
+ ],
+ "title": "Protocol",
+ "description": "Transport protocol"
+ },
+ "facility": {
+ "type": "integer",
+ "title": "Facility",
+ "description": "Syslog facility"
+ },
+ "message_format": {
+ "type": "string",
+ "enum": [
+ "rfc3164",
+ "rfc5424"
+ ],
+ "title": "Message format",
+ "description": "Syslog message format"
+ },
+ "auth_token": {
+ "type": "string",
+ "title": "Authentication token",
+ "description": ""
+ },
+ "auth_mode": {
+ "type": "string",
+ "enum": [
+ "prefix",
+ "structured_data"
+ ],
+ "title": "Authentication mode",
+ "description": ""
+ },
+ "tls_verify": {
+ "type": "boolean",
+ "title": "TLS Verify",
+ "description": "Enable/Disable HTTPS certificate verification"
+ },
+ "excluded_services": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Services",
+ "description": "Comma separated list of service and application names to exclude from logging"
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "additionalProperties": false
+ },
+ "SystemInformation": {
+ "type": "object",
+ "properties": {
+ "version": {
+ "type": "string",
+ "title": "Version",
+ "description": "The version of this project server"
+ },
+ "image": {
+ "type": "string",
+ "title": "Image",
+ "description": "The image version of the project server"
+ },
+ "started_at": {
+ "type": "string",
+ "format": "date-time",
+ "title": "Started At",
+ "description": ""
+ }
+ },
+ "required": [
+ "version",
+ "image",
+ "started_at"
+ ],
+ "additionalProperties": false
+ },
+ "Task": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "Task Identifier",
+ "description": "The identifier of Task"
+ },
+ "resources": {
+ "type": "object",
+ "properties": {
+ "base_memory": {
+ "type": "integer",
+ "title": "Base memory",
+ "description": "The base memory for the container"
+ },
+ "memory_ratio": {
+ "type": "integer",
+ "title": "Memory ratio",
+ "description": "The amount of memory to allocate per units of CPU"
+ }
+ },
+ "required": [
+ "base_memory",
+ "memory_ratio"
+ ],
+ "additionalProperties": false,
+ "nullable": true,
+ "title": "Resources",
+ "description": "Resources configuration (base memory and memory ratio)"
+ },
+ "authorizations": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "env",
+ "task"
+ ],
+ "title": "Authorization Type",
+ "description": "The resource type for this authorization."
+ },
+ "action": {
+ "type": "string",
+ "title": "Authorization Action",
+ "description": "The action to authorize on the target resource."
+ },
+ "resource": {
+ "type": "string",
+ "nullable": true,
+ "title": "Authorization Resource",
+ "description": "The target resource for this authorization."
+ }
+ },
+ "required": [
+ "type",
+ "action",
+ "resource"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Authorizations",
+ "description": "Authorizations available to this container"
+ },
+ "relationships": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "service": {
+ "type": "string",
+ "nullable": true,
+ "title": "Service Name",
+ "description": "The name of the service."
+ },
+ "endpoint": {
+ "type": "string",
+ "nullable": true,
+ "title": "Endpoint Name",
+ "description": "The name of the endpoint on the service."
+ }
+ },
+ "required": [
+ "service",
+ "endpoint"
+ ],
+ "additionalProperties": false,
+ "nullable": true
+ },
+ "title": "Service Relationships",
+ "description": "The relationships of the container to defined services"
+ },
+ "additional_hosts": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Additional hosts",
+ "description": "A mapping of hostname to ip address to be added to the container's hosts file"
+ },
+ "mounts": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "source": {
+ "type": "string",
+ "enum": [
+ "instance",
+ "local",
+ "service",
+ "storage",
+ "temporary",
+ "tmp"
+ ],
+ "title": "Mount type",
+ "description": "The type of mount that will provide the data."
+ },
+ "source_path": {
+ "type": "string",
+ "title": "Source Path",
+ "description": "The path to be mounted, relative to the root directory of the volume that's being mounted from."
+ },
+ "service": {
+ "type": "string",
+ "nullable": true,
+ "title": "Service Name",
+ "description": "The name of the service that the volume will be mounted from. Must be a service in `services.yaml` of type `network-storage`."
+ }
+ },
+ "required": [
+ "source",
+ "source_path"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Mounts",
+ "description": "Filesystem mounts of this container. If not specified the container will have no writeable disk space"
+ },
+ "timezone": {
+ "type": "string",
+ "nullable": true,
+ "title": "Timezone",
+ "description": "The timezone of the task. Defaults to the project's timezone if not specified"
+ },
+ "variables": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "additionalProperties": {}
+ },
+ "title": "Environment Variables",
+ "description": "Variables provide environment-sensitive information to control how this container behaves. To set a Unix environment variable, specify a key of `env:`, and then each sub-item of that is a key/value pair that will be injected into the environment"
+ },
+ "container_profile": {
+ "type": "string",
+ "nullable": true,
+ "title": "Container Profile",
+ "description": "Selected container profile for this container"
+ },
+ "type": {
+ "type": "string",
+ "title": "Image type",
+ "description": "The runtime type and version for the task (e.g., python:3.8)"
+ },
+ "source": {
+ "type": "object",
+ "properties": {
+ "root": {
+ "type": "string",
+ "title": "Task Source Root",
+ "description": "The root of the task relative to the repository root"
+ }
+ },
+ "required": [
+ "root"
+ ],
+ "additionalProperties": false,
+ "title": "Source Code Configuration",
+ "description": "Configuration related to the source code of the task"
+ },
+ "hooks": {
+ "type": "object",
+ "properties": {
+ "build": {
+ "type": "string",
+ "nullable": true,
+ "title": "Build Hook",
+ "description": "Hook executed after the build process"
+ },
+ "deploy": {
+ "type": "string",
+ "nullable": true,
+ "title": "Deploy Hook",
+ "description": "Hook executed before the task's run command"
+ }
+ },
+ "required": [
+ "build",
+ "deploy"
+ ],
+ "additionalProperties": false,
+ "title": "Hooks",
+ "description": "Scripts executed at various points in the lifecycle of the task"
+ },
+ "dependencies": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object"
+ },
+ "title": "Dependencies",
+ "description": "External global dependencies of this task. They will be downloaded by the language's package manager"
+ },
+ "runtime": {
+ "type": "object",
+ "title": "Runtime Configuration",
+ "description": "Runtime-specific configuration"
+ },
+ "run": {
+ "type": "object",
+ "properties": {
+ "command": {
+ "type": "string",
+ "title": "Run Command",
+ "description": "The command to execute when running the task"
+ },
+ "timeout": {
+ "type": "integer",
+ "title": "Timeout",
+ "description": "The maximum timeout in seconds after which the task will be forcefully killed"
+ }
+ },
+ "required": [
+ "command",
+ "timeout"
+ ],
+ "additionalProperties": false,
+ "title": "Run Configuration",
+ "description": "Configuration for task execution"
+ },
+ "name": {
+ "type": "string",
+ "title": "Task name",
+ "description": "The unique name of the task"
+ }
+ },
+ "required": [
+ "id",
+ "resources",
+ "authorizations",
+ "relationships",
+ "additional_hosts",
+ "mounts",
+ "timezone",
+ "variables",
+ "container_profile",
+ "type",
+ "source",
+ "hooks",
+ "dependencies",
+ "runtime",
+ "run",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ "TaskCollection": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Task"
+ }
+ },
+ "TaskTriggerInput": {
+ "type": "object",
+ "properties": {
+ "variables": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "additionalProperties": {}
+ },
+ "title": "Variables",
+ "description": "Environment variables for the task"
+ }
+ },
+ "additionalProperties": false
+ },
+ "Tree": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "Tree Identifier",
+ "description": "The identifier of Tree"
+ },
+ "sha": {
+ "type": "string",
+ "title": "SHA",
+ "description": "The identifier of the tree"
+ },
+ "tree": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "path": {
+ "type": "string",
+ "title": "Item path",
+ "description": "The path of the item"
+ },
+ "mode": {
+ "type": "string",
+ "enum": [
+ "040000",
+ "100644",
+ "100755",
+ "120000",
+ "160000"
+ ],
+ "title": "Item mode",
+ "description": "The mode of the item"
+ },
+ "type": {
+ "type": "string",
+ "title": "Item type",
+ "description": "The type of the item (blob or tree)"
+ },
+ "sha": {
+ "type": "string",
+ "nullable": true,
+ "title": "Item SHA",
+ "description": "The sha of the item"
+ }
+ },
+ "required": [
+ "path",
+ "mode",
+ "type",
+ "sha"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Tree items",
+ "description": "The tree items"
+ }
+ },
+ "required": [
+ "id",
+ "sha",
+ "tree"
+ ],
+ "additionalProperties": false
+ },
+ "UpstreamRoute": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "UpstreamRoute Identifier",
+ "description": "The identifier of UpstreamRoute"
+ },
+ "primary": {
+ "type": "boolean",
+ "nullable": true,
+ "title": "Is primary",
+ "description": "This route is the primary route of the environment"
+ },
+ "production_url": {
+ "type": "string",
+ "nullable": true,
+ "title": "Production URL",
+ "description": "How this URL route would look on production environment"
+ },
+ "attributes": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "title": "Arbitrary attributes",
+ "description": "Arbitrary attributes attached to this resource"
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "proxy",
+ "redirect",
+ "upstream"
+ ],
+ "title": "Route type",
+ "description": "Route type"
+ },
+ "tls": {
+ "type": "object",
+ "properties": {
+ "strict_transport_security": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "nullable": true,
+ "title": "Is enabled",
+ "description": "Whether strict transport security is enabled or not"
+ },
+ "include_subdomains": {
+ "type": "boolean",
+ "nullable": true,
+ "title": "Is subdomains included",
+ "description": "Whether the strict transport security policy should include all subdomains"
+ },
+ "preload": {
+ "type": "boolean",
+ "nullable": true,
+ "title": "Is strict transport security preloaded",
+ "description": "Whether the strict transport security policy should be preloaded in browsers"
+ }
+ },
+ "required": [
+ "enabled",
+ "include_subdomains",
+ "preload"
+ ],
+ "additionalProperties": false,
+ "title": "Strict-Transport-Security options.",
+ "description": ""
+ },
+ "min_version": {
+ "type": "string",
+ "enum": [
+ "TLSv1.0",
+ "TLSv1.1",
+ "TLSv1.2",
+ "TLSv1.3"
+ ],
+ "nullable": true,
+ "title": "Minimum TLS version",
+ "description": "The minimum TLS version to support."
+ },
+ "client_authentication": {
+ "type": "string",
+ "enum": [
+ "request",
+ "require"
+ ],
+ "nullable": true,
+ "title": "Client authentication",
+ "description": "The type of client authentication to request."
+ },
+ "client_certificate_authorities": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Client certificate authorities",
+ "description": "Certificate authorities to validate the client certificate against. If not specified, a default set of trusted CAs will be used."
+ }
+ },
+ "required": [
+ "strict_transport_security",
+ "min_version",
+ "client_authentication",
+ "client_certificate_authorities"
+ ],
+ "additionalProperties": false,
+ "title": "TLS settings",
+ "description": "TLS settings for the route"
+ },
+ "cache": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Is enabled",
+ "description": "Whether the cache is enabled."
+ },
+ "default_ttl": {
+ "type": "integer",
+ "title": "Default TTL",
+ "description": "The TTL to apply when the response doesn't specify one. Only applies to static files."
+ },
+ "cookies": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Cookies",
+ "description": "The cookies to take into account for the cache key."
+ },
+ "headers": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Headers",
+ "description": "The headers to take into account for the cache key."
+ }
+ },
+ "required": [
+ "enabled",
+ "default_ttl",
+ "cookies",
+ "headers"
+ ],
+ "additionalProperties": false,
+ "title": "Cache configuration",
+ "description": "Cache configuration"
+ },
+ "ssi": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Is enabled",
+ "description": "Whether SSI include is enabled."
+ }
+ },
+ "required": [
+ "enabled"
+ ],
+ "additionalProperties": false,
+ "title": "SSI configuration",
+ "description": "Server-Side Include configuration"
+ },
+ "upstream": {
+ "type": "string",
+ "title": "Upstream",
+ "description": "The upstream to use for this route"
+ },
+ "redirects": {
+ "type": "object",
+ "properties": {
+ "expires": {
+ "type": "string",
+ "title": "Expires",
+ "description": "The amount of time, in seconds, to cache the redirects"
+ },
+ "paths": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "regexp": {
+ "type": "boolean",
+ "title": "Is regexp",
+ "description": "Whether the path is a regular expression."
+ },
+ "to": {
+ "type": "string",
+ "title": "Redirect URL",
+ "description": "The URL to redirect to."
+ },
+ "prefix": {
+ "type": "boolean",
+ "nullable": true,
+ "title": "Is prefix",
+ "description": "Whether to redirect all the paths that start with the path."
+ },
+ "append_suffix": {
+ "type": "boolean",
+ "nullable": true,
+ "title": "Append suffix",
+ "description": "Whether to append the incoming suffix to the redirected URL."
+ },
+ "code": {
+ "type": "integer",
+ "enum": [
+ 301,
+ 302,
+ 307,
+ 308
+ ],
+ "title": "Redirect code",
+ "description": "The redirect code to use."
+ },
+ "expires": {
+ "type": "string",
+ "nullable": true,
+ "title": "Expires",
+ "description": "The amount of time, in seconds, to cache the redirects."
+ }
+ },
+ "required": [
+ "regexp",
+ "to",
+ "prefix",
+ "append_suffix",
+ "code",
+ "expires"
+ ],
+ "additionalProperties": false
+ },
+ "title": "Path",
+ "description": "The paths to redirect"
+ }
+ },
+ "required": [
+ "expires",
+ "paths"
+ ],
+ "additionalProperties": false,
+ "title": "Redirect configuration",
+ "description": "The configuration of the redirects"
+ },
+ "sticky": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "title": "Is enabled",
+ "description": "Whether sticky routing is enabled."
+ }
+ },
+ "required": [
+ "enabled"
+ ],
+ "additionalProperties": false,
+ "title": "Sticky configuration",
+ "description": "Sticky routing configuration"
+ }
+ },
+ "required": [
+ "primary",
+ "id",
+ "production_url",
+ "attributes",
+ "type",
+ "tls",
+ "cache",
+ "ssi",
+ "upstream",
+ "redirects",
+ "sticky"
+ ],
+ "additionalProperties": false
+ },
+ "WebHookIntegration": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "title": "WebHookIntegration Identifier",
+ "description": "The identifier of WebHookIntegration"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Creation date",
+ "description": "The creation date"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "nullable": true,
+ "title": "Update date",
+ "description": "The update date"
+ },
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "role": {
+ "type": "string",
+ "title": "Integration role",
+ "description": "The role of the integration"
+ },
+ "events": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Events",
+ "description": "Events to execute the hook on"
+ },
+ "environments": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Environments",
+ "description": "The environments to execute the hook on"
+ },
+ "excluded_environments": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Environments",
+ "description": "The environments to not execute the hook on"
+ },
+ "states": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "States",
+ "description": "Events to execute the hook on"
+ },
+ "result": {
+ "type": "string",
+ "enum": [
+ "*",
+ "failure",
+ "success"
+ ],
+ "title": "Result",
+ "description": "Result to execute the hook on"
+ },
+ "shared_key": {
+ "type": "string",
+ "nullable": true,
+ "title": "Shared Key",
+ "description": "The JWS shared secret key"
+ },
+ "url": {
+ "type": "string",
+ "title": "URL",
+ "description": "The URL of the webhook"
+ }
+ },
+ "required": [
+ "created_at",
+ "updated_at",
+ "type",
+ "role",
+ "events",
+ "environments",
+ "excluded_environments",
+ "states",
+ "result",
+ "shared_key",
+ "url"
+ ],
+ "additionalProperties": false
+ },
+ "WebHookIntegrationCreateInput": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "events": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Events",
+ "description": "Events to execute the hook on"
+ },
+ "environments": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Environments",
+ "description": "The environments to execute the hook on"
+ },
+ "excluded_environments": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Environments",
+ "description": "The environments to not execute the hook on"
+ },
+ "states": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "States",
+ "description": "Events to execute the hook on"
+ },
+ "result": {
+ "type": "string",
+ "enum": [
+ "*",
+ "failure",
+ "success"
+ ],
+ "title": "Result",
+ "description": "Result to execute the hook on"
+ },
+ "shared_key": {
+ "type": "string",
+ "nullable": true,
+ "title": "Shared Key",
+ "description": "The JWS shared secret key"
+ },
+ "url": {
+ "type": "string",
+ "title": "URL",
+ "description": "The URL of the webhook"
+ }
+ },
+ "required": [
+ "type",
+ "url"
+ ],
+ "additionalProperties": false
+ },
+ "WebHookIntegrationPatch": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "title": "Integration type",
+ "description": "The type of the integration"
+ },
+ "events": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Events",
+ "description": "Events to execute the hook on"
+ },
+ "environments": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Environments",
+ "description": "The environments to execute the hook on"
+ },
+ "excluded_environments": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "Excluded Environments",
+ "description": "The environments to not execute the hook on"
+ },
+ "states": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "title": "States",
+ "description": "Events to execute the hook on"
+ },
+ "result": {
+ "type": "string",
+ "enum": [
+ "*",
+ "failure",
+ "success"
+ ],
+ "title": "Result",
+ "description": "Result to execute the hook on"
+ },
+ "shared_key": {
+ "type": "string",
+ "nullable": true,
+ "title": "Shared Key",
+ "description": "The JWS shared secret key"
+ },
+ "url": {
+ "type": "string",
+ "title": "URL",
+ "description": "The URL of the webhook"
+ }
+ },
+ "required": [
+ "type",
+ "url"
+ ],
+ "additionalProperties": false
+ },
+ "AutoscalerCPUPressureTrigger": {
+ "description": "CPU pressure trigger settings.\n\nWhen CPU pressure goes below lower bound, service will be scaled down.\nWhen CPU pressure goes above upper bound, service will be scaled up.",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "nullable": true,
+ "title": "Enabled",
+ "description": "Whether the trigger is enabled"
+ },
+ "down": {
+ "allOf": [
+ {
+ "description": "Lower bound on resource usage. Uses a longer duration than scale-up to prevent premature downscaling."
+ },
+ {
+ "$ref": "#/components/schemas/AutoscalerCondition"
+ }
+ ]
+ },
+ "up": {
+ "allOf": [
+ {
+ "description": "Upper bound on resource usage"
+ },
+ {
+ "$ref": "#/components/schemas/AutoscalerCondition"
+ }
+ ]
+ }
+ },
+ "title": "AutoscalerCPUPressureTrigger",
+ "type": "object"
+ },
+ "AutoscalerCPUResources": {
+ "description": "CPU scaling settings",
+ "properties": {
+ "min": {
+ "description": "Minimum CPUs when scaling down vertically",
+ "minimum": 0,
+ "title": "Min",
+ "type": "number"
+ },
+ "max": {
+ "description": "Maximum CPUs when scaling up vertically",
+ "minimum": 0,
+ "title": "Max",
+ "type": "number"
+ }
+ },
+ "title": "AutoscalerCPUResources",
+ "type": "object"
+ },
+ "AutoscalerCPUTrigger": {
+ "description": "CPU resource trigger settings.\n\nWhen CPU usage goes below lower bound, service will be scaled down.\nWhen CPU usage goes above upper bound, service will be scaled up.",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "nullable": true,
+ "title": "Enabled",
+ "description": "Whether the trigger is enabled"
+ },
+ "down": {
+ "allOf": [
+ {
+ "description": "Lower bound on resource usage. Uses a longer duration than scale-up to prevent premature downscaling."
+ },
+ {
+ "$ref": "#/components/schemas/AutoscalerCondition"
+ }
+ ]
+ },
+ "up": {
+ "allOf": [
+ {
+ "description": "Upper bound on resource usage"
+ },
+ {
+ "$ref": "#/components/schemas/AutoscalerCondition"
+ }
+ ]
+ }
+ },
+ "title": "AutoscalerCPUTrigger",
+ "type": "object"
+ },
+ "AutoscalerCondition": {
+ "description": "Trigger condition settings",
+ "properties": {
+ "threshold": {
+ "description": "Value at which the condition is satisfied",
+ "maximum": 100,
+ "minimum": 0,
+ "title": "Threshold",
+ "type": "number"
+ },
+ "duration": {
+ "allOf": [
+ {
+ "description": "Number of seconds during which the condition must be satisfied"
+ },
+ {
+ "$ref": "#/components/schemas/AutoscalerDuration"
+ }
+ ]
+ },
+ "enabled": {
+ "type": "boolean",
+ "nullable": true,
+ "title": "Enabled",
+ "description": "Whether the condition should be used for generating alerts"
+ }
+ },
+ "required": [
+ "threshold"
+ ],
+ "title": "AutoscalerCondition",
+ "type": "object"
+ },
+ "AutoscalerDuration": {
+ "enum": [
+ 60,
+ 120,
+ 300,
+ 600,
+ 1800,
+ 3600
+ ],
+ "title": "AutoscalerDuration",
+ "type": "integer"
+ },
+ "AutoscalerInstances": {
+ "description": "Horizontal scaling settings",
+ "properties": {
+ "min": {
+ "description": "Minimum number of instances when scaling down horizontally",
+ "title": "Min",
+ "type": "integer"
+ },
+ "max": {
+ "description": "Maximum number of instances when scaling up horizontally",
+ "title": "Max",
+ "type": "integer"
+ }
+ },
+ "title": "AutoscalerInstances",
+ "type": "object"
+ },
+ "AutoscalerMemoryPressureTrigger": {
+ "description": "Memory pressure trigger settings.\n\nWhen memory pressure goes below lower bound, service will be scaled down.\nWhen memory pressure goes above upper bound, service will be scaled up.",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "nullable": true,
+ "title": "Enabled",
+ "description": "Whether the trigger is enabled"
+ },
+ "down": {
+ "allOf": [
+ {
+ "description": "Lower bound on resource usage. Uses a longer duration than scale-up to prevent premature downscaling."
+ },
+ {
+ "$ref": "#/components/schemas/AutoscalerCondition"
+ }
+ ]
+ },
+ "up": {
+ "allOf": [
+ {
+ "description": "Upper bound on resource usage"
+ },
+ {
+ "$ref": "#/components/schemas/AutoscalerCondition"
+ }
+ ]
+ }
+ },
+ "title": "AutoscalerMemoryPressureTrigger",
+ "type": "object"
+ },
+ "AutoscalerMemoryResources": {
+ "description": "Memory scaling settings",
+ "properties": {
+ "min": {
+ "description": "Minimum memory (bytes) when scaling down vertically",
+ "minimum": 0,
+ "title": "Min",
+ "type": "integer"
+ },
+ "max": {
+ "description": "Maximum memory (bytes) when scaling up vertically",
+ "minimum": 0,
+ "title": "Max",
+ "type": "integer"
+ }
+ },
+ "title": "AutoscalerMemoryResources",
+ "type": "object"
+ },
+ "AutoscalerMemoryTrigger": {
+ "description": "Memory resource trigger settings.\n\nWhen memory usage goes below lower bound, service will be scaled down.\nWhen memory usage goes above upper bound, service will be scaled up.",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "nullable": true,
+ "title": "Enabled",
+ "description": "Whether the trigger is enabled"
+ },
+ "down": {
+ "allOf": [
+ {
+ "description": "Lower bound on resource usage. Uses a longer duration than scale-up to prevent premature downscaling."
+ },
+ {
+ "$ref": "#/components/schemas/AutoscalerCondition"
+ }
+ ]
+ },
+ "up": {
+ "allOf": [
+ {
+ "description": "Upper bound on resource usage"
+ },
+ {
+ "$ref": "#/components/schemas/AutoscalerCondition"
+ }
+ ]
+ }
+ },
+ "title": "AutoscalerMemoryTrigger",
+ "type": "object"
+ },
+ "AutoscalerResources": {
+ "description": "Vertical scaling settings",
+ "properties": {
+ "cpu": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/AutoscalerCPUResources"
+ },
+ "nullable": true,
+ "description": "Lower/Upper bounds on CPU allocation when scaling"
+ },
+ "memory": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/AutoscalerMemoryResources"
+ },
+ "nullable": true,
+ "description": "Lower/Upper bounds on Memory allocation when scaling"
+ }
+ },
+ "title": "AutoscalerResources",
+ "type": "object"
+ },
+ "AutoscalerScalingCooldown": {
+ "description": "Scaling cooldown settings",
+ "properties": {
+ "up": {
+ "description": "Number of seconds to wait until scaling up can be done again (since last attempt)",
+ "minimum": 0,
+ "title": "Up",
+ "type": "integer"
+ },
+ "down": {
+ "description": "Number of seconds to wait until scaling down can be done again (since last attempt)",
+ "minimum": 0,
+ "title": "Down",
+ "type": "integer"
+ }
+ },
+ "title": "AutoscalerScalingCooldown",
+ "type": "object"
+ },
+ "AutoscalerScalingFactor": {
+ "description": "Scaling factor settings",
+ "properties": {
+ "up": {
+ "description": "Number of instances to add when scaling up horizontally",
+ "minimum": 0,
+ "title": "Up",
+ "type": "integer"
+ },
+ "down": {
+ "description": "Number of instances to remove when scaling down horizontally",
+ "minimum": 0,
+ "title": "Down",
+ "type": "integer"
+ }
+ },
+ "title": "AutoscalerScalingFactor",
+ "type": "object"
+ },
+ "AutoscalerServiceSettings": {
+ "description": "Autoscaling settings for a specific service",
+ "properties": {
+ "triggers": {
+ "allOf": [
+ {
+ "description": "Metrics should be evaluated as triggers for autoscaling"
+ },
+ {
+ "$ref": "#/components/schemas/AutoscalerTriggers"
+ }
+ ]
+ },
+ "instances": {
+ "allOf": [
+ {
+ "description": "Lower/Upper bounds on number of instances for horizontal scaling"
+ },
+ {
+ "$ref": "#/components/schemas/AutoscalerInstances"
+ }
+ ]
+ },
+ "resources": {
+ "allOf": [
+ {
+ "description": "Lower/Upper bounds on cpu/memory for vertical scaling"
+ },
+ {
+ "$ref": "#/components/schemas/AutoscalerResources"
+ }
+ ]
+ },
+ "scale_factor": {
+ "allOf": [
+ {
+ "description": "How many instances to add/remove on each scaling attempt"
+ },
+ {
+ "$ref": "#/components/schemas/AutoscalerScalingFactor"
+ }
+ ]
+ },
+ "scale_cooldown": {
+ "allOf": [
+ {
+ "description": "How long to wait before the next scaling attempt can be performed"
+ },
+ {
+ "$ref": "#/components/schemas/AutoscalerScalingCooldown"
+ }
+ ]
+ }
+ },
+ "title": "AutoscalerServiceSettings",
+ "type": "object"
+ },
+ "AutoscalerSettings": {
+ "description": "Update model for autoscaling settings.\n\nThis model is mainly used for partial updates (PATCH), therefore all its\nattributes are optional.",
+ "properties": {
+ "services": {
+ "additionalProperties": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/AutoscalerServiceSettings"
+ },
+ "nullable": true
+ },
+ "type": "object",
+ "nullable": true,
+ "title": "Services",
+ "description": "Each service for which autoscaling is configured is listed in the key"
+ }
+ },
+ "title": "AutoscalerSettings",
+ "type": "object"
+ },
+ "AutoscalerTriggers": {
+ "additionalProperties": false,
+ "description": "Scaling triggers settings",
+ "properties": {
+ "cpu": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/AutoscalerCPUTrigger"
+ },
+ "nullable": true,
+ "description": "Settings for scaling based on CPU usage"
+ },
+ "memory": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/AutoscalerMemoryTrigger"
+ },
+ "nullable": true,
+ "description": "Settings for scaling based on Memory usage"
+ },
+ "cpu_pressure": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/AutoscalerCPUPressureTrigger"
+ },
+ "nullable": true,
+ "description": "Settings for scaling based on CPU pressure"
+ },
+ "memory_pressure": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/AutoscalerMemoryPressureTrigger"
+ },
+ "nullable": true,
+ "description": "Settings for scaling based on Memory pressure"
+ }
+ },
+ "title": "AutoscalerTriggers",
+ "type": "object"
+ },
+ "Mode": {
+ "type": "string",
+ "enum": [
+ "1",
+ "-1"
+ ]
+ },
+ "FilterSelect": {
+ "properties": {
+ "mode": {
+ "$ref": "#/components/schemas/Mode"
+ },
+ "values": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "nullable": true,
+ "type": "string"
+ }
+ },
+ {
+ "type": "object",
+ "additionalProperties": {
+ "nullable": true,
+ "type": "string"
+ }
+ }
+ ],
+ "default": null
+ }
+ },
+ "type": "object"
+ },
+ "Invoice": {
+ "type": "object",
+ "description": "The invoice object.",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "The invoice id."
+ },
+ "invoice_number": {
+ "description": "The invoice number.",
+ "type": "string"
+ },
+ "type": {
+ "description": "Invoice type.",
+ "type": "string",
+ "enum": [
+ "invoice",
+ "credit_memo"
+ ]
+ },
+ "order_id": {
+ "description": "The id of the related order.",
+ "type": "string"
+ },
+ "related_invoice_id": {
+ "description": "If the invoice is a credit memo (type=credit_memo), this field stores the id of the related/original invoice.",
+ "type": "string",
+ "nullable": true
+ },
+ "status": {
+ "description": "The invoice status.",
+ "type": "string",
+ "enum": [
+ "paid",
+ "charged_off",
+ "pending",
+ "refunded",
+ "canceled",
+ "refund_pending"
+ ]
+ },
+ "owner": {
+ "description": "The ULID of the owner.",
+ "type": "string",
+ "format": "ulid"
+ },
+ "invoice_date": {
+ "description": "The invoice date.",
+ "type": "string",
+ "format": "date-time",
+ "nullable": true
+ },
+ "invoice_due": {
+ "description": "The invoice due date.",
+ "type": "string",
+ "format": "date-time",
+ "nullable": true
+ },
+ "created": {
+ "description": "The time when the invoice was created.",
+ "type": "string",
+ "format": "date-time",
+ "nullable": true
+ },
+ "changed": {
+ "description": "The time when the invoice was changed.",
+ "type": "string",
+ "format": "date-time",
+ "nullable": true
+ },
+ "company": {
+ "description": "Company name (if any).",
+ "type": "string"
+ },
+ "total": {
+ "description": "The invoice total.",
+ "type": "number",
+ "format": "double"
+ },
+ "address": {
+ "$ref": "#/components/schemas/Address"
+ },
+ "notes": {
+ "description": "The invoice note.",
+ "type": "string"
+ },
+ "invoice_pdf": {
+ "$ref": "#/components/schemas/InvoicePDF"
+ }
+ }
+ },
+ "Organization": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "ulid",
+ "description": "The ID of the organization."
+ },
+ "type": {
+ "type": "string",
+ "description": "The type of the organization.",
+ "enum": [
+ "fixed",
+ "flexible"
+ ]
+ },
+ "owner_id": {
+ "type": "string",
+ "format": "uuid",
+ "description": "The ID of the owner."
+ },
+ "namespace": {
+ "type": "string",
+ "description": "The namespace in which the organization name is unique."
+ },
+ "name": {
+ "type": "string",
+ "description": "A unique machine name representing the organization."
+ },
+ "label": {
+ "type": "string",
+ "description": "The human-readable label of the organization."
+ },
+ "country": {
+ "type": "string",
+ "description": "The organization country (2-letter country code).",
+ "maxLength": 2
+ },
+ "capabilities": {
+ "type": "array",
+ "description": "The organization capabilities.",
+ "items": {
+ "type": "string"
+ },
+ "uniqueItems": true
+ },
+ "vendor": {
+ "type": "string",
+ "description": "The vendor."
+ },
+ "billing_profile_id": {
+ "type": "string",
+ "description": "The Billing Profile ID."
+ },
+ "billing_legacy": {
+ "type": "boolean",
+ "description": "Whether the account is billed with the legacy system."
+ },
+ "security_contact": {
+ "type": "string",
+ "format": "email",
+ "description": "The security contact email address for the organization."
+ },
+ "ai_agent_settings": {
+ "type": "object",
+ "description": "AI agent consent settings for the organization.",
+ "properties": {
+ "can_enable": {
+ "type": "boolean",
+ "description": "Master switch for AI agent settings. Must be true to enable individual agents."
+ },
+ "performance_agent_enabled": {
+ "type": "boolean",
+ "description": "Whether the performance agent is enabled."
+ },
+ "log_analyzer_agent_enabled": {
+ "type": "boolean",
+ "description": "Whether the log analyzer agent is enabled."
+ }
+ }
+ },
+ "status": {
+ "type": "string",
+ "description": "The status of the organization.",
+ "enum": [
+ "active",
+ "restricted",
+ "suspended",
+ "deleted"
+ ]
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "description": "The date and time when the organization was created."
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "description": "The date and time when the organization was last updated."
+ },
+ "_links": {
+ "type": "object",
+ "properties": {
+ "self": {
+ "type": "object",
+ "description": "Link to the current organization.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ }
+ }
+ },
+ "update": {
+ "type": "object",
+ "description": "Link for updating the current organization.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ },
+ "method": {
+ "type": "string",
+ "description": "The HTTP method to use."
+ }
+ }
+ },
+ "delete": {
+ "type": "object",
+ "description": "Link for deleting the current organization.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ },
+ "method": {
+ "type": "string",
+ "description": "The HTTP method to use."
+ }
+ }
+ },
+ "members": {
+ "type": "object",
+ "description": "Link to the current organization's members.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ }
+ }
+ },
+ "create-member": {
+ "type": "object",
+ "description": "Link for creating a new organization member.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ },
+ "method": {
+ "type": "string",
+ "description": "The HTTP method to use."
+ }
+ }
+ },
+ "address": {
+ "type": "object",
+ "description": "Link to the current organization's address. This link may not be present for all organizations.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ }
+ }
+ },
+ "profile": {
+ "type": "object",
+ "description": "Link to the current organization's billing profile details. This link may not be present for all organizations.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ }
+ }
+ },
+ "account": {
+ "type": "object",
+ "description": "Link to the current organization's account. This link may not be present for all organizations.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ }
+ }
+ },
+ "payment-source": {
+ "type": "object",
+ "description": "Link to the current organization's payment source. This link may not be present for all organizations.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ }
+ }
+ },
+ "orders": {
+ "type": "object",
+ "description": "Link to the current organization's orders. This link may not be present for all organizations.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ }
+ }
+ },
+ "vouchers": {
+ "type": "object",
+ "description": "Link to the current organization's vouchers. This link may not be present for all organizations.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ }
+ }
+ },
+ "discounts": {
+ "type": "object",
+ "description": "Link to the current organization's discounts. This link may not be present for all organizations.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ }
+ }
+ },
+ "apply-voucher": {
+ "type": "object",
+ "description": "Link for applying a voucher for the current organization. This link may not be present for all organizations.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ },
+ "method": {
+ "type": "string",
+ "description": "The HTTP method to use."
+ }
+ }
+ },
+ "subscriptions": {
+ "type": "object",
+ "description": "Link to the current organization's subscriptions. This link may not be present for all organizations.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ }
+ }
+ },
+ "create-subscription": {
+ "type": "object",
+ "description": "Link for creating a new organization subscription.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ },
+ "method": {
+ "type": "string",
+ "description": "The HTTP method to use."
+ }
+ }
+ },
+ "estimate-subscription": {
+ "type": "object",
+ "description": "Link for estimating the price of a new subscription. This link may not be present for all organizations.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ }
+ }
+ },
+ "prepayment": {
+ "type": "object",
+ "description": "Link to the current organization's prepayment information. This link may not be present for all organizations.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ }
+ }
+ },
+ "billing-profile": {
+ "type": "object",
+ "description": "Link to the organization's billing profile. This link may not be present for all organizations.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ }
+ }
+ },
+ "mfa-enforcement": {
+ "type": "object",
+ "description": "Link to the current organization's MFA enforcement settings. This link may not be present for all organizations.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ }
+ }
+ },
+ "sso": {
+ "type": "object",
+ "description": "Link to the current organization's SSO configuration. This link may not be present for all organizations.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "OrganizationReference": {
+ "description": "The referenced organization, or null if it no longer exists.",
+ "type": "object",
+ "nullable": true,
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "ulid",
+ "description": "The ID of the organization."
+ },
+ "type": {
+ "type": "string",
+ "description": "The type of the organization."
+ },
+ "owner_id": {
+ "type": "string",
+ "format": "uuid",
+ "description": "The ID of the owner."
+ },
+ "name": {
+ "type": "string",
+ "description": "A unique machine name representing the organization."
+ },
+ "label": {
+ "type": "string",
+ "description": "The human-readable label of the organization."
+ },
+ "vendor": {
+ "type": "string",
+ "description": "The vendor."
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "description": "The date and time when the organization was created."
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "description": "The date and time when the organization was last updated."
+ }
+ }
+ },
+ "OrganizationMember": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "description": "The ID of the user.",
+ "deprecated": true
+ },
+ "organization_id": {
+ "type": "string",
+ "format": "ulid",
+ "description": "The ID of the organization."
+ },
+ "user_id": {
+ "type": "string",
+ "format": "uuid",
+ "description": "The ID of the user."
+ },
+ "permissions": {
+ "$ref": "#/components/schemas/Permissions"
+ },
+ "level": {
+ "type": "string",
+ "description": "Access level of the member.",
+ "enum": [
+ "admin",
+ "viewer"
+ ]
+ },
+ "owner": {
+ "type": "boolean",
+ "description": "Whether the member is the organization owner."
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "description": "The date and time when the member was created."
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "description": "The date and time when the member was last updated."
+ },
+ "_links": {
+ "type": "object",
+ "properties": {
+ "self": {
+ "type": "object",
+ "description": "Link to the current member.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ }
+ }
+ },
+ "update": {
+ "type": "object",
+ "description": "Link for updating the current member.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ },
+ "method": {
+ "type": "string",
+ "description": "The HTTP method to use."
+ }
+ }
+ },
+ "delete": {
+ "type": "object",
+ "description": "Link for deleting the current member.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ },
+ "method": {
+ "type": "string",
+ "description": "The HTTP method to use."
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "Vouchers": {
+ "type": "object",
+ "properties": {
+ "uuid": {
+ "type": "string",
+ "format": "uuid",
+ "description": "The uuid of the user."
+ },
+ "vouchers_total": {
+ "type": "string",
+ "description": "The total voucher credit given to the user."
+ },
+ "vouchers_applied": {
+ "type": "string",
+ "description": "The part of total voucher credit applied to orders."
+ },
+ "vouchers_remaining_balance": {
+ "type": "string",
+ "description": "The remaining voucher credit, available for future orders."
+ },
+ "currency": {
+ "type": "string",
+ "description": "The currency of the vouchers."
+ },
+ "vouchers": {
+ "description": "Array of vouchers.",
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "string",
+ "description": "The voucher code."
+ },
+ "amount": {
+ "type": "string",
+ "description": "The total voucher credit."
+ },
+ "currency": {
+ "type": "string",
+ "description": "The currency of the voucher."
+ },
+ "orders": {
+ "type": "array",
+ "description": "Array of orders to which a voucher applied.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "order_id": {
+ "type": "string",
+ "description": "The id of the order."
+ },
+ "status": {
+ "type": "string",
+ "description": "The status of the order."
+ },
+ "billing_period_start": {
+ "type": "string",
+ "description": "The billing period start timestamp of the order (ISO 8601)."
+ },
+ "billing_period_end": {
+ "type": "string",
+ "description": "The billing period end timestamp of the order (ISO 8601)."
+ },
+ "order_total": {
+ "type": "string",
+ "description": "The total of the order."
+ },
+ "order_discount": {
+ "type": "string",
+ "description": "The total voucher credit applied to the order."
+ },
+ "currency": {
+ "type": "string",
+ "description": "The currency of the order."
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "_links": {
+ "type": "object",
+ "properties": {
+ "self": {
+ "type": "object",
+ "description": "Link to the current resource.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "Permissions": {
+ "type": "array",
+ "description": "The organization member permissions.",
+ "items": {
+ "type": "string",
+ "enum": [
+ "admin",
+ "billing",
+ "members",
+ "plans",
+ "projects:create",
+ "projects:list"
+ ]
+ }
+ },
+ "EstimationObject": {
+ "type": "object",
+ "description": "A price estimate object.",
+ "properties": {
+ "plan": {
+ "type": "string",
+ "description": "The monthly price of the plan."
+ },
+ "user_licenses": {
+ "type": "string",
+ "description": "The monthly price of the user licenses."
+ },
+ "environments": {
+ "type": "string",
+ "description": "The monthly price of the environments."
+ },
+ "storage": {
+ "type": "string",
+ "description": "The monthly price of the storage."
+ },
+ "total": {
+ "type": "string",
+ "description": "The total monthly price."
+ },
+ "options": {
+ "type": "object",
+ "description": "The unit prices of the options."
+ }
+ }
+ },
+ "OrganizationEstimationObject": {
+ "type": "object",
+ "description": "An estimation of all organization spend.",
+ "properties": {
+ "total": {
+ "type": "string",
+ "description": "The total estimated price for the organization."
+ },
+ "sub_total": {
+ "type": "string",
+ "description": "The sub total for all projects and sellables."
+ },
+ "vouchers": {
+ "type": "string",
+ "description": "The total amount of vouchers."
+ },
+ "user_licenses": {
+ "type": "object",
+ "description": "An estimation of user licenses cost.",
+ "properties": {
+ "base": {
+ "type": "object",
+ "properties": {
+ "count": {
+ "type": "integer",
+ "description": "The number of base user licenses."
+ },
+ "total": {
+ "type": "string",
+ "description": "The total price for base user licenses."
+ },
+ "list": {
+ "type": "object",
+ "properties": {
+ "admin_user": {
+ "type": "object",
+ "description": "An estimation of admin users cost.",
+ "properties": {
+ "count": {
+ "type": "integer",
+ "description": "The number of admin user licenses."
+ },
+ "total": {
+ "type": "string",
+ "description": "The total price for admin user licenses."
+ }
+ }
+ },
+ "viewer_user": {
+ "type": "object",
+ "description": "An estimation of viewer users cost.",
+ "properties": {
+ "count": {
+ "type": "integer",
+ "description": "The number of viewer user licenses."
+ },
+ "total": {
+ "type": "string",
+ "description": "The total price for viewer user licenses."
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "user_management": {
+ "type": "object",
+ "properties": {
+ "count": {
+ "type": "integer",
+ "description": "The number of user_management licenses."
+ },
+ "total": {
+ "type": "string",
+ "description": "The total price for user_management licenses."
+ },
+ "list": {
+ "type": "object",
+ "properties": {
+ "standard_management_user": {
+ "type": "object",
+ "description": "An estimation of standard_management_user cost.",
+ "properties": {
+ "count": {
+ "type": "integer",
+ "description": "The number of standard_management_user licenses."
+ },
+ "total": {
+ "type": "string",
+ "description": "The total price for standard_management_user licenses."
+ }
+ }
+ },
+ "advanced_management_user": {
+ "type": "object",
+ "description": "An estimation of advanced_management_user cost.",
+ "properties": {
+ "count": {
+ "type": "integer",
+ "description": "The number of advanced_management_user licenses."
+ },
+ "total": {
+ "type": "string",
+ "description": "The total price for advanced_management_user licenses."
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "user_management": {
+ "type": "string",
+ "description": "An estimation of the advanced user management sellable cost."
+ },
+ "support_level": {
+ "type": "string",
+ "description": "The total monthly price for premium support."
+ },
+ "subscriptions": {
+ "type": "object",
+ "description": "An estimation of subscriptions cost.",
+ "properties": {
+ "total": {
+ "type": "string",
+ "description": "The total price for subscriptions."
+ },
+ "list": {
+ "type": "array",
+ "description": "The list of active subscriptions.",
+ "items": {
+ "description": "Details of a subscription",
+ "type": "object",
+ "properties": {
+ "license_id": {
+ "type": "string",
+ "description": "The id of the subscription."
+ },
+ "project_title": {
+ "type": "string",
+ "description": "The name of the project."
+ },
+ "total": {
+ "type": "string",
+ "description": "The total price for the subscription."
+ },
+ "usage": {
+ "type": "object",
+ "description": "The detail of the usage for the subscription.",
+ "properties": {
+ "cpu": {
+ "type": "number",
+ "description": "The total cpu for this subsciption."
+ },
+ "memory": {
+ "type": "number",
+ "description": "The total memory for this subsciption."
+ },
+ "storage": {
+ "type": "number",
+ "description": "The total storage for this subsciption."
+ },
+ "environments": {
+ "type": "integer",
+ "description": "The total environments for this subsciption."
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "OrganizationAddonsObject": {
+ "type": "object",
+ "description": "The list of available and current add-ons of an organization.",
+ "properties": {
+ "available": {
+ "type": "object",
+ "description": "The list of available add-ons and their possible values.",
+ "properties": {
+ "user_management": {
+ "type": "object",
+ "description": "Information about the levels of user management that are available.",
+ "additionalProperties": {
+ "type": "number",
+ "description": "The number of commitment days required for the addon."
+ }
+ },
+ "support_level": {
+ "type": "object",
+ "description": "Information about the levels of support available.",
+ "additionalProperties": {
+ "type": "number",
+ "description": "The number of commitment days required for the addon."
+ }
+ }
+ }
+ },
+ "current": {
+ "type": "object",
+ "description": "The list of existing add-ons and their current values.",
+ "properties": {
+ "user_management": {
+ "type": "object",
+ "description": "Information about the type of user management currently selected.",
+ "additionalProperties": {
+ "type": "number",
+ "description": "The number of commitment days that remain for the addon."
+ }
+ },
+ "support_level": {
+ "type": "object",
+ "description": "Information about the level of support currently selected.",
+ "additionalProperties": {
+ "type": "number",
+ "description": "The number of commitment days that remain for the addon."
+ }
+ }
+ }
+ },
+ "upgrades_available": {
+ "type": "object",
+ "description": "The upgrades available for current add-ons.",
+ "properties": {
+ "user_management": {
+ "type": "array",
+ "description": "Available upgrade options for user management.",
+ "items": {
+ "type": "string"
+ }
+ },
+ "support_level": {
+ "type": "array",
+ "description": "Available upgrade options for support.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "SubscriptionAddonsObject": {
+ "type": "object",
+ "description": "The list of available and current addons for the license.",
+ "properties": {
+ "available": {
+ "type": "object",
+ "description": "The list of available addons.",
+ "properties": {
+ "continuous_profiling": {
+ "type": "object",
+ "description": "Information about the continuous profiling options available.",
+ "additionalProperties": {
+ "type": "number",
+ "description": "The number of commitment days for the addon."
+ }
+ },
+ "project_support_level": {
+ "type": "object",
+ "description": "Information about the project uptime options available.",
+ "additionalProperties": {
+ "type": "number",
+ "description": "The number of commitment days for the addon."
+ }
+ }
+ }
+ },
+ "current": {
+ "type": "object",
+ "description": "The list of existing addons and their current values.",
+ "properties": {
+ "continuous_profiling": {
+ "type": "object",
+ "description": "The current continuous profiling level of the license.",
+ "additionalProperties": {
+ "type": "number",
+ "description": "The number of remaining commitment days for the addon."
+ }
+ },
+ "project_support_level": {
+ "type": "object",
+ "description": "The current project uptime level of the license.",
+ "additionalProperties": {
+ "type": "number",
+ "description": "The number of remaining commitment days for the addon."
+ }
+ }
+ }
+ },
+ "upgrades_available": {
+ "type": "object",
+ "description": "The upgrades available for current addons.",
+ "properties": {
+ "continuous_profiling": {
+ "type": "array",
+ "description": "Available upgrade options for continuous profiling.",
+ "items": {
+ "type": "string"
+ }
+ },
+ "project_support_level": {
+ "type": "array",
+ "description": "Available upgrade options for project uptime.",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "OrganizationAlertConfig": {
+ "type": "object",
+ "description": "The alert configuration for an organization.",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Type of alert (e.g. \"billing\")"
+ },
+ "active": {
+ "type": "boolean",
+ "description": "Whether the billing alert should be active or not."
+ },
+ "alerts_sent": {
+ "type": "number",
+ "description": "Number of alerts sent."
+ },
+ "last_alert_at": {
+ "type": "string",
+ "description": "The datetime the alert was last sent.",
+ "nullable": true
+ },
+ "updated_at": {
+ "type": "string",
+ "description": "The datetime the alert was last updated.",
+ "nullable": true
+ },
+ "config": {
+ "type": "object",
+ "nullable": true,
+ "description": "Configuration for threshold and mode.",
+ "properties": {
+ "threshold": {
+ "type": "object",
+ "description": "Data regarding threshold spend.",
+ "properties": {
+ "formatted": {
+ "type": "string",
+ "description": "Formatted threshold value."
+ },
+ "amount": {
+ "type": "number",
+ "description": "Threshold value."
+ },
+ "currency_code": {
+ "type": "string",
+ "description": "Threshold currency code."
+ },
+ "currency_symbol": {
+ "type": "string",
+ "description": "Threshold currency symbol."
+ }
+ }
+ },
+ "mode": {
+ "type": "string",
+ "description": "The mode of alert."
+ }
+ }
+ }
+ }
+ },
+ "UsageAlert": {
+ "type": "object",
+ "description": "The usage alert for a subscription.",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Tidentifier of the alert."
+ },
+ "active": {
+ "type": "boolean",
+ "description": "Whether the usage alert is activated."
+ },
+ "alerts_sent": {
+ "type": "number",
+ "description": "Number of alerts sent."
+ },
+ "last_alert_at": {
+ "type": "string",
+ "description": "The datetime the alert was last sent.",
+ "nullable": true
+ },
+ "updated_at": {
+ "type": "string",
+ "description": "The datetime the alert was last updated.",
+ "nullable": true
+ },
+ "config": {
+ "type": "object",
+ "nullable": true,
+ "description": "Configuration for the usage alert.",
+ "properties": {
+ "threshold": {
+ "type": "object",
+ "description": "Data regarding threshold spend.",
+ "properties": {
+ "formatted": {
+ "type": "string",
+ "description": "Formatted threshold value."
+ },
+ "amount": {
+ "type": "number",
+ "description": "Threshold value."
+ },
+ "unit": {
+ "type": "string",
+ "description": "Threshold unit."
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "PrepaymentObject": {
+ "type": "object",
+ "description": "Prepayment information for an organization.",
+ "properties": {
+ "prepayment": {
+ "type": "object",
+ "description": "Prepayment information for an organization.",
+ "properties": {
+ "organization_id": {
+ "type": "string",
+ "description": "Organization ID"
+ },
+ "balance": {
+ "type": "object",
+ "description": "The prepayment balance in complex format.",
+ "properties": {
+ "formatted": {
+ "type": "string",
+ "description": "Formatted balance."
+ },
+ "amount": {
+ "type": "number",
+ "description": "The balance amount."
+ },
+ "currency_code": {
+ "type": "string",
+ "description": "The balance currency code."
+ },
+ "currency_symbol": {
+ "type": "string",
+ "description": "The balance currency symbol."
+ }
+ }
+ },
+ "last_updated_at": {
+ "type": "string",
+ "nullable": true,
+ "description": "The date the prepayment balance was last updated."
+ },
+ "sufficient": {
+ "type": "boolean",
+ "description": "Whether the prepayment balance is enough to cover the upcoming order."
+ },
+ "fallback": {
+ "type": "string",
+ "nullable": true,
+ "description": "The fallback payment method, if any, to be used in case prepayment balance is not enough to cover an order."
+ }
+ }
+ }
+ }
+ },
+ "PrepaymentTransactionObject": {
+ "type": "object",
+ "description": "Prepayment transaction for an organization.",
+ "properties": {
+ "order_id": {
+ "type": "string",
+ "description": "Order ID"
+ },
+ "message": {
+ "type": "string",
+ "description": "The message associated with transaction."
+ },
+ "status": {
+ "type": "string",
+ "description": "Whether the transactions was successful or a failure."
+ },
+ "amount": {
+ "type": "object",
+ "description": "The prepayment balance in complex format.",
+ "properties": {
+ "formatted": {
+ "type": "string",
+ "description": "Formatted balance."
+ },
+ "amount": {
+ "type": "number",
+ "description": "The balance amount."
+ },
+ "currency_code": {
+ "type": "string",
+ "description": "The balance currency code."
+ },
+ "currency_symbol": {
+ "type": "string",
+ "description": "The balance currency symbol."
+ }
+ }
+ },
+ "created": {
+ "type": "string",
+ "description": "Time the transaction was created."
+ },
+ "updated": {
+ "type": "string",
+ "description": "Time the transaction was last updated.",
+ "nullable": true
+ },
+ "expire_date": {
+ "type": "string",
+ "description": "The expiration date of the transaction (deposits only).",
+ "nullable": true
+ }
+ }
+ },
+ "ArrayFilter": {
+ "type": "object",
+ "properties": {
+ "eq": {
+ "type": "string",
+ "description": "Equal"
+ },
+ "ne": {
+ "type": "string",
+ "description": "Not equal"
+ },
+ "in": {
+ "type": "string",
+ "description": "In (comma-separated list)"
+ },
+ "nin": {
+ "type": "string",
+ "description": "Not in (comma-separated list)"
+ }
+ }
+ },
+ "ProvisionStep": {
+ "type": "object",
+ "description": "A single step in the provisioning plan.",
+ "required": [
+ "stage",
+ "label"
+ ],
+ "properties": {
+ "stage": {
+ "type": "string",
+ "description": "The step identifier."
+ },
+ "label": {
+ "type": "string",
+ "description": "A human-readable label for the step."
+ }
+ },
+ "additionalProperties": false
+ },
+ "ProvisionEvent": {
+ "type": "object",
+ "description": "A single event in the provisioning progress stream.",
+ "required": [
+ "type"
+ ],
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "The event type.",
+ "enum": [
+ "data",
+ "done",
+ "error",
+ "keep_alive"
+ ]
+ },
+ "project_id": {
+ "type": "string",
+ "description": "The ID of the project being provisioned."
+ },
+ "stage": {
+ "type": "string",
+ "description": "The current provisioning stage."
+ },
+ "label": {
+ "type": "string",
+ "description": "A human-readable label for the current stage."
+ },
+ "reason": {
+ "type": "string",
+ "description": "The reason for failure (only present on error events)."
+ },
+ "timestamp": {
+ "type": "string",
+ "format": "date-time",
+ "description": "The time the event was emitted."
+ },
+ "steps": {
+ "type": "array",
+ "description": "Ordered list of provisioning steps.",
+ "items": {
+ "$ref": "#/components/schemas/ProvisionStep"
+ }
+ }
+ },
+ "additionalProperties": false
+ },
+ "OrganizationProject": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "$ref": "#/components/schemas/ProjectID"
+ },
+ "organization_id": {
+ "$ref": "#/components/schemas/OrganizationID"
+ },
+ "subscription_id": {
+ "$ref": "#/components/schemas/SubscriptionID"
+ },
+ "vendor": {
+ "type": "string",
+ "description": "Vendor of the project."
+ },
+ "region": {
+ "$ref": "#/components/schemas/RegionID"
+ },
+ "title": {
+ "$ref": "#/components/schemas/ProjectTitle"
+ },
+ "type": {
+ "$ref": "#/components/schemas/ProjectType"
+ },
+ "plan": {
+ "$ref": "#/components/schemas/ProjectPlan"
+ },
+ "timezone": {
+ "$ref": "#/components/schemas/ProjectTimeZone"
+ },
+ "default_branch": {
+ "$ref": "#/components/schemas/ProjectDefaultBranch"
+ },
+ "status": {
+ "$ref": "#/components/schemas/ProjectStatus"
+ },
+ "trial_plan": {
+ "$ref": "#/components/schemas/ProjectTrialPlan"
+ },
+ "project_ui": {
+ "$ref": "#/components/schemas/ProjectUI"
+ },
+ "dedicated_tag": {
+ "type": "string",
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/ProjectDedicatedTag"
+ }
+ ],
+ "nullable": true
+ },
+ "created_at": {
+ "$ref": "#/components/schemas/CreatedAt"
+ },
+ "updated_at": {
+ "$ref": "#/components/schemas/UpdatedAt"
+ },
+ "activities": {
+ "description": "Activities information for the project.",
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Activity"
+ },
+ "nullable": true
+ },
+ "fastly_service_ids": {
+ "description": "Fastly service IDs for the project.",
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "nullable": true
+ },
+ "project_options": {
+ "type": "object",
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/ProjectOptionsAggregated"
+ }
+ ],
+ "nullable": true
+ },
+ "_links": {
+ "type": "object",
+ "properties": {
+ "self": {
+ "type": "object",
+ "description": "Link to the current project.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ }
+ }
+ },
+ "api": {
+ "type": "object",
+ "nullable": true,
+ "description": "Link to the regional API endpoint. Only present if user has project-level access.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ }
+ }
+ },
+ "subscription": {
+ "type": "object",
+ "nullable": true,
+ "description": "Link to the subscription. Only present if project has a subscription.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ }
+ }
+ },
+ "view_usage_alerts": {
+ "type": "object",
+ "nullable": true,
+ "description": "Link to view usage alerts. Only present if user has view permission.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ }
+ }
+ },
+ "update": {
+ "type": "object",
+ "nullable": true,
+ "description": "Link for updating the current project. Only present if user has update permission.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ },
+ "method": {
+ "type": "string",
+ "description": "The HTTP method to use."
+ }
+ }
+ },
+ "plan_uri": {
+ "type": "object",
+ "nullable": true,
+ "description": "Link to the billing plan page. Only present if user has manage permission.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ }
+ }
+ },
+ "delete": {
+ "type": "object",
+ "nullable": true,
+ "description": "Link for deleting the current project. Only present if user has delete permission.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ },
+ "method": {
+ "type": "string",
+ "description": "The HTTP method to use."
+ }
+ }
+ },
+ "update_usage_alerts": {
+ "type": "object",
+ "nullable": true,
+ "description": "Link to update usage alerts. Only present if user has billing permission.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ },
+ "method": {
+ "type": "string",
+ "description": "The HTTP method to use."
+ }
+ }
+ },
+ "activities": {
+ "type": "object",
+ "nullable": true,
+ "description": "Link to the project's activities. Only present if user has view permission.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ }
+ }
+ },
+ "addons": {
+ "type": "object",
+ "nullable": true,
+ "description": "Link to the project's add-ons. Only present if user has view permission.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ }
+ }
+ }
+ }
+ }
+ },
+ "additionalProperties": false
+ },
+ "OrganizationCarbon": {
+ "type": "object",
+ "properties": {
+ "organization_id": {
+ "$ref": "#/components/schemas/OrganizationID"
+ },
+ "meta": {
+ "$ref": "#/components/schemas/MetricsMetadata"
+ },
+ "projects": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/OrganizationProjectCarbon"
+ }
+ },
+ "total": {
+ "$ref": "#/components/schemas/CarbonTotal"
+ }
+ },
+ "additionalProperties": false
+ },
+ "ProjectCarbon": {
+ "type": "object",
+ "properties": {
+ "project_id": {
+ "$ref": "#/components/schemas/ProjectID"
+ },
+ "project_title": {
+ "$ref": "#/components/schemas/ProjectTitle"
+ },
+ "meta": {
+ "$ref": "#/components/schemas/MetricsMetadata"
+ },
+ "values": {
+ "$ref": "#/components/schemas/MetricsValues"
+ },
+ "total": {
+ "$ref": "#/components/schemas/CarbonTotal"
+ }
+ },
+ "additionalProperties": false
+ },
+ "OrganizationProjectCarbon": {
+ "type": "object",
+ "properties": {
+ "project_id": {
+ "$ref": "#/components/schemas/ProjectID"
+ },
+ "project_title": {
+ "$ref": "#/components/schemas/ProjectTitle"
+ },
+ "values": {
+ "$ref": "#/components/schemas/MetricsValues"
+ }
+ },
+ "additionalProperties": false
+ },
+ "ProjectOptionsAggregated": {
+ "type": "object",
+ "properties": {
+ "billing": {
+ "type": "object",
+ "nullable": true
+ },
+ "defaults": {
+ "type": "object",
+ "nullable": true
+ },
+ "enforced": {
+ "type": "object",
+ "nullable": true
+ },
+ "initialize": {
+ "type": "object",
+ "nullable": true
+ },
+ "plans": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "nullable": true
+ },
+ "regions": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "nullable": true
+ },
+ "plan_titles": {
+ "type": "object",
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/PlanTitles"
+ }
+ ],
+ "nullable": true
+ },
+ "sellables": {
+ "type": "object",
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/AggregatedSellables"
+ }
+ ],
+ "nullable": true
+ },
+ "features": {
+ "type": "object",
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/AggregatedFeatures"
+ }
+ ],
+ "nullable": true
+ },
+ "container_sizes": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "nullable": true,
+ "description": "Container sizes configuration."
+ },
+ "debug": {
+ "type": "object",
+ "nullable": true,
+ "description": "Debug configuration."
+ }
+ },
+ "additionalProperties": false
+ },
+ "ProjectPlan": {
+ "type": "string",
+ "description": "The project plan."
+ },
+ "ProjectReference": {
+ "description": "The referenced project, or null if it no longer exists.",
+ "type": "object",
+ "nullable": true,
+ "required": [
+ "id",
+ "organization_id",
+ "subscription_id",
+ "region",
+ "title",
+ "type",
+ "plan",
+ "status",
+ "created_at",
+ "updated_at"
+ ],
+ "properties": {
+ "id": {
+ "$ref": "#/components/schemas/ProjectID"
+ },
+ "organization_id": {
+ "$ref": "#/components/schemas/OrganizationID"
+ },
+ "subscription_id": {
+ "$ref": "#/components/schemas/SubscriptionID"
+ },
+ "region": {
+ "$ref": "#/components/schemas/RegionID"
+ },
+ "title": {
+ "$ref": "#/components/schemas/ProjectTitle"
+ },
+ "type": {
+ "$ref": "#/components/schemas/ProjectType"
+ },
+ "plan": {
+ "$ref": "#/components/schemas/ProjectPlan"
+ },
+ "status": {
+ "$ref": "#/components/schemas/ProjectStatus"
+ },
+ "created_at": {
+ "$ref": "#/components/schemas/CreatedAt"
+ },
+ "updated_at": {
+ "$ref": "#/components/schemas/UpdatedAt"
+ },
+ "invoiced": {
+ "type": "boolean",
+ "description": "Whether the project is invoiced."
+ }
+ },
+ "additionalProperties": false
+ },
+ "RegionReference": {
+ "description": "The referenced region, or null if it no longer exists.",
+ "type": "object",
+ "nullable": true,
+ "required": [
+ "id",
+ "label",
+ "zone",
+ "selection_label",
+ "project_label",
+ "timezone",
+ "available",
+ "endpoint",
+ "provider",
+ "datacenter",
+ "compliance",
+ "created_at",
+ "updated_at"
+ ],
+ "properties": {
+ "id": {
+ "$ref": "#/components/schemas/RegionID"
+ },
+ "label": {
+ "$ref": "#/components/schemas/RegionLabel"
+ },
+ "zone": {
+ "$ref": "#/components/schemas/RegionZone"
+ },
+ "selection_label": {
+ "$ref": "#/components/schemas/RegionSelectionLabel"
+ },
+ "project_label": {
+ "$ref": "#/components/schemas/RegionProjectLabel"
+ },
+ "timezone": {
+ "$ref": "#/components/schemas/RegionTimezone"
+ },
+ "available": {
+ "$ref": "#/components/schemas/RegionAvailable"
+ },
+ "private": {
+ "$ref": "#/components/schemas/RegionPrivate"
+ },
+ "endpoint": {
+ "$ref": "#/components/schemas/RegionEndpoint"
+ },
+ "provider": {
+ "$ref": "#/components/schemas/RegionProvider"
+ },
+ "datacenter": {
+ "$ref": "#/components/schemas/RegionDatacenter"
+ },
+ "envimpact": {
+ "$ref": "#/components/schemas/RegionEnvImpact"
+ },
+ "compliance": {
+ "$ref": "#/components/schemas/RegionCompliance"
+ },
+ "created_at": {
+ "$ref": "#/components/schemas/CreatedAt"
+ },
+ "updated_at": {
+ "$ref": "#/components/schemas/UpdatedAt"
+ },
+ "environmental_impact": {
+ "type": "object",
+ "description": "Environmental impact information for the region."
+ }
+ },
+ "additionalProperties": false
+ },
+ "ProjectID": {
+ "type": "string",
+ "description": "The ID of the project."
+ },
+ "OrganizationID": {
+ "type": "string",
+ "description": "The ID of the organization."
+ },
+ "SubscriptionID": {
+ "type": "string",
+ "description": "The ID of the subscription."
+ },
+ "RegionID": {
+ "type": "string",
+ "description": "The machine name of the region where the project is located."
+ },
+ "ProjectTitle": {
+ "type": "string",
+ "description": "The title of the project."
+ },
+ "ProjectType": {
+ "type": "string",
+ "description": "The type of projects.",
+ "enum": [
+ "grid",
+ "dedicated"
+ ]
+ },
+ "ProjectTimeZone": {
+ "type": "string",
+ "description": "Timezone of the project."
+ },
+ "ProjectDefaultBranch": {
+ "type": "string",
+ "description": "Default branch."
+ },
+ "ProjectStatus": {
+ "type": "string",
+ "description": "The status of the project.",
+ "enum": [
+ "requested",
+ "active",
+ "failed",
+ "suspended",
+ "deleted"
+ ]
+ },
+ "ProjectDedicatedTag": {
+ "type": "string",
+ "description": "Dedicated tag."
+ },
+ "ProjectUI": {
+ "description": "The URL for the project's user interface.",
+ "type": "string"
+ },
+ "ProjectTrialPlan": {
+ "description": "Whether the project is currently on a trial plan.",
+ "type": "boolean"
+ },
+ "PlanTitles": {
+ "type": "object",
+ "description": "Map of plan IDs to their human-readable titles.",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "AggregatedSellables": {
+ "type": "object",
+ "description": "Map of sellable names to their configuration.",
+ "additionalProperties": {
+ "type": "object",
+ "description": "Sellable product configuration."
+ }
+ },
+ "AggregatedFeatures": {
+ "type": "object",
+ "properties": {
+ "backups": {
+ "type": "object",
+ "nullable": true,
+ "description": "Backup features configuration."
+ }
+ }
+ },
+ "RegionLabel": {
+ "type": "string",
+ "description": "The human-readable name of the region."
+ },
+ "RegionZone": {
+ "type": "string",
+ "description": "The geographical zone of the region."
+ },
+ "RegionSelectionLabel": {
+ "type": "string",
+ "description": "The label to display when choosing between regions for new projects."
+ },
+ "RegionProjectLabel": {
+ "type": "string",
+ "description": "The label to display on existing projects."
+ },
+ "RegionTimezone": {
+ "type": "string",
+ "description": "Default timezone of the region."
+ },
+ "RegionAvailable": {
+ "type": "boolean",
+ "description": "Indicator whether or not this region is selectable during the checkout. Not available regions will never show up during checkout."
+ },
+ "RegionPrivate": {
+ "type": "boolean",
+ "description": "Indicator whether or not this platform is for private use only."
+ },
+ "RegionEndpoint": {
+ "type": "string",
+ "description": "Link to the region API endpoint."
+ },
+ "RegionProvider": {
+ "type": "object",
+ "description": "Information about the region provider.",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the cloud provider."
+ },
+ "logo": {
+ "type": "string",
+ "description": "The logo of the cloud provider (base64 encoded SVG)."
+ }
+ },
+ "additionalProperties": false
+ },
+ "RegionDatacenter": {
+ "type": "object",
+ "description": "Information about the region provider data center.",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name/identifier of the data center."
+ },
+ "label": {
+ "type": "string",
+ "description": "The human-readable label of the data center."
+ },
+ "location": {
+ "type": "string",
+ "description": "The physical location of the data center."
+ }
+ },
+ "additionalProperties": false
+ },
+ "RegionEnvImpact": {
+ "type": "object",
+ "description": "Information about the region provider's environmental impact.",
+ "properties": {
+ "zone": {
+ "type": "string",
+ "description": "The geographical zone code for carbon intensity."
+ },
+ "carbon_intensity": {
+ "type": "number",
+ "description": "The carbon intensity value."
+ },
+ "carbon_intensity_source": {
+ "type": "string",
+ "description": "The source of the carbon intensity data."
+ },
+ "green": {
+ "type": "boolean",
+ "description": "Indicator whether the data center uses green energy."
+ }
+ },
+ "additionalProperties": false
+ },
+ "RegionCompliance": {
+ "type": "object",
+ "description": "Information about the region's compliance.",
+ "properties": {
+ "hipaa": {
+ "type": "boolean",
+ "description": "Indicator whether or not this region is HIPAA compliant."
+ }
+ },
+ "additionalProperties": false
+ },
+ "MetricsMetadata": {
+ "type": "object",
+ "properties": {
+ "from": {
+ "description": "The value used to calculate the lower bound of the temporal query. Inclusive."
+ },
+ "to": {
+ "description": "The truncated value used to calculate the upper bound of the temporal query. Exclusive."
+ },
+ "interval": {
+ "description": "The interval used to group the metric values."
+ },
+ "units": {
+ "description": "The units associated with the provided values."
+ }
+ },
+ "additionalProperties": false
+ },
+ "MetricsValues": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/MetricsValue"
+ }
+ },
+ "MetricsValue": {
+ "type": "object",
+ "properties": {
+ "value": {
+ "description": "The measured value of the metric for the given time interval."
+ },
+ "start_time": {
+ "description": "The timestamp at which the time interval began."
+ }
+ },
+ "additionalProperties": false
+ },
+ "CarbonTotal": {
+ "type": "number",
+ "description": "The calculated total of the metric for the given interval."
+ },
+ "History": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "The unique identifier of the history record."
+ },
+ "project_id": {
+ "type": "string",
+ "description": "The ID of the project."
+ },
+ "event_type": {
+ "type": "string",
+ "description": "The type of event that triggered the record."
+ },
+ "event_id": {
+ "type": "string",
+ "description": "The ID of the event."
+ },
+ "resource": {
+ "type": "string",
+ "description": "The resource type (e.g., cpu_app, memory_services, storage)."
+ },
+ "environment": {
+ "type": "string",
+ "description": "The environment name."
+ },
+ "quantity": {
+ "type": "string",
+ "description": "The quantity of the resource."
+ },
+ "timestamp": {
+ "type": "string",
+ "format": "date-time",
+ "description": "The timestamp when the record was created."
+ },
+ "user": {
+ "type": "string",
+ "description": "The ID of the user who triggered the event."
+ }
+ },
+ "additionalProperties": false
+ },
+ "CreatedAt": {
+ "type": "string",
+ "format": "date-time",
+ "description": "The date and time when the resource was created."
+ },
+ "UpdatedAt": {
+ "type": "string",
+ "format": "date-time",
+ "description": "The date and time when the resource was last updated."
+ },
+ "GrantedAt": {
+ "type": "string",
+ "format": "date-time",
+ "description": "The date and time when the access was granted."
+ },
+ "TeamProjectAccess": {
+ "type": "object",
+ "properties": {
+ "team_id": {
+ "type": "string",
+ "format": "ulid",
+ "description": "The ID of the team."
+ },
+ "organization_id": {
+ "type": "string",
+ "format": "ulid",
+ "description": "The ID of the organization."
+ },
+ "project_id": {
+ "type": "string",
+ "description": "The ID of the project."
+ },
+ "project_title": {
+ "type": "string",
+ "description": "The title of the project."
+ },
+ "granted_at": {
+ "$ref": "#/components/schemas/GrantedAt"
+ },
+ "updated_at": {
+ "$ref": "#/components/schemas/UpdatedAt"
+ },
+ "_links": {
+ "type": "object",
+ "properties": {
+ "self": {
+ "type": "object",
+ "description": "Link to the current access item.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ }
+ }
+ },
+ "update": {
+ "type": "object",
+ "nullable": true,
+ "description": "Link for updating the current access item. Only present if user has update permission.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ },
+ "method": {
+ "type": "string",
+ "description": "The HTTP method to use."
+ }
+ }
+ },
+ "delete": {
+ "type": "object",
+ "nullable": true,
+ "description": "Link for deleting the current access item. Only present if user has delete permission.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ },
+ "method": {
+ "type": "string",
+ "description": "The HTTP method to use."
+ }
+ }
+ }
+ }
+ }
+ },
+ "additionalProperties": false
+ },
+ "UserProjectAccess": {
+ "type": "object",
+ "properties": {
+ "user_id": {
+ "type": "string",
+ "format": "uuid",
+ "description": "The ID of the user."
+ },
+ "organization_id": {
+ "type": "string",
+ "format": "ulid",
+ "description": "The ID of the organization."
+ },
+ "project_id": {
+ "type": "string",
+ "description": "The ID of the project."
+ },
+ "project_title": {
+ "type": "string",
+ "description": "The title of the project."
+ },
+ "permissions": {
+ "$ref": "#/components/schemas/ProjectPermissions"
+ },
+ "granted_at": {
+ "$ref": "#/components/schemas/GrantedAt"
+ },
+ "updated_at": {
+ "$ref": "#/components/schemas/UpdatedAt"
+ },
+ "_links": {
+ "type": "object",
+ "properties": {
+ "self": {
+ "type": "object",
+ "description": "Link to the current access item.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ }
+ }
+ },
+ "update": {
+ "type": "object",
+ "nullable": true,
+ "description": "Link for updating the current access item. Only present if user has update permission.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ },
+ "method": {
+ "type": "string",
+ "description": "The HTTP method to use."
+ }
+ }
+ },
+ "delete": {
+ "type": "object",
+ "nullable": true,
+ "description": "Link for deleting the current access item. Only present if user has delete permission.",
+ "properties": {
+ "href": {
+ "type": "string",
+ "description": "URL of the link."
+ },
+ "method": {
+ "type": "string",
+ "description": "The HTTP method to use."
+ }
+ }
+ }
+ }
+ }
+ },
+ "additionalProperties": false
+ },
+ "ProjectPermissions": {
+ "type": "array",
+ "description": "An array of project permissions.",
+ "items": {
+ "type": "string",
+ "enum": [
+ "admin",
+ "viewer",
+ "development:admin",
+ "development:contributor",
+ "development:viewer",
+ "staging:admin",
+ "staging:contributor",
+ "staging:viewer",
+ "production:admin",
+ "production:contributor",
+ "production:viewer"
+ ]
+ }
+ },
+ "ProjectFacets": {
+ "type": "object",
+ "description": "Facets for filtering options.",
+ "properties": {
+ "plans": {
+ "type": "object",
+ "description": "Map of plan IDs to plan names.",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "nullable": true
+ }
+ },
+ "additionalProperties": false
+ },
+ "InvoicePDF": {
+ "description": "Invoice PDF document details.",
+ "properties": {
+ "url": {
+ "description": "A link to the PDF invoice.",
+ "type": "string"
+ },
+ "status": {
+ "description": "The status of the PDF document. We generate invoice PDF asyncronously in batches. An invoice PDF document may not be immediately available to download. If status is 'ready', the PDF is ready to download. 'pending' means the PDF is not created but queued up. If you get this status, try again later.",
+ "type": "string",
+ "enum": [
+ "ready",
+ "pending"
+ ]
+ }
+ },
+ "type": "object"
+ },
+ "Order": {
+ "description": "The order object.",
+ "properties": {
+ "id": {
+ "description": "The ID of the order.",
+ "type": "string"
+ },
+ "status": {
+ "description": "The status of the subscription.",
+ "type": "string",
+ "enum": [
+ "completed",
+ "past_due",
+ "pending",
+ "canceled",
+ "payment_failed_soft_decline",
+ "payment_failed_hard_decline"
+ ]
+ },
+ "owner": {
+ "description": "The UUID of the owner.",
+ "type": "string",
+ "format": "uuid"
+ },
+ "address": {
+ "$ref": "#/components/schemas/Address"
+ },
+ "company": {
+ "description": "The company name.",
+ "type": "string"
+ },
+ "vat_number": {
+ "description": "An identifier used in many countries for value added tax purposes.",
+ "type": "string"
+ },
+ "billing_period_start": {
+ "description": "The time when the billing period of the order started.",
+ "type": "string",
+ "format": "date-time"
+ },
+ "billing_period_end": {
+ "description": "The time when the billing period of the order ended.",
+ "type": "string",
+ "format": "date-time"
+ },
+ "billing_period_label": {
+ "description": "Descriptive information about the billing cycle.",
+ "properties": {
+ "formatted": {
+ "description": "The renderable label for the billing cycle.",
+ "type": "string"
+ },
+ "month": {
+ "description": "The month of the billing cycle.",
+ "type": "string"
+ },
+ "year": {
+ "description": "The year of the billing cycle.",
+ "type": "string"
+ },
+ "next_month": {
+ "description": "The name of the next month following this billing cycle.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "billing_period_duration": {
+ "description": "The duration of the billing period of the order in seconds.",
+ "type": "integer"
+ },
+ "paid_on": {
+ "description": "The time when the order was successfully charged.",
+ "type": "string",
+ "format": "date-time",
+ "nullable": true
+ },
+ "total": {
+ "description": "The total of the order.",
+ "type": "integer"
+ },
+ "total_formatted": {
+ "description": "The total of the order, formatted with currency.",
+ "type": "integer"
+ },
+ "components": {
+ "$ref": "#/components/schemas/Components"
+ },
+ "currency": {
+ "description": "The order currency code.",
+ "type": "string"
+ },
+ "invoice_url": {
+ "description": "A link to the PDF invoice.",
+ "type": "string"
+ },
+ "last_refreshed": {
+ "description": "The time when the order was last refreshed.",
+ "type": "string",
+ "format": "date-time"
+ },
+ "invoiced": {
+ "description": "The customer is invoiced.",
+ "type": "boolean"
+ },
+ "line_items": {
+ "description": "The line items that comprise the order.",
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/LineItem"
+ }
+ },
+ "_links": {
+ "description": "Links to related API endpoints.",
+ "properties": {
+ "invoices": {
+ "description": "Link to related Invoices API. Use this to retrieve invoices related to this order.",
+ "properties": {
+ "href": {
+ "description": "URL of the link",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "PlanRecords": {
+ "description": "The plan record object.",
+ "properties": {
+ "id": {
+ "description": "The unique ID of the plan record.",
+ "type": "string"
+ },
+ "owner": {
+ "description": "The UUID of the owner.",
+ "type": "string",
+ "format": "uuid"
+ },
+ "subscription_id": {
+ "description": "The ID of the subscription this record pertains to.",
+ "type": "string"
+ },
+ "sku": {
+ "description": "The product SKU of the plan that this record represents.",
+ "type": "string"
+ },
+ "plan": {
+ "description": "The machine name of the plan that this record represents.",
+ "type": "string"
+ },
+ "options": {
+ "type": "array",
+ "items": {
+ "description": "The SKU of an option.",
+ "type": "string"
+ }
+ },
+ "start": {
+ "description": "The start timestamp of this plan record (ISO 8601).",
+ "type": "string",
+ "format": "date-time"
+ },
+ "end": {
+ "description": "The end timestamp of this plan record (ISO 8601).",
+ "type": "string",
+ "format": "date-time",
+ "nullable": true
+ },
+ "status": {
+ "description": "The status of the subscription during this record: active or suspended.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "Usage": {
+ "description": "The usage object.",
+ "properties": {
+ "id": {
+ "description": "The unique ID of the usage record.",
+ "type": "string"
+ },
+ "subscription_id": {
+ "description": "The ID of the subscription.",
+ "type": "string"
+ },
+ "usage_group": {
+ "description": "The type of usage that this record represents.",
+ "type": "string"
+ },
+ "quantity": {
+ "description": "The quantity used.",
+ "type": "number"
+ },
+ "start": {
+ "description": "The start timestamp of this usage record (ISO 8601).",
+ "type": "string",
+ "format": "date-time"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "parameters": {
+ "filter_invoice_type": {
+ "name": "filter[type]",
+ "in": "query",
+ "description": "The invoice type. Use invoice for standard invoices, credit_memo for refund/credit invoices.",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "credit_memo",
+ "invoice"
+ ]
+ }
+ },
+ "filter_order_id": {
+ "name": "filter[order_id]",
+ "in": "query",
+ "description": "The order id of Invoice.",
+ "schema": {
+ "type": "string"
+ }
+ },
+ "filter_invoice_status": {
+ "name": "filter[status]",
+ "in": "query",
+ "description": "The status of the invoice.",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "paid",
+ "charged_off",
+ "pending",
+ "refunded",
+ "canceled",
+ "refund_pending"
+ ]
+ }
+ },
+ "mode": {
+ "name": "mode",
+ "in": "query",
+ "description": "The output mode.",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "details"
+ ]
+ }
+ },
+ "filter_order_status": {
+ "name": "filter[status]",
+ "in": "query",
+ "description": "The status of the order.",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "completed",
+ "past_due",
+ "pending",
+ "canceled",
+ "payment_failed_soft_decline",
+ "payment_failed_hard_decline"
+ ]
+ }
+ },
+ "filter_order_total": {
+ "name": "filter[total]",
+ "in": "query",
+ "description": "The total of the order.",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ "record_end": {
+ "name": "filter[end]",
+ "in": "query",
+ "description": "The end of the observation period for the record. E.g. filter[end]=2018-01-01 will display all records that were active on (i.e. they started before) 2018-01-01",
+ "schema": {
+ "type": "string",
+ "format": "date-time"
+ }
+ },
+ "record_ended_at": {
+ "name": "filter[ended_at]",
+ "in": "query",
+ "description": "The record's end timestamp. You can use this filter to list records ended after, or before a certain time. E.g. filter[ended_at][value]=2020-01-01&filter[ended_at][operator]=>",
+ "schema": {
+ "type": "string",
+ "format": "date-time"
+ }
+ },
+ "record_status": {
+ "name": "filter[status]",
+ "in": "query",
+ "description": "The status of the plan record. ",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "active",
+ "suspended"
+ ]
+ }
+ },
+ "record_usage_group": {
+ "name": "filter[usage_group]",
+ "in": "query",
+ "description": "Filter records by the type of usage.",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "storage",
+ "environments",
+ "user_licenses"
+ ]
+ }
+ },
+ "record_start": {
+ "name": "filter[start]",
+ "in": "query",
+ "description": "The start of the observation period for the record. E.g. filter[start]=2018-01-01 will display all records that were active (i.e. did not end) on 2018-01-01",
+ "schema": {
+ "type": "string",
+ "format": "date-time"
+ }
+ },
+ "record_started_at": {
+ "name": "filter[started_at]",
+ "in": "query",
+ "description": "The record's start timestamp. You can use this filter to list records started after, or before a certain time. E.g. filter[started_at][value]=2020-01-01&filter[started_at][operator]=>",
+ "schema": {
+ "type": "string",
+ "format": "date-time"
+ }
+ },
+ "discountId": {
+ "name": "id",
+ "in": "path",
+ "description": "The ID of the organization discount",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "subscription_id": {
+ "name": "subscriptionId",
+ "in": "path",
+ "description": "The ID of the subscription",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "filter_subscription_id": {
+ "name": "filter[subscription_id]",
+ "in": "query",
+ "description": "The ID of the subscription",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "subscription_plan": {
+ "name": "plan",
+ "in": "query",
+ "description": "The plan type of the subscription.",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "development",
+ "standard",
+ "medium",
+ "large",
+ "xlarge",
+ "2xlarge"
+ ]
+ }
+ },
+ "filter_subscription_plan": {
+ "name": "filter[plan]",
+ "in": "query",
+ "description": "The plan type of the subscription.",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "development",
+ "standard",
+ "medium",
+ "large",
+ "xlarge",
+ "2xlarge"
+ ]
+ }
+ },
+ "subscription_environments": {
+ "name": "environments",
+ "in": "query",
+ "description": "The number of environments which can be provisioned on the project.",
+ "schema": {
+ "type": "integer",
+ "default": null
+ }
+ },
+ "subscription_storage": {
+ "name": "storage",
+ "in": "query",
+ "description": "The total storage available to each environment, in MiB. Only multiples of 1024 are accepted as legal values.",
+ "schema": {
+ "type": "integer",
+ "default": null
+ }
+ },
+ "subscription_user_licenses": {
+ "name": "user_licenses",
+ "in": "query",
+ "description": "The number of user licenses.",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ "page": {
+ "name": "page",
+ "in": "query",
+ "description": "Page to be displayed. Defaults to 1.",
+ "required": false,
+ "schema": {
+ "type": "integer",
+ "format": "int32"
+ }
+ },
+ "user_id": {
+ "name": "userId",
+ "in": "path",
+ "description": "The UUID of the user",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "filter_ticket_id": {
+ "name": "filter[ticket_id]",
+ "in": "query",
+ "description": "The ID of the ticket.",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ "filter_created": {
+ "name": "filter[created]",
+ "in": "query",
+ "description": "ISO dateformat expected. The time when the support ticket was created.",
+ "schema": {
+ "type": "string",
+ "format": "date-time"
+ }
+ },
+ "filter_updated": {
+ "name": "filter[updated]",
+ "in": "query",
+ "description": "ISO dateformat expected. The time when the support ticket was updated.",
+ "schema": {
+ "type": "string",
+ "format": "date-time"
+ }
+ },
+ "filter_type": {
+ "name": "filter[type]",
+ "in": "query",
+ "description": "The type of the support ticket.",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "problem",
+ "task",
+ "incident",
+ "question"
+ ]
+ }
+ },
+ "filter_priority": {
+ "name": "filter[priority]",
+ "in": "query",
+ "description": "The priority of the support ticket.",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "low",
+ "normal",
+ "high",
+ "urgent"
+ ]
+ }
+ },
+ "filter_ticket_status": {
+ "name": "filter[status]",
+ "in": "query",
+ "description": "The status of the support ticket.",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "closed",
+ "deleted",
+ "hold",
+ "new",
+ "open",
+ "pending",
+ "solved"
+ ]
+ }
+ },
+ "filter_requester_id": {
+ "name": "filter[requester_id]",
+ "in": "query",
+ "description": "UUID of the ticket requester. Converted from the ZID value.",
+ "schema": {
+ "type": "string",
+ "format": "uuid"
+ }
+ },
+ "filter_submitter_id": {
+ "name": "filter[submitter_id]",
+ "in": "query",
+ "description": "UUID of the ticket submitter. Converted from the ZID value.",
+ "schema": {
+ "type": "string",
+ "format": "uuid"
+ }
+ },
+ "filter_assignee_id": {
+ "name": "filter[assignee_id]",
+ "in": "query",
+ "description": "UUID of the ticket assignee. Converted from the ZID value.",
+ "schema": {
+ "type": "string",
+ "format": "uuid"
+ }
+ },
+ "filter_has_incidents": {
+ "name": "filter[has_incidents]",
+ "in": "query",
+ "description": "Whether or not this ticket has incidents.",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ "filter_due": {
+ "name": "filter[due]",
+ "in": "query",
+ "description": "ISO dateformat expected. A time that the ticket is due at.",
+ "schema": {
+ "type": "string",
+ "format": "date-time"
+ }
+ },
+ "InvitationID": {
+ "name": "invitation_id",
+ "in": "path",
+ "required": true,
+ "description": "The ID of the invitation.",
+ "schema": {
+ "type": "string"
+ }
+ },
+ "OrganizationID": {
+ "name": "organization_id",
+ "in": "path",
+ "required": true,
+ "description": "The ID of the organization.",
+ "schema": {
+ "type": "string",
+ "format": "ulid"
+ }
+ },
+ "ProjectID": {
+ "name": "project_id",
+ "in": "path",
+ "required": true,
+ "description": "The ID of the project.",
+ "schema": {
+ "type": "string"
+ }
+ },
+ "TeamID": {
+ "name": "team_id",
+ "in": "path",
+ "required": true,
+ "description": "The ID of the team.",
+ "schema": {
+ "type": "string"
+ }
+ },
+ "UserID": {
+ "name": "user_id",
+ "in": "path",
+ "required": true,
+ "description": "The ID of the user.",
+ "schema": {
+ "type": "string",
+ "example": "d81c8ee2-44b3-429f-b944-a33ad7437690",
+ "format": "uuid"
+ }
+ },
+ "OrganizationIDName": {
+ "in": "path",
+ "name": "organization_id",
+ "description": "The ID of the organization.