sc_api_storage_delete(profile, file, parents)

The macro sc_api_storage_delete is used to delete files stored on the storage services available in Scriptcase: Google Drive, Amazon, and Dropbox.

To use the macro, you need to configure the APIs; see the documentation below.

Parameter List

Parameter Example Description
profile

In this parameter, you should provide the profile name configured in the API menu.

'profile' => 'my_api',

This receives the profile name created in the Tools > API menu, retrieving the data entered for API usage.

Click here to see how to create a profile.

file

Using a field
'file' => {upload_file_name},

The file name can be provided using:

  • {upload_file_name}
  • [global_variable]
  • ‘File path string’

Receives the name of the file to be deleted from the storage server.

parents

Using a field
'parents' => {text_field_name},

The directory can be provided using:

  • {text_field_name}
  • [global_variable]
  • ‘Folder name or local path in cloud storage’

Directory where the file is stored in the cloud.

If no value is provided, the API will use the root directory of the storage server to find the file to be deleted.

 

Example

sc_api_storage_delete([
'profile' => 'my_profile',
'file' => {file_name},
'parents' => 'storage_directory',
]);