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.a0AW4XtxhtghlL7aK7VhJX0jOgNWau4CUoOEDkQBr4uJEjPidCjKm-4r4l7AoJnODBt7yblowJtvv_3vETd6CulW4V5zxxPx8TTvQAMESj7...";
Identifier = "1jnYtECZqTZpHN3SBvNxTvytyYwAk6q8d";

Result = OPI_GoogleDrive.DeleteObject(Token, Identifier);
    oint gdrive DeleteObject \
--token "***" \
--object "1xhMph9dMbd4rqjdfEqx4IEVZZaTiWnjR"
Result
null