Home

Create a bucket

post/bucket/

Query Parameters
  • authorization
    REQUIRED
    no type
Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "object",
5    "properties": {
6      "name": {
7        "type": "string",
8        "example": "avatars"
9      }
10    },
11    "required": [
12      "name"
13    ]
14  }
15}

Gets all buckets

get/bucket/

Query Parameters
  • authorization
    REQUIRED
    no type
Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "array",
5    "items": {
6      "type": "object",
7      "properties": {
8        "id": {
9          "type": "string"
10        },
11        "name": {
12          "type": "string"
13        },
14        "owner": {
15          "type": "string"
16        },
17        "public": {
18          "type": "boolean"
19        },
20        "file_size_limit": {
21          "type": "integer"
22        },
23        "allowed_mime_types": {
24          "type": [
25            "null",
26            "array"
27          ],
28          "items": {
29            "type": "string"
30          }
31        },
32        "created_at": {
33          "type": "string"
34        },
35        "updated_at": {
36          "type": "string"
37        }
38      },
39      "required": [
40        "id",
41        "name"
42      ],
43      "additionalProperties": false,
44      "title": "bucketSchema",
45      "example": {
46        "id": "bucket2",
47        "name": "bucket2",
48        "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
49        "created_at": "2021-02-17T04:43:32.770206+00:00",
50        "updated_at": "2021-02-17T04:43:32.770206+00:00"
51      }
52    },
53    "example": [
54      {
55        "id": "bucket2",
56        "name": "bucket2",
57        "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
58        "created_at": "2021-02-17T04:43:32.770206+00:00",
59        "updated_at": "2021-02-17T04:43:32.770206+00:00"
60      }
61    ]
62  },
63  "example": [
64    {
65      "id": "bucket2",
66      "name": "bucket2",
67      "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
68      "created_at": "2021-02-17T04:43:32.770206+00:00",
69      "updated_at": "2021-02-17T04:43:32.770206+00:00"
70    }
71  ]
72}

Empty a bucket

post/bucket/{bucketId}/empty

Path Parameters
  • bucketId
    REQUIRED
    no type
Query Parameters
  • authorization
    REQUIRED
    no type
Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "object",
5    "properties": {
6      "message": {
7        "type": "string",
8        "example": "Successfully emptied"
9      }
10    }
11  }
12}

Get details of a bucket

get/bucket/{bucketId}

Path Parameters
  • bucketId
    REQUIRED
    no type
Query Parameters
  • authorization
    REQUIRED
    no type
Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "object",
5    "properties": {
6      "id": {
7        "type": "string"
8      },
9      "name": {
10        "type": "string"
11      },
12      "owner": {
13        "type": "string"
14      },
15      "public": {
16        "type": "boolean"
17      },
18      "file_size_limit": {
19        "type": "integer"
20      },
21      "allowed_mime_types": {
22        "type": [
23          "null",
24          "array"
25        ],
26        "items": {
27          "type": "string"
28        }
29      },
30      "created_at": {
31        "type": "string"
32      },
33      "updated_at": {
34        "type": "string"
35      }
36    },
37    "required": [
38      "id",
39      "name"
40    ],
41    "additionalProperties": false,
42    "example": {
43      "id": "bucket2",
44      "name": "bucket2",
45      "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
46      "created_at": "2021-02-17T04:43:32.770206+00:00",
47      "updated_at": "2021-02-17T04:43:32.770206+00:00"
48    }
49  },
50  "example": {
51    "id": "bucket2",
52    "name": "bucket2",
53    "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
54    "created_at": "2021-02-17T04:43:32.770206+00:00",
55    "updated_at": "2021-02-17T04:43:32.770206+00:00"
56  }
57}

Update properties of a bucket

put/bucket/{bucketId}

Query Parameters
  • authorization
    REQUIRED
    no type
Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "object",
5    "properties": {
6      "message": {
7        "type": "string",
8        "example": "Successfully updated"
9      }
10    },
11    "required": [
12      "message"
13    ]
14  }
15}

Delete a bucket

delete/bucket/{bucketId}

Path Parameters
  • bucketId
    REQUIRED
    no type
Query Parameters
  • authorization
    REQUIRED
    no type
Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "object",
5    "properties": {
6      "message": {
7        "type": "string",
8        "example": "Successfully deleted"
9      }
10    }
11  }
12}

Delete an object

delete/object/{bucketName}/{wildcard}

Path Parameters
  • bucketName
    REQUIRED
    no type
  • *
    REQUIRED
    no type
Query Parameters
  • authorization
    REQUIRED
    no type
Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "object",
5    "properties": {
6      "message": {
7        "type": "string",
8        "example": "Successfully deleted"
9      }
10    }
11  }
12}

Get object

get/object/{bucketName}/{wildcard}

use GET /object/authenticated/{bucketName} instead

Path Parameters
  • bucketName
    REQUIRED
    no type
  • *
    REQUIRED
    no type
Query Parameters
  • authorization
    REQUIRED
    no type
Responses

Default Response

1{
2  "schema": {
3    "$ref": "#/components/schemas/def-1"
4  }
5}

Update the object at an existing key

put/object/{bucketName}/{wildcard}

Path Parameters
  • bucketName
    REQUIRED
    no type
  • *
    REQUIRED
    no type
Query Parameters
  • authorization
    REQUIRED
    no type
Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "object",
5    "properties": {
6      "Key": {
7        "type": "string",
8        "example": "projectref/avatars/folder/cat.png"
9      }
10    },
11    "required": [
12      "Key"
13    ]
14  }
15}

Upload a new object

post/object/{bucketName}/{wildcard}

Path Parameters
  • bucketName
    REQUIRED
    no type
  • *
    REQUIRED
    no type
Query Parameters
  • authorization
    REQUIRED
    no type
Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "object",
5    "properties": {
6      "Key": {
7        "type": "string",
8        "example": "avatars/folder/cat.png"
9      }
10    },
11    "required": [
12      "Key"
13    ]
14  }
15}

Delete multiple objects

delete/object/{bucketName}

Path Parameters
  • bucketName
    REQUIRED
    no type
Query Parameters
  • authorization
    REQUIRED
    no type
Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "array",
5    "items": {
6      "type": "object",
7      "properties": {
8        "name": {
9          "type": "string"
10        },
11        "bucket_id": {
12          "type": "string"
13        },
14        "owner": {
15          "type": "string"
16        },
17        "id": {
18          "anyOf": [
19            {
20              "type": "string"
21            },
22            {
23              "type": "null"
24            }
25          ]
26        },
27        "updated_at": {
28          "anyOf": [
29            {
30              "type": "string"
31            },
32            {
33              "type": "null"
34            }
35          ]
36        },
37        "version": {
38          "type": "string"
39        },
40        "created_at": {
41          "anyOf": [
42            {
43              "type": "string"
44            },
45            {
46              "type": "null"
47            }
48          ]
49        },
50        "last_accessed_at": {
51          "anyOf": [
52            {
53              "type": "string"
54            },
55            {
56              "type": "null"
57            }
58          ]
59        },
60        "metadata": {
61          "anyOf": [
62            {
63              "type": "object",
64              "additionalProperties": true
65            },
66            {
67              "type": "null"
68            }
69          ]
70        },
71        "buckets": {
72          "type": "object",
73          "properties": {
74            "id": {
75              "type": "string"
76            },
77            "name": {
78              "type": "string"
79            },
80            "owner": {
81              "type": "string"
82            },
83            "public": {
84              "type": "boolean"
85            },
86            "file_size_limit": {
87              "type": "integer"
88            },
89            "allowed_mime_types": {
90              "type": [
91                "null",
92                "array"
93              ],
94              "items": {
95                "type": "string"
96              }
97            },
98            "created_at": {
99              "type": "string"
100            },
101            "updated_at": {
102              "type": "string"
103            }
104          },
105          "required": [
106            "id",
107            "name"
108          ],
109          "additionalProperties": false,
110          "example": {
111            "id": "bucket2",
112            "name": "bucket2",
113            "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
114            "created_at": "2021-02-17T04:43:32.770206+00:00",
115            "updated_at": "2021-02-17T04:43:32.770206+00:00"
116          }
117        }
118      },
119      "required": [
120        "name"
121      ],
122      "additionalProperties": false,
123      "title": "objectSchema",
124      "example": {
125        "name": "folder/cat.png",
126        "bucket_id": "avatars",
127        "owner": "317eadce-631a-4429-a0bb-f19a7a517b4a",
128        "id": "eaa8bdb5-2e00-4767-b5a9-d2502efe2196",
129        "updated_at": "2021-04-06T16:30:35.394674+00:00",
130        "created_at": "2021-04-06T16:30:35.394674+00:00",
131        "last_accessed_at": "2021-04-06T16:30:35.394674+00:00",
132        "metadata": {
133          "size": 1234
134        }
135      }
136    }
137  }
138}

Retrieve an object

get/object/authenticated/{bucketName}/{wildcard}

Path Parameters
  • bucketName
    REQUIRED
    no type
  • *
    REQUIRED
    no type
Query Parameters
  • authorization
    REQUIRED
    no type
Responses

Error response

1{
2  "schema": {
3    "$ref": "#/components/schemas/def-1",
4    "description": "Error response"
5  }
6}

Generate a presigned url to retrieve an object

post/object/sign/{bucketName}/{wildcard}

Path Parameters
  • bucketName
    REQUIRED
    no type
  • *
    REQUIRED
    no type
Query Parameters
  • authorization
    REQUIRED
    no type
Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "object",
5    "properties": {
6      "signedURL": {
7        "type": "string",
8        "example": "/object/sign/avatars/folder/cat.png?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJhdmF0YXJzL2ZvbGRlci9jYXQucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.s7Gt8ME80iREVxPhH01ZNv8oUn4XtaWsmiQ5csiUHn4"
9      }
10    },
11    "required": [
12      "signedURL"
13    ]
14  }
15}

Retrieve an object via a presigned URL

get/object/sign/{bucketName}/{wildcard}

Path Parameters
  • bucketName
    REQUIRED
    no type
  • *
    REQUIRED
    no type
Query Parameters
  • download
    Optional
    no type
  • token
    REQUIRED
    no type
Responses

Error response

1{
2  "schema": {
3    "$ref": "#/components/schemas/def-1",
4    "description": "Error response"
5  }
6}

Generate presigned urls to retrieve objects

post/object/sign/{bucketName}

Path Parameters
  • bucketName
    REQUIRED
    no type
Query Parameters
  • authorization
    REQUIRED
    no type
Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "array",
5    "items": {
6      "type": "object",
7      "properties": {
8        "error": {
9          "error": [
10            "string",
11            "null"
12          ],
13          "example": "Either the object does not exist or you do not have access to it"
14        },
15        "path": {
16          "type": "string",
17          "example": "folder/cat.png"
18        },
19        "signedURL": {
20          "type": [
21            "null",
22            "string"
23          ],
24          "example": "/object/sign/avatars/folder/cat.png?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJhdmF0YXJzL2ZvbGRlci9jYXQucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.s7Gt8ME80iREVxPhH01ZNv8oUn4XtaWsmiQ5csiUHn4"
25        }
26      },
27      "required": [
28        "error",
29        "path",
30        "signedURL"
31      ]
32    }
33  }
34}

Moves an object

post/object/move

Query Parameters
  • authorization
    REQUIRED
    no type
Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "object",
5    "properties": {
6      "message": {
7        "type": "string",
8        "example": "Successfully moved"
9      }
10    },
11    "required": [
12      "message"
13    ]
14  }
15}

Search for objects under a prefix

post/object/list/{bucketName}

Path Parameters
  • bucketName
    REQUIRED
    no type
Query Parameters
  • authorization
    REQUIRED
    no type
Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "array",
5    "items": {
6      "type": "object",
7      "properties": {
8        "name": {
9          "type": "string"
10        },
11        "bucket_id": {
12          "type": "string"
13        },
14        "owner": {
15          "type": "string"
16        },
17        "id": {
18          "anyOf": [
19            {
20              "type": "string"
21            },
22            {
23              "type": "null"
24            }
25          ]
26        },
27        "updated_at": {
28          "anyOf": [
29            {
30              "type": "string"
31            },
32            {
33              "type": "null"
34            }
35          ]
36        },
37        "version": {
38          "type": "string"
39        },
40        "created_at": {
41          "anyOf": [
42            {
43              "type": "string"
44            },
45            {
46              "type": "null"
47            }
48          ]
49        },
50        "last_accessed_at": {
51          "anyOf": [
52            {
53              "type": "string"
54            },
55            {
56              "type": "null"
57            }
58          ]
59        },
60        "metadata": {
61          "anyOf": [
62            {
63              "type": "object",
64              "additionalProperties": true
65            },
66            {
67              "type": "null"
68            }
69          ]
70        },
71        "buckets": {
72          "type": "object",
73          "properties": {
74            "id": {
75              "type": "string"
76            },
77            "name": {
78              "type": "string"
79            },
80            "owner": {
81              "type": "string"
82            },
83            "public": {
84              "type": "boolean"
85            },
86            "file_size_limit": {
87              "type": "integer"
88            },
89            "allowed_mime_types": {
90              "type": [
91                "null",
92                "array"
93              ],
94              "items": {
95                "type": "string"
96              }
97            },
98            "created_at": {
99              "type": "string"
100            },
101            "updated_at": {
102              "type": "string"
103            }
104          },
105          "required": [
106            "id",
107            "name"
108          ],
109          "additionalProperties": false,
110          "example": {
111            "id": "bucket2",
112            "name": "bucket2",
113            "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
114            "created_at": "2021-02-17T04:43:32.770206+00:00",
115            "updated_at": "2021-02-17T04:43:32.770206+00:00"
116          }
117        }
118      },
119      "required": [
120        "name"
121      ],
122      "additionalProperties": false,
123      "example": {
124        "name": "folder/cat.png",
125        "bucket_id": "avatars",
126        "owner": "317eadce-631a-4429-a0bb-f19a7a517b4a",
127        "id": "eaa8bdb5-2e00-4767-b5a9-d2502efe2196",
128        "updated_at": "2021-04-06T16:30:35.394674+00:00",
129        "created_at": "2021-04-06T16:30:35.394674+00:00",
130        "last_accessed_at": "2021-04-06T16:30:35.394674+00:00",
131        "metadata": {
132          "size": 1234
133        }
134      }
135    }
136  }
137}

Retrieve object info

get/object/info/authenticated/{bucketName}/{wildcard}

Path Parameters
  • bucketName
    REQUIRED
    no type
  • *
    REQUIRED
    no type
Query Parameters
  • authorization
    REQUIRED
    no type
Responses

Error response

1{
2  "schema": {
3    "$ref": "#/components/schemas/def-1",
4    "description": "Error response"
5  }
6}

Copies an object

post/object/copy

Query Parameters
  • authorization
    REQUIRED
    no type
Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "object",
5    "properties": {
6      "Key": {
7        "type": "string",
8        "example": "folder/destination.png"
9      }
10    },
11    "required": [
12      "Key"
13    ]
14  }
15}

Retrieve an object from a public bucket

get/object/public/{bucketName}/{wildcard}

Path Parameters
  • bucketName
    REQUIRED
    no type
  • *
    REQUIRED
    no type
Responses

Error response

1{
2  "schema": {
3    "$ref": "#/components/schemas/def-1",
4    "description": "Error response"
5  }
6}

Get object info

get/object/info/public/{bucketName}/{wildcard}

returns object info

Path Parameters
  • bucketName
    REQUIRED
    no type
  • *
    REQUIRED
    no type
Responses

Default Response

1{
2  "schema": {
3    "$ref": "#/components/schemas/def-1"
4  }
5}