Skip to main content

Delete object

Deletes file or directory by ID

Function DeleteObject(Val Token, Val Identifier) Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringToken
Identifier--objectStringIdentifier of the object to delete

Returns: Map Of KeyAndValue - serialized JSON response from Google


1C:Enterprise/OneScript code example
    Token      = "ya29.a0AQQ_BDQ_0g6De1s1jLOYbrGQ43QDri_VRPre92E-_aUXJNk52_zY1j3A74665Q7FVMzsgnjqjKN14ljBwB0PlswTyjZlgxcBIDMnuqIbFLhH8Hcxc5NfKIOpS...";
Identifier = "1gWSd3xX7y9I7s3wCP7avbkrUEK5VueKR";

Result = OPI_GoogleDrive.DeleteObject(Token, Identifier);
    oint gdrive DeleteObject \
--token "***" \
--object "1Ddwg-hig7v56qRJTDAOO2uTdnDkL4yAB"
Result
{}