Skip to content
Open
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
013ffc4
Add endpoints for storage.
davihillesheim Sep 9, 2022
41e7148
Fix indentations.
davihillesheim Sep 14, 2022
ed858a8
Add schema for the storage api calls.
davihillesheim Sep 29, 2022
b985b0b
Remove wrong parameter on FileData schema.
davihillesheim Sep 30, 2022
87807ad
Fix indentations.
davihillesheim Sep 30, 2022
9cd45fd
Fix syntax errors.
davihillesheim Sep 30, 2022
a3ba8cb
Change integer format for FileData properties.
davihillesheim Sep 30, 2022
cc188bf
Merge remote-tracking branch 'origin/dev' into davi/ccl-594
davihillesheim Sep 30, 2022
22b1fd4
Small merge fix.
davihillesheim Sep 30, 2022
698933a
Add storage back.
davihillesheim Sep 30, 2022
8ec56f4
Update error schemas for storage api.
davihillesheim Sep 30, 2022
c34ed22
Update schema.
davihillesheim Sep 30, 2022
d9eca1d
Fix parameters.
davihillesheim Sep 30, 2022
6517db2
Minor fix
davihillesheim Oct 3, 2022
061d134
Change regex pattern.
davihillesheim Oct 3, 2022
9e139d2
Double scape backslash as yml complains.
davihillesheim Oct 3, 2022
116cf41
Syntax errors.
davihillesheim Oct 3, 2022
fab2903
Change from projectID to projectUID in storage paths.
davihillesheim Oct 3, 2022
8068b77
Change file data schema and fix minor bug on getFile
davihillesheim Oct 10, 2022
f21dbea
Remove security param from storage calls.
davihillesheim Oct 10, 2022
869a577
Fix indentations.
davihillesheim Oct 10, 2022
c579479
Change storage response type.
davihillesheim Oct 10, 2022
b953eee
Change request body for file upload.
davihillesheim Oct 11, 2022
a454995
Syntax error
davihillesheim Oct 11, 2022
61fd435
Move FileData and FileMeta components to requestBodies and responses
davihillesheim Oct 11, 2022
c57028b
Move FileData and FileMeta components to requestBodies and responses
davihillesheim Oct 11, 2022
88de02b
Minor fixes
davihillesheim Oct 11, 2022
60898aa
Change getStorage return from array to list.
davihillesheim Oct 12, 2022
0b9a96c
Bug fix
davihillesheim Oct 12, 2022
1204ef0
Revert "Bug fix"
davihillesheim Oct 12, 2022
117f946
Revert "Change getStorage return from array to list."
davihillesheim Oct 12, 2022
1ea40e8
Use the fileName schema on schemas that use fileName.
davihillesheim Oct 24, 2022
a539e71
Adress comments.
davihillesheim Oct 24, 2022
f9227cd
Adress comments.
davihillesheim Oct 24, 2022
fd569fc
Specify that the date returned on lastModified is represented in millis
davihillesheim Oct 24, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
176 changes: 175 additions & 1 deletion conclave-cloud-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,110 @@ paths:
default:
$ref: "#/components/responses/GenericError"

/projects/{projectUID}/storage:
get:
description: List files stored in a project.
operationId: listStorage
tags:
- Storage
parameters:
- $ref: "#/components/parameters/projectUID"
- $ref: "#/components/parameters/Storage.List.Limit"
- $ref: "#/components/parameters/Storage.List.Skip"
responses:
'200':
description: Successfully returned files stored.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/responses/Storage.FileMeta'
'400':
$ref: "#/components/responses/InvalidError"
'401':
$ref: "#/components/responses/UnauthorizedError"
'403':
$ref: "#/components/responses/ForbiddenError"
'404':
$ref: "#/components/responses/NotFoundError"
default:
$ref: "#/components/responses/GenericError"
post:
description: 'Upload a file to the cloud storage'
operationId: uploadFile
tags:
- Storage
parameters:
- $ref: "#/components/parameters/projectUID"
requestBody:
$ref: '#/components/requestBodies/Storage.FileData'
responses:
'200':
description: Successfully uploaded the file.
content:
application/json:
schema:
$ref: '#/components/responses/Storage.FileMeta'
'400':
$ref: "#/components/responses/InvalidError"
'401':
$ref: "#/components/responses/UnauthorizedError"
'403':
$ref: "#/components/responses/ForbiddenError"
'404':
$ref: "#/components/responses/NotFoundError"
default:
$ref: "#/components/responses/GenericError"

/projects/{projectUID}/storage/{fileName}:
get:
description: Get metadata from a particular file.
operationId: getFile
tags:
- Storage
parameters:
- $ref: "#/components/parameters/projectUID"
- $ref: "#/components/parameters/fileName"
responses:
'200':
description: Successfully returned the file details.
content:
application/json:
schema:
$ref: '#/components/responses/Storage.FileMeta'
'400':
$ref: "#/components/responses/InvalidError"
'401':
$ref: "#/components/responses/UnauthorizedError"
'403':
$ref: "#/components/responses/ForbiddenError"
'404':
$ref: "#/components/responses/NotFoundError"
default:
$ref: "#/components/responses/GenericError"
delete:
description: Delete a file from storage.
tags:
- Storage
operationId: deleteFile
parameters:
- $ref: "#/components/parameters/projectUID"
- $ref: "#/components/parameters/fileName"
responses:
'200':
description: The file was deleted successfully.
'400':
$ref: "#/components/responses/InvalidError"
'401':
$ref: "#/components/responses/UnauthorizedError"
'403':
$ref: "#/components/responses/ForbiddenError"
'404':
$ref: "#/components/responses/NotFoundError"
default:
$ref: "#/components/responses/GenericError"

/projects/{projectUID}/functions:
get:
description: Get the list of functions in a project.
Expand Down Expand Up @@ -554,7 +658,19 @@ components:
application/json:
schema:
$ref: "#/components/schemas/Invocations.Invoke"
Storage.FileData:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Storage.FileData'
responses:
Storage.FileMeta:
description: The file metadata.
content:
application/json:
schema:
$ref: '#/components/schemas/Storage.FileMeta'
ApiKeys.Create:
description: An API key that you can use to execute operations against a specific project.
content:
Expand Down Expand Up @@ -854,6 +970,33 @@ components:
required: true
schema:
$ref: "#/components/schemas/Functions.Name"
fileName:
name: fileName
description: Name of a file.
example: filename.txt
in: path
required: true
schema:
$ref: "#/components/schemas/Storage.FileName"
Storage.List.Limit:
name: limit
description: Number of entities to include in the result. A value of 0 sets the limit to the maximum.
in: query
required: false
schema:
type: integer
default: 30
minimum: 0
maximum: 200
Storage.List.Skip:
name: skip
description: Number of entities to skip in the result.
in: query
required: false
schema:
type: integer
default: 0
minimum: 0
schemas:
ApiKeys.ApiKey:
type: object
Expand Down Expand Up @@ -994,6 +1137,36 @@ components:
default: 256
minimum: 1
maximum: 512
Storage.FileName:
type: string
example: myFile.txt
Storage.FileData:
required:
- fileName
- fileData
properties:
fileName:
$ref: "#/components/schemas/Storage.FileName"
fileData:
type: string
description: Contents of the file
minLength: 1
Storage.FileMeta:
required:
- fileName
- size
- lastModified
properties:
fileName:
$ref: "#/components/schemas/Storage.FileName"
size:
type: integer
format: int64
description: Size of the file
lastModified:
type: integer
format: int64
description: Date of when the file was last modified in milliseconds
Invocations.Invocation:
description: Full invocation details
type: object
Expand Down Expand Up @@ -1341,4 +1514,5 @@ components:
type: number
format: int64
description: Execution time in MB-ms.
example: 312
example: 312