Create a Live Paste Section In a Document
POST {{baseUrl}}/1/threads/live-paste
Add a section to a document that tracks another section and can automatically update when the source section is updated.
We determine where to insert the new content based on the location
argument. Some location
values are relative to another section,
which is specified by destination_section_id
, enabling fine-grained
editing. For example, to add a section to the end of an existing
section, you would send the ID of the existing section in the list as
the destination_section_id
and send 2: AFTER_SECTION
as the
location
.
To get the IDs of sections in an existing document, parse the HTML
returned by the Get Thread.
Every paragraph, list item, and table cell will have an HTML id
attribute you can use in this method. Live Paste does not support
individual items in lists.
Alternatively the content of both the source and the destination
document can be referred to by document ranges. A document range is a
heading plus all sections underneath it up to the next heading of same
or larger size. The location
values 6
, 7
and 8
support
document ranges in combination with destination_document_range
for
the destination document. The is_document_range_source
parameter
supports document ranges for the source document when set to True
,
in combination with the source_document_range
parameter. Document
ranges are available for documents only, i.e. not for spreadsheets.
Request Body
[{"name"=>"source_thread_id", "value"=>"incididunt Duis", "datatype"=>"string"}, {"name"=>"destination_thread_id", "value"=>"nostrud ex", "datatype"=>"string"}, {"name"=>"is_document_range_source", "value"=>"false", "datatype"=>"boolean"}, {"name"=>"source_section_ids", "value"=>"ipsum", "datatype"=>"string"}, {"name"=>"source_document_range", "value"=>"Duis fugiat", "datatype"=>"string"}, {"name"=>"location", "value"=>"0", "datatype"=>"number"}, {"name"=>"destination_section_id", "value"=>"esse ex velit deserunt", "datatype"=>"string"}, {"name"=>"destination_document_range", "value"=>"nostrud reprehenderit in", "datatype"=>"string"}, {"name"=>"update_automatic", "value"=>"true", "datatype"=>"boolean"}]
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: OK
{"thread":{"author_id":"HcLAEARatvR","thread_class":"document","id":"SIdAAANKtjW","created_usec":1588263820524431,"updated_usec":1588264045370339,"title":"Test destination document","link":"https://corp.quip.com/EJGEA1dknX2g","type":"document","document_id":"SIdABA4DG5G"},"user_ids":["HcLAEARatvR"],"shared_folder_ids":[],"expanded_user_ids":["HcLAEARatvR"],"invited_user_emails":[],"html":"\u003ch1 id='SIdACAn15zN'\u003eTest destination document\u003c/h1\u003e\n\u003cp id='SIdACAAhXse' class='line'\u003e\u003c/p\u003e\n\u003cp id='SIdACAYNoUk' class='line'\u003e\u003c/p\u003e\n"}