diff --git a/docs/api/v2/V2_docs.go b/docs/api/v2/V2_docs.go index 65edd86e..490aa50d 100644 --- a/docs/api/v2/V2_docs.go +++ b/docs/api/v2/V2_docs.go @@ -6,10 +6,10 @@ import "github.com/swaggo/swag/v2" const docTemplateV2 = `{ "schemes": {{ marshal .Schemes }}, - "components": {"schemas":{"body.ApiKey":{"properties":{"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"name":{"type":"string"}},"type":"object"},"body.ApiKeyCreate":{"properties":{"expiresAt":{"type":"string"},"name":{"type":"string"}},"required":["expiresAt","name"],"type":"object"},"body.ApiKeyCreated":{"properties":{"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"}},"type":"object"},"body.BindingError":{"properties":{"validationErrors":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}},"type":"object"},"body.CiConfig":{"properties":{"config":{"type":"string"}},"type":"object"},"body.ClusterCapacities":{"properties":{"cluster":{"type":"string"},"cpuCore":{"$ref":"#/components/schemas/body.CpuCoreCapacities"},"gpu":{"$ref":"#/components/schemas/body.GpuCapacities"},"ram":{"$ref":"#/components/schemas/body.RamCapacities"}},"type":"object"},"body.ClusterStats":{"properties":{"cluster":{"type":"string"},"podCount":{"type":"integer"}},"type":"object"},"body.CpuCoreCapacities":{"description":"Total","properties":{"total":{"type":"integer"}},"type":"object"},"body.CpuStatus":{"properties":{"load":{"$ref":"#/components/schemas/body.CpuStatusLoad"},"temp":{"$ref":"#/components/schemas/body.CpuStatusTemp"}},"type":"object"},"body.CpuStatusLoad":{"properties":{"cores":{"items":{"type":"integer"},"type":"array","uniqueItems":false},"main":{"type":"number"},"max":{"type":"number"}},"type":"object"},"body.CpuStatusTemp":{"properties":{"cores":{"items":{"type":"integer"},"type":"array","uniqueItems":false},"main":{"type":"number"},"max":{"type":"number"}},"type":"object"},"body.CustomDomainRead":{"properties":{"domain":{"type":"string"},"secret":{"type":"string"},"status":{"type":"string"},"url":{"type":"string"}},"type":"object"},"body.DeploymentCommand":{"properties":{"command":{"enum":["restart"],"type":"string"}},"required":["command"],"type":"object"},"body.DeploymentCreate":{"properties":{"args":{"items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"cpuCores":{"type":"number"},"customDomain":{"description":"CustomDomain is the domain that the deployment will be available on.\nThe max length is set to 243 to allow for a subdomain when confirming the domain.","type":"string"},"envs":{"items":{"$ref":"#/components/schemas/body.Env"},"maxItems":1000,"minItems":0,"type":"array","uniqueItems":false},"healthCheckPath":{"maxLength":1000,"minLength":0,"type":"string"},"image":{"maxLength":1000,"minLength":1,"type":"string"},"initCommands":{"items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"name":{"maxLength":30,"minLength":3,"type":"string"},"private":{"description":"Deprecated: Use Visibility instead.","type":"boolean"},"ram":{"type":"number"},"replicas":{"maximum":100,"minimum":0,"type":"integer"},"visibility":{"enum":["public","private","auth"],"type":"string"},"volumes":{"items":{"$ref":"#/components/schemas/body.Volume"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"zone":{"description":"Zone is the zone that the deployment will be created in.\nIf the zone is not set, the deployment will be created in the default zone.","type":"string"}},"required":["name"],"type":"object"},"body.DeploymentCreated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.DeploymentRead":{"properties":{"accessedAt":{"type":"string"},"args":{"items":{"type":"string"},"type":"array","uniqueItems":false},"createdAt":{"type":"string"},"customDomain":{"$ref":"#/components/schemas/body.CustomDomainRead"},"envs":{"items":{"$ref":"#/components/schemas/body.Env"},"type":"array","uniqueItems":false},"error":{"type":"string"},"healthCheckPath":{"type":"string"},"id":{"type":"string"},"image":{"type":"string"},"initCommands":{"items":{"type":"string"},"type":"array","uniqueItems":false},"integrations":{"description":"Integrations are currently not used, but could be used if we wanted to add a list of integrations to the deployment\n\nFor example GitHub","items":{"type":"string"},"type":"array","uniqueItems":false},"internalPort":{"type":"integer"},"name":{"type":"string"},"ownerId":{"type":"string"},"pingResult":{"type":"integer"},"private":{"description":"Deprecated: Use Visibility instead.","type":"boolean"},"repairedAt":{"type":"string"},"replicaStatus":{"$ref":"#/components/schemas/body.ReplicaStatus"},"restartedAt":{"type":"string"},"specs":{"$ref":"#/components/schemas/body.DeploymentSpecs"},"status":{"type":"string"},"storageUrl":{"type":"string"},"teams":{"items":{"type":"string"},"type":"array","uniqueItems":false},"type":{"type":"string"},"updatedAt":{"type":"string"},"url":{"type":"string"},"visibility":{"type":"string"},"volumes":{"items":{"$ref":"#/components/schemas/body.Volume"},"type":"array","uniqueItems":false},"zone":{"type":"string"}},"type":"object"},"body.DeploymentSpecs":{"properties":{"cpuCores":{"type":"number"},"ram":{"type":"number"},"replicas":{"type":"integer"}},"type":"object"},"body.DeploymentUpdate":{"properties":{"args":{"items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"cpuCores":{"type":"number"},"customDomain":{"description":"CustomDomain is the domain that the deployment will be available on.\nThe max length is set to 243 to allow for a subdomain when confirming the domain.","type":"string"},"envs":{"items":{"$ref":"#/components/schemas/body.Env"},"maxItems":1000,"minItems":0,"type":"array","uniqueItems":false},"healthCheckPath":{"maxLength":1000,"minLength":0,"type":"string"},"image":{"maxLength":1000,"minLength":1,"type":"string"},"initCommands":{"items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"name":{"maxLength":30,"minLength":3,"type":"string"},"private":{"description":"Deprecated: Use Visibility instead.","type":"boolean"},"ram":{"type":"number"},"replicas":{"maximum":100,"minimum":0,"type":"integer"},"visibility":{"enum":["public","private","auth"],"type":"string"},"volumes":{"items":{"$ref":"#/components/schemas/body.Volume"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false}},"required":["name"],"type":"object"},"body.DeploymentUpdated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.DiscoverRead":{"properties":{"roles":{"items":{"$ref":"#/components/schemas/body.Role"},"type":"array","uniqueItems":false},"version":{"type":"string"}},"type":"object"},"body.Env":{"properties":{"name":{"maxLength":100,"minLength":1,"type":"string"},"value":{"maxLength":10000,"minLength":1,"type":"string"}},"required":["name","value"],"type":"object"},"body.GpuCapacities":{"properties":{"total":{"type":"integer"}},"type":"object"},"body.GpuGroupRead":{"properties":{"available":{"type":"integer"},"displayName":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"total":{"type":"integer"},"vendor":{"type":"string"},"zone":{"type":"string"}},"type":"object"},"body.GpuLeaseCreate":{"properties":{"gpuGroupId":{"description":"GpuGroupID is used to specify the GPU to lease.\nAs such, the lease does not specify which specific GPU to lease, but rather the type of GPU to lease.","type":"string"},"leaseForever":{"description":"LeaseForever is used to specify whether the lease should be created forever.","type":"boolean"}},"required":["gpuGroupId"],"type":"object"},"body.GpuLeaseCreated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.GpuLeaseDeleted":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.GpuLeaseRead":{"properties":{"activatedAt":{"description":"ActivatedAt specifies the time when the lease was activated. This is the time the user first attached the GPU\nor 1 day after the lease was created if the user did not attach the GPU.","type":"string"},"active":{"type":"boolean"},"assignedAt":{"description":"AssignedAt specifies the time when the lease was assigned to the user.","type":"string"},"createdAt":{"type":"string"},"expiredAt":{"type":"string"},"expiresAt":{"description":"ExpiresAt specifies the time when the lease will expire.\nThis is only present if the lease is active.","type":"string"},"gpuGroupId":{"type":"string"},"id":{"type":"string"},"leaseDuration":{"type":"number"},"queuePosition":{"type":"integer"},"userId":{"type":"string"},"vmId":{"description":"VmID is set when the lease is attached to a VM.","type":"string"}},"type":"object"},"body.GpuLeaseUpdate":{"properties":{"vmId":{"description":"VmID is used to specify the VM to attach the lease to.\n\n- If specified, the lease will be attached to the VM.\n\n- If the lease is already attached to a VM, it will be detached from the current VM and attached to the new VM.\n\n- If the lease is not active, specifying a VM will activate the lease.\n\n- If the lease is not assigned, an error will be returned.","type":"string"}},"type":"object"},"body.GpuLeaseUpdated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.GpuStatus":{"properties":{"temp":{"items":{"$ref":"#/components/schemas/body.GpuStatusTemp"},"type":"array","uniqueItems":false}},"type":"object"},"body.GpuStatusTemp":{"properties":{"main":{"type":"number"}},"type":"object"},"body.HarborWebhook":{"properties":{"event_data":{"properties":{"repository":{"properties":{"date_created":{"type":"integer"},"name":{"type":"string"},"namespace":{"type":"string"},"repo_full_name":{"type":"string"},"repo_type":{"type":"string"}},"type":"object"},"resources":{"items":{"properties":{"digest":{"type":"string"},"resource_url":{"type":"string"},"tag":{"type":"string"}},"type":"object"},"type":"array","uniqueItems":false}},"type":"object"},"occur_at":{"type":"integer"},"operator":{"type":"string"},"type":{"type":"string"}},"type":"object"},"body.HostCapacities":{"properties":{"cpuCore":{"$ref":"#/components/schemas/body.CpuCoreCapacities"},"displayName":{"type":"string"},"gpu":{"$ref":"#/components/schemas/body.GpuCapacities"},"name":{"type":"string"},"ram":{"$ref":"#/components/schemas/body.RamCapacities"},"zone":{"description":"Zone is the name of the zone where the host is located.","type":"string"}},"type":"object"},"body.HostRead":{"properties":{"displayName":{"type":"string"},"name":{"type":"string"},"zone":{"description":"Zone is the name of the zone where the host is located.","type":"string"}},"type":"object"},"body.HostStatus":{"properties":{"cpu":{"$ref":"#/components/schemas/body.CpuStatus"},"displayName":{"type":"string"},"gpu":{"$ref":"#/components/schemas/body.GpuStatus"},"name":{"type":"string"},"ram":{"$ref":"#/components/schemas/body.RamStatus"},"zone":{"description":"Zone is the name of the zone where the host is located.","type":"string"}},"type":"object"},"body.HttpProxyCreate":{"properties":{"customDomain":{"description":"CustomDomain is the domain that the deployment will be available on.\nThe max length is set to 243 to allow for a subdomain when confirming the domain.","type":"string"},"name":{"maxLength":30,"minLength":3,"type":"string"}},"required":["name"],"type":"object"},"body.HttpProxyRead":{"properties":{"customDomain":{"$ref":"#/components/schemas/body.CustomDomainRead"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"body.HttpProxyUpdate":{"properties":{"customDomain":{"description":"CustomDomain is the domain that the deployment will be available on.\nThe max length is set to 243 to allow for a subdomain when confirming the domain.","type":"string"},"name":{"maxLength":30,"minLength":3,"type":"string"}},"required":["name"],"type":"object"},"body.JobRead":{"properties":{"createdAt":{"type":"string"},"finishedAt":{"type":"string"},"id":{"type":"string"},"lastError":{"type":"string"},"lastRunAt":{"type":"string"},"runAfter":{"type":"string"},"status":{"type":"string"},"type":{"type":"string"},"userId":{"type":"string"}},"type":"object"},"body.JobUpdate":{"properties":{"status":{"enum":["pending","running","failed","terminated","finished","completed"],"type":"string"}},"type":"object"},"body.K8sStats":{"properties":{"clusters":{"items":{"$ref":"#/components/schemas/body.ClusterStats"},"type":"array","uniqueItems":false},"podCount":{"type":"integer"}},"type":"object"},"body.NotificationRead":{"properties":{"completedAt":{"type":"string"},"content":{"additionalProperties":{},"type":"object"},"createdAt":{"type":"string"},"id":{"type":"string"},"readAt":{"type":"string"},"toastedAt":{"type":"string"},"type":{"type":"string"},"userId":{"type":"string"}},"type":"object"},"body.NotificationUpdate":{"properties":{"read":{"type":"boolean"},"toasted":{"type":"boolean"}},"type":"object"},"body.PortCreate":{"properties":{"httpProxy":{"$ref":"#/components/schemas/body.HttpProxyCreate"},"name":{"maxLength":100,"minLength":1,"type":"string"},"port":{"maximum":65535,"minimum":1,"type":"integer"},"protocol":{"enum":["tcp","udp"],"type":"string"}},"required":["name","port","protocol"],"type":"object"},"body.PortRead":{"properties":{"externalPort":{"type":"integer"},"httpProxy":{"$ref":"#/components/schemas/body.HttpProxyRead"},"name":{"type":"string"},"port":{"type":"integer"},"protocol":{"type":"string"}},"type":"object"},"body.PortUpdate":{"properties":{"httpProxy":{"$ref":"#/components/schemas/body.HttpProxyUpdate"},"name":{"maxLength":100,"minLength":1,"type":"string"},"port":{"maximum":65535,"minimum":1,"type":"integer"},"protocol":{"enum":["tcp","udp"],"type":"string"}},"required":["name","port","protocol"],"type":"object"},"body.PublicKey":{"properties":{"key":{"type":"string"},"name":{"maxLength":30,"minLength":1,"type":"string"}},"required":["key","name"],"type":"object"},"body.Quota":{"properties":{"cpuCores":{"type":"number"},"diskSize":{"type":"number"},"gpuLeaseDuration":{"description":"in hours","type":"number"},"ram":{"type":"number"},"snapshots":{"type":"integer"}},"type":"object"},"body.RamCapacities":{"properties":{"total":{"type":"integer"}},"type":"object"},"body.RamStatus":{"properties":{"load":{"$ref":"#/components/schemas/body.RamStatusLoad"}},"type":"object"},"body.RamStatusLoad":{"properties":{"main":{"type":"number"}},"type":"object"},"body.ReplicaStatus":{"properties":{"availableReplicas":{"description":"AvailableReplicas is the number of replicas that are available.","type":"integer"},"desiredReplicas":{"description":"DesiredReplicas is the number of replicas that the deployment should have.","type":"integer"},"readyReplicas":{"description":"ReadyReplicas is the number of replicas that are ready.","type":"integer"},"unavailableReplicas":{"description":"UnavailableReplicas is the number of replicas that are unavailable.","type":"integer"}},"type":"object"},"body.ResourceMigrationCreate":{"properties":{"resourceId":{"description":"ResourceID is the ID of the resource that is being migrated.\nThis can be a VM ID, deployment ID, etc. depending on the type of the migration.","type":"string"},"status":{"description":"Status is the status of the resource migration.\nIt is used by privileged admins to directly accept or reject a migration.\nThe field is ignored by non-admins.\n\nPossible values:\n- accepted\n- pending","type":"string"},"type":{"description":"Type is the type of the resource migration.\n\nPossible values:\n- updateOwner","enum":["updateOwner"],"type":"string"},"updateOwner":{"description":"UpdateOwner is the set of parameters that are required for the updateOwner migration type.\nIt is ignored if the migration type is not updateOwner.","properties":{"ownerId":{"type":"string"}},"required":["ownerId"],"type":"object"}},"required":["resourceId","type"],"type":"object"},"body.ResourceMigrationCreated":{"properties":{"createdAt":{"type":"string"},"deletedAt":{"type":"string"},"id":{"type":"string"},"jobId":{"description":"JobID is the ID of the job that was created for the resource migration.\nIt will only be set if the migration was created with status 'accepted'.","type":"string"},"resourceId":{"description":"ResourceID is the ID of the resource that is being migrated.\nThis can be a VM ID, deployment ID, etc. depending on the type of the migration.","type":"string"},"resourceType":{"description":"ResourceType is the type of the resource that is being migrated.\n\nPossible values:\n- vm\n- deployment","type":"string"},"status":{"description":"Status is the status of the resource migration.\nWhen this field is set to 'accepted', the migration will take place and then automatically be deleted.","type":"string"},"type":{"description":"Type is the type of the resource migration.\n\nPossible values:\n- updateOwner","type":"string"},"updateOwner":{"description":"UpdateOwner is the set of parameters that are required for the updateOwner migration type.\nIt is empty if the migration type is not updateOwner.","properties":{"ownerId":{"type":"string"}},"type":"object"},"userId":{"description":"UserID is the ID of the user who initiated the migration.","type":"string"}},"type":"object"},"body.ResourceMigrationRead":{"properties":{"createdAt":{"type":"string"},"deletedAt":{"type":"string"},"id":{"type":"string"},"resourceId":{"description":"ResourceID is the ID of the resource that is being migrated.\nThis can be a VM ID, deployment ID, etc. depending on the type of the migration.","type":"string"},"resourceType":{"description":"ResourceType is the type of the resource that is being migrated.\n\nPossible values:\n- vm\n- deployment","type":"string"},"status":{"description":"Status is the status of the resource migration.\nWhen this field is set to 'accepted', the migration will take place and then automatically be deleted.","type":"string"},"type":{"description":"Type is the type of the resource migration.\n\nPossible values:\n- updateOwner","type":"string"},"updateOwner":{"description":"UpdateOwner is the set of parameters that are required for the updateOwner migration type.\nIt is empty if the migration type is not updateOwner.","properties":{"ownerId":{"type":"string"}},"type":"object"},"userId":{"description":"UserID is the ID of the user who initiated the migration.","type":"string"}},"type":"object"},"body.ResourceMigrationUpdate":{"properties":{"code":{"description":"Code is a token required when accepting a migration if the acceptor is not an admin.\nIt is sent to the acceptor using the notification API","type":"string"},"status":{"description":"Status is the status of the resource migration.\nIt is used to accept a migration by setting the status to 'accepted'.\nIf the acceptor is not an admin, a Code must be provided.\n\nPossible values:\n- accepted\n- pending","type":"string"}},"required":["status"],"type":"object"},"body.ResourceMigrationUpdated":{"properties":{"createdAt":{"type":"string"},"deletedAt":{"type":"string"},"id":{"type":"string"},"jobId":{"description":"JobID is the ID of the job that was created for the resource migration.\nIt will only be set if the migration was updated with status 'accepted'.","type":"string"},"resourceId":{"description":"ResourceID is the ID of the resource that is being migrated.\nThis can be a VM ID, deployment ID, etc. depending on the type of the migration.","type":"string"},"resourceType":{"description":"ResourceType is the type of the resource that is being migrated.\n\nPossible values:\n- vm\n- deployment","type":"string"},"status":{"description":"Status is the status of the resource migration.\nWhen this field is set to 'accepted', the migration will take place and then automatically be deleted.","type":"string"},"type":{"description":"Type is the type of the resource migration.\n\nPossible values:\n- updateOwner","type":"string"},"updateOwner":{"description":"UpdateOwner is the set of parameters that are required for the updateOwner migration type.\nIt is empty if the migration type is not updateOwner.","properties":{"ownerId":{"type":"string"}},"type":"object"},"userId":{"description":"UserID is the ID of the user who initiated the migration.","type":"string"}},"type":"object"},"body.Role":{"properties":{"description":{"type":"string"},"name":{"type":"string"},"permissions":{"items":{"type":"string"},"type":"array","uniqueItems":false},"quota":{"$ref":"#/components/schemas/body.Quota"}},"type":"object"},"body.SmDeleted":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.SmRead":{"properties":{"createdAt":{"type":"string"},"id":{"type":"string"},"ownerId":{"type":"string"},"url":{"type":"string"},"zone":{"type":"string"}},"type":"object"},"body.SystemCapacities":{"properties":{"clusters":{"description":"Per Cluster","items":{"$ref":"#/components/schemas/body.ClusterCapacities"},"type":"array","uniqueItems":false},"cpuCore":{"$ref":"#/components/schemas/body.CpuCoreCapacities"},"gpu":{"$ref":"#/components/schemas/body.GpuCapacities"},"hosts":{"description":"Per Host","items":{"$ref":"#/components/schemas/body.HostCapacities"},"type":"array","uniqueItems":false},"ram":{"$ref":"#/components/schemas/body.RamCapacities"}},"type":"object"},"body.SystemStats":{"properties":{"k8s":{"$ref":"#/components/schemas/body.K8sStats"}},"type":"object"},"body.SystemStatus":{"properties":{"hosts":{"items":{"$ref":"#/components/schemas/body.HostStatus"},"type":"array","uniqueItems":false}},"type":"object"},"body.TeamCreate":{"properties":{"description":{"maxLength":1000,"type":"string"},"members":{"items":{"$ref":"#/components/schemas/body.TeamMemberCreate"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"name":{"maxLength":100,"minLength":1,"type":"string"},"resources":{"items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false}},"required":["name"],"type":"object"},"body.TeamMember":{"properties":{"addedAt":{"type":"string"},"email":{"type":"string"},"firstName":{"type":"string"},"gravatarUrl":{"type":"string"},"id":{"type":"string"},"joinedAt":{"type":"string"},"lastName":{"type":"string"},"memberStatus":{"type":"string"},"teamRole":{"type":"string"},"username":{"type":"string"}},"type":"object"},"body.TeamMemberCreate":{"properties":{"id":{"type":"string"},"teamRole":{"description":"default to MemberRoleAdmin right now","type":"string"}},"required":["id"],"type":"object"},"body.TeamMemberUpdate":{"properties":{"id":{"type":"string"},"teamRole":{"description":"default to MemberRoleAdmin right now","type":"string"}},"required":["id"],"type":"object"},"body.TeamRead":{"properties":{"createdAt":{"type":"string"},"description":{"type":"string"},"id":{"type":"string"},"members":{"items":{"$ref":"#/components/schemas/body.TeamMember"},"type":"array","uniqueItems":false},"name":{"type":"string"},"ownerId":{"type":"string"},"resources":{"items":{"$ref":"#/components/schemas/body.TeamResource"},"type":"array","uniqueItems":false},"updatedAt":{"type":"string"}},"type":"object"},"body.TeamResource":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"type":"object"},"body.TeamUpdate":{"properties":{"description":{"maxLength":1000,"type":"string"},"members":{"items":{"$ref":"#/components/schemas/body.TeamMemberUpdate"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"name":{"maxLength":100,"minLength":1,"type":"string"},"resources":{"items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false}},"type":"object"},"body.TimestampedSystemCapacities":{"properties":{"capacities":{"$ref":"#/components/schemas/body.SystemCapacities"},"timestamp":{"type":"string"}},"type":"object"},"body.TimestampedSystemStats":{"properties":{"stats":{"$ref":"#/components/schemas/body.SystemStats"},"timestamp":{"type":"string"}},"type":"object"},"body.TimestampedSystemStatus":{"properties":{"status":{"$ref":"#/components/schemas/body.SystemStatus"},"timestamp":{"type":"string"}},"type":"object"},"body.Usage":{"properties":{"cpuCores":{"type":"number"},"diskSize":{"type":"integer"},"ram":{"type":"number"}},"type":"object"},"body.UserData":{"properties":{"key":{"maxLength":255,"minLength":1,"type":"string"},"value":{"maxLength":255,"minLength":1,"type":"string"}},"required":["key","value"],"type":"object"},"body.UserRead":{"properties":{"admin":{"type":"boolean"},"apiKeys":{"items":{"$ref":"#/components/schemas/body.ApiKey"},"type":"array","uniqueItems":false},"email":{"type":"string"},"firstName":{"type":"string"},"gravatarUrl":{"type":"string"},"id":{"type":"string"},"lastName":{"type":"string"},"publicKeys":{"items":{"$ref":"#/components/schemas/body.PublicKey"},"type":"array","uniqueItems":false},"quota":{"$ref":"#/components/schemas/body.Quota"},"role":{"$ref":"#/components/schemas/body.Role"},"storageUrl":{"type":"string"},"usage":{"$ref":"#/components/schemas/body.Usage"},"userData":{"items":{"$ref":"#/components/schemas/body.UserData"},"type":"array","uniqueItems":false},"username":{"type":"string"}},"type":"object"},"body.UserUpdate":{"properties":{"apiKeys":{"description":"ApiKeys specifies the API keys that should remain. If an API key is not in this list, it will be deleted.\nHowever, API keys cannot be created, use /apiKeys endpoint to create new API keys.","items":{"$ref":"#/components/schemas/body.ApiKey"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"publicKeys":{"items":{"$ref":"#/components/schemas/body.PublicKey"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"userData":{"items":{"$ref":"#/components/schemas/body.UserData"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false}},"type":"object"},"body.VmActionCreate":{"properties":{"action":{"enum":["start","stop","restart","repair"],"type":"string"}},"required":["action"],"type":"object"},"body.VmActionCreated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.VmCreate":{"properties":{"cpuCores":{"minimum":1,"type":"integer"},"diskSize":{"minimum":10,"type":"integer"},"name":{"maxLength":30,"minLength":3,"type":"string"},"ports":{"items":{"$ref":"#/components/schemas/body.PortCreate"},"maxItems":10,"minItems":0,"type":"array","uniqueItems":false},"ram":{"minimum":1,"type":"integer"},"sshPublicKey":{"type":"string"},"zone":{"type":"string"}},"required":["cpuCores","diskSize","name","ram","sshPublicKey"],"type":"object"},"body.VmCreated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.VmDeleted":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.VmGpuLease":{"properties":{"activatedAt":{"description":"ActivatedAt specifies the time when the lease was activated. This is the time the user first attached the GPU\nor 1 day after the lease was created if the user did not attach the GPU.","type":"string"},"assignedAt":{"description":"AssignedAt specifies the time when the lease was assigned to the user.","type":"string"},"createdAt":{"type":"string"},"expiredAt":{"description":"ExpiredAt specifies the time when the lease expired.\nThis is only present if the lease is expired.","type":"string"},"expiresAt":{"description":"ExpiresAt specifies the time when the lease will expire.\nThis is only present if the lease is active.","type":"string"},"gpuGroupId":{"type":"string"},"id":{"type":"string"},"leaseDuration":{"type":"number"}},"type":"object"},"body.VmRead":{"properties":{"accessedAt":{"type":"string"},"createdAt":{"type":"string"},"gpu":{"$ref":"#/components/schemas/body.VmGpuLease"},"host":{"type":"string"},"id":{"type":"string"},"internalName":{"type":"string"},"name":{"type":"string"},"ownerId":{"type":"string"},"ports":{"items":{"$ref":"#/components/schemas/body.PortRead"},"type":"array","uniqueItems":false},"repairedAt":{"type":"string"},"specs":{"$ref":"#/components/schemas/body.VmSpecs"},"sshConnectionString":{"type":"string"},"sshPublicKey":{"type":"string"},"status":{"type":"string"},"teams":{"items":{"type":"string"},"type":"array","uniqueItems":false},"updatedAt":{"type":"string"},"zone":{"type":"string"}},"type":"object"},"body.VmSnapshotCreated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.VmSnapshotDeleted":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.VmSnapshotRead":{"properties":{"created":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"}},"type":"object"},"body.VmSpecs":{"properties":{"cpuCores":{"type":"integer"},"diskSize":{"type":"integer"},"ram":{"type":"integer"}},"type":"object"},"body.VmUpdate":{"properties":{"cpuCores":{"minimum":1,"type":"integer"},"name":{"maxLength":30,"minLength":3,"type":"string"},"ports":{"items":{"$ref":"#/components/schemas/body.PortUpdate"},"maxItems":10,"minItems":0,"type":"array","uniqueItems":false},"ram":{"minimum":1,"type":"integer"}},"type":"object"},"body.VmUpdated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.Volume":{"properties":{"appPath":{"maxLength":255,"minLength":1,"type":"string"},"name":{"maxLength":30,"minLength":3,"type":"string"},"serverPath":{"maxLength":255,"minLength":1,"type":"string"}},"required":["appPath","name","serverPath"],"type":"object"},"body.WorkerStatusRead":{"properties":{"name":{"type":"string"},"reportedAt":{"type":"string"},"status":{"type":"string"}},"type":"object"},"body.ZoneEndpoints":{"properties":{"deployment":{"type":"string"},"storage":{"type":"string"},"vm":{"type":"string"},"vmApp":{"type":"string"}},"type":"object"},"body.ZoneRead":{"properties":{"capabilities":{"items":{"type":"string"},"type":"array","uniqueItems":false},"description":{"type":"string"},"enabled":{"type":"boolean"},"endpoints":{"$ref":"#/components/schemas/body.ZoneEndpoints"},"legacy":{"type":"boolean"},"name":{"type":"string"}},"type":"object"},"sys.Error":{"properties":{"code":{"type":"string"},"msg":{"type":"string"}},"type":"object"},"sys.ErrorResponse":{"properties":{"errors":{"items":{"$ref":"#/components/schemas/sys.Error"},"type":"array","uniqueItems":false}},"type":"object"}},"securitySchemes":{"ApiKeyAuth":{"in":"header","name":"X-Api-Key","type":"apiKey"},"KeycloakOAuth":{"flows":{"authorizationCode":{"authorizationUrl":"https://iam.cloud.cbh.kth.se/realms/cloud/protocol/openid-connect/auth","tokenUrl":"https://iam.cloud.cbh.kth.se/realms/cloud/protocol/openid-connect/token"}},"in":"header","type":"oauth2"}}}, + "components": {"schemas":{"body.ApiKey":{"properties":{"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"name":{"type":"string"}},"type":"object"},"body.ApiKeyCreate":{"properties":{"expiresAt":{"type":"string"},"name":{"type":"string"}},"required":["expiresAt","name"],"type":"object"},"body.ApiKeyCreated":{"properties":{"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"}},"type":"object"},"body.BindingError":{"properties":{"validationErrors":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}},"type":"object"},"body.CiConfig":{"properties":{"config":{"type":"string"}},"type":"object"},"body.ClusterCapacities":{"properties":{"cluster":{"type":"string"},"cpuCore":{"$ref":"#/components/schemas/body.CpuCoreCapacities"},"gpu":{"$ref":"#/components/schemas/body.GpuCapacities"},"ram":{"$ref":"#/components/schemas/body.RamCapacities"}},"type":"object"},"body.ClusterStats":{"properties":{"cluster":{"type":"string"},"podCount":{"type":"integer"}},"type":"object"},"body.CpuCoreCapacities":{"description":"Total","properties":{"total":{"type":"integer"}},"type":"object"},"body.CpuStatus":{"properties":{"load":{"$ref":"#/components/schemas/body.CpuStatusLoad"},"temp":{"$ref":"#/components/schemas/body.CpuStatusTemp"}},"type":"object"},"body.CpuStatusLoad":{"properties":{"cores":{"items":{"type":"integer"},"type":"array","uniqueItems":false},"main":{"type":"number"},"max":{"type":"number"}},"type":"object"},"body.CpuStatusTemp":{"properties":{"cores":{"items":{"type":"integer"},"type":"array","uniqueItems":false},"main":{"type":"number"},"max":{"type":"number"}},"type":"object"},"body.CustomDomainRead":{"properties":{"domain":{"type":"string"},"secret":{"type":"string"},"status":{"type":"string"},"url":{"type":"string"}},"type":"object"},"body.DeploymentCommand":{"properties":{"command":{"enum":["restart"],"type":"string"}},"required":["command"],"type":"object"},"body.DeploymentCreate":{"properties":{"args":{"items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"cpuCores":{"type":"number"},"customDomain":{"description":"CustomDomain is the domain that the deployment will be available on.\nThe max length is set to 243 to allow for a subdomain when confirming the domain.","type":"string"},"envs":{"items":{"$ref":"#/components/schemas/body.Env"},"maxItems":1000,"minItems":0,"type":"array","uniqueItems":false},"healthCheckPath":{"maxLength":1000,"minLength":0,"type":"string"},"image":{"maxLength":1000,"minLength":1,"type":"string"},"initCommands":{"items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"name":{"maxLength":30,"minLength":3,"type":"string"},"neverStale":{"description":"Boolean to make deployment never get disabled, despite being stale","type":"boolean"},"private":{"description":"Deprecated: Use Visibility instead.","type":"boolean"},"ram":{"type":"number"},"replicas":{"maximum":100,"minimum":0,"type":"integer"},"visibility":{"enum":["public","private","auth"],"type":"string"},"volumes":{"items":{"$ref":"#/components/schemas/body.Volume"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"zone":{"description":"Zone is the zone that the deployment will be created in.\nIf the zone is not set, the deployment will be created in the default zone.","type":"string"}},"required":["name"],"type":"object"},"body.DeploymentCreated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.DeploymentRead":{"properties":{"accessedAt":{"type":"string"},"args":{"items":{"type":"string"},"type":"array","uniqueItems":false},"createdAt":{"type":"string"},"customDomain":{"$ref":"#/components/schemas/body.CustomDomainRead"},"envs":{"items":{"$ref":"#/components/schemas/body.Env"},"type":"array","uniqueItems":false},"error":{"type":"string"},"healthCheckPath":{"type":"string"},"id":{"type":"string"},"image":{"type":"string"},"initCommands":{"items":{"type":"string"},"type":"array","uniqueItems":false},"integrations":{"description":"Integrations are currently not used, but could be used if we wanted to add a list of integrations to the deployment\n\nFor example GitHub","items":{"type":"string"},"type":"array","uniqueItems":false},"internalPort":{"type":"integer"},"name":{"type":"string"},"neverStale":{"type":"boolean"},"ownerId":{"type":"string"},"pingResult":{"type":"integer"},"private":{"description":"Deprecated: Use Visibility instead.","type":"boolean"},"repairedAt":{"type":"string"},"replicaStatus":{"$ref":"#/components/schemas/body.ReplicaStatus"},"restartedAt":{"type":"string"},"specs":{"$ref":"#/components/schemas/body.DeploymentSpecs"},"status":{"type":"string"},"storageUrl":{"type":"string"},"teams":{"items":{"type":"string"},"type":"array","uniqueItems":false},"type":{"type":"string"},"updatedAt":{"type":"string"},"url":{"type":"string"},"visibility":{"type":"string"},"volumes":{"items":{"$ref":"#/components/schemas/body.Volume"},"type":"array","uniqueItems":false},"zone":{"type":"string"}},"type":"object"},"body.DeploymentSpecs":{"properties":{"cpuCores":{"type":"number"},"ram":{"type":"number"},"replicas":{"type":"integer"}},"type":"object"},"body.DeploymentUpdate":{"properties":{"args":{"items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"cpuCores":{"type":"number"},"customDomain":{"description":"CustomDomain is the domain that the deployment will be available on.\nThe max length is set to 243 to allow for a subdomain when confirming the domain.","type":"string"},"envs":{"items":{"$ref":"#/components/schemas/body.Env"},"maxItems":1000,"minItems":0,"type":"array","uniqueItems":false},"healthCheckPath":{"maxLength":1000,"minLength":0,"type":"string"},"image":{"maxLength":1000,"minLength":1,"type":"string"},"initCommands":{"items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"name":{"maxLength":30,"minLength":3,"type":"string"},"neverStale":{"type":"boolean"},"private":{"description":"Deprecated: Use Visibility instead.","type":"boolean"},"ram":{"type":"number"},"replicas":{"maximum":100,"minimum":0,"type":"integer"},"visibility":{"enum":["public","private","auth"],"type":"string"},"volumes":{"items":{"$ref":"#/components/schemas/body.Volume"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false}},"required":["name"],"type":"object"},"body.DeploymentUpdated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.DiscoverRead":{"properties":{"roles":{"items":{"$ref":"#/components/schemas/body.Role"},"type":"array","uniqueItems":false},"version":{"type":"string"}},"type":"object"},"body.Env":{"properties":{"name":{"maxLength":100,"minLength":1,"type":"string"},"value":{"maxLength":10000,"minLength":1,"type":"string"}},"required":["name","value"],"type":"object"},"body.GpuCapacities":{"properties":{"total":{"type":"integer"}},"type":"object"},"body.GpuGroupRead":{"properties":{"available":{"type":"integer"},"displayName":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"total":{"type":"integer"},"vendor":{"type":"string"},"zone":{"type":"string"}},"type":"object"},"body.GpuLeaseCreate":{"properties":{"gpuGroupId":{"description":"GpuGroupID is used to specify the GPU to lease.\nAs such, the lease does not specify which specific GPU to lease, but rather the type of GPU to lease.","type":"string"},"leaseForever":{"description":"LeaseForever is used to specify whether the lease should be created forever.","type":"boolean"}},"required":["gpuGroupId"],"type":"object"},"body.GpuLeaseCreated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.GpuLeaseDeleted":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.GpuLeaseRead":{"properties":{"activatedAt":{"description":"ActivatedAt specifies the time when the lease was activated. This is the time the user first attached the GPU\nor 1 day after the lease was created if the user did not attach the GPU.","type":"string"},"active":{"type":"boolean"},"assignedAt":{"description":"AssignedAt specifies the time when the lease was assigned to the user.","type":"string"},"createdAt":{"type":"string"},"expiredAt":{"type":"string"},"expiresAt":{"description":"ExpiresAt specifies the time when the lease will expire.\nThis is only present if the lease is active.","type":"string"},"gpuGroupId":{"type":"string"},"id":{"type":"string"},"leaseDuration":{"type":"number"},"queuePosition":{"type":"integer"},"userId":{"type":"string"},"vmId":{"description":"VmID is set when the lease is attached to a VM.","type":"string"}},"type":"object"},"body.GpuLeaseUpdate":{"properties":{"vmId":{"description":"VmID is used to specify the VM to attach the lease to.\n\n- If specified, the lease will be attached to the VM.\n\n- If the lease is already attached to a VM, it will be detached from the current VM and attached to the new VM.\n\n- If the lease is not active, specifying a VM will activate the lease.\n\n- If the lease is not assigned, an error will be returned.","type":"string"}},"type":"object"},"body.GpuLeaseUpdated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.GpuStatus":{"properties":{"temp":{"items":{"$ref":"#/components/schemas/body.GpuStatusTemp"},"type":"array","uniqueItems":false}},"type":"object"},"body.GpuStatusTemp":{"properties":{"main":{"type":"number"}},"type":"object"},"body.HarborWebhook":{"properties":{"event_data":{"properties":{"repository":{"properties":{"date_created":{"type":"integer"},"name":{"type":"string"},"namespace":{"type":"string"},"repo_full_name":{"type":"string"},"repo_type":{"type":"string"}},"type":"object"},"resources":{"items":{"properties":{"digest":{"type":"string"},"resource_url":{"type":"string"},"tag":{"type":"string"}},"type":"object"},"type":"array","uniqueItems":false}},"type":"object"},"occur_at":{"type":"integer"},"operator":{"type":"string"},"type":{"type":"string"}},"type":"object"},"body.HostCapacities":{"properties":{"cpuCore":{"$ref":"#/components/schemas/body.CpuCoreCapacities"},"displayName":{"type":"string"},"gpu":{"$ref":"#/components/schemas/body.GpuCapacities"},"name":{"type":"string"},"ram":{"$ref":"#/components/schemas/body.RamCapacities"},"zone":{"description":"Zone is the name of the zone where the host is located.","type":"string"}},"type":"object"},"body.HostRead":{"properties":{"displayName":{"type":"string"},"name":{"type":"string"},"zone":{"description":"Zone is the name of the zone where the host is located.","type":"string"}},"type":"object"},"body.HostStatus":{"properties":{"cpu":{"$ref":"#/components/schemas/body.CpuStatus"},"displayName":{"type":"string"},"gpu":{"$ref":"#/components/schemas/body.GpuStatus"},"name":{"type":"string"},"ram":{"$ref":"#/components/schemas/body.RamStatus"},"zone":{"description":"Zone is the name of the zone where the host is located.","type":"string"}},"type":"object"},"body.HttpProxyCreate":{"properties":{"customDomain":{"description":"CustomDomain is the domain that the deployment will be available on.\nThe max length is set to 243 to allow for a subdomain when confirming the domain.","type":"string"},"name":{"maxLength":30,"minLength":3,"type":"string"}},"required":["name"],"type":"object"},"body.HttpProxyRead":{"properties":{"customDomain":{"$ref":"#/components/schemas/body.CustomDomainRead"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"body.HttpProxyUpdate":{"properties":{"customDomain":{"description":"CustomDomain is the domain that the deployment will be available on.\nThe max length is set to 243 to allow for a subdomain when confirming the domain.","type":"string"},"name":{"maxLength":30,"minLength":3,"type":"string"}},"required":["name"],"type":"object"},"body.JobRead":{"properties":{"createdAt":{"type":"string"},"finishedAt":{"type":"string"},"id":{"type":"string"},"lastError":{"type":"string"},"lastRunAt":{"type":"string"},"runAfter":{"type":"string"},"status":{"type":"string"},"type":{"type":"string"},"userId":{"type":"string"}},"type":"object"},"body.JobUpdate":{"properties":{"status":{"enum":["pending","running","failed","terminated","finished","completed"],"type":"string"}},"type":"object"},"body.K8sStats":{"properties":{"clusters":{"items":{"$ref":"#/components/schemas/body.ClusterStats"},"type":"array","uniqueItems":false},"podCount":{"type":"integer"}},"type":"object"},"body.NotificationRead":{"properties":{"completedAt":{"type":"string"},"content":{"additionalProperties":{},"type":"object"},"createdAt":{"type":"string"},"id":{"type":"string"},"readAt":{"type":"string"},"toastedAt":{"type":"string"},"type":{"type":"string"},"userId":{"type":"string"}},"type":"object"},"body.NotificationUpdate":{"properties":{"read":{"type":"boolean"},"toasted":{"type":"boolean"}},"type":"object"},"body.PortCreate":{"properties":{"httpProxy":{"$ref":"#/components/schemas/body.HttpProxyCreate"},"name":{"maxLength":100,"minLength":1,"type":"string"},"port":{"maximum":65535,"minimum":1,"type":"integer"},"protocol":{"enum":["tcp","udp"],"type":"string"}},"required":["name","port","protocol"],"type":"object"},"body.PortRead":{"properties":{"externalPort":{"type":"integer"},"httpProxy":{"$ref":"#/components/schemas/body.HttpProxyRead"},"name":{"type":"string"},"port":{"type":"integer"},"protocol":{"type":"string"}},"type":"object"},"body.PortUpdate":{"properties":{"httpProxy":{"$ref":"#/components/schemas/body.HttpProxyUpdate"},"name":{"maxLength":100,"minLength":1,"type":"string"},"port":{"maximum":65535,"minimum":1,"type":"integer"},"protocol":{"enum":["tcp","udp"],"type":"string"}},"required":["name","port","protocol"],"type":"object"},"body.PublicKey":{"properties":{"key":{"type":"string"},"name":{"maxLength":30,"minLength":1,"type":"string"}},"required":["key","name"],"type":"object"},"body.Quota":{"properties":{"cpuCores":{"type":"number"},"diskSize":{"type":"number"},"gpuLeaseDuration":{"description":"in hours","type":"number"},"ram":{"type":"number"},"snapshots":{"type":"integer"}},"type":"object"},"body.RamCapacities":{"properties":{"total":{"type":"integer"}},"type":"object"},"body.RamStatus":{"properties":{"load":{"$ref":"#/components/schemas/body.RamStatusLoad"}},"type":"object"},"body.RamStatusLoad":{"properties":{"main":{"type":"number"}},"type":"object"},"body.ReplicaStatus":{"properties":{"availableReplicas":{"description":"AvailableReplicas is the number of replicas that are available.","type":"integer"},"desiredReplicas":{"description":"DesiredReplicas is the number of replicas that the deployment should have.","type":"integer"},"readyReplicas":{"description":"ReadyReplicas is the number of replicas that are ready.","type":"integer"},"unavailableReplicas":{"description":"UnavailableReplicas is the number of replicas that are unavailable.","type":"integer"}},"type":"object"},"body.ResourceMigrationCreate":{"properties":{"resourceId":{"description":"ResourceID is the ID of the resource that is being migrated.\nThis can be a VM ID, deployment ID, etc. depending on the type of the migration.","type":"string"},"status":{"description":"Status is the status of the resource migration.\nIt is used by privileged admins to directly accept or reject a migration.\nThe field is ignored by non-admins.\n\nPossible values:\n- accepted\n- pending","type":"string"},"type":{"description":"Type is the type of the resource migration.\n\nPossible values:\n- updateOwner","enum":["updateOwner"],"type":"string"},"updateOwner":{"description":"UpdateOwner is the set of parameters that are required for the updateOwner migration type.\nIt is ignored if the migration type is not updateOwner.","properties":{"ownerId":{"type":"string"}},"required":["ownerId"],"type":"object"}},"required":["resourceId","type"],"type":"object"},"body.ResourceMigrationCreated":{"properties":{"createdAt":{"type":"string"},"deletedAt":{"type":"string"},"id":{"type":"string"},"jobId":{"description":"JobID is the ID of the job that was created for the resource migration.\nIt will only be set if the migration was created with status 'accepted'.","type":"string"},"resourceId":{"description":"ResourceID is the ID of the resource that is being migrated.\nThis can be a VM ID, deployment ID, etc. depending on the type of the migration.","type":"string"},"resourceType":{"description":"ResourceType is the type of the resource that is being migrated.\n\nPossible values:\n- vm\n- deployment","type":"string"},"status":{"description":"Status is the status of the resource migration.\nWhen this field is set to 'accepted', the migration will take place and then automatically be deleted.","type":"string"},"type":{"description":"Type is the type of the resource migration.\n\nPossible values:\n- updateOwner","type":"string"},"updateOwner":{"description":"UpdateOwner is the set of parameters that are required for the updateOwner migration type.\nIt is empty if the migration type is not updateOwner.","properties":{"ownerId":{"type":"string"}},"type":"object"},"userId":{"description":"UserID is the ID of the user who initiated the migration.","type":"string"}},"type":"object"},"body.ResourceMigrationRead":{"properties":{"createdAt":{"type":"string"},"deletedAt":{"type":"string"},"id":{"type":"string"},"resourceId":{"description":"ResourceID is the ID of the resource that is being migrated.\nThis can be a VM ID, deployment ID, etc. depending on the type of the migration.","type":"string"},"resourceType":{"description":"ResourceType is the type of the resource that is being migrated.\n\nPossible values:\n- vm\n- deployment","type":"string"},"status":{"description":"Status is the status of the resource migration.\nWhen this field is set to 'accepted', the migration will take place and then automatically be deleted.","type":"string"},"type":{"description":"Type is the type of the resource migration.\n\nPossible values:\n- updateOwner","type":"string"},"updateOwner":{"description":"UpdateOwner is the set of parameters that are required for the updateOwner migration type.\nIt is empty if the migration type is not updateOwner.","properties":{"ownerId":{"type":"string"}},"type":"object"},"userId":{"description":"UserID is the ID of the user who initiated the migration.","type":"string"}},"type":"object"},"body.ResourceMigrationUpdate":{"properties":{"code":{"description":"Code is a token required when accepting a migration if the acceptor is not an admin.\nIt is sent to the acceptor using the notification API","type":"string"},"status":{"description":"Status is the status of the resource migration.\nIt is used to accept a migration by setting the status to 'accepted'.\nIf the acceptor is not an admin, a Code must be provided.\n\nPossible values:\n- accepted\n- pending","type":"string"}},"required":["status"],"type":"object"},"body.ResourceMigrationUpdated":{"properties":{"createdAt":{"type":"string"},"deletedAt":{"type":"string"},"id":{"type":"string"},"jobId":{"description":"JobID is the ID of the job that was created for the resource migration.\nIt will only be set if the migration was updated with status 'accepted'.","type":"string"},"resourceId":{"description":"ResourceID is the ID of the resource that is being migrated.\nThis can be a VM ID, deployment ID, etc. depending on the type of the migration.","type":"string"},"resourceType":{"description":"ResourceType is the type of the resource that is being migrated.\n\nPossible values:\n- vm\n- deployment","type":"string"},"status":{"description":"Status is the status of the resource migration.\nWhen this field is set to 'accepted', the migration will take place and then automatically be deleted.","type":"string"},"type":{"description":"Type is the type of the resource migration.\n\nPossible values:\n- updateOwner","type":"string"},"updateOwner":{"description":"UpdateOwner is the set of parameters that are required for the updateOwner migration type.\nIt is empty if the migration type is not updateOwner.","properties":{"ownerId":{"type":"string"}},"type":"object"},"userId":{"description":"UserID is the ID of the user who initiated the migration.","type":"string"}},"type":"object"},"body.Role":{"properties":{"description":{"type":"string"},"name":{"type":"string"},"permissions":{"items":{"type":"string"},"type":"array","uniqueItems":false},"quota":{"$ref":"#/components/schemas/body.Quota"}},"type":"object"},"body.SmDeleted":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.SmRead":{"properties":{"createdAt":{"type":"string"},"id":{"type":"string"},"ownerId":{"type":"string"},"url":{"type":"string"},"zone":{"type":"string"}},"type":"object"},"body.SystemCapacities":{"properties":{"clusters":{"description":"Per Cluster","items":{"$ref":"#/components/schemas/body.ClusterCapacities"},"type":"array","uniqueItems":false},"cpuCore":{"$ref":"#/components/schemas/body.CpuCoreCapacities"},"gpu":{"$ref":"#/components/schemas/body.GpuCapacities"},"hosts":{"description":"Per Host","items":{"$ref":"#/components/schemas/body.HostCapacities"},"type":"array","uniqueItems":false},"ram":{"$ref":"#/components/schemas/body.RamCapacities"}},"type":"object"},"body.SystemStats":{"properties":{"k8s":{"$ref":"#/components/schemas/body.K8sStats"}},"type":"object"},"body.SystemStatus":{"properties":{"hosts":{"items":{"$ref":"#/components/schemas/body.HostStatus"},"type":"array","uniqueItems":false}},"type":"object"},"body.TeamCreate":{"properties":{"description":{"maxLength":1000,"type":"string"},"members":{"items":{"$ref":"#/components/schemas/body.TeamMemberCreate"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"name":{"maxLength":100,"minLength":1,"type":"string"},"resources":{"items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false}},"required":["name"],"type":"object"},"body.TeamMember":{"properties":{"addedAt":{"type":"string"},"email":{"type":"string"},"firstName":{"type":"string"},"gravatarUrl":{"type":"string"},"id":{"type":"string"},"joinedAt":{"type":"string"},"lastName":{"type":"string"},"memberStatus":{"type":"string"},"teamRole":{"type":"string"},"username":{"type":"string"}},"type":"object"},"body.TeamMemberCreate":{"properties":{"id":{"type":"string"},"teamRole":{"description":"default to MemberRoleAdmin right now","type":"string"}},"required":["id"],"type":"object"},"body.TeamMemberUpdate":{"properties":{"id":{"type":"string"},"teamRole":{"description":"default to MemberRoleAdmin right now","type":"string"}},"required":["id"],"type":"object"},"body.TeamRead":{"properties":{"createdAt":{"type":"string"},"description":{"type":"string"},"id":{"type":"string"},"members":{"items":{"$ref":"#/components/schemas/body.TeamMember"},"type":"array","uniqueItems":false},"name":{"type":"string"},"ownerId":{"type":"string"},"resources":{"items":{"$ref":"#/components/schemas/body.TeamResource"},"type":"array","uniqueItems":false},"updatedAt":{"type":"string"}},"type":"object"},"body.TeamResource":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"type":"object"},"body.TeamUpdate":{"properties":{"description":{"maxLength":1000,"type":"string"},"members":{"items":{"$ref":"#/components/schemas/body.TeamMemberUpdate"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"name":{"maxLength":100,"minLength":1,"type":"string"},"resources":{"items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false}},"type":"object"},"body.TimestampedSystemCapacities":{"properties":{"capacities":{"$ref":"#/components/schemas/body.SystemCapacities"},"timestamp":{"type":"string"}},"type":"object"},"body.TimestampedSystemStats":{"properties":{"stats":{"$ref":"#/components/schemas/body.SystemStats"},"timestamp":{"type":"string"}},"type":"object"},"body.TimestampedSystemStatus":{"properties":{"status":{"$ref":"#/components/schemas/body.SystemStatus"},"timestamp":{"type":"string"}},"type":"object"},"body.Usage":{"properties":{"cpuCores":{"type":"number"},"diskSize":{"type":"integer"},"ram":{"type":"number"}},"type":"object"},"body.UserData":{"properties":{"key":{"maxLength":255,"minLength":1,"type":"string"},"value":{"maxLength":255,"minLength":1,"type":"string"}},"required":["key","value"],"type":"object"},"body.UserRead":{"properties":{"admin":{"type":"boolean"},"apiKeys":{"items":{"$ref":"#/components/schemas/body.ApiKey"},"type":"array","uniqueItems":false},"email":{"type":"string"},"firstName":{"type":"string"},"gravatarUrl":{"type":"string"},"id":{"type":"string"},"lastName":{"type":"string"},"publicKeys":{"items":{"$ref":"#/components/schemas/body.PublicKey"},"type":"array","uniqueItems":false},"quota":{"$ref":"#/components/schemas/body.Quota"},"role":{"$ref":"#/components/schemas/body.Role"},"storageUrl":{"type":"string"},"usage":{"$ref":"#/components/schemas/body.Usage"},"userData":{"items":{"$ref":"#/components/schemas/body.UserData"},"type":"array","uniqueItems":false},"username":{"type":"string"}},"type":"object"},"body.UserUpdate":{"properties":{"apiKeys":{"description":"ApiKeys specifies the API keys that should remain. If an API key is not in this list, it will be deleted.\nHowever, API keys cannot be created, use /apiKeys endpoint to create new API keys.","items":{"$ref":"#/components/schemas/body.ApiKey"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"publicKeys":{"items":{"$ref":"#/components/schemas/body.PublicKey"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"userData":{"items":{"$ref":"#/components/schemas/body.UserData"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false}},"type":"object"},"body.VmActionCreate":{"properties":{"action":{"enum":["start","stop","restart","repair"],"type":"string"}},"required":["action"],"type":"object"},"body.VmActionCreated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.VmCreate":{"properties":{"cpuCores":{"minimum":1,"type":"integer"},"diskSize":{"minimum":10,"type":"integer"},"name":{"maxLength":30,"minLength":3,"type":"string"},"neverStale":{"type":"boolean"},"ports":{"items":{"$ref":"#/components/schemas/body.PortCreate"},"maxItems":10,"minItems":0,"type":"array","uniqueItems":false},"ram":{"minimum":1,"type":"integer"},"sshPublicKey":{"type":"string"},"zone":{"type":"string"}},"required":["cpuCores","diskSize","name","ram","sshPublicKey"],"type":"object"},"body.VmCreated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.VmDeleted":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.VmGpuLease":{"properties":{"activatedAt":{"description":"ActivatedAt specifies the time when the lease was activated. This is the time the user first attached the GPU\nor 1 day after the lease was created if the user did not attach the GPU.","type":"string"},"assignedAt":{"description":"AssignedAt specifies the time when the lease was assigned to the user.","type":"string"},"createdAt":{"type":"string"},"expiredAt":{"description":"ExpiredAt specifies the time when the lease expired.\nThis is only present if the lease is expired.","type":"string"},"expiresAt":{"description":"ExpiresAt specifies the time when the lease will expire.\nThis is only present if the lease is active.","type":"string"},"gpuGroupId":{"type":"string"},"id":{"type":"string"},"leaseDuration":{"type":"number"}},"type":"object"},"body.VmRead":{"properties":{"accessedAt":{"type":"string"},"createdAt":{"type":"string"},"gpu":{"$ref":"#/components/schemas/body.VmGpuLease"},"host":{"type":"string"},"id":{"type":"string"},"internalName":{"type":"string"},"name":{"type":"string"},"neverStale":{"type":"boolean"},"ownerId":{"type":"string"},"ports":{"items":{"$ref":"#/components/schemas/body.PortRead"},"type":"array","uniqueItems":false},"repairedAt":{"type":"string"},"specs":{"$ref":"#/components/schemas/body.VmSpecs"},"sshConnectionString":{"type":"string"},"sshPublicKey":{"type":"string"},"status":{"type":"string"},"teams":{"items":{"type":"string"},"type":"array","uniqueItems":false},"updatedAt":{"type":"string"},"zone":{"type":"string"}},"type":"object"},"body.VmSnapshotCreated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.VmSnapshotDeleted":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.VmSnapshotRead":{"properties":{"created":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"}},"type":"object"},"body.VmSpecs":{"properties":{"cpuCores":{"type":"integer"},"diskSize":{"type":"integer"},"ram":{"type":"integer"}},"type":"object"},"body.VmUpdate":{"properties":{"cpuCores":{"minimum":1,"type":"integer"},"name":{"maxLength":30,"minLength":3,"type":"string"},"neverStale":{"type":"boolean"},"ports":{"items":{"$ref":"#/components/schemas/body.PortUpdate"},"maxItems":10,"minItems":0,"type":"array","uniqueItems":false},"ram":{"minimum":1,"type":"integer"}},"type":"object"},"body.VmUpdated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.Volume":{"properties":{"appPath":{"maxLength":255,"minLength":1,"type":"string"},"name":{"maxLength":30,"minLength":3,"type":"string"},"serverPath":{"maxLength":255,"minLength":1,"type":"string"}},"required":["appPath","name","serverPath"],"type":"object"},"body.WorkerStatusRead":{"properties":{"name":{"type":"string"},"reportedAt":{"type":"string"},"status":{"type":"string"}},"type":"object"},"body.ZoneEndpoints":{"properties":{"deployment":{"type":"string"},"storage":{"type":"string"},"vm":{"type":"string"},"vmApp":{"type":"string"}},"type":"object"},"body.ZoneRead":{"properties":{"capabilities":{"items":{"type":"string"},"type":"array","uniqueItems":false},"description":{"type":"string"},"enabled":{"type":"boolean"},"endpoints":{"$ref":"#/components/schemas/body.ZoneEndpoints"},"legacy":{"type":"boolean"},"name":{"type":"string"}},"type":"object"},"sys.Error":{"properties":{"code":{"type":"string"},"msg":{"type":"string"}},"type":"object"},"sys.ErrorResponse":{"properties":{"errors":{"items":{"$ref":"#/components/schemas/sys.Error"},"type":"array","uniqueItems":false}},"type":"object"}},"securitySchemes":{"ApiKeyAuth":{"in":"header","name":"X-Api-Key","type":"apiKey"},"KeycloakOAuth":{"flows":{"authorizationCode":{"authorizationUrl":"https://iam.cloud.cbh.kth.se/realms/cloud/protocol/openid-connect/auth","tokenUrl":"https://iam.cloud.cbh.kth.se/realms/cloud/protocol/openid-connect/token"}},"in":"header","type":"oauth2"}}}, "info": {"contact":{"name":"Support","url":"https://github.com/kthcloud/go-deploy"},"description":"{{escape .Description}}","license":{"name":"MIT License","url":"https://github.com/kthcloud/go-deploy?tab=MIT-1-ov-file#readme"},"termsOfService":"http://swagger.io/terms/","title":"{{.Title}}","version":"{{.Version}}"}, "externalDocs": {"description":"","url":""}, - "paths": {"/v2/deployments":{"get":{"description":"List deployments","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Filter by user ID","in":"query","name":"userId","schema":{"type":"string"}},{"description":"Include shared","in":"query","name":"shared","schema":{"type":"boolean"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.DeploymentRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List deployments","tags":["Deployment"]},"post":{"description":"Create deployment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentCreate"}}},"description":"Deployment body","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create deployment","tags":["Deployment"]}},"/v2/deployments/{deploymentId}":{"delete":{"description":"Delete deployment","parameters":[{"description":"Deployment ID","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete deployment","tags":["Deployment"]},"get":{"description":"Get deployment","parameters":[{"description":"Deployment ID","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get deployment","tags":["Deployment"]},"post":{"description":"Update deployment","parameters":[{"description":"Deployment ID","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentUpdate"}}},"description":"Deployment update","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentUpdated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update deployment","tags":["Deployment"]}},"/v2/deployments/{deploymentId}/ciConfig":{"get":{"description":"Get CI config","parameters":[{"description":"Deployment ID","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.CiConfig"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get CI config","tags":["Deployment"]}},"/v2/deployments/{deploymentId}/command":{"post":{"description":"Do command","parameters":[{"description":"Deployment ID","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentCommand"}}},"description":"Command body","required":true},"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"423":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Locked"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Do command","tags":["Deployment"]}},"/v2/deployments/{deploymentId}/logs":{"get":{"description":"Get logs using Server-Sent Events","parameters":[{"description":"Deployment ID","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get logs using Server-Sent Events","tags":["Deployment"]}},"/v2/discover":{"get":{"description":"Discover","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DiscoverRead"}}},"description":"OK"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Discover","tags":["Discover"]}},"/v2/gpuGroups":{"get":{"description":"List GPU groups","parameters":[{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.GpuGroupRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"423":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Locked"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List GPU groups","tags":["GpuGroup"]}},"/v2/gpuGroups/{gpuGroupId}":{"get":{"description":"Get GPU group","parameters":[{"description":"GPU group ID","in":"path","name":"gpuGroupId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuGroupRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"423":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Locked"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get GPU group","tags":["GpuGroup"]}},"/v2/gpuLeases":{"get":{"description":"List GPU leases","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Filter by VM ID","in":"query","name":"vmId","schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.GpuLeaseRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"423":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Locked"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List GPU leases","tags":["GpuLease"]},"post":{"description":"Create GPU lease","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuLeaseCreate"}}},"description":"GPU lease","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuLeaseCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create GPU Lease","tags":["GpuLease"]}},"/v2/gpuLeases/{gpuLeaseId}":{"delete":{"description":"Delete GPU lease","parameters":[{"description":"GPU lease ID","in":"path","name":"gpuLeaseId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuLeaseDeleted"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete GPU lease","tags":["GpuLease"]},"get":{"description":"Get GPU lease","parameters":[{"description":"GPU lease ID","in":"path","name":"gpuLeaseId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuLeaseRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"423":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Locked"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get GPU lease","tags":["GpuLease"]},"post":{"description":"Update GPU lease","parameters":[{"description":"GPU lease ID","in":"path","name":"gpuLeaseId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuLeaseUpdate"}}},"description":"GPU lease","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuLeaseUpdated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update GPU lease","tags":["GpuLease"]}},"/v2/hooks/harbor":{"post":{"description":"Handle Harbor hook","parameters":[{"description":"Basic auth token","in":"header","name":"Authorization","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.HarborWebhook"}}},"description":"Harbor webhook body","required":true},"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Handle Harbor hook","tags":["Deployment"]}},"/v2/hosts":{"get":{"description":"List Hosts","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.HostRead"},"type":"array"}}},"description":"OK"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List Hosts","tags":["Host"]}},"/v2/jobs":{"get":{"description":"List jobs","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Filter by user ID","in":"query","name":"userId","schema":{"type":"string"}},{"description":"Filter by type","in":"query","name":"type","schema":{"type":"string"}},{"description":"Filter by status","in":"query","name":"status","schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.JobRead"},"type":"array"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List jobs","tags":["Job"]}},"/v2/jobs/{jobId}":{"get":{"description":"GetJob job by id","parameters":[{"description":"Job ID","in":"path","name":"jobId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.JobRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"GetJob job by id","tags":["Job"]},"post":{"description":"Update job. Only allowed for admins.","parameters":[{"description":"Job ID","in":"path","name":"jobId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.JobUpdate"}}},"description":"Job update","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.JobRead"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update job","tags":["Job"]}},"/v2/metrics":{"get":{"description":"Get metrics","responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"OK"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Get metrics","tags":["Metrics"]}},"/v2/notifications":{"get":{"description":"List notifications","parameters":[{"description":"List all notifications","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Filter by user ID","in":"query","name":"userId","schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.NotificationRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List notifications","tags":["Notification"]}},"/v2/notifications/{notificationId}":{"delete":{"description":"Delete notification","parameters":[{"description":"Notification ID","in":"path","name":"notificationId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete notification","tags":["Notification"]},"get":{"description":"Get notification","parameters":[{"description":"Notification ID","in":"path","name":"notificationId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.NotificationRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get notification","tags":["Notification"]},"post":{"description":"Update notification","parameters":[{"description":"Notification ID","in":"path","name":"notificationId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.NotificationUpdate"}}},"description":"Notification update","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update notification","tags":["Notification"]}},"/v2/register":{"get":{"description":"Register resource","responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Register resource","tags":["Register"]}},"/v2/resourceMigrations":{"get":{"description":"List resource migrations","parameters":[{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.ResourceMigrationRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List resource migrations","tags":["ResourceMigration"]},"post":{"description":"Create resource migration","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ResourceMigrationCreate"}}},"description":"Resource Migration Create","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ResourceMigrationCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create resource migration","tags":["ResourceMigration"]}},"/v2/resourceMigrations/{resourceMigrationId}":{"delete":{"description":"Delete resource migration","parameters":[{"description":"Resource Migration ID","in":"path","name":"resourceMigrationId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete resource migration","tags":["ResourceMigration"]},"get":{"description":"Get resource migration","parameters":[{"description":"Resource Migration ID","in":"path","name":"resourceMigrationId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ResourceMigrationRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get resource migration","tags":["ResourceMigration"]},"post":{"description":"Update resource migration","parameters":[{"description":"Resource Migration ID","in":"path","name":"resourceMigrationId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ResourceMigrationUpdate"}}},"description":"Resource Migration Update","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ResourceMigrationUpdated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update resource migration","tags":["ResourceMigration"]}},"/v2/snapshots":{"get":{"description":"List snapshots","parameters":[{"description":"Filter by VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.VmSnapshotRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"423":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Locked"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List snapshots","tags":["Snapshot"]},"post":{"description":"Create snapshot","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmSnapshotCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create snapshot","tags":["Snapshot"]}},"/v2/storageManagers":{"get":{"description":"Get storage manager list","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.SmRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get storage manager list","tags":["StorageManager"]}},"/v2/storageManagers/{storageManagerId}":{"delete":{"description":"Delete storage manager","parameters":[{"description":"Storage manager ID","in":"path","name":"storageManagerId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.SmDeleted"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete storage manager","tags":["StorageManager"]},"get":{"description":"Get storage manager","parameters":[{"description":"Storage manager ID","in":"path","name":"storageManagerId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.SmDeleted"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get storage manager","tags":["StorageManager"]}},"/v2/systemCapacities":{"get":{"description":"List system capacities","parameters":[{"description":"n","in":"query","name":"n","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.TimestampedSystemCapacities"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List system capacities","tags":["System"]}},"/v2/systemStats":{"get":{"description":"List system stats","parameters":[{"description":"n","in":"query","name":"n","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.TimestampedSystemStats"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List system stats","tags":["System"]}},"/v2/systemStatus":{"get":{"description":"List system stats","parameters":[{"description":"n","in":"query","name":"n","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.TimestampedSystemStatus"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List system stats","tags":["System"]}},"/v2/teams":{"get":{"description":"List teams","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Filter by user ID","in":"query","name":"userId","schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.TeamRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List teams","tags":["Team"]},"post":{"description":"Create team","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.TeamCreate"}}},"description":"Team","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.TeamRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create team","tags":["Team"]}},"/v2/teams/{teamId}":{"delete":{"description":"Delete team","parameters":[{"description":"Team ID","in":"path","name":"teamId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete team","tags":["Team"]},"get":{"description":"Get team","parameters":[{"description":"Team ID","in":"path","name":"teamId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.TeamRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get team","tags":["Team"]},"post":{"description":"Update team","parameters":[{"description":"Team ID","in":"path","name":"teamId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.TeamUpdate"}}},"description":"Team","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.TeamRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update team","tags":["Team"]}},"/v2/users":{"get":{"description":"List users","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Discovery mode","in":"query","name":"discover","schema":{"type":"boolean"}},{"description":"Search query","in":"query","name":"search","schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.UserRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List users","tags":["User"]}},"/v2/users/{userId}":{"get":{"description":"Get user","parameters":[{"description":"User ID","in":"path","name":"userId","required":true,"schema":{"type":"string"}},{"description":"Discovery mode","in":"query","name":"discover","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.UserRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get user","tags":["User"]},"post":{"description":"Update user","parameters":[{"description":"User ID","in":"path","name":"userId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.UserUpdate"}}},"description":"User update","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.UserRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update user","tags":["User"]}},"/v2/users/{userId}/apiKeys":{"post":{"description":"Create API key","parameters":[{"description":"User ID","in":"path","name":"userId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ApiKeyCreate"}}},"description":"API key create body","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ApiKeyCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create API key","tags":["User"]}},"/v2/vmActions":{"post":{"description":"Creates a new action","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmActionCreate"}}},"description":"actions body","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmActionCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Creates a new action","tags":["VmAction"]}},"/v2/vms":{"get":{"description":"List VMs","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Filter by user ID","in":"query","name":"userId","schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.VmRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List VMs","tags":["VM"]},"post":{"description":"Create VM","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmCreate"}}},"description":"VM body","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create VM","tags":["VM"]}},"/v2/vms/{vmId}":{"delete":{"description":"Delete VM","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmDeleted"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete VM","tags":["VM"]},"get":{"description":"Get VM","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get VM","tags":["VM"]},"post":{"description":"Update VM","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmUpdate"}}},"description":"VM update","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmUpdated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update VM","tags":["VM"]}},"/v2/vms/{vmId}/snapshot/{snapshotId}":{"delete":{"description":"Delete snapshot","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}},{"description":"Snapshot ID","in":"path","name":"snapshotId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmSnapshotDeleted"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete snapshot","tags":["Snapshot"]},"post":{"description":"Get snapshot","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}},{"description":"Snapshot ID","in":"path","name":"snapshotId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmSnapshotRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get snapshot","tags":["Snapshot"]}},"/v2/workerStatus":{"get":{"description":"List of worker status","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.WorkerStatusRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List worker status","tags":["Status"]}},"/v2/zones":{"get":{"description":"List zones","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.ZoneRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List zones","tags":["Zone"]}}}, + "paths": {"/v2/deployments":{"get":{"description":"List deployments","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Filter by user ID","in":"query","name":"userId","schema":{"type":"string"}},{"description":"Include shared","in":"query","name":"shared","schema":{"type":"boolean"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.DeploymentRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List deployments","tags":["Deployment"]},"post":{"description":"Create deployment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentCreate"}}},"description":"Deployment body","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create deployment","tags":["Deployment"]}},"/v2/deployments/{deploymentId}":{"delete":{"description":"Delete deployment","parameters":[{"description":"Deployment ID","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete deployment","tags":["Deployment"]},"get":{"description":"Get deployment","parameters":[{"description":"Deployment ID","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get deployment","tags":["Deployment"]},"post":{"description":"Update deployment","parameters":[{"description":"Deployment ID","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentUpdate"}}},"description":"Deployment update","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentUpdated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update deployment","tags":["Deployment"]}},"/v2/deployments/{deploymentId}/ciConfig":{"get":{"description":"Get CI config","parameters":[{"description":"Deployment ID","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.CiConfig"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get CI config","tags":["Deployment"]}},"/v2/deployments/{deploymentId}/command":{"post":{"description":"Do command","parameters":[{"description":"Deployment ID","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentCommand"}}},"description":"Command body","required":true},"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"423":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Locked"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Do command","tags":["Deployment"]}},"/v2/deployments/{deploymentId}/logs":{"get":{"description":"Get logs using Server-Sent Events","parameters":[{"description":"Deployment ID","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get logs using Server-Sent Events","tags":["Deployment"]}},"/v2/discover":{"get":{"description":"Discover","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DiscoverRead"}}},"description":"OK"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Discover","tags":["Discover"]}},"/v2/gpuGroups":{"get":{"description":"List GPU groups","parameters":[{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.GpuGroupRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"423":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Locked"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List GPU groups","tags":["GpuGroup"]}},"/v2/gpuGroups/{gpuGroupId}":{"get":{"description":"Get GPU group","parameters":[{"description":"GPU group ID","in":"path","name":"gpuGroupId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuGroupRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"423":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Locked"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get GPU group","tags":["GpuGroup"]}},"/v2/gpuLeases":{"get":{"description":"List GPU leases","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Filter by VM ID","in":"query","name":"vmId","schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.GpuLeaseRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"423":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Locked"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List GPU leases","tags":["GpuLease"]},"post":{"description":"Create GPU lease","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuLeaseCreate"}}},"description":"GPU lease","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuLeaseCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create GPU Lease","tags":["GpuLease"]}},"/v2/gpuLeases/{gpuLeaseId}":{"delete":{"description":"Delete GPU lease","parameters":[{"description":"GPU lease ID","in":"path","name":"gpuLeaseId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuLeaseDeleted"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete GPU lease","tags":["GpuLease"]},"get":{"description":"Get GPU lease","parameters":[{"description":"GPU lease ID","in":"path","name":"gpuLeaseId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuLeaseRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"423":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Locked"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get GPU lease","tags":["GpuLease"]},"post":{"description":"Update GPU lease","parameters":[{"description":"GPU lease ID","in":"path","name":"gpuLeaseId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuLeaseUpdate"}}},"description":"GPU lease","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuLeaseUpdated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update GPU lease","tags":["GpuLease"]}},"/v2/hooks/harbor":{"post":{"description":"Handle Harbor hook","parameters":[{"description":"Basic auth token","in":"header","name":"Authorization","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.HarborWebhook"}}},"description":"Harbor webhook body","required":true},"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Handle Harbor hook","tags":["Deployment"]}},"/v2/hosts":{"get":{"description":"List Hosts","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.HostRead"},"type":"array"}}},"description":"OK"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List Hosts","tags":["Host"]}},"/v2/jobs":{"get":{"description":"List jobs","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Filter by user ID","in":"query","name":"userId","schema":{"type":"string"}},{"description":"Filter by type","in":"query","name":"type","schema":{"type":"string"}},{"description":"Filter by status","in":"query","name":"status","schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.JobRead"},"type":"array"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List jobs","tags":["Job"]}},"/v2/jobs/{jobId}":{"get":{"description":"GetJob job by id","parameters":[{"description":"Job ID","in":"path","name":"jobId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.JobRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"GetJob job by id","tags":["Job"]},"post":{"description":"Update job. Only allowed for admins.","parameters":[{"description":"Job ID","in":"path","name":"jobId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.JobUpdate"}}},"description":"Job update","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.JobRead"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update job","tags":["Job"]}},"/v2/metrics":{"get":{"description":"Get metrics","responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"OK"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Get metrics","tags":["Metrics"]}},"/v2/notifications":{"get":{"description":"List notifications","parameters":[{"description":"List all notifications","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Filter by user ID","in":"query","name":"userId","schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.NotificationRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List notifications","tags":["Notification"]}},"/v2/notifications/{notificationId}":{"delete":{"description":"Delete notification","parameters":[{"description":"Notification ID","in":"path","name":"notificationId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete notification","tags":["Notification"]},"get":{"description":"Get notification","parameters":[{"description":"Notification ID","in":"path","name":"notificationId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.NotificationRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get notification","tags":["Notification"]},"post":{"description":"Update notification","parameters":[{"description":"Notification ID","in":"path","name":"notificationId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.NotificationUpdate"}}},"description":"Notification update","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update notification","tags":["Notification"]}},"/v2/register":{"get":{"description":"Register resource","responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Register resource","tags":["Register"]}},"/v2/resourceMigrations":{"get":{"description":"List resource migrations","parameters":[{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.ResourceMigrationRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List resource migrations","tags":["ResourceMigration"]},"post":{"description":"Create resource migration","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ResourceMigrationCreate"}}},"description":"Resource Migration Create","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ResourceMigrationCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create resource migration","tags":["ResourceMigration"]}},"/v2/resourceMigrations/{resourceMigrationId}":{"delete":{"description":"Delete resource migration","parameters":[{"description":"Resource Migration ID","in":"path","name":"resourceMigrationId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete resource migration","tags":["ResourceMigration"]},"get":{"description":"Get resource migration","parameters":[{"description":"Resource Migration ID","in":"path","name":"resourceMigrationId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ResourceMigrationRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get resource migration","tags":["ResourceMigration"]},"post":{"description":"Update resource migration","parameters":[{"description":"Resource Migration ID","in":"path","name":"resourceMigrationId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ResourceMigrationUpdate"}}},"description":"Resource Migration Update","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ResourceMigrationUpdated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update resource migration","tags":["ResourceMigration"]}},"/v2/snapshots":{"get":{"description":"List snapshots","parameters":[{"description":"Filter by VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.VmSnapshotRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"423":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Locked"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List snapshots","tags":["Snapshot"]},"post":{"description":"Create snapshot","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmSnapshotCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create snapshot","tags":["Snapshot"]}},"/v2/storageManagers":{"get":{"description":"Get storage manager list","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.SmRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get storage manager list","tags":["StorageManager"]}},"/v2/storageManagers/{storageManagerId}":{"delete":{"description":"Delete storage manager","parameters":[{"description":"Storage manager ID","in":"path","name":"storageManagerId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.SmDeleted"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete storage manager","tags":["StorageManager"]},"get":{"description":"Get storage manager","parameters":[{"description":"Storage manager ID","in":"path","name":"storageManagerId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.SmDeleted"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get storage manager","tags":["StorageManager"]}},"/v2/systemCapacities":{"get":{"description":"List system capacities","parameters":[{"description":"n","in":"query","name":"n","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.TimestampedSystemCapacities"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List system capacities","tags":["System"]}},"/v2/systemStats":{"get":{"description":"List system stats","parameters":[{"description":"n","in":"query","name":"n","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.TimestampedSystemStats"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List system stats","tags":["System"]}},"/v2/systemStatus":{"get":{"description":"List system stats","parameters":[{"description":"n","in":"query","name":"n","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.TimestampedSystemStatus"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List system stats","tags":["System"]}},"/v2/teams":{"get":{"description":"List teams","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Filter by user ID","in":"query","name":"userId","schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.TeamRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List teams","tags":["Team"]},"post":{"description":"Create team","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.TeamCreate"}}},"description":"Team","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.TeamRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create team","tags":["Team"]}},"/v2/teams/{teamId}":{"delete":{"description":"Delete team","parameters":[{"description":"Team ID","in":"path","name":"teamId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete team","tags":["Team"]},"get":{"description":"Get team","parameters":[{"description":"Team ID","in":"path","name":"teamId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.TeamRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get team","tags":["Team"]},"post":{"description":"Update team","parameters":[{"description":"Team ID","in":"path","name":"teamId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.TeamUpdate"}}},"description":"Team","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.TeamRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update team","tags":["Team"]}},"/v2/users":{"get":{"description":"List users","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Discovery mode","in":"query","name":"discover","schema":{"type":"boolean"}},{"description":"Search query","in":"query","name":"search","schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.UserRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List users","tags":["User"]}},"/v2/users/{userId}":{"get":{"description":"Get user","parameters":[{"description":"User ID","in":"path","name":"userId","required":true,"schema":{"type":"string"}},{"description":"Discovery mode","in":"query","name":"discover","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.UserRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get user","tags":["User"]},"post":{"description":"Update user","parameters":[{"description":"User ID","in":"path","name":"userId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.UserUpdate"}}},"description":"User update","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.UserRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update user","tags":["User"]}},"/v2/users/{userId}/apiKeys":{"post":{"description":"Create API key","parameters":[{"description":"User ID","in":"path","name":"userId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ApiKeyCreate"}}},"description":"API key create body","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ApiKeyCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create API key","tags":["User"]}},"/v2/vmActions":{"post":{"description":"Creates a new action","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmActionCreate"}}},"description":"actions body","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmActionCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Creates a new action","tags":["VmAction"]}},"/v2/vms":{"get":{"description":"List VMs","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Filter by user ID","in":"query","name":"userId","schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.VmRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List VMs","tags":["VM"]},"post":{"description":"Create VM","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmCreate"}}},"description":"VM body","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create VM","tags":["VM"]}},"/v2/vms/{vmId}":{"delete":{"description":"Delete VM","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmDeleted"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete VM","tags":["VM"]},"get":{"description":"Get VM","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get VM","tags":["VM"]},"post":{"description":"Update VM","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmUpdate"}}},"description":"VM update","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmUpdated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update VM","tags":["VM"]}},"/v2/vms/{vmId}/snapshot/{snapshotId}":{"delete":{"description":"Delete snapshot","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}},{"description":"Snapshot ID","in":"path","name":"snapshotId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmSnapshotDeleted"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete snapshot","tags":["Snapshot"]},"post":{"description":"Get snapshot","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}},{"description":"Snapshot ID","in":"path","name":"snapshotId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmSnapshotRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get snapshot","tags":["Snapshot"]}},"/v2/workerStatus":{"get":{"description":"List of worker status","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.WorkerStatusRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List worker status","tags":["Status"]}},"/v2/zones":{"get":{"description":"List zones","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.ZoneRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List zones","tags":["Zone"]}}}, "openapi": "3.1.0" }` diff --git a/docs/api/v2/V2_swagger.json b/docs/api/v2/V2_swagger.json index c129f8b0..9f02b41e 100644 --- a/docs/api/v2/V2_swagger.json +++ b/docs/api/v2/V2_swagger.json @@ -1,7 +1,7 @@ { - "components": {"schemas":{"body.ApiKey":{"properties":{"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"name":{"type":"string"}},"type":"object"},"body.ApiKeyCreate":{"properties":{"expiresAt":{"type":"string"},"name":{"type":"string"}},"required":["expiresAt","name"],"type":"object"},"body.ApiKeyCreated":{"properties":{"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"}},"type":"object"},"body.BindingError":{"properties":{"validationErrors":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}},"type":"object"},"body.CiConfig":{"properties":{"config":{"type":"string"}},"type":"object"},"body.ClusterCapacities":{"properties":{"cluster":{"type":"string"},"cpuCore":{"$ref":"#/components/schemas/body.CpuCoreCapacities"},"gpu":{"$ref":"#/components/schemas/body.GpuCapacities"},"ram":{"$ref":"#/components/schemas/body.RamCapacities"}},"type":"object"},"body.ClusterStats":{"properties":{"cluster":{"type":"string"},"podCount":{"type":"integer"}},"type":"object"},"body.CpuCoreCapacities":{"description":"Total","properties":{"total":{"type":"integer"}},"type":"object"},"body.CpuStatus":{"properties":{"load":{"$ref":"#/components/schemas/body.CpuStatusLoad"},"temp":{"$ref":"#/components/schemas/body.CpuStatusTemp"}},"type":"object"},"body.CpuStatusLoad":{"properties":{"cores":{"items":{"type":"integer"},"type":"array","uniqueItems":false},"main":{"type":"number"},"max":{"type":"number"}},"type":"object"},"body.CpuStatusTemp":{"properties":{"cores":{"items":{"type":"integer"},"type":"array","uniqueItems":false},"main":{"type":"number"},"max":{"type":"number"}},"type":"object"},"body.CustomDomainRead":{"properties":{"domain":{"type":"string"},"secret":{"type":"string"},"status":{"type":"string"},"url":{"type":"string"}},"type":"object"},"body.DeploymentCommand":{"properties":{"command":{"enum":["restart"],"type":"string"}},"required":["command"],"type":"object"},"body.DeploymentCreate":{"properties":{"args":{"items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"cpuCores":{"type":"number"},"customDomain":{"description":"CustomDomain is the domain that the deployment will be available on.\nThe max length is set to 243 to allow for a subdomain when confirming the domain.","type":"string"},"envs":{"items":{"$ref":"#/components/schemas/body.Env"},"maxItems":1000,"minItems":0,"type":"array","uniqueItems":false},"healthCheckPath":{"maxLength":1000,"minLength":0,"type":"string"},"image":{"maxLength":1000,"minLength":1,"type":"string"},"initCommands":{"items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"name":{"maxLength":30,"minLength":3,"type":"string"},"private":{"description":"Deprecated: Use Visibility instead.","type":"boolean"},"ram":{"type":"number"},"replicas":{"maximum":100,"minimum":0,"type":"integer"},"visibility":{"enum":["public","private","auth"],"type":"string"},"volumes":{"items":{"$ref":"#/components/schemas/body.Volume"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"zone":{"description":"Zone is the zone that the deployment will be created in.\nIf the zone is not set, the deployment will be created in the default zone.","type":"string"}},"required":["name"],"type":"object"},"body.DeploymentCreated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.DeploymentRead":{"properties":{"accessedAt":{"type":"string"},"args":{"items":{"type":"string"},"type":"array","uniqueItems":false},"createdAt":{"type":"string"},"customDomain":{"$ref":"#/components/schemas/body.CustomDomainRead"},"envs":{"items":{"$ref":"#/components/schemas/body.Env"},"type":"array","uniqueItems":false},"error":{"type":"string"},"healthCheckPath":{"type":"string"},"id":{"type":"string"},"image":{"type":"string"},"initCommands":{"items":{"type":"string"},"type":"array","uniqueItems":false},"integrations":{"description":"Integrations are currently not used, but could be used if we wanted to add a list of integrations to the deployment\n\nFor example GitHub","items":{"type":"string"},"type":"array","uniqueItems":false},"internalPort":{"type":"integer"},"name":{"type":"string"},"ownerId":{"type":"string"},"pingResult":{"type":"integer"},"private":{"description":"Deprecated: Use Visibility instead.","type":"boolean"},"repairedAt":{"type":"string"},"replicaStatus":{"$ref":"#/components/schemas/body.ReplicaStatus"},"restartedAt":{"type":"string"},"specs":{"$ref":"#/components/schemas/body.DeploymentSpecs"},"status":{"type":"string"},"storageUrl":{"type":"string"},"teams":{"items":{"type":"string"},"type":"array","uniqueItems":false},"type":{"type":"string"},"updatedAt":{"type":"string"},"url":{"type":"string"},"visibility":{"type":"string"},"volumes":{"items":{"$ref":"#/components/schemas/body.Volume"},"type":"array","uniqueItems":false},"zone":{"type":"string"}},"type":"object"},"body.DeploymentSpecs":{"properties":{"cpuCores":{"type":"number"},"ram":{"type":"number"},"replicas":{"type":"integer"}},"type":"object"},"body.DeploymentUpdate":{"properties":{"args":{"items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"cpuCores":{"type":"number"},"customDomain":{"description":"CustomDomain is the domain that the deployment will be available on.\nThe max length is set to 243 to allow for a subdomain when confirming the domain.","type":"string"},"envs":{"items":{"$ref":"#/components/schemas/body.Env"},"maxItems":1000,"minItems":0,"type":"array","uniqueItems":false},"healthCheckPath":{"maxLength":1000,"minLength":0,"type":"string"},"image":{"maxLength":1000,"minLength":1,"type":"string"},"initCommands":{"items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"name":{"maxLength":30,"minLength":3,"type":"string"},"private":{"description":"Deprecated: Use Visibility instead.","type":"boolean"},"ram":{"type":"number"},"replicas":{"maximum":100,"minimum":0,"type":"integer"},"visibility":{"enum":["public","private","auth"],"type":"string"},"volumes":{"items":{"$ref":"#/components/schemas/body.Volume"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false}},"required":["name"],"type":"object"},"body.DeploymentUpdated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.DiscoverRead":{"properties":{"roles":{"items":{"$ref":"#/components/schemas/body.Role"},"type":"array","uniqueItems":false},"version":{"type":"string"}},"type":"object"},"body.Env":{"properties":{"name":{"maxLength":100,"minLength":1,"type":"string"},"value":{"maxLength":10000,"minLength":1,"type":"string"}},"required":["name","value"],"type":"object"},"body.GpuCapacities":{"properties":{"total":{"type":"integer"}},"type":"object"},"body.GpuGroupRead":{"properties":{"available":{"type":"integer"},"displayName":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"total":{"type":"integer"},"vendor":{"type":"string"},"zone":{"type":"string"}},"type":"object"},"body.GpuLeaseCreate":{"properties":{"gpuGroupId":{"description":"GpuGroupID is used to specify the GPU to lease.\nAs such, the lease does not specify which specific GPU to lease, but rather the type of GPU to lease.","type":"string"},"leaseForever":{"description":"LeaseForever is used to specify whether the lease should be created forever.","type":"boolean"}},"required":["gpuGroupId"],"type":"object"},"body.GpuLeaseCreated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.GpuLeaseDeleted":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.GpuLeaseRead":{"properties":{"activatedAt":{"description":"ActivatedAt specifies the time when the lease was activated. This is the time the user first attached the GPU\nor 1 day after the lease was created if the user did not attach the GPU.","type":"string"},"active":{"type":"boolean"},"assignedAt":{"description":"AssignedAt specifies the time when the lease was assigned to the user.","type":"string"},"createdAt":{"type":"string"},"expiredAt":{"type":"string"},"expiresAt":{"description":"ExpiresAt specifies the time when the lease will expire.\nThis is only present if the lease is active.","type":"string"},"gpuGroupId":{"type":"string"},"id":{"type":"string"},"leaseDuration":{"type":"number"},"queuePosition":{"type":"integer"},"userId":{"type":"string"},"vmId":{"description":"VmID is set when the lease is attached to a VM.","type":"string"}},"type":"object"},"body.GpuLeaseUpdate":{"properties":{"vmId":{"description":"VmID is used to specify the VM to attach the lease to.\n\n- If specified, the lease will be attached to the VM.\n\n- If the lease is already attached to a VM, it will be detached from the current VM and attached to the new VM.\n\n- If the lease is not active, specifying a VM will activate the lease.\n\n- If the lease is not assigned, an error will be returned.","type":"string"}},"type":"object"},"body.GpuLeaseUpdated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.GpuStatus":{"properties":{"temp":{"items":{"$ref":"#/components/schemas/body.GpuStatusTemp"},"type":"array","uniqueItems":false}},"type":"object"},"body.GpuStatusTemp":{"properties":{"main":{"type":"number"}},"type":"object"},"body.HarborWebhook":{"properties":{"event_data":{"properties":{"repository":{"properties":{"date_created":{"type":"integer"},"name":{"type":"string"},"namespace":{"type":"string"},"repo_full_name":{"type":"string"},"repo_type":{"type":"string"}},"type":"object"},"resources":{"items":{"properties":{"digest":{"type":"string"},"resource_url":{"type":"string"},"tag":{"type":"string"}},"type":"object"},"type":"array","uniqueItems":false}},"type":"object"},"occur_at":{"type":"integer"},"operator":{"type":"string"},"type":{"type":"string"}},"type":"object"},"body.HostCapacities":{"properties":{"cpuCore":{"$ref":"#/components/schemas/body.CpuCoreCapacities"},"displayName":{"type":"string"},"gpu":{"$ref":"#/components/schemas/body.GpuCapacities"},"name":{"type":"string"},"ram":{"$ref":"#/components/schemas/body.RamCapacities"},"zone":{"description":"Zone is the name of the zone where the host is located.","type":"string"}},"type":"object"},"body.HostRead":{"properties":{"displayName":{"type":"string"},"name":{"type":"string"},"zone":{"description":"Zone is the name of the zone where the host is located.","type":"string"}},"type":"object"},"body.HostStatus":{"properties":{"cpu":{"$ref":"#/components/schemas/body.CpuStatus"},"displayName":{"type":"string"},"gpu":{"$ref":"#/components/schemas/body.GpuStatus"},"name":{"type":"string"},"ram":{"$ref":"#/components/schemas/body.RamStatus"},"zone":{"description":"Zone is the name of the zone where the host is located.","type":"string"}},"type":"object"},"body.HttpProxyCreate":{"properties":{"customDomain":{"description":"CustomDomain is the domain that the deployment will be available on.\nThe max length is set to 243 to allow for a subdomain when confirming the domain.","type":"string"},"name":{"maxLength":30,"minLength":3,"type":"string"}},"required":["name"],"type":"object"},"body.HttpProxyRead":{"properties":{"customDomain":{"$ref":"#/components/schemas/body.CustomDomainRead"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"body.HttpProxyUpdate":{"properties":{"customDomain":{"description":"CustomDomain is the domain that the deployment will be available on.\nThe max length is set to 243 to allow for a subdomain when confirming the domain.","type":"string"},"name":{"maxLength":30,"minLength":3,"type":"string"}},"required":["name"],"type":"object"},"body.JobRead":{"properties":{"createdAt":{"type":"string"},"finishedAt":{"type":"string"},"id":{"type":"string"},"lastError":{"type":"string"},"lastRunAt":{"type":"string"},"runAfter":{"type":"string"},"status":{"type":"string"},"type":{"type":"string"},"userId":{"type":"string"}},"type":"object"},"body.JobUpdate":{"properties":{"status":{"enum":["pending","running","failed","terminated","finished","completed"],"type":"string"}},"type":"object"},"body.K8sStats":{"properties":{"clusters":{"items":{"$ref":"#/components/schemas/body.ClusterStats"},"type":"array","uniqueItems":false},"podCount":{"type":"integer"}},"type":"object"},"body.NotificationRead":{"properties":{"completedAt":{"type":"string"},"content":{"additionalProperties":{},"type":"object"},"createdAt":{"type":"string"},"id":{"type":"string"},"readAt":{"type":"string"},"toastedAt":{"type":"string"},"type":{"type":"string"},"userId":{"type":"string"}},"type":"object"},"body.NotificationUpdate":{"properties":{"read":{"type":"boolean"},"toasted":{"type":"boolean"}},"type":"object"},"body.PortCreate":{"properties":{"httpProxy":{"$ref":"#/components/schemas/body.HttpProxyCreate"},"name":{"maxLength":100,"minLength":1,"type":"string"},"port":{"maximum":65535,"minimum":1,"type":"integer"},"protocol":{"enum":["tcp","udp"],"type":"string"}},"required":["name","port","protocol"],"type":"object"},"body.PortRead":{"properties":{"externalPort":{"type":"integer"},"httpProxy":{"$ref":"#/components/schemas/body.HttpProxyRead"},"name":{"type":"string"},"port":{"type":"integer"},"protocol":{"type":"string"}},"type":"object"},"body.PortUpdate":{"properties":{"httpProxy":{"$ref":"#/components/schemas/body.HttpProxyUpdate"},"name":{"maxLength":100,"minLength":1,"type":"string"},"port":{"maximum":65535,"minimum":1,"type":"integer"},"protocol":{"enum":["tcp","udp"],"type":"string"}},"required":["name","port","protocol"],"type":"object"},"body.PublicKey":{"properties":{"key":{"type":"string"},"name":{"maxLength":30,"minLength":1,"type":"string"}},"required":["key","name"],"type":"object"},"body.Quota":{"properties":{"cpuCores":{"type":"number"},"diskSize":{"type":"number"},"gpuLeaseDuration":{"description":"in hours","type":"number"},"ram":{"type":"number"},"snapshots":{"type":"integer"}},"type":"object"},"body.RamCapacities":{"properties":{"total":{"type":"integer"}},"type":"object"},"body.RamStatus":{"properties":{"load":{"$ref":"#/components/schemas/body.RamStatusLoad"}},"type":"object"},"body.RamStatusLoad":{"properties":{"main":{"type":"number"}},"type":"object"},"body.ReplicaStatus":{"properties":{"availableReplicas":{"description":"AvailableReplicas is the number of replicas that are available.","type":"integer"},"desiredReplicas":{"description":"DesiredReplicas is the number of replicas that the deployment should have.","type":"integer"},"readyReplicas":{"description":"ReadyReplicas is the number of replicas that are ready.","type":"integer"},"unavailableReplicas":{"description":"UnavailableReplicas is the number of replicas that are unavailable.","type":"integer"}},"type":"object"},"body.ResourceMigrationCreate":{"properties":{"resourceId":{"description":"ResourceID is the ID of the resource that is being migrated.\nThis can be a VM ID, deployment ID, etc. depending on the type of the migration.","type":"string"},"status":{"description":"Status is the status of the resource migration.\nIt is used by privileged admins to directly accept or reject a migration.\nThe field is ignored by non-admins.\n\nPossible values:\n- accepted\n- pending","type":"string"},"type":{"description":"Type is the type of the resource migration.\n\nPossible values:\n- updateOwner","enum":["updateOwner"],"type":"string"},"updateOwner":{"description":"UpdateOwner is the set of parameters that are required for the updateOwner migration type.\nIt is ignored if the migration type is not updateOwner.","properties":{"ownerId":{"type":"string"}},"required":["ownerId"],"type":"object"}},"required":["resourceId","type"],"type":"object"},"body.ResourceMigrationCreated":{"properties":{"createdAt":{"type":"string"},"deletedAt":{"type":"string"},"id":{"type":"string"},"jobId":{"description":"JobID is the ID of the job that was created for the resource migration.\nIt will only be set if the migration was created with status 'accepted'.","type":"string"},"resourceId":{"description":"ResourceID is the ID of the resource that is being migrated.\nThis can be a VM ID, deployment ID, etc. depending on the type of the migration.","type":"string"},"resourceType":{"description":"ResourceType is the type of the resource that is being migrated.\n\nPossible values:\n- vm\n- deployment","type":"string"},"status":{"description":"Status is the status of the resource migration.\nWhen this field is set to 'accepted', the migration will take place and then automatically be deleted.","type":"string"},"type":{"description":"Type is the type of the resource migration.\n\nPossible values:\n- updateOwner","type":"string"},"updateOwner":{"description":"UpdateOwner is the set of parameters that are required for the updateOwner migration type.\nIt is empty if the migration type is not updateOwner.","properties":{"ownerId":{"type":"string"}},"type":"object"},"userId":{"description":"UserID is the ID of the user who initiated the migration.","type":"string"}},"type":"object"},"body.ResourceMigrationRead":{"properties":{"createdAt":{"type":"string"},"deletedAt":{"type":"string"},"id":{"type":"string"},"resourceId":{"description":"ResourceID is the ID of the resource that is being migrated.\nThis can be a VM ID, deployment ID, etc. depending on the type of the migration.","type":"string"},"resourceType":{"description":"ResourceType is the type of the resource that is being migrated.\n\nPossible values:\n- vm\n- deployment","type":"string"},"status":{"description":"Status is the status of the resource migration.\nWhen this field is set to 'accepted', the migration will take place and then automatically be deleted.","type":"string"},"type":{"description":"Type is the type of the resource migration.\n\nPossible values:\n- updateOwner","type":"string"},"updateOwner":{"description":"UpdateOwner is the set of parameters that are required for the updateOwner migration type.\nIt is empty if the migration type is not updateOwner.","properties":{"ownerId":{"type":"string"}},"type":"object"},"userId":{"description":"UserID is the ID of the user who initiated the migration.","type":"string"}},"type":"object"},"body.ResourceMigrationUpdate":{"properties":{"code":{"description":"Code is a token required when accepting a migration if the acceptor is not an admin.\nIt is sent to the acceptor using the notification API","type":"string"},"status":{"description":"Status is the status of the resource migration.\nIt is used to accept a migration by setting the status to 'accepted'.\nIf the acceptor is not an admin, a Code must be provided.\n\nPossible values:\n- accepted\n- pending","type":"string"}},"required":["status"],"type":"object"},"body.ResourceMigrationUpdated":{"properties":{"createdAt":{"type":"string"},"deletedAt":{"type":"string"},"id":{"type":"string"},"jobId":{"description":"JobID is the ID of the job that was created for the resource migration.\nIt will only be set if the migration was updated with status 'accepted'.","type":"string"},"resourceId":{"description":"ResourceID is the ID of the resource that is being migrated.\nThis can be a VM ID, deployment ID, etc. depending on the type of the migration.","type":"string"},"resourceType":{"description":"ResourceType is the type of the resource that is being migrated.\n\nPossible values:\n- vm\n- deployment","type":"string"},"status":{"description":"Status is the status of the resource migration.\nWhen this field is set to 'accepted', the migration will take place and then automatically be deleted.","type":"string"},"type":{"description":"Type is the type of the resource migration.\n\nPossible values:\n- updateOwner","type":"string"},"updateOwner":{"description":"UpdateOwner is the set of parameters that are required for the updateOwner migration type.\nIt is empty if the migration type is not updateOwner.","properties":{"ownerId":{"type":"string"}},"type":"object"},"userId":{"description":"UserID is the ID of the user who initiated the migration.","type":"string"}},"type":"object"},"body.Role":{"properties":{"description":{"type":"string"},"name":{"type":"string"},"permissions":{"items":{"type":"string"},"type":"array","uniqueItems":false},"quota":{"$ref":"#/components/schemas/body.Quota"}},"type":"object"},"body.SmDeleted":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.SmRead":{"properties":{"createdAt":{"type":"string"},"id":{"type":"string"},"ownerId":{"type":"string"},"url":{"type":"string"},"zone":{"type":"string"}},"type":"object"},"body.SystemCapacities":{"properties":{"clusters":{"description":"Per Cluster","items":{"$ref":"#/components/schemas/body.ClusterCapacities"},"type":"array","uniqueItems":false},"cpuCore":{"$ref":"#/components/schemas/body.CpuCoreCapacities"},"gpu":{"$ref":"#/components/schemas/body.GpuCapacities"},"hosts":{"description":"Per Host","items":{"$ref":"#/components/schemas/body.HostCapacities"},"type":"array","uniqueItems":false},"ram":{"$ref":"#/components/schemas/body.RamCapacities"}},"type":"object"},"body.SystemStats":{"properties":{"k8s":{"$ref":"#/components/schemas/body.K8sStats"}},"type":"object"},"body.SystemStatus":{"properties":{"hosts":{"items":{"$ref":"#/components/schemas/body.HostStatus"},"type":"array","uniqueItems":false}},"type":"object"},"body.TeamCreate":{"properties":{"description":{"maxLength":1000,"type":"string"},"members":{"items":{"$ref":"#/components/schemas/body.TeamMemberCreate"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"name":{"maxLength":100,"minLength":1,"type":"string"},"resources":{"items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false}},"required":["name"],"type":"object"},"body.TeamMember":{"properties":{"addedAt":{"type":"string"},"email":{"type":"string"},"firstName":{"type":"string"},"gravatarUrl":{"type":"string"},"id":{"type":"string"},"joinedAt":{"type":"string"},"lastName":{"type":"string"},"memberStatus":{"type":"string"},"teamRole":{"type":"string"},"username":{"type":"string"}},"type":"object"},"body.TeamMemberCreate":{"properties":{"id":{"type":"string"},"teamRole":{"description":"default to MemberRoleAdmin right now","type":"string"}},"required":["id"],"type":"object"},"body.TeamMemberUpdate":{"properties":{"id":{"type":"string"},"teamRole":{"description":"default to MemberRoleAdmin right now","type":"string"}},"required":["id"],"type":"object"},"body.TeamRead":{"properties":{"createdAt":{"type":"string"},"description":{"type":"string"},"id":{"type":"string"},"members":{"items":{"$ref":"#/components/schemas/body.TeamMember"},"type":"array","uniqueItems":false},"name":{"type":"string"},"ownerId":{"type":"string"},"resources":{"items":{"$ref":"#/components/schemas/body.TeamResource"},"type":"array","uniqueItems":false},"updatedAt":{"type":"string"}},"type":"object"},"body.TeamResource":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"type":"object"},"body.TeamUpdate":{"properties":{"description":{"maxLength":1000,"type":"string"},"members":{"items":{"$ref":"#/components/schemas/body.TeamMemberUpdate"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"name":{"maxLength":100,"minLength":1,"type":"string"},"resources":{"items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false}},"type":"object"},"body.TimestampedSystemCapacities":{"properties":{"capacities":{"$ref":"#/components/schemas/body.SystemCapacities"},"timestamp":{"type":"string"}},"type":"object"},"body.TimestampedSystemStats":{"properties":{"stats":{"$ref":"#/components/schemas/body.SystemStats"},"timestamp":{"type":"string"}},"type":"object"},"body.TimestampedSystemStatus":{"properties":{"status":{"$ref":"#/components/schemas/body.SystemStatus"},"timestamp":{"type":"string"}},"type":"object"},"body.Usage":{"properties":{"cpuCores":{"type":"number"},"diskSize":{"type":"integer"},"ram":{"type":"number"}},"type":"object"},"body.UserData":{"properties":{"key":{"maxLength":255,"minLength":1,"type":"string"},"value":{"maxLength":255,"minLength":1,"type":"string"}},"required":["key","value"],"type":"object"},"body.UserRead":{"properties":{"admin":{"type":"boolean"},"apiKeys":{"items":{"$ref":"#/components/schemas/body.ApiKey"},"type":"array","uniqueItems":false},"email":{"type":"string"},"firstName":{"type":"string"},"gravatarUrl":{"type":"string"},"id":{"type":"string"},"lastName":{"type":"string"},"publicKeys":{"items":{"$ref":"#/components/schemas/body.PublicKey"},"type":"array","uniqueItems":false},"quota":{"$ref":"#/components/schemas/body.Quota"},"role":{"$ref":"#/components/schemas/body.Role"},"storageUrl":{"type":"string"},"usage":{"$ref":"#/components/schemas/body.Usage"},"userData":{"items":{"$ref":"#/components/schemas/body.UserData"},"type":"array","uniqueItems":false},"username":{"type":"string"}},"type":"object"},"body.UserUpdate":{"properties":{"apiKeys":{"description":"ApiKeys specifies the API keys that should remain. If an API key is not in this list, it will be deleted.\nHowever, API keys cannot be created, use /apiKeys endpoint to create new API keys.","items":{"$ref":"#/components/schemas/body.ApiKey"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"publicKeys":{"items":{"$ref":"#/components/schemas/body.PublicKey"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"userData":{"items":{"$ref":"#/components/schemas/body.UserData"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false}},"type":"object"},"body.VmActionCreate":{"properties":{"action":{"enum":["start","stop","restart","repair"],"type":"string"}},"required":["action"],"type":"object"},"body.VmActionCreated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.VmCreate":{"properties":{"cpuCores":{"minimum":1,"type":"integer"},"diskSize":{"minimum":10,"type":"integer"},"name":{"maxLength":30,"minLength":3,"type":"string"},"ports":{"items":{"$ref":"#/components/schemas/body.PortCreate"},"maxItems":10,"minItems":0,"type":"array","uniqueItems":false},"ram":{"minimum":1,"type":"integer"},"sshPublicKey":{"type":"string"},"zone":{"type":"string"}},"required":["cpuCores","diskSize","name","ram","sshPublicKey"],"type":"object"},"body.VmCreated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.VmDeleted":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.VmGpuLease":{"properties":{"activatedAt":{"description":"ActivatedAt specifies the time when the lease was activated. This is the time the user first attached the GPU\nor 1 day after the lease was created if the user did not attach the GPU.","type":"string"},"assignedAt":{"description":"AssignedAt specifies the time when the lease was assigned to the user.","type":"string"},"createdAt":{"type":"string"},"expiredAt":{"description":"ExpiredAt specifies the time when the lease expired.\nThis is only present if the lease is expired.","type":"string"},"expiresAt":{"description":"ExpiresAt specifies the time when the lease will expire.\nThis is only present if the lease is active.","type":"string"},"gpuGroupId":{"type":"string"},"id":{"type":"string"},"leaseDuration":{"type":"number"}},"type":"object"},"body.VmRead":{"properties":{"accessedAt":{"type":"string"},"createdAt":{"type":"string"},"gpu":{"$ref":"#/components/schemas/body.VmGpuLease"},"host":{"type":"string"},"id":{"type":"string"},"internalName":{"type":"string"},"name":{"type":"string"},"ownerId":{"type":"string"},"ports":{"items":{"$ref":"#/components/schemas/body.PortRead"},"type":"array","uniqueItems":false},"repairedAt":{"type":"string"},"specs":{"$ref":"#/components/schemas/body.VmSpecs"},"sshConnectionString":{"type":"string"},"sshPublicKey":{"type":"string"},"status":{"type":"string"},"teams":{"items":{"type":"string"},"type":"array","uniqueItems":false},"updatedAt":{"type":"string"},"zone":{"type":"string"}},"type":"object"},"body.VmSnapshotCreated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.VmSnapshotDeleted":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.VmSnapshotRead":{"properties":{"created":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"}},"type":"object"},"body.VmSpecs":{"properties":{"cpuCores":{"type":"integer"},"diskSize":{"type":"integer"},"ram":{"type":"integer"}},"type":"object"},"body.VmUpdate":{"properties":{"cpuCores":{"minimum":1,"type":"integer"},"name":{"maxLength":30,"minLength":3,"type":"string"},"ports":{"items":{"$ref":"#/components/schemas/body.PortUpdate"},"maxItems":10,"minItems":0,"type":"array","uniqueItems":false},"ram":{"minimum":1,"type":"integer"}},"type":"object"},"body.VmUpdated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.Volume":{"properties":{"appPath":{"maxLength":255,"minLength":1,"type":"string"},"name":{"maxLength":30,"minLength":3,"type":"string"},"serverPath":{"maxLength":255,"minLength":1,"type":"string"}},"required":["appPath","name","serverPath"],"type":"object"},"body.WorkerStatusRead":{"properties":{"name":{"type":"string"},"reportedAt":{"type":"string"},"status":{"type":"string"}},"type":"object"},"body.ZoneEndpoints":{"properties":{"deployment":{"type":"string"},"storage":{"type":"string"},"vm":{"type":"string"},"vmApp":{"type":"string"}},"type":"object"},"body.ZoneRead":{"properties":{"capabilities":{"items":{"type":"string"},"type":"array","uniqueItems":false},"description":{"type":"string"},"enabled":{"type":"boolean"},"endpoints":{"$ref":"#/components/schemas/body.ZoneEndpoints"},"legacy":{"type":"boolean"},"name":{"type":"string"}},"type":"object"},"sys.Error":{"properties":{"code":{"type":"string"},"msg":{"type":"string"}},"type":"object"},"sys.ErrorResponse":{"properties":{"errors":{"items":{"$ref":"#/components/schemas/sys.Error"},"type":"array","uniqueItems":false}},"type":"object"}},"securitySchemes":{"ApiKeyAuth":{"in":"header","name":"X-Api-Key","type":"apiKey"},"KeycloakOAuth":{"flows":{"authorizationCode":{"authorizationUrl":"https://iam.cloud.cbh.kth.se/realms/cloud/protocol/openid-connect/auth","tokenUrl":"https://iam.cloud.cbh.kth.se/realms/cloud/protocol/openid-connect/token"}},"in":"header","type":"oauth2"}}}, + "components": {"schemas":{"body.ApiKey":{"properties":{"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"name":{"type":"string"}},"type":"object"},"body.ApiKeyCreate":{"properties":{"expiresAt":{"type":"string"},"name":{"type":"string"}},"required":["expiresAt","name"],"type":"object"},"body.ApiKeyCreated":{"properties":{"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"}},"type":"object"},"body.BindingError":{"properties":{"validationErrors":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"}},"type":"object"},"body.CiConfig":{"properties":{"config":{"type":"string"}},"type":"object"},"body.ClusterCapacities":{"properties":{"cluster":{"type":"string"},"cpuCore":{"$ref":"#/components/schemas/body.CpuCoreCapacities"},"gpu":{"$ref":"#/components/schemas/body.GpuCapacities"},"ram":{"$ref":"#/components/schemas/body.RamCapacities"}},"type":"object"},"body.ClusterStats":{"properties":{"cluster":{"type":"string"},"podCount":{"type":"integer"}},"type":"object"},"body.CpuCoreCapacities":{"description":"Total","properties":{"total":{"type":"integer"}},"type":"object"},"body.CpuStatus":{"properties":{"load":{"$ref":"#/components/schemas/body.CpuStatusLoad"},"temp":{"$ref":"#/components/schemas/body.CpuStatusTemp"}},"type":"object"},"body.CpuStatusLoad":{"properties":{"cores":{"items":{"type":"integer"},"type":"array","uniqueItems":false},"main":{"type":"number"},"max":{"type":"number"}},"type":"object"},"body.CpuStatusTemp":{"properties":{"cores":{"items":{"type":"integer"},"type":"array","uniqueItems":false},"main":{"type":"number"},"max":{"type":"number"}},"type":"object"},"body.CustomDomainRead":{"properties":{"domain":{"type":"string"},"secret":{"type":"string"},"status":{"type":"string"},"url":{"type":"string"}},"type":"object"},"body.DeploymentCommand":{"properties":{"command":{"enum":["restart"],"type":"string"}},"required":["command"],"type":"object"},"body.DeploymentCreate":{"properties":{"args":{"items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"cpuCores":{"type":"number"},"customDomain":{"description":"CustomDomain is the domain that the deployment will be available on.\nThe max length is set to 243 to allow for a subdomain when confirming the domain.","type":"string"},"envs":{"items":{"$ref":"#/components/schemas/body.Env"},"maxItems":1000,"minItems":0,"type":"array","uniqueItems":false},"healthCheckPath":{"maxLength":1000,"minLength":0,"type":"string"},"image":{"maxLength":1000,"minLength":1,"type":"string"},"initCommands":{"items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"name":{"maxLength":30,"minLength":3,"type":"string"},"neverStale":{"description":"Boolean to make deployment never get disabled, despite being stale","type":"boolean"},"private":{"description":"Deprecated: Use Visibility instead.","type":"boolean"},"ram":{"type":"number"},"replicas":{"maximum":100,"minimum":0,"type":"integer"},"visibility":{"enum":["public","private","auth"],"type":"string"},"volumes":{"items":{"$ref":"#/components/schemas/body.Volume"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"zone":{"description":"Zone is the zone that the deployment will be created in.\nIf the zone is not set, the deployment will be created in the default zone.","type":"string"}},"required":["name"],"type":"object"},"body.DeploymentCreated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.DeploymentRead":{"properties":{"accessedAt":{"type":"string"},"args":{"items":{"type":"string"},"type":"array","uniqueItems":false},"createdAt":{"type":"string"},"customDomain":{"$ref":"#/components/schemas/body.CustomDomainRead"},"envs":{"items":{"$ref":"#/components/schemas/body.Env"},"type":"array","uniqueItems":false},"error":{"type":"string"},"healthCheckPath":{"type":"string"},"id":{"type":"string"},"image":{"type":"string"},"initCommands":{"items":{"type":"string"},"type":"array","uniqueItems":false},"integrations":{"description":"Integrations are currently not used, but could be used if we wanted to add a list of integrations to the deployment\n\nFor example GitHub","items":{"type":"string"},"type":"array","uniqueItems":false},"internalPort":{"type":"integer"},"name":{"type":"string"},"neverStale":{"type":"boolean"},"ownerId":{"type":"string"},"pingResult":{"type":"integer"},"private":{"description":"Deprecated: Use Visibility instead.","type":"boolean"},"repairedAt":{"type":"string"},"replicaStatus":{"$ref":"#/components/schemas/body.ReplicaStatus"},"restartedAt":{"type":"string"},"specs":{"$ref":"#/components/schemas/body.DeploymentSpecs"},"status":{"type":"string"},"storageUrl":{"type":"string"},"teams":{"items":{"type":"string"},"type":"array","uniqueItems":false},"type":{"type":"string"},"updatedAt":{"type":"string"},"url":{"type":"string"},"visibility":{"type":"string"},"volumes":{"items":{"$ref":"#/components/schemas/body.Volume"},"type":"array","uniqueItems":false},"zone":{"type":"string"}},"type":"object"},"body.DeploymentSpecs":{"properties":{"cpuCores":{"type":"number"},"ram":{"type":"number"},"replicas":{"type":"integer"}},"type":"object"},"body.DeploymentUpdate":{"properties":{"args":{"items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"cpuCores":{"type":"number"},"customDomain":{"description":"CustomDomain is the domain that the deployment will be available on.\nThe max length is set to 243 to allow for a subdomain when confirming the domain.","type":"string"},"envs":{"items":{"$ref":"#/components/schemas/body.Env"},"maxItems":1000,"minItems":0,"type":"array","uniqueItems":false},"healthCheckPath":{"maxLength":1000,"minLength":0,"type":"string"},"image":{"maxLength":1000,"minLength":1,"type":"string"},"initCommands":{"items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"name":{"maxLength":30,"minLength":3,"type":"string"},"neverStale":{"type":"boolean"},"private":{"description":"Deprecated: Use Visibility instead.","type":"boolean"},"ram":{"type":"number"},"replicas":{"maximum":100,"minimum":0,"type":"integer"},"visibility":{"enum":["public","private","auth"],"type":"string"},"volumes":{"items":{"$ref":"#/components/schemas/body.Volume"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false}},"required":["name"],"type":"object"},"body.DeploymentUpdated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.DiscoverRead":{"properties":{"roles":{"items":{"$ref":"#/components/schemas/body.Role"},"type":"array","uniqueItems":false},"version":{"type":"string"}},"type":"object"},"body.Env":{"properties":{"name":{"maxLength":100,"minLength":1,"type":"string"},"value":{"maxLength":10000,"minLength":1,"type":"string"}},"required":["name","value"],"type":"object"},"body.GpuCapacities":{"properties":{"total":{"type":"integer"}},"type":"object"},"body.GpuGroupRead":{"properties":{"available":{"type":"integer"},"displayName":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"total":{"type":"integer"},"vendor":{"type":"string"},"zone":{"type":"string"}},"type":"object"},"body.GpuLeaseCreate":{"properties":{"gpuGroupId":{"description":"GpuGroupID is used to specify the GPU to lease.\nAs such, the lease does not specify which specific GPU to lease, but rather the type of GPU to lease.","type":"string"},"leaseForever":{"description":"LeaseForever is used to specify whether the lease should be created forever.","type":"boolean"}},"required":["gpuGroupId"],"type":"object"},"body.GpuLeaseCreated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.GpuLeaseDeleted":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.GpuLeaseRead":{"properties":{"activatedAt":{"description":"ActivatedAt specifies the time when the lease was activated. This is the time the user first attached the GPU\nor 1 day after the lease was created if the user did not attach the GPU.","type":"string"},"active":{"type":"boolean"},"assignedAt":{"description":"AssignedAt specifies the time when the lease was assigned to the user.","type":"string"},"createdAt":{"type":"string"},"expiredAt":{"type":"string"},"expiresAt":{"description":"ExpiresAt specifies the time when the lease will expire.\nThis is only present if the lease is active.","type":"string"},"gpuGroupId":{"type":"string"},"id":{"type":"string"},"leaseDuration":{"type":"number"},"queuePosition":{"type":"integer"},"userId":{"type":"string"},"vmId":{"description":"VmID is set when the lease is attached to a VM.","type":"string"}},"type":"object"},"body.GpuLeaseUpdate":{"properties":{"vmId":{"description":"VmID is used to specify the VM to attach the lease to.\n\n- If specified, the lease will be attached to the VM.\n\n- If the lease is already attached to a VM, it will be detached from the current VM and attached to the new VM.\n\n- If the lease is not active, specifying a VM will activate the lease.\n\n- If the lease is not assigned, an error will be returned.","type":"string"}},"type":"object"},"body.GpuLeaseUpdated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.GpuStatus":{"properties":{"temp":{"items":{"$ref":"#/components/schemas/body.GpuStatusTemp"},"type":"array","uniqueItems":false}},"type":"object"},"body.GpuStatusTemp":{"properties":{"main":{"type":"number"}},"type":"object"},"body.HarborWebhook":{"properties":{"event_data":{"properties":{"repository":{"properties":{"date_created":{"type":"integer"},"name":{"type":"string"},"namespace":{"type":"string"},"repo_full_name":{"type":"string"},"repo_type":{"type":"string"}},"type":"object"},"resources":{"items":{"properties":{"digest":{"type":"string"},"resource_url":{"type":"string"},"tag":{"type":"string"}},"type":"object"},"type":"array","uniqueItems":false}},"type":"object"},"occur_at":{"type":"integer"},"operator":{"type":"string"},"type":{"type":"string"}},"type":"object"},"body.HostCapacities":{"properties":{"cpuCore":{"$ref":"#/components/schemas/body.CpuCoreCapacities"},"displayName":{"type":"string"},"gpu":{"$ref":"#/components/schemas/body.GpuCapacities"},"name":{"type":"string"},"ram":{"$ref":"#/components/schemas/body.RamCapacities"},"zone":{"description":"Zone is the name of the zone where the host is located.","type":"string"}},"type":"object"},"body.HostRead":{"properties":{"displayName":{"type":"string"},"name":{"type":"string"},"zone":{"description":"Zone is the name of the zone where the host is located.","type":"string"}},"type":"object"},"body.HostStatus":{"properties":{"cpu":{"$ref":"#/components/schemas/body.CpuStatus"},"displayName":{"type":"string"},"gpu":{"$ref":"#/components/schemas/body.GpuStatus"},"name":{"type":"string"},"ram":{"$ref":"#/components/schemas/body.RamStatus"},"zone":{"description":"Zone is the name of the zone where the host is located.","type":"string"}},"type":"object"},"body.HttpProxyCreate":{"properties":{"customDomain":{"description":"CustomDomain is the domain that the deployment will be available on.\nThe max length is set to 243 to allow for a subdomain when confirming the domain.","type":"string"},"name":{"maxLength":30,"minLength":3,"type":"string"}},"required":["name"],"type":"object"},"body.HttpProxyRead":{"properties":{"customDomain":{"$ref":"#/components/schemas/body.CustomDomainRead"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"body.HttpProxyUpdate":{"properties":{"customDomain":{"description":"CustomDomain is the domain that the deployment will be available on.\nThe max length is set to 243 to allow for a subdomain when confirming the domain.","type":"string"},"name":{"maxLength":30,"minLength":3,"type":"string"}},"required":["name"],"type":"object"},"body.JobRead":{"properties":{"createdAt":{"type":"string"},"finishedAt":{"type":"string"},"id":{"type":"string"},"lastError":{"type":"string"},"lastRunAt":{"type":"string"},"runAfter":{"type":"string"},"status":{"type":"string"},"type":{"type":"string"},"userId":{"type":"string"}},"type":"object"},"body.JobUpdate":{"properties":{"status":{"enum":["pending","running","failed","terminated","finished","completed"],"type":"string"}},"type":"object"},"body.K8sStats":{"properties":{"clusters":{"items":{"$ref":"#/components/schemas/body.ClusterStats"},"type":"array","uniqueItems":false},"podCount":{"type":"integer"}},"type":"object"},"body.NotificationRead":{"properties":{"completedAt":{"type":"string"},"content":{"additionalProperties":{},"type":"object"},"createdAt":{"type":"string"},"id":{"type":"string"},"readAt":{"type":"string"},"toastedAt":{"type":"string"},"type":{"type":"string"},"userId":{"type":"string"}},"type":"object"},"body.NotificationUpdate":{"properties":{"read":{"type":"boolean"},"toasted":{"type":"boolean"}},"type":"object"},"body.PortCreate":{"properties":{"httpProxy":{"$ref":"#/components/schemas/body.HttpProxyCreate"},"name":{"maxLength":100,"minLength":1,"type":"string"},"port":{"maximum":65535,"minimum":1,"type":"integer"},"protocol":{"enum":["tcp","udp"],"type":"string"}},"required":["name","port","protocol"],"type":"object"},"body.PortRead":{"properties":{"externalPort":{"type":"integer"},"httpProxy":{"$ref":"#/components/schemas/body.HttpProxyRead"},"name":{"type":"string"},"port":{"type":"integer"},"protocol":{"type":"string"}},"type":"object"},"body.PortUpdate":{"properties":{"httpProxy":{"$ref":"#/components/schemas/body.HttpProxyUpdate"},"name":{"maxLength":100,"minLength":1,"type":"string"},"port":{"maximum":65535,"minimum":1,"type":"integer"},"protocol":{"enum":["tcp","udp"],"type":"string"}},"required":["name","port","protocol"],"type":"object"},"body.PublicKey":{"properties":{"key":{"type":"string"},"name":{"maxLength":30,"minLength":1,"type":"string"}},"required":["key","name"],"type":"object"},"body.Quota":{"properties":{"cpuCores":{"type":"number"},"diskSize":{"type":"number"},"gpuLeaseDuration":{"description":"in hours","type":"number"},"ram":{"type":"number"},"snapshots":{"type":"integer"}},"type":"object"},"body.RamCapacities":{"properties":{"total":{"type":"integer"}},"type":"object"},"body.RamStatus":{"properties":{"load":{"$ref":"#/components/schemas/body.RamStatusLoad"}},"type":"object"},"body.RamStatusLoad":{"properties":{"main":{"type":"number"}},"type":"object"},"body.ReplicaStatus":{"properties":{"availableReplicas":{"description":"AvailableReplicas is the number of replicas that are available.","type":"integer"},"desiredReplicas":{"description":"DesiredReplicas is the number of replicas that the deployment should have.","type":"integer"},"readyReplicas":{"description":"ReadyReplicas is the number of replicas that are ready.","type":"integer"},"unavailableReplicas":{"description":"UnavailableReplicas is the number of replicas that are unavailable.","type":"integer"}},"type":"object"},"body.ResourceMigrationCreate":{"properties":{"resourceId":{"description":"ResourceID is the ID of the resource that is being migrated.\nThis can be a VM ID, deployment ID, etc. depending on the type of the migration.","type":"string"},"status":{"description":"Status is the status of the resource migration.\nIt is used by privileged admins to directly accept or reject a migration.\nThe field is ignored by non-admins.\n\nPossible values:\n- accepted\n- pending","type":"string"},"type":{"description":"Type is the type of the resource migration.\n\nPossible values:\n- updateOwner","enum":["updateOwner"],"type":"string"},"updateOwner":{"description":"UpdateOwner is the set of parameters that are required for the updateOwner migration type.\nIt is ignored if the migration type is not updateOwner.","properties":{"ownerId":{"type":"string"}},"required":["ownerId"],"type":"object"}},"required":["resourceId","type"],"type":"object"},"body.ResourceMigrationCreated":{"properties":{"createdAt":{"type":"string"},"deletedAt":{"type":"string"},"id":{"type":"string"},"jobId":{"description":"JobID is the ID of the job that was created for the resource migration.\nIt will only be set if the migration was created with status 'accepted'.","type":"string"},"resourceId":{"description":"ResourceID is the ID of the resource that is being migrated.\nThis can be a VM ID, deployment ID, etc. depending on the type of the migration.","type":"string"},"resourceType":{"description":"ResourceType is the type of the resource that is being migrated.\n\nPossible values:\n- vm\n- deployment","type":"string"},"status":{"description":"Status is the status of the resource migration.\nWhen this field is set to 'accepted', the migration will take place and then automatically be deleted.","type":"string"},"type":{"description":"Type is the type of the resource migration.\n\nPossible values:\n- updateOwner","type":"string"},"updateOwner":{"description":"UpdateOwner is the set of parameters that are required for the updateOwner migration type.\nIt is empty if the migration type is not updateOwner.","properties":{"ownerId":{"type":"string"}},"type":"object"},"userId":{"description":"UserID is the ID of the user who initiated the migration.","type":"string"}},"type":"object"},"body.ResourceMigrationRead":{"properties":{"createdAt":{"type":"string"},"deletedAt":{"type":"string"},"id":{"type":"string"},"resourceId":{"description":"ResourceID is the ID of the resource that is being migrated.\nThis can be a VM ID, deployment ID, etc. depending on the type of the migration.","type":"string"},"resourceType":{"description":"ResourceType is the type of the resource that is being migrated.\n\nPossible values:\n- vm\n- deployment","type":"string"},"status":{"description":"Status is the status of the resource migration.\nWhen this field is set to 'accepted', the migration will take place and then automatically be deleted.","type":"string"},"type":{"description":"Type is the type of the resource migration.\n\nPossible values:\n- updateOwner","type":"string"},"updateOwner":{"description":"UpdateOwner is the set of parameters that are required for the updateOwner migration type.\nIt is empty if the migration type is not updateOwner.","properties":{"ownerId":{"type":"string"}},"type":"object"},"userId":{"description":"UserID is the ID of the user who initiated the migration.","type":"string"}},"type":"object"},"body.ResourceMigrationUpdate":{"properties":{"code":{"description":"Code is a token required when accepting a migration if the acceptor is not an admin.\nIt is sent to the acceptor using the notification API","type":"string"},"status":{"description":"Status is the status of the resource migration.\nIt is used to accept a migration by setting the status to 'accepted'.\nIf the acceptor is not an admin, a Code must be provided.\n\nPossible values:\n- accepted\n- pending","type":"string"}},"required":["status"],"type":"object"},"body.ResourceMigrationUpdated":{"properties":{"createdAt":{"type":"string"},"deletedAt":{"type":"string"},"id":{"type":"string"},"jobId":{"description":"JobID is the ID of the job that was created for the resource migration.\nIt will only be set if the migration was updated with status 'accepted'.","type":"string"},"resourceId":{"description":"ResourceID is the ID of the resource that is being migrated.\nThis can be a VM ID, deployment ID, etc. depending on the type of the migration.","type":"string"},"resourceType":{"description":"ResourceType is the type of the resource that is being migrated.\n\nPossible values:\n- vm\n- deployment","type":"string"},"status":{"description":"Status is the status of the resource migration.\nWhen this field is set to 'accepted', the migration will take place and then automatically be deleted.","type":"string"},"type":{"description":"Type is the type of the resource migration.\n\nPossible values:\n- updateOwner","type":"string"},"updateOwner":{"description":"UpdateOwner is the set of parameters that are required for the updateOwner migration type.\nIt is empty if the migration type is not updateOwner.","properties":{"ownerId":{"type":"string"}},"type":"object"},"userId":{"description":"UserID is the ID of the user who initiated the migration.","type":"string"}},"type":"object"},"body.Role":{"properties":{"description":{"type":"string"},"name":{"type":"string"},"permissions":{"items":{"type":"string"},"type":"array","uniqueItems":false},"quota":{"$ref":"#/components/schemas/body.Quota"}},"type":"object"},"body.SmDeleted":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.SmRead":{"properties":{"createdAt":{"type":"string"},"id":{"type":"string"},"ownerId":{"type":"string"},"url":{"type":"string"},"zone":{"type":"string"}},"type":"object"},"body.SystemCapacities":{"properties":{"clusters":{"description":"Per Cluster","items":{"$ref":"#/components/schemas/body.ClusterCapacities"},"type":"array","uniqueItems":false},"cpuCore":{"$ref":"#/components/schemas/body.CpuCoreCapacities"},"gpu":{"$ref":"#/components/schemas/body.GpuCapacities"},"hosts":{"description":"Per Host","items":{"$ref":"#/components/schemas/body.HostCapacities"},"type":"array","uniqueItems":false},"ram":{"$ref":"#/components/schemas/body.RamCapacities"}},"type":"object"},"body.SystemStats":{"properties":{"k8s":{"$ref":"#/components/schemas/body.K8sStats"}},"type":"object"},"body.SystemStatus":{"properties":{"hosts":{"items":{"$ref":"#/components/schemas/body.HostStatus"},"type":"array","uniqueItems":false}},"type":"object"},"body.TeamCreate":{"properties":{"description":{"maxLength":1000,"type":"string"},"members":{"items":{"$ref":"#/components/schemas/body.TeamMemberCreate"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"name":{"maxLength":100,"minLength":1,"type":"string"},"resources":{"items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false}},"required":["name"],"type":"object"},"body.TeamMember":{"properties":{"addedAt":{"type":"string"},"email":{"type":"string"},"firstName":{"type":"string"},"gravatarUrl":{"type":"string"},"id":{"type":"string"},"joinedAt":{"type":"string"},"lastName":{"type":"string"},"memberStatus":{"type":"string"},"teamRole":{"type":"string"},"username":{"type":"string"}},"type":"object"},"body.TeamMemberCreate":{"properties":{"id":{"type":"string"},"teamRole":{"description":"default to MemberRoleAdmin right now","type":"string"}},"required":["id"],"type":"object"},"body.TeamMemberUpdate":{"properties":{"id":{"type":"string"},"teamRole":{"description":"default to MemberRoleAdmin right now","type":"string"}},"required":["id"],"type":"object"},"body.TeamRead":{"properties":{"createdAt":{"type":"string"},"description":{"type":"string"},"id":{"type":"string"},"members":{"items":{"$ref":"#/components/schemas/body.TeamMember"},"type":"array","uniqueItems":false},"name":{"type":"string"},"ownerId":{"type":"string"},"resources":{"items":{"$ref":"#/components/schemas/body.TeamResource"},"type":"array","uniqueItems":false},"updatedAt":{"type":"string"}},"type":"object"},"body.TeamResource":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"type":"object"},"body.TeamUpdate":{"properties":{"description":{"maxLength":1000,"type":"string"},"members":{"items":{"$ref":"#/components/schemas/body.TeamMemberUpdate"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"name":{"maxLength":100,"minLength":1,"type":"string"},"resources":{"items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false}},"type":"object"},"body.TimestampedSystemCapacities":{"properties":{"capacities":{"$ref":"#/components/schemas/body.SystemCapacities"},"timestamp":{"type":"string"}},"type":"object"},"body.TimestampedSystemStats":{"properties":{"stats":{"$ref":"#/components/schemas/body.SystemStats"},"timestamp":{"type":"string"}},"type":"object"},"body.TimestampedSystemStatus":{"properties":{"status":{"$ref":"#/components/schemas/body.SystemStatus"},"timestamp":{"type":"string"}},"type":"object"},"body.Usage":{"properties":{"cpuCores":{"type":"number"},"diskSize":{"type":"integer"},"ram":{"type":"number"}},"type":"object"},"body.UserData":{"properties":{"key":{"maxLength":255,"minLength":1,"type":"string"},"value":{"maxLength":255,"minLength":1,"type":"string"}},"required":["key","value"],"type":"object"},"body.UserRead":{"properties":{"admin":{"type":"boolean"},"apiKeys":{"items":{"$ref":"#/components/schemas/body.ApiKey"},"type":"array","uniqueItems":false},"email":{"type":"string"},"firstName":{"type":"string"},"gravatarUrl":{"type":"string"},"id":{"type":"string"},"lastName":{"type":"string"},"publicKeys":{"items":{"$ref":"#/components/schemas/body.PublicKey"},"type":"array","uniqueItems":false},"quota":{"$ref":"#/components/schemas/body.Quota"},"role":{"$ref":"#/components/schemas/body.Role"},"storageUrl":{"type":"string"},"usage":{"$ref":"#/components/schemas/body.Usage"},"userData":{"items":{"$ref":"#/components/schemas/body.UserData"},"type":"array","uniqueItems":false},"username":{"type":"string"}},"type":"object"},"body.UserUpdate":{"properties":{"apiKeys":{"description":"ApiKeys specifies the API keys that should remain. If an API key is not in this list, it will be deleted.\nHowever, API keys cannot be created, use /apiKeys endpoint to create new API keys.","items":{"$ref":"#/components/schemas/body.ApiKey"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"publicKeys":{"items":{"$ref":"#/components/schemas/body.PublicKey"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false},"userData":{"items":{"$ref":"#/components/schemas/body.UserData"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":false}},"type":"object"},"body.VmActionCreate":{"properties":{"action":{"enum":["start","stop","restart","repair"],"type":"string"}},"required":["action"],"type":"object"},"body.VmActionCreated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.VmCreate":{"properties":{"cpuCores":{"minimum":1,"type":"integer"},"diskSize":{"minimum":10,"type":"integer"},"name":{"maxLength":30,"minLength":3,"type":"string"},"neverStale":{"type":"boolean"},"ports":{"items":{"$ref":"#/components/schemas/body.PortCreate"},"maxItems":10,"minItems":0,"type":"array","uniqueItems":false},"ram":{"minimum":1,"type":"integer"},"sshPublicKey":{"type":"string"},"zone":{"type":"string"}},"required":["cpuCores","diskSize","name","ram","sshPublicKey"],"type":"object"},"body.VmCreated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.VmDeleted":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.VmGpuLease":{"properties":{"activatedAt":{"description":"ActivatedAt specifies the time when the lease was activated. This is the time the user first attached the GPU\nor 1 day after the lease was created if the user did not attach the GPU.","type":"string"},"assignedAt":{"description":"AssignedAt specifies the time when the lease was assigned to the user.","type":"string"},"createdAt":{"type":"string"},"expiredAt":{"description":"ExpiredAt specifies the time when the lease expired.\nThis is only present if the lease is expired.","type":"string"},"expiresAt":{"description":"ExpiresAt specifies the time when the lease will expire.\nThis is only present if the lease is active.","type":"string"},"gpuGroupId":{"type":"string"},"id":{"type":"string"},"leaseDuration":{"type":"number"}},"type":"object"},"body.VmRead":{"properties":{"accessedAt":{"type":"string"},"createdAt":{"type":"string"},"gpu":{"$ref":"#/components/schemas/body.VmGpuLease"},"host":{"type":"string"},"id":{"type":"string"},"internalName":{"type":"string"},"name":{"type":"string"},"neverStale":{"type":"boolean"},"ownerId":{"type":"string"},"ports":{"items":{"$ref":"#/components/schemas/body.PortRead"},"type":"array","uniqueItems":false},"repairedAt":{"type":"string"},"specs":{"$ref":"#/components/schemas/body.VmSpecs"},"sshConnectionString":{"type":"string"},"sshPublicKey":{"type":"string"},"status":{"type":"string"},"teams":{"items":{"type":"string"},"type":"array","uniqueItems":false},"updatedAt":{"type":"string"},"zone":{"type":"string"}},"type":"object"},"body.VmSnapshotCreated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.VmSnapshotDeleted":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.VmSnapshotRead":{"properties":{"created":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"}},"type":"object"},"body.VmSpecs":{"properties":{"cpuCores":{"type":"integer"},"diskSize":{"type":"integer"},"ram":{"type":"integer"}},"type":"object"},"body.VmUpdate":{"properties":{"cpuCores":{"minimum":1,"type":"integer"},"name":{"maxLength":30,"minLength":3,"type":"string"},"neverStale":{"type":"boolean"},"ports":{"items":{"$ref":"#/components/schemas/body.PortUpdate"},"maxItems":10,"minItems":0,"type":"array","uniqueItems":false},"ram":{"minimum":1,"type":"integer"}},"type":"object"},"body.VmUpdated":{"properties":{"id":{"type":"string"},"jobId":{"type":"string"}},"type":"object"},"body.Volume":{"properties":{"appPath":{"maxLength":255,"minLength":1,"type":"string"},"name":{"maxLength":30,"minLength":3,"type":"string"},"serverPath":{"maxLength":255,"minLength":1,"type":"string"}},"required":["appPath","name","serverPath"],"type":"object"},"body.WorkerStatusRead":{"properties":{"name":{"type":"string"},"reportedAt":{"type":"string"},"status":{"type":"string"}},"type":"object"},"body.ZoneEndpoints":{"properties":{"deployment":{"type":"string"},"storage":{"type":"string"},"vm":{"type":"string"},"vmApp":{"type":"string"}},"type":"object"},"body.ZoneRead":{"properties":{"capabilities":{"items":{"type":"string"},"type":"array","uniqueItems":false},"description":{"type":"string"},"enabled":{"type":"boolean"},"endpoints":{"$ref":"#/components/schemas/body.ZoneEndpoints"},"legacy":{"type":"boolean"},"name":{"type":"string"}},"type":"object"},"sys.Error":{"properties":{"code":{"type":"string"},"msg":{"type":"string"}},"type":"object"},"sys.ErrorResponse":{"properties":{"errors":{"items":{"$ref":"#/components/schemas/sys.Error"},"type":"array","uniqueItems":false}},"type":"object"}},"securitySchemes":{"ApiKeyAuth":{"in":"header","name":"X-Api-Key","type":"apiKey"},"KeycloakOAuth":{"flows":{"authorizationCode":{"authorizationUrl":"https://iam.cloud.cbh.kth.se/realms/cloud/protocol/openid-connect/auth","tokenUrl":"https://iam.cloud.cbh.kth.se/realms/cloud/protocol/openid-connect/token"}},"in":"header","type":"oauth2"}}}, "info": {"contact":{"name":"Support","url":"https://github.com/kthcloud/go-deploy"},"description":"This is the API explorer for the go-deploy API. You can use it as a reference for the API endpoints.","license":{"name":"MIT License","url":"https://github.com/kthcloud/go-deploy?tab=MIT-1-ov-file#readme"},"termsOfService":"http://swagger.io/terms/","title":"go-deploy API","version":"1.0"}, "externalDocs": {"description":"","url":""}, - "paths": {"/v2/deployments":{"get":{"description":"List deployments","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Filter by user ID","in":"query","name":"userId","schema":{"type":"string"}},{"description":"Include shared","in":"query","name":"shared","schema":{"type":"boolean"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.DeploymentRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List deployments","tags":["Deployment"]},"post":{"description":"Create deployment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentCreate"}}},"description":"Deployment body","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create deployment","tags":["Deployment"]}},"/v2/deployments/{deploymentId}":{"delete":{"description":"Delete deployment","parameters":[{"description":"Deployment ID","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete deployment","tags":["Deployment"]},"get":{"description":"Get deployment","parameters":[{"description":"Deployment ID","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get deployment","tags":["Deployment"]},"post":{"description":"Update deployment","parameters":[{"description":"Deployment ID","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentUpdate"}}},"description":"Deployment update","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentUpdated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update deployment","tags":["Deployment"]}},"/v2/deployments/{deploymentId}/ciConfig":{"get":{"description":"Get CI config","parameters":[{"description":"Deployment ID","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.CiConfig"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get CI config","tags":["Deployment"]}},"/v2/deployments/{deploymentId}/command":{"post":{"description":"Do command","parameters":[{"description":"Deployment ID","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentCommand"}}},"description":"Command body","required":true},"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"423":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Locked"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Do command","tags":["Deployment"]}},"/v2/deployments/{deploymentId}/logs":{"get":{"description":"Get logs using Server-Sent Events","parameters":[{"description":"Deployment ID","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get logs using Server-Sent Events","tags":["Deployment"]}},"/v2/discover":{"get":{"description":"Discover","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DiscoverRead"}}},"description":"OK"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Discover","tags":["Discover"]}},"/v2/gpuGroups":{"get":{"description":"List GPU groups","parameters":[{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.GpuGroupRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"423":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Locked"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List GPU groups","tags":["GpuGroup"]}},"/v2/gpuGroups/{gpuGroupId}":{"get":{"description":"Get GPU group","parameters":[{"description":"GPU group ID","in":"path","name":"gpuGroupId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuGroupRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"423":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Locked"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get GPU group","tags":["GpuGroup"]}},"/v2/gpuLeases":{"get":{"description":"List GPU leases","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Filter by VM ID","in":"query","name":"vmId","schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.GpuLeaseRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"423":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Locked"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List GPU leases","tags":["GpuLease"]},"post":{"description":"Create GPU lease","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuLeaseCreate"}}},"description":"GPU lease","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuLeaseCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create GPU Lease","tags":["GpuLease"]}},"/v2/gpuLeases/{gpuLeaseId}":{"delete":{"description":"Delete GPU lease","parameters":[{"description":"GPU lease ID","in":"path","name":"gpuLeaseId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuLeaseDeleted"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete GPU lease","tags":["GpuLease"]},"get":{"description":"Get GPU lease","parameters":[{"description":"GPU lease ID","in":"path","name":"gpuLeaseId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuLeaseRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"423":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Locked"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get GPU lease","tags":["GpuLease"]},"post":{"description":"Update GPU lease","parameters":[{"description":"GPU lease ID","in":"path","name":"gpuLeaseId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuLeaseUpdate"}}},"description":"GPU lease","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuLeaseUpdated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update GPU lease","tags":["GpuLease"]}},"/v2/hooks/harbor":{"post":{"description":"Handle Harbor hook","parameters":[{"description":"Basic auth token","in":"header","name":"Authorization","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.HarborWebhook"}}},"description":"Harbor webhook body","required":true},"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Handle Harbor hook","tags":["Deployment"]}},"/v2/hosts":{"get":{"description":"List Hosts","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.HostRead"},"type":"array"}}},"description":"OK"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List Hosts","tags":["Host"]}},"/v2/jobs":{"get":{"description":"List jobs","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Filter by user ID","in":"query","name":"userId","schema":{"type":"string"}},{"description":"Filter by type","in":"query","name":"type","schema":{"type":"string"}},{"description":"Filter by status","in":"query","name":"status","schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.JobRead"},"type":"array"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List jobs","tags":["Job"]}},"/v2/jobs/{jobId}":{"get":{"description":"GetJob job by id","parameters":[{"description":"Job ID","in":"path","name":"jobId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.JobRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"GetJob job by id","tags":["Job"]},"post":{"description":"Update job. Only allowed for admins.","parameters":[{"description":"Job ID","in":"path","name":"jobId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.JobUpdate"}}},"description":"Job update","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.JobRead"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update job","tags":["Job"]}},"/v2/metrics":{"get":{"description":"Get metrics","responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"OK"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Get metrics","tags":["Metrics"]}},"/v2/notifications":{"get":{"description":"List notifications","parameters":[{"description":"List all notifications","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Filter by user ID","in":"query","name":"userId","schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.NotificationRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List notifications","tags":["Notification"]}},"/v2/notifications/{notificationId}":{"delete":{"description":"Delete notification","parameters":[{"description":"Notification ID","in":"path","name":"notificationId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete notification","tags":["Notification"]},"get":{"description":"Get notification","parameters":[{"description":"Notification ID","in":"path","name":"notificationId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.NotificationRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get notification","tags":["Notification"]},"post":{"description":"Update notification","parameters":[{"description":"Notification ID","in":"path","name":"notificationId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.NotificationUpdate"}}},"description":"Notification update","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update notification","tags":["Notification"]}},"/v2/register":{"get":{"description":"Register resource","responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Register resource","tags":["Register"]}},"/v2/resourceMigrations":{"get":{"description":"List resource migrations","parameters":[{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.ResourceMigrationRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List resource migrations","tags":["ResourceMigration"]},"post":{"description":"Create resource migration","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ResourceMigrationCreate"}}},"description":"Resource Migration Create","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ResourceMigrationCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create resource migration","tags":["ResourceMigration"]}},"/v2/resourceMigrations/{resourceMigrationId}":{"delete":{"description":"Delete resource migration","parameters":[{"description":"Resource Migration ID","in":"path","name":"resourceMigrationId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete resource migration","tags":["ResourceMigration"]},"get":{"description":"Get resource migration","parameters":[{"description":"Resource Migration ID","in":"path","name":"resourceMigrationId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ResourceMigrationRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get resource migration","tags":["ResourceMigration"]},"post":{"description":"Update resource migration","parameters":[{"description":"Resource Migration ID","in":"path","name":"resourceMigrationId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ResourceMigrationUpdate"}}},"description":"Resource Migration Update","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ResourceMigrationUpdated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update resource migration","tags":["ResourceMigration"]}},"/v2/snapshots":{"get":{"description":"List snapshots","parameters":[{"description":"Filter by VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.VmSnapshotRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"423":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Locked"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List snapshots","tags":["Snapshot"]},"post":{"description":"Create snapshot","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmSnapshotCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create snapshot","tags":["Snapshot"]}},"/v2/storageManagers":{"get":{"description":"Get storage manager list","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.SmRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get storage manager list","tags":["StorageManager"]}},"/v2/storageManagers/{storageManagerId}":{"delete":{"description":"Delete storage manager","parameters":[{"description":"Storage manager ID","in":"path","name":"storageManagerId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.SmDeleted"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete storage manager","tags":["StorageManager"]},"get":{"description":"Get storage manager","parameters":[{"description":"Storage manager ID","in":"path","name":"storageManagerId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.SmDeleted"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get storage manager","tags":["StorageManager"]}},"/v2/systemCapacities":{"get":{"description":"List system capacities","parameters":[{"description":"n","in":"query","name":"n","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.TimestampedSystemCapacities"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List system capacities","tags":["System"]}},"/v2/systemStats":{"get":{"description":"List system stats","parameters":[{"description":"n","in":"query","name":"n","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.TimestampedSystemStats"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List system stats","tags":["System"]}},"/v2/systemStatus":{"get":{"description":"List system stats","parameters":[{"description":"n","in":"query","name":"n","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.TimestampedSystemStatus"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List system stats","tags":["System"]}},"/v2/teams":{"get":{"description":"List teams","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Filter by user ID","in":"query","name":"userId","schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.TeamRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List teams","tags":["Team"]},"post":{"description":"Create team","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.TeamCreate"}}},"description":"Team","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.TeamRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create team","tags":["Team"]}},"/v2/teams/{teamId}":{"delete":{"description":"Delete team","parameters":[{"description":"Team ID","in":"path","name":"teamId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete team","tags":["Team"]},"get":{"description":"Get team","parameters":[{"description":"Team ID","in":"path","name":"teamId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.TeamRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get team","tags":["Team"]},"post":{"description":"Update team","parameters":[{"description":"Team ID","in":"path","name":"teamId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.TeamUpdate"}}},"description":"Team","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.TeamRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update team","tags":["Team"]}},"/v2/users":{"get":{"description":"List users","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Discovery mode","in":"query","name":"discover","schema":{"type":"boolean"}},{"description":"Search query","in":"query","name":"search","schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.UserRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List users","tags":["User"]}},"/v2/users/{userId}":{"get":{"description":"Get user","parameters":[{"description":"User ID","in":"path","name":"userId","required":true,"schema":{"type":"string"}},{"description":"Discovery mode","in":"query","name":"discover","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.UserRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get user","tags":["User"]},"post":{"description":"Update user","parameters":[{"description":"User ID","in":"path","name":"userId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.UserUpdate"}}},"description":"User update","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.UserRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update user","tags":["User"]}},"/v2/users/{userId}/apiKeys":{"post":{"description":"Create API key","parameters":[{"description":"User ID","in":"path","name":"userId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ApiKeyCreate"}}},"description":"API key create body","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ApiKeyCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create API key","tags":["User"]}},"/v2/vmActions":{"post":{"description":"Creates a new action","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmActionCreate"}}},"description":"actions body","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmActionCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Creates a new action","tags":["VmAction"]}},"/v2/vms":{"get":{"description":"List VMs","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Filter by user ID","in":"query","name":"userId","schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.VmRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List VMs","tags":["VM"]},"post":{"description":"Create VM","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmCreate"}}},"description":"VM body","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create VM","tags":["VM"]}},"/v2/vms/{vmId}":{"delete":{"description":"Delete VM","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmDeleted"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete VM","tags":["VM"]},"get":{"description":"Get VM","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get VM","tags":["VM"]},"post":{"description":"Update VM","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmUpdate"}}},"description":"VM update","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmUpdated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update VM","tags":["VM"]}},"/v2/vms/{vmId}/snapshot/{snapshotId}":{"delete":{"description":"Delete snapshot","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}},{"description":"Snapshot ID","in":"path","name":"snapshotId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmSnapshotDeleted"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete snapshot","tags":["Snapshot"]},"post":{"description":"Get snapshot","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}},{"description":"Snapshot ID","in":"path","name":"snapshotId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmSnapshotRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get snapshot","tags":["Snapshot"]}},"/v2/workerStatus":{"get":{"description":"List of worker status","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.WorkerStatusRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List worker status","tags":["Status"]}},"/v2/zones":{"get":{"description":"List zones","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.ZoneRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List zones","tags":["Zone"]}}}, + "paths": {"/v2/deployments":{"get":{"description":"List deployments","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Filter by user ID","in":"query","name":"userId","schema":{"type":"string"}},{"description":"Include shared","in":"query","name":"shared","schema":{"type":"boolean"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.DeploymentRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List deployments","tags":["Deployment"]},"post":{"description":"Create deployment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentCreate"}}},"description":"Deployment body","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create deployment","tags":["Deployment"]}},"/v2/deployments/{deploymentId}":{"delete":{"description":"Delete deployment","parameters":[{"description":"Deployment ID","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete deployment","tags":["Deployment"]},"get":{"description":"Get deployment","parameters":[{"description":"Deployment ID","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get deployment","tags":["Deployment"]},"post":{"description":"Update deployment","parameters":[{"description":"Deployment ID","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentUpdate"}}},"description":"Deployment update","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentUpdated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update deployment","tags":["Deployment"]}},"/v2/deployments/{deploymentId}/ciConfig":{"get":{"description":"Get CI config","parameters":[{"description":"Deployment ID","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.CiConfig"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get CI config","tags":["Deployment"]}},"/v2/deployments/{deploymentId}/command":{"post":{"description":"Do command","parameters":[{"description":"Deployment ID","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DeploymentCommand"}}},"description":"Command body","required":true},"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"423":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Locked"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Do command","tags":["Deployment"]}},"/v2/deployments/{deploymentId}/logs":{"get":{"description":"Get logs using Server-Sent Events","parameters":[{"description":"Deployment ID","in":"path","name":"deploymentId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get logs using Server-Sent Events","tags":["Deployment"]}},"/v2/discover":{"get":{"description":"Discover","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.DiscoverRead"}}},"description":"OK"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Discover","tags":["Discover"]}},"/v2/gpuGroups":{"get":{"description":"List GPU groups","parameters":[{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.GpuGroupRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"423":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Locked"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List GPU groups","tags":["GpuGroup"]}},"/v2/gpuGroups/{gpuGroupId}":{"get":{"description":"Get GPU group","parameters":[{"description":"GPU group ID","in":"path","name":"gpuGroupId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuGroupRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"423":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Locked"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get GPU group","tags":["GpuGroup"]}},"/v2/gpuLeases":{"get":{"description":"List GPU leases","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Filter by VM ID","in":"query","name":"vmId","schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.GpuLeaseRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"423":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Locked"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List GPU leases","tags":["GpuLease"]},"post":{"description":"Create GPU lease","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuLeaseCreate"}}},"description":"GPU lease","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuLeaseCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create GPU Lease","tags":["GpuLease"]}},"/v2/gpuLeases/{gpuLeaseId}":{"delete":{"description":"Delete GPU lease","parameters":[{"description":"GPU lease ID","in":"path","name":"gpuLeaseId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuLeaseDeleted"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete GPU lease","tags":["GpuLease"]},"get":{"description":"Get GPU lease","parameters":[{"description":"GPU lease ID","in":"path","name":"gpuLeaseId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuLeaseRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"423":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Locked"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get GPU lease","tags":["GpuLease"]},"post":{"description":"Update GPU lease","parameters":[{"description":"GPU lease ID","in":"path","name":"gpuLeaseId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuLeaseUpdate"}}},"description":"GPU lease","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.GpuLeaseUpdated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update GPU lease","tags":["GpuLease"]}},"/v2/hooks/harbor":{"post":{"description":"Handle Harbor hook","parameters":[{"description":"Basic auth token","in":"header","name":"Authorization","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.HarborWebhook"}}},"description":"Harbor webhook body","required":true},"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Handle Harbor hook","tags":["Deployment"]}},"/v2/hosts":{"get":{"description":"List Hosts","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.HostRead"},"type":"array"}}},"description":"OK"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List Hosts","tags":["Host"]}},"/v2/jobs":{"get":{"description":"List jobs","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Filter by user ID","in":"query","name":"userId","schema":{"type":"string"}},{"description":"Filter by type","in":"query","name":"type","schema":{"type":"string"}},{"description":"Filter by status","in":"query","name":"status","schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.JobRead"},"type":"array"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List jobs","tags":["Job"]}},"/v2/jobs/{jobId}":{"get":{"description":"GetJob job by id","parameters":[{"description":"Job ID","in":"path","name":"jobId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.JobRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"GetJob job by id","tags":["Job"]},"post":{"description":"Update job. Only allowed for admins.","parameters":[{"description":"Job ID","in":"path","name":"jobId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.JobUpdate"}}},"description":"Job update","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.JobRead"}}},"description":"OK"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update job","tags":["Job"]}},"/v2/metrics":{"get":{"description":"Get metrics","responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"OK"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Get metrics","tags":["Metrics"]}},"/v2/notifications":{"get":{"description":"List notifications","parameters":[{"description":"List all notifications","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Filter by user ID","in":"query","name":"userId","schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.NotificationRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List notifications","tags":["Notification"]}},"/v2/notifications/{notificationId}":{"delete":{"description":"Delete notification","parameters":[{"description":"Notification ID","in":"path","name":"notificationId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete notification","tags":["Notification"]},"get":{"description":"Get notification","parameters":[{"description":"Notification ID","in":"path","name":"notificationId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.NotificationRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get notification","tags":["Notification"]},"post":{"description":"Update notification","parameters":[{"description":"Notification ID","in":"path","name":"notificationId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.NotificationUpdate"}}},"description":"Notification update","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update notification","tags":["Notification"]}},"/v2/register":{"get":{"description":"Register resource","responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Register resource","tags":["Register"]}},"/v2/resourceMigrations":{"get":{"description":"List resource migrations","parameters":[{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.ResourceMigrationRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List resource migrations","tags":["ResourceMigration"]},"post":{"description":"Create resource migration","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ResourceMigrationCreate"}}},"description":"Resource Migration Create","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ResourceMigrationCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create resource migration","tags":["ResourceMigration"]}},"/v2/resourceMigrations/{resourceMigrationId}":{"delete":{"description":"Delete resource migration","parameters":[{"description":"Resource Migration ID","in":"path","name":"resourceMigrationId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete resource migration","tags":["ResourceMigration"]},"get":{"description":"Get resource migration","parameters":[{"description":"Resource Migration ID","in":"path","name":"resourceMigrationId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ResourceMigrationRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get resource migration","tags":["ResourceMigration"]},"post":{"description":"Update resource migration","parameters":[{"description":"Resource Migration ID","in":"path","name":"resourceMigrationId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ResourceMigrationUpdate"}}},"description":"Resource Migration Update","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ResourceMigrationUpdated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update resource migration","tags":["ResourceMigration"]}},"/v2/snapshots":{"get":{"description":"List snapshots","parameters":[{"description":"Filter by VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.VmSnapshotRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"423":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Locked"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List snapshots","tags":["Snapshot"]},"post":{"description":"Create snapshot","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmSnapshotCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create snapshot","tags":["Snapshot"]}},"/v2/storageManagers":{"get":{"description":"Get storage manager list","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.SmRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get storage manager list","tags":["StorageManager"]}},"/v2/storageManagers/{storageManagerId}":{"delete":{"description":"Delete storage manager","parameters":[{"description":"Storage manager ID","in":"path","name":"storageManagerId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.SmDeleted"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete storage manager","tags":["StorageManager"]},"get":{"description":"Get storage manager","parameters":[{"description":"Storage manager ID","in":"path","name":"storageManagerId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.SmDeleted"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get storage manager","tags":["StorageManager"]}},"/v2/systemCapacities":{"get":{"description":"List system capacities","parameters":[{"description":"n","in":"query","name":"n","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.TimestampedSystemCapacities"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List system capacities","tags":["System"]}},"/v2/systemStats":{"get":{"description":"List system stats","parameters":[{"description":"n","in":"query","name":"n","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.TimestampedSystemStats"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List system stats","tags":["System"]}},"/v2/systemStatus":{"get":{"description":"List system stats","parameters":[{"description":"n","in":"query","name":"n","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.TimestampedSystemStatus"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List system stats","tags":["System"]}},"/v2/teams":{"get":{"description":"List teams","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Filter by user ID","in":"query","name":"userId","schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.TeamRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List teams","tags":["Team"]},"post":{"description":"Create team","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.TeamCreate"}}},"description":"Team","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.TeamRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create team","tags":["Team"]}},"/v2/teams/{teamId}":{"delete":{"description":"Delete team","parameters":[{"description":"Team ID","in":"path","name":"teamId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete team","tags":["Team"]},"get":{"description":"Get team","parameters":[{"description":"Team ID","in":"path","name":"teamId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.TeamRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get team","tags":["Team"]},"post":{"description":"Update team","parameters":[{"description":"Team ID","in":"path","name":"teamId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.TeamUpdate"}}},"description":"Team","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.TeamRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.BindingError"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update team","tags":["Team"]}},"/v2/users":{"get":{"description":"List users","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Discovery mode","in":"query","name":"discover","schema":{"type":"boolean"}},{"description":"Search query","in":"query","name":"search","schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.UserRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List users","tags":["User"]}},"/v2/users/{userId}":{"get":{"description":"Get user","parameters":[{"description":"User ID","in":"path","name":"userId","required":true,"schema":{"type":"string"}},{"description":"Discovery mode","in":"query","name":"discover","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.UserRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get user","tags":["User"]},"post":{"description":"Update user","parameters":[{"description":"User ID","in":"path","name":"userId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.UserUpdate"}}},"description":"User update","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.UserRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update user","tags":["User"]}},"/v2/users/{userId}/apiKeys":{"post":{"description":"Create API key","parameters":[{"description":"User ID","in":"path","name":"userId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ApiKeyCreate"}}},"description":"API key create body","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.ApiKeyCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create API key","tags":["User"]}},"/v2/vmActions":{"post":{"description":"Creates a new action","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmActionCreate"}}},"description":"actions body","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmActionCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Creates a new action","tags":["VmAction"]}},"/v2/vms":{"get":{"description":"List VMs","parameters":[{"description":"List all","in":"query","name":"all","schema":{"type":"boolean"}},{"description":"Filter by user ID","in":"query","name":"userId","schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"Number of items per page","in":"query","name":"pageSize","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.VmRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List VMs","tags":["VM"]},"post":{"description":"Create VM","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmCreate"}}},"description":"VM body","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmCreated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Create VM","tags":["VM"]}},"/v2/vms/{vmId}":{"delete":{"description":"Delete VM","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmDeleted"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete VM","tags":["VM"]},"get":{"description":"Get VM","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get VM","tags":["VM"]},"post":{"description":"Update VM","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmUpdate"}}},"description":"VM update","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmUpdated"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Update VM","tags":["VM"]}},"/v2/vms/{vmId}/snapshot/{snapshotId}":{"delete":{"description":"Delete snapshot","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}},{"description":"Snapshot ID","in":"path","name":"snapshotId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmSnapshotDeleted"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Delete snapshot","tags":["Snapshot"]},"post":{"description":"Get snapshot","parameters":[{"description":"VM ID","in":"path","name":"vmId","required":true,"schema":{"type":"string"}},{"description":"Snapshot ID","in":"path","name":"snapshotId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/body.VmSnapshotRead"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"Get snapshot","tags":["Snapshot"]}},"/v2/workerStatus":{"get":{"description":"List of worker status","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.WorkerStatusRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List worker status","tags":["Status"]}},"/v2/zones":{"get":{"description":"List zones","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/body.ZoneRead"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sys.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"ApiKeyAuth":[]},{"KeycloakOAuth":[]}],"summary":"List zones","tags":["Zone"]}}}, "openapi": "3.1.0" } \ No newline at end of file diff --git a/docs/api/v2/V2_swagger.yaml b/docs/api/v2/V2_swagger.yaml index d90732c2..8f47b029 100644 --- a/docs/api/v2/V2_swagger.yaml +++ b/docs/api/v2/V2_swagger.yaml @@ -161,6 +161,10 @@ components: maxLength: 30 minLength: 3 type: string + neverStale: + description: Boolean to make deployment never get disabled, despite being + stale + type: boolean private: description: 'Deprecated: Use Visibility instead.' type: boolean @@ -242,6 +246,8 @@ components: type: integer name: type: string + neverStale: + type: boolean ownerId: type: string pingResult: @@ -333,6 +339,8 @@ components: maxLength: 30 minLength: 3 type: string + neverStale: + type: boolean private: description: 'Deprecated: Use Visibility instead.' type: boolean @@ -1352,6 +1360,8 @@ components: maxLength: 30 minLength: 3 type: string + neverStale: + type: boolean ports: items: $ref: '#/components/schemas/body.PortCreate' @@ -1433,6 +1443,8 @@ components: type: string name: type: string + neverStale: + type: boolean ownerId: type: string ports: @@ -1503,6 +1515,8 @@ components: maxLength: 30 minLength: 3 type: string + neverStale: + type: boolean ports: items: $ref: '#/components/schemas/body.PortUpdate' @@ -1700,6 +1714,18 @@ paths: schema: $ref: '#/components/schemas/sys.ErrorResponse' description: Bad Request + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/sys.ErrorResponse' + description: Forbidden + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/sys.ErrorResponse' + description: Not Found "500": content: application/json: @@ -1746,6 +1772,12 @@ paths: schema: $ref: '#/components/schemas/sys.ErrorResponse' description: Unauthorized + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/sys.ErrorResponse' + description: Forbidden "404": content: application/json: @@ -1827,6 +1859,18 @@ paths: schema: $ref: '#/components/schemas/sys.ErrorResponse' description: Bad Request + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/sys.ErrorResponse' + description: Forbidden + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/sys.ErrorResponse' + description: Not Found "500": content: application/json: @@ -3814,6 +3858,12 @@ paths: schema: $ref: '#/components/schemas/sys.ErrorResponse' description: Unauthorized + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/sys.ErrorResponse' + description: Forbidden "404": content: application/json: @@ -3959,6 +4009,12 @@ paths: schema: $ref: '#/components/schemas/sys.ErrorResponse' description: Unauthorized + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/sys.ErrorResponse' + description: Forbidden "404": content: application/json: diff --git a/dto/v2/body/deployment.go b/dto/v2/body/deployment.go index a5aa0ff7..b770676b 100644 --- a/dto/v2/body/deployment.go +++ b/dto/v2/body/deployment.go @@ -30,6 +30,8 @@ type DeploymentRead struct { CustomDomain *CustomDomainRead `json:"customDomain,omitempty"` Visibility string `json:"visibility"` + NeverStale bool `json:"neverStale" bson:"neverStale" binding:"omitempty,boolean"` + // Deprecated: Use Visibility instead. Private bool `json:"private"` @@ -60,6 +62,9 @@ type DeploymentCreate struct { Args []string `json:"args" bson:"args" binding:"omitempty,min=0,max=100,dive,min=0,max=100"` Visibility string `json:"visibility" bson:"visibility" binding:"omitempty,oneof=public private auth"` + // Boolean to make deployment never get disabled, despite being stale + NeverStale bool `json:"neverStale" bson:"neverStale" binding:"omitempty,boolean"` + // Deprecated: Use Visibility instead. Private bool `json:"private" bson:"private" binding:"omitempty,boolean"` @@ -87,6 +92,8 @@ type DeploymentUpdate struct { Args *[]string `json:"args,omitempty" bson:"args,omitempty" binding:"omitempty,min=0,max=100,dive,min=0,max=100"` Visibility *string `json:"visibility" bson:"visibility" binding:"omitempty,oneof=public private auth"` + NeverStale *bool `json:"neverStale,omitempty" bson:"neverStale" binding:"omitempty,boolean"` + // Deprecated: Use Visibility instead. Private *bool `json:"private,omitempty" bson:"private,omitempty" binding:"omitempty,boolean"` diff --git a/dto/v2/body/vm.go b/dto/v2/body/vm.go index 80766dd3..30c3688f 100644 --- a/dto/v2/body/vm.go +++ b/dto/v2/body/vm.go @@ -15,6 +15,8 @@ type VmRead struct { RepairedAt *time.Time `json:"repairedAt,omitempty"` AccessedAt time.Time `json:"accessedAt"` + NeverStale bool `json:"neverStale"` + Specs VmSpecs `json:"specs"` Ports []PortRead `json:"ports"` GPU *VmGpuLease `json:"gpu,omitempty"` @@ -36,13 +38,16 @@ type VmCreate struct { DiskSize int `json:"diskSize" bson:"diskSize" binding:"required,min=10"` Zone *string `json:"zone,omitempty" bson:"zone,omitempty" binding:"omitempty"` + + NeverStale bool `json:"neverStale" bson:"neverStale" binding:"omitempty,boolean"` } type VmUpdate struct { - Name *string `json:"name,omitempty" bson:"name,omitempty" binding:"omitempty,rfc1035,min=3,max=30,vm_name"` - Ports *[]PortUpdate `json:"ports,omitempty" bson:"ports,omitempty" binding:"omitempty,port_list_names,port_list_numbers,port_list_http_proxies,min=0,max=10,dive"` - CpuCores *int `json:"cpuCores,omitempty" bson:"cpuCores,omitempty" binding:"omitempty,min=1"` - RAM *int `json:"ram,omitempty" bson:"ram,omitempty" binding:"omitempty,min=1"` + Name *string `json:"name,omitempty" bson:"name,omitempty" binding:"omitempty,rfc1035,min=3,max=30,vm_name"` + Ports *[]PortUpdate `json:"ports,omitempty" bson:"ports,omitempty" binding:"omitempty,port_list_names,port_list_numbers,port_list_http_proxies,min=0,max=10,dive"` + CpuCores *int `json:"cpuCores,omitempty" bson:"cpuCores,omitempty" binding:"omitempty,min=1"` + RAM *int `json:"ram,omitempty" bson:"ram,omitempty" binding:"omitempty,min=1"` + NeverStale *bool `json:"neverStale,omitempty" bson:"neverStale" binding:"omitempty,boolean"` } type VmUpdateOwner struct { diff --git a/export/types/v2/body/index.ts b/export/types/v2/body/index.ts index 6bfbacd6..ef1e853e 100644 --- a/export/types/v2/body/index.ts +++ b/export/types/v2/body/index.ts @@ -45,6 +45,7 @@ export interface DeploymentRead { healthCheckPath?: string; customDomain?: CustomDomainRead; visibility: string; + neverStale: boolean; /** * Deprecated: Use Visibility instead. */ @@ -71,6 +72,10 @@ export interface DeploymentCreate { initCommands: string[]; args: string[]; visibility: string; + /** + * Boolean to make deployment never get disabled, despite being stale + */ + neverStale: boolean; /** * Deprecated: Use Visibility instead. */ @@ -98,6 +103,7 @@ export interface DeploymentUpdate { initCommands?: string[]; args?: string[]; visibility?: string; + neverStale?: boolean; /** * Deprecated: Use Visibility instead. */ @@ -759,6 +765,7 @@ export interface VmRead { updatedAt?: string; repairedAt?: string; accessedAt: string; + neverStale: boolean; specs: VmSpecs; ports: PortRead[]; gpu?: VmGpuLease; @@ -775,12 +782,14 @@ export interface VmCreate { ram: number /* int */; diskSize: number /* int */; zone?: string; + neverStale: boolean; } export interface VmUpdate { name?: string; ports?: PortUpdate[]; cpuCores?: number /* int */; ram?: number /* int */; + neverStale?: boolean; } export interface VmUpdateOwner { newOwnerId: string; diff --git a/models/model/deployment.go b/models/model/deployment.go index fc1f1f22..59f1e8fb 100644 --- a/models/model/deployment.go +++ b/models/model/deployment.go @@ -23,6 +23,8 @@ type Deployment struct { DeletedAt time.Time `bson:"deletedAt"` AccessedAt time.Time `bson:"accessedAt"` + NeverStale bool `bson:"neverStale"` + Activities map[string]Activity `bson:"activities"` Apps map[string]App `bson:"apps"` diff --git a/models/model/deployment_convert.go b/models/model/deployment_convert.go index 58c2610a..b7290195 100644 --- a/models/model/deployment_convert.go +++ b/models/model/deployment_convert.go @@ -2,11 +2,12 @@ package model import ( "fmt" + "strconv" + "github.com/kthcloud/go-deploy/dto/v2/body" "github.com/kthcloud/go-deploy/pkg/log" "github.com/kthcloud/go-deploy/utils" "golang.org/x/net/idna" - "strconv" ) // ToDTO converts a Deployment to a body.DeploymentRead DTO. @@ -129,6 +130,8 @@ func (deployment *Deployment) ToDTO(smURL *string, externalPort *int, teams []st CustomDomain: customDomain, Visibility: app.Visibility, + NeverStale: deployment.NeverStale, + Status: status, Error: deploymentError, ReplicaStatus: replicaStatus, @@ -222,6 +225,8 @@ func (p *DeploymentCreateParams) FromDTO(dto *body.DeploymentCreate, fallbackZon } else { p.Visibility = dto.Visibility } + + p.NeverStale = dto.NeverStale } // FromDTO converts body.DeploymentUpdate DTO to DeploymentUpdateParams. @@ -277,4 +282,5 @@ func (p *DeploymentUpdateParams) FromDTO(dto *body.DeploymentUpdate, deploymentT p.PingPath = dto.HealthCheckPath p.Replicas = dto.Replicas p.Visibility = dto.Visibility + p.NeverStale = dto.NeverStale } diff --git a/models/model/deployment_params.go b/models/model/deployment_params.go index 9d2f0892..d94dc569 100644 --- a/models/model/deployment_params.go +++ b/models/model/deployment_params.go @@ -18,6 +18,8 @@ type DeploymentCreateParams struct { CustomDomain *string Visibility string + NeverStale bool + Zone string } @@ -38,6 +40,8 @@ type DeploymentUpdateParams struct { PingPath *string Replicas *int Visibility *string + + NeverStale *bool } type DeploymentUpdateOwnerParams struct { diff --git a/models/model/vm.go b/models/model/vm.go index 8f61d31d..5965ddd4 100644 --- a/models/model/vm.go +++ b/models/model/vm.go @@ -18,6 +18,8 @@ type VM struct { DeletedAt time.Time `bson:"deletedAt,omitempty"` AccessedAt time.Time `bson:"accessedAt"` + NeverStale bool `bson:"neverStale"` + SshPublicKey string `bson:"sshPublicKey"` PortMap map[string]Port `bson:"portMap"` Specs VmSpecs `bson:"specs"` diff --git a/models/model/vm_convert.go b/models/model/vm_convert.go index d12a161c..2b820e00 100644 --- a/models/model/vm_convert.go +++ b/models/model/vm_convert.go @@ -2,10 +2,11 @@ package model import ( "fmt" + "time" + "github.com/kthcloud/go-deploy/dto/v2/body" "github.com/kthcloud/go-deploy/pkg/subsystems" "github.com/kthcloud/go-deploy/utils" - "time" ) // ToDTOv2 converts a VM to a body.VmRead. @@ -91,6 +92,8 @@ func (vm *VM) ToDTOv2(gpuLease *GpuLease, teams []string, externalPort *int, ssh RepairedAt: utils.NonZeroOrNil(vm.RepairedAt), AccessedAt: vm.AccessedAt, + NeverStale: vm.NeverStale, + Specs: body.VmSpecs{ CpuCores: vm.Specs.CpuCores, RAM: vm.Specs.RAM, @@ -113,6 +116,7 @@ func (p VmCreateParams) FromDTOv2(dto *body.VmCreate, fallbackZone *string) VmCr p.RAM = dto.RAM p.DiskSize = dto.DiskSize p.PortMap = make(map[string]PortCreateParams) + p.NeverStale = dto.NeverStale if dto.Zone == nil { p.Zone = *fallbackZone @@ -147,6 +151,7 @@ func (p VmUpdateParams) FromDTOv2(dto *body.VmUpdate) VmUpdateParams { p.Name = dto.Name p.CpuCores = dto.CpuCores p.RAM = dto.RAM + p.NeverStale = dto.NeverStale if dto.Ports != nil { portMap := make(map[string]PortUpdateParams) diff --git a/models/model/vm_params.go b/models/model/vm_params.go index 79c1d070..8fe35e63 100644 --- a/models/model/vm_params.go +++ b/models/model/vm_params.go @@ -17,6 +17,8 @@ type VmCreateParams struct { CpuCores int RAM int DiskSize int + + NeverStale bool } type VmUpdateParams struct { @@ -26,6 +28,7 @@ type VmUpdateParams struct { PortMap *map[string]PortUpdateParams CpuCores *int RAM *int + NeverStale *bool } type VmUpdateOwnerParams struct { diff --git a/pkg/db/resources/deployment_repo/db.go b/pkg/db/resources/deployment_repo/db.go index ae8b637d..a34b50bc 100644 --- a/pkg/db/resources/deployment_repo/db.go +++ b/pkg/db/resources/deployment_repo/db.go @@ -69,6 +69,8 @@ func (client *Client) Create(id, ownerID string, params *model.DeploymentCreateP DeletedAt: time.Time{}, AccessedAt: time.Now(), + NeverStale: params.NeverStale, + Activities: map[string]model.Activity{model.ActivityBeingCreated: { Name: model.ActivityBeingCreated, CreatedAt: time.Now(), @@ -141,6 +143,7 @@ func (client *Client) UpdateWithParams(id string, params *model.DeploymentUpdate db.AddIfNotNil(&setUpdate, "apps.main.ram", params.RAM) db.AddIfNotNil(&setUpdate, "apps.main.replicas", params.Replicas) db.AddIfNotNil(&setUpdate, "apps.main.visibility", params.Visibility) + db.AddIfNotNil(&setUpdate, "neverStale", params.NeverStale) err = client.UpdateWithBsonByID(id, bson.D{ diff --git a/pkg/db/resources/vm_repo/db.go b/pkg/db/resources/vm_repo/db.go index 72881434..41cf241e 100644 --- a/pkg/db/resources/vm_repo/db.go +++ b/pkg/db/resources/vm_repo/db.go @@ -57,6 +57,8 @@ func (client *Client) Create(id, owner string, params *model.VmCreateParams) (*m DeletedAt: time.Time{}, AccessedAt: time.Now(), + NeverStale: params.NeverStale, + SshPublicKey: params.SshPublicKey, PortMap: portMap, Specs: model.VmSpecs{ @@ -220,6 +222,7 @@ func (client *Client) UpdateWithParams(id string, params *model.VmUpdateParams) db.AddIfNotNil(&setUpdate, "ownerId", params.OwnerID) db.AddIfNotNil(&setUpdate, "specs.cpuCores", params.CpuCores) db.AddIfNotNil(&setUpdate, "specs.ram", params.RAM) + db.AddIfNotNil(&setUpdate, "neverStale", params.NeverStale) err := client.UpdateWithBsonByID(id, bson.D{ diff --git a/pkg/services/cleaner/stale_resource_cleaner.go b/pkg/services/cleaner/stale_resource_cleaner.go index 549bbaf9..32c52902 100644 --- a/pkg/services/cleaner/stale_resource_cleaner.go +++ b/pkg/services/cleaner/stale_resource_cleaner.go @@ -1,6 +1,8 @@ package cleaner import ( + "time" + bodyV2 "github.com/kthcloud/go-deploy/dto/v2/body" "github.com/kthcloud/go-deploy/models/model" "github.com/kthcloud/go-deploy/models/version" @@ -10,7 +12,6 @@ import ( "github.com/kthcloud/go-deploy/pkg/log" "github.com/kthcloud/go-deploy/pkg/subsystems" "github.com/kthcloud/go-deploy/service" - "time" ) func staleResourceCleaner() error { @@ -21,7 +22,7 @@ func staleResourceCleaner() error { } for _, deployment := range deployments { - if deployment.GetMainApp().Replicas == 0 { + if deployment.NeverStale || deployment.GetMainApp().Replicas == 0 { continue } @@ -53,7 +54,7 @@ func staleResourceCleaner() error { } for _, vm := range vms { - if k8sVM := &vm.Subsystems.K8s.VM; subsystems.NotCreated(k8sVM) || !k8sVM.Running { + if k8sVM := &vm.Subsystems.K8s.VM; vm.NeverStale || subsystems.NotCreated(k8sVM) || !k8sVM.Running { continue } diff --git a/routers/api/v2/deployment.go b/routers/api/v2/deployment.go index 46756dee..debff7b1 100644 --- a/routers/api/v2/deployment.go +++ b/routers/api/v2/deployment.go @@ -153,6 +153,8 @@ func ListDeployments(c *gin.Context) { // @Param body body body.DeploymentCreate true "Deployment body" // @Success 200 {object} body.DeploymentRead // @Failure 400 {object} sys.ErrorResponse +// @Failure 404 {object} sys.ErrorResponse +// @Failure 403 {object} sys.ErrorResponse // @Failure 500 {object} sys.ErrorResponse // @Router /v2/deployments [post] func CreateDeployment(c *gin.Context) { @@ -212,6 +214,11 @@ func CreateDeployment(c *gin.Context) { return } + if requestBody.NeverStale && !auth.User.IsAdmin { + context.Forbidden("User is not allowed to create deployment with neverStale attribute set as true") + return + } + err = deployV2.Deployments().CheckQuota("", &opts.QuotaOptions{Create: &requestBody}) if err != nil { var quotaExceededErr sErrors.QuotaExceededError @@ -257,6 +264,7 @@ func CreateDeployment(c *gin.Context) { // @Failure 400 {object} sys.ErrorResponse // @Failure 401 {object} sys.ErrorResponse // @Failure 404 {object} sys.ErrorResponse +// @Failure 403 {object} sys.ErrorResponse // @Failure 500 {object} sys.ErrorResponse // @Router /v2/deployments/{deploymentId} [delete] func DeleteDeployment(c *gin.Context) { @@ -338,6 +346,8 @@ func DeleteDeployment(c *gin.Context) { // @Param body body body.DeploymentUpdate true "Deployment update" // @Success 200 {object} body.DeploymentUpdated // @Failure 400 {object} sys.ErrorResponse +// @Failure 404 {object} sys.ErrorResponse +// @Failure 403 {object} sys.ErrorResponse // @Failure 500 {object} sys.ErrorResponse // @Router /v2/deployments/{deploymentId} [post] func UpdateDeployment(c *gin.Context) { @@ -386,6 +396,11 @@ func UpdateDeployment(c *gin.Context) { } } + if requestBody.NeverStale != nil && !auth.User.IsAdmin { + context.Forbidden("User is not allowed to modify the neverStale value") + return + } + err = deployV2.Deployments().CheckQuota(requestURI.DeploymentID, &opts.QuotaOptions{Update: &requestBody}) if err != nil { var quotaExceededErr sErrors.QuotaExceededError diff --git a/routers/api/v2/resource_migration.go b/routers/api/v2/resource_migration.go index 456fca12..25aaa698 100644 --- a/routers/api/v2/resource_migration.go +++ b/routers/api/v2/resource_migration.go @@ -321,10 +321,5 @@ func DeleteResourceMigration(c *gin.Context) { return } - if err != nil { - context.ServerError(err, ErrInternal) - return - } - context.OkNoContent() } diff --git a/routers/api/v2/vm.go b/routers/api/v2/vm.go index c0a490c8..b7087195 100644 --- a/routers/api/v2/vm.go +++ b/routers/api/v2/vm.go @@ -161,6 +161,7 @@ func ListVMs(c *gin.Context) { // @Success 200 {object} body.VmCreated // @Failure 400 {object} sys.ErrorResponse // @Failure 401 {object} sys.ErrorResponse +// @Failure 403 {object} sys.ErrorResponse // @Failure 404 {object} sys.ErrorResponse // @Failure 500 {object} sys.ErrorResponse // @Router /v2/vms [post] @@ -210,6 +211,11 @@ func CreateVM(c *gin.Context) { } } + if requestBody.NeverStale && !auth.User.IsAdmin { + context.Forbidden("User is not allowed to create VM with neverStale attribute set as true") + return + } + err = deployV2.VMs().CheckQuota("", auth.User.ID, &auth.GetEffectiveRole().Quotas, opts.QuotaOpts{Create: &requestBody}) if err != nil { var quotaExceedErr sErrors.QuotaExceededError @@ -318,6 +324,7 @@ func DeleteVM(c *gin.Context) { // @Success 200 {object} body.VmUpdated // @Failure 400 {object} sys.ErrorResponse // @Failure 401 {object} sys.ErrorResponse +// @Failure 403 {object} sys.ErrorResponse // @Failure 404 {object} sys.ErrorResponse // @Failure 500 {object} sys.ErrorResponse // @Router /v2/vms/{vmId} [post] @@ -386,6 +393,11 @@ func UpdateVM(c *gin.Context) { } } + if requestBody.NeverStale != nil && !auth.User.IsAdmin { + context.Forbidden("User is not allowed to modify the neverStale value") + return + } + err = deployV2.VMs().CheckQuota(vm.ID, auth.User.ID, &auth.GetEffectiveRole().Quotas, opts.QuotaOpts{Update: &requestBody}) if err != nil { var quotaExceededErr sErrors.QuotaExceededError