{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trajectory/json-schema/trajectory-benchmark-ingestion-upload-urls-schema.json",
  "title": "BenchmarkIngestionUploadUrls",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trajectory-benchmark-ingestion-api-openapi.yml#/components/schemas/BenchmarkIngestionUploadUrls",
  "properties": {
    "urls": {
      "items": {
        "$ref": "#/$defs/BenchmarkUploadUrl"
      },
      "type": "array",
      "title": "Urls"
    },
    "policy": {
      "anyOf": [
        {
          "$ref": "#/$defs/BenchmarkIngestionUploadPolicy"
        },
        {
          "type": "null"
        }
      ],
      "description": "Set instead of `urls` when the allocation requested `post`."
    }
  },
  "type": "object",
  "required": [
    "urls"
  ],
  "$defs": {
    "BenchmarkIngestionUploadPolicy": {
      "properties": {
        "url": {
          "type": "string",
          "title": "Url",
          "description": "Form upload endpoint (POST) for every file in the batch."
        },
        "fields": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object",
          "title": "Fields",
          "description": "Signed form fields; send them with `key`, `Content-Type`, and the file as the last field, `file`."
        },
        "artifact_prefix": {
          "type": "string",
          "title": "Artifact Prefix",
          "description": "An artifact's `key` is this prefix plus its path."
        },
        "part_prefix": {
          "type": "string",
          "title": "Part Prefix",
          "description": "A task part's `key` is this prefix plus its path."
        },
        "expires_at": {
          "type": "string",
          "format": "date-time",
          "title": "Expires At",
          "description": "Uploads must start before this time."
        }
      },
      "type": "object",
      "required": [
        "url",
        "fields",
        "artifact_prefix",
        "part_prefix",
        "expires_at"
      ],
      "title": "BenchmarkIngestionUploadPolicy"
    },
    "BenchmarkUploadUrl": {
      "properties": {
        "path": {
          "type": "string",
          "title": "Path"
        },
        "url": {
          "type": "string",
          "title": "Url"
        },
        "headers": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object",
          "title": "Headers"
        }
      },
      "type": "object",
      "required": [
        "path",
        "url",
        "headers"
      ],
      "title": "BenchmarkUploadUrl"
    }
  }
}