Add api definition for copying files back from the runner.
This commit is contained in:
@ -51,6 +51,26 @@ components:
|
|||||||
- networkAccess
|
- networkAccess
|
||||||
- exposedPorts
|
- exposedPorts
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
|
File:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
description: The path of the file.
|
||||||
|
type: string
|
||||||
|
example: ./logs/last.log
|
||||||
|
size:
|
||||||
|
description: The size of the file in bytes.
|
||||||
|
type: integer
|
||||||
|
example: 42
|
||||||
|
modificationTime:
|
||||||
|
description: The Unix Time Stamp of the last modification.
|
||||||
|
type: integer
|
||||||
|
example: 1654201799
|
||||||
|
required:
|
||||||
|
- name
|
||||||
|
- size
|
||||||
|
- modificationTime
|
||||||
|
additionalProperties: false
|
||||||
|
|
||||||
responses:
|
responses:
|
||||||
BadRequest:
|
BadRequest:
|
||||||
@ -254,11 +274,6 @@ paths:
|
|||||||
$ref: "#/components/responses/InternalServerError"
|
$ref: "#/components/responses/InternalServerError"
|
||||||
|
|
||||||
/runners/{runnerId}/files:
|
/runners/{runnerId}/files:
|
||||||
patch:
|
|
||||||
summary: Manipulate runner file system
|
|
||||||
description: Delete the files with the given paths from the file system of the specified runner. Afterwards, copy the enclosed files to the runner. Existing files get overwritten and results of previous file copy operations on the same runner are present when executing multiple requests.
|
|
||||||
tags:
|
|
||||||
- runner
|
|
||||||
parameters:
|
parameters:
|
||||||
- name: runnerId
|
- name: runnerId
|
||||||
in: path
|
in: path
|
||||||
@ -267,6 +282,46 @@ paths:
|
|||||||
type: string
|
type: string
|
||||||
example: 123e4567-e89b-12d3-a456-426614174000
|
example: 123e4567-e89b-12d3-a456-426614174000
|
||||||
required: true
|
required: true
|
||||||
|
get:
|
||||||
|
summary: List filesystem.
|
||||||
|
description: List all files available in the runner.
|
||||||
|
tags:
|
||||||
|
- runner
|
||||||
|
parameters:
|
||||||
|
- name: recursive
|
||||||
|
in: query
|
||||||
|
description: Specify if the filesystem should be listed recursively.
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
required: false
|
||||||
|
- name: path
|
||||||
|
in: query
|
||||||
|
description: Specify the directory from where the filesystem is listed.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: "./"
|
||||||
|
required: false
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Success. Returns the listing of the runner's filesystem.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
Files:
|
||||||
|
description: A list of all Files
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "#/components/schemas/File"
|
||||||
|
"401":
|
||||||
|
$ref: "#/components/responses/Unauthorized"
|
||||||
|
patch:
|
||||||
|
summary: Manipulate runner file system
|
||||||
|
description: Delete the files with the given paths from the file system of the specified runner. Afterwards, copy the enclosed files to the runner. Existing files get overwritten and results of previous file copy operations on the same runner are present when executing multiple requests.
|
||||||
|
tags:
|
||||||
|
- runner
|
||||||
requestBody:
|
requestBody:
|
||||||
description: Files to copy or delete
|
description: Files to copy or delete
|
||||||
required: true
|
required: true
|
||||||
@ -312,6 +367,40 @@ paths:
|
|||||||
"500":
|
"500":
|
||||||
$ref: "#/components/responses/InternalServerError"
|
$ref: "#/components/responses/InternalServerError"
|
||||||
|
|
||||||
|
/runners/{runnerId}/files/raw:
|
||||||
|
get:
|
||||||
|
summary: Download the file.
|
||||||
|
description: Download the specified file from the selected runner.
|
||||||
|
tags:
|
||||||
|
- runner
|
||||||
|
parameters:
|
||||||
|
- name: runnerId
|
||||||
|
description: Runner on which the command should be executed
|
||||||
|
in: path
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: 123e4567-e89b-12d3-a456-426614174000
|
||||||
|
required: true
|
||||||
|
- name: path
|
||||||
|
in: query
|
||||||
|
description: Specify the file that should be returned by its filename including its path and extension.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: "./flag.txt"
|
||||||
|
required: true
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Success. Returns the file.
|
||||||
|
content:
|
||||||
|
application/octet-stream:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: binary
|
||||||
|
"401":
|
||||||
|
$ref: "#/components/responses/Unauthorized"
|
||||||
|
"404":
|
||||||
|
$ref: "#/components/responses/NotFound"
|
||||||
|
|
||||||
/runners/{runnerId}/execute:
|
/runners/{runnerId}/execute:
|
||||||
post:
|
post:
|
||||||
summary: Execute a command
|
summary: Execute a command
|
||||||
|
Reference in New Issue
Block a user