# Asset Processor

{% hint style="warning" %}
**Welcome to Our New API Docs!** This is the new home for all things API (previously at [Canvas LMS REST API Documentation](https://api.instructure.com)).
{% endhint %}

## Asset Processor API

1EdTech Asset Processor services: Asset Service and Asset Report Service.

1EdTech Asset Processor services: Eula Service and Eula Acceptance Service.

### [Create an Asset Report](#method.lti/ims/asset_processor.create_report) <a href="#method.lti-ims-asset_processor.create_report" id="method.lti-ims-asset_processor.create_report"></a>

[Lti::Ims::AssetProcessorController#create\_report](https://github.com/instructure/canvas-lms/blob/master/app/controllers/lti/ims/asset_processor_controller.rb)

**`POST /api/lti/asset_processors/:asset_processor_id/reports`**

**Scope:** `url:POST|/api/lti/asset_processors/:asset_processor_id/reports`

Creates a report for a given Canvas-managed asset (such as a submission attachment).

Returns an HTTP 201 (Created) on success.

**Request Parameters:**

| Parameter            | Type      | Description                                                                                                                                                                                                                                                                                                                                                                                                  |
| -------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `assetId`            | `string`  | The UUID of the asset to which the report applies. Canvas will supply this to the tool in the the `LtiAssetProcessorSubmissionNotice`.                                                                                                                                                                                                                                                                       |
| `errorCode`          | `string`  | A machine-readable code indicating the cause of the failure, for reports with a processingProgress value of `Failed`. The following standard error codes are available, but tools may use their own (in which case the tool may provide human-readable information in the `comment` field): UNSUPPORTED\_ASSET\_TYPE, ASSET\_TOO\_LARGE, ASSET\_TOO\_SMALL, EULA\_NOT\_ACCEPTED, DOWNLOAD\_FAILED            |
| `indicationAlt`      | `string`  | Alternate text representing the meaning of the indicationColor for screen readers or as a tooltip over the indication color.                                                                                                                                                                                                                                                                                 |
| `indicationColor`    | `string`  | A hex (#RRGGBB) color code the tool wishes to use indicating the outcome of an asset’s report.                                                                                                                                                                                                                                                                                                               |
| `priority`           | `integer` | A number from 0 (meaning “good” or “success”) to 5 (meaning urgent or time-critical notable features) indicating the tool’s perceived priority of the report. If a priority is not known or applicable, the tool should use the value 0.                                                                                                                                                                     |
| `processingProgress` | `string`  | Indicates the status of the report. Should be one of the following: Processed, Processing, PendingManual, Failed, NotProcessed, NotReady. If an unrecognized value is given, the value will be stored, but will be treated by Canvas as `NotReady`.                                                                                                                                                          |
| `result`             | `string`  | A short string (16 characters or fewer) that briefly describes the successful result of the processing. This should be provided if processingProgress is Processed, and not provided otherwise.                                                                                                                                                                                                              |
| `timestamp`          | `string`  | An ISO8601 date time value with microsecond precision. Reports with newer timestamps for the same asset and report type supersede previously submitted reports with older (or equal) timestamps. Likewise, if the timestamp provided is older than the latest timestamp for an existing report (of same asset and type), the new report will be ignored and the endpoint will return an HTTP 409 (Conflict). |
| `title`              | `string`  | A human-readable title for the report, to be displayed to the user.                                                                                                                                                                                                                                                                                                                                          |
| `type`               | `string`  | An opaque value representing the type of report.                                                                                                                                                                                                                                                                                                                                                             |
| `visibleToOwner`     | `boolean` | A boolean value indicates whether the indicator and report should be visible to the user who owns the asset being reported on. If no value is provided, the platform should assume a default value of false                                                                                                                                                                                                  |

**Example Request:**

```bash
{
  "assetId" : "57d463ea-6e5d-45c8-a86f-64f3dd9ef81e",
  "type": "originality",
  "timestamp": "2025-01-24T17:56:53.221+00:00",
  "title": "Originality Report",
  "result" : "75/100",
  "indicationColor" : "#EC0000",
  "indicationAlt" : "High percentage of matched text.",
  "priority": 5,
  "processingProgress": "Processed"
}
```

```bash
{
  "assetId" : "57d463ea-6e5d-45c8-a86f-64f3dd9ef81e",
  "type": "originality",
  "timestamp": "2025-01-24T17:56:53.221+00:00",
  "title": "Originality Report",
  "priority": 0,
  "errorCode": "UNSUPPORTED_ASSET_TYPE",
  "processingProgress": "Failed"
}
```

**Example Response:**

```js
{
  "assetId" : "57d463ea-6e5d-45c8-a86f-64f3dd9ef81e",
  "type": "originality",
  "timestamp": "2025-01-24T17:56:53.221+00:00",
  "title": "Originality Report",
  "result" : "75/100",
  "indicationColor" : "#EC0000",
  "indicationAlt" : "High percentage of matched text.",
  "priority": 5,
  "processingProgress": "Processed"
}
```

### [Update Eula Deployment Configuration](#method.lti/ims/asset_processor_eula.update_tool_eula) <a href="#method.lti-ims-asset_processor_eula.update_tool_eula" id="method.lti-ims-asset_processor_eula.update_tool_eula"></a>

[Lti::Ims::AssetProcessorEulaController#update\_tool\_eula](https://github.com/instructure/canvas-lms/blob/master/app/controllers/lti/ims/asset_processor_eula_controller.rb)

**`PUT /api/lti/asset_processor_eulas/:context_external_tool_id/deployment`**

**Scope:** `url:PUT|/api/lti/asset_processor_eulas/:context_external_tool_id/deployment`

Provides a mechanism by which a platform can enable or disable the requirement for users to accept a EULA within the scope of an entire deployment

**Request Parameters:**

| Parameter      | Type      | Description                                                                          |
| -------------- | --------- | ------------------------------------------------------------------------------------ |
| `eulaRequired` | `boolean` | A boolean value representing whether or not the EULA is required for the deployment. |

**Example Request:**

```bash
{
  "eulaRequired": true,
}
```

**Example Response:**

```js
{
  "eulaRequired": true,
}
```

### [Create an Eula Acceptance](#method.lti/ims/asset_processor_eula.create_acceptance) <a href="#method.lti-ims-asset_processor_eula.create_acceptance" id="method.lti-ims-asset_processor_eula.create_acceptance"></a>

[Lti::Ims::AssetProcessorEulaController#create\_acceptance](https://github.com/instructure/canvas-lms/blob/master/app/controllers/lti/ims/asset_processor_eula_controller.rb)

**`POST /api/lti/asset_processor_eulas/:context_external_tool_id/user`**

**Scope:** `url:POST|/api/lti/asset_processor_eulas/:context_external_tool_id/user`

The EULA user acceptance service provides a mechanism by which a tool can notify a platform of whether or not a user has accepted a EULA.

**Request Parameters:**

| Parameter   | Type      | Description                                                                                                                                   |
| ----------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `userId`    | `string`  | The userId represents the user who has accepted or declined the EULA, `lti_id` of the Canvas User.                                            |
| `accepted`  | `boolean` | A boolean value representing whether or not the user has accepted the EULA                                                                    |
| `timestamp` | `string`  | The timestamp represents the time at which the user accepted or declined the EULA. This timestamp must be formatted as an ISO 8601 date time. |

**Example Request:**

```bash
{
  "userId": "59ed2101-0302-406c-b53f-9705ae1cb357",
  "accepted": true,
  "timestamp": "2022-04-16T18:54:36.736+00:00"
}
```

**Example Response:**

```js
{
  "userId": "59ed2101-0302-406c-b53f-9705ae1cb357",
  "accepted": true,
  "timestamp": "2022-04-16T18:54:36.736+00:00"
}
```

### [Delete Eula Acceptances for deployment](#method.lti/ims/asset_processor_eula.delete_acceptances) <a href="#method.lti-ims-asset_processor_eula.delete_acceptances" id="method.lti-ims-asset_processor_eula.delete_acceptances"></a>

[Lti::Ims::AssetProcessorEulaController#delete\_acceptances](https://github.com/instructure/canvas-lms/blob/master/app/controllers/lti/ims/asset_processor_eula_controller.rb)

**`DELETE /api/lti/asset_processor_eulas/:context_external_tool_id/user`**

**Scope:** `url:DELETE|/api/lti/asset_processor_eulas/:context_external_tool_id/user`

Remove the EULA acceptance status for all users within the current deployment. This will allow a tool to reset the EULA acceptance status for all users, and force them to accept the EULA again in the case that the EULA has changed.

***

This documentation is generated directly from the Canvas LMS source code, available [on Github](https://github.com/instructure/canvas-lms).


---

# 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://developerdocs.instructure.com/services/canvas/resources/asset_processor.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.
