> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opigno.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve Catalog

The most common flow in the e-learning system begins with users starting their learning journey from the catalog page. To retrieve the catalog page with the available trainings for a specific user or anonymous one, you can use the following API query:

<CodeGroup>
  ```filename GraphQL [expandable] theme={null}
  query getCatalogData {
    getCatalogData(first: 3) {
      edges {
        node {
          cta {
            actionId
            title
            arguments {
              key
              value
            }
            metadata {
              key
              value
            }
          }
          modulesNumber
          activitiesNumber
          training {
            title
            domain {
              name
            }
            image {
              alt
              title
              url
            }
            duration {
              name
            }
            attempt {
              metrics {
                progress
                status
              }
            }
          }
        }
      }
      pageInfo {
        hasNextPage
        startCursor
        endCursor
      }
      totalItems
    }
  }
  ```

  ```Query Query result [expandable] theme={null}
  {
      "data": {
          "getCatalogData": {
              "edges": [
                  {
                      "node": {
                          "cta": [
                              {
                                  "actionId": "VIEW_LP",
                                  "title": "View",
                                  "arguments": [
                                      {
                                          "key": "lpId",
                                          "value": "40"
                                      }
                                  ],
                                  "metadata": []
                              },
                              {
                                  "actionId": "ENROLL_LP",
                                  "title": "Enroll",
                                  "arguments": [
                                      {
                                          "key": "lpId",
                                          "value": "40"
                                      }
                                  ],
                                  "metadata": [
                                      {
                                          "key": "type",
                                          "value": "button"
                                      }
                                  ]
                              }
                          ],
                          "modulesNumber": 2,
                          "activitiesNumber": 3,
                          "training": {
                              "title": "How to build High-Load Infrastructure in 2025",
                              "domain": [
                                  {
                                      "name": "Domain 1"
                                  }
                              ],
                              "image": [
                                  {
                                      "alt": null,
                                      "title": "slide_IMG_8336.jpeg",
                                      "url": "http://opigno4-project.docksal.site/sites/default/files/2025-01/slide_IMG_8336.jpeg"
                                  }
                              ],
                              "duration": [
                                  {
                                      "name": "1 min"
                                  }
                              ],
                              "attempt": null
                          }
                      }
                  },
                  {
                      "node": {
                          "cta": [
                              {
                                  "actionId": "VIEW_LP",
                                  "title": "View",
                                  "arguments": [
                                      {
                                          "key": "lpId",
                                          "value": "60"
                                      }
                                  ],
                                  "metadata": []
                              },
                              {
                                  "actionId": "ENROLL_LP",
                                  "title": "Enroll",
                                  "arguments": [
                                      {
                                          "key": "lpId",
                                          "value": "60"
                                      }
                                  ],
                                  "metadata": [
                                      {
                                          "key": "type",
                                          "value": "button"
                                      }
                                  ]
                              }
                          ],
                          "modulesNumber": 1,
                          "activitiesNumber": 3,
                          "training": {
                              "title": "Learning the Internet [1]",
                              "domain": [
                                  {
                                      "name": "Domain 1"
                                  }
                              ],
                              "image": [],
                              "duration": [
                                  {
                                      "name": "1 min"
                                  }
                              ],
                              "attempt": null
                          }
                      }
                  },
                  {
                      "node": {
                          "cta": [
                              {
                                  "actionId": "VIEW_LP",
                                  "title": "View",
                                  "arguments": [
                                      {
                                          "key": "lpId",
                                          "value": "39"
                                      }
                                  ],
                                  "metadata": []
                              },
                              {
                                  "actionId": "ENROLL_LP",
                                  "title": "Enroll",
                                  "arguments": [
                                      {
                                          "key": "lpId",
                                          "value": "39"
                                      }
                                  ],
                                  "metadata": [
                                      {
                                          "key": "type",
                                          "value": "button"
                                      }
                                  ]
                              }
                          ],
                          "modulesNumber": 3,
                          "activitiesNumber": 4,
                          "training": {
                              "title": "Locked Training 1",
                              "domain": [],
                              "image": [],
                              "duration": [
                                  {
                                      "name": "30"
                                  }
                              ],
                              "attempt": null
                          }
                      }
                  }
              ],
              "pageInfo": {
                  "hasNextPage": true,
                  "startCursor": "TzozMzoiRHJ1cGFsXG9waWdub19hcGlcV3JhcHBlcnNcQ3Vyc29yIjo0OntzOjE0OiIAKgBiYWNraW5nVHlwZSI7czo5OiJvcGlnbm9fbHAiO3M6MTI6IgAqAGJhY2tpbmdJZCI7aTo0MDtzOjEwOiIAKgBzb3J0S2V5IjtzOjU6IlRJVExFIjtzOjEyOiIAKgBzb3J0VmFsdWUiO3M6NDU6IkhvdyB0byBidWlsZCBIaWdoLUxvYWQgSW5mcmFzdHJ1Y3R1cmUgaW4gMjAyNSI7fQ==",
                  "endCursor": "TzozMzoiRHJ1cGFsXG9waWdub19hcGlcV3JhcHBlcnNcQ3Vyc29yIjo0OntzOjE0OiIAKgBiYWNraW5nVHlwZSI7czo5OiJvcGlnbm9fbHAiO3M6MTI6IgAqAGJhY2tpbmdJZCI7aTozOTtzOjEwOiIAKgBzb3J0S2V5IjtzOjU6IlRJVExFIjtzOjEyOiIAKgBzb3J0VmFsdWUiO3M6MTc6IkxvY2tlZCBUcmFpbmluZyAxIjt9"
              },
              "totalItems": 10
          }
      }
  }
  ```
</CodeGroup>

With the data retrieved from the example above, you should be able to build the catalog page as shown below.

<img style={{ borderRadius:"0.3rem" }} src="https://mintcdn.com/connect-i/duHonZHPe3F63_yi/images/image-20250506-091047.png?fit=max&auto=format&n=duHonZHPe3F63_yi&q=85&s=f5d1fde7df8bbb93dab71f8bde087e7b" alt="Image 20250506 091047 Pn" width="1846" height="916" data-path="images/image-20250506-091047.png" />

The catalog query can be enhanced with filtering, pagination, and sorting options. Please refer to the dedicated pages for more details.
