document_links
Creates, updates, deletes, gets or lists a document_links
resource.
Overview
Name | document_links |
Type | Resource |
Id | google.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:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
create | insert | projectsId , locationsId , documentsId | Create a link between a source document and a target document. | |
delete | delete | projectsId , locationsId , documentsId , documentLinksId | Remove 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.
Name | Datatype | Description |
---|---|---|
documentLinksId | string | |
documentsId | string | |
locationsId | string | |
projectsId | string |
INSERT
examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: document_links
props:
- name: projectsId
value: string
description: Required parameter for the document_links resource.
- name: locationsId
value: string
description: Required parameter for the document_links resource.
- name: documentsId
value: string
description: Required parameter for the document_links resource.
- name: requestMetadata
value: object
description: >
The meta information collected about the document creator, used to enforce access control for the service.
- name: documentLink
value: object
description: >
A document-link between source and target document.
DELETE
examples
- delete
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;