├── .nojekyll
├── CNAME
├── README.md
├── index.html
├── openapi.json
├── openapi.yaml
└── qinglong.ico
/.nojekyll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ukenn2112/qinglongAPI_doc/55cf8f8093990ddfd945fd43ebb4dc6db7c08cfa/.nojekyll
--------------------------------------------------------------------------------
/CNAME:
--------------------------------------------------------------------------------
1 | qinglong.ukenn.top
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # qinglongAPI_doc
2 | Qinglong API 文档
3 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Qinglong API
6 |
10 |
15 |
20 |
36 |
37 |
38 |
79 |
80 |
81 |
82 |
83 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/openapi.json:
--------------------------------------------------------------------------------
1 | {
2 | "openapi": "3.0.3",
3 | "info": {
4 | "title": "Qinglong API",
5 | "description": "在 `系统设置 -> 应用设置 -> 添加应用` 生成 `client_id` 和 `client_secret`",
6 | "version": "2.11.3",
7 | "contact": {
8 | "name": "Qinglong API",
9 | "url": "https://github.com/whyour/qinglong/tree/develop/back/api"
10 | }
11 | },
12 | "servers": [
13 | {
14 | "description": "OpenAPI",
15 | "url": "http://localhost:5700/open"
16 | },
17 | {
18 | "description": "SystemAPI",
19 | "url": "http://localhost:5700/api"
20 | }
21 | ],
22 | "tags": [
23 | {
24 | "name": "用户",
25 | "description": "User"
26 | },
27 | {
28 | "name": "环境变量",
29 | "description": "Env"
30 | },
31 | {
32 | "name": "配置管理",
33 | "description": "Config"
34 | },
35 | {
36 | "name": "任务日志",
37 | "description": "Log"
38 | },
39 | {
40 | "name": "定时任务",
41 | "description": "Cron"
42 | },
43 | {
44 | "name": "脚本管理",
45 | "description": "Script"
46 | },
47 | {
48 | "name": "依赖管理",
49 | "description": "Dependence"
50 | },
51 | {
52 | "name": "系统管理",
53 | "description": "System"
54 | },
55 | {
56 | "name": "OpenAPI",
57 | "description": "Open"
58 | }
59 | ],
60 | "paths": {
61 | "/auth/token": {
62 | "get": {
63 | "tags": [
64 | "用户"
65 | ],
66 | "summary": "获取用户密钥",
67 | "parameters": [
68 | {
69 | "name": "client_id",
70 | "in": "query",
71 | "description": "Client ID",
72 | "required": true,
73 | "schema": {
74 | "type": "string"
75 | }
76 | },
77 | {
78 | "name": "client_secret",
79 | "in": "query",
80 | "description": "Client Secret",
81 | "required": true,
82 | "schema": {
83 | "type": "string"
84 | }
85 | }
86 | ],
87 | "responses": {
88 | "200": {
89 | "description": "返回用户密钥信息",
90 | "content": {
91 | "application/json": {
92 | "schema": {
93 | "properties": {
94 | "code": {
95 | "type": "integer",
96 | "example": 200
97 | },
98 | "data": {
99 | "properties": {
100 | "token": {
101 | "type": "string",
102 | "description": "授权密钥"
103 | },
104 | "token_type": {
105 | "type": "string",
106 | "description": "标记类型"
107 | },
108 | "expiration": {
109 | "type": "integer",
110 | "description": "有效期 默认30天"
111 | }
112 | }
113 | }
114 | }
115 | }
116 | }
117 | }
118 | }
119 | }
120 | }
121 | },
122 | "/user/login": {
123 | "post": {
124 | "tags": [
125 | "用户"
126 | ],
127 | "summary": "系统接口登录获取用户密钥",
128 | "requestBody": {
129 | "description": "登录",
130 | "required": true,
131 | "content": {
132 | "application/json": {
133 | "schema": {
134 | "properties": {
135 | "username": {
136 | "type": "string",
137 | "description": "用户名"
138 | },
139 | "password": {
140 | "type": "string",
141 | "description": "密码"
142 | }
143 | }
144 | }
145 | }
146 | }
147 | },
148 | "responses": {
149 | "200": {
150 | "description": "返回用户密钥信息",
151 | "content": {
152 | "application/json": {
153 | "schema": {
154 | "properties": {
155 | "code": {
156 | "type": "integer",
157 | "example": 200
158 | },
159 | "data": {
160 | "properties": {
161 | "token": {
162 | "type": "string",
163 | "description": "授权密钥"
164 | },
165 | "lastip": {
166 | "type": "string",
167 | "description": "登录IP"
168 | },
169 | "lastaddr": {
170 | "type": "string",
171 | "description": "登录IP归属地"
172 | },
173 | "lastlogon": {
174 | "type": "integer"
175 | },
176 | "retries": {
177 | "type": "integer"
178 | },
179 | "platform": {
180 | "type": "string",
181 | "description": "登录设备"
182 | }
183 | }
184 | }
185 | }
186 | }
187 | }
188 | }
189 | }
190 | }
191 | }
192 | },
193 | "/envs": {
194 | "get": {
195 | "tags": [
196 | "环境变量"
197 | ],
198 | "summary": "获取所有环境变量详情",
199 | "description": "使用 Token 返回环境变量详情",
200 | "security": [
201 | {
202 | "HTTPBearer": []
203 | }
204 | ],
205 | "responses": {
206 | "200": {
207 | "description": "返回所有环境变量",
208 | "content": {
209 | "application/json": {
210 | "schema": {
211 | "properties": {
212 | "code": {
213 | "type": "integer",
214 | "example": 200
215 | },
216 | "data": {
217 | "type": "array",
218 | "items": {
219 | "type": "object",
220 | "properties": {
221 | "id": {
222 | "type": "integer",
223 | "description": "变量 ID"
224 | },
225 | "value": {
226 | "type": "string",
227 | "description": "变量值",
228 | "example": "变量值"
229 | },
230 | "timestamp": {
231 | "type": "string",
232 | "description": "时间戳",
233 | "example": "Thu Jan 27 2022 11:22:51 GMT+0800 (中国标准时间)"
234 | },
235 | "status": {
236 | "type": "integer"
237 | },
238 | "position": {
239 | "type": "integer"
240 | },
241 | "name": {
242 | "type": "string",
243 | "description": "变量名",
244 | "example": "变量名"
245 | },
246 | "remarks": {
247 | "type": "string",
248 | "description": "备注",
249 | "example": "备注"
250 | },
251 | "createdAt": {
252 | "type": "string",
253 | "example": "2022-02-01T03:00:53.572Z"
254 | },
255 | "updatedAt": {
256 | "type": "string",
257 | "example": "2022-02-10T03:30:08.079Z"
258 | }
259 | }
260 | }
261 | }
262 | }
263 | }
264 | }
265 | }
266 | },
267 | "401": {
268 | "description": "未授权",
269 | "content": {
270 | "application/json": {
271 | "schema": {
272 | "properties": {
273 | "code": {
274 | "type": "integer",
275 | "example": 401
276 | },
277 | "message": {
278 | "type": "string",
279 | "example": "UnauthorizedError"
280 | }
281 | }
282 | }
283 | }
284 | }
285 | }
286 | }
287 | },
288 | "post": {
289 | "tags": [
290 | "环境变量"
291 | ],
292 | "summary": "添加环境变量",
293 | "description": "使用 Token 添加环境变量,可批量添加",
294 | "security": [
295 | {
296 | "HTTPBearer": []
297 | }
298 | ],
299 | "requestBody": {
300 | "required": true,
301 | "content": {
302 | "application/json": {
303 | "schema": {
304 | "items": {
305 | "type": "object",
306 | "properties": {
307 | "value": {
308 | "type": "string",
309 | "description": "变量值",
310 | "example": "变量值"
311 | },
312 | "name": {
313 | "type": "string",
314 | "description": "变量名",
315 | "example": "变量名"
316 | },
317 | "remarks": {
318 | "type": "string",
319 | "description": "备注",
320 | "example": "备注"
321 | }
322 | }
323 | }
324 | }
325 | }
326 | }
327 | },
328 | "responses": {
329 | "200": {
330 | "description": "成功",
331 | "content": {
332 | "application/json": {
333 | "schema": {
334 | "properties": {
335 | "code": {
336 | "type": "integer",
337 | "example": 200
338 | },
339 | "data": {
340 | "type": "array",
341 | "items": {
342 | "type": "object",
343 | "properties": {
344 | "id": {
345 | "type": "integer",
346 | "description": "变量 ID"
347 | },
348 | "value": {
349 | "type": "string",
350 | "description": "变量值",
351 | "example": "变量值"
352 | },
353 | "startus": {
354 | "type": "integer"
355 | },
356 | "timestamp": {
357 | "type": "string",
358 | "description": "时间戳",
359 | "example": "Thu Jan 27 2022 11:22:51 GMT+0800 (中国标准时间)"
360 | },
361 | "position": {
362 | "type": "integer"
363 | },
364 | "name": {
365 | "type": "string",
366 | "description": "变量名",
367 | "example": "变量名"
368 | },
369 | "remarks": {
370 | "type": "string",
371 | "description": "备注",
372 | "example": "备注"
373 | },
374 | "createdAt": {
375 | "type": "string",
376 | "example": "2022-02-01T03:00:53.572Z"
377 | },
378 | "updatedAt": {
379 | "type": "string",
380 | "example": "2022-02-10T03:30:08.079Z"
381 | }
382 | }
383 | }
384 | }
385 | }
386 | }
387 | }
388 | }
389 | },
390 | "401": {
391 | "description": "未授权",
392 | "content": {
393 | "application/json": {
394 | "schema": {
395 | "properties": {
396 | "code": {
397 | "type": "integer",
398 | "example": 401
399 | },
400 | "message": {
401 | "type": "string",
402 | "example": "UnauthorizedError"
403 | }
404 | }
405 | }
406 | }
407 | }
408 | }
409 | }
410 | },
411 | "put": {
412 | "tags": [
413 | "环境变量"
414 | ],
415 | "summary": "更新环境变量",
416 | "description": "使用 Token 更新环境变量",
417 | "security": [
418 | {
419 | "HTTPBearer": []
420 | }
421 | ],
422 | "requestBody": {
423 | "required": true,
424 | "content": {
425 | "application/json": {
426 | "schema": {
427 | "properties": {
428 | "value": {
429 | "type": "string",
430 | "description": "变量值",
431 | "example": "变量值"
432 | },
433 | "name": {
434 | "type": "string",
435 | "description": "变量名",
436 | "example": "变量名"
437 | },
438 | "remarks": {
439 | "type": "string",
440 | "description": "备注",
441 | "example": "备注"
442 | },
443 | "id": {
444 | "type": "integer",
445 | "description": "变量 ID"
446 | }
447 | }
448 | }
449 | }
450 | }
451 | },
452 | "responses": {
453 | "200": {
454 | "description": "成功",
455 | "content": {
456 | "application/json": {
457 | "schema": {
458 | "properties": {
459 | "code": {
460 | "type": "integer",
461 | "example": 200
462 | }
463 | }
464 | }
465 | }
466 | }
467 | },
468 | "401": {
469 | "description": "未授权",
470 | "content": {
471 | "application/json": {
472 | "schema": {
473 | "properties": {
474 | "code": {
475 | "type": "integer",
476 | "example": 401
477 | },
478 | "message": {
479 | "type": "string",
480 | "example": "UnauthorizedError"
481 | }
482 | }
483 | }
484 | }
485 | }
486 | }
487 | }
488 | },
489 | "delete": {
490 | "tags": [
491 | "环境变量"
492 | ],
493 | "summary": "删除环境变量",
494 | "description": "使用 Token 删除环境变量",
495 | "security": [
496 | {
497 | "HTTPBearer": []
498 | }
499 | ],
500 | "requestBody": {
501 | "description": "变量 ID 可多个ID",
502 | "required": true,
503 | "content": {
504 | "application/json": {
505 | "schema": {
506 | "type": "array",
507 | "description": "变量 ID",
508 | "items": {
509 | "type": "integer"
510 | }
511 | }
512 | }
513 | }
514 | },
515 | "responses": {
516 | "200": {
517 | "description": "成功",
518 | "content": {
519 | "application/json": {
520 | "schema": {
521 | "properties": {
522 | "code": {
523 | "type": "integer",
524 | "example": 200
525 | }
526 | }
527 | }
528 | }
529 | }
530 | },
531 | "401": {
532 | "description": "未授权",
533 | "content": {
534 | "application/json": {
535 | "schema": {
536 | "properties": {
537 | "code": {
538 | "type": "integer",
539 | "example": 401
540 | },
541 | "message": {
542 | "type": "string",
543 | "example": "UnauthorizedError"
544 | }
545 | }
546 | }
547 | }
548 | }
549 | }
550 | }
551 | }
552 | },
553 | "/envs/{id}": {
554 | "get": {
555 | "tags": [
556 | "环境变量"
557 | ],
558 | "summary": "根据 ID 获取环境变量",
559 | "description": "使用 Token 获取环境变量详情",
560 | "security": [
561 | {
562 | "HTTPBearer": []
563 | }
564 | ],
565 | "parameters": [
566 | {
567 | "name": "id",
568 | "in": "path",
569 | "description": "变量 ID",
570 | "required": true,
571 | "schema": {
572 | "type": "integer"
573 | }
574 | }
575 | ],
576 | "responses": {
577 | "200": {
578 | "description": "返回该变量 ID 的环境变量详情",
579 | "content": {
580 | "application/json": {
581 | "schema": {
582 | "properties": {
583 | "code": {
584 | "type": "integer",
585 | "example": 200
586 | },
587 | "data": {
588 | "properties": {
589 | "id": {
590 | "type": "integer",
591 | "description": "变量 ID"
592 | },
593 | "value": {
594 | "type": "string",
595 | "description": "变量值",
596 | "example": "变量值"
597 | },
598 | "timestamp": {
599 | "type": "string",
600 | "description": "时间戳",
601 | "example": "Thu Jan 27 2022 11:22:51 GMT+0800 (中国标准时间)"
602 | },
603 | "status": {
604 | "type": "integer"
605 | },
606 | "position": {
607 | "type": "integer"
608 | },
609 | "name": {
610 | "type": "string",
611 | "description": "变量名",
612 | "example": "变量名"
613 | },
614 | "remarks": {
615 | "type": "string",
616 | "description": "备注",
617 | "example": "备注"
618 | },
619 | "createdAt": {
620 | "type": "string",
621 | "example": "2022-02-01T03:00:53.572Z"
622 | },
623 | "updatedAt": {
624 | "type": "string",
625 | "example": "2022-02-10T03:30:08.079Z"
626 | }
627 | }
628 | }
629 | }
630 | }
631 | }
632 | }
633 | },
634 | "401": {
635 | "description": "未授权",
636 | "content": {
637 | "application/json": {
638 | "schema": {
639 | "properties": {
640 | "code": {
641 | "type": "integer",
642 | "example": 401
643 | },
644 | "message": {
645 | "type": "string",
646 | "example": "UnauthorizedError"
647 | }
648 | }
649 | }
650 | }
651 | }
652 | }
653 | }
654 | }
655 | },
656 | "/envs/{id}/move": {
657 | "get": {
658 | "tags": [
659 | "环境变量"
660 | ],
661 | "summary": "move",
662 | "description": "使用 Token move",
663 | "security": [
664 | {
665 | "HTTPBearer": []
666 | }
667 | ],
668 | "parameters": [
669 | {
670 | "name": "id",
671 | "in": "path",
672 | "description": "变量 ID",
673 | "required": true,
674 | "schema": {
675 | "type": "integer"
676 | }
677 | }
678 | ],
679 | "requestBody": {
680 | "description": "变量 ID 可多个ID",
681 | "required": true,
682 | "content": {
683 | "application/json": {
684 | "schema": {
685 | "properties": {
686 | "fromIndex": {
687 | "type": "integer"
688 | },
689 | "toIndex": {
690 | "type": "integer"
691 | }
692 | }
693 | }
694 | }
695 | }
696 | },
697 | "responses": {
698 | "200": {
699 | "description": "返回该变量 ID 的环境变量详情",
700 | "content": {
701 | "application/json": {
702 | "schema": {
703 | "properties": {
704 | "code": {
705 | "type": "integer",
706 | "example": 200
707 | },
708 | "data": {
709 | "properties": {
710 | "id": {
711 | "type": "integer",
712 | "description": "变量 ID"
713 | },
714 | "value": {
715 | "type": "string",
716 | "description": "变量值",
717 | "example": "变量值"
718 | },
719 | "timestamp": {
720 | "type": "string",
721 | "description": "时间戳",
722 | "example": "Thu Jan 27 2022 11:22:51 GMT+0800 (中国标准时间)"
723 | },
724 | "status": {
725 | "type": "integer"
726 | },
727 | "position": {
728 | "type": "integer"
729 | },
730 | "name": {
731 | "type": "string",
732 | "description": "变量名",
733 | "example": "变量名"
734 | },
735 | "remarks": {
736 | "type": "string",
737 | "description": "备注",
738 | "example": "备注"
739 | },
740 | "createdAt": {
741 | "type": "string",
742 | "example": "2022-02-01T03:00:53.572Z"
743 | },
744 | "updatedAt": {
745 | "type": "string",
746 | "example": "2022-02-10T03:30:08.079Z"
747 | }
748 | }
749 | }
750 | }
751 | }
752 | }
753 | }
754 | },
755 | "401": {
756 | "description": "未授权",
757 | "content": {
758 | "application/json": {
759 | "schema": {
760 | "properties": {
761 | "code": {
762 | "type": "integer",
763 | "example": 401
764 | },
765 | "message": {
766 | "type": "string",
767 | "example": "UnauthorizedError"
768 | }
769 | }
770 | }
771 | }
772 | }
773 | }
774 | }
775 | }
776 | },
777 | "/envs/disable": {
778 | "put": {
779 | "tags": [
780 | "环境变量"
781 | ],
782 | "summary": "禁用环境变量",
783 | "description": "使用 Token 禁用环境变量",
784 | "security": [
785 | {
786 | "HTTPBearer": []
787 | }
788 | ],
789 | "requestBody": {
790 | "description": "变量 ID 可多个ID",
791 | "required": true,
792 | "content": {
793 | "application/json": {
794 | "schema": {
795 | "type": "array",
796 | "description": "变量 ID",
797 | "items": {
798 | "type": "integer"
799 | }
800 | }
801 | }
802 | }
803 | },
804 | "responses": {
805 | "200": {
806 | "description": "成功",
807 | "content": {
808 | "application/json": {
809 | "schema": {
810 | "properties": {
811 | "code": {
812 | "type": "integer",
813 | "example": 200
814 | }
815 | }
816 | }
817 | }
818 | }
819 | },
820 | "401": {
821 | "description": "未授权",
822 | "content": {
823 | "application/json": {
824 | "schema": {
825 | "properties": {
826 | "code": {
827 | "type": "integer",
828 | "example": 401
829 | },
830 | "message": {
831 | "type": "string",
832 | "example": "UnauthorizedError"
833 | }
834 | }
835 | }
836 | }
837 | }
838 | }
839 | }
840 | }
841 | },
842 | "/envs/enable": {
843 | "put": {
844 | "tags": [
845 | "环境变量"
846 | ],
847 | "summary": "启用环境变量",
848 | "description": "使用 Token 启用环境变量",
849 | "security": [
850 | {
851 | "HTTPBearer": []
852 | }
853 | ],
854 | "requestBody": {
855 | "description": "变量 ID 可多个ID",
856 | "required": true,
857 | "content": {
858 | "application/json": {
859 | "schema": {
860 | "type": "array",
861 | "description": "变量 ID",
862 | "items": {
863 | "type": "integer"
864 | }
865 | }
866 | }
867 | }
868 | },
869 | "responses": {
870 | "200": {
871 | "description": "成功",
872 | "content": {
873 | "application/json": {
874 | "schema": {
875 | "properties": {
876 | "code": {
877 | "type": "integer",
878 | "example": 200
879 | }
880 | }
881 | }
882 | }
883 | }
884 | },
885 | "401": {
886 | "description": "未授权",
887 | "content": {
888 | "application/json": {
889 | "schema": {
890 | "properties": {
891 | "code": {
892 | "type": "integer",
893 | "example": 401
894 | },
895 | "message": {
896 | "type": "string",
897 | "example": "UnauthorizedError"
898 | }
899 | }
900 | }
901 | }
902 | }
903 | }
904 | }
905 | }
906 | },
907 | "/envs/name": {
908 | "put": {
909 | "tags": [
910 | "环境变量"
911 | ],
912 | "summary": "修改环境变量名",
913 | "description": "使用 Token 修改环境变量名",
914 | "security": [
915 | {
916 | "HTTPBearer": []
917 | }
918 | ],
919 | "requestBody": {
920 | "description": "变量 ID 可多个ID",
921 | "required": true,
922 | "content": {
923 | "application/json": {
924 | "schema": {
925 | "properties": {
926 | "ids": {
927 | "type": "integer",
928 | "description": "变量 ID"
929 | },
930 | "name": {
931 | "type": "string",
932 | "description": "变量名",
933 | "example": "变量名"
934 | }
935 | }
936 | }
937 | }
938 | }
939 | },
940 | "responses": {
941 | "200": {
942 | "description": "成功",
943 | "content": {
944 | "application/json": {
945 | "schema": {
946 | "properties": {
947 | "code": {
948 | "type": "integer",
949 | "example": 200
950 | }
951 | }
952 | }
953 | }
954 | }
955 | },
956 | "401": {
957 | "description": "未授权",
958 | "content": {
959 | "application/json": {
960 | "schema": {
961 | "properties": {
962 | "code": {
963 | "type": "integer",
964 | "example": 401
965 | },
966 | "message": {
967 | "type": "string",
968 | "example": "UnauthorizedError"
969 | }
970 | }
971 | }
972 | }
973 | }
974 | }
975 | }
976 | }
977 | },
978 | "/configs/files": {
979 | "get": {
980 | "tags": [
981 | "配置管理"
982 | ],
983 | "summary": "获取配置文件列表",
984 | "description": "使用 Token 获取配置文件列表",
985 | "security": [
986 | {
987 | "HTTPBearer": []
988 | }
989 | ],
990 | "responses": {
991 | "200": {
992 | "description": "成功",
993 | "content": {
994 | "application/json": {
995 | "schema": {
996 | "properties": {
997 | "code": {
998 | "type": "integer",
999 | "example": 200
1000 | },
1001 | "data": {
1002 | "type": "array",
1003 | "items": {
1004 | "type": "object",
1005 | "properties": {
1006 | "title": {
1007 | "type": "string",
1008 | "description": "配置文件名"
1009 | },
1010 | "value": {
1011 | "type": "string",
1012 | "description": "配置文件值"
1013 | }
1014 | }
1015 | }
1016 | }
1017 | }
1018 | }
1019 | }
1020 | }
1021 | },
1022 | "401": {
1023 | "description": "未授权",
1024 | "content": {
1025 | "application/json": {
1026 | "schema": {
1027 | "properties": {
1028 | "code": {
1029 | "type": "integer",
1030 | "example": 401
1031 | },
1032 | "message": {
1033 | "type": "string",
1034 | "example": "UnauthorizedError"
1035 | }
1036 | }
1037 | }
1038 | }
1039 | }
1040 | }
1041 | }
1042 | }
1043 | },
1044 | "/configs/{file}": {
1045 | "get": {
1046 | "tags": [
1047 | "配置管理"
1048 | ],
1049 | "summary": "获取配置文件内容",
1050 | "description": "使用 Token 获取配置文件内容",
1051 | "security": [
1052 | {
1053 | "HTTPBearer": []
1054 | }
1055 | ],
1056 | "parameters": [
1057 | {
1058 | "name": "file",
1059 | "in": "path",
1060 | "description": "配置文件名",
1061 | "required": true,
1062 | "schema": {
1063 | "type": "string"
1064 | }
1065 | }
1066 | ],
1067 | "responses": {
1068 | "200": {
1069 | "description": "成功",
1070 | "content": {
1071 | "application/json": {
1072 | "schema": {
1073 | "properties": {
1074 | "code": {
1075 | "type": "integer",
1076 | "example": 200
1077 | },
1078 | "data": {
1079 | "type": "string",
1080 | "description": "配置文件内容",
1081 | "example": "配置文件内容"
1082 | }
1083 | }
1084 | }
1085 | }
1086 | }
1087 | },
1088 | "401": {
1089 | "description": "未授权",
1090 | "content": {
1091 | "application/json": {
1092 | "schema": {
1093 | "properties": {
1094 | "code": {
1095 | "type": "integer",
1096 | "example": 401
1097 | },
1098 | "message": {
1099 | "type": "string",
1100 | "example": "UnauthorizedError"
1101 | }
1102 | }
1103 | }
1104 | }
1105 | }
1106 | }
1107 | }
1108 | }
1109 | },
1110 | "/configs/save": {
1111 | "post": {
1112 | "tags": [
1113 | "配置管理"
1114 | ],
1115 | "summary": "保存配置文件",
1116 | "description": "使用 Token 获取配置文件列表",
1117 | "security": [
1118 | {
1119 | "HTTPBearer": []
1120 | }
1121 | ],
1122 | "requestBody": {
1123 | "description": "保存配置文件",
1124 | "required": true,
1125 | "content": {
1126 | "application/json": {
1127 | "schema": {
1128 | "properties": {
1129 | "name": {
1130 | "type": "string",
1131 | "description": "配置文件名"
1132 | },
1133 | "content": {
1134 | "type": "string",
1135 | "description": "内容"
1136 | }
1137 | }
1138 | }
1139 | }
1140 | }
1141 | },
1142 | "responses": {
1143 | "200": {
1144 | "description": "成功",
1145 | "content": {
1146 | "application/json": {
1147 | "schema": {
1148 | "properties": {
1149 | "code": {
1150 | "type": "integer",
1151 | "example": 200
1152 | },
1153 | "message": {
1154 | "type": "string",
1155 | "example": "保存成功"
1156 | }
1157 | }
1158 | }
1159 | }
1160 | }
1161 | },
1162 | "401": {
1163 | "description": "未授权",
1164 | "content": {
1165 | "application/json": {
1166 | "schema": {
1167 | "properties": {
1168 | "code": {
1169 | "type": "integer",
1170 | "example": 401
1171 | },
1172 | "message": {
1173 | "type": "string",
1174 | "example": "UnauthorizedError"
1175 | }
1176 | }
1177 | }
1178 | }
1179 | }
1180 | },
1181 | "403": {
1182 | "description": "失败",
1183 | "content": {
1184 | "application/json": {
1185 | "schema": {
1186 | "properties": {
1187 | "code": {
1188 | "type": "integer",
1189 | "example": 401
1190 | },
1191 | "message": {
1192 | "type": "string",
1193 | "example": "文件无法访问"
1194 | }
1195 | }
1196 | }
1197 | }
1198 | }
1199 | }
1200 | }
1201 | }
1202 | },
1203 | "/logs": {
1204 | "get": {
1205 | "tags": [
1206 | "任务日志"
1207 | ],
1208 | "summary": "获取所有任务日志列表",
1209 | "description": "使用 Token 获取所有任务日志列表",
1210 | "security": [
1211 | {
1212 | "HTTPBearer": []
1213 | }
1214 | ],
1215 | "responses": {
1216 | "200": {
1217 | "description": "成功",
1218 | "content": {
1219 | "application/json": {
1220 | "schema": {
1221 | "properties": {
1222 | "code": {
1223 | "type": "integer",
1224 | "example": 200
1225 | },
1226 | "isDir": {
1227 | "type": "boolean"
1228 | },
1229 | "files": {
1230 | "type": "array",
1231 | "items": {
1232 | "type": "string",
1233 | "properties": {
1234 | "items": {
1235 | "type": "string"
1236 | }
1237 | }
1238 | }
1239 | }
1240 | }
1241 | }
1242 | }
1243 | }
1244 | },
1245 | "401": {
1246 | "description": "未授权",
1247 | "content": {
1248 | "application/json": {
1249 | "schema": {
1250 | "properties": {
1251 | "code": {
1252 | "type": "integer",
1253 | "example": 401
1254 | },
1255 | "message": {
1256 | "type": "string",
1257 | "example": "UnauthorizedError"
1258 | }
1259 | }
1260 | }
1261 | }
1262 | }
1263 | }
1264 | }
1265 | }
1266 | },
1267 | "/logs/{dir}/{file}": {
1268 | "get": {
1269 | "tags": [
1270 | "任务日志"
1271 | ],
1272 | "summary": "获取任务日志",
1273 | "description": "使用 Token 获取任务日志",
1274 | "security": [
1275 | {
1276 | "HTTPBearer": []
1277 | }
1278 | ],
1279 | "parameters": [
1280 | {
1281 | "name": "dir",
1282 | "in": "path",
1283 | "description": "日志目录",
1284 | "required": true,
1285 | "schema": {
1286 | "type": "string"
1287 | }
1288 | },
1289 | {
1290 | "name": "file",
1291 | "in": "path",
1292 | "description": "日志文件名",
1293 | "required": true,
1294 | "schema": {
1295 | "type": "string"
1296 | }
1297 | }
1298 | ],
1299 | "responses": {
1300 | "200": {
1301 | "description": "成功",
1302 | "content": {
1303 | "application/json": {
1304 | "schema": {
1305 | "properties": {
1306 | "code": {
1307 | "type": "integer",
1308 | "example": 200
1309 | },
1310 | "data": {
1311 | "type": "string",
1312 | "example": "日志文件内容"
1313 | }
1314 | }
1315 | }
1316 | }
1317 | }
1318 | },
1319 | "401": {
1320 | "description": "未授权",
1321 | "content": {
1322 | "application/json": {
1323 | "schema": {
1324 | "properties": {
1325 | "code": {
1326 | "type": "integer",
1327 | "example": 401
1328 | },
1329 | "message": {
1330 | "type": "string",
1331 | "example": "UnauthorizedError"
1332 | }
1333 | }
1334 | }
1335 | }
1336 | }
1337 | }
1338 | }
1339 | }
1340 | },
1341 | "/logs/{file}": {
1342 | "get": {
1343 | "tags": [
1344 | "任务日志"
1345 | ],
1346 | "summary": "获取任务日志",
1347 | "description": "使用 Token 获取任务日志",
1348 | "security": [
1349 | {
1350 | "HTTPBearer": []
1351 | }
1352 | ],
1353 | "parameters": [
1354 | {
1355 | "name": "file",
1356 | "in": "path",
1357 | "description": "日志文件名",
1358 | "required": true,
1359 | "schema": {
1360 | "type": "string"
1361 | }
1362 | }
1363 | ],
1364 | "responses": {
1365 | "200": {
1366 | "description": "成功",
1367 | "content": {
1368 | "application/json": {
1369 | "schema": {
1370 | "properties": {
1371 | "code": {
1372 | "type": "integer",
1373 | "example": 200
1374 | },
1375 | "data": {
1376 | "type": "string",
1377 | "example": "日志文件内容"
1378 | }
1379 | }
1380 | }
1381 | }
1382 | }
1383 | },
1384 | "401": {
1385 | "description": "未授权",
1386 | "content": {
1387 | "application/json": {
1388 | "schema": {
1389 | "properties": {
1390 | "code": {
1391 | "type": "integer",
1392 | "example": 401
1393 | },
1394 | "message": {
1395 | "type": "string",
1396 | "example": "UnauthorizedError"
1397 | }
1398 | }
1399 | }
1400 | }
1401 | }
1402 | }
1403 | }
1404 | }
1405 | },
1406 | "/crons": {
1407 | "get": {
1408 | "tags": [
1409 | "定时任务"
1410 | ],
1411 | "summary": "获取所有任务详情",
1412 | "description": "使用 Token 返回定时任务详情",
1413 | "security": [
1414 | {
1415 | "HTTPBearer": []
1416 | }
1417 | ],
1418 | "responses": {
1419 | "200": {
1420 | "description": "返回定时任务详情",
1421 | "content": {
1422 | "application/json": {
1423 | "schema": {
1424 | "properties": {
1425 | "code": {
1426 | "type": "integer",
1427 | "example": 200
1428 | },
1429 | "data": {
1430 | "type": "array",
1431 | "items": {
1432 | "type": "object",
1433 | "properties": {
1434 | "id": {
1435 | "type": "integer",
1436 | "description": "任务 ID"
1437 | },
1438 | "name": {
1439 | "type": "string",
1440 | "description": "任务名称",
1441 | "example": "任务名"
1442 | },
1443 | "command": {
1444 | "type": "string",
1445 | "description": "任务命令",
1446 | "example": "task helloworld.py"
1447 | },
1448 | "schedule": {
1449 | "type": "string",
1450 | "description": "任务定时",
1451 | "example": "0 0 * * *"
1452 | },
1453 | "timestamp": {
1454 | "type": "string",
1455 | "description": "时间戳",
1456 | "example": "Wed Feb 09 2022 13:08:45 GMT+0800 (中国标准时间)"
1457 | },
1458 | "saved": {
1459 | "type": "boolean"
1460 | },
1461 | "status": {
1462 | "type": "integer",
1463 | "example": 1
1464 | },
1465 | "isSystem": {
1466 | "type": "integer"
1467 | },
1468 | "pid": {
1469 | "type": "integer",
1470 | "example": null
1471 | },
1472 | "isDisabled": {
1473 | "type": "integer"
1474 | },
1475 | "isPinned": {
1476 | "type": "integer"
1477 | },
1478 | "log_path": {
1479 | "type": "string"
1480 | },
1481 | "labels": {
1482 | "type": "array",
1483 | "description": "任务标签",
1484 | "items": {
1485 | "type": "string",
1486 | "example": "标签"
1487 | }
1488 | },
1489 | "last_running_time": {
1490 | "type": "integer"
1491 | },
1492 | "last_execution_time": {
1493 | "type": "integer"
1494 | },
1495 | "createdAt": {
1496 | "type": "string",
1497 | "example": "2022-02-09T05:08:45.450Z"
1498 | },
1499 | "updatedAt": {
1500 | "type": "string",
1501 | "example": "2022-02-09T05:50:03.062Z"
1502 | }
1503 | }
1504 | }
1505 | }
1506 | }
1507 | }
1508 | }
1509 | }
1510 | },
1511 | "401": {
1512 | "description": "未授权",
1513 | "content": {
1514 | "application/json": {
1515 | "schema": {
1516 | "properties": {
1517 | "code": {
1518 | "type": "integer",
1519 | "example": 401
1520 | },
1521 | "message": {
1522 | "type": "string",
1523 | "example": "UnauthorizedError"
1524 | }
1525 | }
1526 | }
1527 | }
1528 | }
1529 | }
1530 | }
1531 | },
1532 | "post": {
1533 | "tags": [
1534 | "定时任务"
1535 | ],
1536 | "summary": "添加任务",
1537 | "description": "使用 Token 添加任务",
1538 | "security": [
1539 | {
1540 | "HTTPBearer": []
1541 | }
1542 | ],
1543 | "requestBody": {
1544 | "required": true,
1545 | "content": {
1546 | "application/json": {
1547 | "schema": {
1548 | "properties": {
1549 | "command": {
1550 | "type": "string",
1551 | "description": "任务命令",
1552 | "example": "task helloworld.py"
1553 | },
1554 | "schedule": {
1555 | "type": "string",
1556 | "description": "任务定时",
1557 | "example": "0 0 * * *"
1558 | },
1559 | "name": {
1560 | "type": "string",
1561 | "description": "任务名",
1562 | "example": "任务名"
1563 | },
1564 | "labels": {
1565 | "type": "string",
1566 | "description": "标签",
1567 | "example": "标签"
1568 | }
1569 | }
1570 | }
1571 | }
1572 | }
1573 | },
1574 | "responses": {
1575 | "200": {
1576 | "description": "成功",
1577 | "content": {
1578 | "application/json": {
1579 | "schema": {
1580 | "properties": {
1581 | "code": {
1582 | "type": "integer",
1583 | "example": 200
1584 | }
1585 | }
1586 | }
1587 | }
1588 | }
1589 | },
1590 | "401": {
1591 | "description": "未授权",
1592 | "content": {
1593 | "application/json": {
1594 | "schema": {
1595 | "properties": {
1596 | "code": {
1597 | "type": "integer",
1598 | "example": 401
1599 | },
1600 | "message": {
1601 | "type": "string",
1602 | "example": "UnauthorizedError"
1603 | }
1604 | }
1605 | }
1606 | }
1607 | }
1608 | }
1609 | }
1610 | },
1611 | "put": {
1612 | "tags": [
1613 | "定时任务"
1614 | ],
1615 | "summary": "更新任务",
1616 | "description": "使用 Token 更新任务",
1617 | "security": [
1618 | {
1619 | "HTTPBearer": []
1620 | }
1621 | ],
1622 | "requestBody": {
1623 | "required": true,
1624 | "content": {
1625 | "application/json": {
1626 | "schema": {
1627 | "properties": {
1628 | "labels": {
1629 | "type": "string",
1630 | "description": "标签",
1631 | "example": "标签"
1632 | },
1633 | "command": {
1634 | "type": "string",
1635 | "description": "任务命令",
1636 | "example": "task helloworld.py"
1637 | },
1638 | "schedule": {
1639 | "type": "string",
1640 | "description": "任务定时",
1641 | "example": "0 0 * * *"
1642 | },
1643 | "name": {
1644 | "type": "string",
1645 | "description": "任务名",
1646 | "example": "任务名"
1647 | },
1648 | "id": {
1649 | "type": "integer",
1650 | "description": "任务 ID"
1651 | }
1652 | }
1653 | }
1654 | }
1655 | }
1656 | },
1657 | "responses": {
1658 | "200": {
1659 | "description": "成功",
1660 | "content": {
1661 | "application/json": {
1662 | "schema": {
1663 | "properties": {
1664 | "code": {
1665 | "type": "integer",
1666 | "example": 200
1667 | }
1668 | }
1669 | }
1670 | }
1671 | }
1672 | },
1673 | "401": {
1674 | "description": "未授权",
1675 | "content": {
1676 | "application/json": {
1677 | "schema": {
1678 | "properties": {
1679 | "code": {
1680 | "type": "integer",
1681 | "example": 401
1682 | },
1683 | "message": {
1684 | "type": "string",
1685 | "example": "UnauthorizedError"
1686 | }
1687 | }
1688 | }
1689 | }
1690 | }
1691 | }
1692 | }
1693 | },
1694 | "delete": {
1695 | "tags": [
1696 | "定时任务"
1697 | ],
1698 | "summary": "删除任务",
1699 | "description": "使用 Token 删除任务",
1700 | "security": [
1701 | {
1702 | "HTTPBearer": []
1703 | }
1704 | ],
1705 | "requestBody": {
1706 | "description": "任务 ID 可多个ID",
1707 | "required": true,
1708 | "content": {
1709 | "application/json": {
1710 | "schema": {
1711 | "type": "array",
1712 | "description": "任务 ID",
1713 | "items": {
1714 | "type": "integer"
1715 | }
1716 | }
1717 | }
1718 | }
1719 | },
1720 | "responses": {
1721 | "200": {
1722 | "description": "成功",
1723 | "content": {
1724 | "application/json": {
1725 | "schema": {
1726 | "properties": {
1727 | "code": {
1728 | "type": "integer",
1729 | "example": 200
1730 | }
1731 | }
1732 | }
1733 | }
1734 | }
1735 | },
1736 | "401": {
1737 | "description": "未授权",
1738 | "content": {
1739 | "application/json": {
1740 | "schema": {
1741 | "properties": {
1742 | "code": {
1743 | "type": "integer",
1744 | "example": 401
1745 | },
1746 | "message": {
1747 | "type": "string",
1748 | "example": "UnauthorizedError"
1749 | }
1750 | }
1751 | }
1752 | }
1753 | }
1754 | }
1755 | }
1756 | }
1757 | },
1758 | "/crons/{id}": {
1759 | "get": {
1760 | "tags": [
1761 | "定时任务"
1762 | ],
1763 | "summary": "根据 ID 获取任务日志",
1764 | "description": "使用 Token 获取定时任务详情",
1765 | "security": [
1766 | {
1767 | "HTTPBearer": []
1768 | }
1769 | ],
1770 | "parameters": [
1771 | {
1772 | "name": "id",
1773 | "in": "path",
1774 | "description": "任务 ID",
1775 | "required": true,
1776 | "schema": {
1777 | "type": "integer"
1778 | }
1779 | }
1780 | ],
1781 | "responses": {
1782 | "200": {
1783 | "description": "返回该变量 ID 的定时任务详情",
1784 | "content": {
1785 | "application/json": {
1786 | "schema": {
1787 | "properties": {
1788 | "code": {
1789 | "type": "integer",
1790 | "example": 200
1791 | },
1792 | "data": {
1793 | "properties": {
1794 | "id": {
1795 | "type": "integer",
1796 | "description": "任务 ID"
1797 | },
1798 | "name": {
1799 | "type": "string",
1800 | "description": "任务名称",
1801 | "example": "任务名"
1802 | },
1803 | "command": {
1804 | "type": "string",
1805 | "description": "任务命令",
1806 | "example": "task helloworld.py"
1807 | },
1808 | "schedule": {
1809 | "type": "string",
1810 | "description": "任务定时",
1811 | "example": "0 0 * * *"
1812 | },
1813 | "timestamp": {
1814 | "type": "string",
1815 | "description": "时间戳",
1816 | "example": "Wed Feb 09 2022 13:08:45 GMT+0800 (中国标准时间)"
1817 | },
1818 | "saved": {
1819 | "type": "boolean"
1820 | },
1821 | "status": {
1822 | "type": "integer",
1823 | "example": 1
1824 | },
1825 | "isSystem": {
1826 | "type": "integer"
1827 | },
1828 | "pid": {
1829 | "type": "integer",
1830 | "example": null
1831 | },
1832 | "isDisabled": {
1833 | "type": "integer"
1834 | },
1835 | "isPinned": {
1836 | "type": "integer"
1837 | },
1838 | "log_path": {
1839 | "type": "string"
1840 | },
1841 | "labels": {
1842 | "type": "array",
1843 | "description": "任务标签",
1844 | "items": {
1845 | "type": "string",
1846 | "example": "标签"
1847 | }
1848 | },
1849 | "last_running_time": {
1850 | "type": "integer"
1851 | },
1852 | "last_execution_time": {
1853 | "type": "integer"
1854 | },
1855 | "createdAt": {
1856 | "type": "string",
1857 | "example": "2022-02-09T05:08:45.450Z"
1858 | },
1859 | "updatedAt": {
1860 | "type": "string",
1861 | "example": "2022-02-09T05:50:03.062Z"
1862 | }
1863 | }
1864 | }
1865 | }
1866 | }
1867 | }
1868 | }
1869 | },
1870 | "401": {
1871 | "description": "未授权",
1872 | "content": {
1873 | "application/json": {
1874 | "schema": {
1875 | "properties": {
1876 | "code": {
1877 | "type": "integer",
1878 | "example": 401
1879 | },
1880 | "message": {
1881 | "type": "string",
1882 | "example": "UnauthorizedError"
1883 | }
1884 | }
1885 | }
1886 | }
1887 | }
1888 | }
1889 | }
1890 | }
1891 | },
1892 | "/crons/run": {
1893 | "put": {
1894 | "tags": [
1895 | "定时任务"
1896 | ],
1897 | "summary": "运行任务",
1898 | "description": "使用 Token 运行任务",
1899 | "security": [
1900 | {
1901 | "HTTPBearer": []
1902 | }
1903 | ],
1904 | "requestBody": {
1905 | "description": "任务 ID 可多个ID",
1906 | "required": true,
1907 | "content": {
1908 | "application/json": {
1909 | "schema": {
1910 | "type": "array",
1911 | "description": "任务 ID",
1912 | "items": {
1913 | "type": "integer"
1914 | }
1915 | }
1916 | }
1917 | }
1918 | },
1919 | "responses": {
1920 | "200": {
1921 | "description": "成功",
1922 | "content": {
1923 | "application/json": {
1924 | "schema": {
1925 | "properties": {
1926 | "code": {
1927 | "type": "integer",
1928 | "example": 200
1929 | }
1930 | }
1931 | }
1932 | }
1933 | }
1934 | },
1935 | "401": {
1936 | "description": "未授权",
1937 | "content": {
1938 | "application/json": {
1939 | "schema": {
1940 | "properties": {
1941 | "code": {
1942 | "type": "integer",
1943 | "example": 401
1944 | },
1945 | "message": {
1946 | "type": "string",
1947 | "example": "UnauthorizedError"
1948 | }
1949 | }
1950 | }
1951 | }
1952 | }
1953 | }
1954 | }
1955 | }
1956 | },
1957 | "/crons/stop": {
1958 | "put": {
1959 | "tags": [
1960 | "定时任务"
1961 | ],
1962 | "summary": "停止任务",
1963 | "description": "使用 Token 停止任务",
1964 | "security": [
1965 | {
1966 | "HTTPBearer": []
1967 | }
1968 | ],
1969 | "requestBody": {
1970 | "description": "任务 ID 可多个ID",
1971 | "required": true,
1972 | "content": {
1973 | "application/json": {
1974 | "schema": {
1975 | "type": "array",
1976 | "description": "任务 ID",
1977 | "items": {
1978 | "type": "integer"
1979 | }
1980 | }
1981 | }
1982 | }
1983 | },
1984 | "responses": {
1985 | "200": {
1986 | "description": "成功",
1987 | "content": {
1988 | "application/json": {
1989 | "schema": {
1990 | "properties": {
1991 | "code": {
1992 | "type": "integer",
1993 | "example": 200
1994 | }
1995 | }
1996 | }
1997 | }
1998 | }
1999 | },
2000 | "401": {
2001 | "description": "未授权",
2002 | "content": {
2003 | "application/json": {
2004 | "schema": {
2005 | "properties": {
2006 | "code": {
2007 | "type": "integer",
2008 | "example": 401
2009 | },
2010 | "message": {
2011 | "type": "string",
2012 | "example": "UnauthorizedError"
2013 | }
2014 | }
2015 | }
2016 | }
2017 | }
2018 | }
2019 | }
2020 | }
2021 | },
2022 | "/crons/labels": {
2023 | "post": {
2024 | "tags": [
2025 | "定时任务"
2026 | ],
2027 | "summary": "添加标签",
2028 | "description": "使用 Token 添加标签",
2029 | "security": [
2030 | {
2031 | "HTTPBearer": []
2032 | }
2033 | ],
2034 | "requestBody": {
2035 | "description": "任务 ID 可多个ID",
2036 | "required": true,
2037 | "content": {
2038 | "application/json": {
2039 | "schema": {
2040 | "properties": {
2041 | "ids": {
2042 | "type": "integer",
2043 | "description": "任务 ID 可多个ID"
2044 | },
2045 | "labels": {
2046 | "type": "string",
2047 | "description": "标签",
2048 | "example": "标签"
2049 | }
2050 | }
2051 | }
2052 | }
2053 | }
2054 | },
2055 | "responses": {
2056 | "200": {
2057 | "description": "成功",
2058 | "content": {
2059 | "application/json": {
2060 | "schema": {
2061 | "properties": {
2062 | "code": {
2063 | "type": "integer",
2064 | "example": 200
2065 | }
2066 | }
2067 | }
2068 | }
2069 | }
2070 | },
2071 | "401": {
2072 | "description": "未授权",
2073 | "content": {
2074 | "application/json": {
2075 | "schema": {
2076 | "properties": {
2077 | "code": {
2078 | "type": "integer",
2079 | "example": 401
2080 | },
2081 | "message": {
2082 | "type": "string",
2083 | "example": "UnauthorizedError"
2084 | }
2085 | }
2086 | }
2087 | }
2088 | }
2089 | }
2090 | }
2091 | },
2092 | "delete": {
2093 | "tags": [
2094 | "定时任务"
2095 | ],
2096 | "summary": "删除标签",
2097 | "description": "使用 Token 删除标签",
2098 | "security": [
2099 | {
2100 | "HTTPBearer": []
2101 | }
2102 | ],
2103 | "requestBody": {
2104 | "description": "任务 ID 可多个ID",
2105 | "required": true,
2106 | "content": {
2107 | "application/json": {
2108 | "schema": {
2109 | "properties": {
2110 | "ids": {
2111 | "type": "integer",
2112 | "description": "任务 ID 可多个ID"
2113 | },
2114 | "labels": {
2115 | "type": "string",
2116 | "description": "标签",
2117 | "example": "标签"
2118 | }
2119 | }
2120 | }
2121 | }
2122 | }
2123 | },
2124 | "responses": {
2125 | "200": {
2126 | "description": "成功",
2127 | "content": {
2128 | "application/json": {
2129 | "schema": {
2130 | "properties": {
2131 | "code": {
2132 | "type": "integer",
2133 | "example": 200
2134 | }
2135 | }
2136 | }
2137 | }
2138 | }
2139 | },
2140 | "401": {
2141 | "description": "未授权",
2142 | "content": {
2143 | "application/json": {
2144 | "schema": {
2145 | "properties": {
2146 | "code": {
2147 | "type": "integer",
2148 | "example": 401
2149 | },
2150 | "message": {
2151 | "type": "string",
2152 | "example": "UnauthorizedError"
2153 | }
2154 | }
2155 | }
2156 | }
2157 | }
2158 | }
2159 | }
2160 | }
2161 | },
2162 | "/crons/disable": {
2163 | "put": {
2164 | "tags": [
2165 | "定时任务"
2166 | ],
2167 | "summary": "禁用任务",
2168 | "description": "使用 Token 禁用任务",
2169 | "security": [
2170 | {
2171 | "HTTPBearer": []
2172 | }
2173 | ],
2174 | "requestBody": {
2175 | "description": "任务 ID 可多个ID",
2176 | "required": true,
2177 | "content": {
2178 | "application/json": {
2179 | "schema": {
2180 | "type": "array",
2181 | "description": "任务 ID",
2182 | "items": {
2183 | "type": "integer"
2184 | }
2185 | }
2186 | }
2187 | }
2188 | },
2189 | "responses": {
2190 | "200": {
2191 | "description": "成功",
2192 | "content": {
2193 | "application/json": {
2194 | "schema": {
2195 | "properties": {
2196 | "code": {
2197 | "type": "integer",
2198 | "example": 200
2199 | }
2200 | }
2201 | }
2202 | }
2203 | }
2204 | },
2205 | "401": {
2206 | "description": "未授权",
2207 | "content": {
2208 | "application/json": {
2209 | "schema": {
2210 | "properties": {
2211 | "code": {
2212 | "type": "integer",
2213 | "example": 401
2214 | },
2215 | "message": {
2216 | "type": "string",
2217 | "example": "UnauthorizedError"
2218 | }
2219 | }
2220 | }
2221 | }
2222 | }
2223 | }
2224 | }
2225 | }
2226 | },
2227 | "/crons/enable": {
2228 | "put": {
2229 | "tags": [
2230 | "定时任务"
2231 | ],
2232 | "summary": "启用任务",
2233 | "description": "使用 Token 启用任务",
2234 | "security": [
2235 | {
2236 | "HTTPBearer": []
2237 | }
2238 | ],
2239 | "requestBody": {
2240 | "description": "任务 ID 可多个ID",
2241 | "required": true,
2242 | "content": {
2243 | "application/json": {
2244 | "schema": {
2245 | "type": "array",
2246 | "description": "任务 ID",
2247 | "items": {
2248 | "type": "integer"
2249 | }
2250 | }
2251 | }
2252 | }
2253 | },
2254 | "responses": {
2255 | "200": {
2256 | "description": "成功",
2257 | "content": {
2258 | "application/json": {
2259 | "schema": {
2260 | "properties": {
2261 | "code": {
2262 | "type": "integer",
2263 | "example": 200
2264 | }
2265 | }
2266 | }
2267 | }
2268 | }
2269 | },
2270 | "401": {
2271 | "description": "未授权",
2272 | "content": {
2273 | "application/json": {
2274 | "schema": {
2275 | "properties": {
2276 | "code": {
2277 | "type": "integer",
2278 | "example": 401
2279 | },
2280 | "message": {
2281 | "type": "string",
2282 | "example": "UnauthorizedError"
2283 | }
2284 | }
2285 | }
2286 | }
2287 | }
2288 | }
2289 | }
2290 | }
2291 | },
2292 | "/crons/{id}/log": {
2293 | "get": {
2294 | "tags": [
2295 | "定时任务"
2296 | ],
2297 | "summary": "任务日志",
2298 | "description": "使用 Token 查询任务日志",
2299 | "security": [
2300 | {
2301 | "HTTPBearer": []
2302 | }
2303 | ],
2304 | "parameters": [
2305 | {
2306 | "name": "id",
2307 | "in": "path",
2308 | "description": "任务 ID",
2309 | "required": true,
2310 | "schema": {
2311 | "type": "integer"
2312 | }
2313 | }
2314 | ],
2315 | "responses": {
2316 | "200": {
2317 | "description": "成功",
2318 | "content": {
2319 | "application/json": {
2320 | "schema": {
2321 | "properties": {
2322 | "code": {
2323 | "type": "integer",
2324 | "example": 200
2325 | },
2326 | "data": {
2327 | "type": "string"
2328 | }
2329 | }
2330 | }
2331 | }
2332 | }
2333 | },
2334 | "401": {
2335 | "description": "未授权",
2336 | "content": {
2337 | "application/json": {
2338 | "schema": {
2339 | "properties": {
2340 | "code": {
2341 | "type": "integer",
2342 | "example": 401
2343 | },
2344 | "message": {
2345 | "type": "string",
2346 | "example": "UnauthorizedError"
2347 | }
2348 | }
2349 | }
2350 | }
2351 | }
2352 | }
2353 | }
2354 | }
2355 | },
2356 | "/crons/pin": {
2357 | "put": {
2358 | "tags": [
2359 | "定时任务"
2360 | ],
2361 | "summary": "顶置任务",
2362 | "description": "使用 Token 顶置任务",
2363 | "security": [
2364 | {
2365 | "HTTPBearer": []
2366 | }
2367 | ],
2368 | "requestBody": {
2369 | "description": "任务 ID 可多个ID",
2370 | "required": true,
2371 | "content": {
2372 | "application/json": {
2373 | "schema": {
2374 | "type": "array",
2375 | "description": "任务 ID",
2376 | "items": {
2377 | "type": "integer"
2378 | }
2379 | }
2380 | }
2381 | }
2382 | },
2383 | "responses": {
2384 | "200": {
2385 | "description": "成功",
2386 | "content": {
2387 | "application/json": {
2388 | "schema": {
2389 | "properties": {
2390 | "code": {
2391 | "type": "integer",
2392 | "example": 200
2393 | }
2394 | }
2395 | }
2396 | }
2397 | }
2398 | },
2399 | "401": {
2400 | "description": "未授权",
2401 | "content": {
2402 | "application/json": {
2403 | "schema": {
2404 | "properties": {
2405 | "code": {
2406 | "type": "integer",
2407 | "example": 401
2408 | },
2409 | "message": {
2410 | "type": "string",
2411 | "example": "UnauthorizedError"
2412 | }
2413 | }
2414 | }
2415 | }
2416 | }
2417 | }
2418 | }
2419 | }
2420 | },
2421 | "/crons/unpin": {
2422 | "put": {
2423 | "tags": [
2424 | "定时任务"
2425 | ],
2426 | "summary": "取消顶置任务",
2427 | "description": "使用 Token 取消顶置任务",
2428 | "security": [
2429 | {
2430 | "HTTPBearer": []
2431 | }
2432 | ],
2433 | "requestBody": {
2434 | "description": "任务 ID 可多个ID",
2435 | "required": true,
2436 | "content": {
2437 | "application/json": {
2438 | "schema": {
2439 | "type": "array",
2440 | "description": "任务 ID",
2441 | "items": {
2442 | "type": "integer"
2443 | }
2444 | }
2445 | }
2446 | }
2447 | },
2448 | "responses": {
2449 | "200": {
2450 | "description": "成功",
2451 | "content": {
2452 | "application/json": {
2453 | "schema": {
2454 | "properties": {
2455 | "code": {
2456 | "type": "integer",
2457 | "example": 200
2458 | }
2459 | }
2460 | }
2461 | }
2462 | }
2463 | },
2464 | "401": {
2465 | "description": "未授权",
2466 | "content": {
2467 | "application/json": {
2468 | "schema": {
2469 | "properties": {
2470 | "code": {
2471 | "type": "integer",
2472 | "example": 401
2473 | },
2474 | "message": {
2475 | "type": "string",
2476 | "example": "UnauthorizedError"
2477 | }
2478 | }
2479 | }
2480 | }
2481 | }
2482 | }
2483 | }
2484 | }
2485 | },
2486 | "/crons/import": {
2487 | "get": {
2488 | "tags": [
2489 | "定时任务"
2490 | ],
2491 | "summary": "import",
2492 | "description": "使用 Token import",
2493 | "security": [
2494 | {
2495 | "HTTPBearer": []
2496 | }
2497 | ],
2498 | "responses": {
2499 | "200": {
2500 | "description": "成功",
2501 | "content": {
2502 | "application/json": {
2503 | "schema": {
2504 | "properties": {
2505 | "code": {
2506 | "type": "integer",
2507 | "example": 200
2508 | }
2509 | }
2510 | }
2511 | }
2512 | }
2513 | },
2514 | "401": {
2515 | "description": "未授权",
2516 | "content": {
2517 | "application/json": {
2518 | "schema": {
2519 | "properties": {
2520 | "code": {
2521 | "type": "integer",
2522 | "example": 401
2523 | },
2524 | "message": {
2525 | "type": "string",
2526 | "example": "UnauthorizedError"
2527 | }
2528 | }
2529 | }
2530 | }
2531 | }
2532 | }
2533 | }
2534 | }
2535 | },
2536 | "/crons/status": {
2537 | "put": {
2538 | "tags": [
2539 | "定时任务"
2540 | ],
2541 | "summary": "status",
2542 | "description": "使用 Token status",
2543 | "security": [
2544 | {
2545 | "HTTPBearer": []
2546 | }
2547 | ],
2548 | "requestBody": {
2549 | "required": true,
2550 | "content": {
2551 | "application/json": {
2552 | "schema": {
2553 | "properties": {
2554 | "ids": {
2555 | "type": "integer",
2556 | "description": "任务 ID 可多个ID"
2557 | },
2558 | "status": {
2559 | "type": "string"
2560 | },
2561 | "pid": {
2562 | "type": "string"
2563 | },
2564 | "log_path": {
2565 | "type": "string"
2566 | },
2567 | "last_running_time": {
2568 | "type": "integer"
2569 | },
2570 | "last_execution_time": {
2571 | "type": "integer"
2572 | }
2573 | }
2574 | }
2575 | }
2576 | }
2577 | },
2578 | "responses": {
2579 | "200": {
2580 | "description": "成功",
2581 | "content": {
2582 | "application/json": {
2583 | "schema": {
2584 | "properties": {
2585 | "code": {
2586 | "type": "integer",
2587 | "example": 200
2588 | }
2589 | }
2590 | }
2591 | }
2592 | }
2593 | },
2594 | "401": {
2595 | "description": "未授权",
2596 | "content": {
2597 | "application/json": {
2598 | "schema": {
2599 | "properties": {
2600 | "code": {
2601 | "type": "integer",
2602 | "example": 401
2603 | },
2604 | "message": {
2605 | "type": "string",
2606 | "example": "UnauthorizedError"
2607 | }
2608 | }
2609 | }
2610 | }
2611 | }
2612 | }
2613 | }
2614 | }
2615 | },
2616 | "/scripts/files": {
2617 | "get": {
2618 | "tags": [
2619 | "脚本管理"
2620 | ],
2621 | "summary": "获取所有脚本列表",
2622 | "description": "使用 Token 获取所有脚本列表",
2623 | "security": [
2624 | {
2625 | "HTTPBearer": []
2626 | }
2627 | ],
2628 | "responses": {
2629 | "200": {
2630 | "description": "成功",
2631 | "content": {
2632 | "application/json": {
2633 | "schema": {
2634 | "properties": {
2635 | "code": {
2636 | "type": "integer",
2637 | "example": 200
2638 | },
2639 | "data": {
2640 | "type": "array",
2641 | "items": {
2642 | "type": "object",
2643 | "properties": {
2644 | "title": {
2645 | "type": "string",
2646 | "description": "脚本目录"
2647 | },
2648 | "value": {
2649 | "type": "string"
2650 | },
2651 | "key": {
2652 | "type": "string"
2653 | },
2654 | "mtime": {
2655 | "type": "integer"
2656 | },
2657 | "disabled": {
2658 | "type": "boolean"
2659 | },
2660 | "children": {
2661 | "type": "array",
2662 | "items": {
2663 | "type": "object",
2664 | "properties": {
2665 | "title": {
2666 | "type": "string",
2667 | "description": "脚本名"
2668 | },
2669 | "value": {
2670 | "type": "string"
2671 | },
2672 | "key": {
2673 | "type": "string",
2674 | "description": "路径"
2675 | },
2676 | "mtime": {
2677 | "type": "integer"
2678 | },
2679 | "parent": {
2680 | "type": "string",
2681 | "description": "脚本所处目录"
2682 | }
2683 | }
2684 | }
2685 | }
2686 | }
2687 | }
2688 | }
2689 | }
2690 | }
2691 | }
2692 | }
2693 | },
2694 | "401": {
2695 | "description": "未授权",
2696 | "content": {
2697 | "application/json": {
2698 | "schema": {
2699 | "properties": {
2700 | "code": {
2701 | "type": "integer",
2702 | "example": 401
2703 | },
2704 | "message": {
2705 | "type": "string",
2706 | "example": "UnauthorizedError"
2707 | }
2708 | }
2709 | }
2710 | }
2711 | }
2712 | }
2713 | }
2714 | }
2715 | },
2716 | "/scripts/{file}": {
2717 | "get": {
2718 | "tags": [
2719 | "脚本管理"
2720 | ],
2721 | "summary": "获取脚本内容 【未知错误】",
2722 | "description": "使用 Token 脚本内容",
2723 | "security": [
2724 | {
2725 | "HTTPBearer": []
2726 | }
2727 | ],
2728 | "parameters": [
2729 | {
2730 | "name": "file",
2731 | "in": "path",
2732 | "description": "任务 ID",
2733 | "required": true,
2734 | "schema": {
2735 | "type": "string"
2736 | }
2737 | }
2738 | ],
2739 | "responses": {
2740 | "200": {
2741 | "description": "成功",
2742 | "content": {
2743 | "application/json": {
2744 | "schema": {
2745 | "properties": {
2746 | "code": {
2747 | "type": "integer",
2748 | "example": 200
2749 | },
2750 | "data": {
2751 | "type": "array",
2752 | "items": {
2753 | "type": "object",
2754 | "properties": {
2755 | "title": {
2756 | "type": "string",
2757 | "description": "脚本目录"
2758 | },
2759 | "value": {
2760 | "type": "string"
2761 | },
2762 | "key": {
2763 | "type": "string"
2764 | },
2765 | "mtime": {
2766 | "type": "integer"
2767 | },
2768 | "disabled": {
2769 | "type": "boolean"
2770 | },
2771 | "children": {
2772 | "type": "array",
2773 | "items": {
2774 | "type": "object",
2775 | "properties": {
2776 | "title": {
2777 | "type": "string",
2778 | "description": "脚本名"
2779 | },
2780 | "value": {
2781 | "type": "string"
2782 | },
2783 | "key": {
2784 | "type": "string",
2785 | "description": "路径"
2786 | },
2787 | "mtime": {
2788 | "type": "integer"
2789 | },
2790 | "parent": {
2791 | "type": "string",
2792 | "description": "脚本所处目录"
2793 | }
2794 | }
2795 | }
2796 | }
2797 | }
2798 | }
2799 | }
2800 | }
2801 | }
2802 | }
2803 | }
2804 | },
2805 | "401": {
2806 | "description": "未授权",
2807 | "content": {
2808 | "application/json": {
2809 | "schema": {
2810 | "properties": {
2811 | "code": {
2812 | "type": "integer",
2813 | "example": 401
2814 | },
2815 | "message": {
2816 | "type": "string",
2817 | "example": "UnauthorizedError"
2818 | }
2819 | }
2820 | }
2821 | }
2822 | }
2823 | }
2824 | }
2825 | }
2826 | },
2827 | "/scripts": {
2828 | "post": {
2829 | "tags": [
2830 | "脚本管理"
2831 | ],
2832 | "summary": "添加脚本",
2833 | "description": "使用 Token 添加脚本",
2834 | "security": [
2835 | {
2836 | "HTTPBearer": []
2837 | }
2838 | ],
2839 | "requestBody": {
2840 | "required": true,
2841 | "content": {
2842 | "application/json": {
2843 | "schema": {
2844 | "properties": {
2845 | "filename": {
2846 | "type": "string",
2847 | "description": "文件名"
2848 | },
2849 | "path": {
2850 | "type": "string",
2851 | "description": "路径"
2852 | },
2853 | "content": {
2854 | "type": "string",
2855 | "description": "内容"
2856 | },
2857 | "originFilename": {
2858 | "type": "string"
2859 | }
2860 | }
2861 | }
2862 | }
2863 | }
2864 | },
2865 | "responses": {
2866 | "200": {
2867 | "description": "成功",
2868 | "content": {
2869 | "application/json": {
2870 | "schema": {
2871 | "properties": {
2872 | "code": {
2873 | "type": "integer",
2874 | "example": 200
2875 | }
2876 | }
2877 | }
2878 | }
2879 | }
2880 | },
2881 | "401": {
2882 | "description": "未授权",
2883 | "content": {
2884 | "application/json": {
2885 | "schema": {
2886 | "properties": {
2887 | "code": {
2888 | "type": "integer",
2889 | "example": 401
2890 | },
2891 | "message": {
2892 | "type": "string",
2893 | "example": "UnauthorizedError"
2894 | }
2895 | }
2896 | }
2897 | }
2898 | }
2899 | },
2900 | "430": {
2901 | "description": "失败",
2902 | "content": {
2903 | "application/json": {
2904 | "schema": {
2905 | "properties": {
2906 | "code": {
2907 | "type": "integer",
2908 | "example": 430
2909 | },
2910 | "data": {
2911 | "type": "string",
2912 | "example": "文件路径禁止访问"
2913 | }
2914 | }
2915 | }
2916 | }
2917 | }
2918 | }
2919 | }
2920 | },
2921 | "put": {
2922 | "tags": [
2923 | "脚本管理"
2924 | ],
2925 | "summary": "更新脚本",
2926 | "description": "使用 Token 更新脚本",
2927 | "security": [
2928 | {
2929 | "HTTPBearer": []
2930 | }
2931 | ],
2932 | "requestBody": {
2933 | "required": true,
2934 | "content": {
2935 | "application/json": {
2936 | "schema": {
2937 | "properties": {
2938 | "filename": {
2939 | "type": "string",
2940 | "description": "文件名"
2941 | },
2942 | "path": {
2943 | "type": "string",
2944 | "description": "路径"
2945 | },
2946 | "content": {
2947 | "type": "string",
2948 | "description": "内容"
2949 | }
2950 | }
2951 | }
2952 | }
2953 | }
2954 | },
2955 | "responses": {
2956 | "200": {
2957 | "description": "成功",
2958 | "content": {
2959 | "application/json": {
2960 | "schema": {
2961 | "properties": {
2962 | "code": {
2963 | "type": "integer",
2964 | "example": 200
2965 | }
2966 | }
2967 | }
2968 | }
2969 | }
2970 | },
2971 | "401": {
2972 | "description": "未授权",
2973 | "content": {
2974 | "application/json": {
2975 | "schema": {
2976 | "properties": {
2977 | "code": {
2978 | "type": "integer",
2979 | "example": 401
2980 | },
2981 | "message": {
2982 | "type": "string",
2983 | "example": "UnauthorizedError"
2984 | }
2985 | }
2986 | }
2987 | }
2988 | }
2989 | }
2990 | }
2991 | },
2992 | "delete": {
2993 | "tags": [
2994 | "脚本管理"
2995 | ],
2996 | "summary": "删除脚本",
2997 | "description": "使用 Token 删除脚本",
2998 | "security": [
2999 | {
3000 | "HTTPBearer": []
3001 | }
3002 | ],
3003 | "requestBody": {
3004 | "required": true,
3005 | "content": {
3006 | "application/json": {
3007 | "schema": {
3008 | "properties": {
3009 | "filename": {
3010 | "type": "string",
3011 | "description": "文件名"
3012 | },
3013 | "path": {
3014 | "type": "string",
3015 | "description": "路径"
3016 | }
3017 | }
3018 | }
3019 | }
3020 | }
3021 | },
3022 | "responses": {
3023 | "200": {
3024 | "description": "成功",
3025 | "content": {
3026 | "application/json": {
3027 | "schema": {
3028 | "properties": {
3029 | "code": {
3030 | "type": "integer",
3031 | "example": 200
3032 | }
3033 | }
3034 | }
3035 | }
3036 | }
3037 | },
3038 | "401": {
3039 | "description": "未授权",
3040 | "content": {
3041 | "application/json": {
3042 | "schema": {
3043 | "properties": {
3044 | "code": {
3045 | "type": "integer",
3046 | "example": 401
3047 | },
3048 | "message": {
3049 | "type": "string",
3050 | "example": "UnauthorizedError"
3051 | }
3052 | }
3053 | }
3054 | }
3055 | }
3056 | }
3057 | }
3058 | }
3059 | },
3060 | "/scripts/download": {
3061 | "post": {
3062 | "tags": [
3063 | "脚本管理"
3064 | ],
3065 | "summary": "下载脚本",
3066 | "description": "使用 Token 下载脚本",
3067 | "security": [
3068 | {
3069 | "HTTPBearer": []
3070 | }
3071 | ],
3072 | "requestBody": {
3073 | "required": true,
3074 | "content": {
3075 | "application/json": {
3076 | "schema": {
3077 | "properties": {
3078 | "filename": {
3079 | "type": "string",
3080 | "description": "文件名"
3081 | }
3082 | }
3083 | }
3084 | }
3085 | }
3086 | },
3087 | "responses": {
3088 | "200": {
3089 | "description": "成功",
3090 | "content": {
3091 | "application/json": {
3092 | "schema": {
3093 | "properties": {
3094 | "code": {
3095 | "type": "integer",
3096 | "example": 200
3097 | }
3098 | }
3099 | }
3100 | }
3101 | }
3102 | },
3103 | "401": {
3104 | "description": "未授权",
3105 | "content": {
3106 | "application/json": {
3107 | "schema": {
3108 | "properties": {
3109 | "code": {
3110 | "type": "integer",
3111 | "example": 401
3112 | },
3113 | "message": {
3114 | "type": "string",
3115 | "example": "UnauthorizedError"
3116 | }
3117 | }
3118 | }
3119 | }
3120 | }
3121 | }
3122 | }
3123 | }
3124 | },
3125 | "/scripts/run": {
3126 | "put": {
3127 | "tags": [
3128 | "脚本管理"
3129 | ],
3130 | "summary": "运行脚本",
3131 | "description": "使用 Token 运行脚本",
3132 | "security": [
3133 | {
3134 | "HTTPBearer": []
3135 | }
3136 | ],
3137 | "requestBody": {
3138 | "required": true,
3139 | "content": {
3140 | "application/json": {
3141 | "schema": {
3142 | "properties": {
3143 | "filename": {
3144 | "type": "string",
3145 | "description": "文件名"
3146 | },
3147 | "path": {
3148 | "type": "string",
3149 | "description": "路径"
3150 | }
3151 | }
3152 | }
3153 | }
3154 | }
3155 | },
3156 | "responses": {
3157 | "200": {
3158 | "description": "成功",
3159 | "content": {
3160 | "application/json": {
3161 | "schema": {
3162 | "properties": {
3163 | "code": {
3164 | "type": "integer",
3165 | "example": 200
3166 | }
3167 | }
3168 | }
3169 | }
3170 | }
3171 | },
3172 | "401": {
3173 | "description": "未授权",
3174 | "content": {
3175 | "application/json": {
3176 | "schema": {
3177 | "properties": {
3178 | "code": {
3179 | "type": "integer",
3180 | "example": 401
3181 | },
3182 | "message": {
3183 | "type": "string",
3184 | "example": "UnauthorizedError"
3185 | }
3186 | }
3187 | }
3188 | }
3189 | }
3190 | }
3191 | }
3192 | }
3193 | },
3194 | "/scripts/stop": {
3195 | "put": {
3196 | "tags": [
3197 | "脚本管理"
3198 | ],
3199 | "summary": "停止运行脚本",
3200 | "description": "使用 Token 停止运行脚本",
3201 | "security": [
3202 | {
3203 | "HTTPBearer": []
3204 | }
3205 | ],
3206 | "requestBody": {
3207 | "required": true,
3208 | "content": {
3209 | "application/json": {
3210 | "schema": {
3211 | "properties": {
3212 | "filename": {
3213 | "type": "string",
3214 | "description": "文件名"
3215 | },
3216 | "path": {
3217 | "type": "string",
3218 | "description": "路径"
3219 | }
3220 | }
3221 | }
3222 | }
3223 | }
3224 | },
3225 | "responses": {
3226 | "200": {
3227 | "description": "成功",
3228 | "content": {
3229 | "application/json": {
3230 | "schema": {
3231 | "properties": {
3232 | "code": {
3233 | "type": "integer",
3234 | "example": 200
3235 | }
3236 | }
3237 | }
3238 | }
3239 | }
3240 | },
3241 | "401": {
3242 | "description": "未授权",
3243 | "content": {
3244 | "application/json": {
3245 | "schema": {
3246 | "properties": {
3247 | "code": {
3248 | "type": "integer",
3249 | "example": 401
3250 | },
3251 | "message": {
3252 | "type": "string",
3253 | "example": "UnauthorizedError"
3254 | }
3255 | }
3256 | }
3257 | }
3258 | }
3259 | }
3260 | }
3261 | }
3262 | },
3263 | "/dependencies": {
3264 | "get": {
3265 | "tags": [
3266 | "依赖管理"
3267 | ],
3268 | "summary": "获取已安装依赖 【未知错误】",
3269 | "description": "使用 Token 获取已安装依赖",
3270 | "security": [
3271 | {
3272 | "HTTPBearer": []
3273 | }
3274 | ],
3275 | "responses": {
3276 | "200": {
3277 | "description": "成功",
3278 | "content": {
3279 | "application/json": {
3280 | "schema": {
3281 | "properties": {
3282 | "code": {
3283 | "type": "integer",
3284 | "example": 200
3285 | },
3286 | "data": {
3287 | "type": "array"
3288 | }
3289 | }
3290 | }
3291 | }
3292 | }
3293 | },
3294 | "401": {
3295 | "description": "未授权",
3296 | "content": {
3297 | "application/json": {
3298 | "schema": {
3299 | "properties": {
3300 | "code": {
3301 | "type": "integer",
3302 | "example": 401
3303 | },
3304 | "message": {
3305 | "type": "string",
3306 | "example": "UnauthorizedError"
3307 | }
3308 | }
3309 | }
3310 | }
3311 | }
3312 | }
3313 | }
3314 | },
3315 | "post": {
3316 | "tags": [
3317 | "依赖管理"
3318 | ],
3319 | "summary": "添加依赖",
3320 | "description": "使用 Token 添加依赖 `依赖类型:` `0 NodeJs` `1 Python3` `2 Linux`",
3321 | "security": [
3322 | {
3323 | "HTTPBearer": []
3324 | }
3325 | ],
3326 | "requestBody": {
3327 | "required": true,
3328 | "content": {
3329 | "application/json": {
3330 | "schema": {
3331 | "items": {
3332 | "type": "object",
3333 | "properties": {
3334 | "name": {
3335 | "type": "string",
3336 | "description": "依赖名",
3337 | "example": "依赖名"
3338 | },
3339 | "type": {
3340 | "type": "integer",
3341 | "description": "类型"
3342 | },
3343 | "remark": {
3344 | "type": "string",
3345 | "description": "备注",
3346 | "example": "备注"
3347 | }
3348 | }
3349 | }
3350 | }
3351 | }
3352 | }
3353 | },
3354 | "responses": {
3355 | "200": {
3356 | "description": "成功",
3357 | "content": {
3358 | "application/json": {
3359 | "schema": {
3360 | "properties": {
3361 | "code": {
3362 | "type": "integer",
3363 | "example": 200
3364 | },
3365 | "data": {
3366 | "type": "array",
3367 | "items": {
3368 | "type": "object",
3369 | "properties": {
3370 | "id": {
3371 | "type": "integer",
3372 | "description": "依赖 ID"
3373 | },
3374 | "name": {
3375 | "type": "string",
3376 | "description": "依赖名",
3377 | "example": "依赖名"
3378 | },
3379 | "type": {
3380 | "type": "integer"
3381 | },
3382 | "timestamp": {
3383 | "type": "string",
3384 | "description": "时间戳",
3385 | "example": "Thu Jan 27 2022 11:22:51 GMT+0800 (中国标准时间)"
3386 | },
3387 | "startus": {
3388 | "type": "integer"
3389 | },
3390 | "log": {
3391 | "type": "array",
3392 | "items": {
3393 | "type": "string"
3394 | }
3395 | },
3396 | "remarks": {
3397 | "type": "string",
3398 | "description": "备注",
3399 | "example": "备注"
3400 | },
3401 | "createdAt": {
3402 | "type": "string",
3403 | "example": "2022-02-01T03:00:53.572Z"
3404 | },
3405 | "updatedAt": {
3406 | "type": "string",
3407 | "example": "2022-02-10T03:30:08.079Z"
3408 | }
3409 | }
3410 | }
3411 | }
3412 | }
3413 | }
3414 | }
3415 | }
3416 | },
3417 | "401": {
3418 | "description": "未授权",
3419 | "content": {
3420 | "application/json": {
3421 | "schema": {
3422 | "properties": {
3423 | "code": {
3424 | "type": "integer",
3425 | "example": 401
3426 | },
3427 | "message": {
3428 | "type": "string",
3429 | "example": "UnauthorizedError"
3430 | }
3431 | }
3432 | }
3433 | }
3434 | }
3435 | }
3436 | }
3437 | },
3438 | "put": {
3439 | "tags": [
3440 | "依赖管理"
3441 | ],
3442 | "summary": "更新依赖 【未知错误】",
3443 | "description": "使用 Token 更新依赖 `依赖类型:` `0 NodeJs` `1 Python3` `2 Linux`",
3444 | "security": [
3445 | {
3446 | "HTTPBearer": []
3447 | }
3448 | ],
3449 | "requestBody": {
3450 | "required": true,
3451 | "content": {
3452 | "application/json": {
3453 | "schema": {
3454 | "properties": {
3455 | "name": {
3456 | "type": "string",
3457 | "description": "依赖名"
3458 | },
3459 | "id": {
3460 | "type": "string",
3461 | "description": "依赖 ID"
3462 | },
3463 | "type": {
3464 | "type": "integer",
3465 | "description": "类型"
3466 | },
3467 | "remark": {
3468 | "type": "string",
3469 | "description": "备注",
3470 | "example": "备注"
3471 | }
3472 | }
3473 | }
3474 | }
3475 | }
3476 | },
3477 | "responses": {
3478 | "200": {
3479 | "description": "成功",
3480 | "content": {
3481 | "application/json": {
3482 | "schema": {
3483 | "properties": {
3484 | "code": {
3485 | "type": "integer",
3486 | "example": 200
3487 | },
3488 | "data": {
3489 | "type": "array"
3490 | }
3491 | }
3492 | }
3493 | }
3494 | }
3495 | },
3496 | "401": {
3497 | "description": "未授权",
3498 | "content": {
3499 | "application/json": {
3500 | "schema": {
3501 | "properties": {
3502 | "code": {
3503 | "type": "integer",
3504 | "example": 401
3505 | },
3506 | "message": {
3507 | "type": "string",
3508 | "example": "UnauthorizedError"
3509 | }
3510 | }
3511 | }
3512 | }
3513 | }
3514 | }
3515 | }
3516 | },
3517 | "delete": {
3518 | "tags": [
3519 | "依赖管理"
3520 | ],
3521 | "summary": "删除依赖",
3522 | "description": "使用 Token 删除依赖",
3523 | "security": [
3524 | {
3525 | "HTTPBearer": []
3526 | }
3527 | ],
3528 | "requestBody": {
3529 | "description": "依赖 ID 可多个ID",
3530 | "required": true,
3531 | "content": {
3532 | "application/json": {
3533 | "schema": {
3534 | "type": "array",
3535 | "description": "依赖 ID",
3536 | "items": {
3537 | "type": "integer"
3538 | }
3539 | }
3540 | }
3541 | }
3542 | },
3543 | "responses": {
3544 | "200": {
3545 | "description": "成功",
3546 | "content": {
3547 | "application/json": {
3548 | "schema": {
3549 | "properties": {
3550 | "code": {
3551 | "type": "integer",
3552 | "example": 200
3553 | },
3554 | "data": {
3555 | "type": "array",
3556 | "items": {
3557 | "type": "object",
3558 | "properties": {
3559 | "id": {
3560 | "type": "integer",
3561 | "description": "依赖 ID"
3562 | },
3563 | "name": {
3564 | "type": "string",
3565 | "description": "依赖名",
3566 | "example": "依赖名"
3567 | },
3568 | "type": {
3569 | "type": "integer"
3570 | },
3571 | "timestamp": {
3572 | "type": "string",
3573 | "description": "时间戳",
3574 | "example": "Thu Jan 27 2022 11:22:51 GMT+0800 (中国标准时间)"
3575 | },
3576 | "startus": {
3577 | "type": "integer"
3578 | },
3579 | "log": {
3580 | "type": "array",
3581 | "items": {
3582 | "type": "string"
3583 | }
3584 | },
3585 | "remarks": {
3586 | "type": "string",
3587 | "description": "备注",
3588 | "example": "备注"
3589 | },
3590 | "createdAt": {
3591 | "type": "string",
3592 | "example": "2022-02-01T03:00:53.572Z"
3593 | },
3594 | "updatedAt": {
3595 | "type": "string",
3596 | "example": "2022-02-10T03:30:08.079Z"
3597 | }
3598 | }
3599 | }
3600 | }
3601 | }
3602 | }
3603 | }
3604 | }
3605 | },
3606 | "401": {
3607 | "description": "未授权",
3608 | "content": {
3609 | "application/json": {
3610 | "schema": {
3611 | "properties": {
3612 | "code": {
3613 | "type": "integer",
3614 | "example": 401
3615 | },
3616 | "message": {
3617 | "type": "string",
3618 | "example": "UnauthorizedError"
3619 | }
3620 | }
3621 | }
3622 | }
3623 | }
3624 | }
3625 | }
3626 | }
3627 | },
3628 | "/dependencies/{id}": {
3629 | "get": {
3630 | "tags": [
3631 | "依赖管理"
3632 | ],
3633 | "summary": "依赖详情",
3634 | "description": "使用 Token 根据依赖 ID 查询依赖详情",
3635 | "security": [
3636 | {
3637 | "HTTPBearer": []
3638 | }
3639 | ],
3640 | "parameters": [
3641 | {
3642 | "name": "id",
3643 | "in": "path",
3644 | "description": "依赖 ID",
3645 | "required": true,
3646 | "schema": {
3647 | "type": "integer"
3648 | }
3649 | }
3650 | ],
3651 | "responses": {
3652 | "200": {
3653 | "description": "成功",
3654 | "content": {
3655 | "application/json": {
3656 | "schema": {
3657 | "properties": {
3658 | "code": {
3659 | "type": "integer",
3660 | "example": 200
3661 | },
3662 | "data": {
3663 | "properties": {
3664 | "id": {
3665 | "type": "integer"
3666 | },
3667 | "name": {
3668 | "type": "string",
3669 | "example": "依赖名"
3670 | },
3671 | "type": {
3672 | "type": "integer",
3673 | "description": "依赖类型 1为js 2为py 3为linux"
3674 | },
3675 | "timestamp": {
3676 | "type": "string",
3677 | "example": "Sat Feb 05 2022 11:46:54 GMT+0800 (中国标准时间)"
3678 | },
3679 | "status": {
3680 | "type": "integer"
3681 | },
3682 | "log": {
3683 | "type": "array",
3684 | "items": {
3685 | "type": "string"
3686 | }
3687 | },
3688 | "remark": {
3689 | "type": "string",
3690 | "description": "备注",
3691 | "example": "备注"
3692 | },
3693 | "createdAt": {
3694 | "type": "string",
3695 | "example": "2022-02-05T03:46:54.049Z"
3696 | },
3697 | "updatedAt": {
3698 | "type": "string",
3699 | "example": "2022-02-07T19:21:35.141Z"
3700 | }
3701 | }
3702 | }
3703 | }
3704 | }
3705 | }
3706 | }
3707 | },
3708 | "401": {
3709 | "description": "未授权",
3710 | "content": {
3711 | "application/json": {
3712 | "schema": {
3713 | "properties": {
3714 | "code": {
3715 | "type": "integer",
3716 | "example": 401
3717 | },
3718 | "message": {
3719 | "type": "string",
3720 | "example": "UnauthorizedError"
3721 | }
3722 | }
3723 | }
3724 | }
3725 | }
3726 | }
3727 | }
3728 | }
3729 | },
3730 | "/dependencies/force": {
3731 | "delete": {
3732 | "tags": [
3733 | "依赖管理"
3734 | ],
3735 | "summary": "暴力删除",
3736 | "description": "使用 Token force",
3737 | "security": [
3738 | {
3739 | "HTTPBearer": []
3740 | }
3741 | ],
3742 | "requestBody": {
3743 | "description": "依赖 ID 可多个ID",
3744 | "required": true,
3745 | "content": {
3746 | "application/json": {
3747 | "schema": {
3748 | "type": "array",
3749 | "description": "依赖 ID",
3750 | "items": {
3751 | "type": "integer"
3752 | }
3753 | }
3754 | }
3755 | }
3756 | },
3757 | "responses": {
3758 | "200": {
3759 | "description": "成功",
3760 | "content": {
3761 | "application/json": {
3762 | "schema": {
3763 | "properties": {
3764 | "code": {
3765 | "type": "integer",
3766 | "example": 200
3767 | },
3768 | "data": {
3769 | "type": "array"
3770 | }
3771 | }
3772 | }
3773 | }
3774 | }
3775 | },
3776 | "401": {
3777 | "description": "未授权",
3778 | "content": {
3779 | "application/json": {
3780 | "schema": {
3781 | "properties": {
3782 | "code": {
3783 | "type": "integer",
3784 | "example": 401
3785 | },
3786 | "message": {
3787 | "type": "string",
3788 | "example": "UnauthorizedError"
3789 | }
3790 | }
3791 | }
3792 | }
3793 | }
3794 | }
3795 | }
3796 | }
3797 | },
3798 | "/dependencies/reinstall": {
3799 | "put": {
3800 | "tags": [
3801 | "依赖管理"
3802 | ],
3803 | "summary": "重装依赖",
3804 | "description": "使用 Token 重装依赖 `依赖类型:` `0 NodeJs` `1 Python3` `2 Linux`",
3805 | "security": [
3806 | {
3807 | "HTTPBearer": []
3808 | }
3809 | ],
3810 | "requestBody": {
3811 | "description": "依赖 ID 可多个ID",
3812 | "required": true,
3813 | "content": {
3814 | "application/json": {
3815 | "schema": {
3816 | "type": "array",
3817 | "description": "依赖 ID",
3818 | "items": {
3819 | "type": "integer"
3820 | }
3821 | }
3822 | }
3823 | }
3824 | },
3825 | "responses": {
3826 | "200": {
3827 | "description": "成功",
3828 | "content": {
3829 | "application/json": {
3830 | "schema": {
3831 | "properties": {
3832 | "code": {
3833 | "type": "integer",
3834 | "example": 200
3835 | },
3836 | "data": {
3837 | "type": "array"
3838 | }
3839 | }
3840 | }
3841 | }
3842 | }
3843 | },
3844 | "401": {
3845 | "description": "未授权",
3846 | "content": {
3847 | "application/json": {
3848 | "schema": {
3849 | "properties": {
3850 | "code": {
3851 | "type": "integer",
3852 | "example": 401
3853 | },
3854 | "message": {
3855 | "type": "string",
3856 | "example": "UnauthorizedError"
3857 | }
3858 | }
3859 | }
3860 | }
3861 | }
3862 | }
3863 | }
3864 | }
3865 | },
3866 | "/system": {
3867 | "get": {
3868 | "tags": [
3869 | "系统管理"
3870 | ],
3871 | "summary": "系统版本",
3872 | "description": "使用 Token 查询系统版本",
3873 | "security": [
3874 | {
3875 | "HTTPBearer": []
3876 | }
3877 | ],
3878 | "responses": {
3879 | "200": {
3880 | "description": "成功",
3881 | "content": {
3882 | "application/json": {
3883 | "schema": {
3884 | "properties": {
3885 | "code": {
3886 | "type": "integer",
3887 | "example": 200
3888 | },
3889 | "data": {
3890 | "properties": {
3891 | "isInitialized": {
3892 | "type": "boolean"
3893 | },
3894 | "version": {
3895 | "type": "string",
3896 | "description": "当前版本",
3897 | "example": "2.11.2"
3898 | }
3899 | }
3900 | }
3901 | }
3902 | }
3903 | }
3904 | }
3905 | },
3906 | "401": {
3907 | "description": "未授权",
3908 | "content": {
3909 | "application/json": {
3910 | "schema": {
3911 | "properties": {
3912 | "code": {
3913 | "type": "integer",
3914 | "example": 401
3915 | },
3916 | "message": {
3917 | "type": "string",
3918 | "example": "UnauthorizedError"
3919 | }
3920 | }
3921 | }
3922 | }
3923 | }
3924 | }
3925 | }
3926 | }
3927 | },
3928 | "/system/log/remove": {
3929 | "get": {
3930 | "tags": [
3931 | "系统管理"
3932 | ],
3933 | "summary": "日志删除频率",
3934 | "description": "使用 Token 查询日志删除频率",
3935 | "security": [
3936 | {
3937 | "HTTPBearer": []
3938 | }
3939 | ],
3940 | "responses": {
3941 | "200": {
3942 | "description": "成功",
3943 | "content": {
3944 | "application/json": {
3945 | "schema": {
3946 | "properties": {
3947 | "code": {
3948 | "type": "integer",
3949 | "example": 200
3950 | },
3951 | "data": {
3952 | "properties": {
3953 | "frequency": {
3954 | "type": "integer",
3955 | "description": "日志删除频率(天)",
3956 | "example": 7
3957 | }
3958 | }
3959 | }
3960 | }
3961 | }
3962 | }
3963 | }
3964 | },
3965 | "401": {
3966 | "description": "未授权",
3967 | "content": {
3968 | "application/json": {
3969 | "schema": {
3970 | "properties": {
3971 | "code": {
3972 | "type": "integer",
3973 | "example": 401
3974 | },
3975 | "message": {
3976 | "type": "string",
3977 | "example": "UnauthorizedError"
3978 | }
3979 | }
3980 | }
3981 | }
3982 | }
3983 | }
3984 | }
3985 | },
3986 | "put": {
3987 | "tags": [
3988 | "系统管理"
3989 | ],
3990 | "summary": "更新日志删除频率",
3991 | "description": "使用 Token 更新日志删除频率",
3992 | "security": [
3993 | {
3994 | "HTTPBearer": []
3995 | }
3996 | ],
3997 | "requestBody": {
3998 | "description": "日志删除频率(天)",
3999 | "required": true,
4000 | "content": {
4001 | "application/json": {
4002 | "schema": {
4003 | "properties": {
4004 | "frequency": {
4005 | "type": "integer",
4006 | "description": "日志删除频率(天)"
4007 | }
4008 | }
4009 | }
4010 | }
4011 | }
4012 | },
4013 | "responses": {
4014 | "200": {
4015 | "description": "成功",
4016 | "content": {
4017 | "application/json": {
4018 | "schema": {
4019 | "properties": {
4020 | "code": {
4021 | "type": "integer",
4022 | "example": 200
4023 | },
4024 | "data": {
4025 | "properties": {
4026 | "id": {
4027 | "type": "integer"
4028 | },
4029 | "name": {
4030 | "type": "string",
4031 | "example": "删除日志"
4032 | },
4033 | "command": {
4034 | "type": "string",
4035 | "example": "ql rmlog 7"
4036 | },
4037 | "schedule": {
4038 | "type": "string",
4039 | "example": "5 23 */7 * *"
4040 | }
4041 | }
4042 | }
4043 | }
4044 | }
4045 | }
4046 | }
4047 | },
4048 | "401": {
4049 | "description": "未授权",
4050 | "content": {
4051 | "application/json": {
4052 | "schema": {
4053 | "properties": {
4054 | "code": {
4055 | "type": "integer",
4056 | "example": 401
4057 | },
4058 | "message": {
4059 | "type": "string",
4060 | "example": "UnauthorizedError"
4061 | }
4062 | }
4063 | }
4064 | }
4065 | }
4066 | }
4067 | }
4068 | }
4069 | },
4070 | "/system/update-check": {
4071 | "put": {
4072 | "tags": [
4073 | "系统管理"
4074 | ],
4075 | "summary": "检测更新",
4076 | "description": "使用 Token 检测更新",
4077 | "security": [
4078 | {
4079 | "HTTPBearer": []
4080 | }
4081 | ],
4082 | "responses": {
4083 | "200": {
4084 | "description": "成功",
4085 | "content": {
4086 | "application/json": {
4087 | "schema": {
4088 | "properties": {
4089 | "code": {
4090 | "type": "integer",
4091 | "example": 200
4092 | },
4093 | "data": {
4094 | "properties": {
4095 | "hasNewVersion": {
4096 | "type": "boolean",
4097 | "description": "是否有新版本"
4098 | },
4099 | "name": {
4100 | "type": "string",
4101 | "example": "删除日志"
4102 | },
4103 | "lastVersion": {
4104 | "type": "string",
4105 | "description": "下个版本"
4106 | },
4107 | "lastLog": {
4108 | "type": "string",
4109 | "description": "更新日志"
4110 | }
4111 | }
4112 | }
4113 | }
4114 | }
4115 | }
4116 | }
4117 | },
4118 | "401": {
4119 | "description": "未授权",
4120 | "content": {
4121 | "application/json": {
4122 | "schema": {
4123 | "properties": {
4124 | "code": {
4125 | "type": "integer",
4126 | "example": 401
4127 | },
4128 | "message": {
4129 | "type": "string",
4130 | "example": "UnauthorizedError"
4131 | }
4132 | }
4133 | }
4134 | }
4135 | }
4136 | }
4137 | }
4138 | }
4139 | },
4140 | "/system/update": {
4141 | "put": {
4142 | "tags": [
4143 | "系统管理"
4144 | ],
4145 | "summary": "更新面板",
4146 | "description": "使用 Token 更新面板",
4147 | "security": [
4148 | {
4149 | "HTTPBearer": []
4150 | }
4151 | ],
4152 | "responses": {
4153 | "200": {
4154 | "description": "成功",
4155 | "content": {
4156 | "application/json": {
4157 | "schema": {
4158 | "properties": {
4159 | "code": {
4160 | "type": "integer",
4161 | "example": 200
4162 | }
4163 | }
4164 | }
4165 | }
4166 | }
4167 | },
4168 | "401": {
4169 | "description": "未授权",
4170 | "content": {
4171 | "application/json": {
4172 | "schema": {
4173 | "properties": {
4174 | "code": {
4175 | "type": "integer",
4176 | "example": 401
4177 | },
4178 | "message": {
4179 | "type": "string",
4180 | "example": "UnauthorizedError"
4181 | }
4182 | }
4183 | }
4184 | }
4185 | }
4186 | }
4187 | }
4188 | }
4189 | }
4190 | },
4191 | "components": {
4192 | "schemas": {},
4193 | "securitySchemes": {
4194 | "HTTPBearer": {
4195 | "type": "http",
4196 | "description": "require a authorization",
4197 | "scheme": "bearer"
4198 | }
4199 | }
4200 | }
4201 | }
4202 |
--------------------------------------------------------------------------------
/openapi.yaml:
--------------------------------------------------------------------------------
1 | openapi: 3.0.3
2 | info:
3 | title: Qinglong API
4 | description: 在 `系统设置 -> 应用设置 -> 添加应用` 生成 `client_id` 和 `client_secret`
5 | version: '2022-02-12'
6 | contact:
7 | name: Qinglong API
8 | url: https://github.com/whyour/qinglong/tree/develop/back/api
9 | servers:
10 | - description: OpenAPI
11 | url: http://192.168.50.125:5700/open
12 | - description: SystemAPI
13 | url: http://192.168.50.125:5700/api
14 | tags:
15 | - name: 用户
16 | description: User
17 | - name: 环境变量
18 | description: Env
19 | - name: 配置管理
20 | description: Config
21 | - name: 任务日志
22 | description: Log
23 | - name: 定时任务
24 | description: Cron
25 | - name: 脚本管理
26 | description: Script
27 | - name: 依赖管理
28 | description: Dependence `貌似有点问题?待排查`
29 | - name: 系统管理
30 | description: System
31 | - name: OpenAPI
32 | description: Open
33 |
34 | paths:
35 | /auth/token:
36 | get:
37 | tags:
38 | - 用户
39 | summary: 获取用户密钥
40 | parameters:
41 | - name: client_id
42 | in: query
43 | description: Client ID
44 | required: true
45 | schema:
46 | type: string
47 | - name: client_secret
48 | in: query
49 | description: Client Secret
50 | required: true
51 | schema:
52 | type: string
53 | responses:
54 | '200':
55 | description: 返回用户密钥信息
56 | content:
57 | application/json:
58 | schema:
59 | properties:
60 | code:
61 | type: integer
62 | example: 200
63 | data:
64 | properties:
65 | token:
66 | type: string
67 | description: 授权密钥
68 | token_type:
69 | type: string
70 | description: 标记类型
71 | expiration:
72 | type: integer
73 | description: 有效期 默认30天
74 | /user/login:
75 | post:
76 | tags:
77 | - 用户
78 | summary: 系统接口登录获取用户密钥
79 | requestBody:
80 | description: 登录
81 | required: true
82 | content:
83 | application/json:
84 | schema:
85 | properties:
86 | username:
87 | type: string
88 | description: 用户名
89 | password:
90 | type: string
91 | description: 密码
92 | responses:
93 | '200':
94 | description: 返回用户密钥信息
95 | content:
96 | application/json:
97 | schema:
98 | properties:
99 | code:
100 | type: integer
101 | example: 200
102 | data:
103 | properties:
104 | token:
105 | type: string
106 | description: 授权密钥
107 | lastip:
108 | type: string
109 | description: 登录IP
110 | lastaddr:
111 | type: string
112 | description: 登录IP归属地
113 | lastlogon:
114 | type: integer
115 | retries:
116 | type: integer
117 | platform:
118 | type: string
119 | description: 登录设备
120 | /envs:
121 | get:
122 | tags:
123 | - 环境变量
124 | summary: 获取所有环境变量详情
125 | description: 使用 Token 返回环境变量详情
126 | security:
127 | - HTTPBearer: []
128 | responses:
129 | '200':
130 | description: 返回所有环境变量
131 | content:
132 | application/json:
133 | schema:
134 | properties:
135 | code:
136 | type: integer
137 | example: 200
138 | data:
139 | type: array
140 | items:
141 | type: object
142 | properties:
143 | id:
144 | type: integer
145 | description: 变量 ID
146 | value:
147 | type: string
148 | description: 变量值
149 | example: 变量值
150 | timestamp:
151 | type: string
152 | description: 时间戳
153 | example: Thu Jan 27 2022 11:22:51 GMT+0800 (中国标准时间)
154 | status:
155 | type: integer
156 | position:
157 | type: integer
158 | name:
159 | type: string
160 | description: 变量名
161 | example: 变量名
162 | remarks:
163 | type: string
164 | description: 备注
165 | example: 备注
166 | createdAt:
167 | type: string
168 | example: "2022-02-01T03:00:53.572Z"
169 | updatedAt:
170 | type: string
171 | example: "2022-02-10T03:30:08.079Z"
172 | '401':
173 | description: 未授权
174 | content:
175 | application/json:
176 | schema:
177 | properties:
178 | code:
179 | type: integer
180 | example: 401
181 | message:
182 | type: string
183 | example: UnauthorizedError
184 | post:
185 | tags:
186 | - 环境变量
187 | summary: 添加环境变量
188 | description: 使用 Token 添加环境变量
189 | security:
190 | - HTTPBearer: []
191 | requestBody:
192 | required: true
193 | content:
194 | application/json:
195 | schema:
196 | properties:
197 | value:
198 | type: string
199 | description: 变量值
200 | example: 变量值
201 | name:
202 | type: string
203 | description: 变量名
204 | example: 变量名
205 | remarks:
206 | type: string
207 | description: 备注
208 | example: 备注
209 | responses:
210 | '200':
211 | description: 成功
212 | content:
213 | application/json:
214 | schema:
215 | properties:
216 | code:
217 | type: integer
218 | example: 200
219 | '401':
220 | description: 未授权
221 | content:
222 | application/json:
223 | schema:
224 | properties:
225 | code:
226 | type: integer
227 | example: 401
228 | message:
229 | type: string
230 | example: UnauthorizedError
231 | put:
232 | tags:
233 | - 环境变量
234 | summary: 更新环境变量
235 | description: 使用 Token 更新环境变量
236 | security:
237 | - HTTPBearer: []
238 | requestBody:
239 | required: true
240 | content:
241 | application/json:
242 | schema:
243 | properties:
244 | value:
245 | type: string
246 | description: 变量值
247 | example: 变量值
248 | name:
249 | type: string
250 | description: 变量名
251 | example: 变量名
252 | remarks:
253 | type: string
254 | description: 备注
255 | example: 备注
256 | id:
257 | type: integer
258 | description: 变量 ID
259 | responses:
260 | '200':
261 | description: 成功
262 | content:
263 | application/json:
264 | schema:
265 | properties:
266 | code:
267 | type: integer
268 | example: 200
269 | '401':
270 | description: 未授权
271 | content:
272 | application/json:
273 | schema:
274 | properties:
275 | code:
276 | type: integer
277 | example: 401
278 | message:
279 | type: string
280 | example: UnauthorizedError
281 | delete:
282 | tags:
283 | - 环境变量
284 | summary: 删除环境变量
285 | description: 使用 Token 删除环境变量
286 | security:
287 | - HTTPBearer: []
288 | requestBody:
289 | description: 变量 ID 可多个ID
290 | required: true
291 | content:
292 | application/json:
293 | schema:
294 | type: array
295 | description: 变量 ID
296 | items:
297 | type: integer
298 | responses:
299 | '200':
300 | description: 成功
301 | content:
302 | application/json:
303 | schema:
304 | properties:
305 | code:
306 | type: integer
307 | example: 200
308 | '401':
309 | description: 未授权
310 | content:
311 | application/json:
312 | schema:
313 | properties:
314 | code:
315 | type: integer
316 | example: 401
317 | message:
318 | type: string
319 | example: UnauthorizedError
320 | /envs/{id}:
321 | get:
322 | tags:
323 | - 环境变量
324 | summary: 根据 ID 获取环境变量
325 | description: 使用 Token 获取环境变量详情
326 | security:
327 | - HTTPBearer: []
328 | parameters:
329 | - name: id
330 | in: path
331 | description: 变量 ID
332 | required: true
333 | schema:
334 | type: integer
335 | responses:
336 | '200':
337 | description: 返回该变量 ID 的环境变量详情
338 | content:
339 | application/json:
340 | schema:
341 | properties:
342 | code:
343 | type: integer
344 | example: 200
345 | data:
346 | properties:
347 | id:
348 | type: integer
349 | description: 变量 ID
350 | value:
351 | type: string
352 | description: 变量值
353 | example: 变量值
354 | timestamp:
355 | type: string
356 | description: 时间戳
357 | example: Thu Jan 27 2022 11:22:51 GMT+0800 (中国标准时间)
358 | status:
359 | type: integer
360 | position:
361 | type: integer
362 | name:
363 | type: string
364 | description: 变量名
365 | example: 变量名
366 | remarks:
367 | type: string
368 | description: 备注
369 | example: 备注
370 | createdAt:
371 | type: string
372 | example: "2022-02-01T03:00:53.572Z"
373 | updatedAt:
374 | type: string
375 | example: "2022-02-10T03:30:08.079Z"
376 | '401':
377 | description: 未授权
378 | content:
379 | application/json:
380 | schema:
381 | properties:
382 | code:
383 | type: integer
384 | example: 401
385 | message:
386 | type: string
387 | example: UnauthorizedError
388 | /envs/{id}/move:
389 | get:
390 | tags:
391 | - 环境变量
392 | summary: move
393 | description: 使用 Token move
394 | security:
395 | - HTTPBearer: []
396 | parameters:
397 | - name: id
398 | in: path
399 | description: 变量 ID
400 | required: true
401 | schema:
402 | type: integer
403 | requestBody:
404 | description: 变量 ID 可多个ID
405 | required: true
406 | content:
407 | application/json:
408 | schema:
409 | properties:
410 | fromIndex:
411 | type: integer
412 | toIndex:
413 | type: integer
414 | responses:
415 | '200':
416 | description: 返回该变量 ID 的环境变量详情
417 | content:
418 | application/json:
419 | schema:
420 | properties:
421 | code:
422 | type: integer
423 | example: 200
424 | data:
425 | properties:
426 | id:
427 | type: integer
428 | description: 变量 ID
429 | value:
430 | type: string
431 | description: 变量值
432 | example: 变量值
433 | timestamp:
434 | type: string
435 | description: 时间戳
436 | example: Thu Jan 27 2022 11:22:51 GMT+0800 (中国标准时间)
437 | status:
438 | type: integer
439 | position:
440 | type: integer
441 | name:
442 | type: string
443 | description: 变量名
444 | example: 变量名
445 | remarks:
446 | type: string
447 | description: 备注
448 | example: 备注
449 | createdAt:
450 | type: string
451 | example: "2022-02-01T03:00:53.572Z"
452 | updatedAt:
453 | type: string
454 | example: "2022-02-10T03:30:08.079Z"
455 | '401':
456 | description: 未授权
457 | content:
458 | application/json:
459 | schema:
460 | properties:
461 | code:
462 | type: integer
463 | example: 401
464 | message:
465 | type: string
466 | example: UnauthorizedError
467 | /envs/disable:
468 | put:
469 | tags:
470 | - 环境变量
471 | summary: 禁用环境变量
472 | description: 使用 Token 禁用环境变量
473 | security:
474 | - HTTPBearer: []
475 | requestBody:
476 | description: 变量 ID 可多个ID
477 | required: true
478 | content:
479 | application/json:
480 | schema:
481 | type: array
482 | description: 变量 ID
483 | items:
484 | type: integer
485 | responses:
486 | '200':
487 | description: 成功
488 | content:
489 | application/json:
490 | schema:
491 | properties:
492 | code:
493 | type: integer
494 | example: 200
495 | '401':
496 | description: 未授权
497 | content:
498 | application/json:
499 | schema:
500 | properties:
501 | code:
502 | type: integer
503 | example: 401
504 | message:
505 | type: string
506 | example: UnauthorizedError
507 | /envs/enable:
508 | put:
509 | tags:
510 | - 环境变量
511 | summary: 启用环境变量
512 | description: 使用 Token 启用环境变量
513 | security:
514 | - HTTPBearer: []
515 | requestBody:
516 | description: 变量 ID 可多个ID
517 | required: true
518 | content:
519 | application/json:
520 | schema:
521 | type: array
522 | description: 变量 ID
523 | items:
524 | type: integer
525 | responses:
526 | '200':
527 | description: 成功
528 | content:
529 | application/json:
530 | schema:
531 | properties:
532 | code:
533 | type: integer
534 | example: 200
535 | '401':
536 | description: 未授权
537 | content:
538 | application/json:
539 | schema:
540 | properties:
541 | code:
542 | type: integer
543 | example: 401
544 | message:
545 | type: string
546 | example: UnauthorizedError
547 | /envs/name:
548 | put:
549 | tags:
550 | - 环境变量
551 | summary: 修改环境变量名
552 | description: 使用 Token 修改环境变量名
553 | security:
554 | - HTTPBearer: []
555 | requestBody:
556 | description: 变量 ID 可多个ID
557 | required: true
558 | content:
559 | application/json:
560 | schema:
561 | properties:
562 | ids:
563 | type: integer
564 | description: 变量 ID
565 | name:
566 | type: string
567 | description: 变量名
568 | example: 变量名
569 | responses:
570 | '200':
571 | description: 成功
572 | content:
573 | application/json:
574 | schema:
575 | properties:
576 | code:
577 | type: integer
578 | example: 200
579 | '401':
580 | description: 未授权
581 | content:
582 | application/json:
583 | schema:
584 | properties:
585 | code:
586 | type: integer
587 | example: 401
588 | message:
589 | type: string
590 | example: UnauthorizedError
591 | /configs/files:
592 | get:
593 | tags:
594 | - 配置管理
595 | summary: 获取配置文件列表
596 | description: 使用 Token 获取配置文件列表
597 | security:
598 | - HTTPBearer: []
599 | responses:
600 | '200':
601 | description: 成功
602 | content:
603 | application/json:
604 | schema:
605 | properties:
606 | code:
607 | type: integer
608 | example: 200
609 | data:
610 | type: array
611 | items:
612 | type: object
613 | properties:
614 | title:
615 | type: string
616 | description: 配置文件名
617 | value:
618 | type: string
619 | description: 配置文件值
620 | '401':
621 | description: 未授权
622 | content:
623 | application/json:
624 | schema:
625 | properties:
626 | code:
627 | type: integer
628 | example: 401
629 | message:
630 | type: string
631 | example: UnauthorizedError
632 | /configs/{file}:
633 | get:
634 | tags:
635 | - 配置管理
636 | summary: 获取配置文件内容
637 | description: 使用 Token 获取配置文件内容
638 | security:
639 | - HTTPBearer: []
640 | parameters:
641 | - name: file
642 | in: path
643 | description: 配置文件名
644 | required: true
645 | schema:
646 | type: string
647 | responses:
648 | '200':
649 | description: 成功
650 | content:
651 | application/json:
652 | schema:
653 | properties:
654 | code:
655 | type: integer
656 | example: 200
657 | data:
658 | type: string
659 | description: 配置文件内容
660 | example: 配置文件内容
661 | '401':
662 | description: 未授权
663 | content:
664 | application/json:
665 | schema:
666 | properties:
667 | code:
668 | type: integer
669 | example: 401
670 | message:
671 | type: string
672 | example: UnauthorizedError
673 | /configs/save:
674 | post:
675 | tags:
676 | - 配置管理
677 | summary: 保存配置文件
678 | description: 使用 Token 获取配置文件列表
679 | security:
680 | - HTTPBearer: []
681 | requestBody:
682 | description: 保存配置文件
683 | required: true
684 | content:
685 | application/json:
686 | schema:
687 | properties:
688 | name:
689 | type: string
690 | description: 配置文件名
691 | content:
692 | type: string
693 | description: 内容
694 | responses:
695 | '200':
696 | description: 成功
697 | content:
698 | application/json:
699 | schema:
700 | properties:
701 | code:
702 | type: integer
703 | example: 200
704 | message:
705 | type: string
706 | example: 保存成功
707 | '401':
708 | description: 未授权
709 | content:
710 | application/json:
711 | schema:
712 | properties:
713 | code:
714 | type: integer
715 | example: 401
716 | message:
717 | type: string
718 | example: UnauthorizedError
719 | '403':
720 | description: 失败
721 | content:
722 | application/json:
723 | schema:
724 | properties:
725 | code:
726 | type: integer
727 | example: 401
728 | message:
729 | type: string
730 | example: 文件无法访问
731 | /logs:
732 | get:
733 | tags:
734 | - 任务日志
735 | summary: 获取所有任务日志列表
736 | description: 使用 Token 获取所有任务日志列表
737 | security:
738 | - HTTPBearer: []
739 | responses:
740 | '200':
741 | description: 成功
742 | content:
743 | application/json:
744 | schema:
745 | properties:
746 | code:
747 | type: integer
748 | example: 200
749 | isDir:
750 | type: boolean
751 | files:
752 | type: array
753 | items:
754 | type: string
755 | properties:
756 | items:
757 | type: string
758 | '401':
759 | description: 未授权
760 | content:
761 | application/json:
762 | schema:
763 | properties:
764 | code:
765 | type: integer
766 | example: 401
767 | message:
768 | type: string
769 | example: UnauthorizedError
770 | /logs/{dir}/{file}:
771 | get:
772 | tags:
773 | - 任务日志
774 | summary: 获取任务日志
775 | description: 使用 Token 获取任务日志
776 | security:
777 | - HTTPBearer: []
778 | parameters:
779 | - name: dir
780 | in: path
781 | description: 日志目录
782 | required: true
783 | schema:
784 | type: string
785 | - name: file
786 | in: path
787 | description: 日志文件名
788 | required: true
789 | schema:
790 | type: string
791 | responses:
792 | '200':
793 | description: 成功
794 | content:
795 | application/json:
796 | schema:
797 | properties:
798 | code:
799 | type: integer
800 | example: 200
801 | data:
802 | type: string
803 | example: 日志文件内容
804 | '401':
805 | description: 未授权
806 | content:
807 | application/json:
808 | schema:
809 | properties:
810 | code:
811 | type: integer
812 | example: 401
813 | message:
814 | type: string
815 | example: UnauthorizedError
816 | /logs/{file}:
817 | get:
818 | tags:
819 | - 任务日志
820 | summary: 获取任务日志
821 | description: 使用 Token 获取任务日志
822 | security:
823 | - HTTPBearer: []
824 | parameters:
825 | - name: file
826 | in: path
827 | description: 日志文件名
828 | required: true
829 | schema:
830 | type: string
831 | responses:
832 | '200':
833 | description: 成功
834 | content:
835 | application/json:
836 | schema:
837 | properties:
838 | code:
839 | type: integer
840 | example: 200
841 | data:
842 | type: string
843 | example: 日志文件内容
844 | '401':
845 | description: 未授权
846 | content:
847 | application/json:
848 | schema:
849 | properties:
850 | code:
851 | type: integer
852 | example: 401
853 | message:
854 | type: string
855 | example: UnauthorizedError
856 | /crons:
857 | get:
858 | tags:
859 | - 定时任务
860 | summary: 获取所有任务详情
861 | description: 使用 Token 返回定时任务详情
862 | security:
863 | - HTTPBearer: []
864 | responses:
865 | '200':
866 | description: 返回定时任务详情
867 | content:
868 | application/json:
869 | schema:
870 | properties:
871 | code:
872 | type: integer
873 | example: 200
874 | data:
875 | type: array
876 | items:
877 | type: object
878 | properties:
879 | id:
880 | type: integer
881 | description: 任务 ID
882 | name:
883 | type: string
884 | description: 任务名称
885 | example: 任务名
886 | command:
887 | type: string
888 | description: 任务命令
889 | example: task helloworld.py
890 | schedule:
891 | type: string
892 | description: 任务定时
893 | example: 0 0 * * *
894 | timestamp:
895 | type: string
896 | description: 时间戳
897 | example: Wed Feb 09 2022 13:08:45 GMT+0800 (中国标准时间)
898 | saved:
899 | type: boolean
900 | status:
901 | type: integer
902 | example: 1
903 | isSystem:
904 | type: integer
905 | pid:
906 | type: integer
907 | example: null
908 | isDisabled:
909 | type: integer
910 | isPinned:
911 | type: integer
912 | log_path:
913 | type: string
914 | labels:
915 | type: array
916 | description: 任务标签
917 | items:
918 | type: string
919 | example: 标签
920 | last_running_time:
921 | type: integer
922 | last_execution_time:
923 | type: integer
924 | createdAt:
925 | type: string
926 | example: "2022-02-09T05:08:45.450Z"
927 | updatedAt:
928 | type: string
929 | example: "2022-02-09T05:50:03.062Z"
930 | '401':
931 | description: 未授权
932 | content:
933 | application/json:
934 | schema:
935 | properties:
936 | code:
937 | type: integer
938 | example: 401
939 | message:
940 | type: string
941 | example: UnauthorizedError
942 | post:
943 | tags:
944 | - 定时任务
945 | summary: 添加任务
946 | description: 使用 Token 添加任务
947 | security:
948 | - HTTPBearer: []
949 | requestBody:
950 | required: true
951 | content:
952 | application/json:
953 | schema:
954 | properties:
955 | command:
956 | type: string
957 | description: 任务命令
958 | example: task helloworld.py
959 | schedule:
960 | type: string
961 | description: 任务定时
962 | example: 0 0 * * *
963 | name:
964 | type: string
965 | description: 任务名
966 | example: 任务名
967 | labels:
968 | type: string
969 | description: 标签
970 | example: 标签
971 | responses:
972 | '200':
973 | description: 成功
974 | content:
975 | application/json:
976 | schema:
977 | properties:
978 | code:
979 | type: integer
980 | example: 200
981 | '401':
982 | description: 未授权
983 | content:
984 | application/json:
985 | schema:
986 | properties:
987 | code:
988 | type: integer
989 | example: 401
990 | message:
991 | type: string
992 | example: UnauthorizedError
993 | put:
994 | tags:
995 | - 定时任务
996 | summary: 更新任务
997 | description: 使用 Token 更新任务
998 | security:
999 | - HTTPBearer: []
1000 | requestBody:
1001 | required: true
1002 | content:
1003 | application/json:
1004 | schema:
1005 | properties:
1006 | labels:
1007 | type: string
1008 | description: 标签
1009 | example: 标签
1010 | command:
1011 | type: string
1012 | description: 任务命令
1013 | example: task helloworld.py
1014 | schedule:
1015 | type: string
1016 | description: 任务定时
1017 | example: 0 0 * * *
1018 | name:
1019 | type: string
1020 | description: 任务名
1021 | example: 任务名
1022 | id:
1023 | type: integer
1024 | description: 任务 ID
1025 | responses:
1026 | '200':
1027 | description: 成功
1028 | content:
1029 | application/json:
1030 | schema:
1031 | properties:
1032 | code:
1033 | type: integer
1034 | example: 200
1035 | '401':
1036 | description: 未授权
1037 | content:
1038 | application/json:
1039 | schema:
1040 | properties:
1041 | code:
1042 | type: integer
1043 | example: 401
1044 | message:
1045 | type: string
1046 | example: UnauthorizedError
1047 | delete:
1048 | tags:
1049 | - 定时任务
1050 | summary: 删除任务
1051 | description: 使用 Token 删除任务
1052 | security:
1053 | - HTTPBearer: []
1054 | requestBody:
1055 | description: 任务 ID 可多个ID
1056 | required: true
1057 | content:
1058 | application/json:
1059 | schema:
1060 | type: array
1061 | description: 任务 ID
1062 | items:
1063 | type: integer
1064 | responses:
1065 | '200':
1066 | description: 成功
1067 | content:
1068 | application/json:
1069 | schema:
1070 | properties:
1071 | code:
1072 | type: integer
1073 | example: 200
1074 | '401':
1075 | description: 未授权
1076 | content:
1077 | application/json:
1078 | schema:
1079 | properties:
1080 | code:
1081 | type: integer
1082 | example: 401
1083 | message:
1084 | type: string
1085 | example: UnauthorizedError
1086 | /crons/{id}:
1087 | get:
1088 | tags:
1089 | - 定时任务
1090 | summary: 根据 ID 获取任务日志
1091 | description: 使用 Token 获取定时任务详情
1092 | security:
1093 | - HTTPBearer: []
1094 | parameters:
1095 | - name: id
1096 | in: path
1097 | description: 任务 ID
1098 | required: true
1099 | schema:
1100 | type: integer
1101 | responses:
1102 | '200':
1103 | description: 返回该变量 ID 的定时任务详情
1104 | content:
1105 | application/json:
1106 | schema:
1107 | properties:
1108 | code:
1109 | type: integer
1110 | example: 200
1111 | data:
1112 | properties:
1113 | id:
1114 | type: integer
1115 | description: 任务 ID
1116 | name:
1117 | type: string
1118 | description: 任务名称
1119 | example: 任务名
1120 | command:
1121 | type: string
1122 | description: 任务命令
1123 | example: task helloworld.py
1124 | schedule:
1125 | type: string
1126 | description: 任务定时
1127 | example: 0 0 * * *
1128 | timestamp:
1129 | type: string
1130 | description: 时间戳
1131 | example: Wed Feb 09 2022 13:08:45 GMT+0800 (中国标准时间)
1132 | saved:
1133 | type: boolean
1134 | status:
1135 | type: integer
1136 | example: 1
1137 | isSystem:
1138 | type: integer
1139 | pid:
1140 | type: integer
1141 | example: null
1142 | isDisabled:
1143 | type: integer
1144 | isPinned:
1145 | type: integer
1146 | log_path:
1147 | type: string
1148 | labels:
1149 | type: array
1150 | description: 任务标签
1151 | items:
1152 | type: string
1153 | example: 标签
1154 | last_running_time:
1155 | type: integer
1156 | last_execution_time:
1157 | type: integer
1158 | createdAt:
1159 | type: string
1160 | example: "2022-02-09T05:08:45.450Z"
1161 | updatedAt:
1162 | type: string
1163 | example: "2022-02-09T05:50:03.062Z"
1164 | '401':
1165 | description: 未授权
1166 | content:
1167 | application/json:
1168 | schema:
1169 | properties:
1170 | code:
1171 | type: integer
1172 | example: 401
1173 | message:
1174 | type: string
1175 | example: UnauthorizedError
1176 | /crons/run:
1177 | put:
1178 | tags:
1179 | - 定时任务
1180 | summary: 运行任务
1181 | description: 使用 Token 运行任务
1182 | security:
1183 | - HTTPBearer: []
1184 | requestBody:
1185 | description: 任务 ID 可多个ID
1186 | required: true
1187 | content:
1188 | application/json:
1189 | schema:
1190 | type: array
1191 | description: 任务 ID
1192 | items:
1193 | type: integer
1194 | responses:
1195 | '200':
1196 | description: 成功
1197 | content:
1198 | application/json:
1199 | schema:
1200 | properties:
1201 | code:
1202 | type: integer
1203 | example: 200
1204 | '401':
1205 | description: 未授权
1206 | content:
1207 | application/json:
1208 | schema:
1209 | properties:
1210 | code:
1211 | type: integer
1212 | example: 401
1213 | message:
1214 | type: string
1215 | example: UnauthorizedError
1216 | /crons/stop:
1217 | put:
1218 | tags:
1219 | - 定时任务
1220 | summary: 停止任务
1221 | description: 使用 Token 停止任务
1222 | security:
1223 | - HTTPBearer: []
1224 | requestBody:
1225 | description: 任务 ID 可多个ID
1226 | required: true
1227 | content:
1228 | application/json:
1229 | schema:
1230 | type: array
1231 | description: 任务 ID
1232 | items:
1233 | type: integer
1234 | responses:
1235 | '200':
1236 | description: 成功
1237 | content:
1238 | application/json:
1239 | schema:
1240 | properties:
1241 | code:
1242 | type: integer
1243 | example: 200
1244 | '401':
1245 | description: 未授权
1246 | content:
1247 | application/json:
1248 | schema:
1249 | properties:
1250 | code:
1251 | type: integer
1252 | example: 401
1253 | message:
1254 | type: string
1255 | example: UnauthorizedError
1256 | /crons/labels:
1257 | post:
1258 | tags:
1259 | - 定时任务
1260 | summary: 添加标签
1261 | description: 使用 Token 添加标签
1262 | security:
1263 | - HTTPBearer: []
1264 | requestBody:
1265 | description: 任务 ID 可多个ID
1266 | required: true
1267 | content:
1268 | application/json:
1269 | schema:
1270 | properties:
1271 | ids:
1272 | type: integer
1273 | description: 任务 ID 可多个ID
1274 | labels:
1275 | type: string
1276 | description: 标签
1277 | example: 标签
1278 | responses:
1279 | '200':
1280 | description: 成功
1281 | content:
1282 | application/json:
1283 | schema:
1284 | properties:
1285 | code:
1286 | type: integer
1287 | example: 200
1288 | '401':
1289 | description: 未授权
1290 | content:
1291 | application/json:
1292 | schema:
1293 | properties:
1294 | code:
1295 | type: integer
1296 | example: 401
1297 | message:
1298 | type: string
1299 | example: UnauthorizedError
1300 | delete:
1301 | tags:
1302 | - 定时任务
1303 | summary: 删除标签
1304 | description: 使用 Token 删除标签
1305 | security:
1306 | - HTTPBearer: []
1307 | requestBody:
1308 | description: 任务 ID 可多个ID
1309 | required: true
1310 | content:
1311 | application/json:
1312 | schema:
1313 | properties:
1314 | ids:
1315 | type: integer
1316 | description: 任务 ID 可多个ID
1317 | labels:
1318 | type: string
1319 | description: 标签
1320 | example: 标签
1321 | responses:
1322 | '200':
1323 | description: 成功
1324 | content:
1325 | application/json:
1326 | schema:
1327 | properties:
1328 | code:
1329 | type: integer
1330 | example: 200
1331 | '401':
1332 | description: 未授权
1333 | content:
1334 | application/json:
1335 | schema:
1336 | properties:
1337 | code:
1338 | type: integer
1339 | example: 401
1340 | message:
1341 | type: string
1342 | example: UnauthorizedError
1343 | /crons/disable:
1344 | put:
1345 | tags:
1346 | - 定时任务
1347 | summary: 禁用任务
1348 | description: 使用 Token 禁用任务
1349 | security:
1350 | - HTTPBearer: []
1351 | requestBody:
1352 | description: 任务 ID 可多个ID
1353 | required: true
1354 | content:
1355 | application/json:
1356 | schema:
1357 | type: array
1358 | description: 任务 ID
1359 | items:
1360 | type: integer
1361 | responses:
1362 | '200':
1363 | description: 成功
1364 | content:
1365 | application/json:
1366 | schema:
1367 | properties:
1368 | code:
1369 | type: integer
1370 | example: 200
1371 | '401':
1372 | description: 未授权
1373 | content:
1374 | application/json:
1375 | schema:
1376 | properties:
1377 | code:
1378 | type: integer
1379 | example: 401
1380 | message:
1381 | type: string
1382 | example: UnauthorizedError
1383 | /crons/enable:
1384 | put:
1385 | tags:
1386 | - 定时任务
1387 | summary: 启用任务
1388 | description: 使用 Token 启用任务
1389 | security:
1390 | - HTTPBearer: []
1391 | requestBody:
1392 | description: 任务 ID 可多个ID
1393 | required: true
1394 | content:
1395 | application/json:
1396 | schema:
1397 | type: array
1398 | description: 任务 ID
1399 | items:
1400 | type: integer
1401 | responses:
1402 | '200':
1403 | description: 成功
1404 | content:
1405 | application/json:
1406 | schema:
1407 | properties:
1408 | code:
1409 | type: integer
1410 | example: 200
1411 | '401':
1412 | description: 未授权
1413 | content:
1414 | application/json:
1415 | schema:
1416 | properties:
1417 | code:
1418 | type: integer
1419 | example: 401
1420 | message:
1421 | type: string
1422 | example: UnauthorizedError
1423 | /crons/{id}/log:
1424 | get:
1425 | tags:
1426 | - 定时任务
1427 | summary: 任务日志
1428 | description: 使用 Token 查询任务日志
1429 | security:
1430 | - HTTPBearer: []
1431 | parameters:
1432 | - name: id
1433 | in: path
1434 | description: 任务 ID
1435 | required: true
1436 | schema:
1437 | type: integer
1438 | responses:
1439 | '200':
1440 | description: 成功
1441 | content:
1442 | application/json:
1443 | schema:
1444 | properties:
1445 | code:
1446 | type: integer
1447 | example: 200
1448 | data:
1449 | type: string
1450 | '401':
1451 | description: 未授权
1452 | content:
1453 | application/json:
1454 | schema:
1455 | properties:
1456 | code:
1457 | type: integer
1458 | example: 401
1459 | message:
1460 | type: string
1461 | example: UnauthorizedError
1462 | /crons/pin:
1463 | put:
1464 | tags:
1465 | - 定时任务
1466 | summary: 顶置任务
1467 | description: 使用 Token 顶置任务
1468 | security:
1469 | - HTTPBearer: []
1470 | requestBody:
1471 | description: 任务 ID 可多个ID
1472 | required: true
1473 | content:
1474 | application/json:
1475 | schema:
1476 | type: array
1477 | description: 任务 ID
1478 | items:
1479 | type: integer
1480 | responses:
1481 | '200':
1482 | description: 成功
1483 | content:
1484 | application/json:
1485 | schema:
1486 | properties:
1487 | code:
1488 | type: integer
1489 | example: 200
1490 | '401':
1491 | description: 未授权
1492 | content:
1493 | application/json:
1494 | schema:
1495 | properties:
1496 | code:
1497 | type: integer
1498 | example: 401
1499 | message:
1500 | type: string
1501 | example: UnauthorizedError
1502 | /crons/unpin:
1503 | put:
1504 | tags:
1505 | - 定时任务
1506 | summary: 取消顶置任务
1507 | description: 使用 Token 取消顶置任务
1508 | security:
1509 | - HTTPBearer: []
1510 | requestBody:
1511 | description: 任务 ID 可多个ID
1512 | required: true
1513 | content:
1514 | application/json:
1515 | schema:
1516 | type: array
1517 | description: 任务 ID
1518 | items:
1519 | type: integer
1520 | responses:
1521 | '200':
1522 | description: 成功
1523 | content:
1524 | application/json:
1525 | schema:
1526 | properties:
1527 | code:
1528 | type: integer
1529 | example: 200
1530 | '401':
1531 | description: 未授权
1532 | content:
1533 | application/json:
1534 | schema:
1535 | properties:
1536 | code:
1537 | type: integer
1538 | example: 401
1539 | message:
1540 | type: string
1541 | example: UnauthorizedError
1542 | /crons/import:
1543 | get:
1544 | tags:
1545 | - 定时任务
1546 | summary: import
1547 | description: 使用 Token import
1548 | security:
1549 | - HTTPBearer: []
1550 | responses:
1551 | '200':
1552 | description: 成功
1553 | content:
1554 | application/json:
1555 | schema:
1556 | properties:
1557 | code:
1558 | type: integer
1559 | example: 200
1560 | '401':
1561 | description: 未授权
1562 | content:
1563 | application/json:
1564 | schema:
1565 | properties:
1566 | code:
1567 | type: integer
1568 | example: 401
1569 | message:
1570 | type: string
1571 | example: UnauthorizedError
1572 |
1573 | /crons/status:
1574 | put:
1575 | tags:
1576 | - 定时任务
1577 | summary: status
1578 | description: 使用 Token status
1579 | security:
1580 | - HTTPBearer: []
1581 | requestBody:
1582 | required: true
1583 | content:
1584 | application/json:
1585 | schema:
1586 | properties:
1587 | ids:
1588 | type: integer
1589 | description: 任务 ID 可多个ID
1590 | status:
1591 | type: string
1592 | pid:
1593 | type: string
1594 | log_path:
1595 | type: string
1596 | last_running_time:
1597 | type: integer
1598 | last_execution_time:
1599 | type: integer
1600 | responses:
1601 | '200':
1602 | description: 成功
1603 | content:
1604 | application/json:
1605 | schema:
1606 | properties:
1607 | code:
1608 | type: integer
1609 | example: 200
1610 | '401':
1611 | description: 未授权
1612 | content:
1613 | application/json:
1614 | schema:
1615 | properties:
1616 | code:
1617 | type: integer
1618 | example: 401
1619 | message:
1620 | type: string
1621 | example: UnauthorizedError
1622 | /scripts/files:
1623 | get:
1624 | tags:
1625 | - 脚本管理
1626 | summary: 获取所有脚本列表
1627 | description: 使用 Token 获取所有脚本列表
1628 | security:
1629 | - HTTPBearer: []
1630 | responses:
1631 | '200':
1632 | description: 成功
1633 | content:
1634 | application/json:
1635 | schema:
1636 | properties:
1637 | code:
1638 | type: integer
1639 | example: 200
1640 | data:
1641 | type: array
1642 | items:
1643 | type: object
1644 | properties:
1645 | title:
1646 | type: string
1647 | description: 脚本目录
1648 | value:
1649 | type: string
1650 | key:
1651 | type: string
1652 | mtime:
1653 | type: integer
1654 | disabled:
1655 | type: boolean
1656 | children:
1657 | type: array
1658 | items:
1659 | type: object
1660 | properties:
1661 | title:
1662 | type: string
1663 | description: 脚本名
1664 | value:
1665 | type: string
1666 | key:
1667 | type: string
1668 | description: 路径
1669 | mtime:
1670 | type: integer
1671 | parent:
1672 | type: string
1673 | description: 脚本所处目录
1674 | '401':
1675 | description: 未授权
1676 | content:
1677 | application/json:
1678 | schema:
1679 | properties:
1680 | code:
1681 | type: integer
1682 | example: 401
1683 | message:
1684 | type: string
1685 | example: UnauthorizedError
1686 | /scripts/{file}:
1687 | get:
1688 | tags:
1689 | - 脚本管理
1690 | summary: 获取脚本内容 【未知错误】
1691 | description: 使用 Token 脚本内容
1692 | security:
1693 | - HTTPBearer: []
1694 | parameters:
1695 | - name: file
1696 | in: path
1697 | description: 任务 ID
1698 | required: true
1699 | schema:
1700 | type: string
1701 | responses:
1702 | '200':
1703 | description: 成功
1704 | content:
1705 | application/json:
1706 | schema:
1707 | properties:
1708 | code:
1709 | type: integer
1710 | example: 200
1711 | data:
1712 | type: array
1713 | items:
1714 | type: object
1715 | properties:
1716 | title:
1717 | type: string
1718 | description: 脚本目录
1719 | value:
1720 | type: string
1721 | key:
1722 | type: string
1723 | mtime:
1724 | type: integer
1725 | disabled:
1726 | type: boolean
1727 | children:
1728 | type: array
1729 | items:
1730 | type: object
1731 | properties:
1732 | title:
1733 | type: string
1734 | description: 脚本名
1735 | value:
1736 | type: string
1737 | key:
1738 | type: string
1739 | description: 路径
1740 | mtime:
1741 | type: integer
1742 | parent:
1743 | type: string
1744 | description: 脚本所处目录
1745 | '401':
1746 | description: 未授权
1747 | content:
1748 | application/json:
1749 | schema:
1750 | properties:
1751 | code:
1752 | type: integer
1753 | example: 401
1754 | message:
1755 | type: string
1756 | example: UnauthorizedError
1757 | /scripts:
1758 | post:
1759 | tags:
1760 | - 脚本管理
1761 | summary: 添加脚本
1762 | description: 使用 Token 添加脚本
1763 | security:
1764 | - HTTPBearer: []
1765 | requestBody:
1766 | required: true
1767 | content:
1768 | application/json:
1769 | schema:
1770 | properties:
1771 | filename:
1772 | type: string
1773 | description: 文件名
1774 | path:
1775 | type: string
1776 | description: 路径
1777 | content:
1778 | type: string
1779 | description: 内容
1780 | originFilename:
1781 | type: string
1782 | responses:
1783 | '200':
1784 | description: 成功
1785 | content:
1786 | application/json:
1787 | schema:
1788 | properties:
1789 | code:
1790 | type: integer
1791 | example: 200
1792 | '401':
1793 | description: 未授权
1794 | content:
1795 | application/json:
1796 | schema:
1797 | properties:
1798 | code:
1799 | type: integer
1800 | example: 401
1801 | message:
1802 | type: string
1803 | example: UnauthorizedError
1804 | '430':
1805 | description: 失败
1806 | content:
1807 | application/json:
1808 | schema:
1809 | properties:
1810 | code:
1811 | type: integer
1812 | example: 430
1813 | data:
1814 | type: string
1815 | example: 文件路径禁止访问
1816 | put:
1817 | tags:
1818 | - 脚本管理
1819 | summary: 更新脚本
1820 | description: 使用 Token 更新脚本
1821 | security:
1822 | - HTTPBearer: []
1823 | requestBody:
1824 | required: true
1825 | content:
1826 | application/json:
1827 | schema:
1828 | properties:
1829 | filename:
1830 | type: string
1831 | description: 文件名
1832 | path:
1833 | type: string
1834 | description: 路径
1835 | content:
1836 | type: string
1837 | description: 内容
1838 | responses:
1839 | '200':
1840 | description: 成功
1841 | content:
1842 | application/json:
1843 | schema:
1844 | properties:
1845 | code:
1846 | type: integer
1847 | example: 200
1848 | '401':
1849 | description: 未授权
1850 | content:
1851 | application/json:
1852 | schema:
1853 | properties:
1854 | code:
1855 | type: integer
1856 | example: 401
1857 | message:
1858 | type: string
1859 | example: UnauthorizedError
1860 | delete:
1861 | tags:
1862 | - 脚本管理
1863 | summary: 删除脚本
1864 | description: 使用 Token 删除脚本
1865 | security:
1866 | - HTTPBearer: []
1867 | requestBody:
1868 | required: true
1869 | content:
1870 | application/json:
1871 | schema:
1872 | properties:
1873 | filename:
1874 | type: string
1875 | description: 文件名
1876 | path:
1877 | type: string
1878 | description: 路径
1879 | responses:
1880 | '200':
1881 | description: 成功
1882 | content:
1883 | application/json:
1884 | schema:
1885 | properties:
1886 | code:
1887 | type: integer
1888 | example: 200
1889 | '401':
1890 | description: 未授权
1891 | content:
1892 | application/json:
1893 | schema:
1894 | properties:
1895 | code:
1896 | type: integer
1897 | example: 401
1898 | message:
1899 | type: string
1900 | example: UnauthorizedError
1901 | /scripts/download:
1902 | post:
1903 | tags:
1904 | - 脚本管理
1905 | summary: 下载脚本
1906 | description: 使用 Token 下载脚本
1907 | security:
1908 | - HTTPBearer: []
1909 | requestBody:
1910 | required: true
1911 | content:
1912 | application/json:
1913 | schema:
1914 | properties:
1915 | filename:
1916 | type: string
1917 | description: 文件名
1918 | responses:
1919 | '200':
1920 | description: 成功
1921 | content:
1922 | application/json:
1923 | schema:
1924 | properties:
1925 | code:
1926 | type: integer
1927 | example: 200
1928 | '401':
1929 | description: 未授权
1930 | content:
1931 | application/json:
1932 | schema:
1933 | properties:
1934 | code:
1935 | type: integer
1936 | example: 401
1937 | message:
1938 | type: string
1939 | example: UnauthorizedError
1940 | /scripts/run:
1941 | put:
1942 | tags:
1943 | - 脚本管理
1944 | summary: 运行脚本
1945 | description: 使用 Token 运行脚本
1946 | security:
1947 | - HTTPBearer: []
1948 | requestBody:
1949 | required: true
1950 | content:
1951 | application/json:
1952 | schema:
1953 | properties:
1954 | filename:
1955 | type: string
1956 | description: 文件名
1957 | path:
1958 | type: string
1959 | description: 路径
1960 | responses:
1961 | '200':
1962 | description: 成功
1963 | content:
1964 | application/json:
1965 | schema:
1966 | properties:
1967 | code:
1968 | type: integer
1969 | example: 200
1970 | '401':
1971 | description: 未授权
1972 | content:
1973 | application/json:
1974 | schema:
1975 | properties:
1976 | code:
1977 | type: integer
1978 | example: 401
1979 | message:
1980 | type: string
1981 | example: UnauthorizedError
1982 | /scripts/stop:
1983 | put:
1984 | tags:
1985 | - 脚本管理
1986 | summary: 停止运行脚本
1987 | description: 使用 Token 停止运行脚本
1988 | security:
1989 | - HTTPBearer: []
1990 | requestBody:
1991 | required: true
1992 | content:
1993 | application/json:
1994 | schema:
1995 | properties:
1996 | filename:
1997 | type: string
1998 | description: 文件名
1999 | path:
2000 | type: string
2001 | description: 路径
2002 | responses:
2003 | '200':
2004 | description: 成功
2005 | content:
2006 | application/json:
2007 | schema:
2008 | properties:
2009 | code:
2010 | type: integer
2011 | example: 200
2012 | '401':
2013 | description: 未授权
2014 | content:
2015 | application/json:
2016 | schema:
2017 | properties:
2018 | code:
2019 | type: integer
2020 | example: 401
2021 | message:
2022 | type: string
2023 | example: UnauthorizedError
2024 | /dependencies:
2025 | get:
2026 | tags:
2027 | - 依赖管理
2028 | summary: 获取已安装依赖 【未知错误】
2029 | description: 使用 Token 获取已安装依赖
2030 | security:
2031 | - HTTPBearer: []
2032 | responses:
2033 | '200':
2034 | description: 成功
2035 | content:
2036 | application/json:
2037 | schema:
2038 | properties:
2039 | code:
2040 | type: integer
2041 | example: 200
2042 | data:
2043 | type: array
2044 | '401':
2045 | description: 未授权
2046 | content:
2047 | application/json:
2048 | schema:
2049 | properties:
2050 | code:
2051 | type: integer
2052 | example: 401
2053 | message:
2054 | type: string
2055 | example: UnauthorizedError
2056 | post:
2057 | tags:
2058 | - 依赖管理
2059 | summary: 添加依赖 【未知错误】
2060 | description: 使用 Token 添加依赖 `依赖类型:` `0 NodeJs` `1 Python3` `2 Linux`
2061 | security:
2062 | - HTTPBearer: []
2063 | requestBody:
2064 | required: true
2065 | content:
2066 | application/json:
2067 | schema:
2068 | properties:
2069 | name:
2070 | type: string
2071 | description: 依赖名
2072 | type:
2073 | type: integer
2074 | description: 类型
2075 | remark:
2076 | type: string
2077 | description: 备注
2078 | example: 备注
2079 | responses:
2080 | '200':
2081 | description: 成功
2082 | content:
2083 | application/json:
2084 | schema:
2085 | properties:
2086 | code:
2087 | type: integer
2088 | example: 200
2089 | data:
2090 | type: array
2091 | '401':
2092 | description: 未授权
2093 | content:
2094 | application/json:
2095 | schema:
2096 | properties:
2097 | code:
2098 | type: integer
2099 | example: 401
2100 | message:
2101 | type: string
2102 | example: UnauthorizedError
2103 | put:
2104 | tags:
2105 | - 依赖管理
2106 | summary: 更新依赖 【未知错误】
2107 | description: 使用 Token 更新依赖 `依赖类型:` `0 NodeJs` `1 Python3` `2 Linux`
2108 | security:
2109 | - HTTPBearer: []
2110 | requestBody:
2111 | required: true
2112 | content:
2113 | application/json:
2114 | schema:
2115 | properties:
2116 | name:
2117 | type: string
2118 | description: 依赖名
2119 | id:
2120 | type: string
2121 | description: 依赖 ID
2122 | type:
2123 | type: integer
2124 | description: 类型
2125 | remark:
2126 | type: string
2127 | description: 备注
2128 | example: 备注
2129 | responses:
2130 | '200':
2131 | description: 成功
2132 | content:
2133 | application/json:
2134 | schema:
2135 | properties:
2136 | code:
2137 | type: integer
2138 | example: 200
2139 | data:
2140 | type: array
2141 | '401':
2142 | description: 未授权
2143 | content:
2144 | application/json:
2145 | schema:
2146 | properties:
2147 | code:
2148 | type: integer
2149 | example: 401
2150 | message:
2151 | type: string
2152 | example: UnauthorizedError
2153 | delete:
2154 | tags:
2155 | - 依赖管理
2156 | summary: 删除依赖 【未知错误】
2157 | description: 使用 Token 删除依赖
2158 | security:
2159 | - HTTPBearer: []
2160 | requestBody:
2161 | description: 依赖 ID 可多个ID
2162 | required: true
2163 | content:
2164 | application/json:
2165 | schema:
2166 | type: array
2167 | description: 依赖 ID
2168 | items:
2169 | type: integer
2170 | responses:
2171 | '200':
2172 | description: 成功
2173 | content:
2174 | application/json:
2175 | schema:
2176 | properties:
2177 | code:
2178 | type: integer
2179 | example: 200
2180 | data:
2181 | type: array
2182 | '401':
2183 | description: 未授权
2184 | content:
2185 | application/json:
2186 | schema:
2187 | properties:
2188 | code:
2189 | type: integer
2190 | example: 401
2191 | message:
2192 | type: string
2193 | example: UnauthorizedError
2194 | /dependencies/{id}:
2195 | get:
2196 | tags:
2197 | - 依赖管理
2198 | summary: 依赖详情
2199 | description: 使用 Token 根据依赖 ID 查询依赖详情
2200 | security:
2201 | - HTTPBearer: []
2202 | parameters:
2203 | - name: id
2204 | in: path
2205 | description: 依赖 ID
2206 | required: true
2207 | schema:
2208 | type: integer
2209 | responses:
2210 | '200':
2211 | description: 成功
2212 | content:
2213 | application/json:
2214 | schema:
2215 | properties:
2216 | code:
2217 | type: integer
2218 | example: 200
2219 | data:
2220 | properties:
2221 | id:
2222 | type: integer
2223 | name:
2224 | type: string
2225 | example: 依赖名
2226 | type:
2227 | type: integer
2228 | description: 依赖类型 1为js 2为py 3为linux
2229 | timestamp:
2230 | type: string
2231 | example: Sat Feb 05 2022 11:46:54 GMT+0800 (中国标准时间)
2232 | status:
2233 | type: integer
2234 | log:
2235 | type: array
2236 | items:
2237 | type: string
2238 | remark:
2239 | type: string
2240 | description: 备注
2241 | example: 备注
2242 | createdAt:
2243 | type: string
2244 | example: "2022-02-05T03:46:54.049Z"
2245 | updatedAt:
2246 | type: string
2247 | example: "2022-02-07T19:21:35.141Z"
2248 |
2249 |
2250 |
2251 | '401':
2252 | description: 未授权
2253 | content:
2254 | application/json:
2255 | schema:
2256 | properties:
2257 | code:
2258 | type: integer
2259 | example: 401
2260 | message:
2261 | type: string
2262 | example: UnauthorizedError
2263 | /dependencies/force:
2264 | delete:
2265 | tags:
2266 | - 依赖管理
2267 | summary: force 【未知错误】
2268 | description: 使用 Token force
2269 | security:
2270 | - HTTPBearer: []
2271 | requestBody:
2272 | description: 依赖 ID 可多个ID
2273 | required: true
2274 | content:
2275 | application/json:
2276 | schema:
2277 | type: array
2278 | description: 依赖 ID
2279 | items:
2280 | type: integer
2281 | responses:
2282 | '200':
2283 | description: 成功
2284 | content:
2285 | application/json:
2286 | schema:
2287 | properties:
2288 | code:
2289 | type: integer
2290 | example: 200
2291 | data:
2292 | type: array
2293 | '401':
2294 | description: 未授权
2295 | content:
2296 | application/json:
2297 | schema:
2298 | properties:
2299 | code:
2300 | type: integer
2301 | example: 401
2302 | message:
2303 | type: string
2304 | example: UnauthorizedError
2305 | /dependencies/reinstall:
2306 | put:
2307 | tags:
2308 | - 依赖管理
2309 | summary: 重装依赖
2310 | description: 使用 Token 重装依赖 `依赖类型:` `0 NodeJs` `1 Python3` `2 Linux`
2311 | security:
2312 | - HTTPBearer: []
2313 | requestBody:
2314 | description: 依赖 ID 可多个ID
2315 | required: true
2316 | content:
2317 | application/json:
2318 | schema:
2319 | type: array
2320 | description: 依赖 ID
2321 | items:
2322 | type: integer
2323 | responses:
2324 | '200':
2325 | description: 成功
2326 | content:
2327 | application/json:
2328 | schema:
2329 | properties:
2330 | code:
2331 | type: integer
2332 | example: 200
2333 | data:
2334 | type: array
2335 | '401':
2336 | description: 未授权
2337 | content:
2338 | application/json:
2339 | schema:
2340 | properties:
2341 | code:
2342 | type: integer
2343 | example: 401
2344 | message:
2345 | type: string
2346 | example: UnauthorizedError
2347 | /system:
2348 | get:
2349 | tags:
2350 | - 系统管理
2351 | summary: 系统版本
2352 | description: 使用 Token 查询系统版本
2353 | security:
2354 | - HTTPBearer: []
2355 | responses:
2356 | '200':
2357 | description: 成功
2358 | content:
2359 | application/json:
2360 | schema:
2361 | properties:
2362 | code:
2363 | type: integer
2364 | example: 200
2365 | data:
2366 | properties:
2367 | isInitialized:
2368 | type: boolean
2369 | version:
2370 | type: string
2371 | description: 当前版本
2372 | example: 2.11.2
2373 |
2374 |
2375 | '401':
2376 | description: 未授权
2377 | content:
2378 | application/json:
2379 | schema:
2380 | properties:
2381 | code:
2382 | type: integer
2383 | example: 401
2384 | message:
2385 | type: string
2386 | example: UnauthorizedError
2387 | /system/log/remove:
2388 | get:
2389 | tags:
2390 | - 系统管理
2391 | summary: 日志删除频率
2392 | description: 使用 Token 查询日志删除频率
2393 | security:
2394 | - HTTPBearer: []
2395 | responses:
2396 | '200':
2397 | description: 成功
2398 | content:
2399 | application/json:
2400 | schema:
2401 | properties:
2402 | code:
2403 | type: integer
2404 | example: 200
2405 | data:
2406 | properties:
2407 | frequency:
2408 | type: integer
2409 | description: 日志删除频率(天)
2410 | example: 7
2411 |
2412 |
2413 | '401':
2414 | description: 未授权
2415 | content:
2416 | application/json:
2417 | schema:
2418 | properties:
2419 | code:
2420 | type: integer
2421 | example: 401
2422 | message:
2423 | type: string
2424 | example: UnauthorizedError
2425 | put:
2426 | tags:
2427 | - 系统管理
2428 | summary: 更新日志删除频率
2429 | description: 使用 Token 更新日志删除频率
2430 | security:
2431 | - HTTPBearer: []
2432 | requestBody:
2433 | description: 日志删除频率(天)
2434 | required: true
2435 | content:
2436 | application/json:
2437 | schema:
2438 | properties:
2439 | frequency:
2440 | type: integer
2441 | description: 日志删除频率(天)
2442 | responses:
2443 | '200':
2444 | description: 成功
2445 | content:
2446 | application/json:
2447 | schema:
2448 | properties:
2449 | code:
2450 | type: integer
2451 | example: 200
2452 | data:
2453 | properties:
2454 | id:
2455 | type: integer
2456 | name:
2457 | type: string
2458 | example: 删除日志
2459 | command:
2460 | type: string
2461 | example: ql rmlog 7
2462 | schedule:
2463 | type: string
2464 | example: 5 23 */7 * *
2465 |
2466 | '401':
2467 | description: 未授权
2468 | content:
2469 | application/json:
2470 | schema:
2471 | properties:
2472 | code:
2473 | type: integer
2474 | example: 401
2475 | message:
2476 | type: string
2477 | example: UnauthorizedError
2478 | /system/update-check:
2479 | put:
2480 | tags:
2481 | - 系统管理
2482 | summary: 检测更新
2483 | description: 使用 Token 检测更新
2484 | security:
2485 | - HTTPBearer: []
2486 | responses:
2487 | '200':
2488 | description: 成功
2489 | content:
2490 | application/json:
2491 | schema:
2492 | properties:
2493 | code:
2494 | type: integer
2495 | example: 200
2496 | data:
2497 | properties:
2498 | hasNewVersion:
2499 | type: boolean
2500 | description: 是否有新版本
2501 | name:
2502 | type: string
2503 | example: 删除日志
2504 | lastVersion:
2505 | type: string
2506 | description: 下个版本
2507 | lastLog:
2508 | type: string
2509 | description: 更新日志
2510 |
2511 | '401':
2512 | description: 未授权
2513 | content:
2514 | application/json:
2515 | schema:
2516 | properties:
2517 | code:
2518 | type: integer
2519 | example: 401
2520 | message:
2521 | type: string
2522 | example: UnauthorizedError
2523 | /system/update:
2524 | put:
2525 | tags:
2526 | - 系统管理
2527 | summary: 更新面板
2528 | description: 使用 Token 更新面板
2529 | security:
2530 | - HTTPBearer: []
2531 | responses:
2532 | '200':
2533 | description: 成功
2534 | content:
2535 | application/json:
2536 | schema:
2537 | properties:
2538 | code:
2539 | type: integer
2540 | example: 200
2541 |
2542 | '401':
2543 | description: 未授权
2544 | content:
2545 | application/json:
2546 | schema:
2547 | properties:
2548 | code:
2549 | type: integer
2550 | example: 401
2551 | message:
2552 | type: string
2553 | example: UnauthorizedError
2554 | components:
2555 | schemas: {}
2556 | securitySchemes:
2557 | HTTPBearer:
2558 | type: http
2559 | description: require a authorization
2560 | scheme: bearer
--------------------------------------------------------------------------------
/qinglong.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ukenn2112/qinglongAPI_doc/55cf8f8093990ddfd945fd43ebb4dc6db7c08cfa/qinglong.ico
--------------------------------------------------------------------------------