{ "swagger": "2.0", "info": { "description": "AI Train API.", "title": "AI Train API", "contact": {}, "license": {}, "version": "0.2" }, "host": "localhost:38080", "basePath": "/api", "paths": { "/beta/classroom/create": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Add new Classroom information into database", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Classroom" ], "summary": "Add new Classroom information", "parameters": [ { "description": "classroom information", "name": "classroom", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/docs.AddClassroom" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericOKResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/classroom/delete/{id}": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete one classroom", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Classroom" ], "summary": "Delete one classroom", "parameters": [ { "type": "string", "description": "classroom uuid, eg: 131ba8a9-b60b-44f9-83b5-46590f756f41", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericOKResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/classroom/get/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get one classroom information by id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Classroom" ], "summary": "Get one classroom information by id", "parameters": [ { "type": "string", "description": "classroom uuid, eg: 131ba8a9-b60b-44f9-83b5-46590f756f41", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.GetClassroomResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/classroom/list": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "List all public and non-public classroom", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Classroom" ], "summary": "List all public and non-public classroom", "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.SimpleListClassroomResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "List someone's all public classroom", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Classroom" ], "summary": "List someone's all public classroom", "parameters": [ { "description": "search user public classroom", "name": "list_user", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/docs.OauthUser" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.ListClassroomResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/classroom/update": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "update existClassroom information", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Classroom" ], "summary": "update exist Classroom information", "parameters": [ { "description": "classroom information", "name": "classroom", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/docs.UpdateClassroom" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericOKResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/classroom/upload": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Upload account csv file", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "Classroom" ], "summary": "Upload account csv file", "parameters": [ { "type": "file", "description": "account file", "name": "file", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.UploadUserResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/course/create": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Add new course information into database", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Course" ], "summary": "Add new course information", "parameters": [ { "description": "course information", "name": "course", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/docs.AddCourseBeta" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericOKResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/course/delete/{id}": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "All associated job, Deployment and svc in kubernetes are also deleted.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Course" ], "summary": "Delete course information", "parameters": [ { "type": "string", "description": "course uuid, eg: 131ba8a9-b60b-44f9-83b5-46590f756f41", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericOKResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/course/get/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get one courses information by course id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Course" ], "summary": "Get one courses information by course id", "parameters": [ { "type": "string", "description": "course uuid, eg: 131ba8a9-b60b-44f9-83b5-46590f756f41", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.GetCourseResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/course/level/{level}": { "get": { "description": "List basic or advance courses information", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Course" ], "summary": "List basic or advance courses information", "parameters": [ { "type": "string", "description": "basic or advance", "name": "level", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.ListCourseResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/course/list": { "get": { "description": "get all course information", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Course" ], "summary": "List all course information", "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.ListCourseResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "List someone's all courses information", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Course" ], "summary": "List someone's all courses information", "parameters": [ { "description": "search user course", "name": "list_user", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/docs.OauthUser" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.ListCourseResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/course/namelist": { "get": { "description": "Get all courses name, including vm and container", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Course" ], "summary": "Get all courses name, including vm and container", "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.CourseNameListResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/course/search": { "post": { "description": "Search course name", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Course" ], "summary": "Search course name", "parameters": [ { "description": "search keyword", "name": "search", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/docs.Search" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.ListCourseResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/course/type/{id}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "course is executed by vm or container", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Course" ], "summary": "course is executed by vm or container", "parameters": [ { "type": "string", "description": "course uuid, eg: 131ba8a9-b60b-44f9-83b5-46590f756f41", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.CourseTypeResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/course/update": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Update course information", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Course" ], "summary": "Update course information", "parameters": [ { "description": "new course information", "name": "course", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/docs.UpdateCourseBeta" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericOKResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/datasets": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "List all shared data set stored in PV", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "DataSet" ], "summary": "List all shared data set stored in PV", "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.DatasetsListResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/health/database": { "post": { "description": "check backend database is running", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "HealthCheck" ], "summary": "check backend database is running", "parameters": [ { "description": "show tables in db", "name": "db_name", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/docs.GenericDBRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.HealthDatabaseResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/health/databaseAuth": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "check backend database is running, token required", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "HealthCheck" ], "summary": "check backend database is running, token required", "parameters": [ { "description": "show tables in db", "name": "db_name", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/docs.GenericDBRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.HealthDatabaseResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/health/kubernetes": { "get": { "description": "check backend kubernetes is running", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "HealthCheck" ], "summary": "check backend kubernetes is running", "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.HealthKubernetesResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/health/kubernetesAuth": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "check backend kubernetes is running, token required", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "HealthCheck" ], "summary": "check backend kubernetes is running, token required", "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.HealthKubernetesResponse" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/images": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "List images in nchcai/train dockerhub repo", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Image" ], "summary": "List images in nchcai/train dockerhub repo", "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.ImagesListResponse" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/images/commit": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Commit current container into new image", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Image" ], "summary": "Commit current container into new image", "parameters": [ { "description": "course job id and new image name:tag", "name": "commit", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/docs.CommitImage" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericOKResponse" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/job/delete/{id}": { "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "Delete a running job deployment in user namespace", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Job" ], "summary": "Delete a course CRD in user namespace", "parameters": [ { "type": "string", "description": "course CRD uuid, eg: 131ba8a9-b60b-44f9-83b5-46590f756f41", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericOKResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/job/launch": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create a course CRD in kubernetes", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Job" ], "summary": "Create a course CRD in kubernetes", "parameters": [ { "description": "course want to launch", "name": "launch_course", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/docs.LaunchCourseRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.LaunchCourseResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/job/list": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "List all running course deployment for a user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Job" ], "summary": "List all running course deployment for a user", "parameters": [ { "description": "search user's job", "name": "list_user", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/docs.OauthUser" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.JobListResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/proxy/changePW": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Change user password", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Proxy" ], "summary": "Change user password", "parameters": [ { "description": "new password", "name": "user_password", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/docs.PasswordInfo" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.PlainResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/proxy/introspection": { "post": { "description": "Get token meta information from provider", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Proxy" ], "summary": "Get token meta information from provider", "parameters": [ { "description": "Introspection token", "name": "Introspection_token", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/docs.IntrospectionReq" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.IntrospectResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/proxy/logout": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Revoke all tokens of a user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Proxy" ], "summary": "Revoke all tokens of a user", "parameters": [ { "description": "user token", "name": "user_token", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/docs.IntrospectionReq" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.PlainResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/proxy/query": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "query a existing user information", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Proxy" ], "summary": "query a existing user information", "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.UserInfo" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/proxy/refresh": { "post": { "description": "Refresh token with provider", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Proxy" ], "summary": "Refresh token with provider", "parameters": [ { "description": "refresh token", "name": "refresh_token", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/docs.RefreshTokenReq" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.TokenResp" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/proxy/register": { "post": { "description": "Register a new user", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Proxy" ], "summary": "Register a new user", "parameters": [ { "description": "user information", "name": "new_user_info", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/docs.UserInfo" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.PlainResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/proxy/token": { "post": { "description": "Exchange token from Provider", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Proxy" ], "summary": "Exchange token from Provider", "parameters": [ { "description": "token request", "name": "token_request", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/docs.TokenReq" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.TokenResp" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/proxy/update": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Update a existing user information", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Proxy" ], "summary": "Update a existing user information", "parameters": [ { "description": "user information", "name": "user_info", "in": "body", "required": true, "schema": { "type": "object", "$ref": "#/definitions/docs.UpdatedUser" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.PlainResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } }, "/beta/user/role/{roleid}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Get all users' id have the same role", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "User" ], "summary": "Get all users' id have the same role", "parameters": [ { "type": "string", "description": "student or teacher", "name": "roleid", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "$ref": "#/definitions/docs.RoleListResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "$ref": "#/definitions/docs.GenericErrorResponse" } } } } } }, "definitions": { "docs.AccountLabelValue": { "type": "object", "properties": { "email": { "type": "string", "example": "student1@gmail.com" }, "name": { "type": "string", "example": "莊小明" } } }, "docs.AddClassroom": { "type": "object", "properties": { "calendar": { "type": "array", "items": { "$ref": "#/definitions/docs.CalendarTime" } }, "courses": { "type": "array", "items": { "$ref": "#/definitions/docs.CourseLabelValue" } }, "description": { "type": "string", "format": "string", "example": "國衛院教室說明" }, "name": { "type": "string", "format": "string", "example": "國衛院教室" }, "public": { "type": "boolean", "format": "bool", "example": true }, "schedule": { "type": "object", "$ref": "#/definitions/docs.Schedule" }, "students": { "type": "array", "items": { "$ref": "#/definitions/docs.UserLabelValue" } }, "teachers": { "type": "array", "items": { "$ref": "#/definitions/docs.UserLabelValue" } } } }, "docs.AddCourseBeta": { "type": "object", "properties": { "accessType": { "type": "string", "format": "string", "example": "Ingress" }, "datasets": { "type": "array", "items": { "$ref": "#/definitions/docs.DatasetLabelValue" } }, "gpu": { "type": "object", "$ref": "#/definitions/docs.GPULabelValue" }, "image": { "type": "object", "$ref": "#/definitions/docs.ImageLabelValue" }, "introduction": { "type": "string", "format": "string", "example": "課程說明" }, "level": { "type": "string", "format": "string", "example": "basic" }, "name": { "type": "string", "format": "string", "example": "jimmy的課" }, "ports": { "type": "array", "items": { "$ref": "#/definitions/docs.PortLabelValue" } }, "user": { "type": "string", "example": "user@gamil.com" }, "writablePath": { "type": "string", "example": "/tmp/work" } } }, "docs.CalendarTime": { "type": "object", "properties": { "endDate": { "type": "string", "format": "string", "example": "2019-01-25" }, "length": { "type": "integer", "format": "int", "example": 3 }, "startDate": { "type": "string", "format": "string", "example": "2019-01-22" }, "startMonth": { "type": "integer", "format": "int", "example": 2 } } }, "docs.ClassRoomInfo": { "type": "object", "properties": { "courseInfo": { "type": "array", "items": { "$ref": "#/definitions/docs.ClassroomCourse" } }, "createAt": { "type": "string", "example": "2018-06-25T09:24:38Z" }, "description": { "type": "string", "format": "string", "example": "description" }, "id": { "type": "string", "format": "string", "example": "default" }, "name": { "type": "string", "format": "string", "example": "Public Course" }, "public": { "type": "boolean", "format": "bool", "example": true }, "studentCount": { "type": "integer", "format": "int", "example": 18 }, "teachers": { "type": "array", "items": { "$ref": "#/definitions/docs.UserLabelValue" } } } }, "docs.ClassRoomInfoWithStudent": { "type": "object", "properties": { "calendar": { "type": "array", "items": { "$ref": "#/definitions/docs.CalendarTime" } }, "courseInfo": { "type": "array", "items": { "$ref": "#/definitions/docs.ClassroomCourse" } }, "createAt": { "type": "string", "example": "2018-06-25T09:24:38Z" }, "description": { "type": "string", "format": "string", "example": "description" }, "id": { "type": "string", "format": "string", "example": "default" }, "name": { "type": "string", "format": "string", "example": "Public Course" }, "public": { "type": "boolean", "format": "bool", "example": true }, "schedule": { "type": "object", "$ref": "#/definitions/docs.Schedule" }, "studentCount": { "type": "integer", "format": "int", "example": 18 }, "students": { "type": "array", "items": { "$ref": "#/definitions/docs.UserLabelValue" } }, "teachers": { "type": "array", "items": { "$ref": "#/definitions/docs.UserLabelValue" } } } }, "docs.ClassroomCourse": { "type": "object", "properties": { "createAt": { "type": "string", "example": "2018-06-25T09:24:38Z" }, "id": { "type": "string", "example": "49a31009-7d1b-4ff2-badd-e8c717e2256c" }, "level": { "type": "string", "format": "string", "example": "basic" }, "name": { "type": "string", "format": "string", "example": "jimmy的課" }, "roomId": { "type": "string", "format": "string", "example": "d385a235-e1a1-49de-8b65-0b0d6a5783e5" }, "type": { "type": "string", "format": "string", "example": "CONTAINER" } } }, "docs.ClassroomCourseWithType": { "type": "object", "properties": { "createAt": { "type": "string", "example": "2018-06-25T09:24:38Z" }, "id": { "type": "string", "example": "49a31009-7d1b-4ff2-badd-e8c717e2256c" }, "level": { "type": "string", "format": "string", "example": "basic" }, "name": { "type": "string", "format": "string", "example": "jimmy的課" }, "type": { "type": "string", "format": "string", "example": "CONTAINER" } } }, "docs.CommitImage": { "type": "object", "properties": { "id": { "type": "string", "example": "49a31009-7d1b-4ff2-badd-e8c717e2256c" }, "name": { "type": "string", "example": "tensorflow/tensorflow:v3" } } }, "docs.CourseLabelValue": { "type": "object", "properties": { "label": { "type": "string", "example": "tensorflow introduction" }, "value": { "type": "string", "example": "49a31009-7d1b-4ff2-badd-e8c717e2256c" } } }, "docs.CourseNameListResponse": { "type": "object", "properties": { "courses": { "type": "array", "items": { "$ref": "#/definitions/docs.CourseLabelValue" } }, "error": { "type": "boolean", "format": "bool", "example": false } } }, "docs.CourseTypeResponse": { "type": "object", "properties": { "error": { "type": "boolean", "format": "bool", "example": false }, "type": { "type": "string", "example": "container" } } }, "docs.DatasetLabelValue": { "type": "object", "properties": { "label": { "type": "string", "example": "cifar-10" }, "value": { "type": "string", "example": "dataset-cifar-10" } } }, "docs.DatasetsListResponse": { "type": "object", "properties": { "datasets": { "type": "array", "items": { "$ref": "#/definitions/docs.DatasetLabelValue" } }, "error": { "type": "boolean" } } }, "docs.GPULabelValue": { "type": "object", "properties": { "label": { "type": "string", "example": "0" }, "value": { "type": "integer", "format": "int64", "example": 0 } } }, "docs.GenericDBRequest": { "type": "object", "properties": { "message": { "type": "string", "example": "test" } } }, "docs.GenericErrorResponse": { "type": "object", "properties": { "error": { "type": "boolean", "format": "bool", "example": true }, "message": { "type": "string", "format": "string", "example": "error response message" } } }, "docs.GenericOKResponse": { "type": "object", "properties": { "error": { "type": "boolean", "format": "bool", "example": false }, "message": { "type": "string", "format": "string", "example": "response message" } } }, "docs.GetClassroomResponse": { "type": "object", "properties": { "classroom": { "type": "object", "$ref": "#/definitions/docs.ClassRoomInfoWithStudent" }, "error": { "type": "boolean" } } }, "docs.GetCourse": { "type": "object", "properties": { "accessType": { "type": "string", "example": "NodePort" }, "createAt": { "type": "string", "example": "2018-06-25T09:24:38Z" }, "datasets": { "type": "array", "items": { "$ref": "#/definitions/docs.DatasetLabelValue" } }, "gpu": { "type": "object", "$ref": "#/definitions/docs.GPULabelValue" }, "id": { "type": "string", "example": "49a31009-7d1b-4ff2-badd-e8c717e2256c" }, "image": { "type": "object", "$ref": "#/definitions/docs.ImageLabelValue" }, "introduction": { "type": "string", "format": "string", "example": "課程說明" }, "level": { "type": "string", "format": "string", "example": "basic" }, "name": { "type": "string", "format": "string", "example": "jimmy的課" }, "ports": { "type": "array", "items": { "$ref": "#/definitions/docs.PortLabelValue" } }, "user": { "type": "string", "example": "jimmy191@teacher" }, "writablePath": { "type": "string", "example": "/tmp/work" } } }, "docs.GetCourseResponse": { "type": "object", "properties": { "course": { "type": "object", "$ref": "#/definitions/docs.GetCourse" }, "error": { "type": "boolean", "format": "bool", "example": false } } }, "docs.HealthDatabaseResponse": { "type": "object", "properties": { "error": { "type": "boolean", "format": "bool", "example": false }, "message": { "type": "string", "format": "string", "example": "test" }, "tables": { "type": "array", "items": { "type": "string" }, "example": [ "jobs", "courses" ] } } }, "docs.HealthKubernetesResponse": { "type": "object", "properties": { "error": { "type": "boolean", "format": "bool", "example": false }, "message": { "type": "array", "items": { "$ref": "#/definitions/docs.Node" } } } }, "docs.ImageLabelValue": { "type": "object", "properties": { "label": { "type": "string", "example": "tensorflow/tensorflow:1.5.1" }, "value": { "type": "string", "example": "tensorflow/tensorflow:1.5.1" } } }, "docs.ImagesListResponse": { "type": "object", "properties": { "error": { "type": "boolean", "format": "bool", "example": false }, "images": { "type": "array", "items": { "$ref": "#/definitions/docs.ImageLabelValue" } } } }, "docs.IntrospectResponse": { "type": "object", "properties": { "active": { "type": "boolean", "format": "bool", "example": true }, "client_id": { "type": "string", "example": "test_client_1" }, "exp": { "type": "integer", "format": "int64", "example": 1530672296 }, "role": { "type": "string", "example": "user" }, "scope": { "type": "string", "example": "read_write" }, "token_type": { "type": "string", "example": "Bearer" }, "username": { "type": "string", "example": "user@gmail.com" } } }, "docs.IntrospectionReq": { "type": "object", "properties": { "token": { "type": "string", "example": "045e8bd5-58dc-4bd5-8254-dc3d1571c9cd" } } }, "docs.JobInfo": { "type": "object", "properties": { "canSnapshot": { "type": "boolean", "format": "bool", "example": true }, "course_id": { "type": "string", "example": "b86b2893-b876-45c2-a3f6-5e099c15d638" }, "dataset": { "type": "array", "items": { "type": "string" }, "example": [ "cifar-10", "mnist" ] }, "gpu": { "type": "integer", "format": "int64", "example": 1 }, "id": { "type": "string", "example": "49a31009-7d1b-4ff2-badd-e8c717e2256c" }, "image": { "type": "string", "example": "nvidia/caffe:latest" }, "introduction": { "type": "string", "example": "markdown text with escape" }, "level": { "type": "string", "example": "basic" }, "name": { "type": "string", "example": "mage process" }, "service": { "type": "array", "items": { "$ref": "#/definitions/docs.SVCLabelValue" } }, "startAt": { "type": "string", "example": "2018-06-25T09:24:38Z" }, "status": { "type": "string", "example": "Ready" } } }, "docs.JobListResponse": { "type": "object", "properties": { "error": { "type": "boolean", "format": "bool", "example": false }, "jobs": { "type": "array", "items": { "$ref": "#/definitions/docs.JobInfo" } } } }, "docs.JobStatus": { "type": "object", "properties": { "job_id": { "type": "string", "example": "5ab02011-9ab7-40c3-b691-d335f93a12ee" }, "ready": { "type": "boolean", "format": "bool", "example": false }, "status": { "type": "string", "example": "Created" } } }, "docs.LaunchCourseRequest": { "type": "object", "properties": { "classroom_id": { "type": "string", "example": "5ab02011-9ab7-40c3-b691-d335f93a12ee" }, "course_id": { "type": "string", "example": "5ab02011-9ab7-40c3-b691-d335f93a12ee" }, "user": { "type": "string", "example": "user@gamil.com" } } }, "docs.LaunchCourseResponse": { "type": "object", "properties": { "error": { "type": "boolean", "format": "bool", "example": false }, "job": { "type": "object", "$ref": "#/definitions/docs.JobStatus" } } }, "docs.ListClassroomResponse": { "type": "object", "properties": { "classrooms": { "type": "array", "items": { "$ref": "#/definitions/docs.ClassRoomInfo" } }, "error": { "type": "boolean", "format": "bool", "example": false } } }, "docs.ListCourseResponse": { "type": "object", "properties": { "courses": { "type": "array", "items": { "$ref": "#/definitions/docs.ClassroomCourseWithType" } }, "error": { "type": "boolean", "format": "bool", "example": false } } }, "docs.Node": { "type": "object", "properties": { "name": { "type": "string", "example": "10.0.1.85" }, "status": { "type": "string", "example": "Ready" } } }, "docs.OauthUser": { "type": "object", "properties": { "user": { "type": "string", "example": "user@gamil.com" } } }, "docs.OptLabelValue": { "type": "object", "properties": { "label": { "type": "string", "example": "平日" }, "value": { "type": "string", "example": "1-5" } } }, "docs.PasswordInfo": { "type": "object", "properties": { "password": { "type": "string", "example": "654321" }, "username": { "type": "string", "example": "jjj@abc.com" } } }, "docs.PlainResponse": { "type": "object", "properties": { "message": { "type": "string", "example": "response from proxy" } } }, "docs.PortLabelValue": { "type": "object", "properties": { "name": { "type": "string", "example": "jupyter" }, "port": { "type": "integer", "format": "int64", "example": 8080 } } }, "docs.RefreshTokenReq": { "type": "object", "properties": { "refresh_token": { "type": "string", "example": "7e7f6442-09e0-44f3-a05b-d7ea516cc6c5" } } }, "docs.RoleListResponse": { "type": "object", "properties": { "error": { "type": "boolean", "format": "bool", "example": false }, "users": { "type": "array", "items": { "$ref": "#/definitions/docs.UserLabelValue" } } } }, "docs.SVCLabelValue": { "type": "object", "properties": { "label": { "type": "string", "example": "jupyter" }, "value": { "type": "string", "example": "http://140.110.5.22:30010" } } }, "docs.Schedule": { "type": "object", "properties": { "cronFormat": { "type": "array", "format": "string", "items": { "type": "string" }, "example": [ "* * * * * *" ] }, "description": { "type": "string", "format": "string", "example": "2019/2/11 至 2019/6/15 每周一、三" }, "endDate": { "type": "string", "format": "string", "example": "2019-01-26" }, "selectedOption": { "type": "array", "items": { "$ref": "#/definitions/docs.OptLabelValue" } }, "selectedType": { "type": "integer", "format": "int", "example": 1 }, "startDate": { "type": "string", "format": "string", "example": "2019-01-25" } } }, "docs.Search": { "type": "object", "properties": { "query": { "type": "string", "example": "course keyword" } } }, "docs.SimpleClassRoomInfo": { "type": "object", "properties": { "calendar": { "type": "array", "items": { "$ref": "#/definitions/docs.CalendarTime" } }, "createAt": { "type": "string", "example": "2018-06-25T09:24:38Z" }, "description": { "type": "string", "format": "string", "example": "description" }, "id": { "type": "string", "format": "string", "example": "default" }, "name": { "type": "string", "format": "string", "example": "Public Course" }, "public": { "type": "boolean", "format": "bool", "example": true }, "teachers": { "type": "array", "items": { "$ref": "#/definitions/docs.UserLabelValue" } } } }, "docs.SimpleListClassroomResponse": { "type": "object", "properties": { "classrooms": { "type": "array", "items": { "$ref": "#/definitions/docs.SimpleClassRoomInfo" } }, "error": { "type": "boolean", "format": "bool", "example": false } } }, "docs.TokenReq": { "type": "object", "properties": { "code": { "type": "string", "example": "f1bd4604-e5ce-469d-b3d7-5e1d8a3e87d7" } } }, "docs.TokenResp": { "type": "object", "properties": { "refresh_token": { "type": "string", "example": "7e7f6442-09e0-44f3-a05b-d7ea516cc6c5" }, "token": { "type": "string", "example": "045e8bd5-58dc-4bd5-8254-dc3d1571c9cd" } } }, "docs.UpdateClassroom": { "type": "object", "properties": { "calendar": { "type": "array", "items": { "$ref": "#/definitions/docs.CalendarTime" } }, "courses": { "type": "array", "items": { "$ref": "#/definitions/docs.CourseLabelValue" } }, "description": { "type": "string", "format": "string", "example": "國衛院教室說明" }, "id": { "type": "string", "example": "49a31009-7d1b-4ff2-badd-e8c717e2256c" }, "name": { "type": "string", "format": "string", "example": "國衛院教室" }, "public": { "type": "boolean", "format": "bool", "example": true }, "schedule": { "type": "object", "$ref": "#/definitions/docs.Schedule" }, "students": { "type": "array", "items": { "$ref": "#/definitions/docs.UserLabelValue" } }, "teachers": { "type": "array", "items": { "$ref": "#/definitions/docs.UserLabelValue" } } } }, "docs.UpdateCourseBeta": { "type": "object", "properties": { "datasets": { "type": "array", "items": { "$ref": "#/definitions/docs.DatasetLabelValue" } }, "gpu": { "type": "object", "$ref": "#/definitions/docs.GPULabelValue" }, "id": { "type": "string", "example": "49a31009-7d1b-4ff2-badd-e8c717e2256c" }, "image": { "type": "object", "$ref": "#/definitions/docs.ImageLabelValue" }, "introduction": { "type": "string", "format": "string", "example": "課程說明" }, "level": { "type": "string", "format": "string", "example": "basic" }, "name": { "type": "string", "format": "string", "example": "jimmy的課" }, "ports": { "type": "array", "items": { "$ref": "#/definitions/docs.PortLabelValue" } }, "writablePath": { "type": "string", "example": "/tmp/work" } } }, "docs.UpdatedUser": { "type": "object", "properties": { "cName": { "type": "string", "example": "莊莊莊" }, "company": { "type": "string", "example": "國網中心" }, "email-1": { "type": "string", "example": "user@ggg.com" }, "email-2": { "type": "string", "example": "user@ggg.com" }, "phone": { "type": "string", "example": "0911234567" }, "repository": { "type": "string" }, "role": { "type": "string", "example": "student" }, "username": { "type": "string", "example": "jjj@abc.com" } } }, "docs.UploadUserResponse": { "type": "object", "properties": { "error": { "type": "boolean", "format": "bool", "example": false }, "users": { "type": "array", "items": { "$ref": "#/definitions/docs.AccountLabelValue" } } } }, "docs.UserInfo": { "type": "object", "properties": { "cName": { "type": "string", "example": "莊莊莊" }, "company": { "type": "string", "example": "國網中心" }, "email-1": { "type": "string", "example": "user@ggg.com" }, "email-2": { "type": "string", "example": "user@ggg.com" }, "password": { "type": "string", "example": "654321" }, "phone": { "type": "string", "example": "0911234567" }, "repository": { "type": "string" }, "role": { "type": "string", "example": "student" }, "username": { "type": "string", "example": "jjj@abc.com" } } }, "docs.UserLabelValue": { "type": "object", "properties": { "label": { "type": "string", "example": "student1@gmail.com" }, "value": { "type": "string", "example": "student1@gmail.com" } } } }, "securityDefinitions": { "ApiKeyAuth": { "type": "apiKey", "name": "Authorization", "in": "header" } } }