openapi/src/paths/filesystem.yaml
/api/v2/namespaces/{namespace}/files/{path}:
get:
tags:
- files
summary: Read any node in the filesystem tree
# description:
parameters:
- $ref: '../parameters.yaml#/namespace'
- name: path
in: path
schema:
type: string
description: path of the node to read (with slashes)
required: true
responses:
"200":
description: filesystem tree node data
content:
application/json:
schema:
type: object
properties:
data:
type: object
allOf: # Combines the BasicErrorModel and the inline model
- $ref: '../objects.yaml#/FileNodeWithoutData'
- type: object
description: files node data
properties:
data:
type: string
description: (only with type != directory) base64 encoded string of the file content
children:
type: array
description: list of files child nodes
items:
$ref: '../objects.yaml#/FileNodeWithoutData'
delete:
tags:
- files
summary: Delete any node in the filesystem tree
# description:
parameters:
- $ref: '../parameters.yaml#/namespace'
- name: path
in: path
schema:
type: string
description: path of the node to delete (with slashes)
required: true
responses:
"200":
description: filesystem tree node deleted successfully
post:
tags:
- files
summary: Create a node in the filesystem tree
# description:
parameters:
- $ref: '../parameters.yaml#/namespace'
- name: path
in: path
schema:
type: string
description: path of the parent node (with slashes)
required: true
requestBody:
description: User data
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: name of the node(file or directory name)
type:
type: string
enum: [ directory, file, workflow, service, endpoint, consumer ]
description: type of the node
mimeType:
type: string
description: (only with type != directory) mime type of the file content
data:
type: string
description: (only with type != directory) base64 encoded string of the file content
responses:
"200":
description: filesystem tree node created successfully
content:
application/json:
schema:
type: object
properties:
data:
type: object
$ref: '../objects.yaml#/FileNodeWithoutData'
patch:
tags:
- files
summary: Update a node in the filesystem tree (change path or data)
# description:
parameters:
- $ref: '../parameters.yaml#/namespace'
- name: path
in: path
schema:
type: string
description: path of the parent node (with slashes)
required: true
requestBody:
description: User data
required: true
content:
application/json:
schema:
type: object
properties:
path:
type: string
description: the new absolute path of the node(file or directory name)
data:
type: string
description: (only with type != directory) base64 encoded string of the file content
responses:
"200":
description: filesystem tree node updated successfully
content:
application/json:
schema:
type: object
allOf: # Combines the BasicErrorModel and the inline model
- $ref: '../objects.yaml#/FileNodeWithoutData'
- type: object
description: files node data
properties:
data:
type: string
description: (only with type != directory) base64 encoded string of the file content