|
| 1 | +info: |
| 2 | + get: |
| 3 | + summary: Get the global transfer information |
| 4 | + responses: |
| 5 | + '200': |
| 6 | + description: OK |
| 7 | + content: |
| 8 | + application/json: |
| 9 | + schema: |
| 10 | + type: object |
| 11 | + properties: |
| 12 | + dl_info_speed: |
| 13 | + description: Global download rate in bytes per second |
| 14 | + type: number |
| 15 | + dl_info_data: |
| 16 | + description: Data downloaded this session in bytes |
| 17 | + type: number |
| 18 | + dl_rate_limit: |
| 19 | + description: Download rate limit in bytes per second |
| 20 | + type: number |
| 21 | + up_info_speed: |
| 22 | + description: Global upload rate in bytes per second |
| 23 | + type: number |
| 24 | + up_info_data: |
| 25 | + description: Data uploaded this session in bytes |
| 26 | + type: number |
| 27 | + up_rate_limit: |
| 28 | + description: Upload rate limit in bytes per second |
| 29 | + type: number |
| 30 | + dht_nodes: |
| 31 | + description: Number of DHT nodes connected to |
| 32 | + type: number |
| 33 | + connection_status: |
| 34 | + description: Connection status |
| 35 | + type: string |
| 36 | + enum: |
| 37 | + - connected |
| 38 | + - firewalled |
| 39 | + - disconnected |
| 40 | + required: |
| 41 | + - 'dl_info_speed' |
| 42 | + - 'dl_info_data' |
| 43 | + - 'dl_rate_limit' |
| 44 | + - 'up_info_speed' |
| 45 | + - 'up_info_data' |
| 46 | + - 'up_rate_limit' |
| 47 | + - 'dht_nodes' |
| 48 | + - 'connection_status' |
| 49 | + '403': |
| 50 | + $ref: 'main.yml#/components/responses/403forbidden' |
| 51 | +uploadLimit: |
| 52 | + get: |
| 53 | + summary: Get upload speed limit |
| 54 | + responses: |
| 55 | + '200': |
| 56 | + $ref: 'main.yml#/components/responses/200TextOK' |
| 57 | + '403': |
| 58 | + $ref: 'main.yml#/components/responses/403forbidden' |
| 59 | +downloadLimit: |
| 60 | + get: |
| 61 | + summary: Get download speed limit |
| 62 | + responses: |
| 63 | + '200': |
| 64 | + $ref: 'main.yml#/components/responses/200TextOK' |
| 65 | + '403': |
| 66 | + $ref: 'main.yml#/components/responses/403forbidden' |
| 67 | +setUploadLimit: |
| 68 | + post: |
| 69 | + summary: Set upload speed limit |
| 70 | + requestBody: |
| 71 | + required: true |
| 72 | + content: |
| 73 | + application/x-www-form-urlencoded: |
| 74 | + schema: |
| 75 | + type: object |
| 76 | + properties: |
| 77 | + limit: |
| 78 | + description: Speed limit in bytes per second. Negative values disable the limit. Non-negative values below 1024 are clamped to 1024. |
| 79 | + type: number |
| 80 | + required: ['limit'] |
| 81 | + responses: |
| 82 | + '200': |
| 83 | + $ref: 'main.yml#/components/responses/200simpleOK' |
| 84 | + '403': |
| 85 | + $ref: 'main.yml#/components/responses/403forbidden' |
| 86 | +setDownloadLimit: |
| 87 | + post: |
| 88 | + summary: Set download speed limit |
| 89 | + requestBody: |
| 90 | + required: true |
| 91 | + content: |
| 92 | + application/x-www-form-urlencoded: |
| 93 | + schema: |
| 94 | + type: object |
| 95 | + properties: |
| 96 | + limit: |
| 97 | + description: Speed limit in bytes per second. Negative values disable the limit. Non-negative values below 1024 are clamped to 1024. |
| 98 | + type: number |
| 99 | + required: ['limit'] |
| 100 | + responses: |
| 101 | + '200': |
| 102 | + $ref: 'main.yml#/components/responses/200simpleOK' |
| 103 | + '403': |
| 104 | + $ref: 'main.yml#/components/responses/403forbidden' |
| 105 | +toggleSpeedLimitsMode: |
| 106 | + post: |
| 107 | + summary: Toggle speed limit mode |
| 108 | + description: Toggle speed limit mode between normal and alternative |
| 109 | + responses: |
| 110 | + '200': |
| 111 | + $ref: 'main.yml#/components/responses/200simpleOK' |
| 112 | + '403': |
| 113 | + $ref: 'main.yml#/components/responses/403forbidden' |
| 114 | +speedLimitsMode: |
| 115 | + get: |
| 116 | + summary: Get speed limit mode |
| 117 | + description: '`1` means alternative mode and `0` normal mode' |
| 118 | + responses: |
| 119 | + '200': |
| 120 | + description: OK |
| 121 | + content: |
| 122 | + text/plain; charset=UTF-8: |
| 123 | + schema: |
| 124 | + type: number |
| 125 | + enum: |
| 126 | + - 0 |
| 127 | + - 1 |
| 128 | + '403': |
| 129 | + $ref: 'main.yml#/components/responses/403forbidden' |
| 130 | +setSpeedLimitsMode: |
| 131 | + post: |
| 132 | + summary: Set speed limit mode |
| 133 | + requestBody: |
| 134 | + required: true |
| 135 | + content: |
| 136 | + application/x-www-form-urlencoded: |
| 137 | + schema: |
| 138 | + type: object |
| 139 | + properties: |
| 140 | + mode: |
| 141 | + description: '`1` means alternative mode and `0` normal mode.' |
| 142 | + type: number |
| 143 | + enum: |
| 144 | + - 0 |
| 145 | + - 1 |
| 146 | + required: ['mode'] |
| 147 | + responses: |
| 148 | + '200': |
| 149 | + $ref: 'main.yml#/components/responses/200simpleOK' |
| 150 | + '400': |
| 151 | + $ref: 'main.yml#/components/responses/400badRequest' |
| 152 | + '403': |
| 153 | + $ref: 'main.yml#/components/responses/403forbidden' |
| 154 | +banPeers: |
| 155 | + post: |
| 156 | + summary: Ban peers |
| 157 | + requestBody: |
| 158 | + required: true |
| 159 | + content: |
| 160 | + application/x-www-form-urlencoded: |
| 161 | + schema: |
| 162 | + type: object |
| 163 | + properties: |
| 164 | + peers: |
| 165 | + description: List of peer IPs to ban. Each list item is separated by the `|` character. |
| 166 | + type: string |
| 167 | + required: ['peers'] |
| 168 | + responses: |
| 169 | + '200': |
| 170 | + $ref: 'main.yml#/components/responses/200simpleOK' |
| 171 | + '403': |
| 172 | + $ref: 'main.yml#/components/responses/403forbidden' |
0 commit comments