Skip to content

Aumo Connectos API 1.0.0

Aumo storage and connectors APIs.


Document


GET /v1/{workspace_id}/presigned/url

Get Pre Signed Url

Description

Get a pre-signed URL for uploading a document.

Args: workspace_id (str): The ID of the workspace to upload the document to. expires_in (int, optional): The expiration time in seconds. Defaults to 3600. repository (DocumentRepository): The repository for managing documents. metadata_repository (DocumentMetadataRepository): The repository for managing document metadata. user_repository (AuthRepository): The repository for managing user authentication. user (TokenData): The token data of the authenticated user.

Returns: JSONResponse: A JSON response containing the pre-signed URL and other parameters.

"fields": {
    "key":

"temp/clikqktri000cz8k4appdqku3/019079b0-0f30-7337-bfa2-94f57b94d73b", "AWSAccessKeyId": str, "policy": str, "signature": str },

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
expires_in query integer 3600 No The expiration time in seconds. Defaults to 3600.
workspace_id path string No The ID of the workspace to upload the document to.

Response 201 Created

Schema of the response body

Response 422 Unprocessable Entity

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /v1/{workspace_id}/upload/confirm

Confirm Document Upload

Description

Confirms a document upload and sends document metadata and final path.

Args: workspace_id (str): The ID of the workspace to upload the document to. document_metadata_confirm (DocumentMetadataCreate): The document metadata to be uploaded. metadata_repository (DocumentMetadataRepository): The repository for managing document metadata. document_repository (DocumentRepository): The repository for managing documents. user (TokenData): The token data of the authenticated user.

Body:

    {
        "temp_key": "string",
        "folder": "Optionsl[string]",
        "document_metadata": {
            "name": "string", #filename with extension
            "tags": [
                "string"
            ],
            "categories": [
                "string"
            ],
            "summary": "string",
            "slots": "dict" # custom metadata
            "access": {
                "curators": [string] # curator emails
            }
        }
    }

Returns: DocumentMetadataRead: The uploaded document metadata.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
workspace_id path string No The ID of the workspace to upload the document to.

Request body

{
    "temp_key": "string",
    "folder": null,
    "document_metadata": {
        "owner_id": null,
        "name": "string",
        "s3_url": null,
        "created_at": null,
        "file_size": null,
        "file_type": null,
        "tags": [
            "string"
        ],
        "categories": [
            "string"
        ],
        "status": null,
        "file_hash": null,
        "summary": null,
        "access": null,
        "slots": null
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "temp_key": {
            "type": "string",
            "title": "Temp Key"
        },
        "folder": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Folder"
        },
        "document_metadata": {
            "$ref": "#/components/schemas/DocumentMetadataCreate"
        }
    },
    "type": "object",
    "required": [
        "temp_key",
        "document_metadata"
    ],
    "title": "DocumentMetadataConfirm"
}

Response 201 Created

{
    "owner_id": "string",
    "name": "string",
    "s3_url": "string",
    "created_at": "2022-04-13T15:42:05.901Z",
    "file_size": null,
    "file_type": null,
    "tags": null,
    "categories": null,
    "status": "public",
    "file_hash": null,
    "summary": null,
    "access": null,
    "slots": null,
    "id": "388c5e52-25eb-456f-bb3f-12ce263de8a6"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "owner_id": {
            "type": "string",
            "title": "Owner Id"
        },
        "name": {
            "type": "string",
            "title": "Name"
        },
        "s3_url": {
            "type": "string",
            "title": "S3 Url"
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "file_size": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "File Size"
        },
        "file_type": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "File Type"
        },
        "tags": {
            "anyOf": [
                {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Tags"
        },
        "categories": {
            "anyOf": [
                {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Categories"
        },
        "status": {
            "$ref": "#/components/schemas/StatusEnum"
        },
        "file_hash": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "File Hash"
        },
        "summary": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Summary"
        },
        "access": {
            "anyOf": [
                {
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Access"
        },
        "slots": {
            "anyOf": [
                {
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Slots"
        },
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        }
    },
    "type": "object",
    "required": [
        "owner_id",
        "name",
        "s3_url",
        "created_at",
        "file_size",
        "file_type",
        "tags",
        "categories",
        "status",
        "file_hash",
        "summary",
        "access",
        "slots",
        "id"
    ],
    "title": "DocumentMetadataRead"
}

Response 422 Unprocessable Entity

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /v1/{workspace_id}/file/{file_id}/download/url

Get Url To Download Document

Description

Get a pre-signed download url for a document with the specified file id.

Args: workspace_id (str): The id of the workspace. file_id (UUID): The id of the file to be downloaded. repository (DocumentRepository): The repository for managing documents. metadata_repository (DocumentMetadataRepository): The repository for managing document metadata. user (TokenData): The token data of the authenticated user.

Returns: str: The pre-signed download url.

Raises: HTTP_404: If no file with the specified id is found.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
expires_in query integer 3600 No The number of seconds until the download URL expires.
file_id path string No The ID of the file to be downloaded.
workspace_id path string No The ID of the workspace.

Response 200 OK

"string"
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "string",
    "title": "Response Get Url To Download Document V1  Workspace Id  File  File Id  Download Url Get"
}

Response 422 Unprocessable Entity

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

DELETE /v1/{workspace_id}/{file_id}

Add To Bin

Description

Adds a document to the bin for deletion.

Args: file_id (str): The id of the file to be added to the bin. metadata_repository (DocumentMetadataRepository): The repository for managing document metadata. user (TokenData): The token data of the authenticated user.

Returns: None: If the file is added to the bin.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
file_id path string No The id of the file to be added to the bin.
workspace_id path string No The ID of the workspace.

Response 204 No Content

Response 422 Unprocessable Entity

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /v1/{workspace_id}/trash

List Of Bin

Description

List bin.

Args: metadata_repo: The document metadata repository. owner: The token data of the owner.

Returns: Dict[str, List[Row | Row] | int]: The list of bin.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
workspace_id path string No The ID of the workspace.

Response 200 OK

Schema of the response body

Response 422 Unprocessable Entity

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

DELETE /v1/{workspace_id}/trash/{file_id}

Permanently Delete Doc

Description

Permanently deletes a document.

Args: workspace_id (str): The id of the workspace. file_id (str): The id of the file to be permanently deleted. Defaults to None. repository (DocumentRepository): The repository for managing documents. metadata_repository (DocumentMetadataRepository): The repository for managing document metadata. user (TokenData): The token data of the authenticated user.

Returns: None: If the file is permanently deleted.

Raises: HTTP_404: If no file with the specified name is found.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
file_id path string No The id of the file to be permanently deleted.
workspace_id path string No The ID of the workspace.

Response 204 No Content

Response 422 Unprocessable Entity

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /v1/{workspace_id}/restore/{file_id}

Restore From Bin

Description

Restore bin.

Args: file_id: The id of the file to restore. metadata_repo: The document metadata repository. user: The token data of the user.

Returns: DocumentMetadataRead: The restored document metadata.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
file_id path string No The id of the file to be restored.
workspace_id path string No The ID of the workspace.

Response 200 OK

{
    "owner_id": "string",
    "name": "string",
    "s3_url": "string",
    "created_at": "2022-04-13T15:42:05.901Z",
    "file_size": null,
    "file_type": null,
    "tags": null,
    "categories": null,
    "status": "public",
    "file_hash": null,
    "summary": null,
    "access": null,
    "slots": null,
    "id": "cc55112c-16a4-49b8-a0b5-cf9d30abee48"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "owner_id": {
            "type": "string",
            "title": "Owner Id"
        },
        "name": {
            "type": "string",
            "title": "Name"
        },
        "s3_url": {
            "type": "string",
            "title": "S3 Url"
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "file_size": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "File Size"
        },
        "file_type": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "File Type"
        },
        "tags": {
            "anyOf": [
                {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Tags"
        },
        "categories": {
            "anyOf": [
                {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Categories"
        },
        "status": {
            "$ref": "#/components/schemas/StatusEnum"
        },
        "file_hash": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "File Hash"
        },
        "summary": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Summary"
        },
        "access": {
            "anyOf": [
                {
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Access"
        },
        "slots": {
            "anyOf": [
                {
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Slots"
        },
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        }
    },
    "type": "object",
    "required": [
        "owner_id",
        "name",
        "s3_url",
        "created_at",
        "file_size",
        "file_type",
        "tags",
        "categories",
        "status",
        "file_hash",
        "summary",
        "access",
        "slots",
        "id"
    ],
    "title": "DocumentMetadataRead"
}

Response 422 Unprocessable Entity

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

DELETE /v1/{workspace_id}/empty/trash

Empty Trash

Description

Deletes all documents in the trash bin for the authenticated user.

Args: metadata_repository (DocumentMetadataRepository): The repository for accessing document metadata. user (TokenData): The token data of the authenticated user.

Returns: None

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
workspace_id path string No The ID of the workspace.

Response 204 No Content

Response 422 Unprocessable Entity

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

Document MetaData


GET /v1/metadata/{workspace_id}/{document}/detail

Get Document-Metadata

Description

Retrieves the metadata of a specific document.

Args: document (Union[str, UUID]): The ID or name of the document. repository (DocumentMetadataRepository): The repository for managing document metadata. user (TokenData): The token data of the authenticated user.

Returns: Union[DocumentMetadataRead, HTTPException]: The document metadata if found, otherwise an HTTPException.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
document path None No The ID or name of the document.
workspace_id path string No The ID of the workspace.

Response 200 OK

Schema of the response body

Response 422 Unprocessable Entity

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

PUT /v1/metadata/{workspace_id}/{document}

Update Doc Metadata Details

Description

Updates the details of a document's metadata.

Args: document (Union[str, UUID]): The ID or name of the document. document_patch (DocumentMetadataPatch): The document metadata patch containing the updated details. repository (DocumentMetadataRepository): The repository for managing document metadata. user_repository (AuthRepository): The repository for managing user authentication. user (TokenData): The token data of the authenticated user.

Returns: Union[DocumentMetadataRead, HTTPException]: The updated document metadata if successful, otherwise an HTTPException.

Raises: HTTP_404: If no document with the specified ID or name is found.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
document path None No The ID or name of the document.
workspace_id path string No The ID of the workspace.

Request body

{
    "name": "string",
    "tags": null,
    "categories": null,
    "access": null,
    "slots": null,
    "file_hash": null,
    "file_size": null,
    "summary": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "name": {
            "type": "string",
            "title": "Name"
        },
        "tags": {
            "anyOf": [
                {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Tags"
        },
        "categories": {
            "anyOf": [
                {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Categories"
        },
        "access": {
            "anyOf": [
                {
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Access"
        },
        "slots": {
            "anyOf": [
                {
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Slots"
        },
        "file_hash": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "File Hash"
        },
        "file_size": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "File Size"
        },
        "summary": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Summary"
        }
    },
    "type": "object",
    "title": "DocumentMetadataPatch"
}

Response 200 OK

Schema of the response body

Response 422 Unprocessable Entity

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /v1/metadata/{workspace_id}/archive/{file_name}

Archive A Document

Description

Archive a document.

Args: file_name (str): The name of the file to be archived. repository (DocumentMetadataRepository): The repository for document metadata. user (TokenData): The user token data.

Returns: DocumentMetadataRead: The archived document metadata.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
file_name path string No The name of the file to be archived.
workspace_id path string No The ID of the workspace.

Response 200 OK

{
    "owner_id": "string",
    "name": "string",
    "s3_url": "string",
    "created_at": "2022-04-13T15:42:05.901Z",
    "file_size": null,
    "file_type": null,
    "tags": null,
    "categories": null,
    "status": "public",
    "file_hash": null,
    "summary": null,
    "access": null,
    "slots": null,
    "id": "23aa835e-b056-409e-a105-229856388f1b"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "owner_id": {
            "type": "string",
            "title": "Owner Id"
        },
        "name": {
            "type": "string",
            "title": "Name"
        },
        "s3_url": {
            "type": "string",
            "title": "S3 Url"
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "file_size": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "File Size"
        },
        "file_type": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "File Type"
        },
        "tags": {
            "anyOf": [
                {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Tags"
        },
        "categories": {
            "anyOf": [
                {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Categories"
        },
        "status": {
            "$ref": "#/components/schemas/StatusEnum"
        },
        "file_hash": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "File Hash"
        },
        "summary": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Summary"
        },
        "access": {
            "anyOf": [
                {
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Access"
        },
        "slots": {
            "anyOf": [
                {
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Slots"
        },
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        }
    },
    "type": "object",
    "required": [
        "owner_id",
        "name",
        "s3_url",
        "created_at",
        "file_size",
        "file_type",
        "tags",
        "categories",
        "status",
        "file_hash",
        "summary",
        "access",
        "slots",
        "id"
    ],
    "title": "DocumentMetadataRead"
}

Response 422 Unprocessable Entity

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /v1/metadata/{workspace_id}/archive/list

Archived Doc List

Description

Get the list of archived documents.

Args: repository (DocumentMetadataRepository): The repository for document metadata. user (TokenData): The user token data.

Returns: Dict[str, List[str] | int]: A dictionary containing the list of archived documents.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
workspace_id path string No The ID of the workspace.

Response 200 OK

Schema of the response body

Response 422 Unprocessable Entity

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /v1/metadata/{workspace_id}/un-archive/{file}

Remove Doc From Archive

Description

Un-archive a document.

Args: file (str): The name of the file to be un-archived. repository (DocumentMetadataRepository): The repository for document metadata. user (TokenData): The user token data.

Returns: DocumentMetadataRead: The un-archived document metadata.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
file path string No The name of the file to be un-archived.
workspace_id path string No The ID of the workspace.

Response 200 OK

{
    "owner_id": "string",
    "name": "string",
    "s3_url": "string",
    "created_at": "2022-04-13T15:42:05.901Z",
    "file_size": null,
    "file_type": null,
    "tags": null,
    "categories": null,
    "status": "public",
    "file_hash": null,
    "summary": null,
    "access": null,
    "slots": null,
    "id": "2621ce1c-25e2-4509-87ad-83e7d56dc3a3"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "owner_id": {
            "type": "string",
            "title": "Owner Id"
        },
        "name": {
            "type": "string",
            "title": "Name"
        },
        "s3_url": {
            "type": "string",
            "title": "S3 Url"
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "file_size": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "File Size"
        },
        "file_type": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "File Type"
        },
        "tags": {
            "anyOf": [
                {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Tags"
        },
        "categories": {
            "anyOf": [
                {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Categories"
        },
        "status": {
            "$ref": "#/components/schemas/StatusEnum"
        },
        "file_hash": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "File Hash"
        },
        "summary": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Summary"
        },
        "access": {
            "anyOf": [
                {
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Access"
        },
        "slots": {
            "anyOf": [
                {
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Slots"
        },
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        }
    },
    "type": "object",
    "required": [
        "owner_id",
        "name",
        "s3_url",
        "created_at",
        "file_size",
        "file_type",
        "tags",
        "categories",
        "status",
        "file_hash",
        "summary",
        "access",
        "slots",
        "id"
    ],
    "title": "DocumentMetadataRead"
}

Response 422 Unprocessable Entity

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /v1/filter/{workspace_id}

Search Document

Description

Searches for documents based on specified criteria.

Args: workspace_id (str): The ID of the workspace, filters (Annotated[DocumentMetadataFilters) : The filters to apply in the format atribute=operator:value, repository_metadata: DocumentMetadataRepository = Depends(get_repository(DocumentMetadataRepository)), user (TokenData): The token data of the authenticated user, limit (int): The maximum number of documents to retrieve. Defaults to 10., offset (int): The number of documents to skip. Defaults to 0.,

Returns: List[DocumentMetadataRead] or List[Dict[str, Any]]: The list of matching documents.

Input parameters

Parameter In Type Default Nullable Description
APIKeyHeader header string N/A No API key
access query array [] No Allowed operators: `eq`, `neq`, `contains`, `not_contains`, `starts_with`, `ends_with`, `is_empty`, `is_not_empty`, `in`, `not_in`, `any`, `not_any`. Default operator `contains`. Pattern: ^(eq:|neq:|contains:|not_contains:|starts_with:|ends_with:|is_empty:|is_not_empty:|in:|not_in:|any:|not_any:)?[^:]+$
categories query array [] No Allowed operators: `any`, `not_any`, `is_empty`, `is__not_empty`. Default operator `any`. Pattern: ^(any:|not_any:|is_empty:|is__not_empty:)?[^:]+$
created_at query array [] No Allowed operators: `eq`, `neq`, `gt`, `lt`, `gte`, `lte`, `is_empty`, `is_not_empty`. Default operator `eq`. Pattern: ^(eq:|neq:|gt:|lt:|gte:|lte:|is_empty:|is_not_empty:)?[^:]+$
file_hash query array [] No Allowed operators: `eq`, `neq`, `contains`, `not_contains`, `starts_with`, `ends_with`, `is_empty`, `is_not_empty`, `in`, `not_in`. Default operator `contains`. Pattern: ^(eq:|neq:|contains:|not_contains:|starts_with:|ends_with:|is_empty:|is_not_empty:|in:|not_in:)?[^:]+$
file_size query array [] No Allowed operators: `eq`, `neq`, `gt`, `lt`, `gte`, `lte`, `is_empty`, `is_not_empty`. Default operator `eq`. Pattern: ^(eq:|neq:|gt:|lt:|gte:|lte:|is_empty:|is_not_empty:)?[^:]+$
file_type query array [] No Allowed operators: `eq`, `neq`, `contains`, `not_contains`, `starts_with`, `ends_with`, `is_empty`, `is_not_empty`, `in`, `not_in`. Default operator `contains`. Pattern: ^(eq:|neq:|contains:|not_contains:|starts_with:|ends_with:|is_empty:|is_not_empty:|in:|not_in:)?[^:]+$
id query array [] No Allowed operators: `eq`, `neq`, `is_empty`, `is_not_empty`, `in`, `not_in`. Default operator `eq`. Pattern: ^(eq:|neq:|is_empty:|is_not_empty:|in:|not_in:)?[^:]+$
name query array [] No Allowed operators: `eq`, `neq`, `contains`, `not_contains`, `starts_with`, `ends_with`, `is_empty`, `is_not_empty`, `in`, `not_in`. Default operator `contains`. Pattern: ^(eq:|neq:|contains:|not_contains:|starts_with:|ends_with:|is_empty:|is_not_empty:|in:|not_in:)?[^:]+$
order_by query array ['created_at DESC'] No
owner_id query array [] No Allowed operators: `eq`, `neq`, `contains`, `not_contains`, `starts_with`, `ends_with`, `is_empty`, `is_not_empty`, `in`, `not_in`. Default operator `contains`. Pattern: ^(eq:|neq:|contains:|not_contains:|starts_with:|ends_with:|is_empty:|is_not_empty:|in:|not_in:)?[^:]+$
page query integer 1 No Page number
s3_url query array [] No Allowed operators: `eq`, `neq`, `contains`, `not_contains`, `starts_with`, `ends_with`, `is_empty`, `is_not_empty`, `in`, `not_in`. Default operator `contains`. Pattern: ^(eq:|neq:|contains:|not_contains:|starts_with:|ends_with:|is_empty:|is_not_empty:|in:|not_in:)?[^:]+$
size query integer 50 No Page size
slots query array [] No Allowed operators: `eq`, `neq`, `contains`, `not_contains`, `starts_with`, `ends_with`, `is_empty`, `is_not_empty`, `in`, `not_in`, `any`, `not_any`. Default operator `contains`. Pattern: ^(eq:|neq:|contains:|not_contains:|starts_with:|ends_with:|is_empty:|is_not_empty:|in:|not_in:|any:|not_any:)?[^:]+$
status query array [] No Allowed operators: `eq`, `neq`, `contains`, `not_contains`, `starts_with`, `ends_with`, `is_empty`, `is_not_empty`, `in`, `not_in`. Default operator `contains`. Pattern: ^(eq:|neq:|contains:|not_contains:|starts_with:|ends_with:|is_empty:|is_not_empty:|in:|not_in:)?[^:]+$
summary query array [] No Allowed operators: `eq`, `neq`, `contains`, `not_contains`, `starts_with`, `ends_with`, `is_empty`, `is_not_empty`, `in`, `not_in`. Default operator `contains`. Pattern: ^(eq:|neq:|contains:|not_contains:|starts_with:|ends_with:|is_empty:|is_not_empty:|in:|not_in:)?[^:]+$
tags query array [] No Allowed operators: `any`, `not_any`, `is_empty`, `is__not_empty`. Default operator `any`. Pattern: ^(any:|not_any:|is_empty:|is__not_empty:)?[^:]+$
workspace_id path string No The ID of the workspace.

Response 200 OK

{
    "items": [
        {
            "owner_id": "string",
            "name": "string",
            "s3_url": "string",
            "created_at": "2022-04-13T15:42:05.901Z",
            "file_size": null,
            "file_type": null,
            "tags": null,
            "categories": null,
            "status": "public",
            "file_hash": null,
            "summary": null,
            "access": null,
            "slots": null,
            "id": "39234892-d42a-4742-b420-b9fdec87a8dc"
        }
    ],
    "total": null,
    "page": null,
    "size": null,
    "pages": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "items": {
            "items": {
                "$ref": "#/components/schemas/DocumentMetadataRead"
            },
            "type": "array",
            "title": "Items"
        },
        "total": {
            "anyOf": [
                {
                    "type": "integer",
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Total"
        },
        "page": {
            "anyOf": [
                {
                    "type": "integer",
                    "minimum": 1.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Page"
        },
        "size": {
            "anyOf": [
                {
                    "type": "integer",
                    "minimum": 1.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Size"
        },
        "pages": {
            "anyOf": [
                {
                    "type": "integer",
                    "minimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Pages"
        }
    },
    "type": "object",
    "required": [
        "items",
        "total",
        "page",
        "size"
    ],
    "title": "Page[DocumentMetadataRead]"
}

Response 422 Unprocessable Entity

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

Default


GET /

Root

Response 200 OK

Schema of the response body


Schemas

DocumentMetadataConfirm

Name Type
document_metadata DocumentMetadataCreate
folder
temp_key string

DocumentMetadataCreate

Name Type
access
categories Array<string>
created_at
file_hash
file_size
file_type
name string
owner_id
s3_url
slots
status
summary
tags Array<string>

DocumentMetadataPatch

Name Type
access
categories
file_hash
file_size
name string
slots
summary
tags

DocumentMetadataRead

Name Type
access
categories
created_at string(date-time)
file_hash
file_size
file_type
id string(uuid)
name string
owner_id string
s3_url string
slots
status StatusEnum
summary
tags

HTTPValidationError

Name Type
detail Array<ValidationError>

Page_DocumentMetadataRead_

Name Type
items Array<DocumentMetadataRead>
page
pages
size
total

StatusEnum

Type: string

ValidationError

Name Type
loc Array<>
msg string
type string

Security schemes

Name Type Scheme Description
APIKeyHeader apiKey