> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.crehana.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.crehana.com/_mcp/server.

# Get Learning V2 Tracks

GET https://www.crehana.com/api/v5/rest/org/{organization_slug}/learning/content/knowledge-hub/catalog/v2/tracks/

Return the tracks (learning paths) of the organization, newest first and
hidden ones last. Use the ``id`` of each node as ``track_id`` when assigning
the track to users.

Reference: https://developer.crehana.com/api-reference/endpoints/learning-v-2/get-learning-v-2-tracks

## Authentication

- `Api-Key` header (required) — API key of the organization. Always sent together with the `Secret-Access` header.

## Servers

- `https://www.crehana.com` (Production, default)
- `https://qa.creha.co` (QA)

## Request

### Path parameters

- `organization_slug` (string, required)

### Query parameters

- `first` (integer, optional, default: 10) — Page size (1-100)
- `after` (string, optional) — Cursor of the previous page (`page_info.end_cursor`)
- `search` (string, optional) — Case-insensitive search by track name
- `track_type` (enum, optional) — Filter by type: TRACK (learning path) or ACADEMY
  - Allowed values: `TRACK`, `ACADEMY`
- `is_draft` (boolean, optional) — Omit it to get only active published tracks; true returns drafts; false returns published tracks
- `is_hidden` (boolean, optional) — Filter by visibility

## Response

### 200

Successful Response

- `total_count` (integer, required)
- `page_info` (apps__learning__responses__PageInfo, required)
- `edges` (list of LearningV2TrackEdge, required)

## Errors

### 400 Bad Request Error

Bad Request

- `message` (string, required)
- `errors` (list of string, required)
- `datetime` (string, optional)

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### apps__learning__responses__PageInfo

- `has_next_page` (boolean, required)
- `has_previous_page` (boolean, required)
- `start_cursor` (string, optional)
- `end_cursor` (string, optional)

### LearningV2TrackEdge

- `node` (LearningV2Track, required)

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### LearningV2Track

- `id` (string, required) — Id of the track (learning path); send it as track_id when assigning the track to users
- `name` (string, optional)
- `track_type` (string, optional) — TRACK or ACADEMY (same values as the track_type filter)
- `is_active` (boolean, optional)
- `is_hidden` (boolean, optional)
- `created_at` (datetime, optional)
- `updated_at` (datetime, optional) — Last modification of the track (ISO 8601)
- `start_date` (date, optional)
- `end_date` (date, optional)
- `version` (string, optional)
- `has_reward` (boolean, optional)
- `courses_to_complete` (integer, optional)
- `courses_to_certificate` (integer, optional)
- `total_courses_count` (integer, optional) — Number of active courses in the track

### ValidationErrorLocItems

## Examples

**Response**

```json
{
  "total_count": 1,
  "page_info": {
    "has_next_page": true,
    "has_previous_page": true,
    "start_cursor": "string",
    "end_cursor": "string"
  },
  "edges": [
    {
      "node": {
        "id": "string",
        "name": "string",
        "track_type": "string",
        "is_active": true,
        "is_hidden": true,
        "created_at": "2024-01-15T09:30:00Z",
        "updated_at": "2024-01-15T09:30:00Z",
        "start_date": "2023-01-15",
        "end_date": "2023-01-15",
        "version": "string",
        "has_reward": true,
        "courses_to_complete": 1,
        "courses_to_certificate": 1,
        "total_courses_count": 1
      }
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://www.crehana.com/api/v5/rest/org/organization_slug/learning/content/knowledge-hub/catalog/v2/tracks/"

headers = {
    "Secret-Access": "Secret-Access",
    "Api-Key": "<apiKey>"
}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://www.crehana.com/api/v5/rest/org/organization_slug/learning/content/knowledge-hub/catalog/v2/tracks/';
const options = {
  method: 'GET',
  headers: {'Secret-Access': 'Secret-Access', 'Api-Key': '<apiKey>'}
};

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://www.crehana.com/api/v5/rest/org/organization_slug/learning/content/knowledge-hub/catalog/v2/tracks/"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Secret-Access", "Secret-Access")
	req.Header.Add("Api-Key", "<apiKey>")

	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://www.crehana.com/api/v5/rest/org/organization_slug/learning/content/knowledge-hub/catalog/v2/tracks/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Secret-Access"] = 'Secret-Access'
request["Api-Key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://www.crehana.com/api/v5/rest/org/organization_slug/learning/content/knowledge-hub/catalog/v2/tracks/")
  .header("Secret-Access", "Secret-Access")
  .header("Api-Key", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://www.crehana.com/api/v5/rest/org/organization_slug/learning/content/knowledge-hub/catalog/v2/tracks/', [
  'headers' => [
    'Api-Key' => '<apiKey>',
    'Secret-Access' => 'Secret-Access',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://www.crehana.com/api/v5/rest/org/organization_slug/learning/content/knowledge-hub/catalog/v2/tracks/");
var request = new RestRequest(Method.GET);
request.AddHeader("Secret-Access", "Secret-Access");
request.AddHeader("Api-Key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Secret-Access": "Secret-Access",
  "Api-Key": "<apiKey>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://www.crehana.com/api/v5/rest/org/organization_slug/learning/content/knowledge-hub/catalog/v2/tracks/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```