Skip to main content

document_links

Creates, updates, deletes, gets or lists a document_links resource.

Overview

Namedocument_links
TypeResource
Idgoogle.contentwarehouse.document_links

Fields

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
createinsertprojectsId, locationsId, documentsIdCreate a link between a source document and a target document.
deletedeleteprojectsId, locationsId, documentsId, documentLinksIdRemove the link between the source and target documents.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
documentLinksIdstring
documentsIdstring
locationsIdstring
projectsIdstring

INSERT examples

Create a link between a source document and a target document.

INSERT INTO google.contentwarehouse.document_links (
data__requestMetadata,
data__documentLink,
projectsId,
locationsId,
documentsId
)
SELECT
'{{ requestMetadata }}',
'{{ documentLink }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ documentsId }}'
RETURNING
name,
createTime,
description,
sourceDocumentReference,
state,
targetDocumentReference,
updateTime
;

DELETE examples

Remove the link between the source and target documents.

DELETE FROM google.contentwarehouse.document_links
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND documentsId = '{{ documentsId }}' --required
AND documentLinksId = '{{ documentLinksId }}' --required;