-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdify.json
More file actions
265 lines (265 loc) · 12 KB
/
dify.json
File metadata and controls
265 lines (265 loc) · 12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
{
"openapi": "3.1.0",
"info": {
"title": "Dify API",
"description": "API for creating Jira tickets and other Dify operations",
"version": "v1.0.0"
},
"servers": [
{
"url": "https://dify.yswg360.com/fastify"
}
],
"paths": {
"/dify/create-jira": {
"post": {
"tags": [
"dify"
],
"description": "快速创建jira工单并更新内容",
"operationId": "createJira",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"point": {
"default": "ping",
"description": "触发标识:'ping' | 触发接口: 'app.external_data_tool.query'",
"type": "string"
},
"title": {
"default": "【超级工单】新增测试工单",
"description": "单子标题",
"type": "string"
},
"description": {
"default": "【超级工单】新增测试工单-我是工单的描述信息",
"description": "单子描述",
"type": "string"
},
"labels": {
"default": "SaaS需求,SaaS内部已评审",
"description": "标签",
"type": "string"
},
"jiraUser": {
"default": "lfx123456",
"description": "jira用户名",
"type": "string"
},
"jiraPassword": {
"default": "lfx123456",
"description": "jira密码",
"type": "string"
},
"assignee": {
"default": "lfx123456",
"description": "经办人",
"type": "string"
},
"customerName": {
"default": "新安明珠",
"description": "客户名称信息",
"type": "string"
}
},
"required": [
"point"
]
}
}
}
},
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"result": {
"type": "string"
},
"issueId": {
"type": "string"
},
"issueKey": {
"type": "string"
},
"issueUrl": {
"type": "string"
}
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string"
}
}
}
}
}
}
}
}
},
"/jira/link/types": {
"get": {
"tags": [
"jira"
],
"description": "查询当前 Jira 实例支持的所有工单链接类型,用于确认 linkTypeName 的可用值",
"operationId": "getJiraLinkTypes",
"servers": [
{
"url": "https://dify.yswg360.com/fastify"
}
],
"parameters": [
{
"name": "jiraUser",
"in": "query",
"required": false,
"schema": {
"type": "string",
"description": "jira用户名,不传则使用服务默认账号"
}
},
{
"name": "jiraPassword",
"in": "query",
"required": false,
"schema": {
"type": "string",
"description": "jira密码,不传则使用服务默认账号"
}
}
],
"responses": {
"200": {
"description": "链接类型列表",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": { "type": "string" },
"name": { "type": "string", "description": "链接类型名称,即 linkTypeName 的可用值" },
"inward": { "type": "string", "description": "入向描述,如「被阻塞」" },
"outward": { "type": "string", "description": "出向描述,如「阻塞」" }
}
}
}
}
}
}
}
}
},
"/jira/link": {
"post": {
"tags": [
"jira"
],
"description": "批量将多个 Jira 工单关联到指定目标工单(relates to)。linkTypeName 不传时自动选择第一个可用类型,可先调用 GET /jira/link/types 确认可用值",
"operationId": "linkJiraIssues",
"servers": [
{
"url": "https://dify.yswg360.com/fastify"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["sourceIssueKeys", "targetIssueKey"],
"properties": {
"jiraUser": {
"type": "string",
"description": "jira用户名,不传则使用服务默认账号"
},
"jiraPassword": {
"type": "string",
"description": "jira密码,不传则使用服务默认账号"
},
"sourceIssueKeys": {
"type": "string",
"description": "需要建立关联的来源工单 Key,逗号分隔,例如:NDE-4143,NDE-4144,NDE-4145",
"example": "NDE-4143,NDE-4144"
},
"targetIssueKey": {
"type": "string",
"description": "被关联的目标工单 Key,即「相关于」哪个工单,例如:NDE-4128",
"example": "NDE-4128"
},
"linkTypeName": {
"type": "string",
"description": "关联类型名称,不传时自动选择第一个可用类型。可通过 GET /jira/link/types 查询实际可用值"
}
}
}
}
}
},
"responses": {
"200": {
"description": "关联结果,每个来源工单独立返回成功或失败",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"issueKey": { "type": "string", "description": "来源工单 Key" },
"success": { "type": "boolean", "description": "是否关联成功" },
"message": { "type": "string", "description": "结果描述" }
}
}
}
}
}
}
}
},
"400": {
"description": "参数错误",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": { "type": "string" }
}
}
}
}
}
}
}
}
},
"components": {
"schemas": {}
}
}