Skip to main content

Validate Collections

GET 

/v1/collections/:workspace_id/validate_collections

Validate if the given collection ids belong to the workspace.

Args

workspace_id (str): The ID of the workspace, collection_ids (list[str]): A list of collection ids, repository_collection: DocumentCollectionRepository = Depends(get_repository(DocumentCollectionRepository)), user (TokenData): The token data of the authenticated user,

Returns

dict[str, bool]: A dictionary with collection ids as keys and a boolean indicating if they belong to the workspace. The key "all_collections_belong_to_workspace" is set to True if all collections belong to the workspace.

{
"all_collections_belong_to_workspace": True,
"collection_1": True,
"collection_2": True
}

Request

Responses

Successful Response