Skip to main content

GOOGLE_DRIVE API Reference

Module Information

Service Files:

  • Private: service/private/google_drive.js

Available Services: 3 Documented Services: 3


google_drive.list_files

List files/folders from Google Drive

PropertyValue
ScopeHub (requires hub context)
PermissionRead (2)

Endpoint:

https://hostname/-/svc/google_drive.list_files

Parameters

ParameterTypeRequiredDefaultDescription
folder_idstringNo"root"-

Returns

FieldTypeDescription
typeany-
descriptionany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
OAUTH_TOKEN_EXPIRED-OAuth Token is invalid or expired. Please re-authenticate.
INTERNAL_ERROR-Failed to list Google Drive files.

google_drive.import_file

Import a single file from Google Drive

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (4)

Endpoint:

https://hostname/-/svc/google_drive.import_file

Parameters

ParameterTypeRequiredDefaultDescription
file_idstringYes--
nidstringYes--

Returns

FieldTypeDescription
typeany-
descriptionany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
MISSING_PARAMETERS-Missing 'file_id' or 'nid' (destination folder ID) parameter.
INVALID_DESTINATION-Invalid destination folder ID (nid).
FILE_NOT_EXPORTABLE-This file type is not directly downloadable or exportable.
METADATA_FETCH_FAILED-Failed to get Google file metadata.
OAUTH_TOKEN_EXPIRED-OAuth Token is invalid or expired. Please re-authenticate.

google_drive.import_directory

Import entire directory recursively from Google Drive

PropertyValue
ScopeHub (requires hub context)
PermissionWrite (4)

Endpoint:

https://hostname/-/svc/google_drive.import_directory

Parameters

ParameterTypeRequiredDefaultDescription
folder_idstringYes--
nidstringYes--

Returns

FieldTypeDescription
typeany-
descriptionany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
MISSING_PARAMETERS-Missing 'folder_id' or 'nid' (destination folder ID) parameter.
INVALID_DESTINATION-Invalid destination folder ID.
INTERNAL_ERROR-Failed to import directory due to a fatal error during the recursive import process.

  • ACL System - Permission model
  • Service Routing - URL patterns
  • Error Handling - Error codes