diff --git a/Bruno Collection - CDS Videos Publish Video.json b/Bruno Collection - CDS Videos Publish Video.json
new file mode 100644
index 000000000..f49531916
--- /dev/null
+++ b/Bruno Collection - CDS Videos Publish Video.json
@@ -0,0 +1,306 @@
+{
+ "name": "CDS Videos Publish Video",
+ "version": "1",
+ "items": [
+ {
+ "type": "http",
+ "name": "Optional Change access of the video",
+ "seq": 8,
+ "request": {
+ "url": "{{baseURl}}/api/deposits/video/{{video_id}}",
+ "method": "PUT",
+ "headers": [
+ {
+ "name": "content-type",
+ "value": "application/vnd.video.partial+json",
+ "enabled": true
+ }
+ ],
+ "params": [],
+ "body": {
+ "mode": "json",
+ "json": "{\n \"_access\": {\n \"update\": [\n \"admin@test.ch\",\n \"atlas-outreach-cds-video@cern.ch\" //Update the access according to category\n ],\n // If you want to restrict the video, update access read\n \"read\": [\n \"atlas-readaccess-active-members@cern.ch\"\n ]\n\n }\n}\n\n",
+ "formUrlEncoded": [],
+ "multipartForm": []
+ },
+ "script": {},
+ "vars": {},
+ "assertions": [],
+ "tests": "",
+ "auth": {
+ "mode": "inherit"
+ }
+ }
+ },
+ {
+ "type": "http",
+ "name": "Get project to check the flow is finished",
+ "seq": 5,
+ "request": {
+ "url": "{{baseURl}}/api/deposits/project/{{project_id}}",
+ "method": "GET",
+ "headers": [
+ {
+ "name": "content-type",
+ "value": "application/vnd.project.partial+json",
+ "enabled": true
+ }
+ ],
+ "params": [],
+ "body": {
+ "mode": "json",
+ "json": "",
+ "formUrlEncoded": [],
+ "multipartForm": []
+ },
+ "script": {},
+ "vars": {},
+ "assertions": [],
+ "tests": "",
+ "auth": {
+ "mode": "inherit"
+ }
+ }
+ },
+ {
+ "type": "http",
+ "name": "Step 1- Create a project",
+ "seq": 1,
+ "request": {
+ "url": "{{baseURl}}/api/deposits/project/",
+ "method": "POST",
+ "headers": [
+ {
+ "name": "content-type",
+ "value": "application/vnd.project.partial+json",
+ "enabled": true
+ }
+ ],
+ "params": [],
+ "body": {
+ "mode": "json",
+ "json": "{\n \"$schema\": \"https://localhost:5000/schemas/deposits/records/videos/project/project-v1.0.0.json\",\n \"_access\": {\n \"update\": [\n \"admin@test.ch\",\n \"atlas-outreach-cds-video@cern.ch\"\n ],\n \"read\": [ // If you want to restrict the project, add access read\n \"atlas-readaccess-active-members@cern.ch\"\n ]\n },\n // Add category and type\n \"category\": \"ATLAS\",\n \"type\": \"VIDEO\"\n}",
+ "formUrlEncoded": [],
+ "multipartForm": []
+ },
+ "script": {
+ "res": "let data = res.body ;\nbru.setEnvVar(\"project_id\", data.id);"
+ },
+ "vars": {},
+ "assertions": [],
+ "tests": "",
+ "auth": {
+ "mode": "inherit"
+ }
+ }
+ },
+ {
+ "type": "http",
+ "name": "Step 2- Create a video",
+ "seq": 2,
+ "request": {
+ "url": "{{baseURl}}/api/deposits/video/",
+ "method": "POST",
+ "headers": [
+ {
+ "name": "content-type",
+ "value": "application/vnd.video.partial+json",
+ "enabled": true
+ }
+ ],
+ "params": [],
+ "body": {
+ "mode": "json",
+ "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\": \"Civelek, Zubeyde\",\n \"ids\": [\n {\n \"value\": \"868056\",\n \"source\": \"cern\"\n }\n ],\n \"email\": \"zubeyde.civelek@cern.ch\",\n \"role\": \"Co-Producer\"\n }\n ],\n \"description\": \"Description\",\n \"date\": \"2024-11-12\"\n}",
+ "formUrlEncoded": [],
+ "multipartForm": []
+ },
+ "script": {
+ "res": "let data = res.body ;\nbru.setEnvVar(\"video_id\", data.id);\nbru.setEnvVar(\"bucket_id\", data.metadata._buckets.deposit);\n"
+ },
+ "vars": {},
+ "assertions": [],
+ "tests": "",
+ "auth": {
+ "mode": "inherit"
+ }
+ }
+ },
+ {
+ "type": "http",
+ "name": "Step 3- Upload the video",
+ "seq": 3,
+ "request": {
+ "url": "{{baseURl}}/api/files/{{bucket_id}}/{{video_name}}",
+ "method": "PUT",
+ "headers": [
+ {
+ "name": "content-type",
+ "value": "video/mp4",
+ "enabled": true
+ },
+ {
+ "name": "Accept",
+ "value": "application/json, text/plain, */*",
+ "enabled": true
+ },
+ {
+ "name": "Accept-Encoding",
+ "value": "gzip, deflate, br, zstd",
+ "enabled": true
+ }
+ ],
+ "params": [],
+ "body": {
+ "mode": "formUrlEncoded",
+ "formUrlEncoded": [],
+ "multipartForm": [
+ {
+ "type": "file",
+ "name": "",
+ "value": [
+ "/Users/zubeydecivelek/Downloads/217490_medium.mp4"
+ ],
+ "enabled": true
+ }
+ ]
+ },
+ "script": {
+ "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",
+ "res": "let data = res.body ;\nbru.setEnvVar(\"main_file_version_id\", data.version_id);\nbru.setEnvVar(\"video_key\", data.key);"
+ },
+ "vars": {},
+ "assertions": [],
+ "tests": "",
+ "auth": {
+ "mode": "inherit"
+ }
+ }
+ },
+ {
+ "type": "http",
+ "name": "Step 4- Create a flow",
+ "seq": 4,
+ "request": {
+ "url": "{{baseURl}}/api/flows/",
+ "method": "POST",
+ "headers": [
+ {
+ "name": "content-type",
+ "value": "application/vnd.project.partial+json",
+ "enabled": true
+ }
+ ],
+ "params": [],
+ "body": {
+ "mode": "json",
+ "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}",
+ "formUrlEncoded": [],
+ "multipartForm": []
+ },
+ "script": {},
+ "vars": {},
+ "assertions": [],
+ "tests": "",
+ "auth": {
+ "mode": "inherit"
+ }
+ }
+ },
+ {
+ "type": "http",
+ "name": "Step 5- Upload additional file",
+ "seq": 6,
+ "request": {
+ "url": "{{baseURl}}/api/files/{{bucket_id}}/{{additional_file}}",
+ "method": "PUT",
+ "headers": [],
+ "params": [],
+ "body": {
+ "mode": "json",
+ "json": "",
+ "formUrlEncoded": [],
+ "multipartForm": []
+ },
+ "script": {
+ "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"
+ },
+ "vars": {},
+ "assertions": [],
+ "tests": "",
+ "auth": {
+ "mode": "inherit"
+ }
+ }
+ },
+ {
+ "type": "http",
+ "name": "Step 6- Publish",
+ "seq": 7,
+ "request": {
+ "url": "{{baseURl}}/api/deposits/video/{{video_id}}/actions/publish",
+ "method": "POST",
+ "headers": [
+ {
+ "name": "content-type",
+ "value": "application/json",
+ "enabled": true
+ }
+ ],
+ "params": [],
+ "body": {
+ "mode": "json",
+ "json": "",
+ "formUrlEncoded": [],
+ "multipartForm": []
+ },
+ "script": {},
+ "vars": {},
+ "assertions": [],
+ "tests": "",
+ "auth": {
+ "mode": "inherit"
+ }
+ }
+ }
+ ],
+ "activeEnvironmentUid": "zqLEVCQ0eIhimP48VysTg",
+ "environments": [
+ {
+ "variables": [
+ {
+ "name": "baseURl",
+ "value": "https://localhost:5000/",
+ "enabled": true,
+ "secret": false,
+ "type": "text"
+ }
+ ],
+ "name": "Localhost"
+ }
+ ],
+ "root": {
+ "request": {
+ "auth": {
+ "mode": "bearer",
+ "bearer": {
+ "token": "CHANGE HERE"
+ }
+ }
+ }
+ },
+ "brunoConfig": {
+ "version": "1",
+ "name": "CDS Videos Publish Video",
+ "type": "collection",
+ "scripts": {
+ "filesystemAccess": {
+ "allow": true
+ }
+ },
+ "ignore": [
+ "node_modules",
+ ".git"
+ ]
+ }
+}
\ No newline at end of file
diff --git a/README.rst b/README.rst
index c511d3a48..54b8106e1 100644
--- a/README.rst
+++ b/README.rst
@@ -185,10 +185,10 @@ Publish Video through REST API
Generate a Personal Access Token
---------------------------------
- - Navigate to the ``CDS Videos`` platform.
- - Click your user info in the top-right corner.
- - Go to **Applications** and create a new **Personal Access Token**.
- - Copy the token and store it securely.
+- Navigate to the ``CDS Videos`` platform.
+- Click your user info in the top-right corner.
+- Go to **Applications** and create a new **Personal Access Token**.
+- Copy the token and store it securely.
Using `Bruno`
~~~~~~~~~~~~~
@@ -197,11 +197,12 @@ If you'd like to use the pre-configured REST API collection in Bruno, ensure you
1. **Install Bruno:**
- Visit the official Bruno `Bruno collection <./Bruno Collection - CDS Videos Publish Video.json>`_ or repository and install the application.
+ Visit the official Bruno `documentation `_ or repository and install the application.
-2. **Create an Environment for the Collection:**
+2. **Import the Collection:**
- - Open Bruno and import this [collection](https://link).
+ - Download this `Bruno collection <./Bruno%20Collection%20-%20CDS%20Videos%20Publish%20Video.json>`_.
+ - Open Bruno and import downloaded collection.
- Create an environment for the collection.
- Configure the environment by adding a variable named ``baseURl``. Set its value to your API base URL (e.g., ``http://localhost:5000``).
@@ -231,22 +232,48 @@ Step 1: Create a Project
- **Type**
- **Location**
- **Description**
+ - **Required/Optional**
* - **$schema**
- string
- body
- Schema URL for the project creation.
+ - Required
* - **category**
- string
- body
- Category of the project.
+ - Required
* - **type**
- string
- body
- Type of the project.
+ - Required
* - **_access**
- json
- body
- - Access options for the video.
+ - Access options for the project.
+ - Optional
+ * - **contributors**
+ - array