Search…
API Reference

Get Storage types

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

Get Connected Storages

get
/v1-beta1/storage/storages
List Storages
1
curl --location --request GET 'https://api.claid.ai/v1/storage/storages' \
2
--header 'Authorization: Bearer {{API_KEY}}'
Copied!
1
{
2
"data": [
3
{
4
"id": 2,
5
"name": "s3-playground",
6
"type": "s3",
7
"parameters": {
8
"path": "/input/",
9
"bucket": "playground"
10
},
11
"created_at": "2022-01-10T18:27:16.362118+00:00"
12
},
13
{
14
"id": 3,
15
"name": "designer-uploads",
16
"type": "gcs",
17
"parameters": {
18
"path": "",
19
"bucket": "image-uploads"
20
},
21
"created_at": "2022-01-10T18:28:22.100041+00:00"
22
}
23
]
24
}
Copied!

Create a new Claid Storage

post
/v1-beta1/storage/storages
Create Storage
Here is an example of creating AWS storage via API:
1
curl -L -X POST 'https://api.claid.ai/v1/storage/storages' \
2
-H "Content-Type: application/json" \
3
-H 'Authorization: Bearer d2b45002b95a49b0b140991e4e59f3a0' \
4
-d '
5
{
6
"name": "s3-playground",
7
"type": "s3",
8
"parameters": {
9
"bucket": "playground",
10
"credentials": {
11
"access_key": "AKIAXXXXXXX",
12
"secret_access_key": "YourSecretAccessKey"
13
}
14
}
15
}'
Copied!
1
{
2
"data": {
3
"id": 13,
4
"name": "playground1",
5
"type": "s3",
6
"parameters": {
7
"path": "",
8
"bucket": "playground"
9
},
10
"created_at": "2022-05-10T10:29:12.754824+00:00"
11
}
12
}
Copied!
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
1
curl -X GET --location "https://api.claid.ai/v1/storage/storages/118" \
2
-H "Authorization: Bearer {{API-KEY}}"
Copied!
1
{
2
"data": {
3
"id": 18,
4
"name": "gcs-images",
5
"type": "gcs",
6
"parameters": {
7
"path": "",
8
"bucket": "images",
9
"credentials": {
10
"access_key": "12"
11
}
12
},
13
"created_at": "2022-05-10T15:07:45.243255+00:00"
14
}
15
}
Copied!
delete
/v1-beta1/storage/storages/{storage_id}
Delete Storage
patch
/v1-beta1/storage/storages/{storage_id}
Patch Storage