< Back

Get-B2UploadUri

Sun Jan 19, 2020 5:52 pm

NAME Get-B2UploadUri



SYNOPSIS

Get-B2UploadUri will get the upload Uri for a given bucket.





SYNTAX

Get-B2UploadUri [-BucketID] <String> [[-ApiUri] <Uri>] [[-ApiToken] <String>] [<CommonParameters>]





DESCRIPTION

Get-B2UploadUri will get the upload Uri for a given bucket.



An upload Uri and upload authorization token are valid for

24 hours or until the endpoint rejects an upload.



An API key is required to use this cmdlet.





PARAMETERS

-BucketID <String>

The ID of the bucket to query.



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-ApiUri <Uri>

The Uri for the B2 Api query.



Required? false

Position? 2

Default value $script:SavedB2ApiUri

Accept pipeline input? false

Accept wildcard characters? false



-ApiToken <String>

The authorization token for the B2 account.



Required? false

Position? 3

Default value $script:SavedB2ApiToken

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.String



This cmdlet takes the BucketID and ApiToken as strings.



System.Uri



This cmdlet takes the ApiUri as a uri.





OUTPUTS

PS.B2.UploadUri



The cmdlet will output a PS.B2.UploadUri object holding upload info.





-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-B2UploadUri -BucketID 4a48fe8875c6214145260818



BucketID UploadUri

-------- ---------

4ebdd57f81669028501e091f

https://pod-000-1015-16.backblaze.com/b ... e091f/c001...



The cmdlet above will return the upload uri for the bucket with ID 4ebdd57f81669028501e091f.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-B2Bucket | Get-B2UploadUri



BucketID UploadUri

-------- ---------

4ebdd57f81669028501e091f

https://pod-000-1015-16.backblaze.com/b ... e091f/c001...

4a48fe8875c6214145260818

https://pod-000-1005-03.backblaze.com/b ... 0027&bucke...



The cmdlet above will return the upload uri for all buckets available for the account.











RELATED LINKS

https://www.backblaze.com/b2/docs/