> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://developer.gitiho.com/gitiho-business-api/lms/danh-sách-khoá-học-có-thể-assign/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.gitiho.com/_mcp/server. # Danh sách khoá học có thể assign GET https://example.gitiho.com/api/lms/courses Trả về danh sách khoá học mà doanh nghiệp được phép assign cho nhân sự, phân trang theo chuẩn Laravel. **Nguồn dữ liệu & điều kiện khả dụng:** Lấy từ bảng khoá học nền tảng (không chỉ giới hạn các khoá đã từng mua/assign), gồm khoá platform dùng chung và khoá nội bộ của chính doanh nghiệp. Một khoá xuất hiện khi: đã xuất bản, được bật cho B2B, không bị ẩn hiển thị, không thuộc danh mục bị ẩn (hệ thống + tuỳ chỉnh) và không phải khoá offline. **Query params (tuỳ chọn):** | Param | Kiểu | Giá trị | Mô tả | | --- | --- | --- | --- | | `source` | string | `platform` | `business` | Lọc theo nguồn khoá. `platform` = khoá Gitiho dùng chung; `business` = khoá nội bộ doanh nghiệp | | `is_free` | int | `1` | `0` | `1` = khoá miễn phí; `0` = khoá có phí. Đây là ước lượng theo giá bán hiệu lực; giá chính xác được tính lại ở bước assign | | `keyword` | string | max 255 | Tìm theo tên khoá học | | `per_page` | int | 1–100 | Số bản ghi mỗi trang (mặc định 15) | **Mỗi phần tử trả về:** `course_id`, `biz_course_id` (null nếu khoá chưa mirror sang doanh nghiệp), `title`, `slug`, `source`, `price` (giá hiệu lực), `is_free`, `thumbnail`, `duration` (luôn = 0 ở danh sách; lấy thời lượng thực ở màn chi tiết để tránh truy vấn nặng). Reference: https://developer.gitiho.com/gitiho-business-api/lms/danh-sách-khoá-học-có-thể-assign ## Examples **SDK Code** ```python import requests url = "https://example.gitiho.com/api/lms/courses" response = requests.get(url) print(response.json()) ``` ```javascript const url = 'https://example.gitiho.com/api/lms/courses'; const options = {method: 'GET'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://example.gitiho.com/api/lms/courses" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://example.gitiho.com/api/lms/courses") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://example.gitiho.com/api/lms/courses") .asString(); ``` ```php request('GET', 'https://example.gitiho.com/api/lms/courses'); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://example.gitiho.com/api/lms/courses"); var request = new RestRequest(Method.GET); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let request = NSMutableURLRequest(url: NSURL(string: "https://example.gitiho.com/api/lms/courses")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```