Browse Files Media

stable · api · 0.1.0

Complete and classify a quarantined File Object

POST /api/v1/file-objects/{fileObjectId}/complete

Capability Domain: Files Media

Authentication

projectCredential (files:write)

Scope: files:write

Parameters and request body

  • fileObjectId — path, required
    fileObjectId schema
    {
        "type": "string",
        "format": "uuid"
    }
  • X-Correlation-ID — header, optional
    X-Correlation-ID schema
    {
        "type": "string",
        "format": "uuid"
    }

Responses and errors

StatusDescription
200File safety classification
401Invalid or revoked Project Credential
403Project Credential lacks the required scope
422Request violates the public contract

200 schema

200 response schema
{
    "type": "object",
    "required": [
        "data"
    ],
    "properties": {
        "data": {
            "type": "object",
            "required": [
                "id",
                "status",
                "rejection_reason"
            ],
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid"
                },
                "status": {
                    "type": "string",
                    "enum": [
                        "quarantine",
                        "scanning",
                        "available",
                        "rejected"
                    ]
                },
                "rejection_reason": {
                    "type": [
                        "string",
                        "null"
                    ]
                }
            }
        }
    }
}

401 schema

401 response schema
{
    "type": "object",
    "required": [
        "error"
    ],
    "properties": {
        "error": {
            "type": "object",
            "required": [
                "code",
                "message",
                "retryable",
                "correlation_id",
                "details"
            ],
            "properties": {
                "code": {
                    "type": "string"
                },
                "message": {
                    "type": "string"
                },
                "retryable": {
                    "type": "boolean"
                },
                "correlation_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "details": {
                    "type": "object"
                }
            }
        }
    }
}

403 schema

403 response schema
{
    "type": "object",
    "required": [
        "error"
    ],
    "properties": {
        "error": {
            "type": "object",
            "required": [
                "code",
                "message",
                "retryable",
                "correlation_id",
                "details"
            ],
            "properties": {
                "code": {
                    "type": "string"
                },
                "message": {
                    "type": "string"
                },
                "retryable": {
                    "type": "boolean"
                },
                "correlation_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "details": {
                    "type": "object"
                }
            }
        }
    }
}

422 schema

422 response schema
{
    "type": "object",
    "required": [
        "error"
    ],
    "properties": {
        "error": {
            "type": "object",
            "required": [
                "code",
                "message",
                "retryable",
                "correlation_id",
                "details"
            ],
            "properties": {
                "code": {
                    "type": "string"
                },
                "message": {
                    "type": "string"
                },
                "retryable": {
                    "type": "boolean"
                },
                "correlation_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "details": {
                    "type": "object"
                }
            }
        }
    }
}

200 example

200 response example
{
    "data": {
        "id": "50000000-0000-4000-8000-000000000005",
        "status": "available",
        "rejection_reason": null
    }
}

Idempotency

Safe to retry for the same File Object; completion returns its current classification.