# Groups

## Listing des groupes

<mark style="color:green;">GET</mark> `https://api.cards-microlearning.com/v1/groups`

Récupération d'une liste de groupes.&#x20;

Cette liste peut être filtrée et est paginée.

**Entête (Headers)**

| Name          | Value                                    |
| ------------- | ---------------------------------------- |
| Content-Type  | `application/json`                       |
| Authorization | `Bearer <token>`                         |
| X-Tenant      | `<Identifiant de votre espace (Tenant)>` |

**Paramètre de l'url**

<table><thead><tr><th width="155">Nom</th><th width="124">Type</th><th width="300">Description</th><th width="166">Valeurs</th></tr></thead><tbody><tr><td><code>paginate</code></td><td>Nombre entier</td><td>Nombre d'élément dans la liste par page</td><td>Défaut : 100<br>Max : 500</td></tr><tr><td><code>filters</code></td><td>Tableau Json</td><td><p>Permet de filtrer sur des paramètre du groupe comme : </p><ul><li>is_public</li><li>enable_ranking</li></ul><p>Chaque entrée dans le tableau correspond à un filtre "AND".<br>Chaque entrée doit avoir 2 clés : </p><ul><li>type</li><li>values</li></ul><p>La clé "values" peut être une chaine ou un tableau de valeurs (filtre "OR").<br>Format :<br>[</p><p>    {<br>        "type": "enable_ranking",<br>        "values": 0<br>    },   <br>    {<br>        "type": "is_public",<br>        "values": 1<br>    }<br>]<br></p></td><td></td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "data": [
    {
      "id": "string",
      "name": "string"
    },
    {
      (...)
    }
  ],
  "links": {
    "first": "https://api.cards-microlearning.com/v1/groups?page=1",
    "last": "https://api.cards-microlearning.com/v1/groups?page=5",
    "prev": null,
    "next": "https://api.cards-microlearning.com/v1/groups?page=2"
  },
  "meta": {
    "current_page": int,
    "from": int,
    "last_page": int,
    "links": [
      {
        "url": null,
        "label": "&laquo; Previous",
        "active": false
      },
      {
        "url": "https://api.cards-microlearning.com/v1/groups?page=1",
        "label": "1",
        "active": true
      },
      {
        "url": "https://api.cards-microlearning.com/v1/groups?page=2",
        "label": "2",
        "active": false
      },
      {
        "url": null,
        "label": "...",
        "active": false
      },
      {
        "url": "https://api.cards-microlearning.com/v1/groups?page=4",
        "label": "4",
        "active": false
      },
      {
        "url": "https://api.cards-microlearning.com/v1/groups?page=5",
        "label": "Next &raquo;",
        "active": false
      }      
    ],
    "path": "https://api.cards-microlearning.com/v1/groups",
    "per_page": int,
    "to": int,
    "total": int
  }
}
```

{% endtab %}

{% tab title="401" %}

```json
{
  "message": "Unauthenticated."
}
```

{% endtab %}

{% tab title="403" %}

```json
{
  "message": "Incorrect domain"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docapi.cards-microlearning.com/ressources/groups.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
