Warning |
---|
THIS ENDPOINT IS STILL UNDER DEVELOPMENT. |
Import functionality for stages, pipelines, endpoints and configuration files.
You can set the overwriting capabilities from the config file inside the "IMPORT/EXPORT" section. If enabled, then the all the files coming from the .gea file will overwrite the old ones inside the API instance.
Code Block | ||||
---|---|---|---|---|
| ||||
'import_export': { 'enable': True, 'export_folder_path': join(SERVER_PATH, 'exports'), 'import_overwrite': False } |
Table of Contents | ||
---|---|---|
|
This endpoint allows you to import files exported from another GAIA API instance.
Parameter | Type | Description |
---|---|---|
file | file | The .gea file to import, can be a stage, pipeline, endpoint or all files. |
overwrite | string | If you want to overwrite files at the time of importing. (OPTIONAL) |
Info |
---|
The Parameters above needs to be part of a form (form-data), otherwise, the operation will fail. |
Note | ||
---|---|---|
| ||
If you use this endpoint, after importing the .gea file, you need to the API will RESTART in order to load the new files that were imported, so, if you have requests pending or it is being used at the moment, it will fail wait for those processes to end and restart the server from zerousing the Shutdown Endpoint. |
Code Block | ||
---|---|---|
| ||
POST /es/api/v1/importer |
Code Block |
---|
Import successful |
Code Block |
---|
{ "detail": [ { "loc": ["body", "file"], "msg": "Field required", "type": "value_error.missing" } ] } |
Export functionality for stages, pipelines, endpoints and configuration files.
We create .gea files inside the "exports" folder inside the root of the GAIA API instance.
These .gea files may or may not have nested .gea files representing nested stages or pipelines related between each other.
You can set the export folder path to a custom folder in case you want the exports in another folder instead of the default "exports" folder.
Code Block | ||||
---|---|---|---|---|
| ||||
'import_export': { 'enable': True, 'export_folder_path': join(SERVER_PATH, 'exports'), 'import_overwrite': False } |
This endpoint allows you to export all stages, pipelines, endpoints enabled and configuration files into a .gea file that can be imported into another instance of GAIA API.
Info |
---|
This endpoint does not require parameters. |
Code Block | ||
---|---|---|
| ||
GET /es/api/v1/export/all |
Code Block |
---|
Export successful |
This endpoint allows you to export all the stages into a .gea file.
Info |
---|
This endpoint does not require parameters. |
Code Block | ||
---|---|---|
| ||
GET /es/api/v1/export/stage/all |
Code Block |
---|
Export successful |
This endpoint allows you to export a specific stage into a .gea file by its name.
Parameter | Type | Description |
---|---|---|
stage_name | string | The name of the stage to export. |
Code Block | ||
---|---|---|
| ||
GET /es/api/v1/export/stage/{stage_name} |
Code Block |
---|
Export successful |
This endpoint allows you to export all the pipelines into a .gea file with its own stages (if the pipeline has stages configured).
Info |
---|
This endpoint does not require parameters. |
Code Block | ||
---|---|---|
| ||
GET /es/api/v1/export/pipeline/all |
Code Block |
---|
Export successful |
This endpoint allows you to export a specific pipeline into a .gea file by its name alongside its stages configured (if it has stages).
Parameter | Type | Description |
---|---|---|
pipeline_name | string | The name of the pipeline to export. |
Code Block | ||
---|---|---|
| ||
GET /es/api/v1/export/pipeline/{pipeline_name} |
Code Block |
---|
Export successful |
This endpoint allows you to export all the endpoints into a .gea file with its own pipelines and stages (if the endpoint has a pipeline wrapper configured).
Info |
---|
This endpoint does not require parameters. |
Code Block | ||
---|---|---|
| ||
GET /es/api/v1/export/endpoint/all |
Code Block |
---|
Export successful |
This endpoint allows you to export a specific endpoint into a .gea file by its name alongside its pipeline/stages configured (if it has a pipeline wrapper).
Parameter | Type | Description |
---|---|---|
endpoint_name | string | The name of the endpoint to export. |
Code Block | ||
---|---|---|
| ||
GET /es/api/v1/export/endpoint/{endpoint_name} |
Code Block |
---|
Export successful |