1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-12-01 22:29:52 +02:00
Files
OpenIntegrations/docs/en/md/GoogleDrive/File-and-directory-management/Get-object-information.mdx

189 lines
5.3 KiB
Plaintext
Raw Normal View History

2024-10-15 10:50:56 +03:00
---
2024-10-15 10:16:04 +03:00
sidebar_position: 1
2025-05-05 11:15:20 +03:00
description: Get object information and other functions to work with Google Drive in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
2025-05-05 09:49:19 +03:00
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Google Drive]
2024-10-15 10:16:04 +03:00
---
2024-10-15 10:50:56 +03:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2024-10-15 10:16:04 +03:00
# Get object information
Gets information about a folder or file by ID
`Function GetObjectInformation(Val Token, Val Identifier) Export`
2024-10-15 15:15:47 +03:00
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Token | --token | String | ✔ | Token |
| Identifier | --object | String | ✔ | Identifier of the file or folder |
2024-10-15 10:16:04 +03:00
Returns: Map Of KeyAndValue - serialized JSON response from Google
<br/>
2024-10-15 21:15:56 +03:00
```bsl title="1C:Enterprise/OneScript code example"
2025-10-15 14:32:00 +03:00
Token = "ya29.a0AQQ_BDQ_0g6De1s1jLOYbrGQ43QDri_VRPre92E-_aUXJNk52_zY1j3A74665Q7FVMzsgnjqjKN14ljBwB0PlswTyjZlgxcBIDMnuqIbFLhH8Hcxc5NfKIOpS...";
2025-10-08 00:46:26 +03:00
Identifier = "11Mo30odYPEtBBU_0OndFx5dz1kP7tu-Y";
2024-10-15 10:16:04 +03:00
Result = OPI_GoogleDrive.GetObjectInformation(Token, Identifier);
```
2024-10-20 22:36:03 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint gdrive GetObjectInformation \
2024-10-22 08:59:24 +03:00
--token "***" \
2025-01-10 12:07:46 +03:00
--object "11Mo30odYPEtBBU_0OndFx5dz1kP7tu-Y"
2024-10-20 22:36:03 +03:00
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint gdrive GetObjectInformation ^
2024-10-22 08:59:24 +03:00
--token "***" ^
2025-01-10 12:07:46 +03:00
--object "11Mo30odYPEtBBU_0OndFx5dz1kP7tu-Y"
2024-10-20 22:36:03 +03:00
```
</TabItem>
</Tabs>
2024-10-15 10:16:04 +03:00
```json title="Result"
{
"kind": "drive#file",
2025-09-12 20:23:31 +03:00
"id": "11Mo30odYPEtBBU_0OndFx5dz1kP7tu-Y",
"name": "Test folder",
2024-10-15 10:16:04 +03:00
"mimeType": "application/vnd.google-apps.folder",
"starred": false,
"trashed": false,
"explicitlyTrashed": false,
"parents": [
"0AN2vrbrhqfJrUk9PVA"
],
"spaces": [
"drive"
],
"version": "1",
2025-09-12 20:23:31 +03:00
"webViewLink": "https://drive.google.com/drive/folders/11Mo30odYPEtBBU_0OndFx5dz1kP7tu-Y",
2024-10-15 10:16:04 +03:00
"iconLink": "https://drive-thirdparty.googleusercontent.com/16/type/application/vnd.google-apps.folder",
"hasThumbnail": false,
"thumbnailVersion": "0",
2025-09-12 20:23:31 +03:00
"viewedByMe": true,
"viewedByMeTime": "2025-01-09T19:05:16.432Z",
"createdTime": "2025-01-09T19:05:16.432Z",
"modifiedTime": "2025-01-09T19:05:20.704Z",
"modifiedByMeTime": "2025-01-09T19:05:20.704Z",
2024-10-15 10:16:04 +03:00
"modifiedByMe": true,
"owners": [
{
"kind": "drive#user",
"displayName": "Антон Титовец",
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocKYttNv2CZ-cTTuE90Zmht_PwnGc0YnjM1IUllXsTVORfZFVPU=s64",
"me": true,
"permissionId": "07468399490707249352",
"emailAddress": "bayselonarrend@gmail.com"
}
],
"lastModifyingUser": {
"kind": "drive#user",
"displayName": "Антон Титовец",
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocKYttNv2CZ-cTTuE90Zmht_PwnGc0YnjM1IUllXsTVORfZFVPU=s64",
"me": true,
"permissionId": "07468399490707249352",
"emailAddress": "bayselonarrend@gmail.com"
},
"shared": false,
"ownedByMe": true,
2025-09-12 20:23:31 +03:00
"downloadRestrictions": {
"itemDownloadRestriction": {
"restrictedForReaders": false,
"restrictedForWriters": false
},
"effectiveDownloadRestrictionWithContext": {
"restrictedForReaders": false,
"restrictedForWriters": false
}
},
2024-10-15 10:16:04 +03:00
"capabilities": {
"canAcceptOwnership": false,
"canAddChildren": true,
"canAddMyDriveParent": false,
"canChangeCopyRequiresWriterPermission": false,
2025-09-12 20:23:31 +03:00
"canChangeItemDownloadRestriction": false,
2024-10-15 10:16:04 +03:00
"canChangeSecurityUpdateEnabled": false,
"canChangeViewersCanCopyContent": false,
"canComment": true,
"canCopy": false,
"canDelete": true,
2025-09-12 20:23:31 +03:00
"canDisableInheritedPermissions": true,
2024-10-15 10:16:04 +03:00
"canDownload": true,
"canEdit": true,
2025-09-12 20:23:31 +03:00
"canEnableInheritedPermissions": true,
2024-10-15 10:16:04 +03:00
"canListChildren": true,
"canModifyContent": true,
"canModifyContentRestriction": false,
"canModifyEditorContentRestriction": false,
"canModifyOwnerContentRestriction": false,
"canModifyLabels": false,
"canMoveChildrenWithinDrive": true,
"canMoveItemIntoTeamDrive": true,
"canMoveItemOutOfDrive": true,
"canMoveItemWithinDrive": true,
"canReadLabels": false,
"canReadRevisions": false,
"canRemoveChildren": true,
"canRemoveContentRestriction": false,
"canRemoveMyDriveParent": true,
"canRename": true,
"canShare": true,
"canTrash": true,
"canUntrash": true
},
"viewersCanCopyContent": true,
"copyRequiresWriterPermission": false,
"writersCanShare": true,
"permissions": [
{
"kind": "drive#permission",
"id": "07468399490707249352",
"type": "user",
"emailAddress": "bayselonarrend@gmail.com",
"role": "owner",
"displayName": "Антон Титовец",
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocKYttNv2CZ-cTTuE90Zmht_PwnGc0YnjM1IUllXsTVORfZFVPU=s64",
2025-09-12 20:23:31 +03:00
"permissionDetails": [
{
"permissionType": "file",
"role": "owner",
"inherited": false
},
{
"permissionType": "file",
"role": "writer",
"inherited": true
}
],
2024-10-15 10:16:04 +03:00
"deleted": false,
"pendingOwner": false
}
],
"permissionIds": [
"07468399490707249352"
],
"folderColorRgb": "#8f8f8f",
"quotaBytesUsed": "0",
2025-09-12 20:23:31 +03:00
"isAppAuthorized": false,
2024-10-15 10:16:04 +03:00
"linkShareMetadata": {
"securityUpdateEligible": false,
"securityUpdateEnabled": true
2025-09-12 20:23:31 +03:00
},
"inheritedPermissionsDisabled": false
2024-10-15 10:16:04 +03:00
}
```