OrganizationData

Verify bucket connectivity

Verify connectivity to a storage bucket and optionally list its contents. This endpoint allows you to:

  1. Check if the provided bucket credentials are valid and the bucket is accessible.
  2. Optionally list files in the bucket up to a specified limit.
  3. Validate the bucket configuration before adding it to the organization.

The request can include details such as the bucket name, region, credentials, and listing options. The response provides information about the bucket's accessibility and, if requested, a list of files in the bucket.

Important note on verification process:

  • For S3-compatible storage backends: Verification is expected to be immediate.
  • For Azure buckets: Verification takes longer. Users are required to poll this endpoint until the connectionStatus changes from 'connecting' to 'connected'.

When dealing with Azure buckets, implement a polling mechanism to check the status periodically until it's confirmed as connected.

post/api/organizations/{organizationId}/buckets/verify

Request

Path parameters

organizationIdinteger required

Organization ID

Request body

storageProvider's3' | 'google' | 'azure' | 'other' | 'edgeimpulse' | 'huggingface'
accessKeystring required

Access key for the storage service:

  • For S3 and GCS: Use the access key.
  • For Azure: Use the Storage Account Name.
secretKeystring

Secret key for the storage service:

  • For S3 and GCS: Use the secret key.
  • For Azure: Use the Storage Account Access Key. Note: You should either pass a secretKey value or a bucketId value.
bucketIdinteger

ID of an existing bucket. If provided, the credentials from this bucket will be used unless overridden by the secretKey property.

bucketstring required

Name of the storage bucket or container.

endpointstring required

Endpoint URL for the storage service. For S3-compatible services, Azure, or custom endpoints.

regionstring

Optional region of the storage service (if applicable).

prefixstring

Optional prefix within the bucket. Set this if you don't have access to the full bucket or want to limit the scope.

Response

OK

successboolean required

Whether the operation succeeded

errorstring

Optional error description (set if 'success' was false)

connectionStatus'connected' | 'connecting' | 'error' required

Indicates the current state of the connectivity verification process.

  • "connected": Verification successful, other properties are available.
  • "connecting": Verification in progress, continue polling.
  • "error": Verification failed, check connectionError for details.
connectionErrorstring nullable

Provides additional details if connectionStatus is "error". Helps diagnose verification failures.

connectionStatusSincestring date-time nullable

Timestamp of when the connectionStatus last changed.

hasInfoLabelsFileboolean

Indicates whether there are any info.labels files in this bucket. If so, those are used for category/labels. Only available when connectionStatus is "connected".

signedUrlstring

A signed URL that allows you to PUT an item, to check whether CORS headers are set up correctly for this bucket. Only available when connectionStatus is "connected".

endpointstring

An alternative endpoint URL. Only returned and required for Azure storage accounts, where the endpoint must be reformatted. This field will be undefined for other storage providers.

Changes

No recorded changes to this operation across all 1 revision of this API.