{"openapi":"3.0.2","info":{"title":"Project Service","description":"Service for managing projects.","version":"2.1.0"},"paths":{"/v1/health/":{"get":{"tags":["Health"],"summary":"Healthcheck if database is online.","description":"Return response that represents status of the database.","operationId":"get_db_status_v1_health__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/projects/":{"get":{"tags":["Projects"],"summary":"List all projects.","description":"List all projects.","operationId":"list_projects_v1_projects__get","parameters":[{"required":false,"schema":{"title":"Name","type":"string"},"name":"name","in":"query"},{"required":false,"schema":{"title":"Code","type":"string"},"name":"code","in":"query"},{"required":false,"schema":{"title":"Code Any","type":"string"},"name":"code_any","in":"query"},{"required":false,"schema":{"title":"Description","type":"string"},"name":"description","in":"query"},{"required":false,"schema":{"title":"Created At Start","type":"string","format":"date-time"},"name":"created_at_start","in":"query"},{"required":false,"schema":{"title":"Created At End","type":"string","format":"date-time"},"name":"created_at_end","in":"query"},{"required":false,"schema":{"title":"Tags All","type":"string"},"name":"tags_all","in":"query"},{"required":false,"schema":{"title":"Is Discoverable","type":"boolean"},"name":"is_discoverable","in":"query"},{"required":false,"schema":{"title":"Ids","type":"string"},"name":"ids","in":"query"},{"required":false,"schema":{"$ref":"#/components/schemas/ProjectSortByFields"},"name":"sort_by","in":"query"},{"required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/SortingOrder"}],"default":"asc"},"name":"sort_order","in":"query"},{"required":false,"schema":{"title":"Page","minimum":0.0,"type":"integer","default":0},"name":"page","in":"query"},{"required":false,"schema":{"title":"Page Size","minimum":1.0,"type":"integer","default":20},"name":"page_size","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectListResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Projects"],"summary":"Create a new project.","description":"Create a new project.","operationId":"create_project_v1_projects__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreateSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}":{"get":{"tags":["Projects"],"summary":"Get a project by id or code.","description":"Get a project by id or code.","operationId":"get_project_v1_projects__project_id__get","parameters":[{"required":true,"schema":{"title":"Project Id","anyOf":[{"type":"string","format":"uuid"},{"type":"string"}]},"name":"project_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Projects"],"summary":"Delete a project.","description":"Delete a project.","operationId":"delete_project_v1_projects__project_id__delete","parameters":[{"required":true,"schema":{"title":"Project Id","type":"string","format":"uuid"},"name":"project_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Projects"],"summary":"Update a project.","description":"Update a project.","operationId":"update_project_v1_projects__project_id__patch","parameters":[{"required":true,"schema":{"title":"Project Id","type":"string","format":"uuid"},"name":"project_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/is_discoverable"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/logo":{"post":{"tags":["Projects"],"summary":"Upload a logo for a project.","description":"Upload a logo for a project.","operationId":"upload_project_logo_v1_projects__project_id__logo_post","parameters":[{"required":true,"schema":{"title":"Project Id","type":"string","format":"uuid"},"name":"project_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectLogoUploadSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/resource-requests/":{"get":{"tags":["Resource Requests"],"summary":"List all resource requests.","description":"List all resource requests.","operationId":"list_resource_requests_v1_resource_requests__get","parameters":[{"required":false,"schema":{"title":"Page","minimum":0.0,"type":"integer","default":0},"name":"page","in":"query"},{"required":false,"schema":{"title":"Page Size","minimum":1.0,"type":"integer","default":20},"name":"page_size","in":"query"},{"required":false,"schema":{"$ref":"#/components/schemas/ResourceRequestSortByFields"},"name":"sort_by","in":"query"},{"required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/SortingOrder"}],"default":"asc"},"name":"sort_order","in":"query"},{"required":false,"schema":{"title":"Username","type":"string"},"name":"username","in":"query"},{"required":false,"schema":{"title":"Email","type":"string"},"name":"email","in":"query"},{"required":false,"schema":{"title":"Project Code","type":"string"},"name":"project_code","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRequestListResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Resource Requests"],"summary":"Create a new resource request.","description":"Create a new resource request.","operationId":"create_resource_request_v1_resource_requests__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRequestCreateSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRequestResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/resource-requests/{resource_request_id}":{"get":{"tags":["Resource Requests"],"summary":"Get a resource request by id.","description":"Get a resource request by id.","operationId":"get_resource_request_v1_resource_requests__resource_request_id__get","parameters":[{"required":true,"schema":{"title":"Resource Request Id","type":"string","format":"uuid"},"name":"resource_request_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRequestResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Resource Requests"],"summary":"Delete a resource request.","description":"Delete a resource request.","operationId":"delete_resource_request_v1_resource_requests__resource_request_id__delete","parameters":[{"required":true,"schema":{"title":"Resource Request Id","type":"string","format":"uuid"},"name":"resource_request_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Resource Requests"],"summary":"Update a resource request.","description":"Update a resource request.","operationId":"update_resource_request_v1_resource_requests__resource_request_id__patch","parameters":[{"required":true,"schema":{"title":"Resource Request Id","type":"string","format":"uuid"},"name":"resource_request_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/vm_connections"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceRequestResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workbenches/":{"get":{"tags":["Workbenches"],"summary":"List all workbenches.","description":"List all workbenches.","operationId":"list_workbenches_v1_workbenches__get","parameters":[{"required":false,"schema":{"title":"Project Id","type":"string"},"name":"project_id","in":"query"},{"required":false,"schema":{"title":"Page","minimum":0.0,"type":"integer","default":0},"name":"page","in":"query"},{"required":false,"schema":{"title":"Page Size","minimum":1.0,"type":"integer","default":20},"name":"page_size","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkbenchListResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Workbenches"],"summary":"Create a new workbench.","description":"Create a new workbench.","operationId":"create_workbench_v1_workbenches__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkbenchCreateSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkbenchResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workbenches/{workbench_id}":{"get":{"tags":["Workbenches"],"summary":"Get a workbench by id.","description":"Get a workbench by id.","operationId":"get_workbench_v1_workbenches__workbench_id__get","parameters":[{"required":true,"schema":{"title":"Workbench Id","anyOf":[{"type":"string","format":"uuid"},{"type":"string"}]},"name":"workbench_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkbenchResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Workbenches"],"summary":"Delete a workbench.","description":"Delete a workbench.","operationId":"delete_workbench_v1_workbenches__workbench_id__delete","parameters":[{"required":true,"schema":{"title":"Workbench Id","type":"string","format":"uuid"},"name":"workbench_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Workbenches"],"summary":"Update a workbench.","description":"Update a workbench.","operationId":"update_workbench_v1_workbenches__workbench_id__patch","parameters":[{"required":true,"schema":{"title":"Workbench Id","type":"string","format":"uuid"},"name":"workbench_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/deployed_by_user_id"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkbenchResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"EmbeddedProjectSchema":{"title":"EmbeddedProjectSchema","required":["code","name"],"type":"object","properties":{"code":{"title":"Code","type":"string"},"name":{"title":"Name","type":"string"}},"description":"Project schema embedded into resource request."},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ProjectCreateSchema":{"title":"ProjectCreateSchema","required":["code","name"],"type":"object","properties":{"code":{"title":"Code","maxLength":32,"minLength":3,"pattern":"^[a-z][a-z0-9]*$","type":"string"},"name":{"title":"Name","maxLength":256,"minLength":3,"type":"string"},"description":{"title":"Description","maxLength":256,"type":"string","default":""},"logo_name":{"title":"Logo Name","maxLength":40,"type":"string"},"tags":{"title":"Tags","type":"array","items":{"maxLength":256,"type":"string"},"default":[]},"system_tags":{"title":"System Tags","type":"array","items":{"maxLength":256,"type":"string"},"default":[]},"is_discoverable":{"title":"Is Discoverable","type":"boolean","default":false}},"description":"Project schema used for creation."},"ProjectListResponseSchema":{"title":"ProjectListResponseSchema","required":["num_of_pages","page","total","result"],"type":"object","properties":{"num_of_pages":{"title":"Num Of Pages","type":"integer"},"page":{"title":"Page","type":"integer"},"total":{"title":"Total","type":"integer"},"result":{"title":"Result","type":"array","items":{"$ref":"#/components/schemas/ProjectResponseSchema"}}},"description":"Default schema for multiple projects in response."},"ProjectLogoUploadSchema":{"title":"ProjectLogoUploadSchema","required":["base64"],"type":"object","properties":{"base64":{"title":"Base64","maxLength":16777216,"minLength":32,"type":"string"}},"description":"Project logo schema used for image upload."},"ProjectResponseSchema":{"title":"ProjectResponseSchema","required":["code","name","id","created_at"],"type":"object","properties":{"code":{"title":"Code","maxLength":32,"minLength":3,"pattern":"^[a-z][a-z0-9]*$","type":"string"},"name":{"title":"Name","maxLength":256,"minLength":3,"type":"string"},"description":{"title":"Description","maxLength":256,"type":"string","default":""},"logo_name":{"title":"Logo Name","maxLength":40,"type":"string"},"tags":{"title":"Tags","type":"array","items":{"maxLength":256,"type":"string"},"default":[]},"system_tags":{"title":"System Tags","type":"array","items":{"maxLength":256,"type":"string"},"default":[]},"is_discoverable":{"title":"Is Discoverable","type":"boolean","default":false},"id":{"title":"Id","type":"string","format":"uuid"},"created_at":{"title":"Created At","type":"string","format":"date-time"},"image_url":{"title":"Image Url","maxLength":2083,"minLength":1,"type":"string","format":"uri"}},"description":"Default schema for single project in response."},"ProjectSortByFields":{"title":"ProjectSortByFields","enum":["code","name","created_at"],"type":"string","description":"Fields by which projects can be sorted."},"ResourceRequestCreateSchema":{"title":"ResourceRequestCreateSchema","required":["project_id","user_id","email","username","requested_for"],"type":"object","properties":{"project_id":{"title":"Project Id","type":"string","format":"uuid"},"user_id":{"title":"User Id","type":"string"},"email":{"title":"Email","type":"string","format":"email"},"username":{"title":"Username","type":"string"},"requested_for":{"title":"Requested For","type":"string"},"completed_at":{"title":"Completed At","type":"string","format":"date-time"},"message":{"title":"Message","type":"string"},"vm_connections":{"title":"Vm Connections","type":"object"}},"description":"Resource request schema used for creation."},"ResourceRequestListResponseSchema":{"title":"ResourceRequestListResponseSchema","required":["num_of_pages","page","total","result"],"type":"object","properties":{"num_of_pages":{"title":"Num Of Pages","type":"integer"},"page":{"title":"Page","type":"integer"},"total":{"title":"Total","type":"integer"},"result":{"title":"Result","type":"array","items":{"$ref":"#/components/schemas/ResourceRequestResponseSchema"}}},"description":"Default schema for multiple resource requests in response."},"ResourceRequestResponseSchema":{"title":"ResourceRequestResponseSchema","required":["project_id","user_id","email","username","requested_for","id","project","requested_at"],"type":"object","properties":{"project_id":{"title":"Project Id","type":"string","format":"uuid"},"user_id":{"title":"User Id","type":"string"},"email":{"title":"Email","type":"string","format":"email"},"username":{"title":"Username","type":"string"},"requested_for":{"title":"Requested For","type":"string"},"completed_at":{"title":"Completed At","type":"string","format":"date-time"},"message":{"title":"Message","type":"string"},"vm_connections":{"title":"Vm Connections","type":"object"},"id":{"title":"Id","type":"string","format":"uuid"},"project":{"$ref":"#/components/schemas/EmbeddedProjectSchema"},"requested_at":{"title":"Requested At","type":"string","format":"date-time"}},"description":"Default schema for single resource request in response."},"ResourceRequestSortByFields":{"title":"ResourceRequestSortByFields","enum":["project_id","user_id","username","email","requested_for","completed_at","requested_at","project.name","project.code"],"type":"string","description":"Fields by which resource requests can be sorted."},"SortingOrder":{"title":"SortingOrder","enum":["asc","desc"],"type":"string","description":"Available sorting orders."},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}},"WorkbenchCreateSchema":{"title":"WorkbenchCreateSchema","required":["project_id"],"type":"object","properties":{"project_id":{"title":"Project Id","type":"string","format":"uuid"},"resource":{"title":"Resource","type":"string","default":""},"deployed_by_user_id":{"title":"Deployed By User Id","type":"string","default":""}},"description":"Workbench schema used for creation."},"WorkbenchListResponseSchema":{"title":"WorkbenchListResponseSchema","required":["num_of_pages","page","total","result"],"type":"object","properties":{"num_of_pages":{"title":"Num Of Pages","type":"integer"},"page":{"title":"Page","type":"integer"},"total":{"title":"Total","type":"integer"},"result":{"title":"Result","type":"array","items":{"$ref":"#/components/schemas/WorkbenchResponseSchema"}}},"description":"Default schema for multiple workbenches in response."},"WorkbenchResponseSchema":{"title":"WorkbenchResponseSchema","required":["project_id","id","deployed_at"],"type":"object","properties":{"project_id":{"title":"Project Id","type":"string","format":"uuid"},"resource":{"title":"Resource","type":"string","default":""},"deployed_by_user_id":{"title":"Deployed By User Id","type":"string","default":""},"id":{"title":"Id","type":"string","format":"uuid"},"deployed_at":{"title":"Deployed At","type":"string","format":"date-time"}},"description":"Default schema for single workbench in response."},"deployed_by_user_id":{"title":"deployed_by_user_id","type":"object","properties":{"project_id":{"title":"Project Id","type":"string","format":"uuid"},"resource":{"title":"Resource","type":"string"},"deployed_by_user_id":{"title":"Deployed By User Id","type":"string"}},"description":"Workbench schema used for update."},"is_discoverable":{"title":"is_discoverable","type":"object","properties":{"code":{"title":"Code","maxLength":32,"minLength":3,"pattern":"^[a-z][a-z0-9]*$","type":"string"},"name":{"title":"Name","maxLength":256,"minLength":3,"type":"string"},"description":{"title":"Description","maxLength":256,"type":"string"},"logo_name":{"title":"Logo Name","maxLength":40,"type":"string"},"tags":{"title":"Tags","type":"array","items":{"maxLength":256,"type":"string"}},"system_tags":{"title":"System Tags","type":"array","items":{"maxLength":256,"type":"string"}},"is_discoverable":{"title":"Is Discoverable","type":"boolean"}},"description":"Project schema used for update."},"vm_connections":{"title":"vm_connections","type":"object","properties":{"project_id":{"title":"Project Id","type":"string","format":"uuid"},"user_id":{"title":"User Id","type":"string"},"email":{"title":"Email","type":"string","format":"email"},"username":{"title":"Username","type":"string"},"requested_for":{"title":"Requested For","type":"string"},"completed_at":{"title":"Completed At","type":"string","format":"date-time"},"message":{"title":"Message","type":"string"},"vm_connections":{"title":"Vm Connections","type":"object"}},"description":"Resource request schema used for update."}}}}