Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
61 changes: 53 additions & 8 deletions docs/backend/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,10 @@ paths:
/results:
get:
summary: Allows getting results of the simulation.
description: If `estimator_name` is provided, the response will include results only for that specific estimator, otherwise it will return all estimators for the given job.
description: This endpoint retrieves the results of a simulation. If the `estimator_name` parameter is provided,
the response will include results only for the specified estimator. If no `estimator_name` is provided,
the response will include results for all estimators associated with the job. Additionally, you can
specify pages using the `page_number` or `page_numbers` parameter to limit the response to specific pages.
parameters:
- in: query
name: job_id
Expand All @@ -904,6 +907,18 @@ paths:
description: Name of a specific estimator to retrieve results for
schema:
type: string
- in: query
name: page_number
required: false
description: Retrieve a specific page of results for the specified estimator.
schema:
type: integer
- in: query
name: page_numbers
required: false
description: Retrieve a specific pages of results for the specified estimator. For example, `"1-3,5"` would retrieve pages 1 through 3 and page 5.
schema:
type: integer
responses:
'200':
description: Includes results of the simulation
Expand All @@ -925,6 +940,20 @@ paths:
type: string
estimator:
$ref: '#/components/schemas/Estimator'
- type: object
properties:
message:
type: string
pages:
type: array
items:
$ref: '#/components/schemas/Page'
- type: object
properties:
message:
type: string
page:
$ref: '#/components/schemas/Page'
'400':
description: Bad Request - Missing parameters
content:
Expand Down Expand Up @@ -959,28 +988,42 @@ paths:
# Estimator Routes
/estimators:
get:
summary: Allows getting names of the estimators for the specific simulation.
summary: Allows getting metadata of estimators for a specific simulation.
parameters:
- in: query
name: job_id
required: true
description: ID of the job to retrieve results for
description: ID of the job to retrieve estimators metadata for
schema:
type: string
responses:
'200':
description: Includes estimator names
description: Includes estimators metadata
content:
application/json:
schema:
type: object
properties:
message:
type: string
estimator_names:
estimators_metadata:
type: array
items:
type: string
type: object
properties:
name:
type: string
pages_metadata:
type: array
items:
type: object
properties:
page_number:
type: integer
page_name:
type: string
page_dimension:
type: integer
'400':
description: Bad Request - Missing parameters
content:
Expand Down Expand Up @@ -1334,6 +1377,9 @@ components:
task_state:
type: string
enum: [PENDING, RUNNING, COMPLETED, FAILED]
Page:
type: object
description: Page object
Estimator:
type: object
description: Estimator object includes estimator's name, associated metadata, and list of pages.
Expand All @@ -1348,8 +1394,7 @@ components:
type: array
description: List of pages
items:
type: object
description: Page object
$ref: '#/components/schemas/Page'
UpdateJobs:
type: object
required:
Expand Down
3 changes: 3 additions & 0 deletions docs/backend/persistency.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,17 @@ classDiagram
id: int
simulation_id: int
name: str
file_name: str
compressed_data: bytes
data
}

class PageModel {
id: int
page_name: str
estimator_id: int
page_number: int
page_dimension: int
compressed_data: bytes
data
}
Expand Down
Loading