{
  "openapi": "3.0.2",
  "info": {
    "title": "Renku Data Services API",
    "description": "This service is the main backend for Renku. It provides information about users, projects,\ncloud storage, access to compute resources and many other things.\n",
    "version": "v1"
  },
  "servers": [
    {
      "url": "/api/data"
    }
  ],
  "paths": {
    "/classes/{class_id}": {
      "get": {
        "summary": "Get a specific resource class",
        "parameters": [
          {
            "in": "path",
            "name": "class_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The resource class that was requested",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceClassWithId"
                }
              }
            }
          },
          "404": {
            "description": "The resource class does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "classes"
        ]
      }
    },
    "/clusters": {
      "get": {
        "summary": "Get all the cluster configurations",
        "responses": {
          "200": {
            "description": "The cluster configurations",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClustersWithId"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "clusters"
        ]
      },
      "post": {
        "summary": "Create a new cluster configuration",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Cluster"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The cluster configuration was created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClusterWithId"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "clusters"
        ]
      }
    },
    "/clusters/{cluster_id}": {
      "get": {
        "summary": "Get a cluster configuration",
        "parameters": [
          {
            "in": "path",
            "name": "cluster_id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Ulid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The cluster configuration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClusterWithId"
                }
              }
            }
          },
          "404": {
            "description": "The cluster configuration does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "clusters"
        ]
      },
      "put": {
        "summary": "Update an existing cluster configuration",
        "parameters": [
          {
            "in": "path",
            "name": "cluster_id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Ulid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Cluster"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The cluster configuration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClusterWithId"
                }
              }
            }
          },
          "404": {
            "description": "The cluster configuration does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "clusters"
        ]
      },
      "patch": {
        "summary": "Update specific fields of an existing cluster configuration",
        "parameters": [
          {
            "in": "path",
            "name": "cluster_id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Ulid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClusterPatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The cluster configuration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClusterWithId"
                }
              }
            }
          },
          "404": {
            "description": "The cluster configuration does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "clusters"
        ]
      },
      "delete": {
        "summary": "Remove a cluster configuration",
        "parameters": [
          {
            "in": "path",
            "name": "cluster_id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Ulid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The cluster configuration was removed or did not exist in the first place"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "clusters"
        ]
      }
    },
    "/error": {
      "get": {
        "summary": "Get a sample error response with status code 422",
        "responses": {
          "422": {
            "description": "The error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/resource_pools": {
      "get": {
        "summary": "Get all resource pool definitions",
        "parameters": [
          {
            "in": "query",
            "description": "query parameters",
            "name": "resource_pools_params",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "cpu": {
                  "$ref": "#/components/schemas/CpuFilter",
                  "default": 0
                },
                "gpu": {
                  "$ref": "#/components/schemas/Gpu",
                  "default": 0
                },
                "memory": {
                  "$ref": "#/components/schemas/MemoryFilter",
                  "default": 0
                },
                "max_storage": {
                  "$ref": "#/components/schemas/StorageFilter",
                  "default": 0
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The resource pool definitions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourcePoolsWithIdFiltered"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "resource_pools"
        ]
      },
      "post": {
        "summary": "Create a new resource pool",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResourcePool"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The resource pool was created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourcePoolWithId"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "resource_pools"
        ]
      }
    },
    "/resource_pools/{resource_pool_id}": {
      "get": {
        "summary": "Get a resource pool definition",
        "parameters": [
          {
            "in": "path",
            "name": "resource_pool_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The resource pool definition",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourcePoolWithId"
                }
              }
            }
          },
          "404": {
            "description": "The resource pool does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "resource_pools"
        ]
      },
      "put": {
        "summary": "Update an existing resource pool",
        "parameters": [
          {
            "in": "path",
            "name": "resource_pool_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResourcePoolPut"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The resource pool definition",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourcePoolWithId"
                }
              }
            }
          },
          "404": {
            "description": "The resource pool does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "resource_pools"
        ]
      },
      "patch": {
        "summary": "Update specific fields of an existing resource pool",
        "parameters": [
          {
            "in": "path",
            "name": "resource_pool_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResourcePoolPatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The resource pool definition",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourcePoolWithId"
                }
              }
            }
          },
          "404": {
            "description": "The resource pool does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "resource_pools"
        ]
      },
      "delete": {
        "summary": "Remove a resource pool",
        "parameters": [
          {
            "in": "path",
            "name": "resource_pool_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The resource pool was removed or did not exist in the first place"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "resource_pools"
        ]
      }
    },
    "/resource_pools/{resource_pool_id}/classes": {
      "get": {
        "summary": "Get all resource classes in a resource pool",
        "parameters": [
          {
            "in": "path",
            "name": "resource_pool_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "description": "Filter for resource classes based on the provided name as a prefix. Omitting this parameter returns all classes.",
            "name": "resource_class_params",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "name": {
                  "$ref": "#/components/schemas/Name"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The resource class in the specific pool",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceClassesWithIdResponse"
                }
              }
            }
          },
          "404": {
            "description": "The resource pool does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "classes"
        ]
      },
      "post": {
        "summary": "Create a new resource class in the specific pool",
        "parameters": [
          {
            "in": "path",
            "name": "resource_pool_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResourceClass"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created a class in the resource pool",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceClassWithId"
                }
              }
            }
          },
          "404": {
            "description": "The resource pool does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "classes"
        ]
      }
    },
    "/resource_pools/{resource_pool_id}/classes/{class_id}": {
      "get": {
        "summary": "Get a specific resource class in a specific resource pool",
        "parameters": [
          {
            "in": "path",
            "name": "resource_pool_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "class_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The resource class that was requested",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceClassWithId"
                }
              }
            }
          },
          "404": {
            "description": "The resource class does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "classes"
        ]
      },
      "put": {
        "summary": "Update an existing resource class for a specific resource pool",
        "parameters": [
          {
            "in": "path",
            "name": "resource_pool_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "class_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResourceClass"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated the classes in the resource pool",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceClassWithId"
                }
              }
            }
          },
          "404": {
            "description": "The resource pool does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "classes"
        ]
      },
      "patch": {
        "summary": "Partially update an existing resource class for a specific resource pool",
        "parameters": [
          {
            "in": "path",
            "name": "resource_pool_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "class_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResourceClassPatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated the classes in the resource pool",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceClassWithId"
                }
              }
            }
          },
          "404": {
            "description": "The resource pool does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "classes"
        ]
      },
      "delete": {
        "summary": "Remove the specific resource class",
        "parameters": [
          {
            "in": "path",
            "name": "resource_pool_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "class_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The resource class was removed or did not exist in the first place"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "classes"
        ]
      }
    },
    "/resource_pools/{resource_pool_id}/classes/{class_id}/tolerations": {
      "get": {
        "summary": "Get the tolerations from a resource class",
        "parameters": [
          {
            "in": "path",
            "name": "resource_pool_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "class_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "All the tolerations for a resource class",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/K8sLabelList"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "classes"
        ]
      },
      "delete": {
        "summary": "Remove all tolerations from a resource class",
        "parameters": [
          {
            "in": "path",
            "name": "resource_pool_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "class_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The tolerations have been removed"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "classes"
        ]
      }
    },
    "/resource_pools/{resource_pool_id}/classes/{class_id}/node_affinities": {
      "get": {
        "summary": "Get the node affinities from a resource class",
        "parameters": [
          {
            "in": "path",
            "name": "resource_pool_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "class_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "All the affinities for a resource class",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NodeAffinityListResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "classes"
        ]
      },
      "delete": {
        "summary": "Remove all node affinities from a resource class",
        "parameters": [
          {
            "in": "path",
            "name": "resource_pool_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "class_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The node affinities have been removed"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "classes"
        ]
      }
    },
    "/resource_pools/{resource_pool_id}/users": {
      "get": {
        "summary": "Get all users that have access to a resource pool",
        "parameters": [
          {
            "in": "path",
            "name": "resource_pool_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The list of users",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PoolUsersWithId"
                }
              }
            }
          },
          "404": {
            "description": "The resource pool does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "resource_pools"
        ]
      },
      "post": {
        "summary": "Add users to the list of users that have access to the resource pool",
        "parameters": [
          {
            "in": "path",
            "name": "resource_pool_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "description": "List of user Ids",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PoolUsersWithId"
              },
              "example": [
                {
                  "id": "543-user-id"
                },
                {
                  "id": "123-some-user"
                }
              ]
            }
          }
        },
        "responses": {
          "201": {
            "description": "The list of users was updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PoolUsersWithId"
                },
                "example": [
                  {
                    "id": "123-user-id"
                  },
                  {
                    "id": "user-id"
                  },
                  {
                    "id": "456-user-id"
                  }
                ]
              }
            }
          },
          "404": {
            "description": "The resource pool does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "resource_pools"
        ]
      },
      "put": {
        "summary": "Set the list of users that has access to the resource pool",
        "parameters": [
          {
            "in": "path",
            "name": "resource_pool_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "description": "List of user Ids",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PoolUsersWithId"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The list of users was updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PoolUsersWithId"
                }
              }
            }
          },
          "404": {
            "description": "The resource pool does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "resource_pools"
        ]
      }
    },
    "/resource_pools/{resource_pool_id}/users/{user_id}": {
      "get": {
        "summary": "Check if a specific user belongs to a specific resource pool",
        "parameters": [
          {
            "in": "path",
            "name": "resource_pool_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The user belongs to the resource pool",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PoolUserWithId"
                }
              }
            }
          },
          "404": {
            "description": "The user does not belong to the resource pool, or the resource pool or user do not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "resource_pools"
        ]
      },
      "delete": {
        "summary": "Remove a specific user from a specific resource pool",
        "parameters": [
          {
            "in": "path",
            "name": "resource_pool_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The user was removed or it was not part of the pool"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "resource_pools"
        ]
      }
    },
    "/resource_pools/{resource_pool_id}/quota": {
      "get": {
        "summary": "Get the quota associated with the resource pool",
        "parameters": [
          {
            "in": "path",
            "name": "resource_pool_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The resource quota for the resource pool",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuotaWithId"
                }
              }
            }
          },
          "404": {
            "description": "The resource pool does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "quota"
        ]
      },
      "put": {
        "summary": "Set the quota associated with the resource pool",
        "parameters": [
          {
            "in": "path",
            "name": "resource_pool_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuotaWithId"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The quota has been updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuotaWithId"
                }
              }
            }
          },
          "404": {
            "description": "The resource pool does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "quota"
        ]
      },
      "patch": {
        "summary": "Partially update the quota for a resource pool",
        "parameters": [
          {
            "in": "path",
            "name": "resource_pool_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuotaPatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The quota has been updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuotaWithId"
                }
              }
            }
          },
          "404": {
            "description": "The resource pool does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "quota"
        ]
      }
    },
    "/users/{user_id}/resource_pools": {
      "get": {
        "summary": "Get all resource pools that the user has access to",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "description": "Filter for resource classes based on the provided name as a prefix. Omitting this parameter returns all classes.",
            "name": "user_resource_params",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "name": {
                  "$ref": "#/components/schemas/Name"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The resource pools that the user has access to",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourcePoolsWithId"
                }
              }
            }
          },
          "404": {
            "description": "The user does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "users"
        ]
      },
      "post": {
        "summary": "Give the user access to the specified resource pools",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "List of resource pool IDs",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntegerIds"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The resource pools that the user has been given access to",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourcePoolsWithId"
                }
              }
            }
          },
          "404": {
            "description": "The user or resource pool(s) do not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "users"
        ]
      },
      "put": {
        "summary": "Set the list of resource pools that the user has access to",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "List of resource pool IDs",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntegerIds"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The resource pools that the user has been given access to",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourcePoolsWithId"
                }
              }
            }
          },
          "404": {
            "description": "The user or resource pool(s) do not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "users"
        ]
      }
    },
    "/version": {
      "get": {
        "summary": "Get the version of the service",
        "responses": {
          "200": {
            "description": "The error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Version"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Cluster": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "$ref": "#/components/schemas/Name"
          },
          "config_name": {
            "$ref": "#/components/schemas/ConfigName"
          },
          "session_protocol": {
            "$ref": "#/components/schemas/Protocol"
          },
          "session_host": {
            "$ref": "#/components/schemas/Host"
          },
          "session_port": {
            "$ref": "#/components/schemas/Port"
          },
          "session_path": {
            "type": "string"
          },
          "session_ingress_class_name": {
            "$ref": "#/components/schemas/IngressClassName"
          },
          "session_ingress_annotations": {
            "$ref": "#/components/schemas/IngressAnnotations"
          },
          "session_tls_secret_name": {
            "$ref": "#/components/schemas/TlsSecretName"
          },
          "session_storage_class": {
            "$ref": "#/components/schemas/StorageClassName"
          },
          "service_account_name": {
            "$ref": "#/components/schemas/K8sResourceName"
          }
        },
        "required": [
          "name",
          "config_name",
          "session_protocol",
          "session_host",
          "session_port",
          "session_path",
          "session_ingress_annotations",
          "session_tls_secret_name"
        ]
      },
      "ClusterPatch": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "$ref": "#/components/schemas/Name"
          },
          "config_name": {
            "$ref": "#/components/schemas/ConfigName"
          },
          "session_protocol": {
            "$ref": "#/components/schemas/Protocol"
          },
          "session_host": {
            "$ref": "#/components/schemas/Host"
          },
          "session_port": {
            "$ref": "#/components/schemas/Port"
          },
          "session_path": {
            "type": "string"
          },
          "session_ingress_class_name": {
            "$ref": "#/components/schemas/IngressClassName"
          },
          "session_ingress_annotations": {
            "$ref": "#/components/schemas/IngressAnnotations"
          },
          "session_tls_secret_name": {
            "$ref": "#/components/schemas/TlsSecretName"
          },
          "session_storage_class": {
            "$ref": "#/components/schemas/StorageClassName"
          },
          "service_account_name": {
            "$ref": "#/components/schemas/K8sResourceNamePatch"
          }
        }
      },
      "ClusterWithId": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "$ref": "#/components/schemas/Name"
          },
          "config_name": {
            "$ref": "#/components/schemas/ConfigName"
          },
          "id": {
            "$ref": "#/components/schemas/Ulid"
          },
          "session_protocol": {
            "$ref": "#/components/schemas/Protocol"
          },
          "session_host": {
            "$ref": "#/components/schemas/Host"
          },
          "session_port": {
            "$ref": "#/components/schemas/Port"
          },
          "session_path": {
            "type": "string"
          },
          "session_ingress_class_name": {
            "$ref": "#/components/schemas/IngressClassName"
          },
          "session_ingress_annotations": {
            "$ref": "#/components/schemas/IngressAnnotations"
          },
          "session_tls_secret_name": {
            "$ref": "#/components/schemas/TlsSecretName"
          },
          "session_storage_class": {
            "$ref": "#/components/schemas/StorageClassName"
          },
          "service_account_name": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "config_name",
          "session_protocol",
          "session_host",
          "session_port",
          "session_path",
          "session_ingress_annotations",
          "session_tls_secret_name",
          "id"
        ]
      },
      "ClustersWithId": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ClusterWithId"
        }
      },
      "ResourceClass": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "$ref": "#/components/schemas/Name"
          },
          "cpu": {
            "$ref": "#/components/schemas/Cpu"
          },
          "memory": {
            "$ref": "#/components/schemas/Memory"
          },
          "gpu": {
            "$ref": "#/components/schemas/Gpu"
          },
          "max_storage": {
            "$ref": "#/components/schemas/Storage"
          },
          "default_storage": {
            "$ref": "#/components/schemas/Storage"
          },
          "default": {
            "$ref": "#/components/schemas/DefaultFlag"
          },
          "tolerations": {
            "$ref": "#/components/schemas/K8sLabelList"
          },
          "node_affinities": {
            "$ref": "#/components/schemas/NodeAffinityList"
          }
        },
        "required": [
          "cpu",
          "memory",
          "gpu",
          "max_storage",
          "name",
          "default",
          "default_storage"
        ],
        "example": {
          "name": "resource class",
          "cpu": 1.5,
          "memory": 2,
          "gpu": 0,
          "max_storage": 100,
          "default": false,
          "default_storage": 10
        }
      },
      "ResourceClassPatch": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "$ref": "#/components/schemas/Name"
          },
          "cpu": {
            "$ref": "#/components/schemas/Cpu"
          },
          "memory": {
            "$ref": "#/components/schemas/Memory"
          },
          "gpu": {
            "$ref": "#/components/schemas/Gpu"
          },
          "max_storage": {
            "$ref": "#/components/schemas/Storage"
          },
          "default_storage": {
            "$ref": "#/components/schemas/Storage"
          },
          "default": {
            "$ref": "#/components/schemas/DefaultFlagPatch"
          },
          "tolerations": {
            "$ref": "#/components/schemas/K8sLabelList"
          },
          "node_affinities": {
            "$ref": "#/components/schemas/NodeAffinityList"
          }
        },
        "example": {
          "name": "resource class",
          "cpu": 1.5
        }
      },
      "ResourceClassPatchWithId": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "$ref": "#/components/schemas/Name"
          },
          "cpu": {
            "$ref": "#/components/schemas/Cpu"
          },
          "memory": {
            "$ref": "#/components/schemas/Memory"
          },
          "gpu": {
            "$ref": "#/components/schemas/Gpu"
          },
          "max_storage": {
            "$ref": "#/components/schemas/Storage"
          },
          "default_storage": {
            "$ref": "#/components/schemas/Storage"
          },
          "id": {
            "$ref": "#/components/schemas/IntegerId"
          },
          "default": {
            "$ref": "#/components/schemas/DefaultFlagPatch"
          },
          "tolerations": {
            "$ref": "#/components/schemas/K8sLabelList"
          },
          "node_affinities": {
            "$ref": "#/components/schemas/NodeAffinityList"
          }
        },
        "required": [
          "id"
        ],
        "example": {
          "id": 1,
          "max_storage": 50
        }
      },
      "ResourceClassWithId": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "$ref": "#/components/schemas/Name"
          },
          "cpu": {
            "$ref": "#/components/schemas/Cpu"
          },
          "memory": {
            "$ref": "#/components/schemas/Memory"
          },
          "gpu": {
            "$ref": "#/components/schemas/Gpu"
          },
          "max_storage": {
            "$ref": "#/components/schemas/Storage"
          },
          "default_storage": {
            "$ref": "#/components/schemas/Storage"
          },
          "id": {
            "$ref": "#/components/schemas/IntegerId"
          },
          "default": {
            "$ref": "#/components/schemas/DefaultFlag"
          },
          "tolerations": {
            "$ref": "#/components/schemas/K8sLabelList"
          },
          "node_affinities": {
            "$ref": "#/components/schemas/NodeAffinityList"
          }
        },
        "required": [
          "cpu",
          "memory",
          "gpu",
          "max_storage",
          "name",
          "id",
          "default",
          "default_storage"
        ],
        "example": {
          "name": "resource class",
          "cpu": 1.5,
          "memory": 2,
          "gpu": 0,
          "max_storage": 100,
          "default_storage": 10,
          "id": 1,
          "default": true
        }
      },
      "ResourceClassWithIdFiltered": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "$ref": "#/components/schemas/Name"
          },
          "cpu": {
            "$ref": "#/components/schemas/Cpu"
          },
          "memory": {
            "$ref": "#/components/schemas/Memory"
          },
          "gpu": {
            "$ref": "#/components/schemas/Gpu"
          },
          "max_storage": {
            "$ref": "#/components/schemas/Storage"
          },
          "default_storage": {
            "$ref": "#/components/schemas/Storage"
          },
          "id": {
            "$ref": "#/components/schemas/IntegerId"
          },
          "default": {
            "$ref": "#/components/schemas/DefaultFlag"
          },
          "matching": {
            "type": "boolean"
          },
          "tolerations": {
            "$ref": "#/components/schemas/K8sLabelList"
          },
          "node_affinities": {
            "$ref": "#/components/schemas/NodeAffinityList"
          }
        },
        "required": [
          "cpu",
          "memory",
          "gpu",
          "max_storage",
          "name",
          "id",
          "default",
          "default_storage"
        ],
        "example": {
          "name": "resource class",
          "cpu": 1.5,
          "memory": 2,
          "gpu": 0,
          "max_storage": 100,
          "default_storage": 10,
          "id": 1,
          "default": true,
          "matching": true
        }
      },
      "ResourceClasses": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ResourceClass"
        }
      },
      "ResourceClassesWithId": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ResourceClassWithId"
        },
        "uniqueItems": true,
        "example": [
          {
            "name": "resource class 1",
            "cpu": 1.5,
            "memory": 2,
            "gpu": 0,
            "max_storage": 100,
            "id": 1,
            "default": true,
            "default_storage": 10
          },
          {
            "name": "resource class 2",
            "cpu": 4.5,
            "memory": 10,
            "gpu": 2,
            "default_storage": 10,
            "max_storage": 10000,
            "id": 2,
            "default": false
          }
        ]
      },
      "ResourceClassesWithIdResponse": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ResourceClassWithId"
        },
        "uniqueItems": true,
        "example": [
          {
            "name": "resource class 1",
            "cpu": 1.5,
            "memory": 2,
            "gpu": 0,
            "max_storage": 100,
            "id": 1,
            "default": true,
            "default_storage": 10
          },
          {
            "name": "resource class 2",
            "cpu": 4.5,
            "memory": 10,
            "gpu": 2,
            "default_storage": 10,
            "max_storage": 10000,
            "id": 2,
            "default": false
          }
        ]
      },
      "ResourceClassesPatchWithId": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ResourceClassPatchWithId"
        },
        "minItems": 1,
        "uniqueItems": true,
        "example": [
          {
            "name": "resource class 1",
            "id": 1
          },
          {
            "cpu": 4.5,
            "max_storage": 10000,
            "id": 2
          }
        ]
      },
      "ResourcePool": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "quota": {
            "$ref": "#/components/schemas/QuotaWithOptionalId"
          },
          "classes": {
            "$ref": "#/components/schemas/ResourceClasses"
          },
          "name": {
            "$ref": "#/components/schemas/Name"
          },
          "public": {
            "$ref": "#/components/schemas/PublicFlag"
          },
          "default": {
            "$ref": "#/components/schemas/DefaultFlag"
          },
          "remote": {
            "$ref": "#/components/schemas/RemoteConfiguration"
          },
          "idle_threshold": {
            "$ref": "#/components/schemas/IdleThreshold"
          },
          "hibernation_threshold": {
            "$ref": "#/components/schemas/HibernationThreshold"
          },
          "cluster_id": {
            "$ref": "#/components/schemas/Ulid"
          }
        },
        "required": [
          "classes",
          "name",
          "public",
          "default"
        ],
        "example": {
          "quota": {
            "cpu": 50,
            "memory": 250,
            "gpu": 10
          },
          "public": true,
          "default": false,
          "remote": false,
          "classes": [
            {
              "name": "resource class 1",
              "cpu": 1.5,
              "memory": 2,
              "gpu": 0,
              "max_storage": 10,
              "default_storage": 2,
              "default": true
            },
            {
              "name": "resource class 2",
              "cpu": 4.5,
              "memory": 10,
              "gpu": 2,
              "max_storage": 10,
              "default_storage": 2,
              "default": false
            }
          ],
          "name": "resource pool name",
          "cluster_id": "change-me"
        }
      },
      "ResourcePoolPatch": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "quota": {
            "$ref": "#/components/schemas/QuotaPatch"
          },
          "classes": {
            "$ref": "#/components/schemas/ResourceClassesPatchWithId"
          },
          "name": {
            "$ref": "#/components/schemas/Name"
          },
          "public": {
            "$ref": "#/components/schemas/PublicFlagPatch"
          },
          "default": {
            "$ref": "#/components/schemas/DefaultFlagPatch"
          },
          "remote": {
            "$ref": "#/components/schemas/RemoteConfigurationPatch"
          },
          "idle_threshold": {
            "$ref": "#/components/schemas/IdleThreshold"
          },
          "hibernation_threshold": {
            "$ref": "#/components/schemas/HibernationThreshold"
          },
          "cluster_id": {
            "$ref": "#/components/schemas/Ulid"
          }
        },
        "example": {
          "quota": {
            "cpu": 50,
            "gpu": 10
          },
          "classes": [
            {
              "name": "resource class 2",
              "cpu": 4.5,
              "max_storage": 10000
            }
          ],
          "name": "resource pool name",
          "cluster_id": "4QZ886777NTN8GHQ551GSVAXSA"
        }
      },
      "ResourcePoolPut": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "quota": {
            "$ref": "#/components/schemas/QuotaWithId"
          },
          "classes": {
            "$ref": "#/components/schemas/ResourceClassesWithId"
          },
          "name": {
            "$ref": "#/components/schemas/Name"
          },
          "public": {
            "$ref": "#/components/schemas/PublicFlag"
          },
          "default": {
            "$ref": "#/components/schemas/DefaultFlag"
          },
          "remote": {
            "$ref": "#/components/schemas/RemoteConfiguration"
          },
          "idle_threshold": {
            "$ref": "#/components/schemas/IdleThreshold"
          },
          "hibernation_threshold": {
            "$ref": "#/components/schemas/HibernationThreshold"
          },
          "cluster_id": {
            "$ref": "#/components/schemas/Ulid"
          }
        },
        "required": [
          "classes",
          "name",
          "public",
          "default"
        ],
        "example": {
          "quota": {
            "cpu": 50,
            "memory": 250,
            "gpu": 10,
            "id": "518c7d27-b5db-4aee-855f-f4638aded2d4"
          },
          "public": true,
          "default": false,
          "remote": false,
          "classes": [
            {
              "name": "resource class 1",
              "cpu": 1.5,
              "memory": 2,
              "gpu": 0,
              "max_storage": 100,
              "id": 1
            },
            {
              "name": "resource class 2",
              "cpu": 4.5,
              "memory": 10,
              "gpu": 2,
              "max_storage": 10000,
              "id": 2
            }
          ],
          "name": "resource pool name",
          "cluster_id": "4QZ886777NTN8GHQ551GSVAXSA"
        }
      },
      "ResourcePoolWithId": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "quota": {
            "$ref": "#/components/schemas/QuotaWithId"
          },
          "classes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceClassWithId"
            }
          },
          "name": {
            "$ref": "#/components/schemas/Name"
          },
          "id": {
            "$ref": "#/components/schemas/IntegerId"
          },
          "public": {
            "$ref": "#/components/schemas/PublicFlag"
          },
          "default": {
            "$ref": "#/components/schemas/DefaultFlag"
          },
          "remote": {
            "$ref": "#/components/schemas/RemoteConfiguration"
          },
          "idle_threshold": {
            "$ref": "#/components/schemas/IdleThreshold"
          },
          "hibernation_threshold": {
            "$ref": "#/components/schemas/HibernationThreshold"
          },
          "cluster": {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/components/schemas/Ulid"
              }
            },
            "required": [
              "id"
            ]
          }
        },
        "required": [
          "classes",
          "name",
          "id",
          "public",
          "default"
        ],
        "example": {
          "quota": {
            "cpu": 50,
            "memory": 250,
            "gpu": 10,
            "id": "518c7d27-b5db-4aee-855f-f4638aded2d4"
          },
          "public": false,
          "default": false,
          "remote": false,
          "classes": [
            {
              "name": "resource class 1",
              "cpu": 1.5,
              "memory": 2,
              "gpu": 0,
              "max_storage": 100,
              "id": 1
            },
            {
              "name": "resource class 2",
              "cpu": 4.5,
              "memory": 10,
              "gpu": 2,
              "max_storage": 10000,
              "id": 2
            }
          ],
          "name": "resource pool name",
          "id": 1,
          "cluster_id": "4QZ886777NTN8GHQ551GSVAXSA"
        }
      },
      "ResourcePoolWithIdFiltered": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "quota": {
            "$ref": "#/components/schemas/QuotaWithId"
          },
          "classes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResourceClassWithIdFiltered"
            }
          },
          "name": {
            "$ref": "#/components/schemas/Name"
          },
          "id": {
            "$ref": "#/components/schemas/IntegerId"
          },
          "public": {
            "$ref": "#/components/schemas/PublicFlag"
          },
          "default": {
            "$ref": "#/components/schemas/DefaultFlag"
          },
          "remote": {
            "$ref": "#/components/schemas/RemoteConfiguration"
          },
          "idle_threshold": {
            "$ref": "#/components/schemas/IdleThreshold"
          },
          "hibernation_threshold": {
            "$ref": "#/components/schemas/HibernationThreshold"
          },
          "cluster_id": {
            "$ref": "#/components/schemas/Ulid"
          }
        },
        "required": [
          "classes",
          "name",
          "id",
          "public",
          "default"
        ],
        "example": {
          "quota": {
            "cpu": 50,
            "memory": 250,
            "gpu": 10,
            "id": "518c7d27-b5db-4aee-855f-f4638aded2d4"
          },
          "public": false,
          "default": false,
          "remote": false,
          "classes": [
            {
              "name": "resource class 1",
              "cpu": 1.5,
              "memory": 2,
              "gpu": 0,
              "max_storage": 100,
              "default_storage": 10,
              "id": 1,
              "matching": false
            },
            {
              "name": "resource class 2",
              "cpu": 4.5,
              "memory": 10,
              "gpu": 2,
              "max_storage": 10000,
              "default_storage": 10,
              "id": 2,
              "matching": true
            }
          ],
          "name": "resource pool name",
          "cluster_id": "4QZ886777NTN8GHQ551GSVAXSA"
        }
      },
      "ResourcePoolsWithId": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ResourcePoolWithId"
        }
      },
      "ResourcePoolsWithIdFiltered": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ResourcePoolWithIdFiltered"
        }
      },
      "UserPatch": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "no_default_access": {
            "type": "boolean",
            "description": "If set to true the user will not be able to use the default resource pool"
          }
        },
        "example": {
          "no_default_access": true
        }
      },
      "UserPut": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "no_default_access": {
            "type": "boolean",
            "description": "If set to true the user will not be able to use the default resource pool"
          }
        },
        "required": [
          "no_default_access"
        ],
        "example": {
          "no_default_access": true
        }
      },
      "PoolUserWithId": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "$ref": "#/components/schemas/UserId"
          },
          "no_default_access": {
            "type": "boolean",
            "default": false,
            "description": "If set to true the user will not be able to use the default resource pool"
          }
        },
        "required": [
          "id"
        ],
        "example": {
          "id": "some-random-keycloak-id"
        }
      },
      "PoolUsersWithId": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/PoolUserWithId"
        },
        "uniqueItems": true
      },
      "QuotaPatch": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "cpu": {
            "$ref": "#/components/schemas/Cpu"
          },
          "memory": {
            "$ref": "#/components/schemas/Memory"
          },
          "gpu": {
            "$ref": "#/components/schemas/Gpu"
          }
        },
        "example": {
          "gpu": 0,
          "cpu": 100
        }
      },
      "QuotaWithId": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "cpu": {
            "$ref": "#/components/schemas/Cpu"
          },
          "memory": {
            "$ref": "#/components/schemas/Memory"
          },
          "gpu": {
            "$ref": "#/components/schemas/Gpu"
          },
          "id": {
            "$ref": "#/components/schemas/Name"
          }
        },
        "example": {
          "gpu": 0,
          "cpu": 100,
          "memory": 1000,
          "id": "518c7d27-b5db-4aee-855f-f4638aded2d4"
        },
        "required": [
          "cpu",
          "memory",
          "gpu",
          "id"
        ]
      },
      "QuotaWithOptionalId": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "cpu": {
            "$ref": "#/components/schemas/Cpu"
          },
          "memory": {
            "$ref": "#/components/schemas/Memory"
          },
          "gpu": {
            "$ref": "#/components/schemas/Gpu"
          },
          "id": {
            "$ref": "#/components/schemas/Name"
          }
        },
        "example": {
          "gpu": 0,
          "cpu": 100,
          "memory": 1000,
          "id": "518c7d27-b5db-4aee-855f-f4638aded2d4"
        },
        "required": [
          "cpu",
          "memory",
          "gpu"
        ]
      },
      "Version": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          }
        },
        "required": [
          "version"
        ]
      },
      "Cpu": {
        "type": "number",
        "format": "float",
        "description": "Number of cpu cores",
        "example": 10,
        "exclusiveMinimum": true,
        "minimum": 0
      },
      "CpuFilter": {
        "type": "number",
        "format": "float",
        "description": "Number of cpu cores",
        "example": 10,
        "minimum": 0
      },
      "Memory": {
        "type": "integer",
        "description": "Number of gigabytes of memory",
        "example": 4,
        "exclusiveMinimum": true,
        "minimum": 0,
        "maximum": 9223372036854776000
      },
      "MemoryFilter": {
        "type": "integer",
        "description": "Number of gigabytes of memory",
        "example": 4,
        "minimum": 0,
        "maximum": 9223372036854776000
      },
      "Gpu": {
        "type": "integer",
        "description": "Number of GPUs",
        "example": 8,
        "minimum": 0,
        "maximum": 9223372036854776000
      },
      "Storage": {
        "type": "integer",
        "description": "Number of gigabytes of storage",
        "example": 100,
        "exclusiveMinimum": true,
        "minimum": 0,
        "maximum": 9223372036854776000
      },
      "StorageFilter": {
        "type": "integer",
        "description": "Number of gigabytes of storage",
        "example": 100,
        "minimum": 0,
        "maximum": 9223372036854776000
      },
      "UserId": {
        "type": "string",
        "description": "Keycloak user ID",
        "example": "f74a228b-1790-4276-af5f-25c2424e9b0c",
        "pattern": "^[A-Za-z0-9]{1}[A-Za-z0-9-]+$"
      },
      "IntegerId": {
        "type": "integer",
        "description": "An integer ID used to identify different resources",
        "minimum": 0,
        "example": 1
      },
      "IntegerIds": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/IntegerId"
        },
        "minItems": 1,
        "uniqueItems": true,
        "example": [
          1,
          3,
          5
        ]
      },
      "Name": {
        "type": "string",
        "description": "A name for a specific resource",
        "minLength": 5,
        "example": "the name of a resource"
      },
      "ConfigName": {
        "type": "string",
        "description": "The name of the Kubernetes configuration to use to connect to the remote cluster. This is currently used to find a file named `<KubeConfigRoot>/<config_name>`.\n\nThis configuration is expected to have a default namespace defined. It will be used for all remote operations requiring a namespace, as well for namespaced objects.\n",
        "pattern": "^[a-zA-Z0-9._-]+[.]yaml$",
        "example": "a-remote-cluster.yaml"
      },
      "DefaultFlag": {
        "type": "boolean",
        "description": "A default selection for resource classes or resource pools",
        "default": false,
        "example": false
      },
      "DefaultFlagPatch": {
        "type": "boolean",
        "description": "A default selection for resource classes or resource pools",
        "example": false
      },
      "PublicFlag": {
        "type": "boolean",
        "description": "A resource pool whose classes can be accessed by anyone",
        "default": false,
        "example": false
      },
      "PublicFlagPatch": {
        "type": "boolean",
        "description": "A resource pool whose classes can be accessed by anyone",
        "example": false
      },
      "RemoteConfiguration": {
        "type": "object",
        "description": "The configuration used by Renku to start sessions remotely.\nIf this field is present, the corresponding resource pool starts remote sessions.\n",
        "oneOf": [
          {
            "$ref": "#/components/schemas/RemoteConfigurationFirecrest"
          }
        ]
      },
      "RemoteConfigurationFirecrest": {
        "type": "object",
        "description": "The configuration for starting sessions remotely using\nthe FirecREST API\n",
        "additionalProperties": false,
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "firecrest"
            ],
            "description": "Kind of remote resource pool",
            "example": "firecrest"
          },
          "provider_id": {
            "$ref": "#/components/schemas/RemoteConfigurationFirecrestProviderId"
          },
          "api_url": {
            "$ref": "#/components/schemas/RemoteConfigurationFirecrestApiUrl"
          },
          "system_name": {
            "$ref": "#/components/schemas/RemoteConfigurationFirecrestSystemName"
          },
          "partition": {
            "$ref": "#/components/schemas/RemoteConfigurationFirecrestPartition"
          }
        },
        "required": [
          "kind",
          "api_url",
          "system_name"
        ]
      },
      "RemoteConfigurationFirecrestProviderId": {
        "type": "string",
        "description": "The ID of a provider (see oauth2 section).\nThis is used to allow seamless authentication using Renku integrations.\n",
        "example": "my-provider"
      },
      "RemoteConfigurationFirecrestApiUrl": {
        "type": "string",
        "description": "The base URL of the FirecREST API",
        "example": "https://api.cscs.ch/hpc/firecrest/v2"
      },
      "RemoteConfigurationFirecrestSystemName": {
        "type": "string",
        "description": "The name of the system to use with the FirecREST API",
        "example": "eiger"
      },
      "RemoteConfigurationFirecrestPartition": {
        "type": "string",
        "description": "The partition to use when submitting jobs",
        "example": "normal"
      },
      "RemoteConfigurationPatch": {
        "type": "object",
        "description": "Patch for the configuration used by to start sessions remotely\n",
        "oneOf": [
          {
            "$ref": "#/components/schemas/RemoteConfigurationPatchReset"
          },
          {
            "$ref": "#/components/schemas/RemoteConfigurationFirecrestPatch"
          }
        ]
      },
      "RemoteConfigurationPatchReset": {
        "type": "object",
        "description": "Value used to unset the remote field (empty object).",
        "additionalProperties": false
      },
      "RemoteConfigurationFirecrestPatch": {
        "type": "object",
        "description": "The configuration for starting sessions remotely using\nthe FirecREST API\n",
        "additionalProperties": false,
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "firecrest"
            ],
            "description": "Kind of remote resource pool",
            "example": "firecrest"
          },
          "provider_id": {
            "$ref": "#/components/schemas/RemoteConfigurationFirecrestProviderId"
          },
          "api_url": {
            "$ref": "#/components/schemas/RemoteConfigurationFirecrestApiUrl"
          },
          "system_name": {
            "$ref": "#/components/schemas/RemoteConfigurationFirecrestSystemName"
          },
          "partition": {
            "$ref": "#/components/schemas/RemoteConfigurationFirecrestPartition"
          }
        }
      },
      "IdleThreshold": {
        "type": "integer",
        "description": "A threshold in seconds after which a session gets hibernated (0 means no threshold)",
        "minimum": 0,
        "maximum": 2147483647
      },
      "HibernationThreshold": {
        "type": "integer",
        "description": "A threshold in seconds after which a session gets culled/deleted (0 means no threshold)",
        "minimum": 0,
        "maximum": 2147483647
      },
      "K8sLabelList": {
        "type": "array",
        "description": "A list of k8s labels used for tolerations",
        "items": {
          "$ref": "#/components/schemas/K8sLabel"
        },
        "example": [
          "test-label-1"
        ],
        "uniqueItems": true,
        "default": [],
        "minItems": 0
      },
      "K8sLabel": {
        "type": "string",
        "description": "A valid K8s label",
        "example": "some-label-1",
        "pattern": "^[a-z0-9A-Z][a-z0-9A-Z-_./]*[a-z0-9A-Z]$",
        "minLength": 3,
        "maxLength": 63
      },
      "K8sResourceName": {
        "type": "string",
        "description": "A name of any K8s resource (i.e. Pod, Service, Secret, etc.).\nThis is pattern imposes the stricter rules applied to some resource type names\nthat need to follow DNS label standard and therefore can be used for all types.\nLooser rules can be applied to a smaller subset of resource types.\n",
        "example": "some-k8s-resource",
        "pattern": "^[a-z0-9][a-z0-9-]*[a-z0-9]$",
        "minLength": 1,
        "maxLength": 63
      },
      "K8sResourceNamePatch": {
        "type": "string",
        "description": "A name of any K8s resource (i.e. Pod, Service, Secret, etc.).\nThis is pattern imposes the stricter rules applied to some resource type names\nthat need to follow DNS label standard and therefore can be used for all types.\nLooser rules can be applied to a smaller subset of resource types. An empty\nstring indicates that the value should be removed if present in the DB.\n",
        "example": "some-k8s-resource",
        "pattern": "^[a-z0-9][a-z0-9-]*[a-z0-9]$",
        "minLength": 0,
        "maxLength": 63
      },
      "NodeAffinity": {
        "type": "object",
        "additionalProperties": false,
        "description": "A minimal representation of a node affinity label",
        "properties": {
          "key": {
            "$ref": "#/components/schemas/K8sLabel"
          },
          "required_during_scheduling": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "key"
        ],
        "example": {
          "key": "some-label-32",
          "required_during_scheduling": true
        }
      },
      "NodeAffinityListResponse": {
        "type": "array",
        "description": "A list of k8s labels used for tolerations and/or node affinity",
        "items": {
          "$ref": "#/components/schemas/NodeAffinity"
        },
        "example": [
          {
            "key": "test-label-1",
            "required_during_scheduling": false
          }
        ],
        "uniqueItems": true,
        "default": [],
        "minItems": 0
      },
      "NodeAffinityList": {
        "type": "array",
        "description": "A list of k8s labels used for tolerations and/or node affinity",
        "items": {
          "$ref": "#/components/schemas/NodeAffinity"
        },
        "example": [
          {
            "key": "test-label-1",
            "required_during_scheduling": false
          }
        ],
        "uniqueItems": true,
        "default": [],
        "minItems": 0
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "integer",
                "minimum": 0,
                "exclusiveMinimum": true,
                "example": 1404
              },
              "detail": {
                "type": "string",
                "example": "A more detailed optional message showing what the problem was"
              },
              "message": {
                "type": "string",
                "example": "Something went wrong - please try again later"
              }
            },
            "required": [
              "code",
              "message"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "Ulid": {
        "description": "ULID identifier",
        "type": "string",
        "minLength": 26,
        "maxLength": 26,
        "pattern": "^[0-7][0-9A-HJKMNP-TV-Z]{25}$"
      },
      "Protocol": {
        "description": "Allowed Protocol strings",
        "type": "string",
        "enum": [
          "http",
          "https"
        ]
      },
      "Port": {
        "type": "integer",
        "minimum": 0,
        "maximum": 65536
      },
      "Host": {
        "type": "string",
        "maxLength": 256,
        "pattern": "^([0-9a-zA-Z:_-]+[.])*[0-9a-zA-Z:_-]+$"
      },
      "TlsSecretName": {
        "type": "string",
        "maxLength": 256
      },
      "StorageClassName": {
        "type": "string",
        "maxLength": 256
      },
      "IngressClassName": {
        "type": "string",
        "maxLength": 256
      },
      "IngressAnnotations": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "responses": {
      "Error": {
        "description": "The schema for all 4xx and 5xx responses",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "type": "http"
      },
      "oidc": {
        "type": "openIdConnect",
        "openIdConnectUrl": "/auth/realms/Renku/.well-known/openid-configuration"
      }
    }
  },
  "security": [
    {
      "bearer": []
    },
    {
      "oidc": [
        "openid"
      ]
    }
  ]
}