{
  "opencollection": "1.0.0",
  "info": {
    "name": "Upsun.com Rest Add-ons Organization Projects API",
    "version": "1.0"
  },
  "request": {
    "auth": {
      "type": "oauth2",
      "flow": "authorization_code",
      "authorizationUrl": "https://auth.api.platform.sh/oauth2/authorize",
      "accessTokenUrl": "https://auth.api.platform.sh/oauth2/token",
      "credentials": {
        "clientId": "{{clientId}}",
        "clientSecret": "{{clientSecret}}"
      }
    }
  },
  "items": [
    {
      "info": {
        "name": "Organization Projects",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List projects",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{schemes}://api.upsun.com/organizations/:organization_id/projects",
            "params": [
              {
                "name": "organization_id",
                "value": "",
                "type": "path",
                "description": "The ID of the organization."
              },
              {
                "name": "filter[id]",
                "value": "",
                "type": "query",
                "description": "Allows filtering by `id` using one or more operators."
              },
              {
                "name": "filter[title]",
                "value": "",
                "type": "query",
                "description": "Allows filtering by `title` using one or more operators."
              },
              {
                "name": "filter[status]",
                "value": "",
                "type": "query",
                "description": "Allows filtering by `status` using one or more operators."
              },
              {
                "name": "filter[updated_at]",
                "value": "",
                "type": "query",
                "description": "Allows filtering by `updated_at` using one or more operators."
              },
              {
                "name": "filter[created_at]",
                "value": "",
                "type": "query",
                "description": "Allows filtering by `created_at` using one or more operators."
              },
              {
                "name": "page[size]",
                "value": "",
                "type": "query",
                "description": "Determines the number of items to show."
              },
              {
                "name": "page[before]",
                "value": "",
                "type": "query",
                "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally."
              },
              {
                "name": "page[after]",
                "value": "",
                "type": "query",
                "description": "Pagination cursor. This is automatically generated as necessary and provided in HAL links (_links); it should not be constructed externally."
              },
              {
                "name": "sort",
                "value": "",
                "type": "query",
                "description": "Allows sorting by a single field.<br>\nUse a dash (\"-\") to sort descending.<br>\nSupported fields: `id`, `region`, `title`, `type`, `plan`, `status`, `created_at`, `updated_at`.\n"
              }
            ]
          },
          "docs": "Retrieves a list of projects for the specified organization."
        },
        {
          "info": {
            "name": "Create project",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{schemes}://api.upsun.com/organizations/:organization_id/projects",
            "params": [
              {
                "name": "organization_id",
                "value": "",
                "type": "path",
                "description": "The ID of the organization."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates a new project in the specified organization."
        },
        {
          "info": {
            "name": "Get project",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{schemes}://api.upsun.com/organizations/:organization_id/projects/:project_id",
            "params": [
              {
                "name": "organization_id",
                "value": "",
                "type": "path",
                "description": "The ID of the organization."
              },
              {
                "name": "project_id",
                "value": "",
                "type": "path",
                "description": "The ID of the project."
              }
            ]
          },
          "docs": "Retrieves the specified project."
        },
        {
          "info": {
            "name": "Update project",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "{schemes}://api.upsun.com/organizations/:organization_id/projects/:project_id",
            "params": [
              {
                "name": "organization_id",
                "value": "",
                "type": "path",
                "description": "The ID of the organization."
              },
              {
                "name": "project_id",
                "value": "",
                "type": "path",
                "description": "The ID of the project."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Updates the specified project."
        },
        {
          "info": {
            "name": "Delete project",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "{schemes}://api.upsun.com/organizations/:organization_id/projects/:project_id",
            "params": [
              {
                "name": "organization_id",
                "value": "",
                "type": "path",
                "description": "The ID of the organization."
              },
              {
                "name": "project_id",
                "value": "",
                "type": "path",
                "description": "The ID of the project."
              }
            ]
          },
          "docs": "Deletes the specified project."
        },
        {
          "info": {
            "name": "Query project carbon emissions metrics",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{schemes}://api.upsun.com/organizations/:organization_id/projects/:project_id/metrics/carbon",
            "params": [
              {
                "name": "organization_id",
                "value": "",
                "type": "path",
                "description": "The ID of the organization."
              },
              {
                "name": "project_id",
                "value": "",
                "type": "path",
                "description": "The ID of the project."
              },
              {
                "name": "from",
                "value": "",
                "type": "query",
                "description": "The start of the time frame for the query. Inclusive."
              },
              {
                "name": "to",
                "value": "",
                "type": "query",
                "description": "The end of the time frame for the query. Exclusive."
              },
              {
                "name": "interval",
                "value": "",
                "type": "query",
                "description": "The interval by which the query groups the results. of the time frame for the query. Exclusive."
              }
            ]
          },
          "docs": "Queries the carbon emission data for the specified project using the supplied parameters."
        }
      ]
    }
  ],
  "bundled": true
}