文章目录
- 一、序
- 二, Docker部署准备
- 1. 编辑docker-compose.yml
- 2. 新增启动、停止脚本
- 3. 样例 swagger.yaml
- 三, 启动swagger-editor
- 1. 使用说明
- 2. 完整代码备份
一、序
因工作需要,需要搭建python运行环境,项目中python基于flask实现了swagger在线文档以及接口测试,前后端对接开发时需要使用。项目比较庞大,完全部署的话,只使用swagger在线文档功能的话,太浪费资源了。
Swagger Editor是一个开源的编辑器,并且它也是一个基于Angular的成功案例。在Swagger Editor中,我们可以基于YAML等语法定义我们的RESTful API,然后它会自动生成一篇排版优美的API文档,并且提供实时预览。简单说就是可以边编写API 边预览边测试。
这么看来swagger-editor可以基于swagger yaml文件实现在线接口文档生成,完全符合我们的需求。
二, Docker部署准备
docker、docker-compose环境安装就不介绍了。
1. 编辑docker-compose.yml
docker-compose实现了如下功能:
- 指定镜像、文件映射、端口映射、日志配置、重启策略
- 指定资源占有限制
- 通过环境变量指定默认加载的swagger配置文件
docker-compose.yml
version: '3'
services:swagger-editor:image: swaggerapi/swagger-editorcontainer_name: swagger-editordeploy:resources:limits:cpus: '1.0'memory: 20Mreservations:memory: 10Mvolumes:- ./swagger.yaml:/swagger.yamlports:- 80:8080environment:SWAGGER_FILE: /swagger.yamlrestart: on-failurelogging:driver: 'json-file'options:max-size: '30m'max-file: '1'
2. 新增启动、停止脚本
start.sh
#!/bin/bash
docker-compose up -d
stop.sh
#!/bin/bash
docker-compose down
3. 样例 swagger.yaml
https://gitee.com/WeBankOS/FATE-Flow/blob/feature-1.10.0-update-doc/doc/swagger/swagger.yaml
三, 启动swagger-editor
将上一步准备的4个文件,放在同一目录,执行 sh start.sh
启动成功后输入http://127.0.0.1:80,出现如下界面:
1. 使用说明
界面左边是api 文件的 yaml 描述文件, 左边部分可以直接编辑API文档,编辑会立即更新到右边视图。右边是swagger-UI,可以查看文档,并直接进行API的测试。
上面有一排辅助菜单,包括yaml导入,文件格式转换,生成服务端/客户端代码
等。
大家可以自行探索!
2. 完整代码备份
如何使用下面的备份文件恢复成原始的项目代码,请移步查阅:神奇代码恢复工具
//goto docker-compose.yml
version: '3'
services:swagger-editor:image: swaggerapi/swagger-editorcontainer_name: swagger-editordeploy:resources:limits:cpus: '1.0'memory: 20Mreservations:cpus: '0.05'memory: 10Mvolumes:- ./swagger.yaml:/swagger.yamlports:- 80:8080environment:SWAGGER_FILE: /swagger.yamlrestart: on-failurelogging:driver: 'json-file'options:max-size: '30m'max-file: '1'
//goto restart.sh
#!/bin/bash
docker-compose down && docker-compose --compatibility up -d
//goto stop.sh
#!/bin/bash
docker-compose down
//goto swagger.yaml
openapi: 3.0.3
info:version: '1.10.0'title: Fate Flow 接口文档paths:'/data/upload':post:summary: uploadtags:- data-accessparameters:- in: queryname: id_delimiterdescription: data delimiterrequired: falseschema:type: stringexample: ","- in: queryname: headdescription: data headrequired: trueschema:type: integerexample: 0, 1- in: queryname: partitiondescription: compoting table partitionsrequired: trueschema:type: integerexample: 16, ...- in: queryname: table_namedescription: fate table namerequired: trueschema:type: stringexample: breast_hetero_guest- in: queryname: namespacedescription: fate table namespacerequired: trueschema:type: stringexample: experiment- in: queryname: storage_enginedescription: data storage enginrequired: falseschema:type: stringexample: eggroll, localfs, hdfs, ...- in: queryname: destorydescription: destory old table and upload new tablerequired: falseschema:type: integerexample: 0, 1- in: queryname: extend_siddescription: extend sid to first columnrequired: falseschema:type: integerexample: 0, 1requestBody:required: truecontent:application/octet-stream:schema:type: stringresponses:'200':description: upload successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectexample:{"board_url": "http://xxx:8080/index.html#/dashboard?job_id=xxx&role=local&party_id=0","code": 0,"dsl_path": "/data/projects/fate/fateflow/jobs/xxx/job_dsl.json","job_id": xxx,"logs_directory": "/data/projects/fate/fateflow/logs/xxx","message": "success","model_info": {"model_id": "local-0#model","model_version": xxx},"namespace": "experiment","pipeline_dsl_path": "/data/projects/fate/fateflow/jobs/xxx/pipeline_dsl.json","runtime_conf_on_party_path": "/data/projects/fate/fateflow/jobs/xxx/local/0/job_runtime_on_party_conf.json","runtime_conf_path": "/data/projects/fate/fateflow/jobs/xxx/job_runtime_conf.json","table_name": "breast_hetero_guest","train_runtime_conf_path": "/data/projects/fate/fateflow/jobs/xxx/train_runtime_conf.json"}'404':description: upload failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: required parameters are missing'/data/download':post:summary: download datatags:- data-accessrequestBody:required: truecontent:application/json:schema:type: objectrequired:- table_name- namespace- output_pathproperties:table_name:type: stringexample: breast_hetero_guestnamespace:type: stringexample: experimentoutput_path:type: stringexample: /data/projects/fate/fateflow/experiment_download_breast_guest.csvdelimiter:type: stringexample: ","responses:'200':description: download successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectexample:{"board_url": "http://xxx:8080/index.html#/dashboard?job_id=xxx&role=local&party_id=0","code": 0,"dsl_path": "/data/projects/fate/fateflow/jobs/xxx/job_dsl.json","job_id": xxx,"logs_directory": "/data/projects/fate/fateflow/logs/xxx","message": "success","model_info": {"model_id": "local-0#model","model_version": xxx},"namespace": "experiment","pipeline_dsl_path": "/data/projects/fate/fateflow/jobs/xxx/pipeline_dsl.json","runtime_conf_on_party_path": "/data/projects/fate/fateflow/jobs/xxx/local/0/job_runtime_on_party_conf.json","runtime_conf_path": "/data/projects/fate/fateflow/jobs/xxx/job_runtime_conf.json","table_name": "breast_hetero_guest","train_runtime_conf_path": "/data/projects/fate/fateflow/jobs/xxx/train_runtime_conf.json"}'404':description: download failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: required parameters are missing'/data/upload/history':post:summary: history of upload job infotags:- data-accessrequestBody:required: truecontent:application/json:schema:type: objectproperties:job_id:type: stringexample: 202103241706521313480limit:type: integerdescription: limit outputexample: 1responses:'200':description: get successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: arrayitems:type: objectexample:{"202103241706521313480": {"notes": "","schema": {"header": "y,x0,x1,x2,x3,x4,x5,x6,x7,x8,x9","sid": "id"},"upload_info": {"namespace": "experiment","partition": 4,"table_name": "breast_hetero_guest","upload_count": 569}}}'404':description: get failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 100retmsg:type: stringexample: server error'/table/bind':post:summary: bind a storage address to fate tabletags:- tablerequestBody:required: truecontent:application/json:schema:type: objectrequired:- engine- address- namespace- name- head- id_delimiter- partitionsproperties:engine:type: stringexample: mysqlname:type: stringexample: breast_hetero_guestnamespace:type: stringexample: experimentaddress:type: objectdescription: storage addressexample:user: fatepasswd: fatehost: 127.0.0.1port: 3306db: xxxname: xxxpartitions:type: integerdescription: fate computing table partitionsexample: 16head:type: integerdescription: 1 means data have headexample: 0,1id_delimiter:type: stringdescription: data table or intermediate storage table delimiterexample: ","in_serialized:type: integerdescription: data serialized, standlone/eggroll/mysql/path storage default 1, others default 0example: 0, 1drop:type: integerdescription: if table is exist, will delete itexample: 0,1id_column:type: stringexample: "id"feature_column:type: stringdescription: delimited by ","example: x1,x2,x3responses:'200':description: bind table successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectproperties:table_name:type: stringexample: breast_hetero_guestnamespace:type: stringexample: experiment'404':description: bind table failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 100retmsg:type: stringexample: engine xxx address xxx check failed'/table/delete':post:summary: delete fate tabletags:- tablerequestBody:required: truecontent:application/json:schema:type: objectrequired:- table_name- namespaceproperties:table_name:type: stringexample: breast_hetero_guestnamespace:type: stringexample: experimentresponses:'200':description: delete table successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectproperties:table_name:type: stringexample: breast_hetero_guestnamespace:type: stringexample: experiment'404':description: delete table failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: no find table'/table/list':post:summary: get job all tablestags:- tablerequestBody:required: truecontent:application/json:schema:type: objectrequired:- job_id- role- party_idproperties:job_id:type: stringexample: 202101251515021092240role:type: stringexample: guestparty_id:type: stringexample: 10000responses:'200':description: get tables successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectexample:{"DataIO_0":{"input":{"Reader_0.data_0":{"name": xxx,"namespace": xxx}},"output":{"data_0":{"name": xxx,"namespace": xxx}}},"Intersection_0":{"input":{"DataIO_0.data_0":{"name": xxx,"namespace": xxx}},"output":{"data_0":{"name": xxx,"namespace": xxx}}},"Reader_0":{"input":{"table":{"name": xxx,"namespace": "xxxx"}},"output":{"data_0":{"name": xxx,"namespace": xxx}}}}'404':description: delete table failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: no find table'/table/table_info':post:summary: query table infotags:- tablerequestBody:required: truecontent:application/json:schema:type: objectrequired:- table_name- namespaceproperties:table_name:type: stringexample: breast_hetero_guestnamespace:type: stringexample: experimentresponses:'200':description: get tables successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectexample:{"address":{},"count": 569,"exist": 1,"namespace": "experiment","partition": 16,"schema":{"header": "id,y,x0,x1,x2,x3,x4,x5,x6,x7,x8,x9","sid": "id"},"table_name": "breast_hetero_guest"}'404':description: query table failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: no find table'/table/tracking/source':post:summary: tracking table sourcetags:- tablerequestBody:required: truecontent:application/json:schema:type: objectrequired:- table_name- namespaceproperties:table_name:type: stringexample: breast_hetero_guestnamespace:type: stringexample: experimentresponses:'200':description: tracking successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: arrayitems:type: objectexample:{"parent_table_name": xxx,"parent_table_namespace": xxx,"source_table_name": xxx,"source_table_namespace": xxx}'404':description: tracking failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: no find table'/table/tracking/job':post:summary: tracking using table jobtags:- tablerequestBody:required: truecontent:application/json:schema:type: objectrequired:- table_name- namespaceproperties:table_name:type: stringexample: breast_hetero_guestnamespace:type: stringexample: experimentresponses:'200':description: tracking successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: arrayitems:type: objectexample:{"count": 5,"job":["202104212104472450460","202104212127150470680","202104220937051579910","202104212038599210200","202104212131462630720"]}'404':description: tracking failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: no find table'/job/submit':post:summary: submit jobtags:- jobrequestBody:required: truecontent:application/json:schema:type: objectrequired:- dsl- runtime_confproperties:dsl:type: objectexample:{"components":{"dataio_0":{"input":{"data":{"data":["reader_0.table"]}},"module": "DataIO","need_deploy": true,"output":{"data":["train"],"model":["dataio"]}},"evaluation_0":{"input":{"data":{"data":["hetero_lr_0.train"]}},"module": "Evaluation","output":{"data":["evaluate"]}},"hetero_feature_binning_0":{"input":{"data":{"data":["intersection_0.train"]}},"module": "HeteroFeatureBinning","output":{"data":["train"],"model":["hetero_feature_binning"]}},"hetero_feature_selection_0":{"input":{"data":{"data":["hetero_feature_binning_0.train"]},"isometric_model":["hetero_feature_binning_0.hetero_feature_binning"]},"module": "HeteroFeatureSelection","output":{"data":["train"],"model":["selected"]}},"hetero_lr_0":{"input":{"data":{"train_data":["hetero_feature_selection_0.train"]}},"module": "HeteroLR","output":{"data":["train"],"model":["hetero_lr"]}},"intersection_0":{"input":{"data":{"data":["dataio_0.train"]}},"module": "Intersection","output":{"data":["train"]}},"reader_0":{"module": "Reader","output":{"data":["table"]}}}}runtime_conf:type: objectexample:{"component_parameters":{"common":{"hetero_lr_0":{"alpha": 0.01,"batch_size": 320,"init_param":{"init_method": "random_uniform"},"learning_rate": 0.15,"max_iter": 3,"optimizer": "rmsprop","penalty": "L2"},"intersection_0":{"intersect_method": "raw","only_output_key": false,"sync_intersect_ids": true}},"role":{"guest":{"0":{"dataio_0":{"label_name": "y","label_type": "int","output_format": "dense","with_label": true},"reader_0":{"table":{"name": "breast_hetero_guest","namespace": "experiment"}}}},"host":{"0":{"dataio_0":{"output_format": "dense","with_label": false},"evaluation_0":{"need_run": false},"reader_0":{"table":{"name": "breast_hetero_host","namespace": "experiment"}}}}}},"dsl_version": "2","initiator":{"party_id": 9999,"role": "guest"},"job_parameters":{"common":{"auto_retries": 1,"computing_partitions": 8,"task_cores": 4,"task_parallelism": 2}},"role":{"arbiter":[10000],"guest":[9999],"host":[10000]}}responses:'200':description: submit job successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectexample:{"board_url": xxx,"code": 0,"dsl_path": xxx,"job_id": xxx,"logs_directory": xxx,"message": "success","model_info":{"model_id": xxx,"model_version": xxx},"pipeline_dsl_path": xxx,"runtime_conf_on_party_path": xxx,"runtime_conf_path": xxx,"train_runtime_conf_path": xxx}'404':description: submit job failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: "config error"'/job/stop':post:summary: stop jobtags:- jobrequestBody:required: truecontent:application/json:schema:type: objectrequired:- job_idproperties:job_id:type: stringexample: 202103231958539401540stop_status:type: stringdefault: cancelexample: "failed"description: "failed or cancel"responses:'200':description: stop job successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: success'404':description: stop job failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: no find job'/job/rerun':post:summary: rerun jobtags:- jobrequestBody:required: truecontent:application/json:schema:type: objectrequired:- job_idproperties:job_id:type: stringexample: 202103231958539401540responses:'200':description: rerun job successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: success'404':description: rerun job failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: no find job'/job/query':post:summary: query jobtags:- jobrequestBody:required: truecontent:application/json:schema:type: objectrequired:- job_idproperties:job_id:type: stringresponses:'200':description: query job successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: arrayitems:type: objectexample:{"f_apply_resource_time": xxx,"f_cancel_signal": false,"f_cancel_time": xxx,"f_cores": 8,"f_create_date": xxx,"f_create_time": xxx,"f_description": "","f_dsl": {},"f_elapsed": 14380,"f_end_date": xxx,"f_end_scheduling_updates": 1,"f_end_time": xxx,"f_engine_name": "EGGROLL","f_engine_type": "computing","f_initiator_party_id": "20001","f_initiator_role": "guest","f_is_initiator": true,"f_job_id": xxx,"f_memory": 0,"f_name": "","f_party_id": "20001","f_progress": 14,"f_ready_signal": false,"f_ready_time": null,"f_remaining_cores": 8,"f_remaining_memory": 0,"f_rerun_signal": false,"f_resource_in_use": false,"f_return_resource_time": xxx,"f_role": "guest","f_roles": {},"f_runtime_conf": {},"f_runtime_conf_on_party": {},"f_start_date": xxx,"f_start_time": xxx,"f_status": "failed","f_status_code": null,"f_tag": "job_end","f_train_runtime_conf": {},"f_update_date": xxx,"f_update_time": xxx,"f_user": {},"f_user_id": ""}'404':description: query job failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: no find job'/job/list/job':post:summary: list jobstags:- jobrequestBody:required: truecontent:application/json:schema:type: objectproperties:limit:type: integerdescription: '`0` means no limit'example: 20page:type: integerexample: 1job_id:type: stringexample: '202112020129140220090'party_id:type: integerexample: 9999role:type: arrayitems:type: stringenum:- guest- host- arbiter- localstatus:type: arrayitems:type: stringenum:- success- running- waiting- failed- canceleddescription:type: stringdescription: '`notes` on front-end'order_by:type: stringdescription: 'defaults `create_time`'enum:- create_time- start_time- end_time- elapsedorder:type: stringdescription: 'defaults `desc`'enum:- asc- descresponses:'200':description: jobs listcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectproperties:count:type: integerexample: 1jobs:type: arrayitems:type: objectexample:apply_resource_time: 1638379762883cancel_signal: falsecancel_time:cores: 4create_date: '2021-12-02 01:29:18'create_time: 1638379758581description: ''dsl:components:dataio_0:input:data:data:- reader_0.datamodule: DataIOoutput:data:- datamodel:- modelhetero_feature_binning_0:input:data:data:- intersection_0.datamodule: HeteroFeatureBinningoutput:data:- datamodel:- modelintersection_0:input:data:data:- dataio_0.datamodule: Intersectionoutput:cache:- cachedata:- datareader_0:module: Readeroutput:data:- dataprovider: fate_flow@1.7.0elapsed: 116548end_date: '2021-12-02 01:31:19'end_scheduling_updates: 1end_time: 1638379879547engine_name: STANDALONEengine_type: computinginitiator_party_id: '10000'initiator_role: guestis_initiator: truejob_id: '202112020129140220090'memory: 0name: ''partners:- 9999party_id: 10000progress: 100ready_signal: falseready_time:remaining_cores: 4remaining_memory: 0rerun_signal: falseresource_in_use: falsereturn_resource_time: 1638379879568role: guestroles:guest:- 10000host:- 9999runtime_conf:component_parameters:common:hetero_feature_binning_0:adjustment_factor: 0.5bin_indexes: -1bin_names:bin_num: 10category_indexes:category_names:compress_thres: 10000error: 0.001head_size: 10000local_only: falsemethod: quantiletransform_param:transform_cols:- 0- 1- 2transform_names:transform_type: woerole:guest:'0':dataio_0:with_label: truereader_0:table:name: breast_hetero_guestnamespace: experimenthost:'0':dataio_0:with_label: falsehetero_feature_binning_0:transform_param:transform_type:reader_0:table:name: breast_hetero_hostnamespace: experimentconf_path: "/tmp/tmp2zc5tf8b/job_runtime_conf.json"dsl_path: "/tmp/tmp2zc5tf8b/job_dsl.json"dsl_version: 2initiator:party_id: 10000role: guestjob_parameters:common:adaptation_parameters:if_initiator_baseline: truerequest_task_cores: 4task_cores_per_node: 4task_memory_per_node: 0task_nodes: 1auto_retries: 0auto_retry_delay: 1computing_engine: STANDALONEcomputing_partitions: 4eggroll_run: { }engines_address: { }federated_mode: SINGLEfederated_status_collect_type: PUSHfederation_engine: STANDALONEjob_type: trainmodel_id: guest-10000#host-9999#modelmodel_version: '202112020129140220090'pulsar_run: { }rabbitmq_run: { }spark_run: { }storage_engine: STANDALONEtask_parallelism: 1role:guest:- 10000host:- 9999runtime_conf_on_party:component_parameters:common:hetero_feature_binning_0:adjustment_factor: 0.5bin_indexes: -1bin_names:bin_num: 10category_indexes:category_names:compress_thres: 10000error: 0.001head_size: 10000local_only: falsemethod: quantiletransform_param:transform_cols:- 0- 1- 2transform_names:transform_type: woerole:guest:'0':dataio_0:with_label: truereader_0:table:name: breast_hetero_guestnamespace: experimenthost:'0':dataio_0:with_label: falsehetero_feature_binning_0:transform_param:transform_type:reader_0:table:name: breast_hetero_hostnamespace: experimentconf_path: "/tmp/tmp2zc5tf8b/job_runtime_conf.json"dsl_path: "/tmp/tmp2zc5tf8b/job_dsl.json"dsl_version: 2initiator:party_id: 10000role: guestjob_parameters:adaptation_parameters:if_initiator_baseline: falserequest_task_cores: 4task_cores_per_node: 4task_memory_per_node: 0task_nodes: 1auto_retries: 0auto_retry_delay: 1computing_engine: STANDALONEcomputing_partitions: 4eggroll_run:eggroll.session.processors.per.node: 4engines_address:computing:cores_per_node: 20nodes: 1federation:cores_per_node: 20nodes: 1storage:cores_per_node: 20nodes: 1federated_mode: SINGLEfederated_status_collect_type: PUSHfederation_engine: STANDALONEjob_type: trainmodel_id: guest-10000#host-9999#modelmodel_version: '202112020129140220090'pulsar_run: { }rabbitmq_run: { }spark_run: { }storage_engine: STANDALONEtask_parallelism: 1role:guest:- 10000host:- 9999start_date: '2021-12-02 01:29:22'start_time: 1638379762999status: successstatus_code:tag: job_endtrain_runtime_conf: { }update_date: '2021-12-02 01:32:04'update_time: 1638379924749user:guest:'10000': ''host:'9999': ''user_id: '''/job/list/task':post:summary: list taskstags:- jobrequestBody:required: truecontent:application/json:schema:type: objectproperties:limit:type: integerdescription: '`0` means no limit'example: 20page:type: integerexample: 1job_id:type: stringexample: '202112020129140220090'party_id:type: integerexample: 9999role:type: stringenum:- guest- host- arbiter- localcomponent_name:type: stringexample: upload_0order_by:type: stringdescription: 'defaults `create_time`'enum:- create_time- start_time- end_time- elapsedorder:type: stringdescription: 'defaults `asc`'enum:- asc- descresponses:'200':description: jobs listcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectproperties:count:type: integerexample: 1tasks:type: arrayitems:type: objectexample:auto_retries: 0auto_retry_delay: 1cmd:- "/root/Codes/FATE/venv/bin/python3.6"- "/root/Codes/FATE/fateflow/python/fate_flow/worker/task_executor.py"- "--job_id"- '202112020129140220090'- "--component_name"- hetero_feature_binning_0- "--task_id"- 202112020129140220090_hetero_feature_binning_0- "--task_version"- 0- "--role"- guest- "--party_id"- '10000'- "--config"- "/root/Codes/FATE/fateflow/jobs/202112020129140220090/guest/10000/hetero_feature_binning_0/202112020129140220090_hetero_feature_binning_0/0/task_executor/6b6f4b1852cc11ec8a8700155d13c16c/config.json"- "--result"- "/root/Codes/FATE/fateflow/jobs/202112020129140220090/guest/10000/hetero_feature_binning_0/202112020129140220090_hetero_feature_binning_0/0/task_executor/6b6f4b1852cc11ec8a8700155d13c16c/result.json"- "--log_dir"- "/root/Codes/FATE/fateflow/logs/202112020129140220090/guest/10000/hetero_feature_binning_0"- "--parent_log_dir"- "/root/Codes/FATE/fateflow/logs/202112020129140220090/guest/10000"- "--worker_id"- 6b6f4b1852cc11ec8a8700155d13c16c- "--run_ip"- 127.0.0.1- "--job_server"- 127.0.0.1:9380- "--session_id"- 202112020129140220090_hetero_feature_binning_0_0_guest_10000- "--federation_session_id"- 202112020129140220090_hetero_feature_binning_0_0component_module: HeteroFeatureBinningcomponent_name: hetero_feature_binning_0component_parameters:CodePath: HeteroFeatureBinningGuestComponentParam:_feeded_deprecated_params: [ ]_is_raw_conf: false_name: HeteroFeatureBinning#hetero_feature_binning_0_user_feeded_params:- head_size- category_names- bin_num- transform_param.transform_names- transform_param- compress_thres- error- method- bin_indexes- transform_param.transform_type- bin_names- category_indexes- local_only- transform_param.transform_cols- adjustment_factoradjustment_factor: 0.5bin_indexes: -1bin_names:bin_num: 10category_indexes:category_names:compress_thres: 10000encrypt_param:key_length: 1024method: Pailliererror: 0.001head_size: 10000local_only: falsemethod: quantileneed_run: trueoptimal_binning_param:adjustment_factor:init_bin_nums: 1000init_bucket_method: quantilemax_bin:max_bin_pct: 1metric_method: ivmin_bin_pct: 0.05mixture: trueskip_static: falsetransform_param:transform_cols:- 0- 1- 2transform_names:transform_type: woeconf_path: "/tmp/tmp2zc5tf8b/job_runtime_conf.json"dsl_path: "/tmp/tmp2zc5tf8b/job_dsl.json"dsl_version: 2initiator:party_id: 10000role: guestjob_parameters:common:adaptation_parameters:if_initiator_baseline: truerequest_task_cores: 4task_cores_per_node: 4task_memory_per_node: 0task_nodes: 1auto_retries: 0auto_retry_delay: 1computing_engine: STANDALONEcomputing_partitions: 4eggroll_run: { }engines_address: { }federated_mode: SINGLEfederated_status_collect_type: PUSHfederation_engine: STANDALONEjob_type: trainmodel_id: guest-10000#host-9999#modelmodel_version: '202112020129140220090'pulsar_run: { }rabbitmq_run: { }spark_run: { }storage_engine: STANDALONEtask_parallelism: 1local:party_id: 10000role: guestmodule: HeteroFeatureBinningrole:guest:- 10000host:- 9999create_date: '2021-12-02 01:29:21'create_time: 1638379761918elapsed: 9095end_date: '2021-12-02 01:31:04'end_time: 1638379864051engine_conf:computing_engine: STANDALONEfederated_mode: SINGLEfederated_status_collect_type: PUSHinitiator_party_id: '10000'initiator_role: guestjob_id: '202112020129140220090'party_id: '10000'party_status: successprovider_info:class_path:feature_instance: feature.instance.Instancefeature_vector: feature.sparse_vector.SparseVectorhomo_model_convert: protobuf.homo_model_convert.homo_model_convertinterface: components.components.Componentsmodel: protobuf.generatedmodel_migrate: protobuf.model_migrate.model_migrateenv:PYTHONPATH: "/root/Codes/FATE/python"name: fatepath: "/root/Codes/FATE/python/federatedml"version: 1.7.0role: guestrun_ip: 127.0.0.1run_on_this_party: truerun_pid: 29934start_date: '2021-12-02 01:30:47'start_time: 1638379847118status: successstatus_code:task_id: 202112020129140220090_hetero_feature_binning_0task_version: 0update_date: '2021-12-02 01:31:06'update_time: 1638379866439worker_id: 6b6f4b1852cc11ec8a8700155d13c16c'/job/update':post:summary: job notestags:- jobrequestBody:required: truecontent:application/json:schema:type: objectrequired:- job_id- role- party_id- notesproperties:job_id:type: stringexample: "2022xxx"role:type: stringexample: guestparty_id:type: integerexample: 10000notes:type: stringexample: this is a testresponses:'200':description: successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: success'404':description: failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: no find job'/job/parameter/update':post:summary: update job parametertags:- jobrequestBody:required: truecontent:application/json:schema:type: objectrequired:- job_idproperties:job_id:type: stringexample: "2022xxx"component_parameters:type: objectexample:{"common":{"hetero_lr_0":{"max_iter": 10}}}job_parameters:type: objectexample:{"common":{"auto_retries": 2}}responses:'200':description: successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectexample:{"component_parameters":{"common":{"hetero_lr_0":{"alpha": 0.01,"batch_size": 320,"init_param":{"init_method": "random_uniform"},"learning_rate": 0.15,"max_iter": 10,"optimizer": "rmsprop","penalty": "L2"},"intersection_0":{"intersect_method": "raw","only_output_key": false,"sync_intersect_ids": true}},"role":{"guest":{"0":{"dataio_0":{"label_name": "y","label_type": "int","output_format": "dense","with_label": true},"reader_0":{"table":{"name": "breast_hetero_guest","namespace": "experiment"}}}},"host":{"0":{"dataio_0":{"output_format": "dense","with_label": false},"evaluation_0":{"need_run": false},"reader_0":{"table":{"name": "breast_hetero_host","namespace": "experiment"}}}}}},"components":[],"job_parameters":{"common":{"adaptation_parameters":{"if_initiator_baseline": true,"request_task_cores": 4,"task_cores_per_node": 4,"task_memory_per_node": 0,"task_nodes": 1},"auto_retries": 2,"auto_retry_delay": 1,"computing_engine": "EGGROLL","computing_partitions": 4,"eggroll_run":{},"engines_address":{},"federated_mode": "MULTIPLE","federated_status_collect_type": "PUSH","inheritance_info":{},"job_type": "train","model_id": "arbiter-10001#guest-20001#host-10001#model","model_version": "202204251958539401540","pulsar_run":{},"rabbitmq_run":{},"spark_run":{},"task_parallelism": 1}},"src_party_id": "20001","src_role": "guest"}'404':description: failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: no find job'/job/config':post:summary: job configtags:- jobrequestBody:required: truecontent:application/json:schema:type: objectrequired:- job_idproperties:job_id:type: stringexample: "2022xxx"role:type: stringexample: guestparty_id:type: integerexample: 10000responses:'200':description: successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectexample:{"dsl":{},"job_id": "2022xxx","model_info":{},"runtime_conf":{},"train_runtime_conf":{}}'404':description: failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: no find job'/job/log/download':post:summary: download job log (tar.gz)tags:- jobrequestBody:required: truecontent:application/json:schema:type: objectrequired:- job_idproperties:job_id:type: stringresponses:'200':description: get job log successcontent:application/octet-stream:schema:type: stringdescription: file xxx_log.tar.gz'404':description: get job list failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 404retmsg:type: stringexample: Log file path xxx not found. Please check if the job id is valid.'/job/log/path':post:summary: job log pathtags:- jobrequestBody:required: truecontent:application/json:schema:type: objectrequired:- job_idproperties:job_id:type: stringresponses:'200':description: successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectexample:{"logs_directory": "/data/projects/fate/fateflow/logs/xxx"}'404':description: failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: no find job'/job/task/query':post:summary: query tasktags:- jobrequestBody:required: truecontent:application/json:schema:type: objectrequired:- job_idproperties:job_id:type: stringrole:type: stringexample: guestparty_id:type: integerexample: 10000component_name:type: stringexample: reader_0responses:'200':description: successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: arraydescription: tasks listitems:type: object'404':description: failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: no find task'/job/clean':post:summary: clean jobtags:- jobrequestBody:required: truecontent:application/json:schema:required:- job_idtype: objectproperties:job_id:type: stringrole:type: stringexample: guestparty_id:type: integerexample: 10000component_name:type: stringexample: reader_0responses:'200':description: successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: success'404':description: failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: no find task'/job/clean/queue':post:summary: cancel waiting jobtags:- jobresponses:'200':description: successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectexample:{"202204261616186991350": 0,"202204261616198643190": 0,"202204261616210073410": 0}'404':description: failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: server error'/tracking/job/data_view':post:summary: data viewtags:- trackingrequestBody:required: truecontent:application/json:schema:required:- job_id- role- party_idtype: objectproperties:job_id:type: stringrole:type: stringexample: guestparty_id:type: integerexample: 10000responses:'200':description: successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectexample:{"dataset":{"guest":{"9999":{"Reader_0": "xxx.xxx"}},"host":{"10000":{"Reader_0": "xxx.xxx"}}},"model_summary":{},"partner":{"host":[10000]},"roles":{"guest":[9999],"host":[10000]}}'404':description: failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: error'/tracking/component/metric/all':post:summary: get component all metrictags:- trackingrequestBody:required: truecontent:application/json:schema:required:- job_id- role- party_id- component_nametype: objectproperties:job_id:type: stringrole:type: stringexample: guestparty_id:type: integerexample: 10000component_name:type: stringexample: HeteroSecureBoost_0responses:'200':description: successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectexample:{"train":{"loss":{"data":[[0,0.6076415445876732],[1,0.5374539452565573],[2,0.4778598986135903],[3,0.42733599866560723],[4,0.38433409799127843]],"meta":{"Best": 0.38433409799127843,"curve_name": "loss","metric_type": "LOSS","name": "train","unit_name": "iters"}}}}'404':description: failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: error'/tracking/component/metrics':post:summary: get component metric name and namespacetags:- trackingrequestBody:required: truecontent:application/json:schema:required:- job_id- role- party_id- component_nametype: objectproperties:job_id:type: stringrole:type: stringexample: guestparty_id:type: integerexample: 10000component_name:type: stringexample: Intersection_0responses:'200':description: successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectexample:{"train":["intersection"]}'404':description: failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: error'/tracking/component/metric_data':post:summary: get component metric datatags:- trackingrequestBody:required: truecontent:application/json:schema:required:- job_id- role- party_id- component_name- metric_name- metric_namespacetype: objectproperties:job_id:type: stringrole:type: stringexample: guestparty_id:type: integerexample: 10000component_name:type: stringexample: Intersection_0metric_name:type: stringexample: intersectionmetric_namespace:type: stringexample: trainresponses:'200':description: successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectexample:{"data":[["intersect_count",569],["intersect_rate",1.0],["unmatched_count",0],["unmatched_rate",0.0]],"meta":{"intersect_method": "raw","join_method": "inner_join","metric_type": "INTERSECTION","name": "intersection"}}'404':description: failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: error'/tracking/component/parameters':post:summary: get component parameterstags:- trackingrequestBody:required: truecontent:application/json:schema:required:- job_id- role- party_id- component_nametype: objectproperties:job_id:type: stringrole:type: stringexample: guestparty_id:type: integerexample: 10000component_name:type: stringexample: Intersection_0responses:'200':description: successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectexample:{"ComponentParam":{"_feeded_deprecated_params":["repeated_id_owner","intersect_cache_param","join_role","encode_params","allow_info_share","repeated_id_process","random_bit","with_encode","info_owner"],"_is_raw_conf": false,"_name": "Intersection#Intersection_0","_user_feeded_params":["repeated_id_owner","encode_params.salt","intersect_method","intersect_cache_param.encrypt_type","encode_params.encode_method","encode_params","intersect_cache_param","intersect_cache_param.id_type","intersect_cache_param.use_cache","join_role","allow_info_share","repeated_id_process","sync_intersect_ids","random_bit","only_output_key","with_encode","encode_params.base64","info_owner"],"allow_info_share": false,"cardinality_only": false,"dh_params":{"hash_method": "sha256","key_length": 1024,"salt": ""},"encode_params":{"base64": false,"encode_method": "none","salt": ""},"info_owner": "guest","intersect_cache_param":{"encrypt_type": "sha256","id_type": "phone","use_cache": false},"intersect_method": "raw","intersect_preprocess_params":{"encrypt_method": "rsa","false_positive_rate": 0.001,"filter_owner": "guest","hash_method": "sha256","preprocess_method": "sha256","preprocess_salt": "","random_state": null},"join_method": "inner_join","join_role": "guest","new_sample_id": false,"only_output_key": false,"random_bit": 128,"raw_params":{"base64": false,"hash_method": "none","join_role": "guest","salt": "","use_hash": false},"repeated_id_owner": "guest","repeated_id_process": false,"rsa_params":{"final_hash_method": "sha256","hash_method": "sha256","key_length": 1024,"random_base_fraction": null,"random_bit": 128,"salt": "","split_calculation": false},"run_cache": false,"run_preprocess": false,"sample_id_generator": "guest","sync_cardinality": false,"sync_intersect_ids": true,"with_encode": false,"with_sample_id": false},"module": "Intersection"}'404':description: failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: error'/tracking/component/summary/download':post:summary: get component summarytags:- trackingrequestBody:required: truecontent:application/json:schema:required:- job_id- role- party_id- component_nametype: objectproperties:job_id:type: stringrole:type: stringexample: guestparty_id:type: integerexample: 10000component_name:type: stringexample: Intersection_0responses:'200':description: successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectexample:{"cardinality_only": false,"intersect_num": 569,"intersect_rate": 1.0}'404':description: failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: error'/tracking/component/output/model':post:summary: get component output modeltags:- trackingrequestBody:required: truecontent:application/json:schema:required:- job_id- role- party_id- component_nametype: objectproperties:job_id:type: stringrole:type: stringexample: guestparty_id:type: integerexample: 10000component_name:type: stringexample: Intersection_0responses:'200':description: successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: object'404':description: failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: error'/tracking/component/output/data':post:summary: get component output datatags:- trackingrequestBody:required: truecontent:application/json:schema:required:- job_id- role- party_id- component_nametype: objectproperties:job_id:type: stringrole:type: stringexample: guestparty_id:type: integerexample: 10000component_name:type: stringexample: Intersection_0responses:'200':description: successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectexample:[[["58",1,-0.422281,-0.558102,-0.506991,-0.450875,-1.326851,-1.223647,-1.296979,-1.575895,-0.747019,-1.166825],["66",1,-1.213336,0.957974,-1.19832,-0.966647,0.983301,-0.558944,-0.854288,-0.752745,-0.036814,0.452425]]]meta:type: objectexample:{"header":[["id","y","x0","x1","x2","x3","x4","x5","x6","x7","x8","x9"]],"names":["data_0"],"total":[569]}'404':description: failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: error'/tracking/component/output/data/download':post:summary: download component output data (tar.gz)tags:- trackingrequestBody:required: truecontent:application/json:schema:required:- job_id- role- party_id- component_nametype: objectproperties:job_id:type: stringrole:type: stringexample: guestparty_id:type: integerexample: 10000component_name:type: stringexample: Intersection_0responses:'200':description: successcontent:application/octet-stream:schema:type: stringexample: ""description: file data.tar.gz'404':description: failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: error'/tracking/component/output/data/table':post:summary: get component output data table infotags:- trackingrequestBody:required: truecontent:application/json:schema:required:- job_id- role- party_id- component_nametype: objectproperties:job_id:type: stringrole:type: stringexample: guestparty_id:type: integerexample: 10000component_name:type: stringexample: Intersection_0responses:'200':description: successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: arrayitems:type: objectexample:[{"data_name": "data_0","table_name": "ab035e12b09711ec943e525400c367ed","table_namespace": "output_data_202203311009181495690_Intersection_0_0"}]'404':description: failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: No found table, please check if the parameters are correct'/tracking/component/list':post:summary: get component listtags:- trackingrequestBody:required: truecontent:application/json:schema:required:- job_idtype: objectproperties:job_id:type: stringresponses:'200':description: successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectexample:{"components":["HeteroFeatureSelection_0","DataIO_0","Reader_0","HeteroSecureBoost_0","HeteroFeatureBinning_0","Intersection_0","Evaluation_0"]}'404':description: failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: error'/resource/query':post:summary: query conputing engine resourcetags:- resourcerequestBody:required: truecontent:application/json:schema:required:- engine_nametype: objectproperties:engine_name:type: stringexample: EGGROLL, SPARKresponses:'200':description: successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectexample: {"computing_engine_resource":{"f_cores":16,"f_create_date":"2022-02-10 16:14:03","f_create_time":1644480843818,"f_engine_config":{"cores_per_node":16,"nodes":1},"f_engine_entrance":"fate_on_eggroll","f_engine_name":"EGGROLL","f_engine_type":"computing","f_memory":0,"f_nodes":1,"f_remaining_cores":16,"f_remaining_memory":0,"f_update_date":"2022-04-27 15:48:33","f_update_time":1651045713996},"use_resource_job":[]}'404':description: failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: error'/resource/return':post:summary: return job resourcetags:- resourcerequestBody:required: truecontent:application/json:schema:required:- job_idtype: objectproperties:engine_name:type: stringexample: 202204261616175720130responses:'200':description: successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectexample: [{"job_id":"202204261616175720130","party_id":"20001","resource_in_use":true,"resource_return_status":ture,"role":"guest"}]'404':description: failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: no found job'/permission/grant/privilege':post:summary: grant privilegetags:- permissionrequestBody:required: truecontent:application/json:schema:required:- src_role- src_party_idtype: objectproperties:src_role:type: stringexample: "guest"src_party_id:type: stringexample: 9999privilege_role:type: stringdescription: multiple separated by ",". like "guest, host, arbiter" or "all"example: allprivilege_component:type: stringdescription: multiple separated by ",". like "create, run, stop" or "all"example: allprivilege_command:type: stringdescription: multiple separated bu ",". like "reader, dataio, ..." or "all"example: allresponses:'200':description: successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: success'404':description: failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: error'/permission/delete/privilege':post:summary: delete privilegetags:- permissionrequestBody:required: truecontent:application/json:schema:required:- src_role- src_party_idtype: objectproperties:src_role:type: stringexample: "guest"src_party_id:type: stringexample: 9999privilege_role:type: stringdescription: multiple separated by ",". like "guest, host, arbiter" or "all"example: allprivilege_component:type: stringdescription: multiple separated by ",". like "create, run, stop" or "all"example: allprivilege_command:type: stringdescription: multiple separated bu ",". like "reader, dataio, ..." or "all"example: allresponses:'200':description: successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: success'404':description: failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: error'/permission/query/privilege':post:summary: query privilegetags:- permissionrequestBody:required: truecontent:application/json:schema:required:- src_role- src_party_idtype: objectproperties:src_role:type: stringexample: "guest"src_party_id:type: stringexample: 9999responses:'200':description: successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectexample: {"privilege_command":["stop","run","create"],"privilege_component":["reader", "dataio","heterolinr", "heterolr", "localbaseline","columnexpand","heteropearson","featurescale","datastatistics","feldmanverifiablesum"],"privilege_role":["host","guest","arbiter"],"role":"guest","src_party_id":"9999"}'404':description: failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 101retmsg:type: stringexample: error'/info/fateboard':post:summary: get fateboard host and porttags:- informationresponses:'200':description: fateboard host and portcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectproperties:host:type: stringexample: 127.0.0.1port:type: integerexample: 8080'404':description: fateboard is not configuredcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 404retmsg:type: stringexample: fateboard is not configured'/info/mysql':post:summary: test mysql connectiontags:- informationresponses:'200':description: connect to mysql successfullycontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: success'404':description: mysql only available on cluster modecontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 404retmsg:type: stringexample: mysql only available on cluster mode'503':description: connect to mysql failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 503retmsg:type: stringdescription: error message'/info/eggroll':post:summary: test eggroll connectiontags:- informationresponses:'200':description: connect to eggroll successfullycontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: success'404':description: eggroll only available on cluster modecontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 404retmsg:type: stringexample: eggroll only available on cluster mode'503':description: connect to eggroll failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 503retmsg:type: stringdescription: error message'/model/deploy':post:summary: deploy a model for predicttags:- modelrequestBody:required: truecontent:application/json:schema:type: objectrequired:- model_id- model_versionproperties:model_id:type: stringexample: 'arbiter-10000#guest-9999#host-10000#model'model_version:type: stringexample: '202111032155391167400'components_checkpoint:type: objectdescription: specify a checkpoint model to replace the pipeline modelexample:hetero_lr_0:step_index: 5additionalProperties:type: objectdescription: use step_index or step_name to specity a checkpointproperties:step_index:type: integerexample: 5step_name:type: stringexample: round_5responses:'200':description: successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectproperties:model_id:type: stringexample: 'arbiter-9999#guest-10000#host-9999#model'model_version:type: stringexample: '202111032227378766180'arbiter:type: objectproperties:party_id:type: integerexample: 9999guest:type: objectproperties:party_id:type: integerexample: 10000host:type: objectproperties:party_id:type: integerexample: 9999detail:type: objectproperties:arbiter:type: objectproperties:party_id:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: deploy model of role arbiter 9999 successguest:type: objectproperties:party_id:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: deploy model of role guest 10000 successhost:type: objectproperties:party_id:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: deploy model of role host 9999 success'/model/transfer/{model_id}/{model_version}':post:summary: download a model by model_id and model_versiontags:- modelparameters:- name: model_idin: pathrequired: truedescription: 'model id (replace # with ~)'schema:type : stringexample: 'host~10000~arbiter-10000~guest-9999~host-10000~model'- name: model_versionin: pathrequired: truedescription: model versionschema:type : stringexample: '202105060929263278441'responses:'200':description: model datacontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectdescription: base64 encoded model data'404':description: model not foundcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 404retmsg:type: stringexample: model not found'/model/load':post:summary: load a deployed model on Fate-Servingtags:- modelrequestBody:required: truecontent:application/json:schema:type: objectrequired:- initiator- role- job_parametersproperties:initiator:type: objectproperties:party_id:type: stringexample: '10000'role:type: stringexample: guestrole:type: objectexample:guest:- '10000'host:- '10000'arbiter:- '10000'job_parameters:type: objectproperties:model_id:type: stringexample: arbiter-10000#guest-10000#host-10000#modelmodel_version:type: stringexample: '2019081217340125761469'responses:'200':description: loading successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successjobId:type: stringexample: "2019081217340125761469"data:type: objectexample:detail:guest:'9999':retcode: 0retmsg: successhost:'10000':retcode: 0retmsg: successguest:'9999': 0host:'10000': 0'/model/bind':post:summary: bind a deployed model to Fate-Servingtags:- modelrequestBody:required: truecontent:application/json:schema:type: objectrequired:- service_id- initiator- role- job_parametersproperties:service_id:type: stringexample: "123"initiator:type: objectproperties:party_id:type: stringexample: "10000"role:type: stringexample: guestjob_parameters:type: objectproperties:model_id:type: stringexample: arbiter-10000#guest-10000#host-10000#modelmodel_version:type: stringexample: "2019081217340125761469"responses:'200':description: binding successcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: service id is 123'/checkpoint/list':post:summary: list checkpointstags:- checkpointrequestBody:required: truecontent:application/json:schema:type: objectrequired:- model_id- model_version- role- party_id- component_nameproperties:model_id:type: stringexample: 'arbiter-10000#guest-9999#host-10000#model'model_version:type: stringexample: '202111032155391167400'role:type: stringexample: guestparty_id:type: integerexample: 9999component_name:type: stringexample: hetero_lr_0responses:'200':description: checkpoints listcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: arrayitems:type: objectproperties:create_time:type: stringexample: '2021-11-07T02:34:54.683015'step_index:type: integerexample: 0step_name:type: stringexample: step_namemodels:type: objectexample:HeteroLogisticRegressionMeta:buffer_name: LRModelMetasha1: 6871508f6e6228341b18031b3623f99a53a87147HeteroLogisticRegressionParam:buffer_name: LRModelParamsha1: e3cb636fc93675684bff27117943f5bfa87f3029additionalProperties:type: objectproperties:buffer_name:type: stringexample: HeteroLogisticRegressionMetasha1:type: stringexample: 6871508f6e6228341b18031b3623f99a53a87147'/checkpoint/get':post:summary: get a checkpointtags:- checkpointrequestBody:required: truecontent:application/json:schema:type: objectrequired:- model_id- model_version- role- party_id- component_nameproperties:model_id:type: stringexample: 'arbiter-10000#guest-9999#host-10000#model'model_version:type: stringexample: '202111032155391167400'role:type: stringexample: guestparty_id:type: integerexample: 9999component_name:type: stringexample: hetero_lr_0step_index:type: integerexample: 0responses:'200':description: checkpoint datacontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: successdata:type: objectproperties:create_time:type: stringexample: '2021-11-07T02:34:54.683015'step_index:type: integerexample: 0step_name:type: stringexample: step_namemodels:type: objectexample:HeteroLogisticRegressionMeta: 'CgJMMhEtQxzr4jYaPxkAAAAAAADwPyIHcm1zcHJvcDD///8BOTMzMzMzM8M/QApKBGRpZmZYAQ=='HeteroLogisticRegressionParam: 'Ig0KAng3EW1qASu+uuO/Ig0KAng0EcNi7a65ReG/Ig0KAng4EbJbl4gvVea/Ig0KAng2EcZwlVZTkOu/Ig0KAngwEVpG8dCbGvG/Ig0KAng5ESJNTx5MLve/Ig0KAngzEZ88H9P8qfO/Ig0KAng1EVfWP8JJv/K/Ig0KAngxEVS0xVXoTem/Ig0KAngyEaApgW32Q/K/KSiiE8AukPs/MgJ4MDICeDEyAngyMgJ4MzICeDQyAng1MgJ4NjICeDcyAng4MgJ4OUj///8B'additionalProperties:type: stringdescription: base64 encoded model data'404':description: checkpoint not foundcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 404retmsg:type: stringexample: The checkpoint was not found.'/component/validate':post:summary: validate component parameterstags:- componentrequestBody:required: truecontent:application/json:schema:type: objectproperties:dsl_version:type: integerexample: 2component_name:type: stringexample: dataio_0component_module_name:type: stringexample: DataIOrole:type: objectexample:guest:- 10000host:- 9999arbiter:- 9999component_parameters:type: objectdescription: required if `dsl_version` == 2example:common:dataio_0:output_format: denserole:guest:'0':dataio_0:with_label: truehost:'0':dataio_0:with_label: falseoutput_format: denserole_parameters:type: objectdescription: required if `dsl_version` == 1example:guest:dataio_0:with_label:- truelabel_name:- ylabel_type:- intoutput_format:- densemissing_fill:- trueoutlier_replace:- truehost:dataio_0:with_label:- falseoutput_format:- denseoutlier_replace:- truealgorithm_parameters:type: objectdescription: required if `dsl_version` == 1example:hetero_feature_binning_0:method: quantilecompress_thres: 10000head_size: 10000error: 0.001bin_num: 10adjustment_factor: 0.5local_only: falsetransform_param:transform_cols: -1transform_type: bin_numresponses:'200':description: validation passedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 0retmsg:type: stringexample: success'400':description: validation failedcontent:application/json:schema:type: objectproperties:retcode:type: integerexample: 400retmsg:type: stringdescription: error messageexample: "Component dataio_0, module DataIO, does not pass component check, error msg is dataio param's dendse not supported, should be one of ['dense', 'sparse']"tags:- name: data-access- name: table- name: job- name: tracking- name: information- name: model- name: checkpoint- name: componentservers:- description: Default Server URLurl: http://localhost:9380/v1