|
4 | 4 | "items": [
|
5 | 5 | {
|
6 | 6 | "type": "http",
|
7 |
| - "name": "Optional Change access of the video", |
8 |
| - "seq": 8, |
| 7 | + "name": "Step 6: Get Project to Check the Flow Status", |
| 8 | + "seq": 7, |
9 | 9 | "request": {
|
10 |
| - "url": "{{baseURL}}/api/deposits/video/{{video_id}}", |
11 |
| - "method": "PUT", |
| 10 | + "url": "{{baseURL}}/api/deposits/project/{{project_id}}", |
| 11 | + "method": "GET", |
12 | 12 | "headers": [
|
13 | 13 | {
|
14 | 14 | "name": "content-type",
|
15 |
| - "value": "application/vnd.video.partial+json", |
| 15 | + "value": "application/vnd.project.partial+json", |
16 | 16 | "enabled": true
|
17 | 17 | }
|
18 | 18 | ],
|
19 | 19 | "params": [],
|
20 | 20 | "body": {
|
21 | 21 | "mode": "json",
|
22 |
| - "json": "{\n \"_access\": {\n \"update\": [\n \"[email protected]\",\n \"[email protected]\" //Update the access according to category\n ],\n // If you want to restrict the video, update access read\n \"read\": [\n \"[email protected]\"\n ]\n\n }\n}\n\n", |
| 22 | + "json": "", |
23 | 23 | "formUrlEncoded": [],
|
24 | 24 | "multipartForm": []
|
25 | 25 | },
|
|
34 | 34 | },
|
35 | 35 | {
|
36 | 36 | "type": "http",
|
37 |
| - "name": "Get project to check the flow is finished", |
38 |
| - "seq": 5, |
| 37 | + "name": "Optional: Update the Access of the Video", |
| 38 | + "seq": 6, |
39 | 39 | "request": {
|
40 |
| - "url": "{{baseURL}}/api/deposits/project/{{project_id}}", |
41 |
| - "method": "GET", |
| 40 | + "url": "{{baseURL}}/api/deposits/video/{{video_id}}", |
| 41 | + "method": "PUT", |
42 | 42 | "headers": [
|
43 | 43 | {
|
44 | 44 | "name": "content-type",
|
45 |
| - "value": "application/vnd.project.partial+json", |
| 45 | + "value": "application/vnd.video.partial+json", |
46 | 46 | "enabled": true
|
47 | 47 | }
|
48 | 48 | ],
|
49 | 49 | "params": [],
|
50 | 50 | "body": {
|
51 | 51 | "mode": "json",
|
52 |
| - "json": "", |
| 52 | + "json": "{\n \"_access\": {\n \"update\": [\n \"[email protected]\",\n \"[email protected]\" \n ],\n // If you want to restrict the video, update access read\n \"read\": [\n \"[email protected]\"\n ]\n\n }\n}\n\n", |
53 | 53 | "formUrlEncoded": [],
|
54 | 54 | "multipartForm": []
|
55 | 55 | },
|
|
64 | 64 | },
|
65 | 65 | {
|
66 | 66 | "type": "http",
|
67 |
| - "name": "Step 1- Create a project", |
| 67 | + "name": "Step 1: Create a project", |
68 | 68 | "seq": 1,
|
69 | 69 | "request": {
|
70 | 70 | "url": "{{baseURL}}/api/deposits/project/",
|
|
96 | 96 | },
|
97 | 97 | {
|
98 | 98 | "type": "http",
|
99 |
| - "name": "Step 2- Create a video", |
| 99 | + "name": "Step 2: Create a video", |
100 | 100 | "seq": 2,
|
101 | 101 | "request": {
|
102 | 102 | "url": "{{baseURL}}/api/deposits/video/",
|
|
111 | 111 | "params": [],
|
112 | 112 | "body": {
|
113 | 113 | "mode": "json",
|
114 |
| - "json": "{\n \"$schema\":\"https://localhost:5000/schemas/deposits/records/videos/video/video-v1.0.0.json\",\n \"_project_id\":\"{{project_id}}\",\n \"title\":\n {\n \"title\":\"217490_medium\"\n },\n\n \"vr\": false,\n \"featured\": false,\n \"language\": \"en\",\n \"contributors\": [\n {\n \"name\": \"Surname, Name\",\n \"ids\": [\n {\n \"value\": \"868056\",\n \"source\": \"cern\"\n }\n ],\n \"email\": \"[email protected]\",\n \"role\": \"Co-Producer\"\n }\n ],\n \"description\": \"Description\",\n \"date\": \"2024-11-12\"\n}", |
| 114 | + "json": "{\n \"$schema\":\"https://localhost:5000/schemas/deposits/records/videos/video/video-v1.0.0.json\",\n \"_project_id\":\"{{project_id}}\",\n \"title\":\n {\n \"title\":\"your_title\"\n },\n \"_access\": {\n \"read\": [\n \" [email protected]\"\n ]\n },\n \"vr\": false,\n \"featured\": false,\n \"language\": \"en\",\n \"contributors\": [\n {\n \"name\": \"Surname, Name\",\n \"ids\": [\n {\n \"value\": \"cern id\",\n \"source\": \"cern\"\n }\n ],\n \"email\": \" [email protected]\",\n \"role\": \"Co-Producer\"\n }\n ],\n \"description\": \"Description\",\n \"date\": \"2024-11-12\",\n \"keywords\":[\n {\n \"name\": \"keyword\",\n \"value\": {\n \"name\": \"keyword\"\n }\n },\n {\n \"name\": \"keyword2\",\n \"value\": {\n \"name\": \"keyword2\"\n }\n }\n ],\n \"related_links\":[\n {\n \"name\": \"related link\",\n \"url\": \"https://relatedlink\"\n }\n ]\n}", |
115 | 115 | "formUrlEncoded": [],
|
116 | 116 | "multipartForm": []
|
117 | 117 | },
|
|
128 | 128 | },
|
129 | 129 | {
|
130 | 130 | "type": "http",
|
131 |
| - "name": "Step 3- Upload the video", |
| 131 | + "name": "Step 3: Upload the video", |
132 | 132 | "seq": 3,
|
133 | 133 | "request": {
|
134 | 134 | "url": "{{baseURL}}/api/files/{{bucket_id}}/{{video_name}}",
|
|
152 | 152 | ],
|
153 | 153 | "params": [],
|
154 | 154 | "script": {
|
155 |
| - "req": "const fs = require('fs');\nconst path = require('path');\n\n// File details\nconst filename = \"CHANGE HERE\";\nconst filePath = \"CHANGE HERE\";\nbru.setEnvVar(\"video_name\",filename);\n\n// Read the file as raw binary data\nconst fileContent = fs.readFileSync(filePath);\n\n// Set request headers\nreq.setHeader(\"Content-Type\", \"video/mp4\"); // File content type\nreq.setHeader(\"Accept\", \"application/json, text/plain, */*\"); \nreq.setHeader(\"Accept-Encoding\", \"gzip, deflate, br, zstd\"); \nreq.setHeader(\"Content-Length\", fileContent.length);\n\n// Attach the file content as the request body\nreq.setBody(fileContent);\n", |
| 155 | + "req": "const fs = require('fs');\nconst path = require('path');\n\n// File details\nconst filename = \"video_name.mp4\"; // CHANGE HERE\nconst filePath = \"video_file_path\"; // CHANGE HERE\nbru.setEnvVar(\"video_name\",filename);\n\n// Read the file as raw binary data\nconst fileContent = fs.readFileSync(filePath);\n\n// Set request headers\nreq.setHeader(\"Content-Type\", \"video/mp4\"); // File content type\nreq.setHeader(\"Accept\", \"application/json, text/plain, */*\"); \nreq.setHeader(\"Accept-Encoding\", \"gzip, deflate, br, zstd\"); \nreq.setHeader(\"Content-Length\", fileContent.length);\n\n// Attach the file content as the request body\nreq.setBody(fileContent);\n", |
156 | 156 | "res": "let data = res.body ;\nbru.setEnvVar(\"main_file_version_id\", data.version_id);\nbru.setEnvVar(\"video_key\", data.key);"
|
157 | 157 | },
|
158 | 158 | "vars": {},
|
|
165 | 165 | },
|
166 | 166 | {
|
167 | 167 | "type": "http",
|
168 |
| - "name": "Step 4- Create a flow", |
| 168 | + "name": "Step 4: Create a flow", |
169 | 169 | "seq": 4,
|
170 | 170 | "request": {
|
171 | 171 | "url": "{{baseURL}}/api/flows/",
|
|
180 | 180 | "params": [],
|
181 | 181 | "body": {
|
182 | 182 | "mode": "json",
|
183 |
| - "json": "{\n \"version_id\":\"{{main_file_version_id}}\", //response of the put the video 'version_id' \n \"key\": \"{{video_key}}\",//response of the put the video 'key' \n \"bucket_id\":\"{{bucket_id}}\", // create video response \n \"deposit_id\":\"{{video_id}}\" // create video response\n}", |
| 183 | + "json": "{\n \"version_id\":\"{{main_file_version_id}}\", //response of the `upload the video` 'version_id' \n \"key\": \"{{video_key}}\", //response of the `upload the video` 'key' \n \"bucket_id\":\"{{bucket_id}}\", // create video response \n \"deposit_id\":\"{{video_id}}\" // create video response\n}", |
184 | 184 | "formUrlEncoded": [],
|
185 | 185 | "multipartForm": []
|
186 | 186 | },
|
|
195 | 195 | },
|
196 | 196 | {
|
197 | 197 | "type": "http",
|
198 |
| - "name": "Step 5- Upload additional file", |
199 |
| - "seq": 6, |
| 198 | + "name": "Step 5: Upload additional file", |
| 199 | + "seq": 5, |
200 | 200 | "request": {
|
201 | 201 | "url": "{{baseURL}}/api/files/{{bucket_id}}/{{additional_file}}",
|
202 | 202 | "method": "PUT",
|
|
209 | 209 | "multipartForm": []
|
210 | 210 | },
|
211 | 211 | "script": {
|
212 |
| - "req": "const fs = require('fs');\nconst path = require('path');\n\n// File details\nconst filename = \"CHANGE HERE\";\nconst filePath = \"CHANGE HERE\";\nbru.setEnvVar(\"additional_file\", filename);\n\n// Read the file as raw binary data\nconst fileContent = fs.readFileSync(filePath);\n\n// Set request headers\nreq.setHeader(\"Accept\", \"application/json, text/plain, */*\"); \nreq.setHeader(\"Accept-Encoding\", \"gzip, deflate, br, zstd\"); \nreq.setHeader(\"Content-Length\", fileContent.length);\n\n// Attach the file content as the request body\nreq.setBody(fileContent);\n" |
| 212 | + "req": "const fs = require('fs');\nconst path = require('path');\n\n// File details\nconst filename = \"video_name.mp4\"; // CHANGE HERE\nconst filePath = \"video_file_path\"; // CHANGE HERE\nbru.setEnvVar(\"additional_file\", filename);\n\n// Read the file as raw binary data\nconst fileContent = fs.readFileSync(filePath);\n\n// Set request headers\nreq.setHeader(\"Accept\", \"application/json, text/plain, */*\"); \nreq.setHeader(\"Accept-Encoding\", \"gzip, deflate, br, zstd\"); \nreq.setHeader(\"Content-Length\", fileContent.length);\n\n// Attach the file content as the request body\nreq.setBody(fileContent);\n" |
213 | 213 | },
|
214 | 214 | "vars": {},
|
215 | 215 | "assertions": [],
|
|
221 | 221 | },
|
222 | 222 | {
|
223 | 223 | "type": "http",
|
224 |
| - "name": "Step 6- Publish", |
225 |
| - "seq": 7, |
| 224 | + "name": "Step 7: Publish", |
| 225 | + "seq": 8, |
226 | 226 | "request": {
|
227 | 227 | "url": "{{baseURL}}/api/deposits/video/{{video_id}}/actions/publish",
|
228 | 228 | "method": "POST",
|
|
250 | 250 | }
|
251 | 251 | }
|
252 | 252 | ],
|
253 |
| - "activeEnvironmentUid": "zqLEVCQ0eIhimP48VysTg", |
| 253 | + "activeEnvironmentUid": "O01m8KLYsgrkGRjOSv443", |
254 | 254 | "environments": [
|
255 | 255 | {
|
256 | 256 | "variables": [
|
|
0 commit comments