-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathrequests.http
161 lines (125 loc) · 3.24 KB
/
requests.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# #### #
# MISC #
# #### #
### App information
GET {{host}}/info
# ############## #
# Video download #
# ############## #
### Video download (GET)
GET {{host}}/download?url=https://www.youtube.com/watch?v=a0sxBO9HZ-M&presets=SD
> {%
client.global.set('redis_id', response.body.downloads[0]._redis_id)
%}
### Livestream download (GET)
GET {{host}}/download?url=https://www.youtube.com/watch?v=W6OOnrx8g58&presets=SD
> {%
client.global.set('redis_id', response.body.downloads[0]._redis_id)
%}
### Video download (POST)
POST {{host}}/download?url=https://www.youtube.com/watch?v=a0sxBO9HZ-M
Content-Type: application/json
{
"cookies": "URL encoded (RFC3986 format) netscape cookies format",
"presets": [
{
"_preset": "AUDIO"
}
]
}
### Video download with a programmation (POST)
POST {{host}}/download?url=https://www.youtube.com/watch?v=W6OOnrx8g58
Content-Type: application/json
{
"programmation": {
"planning": {
"recording_duration": 1
}
},
"presets": [
{
"_preset": "SD"
}
]
}
> {%
client.global.set('redis_id', response.body.downloads[0]._redis_id)
%}
### Download with CLI (POST)
POST {{host}}/download?url=https://www.youtube.com/watch?v=a0sxBO9HZ-M
Content-Type: application/json
{
"presets": [
{
"_template" : "AUDIO",
"_cli" : "-f bestaudio --embed-metadata --embed-thumbnail --extract-audio --audio-format mp3 --split-chapters"
}
]
}
> {%
client.global.set('redis_id', response.body.downloads[0]._redis_id)
%}
### Redownload failed (GET)
GET {{host}}/download/{{ redis_id }}/failed
### Extract informations (GET)
GET {{host}}/extract_info?url=https://www.youtube.com/watch?v=a0sxBO9HZ-M
### Extract informations (POST)
POST {{host}}/extract_info?url=https://www.youtube.com/watch?v=a0sxBO9HZ-M
Content-Type: application/json
{
"cookies": "URL encoded (RFC3986 format) netscape cookies format"
}
###
# ################ #
# Queue management #
# ################ #
### Active downloads (GET)
GET {{host}}/active_downloads
### Terminate all active downloads (GET)
GET {{host}}/active_downloads/terminate
### Terminate given download (GET)
GET {{host}}/active_downloads/terminate/{{redis_id}}
### Redis registries content (GET)
GET {{host}}/queue
### Redis registry content (GET)
GET {{host}}/queue/started_job
### Clear redis registries (DELETE)
DELETE {{host}}/queue
### Update download metadata (PUT)
PUT {{host}}/queue/{{redis_id}}
Content-Type: application/json
{
"programmation_end_date": "2025-12-25T12:00:00"
}
###
# ############# #
# Programmation #
# ############# #
### All programmations (GET)
GET {{host}}/programmation
### Create programmation (POST)
POST {{host}}/programmation?url=video_url
Content-Type: application/json
{
"planning": {
"recurrence_cron": "25 10 * * *"
},
"extra_parameters": {
"send_notification": false
}
}
> {%
client.global.set('programmation_id', response.body.id)
%}
### Delete programmation by ID (DELETE)
DELETE {{host}}/programmation/{{programmation_id}}
### Delete programmation by URL (DELETE)
DELETE {{host}}/programmation?url=video_url
### Update programmation (PUT)
PUT {{host}}/programmation/{{programmation_id}}
Content-Type: application/json
{
"planning": {
"recurrence_cron": "00 20 * * *"
}
}