Skip to content

Commit fc17649

Browse files
maxxgxleoll2
andauthored
ITEP-67382 - Add new configuration endpoint rest api docs (#711)
Co-authored-by: Leonardo Lai <leonardo.lai@intel.com>
1 parent 9639e65 commit fc17649

41 files changed

Lines changed: 2170 additions & 11 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/rest_api/endpoints/configuration/full_endpoint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
get:
2+
deprecated: true
23
tags:
34
- Configuration
45
summary: "Get the current configuration for all components in the project."

docs/rest_api/endpoints/configuration/global_endpoint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
get:
2+
deprecated: true
23
tags:
34
- Configuration
45
summary: Get the current configuration for all components in the project.
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
get:
2+
tags:
3+
- Configuration
4+
summary: "Retrieve project or task-specific configuration settings"
5+
description: |
6+
Retrieves the configuration settings for a project or a specific task within a project.
7+
8+
- If task_id is provided, returns only configuration for that specific task
9+
- Otherwise, returns configuration for the entire project, including all tasks
10+
operationId: GetProjectConfiguration
11+
parameters:
12+
- $ref: "../../parameters/path/organization_id.yaml"
13+
- $ref: "../../parameters/path/workspace_id.yaml"
14+
- $ref: "../../parameters/path/project_id.yaml"
15+
- $ref: "../../parameters/query/task_id.yaml"
16+
responses:
17+
'200':
18+
description: Get full configuration response
19+
content:
20+
application/json:
21+
schema:
22+
$ref: "../../../../interactive_ai/services/api/schemas/configuration/responses/revamp/project_configuration.yaml"
23+
examples:
24+
Project configuration response:
25+
value:
26+
- $ref: "../../examples/configuration/responses/revamp/project_configuration.json"
27+
'404':
28+
description: Object not found. See the examples for details.
29+
content:
30+
application/json:
31+
schema:
32+
$ref: "../../../../interactive_ai/services/api/schemas/generic_responses/error_response.yaml"
33+
examples:
34+
Organization not found response:
35+
value:
36+
$ref: "../../examples/organizations/error_responses/organization_not_found.json"
37+
Workspace not found response:
38+
value:
39+
$ref: "../../examples/workspaces/error_responses/workspace_not_found.json"
40+
Project not found response:
41+
value:
42+
$ref: "../../examples/projects/error_responses/project_not_found.json"
43+
Project configuration not found response:
44+
value:
45+
$ref: "../../examples/configuration/error_responses/revamp/project_configuration_not_found.json"
46+
47+
patch:
48+
tags:
49+
- Configuration
50+
summary: "Update project or task-specific configuration settings"
51+
description: |
52+
Updates the configuration settings for a project or a specific task within a project.
53+
54+
- If task_id is provided, updates only configuration for that specific task
55+
- Otherwise, updates configuration for the entire project
56+
operationId: UpdateProjectConfiguration
57+
parameters:
58+
- $ref: "../../parameters/path/organization_id.yaml"
59+
- $ref: "../../parameters/path/workspace_id.yaml"
60+
- $ref: "../../parameters/path/project_id.yaml"
61+
- $ref: "../../parameters/query/task_id.yaml"
62+
requestBody:
63+
content:
64+
application/json:
65+
schema:
66+
$ref: "../../../../interactive_ai/services/api/schemas/configuration/requests/revamp/project_configuration.yaml"
67+
examples:
68+
Project configuration payload:
69+
value:
70+
- $ref: "../../examples/configuration/requests/revamp/project_configuration.json"
71+
required: true
72+
responses:
73+
'204':
74+
description: Configuration updated successfully
75+
'404':
76+
description: Object not found. See the examples for details.
77+
content:
78+
application/json:
79+
schema:
80+
$ref: "../../../../interactive_ai/services/api/schemas/generic_responses/error_response.yaml"
81+
examples:
82+
Organization not found response:
83+
value:
84+
$ref: "../../examples/organizations/error_responses/organization_not_found.json"
85+
Workspace not found response:
86+
value:
87+
$ref: "../../examples/workspaces/error_responses/workspace_not_found.json"
88+
Project not found response:
89+
value:
90+
$ref: "../../examples/projects/error_responses/project_not_found.json"
91+
Project configuration not found response:
92+
value:
93+
$ref: "../../examples/configuration/error_responses/revamp/project_configuration_not_found.json"
94+
'400':
95+
description: Payload configuration contains validation error. See the examples for details.
96+
content:
97+
application/json:
98+
schema:
99+
$ref: "../../../../interactive_ai/services/api/schemas/generic_responses/error_response.yaml"
100+
examples:
101+
Payload validation error response:
102+
value:
103+
$ref: "../../examples/configuration/error_responses/revamp/pydantic_validation_error.json"

docs/rest_api/endpoints/configuration/task_chain_endpoint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
get:
2+
deprecated: true
23
tags:
34
- Configuration
45
summary: Get the current configuration for all tasks in the project's task chain.

docs/rest_api/endpoints/configuration/task_endpoint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
get:
2+
deprecated: true
23
tags:
34
- Configuration
45
summary: Get the current configuration for a specific task
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
get:
2+
tags:
3+
- Configuration
4+
summary: "Retrieve task-specific training configuration"
5+
description: |
6+
Retrieves the training configuration for a specific project and task.
7+
8+
- Task ID is required for task chain projects
9+
- If model_manifest_id is provided, returns configuration for that specific model architecture
10+
- If model_id is provided, returns configuration for a specific trained model
11+
- Without model_manifest_id or model_id, returns only general task-related configuration
12+
operationId: GetTrainingConfiguration
13+
parameters:
14+
- $ref: "../../parameters/path/organization_id.yaml"
15+
- $ref: "../../parameters/path/workspace_id.yaml"
16+
- $ref: "../../parameters/path/project_id.yaml"
17+
- $ref: "../../parameters/query/task_id.yaml"
18+
- $ref: "../../parameters/query/model_manifest_id.yaml"
19+
- $ref: "../../parameters/query/model_id.yaml"
20+
responses:
21+
'200':
22+
description: Training configuration retrieved successfully
23+
content:
24+
application/json:
25+
schema:
26+
$ref: "../../../../interactive_ai/services/api/schemas/configuration/responses/revamp/training_configuration.yaml"
27+
examples:
28+
Training configuration response:
29+
value:
30+
$ref: "../../examples/configuration/responses/revamp/training_configuration.json"
31+
'404':
32+
description: Object not found. See the examples for details.
33+
content:
34+
application/json:
35+
schema:
36+
$ref: "../../../../interactive_ai/services/api/schemas/generic_responses/error_response.yaml"
37+
examples:
38+
Organization not found response:
39+
value:
40+
$ref: "../../examples/organizations/error_responses/organization_not_found.json"
41+
Workspace not found response:
42+
value:
43+
$ref: "../../examples/workspaces/error_responses/workspace_not_found.json"
44+
Project not found response:
45+
value:
46+
$ref: "../../examples/projects/error_responses/project_not_found.json"
47+
Task not found response:
48+
value:
49+
$ref: "../../examples/configuration/error_responses/revamp/task_not_found.json"
50+
'400':
51+
description: Query parameter error. See the examples for details.
52+
content:
53+
application/json:
54+
schema:
55+
$ref: "../../../../interactive_ai/services/api/schemas/generic_responses/error_response.yaml"
56+
examples:
57+
Payload validation error response:
58+
value:
59+
$ref: "../../examples/configuration/error_responses/revamp/missing_task_id.json"
60+
61+
patch:
62+
tags:
63+
- Configuration
64+
summary: "Update training configuration parameters"
65+
description: |
66+
Updates the training configuration parameters for a task or specific model architecture.
67+
68+
- Task ID is required for task chain projects
69+
- If only task_id is provided, updates general task-related configuration
70+
- If model_manifest_id is provided, updates configuration for that specific model architecture
71+
72+
The updated configuration will affect future training sessions but will not modify already trained models.
73+
operationId: UpdateTrainingConfiguration
74+
parameters:
75+
- $ref: "../../parameters/path/organization_id.yaml"
76+
- $ref: "../../parameters/path/workspace_id.yaml"
77+
- $ref: "../../parameters/path/project_id.yaml"
78+
- $ref: "../../parameters/query/task_id.yaml"
79+
- $ref: "../../parameters/query/model_manifest_id.yaml"
80+
requestBody:
81+
content:
82+
application/json:
83+
schema:
84+
$ref: "../../../../interactive_ai/services/api/schemas/configuration/requests/revamp/training_configuration.yaml"
85+
examples:
86+
Training configuration request:
87+
value:
88+
$ref: "../../examples/configuration/requests/revamp/training_configuration.json"
89+
required: true
90+
responses:
91+
'204':
92+
description: Training configuration updated successfully
93+
'404':
94+
description: Object not found. See the examples for details.
95+
content:
96+
application/json:
97+
schema:
98+
$ref: "../../../../interactive_ai/services/api/schemas/generic_responses/error_response.yaml"
99+
examples:
100+
Organization not found response:
101+
value:
102+
$ref: "../../examples/organizations/error_responses/organization_not_found.json"
103+
Workspace not found response:
104+
value:
105+
$ref: "../../examples/workspaces/error_responses/workspace_not_found.json"
106+
Project not found response:
107+
value:
108+
$ref: "../../examples/projects/error_responses/project_not_found.json"
109+
Task not found response:
110+
value:
111+
$ref: "../../examples/configuration/error_responses/revamp/task_not_found.json"
112+
'400':
113+
description: Payload configuration contains validation error. See the examples for details.
114+
content:
115+
application/json:
116+
schema:
117+
$ref: "../../../../interactive_ai/services/api/schemas/generic_responses/error_response.yaml"
118+
examples:
119+
Payload validation error response:
120+
value:
121+
$ref: "../../examples/configuration/error_responses/revamp/pydantic_validation_error.json"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
get:
2+
tags:
3+
- Models
4+
summary: Get supported algorithms
5+
description: List the algorithms (model architectures) supported for the tasks within a project.
6+
operationId: GetSupportedAlgorithms
7+
parameters:
8+
- $ref: "../../parameters/path/organization_id.yaml"
9+
- $ref: "../../parameters/path/workspace_id.yaml"
10+
- $ref: "../../parameters/path/project_id.yaml"
11+
- $ref: "../../parameters/query/include_obsolete.yaml"
12+
responses:
13+
'200':
14+
description: List of supported algorithms
15+
content:
16+
application/json:
17+
schema:
18+
$ref: "../../../../interactive_ai/services/api/schemas/models/responses/revamp/supported_algorithm.yaml"
19+
examples:
20+
Supported algorithms:
21+
value:
22+
$ref: "../../examples/models/responses/revamp/supported_algorithms.json"
23+
'400':
24+
description: Task type is not recognized or supported
25+
content:
26+
application/json:
27+
schema:
28+
$ref: "../../../../interactive_ai/services/api/schemas/generic_responses/error_response.yaml"
29+
examples:
30+
Invalid task type:
31+
value:
32+
$ref: "../../examples/error_responses/bad_request_task_type.yaml"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"http_status": 400,
3+
"message": "The required task ID was not provided in the request.",
4+
"error_code": "missing_task_id"
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"http_status": 404,
3+
"message": "The requested project configuration could not be found. Project ID: `60ec6bbfb98caeb87e34306e`, task ID: `60ec6bbfb98caeb87e34309f`",
4+
"error_code": "project_configuration_not_found"
5+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"http_status": 400,
3+
"error_code": "invalid_payload",
4+
"errors": [
5+
{
6+
"message": "Input should be greater than 0",
7+
"type": "greater_than",
8+
"location": "hyperparameters.training.learning_rate"
9+
}
10+
]
11+
}

0 commit comments

Comments
 (0)