POST
/
api
/
organizations
/
{organizationId}
/
buckets
/
verify
Verify bucket connectivity
curl --request POST \
  --url https://studio.edgeimpulse.com/v1/api/organizations/{organizationId}/buckets/verify \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "storageProvider": "s3",
  "accessKey": "<string>",
  "secretKey": "<string>",
  "bucketId": 123,
  "bucket": "<string>",
  "endpoint": "<string>",
  "region": "<string>",
  "prefix": "<string>"
}'
{
  "success": true,
  "error": "<string>",
  "connectionStatus": "connected",
  "connectionError": "<string>",
  "connectionStatusSince": "2023-11-07T05:31:56Z",
  "files": [
    {
      "name": "<string>",
      "size": 123,
      "folderName": "<string>"
    }
  ],
  "hasInfoLabelsFile": true,
  "signedUrl": "<string>",
  "endpoint": "<string>"
}

Authorizations

x-api-key
string
header
required

Path Parameters

organizationId
integer
required

Organization ID

Body

application/json
accessKey
string
required

Access key for the storage service:

  • For S3 and GCS: Use the access key.
  • For Azure: Use the Storage Account Name.
bucket
string
required

Name of the storage bucket or container.

endpoint
string
required

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

storageProvider
enum<string>

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'
Available options:
s3,
google,
azure,
other
secretKey
string

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.
bucketId
integer

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

region
string

Optional region of the storage service (if applicable).

prefix
string

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

Response

200 - application/json

OK

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".
success
boolean
required

Whether the operation succeeded

connectionStatus
enum<string>
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.
Available options:
connected,
connecting,
error
error
string

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

connectionError
string | null

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

connectionStatusSince
string<date-time> | null

Timestamp of when the connectionStatus last changed.

files
object[]

Random files from the bucket. Only available when connectionStatus is "connected".

hasInfoLabelsFile
boolean

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

signedUrl
string

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

endpoint
string

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.