# cloudsync.list_buckets

List the buckets available to the cloud sync credential identified by `credentials_id`.

Use this when configuring a cloud sync task to discover which buckets a set of credentials can access. Each returned entry describes a bucket as a directory-like listing.

Only providers that organize storage into buckets (such as Amazon S3 or Storj) are supported. A JSON-RPC `error` response (code `-32001`, Method call error) is returned when the credential does not exist or its provider does not use buckets.

Type: object

##

Type: array
No Additional Items

#### Tuple Validation

##### Parameter 1: credentials_id

#### credentials_id

Type: integer

ID of the cloud credential to use for listing buckets.

##

#### Result

Type: array of object

Array of bucket information objects.

No Additional Items

##### Each item of this array must be:

Type: object

Required roles: CLOUD_SYNC_WRITE