> ## 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.

# User acquired skills

Learners can acquire skills for successful completion of activities. A skill is considered
as acquired if user provides 3 correct answers for the related activities in the row.

To get the list of skills acquired by a learner, `getAcquiredSkills` query should be executed.

| Parameter         | Type               | Description                                                                                                                              | Default |
| :---------------- | :----------------- | :--------------------------------------------------------------------------------------------------------------------------------------- | :------ |
| `after`           | `Cursor`           | Returns results that come after the specified cursor. Should be used together with `first` parameter. Cannot be used if `before` is set. | —       |
| `before`          | `Cursor`           | Returns results that come before the specified cursor. Should be used together with `last` parameter. Cannot be used if `after` is set.  | —       |
| `first`           | `Integer`          | Returns up to the first N elements from the list. Required if `after` parameter is set. Cannot be used together with `last`.             | —       |
| `last`            | `Integer`          | Returns up to the first N elements from the list. Required if `before` parameter is set. Cannot be used together with `first`.           | —       |
| `onlyTarget`      | `Boolean`          | Allows to filter the results to return only skills marked as target ones for the user context.                                           | `false` |
| `reverse`         | `Boolean`          | Allows to reverse the order of the query results list (default order is **ascending**).                                                  | `false` |
| `sortKey`         | `UserSkillSortKey` | Sort the query results by the given key. Available options: `TITLE` (default) and `ACQUIRED_ON`.                                         | `TITLE` |
| `userContextUuid` | `ID`               | The user context UUID. If omitted, the list of acquired skills will be retrieved for the current API user context.                       | —       |

The query returns a paginated list of [`UserSkill`](#userskill-api-object) objects.

Here is an example of the query execution:

<CodeGroup>
  ```filename GraphQL theme={null}
  query getAcquiredSkills {
    getAcquiredSkills(first: 10) {
      edges {
        node {
          skill {
            name
          }
          isTargetSkill
          acquiredOn
        }
      }
      totalItems
    }
  }
  ```

  ```File Query result [expandable] theme={null}
  {
    "data": {
      "getAcquiredSkills": {
        "edges": [
          {
            "node": {
              "skill": {
                "name": "Communication"
              },
              "isTargetSkill": true,
              "acquiredOn": 1782918513,
            }
          },
          {
            "node": {
              "skill": {
                "name": "Management"
              },
              "isTargetSkill": true,
              "acquiredOn": 1782918579,
            }
          },
          {
            "node": {
              "skill": {
                "name": "Promoting"
              },
              "isTargetSkill": false,
              "acquiredOn": 1782918397,
            }
          }
        ],
        "totalItems": 3
      }
    }
  }
  ```
</CodeGroup>

## `UserSkill` API object

Represents the skill that was (or can be) acquired by the learner.

| Parameter       | Type           | Description                                                                                                                                              |
| :-------------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `acquiredOn`    | `Int`          | **Optional**. The timestamp when the skill was acquired. Empty if the skill is not acquired by the requested user context yet.                           |
| `id`            | `ID`           | **Required**. The user skill ID.                                                                                                                         |
| `isTargetSkill` | `Boolean`      | **Required**. Represents if the skill is a target one for the requested user context. Target skills should  be configured by managers for every learner. |
| `skill`         | `TaxonomyTerm` | **Required**. The related skill taxonomy term data.                                                                                                      |

## Related Features

The `getAcquiredSkills` query supports the same advanced features as other queries:

<CardGroup cols={2}>
  <Card title="Pagination" icon="arrow-right" href="/OpignoEnterpriseAPI/PaginatingCatalogItems">
    Learn how to efficiently navigate through large sets of items using cursor-based pagination.
  </Card>
</CardGroup>
