{
  "opencollection": "1.0.0",
  "info": {
    "name": "Upsun.com Rest Add-ons Team Access 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": "Team Access",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List team access for a project",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{schemes}://api.upsun.com/projects/:project_id/team-access",
            "params": [
              {
                "name": "project_id",
                "value": "",
                "type": "path",
                "description": "The ID of the project."
              },
              {
                "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: `granted_at`, `updated_at`.\n"
              }
            ]
          },
          "docs": "Returns a list of items representing the project access."
        },
        {
          "info": {
            "name": "Grant team access to a project",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{schemes}://api.upsun.com/projects/:project_id/team-access",
            "params": [
              {
                "name": "project_id",
                "value": "",
                "type": "path",
                "description": "The ID of the project."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Grants one or more team access to a specific project."
        },
        {
          "info": {
            "name": "Get team access for a project",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{schemes}://api.upsun.com/projects/:project_id/team-access/:team_id",
            "params": [
              {
                "name": "project_id",
                "value": "",
                "type": "path",
                "description": "The ID of the project."
              },
              {
                "name": "team_id",
                "value": "",
                "type": "path",
                "description": "The ID of the team."
              }
            ]
          },
          "docs": "Retrieves the team's permissions for the current project."
        },
        {
          "info": {
            "name": "Remove team access for a project",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "{schemes}://api.upsun.com/projects/:project_id/team-access/:team_id",
            "params": [
              {
                "name": "project_id",
                "value": "",
                "type": "path",
                "description": "The ID of the project."
              },
              {
                "name": "team_id",
                "value": "",
                "type": "path",
                "description": "The ID of the team."
              }
            ]
          },
          "docs": "Removes the team from the current project."
        },
        {
          "info": {
            "name": "List project access for a team",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{schemes}://api.upsun.com/teams/:team_id/project-access",
            "params": [
              {
                "name": "team_id",
                "value": "",
                "type": "path",
                "description": "The ID of the team."
              },
              {
                "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: `project_title`, `granted_at`, `updated_at`.\n"
              }
            ]
          },
          "docs": "Returns a list of items representing the team's project access."
        },
        {
          "info": {
            "name": "Grant project access to a team",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{schemes}://api.upsun.com/teams/:team_id/project-access",
            "params": [
              {
                "name": "team_id",
                "value": "",
                "type": "path",
                "description": "The ID of the team."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Adds the team to one or more specified projects."
        },
        {
          "info": {
            "name": "Get project access for a team",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{schemes}://api.upsun.com/teams/:team_id/project-access/:project_id",
            "params": [
              {
                "name": "team_id",
                "value": "",
                "type": "path",
                "description": "The ID of the team."
              },
              {
                "name": "project_id",
                "value": "",
                "type": "path",
                "description": "The ID of the project."
              }
            ]
          },
          "docs": "Retrieves the team's permissions for the current project."
        },
        {
          "info": {
            "name": "Remove project access for a team",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "{schemes}://api.upsun.com/teams/:team_id/project-access/:project_id",
            "params": [
              {
                "name": "team_id",
                "value": "",
                "type": "path",
                "description": "The ID of the team."
              },
              {
                "name": "project_id",
                "value": "",
                "type": "path",
                "description": "The ID of the project."
              }
            ]
          },
          "docs": "Removes the team from the current project."
        }
      ]
    }
  ],
  "bundled": true
}