Verify bucket connectivity

Verify bucket connectivity

post

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.

Authorizations
Path parameters
organizationIdintegerRequired

Organization ID

Body
storageProviderstring · enumOptional

The type of storage backend to use. Supported options are:

  • 's3': Amazon S3
  • 'google': Google Cloud Storage
  • 'azure': Azure Blob Storage
  • 'other': Other S3-compatible storage If not specified, defaults to 's3'
Possible values:
accessKeystringRequired

Access key for the storage service:

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

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.
bucketIdintegerOptional

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

bucketstringRequired

Name of the storage bucket or container.

endpointstringRequired

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

regionstringOptional

Optional region of the storage service (if applicable).

prefixstringOptional

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

Responses
200
OK
application/json
Responseall of

Response object for verifying an organization's bucket connectivity.

Workflow:

  1. The client initiates verification by sending a GET request to /api/organizations/{organizationId}/buckets/verify with bucket and credential details.
  2. The server responds with this VerifyOrganizationBucketResponse object.
  3. The client checks the connectionStatus:
    • If "connected": Verification is complete. Other properties (files, hasInfoLabelsFile, signedUrl) are available.
    • If "connecting": Verification is in progress. The client should continue polling. Other properties are not yet available.
    • If "error": Verification failed. Check connectionError for details. Other properties are not available.
  4. If connectionStatus is "connecting", the client should periodically poll the endpoint until the status changes to "connected" or "error".
post
POST /v1/api/organizations/{organizationId}/buckets/verify HTTP/1.1
Host: studio.edgeimpulse.com
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 141

{
  "storageProvider": "s3",
  "accessKey": "text",
  "secretKey": "text",
  "bucketId": 1,
  "bucket": "text",
  "endpoint": "text",
  "region": "text",
  "prefix": "text"
}
200

OK

{
  "success": true,
  "error": "text",
  "connectionStatus": "connected",
  "connectionError": "text",
  "connectionStatusSince": "2025-06-30T23:35:25.823Z",
  "files": [
    {
      "name": "text",
      "size": 1,
      "folderName": "text"
    }
  ],
  "hasInfoLabelsFile": true,
  "signedUrl": "text",
  "endpoint": "text"
}

Last updated

Was this helpful?