diff --git a/schema/openapispec-upsun.json b/schema/openapispec-upsun.json index 60f7f3b..3e055ec 100644 --- a/schema/openapispec-upsun.json +++ b/schema/openapispec-upsun.json @@ -8,7 +8,7 @@ "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", + "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", @@ -54,7 +54,11 @@ }, { "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" + "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", @@ -72,6 +76,10 @@ "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" @@ -98,7 +106,7 @@ }, { "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" + "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", @@ -127,9 +135,238 @@ { "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" + } + }, + "x-property-id-kebab": "query-organiation-carbon", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationCarbon" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationCarbon" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationCarbon", + "x-description": [ + "Queries the carbon emission data for all projects owned by the specified organiation." + ] + } + }, + "/organizations/{organization_id}/addons": { + "get": { + "summary": "Get add-ons", + "description": "Retrieves information about the add-ons for an organization.", + "operationId": "get-org-addons", + "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", + "x-property-id-kebab": "get-org-addons", + "x-tag-id-kebab": "Add-ons", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationAddonsObject" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationAddonsObject" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationAddonsObject", + "x-description": [ + "Retrieves information about the add-ons for an organization." + ] + }, + "patch": { + "summary": "Update organization add-ons", + "description": "Updates the add-ons configuration for an organization.", + "operationId": "update-org-addons", + "tags": [ + "Add-ons" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "user_management": { + "type": "string", + "description": "The user management level to apply.", + "enum": [ + "standard", + "enhanced" + ], + "example": "standard" + }, + "support_level": { + "type": "string", + "description": "The support level to apply.", + "enum": [ + "basic", + "premium" + ], + "example": "basic" + } + }, + "additionalProperties": false, + "minProperties": 1 + } + } + } + }, + "responses": { + "200": { + "description": "Add-ons updated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationAddonsObject" + } + } + } + }, + "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" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-vendor": "upsun", + "x-property-id-kebab": "update-org-addons", + "x-tag-id-kebab": "Add-ons", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationAddonsObject" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationAddonsObject" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationAddonsObject", + "x-description": [ + "Updates the add-ons configuration for an organization." + ] + } + }, "/alerts/subscriptions/{subscriptionId}/usage": { "get": { "tags": [ @@ -173,13 +410,15 @@ "x-property-id-kebab": "get-usage-alerts", "x-tag-id-kebab": "Alerts", "x-return-types-displayReturn": false, - "x-return-types": [ - "object" - ], "x-phpdoc": { "return": "object" }, - "x-returnable": true + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "object" + ] }, "patch": { "tags": [ @@ -241,5085 +480,6696 @@ "x-property-id-kebab": "update-usage-alerts", "x-tag-id-kebab": "Alerts", "x-return-types-displayReturn": false, - "x-return-types": [ - "object" - ], "x-phpdoc": { "return": "object" }, - "x-returnable": true + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "object" + ] } }, - "/orders/download": { + "/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": [ - "Orders" + "Api Tokens" ], - "summary": "Download an invoice.", - "operationId": "download-invoice", - "parameters": [ - { - "name": "token", - "in": "query", - "description": "JWT for invoice.", - "required": true, - "schema": { - "type": "string" + "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" + } + } } } + }, + "x-property-id-kebab": "list-api-tokens", + "x-tag-id-kebab": "Api-Tokens", + "x-return-types-displayReturn": true, + "x-phpdoc": { + "return": "\\Upsun\\Model\\ApiToken[]" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\ApiToken[]" + ], + "x-return-types-union": "array", + "x-description": [ + "Retrieves a list of API tokens associated with a single user." + ] + }, + "post": { + "summary": "Create an API token", + "description": "Creates an API token", + "operationId": "create-api-token", + "tags": [ + "Api Tokens" ], "responses": { - "200": { - "description": "An invoice PDF.", + "201": { + "description": "Created", "content": { - "application/pdf": {} + "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" + } + } } } }, - "x-property-id-kebab": "download-invoice", - "x-tag-id-kebab": "Orders", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The token name." + } + }, + "required": [ + "name" + ] + } + } + } + }, + "x-property-id-kebab": "create-api-token", + "x-tag-id-kebab": "Api-Tokens", "x-return-types-displayReturn": false, - "x-return-types": [ - "string" - ], - "x-return-types-union": "string", "x-phpdoc": { - "return": false + "return": "\\Upsun\\Model\\ApiToken" }, - "x-returnable": true + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\ApiToken" + ], + "x-return-types-union": "\\Upsun\\Model\\ApiToken", + "x-description": [ + "Creates an API token" + ] } }, - "/discounts/{id}": { + "/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": [ - "Discounts" - ], - "summary": "Get an organization discount", - "operationId": "get-discount", - "parameters": [ - { - "$ref": "#/components/parameters/discountId" - } + "Api Tokens" ], "responses": { "200": { - "description": "A discount object", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Discount" + "$ref": "#/components/schemas/ApiToken" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } + }, + "404": { + "description": "Not Found" } }, - "x-vendor": "upsun", - "x-property-id-kebab": "get-discount", - "x-tag-id-kebab": "Discounts", + "x-property-id-kebab": "get-api-token", + "x-tag-id-kebab": "Api-Tokens", "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\ApiToken" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, "x-return-types": [ - "\\Upsun\\Model\\Discount" + "\\Upsun\\Model\\ApiToken" ], - "x-return-types-union": "\\Upsun\\Model\\Discount", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Discount" + "x-return-types-union": "\\Upsun\\Model\\ApiToken", + "x-description": [ + "Retrieves the specified API token." + ] + }, + "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" + } }, - "x-returnable": true + "x-property-id-kebab": "delete-api-token", + "x-tag-id-kebab": "Api-Tokens", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-description": [ + "Deletes an API token" + ] } }, - "/discounts/types/allowance": { + "/projects/{projectId}/environments/{environmentId}/autoscaling/settings": { "get": { "tags": [ - "Discounts" + "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" + } + } ], - "summary": "Get the value of the First Project Incentive discount", - "operationId": "get-type-allowance", "responses": { - "200": { - "description": "A discount object", + "default": { + "description": "Autoscaler settings", "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" + "$ref": "#/components/schemas/AutoscalerSettings" } } } } }, - "x-vendor": "upsun", - "x-property-id-kebab": "get-type-allowance", - "x-tag-id-kebab": "Discounts", + "summary": "Retrieves Autoscaler settings", + "x-property-id-kebab": "get-autoscaler-settings", + "x-tag-id-kebab": "Autoscaling", "x-return-types-displayReturn": false, - "x-return-types": [ - "object" - ], "x-phpdoc": { - "return": "object" - }, - "x-returnable": true - } - }, - "/me": { - "get": { - "tags": [ - "Users" - ], - "summary": "Get current logged-in user info", - "description": "Retrieve information about the currently logged-in user (the user associated with the access token).", - "operationId": "get-current-user-deprecated", - "responses": { - "200": { - "description": "The user object.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CurrentUser" - } - } - } - } + "return": "\\Upsun\\Model\\AutoscalerSettings" }, - "x-deprecated": true, - "x-property-id-kebab": "get-current-user-deprecated", - "x-tag-id-kebab": "Users", - "x-return-types-displayReturn": false, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, "x-return-types": [ - "\\Upsun\\Model\\CurrentUser" + "\\Upsun\\Model\\AutoscalerSettings" ], - "x-return-types-union": "\\Upsun\\Model\\CurrentUser", - "x-phpdoc": { - "return": "\\Upsun\\Model\\CurrentUser" - }, - "x-returnable": true, + "x-return-types-union": "\\Upsun\\Model\\AutoscalerSettings", "x-description": [ - "Retrieve information about the currently logged-in user (the user associated with the access token)." + "Retrieves Autoscaler settings" ] - } - }, - "/ssh_keys/{key_id}": { - "get": { + }, + "post": { "tags": [ - "Ssh Keys" + "Autoscaling" ], - "summary": "Get an SSH key", - "operationId": "get-ssh-key", + "description": "Updates Autoscaler settings", + "operationId": "post-autoscaler-settings", "parameters": [ { - "name": "key_id", + "name": "projectId", "in": "path", - "description": "The ID of the ssh key.", + "description": "A string that uniquely identifies the project", "required": true, "schema": { - "type": "integer" + "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": "A single SSH public key record.", + "description": "Updated Autoscaler settings", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SshKey" + "$ref": "#/components/schemas/AutoscalerSettings" } } } } }, - "x-property-id-kebab": "get-ssh-key", - "x-tag-id-kebab": "Ssh-Keys", + "summary": "Updates Autoscaler settings", + "x-property-id-kebab": "post-autoscaler-settings", + "x-tag-id-kebab": "Autoscaling", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\SshKey" - ], - "x-return-types-union": "\\Upsun\\Model\\SshKey", "x-phpdoc": { - "return": "\\Upsun\\Model\\SshKey" + "return": "\\Upsun\\Model\\AutoscalerSettings" }, - "x-returnable": true + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AutoscalerSettings" + ], + "x-return-types-union": "\\Upsun\\Model\\AutoscalerSettings", + "x-description": [ + "Updates Autoscaler settings" + ] }, - "delete": { + "patch": { "tags": [ - "Ssh Keys" + "Autoscaling" ], - "summary": "Delete an SSH key", - "operationId": "delete-ssh-key", + "description": "Modifies Autoscaler settings", + "operationId": "patch-autoscaler-settings", "parameters": [ { - "name": "key_id", + "name": "projectId", "in": "path", - "description": "The ID of the ssh key.", + "description": "A string that uniquely identifies the project", "required": true, "schema": { - "type": "integer" + "type": "string" + } + }, + { + "name": "environmentId", + "in": "path", + "description": "A string that uniquely identifies the project environment", + "required": true, + "schema": { + "type": "string" } } ], - "responses": { - "204": { - "description": "Success." - } - }, - "x-property-id-kebab": "delete-ssh-key", - "x-tag-id-kebab": "Ssh-Keys", - "x-return-types-displayReturn": false, - "x-return-types": [ - "void" - ], - "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false - } - }, - "/ssh_keys": { - "post": { - "tags": [ - "Ssh Keys" - ], - "summary": "Add a new public SSH key to a user", - "operationId": "create-ssh-key", "requestBody": { + "description": "Settings to modify", "content": { "application/json": { "schema": { - "required": [ - "value" - ], - "properties": { - "value": { - "description": "The value of the ssh key.", - "type": "string" - }, - "title": { - "description": "The title of the ssh key.", - "type": "string" - }, - "uuid": { - "description": "The uuid of the user.", - "type": "string" - } - }, - "type": "object" - } - } - } - }, - "responses": { - "201": { - "description": "The newly created ssh key.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SshKey" - } + "$ref": "#/components/schemas/AutoscalerSettings" } } } }, - "x-property-id-kebab": "create-ssh-key", - "x-tag-id-kebab": "Ssh-Keys", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\SshKey" - ], - "x-return-types-union": "\\Upsun\\Model\\SshKey", - "x-phpdoc": { - "return": "\\Upsun\\Model\\SshKey" - }, - "x-returnable": true - } - }, - "/me/phone": { - "post": { - "tags": [ - "Users" - ], - "summary": "Check if phone verification is required", - "description": "Find out if the current logged in user requires phone verification to create projects.", - "operationId": "get-current-user-verification-status", "responses": { "200": { - "description": "The information pertinent to determine if the account requires phone verification before project creation.", + "description": "Updated Autoscaler settings", "content": { "application/json": { "schema": { - "properties": { - "verify_phone": { - "description": "Does this user need to verify their phone number for project creation.", - "type": "boolean" - } - }, - "type": "object" + "$ref": "#/components/schemas/AutoscalerSettings" } } } } }, - "x-property-id-kebab": "get-current-user-verification-status", - "x-tag-id-kebab": "Users", + "summary": "Modifies Autoscaler settings", + "x-property-id-kebab": "patch-autoscaler-settings", + "x-tag-id-kebab": "Autoscaling", "x-return-types-displayReturn": false, - "x-return-types": [ - "object" - ], "x-phpdoc": { - "return": "object" + "return": "\\Upsun\\Model\\AutoscalerSettings" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, - "x-description": [ - "Find out if the current logged in user requires phone verification to create projects." - ] - } - }, - "/me/verification": { - "post": { - "tags": [ - "Users" - ], - "summary": "Check if verification is required", - "description": "Find out if the current logged in user requires verification (phone or staff) to create projects.", - "operationId": "get-current-user-verification-status-full", - "responses": { - "200": { - "description": "The information pertinent to determine if the account requires any type of verification before project creation.", - "content": { - "application/json": { - "schema": { - "properties": { - "state": { - "description": "Does this user need verification for project creation.", - "type": "boolean" - }, - "type": { - "description": "What type of verification is needed (phone or ticket)", - "type": "string" - } - }, - "type": "object" - } - } - } - } - }, - "x-property-id-kebab": "get-current-user-verification-status-full", - "x-tag-id-kebab": "Users", - "x-return-types-displayReturn": false, "x-return-types": [ - "object" + "\\Upsun\\Model\\AutoscalerSettings" ], - "x-phpdoc": { - "return": "object" - }, - "x-returnable": true, + "x-return-types-union": "\\Upsun\\Model\\AutoscalerSettings", "x-description": [ - "Find out if the current logged in user requires verification (phone or staff) to create projects." + "Modifies Autoscaler settings" ] } }, - "/subscriptions/{subscriptionId}/can-update": { + "/projects/{projectId}/environments/{environmentId}/observability/server/caches": { "get": { "tags": [ - "Subscriptions" + "Blackfire Monitoring" ], - "summary": "Checks if the user is able to update a project.", - "operationId": "can-update-subscription", + "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": [ { - "$ref": "#/components/parameters/subscription_id" + "name": "projectId", + "in": "path", + "description": "The unique identifier of the Upsun project", + "required": true, + "schema": { + "type": "string", + "pattern": "[a-z0-9]+", + "example": "abc123def456" + } }, { - "$ref": "#/components/parameters/subscription_plan" + "name": "environmentId", + "in": "path", + "description": "The environment identifier", + "required": true, + "schema": { + "type": "string", + "pattern": ".+", + "example": "main" + } }, { - "$ref": "#/components/parameters/subscription_environments" + "name": "from", + "in": "query", + "description": "Start timestamp for the time range (Unix timestamp in seconds)", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "example": 1704067200 + } }, { - "$ref": "#/components/parameters/subscription_storage" + "name": "to", + "in": "query", + "description": "End timestamp for the time range (Unix timestamp in seconds)", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "example": 1704153600 + } }, { - "$ref": "#/components/parameters/subscription_user_licenses" - } - ], - "responses": { - "200": { - "description": "Check result with error message if presented", - "content": { - "application/json": { - "schema": { - "properties": { - "can_update": { - "description": "Boolean result of the check.", - "type": "boolean" - }, - "message": { - "description": "Details in case of negative check result.", - "type": "string" - }, - "required_action": { - "description": "Required action impeding project update.", - "type": "object" - } - }, - "type": "object" - } - } + "name": "grain", + "in": "query", + "description": "Granularity of data points in seconds. Auto-calculated if omitted.", + "required": false, + "schema": { + "type": "integer", + "example": 10 } - } - }, - "x-property-id-kebab": "can-update-subscription", - "x-tag-id-kebab": "Subscriptions", - "x-return-types-displayReturn": false, - "x-return-types": [ - "object" - ], - "x-phpdoc": { - "return": "object" - }, - "x-returnable": true - } - }, - "/subscriptions/{subscriptionId}/can-afford": { - "post": { - "tags": [ - "Subscriptions" - ], - "summary": "Checks if the user can afford the requested resources.", - "operationId": "can-afford-subscription", - "parameters": [ + }, { - "$ref": "#/components/parameters/subscription_id" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "resources": { - "description": "A map of resource keys to quantities (both strings).", - "type": "object", - "additionalProperties": {} - } - }, - "type": "object" + "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" + ] } } - } - }, - "responses": { - "200": { - "description": "Proposed resource change is affordable." }, - "402": { - "description": "Proposed change is not affordable." + { + "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" + ] + } } - }, - "x-property-id-kebab": "can-afford-subscription", - "x-tag-id-kebab": "Subscriptions", - "x-return-types-displayReturn": false, - "x-return-types": [ - "void" - ], - "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false - } - }, - "/profiles": { - "get": { - "tags": [ - "User Profiles" ], - "summary": "List user profiles", - "operationId": "list-profiles", "responses": { "200": { - "description": "The list of user profiles.", + "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": { - "count": { - "description": "Total number of results.", - "type": "integer" + "_grain": { + "description": "Data granularity in seconds", + "type": "integer", + "example": 5 }, - "profiles": { - "description": "Array of user profiles.", + "_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": { - "$ref": "#/components/schemas/Profile" + "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 }, - "_links": { - "$ref": "#/components/schemas/HalLinks" + { + "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" + "type": "object", + "additionalProperties": false } } } - } - }, - "x-property-id-kebab": "list-profiles", - "x-tag-id-kebab": "User-Profiles", - "x-return-types-displayReturn": false, - "x-return-types": [ - "object" - ], - "x-phpdoc": { - "return": "object" - }, - "x-returnable": true - } - }, - "/profiles/{userId}": { - "get": { - "tags": [ - "User Profiles" - ], - "summary": "Get a single user profile", - "operationId": "get-profile", - "parameters": [ - { - "$ref": "#/components/parameters/user_id" - } - ], - "responses": { - "200": { - "description": "A User profile object", + }, + "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": { - "$ref": "#/components/schemas/Profile" + "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 } } } } }, - "x-property-id-kebab": "get-profile", - "x-tag-id-kebab": "User-Profiles", + "x-property-id-kebab": "blackfire_php_server_caches", + "x-tag-id-kebab": "Blackfire-Monitoring", "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, "x-return-types": [ - "\\Upsun\\Model\\Profile" + "mixed" ], - "x-return-types-union": "\\Upsun\\Model\\Profile", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Profile" - }, - "x-returnable": true - }, - "patch": { + "x-return-types-union": "mixed", + "x-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.)." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/observability/server": { + "get": { "tags": [ - "User Profiles" + "Blackfire Monitoring" ], - "summary": "Update a user profile", - "description": "Update a user profile, supplying one or more key/value pairs to to change.", - "operationId": "update-profile", + "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": [ { - "$ref": "#/components/parameters/user_id" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "display_name": { - "description": "The user's display name.", - "type": "string" - }, - "username": { - "description": "The user's username.", - "type": "string" - }, - "current_password": { - "description": "The user's current password.", - "type": "string" - }, - "password": { - "description": "The user's new password.", - "type": "string" - }, - "company_type": { - "description": "The company type.", - "type": "string" - }, - "company_name": { - "description": "The name of the company.", - "type": "string" - }, - "vat_number": { - "description": "The vat number of the user.", - "type": "string" - }, - "company_role": { - "description": "The role of the user in the company.", - "type": "string" - }, - "marketing": { - "description": "Flag if the user agreed to receive marketing communication.", - "type": "boolean" - }, - "ui_colorscheme": { - "description": "The user's chosen color scheme for user interfaces. Available values are 'light' and 'dark'.", - "type": "string" - }, - "default_catalog": { - "description": "The URL of a catalog file which overrides the default.", - "type": "string" - }, - "project_options_url": { - "description": "The URL of an account-wide project options file.", - "type": "string" - }, - "picture": { - "description": "Url of the user's picture.", - "type": "string" - } - }, - "type": "object" - } - } - } - }, - "responses": { - "200": { - "description": "A User profile object", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Profile" - } - } - } - } - }, - "x-property-id-kebab": "update-profile", - "x-tag-id-kebab": "User-Profiles", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Profile" - ], - "x-return-types-union": "\\Upsun\\Model\\Profile", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Profile" - }, - "x-returnable": true, - "x-description": [ - "Update a user profile, supplying one or more key/value pairs to to change." - ] - } - }, - "/profiles/{userId}/address": { - "get": { - "tags": [ - "User Profiles" - ], - "summary": "Get a user address", - "operationId": "get-address", - "parameters": [ - { - "$ref": "#/components/parameters/user_id" - } - ], - "responses": { - "200": { - "description": "A user Address object extended with field metadata", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Address" - }, - { - "$ref": "#/components/schemas/AddressMetadata" - } - ] - } - } - } - } - }, - "x-property-id-kebab": "get-address", - "x-tag-id-kebab": "User-Profiles", - "x-return-types-displayReturn": false, - "x-return-types": {}, - "x-phpdoc": {}, - "x-returnable": true - }, - "patch": { - "tags": [ - "User Profiles" - ], - "summary": "Update a user address", - "description": "Update a user address, supplying one or more key/value pairs to to change.", - "operationId": "update-address", - "parameters": [ - { - "$ref": "#/components/parameters/user_id" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Address" - } - } - } - }, - "responses": { - "200": { - "description": "A user Address object extended with field metadata.", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Address" - }, - { - "$ref": "#/components/schemas/AddressMetadata" - } - ] - } - } - } - } - }, - "x-property-id-kebab": "update-address", - "x-tag-id-kebab": "User-Profiles", - "x-return-types-displayReturn": false, - "x-return-types": {}, - "x-phpdoc": {}, - "x-returnable": true, - "x-description": [ - "Update a user address, supplying one or more key/value pairs to to change." - ] - } - }, - "/profile/{uuid}/picture": { - "post": { - "tags": [ - "User Profiles" - ], - "summary": "Create a user profile picture", - "operationId": "create-profile-picture", - "parameters": [ - { - "name": "uuid", + "name": "projectId", "in": "path", - "description": "The uuid of the user", + "description": "The unique identifier of the Upsun project", "required": true, "schema": { "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "required": true, - "content": { - "multipart/form-data": { - "schema": { - "properties": { - "file": { - "description": "The image file to upload.", - "type": "string", - "format": "binary" - } - }, - "type": "object" - } - } - } - }, - "responses": { - "200": { - "description": "The new picture url.", - "content": { - "application/json": { - "schema": { - "properties": { - "url": { - "description": "The relative url of the picture.", - "type": "string" - } - }, - "type": "object" - } - } + "pattern": "[a-z0-9]+", + "example": "abc123def456" } - } - }, - "x-property-id-kebab": "create-profile-picture", - "x-tag-id-kebab": "User-Profiles", - "x-return-types-displayReturn": false, - "x-return-types": [ - "object" - ], - "x-phpdoc": { - "return": "object" - }, - "x-returnable": true - }, - "delete": { - "tags": [ - "User Profiles" - ], - "summary": "Delete a user profile picture", - "operationId": "delete-profile-picture", - "parameters": [ + }, { - "name": "uuid", + "name": "environmentId", "in": "path", - "description": "The uuid of the user", + "description": "The environment identifier", "required": true, "schema": { "type": "string", - "format": "uuid" + "pattern": ".+", + "example": "main" } - } - ], - "responses": { - "204": { - "description": "No Content success." - } - }, - "x-property-id-kebab": "delete-profile-picture", - "x-tag-id-kebab": "User-Profiles", - "x-return-types-displayReturn": false, - "x-return-types": [ - "void" - ], - "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false - } - }, - "/tickets": { - "get": { - "summary": "List support tickets", - "operationId": "list-tickets", - "parameters": [ - { - "$ref": "#/components/parameters/filter_ticket_id" - }, - { - "$ref": "#/components/parameters/filter_created" }, { - "$ref": "#/components/parameters/filter_updated" + "name": "from", + "in": "query", + "description": "Start timestamp for the time range (Unix timestamp in seconds)", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "example": 1704067200 + } }, { - "$ref": "#/components/parameters/filter_type" + "name": "to", + "in": "query", + "description": "End timestamp for the time range (Unix timestamp in seconds)", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "example": 1704153600 + } }, { - "$ref": "#/components/parameters/filter_priority" + "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" + ] + } + } }, { - "$ref": "#/components/parameters/filter_ticket_status" + "name": "grain", + "in": "query", + "description": "Granularity of data points in seconds. Auto-calculated if omitted.", + "required": false, + "schema": { + "type": "integer", + "example": 10 + } }, { - "$ref": "#/components/parameters/filter_requester_id" + "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" + ] + } + } }, { - "$ref": "#/components/parameters/filter_submitter_id" + "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" + ] + } }, { - "$ref": "#/components/parameters/filter_assignee_id" + "name": "applications[]", + "in": "query", + "description": "Filter by application names", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "app-frontend" + } + } }, { - "$ref": "#/components/parameters/filter_has_incidents" + "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" + ] + } }, { - "$ref": "#/components/parameters/filter_due" + "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": "search", + "name": "instances_mode", "in": "query", - "description": "Search string for the ticket subject and description.", + "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" + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] } }, { - "$ref": "#/components/parameters/page" + "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": "The list of tickets.", + "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": { - "count": { - "description": "Total number of results.", - "type": "integer" + "_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 }, - "tickets": { - "description": "Array of support tickets.", + "_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": { - "$ref": "#/components/schemas/Ticket" - } + "type": "string", + "example": "wt" + }, + "example": [ + "wt", + "rpms" + ] }, - "_links": { - "$ref": "#/components/schemas/HalLinks" - } - }, - "type": "object" - } - } - } - } - }, - "x-property-id-kebab": "list-tickets", - "x-return-types-displayReturn": false, - "x-return-types": [ - "object" - ], - "x-phpdoc": { - "return": "object" - }, - "x-returnable": true - }, - "post": { - "tags": [ - "Support" - ], - "summary": "Create a new support ticket", - "operationId": "create-ticket", - "requestBody": { - "content": { - "application/json": { - "schema": { - "required": [ - "subject", - "description" - ], - "properties": { - "subject": { - "description": "A title of the ticket.", - "type": "string" - }, - "description": { - "description": "The description body of the support ticket.", - "type": "string" - }, - "requester_id": { - "description": "UUID of the ticket requester. Converted from the ZID value.", - "type": "string", - "format": "uuid" - }, - "priority": { - "description": "A priority of the ticket.", - "type": "string", - "enum": [ - "low", - "normal", - "high", - "urgent" - ] - }, - "subscription_id": { - "description": "see create()", - "type": "string" - }, - "organization_id": { - "description": "see create()", - "type": "string" - }, - "affected_url": { - "description": "see create().", - "type": "string", - "format": "url" - }, - "followup_tid": { - "description": "The unique ID of the ticket which this ticket is a follow-up to.", - "type": "string" - }, - "category": { - "description": "The category of the support ticket.", - "type": "string", - "enum": [ - "access", - "billing_question", - "complaint", - "compliance_question", - "configuration_change", - "general_question", - "incident_outage", - "bug_report", - "report_a_gui_bug", - "onboarding", - "close_my_account" - ] - }, - "attachments": { - "description": "A list of attachments for the ticket.", - "type": "array", - "items": { + "_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": { - "filename": { - "description": "The filename to be used in storage.", - "type": "string" + "total": { + "description": "Total trace count (float because APM may be sampled)", + "type": "number", + "format": "float", + "example": 136328 }, "data": { - "description": "the base64 encoded file.", - "type": "string" + "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" + "type": "object", + "additionalProperties": false } }, - "collaborator_ids": { - "description": "A list of collaborators uuids for the ticket.", - "type": "array", - "items": { - "type": "string" + "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 + } + ] } - }, - "type": "object" + } } } - } - }, - "responses": { - "200": { - "description": "A Support Ticket object", + }, + "400": { + "description": "Bad request - Invalid parameters. Please consult the API documentation to fix the request parameters.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Ticket" - } - } - } - } - }, - "x-property-id-kebab": "create-ticket", - "x-tag-id-kebab": "Support", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Ticket" - ], - "x-return-types-union": "\\Upsun\\Model\\Ticket", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Ticket" - }, - "x-returnable": true - } - }, - "/tickets/{ticket_id}": { - "patch": { - "tags": [ - "Support" - ], - "summary": "Update a ticket", - "operationId": "update-ticket", - "parameters": [ - { - "name": "ticket_id", - "in": "path", - "description": "The ID of the ticket", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "status": { - "description": "The status of the support ticket.", - "type": "string", - "enum": [ - "open", - "solved" - ] - }, - "collaborator_ids": { - "description": "A list of collaborators uuids for the ticket.", - "type": "array", - "items": { - "type": "string" + "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." + } + } } }, - "collaborators_replace": { - "description": "Whether or not should replace ticket collaborators with the provided values. If false, the collaborators will be appended.", - "type": "boolean", - "default": null - } - }, - "type": "object" + "type": "object", + "additionalProperties": false + } } } - } - }, - "responses": { - "200": { - "description": "Success.", + }, + "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": { - "$ref": "#/components/schemas/Ticket" + "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 } } } - }, - "204": { - "description": "The ticket was not updated." } }, - "x-property-id-kebab": "update-ticket", - "x-tag-id-kebab": "Support", + "x-property-id-kebab": "blackfire_server_global", + "x-tag-id-kebab": "Blackfire-Monitoring", "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, "x-return-types": [ - "\\Upsun\\Model\\Ticket", - "null" + "mixed" ], - "x-return-types-union": "\\Upsun\\Model\\Ticket|null", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Ticket" - }, - "x-returnable": true + "x-return-types-union": "mixed", + "x-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." + ] } }, - "/tickets/priority": { + "/projects/{projectId}/environments/{environmentId}/observability/server/transactions-break-down": { "get": { "tags": [ - "Support" + "Blackfire Monitoring" ], - "summary": "List support ticket priorities", - "operationId": "list-ticket-priorities", + "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": "subscription_id", - "in": "query", - "description": "The ID of the subscription the ticket should be related to", - "required": false, + "name": "projectId", + "in": "path", + "description": "The unique identifier of the Upsun project", + "required": true, "schema": { - "type": "string" + "type": "string", + "pattern": "[a-z0-9]+", + "example": "abc123def456" } }, { - "name": "category", + "name": "environmentId", + "in": "path", + "description": "The environment identifier", + "required": true, + "schema": { + "type": "string", + "pattern": ".+", + "example": "main" + } + }, + { + "name": "from", "in": "query", - "description": "The category of the support ticket.", - "required": false, + "description": "Start timestamp for the time range (Unix timestamp in seconds)", + "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64", + "example": 1704067200 } - } - ], - "responses": { - "200": { - "description": "An array of available priorities for that license.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "properties": { - "id": { - "description": "Machine name of the priority.", - "type": "string" - }, - "label": { - "description": "The human-readable label of the priority.", - "type": "string" - }, - "short_description": { - "description": "The short description of the priority.", - "type": "string" - }, - "description": { - "description": "The long description of the priority.", - "type": "string" - } - }, - "type": "object" - } - } - } + }, + { + "name": "to", + "in": "query", + "description": "End timestamp for the time range (Unix timestamp in seconds)", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "example": 1704153600 } - } - }, - "x-property-id-kebab": "list-ticket-priorities", - "x-tag-id-kebab": "Support", - "x-return-types-displayReturn": true, - "x-return-types": [ - "object[]" - ], - "x-return-types-union": "array", - "x-phpdoc": { - "return": "object[]" - }, - "x-returnable": true - } - }, - "/tickets/category": { - "get": { - "tags": [ - "Support" - ], - "summary": "List support ticket categories", - "operationId": "list-ticket-categories", - "parameters": [ + }, { - "name": "subscription_id", + "name": "grain", "in": "query", - "description": "The ID of the subscription the ticket should be related to", + "description": "Granularity of data points in seconds. Auto-calculated if omitted.", "required": false, "schema": { - "type": "string" + "type": "integer", + "example": 10 } }, { - "name": "organization_id", + "name": "breakdown_dimension", "in": "query", - "description": "The ID of the organization the ticket should be related to", + "description": "Dimension for transaction breakdown calculations.", "required": false, "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "An array of available categories for a ticket.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "properties": { - "id": { - "description": "Machine name of the category as is listed in zendesk.", - "type": "string" - }, - "label": { - "description": "The human-readable label of the category.", - "type": "string" - } - }, - "type": "object" - } - } - } - } - } - }, - "x-property-id-kebab": "list-ticket-categories", - "x-tag-id-kebab": "Support", - "x-return-types-displayReturn": true, - "x-return-types": [ - "object[]" - ], - "x-return-types-union": "array", - "x-phpdoc": { - "return": "object[]" - }, - "x-returnable": true - } - }, - "/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" - } - } + "type": "string", + "default": null, + "enum": [ + "wt", + "pmu", + "stdout" + ] } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "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" + ] } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "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 } }, - "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" + { + "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" ] } } - } - }, - "x-property-id-kebab": "create-org-invite", - "x-tag-id-kebab": "Organization-Invitations", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\OrganizationInvitation" - ], - "x-return-types-union": "\\Upsun\\Model\\OrganizationInvitation", - "x-phpdoc": { - "return": "\\Upsun\\Model\\OrganizationInvitation" - }, - "x-returnable": true, - "x-description": [ - "Creates an invitation to an organization for a user with the specified email address." - ] - }, - "get": { - "summary": "List invitations to an organization", - "description": "Returns a list of invitations to an organization.", - "operationId": "list-org-invites", - "tags": [ - "Organization Invitations" - ], - "parameters": [ + }, { + "name": "contexts_mode", "in": "query", - "name": "filter[state]", - "description": "Allows filtering by `state` of the invtations: \"pending\" (default), \"error\".", - "style": "deepObject", - "explode": true, + "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": { - "$ref": "#/components/schemas/StringFilter" + "type": "string", + "example": "1", + "default": null, + "enum": [ + "1", + "-1" + ] } }, { + "name": "applications[]", "in": "query", - "name": "page[size]", - "description": "Determines the number of items to show.", + "description": "Filter by application names", + "required": false, + "style": "form", + "explode": true, "schema": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": null + "type": "array", + "items": { + "type": "string", + "example": "app-frontend" + } } }, { + "name": "applications_mode", "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.", + "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" + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] } }, { + "name": "instances[]", "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.", + "description": "Filter by instance names", + "required": false, + "style": "form", + "explode": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string", + "example": "app-frontend.0" + } } }, { + "name": "instances_mode", "in": "query", - "name": "sort", - "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.\n", + "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": [ - "updated_at", - "-updated_at" + "1", + "-1" ] } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OrganizationInvitation" - } - } + }, + { + "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" } } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "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" + ] } - } - }, - "x-property-id-kebab": "list-org-invites", - "x-tag-id-kebab": "Organization-Invitations", - "x-return-types-displayReturn": true, - "x-return-types": [ - "\\Upsun\\Model\\OrganizationInvitation[]" - ], - "x-return-types-union": "array", - "x-phpdoc": { - "return": "\\Upsun\\Model\\OrganizationInvitation[]" - }, - "x-returnable": true, - "x-description": [ - "Returns a list of invitations to an organization." - ] - } - }, - "/organizations/{organization_id}/invitations/{invitation_id}": { - "parameters": [ - { - "$ref": "#/components/parameters/OrganizationID" - }, - { - "$ref": "#/components/parameters/InvitationID" - } - ], - "delete": { - "summary": "Cancel a pending invitation to an organization", - "description": "Cancels the specified invitation.", - "operationId": "cancel-org-invite", - "tags": [ - "Organization Invitations" - ], - "responses": { - "204": { - "description": "No Content" }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } + { + "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" } } }, - "404": { - "description": "Not Found" - } - }, - "x-property-id-kebab": "cancel-org-invite", - "x-tag-id-kebab": "Organization-Invitations", - "x-return-types-displayReturn": false, - "x-return-types": [ - "void" - ], - "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false, - "x-description": [ - "Cancels the specified invitation." - ] - } - }, - "/projects/{project_id}/invitations": { - "parameters": [ - { - "$ref": "#/components/parameters/ProjectID" - } - ], - "post": { - "summary": "Invite user to a project by email", - "description": "Creates an invitation to a project for a user with the specified email address.", - "operationId": "create-project-invite", - "tags": [ - "Project Invitations" - ], - "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProjectInvitation" - } - } + { + "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" + ] } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } + { + "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" } } }, - "402": { - "description": "Payment Required when the number of users exceeds the subscription limit", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "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" + ] } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } + { + "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" } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "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" + ] } }, - "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": { - "role": { - "type": "string", - "enum": [ - "admin", - "viewer" - ], - "description": "The role the invitee should be given on the project.", - "default": null - }, - "email": { - "type": "string", - "format": "email", - "description": "The email address of the invitee." - }, - "permissions": { - "type": "array", - "description": "Specifying the role on each environment type.", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "production", - "staging", - "development" - ], - "description": "The environment type." - }, - "role": { - "type": "string", - "enum": [ - "admin", - "viewer", - "contributor" - ], - "description": "The role the invitee should be given on the environment type." - } - } - } - }, - "environments": { - "deprecated": true, - "type": "array", - "description": "(Deprecated, use permissions instead) Specifying the role on each environment.", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The ID of the environment." - }, - "role": { - "type": "string", - "enum": [ - "admin", - "viewer", - "contributor" - ], - "description": "The role the invitee should be given on the environment." - } - } - } - }, - "force": { - "type": "boolean", - "description": "Whether to cancel any pending invitation for the specified invitee, and create a new invitation." - } - }, - "required": [ - "email" - ] + { + "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" } } - } - }, - "x-property-id-kebab": "create-project-invite", - "x-tag-id-kebab": "Project-Invitations", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\ProjectInvitation" - ], - "x-return-types-union": "\\Upsun\\Model\\ProjectInvitation", - "x-phpdoc": { - "return": "\\Upsun\\Model\\ProjectInvitation" - }, - "x-returnable": true, - "x-description": [ - "Creates an invitation to a project for a user with the specified email address." - ] - }, - "get": { - "summary": "List invitations to a project", - "description": "Returns a list of invitations to a project.", - "operationId": "list-project-invites", - "tags": [ - "Project Invitations" - ], - "parameters": [ + }, { + "name": "http_hosts_mode", "in": "query", - "name": "filter[state]", - "description": "Allows filtering by `state` of the invtations: \"pending\" (default), \"error\".", - "style": "deepObject", - "explode": true, + "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": { - "$ref": "#/components/schemas/StringFilter" + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] } }, { + "name": "hosts[]", "in": "query", - "name": "page[size]", - "description": "Determines the number of items to show.", + "description": "Filter by server hosts", + "required": false, + "style": "form", + "explode": true, "schema": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": null + "type": "array", + "items": { + "type": "string", + "example": "frontend-0.prod" + } } }, { + "name": "hosts_mode", "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.", + "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" + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] } }, { + "name": "frameworks[]", "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.", + "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": "string" + "type": "array", + "items": { + "type": "string", + "example": "symfony" + } } }, { + "name": "frameworks_mode", "in": "query", - "name": "sort", - "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.\n", + "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": [ - "updated_at", - "-updated_at" + "1", + "-1" ] } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProjectInvitation" - } - } - } - } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } + { + "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" } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "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" + ] } - } - }, - "x-property-id-kebab": "list-project-invites", - "x-tag-id-kebab": "Project-Invitations", - "x-return-types-displayReturn": true, - "x-return-types": [ - "\\Upsun\\Model\\ProjectInvitation[]" - ], - "x-return-types-union": "array", - "x-phpdoc": { - "return": "\\Upsun\\Model\\ProjectInvitation[]" - }, - "x-returnable": true, - "x-description": [ - "Returns a list of invitations to a project." - ] - } - }, - "/projects/{project_id}/invitations/{invitation_id}": { - "parameters": [ - { - "$ref": "#/components/parameters/ProjectID" - }, - { - "$ref": "#/components/parameters/InvitationID" - } - ], - "delete": { - "summary": "Cancel a pending invitation to a project", - "description": "Cancels the specified invitation.", - "operationId": "cancel-project-invite", - "tags": [ - "Project Invitations" - ], - "responses": { - "204": { - "description": "No Content" }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } + { + "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" } } }, - "404": { - "description": "Not Found" - } - }, - "x-property-id-kebab": "cancel-project-invite", - "x-tag-id-kebab": "Project-Invitations", - "x-return-types-displayReturn": false, - "x-return-types": [ - "void" - ], - "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false, - "x-description": [ - "Cancels the specified invitation." - ] - } - }, - "/ref/users": { - "get": { - "summary": "List referenced users", - "description": "Retrieves a list of users 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: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 - } - } - } - } - } + { + "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" + ] } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } + { + "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)" } } - } - }, - "parameters": [ + }, { + "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" - }, + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "oss[]", "in": "query", - "name": "in", - "description": "The list of comma-separated user IDs generated by a trusted service.", - "required": true + "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" - }, + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] + } + }, + { + "name": "distribution_cost", "in": "query", - "name": "sig", - "description": "The signature of this request generated by a trusted service.", - "required": true + "description": "Cost distribution dimension for server load distribution.", + "required": false, + "schema": { + "type": "string", + "default": null, + "enum": [ + "wt", + "pmu" + ] + } } ], - "x-property-id-kebab": "list-referenced-users", - "x-tag-id-kebab": "References", - "x-return-types-displayReturn": true, - "x-return-types": [ - "array" - ], - "x-return-types-union": "array", - "x-phpdoc": { - "return": "array" - }, - "x-returnable": true, - "x-description": [ - "Retrieves a list of users 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:users:0." - ] - } - }, - "/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", + "description": "Transaction breakdown retrieved successfully", "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 - } - ], - "x-property-id-kebab": "list-referenced-teams", - "x-tag-id-kebab": "References", - "x-return-types-displayReturn": true, - "x-return-types": [ - "array" - ], - "x-return-types-union": "array", - "x-phpdoc": { - "return": "array" - }, - "x-returnable": true, - "x-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." - ] - } - }, - "/teams": { - "get": { - "summary": "List teams", - "description": "Retrieves a list of teams.", - "operationId": "list-teams", - "tags": [ - "Teams" - ], - "parameters": [ - { - "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[id]", - "description": "Allows filtering by `id` using one or more operators.", - "style": "deepObject", - "explode": true, - "schema": { - "$ref": "#/components/schemas/StringFilter" - } - }, - { - "in": "query", - "name": "filter[updated_at]", - "description": "Allows filtering by `updated_at` using one or more operators.", - "style": "deepObject", - "explode": true, - "schema": { - "$ref": "#/components/schemas/DateTimeFilter" - } - }, - { - "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.
\nUse a dash (\"-\") to sort descending.\n", - "schema": { - "type": "string", - "enum": [ - "label", - "-label", - "created_at", - "-created_at", - "updated_at", - "-updated_at" - ] - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", + "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": { - "items": { + "_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": { - "$ref": "#/components/schemas/Team" - } + "type": "string", + "example": "web" + }, + "nullable": true }, - "count": { + "_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", - "description": "Total count of all the teams." + "example": 200 }, - "_links": { - "$ref": "#/components/schemas/ListLinks" - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - }, - "x-property-id-kebab": "list-teams", - "x-tag-id-kebab": "Teams", - "x-return-types-displayReturn": false, - "x-return-types": [ - "object" - ], - "x-phpdoc": { - "return": "object" - }, - "x-returnable": true, - "x-description": [ - "Retrieves a list of teams." - ] - }, - "post": { - "summary": "Create team", - "description": "Creates a new team.", - "operationId": "create-team", - "tags": [ - "Teams" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "organization_id", - "label" - ], - "properties": { - "organization_id": { - "type": "string", - "format": "ulid", - "description": "The ID of the parent organization." + "_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 + } }, - "label": { - "type": "string", - "description": "The human-readable label of the team." + "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 }, - "project_permissions": { - "type": "array", - "description": "Project permissions that are granted to the team.", - "items": { - "type": "string" - } + "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 + } + } + } + ] } } } } - } - }, - "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Team" - } - } - } }, "400": { - "description": "Bad Request", + "description": "Bad request - Invalid parameters. Please consult the API documentation to fix the request parameters.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "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", + "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": { - "$ref": "#/components/schemas/Error" + "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 } } } } }, - "x-property-id-kebab": "create-team", - "x-tag-id-kebab": "Teams", + "x-property-id-kebab": "blackfire_server_transactions_breakdown", + "x-tag-id-kebab": "Blackfire-Monitoring", "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, "x-return-types": [ - "\\Upsun\\Model\\Team" + "mixed" ], - "x-return-types-union": "\\Upsun\\Model\\Team", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Team" - }, - "x-returnable": true, + "x-return-types-union": "mixed", "x-description": [ - "Creates a new team." + "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." ] } }, - "/teams/{team_id}": { - "parameters": [ - { - "$ref": "#/components/parameters/TeamID" - } - ], + "/projects/{projectId}/environments/{environmentId}/observability/server/top-spans": { "get": { - "summary": "Get team", - "description": "Retrieves the specified team.", - "operationId": "get-team", "tags": [ - "Teams" + "Blackfire Monitoring" ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Team" - } - } + "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" } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "name": "environmentId", + "in": "path", + "description": "The environment identifier", + "required": true, + "schema": { + "type": "string", + "pattern": ".+", + "example": "main" } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - }, - "x-property-id-kebab": "get-team", - "x-tag-id-kebab": "Teams", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Team" - ], - "x-return-types-union": "\\Upsun\\Model\\Team", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Team" - }, - "x-returnable": true, - "x-description": [ - "Retrieves the specified team." - ] - }, - "patch": { - "summary": "Update team", - "description": "Updates the specified team.", - "operationId": "update-team", - "tags": [ - "Teams" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "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" - } - } - } - } + { + "name": "from", + "in": "query", + "description": "Start timestamp for the time range (Unix timestamp in seconds)", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "example": 1704067200 } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Team" - } - } + }, + { + "name": "to", + "in": "query", + "description": "End timestamp for the time range (Unix timestamp in seconds)", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "example": 1704153600 } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "name": "grain", + "in": "query", + "description": "Granularity of data points in seconds. Auto-calculated if omitted.", + "required": false, + "schema": { + "type": "integer", + "example": 10 } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "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" + ] } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } + { + "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" + ] } } - } - }, - "x-property-id-kebab": "update-team", - "x-tag-id-kebab": "Teams", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Team" - ], - "x-return-types-union": "\\Upsun\\Model\\Team", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Team" - }, - "x-returnable": true, - "x-description": [ - "Updates the specified team." - ] - }, - "delete": { - "summary": "Delete team", - "description": "Deletes the specified team.", - "operationId": "delete-team", - "tags": [ - "Teams" - ], - "responses": { - "204": { - "description": "No Content" }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "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" + ] } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } + { + "name": "applications[]", + "in": "query", + "description": "Filter by application names", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "app-frontend" } } - } - }, - "x-property-id-kebab": "delete-team", - "x-tag-id-kebab": "Teams", - "x-return-types-displayReturn": false, - "x-return-types": [ - "void" - ], - "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false, - "x-description": [ - "Deletes the specified team." - ] - } - }, - "/teams/{team_id}/members": { - "parameters": [ - { - "$ref": "#/components/parameters/TeamID" - } - ], - "get": { - "summary": "List team members", - "description": "Retrieves a list of users associated with a single team.", - "operationId": "list-team-members", - "tags": [ - "Teams" - ], - "parameters": [ + }, { + "name": "applications_mode", "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.", + "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" + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] } }, { + "name": "instances[]", "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.", + "description": "Filter by instance names", + "required": false, + "style": "form", + "explode": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string", + "example": "app-frontend.0" + } } }, { + "name": "instances_mode", "in": "query", - "name": "sort", - "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.\n", + "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": [ - "created_at", - "-created_at", - "updated_at", - "-updated_at" + "1", + "-1" ] } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TeamMember" - } - }, - "_links": { - "$ref": "#/components/schemas/ListLinks" - } - } - } - } - } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } + { + "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" } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "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" + ] } - } - }, - "x-property-id-kebab": "list-team-members", - "x-tag-id-kebab": "Teams", - "x-return-types-displayReturn": false, - "x-return-types": [ - "object" - ], - "x-phpdoc": { - "return": "object" - }, - "x-returnable": true, - "x-description": [ - "Retrieves a list of users associated with a single team." - ] - }, - "post": { - "summary": "Create team member", - "description": "Creates a new team member.", - "operationId": "create-team-member", - "tags": [ - "Teams" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "user_id" - ], - "properties": { - "user_id": { - "type": "string", - "format": "uuid", - "description": "ID of the user." - } - } + }, + { + "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" } } - } - }, - "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TeamMember" - } - } + }, + { + "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" + ] } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } + { + "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" } } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "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" + ] } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } + { + "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" } } - } - }, - "x-property-id-kebab": "create-team-member", - "x-tag-id-kebab": "Teams", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\TeamMember" - ], - "x-return-types-union": "\\Upsun\\Model\\TeamMember", - "x-phpdoc": { - "return": "\\Upsun\\Model\\TeamMember" - }, - "x-returnable": true, - "x-description": [ - "Creates a new team member." - ] - } - }, - "/teams/{team_id}/members/{user_id}": { - "parameters": [ - { - "$ref": "#/components/parameters/TeamID" - }, - { - "$ref": "#/components/parameters/UserID" - } - ], - "get": { - "summary": "Get team member", - "description": "Retrieves the specified team member.", - "operationId": "get-team-member", - "tags": [ - "Teams" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TeamMember" - } - } + }, + { + "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" + ] } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } + { + "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" } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "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" + ] } - } - }, - "x-property-id-kebab": "get-team-member", - "x-tag-id-kebab": "Teams", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\TeamMember" - ], - "x-return-types-union": "\\Upsun\\Model\\TeamMember", - "x-phpdoc": { - "return": "\\Upsun\\Model\\TeamMember" - }, - "x-returnable": true, - "x-description": [ - "Retrieves the specified team member." - ] - }, - "delete": { - "summary": "Delete team member", - "description": "Deletes the specified team member.", - "operationId": "delete-team-member", - "tags": [ - "Teams" - ], - "responses": { - "204": { - "description": "No Content" }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } + { + "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" } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } + { + "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" } } - } - }, - "x-property-id-kebab": "delete-team-member", - "x-tag-id-kebab": "Teams", - "x-return-types-displayReturn": false, - "x-return-types": [ - "void" - ], - "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false, - "x-description": [ - "Deletes the specified team member." - ] - } - }, - "/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" + "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", - "name": "filter[resource_type]", - "description": "Allows filtering by `resource_type` (project or organization) using one or more operators.", - "style": "deepObject", + "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": { - "$ref": "#/components/schemas/StringFilter" + "type": "array", + "items": { + "type": "string", + "example": "php" + } } }, { + "name": "languages_mode", "in": "query", - "name": "filter[organization_id]", - "description": "Allows filtering by `organization_id` using one or more operators.", - "style": "deepObject", - "explode": true, + "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": { - "$ref": "#/components/schemas/StringFilter" + "type": "string", + "example": "1", + "enum": [ + "1", + "-1" + ] } }, { + "name": "methods[]", "in": "query", - "name": "filter[permissions]", - "description": "Allows filtering by `permissions` using one or more operators.", - "style": "deepObject", + "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": { - "$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" - } - } - } + "type": "array", + "items": { + "type": "string", + "example": "get" } } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "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" + ] } - } - }, - "x-property-id-kebab": "list-user-extended-access", - "x-tag-id-kebab": "Grants", - "x-return-types-displayReturn": false, - "x-return-types": [ - "object" - ], - "x-phpdoc": { - "return": "object" - }, - "x-returnable": true, - "x-description": [ - "List extended access of the given user, which includes both individual and team access to project and", - "organization." - ] - } - }, - "/users/me": { - "get": { - "summary": "Get the current user", - "description": "Retrieves the current user, determined from the used access token.", - "operationId": "get-current-user", - "tags": [ - "Users" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } + }, + { + "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)" } } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } + { + "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" } } }, - "404": { - "description": "Not Found" - } - }, - "x-property-id-kebab": "get-current-user", - "x-tag-id-kebab": "Users", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\User" - ], - "x-return-types-union": "\\Upsun\\Model\\User", - "x-phpdoc": { - "return": "\\Upsun\\Model\\User" - }, - "x-returnable": true, - "x-description": [ - "Retrieves the current user, determined from the used access token." - ] - } - }, - "/users/email={email}": { - "parameters": [ - { - "schema": { - "type": "string", - "format": "email", - "example": "hello@example.com" + { + "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": "email", - "in": "path", - "required": true, - "description": "The user's email address." - } - ], - "get": { - "summary": "Get a user by email", - "description": "Retrieves a user matching the specified email address.", - "operationId": "get-user-by-email-address", - "tags": [ - "Users" + { + "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": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "403": { - "description": "Forbidden", + "description": "Top spans retrieved successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "404": { - "description": "Not Found" - } - }, - "x-property-id-kebab": "get-user-by-email-address", - "x-tag-id-kebab": "Users", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\User" - ], - "x-return-types-union": "\\Upsun\\Model\\User", - "x-phpdoc": { - "return": "\\Upsun\\Model\\User" - }, - "x-returnable": true, - "x-description": [ - "Retrieves a user matching the specified email address." - ] - } - }, - "/users/username={username}": { - "parameters": [ - { - "schema": { - "type": "string", - "example": "platform-sh" - }, - "name": "username", - "in": "path", - "required": true, - "description": "The user's username." - } - ], - "get": { - "summary": "Get a user by username", - "description": "Retrieves a user matching the specified username.", - "operationId": "get-user-by-username", - "tags": [ - "Users" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" + "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\u20131.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 }, - "examples": {} - } + "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 + } + } + } } }, - "403": { - "description": "Forbidden", + "400": { + "description": "Bad request - Invalid parameters. Please consult the API documentation to fix the request parameters.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "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 } } } }, - "404": { - "description": "Not Found" + "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 + } + } + } } }, - "x-property-id-kebab": "get-user-by-username", - "x-tag-id-kebab": "Users", + "x-property-id-kebab": "blackfire_server_top_spans", + "x-tag-id-kebab": "Blackfire-Monitoring", "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, "x-return-types": [ - "\\Upsun\\Model\\User" + "mixed" ], - "x-return-types-union": "\\Upsun\\Model\\User", - "x-phpdoc": { - "return": "\\Upsun\\Model\\User" - }, - "x-returnable": true, + "x-return-types-union": "mixed", "x-description": [ - "Retrieves a user matching the specified username." + "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." ] } }, - "/users/{user_id}": { - "parameters": [ - { - "$ref": "#/components/parameters/UserID" - } - ], + "/projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/timeline": { "get": { - "summary": "Get a user", - "description": "Retrieves the specified user.", - "operationId": "get-user", "tags": [ - "Users" + "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": "OK", + "description": "Timeline data retrieved successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/User" + "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", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "404": { - "description": "Not Found" + "description": "Forbidden - Access denied due to insufficient permissions, or the requested project/environment does not exist (to prevent information disclosure)" } }, - "x-property-id-kebab": "get-user", - "x-tag-id-kebab": "Users", + "x-property-id-kebab": "blackfire_profile_timeline", + "x-tag-id-kebab": "Blackfire-Profiling", "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, "x-return-types": [ - "\\Upsun\\Model\\User" + "mixed" ], - "x-return-types-union": "\\Upsun\\Model\\User", - "x-phpdoc": { - "return": "\\Upsun\\Model\\User" - }, - "x-returnable": true, + "x-return-types-union": "mixed", "x-description": [ - "Retrieves the specified user." + "Returns timeline visualization data for a Blackfire profile, showing the execution flow over time." ] - }, - "patch": { - "summary": "Update a user", - "description": "Updates the specified user.", - "operationId": "update-user", + } + }, + "/projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/subprofiles": { + "get": { "tags": [ - "Users" + "Blackfire Profiling" ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } + "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" } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "name": "environmentId", + "in": "path", + "description": "The environment identifier", + "required": true, + "schema": { + "type": "string", + "pattern": ".+", + "example": "main" } }, - "403": { - "description": "Forbidden", + { + "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": { - "$ref": "#/components/schemas/Error" - } - } - } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "description": "", - "type": "object", - "properties": { - "username": { - "type": "string", - "description": "The user's username." - }, - "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." - }, - "company": { - "type": "string", - "description": "The user's company." - }, - "website": { - "type": "string", - "format": "uri", - "description": "The user's website." + "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" + } }, - "country": { - "type": "string", - "maxLength": 2, - "minLength": 2, - "description": "The user's country (2-letter country code)." - } - }, - "x-examples": { - "example-1": { - "company": "Platform.sh SAS", - "country": "EU", - "first_name": "Hello", - "last_name": "World", - "picture": "https://accounts.platform.sh/profiles/blimp_profile/themes/platformsh_theme/images/mail/logo.png", - "username": "username", - "website": "https://platform.sh" - } + "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)" } }, - "x-property-id-kebab": "update-user", - "x-tag-id-kebab": "Users", + "x-property-id-kebab": "blackfire_profile_subprofiles", + "x-tag-id-kebab": "Blackfire-Profiling", "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, "x-return-types": [ - "\\Upsun\\Model\\User" + "mixed" ], - "x-return-types-union": "\\Upsun\\Model\\User", - "x-phpdoc": { - "return": "\\Upsun\\Model\\User" - }, - "x-returnable": true, + "x-return-types-union": "mixed", "x-description": [ - "Updates the specified user." + "Returns subprofiles (child profiles) associated with a Blackfire profile." ] } }, - "/users/{user_id}/emailaddress": { - "parameters": [ - { - "$ref": "#/components/parameters/UserID" - } - ], - "post": { - "summary": "Reset email address", - "description": "Requests a reset of the user's email address. A confirmation email will be sent to the new address when the request is accepted.", - "operationId": "reset-email-address", + "/projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/profile": { + "get": { "tags": [ - "Users" + "Blackfire Profiling" ], - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + "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" } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "name": "environmentId", + "in": "path", + "description": "The environment identifier", + "required": true, + "schema": { + "type": "string", + "pattern": ".+", + "example": "main" } }, - "409": { - "description": "Conflict", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "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" } } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "email_address": { - "type": "string", - "format": "email" - } - }, - "required": [ - "email_address" - ] - } - } - }, - "description": "" - }, - "x-property-id-kebab": "reset-email-address", - "x-tag-id-kebab": "Users", - "x-return-types-displayReturn": false, - "x-return-types": [ - "void" - ], - "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false, - "x-description": [ - "Requests a reset of the user's email address. A confirmation email will be sent to the new address when the", - "request is accepted." - ] - } - }, - "/users/{user_id}/resetpassword": { - "parameters": [ - { - "$ref": "#/components/parameters/UserID" - } - ], - "post": { - "summary": "Reset user password", - "description": "Requests a reset of the user's password. A password reset email will be sent to the user when the request is accepted.", - "operationId": "reset-password", - "tags": [ - "Users" ], "responses": { - "204": { - "description": "No Content" - }, - "403": { - "description": "Forbidden", + "200": { + "description": "Profile details retrieved successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "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)" } }, - "x-property-id-kebab": "reset-password", - "x-tag-id-kebab": "Users", + "x-property-id-kebab": "blackfire_profile_profile", + "x-tag-id-kebab": "Blackfire-Profiling", "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, "x-return-types": [ - "void" + "mixed" ], - "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false, + "x-return-types-union": "mixed", "x-description": [ - "Requests a reset of the user's password. A password reset email will be sent to the user when the request is", - "accepted." + "Returns full profile data including metrics, metadata, and recommendations." ] } }, - "/users/{user_id}/api-tokens": { - "parameters": [ - { - "$ref": "#/components/parameters/UserID" - } - ], + "/projects/{projectId}/environments/{environmentId}/observability/profiles/{uuid}/graph": { "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" + "Blackfire Profiling" ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApiToken" - } - } - } + "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" } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "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" } } - }, - "x-property-id-kebab": "list-api-tokens", - "x-tag-id-kebab": "Api-Tokens", - "x-return-types-displayReturn": true, - "x-return-types": [ - "\\Upsun\\Model\\ApiToken[]" - ], - "x-return-types-union": "array", - "x-phpdoc": { - "return": "\\Upsun\\Model\\ApiToken[]" - }, - "x-returnable": true, - "x-description": [ - "Retrieves a list of API tokens associated with a single user." - ] - }, - "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", + "200": { + "description": "Call graph retrieved successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "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", - "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" - ] - } - } + "description": "Forbidden - Access denied due to insufficient permissions, or the requested project/environment does not exist (to prevent information disclosure)" } }, - "x-property-id-kebab": "create-api-token", - "x-tag-id-kebab": "Api-Tokens", + "x-property-id-kebab": "blackfire_profile_graph", + "x-tag-id-kebab": "Blackfire-Profiling", "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, "x-return-types": [ - "\\Upsun\\Model\\ApiToken" + "mixed" ], - "x-return-types-union": "\\Upsun\\Model\\ApiToken", - "x-phpdoc": { - "return": "\\Upsun\\Model\\ApiToken" - }, - "x-returnable": true, + "x-return-types-union": "mixed", "x-description": [ - "Creates an API token" + "Returns the call graph data for a Blackfire profile, showing function calls and their performance metrics." ] } }, - "/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." - } - ], + "/projects/{projectId}/environments/{environmentId}/observability/profiles/recommendations": { "get": { - "summary": "Get an API token", - "description": "Retrieves the specified API token.", - "operationId": "get-api-token", "tags": [ - "Api Tokens" + "Blackfire Profiling" ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiToken" - } - } + "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" } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "name": "environmentId", + "in": "path", + "description": "The environment identifier", + "required": true, + "schema": { + "type": "string", + "pattern": ".+", + "example": "main" } }, - "404": { - "description": "Not Found" - } - }, - "x-property-id-kebab": "get-api-token", - "x-tag-id-kebab": "Api-Tokens", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\ApiToken" - ], - "x-return-types-union": "\\Upsun\\Model\\ApiToken", - "x-phpdoc": { - "return": "\\Upsun\\Model\\ApiToken" - }, - "x-returnable": true, - "x-description": [ - "Retrieves the specified API token." - ] - }, - "delete": { - "summary": "Delete an API token", - "description": "Deletes an API token", - "operationId": "delete-api-token", - "tags": [ - "Api Tokens" - ], - "responses": { - "204": { - "description": "No Content" + { + "name": "from", + "in": "query", + "description": "Start of time range (Unix timestamp). Defaults to 2 weeks ago.", + "required": false, + "schema": { + "type": "integer", + "example": 1704067200 + } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "name": "to", + "in": "query", + "description": "End of time range (Unix timestamp). Defaults to now.", + "required": false, + "schema": { + "type": "integer", + "example": 1704326400 } }, - "404": { - "description": "Not Found" - } - }, - "x-property-id-kebab": "delete-api-token", - "x-tag-id-kebab": "Api-Tokens", - "x-return-types-displayReturn": false, - "x-return-types": [ - "void" - ], - "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false, - "x-description": [ - "Deletes an API token" - ] - } - }, - "/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" - } - } - } + { + "name": "transaction", + "in": "query", + "description": "Filter recommendations to a specific transaction name.", + "required": false, + "schema": { + "type": "string", + "example": "App\\Controller\\ProductController::list" } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "name": "limit", + "in": "query", + "description": "Maximum number of recommendation results to return. Clamped to range 10\u2013200. Defaults to 10 (or 200 when filtering by transaction).", + "required": false, + "schema": { + "type": "integer", + "example": 50, + "maximum": 200, + "minimum": 10 } } - }, - "x-property-id-kebab": "list-login-connections", - "x-tag-id-kebab": "Connections", - "x-return-types-displayReturn": true, - "x-return-types": [ - "\\Upsun\\Model\\Connection[]" - ], - "x-return-types-union": "array", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Connection[]" - }, - "x-returnable": true, - "x-description": [ - "Retrieves a list of connections associated with a single user." - ] - } - }, - "/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", + "description": "Recommendation statistics retrieved successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Connection" + "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 } } } }, - "403": { - "description": "Forbidden", + "400": { + "description": "Bad request - Invalid parameters. Please consult the API documentation to fix the request parameters.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "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 } } } }, - "404": { - "description": "Not Found" - } - }, - "x-property-id-kebab": "get-login-connection", - "x-tag-id-kebab": "Connections", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Connection" - ], - "x-return-types-union": "\\Upsun\\Model\\Connection", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Connection" - }, - "x-returnable": true, - "x-description": [ - "Retrieves the specified connection." - ] - }, - "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" + "description": "Forbidden - Access denied due to insufficient permissions, or the requested project/environment does not exist (to prevent information disclosure)" } }, - "x-property-id-kebab": "delete-login-connection", - "x-tag-id-kebab": "Connections", + "x-property-id-kebab": "blackfire_profiles_recommendations", + "x-tag-id-kebab": "Blackfire-Profiling", "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, "x-return-types": [ - "void" + "mixed" ], - "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false, + "x-return-types-union": "mixed", "x-description": [ - "Deletes the specified connection." + "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." ] } }, - "/users/{user_id}/totp": { - "parameters": [ - { - "$ref": "#/components/parameters/UserID" - } - ], + "/projects/{projectId}/environments/{environmentId}/observability/profiles": { "get": { - "summary": "Get information about TOTP enrollment", - "description": "Retrieves TOTP enrollment information.", - "operationId": "get-totp-enrollment", "tags": [ - "Mfa" + "Blackfire Profiling" ], - "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." - } - } - } - } + "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" } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "name": "environmentId", + "in": "path", + "description": "The environment identifier", + "required": true, + "schema": { + "type": "string", + "pattern": ".+", + "example": "main" } }, - "409": { - "description": "Conflict" - } - }, - "x-property-id-kebab": "get-totp-enrollment", - "x-tag-id-kebab": "Mfa", - "x-return-types-displayReturn": false, - "x-return-types": [ - "object" - ], - "x-phpdoc": { - "return": "object" - }, - "x-returnable": true, - "x-description": [ - "Retrieves TOTP enrollment information." - ] - }, - "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" - } - } - } - } - } + { + "name": "transaction", + "in": "query", + "description": "Filter by transaction name (exact match).", + "required": false, + "schema": { + "type": "string", + "example": "App\\Controller\\ProductController::list" } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "name": "page", + "in": "query", + "description": "Page number for pagination.", + "required": false, + "schema": { + "type": "integer", + "default": null, + "minimum": 1 } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "name": "limit", + "in": "query", + "description": "Number of profiles per page.", + "required": false, + "schema": { + "type": "integer", + "default": null, + "maximum": 100, + "minimum": 1 } }, - "409": { - "description": "Conflict", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "name": "url", + "in": "query", + "description": "Wildcard search across URI, name, and transaction name.", + "required": false, + "schema": { + "type": "string", + "example": "/api/products" } - } - }, - "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" - ] - } + }, + { + "name": "is_auto", + "in": "query", + "description": "When false, excludes auto-triggered (APM) profiles from results.", + "required": false, + "schema": { + "type": "boolean", + "example": false } }, - "description": "" - }, - "x-property-id-kebab": "confirm-totp-enrollment", - "x-tag-id-kebab": "Mfa", - "x-return-types-displayReturn": false, - "x-return-types": [ - "object" - ], - "x-phpdoc": { - "return": "object" - }, - "x-returnable": true, - "x-description": [ - "Confirms the given TOTP enrollment." - ] - }, - "delete": { - "summary": "Withdraw TOTP enrollment", - "description": "Withdraws from the TOTP enrollment.", - "operationId": "withdraw-totp-enrollment", - "tags": [ - "Mfa" - ], - "responses": { - "204": { - "description": "No Content" + { + "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" + ] + } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "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" + ] } }, - "404": { - "description": "Not Found" - } - }, - "x-property-id-kebab": "withdraw-totp-enrollment", - "x-tag-id-kebab": "Mfa", - "x-return-types-displayReturn": false, - "x-return-types": [ - "void" - ], - "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false, - "x-description": [ - "Withdraws from the TOTP enrollment." - ] - } - }, - "/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" - } - } - } - } - } + { + "name": "sort_order", + "in": "query", + "description": "Sort direction.", + "required": false, + "schema": { + "type": "string", + "example": "desc", + "default": null, + "enum": [ + "asc", + "desc" + ] } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "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" } }, - "404": { - "description": "Not Found" - } - }, - "x-property-id-kebab": "recreate-recovery-codes", - "x-tag-id-kebab": "Mfa", - "x-return-types-displayReturn": false, - "x-return-types": [ - "object" - ], - "x-phpdoc": { - "return": "object" - }, - "x-returnable": true, - "x-description": [ - "Re-creates recovery codes for the MFA enrollment." - ] - } - }, - "/users/{user_id}/phonenumber": { - "parameters": [ - { - "$ref": "#/components/parameters/UserID" - } - ], - "post": { - "summary": "Verify phone number", - "description": "Starts a phone number verification session.", - "operationId": "verify-phone-number", - "tags": [ - "PhoneNumber" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "sid": { - "type": "string", - "description": "Session ID of the verification." - } - } - } - } + { + "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" } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "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 + ] } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "name": "owner", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/FilterSelect" } }, - "409": { - "description": "Conflict", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "name": "languages", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/FilterSelect" } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "channel": { - "type": "string", - "description": "The channel used to receive the verification code.", - "enum": [ - "sms", - "whatsapp", - "call" - ] - }, - "phone_number": { - "type": "string", - "description": "The phone number used to receive the verification code." - } - }, - "required": [ - "channel", - "phone_number" - ] - } - } - } - }, - "x-property-id-kebab": "verify-phone-number", - "x-tag-id-kebab": "PhoneNumber", - "x-return-types-displayReturn": false, - "x-return-types": [ - "object" - ], - "x-phpdoc": { - "return": "object" - }, - "x-returnable": true, - "x-description": [ - "Starts a phone number verification session." - ] - } - }, - "/users/{user_id}/phonenumber/{sid}": { - "parameters": [ - { - "schema": { - "type": "string" - }, - "name": "sid", - "in": "path", - "required": true, - "description": "The session ID obtained from `POST /users/{user_id}/phonenumber`." - }, - { - "$ref": "#/components/parameters/UserID" - } - ], - "post": { - "summary": "Confirm phone number", - "description": "Confirms phone number using a verification code.", - "operationId": "confirm-phone-number", - "tags": [ - "PhoneNumber" - ], - "responses": { - "200": { - "description": "OK" - }, - "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": { - "code": { - "type": "string", - "description": "The verification code received on your phone." - } - }, - "required": [ - "code" - ] - } - } - } - }, - "x-property-id-kebab": "confirm-phone-number", - "x-tag-id-kebab": "PhoneNumber", - "x-return-types-displayReturn": false, - "x-return-types": [ - "void" - ], - "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false, - "x-description": [ - "Confirms phone number using a verification code." - ] - } - }, - "/users/{user_id}/teams": { - "parameters": [ - { - "$ref": "#/components/parameters/UserID" - } - ], - "get": { - "summary": "User teams", - "description": "Retrieves teams that the specified user is a member of.", - "operationId": "list-user-teams", - "tags": [ - "Teams" - ], - "parameters": [ - { - "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[updated_at]", - "description": "Allows filtering by `updated_at` using one or more operators.", - "style": "deepObject", - "explode": true, - "schema": { - "$ref": "#/components/schemas/DateTimeFilter" - } - }, - { - "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.
\nUse a dash (\"-\") to sort descending.\n", - "schema": { - "type": "string", - "enum": [ - "created_at", - "-created_at", - "updated_at", - "-updated_at" - ] - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Team" - } - }, - "count": { - "type": "integer", - "description": "Total count of all the teams." - }, - "_links": { - "$ref": "#/components/schemas/ListLinks" - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - }, - "x-property-id-kebab": "list-user-teams", - "x-tag-id-kebab": "Teams", - "x-return-types-displayReturn": false, - "x-return-types": [ - "object" - ], - "x-phpdoc": { - "return": "object" - }, - "x-returnable": true, - "x-description": [ - "Retrieves teams that the specified user is a member of." - ] - } - }, - "/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" - } - } - } - } - }, - "x-property-id-kebab": "get-access-document", - "x-tag-id-kebab": "Grants", - "x-return-types-displayReturn": false, - "x-return-types": [ - "object" - ], - "x-phpdoc": { - "return": "object" - }, - "x-returnable": true, - "x-description": [ - "Returns the full access document referenced by token claim `access_id`." - ] - } - }, - "/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 + }, + { + "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": "Applications listed successfully", + "description": "Profiles retrieved successfully", "content": { "application/json": { "schema": { - "type": "object", - "additionalProperties": false, "required": [ - "applications" + "_project_id", + "_environment_id", + "_branch_machine_name", + "_agent", + "profiles", + "page", + "pages", + "total" ], "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, + "_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", - "profile_types", - "languages" + "_links" ], "properties": { + "uuid": { + "description": "Profile UUID", + "type": "string", + "format": "uuid", + "example": "4b5266a2-fd71-468b-bf05-87b342079cbf" + }, "name": { + "description": "Profile name", "type": "string", - "example": "my-app" + "example": "POST /api/cart" }, - "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" - } - } - } + "created_at": { + "description": "Profile creation date (ISO 8601)", + "type": "string", + "format": "date-time", + "example": "2026-03-26T14:31:49+0000" }, - "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": { + "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": 400 + "example": 1 }, - "message": { - "type": "string", - "example": "invalid 'from' parameter" + "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 } } } }, - "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", + "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" + "type", + "title", + "status", + "violations" ], "properties": { - "code": { - "type": "integer", - "example": 499 + "type": { + "description": "RFC 2616 reference URL identifying the error type", + "type": "string", + "format": "uri", + "example": "https://tools.ietf.org/html/rfc2616#section-1" }, - "message": { + "title": { + "description": "Human-readable summary of the validation error", "type": "string", - "example": "Timeout while querying data" - } - } - } - } - } - } - }, - "x-property-id-kebab": "list_applications", - "x-tag-id-kebab": "Continuous-Profiling", - "x-return-types-displayReturn": false, - "x-return-types": {}, - "x-phpdoc": {}, - "x-returnable": true, - "x-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" + "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)" + } + }, + "x-property-id-kebab": "blackfire_profiles_list", + "x-tag-id-kebab": "Blackfire-Profiling", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "mixed" + ], + "x-return-types-union": "mixed", + "x-description": [ + "Returns a paginated list of profiles for the environment, optionally filtered by transaction name. Proxied from", + "the Blackfire API." ] } }, - "/projects/{projectId}/environments/{envId}/continuous-profiling/app/{app}": { + "/projects/{projectId}/certificates": { "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" + "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", + "x-property-id-kebab": "list-projects-certificates", + "x-tag-id-kebab": "Cert-Management", + "x-return-types-displayReturn": true, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Certificate[]" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Certificate[]" + ], + "x-return-types-union": "array", + "x-description": [ + "Retrieve a list of objects representing the SSL certificates associated with a project." + ] + }, + "post": { + "parameters": [ { - "name": "envId", "in": "path", "required": true, - "description": "The environment identifier", "schema": { - "type": "string", - "pattern": ".+", - "example": "main" + "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", + "x-property-id-kebab": "create-projects-certificates", + "x-tag-id-kebab": "Cert-Management", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-description": [ + "Add a single SSL certificate to a project." + ] + } + }, + "/projects/{projectId}/certificates/{certificateId}": { + "get": { + "parameters": [ { - "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" - } + "type": "string" + }, + "name": "projectId" }, { - "name": "runtime_mode", - "in": "query", - "description": "Filter mode for runtime parameter. \"1\" (additive) includes only specified runtimes. \"-1\" (subtractive) excludes specified runtimes and includes all others.", + "in": "path", + "required": true, "schema": { - "type": "integer", - "enum": [ - 1, - -1 - ], - "example": 1 + "type": "string" + }, + "name": "certificateId" + } + ], + "operationId": "get-projects-certificates", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Certificate" + } + } } - }, - { - "name": "runtime[]", - "in": "query", - "description": "Filter by runtime language. Can be specified multiple times for multiple values (e.g., ?runtime[]=go&runtime[]=python). Use runtime_mode to control inclusion/exclusion behavior.", - "style": "form", - "explode": true, - "schema": { - "type": "array", - "items": { - "type": "string", - "example": "go" + } + }, + "tags": [ + "Cert Management" + ], + "summary": "Get an SSL certificate", + "description": "Retrieve information about a single SSL certificate\nassociated with a project.\n", + "x-property-id-kebab": "get-projects-certificates", + "x-tag-id-kebab": "Cert-Management", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Certificate" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Certificate" + ], + "x-return-types-union": "\\Upsun\\Model\\Certificate", + "x-description": [ + "Retrieve information about a single SSL certificate associated with a project." + ] + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CertificatePatch" } } - }, + } + }, + "parameters": [ { - "name": "runtime_version_mode", - "in": "query", - "description": "Filter mode for runtime_version parameter. \"1\" (additive) includes only specified versions. \"-1\" (subtractive) excludes specified versions and includes all others.", + "in": "path", + "required": true, "schema": { - "type": "integer", - "enum": [ - 1, - -1 - ], - "example": 1 - } + "type": "string" + }, + "name": "projectId" }, { - "name": "runtime_version[]", - "in": "query", - "description": "Filter by runtime version. Can be specified multiple times for multiple values (e.g., ?runtime_version[]=1.21&runtime_version[]=1.22). Use runtime_version_mode to control inclusion/exclusion behavior.", - "style": "form", - "explode": true, + "in": "path", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string", - "example": "1.21" + "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", + "x-property-id-kebab": "update-projects-certificates", + "x-tag-id-kebab": "Cert-Management", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-description": [ + "Update a single SSL certificate associated with a project." + ] + }, + "delete": { + "parameters": [ { - "name": "runtime_arch_mode", - "in": "query", - "description": "Filter mode for runtime_arch parameter. \"1\" (additive) includes only specified architectures. \"-1\" (subtractive) excludes specified architectures and includes all others.", + "in": "path", + "required": true, "schema": { - "type": "integer", - "enum": [ - 1, - -1 - ], - "example": 1 - } + "type": "string" + }, + "name": "projectId" }, { - "name": "runtime_arch[]", - "in": "query", - "description": "Filter by runtime architecture. Can be specified multiple times for multiple values (e.g., ?runtime_arch[]=amd64&runtime_arch[]=arm64). Use runtime_arch_mode to control inclusion/exclusion behavior.", - "style": "form", - "explode": true, + "in": "path", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string", - "example": "amd64" + "type": "string" + }, + "name": "certificateId" + } + ], + "operationId": "delete-projects-certificates", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } } } - }, - { - "name": "runtime_os_mode", - "in": "query", - "description": "Filter mode for runtime_os parameter. \"1\" (additive) includes only specified operating systems. \"-1\" (subtractive) excludes specified operating systems and includes all others.", - "schema": { - "type": "integer", - "enum": [ - 1, - -1 - ], - "example": 1 - } - }, + } + }, + "tags": [ + "Cert Management" + ], + "summary": "Delete an SSL certificate", + "description": "Delete a single SSL certificate associated with a project.\n", + "x-property-id-kebab": "delete-projects-certificates", + "x-tag-id-kebab": "Cert-Management", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-description": [ + "Delete a single SSL certificate associated with a project." + ] + } + }, + "/projects/{projectId}/provisioners": { + "get": { + "parameters": [ { - "name": "runtime_os[]", - "in": "query", - "description": "Filter by runtime operating system. Can be specified multiple times for multiple values (e.g., ?runtime_os[]=linux&runtime_os[]=darwin). Use runtime_os_mode to control inclusion/exclusion behavior.", - "style": "form", - "explode": true, + "in": "path", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string", - "example": "linux" + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-provisioners", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CertificateProvisionerCollection" + } } } - }, + } + }, + "tags": [ + "Cert Management" + ], + "x-property-id-kebab": "list-projects-provisioners", + "x-tag-id-kebab": "Cert-Management", + "x-return-types-displayReturn": true, + "x-phpdoc": { + "return": "\\Upsun\\Model\\CertificateProvisioner[]" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\CertificateProvisioner[]" + ], + "x-return-types-union": "array" + } + }, + "/projects/{projectId}/provisioners/{certificateProvisionerDocumentId}": { + "get": { + "parameters": [ { - "name": "probe_version_mode", - "in": "query", - "description": "Filter mode for probe_version parameter. \"1\" (additive) includes only specified probe versions. \"-1\" (subtractive) excludes specified probe versions and includes all others.", + "in": "path", + "required": true, "schema": { - "type": "integer", - "enum": [ - 1, - -1 - ], - "example": 1 - } + "type": "string" + }, + "name": "projectId" }, { - "name": "probe_version[]", - "in": "query", - "description": "Filter by probe version. Can be specified multiple times for multiple values (e.g., ?probe_version[]=2.28.2&probe_version[]=2.28.1). Use probe_version_mode to control inclusion/exclusion behavior.", - "style": "form", - "explode": true, + "in": "path", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string", - "example": "2.28.2" - } - } + "type": "string" + }, + "name": "certificateProvisionerDocumentId" } ], + "operationId": "get-projects-provisioners", "responses": { - "200": { - "description": "Timeline data retrieved successfully", + "default": { + "description": "", "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": { + "$ref": "#/components/schemas/CertificateProvisioner" + } + } + } + } + }, + "tags": [ + "Cert Management" + ], + "x-property-id-kebab": "get-projects-provisioners", + "x-tag-id-kebab": "Cert-Management", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\CertificateProvisioner" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\CertificateProvisioner" + ], + "x-return-types-union": "\\Upsun\\Model\\CertificateProvisioner" + }, + "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" + ], + "x-property-id-kebab": "update-projects-provisioners", + "x-tag-id-kebab": "Cert-Management", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse" + } + }, + "/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" + } + } + } + } + }, + "x-property-id-kebab": "list-login-connections", + "x-tag-id-kebab": "Connections", + "x-return-types-displayReturn": true, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Connection[]" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Connection[]" + ], + "x-return-types-union": "array", + "x-description": [ + "Retrieves a list of connections associated with a single user." + ] + } + }, + "/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" + } + }, + "x-property-id-kebab": "get-login-connection", + "x-tag-id-kebab": "Connections", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Connection" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Connection" + ], + "x-return-types-union": "\\Upsun\\Model\\Connection", + "x-description": [ + "Retrieves the specified connection." + ] + }, + "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" + } + }, + "x-property-id-kebab": "delete-login-connection", + "x-tag-id-kebab": "Connections", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-description": [ + "Deletes the specified connection." + ] + } + }, + "/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": [ - "timestamp" + "name", + "profile_types", + "languages" ], "properties": { - "timestamp": { - "type": "integer", - "format": "int64", - "example": 1700000000 + "name": { + "type": "string", + "example": "my-app" }, - "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 + "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" + ] } } } @@ -5347,7 +7197,7 @@ }, "message": { "type": "string", - "example": "Invalid filters" + "example": "invalid 'from' parameter" } } } @@ -5383,24 +7233,29 @@ } } }, - "x-property-id-kebab": "get_application_timeline", + "x-property-id-kebab": "list_applications", "x-tag-id-kebab": "Continuous-Profiling", "x-return-types-displayReturn": false, - "x-return-types": {}, "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "mixed" + ], + "x-return-types-union": "mixed", "x-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" + "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" ] } }, - "/projects/{projectId}/environments/{envId}/continuous-profiling/app/{app}/merge": { + "/projects/{projectId}/environments/{envId}/continuous-profiling/app/{app}": { "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", + "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" ], @@ -5480,154 +7335,316 @@ } }, { - "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" }, { - "name": "runtime_mode", - "in": "query", - "description": "Filter mode for runtime parameter. \"1\" (additive) includes only specified runtimes. \"-1\" (subtractive) excludes specified runtimes and includes all others.", - "schema": { - "type": "integer", - "enum": [ - 1, - -1 - ], - "example": 1 - } + "$ref": "#/components/parameters/RuntimeValues" }, { - "name": "runtime[]", - "in": "query", - "description": "Filter by runtime language. Can be specified multiple times for multiple values (e.g., ?runtime[]=go&runtime[]=python). Use runtime_mode to control inclusion/exclusion behavior.", - "style": "form", - "explode": true, - "schema": { - "type": "array", - "items": { - "type": "string", - "example": "go" - } - } + "$ref": "#/components/parameters/RuntimeVersionMode" }, { - "name": "runtime_version_mode", - "in": "query", - "description": "Filter mode for runtime_version parameter. \"1\" (additive) includes only specified versions. \"-1\" (subtractive) excludes specified versions and includes all others.", - "schema": { - "type": "integer", - "enum": [ - 1, - -1 - ], - "example": 1 - } + "$ref": "#/components/parameters/RuntimeVersionValues" }, { - "name": "runtime_version[]", - "in": "query", - "description": "Filter by runtime version. Can be specified multiple times for multiple values (e.g., ?runtime_version[]=1.21&runtime_version[]=1.22). Use runtime_version_mode to control inclusion/exclusion behavior.", - "style": "form", - "explode": true, - "schema": { - "type": "array", - "items": { - "type": "string", - "example": "1.21" - } - } + "$ref": "#/components/parameters/RuntimeArchMode" }, { - "name": "runtime_arch_mode", - "in": "query", - "description": "Filter mode for runtime_arch parameter. \"1\" (additive) includes only specified architectures. \"-1\" (subtractive) excludes specified architectures and includes all others.", - "schema": { - "type": "integer", - "enum": [ - 1, - -1 - ], - "example": 1 - } + "$ref": "#/components/parameters/RuntimeArchValues" }, { - "name": "runtime_arch[]", - "in": "query", - "description": "Filter by runtime architecture. Can be specified multiple times for multiple values (e.g., ?runtime_arch[]=amd64&runtime_arch[]=arm64). Use runtime_arch_mode to control inclusion/exclusion behavior.", - "style": "form", - "explode": true, - "schema": { - "type": "array", - "items": { - "type": "string", - "example": "amd64" + "$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" + } + } + } } } + } + }, + "x-property-id-kebab": "get_application_timeline", + "x-tag-id-kebab": "Continuous-Profiling", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "mixed" + ], + "x-return-types-union": "mixed", + "x-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" + ] + } + }, + "/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": "runtime_os_mode", + "name": "app", + "in": "path", + "required": true, + "description": "URL-encoded application name", + "schema": { + "type": "string", + "pattern": ".+", + "example": "my-app" + } + }, + { + "name": "from", "in": "query", - "description": "Filter mode for runtime_os parameter. \"1\" (additive) includes only specified operating systems. \"-1\" (subtractive) excludes specified operating systems and includes all others.", + "description": "Start of the time range as a Unix timestamp, defaults to now minus 30 minutes.", "schema": { "type": "integer", - "enum": [ - 1, - -1 - ], - "example": 1 + "format": "int64", + "example": 1700000000 } }, { - "name": "runtime_os[]", + "name": "to", "in": "query", - "description": "Filter by runtime operating system. Can be specified multiple times for multiple values (e.g., ?runtime_os[]=linux&runtime_os[]=darwin). Use runtime_os_mode to control inclusion/exclusion behavior.", - "style": "form", - "explode": true, + "description": "End of the time range as a Unix timestamp, defaults to now.", "schema": { - "type": "array", - "items": { - "type": "string", - "example": "linux" - } + "type": "integer", + "format": "int64", + "example": 1700003600 } }, { - "name": "probe_version_mode", + "name": "profile_type", "in": "query", - "description": "Filter mode for probe_version parameter. \"1\" (additive) includes only specified probe versions. \"-1\" (subtractive) excludes specified probe versions and includes all others.", + "description": "Profile type to query.", "schema": { - "type": "integer", + "type": "string", "enum": [ - 1, - -1 + "cpu", + "wall-time", + "wall", + "goroutine", + "alloc_objects", + "alloc_space", + "inuse_objects", + "inuse_space", + "space" ], - "example": 1 + "default": null, + "example": "cpu" } }, { - "name": "probe_version[]", + "name": "out", "in": "query", - "description": "Filter by probe version. Can be specified multiple times for multiple values (e.g., ?probe_version[]=2.28.2&probe_version[]=2.28.1). Use probe_version_mode to control inclusion/exclusion behavior.", - "style": "form", - "explode": true, + "description": "Output format for the merged profile.", "schema": { - "type": "array", - "items": { - "type": "string", - "example": "2.28.2" - } + "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": { @@ -6055,9 +8072,14 @@ "x-property-id-kebab": "get_application_merge", "x-tag-id-kebab": "Continuous-Profiling", "x-return-types-displayReturn": false, - "x-return-types": {}, "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "mixed" + ], + "x-return-types-union": "mixed", "x-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", @@ -6149,139 +8171,34 @@ } }, { - "name": "runtime_mode", - "in": "query", - "description": "Filter mode for runtime parameter. \"1\" (additive) includes only specified runtimes. \"-1\" (subtractive) excludes specified runtimes and includes all others.", - "schema": { - "type": "integer", - "enum": [ - 1, - -1 - ], - "example": 1 - } + "$ref": "#/components/parameters/RuntimeMode" }, { - "name": "runtime[]", - "in": "query", - "description": "Filter by runtime language. Can be specified multiple times for multiple values (e.g., ?runtime[]=go&runtime[]=python). Use runtime_mode to control inclusion/exclusion behavior.", - "style": "form", - "explode": true, - "schema": { - "type": "array", - "items": { - "type": "string", - "example": "go" - } - } + "$ref": "#/components/parameters/RuntimeValues" }, { - "name": "runtime_version_mode", - "in": "query", - "description": "Filter mode for runtime_version parameter. \"1\" (additive) includes only specified versions. \"-1\" (subtractive) excludes specified versions and includes all others.", - "schema": { - "type": "integer", - "enum": [ - 1, - -1 - ], - "example": 1 - } + "$ref": "#/components/parameters/RuntimeVersionMode" }, { - "name": "runtime_version[]", - "in": "query", - "description": "Filter by runtime version. Can be specified multiple times for multiple values (e.g., ?runtime_version[]=1.21&runtime_version[]=1.22). Use runtime_version_mode to control inclusion/exclusion behavior.", - "style": "form", - "explode": true, - "schema": { - "type": "array", - "items": { - "type": "string", - "example": "1.21" - } - } + "$ref": "#/components/parameters/RuntimeVersionValues" }, { - "name": "runtime_arch_mode", - "in": "query", - "description": "Filter mode for runtime_arch parameter. \"1\" (additive) includes only specified architectures. \"-1\" (subtractive) excludes specified architectures and includes all others.", - "schema": { - "type": "integer", - "enum": [ - 1, - -1 - ], - "example": 1 - } + "$ref": "#/components/parameters/RuntimeArchMode" }, { - "name": "runtime_arch[]", - "in": "query", - "description": "Filter by runtime architecture. Can be specified multiple times for multiple values (e.g., ?runtime_arch[]=amd64&runtime_arch[]=arm64). Use runtime_arch_mode to control inclusion/exclusion behavior.", - "style": "form", - "explode": true, - "schema": { - "type": "array", - "items": { - "type": "string", - "example": "amd64" - } - } + "$ref": "#/components/parameters/RuntimeArchValues" }, { - "name": "runtime_os_mode", - "in": "query", - "description": "Filter mode for runtime_os parameter. \"1\" (additive) includes only specified operating systems. \"-1\" (subtractive) excludes specified operating systems and includes all others.", - "schema": { - "type": "integer", - "enum": [ - 1, - -1 - ], - "example": 1 - } + "$ref": "#/components/parameters/RuntimeOsMode" }, { - "name": "runtime_os[]", - "in": "query", - "description": "Filter by runtime operating system. Can be specified multiple times for multiple values (e.g., ?runtime_os[]=linux&runtime_os[]=darwin). Use runtime_os_mode to control inclusion/exclusion behavior.", - "style": "form", - "explode": true, - "schema": { - "type": "array", - "items": { - "type": "string", - "example": "linux" - } - } + "$ref": "#/components/parameters/RuntimeOsValues" }, { - "name": "probe_version_mode", - "in": "query", - "description": "Filter mode for probe_version parameter. \"1\" (additive) includes only specified probe versions. \"-1\" (subtractive) excludes specified probe versions and includes all others.", - "schema": { - "type": "integer", - "enum": [ - 1, - -1 - ], - "example": 1 - } + "$ref": "#/components/parameters/ProbeVersionMode" }, { - "name": "probe_version[]", - "in": "query", - "description": "Filter by probe version. Can be specified multiple times for multiple values (e.g., ?probe_version[]=2.28.2&probe_version[]=2.28.1). Use probe_version_mode to control inclusion/exclusion behavior.", - "style": "form", - "explode": true, - "schema": { - "type": "array", - "items": { - "type": "string", - "example": "2.28.2" - } - } + "$ref": "#/components/parameters/ProbeVersionValues" } ], "responses": { @@ -6436,16 +8353,21 @@ "x-property-id-kebab": "get_application_filter", "x-tag-id-kebab": "Continuous-Profiling", "x-return-types-displayReturn": false, - "x-return-types": {}, "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "mixed" + ], + "x-return-types-union": "mixed", "x-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" ] } }, - "/projects/{projectId}": { + "/projects/{projectId}/environments/{environmentId}/deployments": { "get": { "parameters": [ { @@ -6455,100 +8377,58 @@ "type": "string" }, "name": "projectId" - } - ], - "operationId": "get-projects", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Project" - } - } - } - } - }, - "tags": [ - "Project" - ], - "summary": "Get a project", - "description": "Retrieve the details of a single project.", - "x-property-id-kebab": "get-projects", - "x-tag-id-kebab": "Project", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Project" - ], - "x-return-types-union": "\\Upsun\\Model\\Project", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Project" - }, - "x-returnable": true, - "x-description": [ - "Retrieve the details of a single project." - ] - } - }, - "/projects/{projectId}/activities": { - "get": { - "parameters": [ + }, { "in": "path", "required": true, "schema": { "type": "string" }, - "name": "projectId" + "name": "environmentId" } ], - "operationId": "list-projects-activities", + "operationId": "list-projects-environments-deployments", "responses": { "default": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ActivityCollection" + "$ref": "#/components/schemas/DeploymentCollection" } } } } }, "tags": [ - "Project Activity" + "Deployment" ], - "summary": "Get project activity log", - "description": "Retrieve a project's activity log including logging actions in all\nenvironments within a project. This returns a list of objects\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`), the `environments` it\napplies to and when the activity expires (`expires_at`).\n\nThere are other related information in the `payload`.\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 environment's `parent` environment and the\nbranching action's `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\nExpired activities are removed from the project activity log, except\nthe last 100 expired objects provided they are not of type `environment.cron`\nor `environment.backup`.\n", - "x-property-id-kebab": "list-projects-activities", - "x-tag-id-kebab": "Project-Activity", + "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", + "x-property-id-kebab": "list-projects-environments-deployments", + "x-tag-id-kebab": "Deployment", "x-return-types-displayReturn": true, - "x-return-types": [ - "\\Upsun\\Model\\Activity[]" - ], - "x-return-types-union": "array", "x-phpdoc": { - "return": "\\Upsun\\Model\\Activity[]" + "return": "\\Upsun\\Model\\Deployment[]" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Deployment[]" + ], + "x-return-types-union": "array", "x-description": [ - "Retrieve a project's activity log including logging actions in all environments within a project. This returns a", - "list of objects with records of actions such as: - Commits being pushed to the repository - A new environment", - "being branched out from the specified environment - A snapshot being created of the specified environment The", - "object includes a timestamp of when the action occurred (`created_at`), when the action concluded (`updated_at`),", - "the current `state` of the action, the action's completion percentage (`completion_percent`), the `environments`", - "it applies to and when the activity expires (`expires_at`). There are other related information in the `payload`.", - "The contents of the `payload` varies based on the `type` of the activity. For example: - An `environment.branch`", - "action's `payload` can contain objects representing the environment's `parent` environment and the branching", - "action's `outcome`. - An `environment.push` action's `payload` can contain objects representing the", - "`environment`, the specific `commits` included in the push, and the `user` who pushed. Expired activities are", - "removed from the project activity log, except the last 100 expired objects provided they are not of type", - "`environment.cron` or `environment.backup`." + "Retrieve the read-only configuration of an environment's deployment. The returned information is everything", + "required to recreate a project's current deployment. More specifically, the objects returned by this endpoint", + "contain the configuration derived from the repository's YAML configuration file: `.upsun/config.yaml`.", + "Additionally, any values deriving from environment variables, the domains attached to a project, project access", + "settings, etc. are included here. This endpoint currently returns a list containing a single deployment", + "configuration with an `id` of `current`. This may be subject to change in the future." ] } }, - "/projects/{projectId}/activities/{activityId}": { + "/projects/{projectId}/environments/{environmentId}/deployments/{deploymentId}": { "get": { "parameters": [ { @@ -6565,55 +8445,7 @@ "schema": { "type": "string" }, - "name": "activityId" - } - ], - "operationId": "get-projects-activities", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Activity" - } - } - } - } - }, - "tags": [ - "Project Activity" - ], - "summary": "Get a project activity log entry", - "description": "Retrieve a single activity log entry as specified by an\n`id` returned by the\n[Get project activity log](#tag/Project-Activity%2Fpaths%2F~1projects~1%7BprojectId%7D~1activities%2Fget)\nendpoint. See the documentation on that endpoint for details about\nthe information this endpoint can return.\n", - "x-property-id-kebab": "get-projects-activities", - "x-tag-id-kebab": "Project-Activity", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Activity" - ], - "x-return-types-union": "\\Upsun\\Model\\Activity", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Activity" - }, - "x-returnable": true, - "x-description": [ - "Retrieve a single activity log entry as specified by an `id` returned by the Get project activity log", - "(https://docs.upsun.com/api/#tag/Project-Activity/paths//projects/{projectId}/activities/get) endpoint. See the", - "documentation on that endpoint for details about the information this endpoint can return." - ] - } - }, - "/projects/{projectId}/activities/{activityId}/cancel": { - "post": { - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" + "name": "environmentId" }, { "in": "path", @@ -6621,93 +8453,47 @@ "schema": { "type": "string" }, - "name": "activityId" + "name": "deploymentId" } ], - "operationId": "action-projects-activities-cancel", + "operationId": "get-projects-environments-deployments", "responses": { "default": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AcceptedResponse" + "$ref": "#/components/schemas/Deployment" } } } } }, "tags": [ - "Project Activity" + "Deployment" ], - "summary": "Cancel a project activity", - "description": "Cancel a single activity as specified by an `id` returned by the\n[Get project activity log](#tag/Project-Activity%2Fpaths%2F~1projects~1%7BprojectId%7D~1activities%2Fget)\nendpoint.\n\nPlease note that not all activities are cancelable.\n", - "x-property-id-kebab": "action-projects-activities-cancel", - "x-tag-id-kebab": "Project-Activity", + "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", + "x-property-id-kebab": "get-projects-environments-deployments", + "x-tag-id-kebab": "Deployment", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" + "return": "\\Upsun\\Model\\Deployment" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, - "x-description": [ - "Cancel a single activity as specified by an `id` returned by the Get project activity log", - "(https://docs.upsun.com/api/#tag/Project-Activity/paths//projects/{projectId}/activities/get) endpoint. Please", - "note that not all activities are cancelable." - ] - } - }, - "/projects/{projectId}/capabilities": { - "get": { - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - } - ], - "operationId": "get-projects-capabilities", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProjectCapabilities" - } - } - } - } - }, - "tags": [ - "Project" - ], - "summary": "Get a project's capabilities", - "description": "Get a list of capabilities on a project, as defined by the billing system.\nFor instance, one special capability that could be defined on a project is\nlarge development environments.\n", - "x-property-id-kebab": "get-projects-capabilities", - "x-tag-id-kebab": "Project", - "x-return-types-displayReturn": false, "x-return-types": [ - "\\Upsun\\Model\\ProjectCapabilities" + "\\Upsun\\Model\\Deployment" ], - "x-return-types-union": "\\Upsun\\Model\\ProjectCapabilities", - "x-phpdoc": { - "return": "\\Upsun\\Model\\ProjectCapabilities" - }, - "x-returnable": true, + "x-return-types-union": "\\Upsun\\Model\\Deployment", "x-description": [ - "Get a list of capabilities on a project, as defined by the billing system. For instance, one special capability", - "that could be defined on a project is large development environments." + "Retrieve a single deployment configuration with an id of `current`. This may be subject to change in the future.", + "Only `current` can be queried." ] } }, - "/projects/{projectId}/certificates": { + "/projects/{projectId}/deployments": { "get": { "parameters": [ { @@ -6719,37 +8505,39 @@ "name": "projectId" } ], - "operationId": "list-projects-certificates", + "operationId": "list-projects-deployments", "responses": { "default": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CertificateCollection" + "$ref": "#/components/schemas/DeploymentTargetCollection" } } } } }, "tags": [ - "Cert Management" + "Deployment Target" ], - "summary": "Get list of SSL certificates", - "description": "Retrieve a list of objects representing the SSL certificates\nassociated with a project.\n", - "x-property-id-kebab": "list-projects-certificates", - "x-tag-id-kebab": "Cert-Management", + "summary": "Get project deployment target info", + "description": "The deployment target information for the project.\n", + "x-property-id-kebab": "list-projects-deployments", + "x-tag-id-kebab": "Deployment-Target", "x-return-types-displayReturn": true, - "x-return-types": [ - "\\Upsun\\Model\\Certificate[]" - ], - "x-return-types-union": "array", "x-phpdoc": { - "return": "\\Upsun\\Model\\Certificate[]" + "return": "\\Upsun\\Model\\DeploymentTarget[]" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\DeploymentTarget[]" + ], + "x-return-types-union": "array", "x-description": [ - "Retrieve a list of objects representing the SSL certificates associated with a project." + "The deployment target information for the project." ] }, "post": { @@ -6763,7 +8551,7 @@ "name": "projectId" } ], - "operationId": "create-projects-certificates", + "operationId": "create-projects-deployments", "responses": { "default": { "description": "", @@ -6782,33 +8570,35 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CertificateCreateInput" + "$ref": "#/components/schemas/DeploymentTargetCreateInput" } } } }, "tags": [ - "Cert Management" + "Deployment Target" ], - "summary": "Add an SSL certificate", - "description": "Add a single SSL certificate to a project.\n", - "x-property-id-kebab": "create-projects-certificates", - "x-tag-id-kebab": "Cert-Management", + "summary": "Create a project deployment target", + "description": "Set the deployment target information for a project.\n", + "x-property-id-kebab": "create-projects-deployments", + "x-tag-id-kebab": "Deployment-Target", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", "x-phpdoc": { "return": "\\Upsun\\Model\\AcceptedResponse" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", "x-description": [ - "Add a single SSL certificate to a project." + "Set the deployment target information for a project." ] } }, - "/projects/{projectId}/certificates/{certificateId}": { + "/projects/{projectId}/deployments/{deploymentTargetConfigurationId}": { "get": { "parameters": [ { @@ -6825,40 +8615,42 @@ "schema": { "type": "string" }, - "name": "certificateId" + "name": "deploymentTargetConfigurationId" } ], - "operationId": "get-projects-certificates", + "operationId": "get-projects-deployments", "responses": { "default": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Certificate" + "$ref": "#/components/schemas/DeploymentTarget" } } } } }, "tags": [ - "Cert Management" + "Deployment Target" ], - "summary": "Get an SSL certificate", - "description": "Retrieve information about a single SSL certificate\nassociated with a project.\n", - "x-property-id-kebab": "get-projects-certificates", - "x-tag-id-kebab": "Cert-Management", + "summary": "Get a single project deployment target", + "description": "Get a single deployment target configuration of a project.\n", + "x-property-id-kebab": "get-projects-deployments", + "x-tag-id-kebab": "Deployment-Target", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Certificate" - ], - "x-return-types-union": "\\Upsun\\Model\\Certificate", "x-phpdoc": { - "return": "\\Upsun\\Model\\Certificate" + "return": "\\Upsun\\Model\\DeploymentTarget" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\DeploymentTarget" + ], + "x-return-types-union": "\\Upsun\\Model\\DeploymentTarget", "x-description": [ - "Retrieve information about a single SSL certificate associated with a project." + "Get a single deployment target configuration of a project." ] }, "patch": { @@ -6868,7 +8660,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CertificatePatch" + "$ref": "#/components/schemas/DeploymentTargetPatch" } } } @@ -6888,10 +8680,10 @@ "schema": { "type": "string" }, - "name": "certificateId" + "name": "deploymentTargetConfigurationId" } ], - "operationId": "update-projects-certificates", + "operationId": "update-projects-deployments", "responses": { "default": { "description": "", @@ -6905,24 +8697,22 @@ } }, "tags": [ - "Cert Management" + "Deployment Target" ], - "summary": "Update an SSL certificate", - "description": "Update a single SSL certificate associated with a project.\n", - "x-property-id-kebab": "update-projects-certificates", - "x-tag-id-kebab": "Cert-Management", + "summary": "Update a project deployment", + "x-property-id-kebab": "update-projects-deployments", + "x-tag-id-kebab": "Deployment-Target", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", "x-phpdoc": { "return": "\\Upsun\\Model\\AcceptedResponse" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, - "x-description": [ - "Update a single SSL certificate associated with a project." - ] + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse" }, "delete": { "parameters": [ @@ -6940,10 +8730,10 @@ "schema": { "type": "string" }, - "name": "certificateId" + "name": "deploymentTargetConfigurationId" } ], - "operationId": "delete-projects-certificates", + "operationId": "delete-projects-deployments", "responses": { "default": { "description": "", @@ -6957,28 +8747,30 @@ } }, "tags": [ - "Cert Management" + "Deployment Target" ], - "summary": "Delete an SSL certificate", - "description": "Delete a single SSL certificate associated with a project.\n", - "x-property-id-kebab": "delete-projects-certificates", - "x-tag-id-kebab": "Cert-Management", + "summary": "Delete a single project deployment target", + "description": "Delete a single deployment target configuration associated with a specific project.\n", + "x-property-id-kebab": "delete-projects-deployments", + "x-tag-id-kebab": "Deployment-Target", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", "x-phpdoc": { "return": "\\Upsun\\Model\\AcceptedResponse" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", "x-description": [ - "Delete a single SSL certificate associated with a project." + "Delete a single deployment target configuration associated with a specific project." ] } }, - "/projects/{projectId}/clear_build_cache": { - "post": { + "/projects/{projectId}/git/diffs/{diffBaseId}/{diffTargetId}": { + "get": { "parameters": [ { "in": "path", @@ -6987,307 +8779,323 @@ "type": "string" }, "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "diffBaseId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "diffTargetId" } ], - "operationId": "action-projects-clear-build-cache", + "operationId": "list-projects-git-diffs", "responses": { "default": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AcceptedResponse" + "$ref": "#/components/schemas/DiffCollection" } } } } }, "tags": [ - "Project" - ], - "summary": "Clear project build cache", - "description": "On rare occasions, a project's build cache can become corrupted. This\nendpoint will entirely flush the project's build cache. More information\non [clearing the build cache can be found in our user documentation.](https://docs.upsun.com/anchors/troubleshoot/clear-build-cache/)\n", - "x-property-id-kebab": "action-projects-clear-build-cache", - "x-tag-id-kebab": "Project", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" + "Diff" ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-property-id-kebab": "list-projects-git-diffs", + "x-tag-id-kebab": "Diff", + "x-return-types-displayReturn": true, "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" + "return": "\\Upsun\\Model\\Diff[]" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, - "x-description": [ - "On rare occasions, a project's build cache can become corrupted. This endpoint will entirely flush the project's", - "build cache. More information on [clearing the build cache can be found in our user", - "documentation.](https://docs.upsun.com/anchors/troubleshoot/clear-build-cache/)" - ] + "x-return-types": [ + "\\Upsun\\Model\\Diff[]" + ], + "x-return-types-union": "array" } }, - "/projects/{projectId}/deployments": { + "/discounts/{id}": { "get": { + "tags": [ + "Discounts" + ], + "summary": "Get an organization discount", + "operationId": "get-discount", "parameters": [ { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" + "$ref": "#/components/parameters/discountId" } ], - "operationId": "list-projects-deployments", "responses": { - "default": { - "description": "", + "200": { + "description": "A discount object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeploymentTargetCollection" + "$ref": "#/components/schemas/Discount" } } } } }, - "tags": [ - "Deployment Target" - ], - "summary": "Get project deployment target info", - "description": "The deployment target information for the project.\n", - "x-property-id-kebab": "list-projects-deployments", - "x-tag-id-kebab": "Deployment-Target", - "x-return-types-displayReturn": true, - "x-return-types": [ - "\\Upsun\\Model\\DeploymentTarget[]" - ], - "x-return-types-union": "array", + "x-vendor": "upsun", + "x-property-id-kebab": "get-discount", + "x-tag-id-kebab": "Discounts", + "x-return-types-displayReturn": false, "x-phpdoc": { - "return": "\\Upsun\\Model\\DeploymentTarget[]" + "return": "\\Upsun\\Model\\Discount" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, - "x-description": [ - "The deployment target information for the project." - ] - }, - "post": { - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - } + "x-return-types": [ + "\\Upsun\\Model\\Discount" ], - "operationId": "create-projects-deployments", + "x-return-types-union": "\\Upsun\\Model\\Discount" + } + }, + "/discounts/types/allowance": { + "get": { + "tags": [ + "Discounts" + ], + "summary": "Get the value of the First Project Incentive discount", + "operationId": "get-type-allowance", "responses": { - "default": { - "description": "", + "200": { + "description": "A discount object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AcceptedResponse" + "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" } } } } }, - "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", - "x-property-id-kebab": "create-projects-deployments", - "x-tag-id-kebab": "Deployment-Target", + "x-vendor": "upsun", + "x-property-id-kebab": "get-type-allowance", + "x-tag-id-kebab": "Discounts", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" + "return": "object" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, - "x-description": [ - "Set the deployment target information for a project." + "x-return-types": [ + "object" ] } }, - "/projects/{projectId}/deployments/{deploymentTargetConfigurationId}": { + "/organizations/{organization_id}/discounts": { "get": { + "summary": "List organization discounts", + "description": "Retrieves all applicable discounts granted to the specified organization.", + "operationId": "list-org-discounts", + "tags": [ + "Discounts" + ], "parameters": [ { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - }, - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "deploymentTargetConfigurationId" + "$ref": "#/components/parameters/OrganizationIDName" } ], - "operationId": "get-projects-deployments", "responses": { - "default": { - "description": "", + "200": { + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeploymentTarget" + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Discount" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } } } } - } - }, - "tags": [ - "Deployment Target" - ], - "summary": "Get a single project deployment target", - "description": "Get a single deployment target configuration of a project.\n", - "x-property-id-kebab": "get-projects-deployments", - "x-tag-id-kebab": "Deployment-Target", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\DeploymentTarget" - ], - "x-return-types-union": "\\Upsun\\Model\\DeploymentTarget", - "x-phpdoc": { - "return": "\\Upsun\\Model\\DeploymentTarget" - }, - "x-returnable": true, - "x-description": [ - "Get a single deployment target configuration of a project." - ] - }, - "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": "", + "403": { + "description": "Forbidden", "content": { - "application/json": { + "application/problem+json": { "schema": { - "$ref": "#/components/schemas/AcceptedResponse" + "$ref": "#/components/schemas/Error" } } } - } - }, - "tags": [ - "Deployment Target" - ], - "summary": "Update a project deployment", - "x-property-id-kebab": "update-projects-deployments", - "x-tag-id-kebab": "Deployment-Target", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true - }, - "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": "", + "404": { + "description": "Not Found", "content": { - "application/json": { + "application/problem+json": { "schema": { - "$ref": "#/components/schemas/AcceptedResponse" + "$ref": "#/components/schemas/Error" } } } } }, - "tags": [ - "Deployment Target" - ], - "summary": "Delete a single project deployment target", - "description": "Delete a single deployment target configuration associated with a specific project.\n", - "x-property-id-kebab": "delete-projects-deployments", - "x-tag-id-kebab": "Deployment-Target", + "x-vendor": "upsun", + "x-property-id-kebab": "list-org-discounts", + "x-tag-id-kebab": "Discounts", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" + "return": "object" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "object" + ], "x-description": [ - "Delete a single deployment target configuration associated with a specific project." + "Retrieves all applicable discounts granted to the specified organization." ] } }, @@ -7317,19 +9125,21 @@ } }, "tags": [ - "DomainClaim" + "Domain Claim" ], "x-property-id-kebab": "list-projects-domain-claims", - "x-tag-id-kebab": "DomainClaim", + "x-tag-id-kebab": "Domain-Claim", "x-return-types-displayReturn": true, - "x-return-types": [ - "\\Upsun\\Model\\DomainClaim[]" - ], - "x-return-types-union": "array", "x-phpdoc": { "return": "\\Upsun\\Model\\DomainClaim[]" }, - "x-returnable": true + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\DomainClaim[]" + ], + "x-return-types-union": "array" }, "post": { "parameters": [ @@ -7367,19 +9177,21 @@ } }, "tags": [ - "DomainClaim" + "Domain Claim" ], "x-property-id-kebab": "create-projects-domain-claims", - "x-tag-id-kebab": "DomainClaim", + "x-tag-id-kebab": "Domain-Claim", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", "x-phpdoc": { "return": "\\Upsun\\Model\\AcceptedResponse" }, - "x-returnable": true + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse" } }, "/projects/{projectId}/domain-claims/{domainClaimId}": { @@ -7416,19 +9228,21 @@ } }, "tags": [ - "DomainClaim" + "Domain Claim" ], "x-property-id-kebab": "get-projects-domain-claims", - "x-tag-id-kebab": "DomainClaim", + "x-tag-id-kebab": "Domain-Claim", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\DomainClaim" - ], - "x-return-types-union": "\\Upsun\\Model\\DomainClaim", "x-phpdoc": { "return": "\\Upsun\\Model\\DomainClaim" }, - "x-returnable": true + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\DomainClaim" + ], + "x-return-types-union": "\\Upsun\\Model\\DomainClaim" }, "patch": { "requestBody": { @@ -7474,19 +9288,21 @@ } }, "tags": [ - "DomainClaim" + "Domain Claim" ], "x-property-id-kebab": "update-projects-domain-claims", - "x-tag-id-kebab": "DomainClaim", + "x-tag-id-kebab": "Domain-Claim", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", "x-phpdoc": { "return": "\\Upsun\\Model\\AcceptedResponse" }, - "x-returnable": true + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse" }, "delete": { "parameters": [ @@ -7521,19 +9337,21 @@ } }, "tags": [ - "DomainClaim" + "Domain Claim" ], "x-property-id-kebab": "delete-projects-domain-claims", - "x-tag-id-kebab": "DomainClaim", + "x-tag-id-kebab": "Domain-Claim", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", "x-phpdoc": { "return": "\\Upsun\\Model\\AcceptedResponse" }, - "x-returnable": true + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse" } }, "/projects/{projectId}/domains": { @@ -7569,14 +9387,16 @@ "x-property-id-kebab": "list-projects-domains", "x-tag-id-kebab": "Domain-Management", "x-return-types-displayReturn": true, - "x-return-types": [ - "\\Upsun\\Model\\Domain[]" - ], - "x-return-types-union": "array", "x-phpdoc": { "return": "\\Upsun\\Model\\Domain[]" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Domain[]" + ], + "x-return-types-union": "array", "x-description": [ "Retrieve a list of objects representing the user-specified domains associated with a project. Note that this does", "*not* return the domains automatically assigned to a project that appear under \"Access site\" on the user", @@ -7626,14 +9446,16 @@ "x-property-id-kebab": "create-projects-domains", "x-tag-id-kebab": "Domain-Management", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", "x-phpdoc": { "return": "\\Upsun\\Model\\AcceptedResponse" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", "x-description": [ "Add a single domain to a project. If the `ssl` field is left blank without an object containing a PEM-encoded SSL", "certificate, a certificate will [be provisioned for you via Let's", @@ -7682,14 +9504,16 @@ "x-property-id-kebab": "get-projects-domains", "x-tag-id-kebab": "Domain-Management", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Domain" - ], - "x-return-types-union": "\\Upsun\\Model\\Domain", "x-phpdoc": { "return": "\\Upsun\\Model\\Domain" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Domain" + ], + "x-return-types-union": "\\Upsun\\Model\\Domain", "x-description": [ "Retrieve information about a single user-specified domain associated with a project." ] @@ -7745,14 +9569,16 @@ "x-property-id-kebab": "update-projects-domains", "x-tag-id-kebab": "Domain-Management", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", "x-phpdoc": { "return": "\\Upsun\\Model\\AcceptedResponse" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", "x-description": [ "Update the information associated with a single user-specified domain associated with a project." ] @@ -7797,20 +9623,22 @@ "x-property-id-kebab": "delete-projects-domains", "x-tag-id-kebab": "Domain-Management", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", "x-phpdoc": { "return": "\\Upsun\\Model\\AcceptedResponse" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", "x-description": [ "Delete a single user-specified domain associated with a project." ] } }, - "/projects/{projectId}/environment-types": { + "/projects/{projectId}/environments/{environmentId}/domains": { "get": { "parameters": [ { @@ -7820,44 +9648,53 @@ "type": "string" }, "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" } ], - "operationId": "list-projects-environment-types", + "operationId": "list-projects-environments-domains", "responses": { "default": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnvironmentTypeCollection" + "$ref": "#/components/schemas/DomainCollection" } } } } }, "tags": [ - "Environment Type" + "Domain Management" ], - "summary": "Get environment types", - "description": "List all available environment types", - "x-property-id-kebab": "list-projects-environment-types", - "x-tag-id-kebab": "Environment-Type", + "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", + "x-property-id-kebab": "list-projects-environments-domains", + "x-tag-id-kebab": "Domain-Management", "x-return-types-displayReturn": true, - "x-return-types": [ - "\\Upsun\\Model\\EnvironmentType[]" - ], - "x-return-types-union": "array", "x-phpdoc": { - "return": "\\Upsun\\Model\\EnvironmentType[]" + "return": "\\Upsun\\Model\\Domain[]" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Domain[]" + ], + "x-return-types-union": "array", "x-description": [ - "List all available environment types" + "Retrieve a list of objects representing the user-specified domains associated with an environment. Note that this", + "does *not* return the `.platformsh.site` subdomains, which are automatically assigned to the environment." ] - } - }, - "/projects/{projectId}/environment-types/{environmentTypeId}": { - "get": { + }, + "post": { "parameters": [ { "in": "path", @@ -7873,44 +9710,60 @@ "schema": { "type": "string" }, - "name": "environmentTypeId" + "name": "environmentId" } ], - "operationId": "get-environment-type", + "operationId": "create-projects-environments-domains", "responses": { "default": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnvironmentType" + "$ref": "#/components/schemas/AcceptedResponse" } } } } }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainCreateInput" + } + } + } + }, "tags": [ - "Environment Type" + "Domain Management" ], - "summary": "Get environment type links", - "description": "Lists the endpoints used to retrieve info about the environment type.", - "x-property-id-kebab": "get-environment-type", - "x-tag-id-kebab": "Environment-Type", + "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", + "x-property-id-kebab": "create-projects-environments-domains", + "x-tag-id-kebab": "Domain-Management", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\EnvironmentType" - ], - "x-return-types-union": "\\Upsun\\Model\\EnvironmentType", "x-phpdoc": { - "return": "\\Upsun\\Model\\EnvironmentType" + "return": "\\Upsun\\Model\\AcceptedResponse" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", "x-description": [ - "Lists the endpoints used to retrieve info about the environment type." - ] - } - }, - "/projects/{projectId}/environments": { + "Add a single domain to an environment. If the environment is not production, the `replacement_for` field is", + "required, which binds a new domain to an existing one from a production environment. If the `ssl` field is left", + "blank without an object containing a PEM-encoded SSL certificate, a certificate will [be provisioned for you via", + "Let's Encrypt](https://docs.upsun.com/anchors/routes/https/certificates/)." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/domains/{domainId}": { "get": { "parameters": [ { @@ -7920,52 +9773,14 @@ "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", - "x-property-id-kebab": "list-projects-environments", - "x-tag-id-kebab": "Environment", - "x-return-types-displayReturn": true, - "x-return-types": [ - "\\Upsun\\Model\\Environment[]" - ], - "x-return-types-union": "array", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Environment[]" - }, - "x-returnable": true, - "x-description": [ - "Retrieve a list of a project's existing environments and the information associated with each environment." - ] - } - }, - "/projects/{projectId}/environments/{environmentId}": { - "get": { - "parameters": [ + }, { "in": "path", "required": true, "schema": { "type": "string" }, - "name": "projectId" + "name": "environmentId" }, { "in": "path", @@ -7973,40 +9788,42 @@ "schema": { "type": "string" }, - "name": "environmentId" + "name": "domainId" } ], - "operationId": "get-environment", + "operationId": "get-projects-environments-domains", "responses": { "default": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Environment" + "$ref": "#/components/schemas/Domain" } } } } }, "tags": [ - "Environment" + "Domain Management" ], - "summary": "Get an environment", - "description": "Retrieve the details of a single existing environment.", - "x-property-id-kebab": "get-environment", - "x-tag-id-kebab": "Environment", + "summary": "Get an environment domain", + "description": "Retrieve information about a single user-specified domain\nassociated with an environment.\n", + "x-property-id-kebab": "get-projects-environments-domains", + "x-tag-id-kebab": "Domain-Management", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Environment" - ], - "x-return-types-union": "\\Upsun\\Model\\Environment", "x-phpdoc": { - "return": "\\Upsun\\Model\\Environment" + "return": "\\Upsun\\Model\\Domain" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Domain" + ], + "x-return-types-union": "\\Upsun\\Model\\Domain", "x-description": [ - "Retrieve the details of a single existing environment." + "Retrieve information about a single user-specified domain associated with an environment." ] }, "patch": { @@ -8016,7 +9833,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnvironmentPatch" + "$ref": "#/components/schemas/DomainPatch" } } } @@ -8037,50 +9854,6 @@ "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.", - "x-property-id-kebab": "update-environment", - "x-tag-id-kebab": "Environment", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, - "x-description": [ - "Update the details of a single existing environment." - ] - }, - "delete": { - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" }, { "in": "path", @@ -8088,10 +9861,10 @@ "schema": { "type": "string" }, - "name": "environmentId" + "name": "domainId" } ], - "operationId": "delete-environment", + "operationId": "update-projects-environments-domains", "responses": { "default": { "description": "", @@ -8105,220 +9878,28 @@ } }, "tags": [ - "Environment" + "Domain Management" ], - "summary": "Delete an environment", - "description": "Delete a specified environment.", - "x-property-id-kebab": "delete-environment", - "x-tag-id-kebab": "Environment", + "summary": "Update an environment domain", + "description": "Update the information associated with a single user-specified\ndomain associated with an environment.\n", + "x-property-id-kebab": "update-projects-environments-domains", + "x-tag-id-kebab": "Domain-Management", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", "x-phpdoc": { "return": "\\Upsun\\Model\\AcceptedResponse" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, - "x-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", - "x-property-id-kebab": "activate-environment", - "x-tag-id-kebab": "Environment", - "x-return-types-displayReturn": false, "x-return-types": [ "\\Upsun\\Model\\AcceptedResponse" ], "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, - "x-description": [ - "Set the specified environment's status to active" - ] - } - }, - "/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", - "x-property-id-kebab": "list-projects-environments-activities", - "x-tag-id-kebab": "Environment-Activity", - "x-return-types-displayReturn": true, - "x-return-types": [ - "\\Upsun\\Model\\Activity[]" - ], - "x-return-types-union": "array", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Activity[]" - }, - "x-returnable": true, - "x-description": [ - "Retrieve an environment's activity log. This returns a list of object with records of actions such as: - Commits", - "being pushed to the repository - A new environment being branched out from the specified environment - A snapshot", - "being created of the specified environment The object includes a timestamp of when the action occurred", - "(`created_at`), when the action concluded (`updated_at`), the current `state` of the action, the action's", - "completion percentage (`completion_percent`), and other related information in the `payload`. The contents of the", - "`payload` varies based on the `type` of the activity. For example: - An `environment.branch` action's `payload`", - "can contain objects representing the `parent` environment and the branching action's `outcome`. - An", - "`environment.push` action's `payload` can contain objects representing the `environment`, the specific `commits`", - "included in the push, and the `user` who pushed." - ] - } - }, - "/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", - "x-property-id-kebab": "get-projects-environments-activities", - "x-tag-id-kebab": "Environment-Activity", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Activity" - ], - "x-return-types-union": "\\Upsun\\Model\\Activity", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Activity" - }, - "x-returnable": true, "x-description": [ - "Retrieve a single environment activity entry as specified by an `id` returned by the Get environment activities", - "list", - "(https://docs.upsun.com/api/#tag/Environment-Activity/paths//projects/{projectId}/environments/{environmentId}/activities/get)", - "endpoint. See the documentation on that endpoint for details about the information this endpoint can return." + "Update the information associated with a single user-specified domain associated with an environment." ] - } - }, - "/projects/{projectId}/environments/{environmentId}/activities/{activityId}/cancel": { - "post": { + }, + "delete": { "parameters": [ { "in": "path", @@ -8342,10 +9923,10 @@ "schema": { "type": "string" }, - "name": "activityId" + "name": "domainId" } ], - "operationId": "action-projects-environments-activities-cancel", + "operationId": "delete-projects-environments-domains", "responses": { "default": { "description": "", @@ -8359,9862 +9940,2730 @@ } }, "tags": [ - "Environment Activity" + "Domain Management" ], - "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", - "x-property-id-kebab": "action-projects-environments-activities-cancel", - "x-tag-id-kebab": "Environment-Activity", + "summary": "Delete an environment domain", + "description": "Delete a single user-specified domain associated with an environment.\n", + "x-property-id-kebab": "delete-projects-environments-domains", + "x-tag-id-kebab": "Domain-Management", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", "x-phpdoc": { "return": "\\Upsun\\Model\\AcceptedResponse" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, - "x-description": [ - "Cancel a single activity as specified by an `id` returned by the Get environment activities list", - "(https://docs.upsun.com/api/#tag/Environment-Activity/paths//projects/{projectId}/environments/{environmentId}/activities/get)", - "endpoint. Please note that not all activities are cancelable." - ] - } - }, - "/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", - "x-property-id-kebab": "backup-environment", - "x-tag-id-kebab": "Environment-Backups", - "x-return-types-displayReturn": false, "x-return-types": [ "\\Upsun\\Model\\AcceptedResponse" ], "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, "x-description": [ - "Trigger a new backup of an environment to be created. See the", - "[Backups](https://docs.upsun.com/anchors/environments/backup/) section of the documentation for more information." + "Delete a single user-specified domain associated with an environment." ] } }, - "/projects/{projectId}/environments/{environmentId}/backups": { + "/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" - }, - "name": "projectId" + "type": "string", + "pattern": "[a-z0-9]+", + "example": "abc123def456" + } }, { + "name": "environmentId", "in": "path", + "description": "The environment identifier", "required": true, "schema": { - "type": "string" - }, - "name": "environmentId" + "type": "string", + "pattern": ".+", + "example": "main" + } } ], - "operationId": "list-projects-environments-backups", "responses": { - "default": { - "description": "", + "200": { + "description": "Observability entrypoint retrieved successfully", "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", - "x-property-id-kebab": "list-projects-environments-backups", - "x-tag-id-kebab": "Environment-Backups", - "x-return-types-displayReturn": true, - "x-return-types": [ - "\\Upsun\\Model\\Backup[]" - ], - "x-return-types-union": "array", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Backup[]" - }, - "x-returnable": true, - "x-description": [ - "Retrieve a list of objects representing backups of this environment." - ] - } - }, - "/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", - "x-property-id-kebab": "get-projects-environments-backups", - "x-tag-id-kebab": "Environment-Backups", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Backup" - ], - "x-return-types-union": "\\Upsun\\Model\\Backup", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Backup" - }, - "x-returnable": true, - "x-description": [ - "Get the details of a specific backup from an environment using the `id` of the entry retrieved by the Get backups", - "list", - "(https://docs.upsun.com/api/#tag/Environment-Backups/paths//projects/{projectId}/environments/{environmentId}/backups/get)", - "endpoint." - ] - }, - "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", - "x-property-id-kebab": "delete-projects-environments-backups", - "x-tag-id-kebab": "Environment-Backups", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, - "x-description": [ - "Delete a specific backup from an environment using the `id` of the entry retrieved by the Get backups list", - "(https://docs.upsun.com/api/#tag/Environment-Backups/paths//projects/{projectId}/environments/{environmentId}/backups/get)", - "endpoint." - ] - } - }, - "/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", - "x-property-id-kebab": "restore-backup", - "x-tag-id-kebab": "Environment-Backups", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, - "x-description": [ - "Restore a specific backup from an environment using the `id` of the entry retrieved by the Get backups list", - "(https://docs.upsun.com/api/#tag/Environment-Backups/paths//projects/{projectId}/environments/{environmentId}/backups/get)", - "endpoint." - ] - } - }, - "/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", - "x-property-id-kebab": "branch-environment", - "x-tag-id-kebab": "Environment", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, - "x-description": [ - "Create a new environment as a branch of the current environment." - ] - } - }, - "/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", - "x-property-id-kebab": "deactivate-environment", - "x-tag-id-kebab": "Environment", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, - "x-description": [ - "Destroy all services and data running on this environment so that only the Git branch remains. The environment", - "can be reactivated later at any time; reactivating an environment will sync data from the parent environment and", - "redeploy. **NOTE: ALL DATA IN THIS ENVIRONMENT WILL BE IRREVOCABLY LOST**" - ] - } - }, - "/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", - "x-property-id-kebab": "deploy-environment", - "x-tag-id-kebab": "Environment", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, - "x-description": [ - "Trigger a controlled [manual", - "deployment](https://docs.upsun.com/learn/overview/build-deploy.html#manual-deployment) to release all the staged", - "changes" - ] - } - }, - "/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", - "x-property-id-kebab": "list-projects-environments-deployments", - "x-tag-id-kebab": "Deployment", - "x-return-types-displayReturn": true, - "x-return-types": [ - "\\Upsun\\Model\\Deployment[]" - ], - "x-return-types-union": "array", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Deployment[]" - }, - "x-returnable": true, - "x-description": [ - "Retrieve the read-only configuration of an environment's deployment. The returned information is everything", - "required to recreate a project's current deployment. More specifically, the objects returned by this endpoint", - "contain the configuration derived from the repository's YAML configuration file: `.upsun/config.yaml`.", - "Additionally, any values deriving from environment variables, the domains attached to a project, project access", - "settings, etc. are included here. This endpoint currently returns a list containing a single deployment", - "configuration with an `id` of `current`. This may be subject to change in the future." - ] - } - }, - "/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", - "x-property-id-kebab": "get-projects-environments-deployments", - "x-tag-id-kebab": "Deployment", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Deployment" - ], - "x-return-types-union": "\\Upsun\\Model\\Deployment", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Deployment" - }, - "x-returnable": true, - "x-description": [ - "Retrieve a single deployment configuration with an id of `current`. This may be subject to change in the future.", - "Only `current` can be queried." - ] - } - }, - "/projects/{projectId}/environments/{environmentId}/deployments/{deploymentId}/operations": { - "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": "deploymentId" - } - ], - "operationId": "run-operation", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AcceptedResponse" - } - } - } - } - }, - "requestBody": { - "description": "", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnvironmentOperationInput" - } - } - } - }, - "tags": [ - "Runtime Operations" - ], - "summary": "Execute a runtime operation", - "description": "Execute a runtime operation on a currently deployed environment. This allows you to run one-off commands, such as rebuilding static assets on demand, by defining an `operations` key in a project's `.upsun/config.yaml` configuration. More information on runtime operations is [available in our user documentation](https://docs.upsun.com/anchors/app/runtime-operations/).", - "x-property-id-kebab": "run-operation", - "x-tag-id-kebab": "Runtime-Operations", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, - "x-description": [ - "Execute a runtime operation on a currently deployed environment. This allows you to run one-off commands, such as", - "rebuilding static assets on demand, by defining an `operations` key in a project's `.upsun/config.yaml`", - "configuration. More information on runtime operations is [available in our user", - "documentation](https://docs.upsun.com/anchors/app/runtime-operations/)." - ] - } - }, - "/projects/{projectId}/environments/{environmentId}/deployments/{deploymentId}/sboms": { - "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": "list-projects-environments-deployments-sboms", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SbomCollection" - } - } - } - } - }, - "tags": [ - "Sbom" - ], - "x-property-id-kebab": "list-projects-environments-deployments-sboms", - "x-tag-id-kebab": "Sbom", - "x-return-types-displayReturn": true, - "x-return-types": [ - "\\Upsun\\Model\\Sbom[]" - ], - "x-return-types-union": "array", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Sbom[]" - }, - "x-returnable": true - } - }, - "/projects/{projectId}/environments/{environmentId}/deployments/{deploymentId}/sboms/{sbomServiceId}": { - "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" - }, - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "sbomServiceId" - } - ], - "operationId": "get-projects-environments-deployments-sboms", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Sbom" - } - } - } - } - }, - "tags": [ - "Sbom" - ], - "x-property-id-kebab": "get-projects-environments-deployments-sboms", - "x-tag-id-kebab": "Sbom", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Sbom" - ], - "x-return-types-union": "\\Upsun\\Model\\Sbom", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Sbom" - }, - "x-returnable": true - } - }, - "/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", - "x-property-id-kebab": "list-projects-environments-domains", - "x-tag-id-kebab": "Domain-Management", - "x-return-types-displayReturn": true, - "x-return-types": [ - "\\Upsun\\Model\\Domain[]" - ], - "x-return-types-union": "array", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Domain[]" - }, - "x-returnable": true, - "x-description": [ - "Retrieve a list of objects representing the user-specified domains associated with an environment. Note that this", - "does *not* return the `.platformsh.site` subdomains, which are automatically assigned to the environment." - ] - }, - "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", - "x-property-id-kebab": "create-projects-environments-domains", - "x-tag-id-kebab": "Domain-Management", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, - "x-description": [ - "Add a single domain to an environment. If the environment is not production, the `replacement_for` field is", - "required, which binds a new domain to an existing one from a production environment. If the `ssl` field is left", - "blank without an object containing a PEM-encoded SSL certificate, a certificate will [be provisioned for you via", - "Let's Encrypt](https://docs.upsun.com/anchors/routes/https/certificates/)." - ] - } - }, - "/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", - "x-property-id-kebab": "get-projects-environments-domains", - "x-tag-id-kebab": "Domain-Management", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Domain" - ], - "x-return-types-union": "\\Upsun\\Model\\Domain", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Domain" - }, - "x-returnable": true, - "x-description": [ - "Retrieve information about a single user-specified domain associated with an environment." - ] - }, - "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", - "x-property-id-kebab": "update-projects-environments-domains", - "x-tag-id-kebab": "Domain-Management", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, - "x-description": [ - "Update the information associated with a single user-specified domain associated with an environment." - ] - }, - "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", - "x-property-id-kebab": "delete-projects-environments-domains", - "x-tag-id-kebab": "Domain-Management", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, - "x-description": [ - "Delete a single user-specified domain associated with an environment." - ] - } - }, - "/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", - "x-property-id-kebab": "initialize-environment", - "x-tag-id-kebab": "Environment", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, - "x-description": [ - "Initialize and configure a new environment with an existing repository. The payload is the url of a git", - "repository with a profile name: ``` { \"repository\": \"git@github.com:platformsh/a-project-template.git@master\",", - "\"profile\": \"Example Project\", \"files\": [ { \"mode\": 0600, \"path\": \"config.json\", \"contents\": \"XXXXXXXX\" } ] } ```", - "It can optionally carry additional files that will be committed to the repository, the POSIX file mode to set on", - "each file, and the base64-encoded contents of each file. This endpoint can also add a second repository URL in", - "the `config` parameter that will be added to the contents of the first. This allows you to put your application", - "in one repository and the Upsun YAML configuration files in another." - ] - } - }, - "/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" - ], - "x-property-id-kebab": "maintenance-redeploy-environment", - "x-tag-id-kebab": "Environment", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true - } - }, - "/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", - "x-property-id-kebab": "merge-environment", - "x-tag-id-kebab": "Environment", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, - "x-description": [ - "Merge an environment into its parent. This means that code changes from the branch environment will be merged", - "into the parent branch, and the parent branch will be rebuilt and deployed with the new code changes, retaining", - "the existing data in the parent environment." - ] - } - }, - "/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", - "x-property-id-kebab": "pause-environment", - "x-tag-id-kebab": "Environment", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, - "x-description": [ - "Pause an environment, stopping all services and applications (except the router). Development environments are", - "often used for a limited time and then abandoned. To prevent unnecessary consumption of resources, development", - "environments that haven't been redeployed in 14 days are automatically paused. You can pause an environment", - "manually at any time using this endpoint. Further information is available in our [public", - "documentation](https://docs.upsun.com/anchors/environments/paused/)." - ] - } - }, - "/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.", - "x-property-id-kebab": "redeploy-environment", - "x-tag-id-kebab": "Environment", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, - "x-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", - "x-property-id-kebab": "resume-environment", - "x-tag-id-kebab": "Environment", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, - "x-description": [ - "Resume a paused environment, restarting all services and applications. Development environments that haven't been", - "used for 14 days will be paused automatically. They can be resumed via a redeployment or manually using this", - "endpoint or the CLI as described in the [public", - "documentation](https://docs.upsun.com/anchors/environments/paused/)." - ] - } - }, - "/projects/{projectId}/environments/{environmentId}/routes": { - "get": { - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - }, - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "environmentId" - } - ], - "operationId": "list-projects-environments-routes", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RouteCollection" - } - } - } - } - }, - "tags": [ - "Routing" - ], - "summary": "Get list of routes", - "description": "Retrieve a list of objects containing route definitions for\na specific environment. The definitions returned by this endpoint\nare those present in an environment's `.upsun/config.yaml` file.\n", - "x-property-id-kebab": "list-projects-environments-routes", - "x-tag-id-kebab": "Routing", - "x-return-types-displayReturn": true, - "x-return-types": [ - "\\Upsun\\Model\\Route[]" - ], - "x-return-types-union": "array", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Route[]" - }, - "x-returnable": true, - "x-description": [ - "Retrieve a list of objects containing route definitions for a specific environment. The definitions returned by", - "this endpoint are those present in an environment's `.upsun/config.yaml` file." - ] - } - }, - "/projects/{projectId}/environments/{environmentId}/routes/{routeId}": { - "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": "routeId" - } - ], - "operationId": "get-projects-environments-routes", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Route" - } - } - } - } - }, - "tags": [ - "Routing" - ], - "summary": "Get a route's info", - "description": "Get details of a route from an environment using the `id` of the entry\nretrieved by the [Get environment routes list](#tag/Environment-Routes%2Fpaths%2F~1projects~1%7BprojectId%7D~1environments~1%7BenvironmentId%7D~1routes%2Fget)\nendpoint.\n", - "x-property-id-kebab": "get-projects-environments-routes", - "x-tag-id-kebab": "Routing", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Route" - ], - "x-return-types-union": "\\Upsun\\Model\\Route", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Route" - }, - "x-returnable": true, - "x-description": [ - "Get details of a route from an environment using the `id` of the entry retrieved by the Get environment routes", - "list", - "(https://docs.upsun.com/api/#tag/Environment-Routes/paths//projects/{projectId}/environments/{environmentId}/routes/get)", - "endpoint." - ] - } - }, - "/projects/{projectId}/environments/{environmentId}/source-operation": { - "post": { - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - }, - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "environmentId" - } - ], - "operationId": "run-source-operation", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AcceptedResponse" - } - } - } - } - }, - "requestBody": { - "description": "", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnvironmentSourceOperationInput" - } - } - } - }, - "tags": [ - "Source Operations" - ], - "summary": "Trigger a source operation", - "description": "This endpoint triggers a source code operation 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/reference/source/operations/).\n", - "x-property-id-kebab": "run-source-operation", - "x-tag-id-kebab": "Source-Operations", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, - "x-description": [ - "This endpoint triggers a source code operation as defined in the `source.operations` key in a project's", - "`.upsun/config.yaml` configuration. More information on source code operations is [available in our user", - "documentation](https://docs.upsun.com/anchors/app/reference/source/operations/)." - ] - } - }, - "/projects/{projectId}/environments/{environmentId}/source-operations": { - "get": { - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - }, - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "environmentId" - } - ], - "operationId": "list-projects-environments-source-operations", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnvironmentSourceOperationCollection" - } - } - } - } - }, - "tags": [ - "Source Operations" - ], - "summary": "List source operations", - "description": "Lists all the source operations, defined in `.upsun/config.yaml`, that are available in an environment.\nMore information on source code operations is\n[available in our user documentation](https://docs.upsun.com/anchors/app/reference/source/operations/).\n", - "x-property-id-kebab": "list-projects-environments-source-operations", - "x-tag-id-kebab": "Source-Operations", - "x-return-types-displayReturn": true, - "x-return-types": [ - "\\Upsun\\Model\\EnvironmentSourceOperation[]" - ], - "x-return-types-union": "array", - "x-phpdoc": { - "return": "\\Upsun\\Model\\EnvironmentSourceOperation[]" - }, - "x-returnable": true, - "x-description": [ - "Lists all the source operations, defined in `.upsun/config.yaml`, that are available in an environment. More", - "information on source code operations is [available in our user", - "documentation](https://docs.upsun.com/anchors/app/reference/source/operations/)." - ] - } - }, - "/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", - "x-property-id-kebab": "synchronize-environment", - "x-tag-id-kebab": "Environment", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, - "x-description": [ - "This synchronizes the code and/or data of an environment with that of its parent, then redeploys the environment.", - "Synchronization is only possible if a branch has no unmerged commits and it can be fast-forwarded. If data", - "synchronization is specified, the data in the environment will be overwritten with that of its parent." - ] - } - }, - "/projects/{projectId}/environments/{environmentId}/tasks": { - "get": { - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - }, - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "environmentId" - } - ], - "operationId": "list-projects-environments-tasks", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TaskCollection" - } - } - } - } - }, - "tags": [ - "Task" - ], - "x-property-id-kebab": "list-projects-environments-tasks", - "x-tag-id-kebab": "Task", - "x-return-types-displayReturn": true, - "x-return-types": [ - "\\Upsun\\Model\\Task[]" - ], - "x-return-types-union": "array", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Task[]" - }, - "x-returnable": true - } - }, - "/projects/{projectId}/environments/{environmentId}/tasks/{taskId}": { - "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": "taskId" - } - ], - "operationId": "get-projects-environments-tasks", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Task" - } - } - } - } - }, - "tags": [ - "Task" - ], - "x-property-id-kebab": "get-projects-environments-tasks", - "x-tag-id-kebab": "Task", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Task" - ], - "x-return-types-union": "\\Upsun\\Model\\Task", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Task" - }, - "x-returnable": true - } - }, - "/projects/{projectId}/environments/{environmentId}/tasks/{taskId}/run": { - "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": "taskId" - } - ], - "operationId": "run-task", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AcceptedResponse" - } - } - } - } - }, - "requestBody": { - "description": "", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TaskTriggerInput" - } - } - } - }, - "tags": [ - "Task" - ], - "x-property-id-kebab": "run-task", - "x-tag-id-kebab": "Task", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true - } - }, - "/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", - "x-property-id-kebab": "list-projects-environments-variables", - "x-tag-id-kebab": "Environment-Variables", - "x-return-types-displayReturn": true, - "x-return-types": [ - "\\Upsun\\Model\\EnvironmentVariable[]" - ], - "x-return-types-union": "array", - "x-phpdoc": { - "return": "\\Upsun\\Model\\EnvironmentVariable[]" - }, - "x-returnable": true, - "x-description": [ - "Retrieve a list of objects representing the user-defined variables within an environment." - ] - }, - "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", - "x-property-id-kebab": "create-projects-environments-variables", - "x-tag-id-kebab": "Environment-Variables", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, - "x-description": [ - "Add a variable to an environment. The `value` can be either a string or a JSON object (default: string), as", - "specified by the `is_json` boolean flag. Additionally, the inheritability of an environment variable can be", - "determined through the `is_inheritable` flag (default: true). See the [Environment", - "Variables](https://docs.upsun.com/anchors/variables/set/environment/create/) section in our documentation for", - "more information." - ] - } - }, - "/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.", - "x-property-id-kebab": "get-projects-environments-variables", - "x-tag-id-kebab": "Environment-Variables", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\EnvironmentVariable" - ], - "x-return-types-union": "\\Upsun\\Model\\EnvironmentVariable", - "x-phpdoc": { - "return": "\\Upsun\\Model\\EnvironmentVariable" - }, - "x-returnable": true, - "x-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", - "x-property-id-kebab": "update-projects-environments-variables", - "x-tag-id-kebab": "Environment-Variables", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, - "x-description": [ - "Update a single user-defined environment variable. The `value` can be either a string or a JSON object (default:", - "string), as specified by the `is_json` boolean flag. Additionally, the inheritability of an environment variable", - "can be determined through the `is_inheritable` flag (default: true). See the", - "[Variables](https://docs.upsun.com/anchors/variables/) section in our documentation for more information." - ] - }, - "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.", - "x-property-id-kebab": "delete-projects-environments-variables", - "x-tag-id-kebab": "Environment-Variables", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, - "x-description": [ - "Delete a single user-defined environment variable." - ] - } - }, - "/projects/{projectId}/git/blobs/{repositoryBlobId}": { - "get": { - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - }, - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "repositoryBlobId" - } - ], - "operationId": "get-projects-git-blobs", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Blob" - } - } - } - } - }, - "tags": [ - "Repository" - ], - "summary": "Get a blob object", - "description": "Retrieve, by hash, an object representing a blob in the repository\nbacking a project. This endpoint allows direct read-only access\nto the contents of files in a repo. It returns the file in the\n`content` field of the response object, encoded according to the\nformat in the `encoding` field, e.g. `base64`.\n", - "x-property-id-kebab": "get-projects-git-blobs", - "x-tag-id-kebab": "Repository", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Blob" - ], - "x-return-types-union": "\\Upsun\\Model\\Blob", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Blob" - }, - "x-returnable": true, - "x-description": [ - "Retrieve, by hash, an object representing a blob in the repository backing a project. This endpoint allows direct", - "read-only access to the contents of files in a repo. It returns the file in the `content` field of the response", - "object, encoded according to the format in the `encoding` field, e.g. `base64`." - ] - } - }, - "/projects/{projectId}/git/commits/{repositoryCommitId}": { - "get": { - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - }, - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "repositoryCommitId" - } - ], - "operationId": "get-projects-git-commits", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Commit" - } - } - } - } - }, - "tags": [ - "Repository" - ], - "summary": "Get a commit object", - "description": "Retrieve, by hash, an object representing a commit in the repository backing\na project. This endpoint functions similarly to `git cat-file -p `.\nThe returned object contains the hash of the Git tree that it\nbelongs to, as well as the ID of parent commits.\n\nThe commit represented by a parent ID can be retrieved using this\nendpoint, while the tree state represented by this commit can\nbe retrieved using the\n[Get a tree object](#tag/Git-Repo%2Fpaths%2F~1projects~1%7BprojectId%7D~1git~1trees~1%7BrepositoryTreeId%7D%2Fget)\nendpoint.\n", - "x-property-id-kebab": "get-projects-git-commits", - "x-tag-id-kebab": "Repository", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Commit" - ], - "x-return-types-union": "\\Upsun\\Model\\Commit", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Commit" - }, - "x-returnable": true, - "x-description": [ - "Retrieve, by hash, an object representing a commit in the repository backing a project. This endpoint functions", - "similarly to `git cat-file -p `. The returned object contains the hash of the Git tree that it belongs", - "to, as well as the ID of parent commits. The commit represented by a parent ID can be retrieved using this", - "endpoint, while the tree state represented by this commit can be retrieved using the Get a tree object", - "(https://docs.upsun.com/api/#tag/Git-Repo/paths//projects/{projectId}/git/trees/{repositoryTreeId}/get) endpoint." - ] - } - }, - "/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" - ], - "x-property-id-kebab": "list-projects-git-diffs", - "x-tag-id-kebab": "Diff", - "x-return-types-displayReturn": true, - "x-return-types": [ - "\\Upsun\\Model\\Diff[]" - ], - "x-return-types-union": "array", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Diff[]" - }, - "x-returnable": true - } - }, - "/projects/{projectId}/git/refs": { - "get": { - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - } - ], - "operationId": "list-projects-git-refs", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RefCollection" - } - } - } - } - }, - "tags": [ - "Repository" - ], - "summary": "Get list of repository refs", - "description": "Retrieve a list of `refs/*` in the repository backing a project.\nThis endpoint functions similarly to `git show-ref`, with each\nreturned object containing a `ref` field with the ref's name,\nand an object containing the associated commit ID.\n\nThe returned commit ID can be used with the\n[Get a commit object](#tag/Git-Repo%2Fpaths%2F~1projects~1%7BprojectId%7D~1git~1commits~1%7BrepositoryCommitId%7D%2Fget)\nendpoint to retrieve information about that specific commit.\n", - "x-property-id-kebab": "list-projects-git-refs", - "x-tag-id-kebab": "Repository", - "x-return-types-displayReturn": true, - "x-return-types": [ - "\\Upsun\\Model\\Ref[]" - ], - "x-return-types-union": "array", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Ref[]" - }, - "x-returnable": true, - "x-description": [ - "Retrieve a list of `refs/*` in the repository backing a project. This endpoint functions similarly to `git", - "show-ref`, with each returned object containing a `ref` field with the ref's name, and an object containing the", - "associated commit ID. The returned commit ID can be used with the Get a commit object", - "(https://docs.upsun.com/api/#tag/Git-Repo/paths//projects/{projectId}/git/commits/{repositoryCommitId}/get)", - "endpoint to retrieve information about that specific commit." - ] - } - }, - "/projects/{projectId}/git/refs/{repositoryRefId}": { - "get": { - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - }, - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "repositoryRefId" - } - ], - "operationId": "get-projects-git-refs", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Ref" - } - } - } - } - }, - "tags": [ - "Repository" - ], - "summary": "Get a ref object", - "description": "Retrieve the details of a single `refs` object in the repository\nbacking a project. This endpoint functions similarly to\n`git show-ref `, although the pattern must be a full ref `id`,\nrather than a matching pattern.\n\n*NOTE: The `{repositoryRefId}` must be properly escaped.*\nThat is, the ref `refs/heads/master` is accessible via\n`/projects/{projectId}/git/refs/heads%2Fmaster`.\n", - "x-property-id-kebab": "get-projects-git-refs", - "x-tag-id-kebab": "Repository", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Ref" - ], - "x-return-types-union": "\\Upsun\\Model\\Ref", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Ref" - }, - "x-returnable": true, - "x-description": [ - "Retrieve the details of a single `refs` object in the repository backing a project. This endpoint functions", - "similarly to `git show-ref `, although the pattern must be a full ref `id`, rather than a matching", - "pattern. *NOTE: The `{repositoryRefId}` must be properly escaped.* That is, the ref `refs/heads/master` is", - "accessible via `/projects/{projectId}/git/refs/heads/master`." - ] - } - }, - "/projects/{projectId}/git/trees/{repositoryTreeId}": { - "get": { - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - }, - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "repositoryTreeId" - } - ], - "operationId": "get-projects-git-trees", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Tree" - } - } - } - } - }, - "tags": [ - "Repository" - ], - "summary": "Get a tree object", - "description": "Retrieve, by hash, the tree state represented by a commit.\nThe returned object's `tree` field contains a list of files and\ndirectories present in the tree.\n\nDirectories in the tree can be recursively retrieved by this endpoint\nthrough their hashes. Files in the tree can be retrieved by the\n[Get a blob object](#tag/Git-Repo%2Fpaths%2F~1projects~1%7BprojectId%7D~1git~1blobs~1%7BrepositoryBlobId%7D%2Fget)\nendpoint.\n", - "x-property-id-kebab": "get-projects-git-trees", - "x-tag-id-kebab": "Repository", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Tree" - ], - "x-return-types-union": "\\Upsun\\Model\\Tree", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Tree" - }, - "x-returnable": true, - "x-description": [ - "Retrieve, by hash, the tree state represented by a commit. The returned object's `tree` field contains a list of", - "files and directories present in the tree. Directories in the tree can be recursively retrieved by this endpoint", - "through their hashes. Files in the tree can be retrieved by the Get a blob object", - "(https://docs.upsun.com/api/#tag/Git-Repo/paths//projects/{projectId}/git/blobs/{repositoryBlobId}/get) endpoint." - ] - } - }, - "/projects/{projectId}/integrations": { - "get": { - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - } - ], - "operationId": "list-projects-integrations", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IntegrationCollection" - } - } - } - } - }, - "tags": [ - "Third-Party Integrations" - ], - "summary": "Get list of existing integrations for a project", - "x-property-id-kebab": "list-projects-integrations", - "x-tag-id-kebab": "Third-Party-Integrations", - "x-return-types-displayReturn": true, - "x-return-types": [ - "\\Upsun\\Model\\Integration[]" - ], - "x-return-types-union": "array", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Integration[]" - }, - "x-returnable": true - }, - "post": { - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - } - ], - "operationId": "create-projects-integrations", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AcceptedResponse" - } - } - } - } - }, - "requestBody": { - "description": "", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IntegrationCreateInput" - } - } - } - }, - "tags": [ - "Third-Party Integrations" - ], - "summary": "Integrate project with a third-party service", - "x-property-id-kebab": "create-projects-integrations", - "x-tag-id-kebab": "Third-Party-Integrations", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true - } - }, - "/projects/{projectId}/integrations/{integrationId}": { - "get": { - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - }, - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "integrationId" - } - ], - "operationId": "get-projects-integrations", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Integration" - } - } - } - } - }, - "tags": [ - "Third-Party Integrations" - ], - "summary": "Get information about an existing third-party integration", - "x-property-id-kebab": "get-projects-integrations", - "x-tag-id-kebab": "Third-Party-Integrations", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Integration" - ], - "x-return-types-union": "\\Upsun\\Model\\Integration", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Integration" - }, - "x-returnable": true - }, - "patch": { - "requestBody": { - "description": "", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IntegrationPatch" - } - } - } - }, - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - }, - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "integrationId" - } - ], - "operationId": "update-projects-integrations", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AcceptedResponse" - } - } - } - } - }, - "tags": [ - "Third-Party Integrations" - ], - "summary": "Update an existing third-party integration", - "x-property-id-kebab": "update-projects-integrations", - "x-tag-id-kebab": "Third-Party-Integrations", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true - }, - "delete": { - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - }, - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "integrationId" - } - ], - "operationId": "delete-projects-integrations", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AcceptedResponse" - } - } - } - } - }, - "tags": [ - "Third-Party Integrations" - ], - "summary": "Delete an existing third-party integration", - "x-property-id-kebab": "delete-projects-integrations", - "x-tag-id-kebab": "Third-Party-Integrations", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true - } - }, - "/projects/{projectId}/maintenance-redeploy": { - "post": { - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - } - ], - "operationId": "maintenance-redeploy-project", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AcceptedResponse" - } - } - } - } - }, - "tags": [ - "Project" - ], - "x-property-id-kebab": "maintenance-redeploy-project", - "x-tag-id-kebab": "Project", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true - } - }, - "/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" - ], - "x-property-id-kebab": "list-projects-provisioners", - "x-tag-id-kebab": "Cert-Management", - "x-return-types-displayReturn": true, - "x-return-types": [ - "\\Upsun\\Model\\CertificateProvisioner[]" - ], - "x-return-types-union": "array", - "x-phpdoc": { - "return": "\\Upsun\\Model\\CertificateProvisioner[]" - }, - "x-returnable": true - } - }, - "/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" - ], - "x-property-id-kebab": "get-projects-provisioners", - "x-tag-id-kebab": "Cert-Management", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\CertificateProvisioner" - ], - "x-return-types-union": "\\Upsun\\Model\\CertificateProvisioner", - "x-phpdoc": { - "return": "\\Upsun\\Model\\CertificateProvisioner" - }, - "x-returnable": true - }, - "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" - ], - "x-property-id-kebab": "update-projects-provisioners", - "x-tag-id-kebab": "Cert-Management", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true - } - }, - "/projects/{projectId}/settings": { - "get": { - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - } - ], - "operationId": "get-projects-settings", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProjectSettings" - } - } - } - } - }, - "tags": [ - "Project Settings" - ], - "summary": "Get list of project settings", - "description": "Retrieve the global settings for a project.", - "x-property-id-kebab": "get-projects-settings", - "x-tag-id-kebab": "Project-Settings", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\ProjectSettings" - ], - "x-return-types-union": "\\Upsun\\Model\\ProjectSettings", - "x-phpdoc": { - "return": "\\Upsun\\Model\\ProjectSettings" - }, - "x-returnable": true, - "x-description": [ - "Retrieve the global settings for a project." - ] - }, - "patch": { - "requestBody": { - "description": "", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProjectSettingsPatch" - } - } - } - }, - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - } - ], - "operationId": "update-projects-settings", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AcceptedResponse" - } - } - } - } - }, - "tags": [ - "Project Settings" - ], - "summary": "Update a project setting", - "description": "Update one or more project-level settings.", - "x-property-id-kebab": "update-projects-settings", - "x-tag-id-kebab": "Project-Settings", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, - "x-description": [ - "Update one or more project-level settings." - ] - } - }, - "/projects/{projectId}/system": { - "get": { - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - } - ], - "operationId": "get-projects-system", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SystemInformation" - } - } - } - } - }, - "tags": [ - "System Information" - ], - "summary": "Get information about the Git server.", - "description": "Output information for the project.", - "x-property-id-kebab": "get-projects-system", - "x-tag-id-kebab": "System-Information", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\SystemInformation" - ], - "x-return-types-union": "\\Upsun\\Model\\SystemInformation", - "x-phpdoc": { - "return": "\\Upsun\\Model\\SystemInformation" - }, - "x-returnable": true, - "x-description": [ - "Output information for the project." - ] - } - }, - "/projects/{projectId}/system/restart": { - "post": { - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - } - ], - "operationId": "action-projects-system-restart", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AcceptedResponse" - } - } - } - } - }, - "tags": [ - "System Information" - ], - "summary": "Restart the Git server", - "description": "Force the Git server to restart.", - "x-property-id-kebab": "action-projects-system-restart", - "x-tag-id-kebab": "System-Information", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, - "x-description": [ - "Force the Git server to restart." - ] - } - }, - "/projects/{projectId}/variables": { - "get": { - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - } - ], - "operationId": "list-projects-variables", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProjectVariableCollection" - } - } - } - } - }, - "tags": [ - "Project Variables" - ], - "summary": "Get list of project variables", - "description": "Retrieve a list of objects representing the user-defined variables\nwithin a project.\n", - "x-property-id-kebab": "list-projects-variables", - "x-tag-id-kebab": "Project-Variables", - "x-return-types-displayReturn": true, - "x-return-types": [ - "\\Upsun\\Model\\ProjectVariable[]" - ], - "x-return-types-union": "array", - "x-phpdoc": { - "return": "\\Upsun\\Model\\ProjectVariable[]" - }, - "x-returnable": true, - "x-description": [ - "Retrieve a list of objects representing the user-defined variables within a project." - ] - }, - "post": { - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - } - ], - "operationId": "create-projects-variables", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AcceptedResponse" - } - } - } - } - }, - "requestBody": { - "description": "", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProjectVariableCreateInput" - } - } - } - }, - "tags": [ - "Project Variables" - ], - "summary": "Add a project variable", - "description": "Add a variable to a project. The `value` can be either a string or a JSON\nobject (default: string), as specified by the `is_json` boolean flag.\nSee the [Variables](https://docs.upsun.com/anchors/variables/set/project/create/)\nsection in our documentation for more information.\n", - "x-property-id-kebab": "create-projects-variables", - "x-tag-id-kebab": "Project-Variables", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, - "x-description": [ - "Add a variable to a project. The `value` can be either a string or a JSON object (default: string), as specified", - "by the `is_json` boolean flag. See the [Variables](https://docs.upsun.com/anchors/variables/set/project/create/)", - "section in our documentation for more information." - ] - } - }, - "/projects/{projectId}/variables/{projectVariableId}": { - "get": { - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - }, - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectVariableId" - } - ], - "operationId": "get-projects-variables", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProjectVariable" - } - } - } - } - }, - "tags": [ - "Project Variables" - ], - "summary": "Get a project variable", - "description": "Retrieve a single user-defined project variable.", - "x-property-id-kebab": "get-projects-variables", - "x-tag-id-kebab": "Project-Variables", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\ProjectVariable" - ], - "x-return-types-union": "\\Upsun\\Model\\ProjectVariable", - "x-phpdoc": { - "return": "\\Upsun\\Model\\ProjectVariable" - }, - "x-returnable": true, - "x-description": [ - "Retrieve a single user-defined project variable." - ] - }, - "patch": { - "requestBody": { - "description": "", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProjectVariablePatch" - } - } - } - }, - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - }, - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectVariableId" - } - ], - "operationId": "update-projects-variables", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AcceptedResponse" - } - } - } - } - }, - "tags": [ - "Project Variables" - ], - "summary": "Update a project variable", - "description": "Update a single user-defined project variable.\nThe `value` can be either a string or a JSON\nobject (default: string), as specified by the `is_json` boolean flag.\nSee the [Variables](https://docs.upsun.com/anchors/variables/set/project/create/)\nsection in our documentation for more information.\n", - "x-property-id-kebab": "update-projects-variables", - "x-tag-id-kebab": "Project-Variables", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, - "x-description": [ - "Update a single user-defined project variable. The `value` can be either a string or a JSON object (default:", - "string), as specified by the `is_json` boolean flag. See the", - "[Variables](https://docs.upsun.com/anchors/variables/set/project/create/) section in our documentation for more", - "information." - ] - }, - "delete": { - "parameters": [ - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectId" - }, - { - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "name": "projectVariableId" - } - ], - "operationId": "delete-projects-variables", - "responses": { - "default": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AcceptedResponse" - } - } - } - } - }, - "tags": [ - "Project Variables" - ], - "summary": "Delete a project variable", - "description": "Delete a single user-defined project variable.", - "x-property-id-kebab": "delete-projects-variables", - "x-tag-id-kebab": "Project-Variables", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AcceptedResponse" - }, - "x-returnable": true, - "x-description": [ - "Delete a single user-defined project variable." - ] - } - }, - "/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", - "x-property-id-kebab": "get-autoscaler-settings", - "x-tag-id-kebab": "Autoscaling", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AutoscalerSettings" - ], - "x-return-types-union": "\\Upsun\\Model\\AutoscalerSettings", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AutoscalerSettings" - }, - "x-returnable": true, - "x-description": [ - "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", - "x-property-id-kebab": "post-autoscaler-settings", - "x-tag-id-kebab": "Autoscaling", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AutoscalerSettings" - ], - "x-return-types-union": "\\Upsun\\Model\\AutoscalerSettings", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AutoscalerSettings" - }, - "x-returnable": true, - "x-description": [ - "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", - "x-property-id-kebab": "patch-autoscaler-settings", - "x-tag-id-kebab": "Autoscaling", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AutoscalerSettings" - ], - "x-return-types-union": "\\Upsun\\Model\\AutoscalerSettings", - "x-phpdoc": { - "return": "\\Upsun\\Model\\AutoscalerSettings" - }, - "x-returnable": true, - "x-description": [ - "Modifies Autoscaler settings" - ] - } - }, - "/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)" - } - }, - "x-property-id-kebab": "blackfire_profile_timeline", - "x-tag-id-kebab": "Blackfire-Profiling", - "x-return-types-displayReturn": false, - "x-return-types": {}, - "x-phpdoc": {}, - "x-returnable": true, - "x-description": [ - "Returns timeline visualization data for a Blackfire profile, showing the execution flow over time." - ] - } - }, - "/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)" - } - }, - "x-property-id-kebab": "blackfire_profile_subprofiles", - "x-tag-id-kebab": "Blackfire-Profiling", - "x-return-types-displayReturn": false, - "x-return-types": {}, - "x-phpdoc": {}, - "x-returnable": true, - "x-description": [ - "Returns subprofiles (child profiles) associated with a Blackfire profile." - ] - } - }, - "/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)" - } - }, - "x-property-id-kebab": "blackfire_profile_profile", - "x-tag-id-kebab": "Blackfire-Profiling", - "x-return-types-displayReturn": false, - "x-return-types": {}, - "x-phpdoc": {}, - "x-returnable": true, - "x-description": [ - "Returns full profile data including metrics, metadata, and recommendations." - ] - } - }, - "/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)" - } - }, - "x-property-id-kebab": "blackfire_profile_graph", - "x-tag-id-kebab": "Blackfire-Profiling", - "x-return-types-displayReturn": false, - "x-return-types": {}, - "x-phpdoc": {}, - "x-returnable": true, - "x-description": [ - "Returns the call graph data for a Blackfire profile, showing function calls and their performance metrics." - ] - } - }, - "/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\u2013200. 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)" - } - }, - "x-property-id-kebab": "blackfire_profiles_recommendations", - "x-tag-id-kebab": "Blackfire-Profiling", - "x-return-types-displayReturn": false, - "x-return-types": {}, - "x-phpdoc": {}, - "x-returnable": true, - "x-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." - ] - } - }, - "/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 - }, - "vulnerable_usages": { - "description": "Security vulnerabilities detected", - "type": "array", - "items": { - "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)" - } - }, - "x-property-id-kebab": "blackfire_profiles_list", - "x-tag-id-kebab": "Blackfire-Profiling", - "x-return-types-displayReturn": false, - "x-return-types": {}, - "x-phpdoc": {}, - "x-returnable": true, - "x-description": [ - "Returns a paginated list of profiles for the environment, optionally filtered by transaction name. Proxied from", - "the Blackfire API." - ] - } - }, - "/projects/{projectId}/environments/{environmentId}/observability/http-metrics/overview": { - "get": { - "tags": [ - "Http Traffic" - ], - "summary": "Get HTTP traffic overview", - "description": "Returns HTTP traffic analytics with top URLs ranked by impact (response time \u00d7 request count), aggregated metrics (average, median, p96 response times in milliseconds), status code distributions, and time-series data. Use top_urls_count parameter to control result size (default: 10, max: 100). Response includes per-URL metrics grouped by \"METHOD-URL\" keys (e.g., \"GET-https://example.com/api/products\") and timestamped traffic data with request/response sizes in bytes.", - "operationId": "http_metrics_overview", - "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": "top_urls_count", - "in": "query", - "description": "Number of top URLs to return (default: 10, max: 100)", - "required": false, - "schema": { - "type": "integer", - "example": 20, - "default": null, - "maximum": 100, - "minimum": 1 - } - } - ], - "responses": { - "200": { - "description": "HTTP traffic overview retrieved successfully", - "content": { - "application/json": { - "schema": { - "required": [ - "_grain", - "_from", - "_to", - "_project_id", - "_environment_id", - "_environment_type", - "_branch_machine_name", - "_top_urls_count", - "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 - }, - "_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" - }, - "_top_urls_count": { - "description": "Number of top URLs included in response", - "type": "integer", - "example": 10 - }, - "data": { - "description": "HTTP traffic data containing URL statistics and time-series information", - "required": [ - "urls", - "timelines" - ], - "properties": { - "urls": { - "description": "Top URLs ranked by impact (response time \u00d7 request count). Object keys use \"METHOD-URL\" format (e.g., \"GET-https://example.com/api/products\") as unique identifiers.", - "type": "object", - "example": { - "GET-https://example.com/api/products": { - "url": "https://example.com/api/products", - "method": "GET", - "impact": 15234.67, - "average": 245.3, - "p_50": 198.5, - "p_96": 512.8, - "count": 62143 - }, - "GET-https://example.com/api/users/{id}": { - "url": "https://example.com/api/users/{id}", - "method": "GET", - "impact": 8921.44, - "average": 178.2, - "p_50": 142.1, - "p_96": 389.3, - "count": 50073 - }, - "POST-https://example.com/api/orders": { - "url": "https://example.com/api/orders", - "method": "POST", - "impact": 6543.21, - "average": 312.5, - "p_50": 267.8, - "p_96": 678.4, - "count": 20945 - } - }, - "additionalProperties": { - "required": [ - "url", - "method", - "impact", - "average", - "p_50", - "p_96", - "count" - ], - "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 \u00d7 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 - } - }, - "type": "object", - "additionalProperties": false - } - }, - "timelines": { - "description": "Time-series HTTP traffic 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", - "type": "integer", - "example": 1704067200 - }, - "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. Object keys use \"METHOD-URL\" format (e.g., \"GET-https://example.com/api/products\") as unique identifiers", - "type": "object", - "example": { - "GET-https://example.com/api/products": { - "count": 1543, - "impact": 378.45 - }, - "GET-https://example.com/api/users/{id}": { - "count": 1247, - "impact": 221.87 - }, - "POST-https://example.com/api/orders": { - "count": 523, - "impact": 163.44 - } - }, - "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, - "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 - }, - { - "timestamp": 1704074400, - "request_size": 612345, - "response_size": 1847293, - "urls": { - "GET-https://example.com/api/products": { - "count": 1247, - "impact": 298.12 - } - }, - "codes": { - "UNKNOWN": 0, - "1XX": 0, - "2XX": 1247, - "3XX": 0, - "4XX": 0, - "5XX": 0 - } - } - ] - } - }, - "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 - } - } - } - } - }, - "x-property-id-kebab": "http_metrics_overview", - "x-tag-id-kebab": "Http-Traffic", - "x-return-types-displayReturn": false, - "x-return-types": {}, - "x-phpdoc": {}, - "x-returnable": true, - "x-description": [ - "Returns HTTP traffic analytics with top URLs ranked by impact (response time \u00d7 request count), aggregated", - "metrics (average, median, p96 response times in milliseconds), status code distributions, and time-series data.", - "Use top_urls_count parameter to control result size (default: 10, max: 100). Response includes per-URL metrics", - "grouped by \"METHOD-URL\" keys (e.g., \"GET-https://example.com/api/products\") and timestamped traffic data with", - "request/response sizes in bytes." - ] - } - }, - "/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 \u00d7 request count). Use limit parameter to control total items returned (default: 200, max: 300) and top_hits_count to control how many are tracked in timelines (default: 15, max: 15). Items have a top_hit boolean indicating whether they appear in timeline data.", - "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 top items to include in timeline (default: 15, max: 15)", - "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, default) excludes specified applications and includes all others.", - "required": false, - "schema": { - "type": "string", - "example": "1", - "default": null, - "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, default) excludes specified methods and includes all others.", - "required": false, - "schema": { - "type": "string", - "example": "1", - "default": null, - "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, default) excludes specified domains and includes all others.", - "required": false, - "schema": { - "type": "string", - "example": "1", - "default": null, - "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, default) excludes specified code groups and includes all others.", - "required": false, - "schema": { - "type": "string", - "example": "1", - "default": null, - "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, default) excludes specified codes and includes all others.", - "required": false, - "schema": { - "type": "string", - "example": "1", - "default": null, - "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, default) excludes specified duration ranges and includes all others.", - "required": false, - "schema": { - "type": "string", - "example": "1", - "default": null, - "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": "Configuration for top hits selection", - "required": [ - "max_quantity", - "max_percentage" - ], - "properties": { - "max_quantity": { - "description": "Maximum number of top hit items tracked in timeline", - "type": "integer", - "example": 15 - }, - "max_percentage": { - "description": "Maximum cumulative impact percentage for top hits", - "type": "number", - "format": "float", - "example": 98 - } - }, - "type": "object", - "additionalProperties": false - }, - "_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. First _breakdown_top_hits.max_quantity items are tracked in top_hits_timeline.", - "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 - } - } - } - } - }, - "x-property-id-kebab": "http_metrics_timeline_ips", - "x-tag-id-kebab": "Http-Traffic", - "x-return-types-displayReturn": false, - "x-return-types": {}, - "x-phpdoc": {}, - "x-returnable": true, - "x-description": [ - "Returns HTTP traffic analytics grouped by IP address with IPs ranked by impact (response time \u00d7 request count).", - "Use limit parameter to control total items returned (default: 200, max: 300) and top_hits_count to control how", - "many are tracked in timelines (default: 15, max: 15). Items have a top_hit boolean indicating whether they appear", - "in timeline data." - ] - } - }, - "/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 \u00d7 request count). Use limit parameter to control total items returned (default: 200, max: 300) and top_hits_count to control how many are tracked in timelines (default: 15, max: 15). Items have a top_hit boolean indicating whether they appear in timeline data.", - "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 top items to include in timeline (default: 15, max: 15)", - "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, default) excludes specified applications and includes all others.", - "required": false, - "schema": { - "type": "string", - "example": "1", - "default": null, - "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, default) excludes specified methods and includes all others.", - "required": false, - "schema": { - "type": "string", - "example": "1", - "default": null, - "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, default) excludes specified domains and includes all others.", - "required": false, - "schema": { - "type": "string", - "example": "1", - "default": null, - "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, default) excludes specified code groups and includes all others.", - "required": false, - "schema": { - "type": "string", - "example": "1", - "default": null, - "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, default) excludes specified codes and includes all others.", - "required": false, - "schema": { - "type": "string", - "example": "1", - "default": null, - "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, default) excludes specified duration ranges and includes all others.", - "required": false, - "schema": { - "type": "string", - "example": "1", - "default": null, - "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": "Configuration for top hits selection", - "required": [ - "max_quantity", - "max_percentage" - ], - "properties": { - "max_quantity": { - "description": "Maximum number of top hit items tracked in timeline", - "type": "integer", - "example": 15 - }, - "max_percentage": { - "description": "Maximum cumulative impact percentage for top hits", - "type": "number", - "format": "float", - "example": 98 - } - }, - "type": "object", - "additionalProperties": false - }, - "_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. First _breakdown_top_hits.max_quantity items are tracked in top_hits_timeline.", - "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 - } - } - } - } - }, - "x-property-id-kebab": "http_metrics_timeline_user_agents", - "x-tag-id-kebab": "Http-Traffic", - "x-return-types-displayReturn": false, - "x-return-types": {}, - "x-phpdoc": {}, - "x-returnable": true, - "x-description": [ - "Returns HTTP traffic analytics grouped by User Agent with User Agents ranked by impact (response time \u00d7 request", - "count). Use limit parameter to control total items returned (default: 200, max: 300) and top_hits_count to", - "control how many are tracked in timelines (default: 15, max: 15). Items have a top_hit boolean indicating whether", - "they appear in timeline data." - ] - } - }, - "/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 \u00d7 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 are tracked in timelines (default: 15, max: 15). Items have a top_hit boolean indicating whether they appear in timeline data.", - "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 top items to include in timeline (default: 15, max: 15)", - "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, default) excludes specified applications and includes all others.", - "required": false, - "schema": { - "type": "string", - "example": "1", - "default": null, - "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, default) excludes specified methods and includes all others.", - "required": false, - "schema": { - "type": "string", - "example": "1", - "default": null, - "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, default) excludes specified domains and includes all others.", - "required": false, - "schema": { - "type": "string", - "example": "1", - "default": null, - "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, default) excludes specified code groups and includes all others.", - "required": false, - "schema": { - "type": "string", - "example": "1", - "default": null, - "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, default) excludes specified codes and includes all others.", - "required": false, - "schema": { - "type": "string", - "example": "1", - "default": null, - "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, default) excludes specified duration ranges and includes all others.", - "required": false, - "schema": { - "type": "string", - "example": "1", - "default": null, - "enum": [ - "1", - "-1" - ] - } - } - ], - "responses": { - "200": { - "description": "HTTP traffic overview 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": "Configuration for top hits selection", - "required": [ - "max_quantity", - "max_percentage" - ], - "properties": { - "max_quantity": { - "description": "Maximum number of top hit items tracked in timeline", - "type": "integer", - "example": 15 - }, - "max_percentage": { - "description": "Maximum cumulative impact percentage for top hits", - "type": "number", - "format": "float", - "example": 98 - } - }, - "type": "object", - "additionalProperties": false - }, - "_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. First _breakdown_top_hits.max_quantity items are tracked in top_hits_timeline.", - "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 - } - } - } - } - }, - "x-property-id-kebab": "http_metrics_timeline_urls", - "x-tag-id-kebab": "Http-Traffic", - "x-return-types-displayReturn": false, - "x-return-types": {}, - "x-phpdoc": {}, - "x-returnable": true, - "x-description": [ - "Returns HTTP traffic analytics with URLs ranked by impact (response time \u00d7 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 are", - "tracked in timelines (default: 15, max: 15). Items have a top_hit boolean indicating whether they appear in", - "timeline data." - ] - } - }, - "/projects/{projectId}/environments/{environmentId}/observability/resources/overview": { - "get": { - "tags": [ - "Resources" - ], - "summary": "Get resource metrics overview", - "description": "Returns time-series resource utilization data for all services. Each timestamp includes per-service metrics: CPU (cores), memory (bytes), swap (bytes), pressure indicators (0.0-1.0), and per-mountpoint disk/inode usage. All metrics include statistical aggregations: min, max, avg, stddev, and percentiles (p50, p95-p99). Service names and mountpoint paths are dynamic. Aggregation values are nullable when insufficient data exists.", - "operationId": "resources_overview", - "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": "service", - "in": "query", - "description": "Filter by specific service name (optional)", - "required": false, - "schema": { - "type": "string", - "example": "app" - } - }, - { - "name": "services[]", - "in": "query", - "description": "Filter results to specific services. Can be specified multiple times for multiple services. When omitted, all services are included by default. Use services_mode to control inclusion/exclusion behavior. Specify parameter multiple times for multiple values (e.g., ?services[]=app&services[]=database).", - "required": false, - "style": "form", - "explode": true, - "schema": { - "type": "array", - "items": { - "type": "string", - "example": "app" - } - } - }, - { - "name": "services_mode", - "in": "query", - "description": "Filter mode for services parameter. \"1\" (additive) includes only specified services. \"-1\" (subtractive, default) excludes specified services and includes all others.", - "required": false, - "schema": { - "type": "string", - "example": "1", - "default": null, - "enum": [ - "1", - "-1" - ] - } - } - ], - "responses": { - "200": { - "description": "Resource metrics retrieved successfully", - "content": { - "application/json": { - "schema": { - "required": [ - "_grain", - "_from", - "_to", - "_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 - }, - "_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" - }, - "data": { - "description": "Array of timestamped data points, each containing resource metrics grouped by service name. 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": 1704067200 - }, - "services": { - "description": "Object with service names as keys (dynamic, e.g., \"app\", \"database\"). Each service contains: cpu_used, cpu_limit, memory_used, memory_limit, swap_used, swap_limit, memory_pressure, cpu_pressure, io_pressure, irq_pressure, and mountpoints. All metrics except limits include min, max, avg, stddev, p50, p95-p99 aggregations (nullable).", - "type": "object", - "example": { - "app": { - "cpu_used": { - "min": 0.12, - "max": 1.85, - "avg": 0.45, - "stddev": 0.32, - "p50": 0.42, - "p95": 1.23, - "p96": 1.34, - "p97": 1.45, - "p98": 1.62, - "p99": 1.78 - }, - "cpu_limit": { - "max": 2 - }, - "memory_used": { - "min": 536870912, - "max": 715827883, - "avg": 612892672, - "stddev": 45000000, - "p50": 605000000, - "p95": 690000000, - "p96": 695000000, - "p97": 700000000, - "p98": 708000000, - "p99": 712000000 - }, - "memory_limit": { - "max": 1073741824 - }, - "swap_used": { - "min": 0, - "max": 4194304, - "avg": 1048576, - "stddev": 850000, - "p50": 950000, - "p95": 3200000, - "p96": 3400000, - "p97": 3600000, - "p98": 3900000, - "p99": 4100000 - }, - "swap_limit": { - "max": 536870912 - }, - "memory_pressure": { - "min": 0, - "max": 0.15, - "avg": 0.03, - "stddev": 0.02, - "p50": 0.02, - "p95": 0.12, - "p96": 0.13, - "p97": 0.14, - "p98": 0.145, - "p99": 0.148 - }, - "cpu_pressure": { - "min": 0, - "max": 0.08, - "avg": 0.01, - "stddev": 0.01, - "p50": 0.01, - "p95": 0.05, - "p96": 0.06, - "p97": 0.065, - "p98": 0.07, - "p99": 0.075 - }, - "io_pressure": { - "min": 0, - "max": 0.22, - "avg": 0.05, - "stddev": 0.04, - "p50": 0.04, - "p95": 0.18, - "p96": 0.19, - "p97": 0.2, - "p98": 0.21, - "p99": 0.215 - }, - "irq_pressure": { - "min": 0, - "max": 0.01, - "avg": 0.001, - "stddev": 0.002, - "p50": 0, - "p95": 0.008, - "p96": 0.009, - "p97": 0.0095, - "p98": 0.0097, - "p99": 0.0099 - }, - "mountpoints": { - "": { - "disk_used": { - "min": 3087007744, - "max": 3221225472, - "avg": 3154116608, - "stddev": 35000000, - "p50": 3150000000, - "p95": 3210000000, - "p96": 3215000000, - "p97": 3217000000, - "p98": 3219000000, - "p99": 3220000000 - }, - "disk_limit": { - "max": 10737418240 - }, - "inodes_used": { - "min": 45000, - "max": 52000, - "avg": 48500, - "stddev": 1500, - "p50": 48400, - "p95": 51200, - "p96": 51400, - "p97": 51600, - "p98": 51800, - "p99": 51900 - }, - "inodes_limit": { - "max": 655360 - } - }, - "/tmp": { - "disk_used": { - "min": 524288, - "max": 2097152, - "avg": 1310720, - "stddev": 400000, - "p50": 1300000, - "p95": 1900000, - "p96": 1950000, - "p97": 2000000, - "p98": 2050000, - "p99": 2080000 - }, - "disk_limit": { - "max": 1073741824 - }, - "inodes_used": { - "min": 120, - "max": 245, - "avg": 182, - "stddev": 25, - "p50": 180, - "p95": 230, - "p96": 235, - "p97": 238, - "p98": 242, - "p99": 244 - }, - "inodes_limit": { - "max": 65536 - } - } - } - }, - "database": { - "cpu_used": { - "min": 0.08, - "max": 2.45, - "avg": 0.62, - "stddev": 0.48, - "p50": 0.55, - "p95": 1.85, - "p96": 2.02, - "p97": 2.15, - "p98": 2.28, - "p99": 2.38 - }, - "cpu_limit": { - "max": 4 - }, - "memory_used": { - "min": 1073741824, - "max": 1610612736, - "avg": 1342177280, - "stddev": 120000000, - "p50": 1320000000, - "p95": 1550000000, - "p96": 1570000000, - "p97": 1585000000, - "p98": 1598000000, - "p99": 1606000000 - }, - "memory_limit": { - "max": 2147483648 - }, - "swap_used": { - "min": 0, - "max": 8388608, - "avg": 2097152, - "stddev": 1800000, - "p50": 1900000, - "p95": 6500000, - "p96": 7100000, - "p97": 7500000, - "p98": 7900000, - "p99": 8200000 - }, - "swap_limit": { - "max": 1073741824 - }, - "memory_pressure": { - "min": 0, - "max": 0.25, - "avg": 0.06, - "stddev": 0.05, - "p50": 0.05, - "p95": 0.2, - "p96": 0.21, - "p97": 0.22, - "p98": 0.23, - "p99": 0.24 - }, - "cpu_pressure": { - "min": 0, - "max": 0.12, - "avg": 0.02, - "stddev": 0.02, - "p50": 0.02, - "p95": 0.09, - "p96": 0.1, - "p97": 0.105, - "p98": 0.11, - "p99": 0.115 - }, - "io_pressure": { - "min": 0, - "max": 0.45, - "avg": 0.12, - "stddev": 0.09, - "p50": 0.1, - "p95": 0.35, - "p96": 0.38, - "p97": 0.4, - "p98": 0.42, - "p99": 0.44 - }, - "irq_pressure": { - "min": 0, - "max": 0.02, - "avg": 0.003, - "stddev": 0.004, - "p50": 0.002, - "p95": 0.015, - "p96": 0.017, - "p97": 0.018, - "p98": 0.019, - "p99": 0.0195 - }, - "mountpoints": { - "": { - "disk_used": { - "min": 8589934592, - "max": 9663676416, - "avg": 9126805504, - "stddev": 250000000, - "p50": 9100000000, - "p95": 9550000000, - "p96": 9580000000, - "p97": 9610000000, - "p98": 9640000000, - "p99": 9660000000 - }, - "disk_limit": { - "max": 21474836480 - }, - "inodes_used": { - "min": 125000, - "max": 145000, - "avg": 135000, - "stddev": 4500, - "p50": 134500, - "p95": 142800, - "p96": 143400, - "p97": 144000, - "p98": 144500, - "p99": 144800 - }, - "inodes_limit": { - "max": 1310720 - } - } - } - } - }, - "additionalProperties": { - "properties": { - "cpu_used": { - "description": "CPU usage in cores. Includes statistical aggregations (all nullable): min, max, avg, stddev, p50, p95, p96, p97, p98, p99", - "properties": { - "min": { - "description": "Minimum CPU cores used", - "type": "number", - "format": "float", - "example": 0.12, - "nullable": true - }, - "max": { - "description": "Maximum CPU cores used", - "type": "number", - "format": "float", - "example": 1.85, - "nullable": true - }, - "avg": { - "description": "Average CPU cores used", - "type": "number", - "format": "float", - "example": 0.45, - "nullable": true - }, - "stddev": { - "description": "Standard deviation of CPU cores used", - "type": "number", - "format": "float", - "example": 0.32, - "nullable": true - }, - "p50": { - "description": "Median (50th percentile) CPU cores used", - "type": "number", - "format": "float", - "example": 0.42, - "nullable": true - }, - "p95": { - "description": "95th percentile CPU cores used", - "type": "number", - "format": "float", - "example": 1.23, - "nullable": true - }, - "p96": { - "description": "96th percentile CPU cores used", - "type": "number", - "format": "float", - "example": 1.34, - "nullable": true - }, - "p97": { - "description": "97th percentile CPU cores used", - "type": "number", - "format": "float", - "example": 1.45, - "nullable": true - }, - "p98": { - "description": "98th percentile CPU cores used", - "type": "number", - "format": "float", - "example": 1.62, - "nullable": true - }, - "p99": { - "description": "99th percentile CPU cores used", - "type": "number", - "format": "float", - "example": 1.78, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "cpu_limit": { - "description": "CPU limit in cores. Contains only max (nullable)", - "properties": { - "max": { - "description": "Maximum CPU limit in cores", - "type": "number", - "format": "float", - "example": 2, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "memory_used": { - "description": "Memory usage in bytes. Includes statistical aggregations (all nullable): min, max, avg, stddev, p50, p95, p96, p97, p98, p99", - "properties": { - "min": { - "description": "Minimum memory bytes used", - "type": "integer", - "format": "int64", - "example": 536870912, - "nullable": true - }, - "max": { - "description": "Maximum memory bytes used", - "type": "integer", - "format": "int64", - "example": 715827883, - "nullable": true - }, - "avg": { - "description": "Average memory bytes used", - "type": "number", - "format": "float", - "example": 612892672, - "nullable": true - }, - "stddev": { - "description": "Standard deviation of memory bytes used", - "type": "number", - "format": "float", - "example": 45000000, - "nullable": true - }, - "p50": { - "description": "Median (50th percentile) memory bytes used", - "type": "number", - "format": "float", - "example": 605000000, - "nullable": true - }, - "p95": { - "description": "95th percentile memory bytes used", - "type": "number", - "format": "float", - "example": 690000000, - "nullable": true - }, - "p96": { - "description": "96th percentile memory bytes used", - "type": "number", - "format": "float", - "example": 695000000, - "nullable": true - }, - "p97": { - "description": "97th percentile memory bytes used", - "type": "number", - "format": "float", - "example": 700000000, - "nullable": true - }, - "p98": { - "description": "98th percentile memory bytes used", - "type": "number", - "format": "float", - "example": 708000000, - "nullable": true - }, - "p99": { - "description": "99th percentile memory bytes used", - "type": "number", - "format": "float", - "example": 712000000, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "memory_limit": { - "description": "Memory limit in bytes. Contains only max (nullable)", - "properties": { - "max": { - "description": "Maximum memory limit in bytes", - "type": "integer", - "format": "int64", - "example": 1073741824, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "swap_used": { - "description": "Swap usage in bytes. Includes statistical aggregations (all nullable): min, max, avg, stddev, p50, p95, p96, p97, p98, p99", - "properties": { - "min": { - "description": "Minimum swap bytes used", - "type": "integer", - "format": "int64", - "example": 0, - "nullable": true - }, - "max": { - "description": "Maximum swap bytes used", - "type": "integer", - "format": "int64", - "example": 4194304, - "nullable": true - }, - "avg": { - "description": "Average swap bytes used", - "type": "number", - "format": "float", - "example": 1048576, - "nullable": true - }, - "stddev": { - "description": "Standard deviation of swap bytes used", - "type": "number", - "format": "float", - "example": 850000, - "nullable": true - }, - "p50": { - "description": "Median (50th percentile) swap bytes used", - "type": "number", - "format": "float", - "example": 950000, - "nullable": true - }, - "p95": { - "description": "95th percentile swap bytes used", - "type": "number", - "format": "float", - "example": 3200000, - "nullable": true - }, - "p96": { - "description": "96th percentile swap bytes used", - "type": "number", - "format": "float", - "example": 3400000, - "nullable": true - }, - "p97": { - "description": "97th percentile swap bytes used", - "type": "number", - "format": "float", - "example": 3600000, - "nullable": true - }, - "p98": { - "description": "98th percentile swap bytes used", - "type": "number", - "format": "float", - "example": 3900000, - "nullable": true - }, - "p99": { - "description": "99th percentile swap bytes used", - "type": "number", - "format": "float", - "example": 4100000, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "swap_limit": { - "description": "Swap limit in bytes. Contains only max (nullable)", - "properties": { - "max": { - "description": "Maximum swap limit in bytes", - "type": "integer", - "format": "int64", - "example": 536870912, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "memory_pressure": { - "description": "Memory pressure stall indicator (0.0-1.0). Includes statistical aggregations (all nullable): min, max, avg, stddev, p50, p95, p96, p97, p98, p99", - "properties": { - "min": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "max": { - "type": "number", - "format": "float", - "example": 0.15, - "nullable": true - }, - "avg": { - "type": "number", - "format": "float", - "example": 0.03, - "nullable": true - }, - "stddev": { - "type": "number", - "format": "float", - "example": 0.02, - "nullable": true - }, - "p50": { - "type": "number", - "format": "float", - "example": 0.02, - "nullable": true - }, - "p95": { - "type": "number", - "format": "float", - "example": 0.12, - "nullable": true - }, - "p96": { - "type": "number", - "format": "float", - "example": 0.13, - "nullable": true - }, - "p97": { - "type": "number", - "format": "float", - "example": 0.14, - "nullable": true - }, - "p98": { - "type": "number", - "format": "float", - "example": 0.145, - "nullable": true - }, - "p99": { - "type": "number", - "format": "float", - "example": 0.148, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "cpu_pressure": { - "description": "CPU pressure stall indicator (0.0-1.0). Includes statistical aggregations (all nullable): min, max, avg, stddev, p50, p95, p96, p97, p98, p99", - "properties": { - "min": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "max": { - "type": "number", - "format": "float", - "example": 0.08, - "nullable": true - }, - "avg": { - "type": "number", - "format": "float", - "example": 0.01, - "nullable": true - }, - "stddev": { - "type": "number", - "format": "float", - "example": 0.01, - "nullable": true - }, - "p50": { - "type": "number", - "format": "float", - "example": 0.01, - "nullable": true - }, - "p95": { - "type": "number", - "format": "float", - "example": 0.05, - "nullable": true - }, - "p96": { - "type": "number", - "format": "float", - "example": 0.06, - "nullable": true - }, - "p97": { - "type": "number", - "format": "float", - "example": 0.065, - "nullable": true - }, - "p98": { - "type": "number", - "format": "float", - "example": 0.07, - "nullable": true - }, - "p99": { - "type": "number", - "format": "float", - "example": 0.075, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "io_pressure": { - "description": "I/O pressure stall indicator (0.0-1.0). Includes statistical aggregations (all nullable): min, max, avg, stddev, p50, p95, p96, p97, p98, p99", - "properties": { - "min": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "max": { - "type": "number", - "format": "float", - "example": 0.22, - "nullable": true - }, - "avg": { - "type": "number", - "format": "float", - "example": 0.05, - "nullable": true - }, - "stddev": { - "type": "number", - "format": "float", - "example": 0.04, - "nullable": true - }, - "p50": { - "type": "number", - "format": "float", - "example": 0.04, - "nullable": true - }, - "p95": { - "type": "number", - "format": "float", - "example": 0.18, - "nullable": true - }, - "p96": { - "type": "number", - "format": "float", - "example": 0.19, - "nullable": true - }, - "p97": { - "type": "number", - "format": "float", - "example": 0.2, - "nullable": true - }, - "p98": { - "type": "number", - "format": "float", - "example": 0.21, - "nullable": true - }, - "p99": { - "type": "number", - "format": "float", - "example": 0.215, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "irq_pressure": { - "description": "IRQ pressure stall indicator (0.0-1.0). Includes statistical aggregations (all nullable): min, max, avg, stddev, p50, p95, p96, p97, p98, p99", - "properties": { - "min": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "max": { - "type": "number", - "format": "float", - "example": 0.01, - "nullable": true - }, - "avg": { - "type": "number", - "format": "float", - "example": 0.001, - "nullable": true - }, - "stddev": { - "type": "number", - "format": "float", - "example": 0.002, - "nullable": true - }, - "p50": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "p95": { - "type": "number", - "format": "float", - "example": 0.008, - "nullable": true - }, - "p96": { - "type": "number", - "format": "float", - "example": 0.009, - "nullable": true - }, - "p97": { - "type": "number", - "format": "float", - "example": 0.0095, - "nullable": true - }, - "p98": { - "type": "number", - "format": "float", - "example": 0.0097, - "nullable": true - }, - "p99": { - "type": "number", - "format": "float", - "example": 0.0099, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "mountpoints": { - "description": "Object with mountpoint paths as keys (dynamic, e.g., \"\", \"/tmp\", \"/mnt\"). Each mountpoint contains: disk_used, disk_limit, inodes_used, inodes_limit. All metrics except limits include min, max, avg, stddev, p50, p95-p99 aggregations (nullable).", - "type": "object", - "additionalProperties": { - "properties": { - "disk_used": { - "description": "Disk usage in bytes. Includes statistical aggregations (all nullable): min, max, avg, stddev, p50, p95, p96, p97, p98, p99", - "properties": { - "min": { - "description": "Minimum disk bytes used", - "type": "integer", - "format": "int64", - "example": 3087007744, - "nullable": true - }, - "max": { - "description": "Maximum disk bytes used", - "type": "integer", - "format": "int64", - "example": 3221225472, - "nullable": true - }, - "avg": { - "description": "Average disk bytes used", - "type": "number", - "format": "float", - "example": 3154116608, - "nullable": true - }, - "stddev": { - "description": "Standard deviation of disk bytes used", - "type": "number", - "format": "float", - "example": 35000000, - "nullable": true - }, - "p50": { - "description": "Median (50th percentile) disk bytes used", - "type": "number", - "format": "float", - "example": 3150000000, - "nullable": true - }, - "p95": { - "description": "95th percentile disk bytes used", - "type": "number", - "format": "float", - "example": 3210000000, - "nullable": true - }, - "p96": { - "description": "96th percentile disk bytes used", - "type": "number", - "format": "float", - "example": 3215000000, - "nullable": true - }, - "p97": { - "description": "97th percentile disk bytes used", - "type": "number", - "format": "float", - "example": 3217000000, - "nullable": true - }, - "p98": { - "description": "98th percentile disk bytes used", - "type": "number", - "format": "float", - "example": 3219000000, - "nullable": true - }, - "p99": { - "description": "99th percentile disk bytes used", - "type": "number", - "format": "float", - "example": 3220000000, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "disk_limit": { - "description": "Disk limit in bytes. Contains only max (nullable)", - "properties": { - "max": { - "description": "Maximum disk limit in bytes", - "type": "integer", - "format": "int64", - "example": 10737418240, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "inodes_used": { - "description": "Inode usage count. Includes statistical aggregations (all nullable): min, max, avg, stddev, p50, p95, p96, p97, p98, p99", - "properties": { - "min": { - "description": "Minimum inodes used", - "type": "integer", - "example": 45000, - "nullable": true - }, - "max": { - "description": "Maximum inodes used", - "type": "integer", - "example": 52000, - "nullable": true - }, - "avg": { - "description": "Average inodes used", - "type": "number", - "format": "float", - "example": 48500, - "nullable": true - }, - "stddev": { - "description": "Standard deviation of inodes used", - "type": "number", - "format": "float", - "example": 1500, - "nullable": true - }, - "p50": { - "description": "Median (50th percentile) inodes used", - "type": "number", - "format": "float", - "example": 48400, - "nullable": true - }, - "p95": { - "description": "95th percentile inodes used", - "type": "number", - "format": "float", - "example": 51200, - "nullable": true - }, - "p96": { - "description": "96th percentile inodes used", - "type": "number", - "format": "float", - "example": 51400, - "nullable": true - }, - "p97": { - "description": "97th percentile inodes used", - "type": "number", - "format": "float", - "example": 51600, - "nullable": true - }, - "p98": { - "description": "98th percentile inodes used", - "type": "number", - "format": "float", - "example": 51800, - "nullable": true - }, - "p99": { - "description": "99th percentile inodes used", - "type": "number", - "format": "float", - "example": 51900, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "inodes_limit": { - "description": "Inode limit count. Contains only max (nullable)", - "properties": { - "max": { - "description": "Maximum inodes limit", - "type": "integer", - "example": 655360, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - } - }, - "type": "object", - "additionalProperties": false - } - } + "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" }, - "type": "object", - "additionalProperties": false + "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)" + } + }, + "x-property-id-kebab": "observability_entrypoint", + "x-tag-id-kebab": "Entrypoint", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "mixed" + ], + "x-return-types-union": "mixed", + "x-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." + ] + } + }, + "/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", + "x-property-id-kebab": "list-projects-environments", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": true, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Environment[]" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Environment[]" + ], + "x-return-types-union": "array", + "x-description": [ + "Retrieve a list of a project's existing environments and the information associated with each environment." + ] + } + }, + "/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.", + "x-property-id-kebab": "get-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Environment" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Environment" + ], + "x-return-types-union": "\\Upsun\\Model\\Environment", + "x-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.", + "x-property-id-kebab": "update-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-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.", + "x-property-id-kebab": "delete-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-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", + "x-property-id-kebab": "activate-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-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", + "x-property-id-kebab": "branch-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-description": [ + "Create a new environment as a branch of the current environment." + ] + } + }, + "/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", + "x-property-id-kebab": "deactivate-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-description": [ + "Destroy all services and data running on this environment so that only the Git branch remains. The environment", + "can be reactivated later at any time; reactivating an environment will sync data from the parent environment and", + "redeploy. **NOTE: ALL DATA IN THIS ENVIRONMENT WILL BE IRREVOCABLY LOST**" + ] + } + }, + "/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", + "x-property-id-kebab": "deploy-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-description": [ + "Trigger a controlled [manual", + "deployment](https://docs.upsun.com/learn/overview/build-deploy.html#manual-deployment) to release all the staged", + "changes" + ] + } + }, + "/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", + "x-property-id-kebab": "initialize-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-description": [ + "Initialize and configure a new environment with an existing repository. The payload is the url of a git", + "repository with a profile name: ``` { \"repository\": \"git@github.com:platformsh/a-project-template.git@master\",", + "\"profile\": \"Example Project\", \"files\": [ { \"mode\": 0600, \"path\": \"config.json\", \"contents\": \"XXXXXXXX\" } ] } ```", + "It can optionally carry additional files that will be committed to the repository, the POSIX file mode to set on", + "each file, and the base64-encoded contents of each file. This endpoint can also add a second repository URL in", + "the `config` parameter that will be added to the contents of the first. This allows you to put your application", + "in one repository and the Upsun YAML configuration files in another." + ] + } + }, + "/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" + ], + "x-property-id-kebab": "maintenance-redeploy-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse" + } + }, + "/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", + "x-property-id-kebab": "merge-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-description": [ + "Merge an environment into its parent. This means that code changes from the branch environment will be merged", + "into the parent branch, and the parent branch will be rebuilt and deployed with the new code changes, retaining", + "the existing data in the parent environment." + ] + } + }, + "/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", + "x-property-id-kebab": "pause-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-description": [ + "Pause an environment, stopping all services and applications (except the router). Development environments are", + "often used for a limited time and then abandoned. To prevent unnecessary consumption of resources, development", + "environments that haven't been redeployed in 14 days are automatically paused. You can pause an environment", + "manually at any time using this endpoint. Further information is available in our [public", + "documentation](https://docs.upsun.com/anchors/environments/paused/)." + ] + } + }, + "/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.", + "x-property-id-kebab": "redeploy-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-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", + "x-property-id-kebab": "resume-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-description": [ + "Resume a paused environment, restarting all services and applications. Development environments that haven't been", + "used for 14 days will be paused automatically. They can be resumed via a redeployment or manually using this", + "endpoint or the CLI as described in the [public", + "documentation](https://docs.upsun.com/anchors/environments/paused/)." + ] + } + }, + "/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", + "x-property-id-kebab": "synchronize-environment", + "x-tag-id-kebab": "Environment", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-description": [ + "This synchronizes the code and/or data of an environment with that of its parent, then redeploys the environment.", + "Synchronization is only possible if a branch has no unmerged commits and it can be fast-forwarded. If data", + "synchronization is specified, the data in the environment will be overwritten with that of its parent." + ] + } + }, + "/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", + "x-property-id-kebab": "list-projects-environments-activities", + "x-tag-id-kebab": "Environment-Activity", + "x-return-types-displayReturn": true, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Activity[]" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Activity[]" + ], + "x-return-types-union": "array", + "x-description": [ + "Retrieve an environment's activity log. This returns a list of object with records of actions such as: - Commits", + "being pushed to the repository - A new environment being branched out from the specified environment - A snapshot", + "being created of the specified environment The object includes a timestamp of when the action occurred", + "(`created_at`), when the action concluded (`updated_at`), the current `state` of the action, the action's", + "completion percentage (`completion_percent`), and other related information in the `payload`. The contents of the", + "`payload` varies based on the `type` of the activity. For example: - An `environment.branch` action's `payload`", + "can contain objects representing the `parent` environment and the branching action's `outcome`. - An", + "`environment.push` action's `payload` can contain objects representing the `environment`, the specific `commits`", + "included in the push, and the `user` who pushed." + ] + } + }, + "/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", + "x-property-id-kebab": "get-projects-environments-activities", + "x-tag-id-kebab": "Environment-Activity", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Activity" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Activity" + ], + "x-return-types-union": "\\Upsun\\Model\\Activity", + "x-description": [ + "Retrieve a single environment activity entry as specified by an `id` returned by the Get environment activities", + "list", + "(https://docs.upsun.com/api/#tag/Environment-Activity/paths//projects/{projectId}/environments/{environmentId}/activities/get)", + "endpoint. See the documentation on that endpoint for details about the information this endpoint can return." + ] + } + }, + "/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", + "x-property-id-kebab": "action-projects-environments-activities-cancel", + "x-tag-id-kebab": "Environment-Activity", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-description": [ + "Cancel a single activity as specified by an `id` returned by the Get environment activities list", + "(https://docs.upsun.com/api/#tag/Environment-Activity/paths//projects/{projectId}/environments/{environmentId}/activities/get)", + "endpoint. Please note that not all activities are cancelable." + ] + } + }, + "/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", + "x-property-id-kebab": "backup-environment", + "x-tag-id-kebab": "Environment-Backups", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-description": [ + "Trigger a new backup of an environment to be created. See the", + "[Backups](https://docs.upsun.com/anchors/environments/backup/) section of the documentation for more information." + ] + } + }, + "/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", + "x-property-id-kebab": "list-projects-environments-backups", + "x-tag-id-kebab": "Environment-Backups", + "x-return-types-displayReturn": true, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Backup[]" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Backup[]" + ], + "x-return-types-union": "array", + "x-description": [ + "Retrieve a list of objects representing backups of this environment." + ] + } + }, + "/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", + "x-property-id-kebab": "get-projects-environments-backups", + "x-tag-id-kebab": "Environment-Backups", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Backup" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Backup" + ], + "x-return-types-union": "\\Upsun\\Model\\Backup", + "x-description": [ + "Get the details of a specific backup from an environment using the `id` of the entry retrieved by the Get backups", + "list", + "(https://docs.upsun.com/api/#tag/Environment-Backups/paths//projects/{projectId}/environments/{environmentId}/backups/get)", + "endpoint." + ] + }, + "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", + "x-property-id-kebab": "delete-projects-environments-backups", + "x-tag-id-kebab": "Environment-Backups", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-description": [ + "Delete a specific backup from an environment using the `id` of the entry retrieved by the Get backups list", + "(https://docs.upsun.com/api/#tag/Environment-Backups/paths//projects/{projectId}/environments/{environmentId}/backups/get)", + "endpoint." + ] + } + }, + "/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", + "x-property-id-kebab": "restore-backup", + "x-tag-id-kebab": "Environment-Backups", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-description": [ + "Restore a specific backup from an environment using the `id` of the entry retrieved by the Get backups list", + "(https://docs.upsun.com/api/#tag/Environment-Backups/paths//projects/{projectId}/environments/{environmentId}/backups/get)", + "endpoint." + ] + } + }, + "/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", + "x-property-id-kebab": "list-projects-environment-types", + "x-tag-id-kebab": "Environment-Type", + "x-return-types-displayReturn": true, + "x-phpdoc": { + "return": "\\Upsun\\Model\\EnvironmentType[]" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\EnvironmentType[]" + ], + "x-return-types-union": "array", + "x-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.", + "x-property-id-kebab": "get-environment-type", + "x-tag-id-kebab": "Environment-Type", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\EnvironmentType" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\EnvironmentType" + ], + "x-return-types-union": "\\Upsun\\Model\\EnvironmentType", + "x-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", + "x-property-id-kebab": "list-projects-environments-variables", + "x-tag-id-kebab": "Environment-Variables", + "x-return-types-displayReturn": true, + "x-phpdoc": { + "return": "\\Upsun\\Model\\EnvironmentVariable[]" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\EnvironmentVariable[]" + ], + "x-return-types-union": "array", + "x-description": [ + "Retrieve a list of objects representing the user-defined variables within an environment." + ] + }, + "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", + "x-property-id-kebab": "create-projects-environments-variables", + "x-tag-id-kebab": "Environment-Variables", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-description": [ + "Add a variable to an environment. The `value` can be either a string or a JSON object (default: string), as", + "specified by the `is_json` boolean flag. Additionally, the inheritability of an environment variable can be", + "determined through the `is_inheritable` flag (default: true). See the [Environment", + "Variables](https://docs.upsun.com/anchors/variables/set/environment/create/) section in our documentation for", + "more information." + ] + } + }, + "/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.", + "x-property-id-kebab": "get-projects-environments-variables", + "x-tag-id-kebab": "Environment-Variables", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\EnvironmentVariable" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\EnvironmentVariable" + ], + "x-return-types-union": "\\Upsun\\Model\\EnvironmentVariable", + "x-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", + "x-property-id-kebab": "update-projects-environments-variables", + "x-tag-id-kebab": "Environment-Variables", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-description": [ + "Update a single user-defined environment variable. The `value` can be either a string or a JSON object (default:", + "string), as specified by the `is_json` boolean flag. Additionally, the inheritability of an environment variable", + "can be determined through the `is_inheritable` flag (default: true). See the", + "[Variables](https://docs.upsun.com/anchors/variables/) section in our documentation for more information." + ] + }, + "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.", + "x-property-id-kebab": "delete-projects-environments-variables", + "x-tag-id-kebab": "Environment-Variables", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-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", - "additionalProperties": false - }, - "example": [ - { - "timestamp": 1704067200, - "services": { - "app": { - "cpu_used": { - "avg": 0.45 - }, - "memory_used": { - "avg": 612892672 - } - } + "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" + ] } }, - { - "timestamp": 1704070800 - }, - { - "timestamp": 1704074400, - "services": { - "app": { - "cpu_used": { - "avg": 0.52 - }, - "memory_used": { - "avg": 625000000 - } + "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" } - }, - "type": "object", - "additionalProperties": false + } } } } }, - "400": { - "description": "Bad request - Invalid parameters. Please consult the API documentation to fix the request parameters.", + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-user-extended-access", + "x-tag-id-kebab": "Grants", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "object" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "object" + ], + "x-description": [ + "List extended access of the given user, which includes both individual and team access to project and", + "organization." + ] + } + }, + "/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": { - "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 + "description": "Full access document." } } } }, - "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.", + "404": { + "description": "Not Found", "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 + "$ref": "#/components/schemas/Error" } } } } }, - "x-property-id-kebab": "resources_overview", - "x-tag-id-kebab": "Resources", + "x-property-id-kebab": "get-access-document", + "x-tag-id-kebab": "Grants", "x-return-types-displayReturn": false, - "x-return-types": {}, - "x-phpdoc": {}, + "x-phpdoc": { + "return": "object" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "object" + ], "x-description": [ - "Returns time-series resource utilization data for all services. Each timestamp includes per-service metrics: CPU", - "(cores), memory (bytes), swap (bytes), pressure indicators (0.0-1.0), and per-mountpoint disk/inode usage. All", - "metrics include statistical aggregations: min, max, avg, stddev, and percentiles (p50, p95-p99). Service names", - "and mountpoint paths are dynamic. Aggregation values are nullable when insufficient data exists." + "Returns the full access document referenced by token claim `access_id`." ] } }, - "/projects/{projectId}/environments/{environmentId}/observability/resources/summary": { + "/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/urls": { "get": { "tags": [ - "Resources" + "Http Traffic" ], - "summary": "Get resource metrics summary", - "description": "Returns per-instance resource statistics aggregated over the time range. Filter results using aggs[] (min, max, avg, stddev, p50, p95-p99) and types[] (cpu, memory, swap, disk, inodes, pressure metrics). Response grouped by service name then instance ID (e.g., \"app.0\", \"database.1\"). All aggregations nullable when insufficient data exists.", - "operationId": "resources_summary", + "summary": "Get HTTP traffic timeline by URL", + "description": "Returns HTTP traffic analytics with URLs ranked by impact (response time \u00d7 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", @@ -18261,9 +12710,62 @@ } }, { - "name": "aggs[]", + "name": "limit", "in": "query", - "description": "Statistical aggregations to include in the response. Can be specified multiple times. Available values: avg, stddev, max, min, p50, p95, p96, p97, p98, p99. Specify parameter multiple times for multiple values (e.g., ?aggs[]=avg&aggs[]=p50).", + "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, @@ -18271,25 +12773,66 @@ "type": "array", "items": { "type": "string", + "example": "GET", "enum": [ - "avg", - "stddev", - "max", - "min", - "p50", - "p95", - "p96", - "p97", - "p98", - "p99" + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "HEAD", + "OPTIONS" ] } } }, { - "name": "types[]", + "name": "methods_mode", "in": "query", - "description": "Metric types to include in the response. Can be specified multiple times. Available values: cpu, memory, disk, inodes, swap, memory_pressure, cpu_pressure, io_pressure, irq_pressure. Specify parameter multiple times for multiple values (e.g., ?types[]=cpu&types[]=memory).", + "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, @@ -18297,24 +12840,35 @@ "type": "array", "items": { "type": "string", + "example": "2XX", "enum": [ - "cpu", - "memory", - "disk", - "inodes", - "swap", - "memory_pressure", - "cpu_pressure", - "io_pressure", - "irq_pressure" + "1XX", + "2XX", + "3XX", + "4XX", + "5XX" ] } } }, { - "name": "services[]", + "name": "code_slots_mode", "in": "query", - "description": "Filter results to specific services. Can be specified multiple times for multiple services. When omitted, all services are included by default. Use services_mode to control inclusion/exclusion behavior. Specify parameter multiple times for multiple values (e.g., ?services[]=app&services[]=database).", + "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, @@ -18322,19 +12876,56 @@ "type": "array", "items": { "type": "string", - "example": "app" + "example": "200" } } }, { - "name": "services_mode", + "name": "codes_mode", "in": "query", - "description": "Filter mode for services parameter. \"1\" (additive) includes only specified services. \"-1\" (subtractive, default) excludes specified services and includes all others.", + "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", - "default": null, "enum": [ "1", "-1" @@ -18344,1154 +12935,1306 @@ ], "responses": { "200": { - "description": "Successfully retrieved resource summary with per-service-instance aggregations", + "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", - "data" + "_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 + "_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 }, - "_project_id": { - "description": "Project identifier", + "_methods_mode": { + "description": "Method filter mode (1=additive, -1=subtractive)", "type": "string", - "example": "abc123def456" + "nullable": true, + "enum": [ + "1", + "-1" + ] }, - "_environment_id": { - "description": "Environment identifier", + "_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", - "example": "main" + "nullable": true, + "enum": [ + "1", + "-1" + ] }, - "_branch_machine_name": { - "description": "Branch machine name", + "_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", - "example": "main-bvxea6i" + "nullable": true, + "enum": [ + "1", + "-1" + ] }, - "data": { - "description": "Resource summary data organized by service and instance", + "_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": [ - "services" + "kind", + "total", + "data" ], "properties": { - "services": { - "description": "Resource metrics grouped by service name. Service names are dynamic and vary based on customer configuration (e.g., \"admin-pipeline\", \"clickhouse\", \"app\", \"database\"). Each service contains one or more instances with full statistical aggregations for all requested metric types.", - "type": "object", - "example": { - "app": { - "app.0": { - "cpu_used": { - "min": 0.12, - "max": 1.85, - "avg": 0.45, - "stddev": 0.32, - "p50": 0.42, - "p95": 1.23, - "p96": 1.34, - "p97": 1.45, - "p98": 1.62, - "p99": 1.78 - }, - "cpu_limit": { - "max": 2 - }, - "memory_used": { - "min": 536870912, - "max": 715827883, - "avg": 612892672, - "stddev": 45000000, - "p50": 605000000, - "p95": 690000000, - "p96": 695000000, - "p97": 700000000, - "p98": 708000000, - "p99": 712000000 - }, - "memory_limit": { - "max": 1073741824 - }, - "swap_used": { - "min": 0, - "max": 4194304, - "avg": 1048576, - "stddev": 850000, - "p50": 950000, - "p95": 3200000, - "p96": 3400000, - "p97": 3600000, - "p98": 3900000, - "p99": 4100000 - }, - "swap_limit": { - "max": 536870912 - }, - "memory_pressure": { - "min": 0, - "max": 0.15, - "avg": 0.03, - "stddev": 0.02, - "p50": 0.02, - "p95": 0.12, - "p96": 0.13, - "p97": 0.14, - "p98": 0.145, - "p99": 0.148 - }, - "cpu_pressure": { - "min": 0, - "max": 0.08, - "avg": 0.01, - "stddev": 0.01, - "p50": 0.01, - "p95": 0.05, - "p96": 0.06, - "p97": 0.065, - "p98": 0.07, - "p99": 0.075 - }, - "io_pressure": { - "min": 0, - "max": 0.22, - "avg": 0.05, - "stddev": 0.04, - "p50": 0.04, - "p95": 0.18, - "p96": 0.19, - "p97": 0.2, - "p98": 0.21, - "p99": 0.215 - }, - "irq_pressure": { - "min": 0, - "max": 0.01, - "avg": 0.001, - "stddev": 0.002, - "p50": 0, - "p95": 0.008, - "p96": 0.009, - "p97": 0.0095, - "p98": 0.0097, - "p99": 0.0099 - }, - "mountpoints": { - "": { - "disk_used": { - "min": null, - "max": null, - "avg": null, - "stddev": null, - "p50": null, - "p95": null, - "p96": null, - "p97": null, - "p98": null, - "p99": null - }, - "disk_limit": { - "max": null - }, - "inodes_used": { - "min": null, - "max": null, - "avg": null, - "stddev": null, - "p50": null, - "p95": null, - "p96": null, - "p97": null, - "p98": null, - "p99": null - }, - "inodes_limit": { - "max": null - } - }, - "/tmp": { - "disk_used": { - "min": 147197952, - "max": 147197952, - "avg": 147197952, - "stddev": null, - "p50": 147197952, - "p95": 147197952, - "p96": 147197952, - "p97": 147197952, - "p98": 147197952, - "p99": 147197952 - }, - "disk_limit": { - "max": 17169383424 - }, - "inodes_used": { - "min": 2244, - "max": 2244, - "avg": 2244, - "stddev": null, - "p50": 2244, - "p95": 2244, - "p96": 2244, - "p97": 2244, - "p98": 2244, - "p99": 2244 - }, - "inodes_limit": { - "max": 8388608 - } - } - } - } - }, - "clickhouse": { - "clickhouse.0": { - "cpu_used": { - "min": 0.88, - "max": 0.88, - "avg": 0.88, - "stddev": null, - "p50": 0.88, - "p95": 0.88, - "p96": 0.88, - "p97": 0.88, - "p98": 0.88, - "p99": 0.88 - }, - "cpu_limit": { - "max": 16 - }, - "memory_used": { - "min": 1415147520, - "max": 1415147520, - "avg": 1415147520, - "stddev": null, - "p50": 1415147520, - "p95": 1415147520, - "p96": 1415147520, - "p97": 1415147520, - "p98": 1415147520, - "p99": 1415147520 - }, - "memory_limit": { - "max": 34359738368 - }, - "swap_used": { - "min": 223432704, - "max": 223432704, - "avg": 223432704, - "stddev": null, - "p50": 223432704, - "p95": 223432704, - "p96": 223432704, - "p97": 223432704, - "p98": 223432704, - "p99": 223432704 - }, - "swap_limit": { - "max": 536870912 - }, - "memory_pressure": { - "min": 0, - "max": 0, - "avg": 0, - "stddev": null, - "p50": 0, - "p95": 0, - "p96": 0, - "p97": 0, - "p98": 0, - "p99": 0 - }, - "cpu_pressure": { - "min": 0.08, - "max": 0.08, - "avg": 0.08, - "stddev": null, - "p50": 0.08, - "p95": 0.08, - "p96": 0.08, - "p97": 0.08, - "p98": 0.08, - "p99": 0.08 - }, - "io_pressure": { - "min": 0.12, - "max": 0.12, - "avg": 0.12, - "stddev": null, - "p50": 0.12, - "p95": 0.12, - "p96": 0.12, - "p97": 0.12, - "p98": 0.12, - "p99": 0.12 - }, - "irq_pressure": { - "min": 0, - "max": 0, - "avg": 0, - "stddev": null, - "p50": 0, - "p95": 0, - "p96": 0, - "p97": 0, - "p98": 0, - "p99": 0 - }, - "mountpoints": { - "": { - "disk_used": { - "min": null, - "max": null, - "avg": null, - "stddev": null, - "p50": null, - "p95": null, - "p96": null, - "p97": null, - "p98": null, - "p99": null - }, - "disk_limit": { - "max": null - }, - "inodes_used": { - "min": null, - "max": null, - "avg": null, - "stddev": null, - "p50": null, - "p95": null, - "p96": null, - "p97": null, - "p98": null, - "p99": null - }, - "inodes_limit": { - "max": null - } - }, - "/mnt": { - "disk_used": { - "min": 608173674496, - "max": 608173674496, - "avg": 608173674496, - "stddev": null, - "p50": 608173674496, - "p95": 608173674496, - "p96": 608173674496, - "p97": 608173674496, - "p98": 608173674496, - "p99": 608173674496 - }, - "disk_limit": { - "max": 1056876748800 - }, - "inodes_used": { - "min": 495287, - "max": 495287, - "avg": 495287, - "stddev": null, - "p50": 495287, - "p95": 495287, - "p96": 495287, - "p97": 495287, - "p98": 495287, - "p99": 495287 - }, - "inodes_limit": { - "max": 65536000 - } - }, - "/tmp": { - "disk_used": { - "min": 76398592, - "max": 76398592, - "avg": 76398592, - "stddev": null, - "p50": 76398592, - "p95": 76398592, - "p96": 76398592, - "p97": 76398592, - "p98": 76398592, - "p99": 76398592 - }, - "disk_limit": { - "max": 17169383424 - }, - "inodes_used": { - "min": 11, - "max": 11, - "avg": 11, - "stddev": null, - "p50": 11, - "p95": 11, - "p96": 11, - "p97": 11, - "p98": 11, - "p99": 11 - }, - "inodes_limit": { - "max": 8388608 - } - } - } + "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 } - } - }, - "additionalProperties": { - "description": "Service-level container with one or more instance names as keys (e.g., \"app.0\", \"clickhouse.0\", \"database.1\")", + }, "type": "object", - "additionalProperties": { - "description": "Instance-level metrics with statistical aggregations. Instance identifiers are dynamic and vary based on service scaling.", - "properties": { - "cpu_used": { - "description": "CPU cores used with statistical aggregations. Values may be null when insufficient data is available.", - "properties": { - "min": { - "description": "Minimum CPU cores used", - "type": "number", - "format": "float", - "example": 0.12, - "nullable": true - }, - "max": { - "description": "Maximum CPU cores used", - "type": "number", - "format": "float", - "example": 1.85, - "nullable": true - }, - "avg": { - "description": "Average CPU cores used", - "type": "number", - "format": "float", - "example": 0.45, - "nullable": true - }, - "stddev": { - "description": "Standard deviation of CPU cores used", - "type": "number", - "format": "float", - "example": 0.32, - "nullable": true - }, - "p50": { - "description": "Median (50th percentile) CPU cores used", - "type": "number", - "format": "float", - "example": 0.42, - "nullable": true - }, - "p95": { - "description": "95th percentile CPU cores used", - "type": "number", - "format": "float", - "example": 1.23, - "nullable": true - }, - "p96": { - "description": "96th percentile CPU cores used", - "type": "number", - "format": "float", - "example": 1.34, - "nullable": true - }, - "p97": { - "description": "97th percentile CPU cores used", - "type": "number", - "format": "float", - "example": 1.45, - "nullable": true - }, - "p98": { - "description": "98th percentile CPU cores used", - "type": "number", - "format": "float", - "example": 1.62, - "nullable": true - }, - "p99": { - "description": "99th percentile CPU cores used", - "type": "number", - "format": "float", - "example": 1.78, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "cpu_limit": { - "description": "CPU limit in cores. Contains only max (nullable)", - "properties": { - "max": { - "description": "Maximum CPU limit in cores", - "type": "number", - "format": "float", - "example": 2, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "memory_used": { - "description": "Memory bytes used with statistical aggregations. Values may be null when insufficient data is available.", - "properties": { - "min": { - "description": "Minimum memory bytes used", - "type": "integer", - "format": "int64", - "example": 536870912, - "nullable": true - }, - "max": { - "description": "Maximum memory bytes used", - "type": "integer", - "format": "int64", - "example": 715827883, - "nullable": true - }, - "avg": { - "description": "Average memory bytes used", - "type": "number", - "format": "float", - "example": 612892672, - "nullable": true - }, - "stddev": { - "description": "Standard deviation of memory bytes used", - "type": "number", - "format": "float", - "example": 45000000, - "nullable": true - }, - "p50": { - "description": "Median (50th percentile) memory bytes used", - "type": "number", - "format": "float", - "example": 605000000, - "nullable": true - }, - "p95": { - "description": "95th percentile memory bytes used", - "type": "number", - "format": "float", - "example": 690000000, - "nullable": true - }, - "p96": { - "description": "96th percentile memory bytes used", - "type": "number", - "format": "float", - "example": 695000000, - "nullable": true - }, - "p97": { - "description": "97th percentile memory bytes used", - "type": "number", - "format": "float", - "example": 700000000, - "nullable": true - }, - "p98": { - "description": "98th percentile memory bytes used", - "type": "number", - "format": "float", - "example": 708000000, - "nullable": true - }, - "p99": { - "description": "99th percentile memory bytes used", - "type": "number", - "format": "float", - "example": 712000000, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "memory_limit": { - "description": "Memory limit in bytes. Contains only max (nullable)", - "properties": { - "max": { - "description": "Maximum memory limit in bytes", - "type": "integer", - "format": "int64", - "example": 1073741824, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "swap_used": { - "description": "Swap bytes used with statistical aggregations. Values may be null when insufficient data is available.", - "properties": { - "min": { - "description": "Minimum swap bytes used", - "type": "integer", - "format": "int64", - "example": 0, - "nullable": true - }, - "max": { - "description": "Maximum swap bytes used", - "type": "integer", - "format": "int64", - "example": 4194304, - "nullable": true - }, - "avg": { - "description": "Average swap bytes used", - "type": "number", - "format": "float", - "example": 1048576, - "nullable": true - }, - "stddev": { - "description": "Standard deviation of swap bytes used", - "type": "number", - "format": "float", - "example": 850000, - "nullable": true - }, - "p50": { - "description": "Median (50th percentile) swap bytes used", - "type": "number", - "format": "float", - "example": 950000, - "nullable": true - }, - "p95": { - "description": "95th percentile swap bytes used", - "type": "number", - "format": "float", - "example": 3200000, - "nullable": true - }, - "p96": { - "description": "96th percentile swap bytes used", - "type": "number", - "format": "float", - "example": 3400000, - "nullable": true - }, - "p97": { - "description": "97th percentile swap bytes used", - "type": "number", - "format": "float", - "example": 3600000, - "nullable": true - }, - "p98": { - "description": "98th percentile swap bytes used", - "type": "number", - "format": "float", - "example": 3900000, - "nullable": true - }, - "p99": { - "description": "99th percentile swap bytes used", - "type": "number", - "format": "float", - "example": 4100000, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "swap_limit": { - "description": "Swap limit in bytes. Contains only max (nullable)", - "properties": { - "max": { - "description": "Maximum swap limit in bytes", - "type": "integer", - "format": "int64", - "example": 536870912, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "memory_pressure": { - "description": "Memory pressure stall indicator (0.0-1.0) with statistical aggregations. Values may be null when insufficient data is available.", - "properties": { - "min": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "max": { - "type": "number", - "format": "float", - "example": 0.15, - "nullable": true - }, - "avg": { - "type": "number", - "format": "float", - "example": 0.03, - "nullable": true - }, - "stddev": { - "type": "number", - "format": "float", - "example": 0.02, - "nullable": true - }, - "p50": { - "type": "number", - "format": "float", - "example": 0.02, - "nullable": true - }, - "p95": { - "type": "number", - "format": "float", - "example": 0.12, - "nullable": true - }, - "p96": { - "type": "number", - "format": "float", - "example": 0.13, - "nullable": true - }, - "p97": { - "type": "number", - "format": "float", - "example": 0.14, - "nullable": true - }, - "p98": { - "type": "number", - "format": "float", - "example": 0.145, - "nullable": true - }, - "p99": { - "type": "number", - "format": "float", - "example": 0.148, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "cpu_pressure": { - "description": "CPU pressure stall indicator (0.0-1.0) with statistical aggregations. Values may be null when insufficient data is available.", - "properties": { - "min": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "max": { - "type": "number", - "format": "float", - "example": 0.08, - "nullable": true - }, - "avg": { - "type": "number", - "format": "float", - "example": 0.01, - "nullable": true - }, - "stddev": { - "type": "number", - "format": "float", - "example": 0.01, - "nullable": true - }, - "p50": { - "type": "number", - "format": "float", - "example": 0.01, - "nullable": true - }, - "p95": { - "type": "number", - "format": "float", - "example": 0.05, - "nullable": true - }, - "p96": { - "type": "number", - "format": "float", - "example": 0.06, - "nullable": true - }, - "p97": { - "type": "number", - "format": "float", - "example": 0.065, - "nullable": true - }, - "p98": { - "type": "number", - "format": "float", - "example": 0.07, - "nullable": true - }, - "p99": { - "type": "number", - "format": "float", - "example": 0.075, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false + "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 + } }, - "io_pressure": { - "description": "I/O pressure stall indicator (0.0-1.0) with statistical aggregations. Values may be null when insufficient data is available.", + "additionalProperties": { + "required": [ + "count", + "impact" + ], "properties": { - "min": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "max": { - "type": "number", - "format": "float", - "example": 0.22, - "nullable": true - }, - "avg": { - "type": "number", - "format": "float", - "example": 0.05, - "nullable": true - }, - "stddev": { - "type": "number", - "format": "float", - "example": 0.04, - "nullable": true - }, - "p50": { - "type": "number", - "format": "float", - "example": 0.04, - "nullable": true - }, - "p95": { - "type": "number", - "format": "float", - "example": 0.18, - "nullable": true - }, - "p96": { - "type": "number", - "format": "float", - "example": 0.19, - "nullable": true - }, - "p97": { - "type": "number", - "format": "float", - "example": 0.2, - "nullable": true - }, - "p98": { - "type": "number", - "format": "float", - "example": 0.21, - "nullable": true + "count": { + "description": "Request count for this URL", + "type": "integer", + "example": 1543 }, - "p99": { + "impact": { + "description": "Performance impact score", "type": "number", "format": "float", - "example": 0.215, + "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 + } }, - "irq_pressure": { - "description": "IRQ pressure stall indicator (0.0-1.0) with statistical aggregations. Values may be null when insufficient data is available.", + "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": { - "min": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "max": { - "type": "number", - "format": "float", - "example": 0.01, - "nullable": true - }, - "avg": { - "type": "number", - "format": "float", - "example": 0.001, - "nullable": true - }, - "stddev": { - "type": "number", - "format": "float", - "example": 0.002, - "nullable": true - }, - "p50": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "p95": { - "type": "number", - "format": "float", - "example": 0.008, - "nullable": true - }, - "p96": { - "type": "number", - "format": "float", - "example": 0.009, - "nullable": true - }, - "p97": { - "type": "number", - "format": "float", - "example": 0.0095, - "nullable": true - }, - "p98": { - "type": "number", - "format": "float", - "example": 0.0097, - "nullable": true + "value": { + "type": "string", + "example": "INFO" }, - "p99": { - "type": "number", - "format": "float", - "example": 0.0099, - "nullable": true + "count": { + "type": "integer", + "example": 297 } }, "type": "object", "additionalProperties": false - }, - "mountpoints": { - "description": "Disk usage statistics for filesystem mountpoints. Mountpoint paths are dynamic and vary based on service configuration (e.g., \"\" for root, \"/tmp\", \"/mnt\"). Each mountpoint provides disk and inode usage with statistical aggregations.", - "type": "object", - "additionalProperties": { - "properties": { - "disk_used": { - "description": "Disk bytes used with statistical aggregations. Values may be null when insufficient data is available.", - "properties": { - "min": { - "description": "Minimum disk bytes used", - "type": "integer", - "format": "int64", - "example": 3087007744, - "nullable": true - }, - "max": { - "description": "Maximum disk bytes used", - "type": "integer", - "format": "int64", - "example": 3221225472, - "nullable": true - }, - "avg": { - "description": "Average disk bytes used", - "type": "number", - "format": "float", - "example": 3154116608, - "nullable": true - }, - "stddev": { - "description": "Standard deviation of disk bytes used", - "type": "number", - "format": "float", - "example": 35000000, - "nullable": true - }, - "p50": { - "description": "Median (50th percentile) disk bytes used", - "type": "number", - "format": "float", - "example": 3150000000, - "nullable": true - }, - "p95": { - "description": "95th percentile disk bytes used", - "type": "number", - "format": "float", - "example": 3210000000, - "nullable": true - }, - "p96": { - "description": "96th percentile disk bytes used", - "type": "number", - "format": "float", - "example": 3215000000, - "nullable": true - }, - "p97": { - "description": "97th percentile disk bytes used", - "type": "number", - "format": "float", - "example": 3217000000, - "nullable": true - }, - "p98": { - "description": "98th percentile disk bytes used", - "type": "number", - "format": "float", - "example": 3219000000, - "nullable": true - }, - "p99": { - "description": "99th percentile disk bytes used", - "type": "number", - "format": "float", - "example": 3220000000, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "disk_limit": { - "description": "Disk limit in bytes. Contains only max (nullable)", - "properties": { - "max": { - "description": "Maximum disk limit in bytes", - "type": "integer", - "format": "int64", - "example": 10737418240, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "inodes_used": { - "description": "Inodes used with statistical aggregations. Values may be null when insufficient data is available.", - "properties": { - "min": { - "description": "Minimum inodes used", - "type": "integer", - "example": 45000, - "nullable": true - }, - "max": { - "description": "Maximum inodes used", - "type": "integer", - "example": 52000, - "nullable": true - }, - "avg": { - "description": "Average inodes used", - "type": "number", - "format": "float", - "example": 48500, - "nullable": true - }, - "stddev": { - "description": "Standard deviation of inodes used", - "type": "number", - "format": "float", - "example": 1500, - "nullable": true - }, - "p50": { - "description": "Median (50th percentile) inodes used", - "type": "number", - "format": "float", - "example": 48400, - "nullable": true - }, - "p95": { - "description": "95th percentile inodes used", - "type": "number", - "format": "float", - "example": 51200, - "nullable": true - }, - "p96": { - "description": "96th percentile inodes used", - "type": "number", - "format": "float", - "example": 51400, - "nullable": true - }, - "p97": { - "description": "97th percentile inodes used", - "type": "number", - "format": "float", - "example": 51600, - "nullable": true - }, - "p98": { - "description": "98th percentile inodes used", - "type": "number", - "format": "float", - "example": 51800, - "nullable": true - }, - "p99": { - "description": "99th percentile inodes used", - "type": "number", - "format": "float", - "example": 51900, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "inodes_limit": { - "description": "Inode limit count. Contains only max (nullable)", - "properties": { - "max": { - "description": "Maximum inodes limit", - "type": "integer", - "example": 655360, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - } - }, - "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 + } + } + } + } + }, + "x-property-id-kebab": "http_metrics_timeline_urls", + "x-tag-id-kebab": "Http-Traffic", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "mixed" + ], + "x-return-types-union": "mixed", + "x-description": [ + "Returns HTTP traffic analytics with URLs ranked by impact (response time \u00d7 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." + ] + } + }, + "/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 \u00d7 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 + } + }, + "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", @@ -19536,6 +14279,9 @@ "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." ], @@ -19587,28 +14333,34 @@ } } }, - "x-property-id-kebab": "resources_summary", - "x-tag-id-kebab": "Resources", + "x-property-id-kebab": "http_metrics_timeline_ips", + "x-tag-id-kebab": "Http-Traffic", "x-return-types-displayReturn": false, - "x-return-types": {}, "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "mixed" + ], + "x-return-types-union": "mixed", "x-description": [ - "Returns per-instance resource statistics aggregated over the time range. Filter results using aggs[] (min, max,", - "avg, stddev, p50, p95-p99) and types[] (cpu, memory, swap, disk, inodes, pressure metrics). Response grouped by", - "service name then instance ID (e.g., \"app.0\", \"database.1\"). All aggregations nullable when insufficient data", - "exists." + "Returns HTTP traffic analytics grouped by IP address with IPs ranked by impact (response time \u00d7 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." ] } }, - "/projects/{projectId}/environments/{environmentId}/observability/resources/service/{service}": { + "/projects/{projectId}/environments/{environmentId}/observability/http/breakdown/user-agents": { "get": { "tags": [ - "Resources" + "Http Traffic" ], - "summary": "Get resource metrics by service", - "description": "Returns time-series resource data for one service. Each timestamp contains per-instance metrics. Filter results using aggs[] (min, max, avg, stddev, p50, p95-p99) and types[] (cpu, memory, swap, disk, inodes, pressure metrics). Response grouped by timestamp then instance ID (e.g., \"app.0\"). All aggregations nullable when insufficient data exists.", - "operationId": "resources_by_service", + "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 \u00d7 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", @@ -19632,16 +14384,6 @@ "example": "main" } }, - { - "name": "service", - "in": "path", - "description": "The service name to retrieve metrics for (e.g., \"app\", \"database\", \"admin-pipeline--kafka-profile-payloads\")", - "required": true, - "schema": { - "type": "string", - "example": "app" - } - }, { "name": "from", "in": "query", @@ -19665,9 +14407,62 @@ } }, { - "name": "aggs[]", + "name": "limit", "in": "query", - "description": "Statistical aggregations to include in the response. Can be specified multiple times. Available values: avg, stddev, max, min, p50, p95, p96, p97, p98, p99. Specify parameter multiple times for multiple values (e.g., ?aggs[]=avg&aggs[]=p50).", + "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, @@ -19675,25 +14470,66 @@ "type": "array", "items": { "type": "string", + "example": "GET", "enum": [ - "avg", - "stddev", - "max", - "min", - "p50", - "p95", - "p96", - "p97", - "p98", - "p99" + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "HEAD", + "OPTIONS" ] } } }, { - "name": "types[]", + "name": "methods_mode", "in": "query", - "description": "Metric types to include in the response. Can be specified multiple times. Available values: cpu, memory, disk, inodes, swap, memory_pressure, cpu_pressure, io_pressure, irq_pressure. Specify parameter multiple times for multiple values (e.g., ?types[]=cpu&types[]=memory).", + "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, @@ -19701,24 +14537,102 @@ "type": "array", "items": { "type": "string", + "example": "2XX", "enum": [ - "cpu", - "memory", - "disk", - "inodes", - "swap", - "memory_pressure", - "cpu_pressure", - "io_pressure", - "irq_pressure" + "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": "Successfully retrieved service-specific resource metrics with time-series data", + "description": "HTTP traffic timeline by User Agent retrieved successfully", "content": { "application/json": { "schema": { @@ -19728,9 +14642,12 @@ "_to", "_project_id", "_environment_id", + "_environment_type", "_branch_machine_name", - "_service", - "data" + "_breakdown_limit", + "_breakdown_top_hits", + "breakdown", + "top_hits_timeline" ], "properties": { "_grain": { @@ -19748,2308 +14665,6761 @@ "type": "integer", "example": 1704153600 }, - "_project_id": { - "description": "Project identifier", + "_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", - "example": "abc123def456" + "nullable": true, + "enum": [ + "1", + "-1" + ] }, - "_environment_id": { - "description": "Environment identifier", - "type": "string", - "example": "main" + "_methods": { + "description": "Applied method filter values", + "type": "array", + "items": { + "type": "string", + "example": "GET" + }, + "nullable": true }, - "_branch_machine_name": { - "description": "Branch machine name", + "_methods_mode": { + "description": "Method filter mode (1=additive, -1=subtractive)", "type": "string", - "example": "main-bvxea6i" + "nullable": true, + "enum": [ + "1", + "-1" + ] }, - "_service": { - "description": "Service name", + "_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", - "example": "admin-pipeline--kafka-profile-payloads" + "nullable": true, + "enum": [ + "1", + "-1" + ] }, - "_dg2_host_types_mapping": { - "description": "DG2 host type mapping per instance. Only present for DG2 environments. Maps instance names to their host type (\"web\", \"unified\", or empty string).", - "type": "object", - "example": { - "app.0": "web", - "app.1": "unified", - "worker.0": "" + "_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, - "additionalProperties": { + "enum": [ + "1", + "-1" + ] + }, + "_codes": { + "description": "Applied HTTP status code filter values", + "type": "array", + "items": { "type": "string", - "example": "web", - "enum": [ - "web", - "unified", - "" - ] - } + "example": "200" + }, + "nullable": true }, - "data": { - "description": "Time-series resource utilization data organized by timestamp with instance-level metrics", + "_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": { - "required": [ - "timestamp" - ], - "properties": { - "timestamp": { - "description": "Data point timestamp (Unix timestamp in seconds)", - "type": "integer", - "example": 1764083040 - }, - "instances": { - "description": "Resource metrics grouped by instance name. Instance names are dynamic and vary based on service scaling (e.g., \"admin-pipeline--kafka-profile-payloads.0\", \"app.0\", \"database.1\"). This property may be absent if no data is available for the timestamp.", + "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": { - "description": "Instance-level metrics with statistical aggregations. Instance identifiers are dynamic and vary based on service scaling.", - "properties": { - "cpu_used": { - "description": "CPU cores used with statistical aggregations. Values may be null when insufficient data is available.", - "properties": { - "min": { - "description": "Minimum CPU cores used", - "type": "number", - "format": "float", - "example": 0.016, - "nullable": true - }, - "max": { - "description": "Maximum CPU cores used", - "type": "number", - "format": "float", - "example": 0.016, - "nullable": true - }, - "avg": { - "description": "Average CPU cores used", - "type": "number", - "format": "float", - "example": 0.016, - "nullable": true - }, - "stddev": { - "description": "Standard deviation of CPU cores used", - "type": "number", - "format": "float", - "example": null, - "nullable": true - }, - "p50": { - "description": "Median (50th percentile) CPU cores used", - "type": "number", - "format": "float", - "example": 0.016, - "nullable": true - }, - "p95": { - "description": "95th percentile CPU cores used", - "type": "number", - "format": "float", - "example": 0.016, - "nullable": true - }, - "p96": { - "description": "96th percentile CPU cores used", - "type": "number", - "format": "float", - "example": 0.016, - "nullable": true - }, - "p97": { - "description": "97th percentile CPU cores used", - "type": "number", - "format": "float", - "example": 0.016, - "nullable": true - }, - "p98": { - "description": "98th percentile CPU cores used", - "type": "number", - "format": "float", - "example": 0.016, - "nullable": true - }, - "p99": { - "description": "99th percentile CPU cores used", - "type": "number", - "format": "float", - "example": 0.016, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "cpu_limit": { - "description": "CPU limit in cores. Contains only max (nullable)", - "properties": { - "max": { - "description": "Maximum CPU limit in cores", - "type": "number", - "format": "float", - "example": 0.25, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "memory_used": { - "description": "Memory bytes used with statistical aggregations. Values may be null when insufficient data is available.", - "properties": { - "min": { - "description": "Minimum memory bytes used", - "type": "integer", - "format": "int64", - "example": 128819200, - "nullable": true - }, - "max": { - "description": "Maximum memory bytes used", - "type": "integer", - "format": "int64", - "example": 128819200, - "nullable": true - }, - "avg": { - "description": "Average memory bytes used", - "type": "number", - "format": "float", - "example": 128819200, - "nullable": true - }, - "stddev": { - "description": "Standard deviation of memory bytes used", - "type": "number", - "format": "float", - "example": null, - "nullable": true - }, - "p50": { - "description": "Median (50th percentile) memory bytes used", - "type": "number", - "format": "float", - "example": 128819200, - "nullable": true - }, - "p95": { - "description": "95th percentile memory bytes used", - "type": "number", - "format": "float", - "example": 128819200, - "nullable": true - }, - "p96": { - "description": "96th percentile memory bytes used", - "type": "number", - "format": "float", - "example": 128819200, - "nullable": true - }, - "p97": { - "description": "97th percentile memory bytes used", - "type": "number", - "format": "float", - "example": 128819200, - "nullable": true - }, - "p98": { - "description": "98th percentile memory bytes used", - "type": "number", - "format": "float", - "example": 128819200, - "nullable": true - }, - "p99": { - "description": "99th percentile memory bytes used", - "type": "number", - "format": "float", - "example": 128819200, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "memory_limit": { - "description": "Memory limit in bytes. Contains only max (nullable)", - "properties": { - "max": { - "description": "Maximum memory limit in bytes", - "type": "integer", - "format": "int64", - "example": 671088640, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "swap_used": { - "description": "Swap bytes used with statistical aggregations. Values may be null when insufficient data is available.", - "properties": { - "min": { - "description": "Minimum swap bytes used", - "type": "integer", - "format": "int64", - "example": 0, - "nullable": true - }, - "max": { - "description": "Maximum swap bytes used", - "type": "integer", - "format": "int64", - "example": 0, - "nullable": true - }, - "avg": { - "description": "Average swap bytes used", - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "stddev": { - "description": "Standard deviation of swap bytes used", - "type": "number", - "format": "float", - "example": null, - "nullable": true - }, - "p50": { - "description": "Median (50th percentile) swap bytes used", - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "p95": { - "description": "95th percentile swap bytes used", - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "p96": { - "description": "96th percentile swap bytes used", - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "p97": { - "description": "97th percentile swap bytes used", - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "p98": { - "description": "98th percentile swap bytes used", - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "p99": { - "description": "99th percentile swap bytes used", - "type": "number", - "format": "float", - "example": 0, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false + "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 + } }, - "swap_limit": { - "description": "Swap limit in bytes. Contains only max (nullable)", + "additionalProperties": { + "required": [ + "count", + "impact" + ], "properties": { - "max": { - "description": "Maximum swap limit in bytes", + "count": { + "description": "Request count at this timestamp", "type": "integer", - "format": "int64", - "example": 536870912, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "memory_pressure": { - "description": "Memory pressure stall indicator (0.0-1.0) with statistical aggregations. Values may be null when insufficient data is available.", - "properties": { - "min": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "max": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "avg": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "stddev": { - "type": "number", - "format": "float", - "example": null, - "nullable": true - }, - "p50": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "p95": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "p96": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "p97": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "p98": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "p99": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "cpu_pressure": { - "description": "CPU pressure stall indicator (0.0-1.0) with statistical aggregations. Values may be null when insufficient data is available.", - "properties": { - "min": { - "type": "number", - "format": "float", - "example": 0.229667, - "nullable": true - }, - "max": { - "type": "number", - "format": "float", - "example": 0.229667, - "nullable": true - }, - "avg": { - "type": "number", - "format": "float", - "example": 0.229667, - "nullable": true - }, - "stddev": { - "type": "number", - "format": "float", - "example": null, - "nullable": true - }, - "p50": { - "type": "number", - "format": "float", - "example": 0.229667, - "nullable": true - }, - "p95": { - "type": "number", - "format": "float", - "example": 0.229667, - "nullable": true - }, - "p96": { - "type": "number", - "format": "float", - "example": 0.229667, - "nullable": true - }, - "p97": { - "type": "number", - "format": "float", - "example": 0.229667, - "nullable": true - }, - "p98": { - "type": "number", - "format": "float", - "example": 0.229667, - "nullable": true - }, - "p99": { - "type": "number", - "format": "float", - "example": 0.229667, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "io_pressure": { - "description": "I/O pressure stall indicator (0.0-1.0) with statistical aggregations. Values may be null when insufficient data is available.", - "properties": { - "min": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "max": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "avg": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "stddev": { - "type": "number", - "format": "float", - "example": null, - "nullable": true - }, - "p50": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "p95": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "p96": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "p97": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "p98": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "p99": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "irq_pressure": { - "description": "IRQ pressure stall indicator (0.0-1.0) with statistical aggregations. Values may be null when insufficient data is available.", - "properties": { - "min": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "max": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "avg": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "stddev": { - "type": "number", - "format": "float", - "example": null, - "nullable": true - }, - "p50": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "p95": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "p96": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "p97": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true - }, - "p98": { - "type": "number", - "format": "float", - "example": 0, - "nullable": true + "example": 1543 }, - "p99": { + "impact": { + "description": "Impact score as percentage of wall time consumed", "type": "number", "format": "float", - "example": 0, + "example": 47.45, "nullable": true } }, "type": "object", "additionalProperties": false - }, - "mountpoints": { - "description": "Disk usage statistics for filesystem mountpoints. Mountpoint paths are dynamic and vary based on service configuration (e.g., \"\" for root, \"/tmp\", \"/mnt\"). Each mountpoint provides disk and inode usage with statistical aggregations.", - "type": "object", - "additionalProperties": { - "properties": { - "disk_used": { - "description": "Disk bytes used with statistical aggregations. Values may be null when insufficient data is available.", - "properties": { - "min": { - "description": "Minimum disk bytes used", - "type": "integer", - "format": "int64", - "example": 197959680, - "nullable": true - }, - "max": { - "description": "Maximum disk bytes used", - "type": "integer", - "format": "int64", - "example": 197959680, - "nullable": true - }, - "avg": { - "description": "Average disk bytes used", - "type": "number", - "format": "float", - "example": 197959680, - "nullable": true - }, - "stddev": { - "description": "Standard deviation of disk bytes used", - "type": "number", - "format": "float", - "example": null, - "nullable": true - }, - "p50": { - "description": "Median (50th percentile) disk bytes used", - "type": "number", - "format": "float", - "example": 197959680, - "nullable": true - }, - "p95": { - "description": "95th percentile disk bytes used", - "type": "number", - "format": "float", - "example": 197959680, - "nullable": true - }, - "p96": { - "description": "96th percentile disk bytes used", - "type": "number", - "format": "float", - "example": 197959680, - "nullable": true - }, - "p97": { - "description": "97th percentile disk bytes used", - "type": "number", - "format": "float", - "example": 197959680, - "nullable": true - }, - "p98": { - "description": "98th percentile disk bytes used", - "type": "number", - "format": "float", - "example": 197959680, - "nullable": true - }, - "p99": { - "description": "99th percentile disk bytes used", - "type": "number", - "format": "float", - "example": 197959680, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "disk_limit": { - "description": "Disk limit in bytes. Contains only max (nullable)", - "properties": { - "max": { - "description": "Maximum disk limit in bytes", - "type": "integer", - "format": "int64", - "example": 17169383424, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "inodes_used": { - "description": "Inodes used with statistical aggregations. Values may be null when insufficient data is available.", - "properties": { - "min": { - "description": "Minimum inodes used", - "type": "integer", - "example": 2245, - "nullable": true - }, - "max": { - "description": "Maximum inodes used", - "type": "integer", - "example": 2245, - "nullable": true - }, - "avg": { - "description": "Average inodes used", - "type": "number", - "format": "float", - "example": 2245, - "nullable": true - }, - "stddev": { - "description": "Standard deviation of inodes used", - "type": "number", - "format": "float", - "example": null, - "nullable": true - }, - "p50": { - "description": "Median (50th percentile) inodes used", - "type": "number", - "format": "float", - "example": 2245, - "nullable": true - }, - "p95": { - "description": "95th percentile inodes used", - "type": "number", - "format": "float", - "example": 2245, - "nullable": true - }, - "p96": { - "description": "96th percentile inodes used", - "type": "number", - "format": "float", - "example": 2245, - "nullable": true - }, - "p97": { - "description": "97th percentile inodes used", - "type": "number", - "format": "float", - "example": 2245, - "nullable": true - }, - "p98": { - "description": "98th percentile inodes used", - "type": "number", - "format": "float", - "example": 2245, - "nullable": true - }, - "p99": { - "description": "99th percentile inodes used", - "type": "number", - "format": "float", - "example": 2245, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - }, - "inodes_limit": { - "description": "Inode limit count. Contains only max (nullable)", - "properties": { - "max": { - "description": "Maximum inodes limit", - "type": "integer", - "example": 8388608, - "nullable": true - } - }, - "type": "object", - "additionalProperties": false - } - }, - "type": "object", - "additionalProperties": false - } } - }, - "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 + } + } + } + } + }, + "x-property-id-kebab": "http_metrics_timeline_user_agents", + "x-tag-id-kebab": "Http-Traffic", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "mixed" + ], + "x-return-types-union": "mixed", + "x-description": [ + "Returns HTTP traffic analytics grouped by User Agent with User Agents ranked by impact (response time \u00d7 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." + ] + } + }, + "/organizations/{organization_id}/invoices": { + "get": { + "summary": "List invoices", + "description": "Retrieves a list of invoices for the specified organization.", + "operationId": "list-org-invoices", + "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" + } + } + } + } + }, + "x-property-id-kebab": "list-org-invoices", + "x-tag-id-kebab": "Invoices", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "object" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "object" + ], + "x-description": [ + "Retrieves a list of invoices for the specified organization." + ] + } + }, + "/organizations/{organization_id}/invoices/{invoice_id}": { + "get": { + "summary": "Get invoice", + "description": "Retrieves an invoice for the specified organization.", + "operationId": "get-org-invoice", + "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" + } + } + } + } + }, + "x-property-id-kebab": "get-org-invoice", + "x-tag-id-kebab": "Invoices", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Invoice" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Invoice" + ], + "x-return-types-union": "\\Upsun\\Model\\Invoice", + "x-description": [ + "Retrieves an invoice for the specified organization." + ] + } + }, + "/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" + } + }, + "x-property-id-kebab": "get-totp-enrollment", + "x-tag-id-kebab": "Mfa", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "object" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "object" + ], + "x-description": [ + "Retrieves TOTP enrollment information." + ] + }, + "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": "" + }, + "x-property-id-kebab": "confirm-totp-enrollment", + "x-tag-id-kebab": "Mfa", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "object" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "object" + ], + "x-description": [ + "Confirms the given TOTP enrollment." + ] + }, + "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" + } + }, + "x-property-id-kebab": "withdraw-totp-enrollment", + "x-tag-id-kebab": "Mfa", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-description": [ + "Withdraws from the TOTP enrollment." + ] + } + }, + "/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" + } + }, + "x-property-id-kebab": "recreate-recovery-codes", + "x-tag-id-kebab": "Mfa", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "object" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "object" + ], + "x-description": [ + "Re-creates recovery codes for the MFA enrollment." + ] + } + }, + "/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" + } + } + } + } + }, + "x-property-id-kebab": "get-org-mfa-enforcement", + "x-tag-id-kebab": "Mfa", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationMfaEnforcement" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationMfaEnforcement" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationMfaEnforcement", + "x-description": [ + "Retrieves MFA settings for the specified organization." + ] + } + }, + "/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" + } + } + } + } + }, + "x-property-id-kebab": "enable-org-mfa-enforcement", + "x-tag-id-kebab": "Mfa", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-description": [ + "Enables MFA enforcement for the specified organization." + ] + } + }, + "/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" + } + } + } + } + }, + "x-property-id-kebab": "disable-org-mfa-enforcement", + "x-tag-id-kebab": "Mfa", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-description": [ + "Disables MFA enforcement for the specified organization." + ] + } + }, + "/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" + } + } + } + } + }, + "x-property-id-kebab": "send-org-mfa-reminders", + "x-tag-id-kebab": "Mfa", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": true + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "mixed" + ], + "x-return-types-union": "mixed", + "x-description": [ + "Sends a reminder about setting up MFA to the specified organization members." + ] + } + }, + "/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": {} + } + } + }, + "x-property-id-kebab": "download-invoice", + "x-tag-id-kebab": "Orders", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": false + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "string" + ], + "x-return-types-union": "string" + } + }, + "/organizations/{organization_id}/orders": { + "get": { + "summary": "List orders", + "description": "Retrieves orders for the specified organization.", + "operationId": "list-org-orders", + "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" + } + } + } + } + }, + "x-property-id-kebab": "list-org-orders", + "x-tag-id-kebab": "Orders", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "object" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "object" + ], + "x-description": [ + "Retrieves orders for the specified organization." + ] + } + }, + "/organizations/{organization_id}/orders/{order_id}": { + "get": { + "summary": "Get order", + "description": "Retrieves an order for the specified organization.", + "operationId": "get-org-order", + "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" + } + } + } + } + }, + "x-property-id-kebab": "get-org-order", + "x-tag-id-kebab": "Orders", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Order" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Order" + ], + "x-return-types-union": "\\Upsun\\Model\\Order", + "x-description": [ + "Retrieves an order for the specified organization." + ] + } + }, + "/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", + "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" + } + } + } + } + }, + "x-property-id-kebab": "create-authorization-credentials", + "x-tag-id-kebab": "Orders", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "object" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "object" + ], + "x-description": [ + "Creates confirmation credentials for payments that require online authorization" + ] + } + }, + "/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" + ] + } + } + } + }, + "x-property-id-kebab": "create-org-invite", + "x-tag-id-kebab": "Organization-Invitations", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationInvitation" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationInvitation" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationInvitation", + "x-description": [ + "Creates an invitation to an organization for a user with the specified email address." + ] + }, + "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.
\nUse a dash (\"-\") to sort descending.\n", + "schema": { + "type": "string", + "enum": [ + "updated_at", + "-updated_at" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrganizationInvitation" + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-org-invites", + "x-tag-id-kebab": "Organization-Invitations", + "x-return-types-displayReturn": true, + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationInvitation[]" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationInvitation[]" + ], + "x-return-types-union": "array", + "x-description": [ + "Returns a list of invitations to an organization." + ] + } + }, + "/organizations/{organization_id}/invitations/{invitation_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/InvitationID" + } + ], + "delete": { + "summary": "Cancel a pending invitation to an organization", + "description": "Cancels the specified invitation.", + "operationId": "cancel-org-invite", + "tags": [ + "Organization Invitations" + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + }, + "x-property-id-kebab": "cancel-org-invite", + "x-tag-id-kebab": "Organization-Invitations", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-description": [ + "Cancels the specified invitation." + ] + } + }, + "/organizations/{organization_id}/estimate": { + "get": { + "summary": "Estimate total spend", + "description": "Estimates the total spend for the specified organization.", + "operationId": "estimate-org", + "tags": [ + "Organization Management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationEstimationObject" + } + } + } + }, + "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", + "x-property-id-kebab": "estimate-org", + "x-tag-id-kebab": "Organization-Management", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationEstimationObject" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationEstimationObject" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationEstimationObject", + "x-description": [ + "Estimates the total spend for the specified organization." + ] + } + }, + "/organizations/{organization_id}/alerts/billing": { + "get": { + "summary": "Get billing alert configuration", + "description": "Retrieves billing alert configuration for the specified organization.", + "operationId": "get-org-billing-alert-config", + "tags": [ + "Organization Management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationAlertConfig" + } + } + } + }, + "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", + "x-property-id-kebab": "get-org-billing-alert-config", + "x-tag-id-kebab": "Organization-Management", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationAlertConfig" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationAlertConfig" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationAlertConfig", + "x-description": [ + "Retrieves billing alert configuration for the specified organization." + ] + }, + "patch": { + "summary": "Update billing alert configuration", + "description": "Updates billing alert configuration for the specified organization.", + "operationId": "update-org-billing-alert-config", + "tags": [ + "Organization Management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "active": { + "type": "boolean", + "description": "Whether the billing alert should be active or not." + }, + "config": { + "type": "object", + "description": "The configuration for billing alerts.", + "properties": { + "threshold": { + "type": "integer", + "description": "The amount after which a billing alert should be triggered." + }, + "mode": { + "type": "string", + "description": "The mode in which the alert is triggered." + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationAlertConfig" + } + } + } + }, + "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", + "x-property-id-kebab": "update-org-billing-alert-config", + "x-tag-id-kebab": "Organization-Management", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationAlertConfig" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationAlertConfig" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationAlertConfig", + "x-description": [ + "Updates billing alert configuration for the specified organization." + ] + } + }, + "/organizations/{organization_id}/prepayment": { + "get": { + "summary": "Get organization prepayment information", + "description": "Retrieves prepayment information for the specified organization, if applicable.", + "operationId": "get-org-prepayment-info", + "tags": [ + "Organization Management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "prepayment": { + "$ref": "#/components/schemas/PrepaymentObject" + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "description": "Link to the current resource.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link." + } + } + }, + "transactions": { + "type": "object", + "description": "Link to the prepayment transactions resource.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link." + } + } + } + } + } + } + } + } + } + }, + "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", + "x-property-id-kebab": "get-org-prepayment-info", + "x-tag-id-kebab": "Organization-Management", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "object" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "object" + ], + "x-description": [ + "Retrieves prepayment information for the specified organization, if applicable." + ] + } + }, + "/organizations/{organization_id}/prepayment/transactions": { + "get": { + "summary": "List organization prepayment transactions", + "description": "Retrieves a list of prepayment transactions for the specified organization, if applicable.", + "operationId": "list-org-prepayment-transactions", + "tags": [ + "Organization Management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "Total number of items across pages." + }, + "transactions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PrepaymentTransactionObject" + } + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "description": "Link to the current set of items.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link." + } + } + }, + "previous": { + "type": "object", + "description": "Link to the previous set of items.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link." + } + } + }, + "next": { + "type": "object", + "description": "Link to the next set of items.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link" + } + } + }, + "prepayment": { + "type": "object", + "description": "Link to the prepayment resource.", + "properties": { + "href": { + "type": "string", + "description": "URL of the link." } } + } + } + } + } + } + } + } + }, + "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", + "x-property-id-kebab": "list-org-prepayment-transactions", + "x-tag-id-kebab": "Organization-Management", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "object" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "object" + ], + "x-description": [ + "Retrieves a list of prepayment transactions for the specified organization, if applicable." + ] + } + }, + "/organizations/{organization_id}/members": { + "get": { + "summary": "List organization members", + "description": "Accessible to organization owners and members with the \"manage members\" permission.", + "operationId": "list-org-members", + "tags": [ + "Organization Members" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "in": "query", + "name": "filter[permissions]", + "description": "Allows filtering by `permissions` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/ArrayFilter" + } + }, + { + "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.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `created_at`, `updated_at`.\n", + "schema": { + "type": "string", + "example": "-updated_at" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "Total number of items across pages." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrganizationMember" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "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" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-org-members", + "x-tag-id-kebab": "Organization-Members", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "object" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "object" + ], + "x-description": [ + "Accessible to organization owners and members with the \"manage members\" permission." + ] + }, + "post": { + "summary": "Create organization member", + "description": "Creates a new organization member.", + "operationId": "create-org-member", + "tags": [ + "Organization Members" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "user_id" + ], + "properties": { + "user_id": { + "type": "string", + "format": "uuid", + "description": "ID of the user." + }, + "permissions": { + "$ref": "#/components/schemas/Permissions" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationMember" + } + } + } + }, + "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" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "create-org-member", + "x-tag-id-kebab": "Organization-Members", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationMember" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationMember" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationMember", + "x-description": [ + "Creates a new organization member." + ] + } + }, + "/organizations/{organization_id}/members/{user_id}": { + "get": { + "summary": "Get organization member", + "description": "Retrieves the specified organization member.", + "operationId": "get-org-member", + "tags": [ + "Organization Members" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "$ref": "#/components/parameters/UserID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationMember" + } + } + } + }, + "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-property-id-kebab": "get-org-member", + "x-tag-id-kebab": "Organization-Members", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationMember" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationMember" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationMember", + "x-description": [ + "Retrieves the specified organization member." + ] + }, + "patch": { + "summary": "Update organization member", + "description": "Updates the specified organization member.", + "operationId": "update-org-member", + "tags": [ + "Organization Members" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/UserID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "permissions": { + "$ref": "#/components/schemas/Permissions" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationMember" + } + } + } + }, + "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" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "update-org-member", + "x-tag-id-kebab": "Organization-Members", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationMember" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationMember" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationMember", + "x-description": [ + "Updates the specified organization member." + ] + }, + "delete": { + "summary": "Delete organization member", + "description": "Deletes the specified organization member.", + "operationId": "delete-org-member", + "tags": [ + "Organization Members" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/UserID" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "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-property-id-kebab": "delete-org-member", + "x-tag-id-kebab": "Organization-Members", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-description": [ + "Deletes the specified organization member." + ] + } + }, + "/organizations/{organization_id}/projects": { + "get": { + "summary": "List projects", + "description": "Retrieves a list of projects for the specified organization.", + "operationId": "list-org-projects", + "tags": [ + "Organization Projects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "in": "query", + "name": "filter[id]", + "description": "Allows filtering by `id` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "$ref": "#/components/parameters/FilterProjectTitle" + }, + { + "$ref": "#/components/parameters/FilterProjectStatus" + }, + { + "$ref": "#/components/parameters/FilterUpdatedAt" + }, + { + "$ref": "#/components/parameters/FilterCreatedAt" + }, + { + "$ref": "#/components/parameters/PageSize" + }, + { + "$ref": "#/components/parameters/PageBefore" + }, + { + "$ref": "#/components/parameters/PageAfter" + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `id`, `region`, `title`, `type`, `plan`, `status`, `created_at`, `updated_at`.\n", + "schema": { + "type": "string", + "example": "-updated_at" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "Total number of items across pages." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrganizationProject" + } + }, + "facets": { + "$ref": "#/components/schemas/ProjectFacets" + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + }, + "additionalProperties": false + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + }, + "x-property-id-kebab": "list-org-projects", + "x-tag-id-kebab": "Organization-Projects", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "mixed" + ], + "x-return-types-union": "mixed", + "x-description": [ + "Retrieves a list of projects for the specified organization." + ] + }, + "post": { + "summary": "Create project", + "description": "Creates a new project in the specified organization.", + "operationId": "create-org-project", + "tags": [ + "Organization Projects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "region" + ], + "properties": { + "organization_id": { + "$ref": "#/components/schemas/OrganizationID" + }, + "region": { + "$ref": "#/components/schemas/RegionID" + }, + "title": { + "$ref": "#/components/schemas/ProjectTitle" + }, + "type": { + "$ref": "#/components/schemas/ProjectType" + }, + "plan": { + "$ref": "#/components/schemas/ProjectPlan" + }, + "default_branch": { + "$ref": "#/components/schemas/ProjectDefaultBranch" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationProject" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "503": { + "$ref": "#/components/responses/ServiceUnavailable" + } + }, + "x-property-id-kebab": "create-org-project", + "x-tag-id-kebab": "Organization-Projects", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationProject" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationProject" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationProject", + "x-description": [ + "Creates a new project in the specified organization." + ] + } + }, + "/organizations/{organization_id}/projects/provisioning": { + "get": { + "summary": "Stream provisioning progress", + "description": "Streams real-time provisioning progress for projects being created in the\nspecified organization. The response is an NDJSON stream where each line\nis a JSON object representing a provisioning event.\n\nThe stream emits events as provisioning stages complete and terminates\nautomatically when all in-flight projects finish (or fail). A keep-alive\nevent is sent periodically to prevent connection timeouts.\n\nThe body is a newline-delimited stream of JSON objects.\nEach line is a single `ProvisionEvent`.\n\nThe `data`, `done`, and `error` events include a `steps` array listing the ordered provisioning steps.\n\nEvent types:\n- `data` \u2014 a provisioning stage completed\n- `done` \u2014 provisioning finished successfully\n- `error` \u2014 provisioning failed\n- `keep_alive` \u2014 connection keep-alive\n", + "operationId": "stream-org-project-provisioning", + "tags": [ + "Organization Projects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/x-ndjson": { + "schema": { + "$ref": "#/components/schemas/ProvisionEvent" + } + } + } + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + }, + "x-property-id-kebab": "stream-org-project-provisioning", + "x-tag-id-kebab": "Organization-Projects", + "x-return-types-displayReturn": true, + "x-phpdoc": { + "return": "\\Generator" + }, + "x-ndjson-stream": true, + "x-stream-item-type": "\\Upsun\\Model\\ProvisionEvent", + "x-returnable": true, + "x-return-types": [ + "\\Generator" + ], + "x-return-types-union": "\\Generator", + "x-description": [ + "Streams real-time provisioning progress for projects being created in the specified organization. The response is", + "an NDJSON stream where each line is a JSON object representing a provisioning event. The stream emits events as", + "provisioning stages complete and terminates automatically when all in-flight projects finish (or fail). A", + "keep-alive event is sent periodically to prevent connection timeouts. The body is a newline-delimited stream of", + "JSON objects. Each line is a single `ProvisionEvent`. The `data`, `done`, and `error` events include a `steps`", + "array listing the ordered provisioning steps. Event types: - `data` \u2014 a provisioning stage completed - `done`", + "\u2014 provisioning finished successfully - `error` \u2014 provisioning failed - `keep_alive` \u2014 connection keep-alive" + ] + } + }, + "/organizations/{organization_id}/projects/{project_id}": { + "get": { + "summary": "Get project", + "description": "Retrieves the specified project.", + "operationId": "get-org-project", + "tags": [ + "Organization Projects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/ProjectID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationProject" + } + } + } + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + }, + "x-property-id-kebab": "get-org-project", + "x-tag-id-kebab": "Organization-Projects", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationProject" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationProject" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationProject", + "x-description": [ + "Retrieves the specified project." + ] + }, + "patch": { + "summary": "Update project", + "description": "Updates the specified project.", + "operationId": "update-org-project", + "tags": [ + "Organization Projects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/ProjectID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "$ref": "#/components/schemas/ProjectTitle" + }, + "plan": { + "$ref": "#/components/schemas/ProjectPlan" + }, + "timezone": { + "$ref": "#/components/schemas/ProjectTimeZone" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationProject" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "503": { + "$ref": "#/components/responses/ServiceUnavailable" + } + }, + "x-property-id-kebab": "update-org-project", + "x-tag-id-kebab": "Organization-Projects", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\OrganizationProject" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\OrganizationProject" + ], + "x-return-types-union": "\\Upsun\\Model\\OrganizationProject", + "x-description": [ + "Updates the specified project." + ] + }, + "delete": { + "summary": "Delete project", + "description": "Deletes the specified project.", + "operationId": "delete-org-project", + "tags": [ + "Organization Projects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/ProjectID" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/NoContent" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "503": { + "$ref": "#/components/responses/ServiceUnavailable" + } + }, + "x-property-id-kebab": "delete-org-project", + "x-tag-id-kebab": "Organization-Projects", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-description": [ + "Deletes the specified project." + ] + } + }, + "/organizations/{organization_id}/projects/{project_id}/metrics/carbon": { + "get": { + "summary": "Query project carbon emissions metrics", + "description": "Queries the carbon emission data for the specified project using the supplied parameters.", + "operationId": "query-project-carbon", + "tags": [ + "Organization Projects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/ProjectID" + }, + { + "$ref": "#/components/parameters/TimeRangeFrom" + }, + { + "$ref": "#/components/parameters/TimeRangeTo" + }, + { + "$ref": "#/components/parameters/TimeRangeInterval" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectCarbon" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + }, + "x-property-id-kebab": "query-project-carbon", + "x-tag-id-kebab": "Organization-Projects", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\ProjectCarbon" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\ProjectCarbon" + ], + "x-return-types-union": "\\Upsun\\Model\\ProjectCarbon", + "x-description": [ + "Queries the carbon emission data for the specified project using the supplied parameters." + ] + } + }, + "/users/{user_id}/organizations": { + "get": { + "summary": "User organizations", + "description": "Retrieves organizations that the specified user is a member of.", + "operationId": "list-user-orgs", + "tags": [ + "Organizations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + }, + { + "in": "query", + "name": "filter[id]", + "description": "Allows filtering by `id` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[type]", + "description": "Allows filtering by `type` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[vendor]", + "description": "Allows filtering by `vendor` using one or more operators.\n", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[status]", + "description": "Allows filtering by `status` using one or more operators.
\nDefaults to `filter[status][in]=active,restricted,suspended`.\n", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[updated_at]", + "description": "Allows filtering by `updated_at` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/DateTimeFilter" + } + }, + { + "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.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `name`, `label`, `created_at`, `updated_at`.\n", + "schema": { + "type": "string", + "example": "-updated_at" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Organization" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "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" + } + } + } + } + }, + "x-property-id-kebab": "list-user-orgs", + "x-tag-id-kebab": "Organizations", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "object" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "object" + ], + "x-description": [ + "Retrieves organizations that the specified user is a member of." + ] + } + }, + "/organizations": { + "get": { + "summary": "List organizations", + "description": "Non-admin users will only see organizations they are members of.", + "operationId": "list-orgs", + "tags": [ + "Organizations" + ], + "parameters": [ + { + "in": "query", + "name": "filter[id]", + "description": "Allows filtering by `id` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[type]", + "description": "Allows filtering by `type` using one or more operators.\n", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[owner_id]", + "description": "Allows filtering by `owner_id` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[name]", + "description": "Allows filtering by `name` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[label]", + "description": "Allows filtering by `label` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[billing_profile_id]", + "description": "Allows filtering by `billing_profile_id` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[vendor]", + "description": "Allows filtering by `vendor` using one or more operators.\n", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[capabilities]", + "description": "Allows filtering by `capabilites` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/ArrayFilter" + } + }, + { + "in": "query", + "name": "filter[status]", + "description": "Allows filtering by `status` using one or more operators.
\nDefaults to `filter[status][in]=active,restricted,suspended`.\n", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[updated_at]", + "description": "Allows filtering by `updated_at` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/DateTimeFilter" + } + }, + { + "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.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `name`, `label`, `created_at`, `updated_at`.\n", + "schema": { + "type": "string", + "example": "-updated_at" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "Total number of items across pages." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Organization" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } + } + } + } + }, + "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" + } + } + } + } + }, + "x-property-id-kebab": "list-orgs", + "x-tag-id-kebab": "Organizations", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "object" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "object" + ], + "x-description": [ + "Non-admin users will only see organizations they are members of." + ] + }, + "post": { + "summary": "Create organization", + "description": "Creates a new organization.", + "operationId": "create-org", + "tags": [ + "Organizations" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "label" + ], + "properties": { + "type": { + "type": "string", + "description": "The type of the organization.", + "enum": [ + "fixed", + "flexible" + ] + }, + "owner_id": { + "type": "string", + "format": "uuid", + "description": "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." + }, + "country": { + "type": "string", + "description": "The organization country (2-letter country code).", + "maxLength": 2 + }, + "security_contact": { + "type": "string", + "format": "email", + "description": "The security contact email address for the organization." + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Organization" + } + } + } + }, + "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" + } + } + } + } + }, + "x-property-id-kebab": "create-org", + "x-tag-id-kebab": "Organizations", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Organization" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Organization" + ], + "x-return-types-union": "\\Upsun\\Model\\Organization", + "x-description": [ + "Creates a new organization." + ] + } + }, + "/organizations/{organization_id}": { + "get": { + "summary": "Get organization", + "description": "Retrieves the specified organization.", + "operationId": "get-org", + "tags": [ + "Organizations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Organization" + } + } + } + }, + "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-property-id-kebab": "get-org", + "x-tag-id-kebab": "Organizations", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Organization" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Organization" + ], + "x-return-types-union": "\\Upsun\\Model\\Organization", + "x-description": [ + "Retrieves the specified organization." + ] + }, + "patch": { + "summary": "Update organization", + "description": "Updates the specified organization.", + "operationId": "update-org", + "tags": [ + "Organizations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "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 + }, + "billing_profile_id": { + "type": "string", + "description": "The billing profile ID." + }, + "security_contact": { + "type": "string", + "format": "email", + "description": "The security contact email address for the organization." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Organization" + } + } + } + }, + "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" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Conflict - Organization already has a billing profile attached", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "update-org", + "x-tag-id-kebab": "Organizations", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Organization" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Organization" + ], + "x-return-types-union": "\\Upsun\\Model\\Organization", + "x-description": [ + "Updates the specified organization." + ] + }, + "delete": { + "summary": "Delete organization", + "description": "Deletes the specified organization.", + "operationId": "delete-org", + "tags": [ + "Organizations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "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" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "delete-org", + "x-tag-id-kebab": "Organizations", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-description": [ + "Deletes the specified organization." + ] + } + }, + "/users/{user_id}/phonenumber": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], + "post": { + "summary": "Verify phone number", + "description": "Starts a phone number verification session.", + "operationId": "verify-phone-number", + "tags": [ + "PhoneNumber" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "sid": { + "type": "string", + "description": "Session ID of the verification." + } + } + } + } + } + }, + "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": { + "channel": { + "type": "string", + "description": "The channel used to receive the verification code.", + "enum": [ + "sms", + "whatsapp", + "call" + ] + }, + "phone_number": { + "type": "string", + "description": "The phone number used to receive the verification code." + } + }, + "required": [ + "channel", + "phone_number" + ] + } + } + } + }, + "x-property-id-kebab": "verify-phone-number", + "x-tag-id-kebab": "PhoneNumber", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "object" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "object" + ], + "x-description": [ + "Starts a phone number verification session." + ] + } + }, + "/users/{user_id}/phonenumber/{sid}": { + "parameters": [ + { + "schema": { + "type": "string" + }, + "name": "sid", + "in": "path", + "required": true, + "description": "The session ID obtained from `POST /users/{user_id}/phonenumber`." + }, + { + "$ref": "#/components/parameters/UserID" + } + ], + "post": { + "summary": "Confirm phone number", + "description": "Confirms phone number using a verification code.", + "operationId": "confirm-phone-number", + "tags": [ + "PhoneNumber" + ], + "responses": { + "200": { + "description": "OK" + }, + "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": { + "code": { + "type": "string", + "description": "The verification code received on your phone." + } + }, + "required": [ + "code" + ] + } + } + } + }, + "x-property-id-kebab": "confirm-phone-number", + "x-tag-id-kebab": "PhoneNumber", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-description": [ + "Confirms phone number using a verification code." + ] + } + }, + "/organizations/{organization_id}/address": { + "get": { + "summary": "Get address", + "description": "Retrieves the address for the specified organization.", + "operationId": "get-org-address", + "tags": [ + "Profiles" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Address" + } + } + } + }, + "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-property-id-kebab": "get-org-address", + "x-tag-id-kebab": "Profiles", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Address" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Address" + ], + "x-return-types-union": "\\Upsun\\Model\\Address", + "x-description": [ + "Retrieves the address for the specified organization." + ] + }, + "patch": { + "summary": "Update address", + "description": "Updates the address for the specified organization.", + "operationId": "update-org-address", + "tags": [ + "Profiles" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Address" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Address" + } + } + } + }, + "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" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "update-org-address", + "x-tag-id-kebab": "Profiles", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Address" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Address" + ], + "x-return-types-union": "\\Upsun\\Model\\Address", + "x-description": [ + "Updates the address for the specified organization." + ] + } + }, + "/organizations/{organization_id}/profile": { + "get": { + "summary": "Get profile", + "description": "Retrieves the profile for the specified organization.", + "operationId": "get-org-profile", + "tags": [ + "Profiles" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Profile" + } + } + } + }, + "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-property-id-kebab": "get-org-profile", + "x-tag-id-kebab": "Profiles", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Profile" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Profile" + ], + "x-return-types-union": "\\Upsun\\Model\\Profile", + "x-description": [ + "Retrieves the profile for the specified organization." + ] + }, + "patch": { + "summary": "Update profile", + "description": "Updates the profile for the specified organization.", + "operationId": "update-org-profile", + "tags": [ + "Profiles" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "default_catalog": { + "type": "string", + "description": "The URL of a catalog file which overrides the default." + }, + "project_options_url": { + "type": "string", + "format": "uri", + "description": "The URL of an organization-wide project options file." + }, + "company_name": { + "type": "string", + "description": "The company name." + }, + "legal_entity_name": { + "type": "string", + "description": "The legal entity name of the company." + }, + "customer_type": { + "type": "string", + "description": "The customer type of this account.", + "enum": [ + "indvidual", + "company", + "government" + ] + }, + "vat_number": { + "type": "string", + "description": "The VAT number of the company." + }, + "billing_contact": { + "type": "string", + "format": "email", + "description": "The e-mail address of a contact to whom billing notices will be sent." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Profile" + } + } + } + }, + "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" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "update-org-profile", + "x-tag-id-kebab": "Profiles", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Profile" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Profile" + ], + "x-return-types-union": "\\Upsun\\Model\\Profile", + "x-description": [ + "Updates the profile for the specified organization." + ] + } + }, + "/projects/{projectId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "get-projects", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Project" + } + } + } + } + }, + "tags": [ + "Project" + ], + "summary": "Get a project", + "description": "Retrieve the details of a single project.", + "x-property-id-kebab": "get-projects", + "x-tag-id-kebab": "Project", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Project" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Project" + ], + "x-return-types-union": "\\Upsun\\Model\\Project", + "x-description": [ + "Retrieve the details of a single project." + ] + } + }, + "/projects/{projectId}/capabilities": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "get-projects-capabilities", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectCapabilities" + } + } + } + } + }, + "tags": [ + "Project" + ], + "summary": "Get a project's capabilities", + "description": "Get a list of capabilities on a project, as defined by the billing system.\nFor instance, one special capability that could be defined on a project is\nlarge development environments.\n", + "x-property-id-kebab": "get-projects-capabilities", + "x-tag-id-kebab": "Project", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\ProjectCapabilities" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\ProjectCapabilities" + ], + "x-return-types-union": "\\Upsun\\Model\\ProjectCapabilities", + "x-description": [ + "Get a list of capabilities on a project, as defined by the billing system. For instance, one special capability", + "that could be defined on a project is large development environments." + ] + } + }, + "/projects/{projectId}/clear_build_cache": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "action-projects-clear-build-cache", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Project" + ], + "summary": "Clear project build cache", + "description": "On rare occasions, a project's build cache can become corrupted. This\nendpoint will entirely flush the project's build cache. More information\non [clearing the build cache can be found in our user documentation.](https://docs.upsun.com/anchors/troubleshoot/clear-build-cache/)\n", + "x-property-id-kebab": "action-projects-clear-build-cache", + "x-tag-id-kebab": "Project", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-description": [ + "On rare occasions, a project's build cache can become corrupted. This endpoint will entirely flush the project's", + "build cache. More information on [clearing the build cache can be found in our user", + "documentation.](https://docs.upsun.com/anchors/troubleshoot/clear-build-cache/)" + ] + } + }, + "/projects/{projectId}/maintenance-redeploy": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "maintenance-redeploy-project", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Project" + ], + "x-property-id-kebab": "maintenance-redeploy-project", + "x-tag-id-kebab": "Project", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse" + } + }, + "/projects/{projectId}/activities": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-activities", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivityCollection" + } + } + } + } + }, + "tags": [ + "Project Activity" + ], + "summary": "Get project activity log", + "description": "Retrieve a project's activity log including logging actions in all\nenvironments within a project. This returns a list of objects\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`), the `environments` it\napplies to and when the activity expires (`expires_at`).\n\nThere are other related information in the `payload`.\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 environment's `parent` environment and the\nbranching action's `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\nExpired activities are removed from the project activity log, except\nthe last 100 expired objects provided they are not of type `environment.cron`\nor `environment.backup`.\n", + "x-property-id-kebab": "list-projects-activities", + "x-tag-id-kebab": "Project-Activity", + "x-return-types-displayReturn": true, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Activity[]" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Activity[]" + ], + "x-return-types-union": "array", + "x-description": [ + "Retrieve a project's activity log including logging actions in all environments within a project. This returns a", + "list of objects with records of actions such as: - Commits being pushed to the repository - A new environment", + "being branched out from the specified environment - A snapshot being created of the specified environment The", + "object includes a timestamp of when the action occurred (`created_at`), when the action concluded (`updated_at`),", + "the current `state` of the action, the action's completion percentage (`completion_percent`), the `environments`", + "it applies to and when the activity expires (`expires_at`). There are other related information in the `payload`.", + "The contents of the `payload` varies based on the `type` of the activity. For example: - An `environment.branch`", + "action's `payload` can contain objects representing the environment's `parent` environment and the branching", + "action's `outcome`. - An `environment.push` action's `payload` can contain objects representing the", + "`environment`, the specific `commits` included in the push, and the `user` who pushed. Expired activities are", + "removed from the project activity log, except the last 100 expired objects provided they are not of type", + "`environment.cron` or `environment.backup`." + ] + } + }, + "/projects/{projectId}/activities/{activityId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "activityId" + } + ], + "operationId": "get-projects-activities", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Activity" + } + } + } + } + }, + "tags": [ + "Project Activity" + ], + "summary": "Get a project activity log entry", + "description": "Retrieve a single activity log entry as specified by an\n`id` returned by the\n[Get project activity log](#tag/Project-Activity%2Fpaths%2F~1projects~1%7BprojectId%7D~1activities%2Fget)\nendpoint. See the documentation on that endpoint for details about\nthe information this endpoint can return.\n", + "x-property-id-kebab": "get-projects-activities", + "x-tag-id-kebab": "Project-Activity", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Activity" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Activity" + ], + "x-return-types-union": "\\Upsun\\Model\\Activity", + "x-description": [ + "Retrieve a single activity log entry as specified by an `id` returned by the Get project activity log", + "(https://docs.upsun.com/api/#tag/Project-Activity/paths//projects/{projectId}/activities/get) endpoint. See the", + "documentation on that endpoint for details about the information this endpoint can return." + ] + } + }, + "/projects/{projectId}/activities/{activityId}/cancel": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "activityId" + } + ], + "operationId": "action-projects-activities-cancel", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Project Activity" + ], + "summary": "Cancel a project activity", + "description": "Cancel a single activity as specified by an `id` returned by the\n[Get project activity log](#tag/Project-Activity%2Fpaths%2F~1projects~1%7BprojectId%7D~1activities%2Fget)\nendpoint.\n\nPlease note that not all activities are cancelable.\n", + "x-property-id-kebab": "action-projects-activities-cancel", + "x-tag-id-kebab": "Project-Activity", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-description": [ + "Cancel a single activity as specified by an `id` returned by the Get project activity log", + "(https://docs.upsun.com/api/#tag/Project-Activity/paths//projects/{projectId}/activities/get) endpoint. Please", + "note that not all activities are cancelable." + ] + } + }, + "/projects/{project_id}/invitations": { + "parameters": [ + { + "$ref": "#/components/parameters/ProjectID" + } + ], + "post": { + "summary": "Invite user to a project by email", + "description": "Creates an invitation to a project for a user with the specified email address.", + "operationId": "create-project-invite", + "tags": [ + "Project Invitations" + ], + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectInvitation" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "402": { + "description": "Payment Required when the number of users exceeds the subscription limit", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "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": { + "role": { + "type": "string", + "enum": [ + "admin", + "viewer" + ], + "description": "The role the invitee should be given on the project.", + "default": null + }, + "email": { + "type": "string", + "format": "email", + "description": "The email address of the invitee." + }, + "permissions": { + "type": "array", + "description": "Specifying the role on each environment type.", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "production", + "staging", + "development" + ], + "description": "The environment type." }, - "type": "object", - "additionalProperties": false + "role": { + "type": "string", + "enum": [ + "admin", + "viewer", + "contributor" + ], + "description": "The role the invitee should be given on the environment type." + } + } + } + }, + "environments": { + "deprecated": true, + "type": "array", + "description": "(Deprecated, use permissions instead) Specifying the role on each environment.", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the environment." + }, + "role": { + "type": "string", + "enum": [ + "admin", + "viewer", + "contributor" + ], + "description": "The role the invitee should be given on the environment." + } + } + } + }, + "force": { + "type": "boolean", + "description": "Whether to cancel any pending invitation for the specified invitee, and create a new invitation." + } + }, + "required": [ + "email" + ] + } + } + } + }, + "x-property-id-kebab": "create-project-invite", + "x-tag-id-kebab": "Project-Invitations", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\ProjectInvitation" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\ProjectInvitation" + ], + "x-return-types-union": "\\Upsun\\Model\\ProjectInvitation", + "x-description": [ + "Creates an invitation to a project for a user with the specified email address." + ] + }, + "get": { + "summary": "List invitations to a project", + "description": "Returns a list of invitations to a project.", + "operationId": "list-project-invites", + "tags": [ + "Project 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.
\nUse a dash (\"-\") to sort descending.\n", + "schema": { + "type": "string", + "enum": [ + "updated_at", + "-updated_at" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProjectInvitation" + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "list-project-invites", + "x-tag-id-kebab": "Project-Invitations", + "x-return-types-displayReturn": true, + "x-phpdoc": { + "return": "\\Upsun\\Model\\ProjectInvitation[]" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\ProjectInvitation[]" + ], + "x-return-types-union": "array", + "x-description": [ + "Returns a list of invitations to a project." + ] + } + }, + "/projects/{project_id}/invitations/{invitation_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/ProjectID" + }, + { + "$ref": "#/components/parameters/InvitationID" + } + ], + "delete": { + "summary": "Cancel a pending invitation to a project", + "description": "Cancels the specified invitation.", + "operationId": "cancel-project-invite", + "tags": [ + "Project Invitations" + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found" + } + }, + "x-property-id-kebab": "cancel-project-invite", + "x-tag-id-kebab": "Project-Invitations", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-description": [ + "Cancels the specified invitation." + ] + } + }, + "/projects/{projectId}/settings": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "get-projects-settings", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectSettings" + } + } + } + } + }, + "tags": [ + "Project Settings" + ], + "summary": "Get list of project settings", + "description": "Retrieve the global settings for a project.", + "x-property-id-kebab": "get-projects-settings", + "x-tag-id-kebab": "Project-Settings", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\ProjectSettings" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\ProjectSettings" + ], + "x-return-types-union": "\\Upsun\\Model\\ProjectSettings", + "x-description": [ + "Retrieve the global settings for a project." + ] + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectSettingsPatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "update-projects-settings", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Project Settings" + ], + "summary": "Update a project setting", + "description": "Update one or more project-level settings.", + "x-property-id-kebab": "update-projects-settings", + "x-tag-id-kebab": "Project-Settings", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-description": [ + "Update one or more project-level settings." + ] + } + }, + "/projects/{projectId}/variables": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectVariableCollection" + } + } + } + } + }, + "tags": [ + "Project Variables" + ], + "summary": "Get list of project variables", + "description": "Retrieve a list of objects representing the user-defined variables\nwithin a project.\n", + "x-property-id-kebab": "list-projects-variables", + "x-tag-id-kebab": "Project-Variables", + "x-return-types-displayReturn": true, + "x-phpdoc": { + "return": "\\Upsun\\Model\\ProjectVariable[]" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\ProjectVariable[]" + ], + "x-return-types-union": "array", + "x-description": [ + "Retrieve a list of objects representing the user-defined variables within a project." + ] + }, + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "create-projects-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectVariableCreateInput" + } + } + } + }, + "tags": [ + "Project Variables" + ], + "summary": "Add a project variable", + "description": "Add a variable to a project. The `value` can be either a string or a JSON\nobject (default: string), as specified by the `is_json` boolean flag.\nSee the [Variables](https://docs.upsun.com/anchors/variables/set/project/create/)\nsection in our documentation for more information.\n", + "x-property-id-kebab": "create-projects-variables", + "x-tag-id-kebab": "Project-Variables", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-description": [ + "Add a variable to a project. The `value` can be either a string or a JSON object (default: string), as specified", + "by the `is_json` boolean flag. See the [Variables](https://docs.upsun.com/anchors/variables/set/project/create/)", + "section in our documentation for more information." + ] + } + }, + "/projects/{projectId}/variables/{projectVariableId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectVariableId" + } + ], + "operationId": "get-projects-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectVariable" + } + } + } + } + }, + "tags": [ + "Project Variables" + ], + "summary": "Get a project variable", + "description": "Retrieve a single user-defined project variable.", + "x-property-id-kebab": "get-projects-variables", + "x-tag-id-kebab": "Project-Variables", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\ProjectVariable" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\ProjectVariable" + ], + "x-return-types-union": "\\Upsun\\Model\\ProjectVariable", + "x-description": [ + "Retrieve a single user-defined project variable." + ] + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectVariablePatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectVariableId" + } + ], + "operationId": "update-projects-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Project Variables" + ], + "summary": "Update a project variable", + "description": "Update a single user-defined project variable.\nThe `value` can be either a string or a JSON\nobject (default: string), as specified by the `is_json` boolean flag.\nSee the [Variables](https://docs.upsun.com/anchors/variables/set/project/create/)\nsection in our documentation for more information.\n", + "x-property-id-kebab": "update-projects-variables", + "x-tag-id-kebab": "Project-Variables", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-description": [ + "Update a single user-defined project variable. The `value` can be either a string or a JSON object (default:", + "string), as specified by the `is_json` boolean flag. See the", + "[Variables](https://docs.upsun.com/anchors/variables/set/project/create/) section in our documentation for more", + "information." + ] + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectVariableId" + } + ], + "operationId": "delete-projects-variables", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "tags": [ + "Project Variables" + ], + "summary": "Delete a project variable", + "description": "Delete a single user-defined project variable.", + "x-property-id-kebab": "delete-projects-variables", + "x-tag-id-kebab": "Project-Variables", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", + "x-description": [ + "Delete a single user-defined project variable." + ] + } + }, + "/organizations/{organization_id}/projects/{project_id}/history": { + "get": { + "summary": "List project history", + "description": "Retrieves history records for the specified project, oldest first.", + "operationId": "list-org-project-history", + "tags": [ + "Projects" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/ProjectID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "Total number of items returned." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/History" } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" } }, - "type": "object", - "additionalProperties": false + "additionalProperties": false, + "required": [ + "count", + "items", + "_links" + ] } } } }, - "400": { - "description": "Bad request - Invalid parameters. Please consult the API documentation to fix the request parameters.", + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + }, + "x-property-id-kebab": "list-org-project-history", + "x-tag-id-kebab": "Projects", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "mixed" + ], + "x-return-types-union": "mixed", + "x-description": [ + "Retrieves history records for the specified project, oldest first." + ] + } + }, + "/organizations/{organization_id}/records/plan": { + "get": { + "summary": "List plan records", + "description": "Retrieves plan records for the specified organization.", + "operationId": "list-org-plan-records", + "tags": [ + "Records" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "$ref": "#/components/parameters/filter_subscription_id" + }, + { + "$ref": "#/components/parameters/filter_subscription_plan" + }, + { + "$ref": "#/components/parameters/record_status" + }, + { + "$ref": "#/components/parameters/record_start" + }, + { + "$ref": "#/components/parameters/record_end" + }, + { + "$ref": "#/components/parameters/record_started_at" + }, + { + "$ref": "#/components/parameters/record_ended_at" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "OK", "content": { "application/json": { "schema": { - "required": [ - "type", - "title", - "status", - "violations" - ], + "type": "object", "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." + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PlanRecords" + } }, - "status": { - "description": "HTTP status code", - "type": "integer", - "example": 400 + "_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-property-id-kebab": "list-org-plan-records", + "x-tag-id-kebab": "Records", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "object" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "object" + ], + "x-description": [ + "Retrieves plan records for the specified organization." + ] + } + }, + "/organizations/{organization_id}/records/usage": { + "get": { + "summary": "List usage records", + "description": "Retrieves usage records for the specified organization.", + "operationId": "list-org-usage-records", + "tags": [ + "Records" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "$ref": "#/components/parameters/filter_subscription_id" + }, + { + "$ref": "#/components/parameters/record_usage_group" + }, + { + "$ref": "#/components/parameters/record_start" + }, + { + "$ref": "#/components/parameters/record_started_at" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Usage" + } }, - "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." - } + "_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-property-id-kebab": "list-org-usage-records", + "x-tag-id-kebab": "Records", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "object" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "object" + ], + "x-description": [ + "Retrieves usage records for the specified organization." + ] + } + }, + "/ref/users": { + "get": { + "summary": "List referenced users", + "description": "Retrieves a list of users 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: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 } } - }, - "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.", + "400": { + "description": "Bad Request", "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 + "$ref": "#/components/schemas/Error" } } } } }, - "x-property-id-kebab": "resources_by_service", - "x-tag-id-kebab": "Resources", - "x-return-types-displayReturn": false, - "x-return-types": {}, - "x-phpdoc": {}, + "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 + } + ], + "x-property-id-kebab": "list-referenced-users", + "x-tag-id-kebab": "References", + "x-return-types-displayReturn": true, + "x-phpdoc": { + "return": "array" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "array" + ], + "x-return-types-union": "array", "x-description": [ - "Returns time-series resource data for one service. Each timestamp contains per-instance metrics. Filter results", - "using aggs[] (min, max, avg, stddev, p50, p95-p99) and types[] (cpu, memory, swap, disk, inodes, pressure", - "metrics). Response grouped by timestamp then instance ID (e.g., \"app.0\"). All aggregations nullable when", - "insufficient data exists." + "Retrieves a list of users 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:users:0." ] } }, - "/projects/{projectId}/environments/{environmentId}/observability/server/caches": { + "/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": [ - "Blackfire Monitoring" + "References" ], - "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" + "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" + } + } + } + } + } } }, - { - "name": "environmentId", - "in": "path", - "description": "The environment identifier", - "required": true, - "schema": { - "type": "string", - "pattern": ".+", - "example": "main" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } - }, + } + }, + "parameters": [ { - "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", + "type": "string" + }, "in": "query", - "description": "End timestamp for the time range (Unix timestamp in seconds)", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "example": 1704153600 - } + "name": "in", + "description": "The list of comma-separated team IDs generated by a trusted service.", + "required": true }, { - "name": "grain", - "in": "query", - "description": "Granularity of data points in seconds. Auto-calculated if omitted.", - "required": false, "schema": { - "type": "integer", - "example": 10 - } - }, - { - "name": "contexts[]", + "type": "string" + }, "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": "sig", + "description": "The signature of this request generated by a trusted service.", + "required": true + } + ], + "x-property-id-kebab": "list-referenced-teams", + "x-tag-id-kebab": "References", + "x-return-types-displayReturn": true, + "x-phpdoc": { + "return": "array" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "array" + ], + "x-return-types-union": "array", + "x-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." + ] + } + }, + "/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": [ { - "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" - ] - } + "type": "string" + }, + "in": "query", + "name": "in", + "description": "The list of comma-separated organization IDs generated by a trusted service.", + "required": true }, { - "name": "distribution_cost", - "in": "query", - "description": "Cost distribution dimension for server load distribution.", - "required": false, "schema": { - "type": "string", - "default": null, - "enum": [ - "wt", - "pmu" - ] - } + "type": "string" + }, + "in": "query", + "name": "sig", + "description": "The signature of this request generated by a trusted service.", + "required": true } ], "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" - ] - }, - "_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.", + "description": "OK", "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." - } - } - } - }, + "schema": { "type": "object", - "additionalProperties": false + "description": "A map of referenced organizations indexed by the organization ID.", + "additionalProperties": { + "$ref": "#/components/schemas/OrganizationReference" + } } } } }, - "403": { - "description": "Forbidden - Access denied due to insufficient permissions, or the requested project/environment does not exist (to prevent information disclosure)" + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "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.", + "403": { + "description": "Forbidden", "content": { - "application/json": { + "application/problem+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 + "$ref": "#/components/schemas/Error" } } } } }, - "x-property-id-kebab": "blackfire_php_server_caches", - "x-tag-id-kebab": "Blackfire-Monitoring", - "x-return-types-displayReturn": false, - "x-return-types": {}, - "x-phpdoc": {}, + "x-property-id-kebab": "list-referenced-orgs", + "x-tag-id-kebab": "References", + "x-return-types-displayReturn": true, + "x-phpdoc": { + "return": "array" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "array" + ], + "x-return-types-union": "array", "x-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.)." + "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." ] } }, - "/projects/{projectId}/environments/{environmentId}/observability/server": { + "/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": [ - "Blackfire Monitoring" + "References" ], - "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[]", + "type": "string" + }, "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": "in", + "description": "The list of comma-separated project IDs generated by a trusted service.", + "required": true }, { - "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": "distribution_cost", + "type": "string" + }, "in": "query", - "description": "Cost distribution dimension for server load distribution.", - "required": false, - "schema": { - "type": "string", - "default": null, - "enum": [ - "wt", - "pmu" - ] - } + "name": "sig", + "description": "The signature of this request generated by a trusted service.", + "required": true } - ], - "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" - ] - }, - "_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.", + ], + "responses": { + "200": { + "description": "OK", "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 + "description": "A map of referenced projects indexed by the organization ID.", + "additionalProperties": { + "$ref": "#/components/schemas/ProjectReference" + } } } } }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "403": { - "description": "Forbidden - Access denied due to insufficient permissions, or the requested project/environment does not exist (to prevent information disclosure)" + "$ref": "#/components/responses/Forbidden" }, - "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.", + "404": { + "$ref": "#/components/responses/NotFound" + } + }, + "x-property-id-kebab": "list-referenced-projects", + "x-tag-id-kebab": "References", + "x-return-types-displayReturn": true, + "x-phpdoc": { + "return": "array" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "array" + ], + "x-return-types-union": "array", + "x-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." + ] + } + }, + "/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": { - "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 + "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" } }, - "x-property-id-kebab": "blackfire_server_global", - "x-tag-id-kebab": "Blackfire-Monitoring", - "x-return-types-displayReturn": false, - "x-return-types": {}, - "x-phpdoc": {}, + "x-property-id-kebab": "list-referenced-regions", + "x-tag-id-kebab": "References", + "x-return-types-displayReturn": true, + "x-phpdoc": { + "return": "array" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "array" + ], + "x-return-types-union": "array", "x-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." + "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." ] } }, - "/projects/{projectId}/environments/{environmentId}/observability/server/transactions-break-down": { + "/regions": { "get": { + "summary": "List regions", + "description": "Retrieves a list of available regions.", + "operationId": "list-regions", "tags": [ - "Blackfire Monitoring" + "Regions" ], - "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, + "in": "query", + "name": "filter[available]", + "description": "Allows filtering by `available` using one or more operators.", + "style": "deepObject", + "explode": true, "schema": { - "type": "string", - "pattern": "[a-z0-9]+", - "example": "abc123def456" + "$ref": "#/components/schemas/StringFilter" } }, { - "name": "environmentId", - "in": "path", - "description": "The environment identifier", - "required": true, + "in": "query", + "name": "filter[private]", + "description": "Allows filtering by `private` using one or more operators.", + "style": "deepObject", + "explode": true, "schema": { - "type": "string", - "pattern": ".+", - "example": "main" + "$ref": "#/components/schemas/StringFilter" } }, { - "name": "from", "in": "query", - "description": "Start timestamp for the time range (Unix timestamp in seconds)", - "required": true, + "name": "filter[zone]", + "description": "Allows filtering by `zone` using one or more operators.", + "style": "deepObject", + "explode": true, "schema": { - "type": "integer", - "format": "int64", - "example": 1704067200 + "$ref": "#/components/schemas/StringFilter" } }, { - "name": "to", - "in": "query", - "description": "End timestamp for the time range (Unix timestamp in seconds)", - "required": true, - "schema": { - "type": "integer", - "format": "int64", - "example": 1704153600 - } + "$ref": "#/components/parameters/PageSize" }, { - "name": "grain", - "in": "query", - "description": "Granularity of data points in seconds. Auto-calculated if omitted.", - "required": false, - "schema": { - "type": "integer", - "example": 10 - } + "$ref": "#/components/parameters/PageBefore" }, { - "name": "breakdown_dimension", - "in": "query", - "description": "Dimension for transaction breakdown calculations.", - "required": false, - "schema": { - "type": "string", - "default": null, - "enum": [ - "wt", - "pmu", - "stdout" - ] - } + "$ref": "#/components/parameters/PageAfter" }, { - "name": "sort", "in": "query", - "description": "Sort order for the transaction breakdown.", - "required": false, + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `id`, `created_at`, `updated_at`.\n", "schema": { "type": "string", - "default": null, - "enum": [ - "impact", - "total_requests", - "avg_wt", - "avg_pmu", - "avg_stdout", - "total_errors", - "wt_96th_percentile" - ] + "example": "-updated_at" } - }, - { - "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 + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "Total number of items across pages." + }, + "regions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Region" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + }, + "additionalProperties": false + } + } } }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + }, + "x-property-id-kebab": "list-regions", + "x-tag-id-kebab": "Regions", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "mixed" + ], + "x-return-types-union": "mixed", + "x-description": [ + "Retrieves a list of available regions." + ] + } + }, + "/regions/{region_id}": { + "get": { + "summary": "Get region", + "description": "Retrieves the specified region.", + "operationId": "get-region", + "tags": [ + "Regions" + ], + "parameters": [ { - "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" - ] + "$ref": "#/components/parameters/RegionID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Region" + } } } }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + }, + "x-property-id-kebab": "get-region", + "x-tag-id-kebab": "Regions", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Region" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Region" + ], + "x-return-types-union": "\\Upsun\\Model\\Region", + "x-description": [ + "Retrieves the specified region." + ] + } + }, + "/projects/{projectId}/oci-registries": { + "get": { + "parameters": [ { - "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, + "in": "path", + "required": true, "schema": { - "type": "string", - "example": "1", - "default": null, - "enum": [ - "1", - "-1" - ] + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-oci-registries", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegistryCredentialCollection" + } + } } - }, + } + }, + "tags": [ + "RegistryCredential" + ], + "x-property-id-kebab": "list-projects-oci-registries", + "x-tag-id-kebab": "RegistryCredential", + "x-return-types-displayReturn": true, + "x-phpdoc": { + "return": "\\Upsun\\Model\\RegistryCredential[]" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\RegistryCredential[]" + ], + "x-return-types-union": "array" + }, + "post": { + "parameters": [ { - "name": "transactions[]", - "in": "query", - "description": "Filter by transaction names", - "required": false, - "style": "form", - "explode": true, + "in": "path", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string", - "example": "App\\Controller::index" + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "create-projects-oci-registries", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } } } - }, + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegistryCredentialCreateInput" + } + } + } + }, + "tags": [ + "RegistryCredential" + ], + "x-property-id-kebab": "create-projects-oci-registries", + "x-tag-id-kebab": "RegistryCredential", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse" + } + }, + "/projects/{projectId}/oci-registries/{registryCredentialId}": { + "get": { + "parameters": [ { - "name": "transactions_mode", - "in": "query", - "description": "Filter mode for transactions parameter. \"1\" (additive) includes only specified transactions. \"-1\" (subtractive, default) excludes specified transactions and includes all others.", - "required": false, + "in": "path", + "required": true, "schema": { - "type": "string", - "example": "1", - "default": null, - "enum": [ - "1", - "-1" - ] - } + "type": "string" + }, + "name": "projectId" }, { - "name": "wt_slots[]", - "in": "query", - "description": "Filter by wall-time distribution slots", - "required": false, - "style": "form", - "explode": true, + "in": "path", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string", - "example": "0-50" + "type": "string" + }, + "name": "registryCredentialId" + } + ], + "operationId": "get-projects-oci-registries", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegistryCredential" + } + } + } + } + }, + "tags": [ + "RegistryCredential" + ], + "x-property-id-kebab": "get-projects-oci-registries", + "x-tag-id-kebab": "RegistryCredential", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\RegistryCredential" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\RegistryCredential" + ], + "x-return-types-union": "\\Upsun\\Model\\RegistryCredential" + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegistryCredentialPatch" } } - }, + } + }, + "parameters": [ { - "name": "wt_slots_mode", - "in": "query", - "description": "Filter mode for wt_slots parameter. \"1\" (additive) includes only specified wt_slots. \"-1\" (subtractive, default) excludes specified wt_slots and includes all others.", - "required": false, + "in": "path", + "required": true, "schema": { - "type": "string", - "example": "1", - "default": null, - "enum": [ - "1", - "-1" - ] - } + "type": "string" + }, + "name": "projectId" }, { - "name": "pmu_slots[]", - "in": "query", - "description": "Filter by peak memory usage distribution slots", - "required": false, - "style": "form", - "explode": true, + "in": "path", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string", - "example": "0-8" + "type": "string" + }, + "name": "registryCredentialId" + } + ], + "operationId": "update-projects-oci-registries", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } } } - }, + } + }, + "tags": [ + "RegistryCredential" + ], + "x-property-id-kebab": "update-projects-oci-registries", + "x-tag-id-kebab": "RegistryCredential", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse" + }, + "delete": { + "parameters": [ { - "name": "pmu_slots_mode", - "in": "query", - "description": "Filter mode for pmu_slots parameter. \"1\" (additive) includes only specified pmu_slots. \"-1\" (subtractive, default) excludes specified pmu_slots and includes all others.", - "required": false, + "in": "path", + "required": true, "schema": { - "type": "string", - "example": "1", - "default": null, - "enum": [ - "1", - "-1" - ] - } + "type": "string" + }, + "name": "projectId" }, { - "name": "http_status_codes[]", - "in": "query", - "description": "Filter by HTTP status codes or ranges (e.g., 200, 5xx)", - "required": false, - "style": "form", - "explode": true, + "in": "path", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string", - "example": "200" + "type": "string" + }, + "name": "registryCredentialId" + } + ], + "operationId": "delete-projects-oci-registries", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } } } - }, + } + }, + "tags": [ + "RegistryCredential" + ], + "x-property-id-kebab": "delete-projects-oci-registries", + "x-tag-id-kebab": "RegistryCredential", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse" + } + }, + "/projects/{projectId}/git/blobs/{repositoryBlobId}": { + "get": { + "parameters": [ { - "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, default) excludes specified http_status_codes and includes all others.", - "required": false, + "in": "path", + "required": true, "schema": { - "type": "string", - "example": "1", - "default": null, - "enum": [ - "1", - "-1" - ] - } + "type": "string" + }, + "name": "projectId" }, { - "name": "http_hosts[]", - "in": "query", - "description": "Filter by HTTP hosts", - "required": false, - "style": "form", - "explode": true, + "in": "path", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string", - "example": "api.example.com" + "type": "string" + }, + "name": "repositoryBlobId" + } + ], + "operationId": "get-projects-git-blobs", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Blob" + } } } - }, + } + }, + "tags": [ + "Repository" + ], + "summary": "Get a blob object", + "description": "Retrieve, by hash, an object representing a blob in the repository\nbacking a project. This endpoint allows direct read-only access\nto the contents of files in a repo. It returns the file in the\n`content` field of the response object, encoded according to the\nformat in the `encoding` field, e.g. `base64`.\n", + "x-property-id-kebab": "get-projects-git-blobs", + "x-tag-id-kebab": "Repository", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Blob" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Blob" + ], + "x-return-types-union": "\\Upsun\\Model\\Blob", + "x-description": [ + "Retrieve, by hash, an object representing a blob in the repository backing a project. This endpoint allows direct", + "read-only access to the contents of files in a repo. It returns the file in the `content` field of the response", + "object, encoded according to the format in the `encoding` field, e.g. `base64`." + ] + } + }, + "/projects/{projectId}/git/commits/{repositoryCommitId}": { + "get": { + "parameters": [ { - "name": "http_hosts_mode", - "in": "query", - "description": "Filter mode for http_hosts parameter. \"1\" (additive) includes only specified http_hosts. \"-1\" (subtractive, default) excludes specified http_hosts and includes all others.", - "required": false, + "in": "path", + "required": true, "schema": { - "type": "string", - "example": "1", - "default": null, - "enum": [ - "1", - "-1" - ] - } + "type": "string" + }, + "name": "projectId" }, { - "name": "hosts[]", - "in": "query", - "description": "Filter by server hosts", - "required": false, - "style": "form", - "explode": true, + "in": "path", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string", - "example": "frontend-0.prod" + "type": "string" + }, + "name": "repositoryCommitId" + } + ], + "operationId": "get-projects-git-commits", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Commit" + } } } - }, + } + }, + "tags": [ + "Repository" + ], + "summary": "Get a commit object", + "description": "Retrieve, by hash, an object representing a commit in the repository backing\na project. This endpoint functions similarly to `git cat-file -p `.\nThe returned object contains the hash of the Git tree that it\nbelongs to, as well as the ID of parent commits.\n\nThe commit represented by a parent ID can be retrieved using this\nendpoint, while the tree state represented by this commit can\nbe retrieved using the\n[Get a tree object](#tag/Git-Repo%2Fpaths%2F~1projects~1%7BprojectId%7D~1git~1trees~1%7BrepositoryTreeId%7D%2Fget)\nendpoint.\n", + "x-property-id-kebab": "get-projects-git-commits", + "x-tag-id-kebab": "Repository", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Commit" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Commit" + ], + "x-return-types-union": "\\Upsun\\Model\\Commit", + "x-description": [ + "Retrieve, by hash, an object representing a commit in the repository backing a project. This endpoint functions", + "similarly to `git cat-file -p `. The returned object contains the hash of the Git tree that it belongs", + "to, as well as the ID of parent commits. The commit represented by a parent ID can be retrieved using this", + "endpoint, while the tree state represented by this commit can be retrieved using the Get a tree object", + "(https://docs.upsun.com/api/#tag/Git-Repo/paths//projects/{projectId}/git/trees/{repositoryTreeId}/get) endpoint." + ] + } + }, + "/projects/{projectId}/git/refs": { + "get": { + "parameters": [ { - "name": "hosts_mode", - "in": "query", - "description": "Filter mode for hosts parameter. \"1\" (additive) includes only specified hosts. \"-1\" (subtractive, default) excludes specified hosts and includes all others.", - "required": false, + "in": "path", + "required": true, "schema": { - "type": "string", - "example": "1", - "default": null, - "enum": [ - "1", - "-1" - ] + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-git-refs", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RefCollection" + } + } } + } + }, + "tags": [ + "Repository" + ], + "summary": "Get list of repository refs", + "description": "Retrieve a list of `refs/*` in the repository backing a project.\nThis endpoint functions similarly to `git show-ref`, with each\nreturned object containing a `ref` field with the ref's name,\nand an object containing the associated commit ID.\n\nThe returned commit ID can be used with the\n[Get a commit object](#tag/Git-Repo%2Fpaths%2F~1projects~1%7BprojectId%7D~1git~1commits~1%7BrepositoryCommitId%7D%2Fget)\nendpoint to retrieve information about that specific commit.\n", + "x-property-id-kebab": "list-projects-git-refs", + "x-tag-id-kebab": "Repository", + "x-return-types-displayReturn": true, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Ref[]" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Ref[]" + ], + "x-return-types-union": "array", + "x-description": [ + "Retrieve a list of `refs/*` in the repository backing a project. This endpoint functions similarly to `git", + "show-ref`, with each returned object containing a `ref` field with the ref's name, and an object containing the", + "associated commit ID. The returned commit ID can be used with the Get a commit object", + "(https://docs.upsun.com/api/#tag/Git-Repo/paths//projects/{projectId}/git/commits/{repositoryCommitId}/get)", + "endpoint to retrieve information about that specific commit." + ] + } + }, + "/projects/{projectId}/git/refs/{repositoryRefId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" }, { - "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, + "in": "path", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string", - "example": "symfony" + "type": "string" + }, + "name": "repositoryRefId" + } + ], + "operationId": "get-projects-git-refs", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Ref" + } } } - }, + } + }, + "tags": [ + "Repository" + ], + "summary": "Get a ref object", + "description": "Retrieve the details of a single `refs` object in the repository\nbacking a project. This endpoint functions similarly to\n`git show-ref `, although the pattern must be a full ref `id`,\nrather than a matching pattern.\n\n*NOTE: The `{repositoryRefId}` must be properly escaped.*\nThat is, the ref `refs/heads/master` is accessible via\n`/projects/{projectId}/git/refs/heads%2Fmaster`.\n", + "x-property-id-kebab": "get-projects-git-refs", + "x-tag-id-kebab": "Repository", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Ref" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Ref" + ], + "x-return-types-union": "\\Upsun\\Model\\Ref", + "x-description": [ + "Retrieve the details of a single `refs` object in the repository backing a project. This endpoint functions", + "similarly to `git show-ref `, although the pattern must be a full ref `id`, rather than a matching", + "pattern. *NOTE: The `{repositoryRefId}` must be properly escaped.* That is, the ref `refs/heads/master` is", + "accessible via `/projects/{projectId}/git/refs/heads/master`." + ] + } + }, + "/projects/{projectId}/git/trees/{repositoryTreeId}": { + "get": { + "parameters": [ { - "name": "frameworks_mode", - "in": "query", - "description": "Filter mode for frameworks parameter. \"1\" (additive) includes only specified frameworks. \"-1\" (subtractive, default) excludes specified frameworks and includes all others.", - "required": false, + "in": "path", + "required": true, "schema": { - "type": "string", - "example": "1", - "default": null, - "enum": [ - "1", - "-1" - ] - } + "type": "string" + }, + "name": "projectId" }, { - "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, + "in": "path", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string", - "example": "php" + "type": "string" + }, + "name": "repositoryTreeId" + } + ], + "operationId": "get-projects-git-trees", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tree" + } } } - }, + } + }, + "tags": [ + "Repository" + ], + "summary": "Get a tree object", + "description": "Retrieve, by hash, the tree state represented by a commit.\nThe returned object's `tree` field contains a list of files and\ndirectories present in the tree.\n\nDirectories in the tree can be recursively retrieved by this endpoint\nthrough their hashes. Files in the tree can be retrieved by the\n[Get a blob object](#tag/Git-Repo%2Fpaths%2F~1projects~1%7BprojectId%7D~1git~1blobs~1%7BrepositoryBlobId%7D%2Fget)\nendpoint.\n", + "x-property-id-kebab": "get-projects-git-trees", + "x-tag-id-kebab": "Repository", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Tree" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Tree" + ], + "x-return-types-union": "\\Upsun\\Model\\Tree", + "x-description": [ + "Retrieve, by hash, the tree state represented by a commit. The returned object's `tree` field contains a list of", + "files and directories present in the tree. Directories in the tree can be recursively retrieved by this endpoint", + "through their hashes. Files in the tree can be retrieved by the Get a blob object", + "(https://docs.upsun.com/api/#tag/Git-Repo/paths//projects/{projectId}/git/blobs/{repositoryBlobId}/get) endpoint." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/observability/resources/overview": { + "get": { + "tags": [ + "Resources" + ], + "summary": "Get resource metrics overview", + "description": "Returns time-series resource utilization data for all services. Each timestamp includes per-service metrics: CPU (cores), memory (bytes), swap (bytes), pressure indicators (0.0-1.0), and per-mountpoint disk/inode usage. All metrics include statistical aggregations: min, max, avg, stddev, and percentiles (p50, p95-p99). Service names and mountpoint paths are dynamic. Aggregation values are nullable when insufficient data exists.", + "operationId": "resources_overview", + "parameters": [ { - "name": "languages_mode", - "in": "query", - "description": "Filter mode for languages parameter. \"1\" (additive) includes only specified languages. \"-1\" (subtractive, default) excludes specified languages and includes all others.", - "required": false, + "name": "projectId", + "in": "path", + "description": "The unique identifier of the Upsun project", + "required": true, "schema": { "type": "string", - "example": "1", - "default": null, - "enum": [ - "1", - "-1" - ] + "pattern": "[a-z0-9]+", + "example": "abc123def456" } }, { - "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, + "name": "environmentId", + "in": "path", + "description": "The environment identifier", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string", - "example": "get" - } + "type": "string", + "pattern": ".+", + "example": "main" } }, { - "name": "methods_mode", + "name": "from", "in": "query", - "description": "Filter mode for methods parameter. \"1\" (additive) includes only specified methods. \"-1\" (subtractive, default) excludes specified methods and includes all others.", - "required": false, + "description": "Start timestamp for the time range (Unix timestamp in seconds)", + "required": true, "schema": { - "type": "string", - "example": "1", - "default": null, - "enum": [ - "1", - "-1" - ] + "type": "integer", + "format": "int64", + "example": 1704067200 } }, { - "name": "runtimes[]", + "name": "to", "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, + "description": "End timestamp for the time range (Unix timestamp in seconds)", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string", - "example": "PHP 8.4.17 (fpm-fcgi)" - } + "type": "integer", + "format": "int64", + "example": 1704153600 } }, { - "name": "runtimes_mode", + "name": "service", "in": "query", - "description": "Filter mode for runtimes parameter. \"1\" (additive) includes only specified runtimes. \"-1\" (subtractive, default) excludes specified runtimes and includes all others.", + "description": "Filter by specific service name (optional)", "required": false, "schema": { "type": "string", - "example": "1", - "default": null, - "enum": [ - "1", - "-1" - ] + "example": "app" } }, { - "name": "oss[]", + "name": "services[]", "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.", + "description": "Filter results to specific services. Can be specified multiple times for multiple services. When omitted, all services are included by default. Use services_mode to control inclusion/exclusion behavior. Specify parameter multiple times for multiple values (e.g., ?services[]=app&services[]=database).", "required": false, "style": "form", "explode": true, @@ -22057,14 +21427,14 @@ "type": "array", "items": { "type": "string", - "example": "Linux" + "example": "app" } } }, { - "name": "oss_mode", + "name": "services_mode", "in": "query", - "description": "Filter mode for oss parameter. \"1\" (additive) includes only specified operating systems. \"-1\" (subtractive, default) excludes specified operating systems and includes all others.", + "description": "Filter mode for services parameter. \"1\" (additive) includes only specified services. \"-1\" (subtractive, default) excludes specified services and includes all others.", "required": false, "schema": { "type": "string", @@ -22075,25 +21445,11 @@ "-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", + "description": "Resource metrics retrieved successfully", "content": { "application/json": { "schema": { @@ -22101,16 +21457,10 @@ "_grain", "_from", "_to", - "_agent", "_project_id", "_environment_id", "_branch_machine_name", - "_breakdown_dimension", - "_sort", - "_breakdown_limit", - "_breakdown_top_hits", - "transactions", - "top_hits_timeline" + "data" ], "properties": { "_grain": { @@ -22128,12 +21478,6 @@ "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", @@ -22149,627 +21493,1090 @@ "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" - ] - }, - "_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", + "data": { + "description": "Array of timestamped data points, each containing resource metrics grouped by service name. 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": { - "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 + "required": [ + "timestamp" + ], + "properties": { + "timestamp": { + "description": "Data point timestamp (Unix timestamp in seconds)", + "type": "integer", + "example": 1704067200 + }, + "services": { + "description": "Object with service names as keys (dynamic, e.g., \"app\", \"database\"). Each service contains: cpu_used, cpu_limit, memory_used, memory_limit, swap_used, swap_limit, memory_pressure, cpu_pressure, io_pressure, irq_pressure, and mountpoints. All metrics except limits include min, max, avg, stddev, p50, p95-p99 aggregations (nullable).", + "type": "object", + "example": { + "app": { + "cpu_used": { + "min": 0.12, + "max": 1.85, + "avg": 0.45, + "stddev": 0.32, + "p50": 0.42, + "p95": 1.23, + "p96": 1.34, + "p97": 1.45, + "p98": 1.62, + "p99": 1.78 + }, + "cpu_limit": { + "max": 2 + }, + "memory_used": { + "min": 536870912, + "max": 715827883, + "avg": 612892672, + "stddev": 45000000, + "p50": 605000000, + "p95": 690000000, + "p96": 695000000, + "p97": 700000000, + "p98": 708000000, + "p99": 712000000 + }, + "memory_limit": { + "max": 1073741824 + }, + "swap_used": { + "min": 0, + "max": 4194304, + "avg": 1048576, + "stddev": 850000, + "p50": 950000, + "p95": 3200000, + "p96": 3400000, + "p97": 3600000, + "p98": 3900000, + "p99": 4100000 + }, + "swap_limit": { + "max": 536870912 + }, + "memory_pressure": { + "min": 0, + "max": 0.15, + "avg": 0.03, + "stddev": 0.02, + "p50": 0.02, + "p95": 0.12, + "p96": 0.13, + "p97": 0.14, + "p98": 0.145, + "p99": 0.148 + }, + "cpu_pressure": { + "min": 0, + "max": 0.08, + "avg": 0.01, + "stddev": 0.01, + "p50": 0.01, + "p95": 0.05, + "p96": 0.06, + "p97": 0.065, + "p98": 0.07, + "p99": 0.075 + }, + "io_pressure": { + "min": 0, + "max": 0.22, + "avg": 0.05, + "stddev": 0.04, + "p50": 0.04, + "p95": 0.18, + "p96": 0.19, + "p97": 0.2, + "p98": 0.21, + "p99": 0.215 + }, + "irq_pressure": { + "min": 0, + "max": 0.01, + "avg": 0.001, + "stddev": 0.002, + "p50": 0, + "p95": 0.008, + "p96": 0.009, + "p97": 0.0095, + "p98": 0.0097, + "p99": 0.0099 + }, + "mountpoints": { + "": { + "disk_used": { + "min": 3087007744, + "max": 3221225472, + "avg": 3154116608, + "stddev": 35000000, + "p50": 3150000000, + "p95": 3210000000, + "p96": 3215000000, + "p97": 3217000000, + "p98": 3219000000, + "p99": 3220000000 + }, + "disk_limit": { + "max": 10737418240 + }, + "inodes_used": { + "min": 45000, + "max": 52000, + "avg": 48500, + "stddev": 1500, + "p50": 48400, + "p95": 51200, + "p96": 51400, + "p97": 51600, + "p98": 51800, + "p99": 51900 + }, + "inodes_limit": { + "max": 655360 + } + }, + "/tmp": { + "disk_used": { + "min": 524288, + "max": 2097152, + "avg": 1310720, + "stddev": 400000, + "p50": 1300000, + "p95": 1900000, + "p96": 1950000, + "p97": 2000000, + "p98": 2050000, + "p99": 2080000 + }, + "disk_limit": { + "max": 1073741824 + }, + "inodes_used": { + "min": 120, + "max": 245, + "avg": 182, + "stddev": 25, + "p50": 180, + "p95": 230, + "p96": 235, + "p97": 238, + "p98": 242, + "p99": 244 + }, + "inodes_limit": { + "max": 65536 + } + } + } }, - "_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" - } + "database": { + "cpu_used": { + "min": 0.08, + "max": 2.45, + "avg": 0.62, + "stddev": 0.48, + "p50": 0.55, + "p95": 1.85, + "p96": 2.02, + "p97": 2.15, + "p98": 2.28, + "p99": 2.38 + }, + "cpu_limit": { + "max": 4 + }, + "memory_used": { + "min": 1073741824, + "max": 1610612736, + "avg": 1342177280, + "stddev": 120000000, + "p50": 1320000000, + "p95": 1550000000, + "p96": 1570000000, + "p97": 1585000000, + "p98": 1598000000, + "p99": 1606000000 + }, + "memory_limit": { + "max": 2147483648 + }, + "swap_used": { + "min": 0, + "max": 8388608, + "avg": 2097152, + "stddev": 1800000, + "p50": 1900000, + "p95": 6500000, + "p96": 7100000, + "p97": 7500000, + "p98": 7900000, + "p99": 8200000 + }, + "swap_limit": { + "max": 1073741824 + }, + "memory_pressure": { + "min": 0, + "max": 0.25, + "avg": 0.06, + "stddev": 0.05, + "p50": 0.05, + "p95": 0.2, + "p96": 0.21, + "p97": 0.22, + "p98": 0.23, + "p99": 0.24 + }, + "cpu_pressure": { + "min": 0, + "max": 0.12, + "avg": 0.02, + "stddev": 0.02, + "p50": 0.02, + "p95": 0.09, + "p96": 0.1, + "p97": 0.105, + "p98": 0.11, + "p99": 0.115 + }, + "io_pressure": { + "min": 0, + "max": 0.45, + "avg": 0.12, + "stddev": 0.09, + "p50": 0.1, + "p95": 0.35, + "p96": 0.38, + "p97": 0.4, + "p98": 0.42, + "p99": 0.44 + }, + "irq_pressure": { + "min": 0, + "max": 0.02, + "avg": 0.003, + "stddev": 0.004, + "p50": 0.002, + "p95": 0.015, + "p96": 0.017, + "p97": 0.018, + "p98": 0.019, + "p99": 0.0195 + }, + "mountpoints": { + "": { + "disk_used": { + "min": 8589934592, + "max": 9663676416, + "avg": 9126805504, + "stddev": 250000000, + "p50": 9100000000, + "p95": 9550000000, + "p96": 9580000000, + "p97": 9610000000, + "p98": 9640000000, + "p99": 9660000000 + }, + "disk_limit": { + "max": 21474836480 + }, + "inodes_used": { + "min": 125000, + "max": 145000, + "avg": 135000, + "stddev": 4500, + "p50": 134500, + "p95": 142800, + "p96": 143400, + "p97": 144000, + "p98": 144500, + "p99": 144800 + }, + "inodes_limit": { + "max": 1310720 + } + } + } + } + }, + "additionalProperties": { + "properties": { + "cpu_used": { + "description": "CPU usage in cores. Includes statistical aggregations (all nullable): min, max, avg, stddev, p50, p95, p96, p97, p98, p99", + "properties": { + "min": { + "description": "Minimum CPU cores used", + "type": "number", + "format": "float", + "example": 0.12, + "nullable": true + }, + "max": { + "description": "Maximum CPU cores used", + "type": "number", + "format": "float", + "example": 1.85, + "nullable": true + }, + "avg": { + "description": "Average CPU cores used", + "type": "number", + "format": "float", + "example": 0.45, + "nullable": true + }, + "stddev": { + "description": "Standard deviation of CPU cores used", + "type": "number", + "format": "float", + "example": 0.32, + "nullable": true + }, + "p50": { + "description": "Median (50th percentile) CPU cores used", + "type": "number", + "format": "float", + "example": 0.42, + "nullable": true + }, + "p95": { + "description": "95th percentile CPU cores used", + "type": "number", + "format": "float", + "example": 1.23, + "nullable": true + }, + "p96": { + "description": "96th percentile CPU cores used", + "type": "number", + "format": "float", + "example": 1.34, + "nullable": true + }, + "p97": { + "description": "97th percentile CPU cores used", + "type": "number", + "format": "float", + "example": 1.45, + "nullable": true + }, + "p98": { + "description": "98th percentile CPU cores used", + "type": "number", + "format": "float", + "example": 1.62, + "nullable": true + }, + "p99": { + "description": "99th percentile CPU cores used", + "type": "number", + "format": "float", + "example": 1.78, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "cpu_limit": { + "description": "CPU limit in cores. Contains only max (nullable)", + "properties": { + "max": { + "description": "Maximum CPU limit in cores", + "type": "number", + "format": "float", + "example": 2, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "memory_used": { + "description": "Memory usage in bytes. Includes statistical aggregations (all nullable): min, max, avg, stddev, p50, p95, p96, p97, p98, p99", + "properties": { + "min": { + "description": "Minimum memory bytes used", + "type": "integer", + "format": "int64", + "example": 536870912, + "nullable": true + }, + "max": { + "description": "Maximum memory bytes used", + "type": "integer", + "format": "int64", + "example": 715827883, + "nullable": true + }, + "avg": { + "description": "Average memory bytes used", + "type": "number", + "format": "float", + "example": 612892672, + "nullable": true + }, + "stddev": { + "description": "Standard deviation of memory bytes used", + "type": "number", + "format": "float", + "example": 45000000, + "nullable": true + }, + "p50": { + "description": "Median (50th percentile) memory bytes used", + "type": "number", + "format": "float", + "example": 605000000, + "nullable": true + }, + "p95": { + "description": "95th percentile memory bytes used", + "type": "number", + "format": "float", + "example": 690000000, + "nullable": true + }, + "p96": { + "description": "96th percentile memory bytes used", + "type": "number", + "format": "float", + "example": 695000000, + "nullable": true + }, + "p97": { + "description": "97th percentile memory bytes used", + "type": "number", + "format": "float", + "example": 700000000, + "nullable": true + }, + "p98": { + "description": "98th percentile memory bytes used", + "type": "number", + "format": "float", + "example": 708000000, + "nullable": true + }, + "p99": { + "description": "99th percentile memory bytes used", + "type": "number", + "format": "float", + "example": 712000000, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "memory_limit": { + "description": "Memory limit in bytes. Contains only max (nullable)", + "properties": { + "max": { + "description": "Maximum memory limit in bytes", + "type": "integer", + "format": "int64", + "example": 1073741824, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "swap_used": { + "description": "Swap usage in bytes. Includes statistical aggregations (all nullable): min, max, avg, stddev, p50, p95, p96, p97, p98, p99", + "properties": { + "min": { + "description": "Minimum swap bytes used", + "type": "integer", + "format": "int64", + "example": 0, + "nullable": true + }, + "max": { + "description": "Maximum swap bytes used", + "type": "integer", + "format": "int64", + "example": 4194304, + "nullable": true + }, + "avg": { + "description": "Average swap bytes used", + "type": "number", + "format": "float", + "example": 1048576, + "nullable": true + }, + "stddev": { + "description": "Standard deviation of swap bytes used", + "type": "number", + "format": "float", + "example": 850000, + "nullable": true + }, + "p50": { + "description": "Median (50th percentile) swap bytes used", + "type": "number", + "format": "float", + "example": 950000, + "nullable": true + }, + "p95": { + "description": "95th percentile swap bytes used", + "type": "number", + "format": "float", + "example": 3200000, + "nullable": true + }, + "p96": { + "description": "96th percentile swap bytes used", + "type": "number", + "format": "float", + "example": 3400000, + "nullable": true + }, + "p97": { + "description": "97th percentile swap bytes used", + "type": "number", + "format": "float", + "example": 3600000, + "nullable": true + }, + "p98": { + "description": "98th percentile swap bytes used", + "type": "number", + "format": "float", + "example": 3900000, + "nullable": true + }, + "p99": { + "description": "99th percentile swap bytes used", + "type": "number", + "format": "float", + "example": 4100000, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "swap_limit": { + "description": "Swap limit in bytes. Contains only max (nullable)", + "properties": { + "max": { + "description": "Maximum swap limit in bytes", + "type": "integer", + "format": "int64", + "example": 536870912, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "memory_pressure": { + "description": "Memory pressure stall indicator (0.0-1.0). Includes statistical aggregations (all nullable): min, max, avg, stddev, p50, p95, p96, p97, p98, p99", + "properties": { + "min": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true }, - "type": "object", - "additionalProperties": false + "max": { + "type": "number", + "format": "float", + "example": 0.15, + "nullable": true + }, + "avg": { + "type": "number", + "format": "float", + "example": 0.03, + "nullable": true + }, + "stddev": { + "type": "number", + "format": "float", + "example": 0.02, + "nullable": true + }, + "p50": { + "type": "number", + "format": "float", + "example": 0.02, + "nullable": true + }, + "p95": { + "type": "number", + "format": "float", + "example": 0.12, + "nullable": true + }, + "p96": { + "type": "number", + "format": "float", + "example": 0.13, + "nullable": true + }, + "p97": { + "type": "number", + "format": "float", + "example": 0.14, + "nullable": true + }, + "p98": { + "type": "number", + "format": "float", + "example": 0.145, + "nullable": true + }, + "p99": { + "type": "number", + "format": "float", + "example": 0.148, + "nullable": true + } }, - "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 + }, + "cpu_pressure": { + "description": "CPU pressure stall indicator (0.0-1.0). Includes statistical aggregations (all nullable): min, max, avg, stddev, p50, p95, p96, p97, p98, p99", + "properties": { + "min": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true }, - "type": "object", - "additionalProperties": false + "max": { + "type": "number", + "format": "float", + "example": 0.08, + "nullable": true + }, + "avg": { + "type": "number", + "format": "float", + "example": 0.01, + "nullable": true + }, + "stddev": { + "type": "number", + "format": "float", + "example": 0.01, + "nullable": true + }, + "p50": { + "type": "number", + "format": "float", + "example": 0.01, + "nullable": true + }, + "p95": { + "type": "number", + "format": "float", + "example": 0.05, + "nullable": true + }, + "p96": { + "type": "number", + "format": "float", + "example": 0.06, + "nullable": true + }, + "p97": { + "type": "number", + "format": "float", + "example": 0.065, + "nullable": true + }, + "p98": { + "type": "number", + "format": "float", + "example": 0.07, + "nullable": true + }, + "p99": { + "type": "number", + "format": "float", + "example": 0.075, + "nullable": true + } }, - "profiles": { - "description": "Link to profiles filtered by this transaction", - "required": [ - "href" - ], + "type": "object", + "additionalProperties": false + }, + "io_pressure": { + "description": "I/O pressure stall indicator (0.0-1.0). Includes statistical aggregations (all nullable): min, max, avg, stddev, p50, p95, p96, p97, p98, p99", + "properties": { + "min": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "max": { + "type": "number", + "format": "float", + "example": 0.22, + "nullable": true + }, + "avg": { + "type": "number", + "format": "float", + "example": 0.05, + "nullable": true + }, + "stddev": { + "type": "number", + "format": "float", + "example": 0.04, + "nullable": true + }, + "p50": { + "type": "number", + "format": "float", + "example": 0.04, + "nullable": true + }, + "p95": { + "type": "number", + "format": "float", + "example": 0.18, + "nullable": true + }, + "p96": { + "type": "number", + "format": "float", + "example": 0.19, + "nullable": true + }, + "p97": { + "type": "number", + "format": "float", + "example": 0.2, + "nullable": true + }, + "p98": { + "type": "number", + "format": "float", + "example": 0.21, + "nullable": true + }, + "p99": { + "type": "number", + "format": "float", + "example": 0.215, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "irq_pressure": { + "description": "IRQ pressure stall indicator (0.0-1.0). Includes statistical aggregations (all nullable): min, max, avg, stddev, p50, p95, p96, p97, p98, p99", + "properties": { + "min": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "max": { + "type": "number", + "format": "float", + "example": 0.01, + "nullable": true + }, + "avg": { + "type": "number", + "format": "float", + "example": 0.001, + "nullable": true + }, + "stddev": { + "type": "number", + "format": "float", + "example": 0.002, + "nullable": true + }, + "p50": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "p95": { + "type": "number", + "format": "float", + "example": 0.008, + "nullable": true + }, + "p96": { + "type": "number", + "format": "float", + "example": 0.009, + "nullable": true + }, + "p97": { + "type": "number", + "format": "float", + "example": 0.0095, + "nullable": true + }, + "p98": { + "type": "number", + "format": "float", + "example": 0.0097, + "nullable": true + }, + "p99": { + "type": "number", + "format": "float", + "example": 0.0099, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "mountpoints": { + "description": "Object with mountpoint paths as keys (dynamic, e.g., \"\", \"/tmp\", \"/mnt\"). Each mountpoint contains: disk_used, disk_limit, inodes_used, inodes_limit. All metrics except limits include min, max, avg, stddev, p50, p95-p99 aggregations (nullable).", + "type": "object", + "additionalProperties": { "properties": { - "href": { - "type": "string", - "format": "uri", - "example": "https://api.upsun.com/projects/abc123/environments/main/observability/profiles?transaction=App%5CController%3A%3Alist" + "disk_used": { + "description": "Disk usage in bytes. Includes statistical aggregations (all nullable): min, max, avg, stddev, p50, p95, p96, p97, p98, p99", + "properties": { + "min": { + "description": "Minimum disk bytes used", + "type": "integer", + "format": "int64", + "example": 3087007744, + "nullable": true + }, + "max": { + "description": "Maximum disk bytes used", + "type": "integer", + "format": "int64", + "example": 3221225472, + "nullable": true + }, + "avg": { + "description": "Average disk bytes used", + "type": "number", + "format": "float", + "example": 3154116608, + "nullable": true + }, + "stddev": { + "description": "Standard deviation of disk bytes used", + "type": "number", + "format": "float", + "example": 35000000, + "nullable": true + }, + "p50": { + "description": "Median (50th percentile) disk bytes used", + "type": "number", + "format": "float", + "example": 3150000000, + "nullable": true + }, + "p95": { + "description": "95th percentile disk bytes used", + "type": "number", + "format": "float", + "example": 3210000000, + "nullable": true + }, + "p96": { + "description": "96th percentile disk bytes used", + "type": "number", + "format": "float", + "example": 3215000000, + "nullable": true + }, + "p97": { + "description": "97th percentile disk bytes used", + "type": "number", + "format": "float", + "example": 3217000000, + "nullable": true + }, + "p98": { + "description": "98th percentile disk bytes used", + "type": "number", + "format": "float", + "example": 3219000000, + "nullable": true + }, + "p99": { + "description": "99th percentile disk bytes used", + "type": "number", + "format": "float", + "example": 3220000000, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "disk_limit": { + "description": "Disk limit in bytes. Contains only max (nullable)", + "properties": { + "max": { + "description": "Maximum disk limit in bytes", + "type": "integer", + "format": "int64", + "example": 10737418240, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "inodes_used": { + "description": "Inode usage count. Includes statistical aggregations (all nullable): min, max, avg, stddev, p50, p95, p96, p97, p98, p99", + "properties": { + "min": { + "description": "Minimum inodes used", + "type": "integer", + "example": 45000, + "nullable": true + }, + "max": { + "description": "Maximum inodes used", + "type": "integer", + "example": 52000, + "nullable": true + }, + "avg": { + "description": "Average inodes used", + "type": "number", + "format": "float", + "example": 48500, + "nullable": true + }, + "stddev": { + "description": "Standard deviation of inodes used", + "type": "number", + "format": "float", + "example": 1500, + "nullable": true + }, + "p50": { + "description": "Median (50th percentile) inodes used", + "type": "number", + "format": "float", + "example": 48400, + "nullable": true + }, + "p95": { + "description": "95th percentile inodes used", + "type": "number", + "format": "float", + "example": 51200, + "nullable": true + }, + "p96": { + "description": "96th percentile inodes used", + "type": "number", + "format": "float", + "example": 51400, + "nullable": true + }, + "p97": { + "description": "97th percentile inodes used", + "type": "number", + "format": "float", + "example": 51600, + "nullable": true + }, + "p98": { + "description": "98th percentile inodes used", + "type": "number", + "format": "float", + "example": 51800, + "nullable": true + }, + "p99": { + "description": "99th percentile inodes used", + "type": "number", + "format": "float", + "example": 51900, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "inodes_limit": { + "description": "Inode limit count. Contains only max (nullable)", + "properties": { + "max": { + "description": "Maximum inodes limit", + "type": "integer", + "example": 655360, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false } }, "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 + "additionalProperties": false + } + } }, - "_total_consumed": { - "description": "Total resource consumption for this interval (omitted for timestamps with no data)", - "type": "number", - "format": "float", - "example": 1234567890.5 + "type": "object", + "additionalProperties": false + } + } + }, + "type": "object", + "additionalProperties": false + }, + "example": [ + { + "timestamp": 1704067200, + "services": { + "app": { + "cpu_used": { + "avg": 0.45 }, - "_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 + "memory_used": { + "avg": 612892672 + } + } + } + }, + { + "timestamp": 1704070800 + }, + { + "timestamp": 1704074400, + "services": { + "app": { + "cpu_used": { + "avg": 0.52 }, - "_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 - } + "memory_used": { + "avg": 625000000 } - }, - "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 - } - } - } - ] - } } } } @@ -22810,429 +22617,132 @@ "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 - } - } - } - } - }, - "x-property-id-kebab": "blackfire_server_transactions_breakdown", - "x-tag-id-kebab": "Blackfire-Monitoring", - "x-return-types-displayReturn": false, - "x-return-types": {}, - "x-phpdoc": {}, - "x-returnable": true, - "x-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." - ] - } - }, - "/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": "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, default) excludes specified transactions and includes all others.", - "required": false, - "schema": { - "type": "string", - "example": "1", - "default": null, - "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, default) excludes specified wt_slots and includes all others.", - "required": false, - "schema": { - "type": "string", - "example": "1", - "default": null, - "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, default) excludes specified pmu_slots and includes all others.", - "required": false, - "schema": { - "type": "string", - "example": "1", - "default": null, - "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, default) excludes specified http_status_codes and includes all others.", - "required": false, - "schema": { - "type": "string", - "example": "1", - "default": null, - "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" + "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 + } } } }, - { - "name": "http_hosts_mode", - "in": "query", - "description": "Filter mode for http_hosts parameter. \"1\" (additive) includes only specified http_hosts. \"-1\" (subtractive, default) excludes specified http_hosts and includes all others.", - "required": false, - "schema": { - "type": "string", - "example": "1", - "default": null, - "enum": [ - "1", - "-1" - ] - } + "403": { + "description": "Forbidden - Access denied due to insufficient permissions, or the requested project/environment does not exist (to prevent information disclosure)" }, - { - "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" + "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 + } } } - }, + } + }, + "x-property-id-kebab": "resources_overview", + "x-tag-id-kebab": "Resources", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "mixed" + ], + "x-return-types-union": "mixed", + "x-description": [ + "Returns time-series resource utilization data for all services. Each timestamp includes per-service metrics: CPU", + "(cores), memory (bytes), swap (bytes), pressure indicators (0.0-1.0), and per-mountpoint disk/inode usage. All", + "metrics include statistical aggregations: min, max, avg, stddev, and percentiles (p50, p95-p99). Service names", + "and mountpoint paths are dynamic. Aggregation values are nullable when insufficient data exists." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/observability/resources/summary": { + "get": { + "tags": [ + "Resources" + ], + "summary": "Get resource metrics summary", + "description": "Returns per-instance resource statistics aggregated over the time range. Filter results using aggs[] (min, max, avg, stddev, p50, p95-p99) and types[] (cpu, memory, swap, disk, inodes, pressure metrics). Response grouped by service name then instance ID (e.g., \"app.0\", \"database.1\"). All aggregations nullable when insufficient data exists.", + "operationId": "resources_summary", + "parameters": [ { - "name": "hosts_mode", - "in": "query", - "description": "Filter mode for hosts parameter. \"1\" (additive) includes only specified hosts. \"-1\" (subtractive, default) excludes specified hosts and includes all others.", - "required": false, + "name": "projectId", + "in": "path", + "description": "The unique identifier of the Upsun project", + "required": true, "schema": { "type": "string", - "example": "1", - "default": null, - "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" - } + "pattern": "[a-z0-9]+", + "example": "abc123def456" } }, { - "name": "frameworks_mode", - "in": "query", - "description": "Filter mode for frameworks parameter. \"1\" (additive) includes only specified frameworks. \"-1\" (subtractive, default) excludes specified frameworks and includes all others.", - "required": false, + "name": "environmentId", + "in": "path", + "description": "The environment identifier", + "required": true, "schema": { "type": "string", - "example": "1", - "default": null, - "enum": [ - "1", - "-1" - ] + "pattern": ".+", + "example": "main" } }, { - "name": "languages[]", + "name": "from", "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, + "description": "Start timestamp for the time range (Unix timestamp in seconds)", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string", - "example": "php" - } + "type": "integer", + "format": "int64", + "example": 1704067200 } }, { - "name": "languages_mode", + "name": "to", "in": "query", - "description": "Filter mode for languages parameter. \"1\" (additive) includes only specified languages. \"-1\" (subtractive, default) excludes specified languages and includes all others.", - "required": false, + "description": "End timestamp for the time range (Unix timestamp in seconds)", + "required": true, "schema": { - "type": "string", - "example": "1", - "default": null, - "enum": [ - "1", - "-1" - ] + "type": "integer", + "format": "int64", + "example": 1704153600 } }, { - "name": "methods[]", + "name": "aggs[]", "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.", + "description": "Statistical aggregations to include in the response. Can be specified multiple times. Available values: avg, stddev, max, min, p50, p95, p96, p97, p98, p99. Specify parameter multiple times for multiple values (e.g., ?aggs[]=avg&aggs[]=p50).", "required": false, "style": "form", "explode": true, @@ -23240,29 +22750,25 @@ "type": "array", "items": { "type": "string", - "example": "get" + "enum": [ + "avg", + "stddev", + "max", + "min", + "p50", + "p95", + "p96", + "p97", + "p98", + "p99" + ] } } }, { - "name": "methods_mode", - "in": "query", - "description": "Filter mode for methods parameter. \"1\" (additive) includes only specified methods. \"-1\" (subtractive, default) excludes specified methods and includes all others.", - "required": false, - "schema": { - "type": "string", - "example": "1", - "default": null, - "enum": [ - "1", - "-1" - ] - } - }, - { - "name": "runtimes[]", + "name": "types[]", "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.", + "description": "Metric types to include in the response. Can be specified multiple times. Available values: cpu, memory, disk, inodes, swap, memory_pressure, cpu_pressure, io_pressure, irq_pressure. Specify parameter multiple times for multiple values (e.g., ?types[]=cpu&types[]=memory).", "required": false, "style": "form", "explode": true, @@ -23270,29 +22776,24 @@ "type": "array", "items": { "type": "string", - "example": "PHP 8.4.17 (fpm-fcgi)" + "enum": [ + "cpu", + "memory", + "disk", + "inodes", + "swap", + "memory_pressure", + "cpu_pressure", + "io_pressure", + "irq_pressure" + ] } } }, { - "name": "runtimes_mode", - "in": "query", - "description": "Filter mode for runtimes parameter. \"1\" (additive) includes only specified runtimes. \"-1\" (subtractive, default) excludes specified runtimes and includes all others.", - "required": false, - "schema": { - "type": "string", - "example": "1", - "default": null, - "enum": [ - "1", - "-1" - ] - } - }, - { - "name": "oss[]", + "name": "services[]", "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.", + "description": "Filter results to specific services. Can be specified multiple times for multiple services. When omitted, all services are included by default. Use services_mode to control inclusion/exclusion behavior. Specify parameter multiple times for multiple values (e.g., ?services[]=app&services[]=database).", "required": false, "style": "form", "explode": true, @@ -23300,483 +22801,1176 @@ "type": "array", "items": { "type": "string", - "example": "Linux" + "example": "app" } } }, { - "name": "oss_mode", + "name": "services_mode", "in": "query", - "description": "Filter mode for oss parameter. \"1\" (additive) includes only specified operating systems. \"-1\" (subtractive, default) excludes specified operating systems and includes all others.", + "description": "Filter mode for services parameter. \"1\" (additive) includes only specified services. \"-1\" (subtractive, default) excludes specified services and includes all others.", "required": false, "schema": { "type": "string", "example": "1", "default": null, "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" - ] - }, - "_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" - ] + "1", + "-1" + ] + } + } + ], + "responses": { + "200": { + "description": "Successfully retrieved resource summary with per-service-instance aggregations", + "content": { + "application/json": { + "schema": { + "required": [ + "_from", + "_to", + "_project_id", + "_environment_id", + "_branch_machine_name", + "data" + ], + "properties": { + "_from": { + "description": "Query start timestamp", + "type": "integer", + "example": 1704067200 }, - "_oss": { - "description": "Applied OS filter values", - "type": "array", - "items": { - "type": "string", - "example": "linux" - }, - "nullable": true + "_to": { + "description": "Query end timestamp", + "type": "integer", + "example": 1704153600 }, - "_oss_mode": { - "description": "OS filter mode (additive=include only, subtractive=exclude)", + "_project_id": { + "description": "Project identifier", "type": "string", - "nullable": true, - "enum": [ - "additive", - "subtractive" - ] + "example": "abc123def456" }, - "_distribution_cost": { - "description": "Applied distribution cost dimension (wt=wall time, pmu=peak memory usage)", + "_environment_id": { + "description": "Environment identifier", "type": "string", - "enum": [ - "wt", - "pmu" - ] + "example": "main" }, - "_sort": { - "description": "Applied sort field for top spans", + "_branch_machine_name": { + "description": "Branch machine name", "type": "string", - "nullable": true, - "enum": [ - "percentage", - "p_96", - "count", - "wt", - "exec-time", - "impact" - ] + "example": "main-bvxea6i" }, - "top_spans": { - "description": "Top spans aggregated data", + "data": { + "description": "Resource summary data organized by service and instance", "required": [ - "data" + "services" ], "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\u20131.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" + "services": { + "description": "Resource metrics grouped by service name. Service names are dynamic and vary based on customer configuration (e.g., \"admin-pipeline\", \"clickhouse\", \"app\", \"database\"). Each service contains one or more instances with full statistical aggregations for all requested metric types.", + "type": "object", + "example": { + "app": { + "app.0": { + "cpu_used": { + "min": 0.12, + "max": 1.85, + "avg": 0.45, + "stddev": 0.32, + "p50": 0.42, + "p95": 1.23, + "p96": 1.34, + "p97": 1.45, + "p98": 1.62, + "p99": 1.78 }, - "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 + "cpu_limit": { + "max": 2 + }, + "memory_used": { + "min": 536870912, + "max": 715827883, + "avg": 612892672, + "stddev": 45000000, + "p50": 605000000, + "p95": 690000000, + "p96": 695000000, + "p97": 700000000, + "p98": 708000000, + "p99": 712000000 + }, + "memory_limit": { + "max": 1073741824 + }, + "swap_used": { + "min": 0, + "max": 4194304, + "avg": 1048576, + "stddev": 850000, + "p50": 950000, + "p95": 3200000, + "p96": 3400000, + "p97": 3600000, + "p98": 3900000, + "p99": 4100000 + }, + "swap_limit": { + "max": 536870912 + }, + "memory_pressure": { + "min": 0, + "max": 0.15, + "avg": 0.03, + "stddev": 0.02, + "p50": 0.02, + "p95": 0.12, + "p96": 0.13, + "p97": 0.14, + "p98": 0.145, + "p99": 0.148 + }, + "cpu_pressure": { + "min": 0, + "max": 0.08, + "avg": 0.01, + "stddev": 0.01, + "p50": 0.01, + "p95": 0.05, + "p96": 0.06, + "p97": 0.065, + "p98": 0.07, + "p99": 0.075 + }, + "io_pressure": { + "min": 0, + "max": 0.22, + "avg": 0.05, + "stddev": 0.04, + "p50": 0.04, + "p95": 0.18, + "p96": 0.19, + "p97": 0.2, + "p98": 0.21, + "p99": 0.215 + }, + "irq_pressure": { + "min": 0, + "max": 0.01, + "avg": 0.001, + "stddev": 0.002, + "p50": 0, + "p95": 0.008, + "p96": 0.009, + "p97": 0.0095, + "p98": 0.0097, + "p99": 0.0099 + }, + "mountpoints": { + "": { + "disk_used": { + "min": null, + "max": null, + "avg": null, + "stddev": null, + "p50": null, + "p95": null, + "p96": null, + "p97": null, + "p98": null, + "p99": null + }, + "disk_limit": { + "max": null + }, + "inodes_used": { + "min": null, + "max": null, + "avg": null, + "stddev": null, + "p50": null, + "p95": null, + "p96": null, + "p97": null, + "p98": null, + "p99": null + }, + "inodes_limit": { + "max": null + } + }, + "/tmp": { + "disk_used": { + "min": 147197952, + "max": 147197952, + "avg": 147197952, + "stddev": null, + "p50": 147197952, + "p95": 147197952, + "p96": 147197952, + "p97": 147197952, + "p98": 147197952, + "p99": 147197952 + }, + "disk_limit": { + "max": 17169383424 + }, + "inodes_used": { + "min": 2244, + "max": 2244, + "avg": 2244, + "stddev": null, + "p50": 2244, + "p95": 2244, + "p96": 2244, + "p97": 2244, + "p98": 2244, + "p99": 2244 + }, + "inodes_limit": { + "max": 8388608 + } + } + } } }, - "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", + "clickhouse": { + "clickhouse.0": { + "cpu_used": { + "min": 0.88, + "max": 0.88, + "avg": 0.88, + "stddev": null, + "p50": 0.88, + "p95": 0.88, + "p96": 0.88, + "p97": 0.88, + "p98": 0.88, + "p99": 0.88 + }, + "cpu_limit": { + "max": 16 + }, + "memory_used": { + "min": 1415147520, + "max": 1415147520, + "avg": 1415147520, + "stddev": null, + "p50": 1415147520, + "p95": 1415147520, + "p96": 1415147520, + "p97": 1415147520, + "p98": 1415147520, + "p99": 1415147520 + }, + "memory_limit": { + "max": 34359738368 + }, + "swap_used": { + "min": 223432704, + "max": 223432704, + "avg": 223432704, + "stddev": null, + "p50": 223432704, + "p95": 223432704, + "p96": 223432704, + "p97": 223432704, + "p98": 223432704, + "p99": 223432704 + }, + "swap_limit": { + "max": 536870912 + }, + "memory_pressure": { + "min": 0, + "max": 0, + "avg": 0, + "stddev": null, + "p50": 0, + "p95": 0, + "p96": 0, + "p97": 0, + "p98": 0, + "p99": 0 + }, + "cpu_pressure": { + "min": 0.08, + "max": 0.08, + "avg": 0.08, + "stddev": null, + "p50": 0.08, + "p95": 0.08, + "p96": 0.08, + "p97": 0.08, + "p98": 0.08, + "p99": 0.08 + }, + "io_pressure": { + "min": 0.12, + "max": 0.12, + "avg": 0.12, + "stddev": null, + "p50": 0.12, + "p95": 0.12, + "p96": 0.12, + "p97": 0.12, + "p98": 0.12, + "p99": 0.12 + }, + "irq_pressure": { + "min": 0, + "max": 0, + "avg": 0, + "stddev": null, + "p50": 0, + "p95": 0, + "p96": 0, + "p97": 0, + "p98": 0, + "p99": 0 + }, + "mountpoints": { + "": { + "disk_used": { + "min": null, + "max": null, + "avg": null, + "stddev": null, + "p50": null, + "p95": null, + "p96": null, + "p97": null, + "p98": null, + "p99": null + }, + "disk_limit": { + "max": null + }, + "inodes_used": { + "min": null, + "max": null, + "avg": null, + "stddev": null, + "p50": null, + "p95": null, + "p96": null, + "p97": null, + "p98": null, + "p99": null + }, + "inodes_limit": { + "max": null + } + }, + "/mnt": { + "disk_used": { + "min": 608173674496, + "max": 608173674496, + "avg": 608173674496, + "stddev": null, + "p50": 608173674496, + "p95": 608173674496, + "p96": 608173674496, + "p97": 608173674496, + "p98": 608173674496, + "p99": 608173674496 + }, + "disk_limit": { + "max": 1056876748800 + }, + "inodes_used": { + "min": 495287, + "max": 495287, + "avg": 495287, + "stddev": null, + "p50": 495287, + "p95": 495287, + "p96": 495287, + "p97": 495287, + "p98": 495287, + "p99": 495287 + }, + "inodes_limit": { + "max": 65536000 + } + }, + "/tmp": { + "disk_used": { + "min": 76398592, + "max": 76398592, + "avg": 76398592, + "stddev": null, + "p50": 76398592, + "p95": 76398592, + "p96": 76398592, + "p97": 76398592, + "p98": 76398592, + "p99": 76398592 + }, + "disk_limit": { + "max": 17169383424 + }, + "inodes_used": { + "min": 11, + "max": 11, + "avg": 11, + "stddev": null, + "p50": 11, + "p95": 11, + "p96": 11, + "p97": 11, + "p98": 11, + "p99": 11 + }, + "inodes_limit": { + "max": 8388608 + } + } + } + } + } + }, "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" - ], + "description": "Service-level container with one or more instance names as keys (e.g., \"app.0\", \"clickhouse.0\", \"database.1\")", + "type": "object", + "additionalProperties": { + "description": "Instance-level metrics with statistical aggregations. Instance identifiers are dynamic and vary based on service scaling.", + "properties": { + "cpu_used": { + "description": "CPU cores used with statistical aggregations. Values may be null when insufficient data is available.", + "properties": { + "min": { + "description": "Minimum CPU cores used", + "type": "number", + "format": "float", + "example": 0.12, + "nullable": true + }, + "max": { + "description": "Maximum CPU cores used", + "type": "number", + "format": "float", + "example": 1.85, + "nullable": true + }, + "avg": { + "description": "Average CPU cores used", + "type": "number", + "format": "float", + "example": 0.45, + "nullable": true + }, + "stddev": { + "description": "Standard deviation of CPU cores used", + "type": "number", + "format": "float", + "example": 0.32, + "nullable": true + }, + "p50": { + "description": "Median (50th percentile) CPU cores used", + "type": "number", + "format": "float", + "example": 0.42, + "nullable": true + }, + "p95": { + "description": "95th percentile CPU cores used", + "type": "number", + "format": "float", + "example": 1.23, + "nullable": true + }, + "p96": { + "description": "96th percentile CPU cores used", + "type": "number", + "format": "float", + "example": 1.34, + "nullable": true + }, + "p97": { + "description": "97th percentile CPU cores used", + "type": "number", + "format": "float", + "example": 1.45, + "nullable": true + }, + "p98": { + "description": "98th percentile CPU cores used", + "type": "number", + "format": "float", + "example": 1.62, + "nullable": true + }, + "p99": { + "description": "99th percentile CPU cores used", + "type": "number", + "format": "float", + "example": 1.78, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "cpu_limit": { + "description": "CPU limit in cores. Contains only max (nullable)", + "properties": { + "max": { + "description": "Maximum CPU limit in cores", + "type": "number", + "format": "float", + "example": 2, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "memory_used": { + "description": "Memory bytes used with statistical aggregations. Values may be null when insufficient data is available.", + "properties": { + "min": { + "description": "Minimum memory bytes used", + "type": "integer", + "format": "int64", + "example": 536870912, + "nullable": true + }, + "max": { + "description": "Maximum memory bytes used", + "type": "integer", + "format": "int64", + "example": 715827883, + "nullable": true + }, + "avg": { + "description": "Average memory bytes used", + "type": "number", + "format": "float", + "example": 612892672, + "nullable": true + }, + "stddev": { + "description": "Standard deviation of memory bytes used", + "type": "number", + "format": "float", + "example": 45000000, + "nullable": true + }, + "p50": { + "description": "Median (50th percentile) memory bytes used", + "type": "number", + "format": "float", + "example": 605000000, + "nullable": true + }, + "p95": { + "description": "95th percentile memory bytes used", + "type": "number", + "format": "float", + "example": 690000000, + "nullable": true + }, + "p96": { + "description": "96th percentile memory bytes used", + "type": "number", + "format": "float", + "example": 695000000, + "nullable": true + }, + "p97": { + "description": "97th percentile memory bytes used", + "type": "number", + "format": "float", + "example": 700000000, + "nullable": true + }, + "p98": { + "description": "98th percentile memory bytes used", + "type": "number", + "format": "float", + "example": 708000000, + "nullable": true + }, + "p99": { + "description": "99th percentile memory bytes used", + "type": "number", + "format": "float", + "example": 712000000, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "memory_limit": { + "description": "Memory limit in bytes. Contains only max (nullable)", + "properties": { + "max": { + "description": "Maximum memory limit in bytes", + "type": "integer", + "format": "int64", + "example": 1073741824, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "swap_used": { + "description": "Swap bytes used with statistical aggregations. Values may be null when insufficient data is available.", + "properties": { + "min": { + "description": "Minimum swap bytes used", + "type": "integer", + "format": "int64", + "example": 0, + "nullable": true + }, + "max": { + "description": "Maximum swap bytes used", + "type": "integer", + "format": "int64", + "example": 4194304, + "nullable": true + }, + "avg": { + "description": "Average swap bytes used", + "type": "number", + "format": "float", + "example": 1048576, + "nullable": true + }, + "stddev": { + "description": "Standard deviation of swap bytes used", + "type": "number", + "format": "float", + "example": 850000, + "nullable": true + }, + "p50": { + "description": "Median (50th percentile) swap bytes used", + "type": "number", + "format": "float", + "example": 950000, + "nullable": true + }, + "p95": { + "description": "95th percentile swap bytes used", + "type": "number", + "format": "float", + "example": 3200000, + "nullable": true + }, + "p96": { + "description": "96th percentile swap bytes used", + "type": "number", + "format": "float", + "example": 3400000, + "nullable": true + }, + "p97": { + "description": "97th percentile swap bytes used", + "type": "number", + "format": "float", + "example": 3600000, + "nullable": true + }, + "p98": { + "description": "98th percentile swap bytes used", + "type": "number", + "format": "float", + "example": 3900000, + "nullable": true + }, + "p99": { + "description": "99th percentile swap bytes used", + "type": "number", + "format": "float", + "example": 4100000, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "swap_limit": { + "description": "Swap limit in bytes. Contains only max (nullable)", + "properties": { + "max": { + "description": "Maximum swap limit in bytes", + "type": "integer", + "format": "int64", + "example": 536870912, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "memory_pressure": { + "description": "Memory pressure stall indicator (0.0-1.0) with statistical aggregations. Values may be null when insufficient data is available.", + "properties": { + "min": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "max": { + "type": "number", + "format": "float", + "example": 0.15, + "nullable": true + }, + "avg": { + "type": "number", + "format": "float", + "example": 0.03, + "nullable": true + }, + "stddev": { + "type": "number", + "format": "float", + "example": 0.02, + "nullable": true + }, + "p50": { + "type": "number", + "format": "float", + "example": 0.02, + "nullable": true + }, + "p95": { + "type": "number", + "format": "float", + "example": 0.12, + "nullable": true + }, + "p96": { + "type": "number", + "format": "float", + "example": 0.13, + "nullable": true + }, + "p97": { + "type": "number", + "format": "float", + "example": 0.14, + "nullable": true + }, + "p98": { + "type": "number", + "format": "float", + "example": 0.145, + "nullable": true + }, + "p99": { + "type": "number", + "format": "float", + "example": 0.148, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "cpu_pressure": { + "description": "CPU pressure stall indicator (0.0-1.0) with statistical aggregations. Values may be null when insufficient data is available.", + "properties": { + "min": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "max": { + "type": "number", + "format": "float", + "example": 0.08, + "nullable": true + }, + "avg": { + "type": "number", + "format": "float", + "example": 0.01, + "nullable": true + }, + "stddev": { + "type": "number", + "format": "float", + "example": 0.01, + "nullable": true + }, + "p50": { + "type": "number", + "format": "float", + "example": 0.01, + "nullable": true + }, + "p95": { + "type": "number", + "format": "float", + "example": 0.05, + "nullable": true + }, + "p96": { + "type": "number", + "format": "float", + "example": 0.06, + "nullable": true + }, + "p97": { + "type": "number", + "format": "float", + "example": 0.065, + "nullable": true + }, + "p98": { + "type": "number", + "format": "float", + "example": 0.07, + "nullable": true + }, + "p99": { + "type": "number", + "format": "float", + "example": 0.075, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "io_pressure": { + "description": "I/O pressure stall indicator (0.0-1.0) with statistical aggregations. Values may be null when insufficient data is available.", + "properties": { + "min": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "max": { + "type": "number", + "format": "float", + "example": 0.22, + "nullable": true + }, + "avg": { + "type": "number", + "format": "float", + "example": 0.05, + "nullable": true + }, + "stddev": { + "type": "number", + "format": "float", + "example": 0.04, + "nullable": true + }, + "p50": { + "type": "number", + "format": "float", + "example": 0.04, + "nullable": true + }, + "p95": { + "type": "number", + "format": "float", + "example": 0.18, + "nullable": true + }, + "p96": { + "type": "number", + "format": "float", + "example": 0.19, + "nullable": true + }, + "p97": { + "type": "number", + "format": "float", + "example": 0.2, + "nullable": true + }, + "p98": { + "type": "number", + "format": "float", + "example": 0.21, + "nullable": true + }, + "p99": { + "type": "number", + "format": "float", + "example": 0.215, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "irq_pressure": { + "description": "IRQ pressure stall indicator (0.0-1.0) with statistical aggregations. Values may be null when insufficient data is available.", "properties": { - "value": { - "description": "Filter value", - "type": "string", - "example": "get" + "min": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true }, - "count": { - "description": "Occurrence count", - "type": "integer", - "example": 26585 + "max": { + "type": "number", + "format": "float", + "example": 0.01, + "nullable": true + }, + "avg": { + "type": "number", + "format": "float", + "example": 0.001, + "nullable": true + }, + "stddev": { + "type": "number", + "format": "float", + "example": 0.002, + "nullable": true + }, + "p50": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "p95": { + "type": "number", + "format": "float", + "example": 0.008, + "nullable": true + }, + "p96": { + "type": "number", + "format": "float", + "example": 0.009, + "nullable": true + }, + "p97": { + "type": "number", + "format": "float", + "example": 0.0095, + "nullable": true + }, + "p98": { + "type": "number", + "format": "float", + "example": 0.0097, + "nullable": true + }, + "p99": { + "type": "number", + "format": "float", + "example": 0.0099, + "nullable": true } }, "type": "object", "additionalProperties": false + }, + "mountpoints": { + "description": "Disk usage statistics for filesystem mountpoints. Mountpoint paths are dynamic and vary based on service configuration (e.g., \"\" for root, \"/tmp\", \"/mnt\"). Each mountpoint provides disk and inode usage with statistical aggregations.", + "type": "object", + "additionalProperties": { + "properties": { + "disk_used": { + "description": "Disk bytes used with statistical aggregations. Values may be null when insufficient data is available.", + "properties": { + "min": { + "description": "Minimum disk bytes used", + "type": "integer", + "format": "int64", + "example": 3087007744, + "nullable": true + }, + "max": { + "description": "Maximum disk bytes used", + "type": "integer", + "format": "int64", + "example": 3221225472, + "nullable": true + }, + "avg": { + "description": "Average disk bytes used", + "type": "number", + "format": "float", + "example": 3154116608, + "nullable": true + }, + "stddev": { + "description": "Standard deviation of disk bytes used", + "type": "number", + "format": "float", + "example": 35000000, + "nullable": true + }, + "p50": { + "description": "Median (50th percentile) disk bytes used", + "type": "number", + "format": "float", + "example": 3150000000, + "nullable": true + }, + "p95": { + "description": "95th percentile disk bytes used", + "type": "number", + "format": "float", + "example": 3210000000, + "nullable": true + }, + "p96": { + "description": "96th percentile disk bytes used", + "type": "number", + "format": "float", + "example": 3215000000, + "nullable": true + }, + "p97": { + "description": "97th percentile disk bytes used", + "type": "number", + "format": "float", + "example": 3217000000, + "nullable": true + }, + "p98": { + "description": "98th percentile disk bytes used", + "type": "number", + "format": "float", + "example": 3219000000, + "nullable": true + }, + "p99": { + "description": "99th percentile disk bytes used", + "type": "number", + "format": "float", + "example": 3220000000, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "disk_limit": { + "description": "Disk limit in bytes. Contains only max (nullable)", + "properties": { + "max": { + "description": "Maximum disk limit in bytes", + "type": "integer", + "format": "int64", + "example": 10737418240, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "inodes_used": { + "description": "Inodes used with statistical aggregations. Values may be null when insufficient data is available.", + "properties": { + "min": { + "description": "Minimum inodes used", + "type": "integer", + "example": 45000, + "nullable": true + }, + "max": { + "description": "Maximum inodes used", + "type": "integer", + "example": 52000, + "nullable": true + }, + "avg": { + "description": "Average inodes used", + "type": "number", + "format": "float", + "example": 48500, + "nullable": true + }, + "stddev": { + "description": "Standard deviation of inodes used", + "type": "number", + "format": "float", + "example": 1500, + "nullable": true + }, + "p50": { + "description": "Median (50th percentile) inodes used", + "type": "number", + "format": "float", + "example": 48400, + "nullable": true + }, + "p95": { + "description": "95th percentile inodes used", + "type": "number", + "format": "float", + "example": 51200, + "nullable": true + }, + "p96": { + "description": "96th percentile inodes used", + "type": "number", + "format": "float", + "example": 51400, + "nullable": true + }, + "p97": { + "description": "97th percentile inodes used", + "type": "number", + "format": "float", + "example": 51600, + "nullable": true + }, + "p98": { + "description": "98th percentile inodes used", + "type": "number", + "format": "float", + "example": 51800, + "nullable": true + }, + "p99": { + "description": "99th percentile inodes used", + "type": "number", + "format": "float", + "example": 51900, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "inodes_limit": { + "description": "Inode limit count. Contains only max (nullable)", + "properties": { + "max": { + "description": "Maximum inodes limit", + "type": "integer", + "example": 655360, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + } } - } - }, - "type": "object", - "additionalProperties": false + }, + "type": "object", + "additionalProperties": false + } } - }, - "max_applicable_filters": { - "description": "Maximum number of applicable filters", - "type": "integer", - "example": 50 } }, "type": "object", @@ -23785,72 +23979,6 @@ }, "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 - } } } } @@ -23887,9 +24015,6 @@ "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." ], @@ -23941,27 +24066,33 @@ } } }, - "x-property-id-kebab": "blackfire_server_top_spans", - "x-tag-id-kebab": "Blackfire-Monitoring", + "x-property-id-kebab": "resources_summary", + "x-tag-id-kebab": "Resources", "x-return-types-displayReturn": false, - "x-return-types": {}, "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "mixed" + ], + "x-return-types-union": "mixed", "x-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." + "Returns per-instance resource statistics aggregated over the time range. Filter results using aggs[] (min, max,", + "avg, stddev, p50, p95-p99) and types[] (cpu, memory, swap, disk, inodes, pressure metrics). Response grouped by", + "service name then instance ID (e.g., \"app.0\", \"database.1\"). All aggregations nullable when insufficient data", + "exists." ] } }, - "/projects/{projectId}/environments/{environmentId}/observability": { + "/projects/{projectId}/environments/{environmentId}/observability/resources/service/{service}": { "get": { "tags": [ - "Entrypoint" + "Resources" ], - "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", + "summary": "Get resource metrics by service", + "description": "Returns time-series resource data for one service. Each timestamp contains per-instance metrics. Filter results using aggs[] (min, max, avg, stddev, p50, p95-p99) and types[] (cpu, memory, swap, disk, inodes, pressure metrics). Response grouped by timestamp then instance ID (e.g., \"app.0\"). All aggregations nullable when insufficient data exists.", + "operationId": "resources_by_service", "parameters": [ { "name": "projectId", @@ -23984,562 +24115,977 @@ "pattern": ".+", "example": "main" } + }, + { + "name": "service", + "in": "path", + "description": "The service name to retrieve metrics for (e.g., \"app\", \"database\", \"admin-pipeline--kafka-profile-payloads\")", + "required": true, + "schema": { + "type": "string", + "example": "app" + } + }, + { + "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": "aggs[]", + "in": "query", + "description": "Statistical aggregations to include in the response. Can be specified multiple times. Available values: avg, stddev, max, min, p50, p95, p96, p97, p98, p99. Specify parameter multiple times for multiple values (e.g., ?aggs[]=avg&aggs[]=p50).", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "avg", + "stddev", + "max", + "min", + "p50", + "p95", + "p96", + "p97", + "p98", + "p99" + ] + } + } + }, + { + "name": "types[]", + "in": "query", + "description": "Metric types to include in the response. Can be specified multiple times. Available values: cpu, memory, disk, inodes, swap, memory_pressure, cpu_pressure, io_pressure, irq_pressure. Specify parameter multiple times for multiple values (e.g., ?types[]=cpu&types[]=memory).", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "cpu", + "memory", + "disk", + "inodes", + "swap", + "memory_pressure", + "cpu_pressure", + "io_pressure", + "irq_pressure" + ] + } + } } ], "responses": { "200": { - "description": "Observability entrypoint retrieved successfully", + "description": "Successfully retrieved service-specific resource metrics with time-series data", "content": { "application/json": { "schema": { "required": [ - "message", - "project_id", - "branch_machine_name", - "environment_id", - "environment_type", - "vendor", - "psh_user_identifier", - "_links", - "retention", - "data_retention" + "_grain", + "_from", + "_to", + "_project_id", + "_environment_id", + "_branch_machine_name", + "_service", + "data" ], "properties": { - "message": { - "description": "Welcome message", - "type": "string", - "example": "bonjour, monde!" + "_grain": { + "description": "Data granularity in seconds", + "type": "integer", + "example": 5 }, - "project_id": { + "_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" }, - "branch_machine_name": { - "description": "Branch machine name", - "type": "string", - "example": "main" - }, - "environment_id": { + "_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", + }, + "_branch_machine_name": { + "description": "Branch machine name", "type": "string", - "example": "upsun", - "enum": [ - "upsun", - "platformsh" - ] + "example": "main-bvxea6i" }, - "psh_user_identifier": { - "description": "Authenticated user identifier", + "_service": { + "description": "Service name", "type": "string", - "example": "user@example.com" + "example": "admin-pipeline--kafka-profile-payloads" }, - "_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_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" - } + "_dg2_host_types_mapping": { + "description": "DG2 host type mapping per instance. Only present for DG2 environments. Maps instance names to their host type (\"web\", \"unified\", or empty string).", + "type": "object", + "example": { + "app.0": "web", + "app.1": "unified", + "worker.0": "" + }, + "nullable": true, + "additionalProperties": { + "type": "string", + "example": "web", + "enum": [ + "web", + "unified", + "" + ] + } + }, + "data": { + "description": "Time-series resource utilization data organized by timestamp with instance-level metrics", + "type": "array", + "items": { + "required": [ + "timestamp" + ], + "properties": { + "timestamp": { + "description": "Data point timestamp (Unix timestamp in seconds)", + "type": "integer", + "example": 1764083040 }, - "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" - } - }, + "instances": { + "description": "Resource metrics grouped by instance name. Instance names are dynamic and vary based on service scaling (e.g., \"admin-pipeline--kafka-profile-payloads.0\", \"app.0\", \"database.1\"). This property may be absent if no data is available for the timestamp.", "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_overview": { - "required": [ - "href" - ], - "properties": { - "href": { - "type": "string", - "format": "uri", - "example": "https://api.upsun.com/projects/abc123def456/environments/main/observability/http-metrics/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" + "additionalProperties": { + "description": "Instance-level metrics with statistical aggregations. Instance identifiers are dynamic and vary based on service scaling.", + "properties": { + "cpu_used": { + "description": "CPU cores used with statistical aggregations. Values may be null when insufficient data is available.", + "properties": { + "min": { + "description": "Minimum CPU cores used", + "type": "number", + "format": "float", + "example": 0.016, + "nullable": true + }, + "max": { + "description": "Maximum CPU cores used", + "type": "number", + "format": "float", + "example": 0.016, + "nullable": true + }, + "avg": { + "description": "Average CPU cores used", + "type": "number", + "format": "float", + "example": 0.016, + "nullable": true + }, + "stddev": { + "description": "Standard deviation of CPU cores used", + "type": "number", + "format": "float", + "example": null, + "nullable": true + }, + "p50": { + "description": "Median (50th percentile) CPU cores used", + "type": "number", + "format": "float", + "example": 0.016, + "nullable": true + }, + "p95": { + "description": "95th percentile CPU cores used", + "type": "number", + "format": "float", + "example": 0.016, + "nullable": true + }, + "p96": { + "description": "96th percentile CPU cores used", + "type": "number", + "format": "float", + "example": 0.016, + "nullable": true + }, + "p97": { + "description": "97th percentile CPU cores used", + "type": "number", + "format": "float", + "example": 0.016, + "nullable": true + }, + "p98": { + "description": "98th percentile CPU cores used", + "type": "number", + "format": "float", + "example": 0.016, + "nullable": true + }, + "p99": { + "description": "99th percentile CPU cores used", + "type": "number", + "format": "float", + "example": 0.016, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "cpu_limit": { + "description": "CPU limit in cores. Contains only max (nullable)", + "properties": { + "max": { + "description": "Maximum CPU limit in cores", + "type": "number", + "format": "float", + "example": 0.25, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "memory_used": { + "description": "Memory bytes used with statistical aggregations. Values may be null when insufficient data is available.", + "properties": { + "min": { + "description": "Minimum memory bytes used", + "type": "integer", + "format": "int64", + "example": 128819200, + "nullable": true + }, + "max": { + "description": "Maximum memory bytes used", + "type": "integer", + "format": "int64", + "example": 128819200, + "nullable": true + }, + "avg": { + "description": "Average memory bytes used", + "type": "number", + "format": "float", + "example": 128819200, + "nullable": true + }, + "stddev": { + "description": "Standard deviation of memory bytes used", + "type": "number", + "format": "float", + "example": null, + "nullable": true + }, + "p50": { + "description": "Median (50th percentile) memory bytes used", + "type": "number", + "format": "float", + "example": 128819200, + "nullable": true + }, + "p95": { + "description": "95th percentile memory bytes used", + "type": "number", + "format": "float", + "example": 128819200, + "nullable": true + }, + "p96": { + "description": "96th percentile memory bytes used", + "type": "number", + "format": "float", + "example": 128819200, + "nullable": true + }, + "p97": { + "description": "97th percentile memory bytes used", + "type": "number", + "format": "float", + "example": 128819200, + "nullable": true + }, + "p98": { + "description": "98th percentile memory bytes used", + "type": "number", + "format": "float", + "example": 128819200, + "nullable": true + }, + "p99": { + "description": "99th percentile memory bytes used", + "type": "number", + "format": "float", + "example": 128819200, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "memory_limit": { + "description": "Memory limit in bytes. Contains only max (nullable)", + "properties": { + "max": { + "description": "Maximum memory limit in bytes", + "type": "integer", + "format": "int64", + "example": 671088640, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "swap_used": { + "description": "Swap bytes used with statistical aggregations. Values may be null when insufficient data is available.", + "properties": { + "min": { + "description": "Minimum swap bytes used", + "type": "integer", + "format": "int64", + "example": 0, + "nullable": true + }, + "max": { + "description": "Maximum swap bytes used", + "type": "integer", + "format": "int64", + "example": 0, + "nullable": true + }, + "avg": { + "description": "Average swap bytes used", + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "stddev": { + "description": "Standard deviation of swap bytes used", + "type": "number", + "format": "float", + "example": null, + "nullable": true + }, + "p50": { + "description": "Median (50th percentile) swap bytes used", + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "p95": { + "description": "95th percentile swap bytes used", + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "p96": { + "description": "96th percentile swap bytes used", + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "p97": { + "description": "97th percentile swap bytes used", + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "p98": { + "description": "98th percentile swap bytes used", + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "p99": { + "description": "99th percentile swap bytes used", + "type": "number", + "format": "float", + "example": 0, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "swap_limit": { + "description": "Swap limit in bytes. Contains only max (nullable)", + "properties": { + "max": { + "description": "Maximum swap limit in bytes", + "type": "integer", + "format": "int64", + "example": 536870912, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "memory_pressure": { + "description": "Memory pressure stall indicator (0.0-1.0) with statistical aggregations. Values may be null when insufficient data is available.", + "properties": { + "min": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "max": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "avg": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "stddev": { + "type": "number", + "format": "float", + "example": null, + "nullable": true + }, + "p50": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "p95": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "p96": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "p97": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "p98": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "p99": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "cpu_pressure": { + "description": "CPU pressure stall indicator (0.0-1.0) with statistical aggregations. Values may be null when insufficient data is available.", + "properties": { + "min": { + "type": "number", + "format": "float", + "example": 0.229667, + "nullable": true + }, + "max": { + "type": "number", + "format": "float", + "example": 0.229667, + "nullable": true + }, + "avg": { + "type": "number", + "format": "float", + "example": 0.229667, + "nullable": true + }, + "stddev": { + "type": "number", + "format": "float", + "example": null, + "nullable": true + }, + "p50": { + "type": "number", + "format": "float", + "example": 0.229667, + "nullable": true + }, + "p95": { + "type": "number", + "format": "float", + "example": 0.229667, + "nullable": true + }, + "p96": { + "type": "number", + "format": "float", + "example": 0.229667, + "nullable": true + }, + "p97": { + "type": "number", + "format": "float", + "example": 0.229667, + "nullable": true + }, + "p98": { + "type": "number", + "format": "float", + "example": 0.229667, + "nullable": true + }, + "p99": { + "type": "number", + "format": "float", + "example": 0.229667, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "io_pressure": { + "description": "I/O pressure stall indicator (0.0-1.0) with statistical aggregations. Values may be null when insufficient data is available.", + "properties": { + "min": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "max": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "avg": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "stddev": { + "type": "number", + "format": "float", + "example": null, + "nullable": true + }, + "p50": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "p95": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "p96": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "p97": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "p98": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "p99": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "irq_pressure": { + "description": "IRQ pressure stall indicator (0.0-1.0) with statistical aggregations. Values may be null when insufficient data is available.", + "properties": { + "min": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "max": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "avg": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "stddev": { + "type": "number", + "format": "float", + "example": null, + "nullable": true + }, + "p50": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "p95": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "p96": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "p97": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "p98": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + }, + "p99": { + "type": "number", + "format": "float", + "example": 0, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "mountpoints": { + "description": "Disk usage statistics for filesystem mountpoints. Mountpoint paths are dynamic and vary based on service configuration (e.g., \"\" for root, \"/tmp\", \"/mnt\"). Each mountpoint provides disk and inode usage with statistical aggregations.", + "type": "object", + "additionalProperties": { + "properties": { + "disk_used": { + "description": "Disk bytes used with statistical aggregations. Values may be null when insufficient data is available.", + "properties": { + "min": { + "description": "Minimum disk bytes used", + "type": "integer", + "format": "int64", + "example": 197959680, + "nullable": true + }, + "max": { + "description": "Maximum disk bytes used", + "type": "integer", + "format": "int64", + "example": 197959680, + "nullable": true + }, + "avg": { + "description": "Average disk bytes used", + "type": "number", + "format": "float", + "example": 197959680, + "nullable": true + }, + "stddev": { + "description": "Standard deviation of disk bytes used", + "type": "number", + "format": "float", + "example": null, + "nullable": true + }, + "p50": { + "description": "Median (50th percentile) disk bytes used", + "type": "number", + "format": "float", + "example": 197959680, + "nullable": true + }, + "p95": { + "description": "95th percentile disk bytes used", + "type": "number", + "format": "float", + "example": 197959680, + "nullable": true + }, + "p96": { + "description": "96th percentile disk bytes used", + "type": "number", + "format": "float", + "example": 197959680, + "nullable": true + }, + "p97": { + "description": "97th percentile disk bytes used", + "type": "number", + "format": "float", + "example": 197959680, + "nullable": true + }, + "p98": { + "description": "98th percentile disk bytes used", + "type": "number", + "format": "float", + "example": 197959680, + "nullable": true + }, + "p99": { + "description": "99th percentile disk bytes used", + "type": "number", + "format": "float", + "example": 197959680, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "disk_limit": { + "description": "Disk limit in bytes. Contains only max (nullable)", + "properties": { + "max": { + "description": "Maximum disk limit in bytes", + "type": "integer", + "format": "int64", + "example": 17169383424, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "inodes_used": { + "description": "Inodes used with statistical aggregations. Values may be null when insufficient data is available.", + "properties": { + "min": { + "description": "Minimum inodes used", + "type": "integer", + "example": 2245, + "nullable": true + }, + "max": { + "description": "Maximum inodes used", + "type": "integer", + "example": 2245, + "nullable": true + }, + "avg": { + "description": "Average inodes used", + "type": "number", + "format": "float", + "example": 2245, + "nullable": true + }, + "stddev": { + "description": "Standard deviation of inodes used", + "type": "number", + "format": "float", + "example": null, + "nullable": true + }, + "p50": { + "description": "Median (50th percentile) inodes used", + "type": "number", + "format": "float", + "example": 2245, + "nullable": true + }, + "p95": { + "description": "95th percentile inodes used", + "type": "number", + "format": "float", + "example": 2245, + "nullable": true + }, + "p96": { + "description": "96th percentile inodes used", + "type": "number", + "format": "float", + "example": 2245, + "nullable": true + }, + "p97": { + "description": "97th percentile inodes used", + "type": "number", + "format": "float", + "example": 2245, + "nullable": true + }, + "p98": { + "description": "98th percentile inodes used", + "type": "number", + "format": "float", + "example": 2245, + "nullable": true + }, + "p99": { + "description": "99th percentile inodes used", + "type": "number", + "format": "float", + "example": 2245, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + }, + "inodes_limit": { + "description": "Inode limit count. Contains only max (nullable)", + "properties": { + "max": { + "description": "Maximum inodes limit", + "type": "integer", + "example": 8388608, + "nullable": true + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + } + } + }, + "type": "object", + "additionalProperties": false } - }, - "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 + "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" }, - "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 + "title": { + "description": "Human-readable summary of the validation error", + "type": "string", + "example": "Please ensure parameters are correct." }, - "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", + "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": "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 + "example": "The from timestamp must be in the past." } - }, - "type": "object", - "additionalProperties": false + } } }, "type": "object", @@ -24550,691 +25096,827 @@ }, "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 + } + } + } } }, - "x-property-id-kebab": "observability_entrypoint", - "x-tag-id-kebab": "Entrypoint", + "x-property-id-kebab": "resources_by_service", + "x-tag-id-kebab": "Resources", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "mixed" + ], + "x-return-types-union": "mixed", + "x-description": [ + "Returns time-series resource data for one service. Each timestamp contains per-instance metrics. Filter results", + "using aggs[] (min, max, avg, stddev, p50, p95-p99) and types[] (cpu, memory, swap, disk, inodes, pressure", + "metrics). Response grouped by timestamp then instance ID (e.g., \"app.0\"). All aggregations nullable when", + "insufficient data exists." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/routes": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "list-projects-environments-routes", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RouteCollection" + } + } + } + } + }, + "tags": [ + "Routing" + ], + "summary": "Get list of routes", + "description": "Retrieve a list of objects containing route definitions for\na specific environment. The definitions returned by this endpoint\nare those present in an environment's `.upsun/config.yaml` file.\n", + "x-property-id-kebab": "list-projects-environments-routes", + "x-tag-id-kebab": "Routing", + "x-return-types-displayReturn": true, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Route[]" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Route[]" + ], + "x-return-types-union": "array", + "x-description": [ + "Retrieve a list of objects containing route definitions for a specific environment. The definitions returned by", + "this endpoint are those present in an environment's `.upsun/config.yaml` file." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/routes/{routeId}": { + "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": "routeId" + } + ], + "operationId": "get-projects-environments-routes", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Route" + } + } + } + } + }, + "tags": [ + "Routing" + ], + "summary": "Get a route's info", + "description": "Get details of a route from an environment using the `id` of the entry\nretrieved by the [Get environment routes list](#tag/Environment-Routes%2Fpaths%2F~1projects~1%7BprojectId%7D~1environments~1%7BenvironmentId%7D~1routes%2Fget)\nendpoint.\n", + "x-property-id-kebab": "get-projects-environments-routes", + "x-tag-id-kebab": "Routing", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Route" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Route" + ], + "x-return-types-union": "\\Upsun\\Model\\Route", + "x-description": [ + "Get details of a route from an environment using the `id` of the entry retrieved by the Get environment routes", + "list", + "(https://docs.upsun.com/api/#tag/Environment-Routes/paths//projects/{projectId}/environments/{environmentId}/routes/get)", + "endpoint." + ] + } + }, + "/projects/{projectId}/environments/{environmentId}/deployments/{deploymentId}/operations": { + "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": "deploymentId" + } + ], + "operationId": "run-operation", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentOperationInput" + } + } + } + }, + "tags": [ + "Runtime Operations" + ], + "summary": "Execute a runtime operation", + "description": "Execute a runtime operation on a currently deployed environment. This allows you to run one-off commands, such as rebuilding static assets on demand, by defining an `operations` key in a project's `.upsun/config.yaml` configuration. More information on runtime operations is [available in our user documentation](https://docs.upsun.com/anchors/app/runtime-operations/).", + "x-property-id-kebab": "run-operation", + "x-tag-id-kebab": "Runtime-Operations", "x-return-types-displayReturn": false, - "x-return-types": {}, - "x-phpdoc": {}, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", "x-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." + "Execute a runtime operation on a currently deployed environment. This allows you to run one-off commands, such as", + "rebuilding static assets on demand, by defining an `operations` key in a project's `.upsun/config.yaml`", + "configuration. More information on runtime operations is [available in our user", + "documentation](https://docs.upsun.com/anchors/app/runtime-operations/)." ] } }, - "/ref/organizations": { + "/projects/{projectId}/environments/{environmentId}/deployments/{deploymentId}/sboms": { "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": [ { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, "schema": { "type": "string" }, - "in": "query", - "name": "in", - "description": "The list of comma-separated organization IDs generated by a trusted service.", - "required": true + "name": "environmentId" }, { + "in": "path", + "required": true, "schema": { "type": "string" }, - "in": "query", - "name": "sig", - "description": "The signature of this request generated by a trusted service.", - "required": true + "name": "deploymentId" } ], + "operationId": "list-projects-environments-deployments-sboms", "responses": { - "200": { - "description": "OK", + "default": { + "description": "", "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": "#/components/schemas/SbomCollection" } } } } }, - "x-property-id-kebab": "list-referenced-orgs", - "x-tag-id-kebab": "References", - "x-return-types-displayReturn": true, - "x-return-types": [ - "array" + "tags": [ + "Sbom" ], - "x-return-types-union": "array", + "x-property-id-kebab": "list-projects-environments-deployments-sboms", + "x-tag-id-kebab": "Sbom", + "x-return-types-displayReturn": true, "x-phpdoc": { - "return": "array" + "return": "\\Upsun\\Model\\Sbom[]" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, - "x-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." - ] + "x-return-types": [ + "\\Upsun\\Model\\Sbom[]" + ], + "x-return-types-union": "array" } }, - "/users/{user_id}/organizations": { + "/projects/{projectId}/environments/{environmentId}/deployments/{deploymentId}/sboms/{sbomServiceId}": { "get": { - "summary": "User organizations", - "description": "Retrieves organizations that the specified user is a member of.", - "operationId": "list-user-orgs", - "tags": [ - "Organizations" - ], "parameters": [ { - "$ref": "#/components/parameters/UserID" - }, - { - "in": "query", - "name": "filter[id]", - "description": "Allows filtering by `id` using one or more operators.", - "style": "deepObject", - "explode": true, - "schema": { - "$ref": "#/components/schemas/StringFilter" - } - }, - { - "in": "query", - "name": "filter[type]", - "description": "Allows filtering by `type` using one or more operators.", - "style": "deepObject", - "explode": true, - "schema": { - "$ref": "#/components/schemas/StringFilter" - } - }, - { - "in": "query", - "name": "filter[vendor]", - "description": "Allows filtering by `vendor` using one or more operators.\n", - "style": "deepObject", - "explode": true, - "schema": { - "$ref": "#/components/schemas/StringFilter" - } - }, - { - "in": "query", - "name": "filter[status]", - "description": "Allows filtering by `status` using one or more operators.
\nDefaults to `filter[status][in]=active,restricted,suspended`.\n", - "style": "deepObject", - "explode": true, - "schema": { - "$ref": "#/components/schemas/StringFilter" - } - }, - { - "in": "query", - "name": "filter[updated_at]", - "description": "Allows filtering by `updated_at` using one or more operators.", - "style": "deepObject", - "explode": true, - "schema": { - "$ref": "#/components/schemas/DateTimeFilter" - } - }, - { - "in": "query", - "name": "page[size]", - "description": "Determines the number of items to show.", + "in": "path", + "required": true, "schema": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": null - } + "type": "string" + }, + "name": "projectId" }, { - "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.", + "in": "path", + "required": true, "schema": { "type": "string" - } + }, + "name": "environmentId" }, { - "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.", + "in": "path", + "required": true, "schema": { "type": "string" - } + }, + "name": "deploymentId" }, { - "in": "query", - "name": "sort", - "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `name`, `label`, `created_at`, `updated_at`.\n", + "in": "path", + "required": true, "schema": { - "type": "string", - "example": "-updated_at" - } + "type": "string" + }, + "name": "sbomServiceId" } ], + "operationId": "get-projects-environments-deployments-sboms", "responses": { - "200": { - "description": "OK", + "default": { + "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Organization" - } - }, - "_links": { - "$ref": "#/components/schemas/ListLinks" - } - } + "$ref": "#/components/schemas/Sbom" } } } + } + }, + "tags": [ + "Sbom" + ], + "x-property-id-kebab": "get-projects-environments-deployments-sboms", + "x-tag-id-kebab": "Sbom", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Sbom" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Sbom" + ], + "x-return-types-union": "\\Upsun\\Model\\Sbom" + } + }, + "/projects/{projectId}/environments/{environmentId}/source-operation": { + "post": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" }, - "400": { - "description": "Bad Request", + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" + } + ], + "operationId": "run-source-operation", + "responses": { + "default": { + "description": "", "content": { - "application/problem+json": { + "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/AcceptedResponse" } } } - }, - "403": { - "description": "Forbidden", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentSourceOperationInput" } } } }, - "x-property-id-kebab": "list-user-orgs", - "x-tag-id-kebab": "Organizations", - "x-return-types-displayReturn": false, - "x-return-types": [ - "object" + "tags": [ + "Source Operations" ], + "summary": "Trigger a source operation", + "description": "This endpoint triggers a source code operation 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/reference/source/operations/).\n", + "x-property-id-kebab": "run-source-operation", + "x-tag-id-kebab": "Source-Operations", + "x-return-types-displayReturn": false, "x-phpdoc": { - "return": "object" + "return": "\\Upsun\\Model\\AcceptedResponse" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", "x-description": [ - "Retrieves organizations that the specified user is a member of." + "This endpoint triggers a source code operation as defined in the `source.operations` key in a project's", + "`.upsun/config.yaml` configuration. More information on source code operations is [available in our user", + "documentation](https://docs.upsun.com/anchors/app/reference/source/operations/)." ] } }, - "/organizations": { + "/projects/{projectId}/environments/{environmentId}/source-operations": { "get": { - "summary": "List organizations", - "description": "Non-admin users will only see organizations they are members of.", - "operationId": "list-orgs", - "tags": [ - "Organizations" - ], "parameters": [ { - "in": "query", - "name": "filter[id]", - "description": "Allows filtering by `id` using one or more operators.", - "style": "deepObject", - "explode": true, - "schema": { - "$ref": "#/components/schemas/StringFilter" - } - }, - { - "in": "query", - "name": "filter[type]", - "description": "Allows filtering by `type` using one or more operators.\n", - "style": "deepObject", - "explode": true, - "schema": { - "$ref": "#/components/schemas/StringFilter" - } - }, - { - "in": "query", - "name": "filter[owner_id]", - "description": "Allows filtering by `owner_id` using one or more operators.", - "style": "deepObject", - "explode": true, - "schema": { - "$ref": "#/components/schemas/StringFilter" - } - }, - { - "in": "query", - "name": "filter[name]", - "description": "Allows filtering by `name` using one or more operators.", - "style": "deepObject", - "explode": true, - "schema": { - "$ref": "#/components/schemas/StringFilter" - } - }, - { - "in": "query", - "name": "filter[label]", - "description": "Allows filtering by `label` using one or more operators.", - "style": "deepObject", - "explode": true, - "schema": { - "$ref": "#/components/schemas/StringFilter" - } - }, - { - "in": "query", - "name": "filter[billing_profile_id]", - "description": "Allows filtering by `billing_profile_id` using one or more operators.", - "style": "deepObject", - "explode": true, - "schema": { - "$ref": "#/components/schemas/StringFilter" - } - }, - { - "in": "query", - "name": "filter[vendor]", - "description": "Allows filtering by `vendor` using one or more operators.\n", - "style": "deepObject", - "explode": true, - "schema": { - "$ref": "#/components/schemas/StringFilter" - } - }, - { - "in": "query", - "name": "filter[capabilities]", - "description": "Allows filtering by `capabilites` using one or more operators.", - "style": "deepObject", - "explode": true, - "schema": { - "$ref": "#/components/schemas/ArrayFilter" - } - }, - { - "in": "query", - "name": "filter[status]", - "description": "Allows filtering by `status` using one or more operators.
\nDefaults to `filter[status][in]=active,restricted,suspended`.\n", - "style": "deepObject", - "explode": true, - "schema": { - "$ref": "#/components/schemas/StringFilter" - } - }, - { - "in": "query", - "name": "filter[updated_at]", - "description": "Allows filtering by `updated_at` using one or more operators.", - "style": "deepObject", - "explode": true, - "schema": { - "$ref": "#/components/schemas/DateTimeFilter" - } - }, - { - "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.", + "in": "path", + "required": true, "schema": { "type": "string" - } + }, + "name": "projectId" }, { - "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.", + "in": "path", + "required": true, "schema": { "type": "string" - } - }, - { - "in": "query", - "name": "sort", - "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `name`, `label`, `created_at`, `updated_at`.\n", - "schema": { - "type": "string", - "example": "-updated_at" - } + }, + "name": "environmentId" } ], + "operationId": "list-projects-environments-source-operations", "responses": { - "200": { - "description": "OK", + "default": { + "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number of items across pages." - }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Organization" - } - }, - "_links": { - "$ref": "#/components/schemas/ListLinks" - } - } + "$ref": "#/components/schemas/EnvironmentSourceOperationCollection" } } } - }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + } + }, + "tags": [ + "Source Operations" + ], + "summary": "List source operations", + "description": "Lists all the source operations, defined in `.upsun/config.yaml`, that are available in an environment.\nMore information on source code operations is\n[available in our user documentation](https://docs.upsun.com/anchors/app/reference/source/operations/).\n", + "x-property-id-kebab": "list-projects-environments-source-operations", + "x-tag-id-kebab": "Source-Operations", + "x-return-types-displayReturn": true, + "x-phpdoc": { + "return": "\\Upsun\\Model\\EnvironmentSourceOperation[]" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\EnvironmentSourceOperation[]" + ], + "x-return-types-union": "array", + "x-description": [ + "Lists all the source operations, defined in `.upsun/config.yaml`, that are available in an environment. More", + "information on source code operations is [available in our user", + "documentation](https://docs.upsun.com/anchors/app/reference/source/operations/)." + ] + } + }, + "/ssh_keys/{key_id}": { + "get": { + "tags": [ + "Ssh Keys" + ], + "summary": "Get an SSH key", + "operationId": "get-ssh-key", + "parameters": [ + { + "name": "key_id", + "in": "path", + "description": "The ID of the ssh key.", + "required": true, + "schema": { + "type": "integer" } - }, - "403": { - "description": "Forbidden", + } + ], + "responses": { + "200": { + "description": "A single SSH public key record.", "content": { - "application/problem+json": { + "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/SshKey" } } } } }, - "x-property-id-kebab": "list-orgs", - "x-tag-id-kebab": "Organizations", + "x-property-id-kebab": "get-ssh-key", + "x-tag-id-kebab": "Ssh-Keys", "x-return-types-displayReturn": false, - "x-return-types": [ - "object" - ], "x-phpdoc": { - "return": "object" + "return": "\\Upsun\\Model\\SshKey" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, - "x-description": [ - "Non-admin users will only see organizations they are members of." - ] + "x-return-types": [ + "\\Upsun\\Model\\SshKey" + ], + "x-return-types-union": "\\Upsun\\Model\\SshKey" }, + "delete": { + "tags": [ + "Ssh Keys" + ], + "summary": "Delete an SSH key", + "operationId": "delete-ssh-key", + "parameters": [ + { + "name": "key_id", + "in": "path", + "description": "The ID of the ssh key.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Success." + } + }, + "x-property-id-kebab": "delete-ssh-key", + "x-tag-id-kebab": "Ssh-Keys", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void" + } + }, + "/ssh_keys": { "post": { - "summary": "Create organization", - "description": "Creates a new organization.", - "operationId": "create-org", "tags": [ - "Organizations" + "Ssh Keys" ], + "summary": "Add a new public SSH key to a user", + "operationId": "create-ssh-key", "requestBody": { - "required": true, "content": { "application/json": { "schema": { - "type": "object", "required": [ - "label" + "value" ], "properties": { - "type": { - "type": "string", - "description": "The type of the organization.", - "enum": [ - "fixed", - "flexible" - ] - }, - "owner_id": { - "type": "string", - "format": "uuid", - "description": "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." + "value": { + "description": "The value of the ssh key.", + "type": "string" }, - "country": { - "type": "string", - "description": "The organization country (2-letter country code).", - "maxLength": 2 + "title": { + "description": "The title of the ssh key.", + "type": "string" }, - "security_contact": { - "type": "string", - "format": "email", - "description": "The security contact email address for the organization." + "uuid": { + "description": "The uuid of the user.", + "type": "string" } - } + }, + "type": "object" } } } }, "responses": { "201": { - "description": "Created", + "description": "The newly created ssh key.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Organization" - } - } - } - }, - "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": "#/components/schemas/SshKey" } } } } }, - "x-property-id-kebab": "create-org", - "x-tag-id-kebab": "Organizations", + "x-property-id-kebab": "create-ssh-key", + "x-tag-id-kebab": "Ssh-Keys", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Organization" - ], - "x-return-types-union": "\\Upsun\\Model\\Organization", "x-phpdoc": { - "return": "\\Upsun\\Model\\Organization" + "return": "\\Upsun\\Model\\SshKey" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, - "x-description": [ - "Creates a new organization." - ] + "x-return-types": [ + "\\Upsun\\Model\\SshKey" + ], + "x-return-types-union": "\\Upsun\\Model\\SshKey" } }, - "/organizations/{organization_id}": { + "/subscriptions/{subscriptionId}/can-update": { "get": { - "summary": "Get organization", - "description": "Retrieves the specified organization.", - "operationId": "get-org", "tags": [ - "Organizations" + "Subscriptions" ], + "summary": "Checks if the user is able to update a project.", + "operationId": "can-update-subscription", "parameters": [ { - "$ref": "#/components/parameters/OrganizationIDName" + "$ref": "#/components/parameters/subscription_id" + }, + { + "$ref": "#/components/parameters/subscription_plan" + }, + { + "$ref": "#/components/parameters/subscription_environments" + }, + { + "$ref": "#/components/parameters/subscription_storage" + }, + { + "$ref": "#/components/parameters/subscription_user_licenses" } ], "responses": { "200": { - "description": "OK", + "description": "Check result with error message if presented", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Organization" - } - } - } - }, - "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" + "properties": { + "can_update": { + "description": "Boolean result of the check.", + "type": "boolean" + }, + "message": { + "description": "Details in case of negative check result.", + "type": "string" + }, + "required_action": { + "description": "Required action impeding project update.", + "type": "object" + } + }, + "type": "object" } } } } }, - "x-property-id-kebab": "get-org", - "x-tag-id-kebab": "Organizations", + "x-property-id-kebab": "can-update-subscription", + "x-tag-id-kebab": "Subscriptions", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Organization" - ], - "x-return-types-union": "\\Upsun\\Model\\Organization", "x-phpdoc": { - "return": "\\Upsun\\Model\\Organization" + "return": "object" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, - "x-description": [ - "Retrieves the specified organization." + "x-return-types": [ + "object" ] - }, - "patch": { - "summary": "Update organization", - "description": "Updates the specified organization.", - "operationId": "update-org", + } + }, + "/subscriptions/{subscriptionId}/can-afford": { + "post": { "tags": [ - "Organizations" + "Subscriptions" ], + "summary": "Checks if the user can afford the requested resources.", + "operationId": "can-afford-subscription", "parameters": [ { - "$ref": "#/components/parameters/OrganizationID" + "$ref": "#/components/parameters/subscription_id" } ], "requestBody": { "content": { "application/json": { "schema": { - "type": "object", "properties": { - "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 - }, - "billing_profile_id": { - "type": "string", - "description": "The billing profile ID." - }, - "security_contact": { - "type": "string", - "format": "email", - "description": "The security contact email address for the organization." + "resources": { + "description": "A map of resource keys to quantities (both strings).", + "type": "object", + "additionalProperties": {} } - } + }, + "type": "object" } } } }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Organization" - } - } + "description": "Proposed resource change is affordable." + }, + "402": { + "description": "Proposed change is not affordable." + } + }, + "x-property-id-kebab": "can-afford-subscription", + "x-tag-id-kebab": "Subscriptions", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void" + } + }, + "/organizations/{organization_id}/subscriptions/estimate": { + "get": { + "summary": "Estimate the price of a new subscription", + "operationId": "estimate-new-org-subscription", + "tags": [ + "Subscriptions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + }, + { + "in": "query", + "name": "plan", + "description": "The plan type of the subscription.", + "required": true, + "schema": { + "type": "string" } }, - "400": { - "description": "Bad Request", + { + "in": "query", + "name": "environments", + "description": "The maximum number of environments which can be provisioned on the project.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "storage", + "description": "The total storage available to each environment, in MiB.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "user_licenses", + "description": "The number of user licenses.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "format", + "description": "The format of the estimation output.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "formatted", + "complex" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", "content": { - "application/problem+json": { + "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/EstimationObject" } } } @@ -25258,39 +25940,29 @@ } } } - }, - "409": { - "description": "Conflict - Organization already has a billing profile attached", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } } }, - "x-property-id-kebab": "update-org", - "x-tag-id-kebab": "Organizations", + "x-property-id-kebab": "estimate-new-org-subscription", + "x-tag-id-kebab": "Subscriptions", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Organization" - ], - "x-return-types-union": "\\Upsun\\Model\\Organization", "x-phpdoc": { - "return": "\\Upsun\\Model\\Organization" + "return": "\\Upsun\\Model\\EstimationObject" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, - "x-description": [ - "Updates the specified organization." - ] - }, - "delete": { - "summary": "Delete organization", - "description": "Deletes the specified organization.", - "operationId": "delete-org", + "x-return-types": [ + "\\Upsun\\Model\\EstimationObject" + ], + "x-return-types-union": "\\Upsun\\Model\\EstimationObject" + } + }, + "/organizations/{organization_id}/subscriptions/can-create": { + "get": { + "summary": "Checks if the user is able to create a new project.", + "operationId": "can-create-new-org-subscription", "tags": [ - "Organizations" + "Subscriptions" ], "parameters": [ { @@ -25298,15 +25970,47 @@ } ], "responses": { - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request", + "200": { + "description": "OK", "content": { - "application/problem+json": { + "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "properties": { + "can_create": { + "description": "Boolean result of the check.", + "type": "boolean" + }, + "message": { + "description": "Details in case of negative check result.", + "type": "string" + }, + "required_action": { + "description": "Required action impending project creation.", + "type": "object", + "nullable": true, + "properties": { + "action": { + "description": "Machine readable definition of requirement.", + "type": "string" + }, + "type": { + "description": "Specification of the type of action.", + "type": "string" + }, + "credentials": { + "description": "Any credentials required to fulfill the requirement.", + "type": "object", + "nullable": true + }, + "reference": { + "description": "Reference to object that requires changes to fulfill the requirement, e.g. project ID.", + "type": "string", + "nullable": true + } + } + } + }, + "type": "object" } } } @@ -25332,31 +26036,78 @@ } } }, - "x-property-id-kebab": "delete-org", - "x-tag-id-kebab": "Organizations", + "x-property-id-kebab": "can-create-new-org-subscription", + "x-tag-id-kebab": "Subscriptions", "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "object" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, "x-return-types": [ - "void" - ], - "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false, - "x-description": [ - "Deletes the specified organization." + "object" ] } }, - "/organizations/{organization_id}/mfa-enforcement": { + "/organizations/{organization_id}/subscriptions/{subscription_id}/estimate": { "get": { - "summary": "Get organization MFA settings", - "description": "Retrieves MFA settings for the specified organization.", - "operationId": "get-org-mfa-enforcement", + "summary": "Estimate the price of a subscription", + "operationId": "estimate-org-subscription", "tags": [ - "Mfa" + "Subscriptions" ], "parameters": [ { - "$ref": "#/components/parameters/OrganizationIDName" + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/SubscriptionID" + }, + { + "in": "query", + "name": "plan", + "description": "The plan type of the subscription.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "environments", + "description": "The maximum number of environments which can be provisioned on the project.", + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "storage", + "description": "The total storage available to each environment, in MiB.", + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "user_licenses", + "description": "The number of user licenses.", + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "format", + "description": "The format of the estimation output.", + "schema": { + "type": "string", + "enum": [ + "formatted", + "complex" + ] + } } ], "responses": { @@ -25365,7 +26116,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrganizationMfaEnforcement" + "$ref": "#/components/schemas/EstimationObject" } } } @@ -25373,7 +26124,7 @@ "403": { "description": "Forbidden", "content": { - "application/json": { + "application/problem+json": { "schema": { "$ref": "#/components/schemas/Error" } @@ -25381,85 +26132,67 @@ } } }, - "x-property-id-kebab": "get-org-mfa-enforcement", - "x-tag-id-kebab": "Mfa", + "x-property-id-kebab": "estimate-org-subscription", + "x-tag-id-kebab": "Subscriptions", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\OrganizationMfaEnforcement" - ], - "x-return-types-union": "\\Upsun\\Model\\OrganizationMfaEnforcement", "x-phpdoc": { - "return": "\\Upsun\\Model\\OrganizationMfaEnforcement" + "return": "\\Upsun\\Model\\EstimationObject" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, - "x-description": [ - "Retrieves MFA settings for the specified organization." - ] + "x-return-types": [ + "\\Upsun\\Model\\EstimationObject" + ], + "x-return-types-union": "\\Upsun\\Model\\EstimationObject" } }, - "/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", + "/organizations/{organization_id}/subscriptions/{subscription_id}/current_usage": { + "get": { + "summary": "Get current usage for a subscription", + "operationId": "get-org-subscription-current-usage", "tags": [ - "Mfa" + "Subscriptions" ], "parameters": [ { "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/SubscriptionID" + }, + { + "in": "query", + "name": "usage_groups", + "description": "A list of usage groups to retrieve current usage for.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "include_not_charged", + "description": "Whether to include not charged usage groups.", + "schema": { + "type": "boolean" + } } ], "responses": { - "204": { - "description": "No Content" - }, - "403": { - "description": "Forbidden", + "200": { + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/SubscriptionCurrentUsageObject" } } } - } - }, - "x-property-id-kebab": "enable-org-mfa-enforcement", - "x-tag-id-kebab": "Mfa", - "x-return-types-displayReturn": false, - "x-return-types": [ - "void" - ], - "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false, - "x-description": [ - "Enables MFA enforcement for the specified organization." - ] - } - }, - "/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": { + "application/problem+json": { "schema": { "$ref": "#/components/schemas/Error" } @@ -25467,83 +26200,43 @@ } } }, - "x-property-id-kebab": "disable-org-mfa-enforcement", - "x-tag-id-kebab": "Mfa", + "x-property-id-kebab": "get-org-subscription-current-usage", + "x-tag-id-kebab": "Subscriptions", "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\SubscriptionCurrentUsageObject" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, "x-return-types": [ - "void" + "\\Upsun\\Model\\SubscriptionCurrentUsageObject" ], - "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false, - "x-description": [ - "Disables MFA enforcement for the specified organization." - ] + "x-return-types-union": "\\Upsun\\Model\\SubscriptionCurrentUsageObject" } }, - "/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", + "/organizations/{organization_id}/subscriptions/{subscription_id}/addons": { + "get": { + "summary": "List addons for a subscription", + "operationId": "list-subscription-addons", "tags": [ - "Mfa" + "Subscriptions" ], "parameters": [ { "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/SubscriptionID" } ], - "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" + "$ref": "#/components/schemas/SubscriptionAddonsObject" } } } @@ -25551,7 +26244,7 @@ "403": { "description": "Forbidden", "content": { - "application/json": { + "application/problem+json": { "schema": { "$ref": "#/components/schemas/Error" } @@ -25559,76 +26252,36 @@ } } }, - "x-property-id-kebab": "send-org-mfa-reminders", - "x-tag-id-kebab": "Mfa", + "x-vendor": "upsun", + "x-property-id-kebab": "list-subscription-addons", + "x-tag-id-kebab": "Subscriptions", "x-return-types-displayReturn": false, - "x-return-types": {}, "x-phpdoc": { - "return": true + "return": "\\Upsun\\Model\\SubscriptionAddonsObject" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, - "x-description": [ - "Sends a reminder about setting up MFA to the specified organization members." - ] + "x-return-types": [ + "\\Upsun\\Model\\SubscriptionAddonsObject" + ], + "x-return-types-union": "\\Upsun\\Model\\SubscriptionAddonsObject" } }, - "/organizations/{organization_id}/members": { + "/organizations/{organization_id}/alerts/subscriptions/{subscription_id}/usage": { "get": { - "summary": "List organization members", - "description": "Accessible to organization owners and members with the \"manage members\" permission.", - "operationId": "list-org-members", + "summary": "Get usage alerts", + "description": "Retrieves current and available usage alerts.", + "operationId": "get-subscription-usage-alerts", "tags": [ - "Organization Members" + "Subscriptions" ], "parameters": [ { "$ref": "#/components/parameters/OrganizationIDName" }, { - "in": "query", - "name": "filter[permissions]", - "description": "Allows filtering by `permissions` using one or more operators.", - "style": "deepObject", - "explode": true, - "schema": { - "$ref": "#/components/schemas/ArrayFilter" - } - }, - { - "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.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `created_at`, `updated_at`.\n", - "schema": { - "type": "string", - "example": "-updated_at" - } + "$ref": "#/components/parameters/SubscriptionID" } ], "responses": { @@ -25639,34 +26292,25 @@ "schema": { "type": "object", "properties": { - "count": { - "type": "integer", - "description": "Total number of items across pages." - }, - "items": { + "current": { "type": "array", + "description": "The list of currently set usage alerts.", "items": { - "$ref": "#/components/schemas/OrganizationMember" + "$ref": "#/components/schemas/UsageAlert" } }, - "_links": { - "$ref": "#/components/schemas/ListLinks" + "available": { + "type": "array", + "description": "The list of available usage alerts.", + "items": { + "$ref": "#/components/schemas/UsageAlert" + } } } } } } }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, "403": { "description": "Forbidden", "content": { @@ -25688,49 +26332,70 @@ } } }, - "x-property-id-kebab": "list-org-members", - "x-tag-id-kebab": "Organization-Members", + "x-property-id-kebab": "get-subscription-usage-alerts", + "x-tag-id-kebab": "Subscriptions", "x-return-types-displayReturn": false, - "x-return-types": [ - "object" - ], "x-phpdoc": { "return": "object" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "object" + ], "x-description": [ - "Accessible to organization owners and members with the \"manage members\" permission." + "Retrieves current and available usage alerts." ] }, - "post": { - "summary": "Create organization member", - "description": "Creates a new organization member.", - "operationId": "create-org-member", + "patch": { + "summary": "Update usage alerts.", + "description": "Updates usage alerts for a subscription.", + "operationId": "update-subscription-usage-alerts", "tags": [ - "Organization Members" + "Subscriptions" ], "parameters": [ { - "$ref": "#/components/parameters/OrganizationID" + "$ref": "#/components/parameters/OrganizationIDName" + }, + { + "$ref": "#/components/parameters/SubscriptionID" } ], "requestBody": { - "required": true, "content": { "application/json": { "schema": { "type": "object", - "required": [ - "user_id" - ], "properties": { - "user_id": { - "type": "string", - "format": "uuid", - "description": "ID of the user." - }, - "permissions": { - "$ref": "#/components/schemas/Permissions" + "alerts": { + "type": "array", + "description": "The list of alerts to update.", + "items": { + "type": "object", + "description": "An alert object.", + "properties": { + "id": { + "type": "string", + "description": "The usage alert identifier." + }, + "active": { + "type": "boolean", + "description": "Whether the alert is activated." + }, + "config": { + "type": "object", + "description": "The configuration for the usage alerts.", + "properties": { + "threshold": { + "type": "integer", + "description": "The amount after which an alert should be triggered." + } + } + } + } + } } } } @@ -25738,22 +26403,28 @@ } }, "responses": { - "201": { - "description": "Created", + "200": { + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrganizationMember" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" + "type": "object", + "properties": { + "current": { + "type": "array", + "description": "The list of currently set usage alerts.", + "items": { + "$ref": "#/components/schemas/UsageAlert" + } + }, + "available": { + "type": "array", + "description": "The list of available usage alerts.", + "items": { + "$ref": "#/components/schemas/UsageAlert" + } + } + } } } } @@ -25779,36 +26450,96 @@ } } }, - "x-property-id-kebab": "create-org-member", - "x-tag-id-kebab": "Organization-Members", + "x-property-id-kebab": "update-subscription-usage-alerts", + "x-tag-id-kebab": "Subscriptions", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\OrganizationMember" - ], - "x-return-types-union": "\\Upsun\\Model\\OrganizationMember", "x-phpdoc": { - "return": "\\Upsun\\Model\\OrganizationMember" + "return": "object" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "object" + ], "x-description": [ - "Creates a new organization member." + "Updates usage alerts for a subscription." ] } }, - "/organizations/{organization_id}/members/{user_id}": { + "/organizations/{organization_id}/subscriptions": { "get": { - "summary": "Get organization member", - "description": "Retrieves the specified organization member.", - "operationId": "get-org-member", + "summary": "List subscriptions", + "description": "Retrieves subscriptions for the specified organization.", + "operationId": "list-org-subscriptions", "tags": [ - "Organization Members" + "Subscriptions" ], "parameters": [ { - "$ref": "#/components/parameters/OrganizationIDName" + "$ref": "#/components/parameters/OrganizationID" }, { - "$ref": "#/components/parameters/UserID" + "name": "filter[status]", + "in": "query", + "description": "The status of the subscription. ", + "schema": { + "type": "string", + "enum": [ + "requested", + "active", + "failed", + "suspended", + "deleted" + ] + } + }, + { + "name": "filter[id]", + "in": "query", + "description": "Allows filtering by subscription `id` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "$ref": "#/components/parameters/FilterProjectID" + }, + { + "name": "filter[project_title]", + "in": "query", + "description": "Allows filtering by `project_title` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "$ref": "#/components/parameters/FilterRegion" + }, + { + "$ref": "#/components/parameters/FilterUpdatedAt" + }, + { + "$ref": "#/components/parameters/PageSize" + }, + { + "$ref": "#/components/parameters/PageBefore" + }, + { + "$ref": "#/components/parameters/PageAfter" + }, + { + "name": "sort", + "in": "query", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `region`, `project_title`, `type`, `plan`, `status`, `created_at`, `updated_at`.\n", + "schema": { + "type": "string", + "example": "-updated_at" + } } ], "responses": { @@ -25817,70 +26548,100 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrganizationMember" + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "Total number of items across pages." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Subscription" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + }, + "additionalProperties": false } } } }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "403": { - "description": "Forbidden", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } + "$ref": "#/components/responses/Forbidden" }, "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } + "$ref": "#/components/responses/NotFound" } }, - "x-property-id-kebab": "get-org-member", - "x-tag-id-kebab": "Organization-Members", + "x-property-id-kebab": "list-org-subscriptions", + "x-tag-id-kebab": "Subscriptions", "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, "x-return-types": [ - "\\Upsun\\Model\\OrganizationMember" + "mixed" ], - "x-return-types-union": "\\Upsun\\Model\\OrganizationMember", - "x-phpdoc": { - "return": "\\Upsun\\Model\\OrganizationMember" - }, - "x-returnable": true, + "x-return-types-union": "mixed", "x-description": [ - "Retrieves the specified organization member." + "Retrieves subscriptions for the specified organization." ] }, - "patch": { - "summary": "Update organization member", - "description": "Updates the specified organization member.", - "operationId": "update-org-member", + "post": { + "summary": "Create subscription", + "description": "Creates a subscription for the specified organization.", + "operationId": "create-org-subscription", "tags": [ - "Organization Members" + "Subscriptions" ], "parameters": [ { "$ref": "#/components/parameters/OrganizationID" - }, - { - "$ref": "#/components/parameters/UserID" } ], "requestBody": { + "required": true, "content": { "application/json": { "schema": { "type": "object", + "required": [ + "project_region" + ], "properties": { - "permissions": { - "$ref": "#/components/schemas/Permissions" + "plan": { + "$ref": "#/components/schemas/ProjectPlan" + }, + "project_region": { + "type": "string", + "description": "The machine name of the region where the project is located. Cannot be changed after project creation." + }, + "project_title": { + "type": "string", + "description": "The name given to the project. Appears as the title in the UI." + }, + "options_url": { + "type": "string", + "description": "The URL of the project options file." + }, + "default_branch": { + "type": "string", + "description": "The default Git branch name for the project." + }, + "environments": { + "type": "integer", + "description": "The maximum number of active environments on the project." + }, + "storage": { + "type": "integer", + "description": "The total storage available to each environment, in MiB. Only multiples of 1024 are accepted as legal values." } } } @@ -25888,127 +26649,58 @@ } }, "responses": { - "200": { - "description": "OK", + "201": { + "description": "Created", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrganizationMember" + "$ref": "#/components/schemas/Subscription" } } } }, "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } + "$ref": "#/components/responses/BadRequest" }, "403": { - "description": "Forbidden", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } + "$ref": "#/components/responses/Forbidden" }, "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } + "$ref": "#/components/responses/NotFound" } }, - "x-property-id-kebab": "update-org-member", - "x-tag-id-kebab": "Organization-Members", + "x-property-id-kebab": "create-org-subscription", + "x-tag-id-kebab": "Subscriptions", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\OrganizationMember" - ], - "x-return-types-union": "\\Upsun\\Model\\OrganizationMember", "x-phpdoc": { - "return": "\\Upsun\\Model\\OrganizationMember" + "return": "\\Upsun\\Model\\Subscription" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, - "x-description": [ - "Updates the specified organization member." - ] - }, - "delete": { - "summary": "Delete organization member", - "description": "Deletes the specified organization member.", - "operationId": "delete-org-member", - "tags": [ - "Organization Members" - ], - "parameters": [ - { - "$ref": "#/components/parameters/OrganizationID" - }, - { - "$ref": "#/components/parameters/UserID" - } - ], - "responses": { - "204": { - "description": "No Content" - }, - "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-property-id-kebab": "delete-org-member", - "x-tag-id-kebab": "Organization-Members", - "x-return-types-displayReturn": false, "x-return-types": [ - "void" + "\\Upsun\\Model\\Subscription" ], - "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false, + "x-return-types-union": "\\Upsun\\Model\\Subscription", "x-description": [ - "Deletes the specified organization member." + "Creates a subscription for the specified organization." ] } }, - "/organizations/{organization_id}/address": { + "/organizations/{organization_id}/subscriptions/{subscription_id}": { "get": { - "summary": "Get address", - "description": "Retrieves the address for the specified organization.", - "operationId": "get-org-address", + "summary": "Get subscription", + "description": "Retrieves a subscription for the specified organization.", + "operationId": "get-org-subscription", "tags": [ - "Profiles" + "Subscriptions" ], "parameters": [ { - "$ref": "#/components/parameters/OrganizationIDName" + "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/SubscriptionID" } ], "responses": { @@ -26017,64 +26709,102 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Address" + "$ref": "#/components/schemas/Subscription" } } } }, "403": { - "description": "Forbidden", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } + "$ref": "#/components/responses/Forbidden" }, "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } + "$ref": "#/components/responses/NotFound" } }, - "x-property-id-kebab": "get-org-address", - "x-tag-id-kebab": "Profiles", + "x-property-id-kebab": "get-org-subscription", + "x-tag-id-kebab": "Subscriptions", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Address" - ], - "x-return-types-union": "\\Upsun\\Model\\Address", "x-phpdoc": { - "return": "\\Upsun\\Model\\Address" + "return": "\\Upsun\\Model\\Subscription" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Subscription" + ], + "x-return-types-union": "\\Upsun\\Model\\Subscription", "x-description": [ - "Retrieves the address for the specified organization." + "Retrieves a subscription for the specified organization." ] }, "patch": { - "summary": "Update address", - "description": "Updates the address for the specified organization.", - "operationId": "update-org-address", + "summary": "Update subscription", + "description": "Updates a subscription for the specified organization.", + "operationId": "update-org-subscription", "tags": [ - "Profiles" + "Subscriptions" ], "parameters": [ { "$ref": "#/components/parameters/OrganizationID" + }, + { + "$ref": "#/components/parameters/SubscriptionID" } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Address" + "type": "object", + "properties": { + "project_title": { + "$ref": "#/components/schemas/ProjectTitle" + }, + "plan": { + "$ref": "#/components/schemas/ProjectPlan" + }, + "timezone": { + "$ref": "#/components/schemas/ProjectTimeZone" + }, + "environments": { + "type": "integer", + "description": "The maximum number of environments which can be provisioned on the project." + }, + "storage": { + "type": "integer", + "description": "The total storage available to each environment, in MiB." + }, + "big_dev": { + "type": "string", + "description": "The development environment plan." + }, + "big_dev_service": { + "type": "string", + "description": "The development service plan." + }, + "backups": { + "type": "string", + "description": "The backups plan." + }, + "observability_suite": { + "type": "string", + "description": "The observability suite option." + }, + "blackfire": { + "type": "string", + "description": "The Blackfire integration option." + }, + "continuous_profiling": { + "type": "string", + "description": "The Blackfire continuous profiling option." + }, + "project_support_level": { + "type": "string", + "description": "The project uptime option." + } + } } } } @@ -26085,918 +26815,830 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Address" + "$ref": "#/components/schemas/Subscription" } } } }, "400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } + "$ref": "#/components/responses/BadRequest" }, "403": { - "description": "Forbidden", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } + "$ref": "#/components/responses/Forbidden" }, "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } + "$ref": "#/components/responses/NotFound" } }, - "x-property-id-kebab": "update-org-address", - "x-tag-id-kebab": "Profiles", + "x-property-id-kebab": "update-org-subscription", + "x-tag-id-kebab": "Subscriptions", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Address" - ], - "x-return-types-union": "\\Upsun\\Model\\Address", "x-phpdoc": { - "return": "\\Upsun\\Model\\Address" + "return": "\\Upsun\\Model\\Subscription" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Subscription" + ], + "x-return-types-union": "\\Upsun\\Model\\Subscription", "x-description": [ - "Updates the address for the specified organization." + "Updates a subscription for the specified organization." ] - } - }, - "/organizations/{organization_id}/invoices": { - "get": { - "summary": "List invoices", - "description": "Retrieves a list of invoices for the specified organization.", - "operationId": "list-org-invoices", + }, + "delete": { + "summary": "Delete subscription", + "description": "Deletes a subscription for the specified organization.", + "operationId": "delete-org-subscription", "tags": [ - "Invoices" + "Subscriptions" ], "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/OrganizationID" }, { - "$ref": "#/components/parameters/page" + "$ref": "#/components/parameters/SubscriptionID" } ], "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Invoice" - } - } - } - } - } - } + "204": { + "$ref": "#/components/responses/NoContent" + }, + "400": { + "$ref": "#/components/responses/BadRequest" }, "403": { - "description": "Forbidden", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } + "$ref": "#/components/responses/Forbidden" }, "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } + "$ref": "#/components/responses/NotFound" } }, - "x-property-id-kebab": "list-org-invoices", - "x-tag-id-kebab": "Invoices", + "x-property-id-kebab": "delete-org-subscription", + "x-tag-id-kebab": "Subscriptions", "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, "x-return-types": [ - "object" + "void" ], - "x-phpdoc": { - "return": "object" - }, - "x-returnable": true, + "x-return-types-union": "void", "x-description": [ - "Retrieves a list of invoices for the specified organization." + "Deletes a subscription for the specified organization." ] } }, - "/organizations/{organization_id}/invoices/{invoice_id}": { + "/tickets": { "get": { - "summary": "Get invoice", - "description": "Retrieves an invoice for the specified organization.", - "operationId": "get-org-invoice", - "tags": [ - "Invoices" - ], + "summary": "List support tickets", + "operationId": "list-tickets", "parameters": [ { - "$ref": "#/components/parameters/InvoiceID" + "$ref": "#/components/parameters/filter_ticket_id" }, { - "$ref": "#/components/parameters/OrganizationIDName" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Invoice" - } - } - } + "$ref": "#/components/parameters/filter_created" }, - "403": { - "description": "Forbidden", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } + { + "$ref": "#/components/parameters/filter_updated" }, - "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - }, - "x-property-id-kebab": "get-org-invoice", - "x-tag-id-kebab": "Invoices", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Invoice" - ], - "x-return-types-union": "\\Upsun\\Model\\Invoice", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Invoice" - }, - "x-returnable": true, - "x-description": [ - "Retrieves an invoice for the specified organization." - ] - } - }, - "/organizations/{organization_id}/profile": { - "get": { - "summary": "Get profile", - "description": "Retrieves the profile for the specified organization.", - "operationId": "get-org-profile", - "tags": [ - "Profiles" - ], - "parameters": [ { - "$ref": "#/components/parameters/OrganizationIDName" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Profile" - } - } - } + "$ref": "#/components/parameters/filter_type" }, - "403": { - "description": "Forbidden", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } + { + "$ref": "#/components/parameters/filter_priority" + }, + { + "$ref": "#/components/parameters/filter_ticket_status" + }, + { + "$ref": "#/components/parameters/filter_requester_id" + }, + { + "$ref": "#/components/parameters/filter_submitter_id" + }, + { + "$ref": "#/components/parameters/filter_assignee_id" + }, + { + "$ref": "#/components/parameters/filter_has_incidents" + }, + { + "$ref": "#/components/parameters/filter_due" + }, + { + "name": "search", + "in": "query", + "description": "Search string for the ticket subject and description.", + "schema": { + "type": "string" } }, - "404": { - "description": "Not Found", + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "description": "The list of tickets.", "content": { - "application/problem+json": { + "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "properties": { + "count": { + "description": "Total number of results.", + "type": "integer" + }, + "tickets": { + "description": "Array of support tickets.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Ticket" + } + }, + "_links": { + "$ref": "#/components/schemas/HalLinks" + } + }, + "type": "object" } } } } }, - "x-property-id-kebab": "get-org-profile", - "x-tag-id-kebab": "Profiles", + "x-property-id-kebab": "list-tickets", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Profile" - ], - "x-return-types-union": "\\Upsun\\Model\\Profile", "x-phpdoc": { - "return": "\\Upsun\\Model\\Profile" + "return": "object" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, - "x-description": [ - "Retrieves the profile for the specified organization." + "x-return-types": [ + "object" ] }, - "patch": { - "summary": "Update profile", - "description": "Updates the profile for the specified organization.", - "operationId": "update-org-profile", + "post": { "tags": [ - "Profiles" - ], - "parameters": [ - { - "$ref": "#/components/parameters/OrganizationID" - } + "Support" ], + "summary": "Create a new support ticket", + "operationId": "create-ticket", "requestBody": { "content": { "application/json": { "schema": { - "type": "object", + "required": [ + "subject", + "description" + ], "properties": { - "default_catalog": { - "type": "string", - "description": "The URL of a catalog file which overrides the default." + "subject": { + "description": "A title of the ticket.", + "type": "string" }, - "project_options_url": { + "description": { + "description": "The description body of the support ticket.", + "type": "string" + }, + "requester_id": { + "description": "UUID of the ticket requester. Converted from the ZID value.", "type": "string", - "format": "uri", - "description": "The URL of an organization-wide project options file." + "format": "uuid" }, - "company_name": { + "priority": { + "description": "A priority of the ticket.", "type": "string", - "description": "The company name." + "enum": [ + "low", + "normal", + "high", + "urgent" + ] }, - "legal_entity_name": { + "subscription_id": { + "description": "see create()", + "type": "string" + }, + "organization_id": { + "description": "see create()", + "type": "string" + }, + "affected_url": { + "description": "see create().", "type": "string", - "description": "The legal entity name of the company." + "format": "url" }, - "customer_type": { + "followup_tid": { + "description": "The unique ID of the ticket which this ticket is a follow-up to.", + "type": "string" + }, + "category": { + "description": "The category of the support ticket.", "type": "string", - "description": "The customer type of this account.", "enum": [ - "indvidual", - "company", - "government" + "access", + "billing_question", + "complaint", + "compliance_question", + "configuration_change", + "general_question", + "incident_outage", + "bug_report", + "report_a_gui_bug", + "onboarding", + "close_my_account" ] }, - "vat_number": { - "type": "string", - "description": "The VAT number of the company." + "attachments": { + "description": "A list of attachments for the ticket.", + "type": "array", + "items": { + "properties": { + "filename": { + "description": "The filename to be used in storage.", + "type": "string" + }, + "data": { + "description": "the base64 encoded file.", + "type": "string" + } + }, + "type": "object" + } }, - "billing_contact": { - "type": "string", - "format": "email", - "description": "The e-mail address of a contact to whom billing notices will be sent." + "collaborator_ids": { + "description": "A list of collaborators uuids for the ticket.", + "type": "array", + "items": { + "type": "string" + } } - } + }, + "type": "object" } } } }, "responses": { "200": { - "description": "OK", + "description": "A Support Ticket object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Profile" - } - } - } - }, - "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" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/Ticket" } } } } }, - "x-property-id-kebab": "update-org-profile", - "x-tag-id-kebab": "Profiles", + "x-property-id-kebab": "create-ticket", + "x-tag-id-kebab": "Support", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Profile" - ], - "x-return-types-union": "\\Upsun\\Model\\Profile", "x-phpdoc": { - "return": "\\Upsun\\Model\\Profile" + "return": "\\Upsun\\Model\\Ticket" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, - "x-description": [ - "Updates the profile for the specified organization." - ] + "x-return-types": [ + "\\Upsun\\Model\\Ticket" + ], + "x-return-types-union": "\\Upsun\\Model\\Ticket" } }, - "/organizations/{organization_id}/orders": { - "get": { - "summary": "List orders", - "description": "Retrieves orders for the specified organization.", - "operationId": "list-org-orders", + "/tickets/{ticket_id}": { + "patch": { "tags": [ - "Orders" + "Support" ], + "summary": "Update a ticket", + "operationId": "update-ticket", "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" + "name": "ticket_id", + "in": "path", + "description": "The ID of the ticket", + "required": true, + "schema": { + "type": "string" + } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "description": "The status of the support ticket.", + "type": "string", + "enum": [ + "open", + "solved" + ] + }, + "collaborator_ids": { + "description": "A list of collaborators uuids for the ticket.", + "type": "array", "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Order" - } - }, - "_links": { - "$ref": "#/components/schemas/ListLinks" + "type": "string" } + }, + "collaborators_replace": { + "description": "Whether or not should replace ticket collaborators with the provided values. If false, the collaborators will be appended.", + "type": "boolean", + "default": null } - } + }, + "type": "object" } } - }, - "403": { - "description": "Forbidden", + } + }, + "responses": { + "200": { + "description": "Success.", "content": { - "application/problem+json": { + "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/Ticket" } } } }, - "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } + "204": { + "description": "The ticket was not updated." } }, - "x-property-id-kebab": "list-org-orders", - "x-tag-id-kebab": "Orders", + "x-property-id-kebab": "update-ticket", + "x-tag-id-kebab": "Support", "x-return-types-displayReturn": false, - "x-return-types": [ - "object" - ], "x-phpdoc": { - "return": "object" + "return": "\\Upsun\\Model\\Ticket" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, - "x-description": [ - "Retrieves orders for the specified organization." - ] + "x-return-types": [ + "\\Upsun\\Model\\Ticket" + ], + "x-return-types-union": "\\Upsun\\Model\\Ticket" } }, - "/organizations/{organization_id}/orders/{order_id}": { + "/tickets/priority": { "get": { - "summary": "Get order", - "description": "Retrieves an order for the specified organization.", - "operationId": "get-org-order", "tags": [ - "Orders" + "Support" ], + "summary": "List support ticket priorities", + "operationId": "list-ticket-priorities", "parameters": [ { - "$ref": "#/components/parameters/OrganizationIDName" - }, - { - "$ref": "#/components/parameters/OrderID" + "name": "subscription_id", + "in": "query", + "description": "The ID of the subscription the ticket should be related to", + "required": false, + "schema": { + "type": "string" + } }, { - "$ref": "#/components/parameters/mode" + "name": "category", + "in": "query", + "description": "The category of the support ticket.", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { "200": { - "description": "OK", + "description": "An array of available priorities for that license.", "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" + "type": "array", + "items": { + "properties": { + "id": { + "description": "Machine name of the priority.", + "type": "string" + }, + "label": { + "description": "The human-readable label of the priority.", + "type": "string" + }, + "short_description": { + "description": "The short description of the priority.", + "type": "string" + }, + "description": { + "description": "The long description of the priority.", + "type": "string" + } + }, + "type": "object" + } } } } } }, - "x-property-id-kebab": "get-org-order", - "x-tag-id-kebab": "Orders", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Order" - ], - "x-return-types-union": "\\Upsun\\Model\\Order", + "x-property-id-kebab": "list-ticket-priorities", + "x-tag-id-kebab": "Support", + "x-return-types-displayReturn": true, "x-phpdoc": { - "return": "\\Upsun\\Model\\Order" + "return": "object[]" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, - "x-description": [ - "Retrieves an order for the specified organization." - ] + "x-return-types": [ + "object[]" + ], + "x-return-types-union": "array" } }, - "/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", + "/tickets/category": { + "get": { "tags": [ - "Orders" + "Support" ], + "summary": "List support ticket categories", + "operationId": "list-ticket-categories", "parameters": [ { - "$ref": "#/components/parameters/OrganizationIDName" + "name": "subscription_id", + "in": "query", + "description": "The ID of the subscription the ticket should be related to", + "required": false, + "schema": { + "type": "string" + } }, { - "$ref": "#/components/parameters/OrderID" + "name": "organization_id", + "in": "query", + "description": "The ID of the organization the ticket should be related to", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { "200": { - "description": "Payment authorization credentials, if the payment is pending", + "description": "An array of available categories for a ticket.", "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": "array", + "items": { + "properties": { + "id": { + "description": "Machine name of the category as is listed in zendesk.", + "type": "string" + }, + "label": { + "description": "The human-readable label of the category.", + "type": "string" } }, - "type": { - "type": "string", - "description": "Required payment action type." - } + "type": "object" } } } } - }, - "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", + } + }, + "x-property-id-kebab": "list-ticket-categories", + "x-tag-id-kebab": "Support", + "x-return-types-displayReturn": true, + "x-phpdoc": { + "return": "object[]" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "object[]" + ], + "x-return-types-union": "array" + } + }, + "/projects/{projectId}/system": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "get-projects-system", + "responses": { + "default": { + "description": "", "content": { - "application/problem+json": { + "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/SystemInformation" } } } } }, - "x-property-id-kebab": "create-authorization-credentials", - "x-tag-id-kebab": "Orders", - "x-return-types-displayReturn": false, - "x-return-types": [ - "object" + "tags": [ + "System Information" ], + "summary": "Get information about the Git server.", + "description": "Output information for the project.", + "x-property-id-kebab": "get-projects-system", + "x-tag-id-kebab": "System-Information", + "x-return-types-displayReturn": false, "x-phpdoc": { - "return": "object" + "return": "\\Upsun\\Model\\SystemInformation" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\SystemInformation" + ], + "x-return-types-union": "\\Upsun\\Model\\SystemInformation", "x-description": [ - "Creates confirmation credentials for payments that require online authorization" + "Output information for the project." ] } }, - "/organizations/{organization_id}/records/plan": { - "get": { - "summary": "List plan records", - "description": "Retrieves plan records for the specified organization.", - "operationId": "list-org-plan-records", - "tags": [ - "Records" - ], + "/projects/{projectId}/system/restart": { + "post": { "parameters": [ { - "$ref": "#/components/parameters/OrganizationIDName" - }, - { - "$ref": "#/components/parameters/filter_subscription_id" - }, - { - "$ref": "#/components/parameters/filter_subscription_plan" - }, - { - "$ref": "#/components/parameters/record_status" - }, - { - "$ref": "#/components/parameters/record_start" - }, - { - "$ref": "#/components/parameters/record_end" - }, - { - "$ref": "#/components/parameters/record_started_at" - }, - { - "$ref": "#/components/parameters/record_ended_at" - }, - { - "$ref": "#/components/parameters/page" + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" } ], + "operationId": "action-projects-system-restart", "responses": { - "200": { - "description": "OK", + "default": { + "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PlanRecords" - } - }, - "_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" + "$ref": "#/components/schemas/AcceptedResponse" } } } } }, - "x-property-id-kebab": "list-org-plan-records", - "x-tag-id-kebab": "Records", - "x-return-types-displayReturn": false, - "x-return-types": [ - "object" + "tags": [ + "System Information" ], + "summary": "Restart the Git server", + "description": "Force the Git server to restart.", + "x-property-id-kebab": "action-projects-system-restart", + "x-tag-id-kebab": "System-Information", + "x-return-types-displayReturn": false, "x-phpdoc": { - "return": "object" + "return": "\\Upsun\\Model\\AcceptedResponse" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", "x-description": [ - "Retrieves plan records for the specified organization." + "Force the Git server to restart." ] } }, - "/organizations/{organization_id}/records/usage": { + "/projects/{projectId}/environments/{environmentId}/tasks": { "get": { - "summary": "List usage records", - "description": "Retrieves usage records for the specified organization.", - "operationId": "list-org-usage-records", - "tags": [ - "Records" - ], "parameters": [ { - "$ref": "#/components/parameters/OrganizationIDName" - }, - { - "$ref": "#/components/parameters/filter_subscription_id" - }, - { - "$ref": "#/components/parameters/record_usage_group" - }, - { - "$ref": "#/components/parameters/record_start" - }, - { - "$ref": "#/components/parameters/record_started_at" + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" }, { - "$ref": "#/components/parameters/page" + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "environmentId" } ], + "operationId": "list-projects-environments-tasks", "responses": { - "200": { - "description": "OK", + "default": { + "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Usage" - } - }, - "_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" + "$ref": "#/components/schemas/TaskCollection" } } } } }, - "x-property-id-kebab": "list-org-usage-records", - "x-tag-id-kebab": "Records", - "x-return-types-displayReturn": false, - "x-return-types": [ - "object" + "tags": [ + "Task" ], + "x-property-id-kebab": "list-projects-environments-tasks", + "x-tag-id-kebab": "Task", + "x-return-types-displayReturn": true, "x-phpdoc": { - "return": "object" + "return": "\\Upsun\\Model\\Task[]" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, - "x-description": [ - "Retrieves usage records for the specified organization." - ] + "x-return-types": [ + "\\Upsun\\Model\\Task[]" + ], + "x-return-types-union": "array" } }, - "/organizations/{organization_id}/subscriptions/estimate": { + "/projects/{projectId}/environments/{environmentId}/tasks/{taskId}": { "get": { - "summary": "Estimate the price of a new subscription", - "operationId": "estimate-new-org-subscription", - "tags": [ - "Subscriptions" - ], "parameters": [ { - "$ref": "#/components/parameters/OrganizationID" + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" }, { - "in": "query", - "name": "plan", - "description": "The plan type of the subscription.", + "in": "path", "required": true, "schema": { "type": "string" - } + }, + "name": "environmentId" }, { - "in": "query", - "name": "environments", - "description": "The maximum number of environments which can be provisioned on the project.", + "in": "path", "required": true, "schema": { - "type": "integer" + "type": "string" + }, + "name": "taskId" + } + ], + "operationId": "get-projects-environments-tasks", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Task" + } + } } - }, + } + }, + "tags": [ + "Task" + ], + "x-property-id-kebab": "get-projects-environments-tasks", + "x-tag-id-kebab": "Task", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Task" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Task" + ], + "x-return-types-union": "\\Upsun\\Model\\Task" + } + }, + "/projects/{projectId}/environments/{environmentId}/tasks/{taskId}/run": { + "post": { + "parameters": [ { - "in": "query", - "name": "storage", - "description": "The total storage available to each environment, in MiB.", + "in": "path", "required": true, "schema": { - "type": "integer" - } + "type": "string" + }, + "name": "projectId" }, { - "in": "query", - "name": "user_licenses", - "description": "The number of user licenses.", + "in": "path", "required": true, "schema": { - "type": "integer" - } + "type": "string" + }, + "name": "environmentId" }, { - "in": "query", - "name": "format", - "description": "The format of the estimation output.", - "required": false, + "in": "path", + "required": true, "schema": { - "type": "string", - "enum": [ - "formatted", - "complex" - ] - } + "type": "string" + }, + "name": "taskId" } ], + "operationId": "run-task", "responses": { - "200": { - "description": "OK", + "default": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EstimationObject" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/AcceptedResponse" } } } - }, - "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskTriggerInput" } } } }, - "x-property-id-kebab": "estimate-new-org-subscription", - "x-tag-id-kebab": "Subscriptions", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\EstimationObject" + "tags": [ + "Task" ], - "x-return-types-union": "\\Upsun\\Model\\EstimationObject", + "x-property-id-kebab": "run-task", + "x-tag-id-kebab": "Task", + "x-return-types-displayReturn": false, "x-phpdoc": { - "return": "\\Upsun\\Model\\EstimationObject" + "return": "\\Upsun\\Model\\AcceptedResponse" }, - "x-returnable": true + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse" } }, - "/organizations/{organization_id}/subscriptions/can-create": { + "/projects/{project_id}/team-access": { + "parameters": [ + { + "$ref": "#/components/parameters/ProjectID" + } + ], "get": { - "summary": "Checks if the user is able to create a new project.", - "operationId": "can-create-new-org-subscription", + "summary": "List team access for a project", + "description": "Returns a list of items representing the project access.", + "operationId": "list-project-team-access", "tags": [ - "Subscriptions" + "Team Access" ], "parameters": [ { - "$ref": "#/components/parameters/OrganizationID" + "$ref": "#/components/parameters/PageSizeAccess" + }, + { + "$ref": "#/components/parameters/PageBefore" + }, + { + "$ref": "#/components/parameters/PageAfter" + }, + { + "in": "query", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `granted_at`, `updated_at`.\n", + "schema": { + "type": "string", + "example": "-updated_at" + } } ], "responses": { @@ -27005,138 +27647,119 @@ "content": { "application/json": { "schema": { + "type": "object", "properties": { - "can_create": { - "description": "Boolean result of the check.", - "type": "boolean" - }, - "message": { - "description": "Details in case of negative check result.", - "type": "string" - }, - "required_action": { - "description": "Required action impending project creation.", - "type": "object", - "nullable": true, - "properties": { - "action": { - "description": "Machine readable definition of requirement.", - "type": "string" - }, - "type": { - "description": "Specification of the type of action.", - "type": "string" - }, - "credentials": { - "description": "Any credentials required to fulfill the requirement.", - "type": "object", - "nullable": true - }, - "reference": { - "description": "Reference to object that requires changes to fulfill the requirement, e.g. project ID.", - "type": "string", - "nullable": true - } + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TeamProjectAccess" } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" } }, - "type": "object" + "additionalProperties": false } } } }, - "403": { - "description": "Forbidden", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } + "400": { + "$ref": "#/components/responses/BadRequest" }, - "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } + "403": { + "$ref": "#/components/responses/Forbidden" } }, - "x-property-id-kebab": "can-create-new-org-subscription", - "x-tag-id-kebab": "Subscriptions", + "x-property-id-kebab": "list-project-team-access", + "x-tag-id-kebab": "Team-Access", "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, "x-return-types": [ - "object" + "mixed" ], - "x-phpdoc": { - "return": "object" - }, - "x-returnable": true - } - }, - "/organizations/{organization_id}/subscriptions/{subscription_id}/estimate": { - "get": { - "summary": "Estimate the price of a subscription", - "operationId": "estimate-org-subscription", + "x-return-types-union": "mixed", + "x-description": [ + "Returns a list of items representing the project access." + ] + }, + "post": { + "summary": "Grant team access to a project", + "description": "Grants one or more team access to a specific project.", + "operationId": "grant-project-team-access", "tags": [ - "Subscriptions" + "Team Access" ], - "parameters": [ - { - "$ref": "#/components/parameters/OrganizationID" - }, - { - "$ref": "#/components/parameters/SubscriptionID" - }, - { - "in": "query", - "name": "plan", - "description": "The plan type of the subscription.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "environments", - "description": "The maximum number of environments which can be provisioned on the project.", - "schema": { - "type": "integer" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "team_id": { + "type": "string", + "description": "ID of the team." + } + }, + "required": [ + "team_id" + ] + } + } } + } + }, + "responses": { + "204": { + "$ref": "#/components/responses/NoContent" }, - { - "in": "query", - "name": "storage", - "description": "The total storage available to each environment, in MiB.", - "schema": { - "type": "integer" - } + "400": { + "$ref": "#/components/responses/BadRequest" }, - { - "in": "query", - "name": "user_licenses", - "description": "The number of user licenses.", - "schema": { - "type": "integer" - } + "403": { + "$ref": "#/components/responses/Forbidden" }, - { - "in": "query", - "name": "format", - "description": "The format of the estimation output.", - "schema": { - "type": "string", - "enum": [ - "formatted", - "complex" - ] - } + "409": { + "$ref": "#/components/responses/Conflict" } + }, + "x-property-id-kebab": "grant-project-team-access", + "x-tag-id-kebab": "Team-Access", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-description": [ + "Grants one or more team access to a specific project." + ] + } + }, + "/projects/{project_id}/team-access/{team_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/ProjectID" + }, + { + "$ref": "#/components/parameters/TeamID" + } + ], + "get": { + "summary": "Get team access for a project", + "description": "Retrieves the team's permissions for the current project.", + "operationId": "get-project-team-access", + "tags": [ + "Team Access" ], "responses": { "200": { @@ -27144,63 +27767,102 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EstimationObject" + "$ref": "#/components/schemas/TeamProjectAccess" } } } }, "403": { - "description": "Forbidden", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" } }, - "x-property-id-kebab": "estimate-org-subscription", - "x-tag-id-kebab": "Subscriptions", + "x-property-id-kebab": "get-project-team-access", + "x-tag-id-kebab": "Team-Access", "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\TeamProjectAccess" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, "x-return-types": [ - "\\Upsun\\Model\\EstimationObject" + "\\Upsun\\Model\\TeamProjectAccess" ], - "x-return-types-union": "\\Upsun\\Model\\EstimationObject", - "x-phpdoc": { - "return": "\\Upsun\\Model\\EstimationObject" + "x-return-types-union": "\\Upsun\\Model\\TeamProjectAccess", + "x-description": [ + "Retrieves the team's permissions for the current project." + ] + }, + "delete": { + "summary": "Remove team access for a project", + "description": "Removes the team from the current project.", + "operationId": "remove-project-team-access", + "tags": [ + "Team Access" + ], + "responses": { + "204": { + "$ref": "#/components/responses/NoContent" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } }, - "x-returnable": true + "x-property-id-kebab": "remove-project-team-access", + "x-tag-id-kebab": "Team-Access", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-description": [ + "Removes the team from the current project." + ] } }, - "/organizations/{organization_id}/subscriptions/{subscription_id}/current_usage": { + "/teams/{team_id}/project-access": { + "parameters": [ + { + "$ref": "#/components/parameters/TeamID" + } + ], "get": { - "summary": "Get current usage for a subscription", - "operationId": "get-org-subscription-current-usage", + "summary": "List project access for a team", + "description": "Returns a list of items representing the team's project access.", + "operationId": "list-team-project-access", "tags": [ - "Subscriptions" + "Team Access" ], "parameters": [ { - "$ref": "#/components/parameters/OrganizationID" + "$ref": "#/components/parameters/PageSizeAccess" }, { - "$ref": "#/components/parameters/SubscriptionID" + "$ref": "#/components/parameters/PageBefore" }, { - "in": "query", - "name": "usage_groups", - "description": "A list of usage groups to retrieve current usage for.", - "schema": { - "type": "string" - } + "$ref": "#/components/parameters/PageAfter" }, { "in": "query", - "name": "include_not_charged", - "description": "Whether to include not charged usage groups.", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `project_title`, `granted_at`, `updated_at`.\n", "schema": { - "type": "boolean" + "type": "string", + "example": "-updated_at" } } ], @@ -27210,98 +27872,122 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SubscriptionCurrentUsageObject" + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TeamProjectAccess" + } + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + }, + "additionalProperties": false } } } }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, "403": { - "description": "Forbidden", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" } }, - "x-property-id-kebab": "get-org-subscription-current-usage", - "x-tag-id-kebab": "Subscriptions", + "x-property-id-kebab": "list-team-project-access", + "x-tag-id-kebab": "Team-Access", "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, "x-return-types": [ - "\\Upsun\\Model\\SubscriptionCurrentUsageObject" + "mixed" ], - "x-return-types-union": "\\Upsun\\Model\\SubscriptionCurrentUsageObject", - "x-phpdoc": { - "return": "\\Upsun\\Model\\SubscriptionCurrentUsageObject" - }, - "x-returnable": true - } - }, - "/organizations/{organization_id}/subscriptions/{subscription_id}/addons": { - "get": { - "summary": "List addons for a subscription", - "operationId": "list-subscription-addons", + "x-return-types-union": "mixed", + "x-description": [ + "Returns a list of items representing the team's project access." + ] + }, + "post": { + "summary": "Grant project access to a team", + "description": "Adds the team to one or more specified projects.", + "operationId": "grant-team-project-access", "tags": [ - "Subscriptions" - ], - "parameters": [ - { - "$ref": "#/components/parameters/OrganizationID" - }, - { - "$ref": "#/components/parameters/SubscriptionID" - } + "Team Access" ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SubscriptionAddonsObject" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "project_id": { + "type": "string", + "description": "ID of the project." + } + }, + "required": [ + "project_id" + ] } } } + } + }, + "responses": { + "204": { + "$ref": "#/components/responses/NoContent" + }, + "400": { + "$ref": "#/components/responses/BadRequest" }, "403": { - "description": "Forbidden", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } + "$ref": "#/components/responses/Forbidden" + }, + "409": { + "$ref": "#/components/responses/Conflict" } }, - "x-vendor": "upsun", - "x-property-id-kebab": "list-subscription-addons", - "x-tag-id-kebab": "Subscriptions", + "x-property-id-kebab": "grant-team-project-access", + "x-tag-id-kebab": "Team-Access", "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, "x-return-types": [ - "\\Upsun\\Model\\SubscriptionAddonsObject" + "void" ], - "x-return-types-union": "\\Upsun\\Model\\SubscriptionAddonsObject", - "x-phpdoc": { - "return": "\\Upsun\\Model\\SubscriptionAddonsObject" - }, - "x-returnable": true + "x-return-types-union": "void", + "x-description": [ + "Adds the team to one or more specified projects." + ] } }, - "/organizations/{organization_id}/vouchers": { + "/teams/{team_id}/project-access/{project_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/TeamID" + }, + { + "$ref": "#/components/parameters/ProjectID" + } + ], "get": { - "summary": "List vouchers", - "description": "Retrieves vouchers for the specified organization.", - "operationId": "list-org-vouchers", + "summary": "Get project access for a team", + "description": "Retrieves the team's permissions for the current project.", + "operationId": "get-team-project-access", "tags": [ - "Vouchers" - ], - "parameters": [ - { - "$ref": "#/components/parameters/OrganizationIDName" - } + "Team Access" ], "responses": { "200": { @@ -27309,98 +27995,185 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Vouchers" + "$ref": "#/components/schemas/TeamProjectAccess" } } } }, "403": { - "description": "Forbidden", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } + "$ref": "#/components/responses/Forbidden" }, "404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } + "$ref": "#/components/responses/NotFound" } }, - "x-property-id-kebab": "list-org-vouchers", - "x-tag-id-kebab": "Vouchers", + "x-property-id-kebab": "get-team-project-access", + "x-tag-id-kebab": "Team-Access", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Vouchers" - ], - "x-return-types-union": "\\Upsun\\Model\\Vouchers", "x-phpdoc": { - "return": "\\Upsun\\Model\\Vouchers" + "return": "\\Upsun\\Model\\TeamProjectAccess" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\TeamProjectAccess" + ], + "x-return-types-union": "\\Upsun\\Model\\TeamProjectAccess", "x-description": [ - "Retrieves vouchers for the specified organization." + "Retrieves the team's permissions for the current project." + ] + }, + "delete": { + "summary": "Remove project access for a team", + "description": "Removes the team from the current project.", + "operationId": "remove-team-project-access", + "tags": [ + "Team Access" + ], + "responses": { + "204": { + "$ref": "#/components/responses/NoContent" + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + }, + "x-property-id-kebab": "remove-team-project-access", + "x-tag-id-kebab": "Team-Access", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-description": [ + "Removes the team from the current project." ] } }, - "/organizations/{organization_id}/vouchers/apply": { - "post": { - "summary": "Apply voucher", - "description": "Applies a voucher for the specified organization, and refreshes the currently open order.", - "operationId": "apply-org-voucher", + "/teams": { + "get": { + "summary": "List teams", + "description": "Retrieves a list of teams.", + "operationId": "list-teams", "tags": [ - "Vouchers" + "Teams" ], "parameters": [ { - "$ref": "#/components/parameters/OrganizationID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "code" - ], - "properties": { - "code": { - "type": "string", - "description": "The voucher code." - } - } - } + "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[id]", + "description": "Allows filtering by `id` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/StringFilter" + } + }, + { + "in": "query", + "name": "filter[updated_at]", + "description": "Allows filtering by `updated_at` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/DateTimeFilter" + } + }, + { + "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.
\nUse a dash (\"-\") to sort descending.\n", + "schema": { + "type": "string", + "enum": [ + "label", + "-label", + "created_at", + "-created_at", + "updated_at", + "-updated_at" + ] } } - }, + ], "responses": { - "204": { - "description": "No Content" - }, - "403": { - "description": "Forbidden", + "200": { + "description": "OK", "content": { - "application/problem+json": { + "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Team" + } + }, + "count": { + "type": "integer", + "description": "Total count of all the teams." + }, + "_links": { + "$ref": "#/components/schemas/ListLinks" + } + } } } } }, - "404": { - "description": "Not Found", + "403": { + "description": "Forbidden", "content": { - "application/problem+json": { + "application/json": { "schema": { "$ref": "#/components/schemas/Error" } @@ -27408,58 +28181,86 @@ } } }, - "x-property-id-kebab": "apply-org-voucher", - "x-tag-id-kebab": "Vouchers", + "x-property-id-kebab": "list-teams", + "x-tag-id-kebab": "Teams", "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "object" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, "x-return-types": [ - "void" + "object" ], - "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false, "x-description": [ - "Applies a voucher for the specified organization, and refreshes the currently open order." + "Retrieves a list of teams." ] - } - }, - "/organizations/{organization_id}/estimate": { - "get": { - "summary": "Estimate total spend", - "description": "Estimates the total spend for the specified organization.", - "operationId": "estimate-org", + }, + "post": { + "summary": "Create team", + "description": "Creates a new team.", + "operationId": "create-team", "tags": [ - "Organization Management" + "Teams" ], - "parameters": [ - { - "$ref": "#/components/parameters/OrganizationIDName" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "organization_id", + "label" + ], + "properties": { + "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" + } + } + } + } + } } - ], + }, "responses": { - "200": { - "description": "OK", + "201": { + "description": "Created", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrganizationEstimationObject" + "$ref": "#/components/schemas/Team" } } } }, - "403": { - "description": "Forbidden", + "400": { + "description": "Bad Request", "content": { - "application/problem+json": { + "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, - "404": { - "description": "Not Found", + "403": { + "description": "Forbidden", "content": { - "application/problem+json": { + "application/json": { "schema": { "$ref": "#/components/schemas/Error" } @@ -27467,35 +28268,36 @@ } } }, - "x-vendor": "upsun", - "x-property-id-kebab": "estimate-org", - "x-tag-id-kebab": "Organization-Management", + "x-property-id-kebab": "create-team", + "x-tag-id-kebab": "Teams", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\OrganizationEstimationObject" - ], - "x-return-types-union": "\\Upsun\\Model\\OrganizationEstimationObject", "x-phpdoc": { - "return": "\\Upsun\\Model\\OrganizationEstimationObject" + "return": "\\Upsun\\Model\\Team" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Team" + ], + "x-return-types-union": "\\Upsun\\Model\\Team", "x-description": [ - "Estimates the total spend for the specified organization." + "Creates a new team." ] } }, - "/organizations/{organization_id}/addons": { + "/teams/{team_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/TeamID" + } + ], "get": { - "summary": "Get add-ons", - "description": "Retrieves information about the add-ons for an organization.", - "operationId": "get-org-addons", + "summary": "Get team", + "description": "Retrieves the specified team.", + "operationId": "get-team", "tags": [ - "Add-ons" - ], - "parameters": [ - { - "$ref": "#/components/parameters/OrganizationIDName" - } + "Teams" ], "responses": { "200": { @@ -27503,7 +28305,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrganizationAddonsObject" + "$ref": "#/components/schemas/Team" } } } @@ -27511,7 +28313,7 @@ "403": { "description": "Forbidden", "content": { - "application/problem+json": { + "application/json": { "schema": { "$ref": "#/components/schemas/Error" } @@ -27521,7 +28323,7 @@ "404": { "description": "Not Found", "content": { - "application/problem+json": { + "application/json": { "schema": { "$ref": "#/components/schemas/Error" } @@ -27529,73 +28331,59 @@ } } }, - "x-vendor": "upsun", - "x-property-id-kebab": "get-org-addons", - "x-tag-id-kebab": "Add-ons", + "x-property-id-kebab": "get-team", + "x-tag-id-kebab": "Teams", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\OrganizationAddonsObject" - ], - "x-return-types-union": "\\Upsun\\Model\\OrganizationAddonsObject", "x-phpdoc": { - "return": "\\Upsun\\Model\\OrganizationAddonsObject" + "return": "\\Upsun\\Model\\Team" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Team" + ], + "x-return-types-union": "\\Upsun\\Model\\Team", "x-description": [ - "Retrieves information about the add-ons for an organization." + "Retrieves the specified team." ] }, "patch": { - "summary": "Update organization add-ons", - "description": "Updates the add-ons configuration for an organization.", - "operationId": "update-org-addons", + "summary": "Update team", + "description": "Updates the specified team.", + "operationId": "update-team", "tags": [ - "Add-ons" - ], - "parameters": [ - { - "$ref": "#/components/parameters/OrganizationIDName" - } + "Teams" ], "requestBody": { - "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { - "user_management": { + "label": { "type": "string", - "description": "The user management level to apply.", - "enum": [ - "standard", - "enhanced" - ], - "example": "standard" + "description": "The human-readable label of the team." }, - "support_level": { - "type": "string", - "description": "The support level to apply.", - "enum": [ - "basic", - "premium" - ], - "example": "basic" + "project_permissions": { + "type": "array", + "description": "Project permissions that are granted to the team.", + "items": { + "type": "string" + } } - }, - "additionalProperties": false, - "minProperties": 1 + } } } } }, "responses": { "200": { - "description": "Add-ons updated successfully", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrganizationAddonsObject" + "$ref": "#/components/schemas/Team" } } } @@ -27603,7 +28391,7 @@ "400": { "description": "Bad Request", "content": { - "application/problem+json": { + "application/json": { "schema": { "$ref": "#/components/schemas/Error" } @@ -27613,7 +28401,7 @@ "403": { "description": "Forbidden", "content": { - "application/problem+json": { + "application/json": { "schema": { "$ref": "#/components/schemas/Error" } @@ -27623,7 +28411,7 @@ "404": { "description": "Not Found", "content": { - "application/problem+json": { + "application/json": { "schema": { "$ref": "#/components/schemas/Error" } @@ -27631,140 +28419,38 @@ } } }, - "x-vendor": "upsun", - "x-property-id-kebab": "update-org-addons", - "x-tag-id-kebab": "Add-ons", + "x-property-id-kebab": "update-team", + "x-tag-id-kebab": "Teams", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\OrganizationAddonsObject" - ], - "x-return-types-union": "\\Upsun\\Model\\OrganizationAddonsObject", "x-phpdoc": { - "return": "\\Upsun\\Model\\OrganizationAddonsObject" + "return": "\\Upsun\\Model\\Team" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, - "x-description": [ - "Updates the add-ons configuration for an organization." - ] - } - }, - "/organizations/{organization_id}/alerts/billing": { - "get": { - "summary": "Get billing alert configuration", - "description": "Retrieves billing alert configuration for the specified organization.", - "operationId": "get-org-billing-alert-config", - "tags": [ - "Organization Management" - ], - "parameters": [ - { - "$ref": "#/components/parameters/OrganizationIDName" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrganizationAlertConfig" - } - } - } - }, - "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", - "x-property-id-kebab": "get-org-billing-alert-config", - "x-tag-id-kebab": "Organization-Management", - "x-return-types-displayReturn": false, "x-return-types": [ - "\\Upsun\\Model\\OrganizationAlertConfig" + "\\Upsun\\Model\\Team" ], - "x-return-types-union": "\\Upsun\\Model\\OrganizationAlertConfig", - "x-phpdoc": { - "return": "\\Upsun\\Model\\OrganizationAlertConfig" - }, - "x-returnable": true, + "x-return-types-union": "\\Upsun\\Model\\Team", "x-description": [ - "Retrieves billing alert configuration for the specified organization." + "Updates the specified team." ] }, - "patch": { - "summary": "Update billing alert configuration", - "description": "Updates billing alert configuration for the specified organization.", - "operationId": "update-org-billing-alert-config", + "delete": { + "summary": "Delete team", + "description": "Deletes the specified team.", + "operationId": "delete-team", "tags": [ - "Organization Management" - ], - "parameters": [ - { - "$ref": "#/components/parameters/OrganizationIDName" - } + "Teams" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "active": { - "type": "boolean", - "description": "Whether the billing alert should be active or not." - }, - "config": { - "type": "object", - "description": "The configuration for billing alerts.", - "properties": { - "threshold": { - "type": "integer", - "description": "The amount after which a billing alert should be triggered." - }, - "mode": { - "type": "string", - "description": "The mode in which the alert is triggered." - } - } - } - } - } - } - } - }, "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrganizationAlertConfig" - } - } - } + "204": { + "description": "No Content" }, "403": { "description": "Forbidden", "content": { - "application/problem+json": { + "application/json": { "schema": { "$ref": "#/components/schemas/Error" } @@ -27774,7 +28460,7 @@ "404": { "description": "Not Found", "content": { - "application/problem+json": { + "application/json": { "schema": { "$ref": "#/components/schemas/Error" } @@ -27782,37 +28468,65 @@ } } }, - "x-vendor": "upsun", - "x-property-id-kebab": "update-org-billing-alert-config", - "x-tag-id-kebab": "Organization-Management", + "x-property-id-kebab": "delete-team", + "x-tag-id-kebab": "Teams", "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, "x-return-types": [ - "\\Upsun\\Model\\OrganizationAlertConfig" + "void" ], - "x-return-types-union": "\\Upsun\\Model\\OrganizationAlertConfig", - "x-phpdoc": { - "return": "\\Upsun\\Model\\OrganizationAlertConfig" - }, - "x-returnable": true, + "x-return-types-union": "void", "x-description": [ - "Updates billing alert configuration for the specified organization." + "Deletes the specified team." ] } }, - "/organizations/{organization_id}/alerts/subscriptions/{subscription_id}/usage": { + "/teams/{team_id}/members": { + "parameters": [ + { + "$ref": "#/components/parameters/TeamID" + } + ], "get": { - "summary": "Get usage alerts", - "description": "Retrieves current and available usage alerts.", - "operationId": "get-subscription-usage-alerts", + "summary": "List team members", + "description": "Retrieves a list of users associated with a single team.", + "operationId": "list-team-members", "tags": [ - "Subscriptions" + "Teams" ], "parameters": [ { - "$ref": "#/components/parameters/OrganizationIDName" + "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" + } }, { - "$ref": "#/components/parameters/SubscriptionID" + "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.
\nUse a dash (\"-\") to sort descending.\n", + "schema": { + "type": "string", + "enum": [ + "created_at", + "-created_at", + "updated_at", + "-updated_at" + ] + } } ], "responses": { @@ -27823,19 +28537,14 @@ "schema": { "type": "object", "properties": { - "current": { + "items": { "type": "array", - "description": "The list of currently set usage alerts.", "items": { - "$ref": "#/components/schemas/UsageAlert" + "$ref": "#/components/schemas/TeamMember" } }, - "available": { - "type": "array", - "description": "The list of available usage alerts.", - "items": { - "$ref": "#/components/schemas/UsageAlert" - } + "_links": { + "$ref": "#/components/schemas/ListLinks" } } } @@ -27845,7 +28554,7 @@ "403": { "description": "Forbidden", "content": { - "application/problem+json": { + "application/json": { "schema": { "$ref": "#/components/schemas/Error" } @@ -27855,7 +28564,7 @@ "404": { "description": "Not Found", "content": { - "application/problem+json": { + "application/json": { "schema": { "$ref": "#/components/schemas/Error" } @@ -27863,68 +28572,43 @@ } } }, - "x-property-id-kebab": "get-subscription-usage-alerts", - "x-tag-id-kebab": "Subscriptions", + "x-property-id-kebab": "list-team-members", + "x-tag-id-kebab": "Teams", "x-return-types-displayReturn": false, - "x-return-types": [ - "object" - ], "x-phpdoc": { "return": "object" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "object" + ], "x-description": [ - "Retrieves current and available usage alerts." + "Retrieves a list of users associated with a single team." ] }, - "patch": { - "summary": "Update usage alerts.", - "description": "Updates usage alerts for a subscription.", - "operationId": "update-subscription-usage-alerts", + "post": { + "summary": "Create team member", + "description": "Creates a new team member.", + "operationId": "create-team-member", "tags": [ - "Subscriptions" - ], - "parameters": [ - { - "$ref": "#/components/parameters/OrganizationIDName" - }, - { - "$ref": "#/components/parameters/SubscriptionID" - } + "Teams" ], "requestBody": { + "required": true, "content": { "application/json": { "schema": { "type": "object", + "required": [ + "user_id" + ], "properties": { - "alerts": { - "type": "array", - "description": "The list of alerts to update.", - "items": { - "type": "object", - "description": "An alert object.", - "properties": { - "id": { - "type": "string", - "description": "The usage alert identifier." - }, - "active": { - "type": "boolean", - "description": "Whether the alert is activated." - }, - "config": { - "type": "object", - "description": "The configuration for the usage alerts.", - "properties": { - "threshold": { - "type": "integer", - "description": "The amount after which an alert should be triggered." - } - } - } - } - } + "user_id": { + "type": "string", + "format": "uuid", + "description": "ID of the user." } } } @@ -27932,28 +28616,22 @@ } }, "responses": { - "200": { - "description": "OK", + "201": { + "description": "Created", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "current": { - "type": "array", - "description": "The list of currently set usage alerts.", - "items": { - "$ref": "#/components/schemas/UsageAlert" - } - }, - "available": { - "type": "array", - "description": "The list of available usage alerts.", - "items": { - "$ref": "#/components/schemas/UsageAlert" - } - } - } + "$ref": "#/components/schemas/TeamMember" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -27961,7 +28639,7 @@ "403": { "description": "Forbidden", "content": { - "application/problem+json": { + "application/json": { "schema": { "$ref": "#/components/schemas/Error" } @@ -27971,7 +28649,7 @@ "404": { "description": "Not Found", "content": { - "application/problem+json": { + "application/json": { "schema": { "$ref": "#/components/schemas/Error" } @@ -27979,33 +28657,39 @@ } } }, - "x-property-id-kebab": "update-subscription-usage-alerts", - "x-tag-id-kebab": "Subscriptions", + "x-property-id-kebab": "create-team-member", + "x-tag-id-kebab": "Teams", "x-return-types-displayReturn": false, - "x-return-types": [ - "object" - ], "x-phpdoc": { - "return": "object" + "return": "\\Upsun\\Model\\TeamMember" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\TeamMember" + ], + "x-return-types-union": "\\Upsun\\Model\\TeamMember", "x-description": [ - "Updates usage alerts for a subscription." + "Creates a new team member." ] } }, - "/organizations/{organization_id}/discounts": { + "/teams/{team_id}/members/{user_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/TeamID" + }, + { + "$ref": "#/components/parameters/UserID" + } + ], "get": { - "summary": "List organization discounts", - "description": "Retrieves all applicable discounts granted to the specified organization.", - "operationId": "list-org-discounts", + "summary": "Get team member", + "description": "Retrieves the specified team member.", + "operationId": "get-team-member", "tags": [ - "Discounts" - ], - "parameters": [ - { - "$ref": "#/components/parameters/OrganizationIDName" - } + "Teams" ], "responses": { "200": { @@ -28013,18 +28697,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Discount" - } - }, - "_links": { - "$ref": "#/components/schemas/ListLinks" - } - } + "$ref": "#/components/schemas/TeamMember" } } } @@ -28032,7 +28705,7 @@ "403": { "description": "Forbidden", "content": { - "application/problem+json": { + "application/json": { "schema": { "$ref": "#/components/schemas/Error" } @@ -28042,7 +28715,7 @@ "404": { "description": "Not Found", "content": { - "application/problem+json": { + "application/json": { "schema": { "$ref": "#/components/schemas/Error" } @@ -28050,33 +28723,145 @@ } } }, - "x-vendor": "upsun", - "x-property-id-kebab": "list-org-discounts", - "x-tag-id-kebab": "Discounts", + "x-property-id-kebab": "get-team-member", + "x-tag-id-kebab": "Teams", "x-return-types-displayReturn": false, - "x-return-types": [ - "object" - ], "x-phpdoc": { - "return": "object" + "return": "\\Upsun\\Model\\TeamMember" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\TeamMember" + ], + "x-return-types-union": "\\Upsun\\Model\\TeamMember", "x-description": [ - "Retrieves all applicable discounts granted to the specified organization." + "Retrieves the specified team member." + ] + }, + "delete": { + "summary": "Delete team member", + "description": "Deletes the specified team member.", + "operationId": "delete-team-member", + "tags": [ + "Teams" + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-property-id-kebab": "delete-team-member", + "x-tag-id-kebab": "Teams", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, + "x-return-types": [ + "void" + ], + "x-return-types-union": "void", + "x-description": [ + "Deletes the specified team member." ] } }, - "/organizations/{organization_id}/prepayment": { + "/users/{user_id}/teams": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], "get": { - "summary": "Get organization prepayment information", - "description": "Retrieves prepayment information for the specified organization, if applicable.", - "operationId": "get-org-prepayment-info", + "summary": "User teams", + "description": "Retrieves teams that the specified user is a member of.", + "operationId": "list-user-teams", "tags": [ - "Organization Management" + "Teams" ], "parameters": [ { - "$ref": "#/components/parameters/OrganizationID" + "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[updated_at]", + "description": "Allows filtering by `updated_at` using one or more operators.", + "style": "deepObject", + "explode": true, + "schema": { + "$ref": "#/components/schemas/DateTimeFilter" + } + }, + { + "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.
\nUse a dash (\"-\") to sort descending.\n", + "schema": { + "type": "string", + "enum": [ + "created_at", + "-created_at", + "updated_at", + "-updated_at" + ] + } } ], "responses": { @@ -28087,33 +28872,18 @@ "schema": { "type": "object", "properties": { - "prepayment": { - "$ref": "#/components/schemas/PrepaymentObject" + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Team" + } + }, + "count": { + "type": "integer", + "description": "Total count of all the teams." }, "_links": { - "type": "object", - "properties": { - "self": { - "type": "object", - "description": "Link to the current resource.", - "properties": { - "href": { - "type": "string", - "description": "URL of the link." - } - } - }, - "transactions": { - "type": "object", - "description": "Link to the prepayment transactions resource.", - "properties": { - "href": { - "type": "string", - "description": "URL of the link." - } - } - } - } + "$ref": "#/components/schemas/ListLinks" } } } @@ -28123,7 +28893,7 @@ "403": { "description": "Forbidden", "content": { - "application/problem+json": { + "application/json": { "schema": { "$ref": "#/components/schemas/Error" } @@ -28133,7 +28903,7 @@ "404": { "description": "Not Found", "content": { - "application/problem+json": { + "application/json": { "schema": { "$ref": "#/components/schemas/Error" } @@ -28141,176 +28911,299 @@ } } }, - "x-vendor": "upsun", - "x-property-id-kebab": "get-org-prepayment-info", - "x-tag-id-kebab": "Organization-Management", + "x-property-id-kebab": "list-user-teams", + "x-tag-id-kebab": "Teams", "x-return-types-displayReturn": false, - "x-return-types": [ - "object" - ], "x-phpdoc": { "return": "object" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "object" + ], "x-description": [ - "Retrieves prepayment information for the specified organization, if applicable." + "Retrieves teams that the specified user is a member of." ] } }, - "/organizations/{organization_id}/prepayment/transactions": { + "/projects/{projectId}/integrations": { "get": { - "summary": "List organization prepayment transactions", - "description": "Retrieves a list of prepayment transactions for the specified organization, if applicable.", - "operationId": "list-org-prepayment-transactions", + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + } + ], + "operationId": "list-projects-integrations", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationCollection" + } + } + } + } + }, "tags": [ - "Organization Management" + "Third-Party Integrations" + ], + "summary": "Get list of existing integrations for a project", + "x-property-id-kebab": "list-projects-integrations", + "x-tag-id-kebab": "Third-Party-Integrations", + "x-return-types-displayReturn": true, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Integration[]" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Integration[]" ], + "x-return-types-union": "array" + }, + "post": { "parameters": [ { - "$ref": "#/components/parameters/OrganizationID" + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" } ], + "operationId": "create-projects-integrations", "responses": { - "200": { - "description": "OK", + "default": { + "description": "", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Total number of items across pages." - }, - "transactions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PrepaymentTransactionObject" - } - }, - "_links": { - "type": "object", - "properties": { - "self": { - "type": "object", - "description": "Link to the current set of items.", - "properties": { - "href": { - "type": "string", - "description": "URL of the link." - } - } - }, - "previous": { - "type": "object", - "description": "Link to the previous set of items.", - "properties": { - "href": { - "type": "string", - "description": "URL of the link." - } - } - }, - "next": { - "type": "object", - "description": "Link to the next set of items.", - "properties": { - "href": { - "type": "string", - "description": "URL of the link" - } - } - }, - "prepayment": { - "type": "object", - "description": "Link to the prepayment resource.", - "properties": { - "href": { - "type": "string", - "description": "URL of the link." - } - } - } - } - } - } + "$ref": "#/components/schemas/AcceptedResponse" + } + } + } + } + }, + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationCreateCreateInput" + } + } + } + }, + "tags": [ + "Third-Party Integrations" + ], + "summary": "Integrate project with a third-party service", + "x-property-id-kebab": "create-projects-integrations", + "x-tag-id-kebab": "Third-Party-Integrations", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse" + } + }, + "/projects/{projectId}/integrations/{integrationId}": { + "get": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" + }, + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "integrationId" + } + ], + "operationId": "get-projects-integrations", + "responses": { + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Integration" } } } + } + }, + "tags": [ + "Third-Party Integrations" + ], + "summary": "Get information about an existing third-party integration", + "x-property-id-kebab": "get-projects-integrations", + "x-tag-id-kebab": "Third-Party-Integrations", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\Integration" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Integration" + ], + "x-return-types-union": "\\Upsun\\Model\\Integration" + }, + "patch": { + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationPatch" + } + } + } + }, + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" }, - "403": { - "description": "Forbidden", + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "integrationId" + } + ], + "operationId": "update-projects-integrations", + "responses": { + "default": { + "description": "", "content": { - "application/problem+json": { + "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/AcceptedResponse" } } } + } + }, + "tags": [ + "Third-Party Integrations" + ], + "summary": "Update an existing third-party integration", + "x-property-id-kebab": "update-projects-integrations", + "x-tag-id-kebab": "Third-Party-Integrations", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\AcceptedResponse" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse" + }, + "delete": { + "parameters": [ + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "projectId" }, - "404": { - "description": "Not Found", + { + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "name": "integrationId" + } + ], + "operationId": "delete-projects-integrations", + "responses": { + "default": { + "description": "", "content": { - "application/problem+json": { + "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/AcceptedResponse" } } } } }, - "x-vendor": "upsun", - "x-property-id-kebab": "list-org-prepayment-transactions", - "x-tag-id-kebab": "Organization-Management", - "x-return-types-displayReturn": false, - "x-return-types": [ - "object" + "tags": [ + "Third-Party Integrations" ], + "summary": "Delete an existing third-party integration", + "x-property-id-kebab": "delete-projects-integrations", + "x-tag-id-kebab": "Third-Party-Integrations", + "x-return-types-displayReturn": false, "x-phpdoc": { - "return": "object" + "return": "\\Upsun\\Model\\AcceptedResponse" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, - "x-description": [ - "Retrieves a list of prepayment transactions for the specified organization, if applicable." - ] + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse" } }, - "/organizations/{organization_id}/projects": { + "/projects/{project_id}/user-access": { + "parameters": [ + { + "$ref": "#/components/parameters/ProjectID" + } + ], "get": { - "summary": "List projects", - "description": "Retrieves a list of projects for the specified organization.", - "operationId": "list-org-projects", + "summary": "List user access for a project", + "description": "Returns a list of items representing the project access.", + "operationId": "list-project-user-access", "tags": [ - "Organization Projects" + "User Access" ], "parameters": [ { - "$ref": "#/components/parameters/OrganizationID" - }, - { - "in": "query", - "name": "filter[id]", - "description": "Allows filtering by `id` using one or more operators.", - "style": "deepObject", - "explode": true, - "schema": { - "$ref": "#/components/schemas/StringFilter" - } - }, - { - "$ref": "#/components/parameters/FilterProjectTitle" - }, - { - "$ref": "#/components/parameters/FilterProjectStatus" - }, - { - "$ref": "#/components/parameters/FilterUpdatedAt" - }, - { - "$ref": "#/components/parameters/FilterCreatedAt" - }, - { - "$ref": "#/components/parameters/PageSize" + "$ref": "#/components/parameters/PageSizeAccess" }, { "$ref": "#/components/parameters/PageBefore" @@ -28321,7 +29214,7 @@ { "in": "query", "name": "sort", - "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `id`, `region`, `title`, `type`, `plan`, `status`, `created_at`, `updated_at`.\n", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `granted_at`, `updated_at`.\n", "schema": { "type": "string", "example": "-updated_at" @@ -28336,19 +29229,12 @@ "schema": { "type": "object", "properties": { - "count": { - "type": "integer", - "description": "Total number of items across pages." - }, "items": { "type": "array", "items": { - "$ref": "#/components/schemas/OrganizationProject" + "$ref": "#/components/schemas/UserProjectAccess" } }, - "facets": { - "$ref": "#/components/schemas/ProjectFacets" - }, "_links": { "$ref": "#/components/schemas/ListLinks" } @@ -28363,76 +29249,64 @@ }, "403": { "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" } }, - "x-property-id-kebab": "list-org-projects", - "x-tag-id-kebab": "Organization-Projects", + "x-property-id-kebab": "list-project-user-access", + "x-tag-id-kebab": "User-Access", "x-return-types-displayReturn": false, - "x-return-types": {}, "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "mixed" + ], + "x-return-types-union": "mixed", "x-description": [ - "Retrieves a list of projects for the specified organization." + "Returns a list of items representing the project access." ] }, "post": { - "summary": "Create project", - "description": "Creates a new project in the specified organization.", - "operationId": "create-org-project", + "summary": "Grant user access to a project", + "description": "Grants one or more users access to a specific project.", + "operationId": "grant-project-user-access", "tags": [ - "Organization Projects" - ], - "parameters": [ - { - "$ref": "#/components/parameters/OrganizationID" - } + "User Access" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "type": "object", - "required": [ - "region" - ], - "properties": { - "organization_id": { - "$ref": "#/components/schemas/OrganizationID" - }, - "region": { - "$ref": "#/components/schemas/RegionID" - }, - "title": { - "$ref": "#/components/schemas/ProjectTitle" - }, - "type": { - "$ref": "#/components/schemas/ProjectType" - }, - "plan": { - "$ref": "#/components/schemas/ProjectPlan" + "type": "array", + "items": { + "type": "object", + "properties": { + "user_id": { + "type": "string", + "description": "ID of the user." + }, + "permissions": { + "$ref": "#/components/schemas/ProjectPermissions" + }, + "auto_add_member": { + "type": "boolean", + "description": "If the specified user is not a member of the project's organization, add it automatically." + } }, - "default_branch": { - "$ref": "#/components/schemas/ProjectDefaultBranch" - } + "additionalProperties": false, + "required": [ + "user_id", + "permissions" + ] } } } } }, "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrganizationProject" - } - } - } + "204": { + "$ref": "#/components/responses/NoContent" }, "400": { "$ref": "#/components/responses/BadRequest" @@ -28440,44 +29314,41 @@ "403": { "$ref": "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "503": { - "$ref": "#/components/responses/ServiceUnavailable" + "409": { + "$ref": "#/components/responses/Conflict" } }, - "x-property-id-kebab": "create-org-project", - "x-tag-id-kebab": "Organization-Projects", + "x-property-id-kebab": "grant-project-user-access", + "x-tag-id-kebab": "User-Access", "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, "x-return-types": [ - "\\Upsun\\Model\\OrganizationProject" + "void" ], - "x-return-types-union": "\\Upsun\\Model\\OrganizationProject", - "x-phpdoc": { - "return": "\\Upsun\\Model\\OrganizationProject" - }, - "x-returnable": true, + "x-return-types-union": "void", "x-description": [ - "Creates a new project in the specified organization." + "Grants one or more users access to a specific project." ] } }, - "/organizations/{organization_id}/projects/{project_id}": { + "/projects/{project_id}/user-access/{user_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/ProjectID" + }, + { + "$ref": "#/components/parameters/UserID" + } + ], "get": { - "summary": "Get project", - "description": "Retrieves the specified project.", - "operationId": "get-org-project", + "summary": "Get user access for a project", + "description": "Retrieves the user's permissions for the current project.", + "operationId": "get-project-user-access", "tags": [ - "Organization Projects" - ], - "parameters": [ - { - "$ref": "#/components/parameters/OrganizationID" - }, - { - "$ref": "#/components/parameters/ProjectID" - } + "User Access" ], "responses": { "200": { @@ -28485,7 +29356,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrganizationProject" + "$ref": "#/components/schemas/UserProjectAccess" } } } @@ -28497,50 +29368,41 @@ "$ref": "#/components/responses/NotFound" } }, - "x-property-id-kebab": "get-org-project", - "x-tag-id-kebab": "Organization-Projects", + "x-property-id-kebab": "get-project-user-access", + "x-tag-id-kebab": "User-Access", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\OrganizationProject" - ], - "x-return-types-union": "\\Upsun\\Model\\OrganizationProject", "x-phpdoc": { - "return": "\\Upsun\\Model\\OrganizationProject" + "return": "\\Upsun\\Model\\UserProjectAccess" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\UserProjectAccess" + ], + "x-return-types-union": "\\Upsun\\Model\\UserProjectAccess", "x-description": [ - "Retrieves the specified project." + "Retrieves the user's permissions for the current project." ] }, "patch": { - "summary": "Update project", - "description": "Updates the specified project.", - "operationId": "update-org-project", + "summary": "Update user access for a project", + "description": "Updates the user's permissions for the current project.", + "operationId": "update-project-user-access", "tags": [ - "Organization Projects" - ], - "parameters": [ - { - "$ref": "#/components/parameters/OrganizationID" - }, - { - "$ref": "#/components/parameters/ProjectID" - } + "User Access" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", + "required": [ + "permissions" + ], "properties": { - "title": { - "$ref": "#/components/schemas/ProjectTitle" - }, - "plan": { - "$ref": "#/components/schemas/ProjectPlan" - }, - "timezone": { - "$ref": "#/components/schemas/ProjectTimeZone" + "permissions": { + "$ref": "#/components/schemas/ProjectPermissions" } } } @@ -28548,15 +29410,8 @@ } }, "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrganizationProject" - } - } - } + "204": { + "$ref": "#/components/responses/NoContent" }, "400": { "$ref": "#/components/responses/BadRequest" @@ -28566,40 +29421,29 @@ }, "404": { "$ref": "#/components/responses/NotFound" - }, - "503": { - "$ref": "#/components/responses/ServiceUnavailable" } }, - "x-property-id-kebab": "update-org-project", - "x-tag-id-kebab": "Organization-Projects", + "x-property-id-kebab": "update-project-user-access", + "x-tag-id-kebab": "User-Access", "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, "x-return-types": [ - "\\Upsun\\Model\\OrganizationProject" + "void" ], - "x-return-types-union": "\\Upsun\\Model\\OrganizationProject", - "x-phpdoc": { - "return": "\\Upsun\\Model\\OrganizationProject" - }, - "x-returnable": true, + "x-return-types-union": "void", "x-description": [ - "Updates the specified project." + "Updates the user's permissions for the current project." ] }, "delete": { - "summary": "Delete project", - "description": "Deletes the specified project.", - "operationId": "delete-org-project", + "summary": "Remove user access for a project", + "description": "Removes the user from the current project.", + "operationId": "remove-project-user-access", "tags": [ - "Organization Projects" - ], - "parameters": [ - { - "$ref": "#/components/parameters/OrganizationID" - }, - { - "$ref": "#/components/parameters/ProjectID" - } + "User Access" ], "responses": { "204": { @@ -28613,200 +29457,48 @@ }, "404": { "$ref": "#/components/responses/NotFound" - }, - "503": { - "$ref": "#/components/responses/ServiceUnavailable" } }, - "x-property-id-kebab": "delete-org-project", - "x-tag-id-kebab": "Organization-Projects", + "x-property-id-kebab": "remove-project-user-access", + "x-tag-id-kebab": "User-Access", "x-return-types-displayReturn": false, - "x-return-types": [ - "void" - ], - "x-return-types-union": "void", "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": false, - "x-description": [ - "Deletes the specified project." - ] - } - }, - "/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" - } - }, - "x-property-id-kebab": "query-organiation-carbon", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\OrganizationCarbon" - ], - "x-return-types-union": "\\Upsun\\Model\\OrganizationCarbon", - "x-phpdoc": { - "return": "\\Upsun\\Model\\OrganizationCarbon" - }, - "x-returnable": true, - "x-description": [ - "Queries the carbon emission data for all projects owned by the specified organiation." - ] - } - }, - "/organizations/{organization_id}/projects/{project_id}/metrics/carbon": { - "get": { - "summary": "Query project carbon emissions metrics", - "description": "Queries the carbon emission data for the specified project using the supplied parameters.", - "operationId": "query-project-carbon", - "tags": [ - "Organization Projects" - ], - "parameters": [ - { - "$ref": "#/components/parameters/OrganizationID" - }, - { - "$ref": "#/components/parameters/ProjectID" - }, - { - "$ref": "#/components/parameters/TimeRangeFrom" - }, - { - "$ref": "#/components/parameters/TimeRangeTo" - }, - { - "$ref": "#/components/parameters/TimeRangeInterval" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProjectCarbon" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-property-id-kebab": "query-project-carbon", - "x-tag-id-kebab": "Organization-Projects", - "x-return-types-displayReturn": false, "x-return-types": [ - "\\Upsun\\Model\\ProjectCarbon" + "void" ], - "x-return-types-union": "\\Upsun\\Model\\ProjectCarbon", - "x-phpdoc": { - "return": "\\Upsun\\Model\\ProjectCarbon" - }, - "x-returnable": true, + "x-return-types-union": "void", "x-description": [ - "Queries the carbon emission data for the specified project using the supplied parameters." + "Removes the user from the current project." ] } }, - "/organizations/{organization_id}/subscriptions": { + "/users/{user_id}/project-access": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], "get": { - "summary": "List subscriptions", - "description": "Retrieves subscriptions for the specified organization.", - "operationId": "list-org-subscriptions", + "summary": "List project access for a user", + "description": "Returns a list of items representing the user's project access.", + "operationId": "list-user-project-access", "tags": [ - "Subscriptions" + "User Access" ], "parameters": [ { - "$ref": "#/components/parameters/OrganizationID" - }, - { - "name": "filter[status]", - "in": "query", - "description": "The status of the subscription. ", - "schema": { - "type": "string", - "enum": [ - "requested", - "active", - "failed", - "suspended", - "deleted" - ] - } - }, - { - "name": "filter[id]", - "in": "query", - "description": "Allows filtering by subscription `id` using one or more operators.", - "style": "deepObject", - "explode": true, - "schema": { - "$ref": "#/components/schemas/StringFilter" - } - }, - { - "$ref": "#/components/parameters/FilterProjectID" - }, - { - "name": "filter[project_title]", "in": "query", - "description": "Allows filtering by `project_title` using one or more operators.", - "style": "deepObject", - "explode": true, + "name": "filter[organization_id]", + "description": "Allows filtering by `organization_id`.", "schema": { - "$ref": "#/components/schemas/StringFilter" + "type": "string" } }, { - "$ref": "#/components/parameters/FilterRegion" - }, - { - "$ref": "#/components/parameters/FilterUpdatedAt" - }, - { - "$ref": "#/components/parameters/PageSize" + "$ref": "#/components/parameters/PageSizeAccess" }, { "$ref": "#/components/parameters/PageBefore" @@ -28815,9 +29507,9 @@ "$ref": "#/components/parameters/PageAfter" }, { - "name": "sort", "in": "query", - "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `region`, `project_title`, `type`, `plan`, `status`, `created_at`, `updated_at`.\n", + "name": "sort", + "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `project_title`, `granted_at`, `updated_at`.\n", "schema": { "type": "string", "example": "-updated_at" @@ -28832,14 +29524,10 @@ "schema": { "type": "object", "properties": { - "count": { - "type": "integer", - "description": "Total number of items across pages." - }, "items": { "type": "array", "items": { - "$ref": "#/components/schemas/Subscription" + "$ref": "#/components/schemas/UserProjectAccess" } }, "_links": { @@ -28856,85 +29544,60 @@ }, "403": { "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" } }, - "x-property-id-kebab": "list-org-subscriptions", - "x-tag-id-kebab": "Subscriptions", + "x-property-id-kebab": "list-user-project-access", + "x-tag-id-kebab": "User-Access", "x-return-types-displayReturn": false, - "x-return-types": {}, "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "mixed" + ], + "x-return-types-union": "mixed", "x-description": [ - "Retrieves subscriptions for the specified organization." + "Returns a list of items representing the user's project access." ] }, "post": { - "summary": "Create subscription", - "description": "Creates a subscription for the specified organization.", - "operationId": "create-org-subscription", + "summary": "Grant project access to a user", + "description": "Adds the user to one or more specified projects.", + "operationId": "grant-user-project-access", "tags": [ - "Subscriptions" - ], - "parameters": [ - { - "$ref": "#/components/parameters/OrganizationID" - } + "User Access" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "type": "object", - "required": [ - "project_region" - ], - "properties": { - "plan": { - "$ref": "#/components/schemas/ProjectPlan" - }, - "project_region": { - "type": "string", - "description": "The machine name of the region where the project is located. Cannot be changed after project creation." - }, - "project_title": { - "type": "string", - "description": "The name given to the project. Appears as the title in the UI." - }, - "options_url": { - "type": "string", - "description": "The URL of the project options file." - }, - "default_branch": { - "type": "string", - "description": "The default Git branch name for the project." - }, - "environments": { - "type": "integer", - "description": "The maximum number of active environments on the project." + "type": "array", + "items": { + "type": "object", + "properties": { + "project_id": { + "type": "string", + "description": "ID of the project." + }, + "permissions": { + "$ref": "#/components/schemas/ProjectPermissions" + } }, - "storage": { - "type": "integer", - "description": "The total storage available to each environment, in MiB. Only multiples of 1024 are accepted as legal values." - } + "additionalProperties": false, + "required": [ + "project_id", + "permissions" + ] } } } } }, "responses": { - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Subscription" - } - } - } + "204": { + "$ref": "#/components/responses/NoContent" }, "400": { "$ref": "#/components/responses/BadRequest" @@ -28942,41 +29605,41 @@ "403": { "$ref": "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "409": { + "$ref": "#/components/responses/Conflict" } }, - "x-property-id-kebab": "create-org-subscription", - "x-tag-id-kebab": "Subscriptions", + "x-property-id-kebab": "grant-user-project-access", + "x-tag-id-kebab": "User-Access", "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, "x-return-types": [ - "\\Upsun\\Model\\Subscription" + "void" ], - "x-return-types-union": "\\Upsun\\Model\\Subscription", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Subscription" - }, - "x-returnable": true, + "x-return-types-union": "void", "x-description": [ - "Creates a subscription for the specified organization." + "Adds the user to one or more specified projects." ] } }, - "/organizations/{organization_id}/subscriptions/{subscription_id}": { + "/users/{user_id}/project-access/{project_id}": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + }, + { + "$ref": "#/components/parameters/ProjectID" + } + ], "get": { - "summary": "Get subscription", - "description": "Retrieves a subscription for the specified organization.", - "operationId": "get-org-subscription", + "summary": "Get project access for a user", + "description": "Retrieves the user's permissions for the current project.", + "operationId": "get-user-project-access", "tags": [ - "Subscriptions" - ], - "parameters": [ - { - "$ref": "#/components/parameters/OrganizationID" - }, - { - "$ref": "#/components/parameters/SubscriptionID" - } + "User Access" ], "responses": { "200": { @@ -28984,7 +29647,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Subscription" + "$ref": "#/components/schemas/UserProjectAccess" } } } @@ -28996,86 +29659,41 @@ "$ref": "#/components/responses/NotFound" } }, - "x-property-id-kebab": "get-org-subscription", - "x-tag-id-kebab": "Subscriptions", + "x-property-id-kebab": "get-user-project-access", + "x-tag-id-kebab": "User-Access", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Subscription" - ], - "x-return-types-union": "\\Upsun\\Model\\Subscription", "x-phpdoc": { - "return": "\\Upsun\\Model\\Subscription" + "return": "\\Upsun\\Model\\UserProjectAccess" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\UserProjectAccess" + ], + "x-return-types-union": "\\Upsun\\Model\\UserProjectAccess", "x-description": [ - "Retrieves a subscription for the specified organization." + "Retrieves the user's permissions for the current project." ] }, "patch": { - "summary": "Update subscription", - "description": "Updates a subscription for the specified organization.", - "operationId": "update-org-subscription", + "summary": "Update project access for a user", + "description": "Updates the user's permissions for the current project.", + "operationId": "update-user-project-access", "tags": [ - "Subscriptions" - ], - "parameters": [ - { - "$ref": "#/components/parameters/OrganizationID" - }, - { - "$ref": "#/components/parameters/SubscriptionID" - } + "User Access" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", + "required": [ + "permissions" + ], "properties": { - "project_title": { - "$ref": "#/components/schemas/ProjectTitle" - }, - "plan": { - "$ref": "#/components/schemas/ProjectPlan" - }, - "timezone": { - "$ref": "#/components/schemas/ProjectTimeZone" - }, - "environments": { - "type": "integer", - "description": "The maximum number of environments which can be provisioned on the project." - }, - "storage": { - "type": "integer", - "description": "The total storage available to each environment, in MiB." - }, - "big_dev": { - "type": "string", - "description": "The development environment plan." - }, - "big_dev_service": { - "type": "string", - "description": "The development service plan." - }, - "backups": { - "type": "string", - "description": "The backups plan." - }, - "observability_suite": { - "type": "string", - "description": "The observability suite option." - }, - "blackfire": { - "type": "string", - "description": "The Blackfire integration option." - }, - "continuous_profiling": { - "type": "string", - "description": "The Blackfire continuous profiling option." - }, - "project_support_level": { - "type": "string", - "description": "The project uptime option." + "permissions": { + "$ref": "#/components/schemas/ProjectPermissions" } } } @@ -29083,15 +29701,8 @@ } }, "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Subscription" - } - } - } + "204": { + "$ref": "#/components/responses/NoContent" }, "400": { "$ref": "#/components/responses/BadRequest" @@ -29103,35 +29714,27 @@ "$ref": "#/components/responses/NotFound" } }, - "x-property-id-kebab": "update-org-subscription", - "x-tag-id-kebab": "Subscriptions", + "x-property-id-kebab": "update-user-project-access", + "x-tag-id-kebab": "User-Access", "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, "x-return-types": [ - "\\Upsun\\Model\\Subscription" + "void" ], - "x-return-types-union": "\\Upsun\\Model\\Subscription", - "x-phpdoc": { - "return": "\\Upsun\\Model\\Subscription" - }, - "x-returnable": true, + "x-return-types-union": "void", "x-description": [ - "Updates a subscription for the specified organization." + "Updates the user's permissions for the current project." ] }, "delete": { - "summary": "Delete subscription", - "description": "Deletes a subscription for the specified organization.", - "operationId": "delete-org-subscription", + "summary": "Remove project access for a user", + "description": "Removes the user from the current project.", + "operationId": "remove-user-project-access", "tags": [ - "Subscriptions" - ], - "parameters": [ - { - "$ref": "#/components/parameters/OrganizationID" - }, - { - "$ref": "#/components/parameters/SubscriptionID" - } + "User Access" ], "responses": { "204": { @@ -29147,683 +29750,616 @@ "$ref": "#/components/responses/NotFound" } }, - "x-property-id-kebab": "delete-org-subscription", - "x-tag-id-kebab": "Subscriptions", + "x-property-id-kebab": "remove-user-project-access", + "x-tag-id-kebab": "User-Access", "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, "x-return-types": [ "void" ], "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false, "x-description": [ - "Deletes a subscription for the specified organization." + "Removes the user from the current project." ] } }, - "/regions": { + "/profiles": { "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.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `id`, `created_at`, `updated_at`.\n", - "schema": { - "type": "string", - "example": "-updated_at" - } - } + "User Profiles" ], + "summary": "List user profiles", + "operationId": "list-profiles", "responses": { "200": { - "description": "OK", + "description": "The list of user profiles.", "content": { "application/json": { "schema": { - "type": "object", "properties": { "count": { - "type": "integer", - "description": "Total number of items across pages." + "description": "Total number of results.", + "type": "integer" }, - "regions": { + "profiles": { + "description": "Array of user profiles.", "type": "array", "items": { - "$ref": "#/components/schemas/Region" + "$ref": "#/components/schemas/Profile" } }, "_links": { - "$ref": "#/components/schemas/ListLinks" + "$ref": "#/components/schemas/HalLinks" } }, - "additionalProperties": false + "type": "object" } } } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" } }, - "x-property-id-kebab": "list-regions", - "x-tag-id-kebab": "Regions", + "x-property-id-kebab": "list-profiles", + "x-tag-id-kebab": "User-Profiles", "x-return-types-displayReturn": false, - "x-return-types": {}, - "x-phpdoc": {}, + "x-phpdoc": { + "return": "object" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, - "x-description": [ - "Retrieves a list of available regions." + "x-return-types": [ + "object" ] } }, - "/regions/{region_id}": { + "/profiles/{userId}": { "get": { - "summary": "Get region", - "description": "Retrieves the specified region.", - "operationId": "get-region", "tags": [ - "Regions" + "User Profiles" ], + "summary": "Get a single user profile", + "operationId": "get-profile", "parameters": [ { - "$ref": "#/components/parameters/RegionID" + "$ref": "#/components/parameters/user_id" } ], "responses": { "200": { - "description": "OK", + "description": "A User profile object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Region" + "$ref": "#/components/schemas/Profile" } } } - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" } }, - "x-property-id-kebab": "get-region", - "x-tag-id-kebab": "Regions", + "x-property-id-kebab": "get-profile", + "x-tag-id-kebab": "User-Profiles", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\Region" - ], - "x-return-types-union": "\\Upsun\\Model\\Region", "x-phpdoc": { - "return": "\\Upsun\\Model\\Region" + "return": "\\Upsun\\Model\\Profile" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, - "x-description": [ - "Retrieves the specified region." - ] - } - }, - "/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", + "x-return-types": [ + "\\Upsun\\Model\\Profile" + ], + "x-return-types-union": "\\Upsun\\Model\\Profile" + }, + "patch": { "tags": [ - "References" + "User Profiles" ], + "summary": "Update a user profile", + "description": "Update a user profile, supplying one or more key/value pairs to to change.", + "operationId": "update-profile", "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 + "$ref": "#/components/parameters/user_id" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "display_name": { + "description": "The user's display name.", + "type": "string" + }, + "username": { + "description": "The user's username.", + "type": "string" + }, + "current_password": { + "description": "The user's current password.", + "type": "string" + }, + "password": { + "description": "The user's new password.", + "type": "string" + }, + "company_type": { + "description": "The company type.", + "type": "string" + }, + "company_name": { + "description": "The name of the company.", + "type": "string" + }, + "vat_number": { + "description": "The vat number of the user.", + "type": "string" + }, + "company_role": { + "description": "The role of the user in the company.", + "type": "string" + }, + "marketing": { + "description": "Flag if the user agreed to receive marketing communication.", + "type": "boolean" + }, + "ui_colorscheme": { + "description": "The user's chosen color scheme for user interfaces. Available values are 'light' and 'dark'.", + "type": "string" + }, + "default_catalog": { + "description": "The URL of a catalog file which overrides the default.", + "type": "string" + }, + "project_options_url": { + "description": "The URL of an account-wide project options file.", + "type": "string" + }, + "picture": { + "description": "Url of the user's picture.", + "type": "string" + } + }, + "type": "object" + } + } + } + }, "responses": { "200": { - "description": "OK", + "description": "A User profile object", "content": { "application/json": { "schema": { - "type": "object", - "description": "A map of referenced projects indexed by the organization ID.", - "additionalProperties": { - "$ref": "#/components/schemas/ProjectReference" - } + "$ref": "#/components/schemas/Profile" } } } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" } }, - "x-property-id-kebab": "list-referenced-projects", - "x-tag-id-kebab": "References", - "x-return-types-displayReturn": true, - "x-return-types": [ - "array" - ], - "x-return-types-union": "array", + "x-property-id-kebab": "update-profile", + "x-tag-id-kebab": "User-Profiles", + "x-return-types-displayReturn": false, "x-phpdoc": { - "return": "array" + "return": "\\Upsun\\Model\\Profile" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Profile" + ], + "x-return-types-union": "\\Upsun\\Model\\Profile", "x-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." + "Update a user profile, supplying one or more key/value pairs to to change." ] } }, - "/ref/regions": { + "/profiles/{userId}/address": { "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" + "User Profiles" ], + "summary": "Get a user address", + "operationId": "get-address", "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 + "$ref": "#/components/parameters/user_id" } ], "responses": { "200": { - "description": "OK", + "description": "A user Address object extended with field metadata", "content": { "application/json": { "schema": { - "type": "object", - "description": "A map of referenced projects indexed by the organization ID.", - "additionalProperties": { - "$ref": "#/components/schemas/RegionReference" - } + "allOf": [ + { + "$ref": "#/components/schemas/Address" + }, + { + "$ref": "#/components/schemas/AddressMetadata" + } + ] } } } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" } }, - "x-property-id-kebab": "list-referenced-regions", - "x-tag-id-kebab": "References", - "x-return-types-displayReturn": true, + "x-property-id-kebab": "get-address", + "x-tag-id-kebab": "User-Profiles", + "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, "x-return-types": [ - "array" + "mixed" ], - "x-return-types-union": "array", - "x-phpdoc": { - "return": "array" - }, - "x-returnable": true, - "x-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." - ] - } - }, - "/projects/{project_id}/team-access": { - "parameters": [ - { - "$ref": "#/components/parameters/ProjectID" - } - ], - "get": { - "summary": "List team access for a project", - "description": "Returns a list of items representing the project access.", - "operationId": "list-project-team-access", + "x-return-types-union": "mixed" + }, + "patch": { "tags": [ - "Team Access" + "User Profiles" ], + "summary": "Update a user address", + "description": "Update a user address, supplying one or more key/value pairs to to change.", + "operationId": "update-address", "parameters": [ { - "$ref": "#/components/parameters/PageSizeAccess" - }, - { - "$ref": "#/components/parameters/PageBefore" - }, - { - "$ref": "#/components/parameters/PageAfter" - }, - { - "in": "query", - "name": "sort", - "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `granted_at`, `updated_at`.\n", - "schema": { - "type": "string", - "example": "-updated_at" - } + "$ref": "#/components/parameters/user_id" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Address" + } + } + } + }, "responses": { "200": { - "description": "OK", + "description": "A user Address object extended with field metadata.", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TeamProjectAccess" - } + "allOf": [ + { + "$ref": "#/components/schemas/Address" }, - "_links": { - "$ref": "#/components/schemas/ListLinks" + { + "$ref": "#/components/schemas/AddressMetadata" } - }, - "additionalProperties": false + ] } } } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "403": { - "$ref": "#/components/responses/Forbidden" } }, - "x-property-id-kebab": "list-project-team-access", - "x-tag-id-kebab": "Team-Access", + "x-property-id-kebab": "update-address", + "x-tag-id-kebab": "User-Profiles", "x-return-types-displayReturn": false, - "x-return-types": {}, "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "mixed" + ], + "x-return-types-union": "mixed", "x-description": [ - "Returns a list of items representing the project access." + "Update a user address, supplying one or more key/value pairs to to change." ] - }, + } + }, + "/profile/{uuid}/picture": { "post": { - "summary": "Grant team access to a project", - "description": "Grants one or more team access to a specific project.", - "operationId": "grant-project-team-access", "tags": [ - "Team Access" + "User Profiles" + ], + "summary": "Create a user profile picture", + "operationId": "create-profile-picture", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "The uuid of the user", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } ], "requestBody": { "required": true, "content": { - "application/json": { + "multipart/form-data": { "schema": { - "type": "array", - "items": { - "type": "object", + "properties": { + "file": { + "description": "The image file to upload.", + "type": "string", + "format": "binary" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "The new picture url.", + "content": { + "application/json": { + "schema": { "properties": { - "team_id": { - "type": "string", - "description": "ID of the team." + "url": { + "description": "The relative url of the picture.", + "type": "string" } }, - "required": [ - "team_id" - ] + "type": "object" } } } } }, + "x-property-id-kebab": "create-profile-picture", + "x-tag-id-kebab": "User-Profiles", + "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "object" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, + "x-return-types": [ + "object" + ] + }, + "delete": { + "tags": [ + "User Profiles" + ], + "summary": "Delete a user profile picture", + "operationId": "delete-profile-picture", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "The uuid of the user", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], "responses": { "204": { - "$ref": "#/components/responses/NoContent" - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "409": { - "$ref": "#/components/responses/Conflict" + "description": "No Content success." } }, - "x-property-id-kebab": "grant-project-team-access", - "x-tag-id-kebab": "Team-Access", + "x-property-id-kebab": "delete-profile-picture", + "x-tag-id-kebab": "User-Profiles", "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, "x-return-types": [ "void" ], - "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false, - "x-description": [ - "Grants one or more team access to a specific project." - ] + "x-return-types-union": "void" } }, - "/projects/{project_id}/team-access/{team_id}": { - "parameters": [ - { - "$ref": "#/components/parameters/ProjectID" - }, - { - "$ref": "#/components/parameters/TeamID" - } - ], + "/me": { "get": { - "summary": "Get team access for a project", - "description": "Retrieves the team's permissions for the current project.", - "operationId": "get-project-team-access", "tags": [ - "Team Access" + "Users" ], + "summary": "Get current logged-in user info", + "description": "Retrieve information about the currently logged-in user (the user associated with the access token).", + "operationId": "get-current-user-deprecated", "responses": { "200": { - "description": "OK", + "description": "The user object.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TeamProjectAccess" + "$ref": "#/components/schemas/CurrentUser" } } } - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" } }, - "x-property-id-kebab": "get-project-team-access", - "x-tag-id-kebab": "Team-Access", + "x-deprecated": true, + "x-property-id-kebab": "get-current-user-deprecated", + "x-tag-id-kebab": "Users", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\TeamProjectAccess" - ], - "x-return-types-union": "\\Upsun\\Model\\TeamProjectAccess", "x-phpdoc": { - "return": "\\Upsun\\Model\\TeamProjectAccess" + "return": "\\Upsun\\Model\\CurrentUser" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\CurrentUser" + ], + "x-return-types-union": "\\Upsun\\Model\\CurrentUser", "x-description": [ - "Retrieves the team's permissions for the current project." + "Retrieve information about the currently logged-in user (the user associated with the access token)." ] - }, - "delete": { - "summary": "Remove team access for a project", - "description": "Removes the team from the current project.", - "operationId": "remove-project-team-access", + } + }, + "/me/phone": { + "post": { "tags": [ - "Team Access" + "Users" ], + "summary": "Check if phone verification is required", + "description": "Find out if the current logged in user requires phone verification to create projects.", + "operationId": "get-current-user-verification-status", "responses": { - "204": { - "$ref": "#/components/responses/NoContent" - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" + "200": { + "description": "The information pertinent to determine if the account requires phone verification before project creation.", + "content": { + "application/json": { + "schema": { + "properties": { + "verify_phone": { + "description": "Does this user need to verify their phone number for project creation.", + "type": "boolean" + } + }, + "type": "object" + } + } + } } }, - "x-property-id-kebab": "remove-project-team-access", - "x-tag-id-kebab": "Team-Access", + "x-property-id-kebab": "get-current-user-verification-status", + "x-tag-id-kebab": "Users", "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "object" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, "x-return-types": [ - "void" + "object" ], - "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false, "x-description": [ - "Removes the team from the current project." + "Find out if the current logged in user requires phone verification to create projects." ] } }, - "/projects/{project_id}/user-access": { - "parameters": [ - { - "$ref": "#/components/parameters/ProjectID" - } - ], - "get": { - "summary": "List user access for a project", - "description": "Returns a list of items representing the project access.", - "operationId": "list-project-user-access", + "/me/verification": { + "post": { "tags": [ - "User Access" - ], - "parameters": [ - { - "$ref": "#/components/parameters/PageSizeAccess" - }, - { - "$ref": "#/components/parameters/PageBefore" - }, - { - "$ref": "#/components/parameters/PageAfter" - }, - { - "in": "query", - "name": "sort", - "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `granted_at`, `updated_at`.\n", - "schema": { - "type": "string", - "example": "-updated_at" - } - } + "Users" ], + "summary": "Check if verification is required", + "description": "Find out if the current logged in user requires verification (phone or staff) to create projects.", + "operationId": "get-current-user-verification-status-full", "responses": { "200": { - "description": "OK", + "description": "The information pertinent to determine if the account requires any type of verification before project creation.", "content": { "application/json": { "schema": { - "type": "object", "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserProjectAccess" - } + "state": { + "description": "Does this user need verification for project creation.", + "type": "boolean" }, - "_links": { - "$ref": "#/components/schemas/ListLinks" + "type": { + "description": "What type of verification is needed (phone or ticket)", + "type": "string" } }, - "additionalProperties": false + "type": "object" } } } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "403": { - "$ref": "#/components/responses/Forbidden" } }, - "x-property-id-kebab": "list-project-user-access", - "x-tag-id-kebab": "User-Access", + "x-property-id-kebab": "get-current-user-verification-status-full", + "x-tag-id-kebab": "Users", "x-return-types-displayReturn": false, - "x-return-types": {}, - "x-phpdoc": {}, + "x-phpdoc": { + "return": "object" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "object" + ], "x-description": [ - "Returns a list of items representing the project access." + "Find out if the current logged in user requires verification (phone or staff) to create projects." ] - }, - "post": { - "summary": "Grant user access to a project", - "description": "Grants one or more users access to a specific project.", - "operationId": "grant-project-user-access", + } + }, + "/users/me": { + "get": { + "summary": "Get the current user", + "description": "Retrieves the current user, determined from the used access token.", + "operationId": "get-current-user", "tags": [ - "User Access" + "Users" ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "user_id": { - "type": "string", - "description": "ID of the user." - }, - "permissions": { - "$ref": "#/components/schemas/ProjectPermissions" - }, - "auto_add_member": { - "type": "boolean", - "description": "If the specified user is not a member of the project's organization, add it automatically." - } - }, - "additionalProperties": false, - "required": [ - "user_id", - "permissions" - ] + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" } } } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/NoContent" - }, - "400": { - "$ref": "#/components/responses/BadRequest" }, "403": { - "$ref": "#/components/responses/Forbidden" + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "409": { - "$ref": "#/components/responses/Conflict" + "404": { + "description": "Not Found" } }, - "x-property-id-kebab": "grant-project-user-access", - "x-tag-id-kebab": "User-Access", + "x-property-id-kebab": "get-current-user", + "x-tag-id-kebab": "Users", "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\User" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, "x-return-types": [ - "void" + "\\Upsun\\Model\\User" ], - "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false, + "x-return-types-union": "\\Upsun\\Model\\User", "x-description": [ - "Grants one or more users access to a specific project." + "Retrieves the current user, determined from the used access token." ] } }, - "/projects/{project_id}/user-access/{user_id}": { + "/users/email={email}": { "parameters": [ { - "$ref": "#/components/parameters/ProjectID" - }, - { - "$ref": "#/components/parameters/UserID" + "schema": { + "type": "string", + "format": "email", + "example": "hello@example.com" + }, + "name": "email", + "in": "path", + "required": true, + "description": "The user's email address." } ], "get": { - "summary": "Get user access for a project", - "description": "Retrieves the user's permissions for the current project.", - "operationId": "get-project-user-access", + "summary": "Get a user by email", + "description": "Retrieves a user matching the specified email address.", + "operationId": "get-user-by-email-address", "tags": [ - "User Access" + "Users" ], "responses": { "200": { @@ -29831,159 +30367,62 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserProjectAccess" + "$ref": "#/components/schemas/User" } } } }, "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-property-id-kebab": "get-project-user-access", - "x-tag-id-kebab": "User-Access", - "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\UserProjectAccess" - ], - "x-return-types-union": "\\Upsun\\Model\\UserProjectAccess", - "x-phpdoc": { - "return": "\\Upsun\\Model\\UserProjectAccess" - }, - "x-returnable": true, - "x-description": [ - "Retrieves the user's permissions for the current project." - ] - }, - "patch": { - "summary": "Update user access for a project", - "description": "Updates the user's permissions for the current project.", - "operationId": "update-project-user-access", - "tags": [ - "User Access" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "permissions" - ], - "properties": { - "permissions": { - "$ref": "#/components/schemas/ProjectPermissions" - } + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/NoContent" - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "403": { - "$ref": "#/components/responses/Forbidden" }, "404": { - "$ref": "#/components/responses/NotFound" + "description": "Not Found" } }, - "x-property-id-kebab": "update-project-user-access", - "x-tag-id-kebab": "User-Access", + "x-property-id-kebab": "get-user-by-email-address", + "x-tag-id-kebab": "Users", "x-return-types-displayReturn": false, - "x-return-types": [ - "void" - ], - "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false, - "x-description": [ - "Updates the user's permissions for the current project." - ] - }, - "delete": { - "summary": "Remove user access for a project", - "description": "Removes the user from the current project.", - "operationId": "remove-project-user-access", - "tags": [ - "User Access" - ], - "responses": { - "204": { - "$ref": "#/components/responses/NoContent" - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } + "x-phpdoc": { + "return": "\\Upsun\\Model\\User" }, - "x-property-id-kebab": "remove-project-user-access", - "x-tag-id-kebab": "User-Access", - "x-return-types-displayReturn": false, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, "x-return-types": [ - "void" + "\\Upsun\\Model\\User" ], - "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false, + "x-return-types-union": "\\Upsun\\Model\\User", "x-description": [ - "Removes the user from the current project." + "Retrieves a user matching the specified email address." ] } }, - "/users/{user_id}/project-access": { + "/users/username={username}": { "parameters": [ { - "$ref": "#/components/parameters/UserID" + "schema": { + "type": "string", + "example": "platform-sh" + }, + "name": "username", + "in": "path", + "required": true, + "description": "The user's username." } ], "get": { - "summary": "List project access for a user", - "description": "Returns a list of items representing the user's project access.", - "operationId": "list-user-project-access", + "summary": "Get a user by username", + "description": "Retrieves a user matching the specified username.", + "operationId": "get-user-by-username", "tags": [ - "User Access" - ], - "parameters": [ - { - "in": "query", - "name": "filter[organization_id]", - "description": "Allows filtering by `organization_id`.", - "schema": { - "type": "string" - } - }, - { - "$ref": "#/components/parameters/PageSizeAccess" - }, - { - "$ref": "#/components/parameters/PageBefore" - }, - { - "$ref": "#/components/parameters/PageAfter" - }, - { - "in": "query", - "name": "sort", - "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `project_title`, `granted_at`, `updated_at`.\n", - "schema": { - "type": "string", - "example": "-updated_at" - } - } + "Users" ], "responses": { "200": { @@ -29991,117 +30430,56 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserProjectAccess" - } - }, - "_links": { - "$ref": "#/components/schemas/ListLinks" - } - }, - "additionalProperties": false - } + "$ref": "#/components/schemas/User" + }, + "examples": {} } } }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, "403": { - "$ref": "#/components/responses/Forbidden" - } - }, - "x-property-id-kebab": "list-user-project-access", - "x-tag-id-kebab": "User-Access", - "x-return-types-displayReturn": false, - "x-return-types": {}, - "x-phpdoc": {}, - "x-returnable": true, - "x-description": [ - "Returns a list of items representing the user's project access." - ] - }, - "post": { - "summary": "Grant project access to a user", - "description": "Adds the user to one or more specified projects.", - "operationId": "grant-user-project-access", - "tags": [ - "User Access" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "project_id": { - "type": "string", - "description": "ID of the project." - }, - "permissions": { - "$ref": "#/components/schemas/ProjectPermissions" - } - }, - "additionalProperties": false, - "required": [ - "project_id", - "permissions" - ] + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/NoContent" - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "403": { - "$ref": "#/components/responses/Forbidden" }, - "409": { - "$ref": "#/components/responses/Conflict" + "404": { + "description": "Not Found" } }, - "x-property-id-kebab": "grant-user-project-access", - "x-tag-id-kebab": "User-Access", + "x-property-id-kebab": "get-user-by-username", + "x-tag-id-kebab": "Users", "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\User" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, "x-return-types": [ - "void" + "\\Upsun\\Model\\User" ], - "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false, + "x-return-types-union": "\\Upsun\\Model\\User", "x-description": [ - "Adds the user to one or more specified projects." + "Retrieves a user matching the specified username." ] } }, - "/users/{user_id}/project-access/{project_id}": { + "/users/{user_id}": { "parameters": [ { "$ref": "#/components/parameters/UserID" - }, - { - "$ref": "#/components/parameters/ProjectID" } ], "get": { - "summary": "Get project access for a user", - "description": "Retrieves the user's permissions for the current project.", - "operationId": "get-user-project-access", + "summary": "Get a user", + "description": "Retrieves the specified user.", + "operationId": "get-user", "tags": [ - "User Access" + "Users" ], "responses": { "200": { @@ -30109,267 +30487,295 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserProjectAccess" + "$ref": "#/components/schemas/User" } } } }, "403": { - "$ref": "#/components/responses/Forbidden" + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, "404": { - "$ref": "#/components/responses/NotFound" + "description": "Not Found" } }, - "x-property-id-kebab": "get-user-project-access", - "x-tag-id-kebab": "User-Access", + "x-property-id-kebab": "get-user", + "x-tag-id-kebab": "Users", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\UserProjectAccess" - ], - "x-return-types-union": "\\Upsun\\Model\\UserProjectAccess", "x-phpdoc": { - "return": "\\Upsun\\Model\\UserProjectAccess" + "return": "\\Upsun\\Model\\User" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\User" + ], + "x-return-types-union": "\\Upsun\\Model\\User", "x-description": [ - "Retrieves the user's permissions for the current project." + "Retrieves the specified user." ] }, "patch": { - "summary": "Update project access for a user", - "description": "Updates the user's permissions for the current project.", - "operationId": "update-user-project-access", + "summary": "Update a user", + "description": "Updates the specified user.", + "operationId": "update-user", "tags": [ - "User Access" + "Users" ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, "requestBody": { "content": { "application/json": { "schema": { + "description": "", "type": "object", - "required": [ - "permissions" - ], "properties": { - "permissions": { - "$ref": "#/components/schemas/ProjectPermissions" + "username": { + "type": "string", + "description": "The user's username." + }, + "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." + }, + "company": { + "type": "string", + "description": "The user's company." + }, + "website": { + "type": "string", + "format": "uri", + "description": "The user's website." + }, + "country": { + "type": "string", + "maxLength": 2, + "minLength": 2, + "description": "The user's country (2-letter country code)." + } + }, + "x-examples": { + "example-1": { + "company": "Platform.sh SAS", + "country": "EU", + "first_name": "Hello", + "last_name": "World", + "picture": "https://accounts.platform.sh/profiles/blimp_profile/themes/platformsh_theme/images/mail/logo.png", + "username": "username", + "website": "https://platform.sh" } } } } } }, - "responses": { - "204": { - "$ref": "#/components/responses/NoContent" - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - } - }, - "x-property-id-kebab": "update-user-project-access", - "x-tag-id-kebab": "User-Access", + "x-property-id-kebab": "update-user", + "x-tag-id-kebab": "Users", "x-return-types-displayReturn": false, + "x-phpdoc": { + "return": "\\Upsun\\Model\\User" + }, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": true, "x-return-types": [ - "void" + "\\Upsun\\Model\\User" ], - "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false, + "x-return-types-union": "\\Upsun\\Model\\User", "x-description": [ - "Updates the user's permissions for the current project." + "Updates the specified user." ] - }, - "delete": { - "summary": "Remove project access for a user", - "description": "Removes the user from the current project.", - "operationId": "remove-user-project-access", + } + }, + "/users/{user_id}/emailaddress": { + "parameters": [ + { + "$ref": "#/components/parameters/UserID" + } + ], + "post": { + "summary": "Reset email address", + "description": "Requests a reset of the user's email address. A confirmation email will be sent to the new address when the request is accepted.", + "operationId": "reset-email-address", "tags": [ - "User Access" + "Users" ], "responses": { "204": { - "$ref": "#/components/responses/NoContent" + "description": "No Content" }, "400": { - "$ref": "#/components/responses/BadRequest" + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, "403": { - "$ref": "#/components/responses/Forbidden" + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "404": { - "$ref": "#/components/responses/NotFound" + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } }, - "x-property-id-kebab": "remove-user-project-access", - "x-tag-id-kebab": "User-Access", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email_address": { + "type": "string", + "format": "email" + } + }, + "required": [ + "email_address" + ] + } + } + }, + "description": "" + }, + "x-property-id-kebab": "reset-email-address", + "x-tag-id-kebab": "Users", "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, "x-return-types": [ "void" ], "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false, "x-description": [ - "Removes the user from the current project." + "Requests a reset of the user's email address. A confirmation email will be sent to the new address when the", + "request is accepted." ] } }, - "/teams/{team_id}/project-access": { + "/users/{user_id}/resetpassword": { "parameters": [ { - "$ref": "#/components/parameters/TeamID" + "$ref": "#/components/parameters/UserID" } ], - "get": { - "summary": "List project access for a team", - "description": "Returns a list of items representing the team's project access.", - "operationId": "list-team-project-access", + "post": { + "summary": "Reset user password", + "description": "Requests a reset of the user's password. A password reset email will be sent to the user when the request is accepted.", + "operationId": "reset-password", "tags": [ - "Team Access" - ], - "parameters": [ - { - "$ref": "#/components/parameters/PageSizeAccess" - }, - { - "$ref": "#/components/parameters/PageBefore" - }, - { - "$ref": "#/components/parameters/PageAfter" - }, - { - "in": "query", - "name": "sort", - "description": "Allows sorting by a single field.
\nUse a dash (\"-\") to sort descending.
\nSupported fields: `project_title`, `granted_at`, `updated_at`.\n", - "schema": { - "type": "string", - "example": "-updated_at" - } - } + "Users" ], "responses": { - "200": { - "description": "OK", + "204": { + "description": "No Content" + }, + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TeamProjectAccess" - } - }, - "_links": { - "$ref": "#/components/schemas/ListLinks" - } - }, - "additionalProperties": false + "$ref": "#/components/schemas/Error" } } } - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" } }, - "x-property-id-kebab": "list-team-project-access", - "x-tag-id-kebab": "Team-Access", + "x-property-id-kebab": "reset-password", + "x-tag-id-kebab": "Users", "x-return-types-displayReturn": false, - "x-return-types": {}, "x-phpdoc": {}, - "x-returnable": true, - "x-description": [ - "Returns a list of items representing the team's project access." - ] - }, - "post": { - "summary": "Grant project access to a team", - "description": "Adds the team to one or more specified projects.", - "operationId": "grant-team-project-access", - "tags": [ - "Team Access" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "project_id": { - "type": "string", - "description": "ID of the project." - } - }, - "required": [ - "project_id" - ] - } - } - } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/NoContent" - }, - "400": { - "$ref": "#/components/responses/BadRequest" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "409": { - "$ref": "#/components/responses/Conflict" - } - }, - "x-property-id-kebab": "grant-team-project-access", - "x-tag-id-kebab": "Team-Access", - "x-return-types-displayReturn": false, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, "x-return-types": [ "void" ], "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false, "x-description": [ - "Adds the team to one or more specified projects." + "Requests a reset of the user's password. A password reset email will be sent to the user when the request is", + "accepted." ] } }, - "/teams/{team_id}/project-access/{project_id}": { - "parameters": [ - { - "$ref": "#/components/parameters/TeamID" - }, - { - "$ref": "#/components/parameters/ProjectID" - } - ], + "/organizations/{organization_id}/vouchers": { "get": { - "summary": "Get project access for a team", - "description": "Retrieves the team's permissions for the current project.", - "operationId": "get-team-project-access", + "summary": "List vouchers", + "description": "Retrieves vouchers for the specified organization.", + "operationId": "list-org-vouchers", "tags": [ - "Team Access" + "Vouchers" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIDName" + } ], "responses": { "200": { @@ -30377,65 +30783,120 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TeamProjectAccess" + "$ref": "#/components/schemas/Vouchers" } } } }, "403": { - "$ref": "#/components/responses/Forbidden" + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, "404": { - "$ref": "#/components/responses/NotFound" + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } }, - "x-property-id-kebab": "get-team-project-access", - "x-tag-id-kebab": "Team-Access", + "x-property-id-kebab": "list-org-vouchers", + "x-tag-id-kebab": "Vouchers", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\TeamProjectAccess" - ], - "x-return-types-union": "\\Upsun\\Model\\TeamProjectAccess", "x-phpdoc": { - "return": "\\Upsun\\Model\\TeamProjectAccess" + "return": "\\Upsun\\Model\\Vouchers" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\Vouchers" + ], + "x-return-types-union": "\\Upsun\\Model\\Vouchers", "x-description": [ - "Retrieves the team's permissions for the current project." + "Retrieves vouchers for the specified organization." ] - }, - "delete": { - "summary": "Remove project access for a team", - "description": "Removes the team from the current project.", - "operationId": "remove-team-project-access", + } + }, + "/organizations/{organization_id}/vouchers/apply": { + "post": { + "summary": "Apply voucher", + "description": "Applies a voucher for the specified organization, and refreshes the currently open order.", + "operationId": "apply-org-voucher", "tags": [ - "Team Access" + "Vouchers" + ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationID" + } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "description": "The voucher code." + } + } + } + } + } + }, "responses": { "204": { - "$ref": "#/components/responses/NoContent" - }, - "400": { - "$ref": "#/components/responses/BadRequest" + "description": "No Content" }, "403": { - "$ref": "#/components/responses/Forbidden" + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, "404": { - "$ref": "#/components/responses/NotFound" + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } }, - "x-property-id-kebab": "remove-team-project-access", - "x-tag-id-kebab": "Team-Access", + "x-property-id-kebab": "apply-org-voucher", + "x-tag-id-kebab": "Vouchers", "x-return-types-displayReturn": false, + "x-phpdoc": {}, + "x-ndjson-stream": false, + "x-stream-item-type": null, + "x-returnable": false, "x-return-types": [ "void" ], "x-return-types-union": "void", - "x-phpdoc": {}, - "x-returnable": false, "x-description": [ - "Removes the team from the current project." + "Applies a voucher for the specified organization, and refreshes the currently open order." ] } }, @@ -30564,14 +31025,16 @@ "x-property-id-kebab": "update-projects-environments-deployments-next", "x-tag-id-kebab": "Deployment", "x-return-types-displayReturn": false, - "x-return-types": [ - "\\Upsun\\Model\\AcceptedResponse" - ], - "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", "x-phpdoc": { "return": "\\Upsun\\Model\\AcceptedResponse" }, + "x-ndjson-stream": false, + "x-stream-item-type": null, "x-returnable": true, + "x-return-types": [ + "\\Upsun\\Model\\AcceptedResponse" + ], + "x-return-types-union": "\\Upsun\\Model\\AcceptedResponse", "x-description": [ "Update resources for either webapps, services, or workers in the next deployment." ] @@ -33424,93 +33887,6 @@ "The MFA enforcement for the organization." ] }, - "OrganizationSSOConfig": { - "description": "The SSO configuration for the organization.", - "type": "object", - "allOf": [ - { - "oneOf": [ - { - "$ref": "#/components/schemas/GoogleSSOConfig" - } - ], - "x-isOneOf": true - }, - { - "type": "object", - "properties": { - "organization_id": { - "type": "string", - "description": "Organization ID.", - "x-description": [ - "Organization ID." - ] - }, - "enforced": { - "type": "boolean", - "description": "Whether the configuration is enforced for all the organization members.", - "x-description": [ - "Whether the configuration is enforced for all the organization members." - ] - }, - "created_at": { - "type": "string", - "description": "The date and time when the SSO configuration was created.", - "format": "date-time", - "x-description": [ - "The date and time when the SSO configuration was created." - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "The date and time when the SSO configuration was last updated.", - "x-description": [ - "The date and time when the SSO configuration was last updated." - ] - } - } - } - ], - "x-examples": { - "example-1": { - "organization_id": "01EY8BWRSQ56EY1TDC32PARAJS", - "provider_type": "google", - "domain": "example.com", - "enforced": true, - "created_at": "2021-05-24T07:20:35.683264Z", - "updated_at": "2021-05-24T07:20:35.683264Z" - } - }, - "x-description": [ - "The SSO configuration for the organization." - ] - }, - "GoogleSSOConfig": { - "type": "object", - "title": "GoogleSSO", - "properties": { - "provider_type": { - "type": "string", - "description": "SSO provider type.", - "enum": [ - "google" - ], - "x-isDateTime": false, - "x-description": [ - "SSO provider type." - ] - }, - "domain": { - "type": "string", - "description": "Google hosted domain.", - "x-isDateTime": false, - "x-description": [ - "Google hosted domain." - ] - } - } - }, "Team": { "description": "", "type": "object", @@ -34676,6 +35052,16 @@ "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", + "x-isDateTime": false, + "x-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", @@ -34697,6 +35083,7 @@ "repository", "build_pull_requests", "pull_requests_clone_parent_data", + "pull_requests_max_pages", "resync_pull_requests" ], "additionalProperties": false, @@ -34851,170 +35238,190 @@ "Whether or not to clone parent data when building merge requests" ] }, - "resync_pull_requests": { - "type": "boolean", - "title": "Sync environment data", - "description": "Whether or not pull request environment data should be re-synced on every build", - "x-isDateTime": false, - "x-description": [ - "Whether or not pull request environment data should be re-synced on every build" - ] - } - }, - "required": [ - "type", - "repository" - ], - "additionalProperties": false, - "x-parentInterface": [ - "IntegrationCreateInput" - ] - }, - "BitbucketIntegrationPatch": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "Integration type", - "description": "The type of the integration", - "x-isDateTime": false, - "x-description": [ - "The type of the integration" - ] - }, - "fetch_branches": { - "type": "boolean", - "title": "Fetch Branches", - "description": "Whether or not to fetch branches", - "x-isDateTime": false, - "x-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`)", - "x-isDateTime": false, - "x-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", - "x-isDateTime": false, - "x-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.", - "x-description": [ - "The OAuth consumer key." - ] - }, - "secret": { - "type": "string", - "title": "OAuth consumer secret.", - "description": "The OAuth consumer secret.", - "x-description": [ - "The OAuth consumer secret." - ] - } - }, - "required": [ - "key", - "secret" - ], - "additionalProperties": false, - "nullable": true, - "title": "OAuth2 consumer", - "description": "The OAuth2 consumer information (optional)", - "x-isDateTime": false, - "x-description": [ - "The OAuth2 consumer information (optional)" - ] - }, - "addon_credentials": { - "type": "object", - "properties": { - "addon_key": { - "type": "string", - "title": "Addon key", - "description": "The addon key (public identifier).", - "x-description": [ - "The addon key (public identifier)." - ] - }, - "client_key": { - "type": "string", - "title": "Client key", - "description": "The client key (public identifier).", - "x-description": [ - "The client key (public identifier)." - ] - }, - "shared_secret": { - "type": "string", - "title": "Client secret", - "description": "The secret of the client.", - "x-description": [ - "The secret of the client." - ] - } - }, - "required": [ - "addon_key", - "client_key", - "shared_secret" - ], - "additionalProperties": false, + "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", + "x-isDateTime": false, + "x-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", + "x-isDateTime": false, + "x-description": [ + "Whether or not pull request environment data should be re-synced on every build" + ] + } + }, + "required": [ + "type", + "repository" + ], + "additionalProperties": false, + "x-parentInterface": [ + "IntegrationCreateCreateInput" + ] + }, + "BitbucketIntegrationPatch": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "Integration type", + "description": "The type of the integration", + "x-isDateTime": false, + "x-description": [ + "The type of the integration" + ] + }, + "fetch_branches": { + "type": "boolean", + "title": "Fetch Branches", + "description": "Whether or not to fetch branches", + "x-isDateTime": false, + "x-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`)", + "x-isDateTime": false, + "x-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", + "x-isDateTime": false, + "x-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.", + "x-description": [ + "The OAuth consumer key." + ] + }, + "secret": { + "type": "string", + "title": "OAuth consumer secret.", + "description": "The OAuth consumer secret.", + "x-description": [ + "The OAuth consumer secret." + ] + } + }, + "required": [ + "key", + "secret" + ], + "additionalProperties": false, + "nullable": true, + "title": "OAuth2 consumer", + "description": "The OAuth2 consumer information (optional)", + "x-isDateTime": false, + "x-description": [ + "The OAuth2 consumer information (optional)" + ] + }, + "addon_credentials": { + "type": "object", + "properties": { + "addon_key": { + "type": "string", + "title": "Addon key", + "description": "The addon key (public identifier).", + "x-description": [ + "The addon key (public identifier)." + ] + }, + "client_key": { + "type": "string", + "title": "Client key", + "description": "The client key (public identifier).", + "x-description": [ + "The client key (public identifier)." + ] + }, + "shared_secret": { + "type": "string", + "title": "Client secret", + "description": "The secret of the client.", + "x-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)", + "x-isDateTime": false, + "x-description": [ + "The addon credential information (optional)" + ] + }, + "repository": { + "type": "string", + "title": "Bitbucket repository", + "description": "The Bitbucket repository (in the form `user/repo`)", + "x-isDateTime": false, + "x-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", + "x-isDateTime": false, + "x-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", + "x-isDateTime": false, + "x-description": [ + "Whether or not to clone parent data when building merge requests" + ] + }, + "pull_requests_max_pages": { + "type": "integer", "nullable": true, - "title": "Addon credential", - "description": "The addon credential information (optional)", - "x-isDateTime": false, - "x-description": [ - "The addon credential information (optional)" - ] - }, - "repository": { - "type": "string", - "title": "Bitbucket repository", - "description": "The Bitbucket repository (in the form `user/repo`)", - "x-isDateTime": false, - "x-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", + "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", "x-isDateTime": false, "x-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", - "x-isDateTime": false, - "x-description": [ - "Whether or not to clone parent data when building merge requests" + "Maximum number of Bitbucket pull request pages to iterate when syncing pull requests. Null means no limit" ] }, "resync_pull_requests": { @@ -35315,7 +35722,7 @@ ], "additionalProperties": false, "x-parentInterface": [ - "IntegrationCreateInput" + "IntegrationCreateCreateInput" ] }, "BitbucketServerIntegrationPatch": { @@ -35562,7 +35969,7 @@ ], "additionalProperties": false, "x-parentInterface": [ - "IntegrationCreateInput" + "IntegrationCreateCreateInput" ] }, "BlackfireIntegrationPatch": { @@ -37734,12 +38141,19 @@ "nullable": true, "title": "Storage", "description": "" + }, + "object": { + "type": "integer", + "nullable": true, + "title": "Object storage size", + "description": "" } }, "required": [ "temporary", "instance", - "storage" + "storage", + "object" ], "additionalProperties": false, "nullable": true, @@ -37794,6 +38208,42 @@ "title": "Access Information", "description": "Access information, a mapping between access type and roles." }, + "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": { @@ -38590,6 +39040,7 @@ "size", "disk", "access", + "authorizations", "relationships", "additional_hosts", "mounts", @@ -38830,6 +39281,42 @@ "title": "Access Information", "description": "Access information, a mapping between access type and roles." }, + "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": { @@ -39226,6 +39713,7 @@ "size", "disk", "access", + "authorizations", "relationships", "additional_hosts", "mounts", @@ -39259,6 +39747,49 @@ ] }, "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", + "x-isDateTime": false, + "x-description": [ + "The profiles of the containers" + ] + }, + "tasks": { "type": "string", "title": "Deployment target name", "description": "The name of the deployment target", @@ -39285,7 +39816,8 @@ "routes", "webapps", "workers", - "container_profiles" + "container_profiles", + "tasks" ], "additionalProperties": false }, @@ -39746,7 +40278,7 @@ ], "additionalProperties": false, "x-parentInterface": [ - "IntegrationCreateInput" + "IntegrationCreateCreateInput" ] }, "EmailIntegrationPatch": { @@ -40549,11 +41081,29 @@ "type": "string", "nullable": true, "title": "Profile size", - "description": "Profile size of the service." + "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" + "profile_size", + "disk" ], "additionalProperties": false, "nullable": true, @@ -40628,12 +41178,45 @@ }, "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" + "workers", + "tasks" ], "additionalProperties": false, "nullable": true, @@ -42259,7 +42842,7 @@ ], "additionalProperties": false, "x-parentInterface": [ - "IntegrationCreateInput" + "IntegrationCreateCreateInput" ] }, "FastlyIntegrationPatch": { @@ -42980,7 +43563,7 @@ ], "additionalProperties": false, "x-parentInterface": [ - "IntegrationCreateInput" + "IntegrationCreateCreateInput" ] }, "GitLabIntegrationPatch": { @@ -43403,7 +43986,7 @@ ], "additionalProperties": false, "x-parentInterface": [ - "IntegrationCreateInput" + "IntegrationCreateCreateInput" ] }, "GithubIntegrationPatch": { @@ -43638,7 +44221,7 @@ ], "additionalProperties": false, "x-parentInterface": [ - "IntegrationCreateInput" + "IntegrationCreateCreateInput" ] }, "HealthWebHookIntegrationPatch": { @@ -43878,7 +44461,7 @@ ], "additionalProperties": false, "x-parentInterface": [ - "IntegrationCreateInput" + "IntegrationCreateCreateInput" ] }, "HttpLogIntegrationPatch": { @@ -44033,7 +44616,7 @@ "$ref": "#/components/schemas/Integration" } }, - "IntegrationCreateInput": { + "IntegrationCreateCreateInput": { "oneOf": [ { "$ref": "#/components/schemas/BitbucketIntegrationCreateInput" @@ -44072,7 +44655,7 @@ "$ref": "#/components/schemas/NewRelicIntegrationCreateInput" }, { - "$ref": "#/components/schemas/OtlpLogIntegrationCreateInput" + "$ref": "#/components/schemas/OtlpLogIntegrationCreateCreateInput" }, { "$ref": "#/components/schemas/ScriptIntegrationCreateInput" @@ -44501,7 +45084,7 @@ ], "additionalProperties": false, "x-parentInterface": [ - "IntegrationCreateInput" + "IntegrationCreateCreateInput" ] }, "NewRelicIntegrationPatch": { @@ -44701,7 +45284,7 @@ "Integration" ] }, - "OtlpLogIntegrationCreateInput": { + "OtlpLogIntegrationCreateCreateInput": { "type": "object", "properties": { "type": { @@ -44774,7 +45357,7 @@ ], "additionalProperties": false, "x-parentInterface": [ - "IntegrationCreateInput" + "IntegrationCreateCreateInput" ] }, "OtlpLogIntegrationPatch": { @@ -44955,7 +45538,7 @@ ], "additionalProperties": false, "x-parentInterface": [ - "IntegrationCreateInput" + "IntegrationCreateCreateInput" ] }, "PagerDutyIntegrationPatch": { @@ -45928,6 +46511,93 @@ "description": "", "x-isDateTime": false }, + "object_storage": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Enabled", + "description": "If true, implicit object-storage can be used.", + "x-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.", + "x-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.", + "x-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.", + "x-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.", + "x-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.", + "x-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.", + "x-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.", + "x-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": "", + "x-isDateTime": false + }, "data_retention": { "type": "object", "properties": { @@ -46502,6 +47172,7 @@ "images", "instance_limit", "build_resources", + "object_storage", "data_retention", "autoscaling" ], @@ -48761,6 +49432,262 @@ "$ref": "#/components/schemas/Ref" } }, + "RegistryCredential": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "RegistryCredential Identifier", + "description": "The identifier of RegistryCredential", + "x-isDateTime": false, + "x-description": [ + "The identifier of RegistryCredential" + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Creation date", + "description": "The creation date", + "x-isDateTime": true, + "x-description": [ + "The creation date" + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "title": "Update date", + "description": "The update date", + "x-isDateTime": true, + "x-description": [ + "The update date" + ] + }, + "registry": { + "type": "string", + "title": "Registry URL", + "description": "Registry hostname with optional port and optional path namespace, e.g. 'ghcr.io', 'registry.example.com:5000', 'quay.io/myorg' (no scheme, no trailing slash, lowercase only)", + "x-isDateTime": false, + "x-description": [ + "Registry hostname with optional port and optional path namespace, e.g. 'ghcr.io', 'registry.example.com:5000',", + "'quay.io/myorg' (no scheme, no trailing slash, lowercase only)" + ] + }, + "auth": { + "type": "object", + "properties": { + "username": { + "type": "string", + "title": "Username", + "description": "Username used to basic auth to container registry", + "x-description": [ + "Username used to basic auth to container registry" + ] + }, + "password": { + "type": "string", + "title": "Password", + "description": "Password used to basic auth to container registry", + "x-description": [ + "Password used to basic auth to container registry" + ] + } + }, + "required": [ + "username", + "password" + ], + "additionalProperties": false, + "nullable": true, + "title": "Basic Auth", + "description": "Basic Auth for the container registry", + "x-isDateTime": false, + "x-description": [ + "Basic Auth for the container registry" + ] + }, + "identity_token": { + "type": "string", + "nullable": true, + "title": "Identity Token", + "description": "Refresh token to exchange for bearer token with container registry auth", + "x-isDateTime": false, + "x-description": [ + "Refresh token to exchange for bearer token with container registry auth" + ] + }, + "registry_token": { + "type": "string", + "nullable": true, + "title": "Registry token", + "description": "Bearer token used to auth with container registry auth", + "x-isDateTime": false, + "x-description": [ + "Bearer token used to auth with container registry auth" + ] + } + }, + "required": [ + "id", + "created_at", + "updated_at", + "registry", + "auth", + "identity_token", + "registry_token" + ], + "additionalProperties": false + }, + "RegistryCredentialCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RegistryCredential" + } + }, + "RegistryCredentialCreateInput": { + "type": "object", + "properties": { + "registry": { + "type": "string", + "title": "Registry URL", + "description": "Registry hostname with optional port and optional path namespace, e.g. 'ghcr.io', 'registry.example.com:5000', 'quay.io/myorg' (no scheme, no trailing slash, lowercase only)", + "x-isDateTime": false, + "x-description": [ + "Registry hostname with optional port and optional path namespace, e.g. 'ghcr.io', 'registry.example.com:5000',", + "'quay.io/myorg' (no scheme, no trailing slash, lowercase only)" + ] + }, + "auth": { + "type": "object", + "properties": { + "username": { + "type": "string", + "title": "Username", + "description": "Username used to basic auth to container registry", + "x-description": [ + "Username used to basic auth to container registry" + ] + }, + "password": { + "type": "string", + "title": "Password", + "description": "Password used to basic auth to container registry", + "x-description": [ + "Password used to basic auth to container registry" + ] + } + }, + "required": [ + "username", + "password" + ], + "additionalProperties": false, + "nullable": true, + "title": "Basic Auth", + "description": "Basic Auth for the container registry", + "x-isDateTime": false, + "x-description": [ + "Basic Auth for the container registry" + ] + }, + "identity_token": { + "type": "string", + "nullable": true, + "title": "Identity Token", + "description": "Refresh token to exchange for bearer token with container registry auth", + "x-isDateTime": false, + "x-description": [ + "Refresh token to exchange for bearer token with container registry auth" + ] + }, + "registry_token": { + "type": "string", + "nullable": true, + "title": "Registry token", + "description": "Bearer token used to auth with container registry auth", + "x-isDateTime": false, + "x-description": [ + "Bearer token used to auth with container registry auth" + ] + } + }, + "required": [ + "registry" + ], + "additionalProperties": false + }, + "RegistryCredentialPatch": { + "type": "object", + "properties": { + "registry": { + "type": "string", + "title": "Registry URL", + "description": "Registry hostname with optional port and optional path namespace, e.g. 'ghcr.io', 'registry.example.com:5000', 'quay.io/myorg' (no scheme, no trailing slash, lowercase only)", + "x-isDateTime": false, + "x-description": [ + "Registry hostname with optional port and optional path namespace, e.g. 'ghcr.io', 'registry.example.com:5000',", + "'quay.io/myorg' (no scheme, no trailing slash, lowercase only)" + ] + }, + "auth": { + "type": "object", + "properties": { + "username": { + "type": "string", + "title": "Username", + "description": "Username used to basic auth to container registry", + "x-description": [ + "Username used to basic auth to container registry" + ] + }, + "password": { + "type": "string", + "title": "Password", + "description": "Password used to basic auth to container registry", + "x-description": [ + "Password used to basic auth to container registry" + ] + } + }, + "required": [ + "username", + "password" + ], + "additionalProperties": false, + "nullable": true, + "title": "Basic Auth", + "description": "Basic Auth for the container registry", + "x-isDateTime": false, + "x-description": [ + "Basic Auth for the container registry" + ] + }, + "identity_token": { + "type": "string", + "nullable": true, + "title": "Identity Token", + "description": "Refresh token to exchange for bearer token with container registry auth", + "x-isDateTime": false, + "x-description": [ + "Refresh token to exchange for bearer token with container registry auth" + ] + }, + "registry_token": { + "type": "string", + "nullable": true, + "title": "Registry token", + "description": "Bearer token used to auth with container registry auth", + "x-isDateTime": false, + "x-description": [ + "Bearer token used to auth with container registry auth" + ] + } + }, + "additionalProperties": false + }, "ReplacementDomainStorage": { "type": "object", "properties": { @@ -49294,7 +50221,7 @@ ], "additionalProperties": false, "x-parentInterface": [ - "IntegrationCreateInput" + "IntegrationCreateCreateInput" ] }, "ScriptIntegrationPatch": { @@ -49502,7 +50429,7 @@ ], "additionalProperties": false, "x-parentInterface": [ - "IntegrationCreateInput" + "IntegrationCreateCreateInput" ] }, "SlackIntegrationPatch": { @@ -49766,7 +50693,7 @@ ], "additionalProperties": false, "x-parentInterface": [ - "IntegrationCreateInput" + "IntegrationCreateCreateInput" ] }, "SplunkIntegrationPatch": { @@ -50052,7 +50979,7 @@ ], "additionalProperties": false, "x-parentInterface": [ - "IntegrationCreateInput" + "IntegrationCreateCreateInput" ] }, "SumologicIntegrationPatch": { @@ -50408,7 +51335,7 @@ ], "additionalProperties": false, "x-parentInterface": [ - "IntegrationCreateInput" + "IntegrationCreateCreateInput" ] }, "SyslogIntegrationPatch": { @@ -50681,6 +51608,18 @@ "The relationships of the task to defined services and applications" ] }, + "additional_hosts": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Additional hosts", + "description": "A mapping of hostname to ip address to be added to the task container's hosts file", + "x-isDateTime": false, + "x-description": [ + "A mapping of hostname to ip address to be added to the task container's hosts file" + ] + }, "mounts": { "type": "object", "additionalProperties": { @@ -50724,6 +51663,16 @@ "Filesystem mounts of this task" ] }, + "timezone": { + "type": "string", + "nullable": true, + "title": "Timezone", + "description": "The timezone of the task. Defaults to the project's timezone if not specified", + "x-isDateTime": false, + "x-description": [ + "The timezone of the task. Defaults to the project's timezone if not specified" + ] + }, "variables": { "type": "object", "additionalProperties": { @@ -50737,6 +51686,67 @@ "Variables provide environment-sensitive information to control how your task behaves" ] }, + "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", + "x-isDateTime": false, + "x-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", + "x-isDateTime": false, + "x-description": [ + "Runtime-specific configuration" + ] + }, + "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 task", + "x-isDateTime": false, + "x-description": [ + "Authorizations available to this task" + ] + }, "run": { "type": "object", "properties": { @@ -50769,6 +51779,49 @@ "Configuration for task execution" ] }, + "resources": { + "type": "object", + "properties": { + "base_memory": { + "type": "integer", + "title": "Base memory", + "description": "The base memory for the container", + "x-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", + "x-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)", + "x-isDateTime": false, + "x-description": [ + "Resources configuration (base memory and memory ratio)" + ] + }, + "container_profile": { + "type": "string", + "nullable": true, + "title": "Container Profile", + "description": "Selected container profile for the task", + "x-isDateTime": false, + "x-description": [ + "Selected container profile for the task" + ] + }, "name": { "type": "string", "title": "Task name", @@ -50785,9 +51838,16 @@ "source", "hooks", "relationships", + "additional_hosts", "mounts", + "timezone", "variables", + "dependencies", + "runtime", + "authorizations", "run", + "resources", + "container_profile", "name" ], "additionalProperties": false @@ -51526,7 +52586,7 @@ ], "additionalProperties": false, "x-parentInterface": [ - "IntegrationCreateInput" + "IntegrationCreateCreateInput" ] }, "WebHookIntegrationPatch": { @@ -52661,7 +53721,7 @@ }, "address": { "type": "object", - "description": "Link to the current organization's address.", + "description": "Link to the current organization's address. This link may not be present for all organizations.", "properties": { "href": { "type": "string", @@ -52672,12 +53732,28 @@ } }, "x-description": [ - "Link to the current organization's address." + "Link to the current organization's address. This link may not be present for all organizations." ] }, "profile": { "type": "object", - "description": "Link to the current organization's profile.", + "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.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current organization's billing profile details. This link may not be present for all organizations." + ] + }, + "account": { + "type": "object", + "description": "Link to the current organization's account. This link may not be present for all organizations.", "properties": { "href": { "type": "string", @@ -52688,12 +53764,12 @@ } }, "x-description": [ - "Link to the current organization's profile." + "Link to the current organization's account. This link may not be present for all organizations." ] }, "payment-source": { "type": "object", - "description": "Link to the current organization's payment source.", + "description": "Link to the current organization's payment source. This link may not be present for all organizations.", "properties": { "href": { "type": "string", @@ -52704,12 +53780,12 @@ } }, "x-description": [ - "Link to the current organization's payment source." + "Link to the current organization's payment source. This link may not be present for all organizations." ] }, "orders": { "type": "object", - "description": "Link to the current organization's orders.", + "description": "Link to the current organization's orders. This link may not be present for all organizations.", "properties": { "href": { "type": "string", @@ -52720,12 +53796,28 @@ } }, "x-description": [ - "Link to the current organization's orders." + "Link to the current organization's orders. This link may not be present for all organizations." ] }, "vouchers": { "type": "object", - "description": "Link to the current organization's vouchers.", + "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.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current organization's vouchers. This link may not be present for all organizations." + ] + }, + "discounts": { + "type": "object", + "description": "Link to the current organization's discounts. This link may not be present for all organizations.", "properties": { "href": { "type": "string", @@ -52736,12 +53828,12 @@ } }, "x-description": [ - "Link to the current organization's vouchers." + "Link to the current organization's discounts. This link may not be present for all organizations." ] }, "apply-voucher": { "type": "object", - "description": "Link for applying a voucher for the current organization.", + "description": "Link for applying a voucher for the current organization. This link may not be present for all organizations.", "properties": { "href": { "type": "string", @@ -52759,12 +53851,12 @@ } }, "x-description": [ - "Link for applying a voucher for the current organization." + "Link for applying a voucher for the current organization. This link may not be present for all organizations." ] }, "subscriptions": { "type": "object", - "description": "Link to the current organization's subscriptions.", + "description": "Link to the current organization's subscriptions. This link may not be present for all organizations.", "properties": { "href": { "type": "string", @@ -52775,7 +53867,7 @@ } }, "x-description": [ - "Link to the current organization's subscriptions." + "Link to the current organization's subscriptions. This link may not be present for all organizations." ] }, "create-subscription": { @@ -52803,7 +53895,39 @@ }, "estimate-subscription": { "type": "object", - "description": "Link for estimating the price of a new subscription.", + "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.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link for estimating the price of a new subscription. This link may not be present for all organizations." + ] + }, + "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.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current organization's prepayment information. This link may not be present for all organizations." + ] + }, + "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", @@ -52814,12 +53938,28 @@ } }, "x-description": [ - "Link for estimating the price of a new subscription." + "Link to the organization's billing profile. This link may not be present for all organizations." ] }, "mfa-enforcement": { "type": "object", - "description": "Link to the current organization's MFA enforcement settings.", + "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.", + "x-description": [ + "URL of the link." + ] + } + }, + "x-description": [ + "Link to the current organization's MFA enforcement settings. This link may not be present for all organizations." + ] + }, + "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", @@ -52830,7 +53970,7 @@ } }, "x-description": [ - "Link to the current organization's MFA enforcement settings." + "Link to the current organization's SSO configuration. This link may not be present for all organizations." ] } } @@ -54147,6 +55287,115 @@ } } }, + "ProvisionStep": { + "type": "object", + "description": "A single step in the provisioning plan.", + "required": [ + "stage", + "label" + ], + "properties": { + "stage": { + "type": "string", + "description": "The step identifier.", + "x-isDateTime": false, + "x-description": [ + "The step identifier." + ] + }, + "label": { + "type": "string", + "description": "A human-readable label for the step.", + "x-isDateTime": false, + "x-description": [ + "A human-readable label for the step." + ] + } + }, + "additionalProperties": false, + "x-description": [ + "A single step in the provisioning plan." + ] + }, + "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" + ], + "x-isDateTime": false, + "x-description": [ + "The event type." + ] + }, + "project_id": { + "type": "string", + "description": "The ID of the project being provisioned.", + "x-isDateTime": false, + "x-description": [ + "The ID of the project being provisioned." + ] + }, + "stage": { + "type": "string", + "description": "The current provisioning stage.", + "x-isDateTime": false, + "x-description": [ + "The current provisioning stage." + ] + }, + "label": { + "type": "string", + "description": "A human-readable label for the current stage.", + "x-isDateTime": false, + "x-description": [ + "A human-readable label for the current stage." + ] + }, + "reason": { + "type": "string", + "description": "The reason for failure (only present on error events).", + "x-isDateTime": false, + "x-description": [ + "The reason for failure (only present on error events)." + ] + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "The time the event was emitted.", + "x-isDateTime": true, + "x-description": [ + "The time the event was emitted." + ] + }, + "steps": { + "type": "array", + "description": "Ordered list of provisioning steps.", + "items": { + "$ref": "#/components/schemas/ProvisionStep" + }, + "x-isDateTime": false, + "x-description": [ + "Ordered list of provisioning steps." + ] + } + }, + "additionalProperties": false, + "x-description": [ + "A single event in the provisioning progress stream." + ] + }, "OrganizationProject": { "type": "object", "properties": { @@ -54464,225 +55713,6 @@ }, "additionalProperties": false }, - "ProjectAddon": { - "description": "Project add-on. Uses discriminator on `type` to select field shape.", - "allOf": [ - { - "$ref": "#/components/schemas/ProjectAddonBase" - }, - { - "oneOf": [ - { - "$ref": "#/components/schemas/ProjectAddonWithSkuFields" - }, - { - "$ref": "#/components/schemas/ProjectAddonWithQuantityFields" - } - ], - "x-isOneOf": true - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "backups": "#/components/schemas/ProjectAddonWithSkuFields", - "big_dev": "#/components/schemas/ProjectAddonWithSkuFields", - "big_dev_service": "#/components/schemas/ProjectAddonWithSkuFields", - "blackfire": "#/components/schemas/ProjectAddonWithSkuFields", - "continuous_profiling": "#/components/schemas/ProjectAddonWithSkuFields", - "project_support_level": "#/components/schemas/ProjectAddonWithSkuFields", - "observability_suite": "#/components/schemas/ProjectAddonWithSkuFields", - "user_licenses": "#/components/schemas/ProjectAddonWithQuantityFields", - "hipaa": "#/components/schemas/ProjectAddonWithSkuFields", - "environments": "#/components/schemas/ProjectAddonWithQuantityFields", - "storage": "#/components/schemas/ProjectAddonWithQuantityFields" - } - }, - "x-description": [ - "Project add-on. Uses discriminator on `type` to select field shape." - ], - "x-uniqueDiscriminatorModels": [ - "ProjectAddonWithSkuFields", - "ProjectAddonWithQuantityFields" - ] - }, - "ProjectAddonBase": { - "type": "object", - "required": [ - "id", - "type" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/ProjectAddonID" - }, - "project_id": { - "$ref": "#/components/schemas/ProjectID" - }, - "type": { - "$ref": "#/components/schemas/AddonType" - }, - "status": { - "type": "string", - "description": "Lifecycle status of the add-on.", - "enum": [ - "requested", - "active", - "failed" - ], - "x-isDateTime": false, - "x-description": [ - "Lifecycle status of the add-on." - ] - }, - "title": { - "type": "string", - "description": "Human-friendly title of the add-on or SKU.", - "x-isDateTime": false, - "x-description": [ - "Human-friendly title of the add-on or SKU." - ] - }, - "unit": { - "type": "string", - "nullable": true, - "description": "Unit for quantity-based add-ons when applicable.", - "x-isDateTime": false, - "x-description": [ - "Unit for quantity-based add-ons when applicable." - ] - }, - "allowed_values": { - "description": "Allowed values for the add-on depending on user role and options.", - "type": "array", - "nullable": true, - "items": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer" - } - ], - "x-isOneOf": true - }, - "x-isDateTime": false, - "x-description": [ - "Allowed values for the add-on depending on user role and options." - ] - }, - "created_at": { - "$ref": "#/components/schemas/CreatedAt" - }, - "updated_at": { - "$ref": "#/components/schemas/UpdatedAt" - }, - "activities": { - "description": "Activities related to the add-on.", - "type": "array", - "items": { - "$ref": "#/components/schemas/Activity" - }, - "nullable": true, - "x-isDateTime": false, - "x-description": [ - "Activities related to the add-on." - ] - }, - "_links": { - "type": "object", - "properties": { - "self": { - "type": "object", - "description": "Link to the current add-on.", - "properties": { - "href": { - "type": "string", - "description": "URL of the link.", - "x-description": [ - "URL of the link." - ] - } - }, - "x-description": [ - "Link to the current add-on." - ] - }, - "update": { - "type": "object", - "nullable": true, - "description": "Link for updating the current add-on.", - "properties": { - "href": { - "type": "string", - "description": "URL of the link.", - "x-description": [ - "URL of the link." - ] - }, - "method": { - "type": "string", - "description": "The HTTP method to use.", - "x-description": [ - "The HTTP method to use." - ] - } - }, - "x-description": [ - "Link for updating the current add-on." - ] - }, - "delete": { - "type": "object", - "nullable": true, - "description": "Link for deleting the current add-on.", - "properties": { - "href": { - "type": "string", - "description": "URL of the link.", - "x-description": [ - "URL of the link." - ] - }, - "method": { - "type": "string", - "description": "The HTTP method to use.", - "x-description": [ - "The HTTP method to use." - ] - } - }, - "x-description": [ - "Link for deleting the current add-on." - ] - } - } - } - } - }, - "ProjectAddonWithSkuFields": { - "type": "object", - "required": [ - "sku" - ], - "properties": { - "sku": { - "$ref": "#/components/schemas/ProjectAddonSKU" - } - } - }, - "ProjectAddonWithQuantityFields": { - "type": "object", - "required": [ - "quantity" - ], - "properties": { - "quantity": { - "$ref": "#/components/schemas/ProjectAddonQuantity" - } - } - }, "ProjectCarbon": { "type": "object", "properties": { @@ -54959,34 +55989,6 @@ "The referenced region, or null if it no longer exists." ] }, - "AddonType": { - "type": "string", - "description": "The type of the add-on.", - "x-description": [ - "The type of the add-on." - ] - }, - "ProjectAddonID": { - "type": "string", - "description": "The ID of the add-on.", - "x-description": [ - "The ID of the add-on." - ] - }, - "ProjectAddonSKU": { - "type": "string", - "description": "The SKU of the add-on.", - "x-description": [ - "The SKU of the add-on." - ] - }, - "ProjectAddonQuantity": { - "type": "integer", - "description": "The quantity of the add-on.", - "x-description": [ - "The quantity of the add-on." - ] - }, "ProjectID": { "type": "string", "description": "The ID of the project.", @@ -55361,6 +56363,85 @@ "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.", + "x-isDateTime": false, + "x-description": [ + "The unique identifier of the history record." + ] + }, + "project_id": { + "type": "string", + "description": "The ID of the project.", + "x-isDateTime": false, + "x-description": [ + "The ID of the project." + ] + }, + "event_type": { + "type": "string", + "description": "The type of event that triggered the record.", + "x-isDateTime": false, + "x-description": [ + "The type of event that triggered the record." + ] + }, + "event_id": { + "type": "string", + "description": "The ID of the event.", + "x-isDateTime": false, + "x-description": [ + "The ID of the event." + ] + }, + "resource": { + "type": "string", + "description": "The resource type (e.g., cpu_app, memory_services, storage).", + "x-isDateTime": false, + "x-description": [ + "The resource type (e.g., cpu_app, memory_services, storage)." + ] + }, + "environment": { + "type": "string", + "description": "The environment name.", + "x-isDateTime": false, + "x-description": [ + "The environment name." + ] + }, + "quantity": { + "type": "string", + "description": "The quantity of the resource.", + "x-isDateTime": false, + "x-description": [ + "The quantity of the resource." + ] + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the record was created.", + "x-isDateTime": true, + "x-description": [ + "The timestamp when the record was created." + ] + }, + "user": { + "type": "string", + "description": "The ID of the user who triggered the event.", + "x-isDateTime": false, + "x-description": [ + "The ID of the user who triggered the event." + ] + } + }, + "additionalProperties": false + }, "CreatedAt": { "type": "string", "format": "date-time", @@ -56820,37 +57901,201 @@ "x-description": [ "Allows filtering by project `status` using one or more operators." ] - } - }, - "securitySchemes": { - "BearerAuth": { - "type": "http", - "scheme": "bearer" }, - "OAuth2": { - "type": "oauth2", - "flows": { - "authorizationCode": { - "tokenUrl": "https://auth.api.platform.sh/oauth2/token", - "refreshUrl": "https://auth.api.platform.sh/oauth2/token", - "scopes": {}, - "authorizationUrl": "https://auth.api.platform.sh/oauth2/authorize" + "RuntimeMode": { + "name": "runtime_mode", + "in": "query", + "description": "Filter mode for runtime parameter. \"1\" (additive) includes only specified runtimes. \"-1\" (subtractive) excludes specified runtimes and includes all others. When omitted while runtime[] is supplied, defaults to \"1\" (additive).", + "schema": { + "type": "integer", + "enum": [ + 1, + -1 + ], + "example": 1 + }, + "x-description": [ + "Filter mode for runtime parameter. \"1\" (additive) includes only specified", + "runtimes. \"-1\" (subtractive) excludes specified runtimes and includes all", + "others. When omitted while runtime[] is supplied, defaults to \"1\" (additive)." + ] + }, + "RuntimeValues": { + "name": "runtime[]", + "in": "query", + "description": "Filter by runtime language. Can be specified multiple times for multiple values (e.g., ?runtime[]=go&runtime[]=python). Use runtime_mode to control inclusion/exclusion behavior.", + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "go" } }, - "description": "" + "x-description": [ + "Filter by runtime language. Can be specified multiple times for multiple values", + "(e.g., ?runtime[]=go&runtime[]=python). Use runtime_mode to control", + "inclusion/exclusion behavior." + ] }, - "OAuth2Admin": { - "type": "oauth2", - "flows": { - "clientCredentials": { - "tokenUrl": "https://auth.api.platform.sh/oauth2/token", - "refreshUrl": "", - "scopes": { - "admin": "administrative operations" - } + "RuntimeVersionMode": { + "name": "runtime_version_mode", + "in": "query", + "description": "Filter mode for runtime_version parameter. \"1\" (additive) includes only specified versions. \"-1\" (subtractive) excludes specified versions and includes all others. When omitted while runtime_version[] is supplied, defaults to \"1\" (additive).", + "schema": { + "type": "integer", + "enum": [ + 1, + -1 + ], + "example": 1 + }, + "x-description": [ + "Filter mode for runtime_version parameter. \"1\" (additive) includes only", + "specified versions. \"-1\" (subtractive) excludes specified versions and includes", + "all others. When omitted while runtime_version[] is supplied, defaults to \"1\"", + "(additive)." + ] + }, + "RuntimeVersionValues": { + "name": "runtime_version[]", + "in": "query", + "description": "Filter by runtime version. Can be specified multiple times for multiple values (e.g., ?runtime_version[]=1.21&runtime_version[]=1.22). Use runtime_version_mode to control inclusion/exclusion behavior.", + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "1.21" + } + }, + "x-description": [ + "Filter by runtime version. Can be specified multiple times for multiple values", + "(e.g., ?runtime_version[]=1.21&runtime_version[]=1.22). Use runtime_version_mode", + "to control inclusion/exclusion behavior." + ] + }, + "RuntimeArchMode": { + "name": "runtime_arch_mode", + "in": "query", + "description": "Filter mode for runtime_arch parameter. \"1\" (additive) includes only specified architectures. \"-1\" (subtractive) excludes specified architectures and includes all others. When omitted while runtime_arch[] is supplied, defaults to \"1\" (additive).", + "schema": { + "type": "integer", + "enum": [ + 1, + -1 + ], + "example": 1 + }, + "x-description": [ + "Filter mode for runtime_arch parameter. \"1\" (additive) includes only specified", + "architectures. \"-1\" (subtractive) excludes specified architectures and includes", + "all others. When omitted while runtime_arch[] is supplied, defaults to \"1\"", + "(additive)." + ] + }, + "RuntimeArchValues": { + "name": "runtime_arch[]", + "in": "query", + "description": "Filter by runtime architecture. Can be specified multiple times for multiple values (e.g., ?runtime_arch[]=amd64&runtime_arch[]=arm64). Use runtime_arch_mode to control inclusion/exclusion behavior.", + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "amd64" + } + }, + "x-description": [ + "Filter by runtime architecture. Can be specified multiple times for multiple", + "values (e.g., ?runtime_arch[]=amd64&runtime_arch[]=arm64). Use runtime_arch_mode", + "to control inclusion/exclusion behavior." + ] + }, + "RuntimeOsMode": { + "name": "runtime_os_mode", + "in": "query", + "description": "Filter mode for runtime_os parameter. \"1\" (additive) includes only specified operating systems. \"-1\" (subtractive) excludes specified operating systems and includes all others. When omitted while runtime_os[] is supplied, defaults to \"1\" (additive).", + "schema": { + "type": "integer", + "enum": [ + 1, + -1 + ], + "example": 1 + }, + "x-description": [ + "Filter mode for runtime_os parameter. \"1\" (additive) includes only specified", + "operating systems. \"-1\" (subtractive) excludes specified operating systems and", + "includes all others. When omitted while runtime_os[] is supplied, defaults to", + "\"1\" (additive)." + ] + }, + "RuntimeOsValues": { + "name": "runtime_os[]", + "in": "query", + "description": "Filter by runtime operating system. Can be specified multiple times for multiple values (e.g., ?runtime_os[]=linux&runtime_os[]=darwin). Use runtime_os_mode to control inclusion/exclusion behavior.", + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "linux" } }, - "description": "" + "x-description": [ + "Filter by runtime operating system. Can be specified multiple times for multiple", + "values (e.g., ?runtime_os[]=linux&runtime_os[]=darwin). Use runtime_os_mode to", + "control inclusion/exclusion behavior." + ] + }, + "ProbeVersionMode": { + "name": "probe_version_mode", + "in": "query", + "description": "Filter mode for probe_version parameter. \"1\" (additive) includes only specified probe versions. \"-1\" (subtractive) excludes specified probe versions and includes all others. When omitted while probe_version[] is supplied, defaults to \"1\" (additive).", + "schema": { + "type": "integer", + "enum": [ + 1, + -1 + ], + "example": 1 + }, + "x-description": [ + "Filter mode for probe_version parameter. \"1\" (additive) includes only specified", + "probe versions. \"-1\" (subtractive) excludes specified probe versions and", + "includes all others. When omitted while probe_version[] is supplied, defaults to", + "\"1\" (additive)." + ] + }, + "ProbeVersionValues": { + "name": "probe_version[]", + "in": "query", + "description": "Filter by probe version. Can be specified multiple times for multiple values (e.g., ?probe_version[]=2.28.2&probe_version[]=2.28.1). Use probe_version_mode to control inclusion/exclusion behavior.", + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "2.28.2" + } + }, + "x-description": [ + "Filter by probe version. Can be specified multiple times for multiple values", + "(e.g., ?probe_version[]=2.28.2&probe_version[]=2.28.1). Use probe_version_mode", + "to control inclusion/exclusion behavior." + ] + } + }, + "securitySchemes": { + "BearerAuth": { + "type": "http", + "scheme": "bearer" } }, "responses": { @@ -56924,6 +58169,7 @@ "name": "Project Administration", "tags": [ "Project", + "Domain Claim", "Domain Management", "Cert Management", "Certificate Provisioner", @@ -56944,7 +58190,8 @@ "Source Operations", "Runtime Operations", "Deployment", - "Autoscaling" + "Autoscaling", + "Task" ] }, { @@ -56985,7 +58232,8 @@ "Discounts", "Vouchers", "Records", - "Profiles" + "Profiles", + "Billing Profile Projects" ] }, {