Search…
API Reference

Get Storage types

get
/v1-beta1/storage/storage-types
List Storage Types
curl --location --request GET 'https://api.claid.ai/v1/storage/storage-types' \
--header 'Authorization: Bearer {{API_KEY}}'
{
"data": [
"web_folder",
"s3",
"gcs"
]
}

Get Connected Storages

get
/v1-beta1/storage/storages
List Storages
curl --location --request GET 'https://api.claid.ai/v1/storage/storages' \
--header 'Authorization: Bearer {{API_KEY}}'
{
"data": [
{
"id": 2,
"name": "s3-playground",
"type": "s3",
"parameters": {
"path": "/input/",
"bucket": "playground"
},
"created_at": "2022-01-10T18:27:16.362118+00:00"
},
{
"id": 3,
"name": "designer-uploads",
"type": "gcs",
"parameters": {
"path": "",
"bucket": "image-uploads"
},
"created_at": "2022-01-10T18:28:22.100041+00:00"
}
]
}

Create a new Claid Storage

post
/v1-beta1/storage/storages
Create Storage
Here is an example of creating AWS storage via API:
curl -L -X POST 'https://api.claid.ai/v1/storage/storages' \
-H "Content-Type: application/json" \
-H 'Authorization: Bearer d2b45002b95a49b0b140991e4e59f3a0' \
-d '
{
"name": "s3-playground",
"type": "s3",
"parameters": {
"bucket": "playground",
"credentials": {
"access_key": "AKIAXXXXXXX",
"secret_access_key": "YourSecretAccessKey"
}
}
}'
{
"data": {
"id": 13,
"name": "playground1",
"type": "s3",
"parameters": {
"path": "",
"bucket": "playground"
},
"created_at": "2022-05-10T10:29:12.754824+00:00"
}
}
parameters supported by the AWS S3 storage:
Parameter
Type
name
string
bucket
string
prefix
string
credentials.access_key
string
credentials.secret_access_key
string
parameters supported by the GCS storage: #todo
name
string
bucket
string
prefix
string
credentials.access_key
string
credentials.secret_access_key
string
parameters supported by the Web Folder storage:
name
string
base_url
string

Describe storage by id

get
/v1-beta1/storage/storages/{storage_id}
Get Storage
curl -X GET --location "https://api.claid.ai/v1/storage/storages/118" \
-H "Authorization: Bearer {{API-KEY}}"
{
"data": {
"id": 18,
"name": "gcs-images",
"type": "gcs",
"parameters": {
"path": "",
"bucket": "images",
"credentials": {
"access_key": "12"
}
},
"created_at": "2022-05-10T15:07:45.243255+00:00"
}
}
delete
/v1-beta1/storage/storages/{storage_id}
Delete Storage
patch
/v1-beta1/storage/storages/{storage_id}
Patch Storage
Copy link
Edit on GitHub
On this page
Get Storage types
get
/v1-beta1/storage/storage-types
Get Connected Storages
get
/v1-beta1/storage/storages
Create a new Claid Storage
post
/v1-beta1/storage/storages
Describe storage by id
get
/v1-beta1/storage/storages/{storage_id}
delete
/v1-beta1/storage/storages/{storage_id}
patch
/v1-beta1/storage/storages/{storage_id}