# Media operations API

Source: https://frameleaf.app/docs/api/reference/media-operations/

Use your own server and its scoped API keys.

## Clear a finished media operation

DELETE /api/media-operations/{id}

Removes a finished job from your Activity list. The record is kept for lineage and remote cleanup.

```json
{
  "description": "Removes a finished job from your Activity list. The record is kept for lineage and remote cleanup.",
  "operationId": "dismissMediaOperation",
  "parameters": [
    {
      "name": "id",
      "required": true,
      "in": "path",
      "schema": {
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
        "type": "string"
      }
    }
  ],
  "responses": {
    "204": {
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Clear a finished media operation",
  "tags": [
    "Media operations"
  ],
  "x-frameleaf-permission": "all"
}
```

## View a source reversal preview

GET /api/media-operations/{id}/reverse-preview

The checked H264/AAC derivative of your completed source reversal. Every read verifies current project and source access and the checksum of the returned bytes.

```json
{
  "description": "The checked H264/AAC derivative of your completed source reversal. Every read verifies current project and source access and the checksum of the returned bytes.",
  "operationId": "viewMediaOperationReversePreview",
  "parameters": [
    {
      "name": "id",
      "required": true,
      "in": "path",
      "schema": {
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/octet-stream": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "View a source reversal preview",
  "tags": [
    "Media operations"
  ],
  "x-frameleaf-permission": "all"
}
```

## Get a completed source reversal result

GET /api/media-operations/{id}/reverse-result

Owner-only metadata after current project, source and generated-lineage authorization. Contains no storage paths or worker grants.

```json
{
  "description": "Owner-only metadata after current project, source and generated-lineage authorization. Contains no storage paths or worker grants.",
  "operationId": "getMediaOperationReverseResult",
  "parameters": [
    {
      "name": "id",
      "required": true,
      "in": "path",
      "schema": {
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/StudioReverseConformResultDto"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Get a completed source reversal result",
  "tags": [
    "Media operations"
  ],
  "x-frameleaf-permission": "all"
}
```
