{
  "schemaVersion": 1,
  "operation": {
    "operationId": "abortManagedDataS3MultipartUpload",
    "method": "POST",
    "path": "/api/v1/projects/{project}/connections/{connection}/upload-sessions/{uploadSession}/s3-multipart-uploads/{multipartUpload}/abort",
    "summary": "Abort an S3 multipart upload",
    "description": "",
    "tags": [
      "Managed Data"
    ],
    "effect": "write",
    "confirmation": "conditional",
    "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": "uploadSession",
        "in": "path",
        "required": true,
        "description": "",
        "schema": {
          "maxLength": 160,
          "minLength": 1,
          "type": "string"
        }
      },
      {
        "name": "multipartUpload",
        "in": "path",
        "required": true,
        "description": "",
        "schema": {
          "maxLength": 160,
          "minLength": 1,
          "type": "string"
        }
      },
      {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "description": "",
        "schema": {
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        }
      }
    ],
    "responses": [
      {
        "status": "200",
        "description": "The request has succeeded.",
        "content": [
          {
            "contentType": "application/json",
            "schema": {
              "$ref": "#/components/schemas/ManagedDataS3MultipartUploadResponse"
            }
          }
        ]
      },
      {
        "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"
    },
    "ManagedDataS3MultipartStatus": {
      "enum": [
        "open",
        "completed",
        "aborted"
      ],
      "example": "open",
      "type": "string"
    },
    "ManagedDataS3MultipartUploadResponse": {
      "example": {
        "createdAt": "2026-01-02T15:04:05Z",
        "existing": true,
        "expiresAt": "2026-01-02T15:04:05Z",
        "file": {
          "path": "example",
          "sha256": "example",
          "size": 1
        },
        "id": "example",
        "status": "open",
        "uploadSessionId": "example"
      },
      "properties": {
        "createdAt": {
          "example": "2026-01-02T15:04:05Z",
          "format": "date-time",
          "type": "string"
        },
        "existing": {
          "example": true,
          "type": "boolean"
        },
        "expiresAt": {
          "example": "2026-01-02T15:04:05Z",
          "format": "date-time",
          "type": "string"
        },
        "file": {
          "$ref": "#/components/schemas/ManagedDataFileMetadata"
        },
        "id": {
          "example": "example",
          "maxLength": 160,
          "minLength": 1,
          "type": "string"
        },
        "status": {
          "$ref": "#/components/schemas/ManagedDataS3MultipartStatus"
        },
        "uploadSessionId": {
          "example": "example",
          "maxLength": 160,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "id",
        "uploadSessionId",
        "file",
        "status",
        "existing",
        "createdAt"
      ],
      "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"
    }
  }
}
