VESPA-DOCUMENT-PUT(1)

NAME
vespa-document-put - Writes a document to Vespa

SYNOPSIS
vespa document put [id] json-file [flags]

DESCRIPTION
Writes the document in the given file to Vespa. If the document already exists, all its values will be replaced by this document. If the document id is specified both as an argument and in the file the argument takes precedence.

If json-file is a single dash ('-'), the document will be read from standard input. Alternatively, you can use the --data parameter to provide the document data directly.

OPTIONS
-d, --data=""
    Document data to use instead of reading from file or stdin

--header=[]
    Add a header to the HTTP request, on the format 'Header: Value'. This can be specified multiple times

-h, --help[=false]
    help for put

-T, --timeout=60
    Timeout for the document request in seconds

-v, --verbose[=false]
    Print the equivalent curl command for the document operation

-w, --wait=0
    Number of seconds to wait for service(s) to become ready. 0 to disable (default 0)

OPTIONS INHERITED FROM PARENT COMMANDS
-a, --application=""
    The application to use (cloud only). Format "tenant.application.instance" - instance is optional

-C, --cluster=""
    The container cluster to use. This is only required for applications with multiple clusters

-c, --color="auto"
    Whether to use colors in output. Must be "auto", "never", or "always"

-i, --instance=""
    The instance of the application to use (cloud only)

-q, --quiet[=false]
    Print only errors

-t, --target="local"
    The target platform to use. Must be "local", "cloud", "hosted" or an URL

-z, --zone=""
    The zone to use. This defaults to a dev zone (cloud only)

EXAMPLE
    $ vespa document put src/test/resources/A-Head-Full-of-Dreams.json
    $ vespa document put id:mynamespace:music::a-head-full-of-dreams src/test/resources/A-Head-Full-of-Dreams.json
    $ vespa document put id:mynamespace:music::a-head-full-of-dreams --data '{"fields":{"title":"My Title","artist":"My Artist"}}'

SEE ALSO
vespa-document(1)