# Download Artifacts in Engage Publication
Asking Opencast for Publication details, you get information about the `api` publication (ar rather every non-internal publication published with `publish-configurable`) while you only get information about the existence of the `engage-player` publication but no details:
From `/api/events/9ca1ed2a-4bfd-478f-a8cc-a5108df8ea78?withpublications=true`:
```json=
{
"identifier": "9ca1ed2a-4bfd-478f-a8cc-a5108df8ea78",
"creator": "Administrator",
"presenter": [],
"created": "2021-04-16T12:25:00Z",
"is_part_of": "",
"subjects": [],
"start": "2021-04-16T12:25:00Z",
"description": "",
"language": "",
"source": "",
"title": "Opencast Summit - Main Room",
"processing_state": "SUCCEEDED",
"duration": "",
"license": "",
"archive_version": 2,
"contributor": [],
"series": "",
"has_previews": true,
"location": "BigBlueButton",
"rightsholder": "",
"publication_status": [
"internal",
"engage-player",
"api"
],
"status": "EVENTS.EVENTS.STATUS.PROCESSED",
"publications": [
{
"metadata": [],
"attachments": [],
"channel": "engage-player",
"id": "7969ff63-13fb-4a3a-b374-db7e873bce97",
"media": [],
"mediatype": "text/html",
"url": "https://example.opencast.org/play/9ca1ed2a-4bfd-478f-a8cc-a5108df8ea78"
},
{
"metadata": [
{
"flavor": "mpeg-7/text",
"size": -1,
"checksum": "",
"id": "6f2cbeb0-1b6e-4860-8da7-9cc92d98a08c",
"mediatype": "text/xml",
"url": "https://example.opencast.org/static/mh_default_org/api/9ca1ed2a-4bfd-478f-a8cc-a5108df8ea78/bc0f6369-8fe9-44f2-a303-25c24f9ca52d/slidetext.xml",
"tags": [
"engage-download"
]
}
],
"attachments": [
{
"flavor": "presenter/search+preview",
"ref": "track:track-126",
"size": 2634,
"checksum": "",
"id": "66f99ce5-481a-44a1-94f6-6f5a5dd35c0d",
"mediatype": "image/jpeg",
"url": "https://example.opencast.org/static/mh_default_org/api/9ca1ed2a-4bfd-478f-a8cc-a5108df8ea78/01ed7769-dadd-471f-8cc5-a885fc012d4c/presenter_c7a3d3f4_6839_4221_a500_6e8924587ce0_3_000s_search.jpg",
"tags": [
"engage-download"
]
},
{…},
{
"flavor": "presentation/segment+preview",
"ref": "track:7656dc33-8478-4fab-ae93-0ee58d692cca;time=T01:19:20:0F1000",
"size": 2308,
"checksum": "",
"id": "aa836824-3e35-4520-a257-e787475a1c99",
"mediatype": "image/jpeg",
"url": "https://example.opencast.org/static/mh_default_org/api/9ca1ed2a-4bfd-478f-a8cc-a5108df8ea78/73ae140b-5b5b-40cd-9f51-5e96693fae38/presentation_c3ea08b2_5bbf_4a2f_baf3_983da88715e9.jpg",
"tags": [
"engage-download"
]
}
],
"channel": "api",
"id": "78a61333-07a6-40e7-9a99-d4a97de8c3a6",
"media": [
{
"has_audio": true,
"framerate": 25,
"description": "",
"bitrate": 710646,
"url": "https://example.opencast.org/static/mh_default_org/api/9ca1ed2a-4bfd-478f-a8cc-a5108df8ea78/7c69a9dc-73fb-4324-9273-e49fb1e4317b/presentation_c3ea08b2_5bbf_4a2f_baf3_983da88715e9.mp4",
"has_video": true,
"tags": [
"1440p-quality",
"engage-download",
"engage-streaming"
],
"flavor": "presentation/delivery",
"duration": 13920131,
"size": 1472698132,
"framecount": 348002,
"checksum": "e67842366cc4f935c1fb8033bfa3dcdd (md5)",
"width": 2560,
"id": "a36d4364-c048-411e-8f5d-c1d41f74c5f1",
"mediatype": "video/mp4",
"height": 1316
},
{…},
{
"has_audio": true,
"framerate": 25,
"description": "",
"bitrate": 284628,
"url": "https://example.opencast.org/static/mh_default_org/api/9ca1ed2a-4bfd-478f-a8cc-a5108df8ea78/f58f6b80-6dac-4f29-b8dd-611ad956910b/presenter_c7a3d3f4_6839_4221_a500_6e8924587ce0.mp4",
"has_video": true,
"tags": [
"360p-quality",
"engage-download",
"engage-streaming"
],
"flavor": "presenter/delivery",
"duration": 13920131,
"size": 619615050,
"framecount": 348003,
"checksum": "af53db20549dcace7b78c8722d08f6c9 (md5)",
"width": 640,
"id": "e423681b-db95-47b6-8a7f-81e250989843",
"mediatype": "video/mp4",
"height": 360
}
],
"mediatype": "application/json",
"url": "https://admin.example.opencast.org/api/events/9ca1ed2a-4bfd-478f-a8cc-a5108df8ea78"
}
]
}
```
The [relevant code for adding the additional information](https://github.com/opencast/opencast/blob/064a6ec29a3a3d32d0c7ad77f36089c16a1d3cd2/modules/distribution-workflowoperation/src/main/java/org/opencastproject/workflow/handler/distribution/ConfigurablePublishWorkflowOperationHandler.java#L316-L320) could be easily added to the PublishEngageWorkflowOperationHandler:
```java=
for (MediaPackageElement element : elements) {
// Make sure the mediapackage is prompted to create a new identifier for this element
element.setIdentifier(null);
PublicationImpl.addElementToPublication(publication, element);
}
```
This will give us several advantages:
- It allows us to easily access the download artifacts from wherever we list publications
- E.g. we could list this in the admin interfac besides the embed codes
- We don't need the `api` publication any longer since that data is redundant and in a default configuration, the `engage-player` distibution would have all data necessary for integrations
- We have less data duplication
- We have less operations in workflows
## Migration
We already have an optional migration path for old publications since the Workflow „Republish Metadata“ includes the `publish-engage` operation which would now include the new data.
## Configurability
There should be options to turn off the additional data:
- `list-elements`
- Default: `true`
- Include all media package elements
# Download Link Interface
The admin interface already has an interface for getting embed links:

Once we have the download links as part of the publication, we could add the option to copy download links via this interface element as well.