Skip to main content

Create a Document

POST 

/documents

Creates a Datasphere Document

Request

Body

required

    oneOf

    max_sentences_per_chunkinteger

    Maximum number of sentences per chunk.

    Default value: 50
    Example: 40
    chunking_strategystring

    Strategy for chunking the document

    Possible values: [sentence]

    Example: sentence
    split_newlinesboolean

    Whether to split chunks on new lines.

    Default value: false

    Default value: false
    Example: false
    urlurirequired

    URL of the document.

    Example: https://example.com/document.pdf
    tagsstring[]

    Document tags.

    Example: ["sports","football","game"]

Responses

The request has succeeded and a new resource has been created as a result.

Schema

    iduuidrequired

    Unique ID of a Document.

    filenamestringrequired

    Name of the Document.

    Example: player_list.pdf
    statusDocumentStatus (string)required

    The current Status of the Document.

    Possible values: [submitted, in_progress, completed, failed]

    tagsstring[]required

    Document tags.

    Example: ["sports","football","game"]
    chunking_strategyChunkingStrategy (string)required

    Strategy to use when chunking the document.

    Possible values: [sentence, paragraph, page, sliding]

    max_sentences_per_chunkstringrequired

    Max Sentences per Chunk (only used for chunking type 'sentence')

    Example: 80
    split_newlinesbooleanrequired

    Split on Newlines (only used for chunking type 'sentence')

    Example: true
    overlap_sizestringrequired

    Overlap Size (only used for chunking type 'sliding')

    Example: 10
    chunk_sizestringrequired

    Chunk Size (only used for chunking type 'sliding')

    Example: 50
    number_of_chunksintegerrequired

    Number of Chunks in the Document.

    Example: 2345
    created_atdate-timerequired

    Document Creation Date.

    Example: 2024-05-06T12:20-12Z
    updated_atdate-timerequired

    Document Update Date.

    Example: 2024-05-06T12:20-12Z