{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/avala-ai/json-schema/avala-ai-result-export-schema.json",
  "title": "ResultExport",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/avala-ai-exports-api-openapi.yml#/components/schemas/ResultExport",
  "required": [
    "name",
    "format",
    "datasets",
    "slices",
    "projects"
  ],
  "type": "object",
  "properties": {
    "uid": {
      "title": "Uid",
      "type": "string",
      "format": "uuid",
      "readOnly": true
    },
    "name": {
      "title": "Name",
      "type": "string",
      "maxLength": 255,
      "minLength": 1
    },
    "format": {
      "title": "Format",
      "type": "string",
      "enum": [
        "avala-json-external",
        "YOLO",
        "lerobot-v3"
      ]
    },
    "filter_query_string": {
      "title": "Filter query string",
      "type": [
        "string",
        "null"
      ]
    },
    "accepted_only": {
      "title": "Accepted only",
      "type": "boolean",
      "default": false
    },
    "error_code": {
      "title": "Error code",
      "type": "string",
      "readOnly": true,
      "minLength": 1
    },
    "total_task_count": {
      "title": "Total task count",
      "type": [
        "integer",
        "null"
      ],
      "readOnly": true
    },
    "exported_task_count": {
      "title": "Exported task count",
      "type": [
        "integer",
        "null"
      ],
      "readOnly": true
    },
    "download_url": {
      "title": "Download url",
      "type": [
        "string",
        "null"
      ],
      "readOnly": true
    },
    "status": {
      "title": "Status",
      "type": "string",
      "enum": [
        "requested",
        "aborted",
        "exporting",
        "exported",
        "failed"
      ],
      "readOnly": true
    },
    "datasets": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "uniqueItems": true
    },
    "slices": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "uniqueItems": true
    },
    "projects": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "uniqueItems": true
    },
    "organization": {
      "$ref": "#/$defs/Organization"
    },
    "created_at": {
      "title": "Created at",
      "type": "string",
      "format": "date-time",
      "readOnly": true
    }
  },
  "$defs": {
    "Organization": {
      "required": [
        "name"
      ],
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "uid": {
          "title": "Uid",
          "type": "string",
          "format": "uuid",
          "readOnly": true
        },
        "name": {
          "title": "Name",
          "type": "string",
          "maxLength": 1024,
          "minLength": 1
        },
        "slug": {
          "title": "Slug",
          "type": "string",
          "format": "slug",
          "pattern": "^[-a-zA-Z0-9_]+$",
          "readOnly": true,
          "minLength": 1
        },
        "description": {
          "title": "Description",
          "type": "string",
          "maxLength": 1024
        },
        "logo": {
          "title": "Logo",
          "type": [
            "string",
            "null"
          ],
          "readOnly": true,
          "format": "uri"
        },
        "website": {
          "title": "Website",
          "type": "string",
          "format": "uri"
        },
        "public_slug": {
          "title": "Public slug",
          "description": "Canonical slug for URL rendering. Coworker viewers receive the organization's codename; others receive the real slug.",
          "type": "string",
          "readOnly": true
        }
      }
    }
  }
}