请求报文如下所示:
{
"connection": {
"ConnectionKey": "erp",
"ConnectionType": "Http",
"ConnectionName": "明源云ERP",
"DataInfo": "{\"Url\":\"http://10.5.5.5:800\",\"HealthUrl\":\"http://10.5.5.5:800\",\"Authentication\":{\"AuthenticationType\":\"ApiKey\",\"ApiKeyContent\":[{\"Name\":\"AppID\",\"Value\":\"MIP\",\"In\":\"Header\"},{\"Name\":\"AppKey\",\"Value\":\"27daa80ffcd56\",\"In\":\"Header\"}]},\"CheckInterval\":{\"Period\":\"Minute\",\"Time\":5},\"CheckTimeout\":{\"Period\":\"Second\",\"Time\":60},\"ConnectTimeout\":{\"Period\":\"Second\",\"Time\":60},\"ExceptionsAllowedBeforeBreaking\":50,\"DurationOfBreak\":{\"Period\":\"Minute\",\"Time\":5},\"RetryPolicy\":{\"RetryPolicy\":\"Limited\",\"RetryTimes\":3,\"RetryInterval\":{\"Period\":\"Second\",\"Time\":1}}}",
"Remark": "此连接器用于连接明源云ERP资源"
},
"swaggerApiJson": "",
"eventJson": ""
}
Body对象含义:
属性名
描述
是否必填
connection
连接器基础信息,包括连接器的Url、健康检查地址、鉴权方式等等
必填
swaggerApiJson
连接器的API描述信息
非必填
eventJson
连接器的事件描述信息
非必填
swaggerApiJson样例:
"{\"swagger\":\"2.0\",\"info\":{\"version\":\"v1\",\"title\":\"mysoftERP\",\"vendorExtensions\":{}},\"host\":\"10.5.111.21:800\",\"schemes\":[\"http\"],\"paths\":{\"/pub/Mysoft.PubPlatform.Organization.PublicServices.IOrganizationPublicService/Create\":{\"post\":{\"tags\":[\"系统管理\"],\"summary\":\"批量创建组织\",\"description\":\"批量创建组织\",\"operationId\":\"IOrganizationPublicService_Create\",\"consumes\":[],\"produces\":[],\"parameters\":[{\"example\":{\"request\":{\"BusinessUnitList\":[{\"Id\":{\"HasValue\":false,\"Value\":\"08c6347a-b80e-4705-806e-bbbe029fc0f9\"},\"Code\":\"string\",\"Name\":\"string\",\"ParentCode\":\"string\",\"Type\":{\"HasValue\":false,\"Value\":0},\"Comments\":\"string\"}]}},\"name\":\"requestBody\",\"in\":\"body\",\"required\":true,\"schema\":{\"$ref\":\"#/definitions/Mysoft.PubPlatform.Organization.Model.DTO.OpenAPI.CreateBusinessUnitRequest\",\"vendorExtensions\":{}},\"type\":\"object\",\"vendorExtensions\":{}}],\"responses\":{\"200\":{\"description\":\"OK\",\"schema\":{\"type\":\"object\",\"properties\":{\"success\":{\"type\":\"boolean\",\"vendorExtensions\":{}},\"message\":{\"type\":\"string\",\"vendorExtensions\":{}},\"exception\":{\"type\":\"string\",\"vendorExtensions\":{}},\"data\":{\"$ref\":\"#/definitions/Mysoft.PubPlatform.Organization.Model.DTO.OpenAPI.ApiCollectionOutput[Mysoft.PubPlatform.Organization.Model.DTO.OpenAPI.CreateBusinessUnitResponse]\",\"vendorExtensions\":{}}},\"vendorExtensions\":{}},\"examples\":{\"data\":{\"IsAllSuccess\":false,\"FailedList\":[{\"Id\":{\"HasValue\":false,\"Value\":\"55688bfe-4aa7-47eb-9b04-8589d379954a\"},\"Code\":\"string\",\"Result\":{\"ErrorMessage\":\"string\",\"Exception\":{}}}],\"Remark\":\"string\"},\"exception\":\"string\",\"message\":\"string\",\"success\":true},\"vendorExtensions\":{}}},\"vendorExtensions\":{}},\"vendorExtensions\":{}},\"/pub/Mysoft.PubPlatform.Organization.PublicServices.IOrganizationPublicService/Update\":{\"post\":{\"tags\":[\"系统管理\"],\"summary\":\"批量修改组织\",\"description\":\"批量修改组织\",\"operationId\":\"IOrganizationPublicService_Update\",\"consumes\":[],\"produces\":[],\"parameters\":[{\"example\":{\"request\":{\"BusinessUnitList\":[{\"Id\":{\"HasValue\":false,\"Value\":\"8dbc746b-4c0e-406b-82a5-1480b99f5d63\"},\"Code\":\"string\",\"Name\":\"string\",\"Comments\":\"string\"}]}},\"name\":\"requestBody\",\"in\":\"body\",\"required\":true,\"schema\":{\"$ref\":\"#/definitions/Mysoft.PubPlatform.Organization.Model.DTO.OpenAPI.UpdateBusinessUnitRequest\",\"vendorExtensions\":{}},\"type\":\"object\",\"vendorExtensions\":{}}],\"responses\":{\"200\":{\"description\":\"OK\",\"schema\":{\"type\":\"object\",\"properties\":{\"success\":{\"type\":\"boolean\",\"vendorExtensions\":{}},\"message\":{\"type\":\"string\",\"vendorExtensions\":{}},\"exception\":{\"type\":\"string\",\"vendorExtensions\":{}},\"data\":{\"$ref\":\"#/definitions/Mysoft.PubPlatform.Organization.Model.DTO.OpenAPI.ApiCollectionOutput[Mysoft.PubPlatform.Organization.Model.DTO.OpenAPI.UpdateBusinessUnitResponse]\",\"vendorExtensions\":{}}},\"vendorExtensions\":{}},\"examples\":{\"data\":{\"IsAllSuccess\":false,\"FailedList\":[{\"Id\":{\"HasValue\":false,\"Value\":\"e839e876-2c6e-41f3-b34d-95f7e25f0a7b\"},\"Code\":\"string\",\"Result\":{\"ErrorMessage\":\"string\",\"Exception\":{}}}],\"Remark\":\"string\"},\"exception\":\"string\",\"message\":\"string\",\"success\":true},\"vendorExtensions\":{}}},\"vendorExtensions\":{}},\"vendorExtensions\":{}},\"/pub/Mysoft.PubPlatform.Organization.PublicServices.IOrganizationPublicService/Delete\":{\"post\":{\"tags\":[\"系统管理\"],\"summary\":\"删除组织\",\"description\":\"删除组织\",\"operationId\":\"IOrganizationPublicService_Delete\",\"consumes\":[],\"produces\":[],\"parameters\":[{\"example\":{\"request\":{\"BusinessUnit\":{\"Id\":{\"HasValue\":false,\"Value\":\"2dac99f2-2a37-45de-99df-4ae57cc847bd\"}}}},\"name\":\"requestBody\",\"in\":\"body\",\"required\":true,\"schema\":{\"$ref\":\"#/definitions/Mysoft.PubPlatform.Organization.Model.DTO.OpenAPI.DeleteBusinessUnitRequest\",\"vendorExtensions\":{}},\"type\":\"object\",\"vendorExtensions\":{}}],\"responses\":{\"200\":{\"description\":\"OK\",\"schema\":{\"type\":\"object\",\"properties\":{\"success\":{\"type\":\"boolean\",\"vendorExtensions\":{}},\"message\":{\"type\":\"string\",\"vendorExtensions\":{}},\"exception\":{\"type\":\"string\",\"vendorExtensions\":{}},\"data\":{\"$ref\":\"#/definitions/Mysoft.PubPlatform.Organization.Model.DTO.OpenAPI.DeleteBusinessUnitResponse\",\"vendorExtensions\":{}}},\"vendorExtensions\":{}},\"examples\":{\"data\":{\"HasValue\":false,\"Value\":\"9c322037-6b55-4e96-8a66-3f937deab219\"},\"exception\":\"string\",\"message\":\"string\",\"success\":true},\"vendorExtensions\":{}}},\"vendorExtensions\":{}},\"vendorExtensions\":{}}}}"
EventJson样例:
"[{\"Schema\":{\"type\":\"object\",\"properties\":{\"Result\":{\"type\":\"object\",\"properties\":{\"ApplicationName\":{\"type\":\"string\"},\"ApplicationCode\":{\"type\":\"string\"},\"FunctionName\":{\"type\":\"string\"},\"FunctionCode\":{\"type\":\"string\"},\"ErrorMessage\":{\"type\":\"string\"}},\"required\":[\"ApplicationName\",\"ApplicationCode\",\"FunctionName\",\"FunctionCode\",\"ErrorMessage\"]},\"Data\":{\"type\":\"object\",\"properties\":{\"ParamId\":{\"type\":\"string\"},\"ParamCode\":{\"type\":\"string\"},\"ParamName\":{\"type\":\"string\"},\"ParamValueDto\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"ParentCode\":{\"type\":\"string\"},\"Order\":{\"type\":\"integer\"},\"Code\":{\"type\":\"string\"},\"ScopeId\":{\"type\":\"string\"},\"IsDefault\":{\"type\":\"boolean\"},\"Description\":{\"type\":\"string\"},\"MyParamValueId\":{\"type\":\"string\"},\"Value\":{\"type\":\"string\"},\"Disabled\":{\"type\":\"integer\"},\"IsSystem\":{\"type\":\"boolean\"},\"Text\":{\"type\":\"string\"},\"State\":{\"type\":\"integer\",\"enum\":[0,1,2,3]}},\"required\":[\"ParentCode\",\"Order\",\"Code\",\"ScopeId\",\"IsDefault\",\"Description\",\"MyParamValueId\",\"Value\",\"Disabled\",\"IsSystem\",\"Text\",\"State\"]}}},\"required\":[\"ParamId\",\"ParamCode\",\"ParamName\",\"ParamValueDto\"]},\"Handled\":{\"type\":\"boolean\"},\"EventName\":{\"type\":\"string\"}},\"required\":[\"Result\",\"Data\",\"Handled\",\"EventName\"]},\"AppCode\":\"0201\",\"AppName\":\"成本系统\",\"EventName\":\"目标成本调整审批模式的变更后事件\",\"Description\":\"目标成本调整审批模式的变更后事件\",\"Async\":true,\"Parameters\":[{\"Value\":\"param\",\"Name\":\"业务参数事件参数\",\"Type\":\"EventArgument\",\"TypeToJson\":null,\"Required\":true,\"Description\":\"目标成本调整审批模式的变更后事件参数\"}],\"ReturnValues\":null,\"ParametersToJson\":{\"Result\":{\"ApplicationName\":\"string\",\"ApplicationCode\":\"string\",\"FunctionName\":\"string\",\"FunctionCode\":\"string\",\"ErrorMessage\":\"string\"},\"Data\":{\"ParamId\":\"5d03b080-173f-4d65-bee0-9bc6e4aeb416\",\"ParamCode\":\"string\",\"ParamName\":\"string\",\"ParamValueDto\":[{\"ParentCode\":\"string\",\"Order\":{\"HasValue\":false,\"Value\":0},\"Code\":\"string\",\"ScopeId\":\"36b2c6ee-364f-4176-a5cd-ea8873c41d77\",\"IsDefault\":false,\"Description\":\"string\",\"MyParamValueId\":\"a26c164b-8aef-4916-9513-1153748d88ae\",\"Value\":\"string\",\"Disabled\":0,\"IsSystem\":false,\"Text\":\"string\",\"State\":{}}]},\"Handled\":false,\"EventName\":\"string\"},\"ReturnValueToJson\":null,\"EventType\":2,\"EventCode\":\"Map.Param.ChangedEvent.cb_AdjustCostApprovalMode\",\"SourceType\":1},{\"Schema\":{\"type\":\"object\",\"properties\":{\"Result\":{\"type\":\"object\",\"properties\":{\"ApplicationName\":{\"type\":\"string\"},\"ApplicationCode\":{\"type\":\"string\"},\"FunctionName\":{\"type\":\"string\"},\"FunctionCode\":{\"type\":\"string\"},\"ErrorMessage\":{\"type\":\"string\"}},\"required\":[\"ApplicationName\",\"ApplicationCode\",\"FunctionName\",\"FunctionCode\",\"ErrorMessage\"]},\"Data\":{\"type\":\"object\",\"properties\":{\"ParamId\":{\"type\":\"string\"},\"ParamCode\":{\"type\":\"string\"},\"ParamName\":{\"type\":\"string\"},\"ParamValueDto\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"ParentCode\":{\"type\":\"string\"},\"Order\":{\"type\":\"integer\"},\"Code\":{\"type\":\"string\"},\"ScopeId\":{\"type\":\"string\"},\"IsDefault\":{\"type\":\"boolean\"},\"Description\":{\"type\":\"string\"},\"MyParamValueId\":{\"type\":\"string\"},\"Value\":{\"type\":\"string\"},\"Disabled\":{\"type\":\"integer\"},\"IsSystem\":{\"type\":\"boolean\"},\"Text\":{\"type\":\"string\"},\"State\":{\"type\":\"integer\",\"enum\":[0,1,2,3]}},\"required\":[\"ParentCode\",\"Order\",\"Code\",\"ScopeId\",\"IsDefault\",\"Description\",\"MyParamValueId\",\"Value\",\"Disabled\",\"IsSystem\",\"Text\",\"State\"]}}},\"required\":[\"ParamId\",\"ParamCode\",\"ParamName\",\"ParamValueDto\"]},\"Handled\":{\"type\":\"boolean\"},\"EventName\":{\"type\":\"string\"}},\"required\":[\"Result\",\"Data\",\"Handled\",\"EventName\"]},\"AppCode\":\"0201\",\"AppName\":\"成本系统\",\"EventName\":\"付款方式的变更后事件\",\"Description\":\"付款方式的变更后事件\",\"Async\":true,\"Parameters\":[{\"Value\":\"param\",\"Name\":\"业务参数事件参数\",\"Type\":\"EventArgument\",\"TypeToJson\":null,\"Required\":true,\"Description\":\"付款方式的变更后事件参数\"}],\"ReturnValues\":null,\"ParametersToJson\":{\"Result\":{\"ApplicationName\":\"string\",\"ApplicationCode\":\"string\",\"FunctionName\":\"string\",\"FunctionCode\":\"string\",\"ErrorMessage\":\"string\"},\"Data\":{\"ParamId\":\"5d03b080-173f-4d65-bee0-9bc6e4aeb416\",\"ParamCode\":\"string\",\"ParamName\":\"string\",\"ParamValueDto\":[{\"ParentCode\":\"string\",\"Order\":{\"HasValue\":false,\"Value\":0},\"Code\":\"string\",\"ScopeId\":\"36b2c6ee-364f-4176-a5cd-ea8873c41d77\",\"IsDefault\":false,\"Description\":\"string\",\"MyParamValueId\":\"a26c164b-8aef-4916-9513-1153748d88ae\",\"Value\":\"string\",\"Disabled\":0,\"IsSystem\":false,\"Text\":\"string\",\"State\":{}}]},\"Handled\":false,\"EventName\":\"string\"},\"ReturnValueToJson\":null,\"EventType\":2,\"EventCode\":\"Map.Param.ChangedEvent.x_cb_Payform\",\"SourceType\":1}]"
属性connection的定义:
属性名
描述
是否必填
ConnectionKey
连接器编码
必填
ConnectionType
连接器类型,这里以Http类型的连接器为例
必填
ConnectionName
连接器名称
必填
DataInfo
连接器配置信息
必填
Remark
连接器备注
非必填