# Content Launch

**Clear LRS** implements the [**Rustici Launch Mechanism**](https://github.com/RusticiSoftware/launch/blob/master/lms_lrs.md) when passing the authenticated user to learning content for the purpose of storing data in the LRS. This is a popular mechanism supported by most authoring tools.

When content is launched from the LRS, the launch page will be loaded with the following query parameters:

| Query Parameter  | Description                                                                                                                                                                                                                                     |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **endpoint**     | <p>The base path for all xAPI requests.</p><p>e.g. <code><https://org.clearlrs.com/xapi/></code></p>                                                                                                                                            |
| **auth**         | <p>An authentication token to be sent with every xAPI request.</p><p>e.g. <code>Basic a2V5OnNlY3JldA==</code></p>                                                                                                                               |
| **actor**        | <p>The <strong>actor</strong> object representing the user launching the content.</p><p>e.g. <code>{"mbox":"mailto:<learner@example.com>"}</code></p>                                                                                           |
| **activity\_id** | <p>The root <strong>activity ID</strong> for the content being launched. This should be used as the <strong>parent</strong> or <strong>grouping</strong> for all statements.</p><p>e.g. <code><http://example.com/learning/activity></code></p> |
| **registration** | <p>An optional <strong>registration</strong> value to be sent in the <strong>context</strong> field of any statements generated.</p><p>e.g. <code>231859e2-937f-4969-b069-91cf49bfea0c</code></p>                                               |

{% hint style="info" %}
Although the above examples are provided in clear text, each query parameter value will actually be [**URL Encoded**](https://en.wikipedia.org/wiki/Percent-encoding) to prevent malforming the launch URL.
{% endhint %}

For the above example, assuming the content being launched existed at the following address – `https://content.example.com/index.html` – then the launch URL would look like the below (new lines added for readability):

```
https://content.example.com/index.html
?endpoint=https%3A%2F%2Forg.clearlrs.com%2Fxapi%2F
&auth=Basic%20a2V5OnNlY3JldA%3D%3D
&actor=%7B%22mbox%22%3A%22mailto%3Alearner%40example.com%22%7D
&activity_id=http%3A%2F%2Fexample.com%2Flearning%2Factivity
&registration=231859e2-937f-4969-b069-91cf49bfea0c
```

Once launched, the activity provider should parse and decode these parameters and use them as appropriate when generating statements.&#x20;

{% hint style="warning" %}
**It is the Activity Provider's responsibility to respect every parameter passed to it, even if its internal representation differs.**&#x20;

Sometimes the LRS will force a new **registration** or override the **Activity ID** in response to user actions so the content is required to send statements using the received values to preserve data integrity.
{% endhint %}


---

# 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://dev.clearxp.com/getting-started/content-launch.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.
