B2_Command_Line_Tool icon indicating copy to clipboard operation
B2_Command_Line_Tool copied to clipboard

Specifying the "fileid" using b2v4 rm b2id://fileid causes calls to "b2_get_file_info"

Open antarean opened this issue 6 months ago • 2 comments

Hi,

When using "b2v4 rm b2id://", I see calls to "b2_get_file_info", which leads to exceeding the daily Class B Transactions Cap.

Using "b2v3 delete-file-version", these calls are not used.

Are there any plans to avoid these unnecessary calls to "b2_get_file_info"? Or will I need to use b2v3 indefinitely?

antarean avatar Jul 07 '25 05:07 antarean

this doesn't look right, lets have a closer look

ppolewicz avatar Jul 07 '25 10:07 ppolewicz

@antarean The underlying b2_delete_file_version endpoint of the B2 Native API requires us to pass both fileName and fileId. We can't really infer the former from the b2id:// url, hence the additional API call to the b2_get_file_info.

I believe those calls are happening both for b2v4 rm and b2v3 delete-file-version. If you're confident that it's different in your case, please provide debug logs produced when running the command:

b2v3 delete-file-version --verbose <id>

olzhasar-reef avatar Jul 10 '25 21:07 olzhasar-reef