{
  "schemaVersion": 1,
  "operation": {
    "operationId": "listManagedDataUploadSessions",
    "method": "GET",
    "path": "/api/v1/projects/{project}/connections/{connection}/upload-sessions",
    "summary": "List managed-data upload sessions",
    "description": "",
    "tags": [
      "Managed Data"
    ],
    "effect": "read",
    "confirmation": "never",
    "authorization": {
      "mode": "privilege",
      "privilege": "INGEST_DATA"
    },
    "parameters": [
      {
        "name": "project",
        "in": "path",
        "required": true,
        "description": "",
        "schema": {
          "maxLength": 128,
          "minLength": 1,
          "type": "string"
        }
      },
      {
        "name": "connection",
        "in": "path",
        "required": true,
        "description": "",
        "schema": {
          "maxLength": 128,
          "minLength": 1,
          "type": "string"
        }
      },
      {
        "name": "limit",
        "in": "query",
        "required": false,
        "description": "",
        "schema": {
          "format": "int32",
          "maximum": 200,
          "minimum": 1,
          "type": "integer"
        }
      },
      {
        "name": "pageToken",
        "in": "query",
        "required": false,
        "description": "",
        "schema": {
          "maxLength": 2048,
          "minLength": 1,
          "type": "string"
        }
      }
    ],
    "responses": [
      {
        "status": "200",
        "description": "The request has succeeded.",
        "content": [
          {
            "contentType": "application/json",
            "schema": {
              "$ref": "#/components/schemas/ManagedDataUploadSessionListResponse"
            }
          }
        ]
      },
      {
        "status": "400",
        "description": "The server could not understand the request due to invalid syntax.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "401",
        "description": "Access is unauthorized.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "403",
        "description": "Access is forbidden.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "404",
        "description": "The server cannot find the requested resource.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "409",
        "description": "The request conflicts with the current state of the server.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "412",
        "description": "Precondition failed.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "413",
        "description": "Client error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "415",
        "description": "Client error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "422",
        "description": "Client error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "429",
        "description": "Client error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "500",
        "description": "Server error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "502",
        "description": "Server error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "503",
        "description": "Service unavailable.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      }
    ]
  },
  "schemas": {
    "ManagedDataFileMetadata": {
      "example": {
        "path": "example",
        "sha256": "example",
        "size": 1
      },
      "properties": {
        "path": {
          "example": "example",
          "maxLength": 1024,
          "minLength": 1,
          "type": "string"
        },
        "sha256": {
          "description": "A lowercase 64-character hexadecimal SHA-256 digest.",
          "example": "example",
          "maxLength": 64,
          "minLength": 64,
          "type": "string"
        },
        "size": {
          "example": 1,
          "format": "int64",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "path",
        "size",
        "sha256"
      ],
      "type": "object"
    },
    "ManagedDataFileUploadResponse": {
      "example": {
        "error": "example",
        "file": {
          "path": "example",
          "sha256": "example",
          "size": 1
        },
        "negotiation": {
          "protocol": "tus",
          "s3Multipart": {
            "createEndpoint": "example",
            "maximumPartSize": 1,
            "maximumParts": 1,
            "minimumPartSize": 1
          },
          "tus": {
            "endpoint": "example",
            "expiresAt": "2026-01-02T15:04:05Z",
            "offset": 1,
            "uploadId": "example"
          }
        },
        "status": "pending"
      },
      "properties": {
        "error": {
          "example": "example",
          "maxLength": 2048,
          "minLength": 1,
          "type": "string"
        },
        "file": {
          "$ref": "#/components/schemas/ManagedDataFileMetadata"
        },
        "negotiation": {
          "$ref": "#/components/schemas/ManagedDataUploadNegotiation",
          "description": "Upload instructions, present only while the file can still be uploaded."
        },
        "status": {
          "$ref": "#/components/schemas/ManagedDataFileUploadStatus"
        }
      },
      "required": [
        "file",
        "status"
      ],
      "type": "object"
    },
    "ManagedDataFileUploadStatus": {
      "enum": [
        "pending",
        "uploading",
        "uploaded",
        "verified",
        "skipped",
        "failed"
      ],
      "example": "pending",
      "type": "string"
    },
    "ManagedDataManifest": {
      "example": {
        "files": [
          {
            "path": "example",
            "sha256": "example",
            "size": 1
          }
        ]
      },
      "properties": {
        "files": {
          "example": [
            {
              "path": "example",
              "sha256": "example",
              "size": 1
            }
          ],
          "items": {
            "$ref": "#/components/schemas/ManagedDataFileMetadata"
          },
          "type": "array"
        }
      },
      "required": [
        "files"
      ],
      "type": "object"
    },
    "ManagedDataS3MultipartNegotiation": {
      "description": "Negotiated S3 multipart transport. Commands below manage transport only; upload-session finalization remains a separate lifecycle operation.",
      "example": {
        "createEndpoint": "example",
        "maximumPartSize": 1,
        "maximumParts": 1,
        "minimumPartSize": 1
      },
      "properties": {
        "createEndpoint": {
          "example": "example",
          "maxLength": 8192,
          "minLength": 1,
          "type": "string"
        },
        "maximumPartSize": {
          "example": 1,
          "format": "int64",
          "minimum": 1,
          "type": "integer"
        },
        "maximumParts": {
          "example": 1,
          "format": "int32",
          "maximum": 10000,
          "minimum": 1,
          "type": "integer"
        },
        "minimumPartSize": {
          "example": 1,
          "format": "int64",
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "createEndpoint",
        "minimumPartSize",
        "maximumPartSize",
        "maximumParts"
      ],
      "type": "object"
    },
    "ManagedDataTusUploadNegotiation": {
      "description": "Negotiated TUS transport. The endpoint implements the TUS protocol and remains separate from upload-session lifecycle commands.",
      "example": {
        "endpoint": "example",
        "expiresAt": "2026-01-02T15:04:05Z",
        "offset": 1,
        "uploadId": "example"
      },
      "properties": {
        "endpoint": {
          "example": "example",
          "maxLength": 8192,
          "minLength": 1,
          "type": "string"
        },
        "expiresAt": {
          "example": "2026-01-02T15:04:05Z",
          "format": "date-time",
          "type": "string"
        },
        "offset": {
          "example": 1,
          "format": "int64",
          "minimum": 0,
          "type": "integer"
        },
        "uploadId": {
          "example": "example",
          "maxLength": 160,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "endpoint",
        "uploadId",
        "offset",
        "expiresAt"
      ],
      "type": "object"
    },
    "ManagedDataUploadNegotiation": {
      "description": "Backend-neutral upload instructions. Exactly one protocol-specific object is present for tus or S3 multipart; already-present files have neither.",
      "example": {
        "protocol": "tus",
        "s3Multipart": {
          "createEndpoint": "example",
          "maximumPartSize": 1,
          "maximumParts": 1,
          "minimumPartSize": 1
        },
        "tus": {
          "endpoint": "example",
          "expiresAt": "2026-01-02T15:04:05Z",
          "offset": 1,
          "uploadId": "example"
        }
      },
      "properties": {
        "protocol": {
          "$ref": "#/components/schemas/ManagedDataUploadProtocol"
        },
        "s3Multipart": {
          "$ref": "#/components/schemas/ManagedDataS3MultipartNegotiation"
        },
        "tus": {
          "$ref": "#/components/schemas/ManagedDataTusUploadNegotiation"
        }
      },
      "required": [
        "protocol"
      ],
      "type": "object"
    },
    "ManagedDataUploadProtocol": {
      "enum": [
        "tus",
        "s3_multipart",
        "already_present"
      ],
      "example": "tus",
      "type": "string"
    },
    "ManagedDataUploadSessionListResponse": {
      "example": {
        "items": [
          {
            "completedAt": "2026-01-02T15:04:05Z",
            "connection": "example",
            "createdAt": "2026-01-02T15:04:05Z",
            "error": "example",
            "expiresAt": "2026-01-02T15:04:05Z",
            "files": [
              {
                "error": "example",
                "file": {
                  "path": "example",
                  "sha256": "example",
                  "size": 1
                },
                "negotiation": {
                  "protocol": "tus",
                  "s3Multipart": {
                    "createEndpoint": "example",
                    "maximumPartSize": 1,
                    "maximumParts": 1,
                    "minimumPartSize": 1
                  },
                  "tus": {
                    "endpoint": "example",
                    "expiresAt": "2026-01-02T15:04:05Z",
                    "offset": 1,
                    "uploadId": "example"
                  }
                },
                "status": "pending"
              }
            ],
            "id": "example",
            "manifest": {
              "files": [
                {
                  "path": "example",
                  "sha256": "example",
                  "size": 1
                }
              ]
            },
            "project": "example",
            "revisionId": "example",
            "status": "open"
          }
        ],
        "page": {
          "nextCursor": "example"
        }
      },
      "properties": {
        "items": {
          "example": [
            {
              "completedAt": "2026-01-02T15:04:05Z",
              "connection": "example",
              "createdAt": "2026-01-02T15:04:05Z",
              "error": "example",
              "expiresAt": "2026-01-02T15:04:05Z",
              "files": [
                {
                  "error": "example",
                  "file": {
                    "path": "example",
                    "sha256": "example",
                    "size": 1
                  },
                  "negotiation": {
                    "protocol": "tus",
                    "s3Multipart": {
                      "createEndpoint": "example",
                      "maximumPartSize": 1,
                      "maximumParts": 1,
                      "minimumPartSize": 1
                    },
                    "tus": {
                      "endpoint": "example",
                      "expiresAt": "2026-01-02T15:04:05Z",
                      "offset": 1,
                      "uploadId": "example"
                    }
                  },
                  "status": "pending"
                }
              ],
              "id": "example",
              "manifest": {
                "files": [
                  {
                    "path": "example",
                    "sha256": "example",
                    "size": 1
                  }
                ]
              },
              "project": "example",
              "revisionId": "example",
              "status": "open"
            }
          ],
          "items": {
            "$ref": "#/components/schemas/ManagedDataUploadSessionResponse"
          },
          "type": "array"
        },
        "page": {
          "$ref": "#/components/schemas/PageInfo"
        }
      },
      "required": [
        "items",
        "page"
      ],
      "type": "object"
    },
    "ManagedDataUploadSessionResponse": {
      "example": {
        "completedAt": "2026-01-02T15:04:05Z",
        "connection": "example",
        "createdAt": "2026-01-02T15:04:05Z",
        "error": "example",
        "expiresAt": "2026-01-02T15:04:05Z",
        "files": [
          {
            "error": "example",
            "file": {
              "path": "example",
              "sha256": "example",
              "size": 1
            },
            "negotiation": {
              "protocol": "tus",
              "s3Multipart": {
                "createEndpoint": "example",
                "maximumPartSize": 1,
                "maximumParts": 1,
                "minimumPartSize": 1
              },
              "tus": {
                "endpoint": "example",
                "expiresAt": "2026-01-02T15:04:05Z",
                "offset": 1,
                "uploadId": "example"
              }
            },
            "status": "pending"
          }
        ],
        "id": "example",
        "manifest": {
          "files": [
            {
              "path": "example",
              "sha256": "example",
              "size": 1
            }
          ]
        },
        "project": "example",
        "revisionId": "example",
        "status": "open"
      },
      "properties": {
        "completedAt": {
          "example": "2026-01-02T15:04:05Z",
          "format": "date-time",
          "type": "string"
        },
        "connection": {
          "example": "example",
          "maxLength": 128,
          "minLength": 1,
          "type": "string"
        },
        "createdAt": {
          "example": "2026-01-02T15:04:05Z",
          "format": "date-time",
          "type": "string"
        },
        "error": {
          "example": "example",
          "maxLength": 2048,
          "minLength": 1,
          "type": "string"
        },
        "expiresAt": {
          "example": "2026-01-02T15:04:05Z",
          "format": "date-time",
          "type": "string"
        },
        "files": {
          "example": [
            {
              "error": "example",
              "file": {
                "path": "example",
                "sha256": "example",
                "size": 1
              },
              "negotiation": {
                "protocol": "tus",
                "s3Multipart": {
                  "createEndpoint": "example",
                  "maximumPartSize": 1,
                  "maximumParts": 1,
                  "minimumPartSize": 1
                },
                "tus": {
                  "endpoint": "example",
                  "expiresAt": "2026-01-02T15:04:05Z",
                  "offset": 1,
                  "uploadId": "example"
                }
              },
              "status": "pending"
            }
          ],
          "items": {
            "$ref": "#/components/schemas/ManagedDataFileUploadResponse"
          },
          "type": "array"
        },
        "id": {
          "example": "example",
          "maxLength": 160,
          "minLength": 1,
          "type": "string"
        },
        "manifest": {
          "$ref": "#/components/schemas/ManagedDataManifest"
        },
        "project": {
          "example": "example",
          "maxLength": 128,
          "minLength": 1,
          "type": "string"
        },
        "revisionId": {
          "example": "example",
          "maxLength": 71,
          "minLength": 71,
          "type": "string"
        },
        "status": {
          "$ref": "#/components/schemas/ManagedDataUploadSessionStatus"
        }
      },
      "required": [
        "id",
        "project",
        "connection",
        "revisionId",
        "status",
        "manifest",
        "files",
        "createdAt",
        "expiresAt"
      ],
      "type": "object"
    },
    "ManagedDataUploadSessionStatus": {
      "enum": [
        "open",
        "finalizing",
        "completed",
        "cancelled",
        "failed",
        "expired"
      ],
      "example": "open",
      "type": "string"
    },
    "PageInfo": {
      "example": {
        "nextCursor": "example"
      },
      "properties": {
        "nextCursor": {
          "example": "example",
          "type": "string"
        }
      },
      "type": "object"
    },
    "ProblemDetails": {
      "example": {
        "code": "example",
        "detail": "example",
        "errors": [
          {
            "code": "example",
            "detail": "example",
            "field": "example"
          }
        ],
        "instance": "example",
        "requestId": "example",
        "status": 1,
        "title": "example",
        "type": "example"
      },
      "properties": {
        "code": {
          "example": "example",
          "type": "string"
        },
        "detail": {
          "example": "example",
          "type": "string"
        },
        "errors": {
          "example": [
            {
              "code": "example",
              "detail": "example",
              "field": "example"
            }
          ],
          "items": {
            "$ref": "#/components/schemas/ProblemFieldError"
          },
          "type": "array"
        },
        "instance": {
          "example": "example",
          "type": "string"
        },
        "requestId": {
          "example": "example",
          "type": "string"
        },
        "status": {
          "example": 1,
          "format": "int32",
          "type": "integer"
        },
        "title": {
          "example": "example",
          "type": "string"
        },
        "type": {
          "example": "example",
          "type": "string"
        }
      },
      "required": [
        "type",
        "title",
        "status",
        "detail",
        "instance",
        "code",
        "requestId",
        "errors"
      ],
      "type": "object"
    },
    "ProblemFieldError": {
      "example": {
        "code": "example",
        "detail": "example",
        "field": "example"
      },
      "properties": {
        "code": {
          "example": "example",
          "type": "string"
        },
        "detail": {
          "example": "example",
          "type": "string"
        },
        "field": {
          "example": "example",
          "type": "string"
        }
      },
      "required": [
        "field",
        "code",
        "detail"
      ],
      "type": "object"
    }
  }
}
