children
Creates, updates, deletes, gets or lists a children
resource.
Overview
Name | children |
Type | Resource |
Id | googleworkspace.drivev2.children |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Name | Datatype | Description |
---|---|---|
id | string | The ID of the child. |
childLink | string | Output only. A link to the child. |
kind | string | Output only. This is always drive#childReference . (default: drive#childReference) |
selfLink | string | Output only. A link back to this reference. |
Name | Datatype | Description |
---|---|---|
id | string | The ID of the child. |
childLink | string | Output only. A link to the child. |
kind | string | Output only. This is always drive#childReference . (default: drive#childReference) |
selfLink | string | Output only. A link back to this reference. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | folderId , childId | Gets a specific child reference. | |
list | select | folderId | maxResults , orderBy , pageToken , q | Lists a folder's children. |
insert | insert | folderId | enforceSingleParent , supportsAllDrives , supportsTeamDrives | Inserts a file into a folder. |
delete | delete | folderId , childId | enforceSingleParent | Removes a child from a folder. |
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 |
---|---|---|
childId | string | |
folderId | string | |
enforceSingleParent | boolean | |
maxResults | integer (int32) | |
orderBy | string | |
pageToken | string | |
q | string | |
supportsAllDrives | boolean | |
supportsTeamDrives | boolean |
SELECT
examples
- get
- list
Gets a specific child reference.
SELECT
id,
childLink,
kind,
selfLink
FROM googleworkspace.drivev2.children
WHERE folderId = '{{ folderId }}' -- required
AND childId = '{{ childId }}' -- required
;
Lists a folder's children.
SELECT
id,
childLink,
kind,
selfLink
FROM googleworkspace.drivev2.children
WHERE folderId = '{{ folderId }}' -- required
AND maxResults = '{{ maxResults }}'
AND orderBy = '{{ orderBy }}'
AND pageToken = '{{ pageToken }}'
AND q = '{{ q }}'
;
INSERT
examples
- insert
- Manifest
Inserts a file into a folder.
INSERT INTO googleworkspace.drivev2.children (
data__id,
data__selfLink,
data__kind,
data__childLink,
folderId,
enforceSingleParent,
supportsAllDrives,
supportsTeamDrives
)
SELECT
'{{ id }}',
'{{ selfLink }}',
'{{ kind }}',
'{{ childLink }}',
'{{ folderId }}',
'{{ enforceSingleParent }}',
'{{ supportsAllDrives }}',
'{{ supportsTeamDrives }}'
RETURNING
id,
childLink,
kind,
selfLink
;
# Description fields are for documentation purposes
- name: children
props:
- name: folderId
value: string
description: Required parameter for the children resource.
- name: id
value: string
description: >
The ID of the child.
- name: selfLink
value: string
description: >
Output only. A link back to this reference.
- name: kind
value: string
description: >
Output only. This is always `drive#childReference`.
default: drive#childReference
- name: childLink
value: string
description: >
Output only. A link to the child.
- name: enforceSingleParent
value: boolean
- name: supportsAllDrives
value: boolean
- name: supportsTeamDrives
value: boolean
DELETE
examples
- delete
Removes a child from a folder.
DELETE FROM googleworkspace.drivev2.children
WHERE folderId = '{{ folderId }}' --required
AND childId = '{{ childId }}' --required
AND enforceSingleParent = '{{ enforceSingleParent }}'
;