# Completion

### Get all completion

## List all completions

<mark style="color:blue;">`GET`</mark> `https://your-platform-url.com/api/so2/v1/completion`

Get all course user completion for your instance

#### Headers

| Name                                                             | Type   | Description           |
| ---------------------------------------------------------------- | ------ | --------------------- |
| Access-Control-Request-Headers<mark style="color:red;">\*</mark> | string | authorization         |
| Authorization<mark style="color:red;">\*</mark>                  | string | Bearer \<auth\_token> |
| Content-Type<mark style="color:red;">\*</mark>                   | string | application/json      |

{% tabs %}
{% tab title="200 " %}
{% code overflow="wrap" %}

```json
{"username":"johndoe",
"email":"john@example.com",
"course_id":"course-v1:MOOCit-demo-1",
"completion":"0.80"
}, 
{"username":"JaneDoe",
"email":"jane@example.com",
"course_id":"course-v1:MOOCit-demo-2",
"completion":"0.5"
}
...
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Get completion by course

## List completion by course

<mark style="color:blue;">`GET`</mark> `https://your-platform-url.com/api/so2/v1/completion?course_id={course_id}`

Get course user completion for a given course

#### Query Parameters

| Name       | Type   | Description                              |
| ---------- | ------ | ---------------------------------------- |
| course\_id | string | the course\_id course-v1:org+num+session |

#### Headers

| Name                                                             | Type   | Description           |
| ---------------------------------------------------------------- | ------ | --------------------- |
| Access-Control-Request-Headers<mark style="color:red;">\*</mark> | string | authorization         |
| Authorization<mark style="color:red;">\*</mark>                  | string | Bearer \<auth\_token> |
| Content-Type<mark style="color:red;">\*</mark>                   | string | application/json      |

{% tabs %}
{% tab title="200 " %}
{% code overflow="wrap" %}

```json
{"username":"johndoe",
"email":"john@example.com",
"course_id":"course-v1:MOOCit-demo-1",
"completion":"0.80"
}, 
{"username":"JaneDoe",
"email":"jane@example.com",
"course_id":"course-v1:MOOCit-demo-1",
"completion":"0.45"
}
...
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Get completion by username

## List completion by username

<mark style="color:blue;">`GET`</mark> `https://your-platform-url.com/api/so2/v1/completion?username={username}`

Get course completion for a given username

#### Query Parameters

| Name     | Type   | Description |
| -------- | ------ | ----------- |
| username | string |             |

#### Headers

| Name                                                             | Type   | Description           |
| ---------------------------------------------------------------- | ------ | --------------------- |
| Access-Control-Request-Headers<mark style="color:red;">\*</mark> | string | authorization         |
| Authorization<mark style="color:red;">\*</mark>                  | string | Bearer \<auth\_token> |
| Content-Type<mark style="color:red;">\*</mark>                   | string | application/json      |

{% tabs %}
{% tab title="200 " %}
{% code overflow="wrap" %}

```json
{"username": "johndoe",
"email":"john@example.com",
"course_id":"course-v1:MOOCit-demo-1",
"completion":"0.80"
}, 
{"username": "johndoe",
"email":"john@example.com",
"course_id":"course-v1:MOOCit-demo-2",
"completion":"0.50"
}
...
```

{% endcode %}
{% 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://docs.moocit.fr/english/api/completion.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.
