{"_id":"56bbd018a01114190060bc90","version":"5671bb92a0ee9b0d00185325","body":"##Welcome!##\nWelcome to the medvid.io API! This site contains comprehensive documentation covering every aspect of the medvid.io API.\n\n##Developer Account##\nIn order to use the medvid.io API you will need to have a medvid.io Developer Account. You can [Sign Up Here](https://mercury.reeldx.com).\n\n##API Explorer##\nThe API documentation on this site includes an interactive API Explorer; this tool will allow you to test out various API calls in real time directly from the documentation\n\nIn order for you to use the API Explorer you will need to generate a valid JSON Web Token (JWT). Refer to [Authorization - Bearer Tokens](/docs/auth-bearer-tokens) for further details on creating your JWT.\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"Some API endpoints may require JWTs with differing payloads; refer to specific endpoint documentation for more details.\",\n  \"title\": \"Note on JWTs\"\n}\n[/block]\n## API Endpoints##\nIf you want to jump right to the API endpoint documentation [Head Here](/docs/users-overview).","category":"5671bb93a0ee9b0d00185326","user":"5671bb4d5e49250d006648fd","type":"basic","createdAt":"2016-02-11T00:04:40.471Z","order":0,"project":"5671bb91a0ee9b0d00185322","slug":"overview","link_url":"","title":"Overview","updates":[],"__v":1,"githubsync":"","hidden":false,"link_external":false,"api":{"results":{"codes":[]},"settings":"","url":"","auth":"required","params":[]},"excerpt":"","sync_unique":"","childrenPages":[]}

Overview


##Welcome!## Welcome to the medvid.io API! This site contains comprehensive documentation covering every aspect of the medvid.io API. ##Developer Account## In order to use the medvid.io API you will need to have a medvid.io Developer Account. You can [Sign Up Here](https://mercury.reeldx.com). ##API Explorer## The API documentation on this site includes an interactive API Explorer; this tool will allow you to test out various API calls in real time directly from the documentation In order for you to use the API Explorer you will need to generate a valid JSON Web Token (JWT). Refer to [Authorization - Bearer Tokens](/docs/auth-bearer-tokens) for further details on creating your JWT. [block:callout] { "type": "warning", "body": "Some API endpoints may require JWTs with differing payloads; refer to specific endpoint documentation for more details.", "title": "Note on JWTs" } [/block] ## API Endpoints## If you want to jump right to the API endpoint documentation [Head Here](/docs/users-overview).
##Welcome!## Welcome to the medvid.io API! This site contains comprehensive documentation covering every aspect of the medvid.io API. ##Developer Account## In order to use the medvid.io API you will need to have a medvid.io Developer Account. You can [Sign Up Here](https://mercury.reeldx.com). ##API Explorer## The API documentation on this site includes an interactive API Explorer; this tool will allow you to test out various API calls in real time directly from the documentation In order for you to use the API Explorer you will need to generate a valid JSON Web Token (JWT). Refer to [Authorization - Bearer Tokens](/docs/auth-bearer-tokens) for further details on creating your JWT. [block:callout] { "type": "warning", "body": "Some API endpoints may require JWTs with differing payloads; refer to specific endpoint documentation for more details.", "title": "Note on JWTs" } [/block] ## API Endpoints## If you want to jump right to the API endpoint documentation [Head Here](/docs/users-overview).
{"_id":"56bbb6cadabd992100b6758e","link_url":"","sync_unique":"","updates":[],"body":"The medvid.io API supports the following video input, output, and transcoding capabilities.\n\n##Input Video Formats##\n**NOTE: Maximum file upload size for a video is set to 4GB.**\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Format\",\n    \"h-1\": \"Extension\",\n    \"0-1\": \".mp4, .mov, QuickTime container\",\n    \"0-0\": \"MP4\",\n    \"1-0\": \"Flash Video\",\n    \"1-1\": \".flv\",\n    \"2-0\": \"Windows Media Video\",\n    \"2-1\": \".wmf\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\n##Output Video Formats##\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Format\",\n    \"h-1\": \"Notes\",\n    \"0-0\": \"HLS\",\n    \"1-0\": \"SMIL\",\n    \"0-1\": \"AES-128 Encrypted Stream delivered over SSL\",\n    \"h-2\": \"Platforms\",\n    \"0-2\": \"- iPhone\\n- iPod\\n- iPad (iOS 3.0 or later)\\n- QuickTime Player (10.0 or later)\\n- Safari (4.0 or later on Mac OS X version 10.6)\\n- Microsoft Edge (Windows 10 or later)\\n- Other players that support AES-128 HLS streams over SSL such as [JWPlayer Enterprise](https://www.jwplayer.com/products/jwplayer/), [Flowplayer](https://flowplayer.org/), etc.\",\n    \"1-1\": \"AES-128 Encrypted Stream delivered over SSL with automatic adaptive bitrate\",\n    \"1-2\": \"- iPhone\\n- iPod\\n- iPad (iOS 3.0 or later)\\n- QuickTime Player (10.0 or later)\\n- Safari (4.0 or later on Mac OS X version 10.6)\\n- Microsoft Edge (Windows 10 or later)\\n- Other players that support AES-128 HLS streams over SSL such as [JWPlayer Enterprise](https://www.jwplayer.com/products/jwplayer/), [Flowplayer](https://flowplayer.org/), etc.\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]\n##Transcoding#\nAll videos that are uploaded into the medvid.io API are run through our automatic transcoder. If necessary this transcoder will convert an uploaded video into our supported HLS output format. Additionally all videos will be transcoded into a range of resolutions and bitrates in addition to their original format:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Resolution\",\n    \"h-1\": \"Bitrate\",\n    \"0-0\": \"1920 x 1080\",\n    \"0-1\": \"3,000 kbit/s\",\n    \"1-1\": \"1,600 kbit/s\",\n    \"2-1\": \"900 kbit/s\",\n    \"3-1\": \"400 kbit/s\",\n    \"1-0\": \"1280 x 720\",\n    \"2-0\": \"854 x 480\",\n    \"3-0\": \"640 x 360\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\nVideo aspect ratio will be retained during transcoding. The above resolutions represent the expected output of a 16:9 video; other aspect ratios will have a similar selection of transcoded video artifacts.\n\nAdaptive bitrate video streams are delivered in SMIL format (using HLS) and are accessible through the [Get a Video API](/docs/videovideo_id) call.","excerpt":"","__v":7,"hidden":false,"order":1,"user":"5671bb4d5e49250d006648fd","version":"5671bb92a0ee9b0d00185325","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","url":""},"githubsync":"","createdAt":"2016-02-10T22:16:42.511Z","link_external":false,"project":"5671bb91a0ee9b0d00185322","slug":"video-capabilities","title":"Video Capabilities","type":"basic","category":"5671bb93a0ee9b0d00185326","childrenPages":[]}

Video Capabilities


The medvid.io API supports the following video input, output, and transcoding capabilities. ##Input Video Formats## **NOTE: Maximum file upload size for a video is set to 4GB.** [block:parameters] { "data": { "h-0": "Format", "h-1": "Extension", "0-1": ".mp4, .mov, QuickTime container", "0-0": "MP4", "1-0": "Flash Video", "1-1": ".flv", "2-0": "Windows Media Video", "2-1": ".wmf" }, "cols": 2, "rows": 3 } [/block] ##Output Video Formats## [block:parameters] { "data": { "h-0": "Format", "h-1": "Notes", "0-0": "HLS", "1-0": "SMIL", "0-1": "AES-128 Encrypted Stream delivered over SSL", "h-2": "Platforms", "0-2": "- iPhone\n- iPod\n- iPad (iOS 3.0 or later)\n- QuickTime Player (10.0 or later)\n- Safari (4.0 or later on Mac OS X version 10.6)\n- Microsoft Edge (Windows 10 or later)\n- Other players that support AES-128 HLS streams over SSL such as [JWPlayer Enterprise](https://www.jwplayer.com/products/jwplayer/), [Flowplayer](https://flowplayer.org/), etc.", "1-1": "AES-128 Encrypted Stream delivered over SSL with automatic adaptive bitrate", "1-2": "- iPhone\n- iPod\n- iPad (iOS 3.0 or later)\n- QuickTime Player (10.0 or later)\n- Safari (4.0 or later on Mac OS X version 10.6)\n- Microsoft Edge (Windows 10 or later)\n- Other players that support AES-128 HLS streams over SSL such as [JWPlayer Enterprise](https://www.jwplayer.com/products/jwplayer/), [Flowplayer](https://flowplayer.org/), etc." }, "cols": 3, "rows": 2 } [/block] ##Transcoding# All videos that are uploaded into the medvid.io API are run through our automatic transcoder. If necessary this transcoder will convert an uploaded video into our supported HLS output format. Additionally all videos will be transcoded into a range of resolutions and bitrates in addition to their original format: [block:parameters] { "data": { "h-0": "Resolution", "h-1": "Bitrate", "0-0": "1920 x 1080", "0-1": "3,000 kbit/s", "1-1": "1,600 kbit/s", "2-1": "900 kbit/s", "3-1": "400 kbit/s", "1-0": "1280 x 720", "2-0": "854 x 480", "3-0": "640 x 360" }, "cols": 2, "rows": 4 } [/block] Video aspect ratio will be retained during transcoding. The above resolutions represent the expected output of a 16:9 video; other aspect ratios will have a similar selection of transcoded video artifacts. Adaptive bitrate video streams are delivered in SMIL format (using HLS) and are accessible through the [Get a Video API](/docs/videovideo_id) call.
The medvid.io API supports the following video input, output, and transcoding capabilities. ##Input Video Formats## **NOTE: Maximum file upload size for a video is set to 4GB.** [block:parameters] { "data": { "h-0": "Format", "h-1": "Extension", "0-1": ".mp4, .mov, QuickTime container", "0-0": "MP4", "1-0": "Flash Video", "1-1": ".flv", "2-0": "Windows Media Video", "2-1": ".wmf" }, "cols": 2, "rows": 3 } [/block] ##Output Video Formats## [block:parameters] { "data": { "h-0": "Format", "h-1": "Notes", "0-0": "HLS", "1-0": "SMIL", "0-1": "AES-128 Encrypted Stream delivered over SSL", "h-2": "Platforms", "0-2": "- iPhone\n- iPod\n- iPad (iOS 3.0 or later)\n- QuickTime Player (10.0 or later)\n- Safari (4.0 or later on Mac OS X version 10.6)\n- Microsoft Edge (Windows 10 or later)\n- Other players that support AES-128 HLS streams over SSL such as [JWPlayer Enterprise](https://www.jwplayer.com/products/jwplayer/), [Flowplayer](https://flowplayer.org/), etc.", "1-1": "AES-128 Encrypted Stream delivered over SSL with automatic adaptive bitrate", "1-2": "- iPhone\n- iPod\n- iPad (iOS 3.0 or later)\n- QuickTime Player (10.0 or later)\n- Safari (4.0 or later on Mac OS X version 10.6)\n- Microsoft Edge (Windows 10 or later)\n- Other players that support AES-128 HLS streams over SSL such as [JWPlayer Enterprise](https://www.jwplayer.com/products/jwplayer/), [Flowplayer](https://flowplayer.org/), etc." }, "cols": 3, "rows": 2 } [/block] ##Transcoding# All videos that are uploaded into the medvid.io API are run through our automatic transcoder. If necessary this transcoder will convert an uploaded video into our supported HLS output format. Additionally all videos will be transcoded into a range of resolutions and bitrates in addition to their original format: [block:parameters] { "data": { "h-0": "Resolution", "h-1": "Bitrate", "0-0": "1920 x 1080", "0-1": "3,000 kbit/s", "1-1": "1,600 kbit/s", "2-1": "900 kbit/s", "3-1": "400 kbit/s", "1-0": "1280 x 720", "2-0": "854 x 480", "3-0": "640 x 360" }, "cols": 2, "rows": 4 } [/block] Video aspect ratio will be retained during transcoding. The above resolutions represent the expected output of a 16:9 video; other aspect ratios will have a similar selection of transcoded video artifacts. Adaptive bitrate video streams are delivered in SMIL format (using HLS) and are accessible through the [Get a Video API](/docs/videovideo_id) call.
{"_id":"56bbc8a087fadb0d00dd59fd","createdAt":"2016-02-10T23:32:48.657Z","link_url":"","version":"5671bb92a0ee9b0d00185325","title":"Hello World","type":"basic","user":"5671bb4d5e49250d006648fd","order":2,"api":{"params":[],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{}"},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"","auth":"required"},"body":"Let's build a simple medvid.io API integration.\n\nFirst create your application and configure it:\n- [Create an Application](/docs/arch-applications)\n- [Create a JWT and verify that it works against the medvid.io Authentication end point](/docs/auth-bearer-tokens)\n\nNow that you have an application and can validate it properly authenticates let’s capture the User IDs and Group IDs so we know who to associate video content with:\n\n- [Load User IDs](/docs/users)\n- [Load Group IDs](/docs/groups-get)\n\nTo assist with development the medvid.io platform includes an Event reporting system; whenever you interact with the medvid.io API the system will generate an event that you can view via the developer portal.\n\n- [View Events in the Developer Portal](https://mercury.reeldx.com/#/events)\n- [Learn More About Events](/docs/events-overview)\n\nAs you build your first application be sure to keep an eye on the Events page to see how the medvid.io platform is responding to your API requests.\n\nLet's upload a video.\n\n- [Upload a Video](/docs/video)\n- Verify the video has been uploaded and works properly:\n     - There will be a slight delay between when a video is uploaded and when it is available to be played back due to transcoding operations. Once at least one playable version of the uploaded video has been transcoded playback will be enabled. Refer to the [Get Video API](/docs/videovideo_id) call to see expected responses to video requests\n     - Video can be streamed back as a native HLS stream or via SMIL stream (leveraging HLS) which includes automatic adaptive bitrate streaming. All videos are streamed using 128-bit AES Encryption; a few recommended ways to view a stream of this format:\n          - Refer to [Video Capabilities - Output Video Formats](/docs/video-capabilities#section-output-video-formats) for recommended methods to play back a video stream\n     - Leverage [Get Video API](/docs/videovideo_id) to generate a unique string to view a video; direct this stream to your selected player.\n\nOnce you have the basics running take a look at our [Common Workflows](/docs/common-workflows) as you build your medvid.io Integration.","githubsync":"","hidden":false,"project":"5671bb91a0ee9b0d00185322","slug":"hello-world","sync_unique":"","updates":[],"__v":2,"category":"5671bb93a0ee9b0d00185326","excerpt":"","link_external":false,"childrenPages":[]}

Hello World


Let's build a simple medvid.io API integration. First create your application and configure it: - [Create an Application](/docs/arch-applications) - [Create a JWT and verify that it works against the medvid.io Authentication end point](/docs/auth-bearer-tokens) Now that you have an application and can validate it properly authenticates let’s capture the User IDs and Group IDs so we know who to associate video content with: - [Load User IDs](/docs/users) - [Load Group IDs](/docs/groups-get) To assist with development the medvid.io platform includes an Event reporting system; whenever you interact with the medvid.io API the system will generate an event that you can view via the developer portal. - [View Events in the Developer Portal](https://mercury.reeldx.com/#/events) - [Learn More About Events](/docs/events-overview) As you build your first application be sure to keep an eye on the Events page to see how the medvid.io platform is responding to your API requests. Let's upload a video. - [Upload a Video](/docs/video) - Verify the video has been uploaded and works properly: - There will be a slight delay between when a video is uploaded and when it is available to be played back due to transcoding operations. Once at least one playable version of the uploaded video has been transcoded playback will be enabled. Refer to the [Get Video API](/docs/videovideo_id) call to see expected responses to video requests - Video can be streamed back as a native HLS stream or via SMIL stream (leveraging HLS) which includes automatic adaptive bitrate streaming. All videos are streamed using 128-bit AES Encryption; a few recommended ways to view a stream of this format: - Refer to [Video Capabilities - Output Video Formats](/docs/video-capabilities#section-output-video-formats) for recommended methods to play back a video stream - Leverage [Get Video API](/docs/videovideo_id) to generate a unique string to view a video; direct this stream to your selected player. Once you have the basics running take a look at our [Common Workflows](/docs/common-workflows) as you build your medvid.io Integration.
Let's build a simple medvid.io API integration. First create your application and configure it: - [Create an Application](/docs/arch-applications) - [Create a JWT and verify that it works against the medvid.io Authentication end point](/docs/auth-bearer-tokens) Now that you have an application and can validate it properly authenticates let’s capture the User IDs and Group IDs so we know who to associate video content with: - [Load User IDs](/docs/users) - [Load Group IDs](/docs/groups-get) To assist with development the medvid.io platform includes an Event reporting system; whenever you interact with the medvid.io API the system will generate an event that you can view via the developer portal. - [View Events in the Developer Portal](https://mercury.reeldx.com/#/events) - [Learn More About Events](/docs/events-overview) As you build your first application be sure to keep an eye on the Events page to see how the medvid.io platform is responding to your API requests. Let's upload a video. - [Upload a Video](/docs/video) - Verify the video has been uploaded and works properly: - There will be a slight delay between when a video is uploaded and when it is available to be played back due to transcoding operations. Once at least one playable version of the uploaded video has been transcoded playback will be enabled. Refer to the [Get Video API](/docs/videovideo_id) call to see expected responses to video requests - Video can be streamed back as a native HLS stream or via SMIL stream (leveraging HLS) which includes automatic adaptive bitrate streaming. All videos are streamed using 128-bit AES Encryption; a few recommended ways to view a stream of this format: - Refer to [Video Capabilities - Output Video Formats](/docs/video-capabilities#section-output-video-formats) for recommended methods to play back a video stream - Leverage [Get Video API](/docs/videovideo_id) to generate a unique string to view a video; direct this stream to your selected player. Once you have the basics running take a look at our [Common Workflows](/docs/common-workflows) as you build your medvid.io Integration.
{"_id":"56bbc4ac87fadb0d00dd59f6","body":"##Create Application Users Dynamically##\nAssumes an Account, Account User, and Application has been created:\n\n- Generate Bearer Token for your new [Application User](#section-application-users)\n     - Make sure to set the  sub  value to a unique ID; this should be a GUID or other method you use to uniquely identify a user inside of your system.\n- Call the [Get User Profile API](/docs/usersprofile) endpoint\n     - Review the API response; if successful you should be returned the profile of your new Application User.\n     - Make a note of the value in   id  for your new user; this denotes the medvid.io API User ID for your new Application User\n- Your new Application User has been created!\n\n**You may notice that when listing any user that the user name is prefaced with either `Auth-0 |` or `App-# |`; when creating a `sub` value to act as a user you should omit this prefaced values and only use your original `sub` value.**\n\nExample:\nApplication User created with the following payload:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"aud\\\": <your_pk_value>,\\n  \\\"iat\\\": <issue_time_as_unix_timestamp>,\\n  \\\"exp\\\": <expire_time_as_unix_timestamp>,\\n  \\\"sub\\\": MyNewUser\\n} \",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nGenerates a user that is listed as `App-# | MyNewUser`\n\nAll subsequent JWT Payloads for this user should be:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"aud\\\": <your_pk_value>,\\n  \\\"iat\\\": <issue_time_as_unix_timestamp>,\\n  \\\"exp\\\": <expire_time_as_unix_timestamp>,\\n  \\\"sub\\\": MyNewUser\\n} \",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nNote the omission of `App-# |`\n\n##Sharing Videos Between Users##\nAssumes an Account, Application, Video, and at least two Account and / or Application Users have been created. The users in this scenario will be referred to User_1 and User_2 with the Video Owner set to User_1.\n\n- Share a Video between Users\n     - Create a Bearer Token acting as User_1\n     - Using the [Update a Video API](/docs/videovideo_id-put) update the `user_viewer_ids` value to **include** the medvid.io User ID for User_2\n     - User_2 can now List and Read the Video owned by User_1\n- Remove sharing rights between Users\n     - Create a Bearer Token acting as User_1\n     - Using the [Update a Video API](/docs/videovideo_id-put) update the `user_viewer_ids` value to **remove** the medvid.io User ID for User_2\n     - User_2 can no longer List or Read the Video owned by User_1\n\n##Sharing Videos With Groups##\nAssumes an Account, Application, Group, Video, and an Account and / or Application Users has been created. The user in this scenario will be referred to User_1 with the Video Owner set to User_1. The Group will be referred to as Group_A\n\n**For a User to add a Video to a Group a User must have a create:video Policy for that Group**\n\n- Add a Video to a Group\n     - Create a Bearer Token acting as User_1\n     - Using the [Update a Video API](/docs/videovideo_id-put) update the `group_viewer_ids` value to include the Group ID for Group_A\n     - All users in Group_A with now be able to interact with Video based on their Policy with Group_A (list, read, etc.)\n- Remove Video from a Group\n     - Create a Bearer Token acting as User_1\n     - Using the [Update a Video API](/docs/videovideo_id-put) update the `group_viewer_ids` value to remove the Group ID for Group_A\n     - All users in Group_A with no longer be able to interact with Video.","excerpt":"","title":"Common Workflows","type":"basic","user":"5671bb4d5e49250d006648fd","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"sync_unique":"","updates":[],"hidden":false,"createdAt":"2016-02-10T23:15:56.524Z","link_external":false,"order":3,"project":"5671bb91a0ee9b0d00185322","version":"5671bb92a0ee9b0d00185325","category":"5671bb93a0ee9b0d00185326","githubsync":"","link_url":"","slug":"common-workflows","__v":6,"childrenPages":[]}

Common Workflows


##Create Application Users Dynamically## Assumes an Account, Account User, and Application has been created: - Generate Bearer Token for your new [Application User](#section-application-users) - Make sure to set the sub value to a unique ID; this should be a GUID or other method you use to uniquely identify a user inside of your system. - Call the [Get User Profile API](/docs/usersprofile) endpoint - Review the API response; if successful you should be returned the profile of your new Application User. - Make a note of the value in id for your new user; this denotes the medvid.io API User ID for your new Application User - Your new Application User has been created! **You may notice that when listing any user that the user name is prefaced with either `Auth-0 |` or `App-# |`; when creating a `sub` value to act as a user you should omit this prefaced values and only use your original `sub` value.** Example: Application User created with the following payload: [block:code] { "codes": [ { "code": "{\n \"aud\": <your_pk_value>,\n \"iat\": <issue_time_as_unix_timestamp>,\n \"exp\": <expire_time_as_unix_timestamp>,\n \"sub\": MyNewUser\n} ", "language": "json" } ] } [/block] Generates a user that is listed as `App-# | MyNewUser` All subsequent JWT Payloads for this user should be: [block:code] { "codes": [ { "code": "{\n \"aud\": <your_pk_value>,\n \"iat\": <issue_time_as_unix_timestamp>,\n \"exp\": <expire_time_as_unix_timestamp>,\n \"sub\": MyNewUser\n} ", "language": "json" } ] } [/block] Note the omission of `App-# |` ##Sharing Videos Between Users## Assumes an Account, Application, Video, and at least two Account and / or Application Users have been created. The users in this scenario will be referred to User_1 and User_2 with the Video Owner set to User_1. - Share a Video between Users - Create a Bearer Token acting as User_1 - Using the [Update a Video API](/docs/videovideo_id-put) update the `user_viewer_ids` value to **include** the medvid.io User ID for User_2 - User_2 can now List and Read the Video owned by User_1 - Remove sharing rights between Users - Create a Bearer Token acting as User_1 - Using the [Update a Video API](/docs/videovideo_id-put) update the `user_viewer_ids` value to **remove** the medvid.io User ID for User_2 - User_2 can no longer List or Read the Video owned by User_1 ##Sharing Videos With Groups## Assumes an Account, Application, Group, Video, and an Account and / or Application Users has been created. The user in this scenario will be referred to User_1 with the Video Owner set to User_1. The Group will be referred to as Group_A **For a User to add a Video to a Group a User must have a create:video Policy for that Group** - Add a Video to a Group - Create a Bearer Token acting as User_1 - Using the [Update a Video API](/docs/videovideo_id-put) update the `group_viewer_ids` value to include the Group ID for Group_A - All users in Group_A with now be able to interact with Video based on their Policy with Group_A (list, read, etc.) - Remove Video from a Group - Create a Bearer Token acting as User_1 - Using the [Update a Video API](/docs/videovideo_id-put) update the `group_viewer_ids` value to remove the Group ID for Group_A - All users in Group_A with no longer be able to interact with Video.
##Create Application Users Dynamically## Assumes an Account, Account User, and Application has been created: - Generate Bearer Token for your new [Application User](#section-application-users) - Make sure to set the sub value to a unique ID; this should be a GUID or other method you use to uniquely identify a user inside of your system. - Call the [Get User Profile API](/docs/usersprofile) endpoint - Review the API response; if successful you should be returned the profile of your new Application User. - Make a note of the value in id for your new user; this denotes the medvid.io API User ID for your new Application User - Your new Application User has been created! **You may notice that when listing any user that the user name is prefaced with either `Auth-0 |` or `App-# |`; when creating a `sub` value to act as a user you should omit this prefaced values and only use your original `sub` value.** Example: Application User created with the following payload: [block:code] { "codes": [ { "code": "{\n \"aud\": <your_pk_value>,\n \"iat\": <issue_time_as_unix_timestamp>,\n \"exp\": <expire_time_as_unix_timestamp>,\n \"sub\": MyNewUser\n} ", "language": "json" } ] } [/block] Generates a user that is listed as `App-# | MyNewUser` All subsequent JWT Payloads for this user should be: [block:code] { "codes": [ { "code": "{\n \"aud\": <your_pk_value>,\n \"iat\": <issue_time_as_unix_timestamp>,\n \"exp\": <expire_time_as_unix_timestamp>,\n \"sub\": MyNewUser\n} ", "language": "json" } ] } [/block] Note the omission of `App-# |` ##Sharing Videos Between Users## Assumes an Account, Application, Video, and at least two Account and / or Application Users have been created. The users in this scenario will be referred to User_1 and User_2 with the Video Owner set to User_1. - Share a Video between Users - Create a Bearer Token acting as User_1 - Using the [Update a Video API](/docs/videovideo_id-put) update the `user_viewer_ids` value to **include** the medvid.io User ID for User_2 - User_2 can now List and Read the Video owned by User_1 - Remove sharing rights between Users - Create a Bearer Token acting as User_1 - Using the [Update a Video API](/docs/videovideo_id-put) update the `user_viewer_ids` value to **remove** the medvid.io User ID for User_2 - User_2 can no longer List or Read the Video owned by User_1 ##Sharing Videos With Groups## Assumes an Account, Application, Group, Video, and an Account and / or Application Users has been created. The user in this scenario will be referred to User_1 with the Video Owner set to User_1. The Group will be referred to as Group_A **For a User to add a Video to a Group a User must have a create:video Policy for that Group** - Add a Video to a Group - Create a Bearer Token acting as User_1 - Using the [Update a Video API](/docs/videovideo_id-put) update the `group_viewer_ids` value to include the Group ID for Group_A - All users in Group_A with now be able to interact with Video based on their Policy with Group_A (list, read, etc.) - Remove Video from a Group - Create a Bearer Token acting as User_1 - Using the [Update a Video API](/docs/videovideo_id-put) update the `group_viewer_ids` value to remove the Group ID for Group_A - All users in Group_A with no longer be able to interact with Video.
{"_id":"56bbd4cccc84e221009650c4","api":{"params":[],"results":{"codes":[{"code":"{}","name":"","status":200,"language":"json"},{"name":"","status":400,"language":"json","code":"{}"}]},"settings":"","url":"","auth":"required"},"hidden":false,"link_external":false,"project":"5671bb91a0ee9b0d00185322","user":"5671bb4d5e49250d006648fd","order":4,"version":"5671bb92a0ee9b0d00185325","excerpt":"","githubsync":"","link_url":"","title":"Code Samples","updates":[],"__v":2,"body":"medvid.io maintains a [GitHub repository](https://github.com/reeldx) with open source code samples you can use to speed your integration.\n\nSome samples include:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Application\",\n    \"h-1\": \"Description\",\n    \"h-2\": \"Language\",\n    \"0-0\": \"[medvidio-webapp-demo](https://github.com/ReelDx/medvidio-webapp-demo)\",\n    \"0-1\": \"Basic web app that utilizes the medvid.io API for HIPAA compliant, secure video management. Skeleton code can be reused / modified / redistributed under the MIT license.\",\n    \"0-2\": \"Python\",\n    \"1-1\": \"Stream videos from medvid.io into a Wordpress deployment\",\n    \"1-2\": \"PHP\",\n    \"1-0\": \"[medvidio-wordpress-plugin](https://github.com/ReelDx/medvidio-wordpress-plugin)\",\n    \"2-1\": \"Sample code for generating JWT tokens to access the medvid.io API on behalf of an Application User.\",\n    \"2-2\": \"Ruby\",\n    \"2-0\": \"[app-jwt-generator](https://github.com/ReelDx/app-jwt-generator)\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[/block]","category":"5671bb93a0ee9b0d00185326","createdAt":"2016-02-11T00:24:44.361Z","slug":"code-samples","sync_unique":"","type":"basic","childrenPages":[]}

Code Samples


medvid.io maintains a [GitHub repository](https://github.com/reeldx) with open source code samples you can use to speed your integration. Some samples include: [block:parameters] { "data": { "h-0": "Application", "h-1": "Description", "h-2": "Language", "0-0": "[medvidio-webapp-demo](https://github.com/ReelDx/medvidio-webapp-demo)", "0-1": "Basic web app that utilizes the medvid.io API for HIPAA compliant, secure video management. Skeleton code can be reused / modified / redistributed under the MIT license.", "0-2": "Python", "1-1": "Stream videos from medvid.io into a Wordpress deployment", "1-2": "PHP", "1-0": "[medvidio-wordpress-plugin](https://github.com/ReelDx/medvidio-wordpress-plugin)", "2-1": "Sample code for generating JWT tokens to access the medvid.io API on behalf of an Application User.", "2-2": "Ruby", "2-0": "[app-jwt-generator](https://github.com/ReelDx/app-jwt-generator)" }, "cols": 3, "rows": 3 } [/block]
medvid.io maintains a [GitHub repository](https://github.com/reeldx) with open source code samples you can use to speed your integration. Some samples include: [block:parameters] { "data": { "h-0": "Application", "h-1": "Description", "h-2": "Language", "0-0": "[medvidio-webapp-demo](https://github.com/ReelDx/medvidio-webapp-demo)", "0-1": "Basic web app that utilizes the medvid.io API for HIPAA compliant, secure video management. Skeleton code can be reused / modified / redistributed under the MIT license.", "0-2": "Python", "1-1": "Stream videos from medvid.io into a Wordpress deployment", "1-2": "PHP", "1-0": "[medvidio-wordpress-plugin](https://github.com/ReelDx/medvidio-wordpress-plugin)", "2-1": "Sample code for generating JWT tokens to access the medvid.io API on behalf of an Application User.", "2-2": "Ruby", "2-0": "[app-jwt-generator](https://github.com/ReelDx/app-jwt-generator)" }, "cols": 3, "rows": 3 } [/block]
{"_id":"56bbd5c2b234da21004195fc","slug":"arch-overview","title":"Overview","user":"5671bb4d5e49250d006648fd","__v":1,"link_external":false,"order":0,"updates":[],"version":"5671bb92a0ee9b0d00185325","category":"56ba3da0c275570d00ce7073","createdAt":"2016-02-11T00:28:50.811Z","excerpt":"","type":"basic","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"githubsync":"","project":"5671bb91a0ee9b0d00185322","sync_unique":"","body":"The medvid.io API is structured around Accounts, Applications Users, Groups, Videos, and Policies. This section breaks down the API architecture and expected behaviors.","hidden":false,"link_url":"","childrenPages":[]}

Overview


The medvid.io API is structured around Accounts, Applications Users, Groups, Videos, and Policies. This section breaks down the API architecture and expected behaviors.
The medvid.io API is structured around Accounts, Applications Users, Groups, Videos, and Policies. This section breaks down the API architecture and expected behaviors.
{"_id":"56ba3df6984f030d00713a4d","api":{"params":[],"results":{"codes":[{"code":"{}","name":"","status":200,"language":"json"},{"name":"","status":400,"language":"json","code":"{}"}]},"settings":"","url":"","auth":"required"},"project":"5671bb91a0ee9b0d00185322","title":"Account","order":1,"__v":1,"createdAt":"2016-02-09T19:28:54.074Z","link_external":false,"link_url":"","user":"5671bb4d5e49250d006648fd","version":"5671bb92a0ee9b0d00185325","body":"Centralized object that all Users, Groups, Applications, and Videos are associated with. Events and billing operations are also linked to an account.","category":"56ba3da0c275570d00ce7073","excerpt":"","type":"basic","updates":[],"githubsync":"","hidden":false,"slug":"arch-account","sync_unique":"","childrenPages":[]}

Account


Centralized object that all Users, Groups, Applications, and Videos are associated with. Events and billing operations are also linked to an account.
Centralized object that all Users, Groups, Applications, and Videos are associated with. Events and billing operations are also linked to an account.
{"_id":"56ba3e318fce0e1900d992d0","user":"5671bb4d5e49250d006648fd","__v":1,"hidden":false,"title":"Applications","link_external":false,"project":"5671bb91a0ee9b0d00185322","sync_unique":"","version":"5671bb92a0ee9b0d00185325","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"","auth":"required","params":[]},"category":"56ba3da0c275570d00ce7073","excerpt":"","githubsync":"","slug":"arch-applications","order":2,"type":"basic","updates":[],"body":"An Application allows access to the medvid.io API. You must create at least one Application before accessing the API:\n\nTo create an Application:\n- Log in to the https://mercury.reeldx.com with your Account User credentials.\n- Navigate to Developer Program -> Applications via the link of the left of the screen\n- Click New Application to create an Application\n     - Enter a name for your Application\n     - Click Save to create your Application","createdAt":"2016-02-09T19:29:53.293Z","link_url":"","childrenPages":[]}

Applications


An Application allows access to the medvid.io API. You must create at least one Application before accessing the API: To create an Application: - Log in to the https://mercury.reeldx.com with your Account User credentials. - Navigate to Developer Program -> Applications via the link of the left of the screen - Click New Application to create an Application - Enter a name for your Application - Click Save to create your Application
An Application allows access to the medvid.io API. You must create at least one Application before accessing the API: To create an Application: - Log in to the https://mercury.reeldx.com with your Account User credentials. - Navigate to Developer Program -> Applications via the link of the left of the screen - Click New Application to create an Application - Enter a name for your Application - Click Save to create your Application
{"_id":"56ba75568fce0e1900d99323","createdAt":"2016-02-09T23:25:10.920Z","sync_unique":"","type":"basic","updates":[],"api":{"url":"","auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":""},"excerpt":"","hidden":false,"order":3,"project":"5671bb91a0ee9b0d00185322","slug":"arch-users","title":"Users","user":"5671bb4d5e49250d006648fd","__v":2,"link_url":"","category":"56ba3da0c275570d00ce7073","body":"A user account is required with medvid.io for access to the API. In order to access the Beta you will receive an invite and instructions on how to create your initial user account.\n\nThere are two types of users in the medvid.io API: **Account Users** and **Application Users**.\n##Account Users##\nAccount Users are the admin level users within an Account. They have the ability to:\n\n- Create, read, update, delete, and list Videos.\n- Create, read, update, delete, and list Groups.\n- Assign policies between Groups and Users.\n- Add / Remove Videos to Groups\n\nYour Account User is automatically created during the account creation process.\n\nTo determine your Account User:\n- Head to https://mercury.reeldx.com/#/users OR use the [Get User List](/docs/users) API call\n     - Any user that is prefaced with `Auth-0` is configured as an Account User\n          - Example: `Auth-0 | 1FxOEoiIrGvkNZnxbSmqGHCe`\n\n**Account Users require a different JSON Web Token than Application Users**\n##Application Users##\nApplication Users are automatically created when a valid JSON Web Token is consumed by the medvid.io API and the API determines that the user defined within the JSON Web Token does not yet exist within the given Application.\n\nApplication Users have the ability to:\n- Create Videos\n- Read, update, delete, and list Videos where they are defined as Owner or Subject.\n- Read and list Videos where they are defined as Viewers \n- Read and list Groups to which they are members\n- Add / Remove Videos where they are defined as Owner or Subject to Groups of which they are Members\n- List / Read Videos in Groups of which they are Members.\n\nTo determine your Application Users:\n- Head to https://mercury.reeldx.com/#/users OR use the [Get User List](/docs/users) API call\n     - Any user that is prefaced with `App-#` is configured as an Application User\n          - Example: `App-99 | GUID-From-My-App`\n\nIt is recommended that all 3rd party applications act as Application Users unless a specific task is to be carried out that requires Account User level permissions.\n\n**Application Users require a different JSON Web Token than Account Users**","githubsync":"","link_external":false,"version":"5671bb92a0ee9b0d00185325","childrenPages":[]}

Users


A user account is required with medvid.io for access to the API. In order to access the Beta you will receive an invite and instructions on how to create your initial user account. There are two types of users in the medvid.io API: **Account Users** and **Application Users**. ##Account Users## Account Users are the admin level users within an Account. They have the ability to: - Create, read, update, delete, and list Videos. - Create, read, update, delete, and list Groups. - Assign policies between Groups and Users. - Add / Remove Videos to Groups Your Account User is automatically created during the account creation process. To determine your Account User: - Head to https://mercury.reeldx.com/#/users OR use the [Get User List](/docs/users) API call - Any user that is prefaced with `Auth-0` is configured as an Account User - Example: `Auth-0 | 1FxOEoiIrGvkNZnxbSmqGHCe` **Account Users require a different JSON Web Token than Application Users** ##Application Users## Application Users are automatically created when a valid JSON Web Token is consumed by the medvid.io API and the API determines that the user defined within the JSON Web Token does not yet exist within the given Application. Application Users have the ability to: - Create Videos - Read, update, delete, and list Videos where they are defined as Owner or Subject. - Read and list Videos where they are defined as Viewers - Read and list Groups to which they are members - Add / Remove Videos where they are defined as Owner or Subject to Groups of which they are Members - List / Read Videos in Groups of which they are Members. To determine your Application Users: - Head to https://mercury.reeldx.com/#/users OR use the [Get User List](/docs/users) API call - Any user that is prefaced with `App-#` is configured as an Application User - Example: `App-99 | GUID-From-My-App` It is recommended that all 3rd party applications act as Application Users unless a specific task is to be carried out that requires Account User level permissions. **Application Users require a different JSON Web Token than Account Users**
A user account is required with medvid.io for access to the API. In order to access the Beta you will receive an invite and instructions on how to create your initial user account. There are two types of users in the medvid.io API: **Account Users** and **Application Users**. ##Account Users## Account Users are the admin level users within an Account. They have the ability to: - Create, read, update, delete, and list Videos. - Create, read, update, delete, and list Groups. - Assign policies between Groups and Users. - Add / Remove Videos to Groups Your Account User is automatically created during the account creation process. To determine your Account User: - Head to https://mercury.reeldx.com/#/users OR use the [Get User List](/docs/users) API call - Any user that is prefaced with `Auth-0` is configured as an Account User - Example: `Auth-0 | 1FxOEoiIrGvkNZnxbSmqGHCe` **Account Users require a different JSON Web Token than Application Users** ##Application Users## Application Users are automatically created when a valid JSON Web Token is consumed by the medvid.io API and the API determines that the user defined within the JSON Web Token does not yet exist within the given Application. Application Users have the ability to: - Create Videos - Read, update, delete, and list Videos where they are defined as Owner or Subject. - Read and list Videos where they are defined as Viewers - Read and list Groups to which they are members - Add / Remove Videos where they are defined as Owner or Subject to Groups of which they are Members - List / Read Videos in Groups of which they are Members. To determine your Application Users: - Head to https://mercury.reeldx.com/#/users OR use the [Get User List](/docs/users) API call - Any user that is prefaced with `App-#` is configured as an Application User - Example: `App-99 | GUID-From-My-App` It is recommended that all 3rd party applications act as Application Users unless a specific task is to be carried out that requires Account User level permissions. **Application Users require a different JSON Web Token than Account Users**
{"_id":"56ba76148cf7c92100096729","excerpt":"","hidden":false,"slug":"arch-groups","title":"Groups","type":"basic","link_external":false,"sync_unique":"","__v":3,"api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"createdAt":"2016-02-09T23:28:20.558Z","project":"5671bb91a0ee9b0d00185322","updates":[],"user":"5671bb4d5e49250d006648fd","body":"Groups belong to an Account and allow for a logical collection of videos and users.\n\nCreation, updating, and deletion of groups can only be carried out by Account Users. Read and Listing operations of groups can be carried out by both Account and Application Users.\n\nUsers must be assigned to a group with a policy; this can only be done by an Account User.\n\nTo Manage Groups / Policies:\n- Via the Developer Portal:\n     - Log in to the https://mercury.reeldx.com with your Account User credentials.\n     - Navigate to User Management -> Groups via the link on the left of the screen\n- Via the [Groups API](/docs/groups-overview)\n     - **NOTE: Must be acting as an Account User for many of these operations; please refer to the specific API endpoint for details.**\n\n##Policies##\nPolicies define the permissions a User has on a given Group; they fall into the following categories:\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"create:video\",\n    \"h-0\": \"Policy\",\n    \"h-1\": \"Description\",\n    \"1-0\": \"read:video\",\n    \"2-0\": \"update:video\",\n    \"3-0\": \"delete:video\",\n    \"4-0\": \"list:video\",\n    \"0-1\": \"Can create videos in this group\",\n    \"1-1\": \"Can read videos in this group\",\n    \"2-1\": \"Can update videos in this group\",\n    \"3-1\": \"Can delete videos in this group\",\n    \"4-1\": \"Can list videos in this group\"\n  },\n  \"cols\": 2,\n  \"rows\": 5\n}\n[/block]\nFor a User to be part of a Group, a Policy must be applied. Group Policies may only be applied by **Account Users**\n\nTo apply a Policy:\n- Via the Developer Portal:\n     - Log in to the https://mercury.reeldx.com with your Account User credentials.\n     - Navigate to User Management -> Users via the link on the left of the screen\n     - New Policy:\n          - Click the New Policy Button\n          - Select the Group you would like to apply a Policy to for the current User\n          - Select the Policies you would like this user to have for this Group\n          - Click Save\n     - Edit Policy:\n          - Find the User you would like to apply a Policy to; click the Edit icon\n          - Select the Policies you would like this user to have for this Group\n          - Click Save\n- Via the [Policies API](/docs/policies-overview)","category":"56ba3da0c275570d00ce7073","githubsync":"","link_url":"","order":4,"version":"5671bb92a0ee9b0d00185325","childrenPages":[]}

Groups


Groups belong to an Account and allow for a logical collection of videos and users. Creation, updating, and deletion of groups can only be carried out by Account Users. Read and Listing operations of groups can be carried out by both Account and Application Users. Users must be assigned to a group with a policy; this can only be done by an Account User. To Manage Groups / Policies: - Via the Developer Portal: - Log in to the https://mercury.reeldx.com with your Account User credentials. - Navigate to User Management -> Groups via the link on the left of the screen - Via the [Groups API](/docs/groups-overview) - **NOTE: Must be acting as an Account User for many of these operations; please refer to the specific API endpoint for details.** ##Policies## Policies define the permissions a User has on a given Group; they fall into the following categories: [block:parameters] { "data": { "0-0": "create:video", "h-0": "Policy", "h-1": "Description", "1-0": "read:video", "2-0": "update:video", "3-0": "delete:video", "4-0": "list:video", "0-1": "Can create videos in this group", "1-1": "Can read videos in this group", "2-1": "Can update videos in this group", "3-1": "Can delete videos in this group", "4-1": "Can list videos in this group" }, "cols": 2, "rows": 5 } [/block] For a User to be part of a Group, a Policy must be applied. Group Policies may only be applied by **Account Users** To apply a Policy: - Via the Developer Portal: - Log in to the https://mercury.reeldx.com with your Account User credentials. - Navigate to User Management -> Users via the link on the left of the screen - New Policy: - Click the New Policy Button - Select the Group you would like to apply a Policy to for the current User - Select the Policies you would like this user to have for this Group - Click Save - Edit Policy: - Find the User you would like to apply a Policy to; click the Edit icon - Select the Policies you would like this user to have for this Group - Click Save - Via the [Policies API](/docs/policies-overview)
Groups belong to an Account and allow for a logical collection of videos and users. Creation, updating, and deletion of groups can only be carried out by Account Users. Read and Listing operations of groups can be carried out by both Account and Application Users. Users must be assigned to a group with a policy; this can only be done by an Account User. To Manage Groups / Policies: - Via the Developer Portal: - Log in to the https://mercury.reeldx.com with your Account User credentials. - Navigate to User Management -> Groups via the link on the left of the screen - Via the [Groups API](/docs/groups-overview) - **NOTE: Must be acting as an Account User for many of these operations; please refer to the specific API endpoint for details.** ##Policies## Policies define the permissions a User has on a given Group; they fall into the following categories: [block:parameters] { "data": { "0-0": "create:video", "h-0": "Policy", "h-1": "Description", "1-0": "read:video", "2-0": "update:video", "3-0": "delete:video", "4-0": "list:video", "0-1": "Can create videos in this group", "1-1": "Can read videos in this group", "2-1": "Can update videos in this group", "3-1": "Can delete videos in this group", "4-1": "Can list videos in this group" }, "cols": 2, "rows": 5 } [/block] For a User to be part of a Group, a Policy must be applied. Group Policies may only be applied by **Account Users** To apply a Policy: - Via the Developer Portal: - Log in to the https://mercury.reeldx.com with your Account User credentials. - Navigate to User Management -> Users via the link on the left of the screen - New Policy: - Click the New Policy Button - Select the Group you would like to apply a Policy to for the current User - Select the Policies you would like this user to have for this Group - Click Save - Edit Policy: - Find the User you would like to apply a Policy to; click the Edit icon - Select the Policies you would like this user to have for this Group - Click Save - Via the [Policies API](/docs/policies-overview)
{"_id":"56ba78a9ce5d540d00e2d7fb","order":5,"slug":"arch-videos","sync_unique":"","updates":[],"link_external":false,"hidden":false,"project":"5671bb91a0ee9b0d00185322","title":"Videos","type":"basic","githubsync":"","excerpt":"","link_url":"","user":"5671bb4d5e49250d006648fd","version":"5671bb92a0ee9b0d00185325","category":"56ba3da0c275570d00ce7073","api":{"auth":"required","params":[],"results":{"codes":[{"language":"json","code":"{}","name":"","status":200},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":""},"body":"One of the core objects of the medvid.io API. A video contains the following information:\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"title\",\n    \"h-0\": \"Data Attribute\",\n    \"h-1\": \"Description\",\n    \"1-0\": \"description\",\n    \"2-0\": \"location\",\n    \"3-0\": \"owner_id\",\n    \"4-0\": \"subject_id\",\n    \"0-1\": \"Title of the video.\",\n    \"1-1\": \"Description of the video.\",\n    \"2-1\": \"Location the video was captured.\",\n    \"3-1\": \"**Required Value.** Owner of the video as medvid.io User ID (usually the user that uploaded it). This user will have Read, Update, Delete, and List rights for this video.\",\n    \"4-1\": \"Subject of the video as medvid.io User ID (can be same as owner_id). This user will have Read, Update, Delete, and List rights for this video.\",\n    \"5-0\": \"user_viewer_ids\",\n    \"5-1\": \"List of medvid.io User IDs that can Read and List this video. Videos can be associated with 0-n user viewers\",\n    \"6-0\": \"group_viewer_ids\",\n    \"6-1\": \"List of medvid.io Group IDs for those groups whose users can Read and List this video. Videos can be associated with 0-n Groups.\"\n  },\n  \"cols\": 2,\n  \"rows\": 7\n}\n[/block]\n##Rights Evaluation and Elevation##\nVideos have a myriad of related Create, Read, Update, Delete, and List rights associated with them. These rights are tied to Users, Groups, and Policies. Rights are evaluated in the following order:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"if UserID is owner_id OR subject_id\\n     return rights[Read, Update, Delete, List]\\nelse if UserID is in user_viewer_ids\\n     return rights [Read, List]\\nelse if UserID is in Group is in group_viewer_ids\\n     return rights [UserPolicyRights for UserId in Group]\\nelse\\n     return [No Rights]\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]","createdAt":"2016-02-09T23:39:21.477Z","__v":2,"childrenPages":[]}

Videos


One of the core objects of the medvid.io API. A video contains the following information: [block:parameters] { "data": { "0-0": "title", "h-0": "Data Attribute", "h-1": "Description", "1-0": "description", "2-0": "location", "3-0": "owner_id", "4-0": "subject_id", "0-1": "Title of the video.", "1-1": "Description of the video.", "2-1": "Location the video was captured.", "3-1": "**Required Value.** Owner of the video as medvid.io User ID (usually the user that uploaded it). This user will have Read, Update, Delete, and List rights for this video.", "4-1": "Subject of the video as medvid.io User ID (can be same as owner_id). This user will have Read, Update, Delete, and List rights for this video.", "5-0": "user_viewer_ids", "5-1": "List of medvid.io User IDs that can Read and List this video. Videos can be associated with 0-n user viewers", "6-0": "group_viewer_ids", "6-1": "List of medvid.io Group IDs for those groups whose users can Read and List this video. Videos can be associated with 0-n Groups." }, "cols": 2, "rows": 7 } [/block] ##Rights Evaluation and Elevation## Videos have a myriad of related Create, Read, Update, Delete, and List rights associated with them. These rights are tied to Users, Groups, and Policies. Rights are evaluated in the following order: [block:code] { "codes": [ { "code": "if UserID is owner_id OR subject_id\n return rights[Read, Update, Delete, List]\nelse if UserID is in user_viewer_ids\n return rights [Read, List]\nelse if UserID is in Group is in group_viewer_ids\n return rights [UserPolicyRights for UserId in Group]\nelse\n return [No Rights]", "language": "text" } ] } [/block]
One of the core objects of the medvid.io API. A video contains the following information: [block:parameters] { "data": { "0-0": "title", "h-0": "Data Attribute", "h-1": "Description", "1-0": "description", "2-0": "location", "3-0": "owner_id", "4-0": "subject_id", "0-1": "Title of the video.", "1-1": "Description of the video.", "2-1": "Location the video was captured.", "3-1": "**Required Value.** Owner of the video as medvid.io User ID (usually the user that uploaded it). This user will have Read, Update, Delete, and List rights for this video.", "4-1": "Subject of the video as medvid.io User ID (can be same as owner_id). This user will have Read, Update, Delete, and List rights for this video.", "5-0": "user_viewer_ids", "5-1": "List of medvid.io User IDs that can Read and List this video. Videos can be associated with 0-n user viewers", "6-0": "group_viewer_ids", "6-1": "List of medvid.io Group IDs for those groups whose users can Read and List this video. Videos can be associated with 0-n Groups." }, "cols": 2, "rows": 7 } [/block] ##Rights Evaluation and Elevation## Videos have a myriad of related Create, Read, Update, Delete, and List rights associated with them. These rights are tied to Users, Groups, and Policies. Rights are evaluated in the following order: [block:code] { "codes": [ { "code": "if UserID is owner_id OR subject_id\n return rights[Read, Update, Delete, List]\nelse if UserID is in user_viewer_ids\n return rights [Read, List]\nelse if UserID is in Group is in group_viewer_ids\n return rights [UserPolicyRights for UserId in Group]\nelse\n return [No Rights]", "language": "text" } ] } [/block]
{"_id":"56ba7a2679c46b1700473e7c","api":{"auth":"required","params":[],"results":{"codes":[{"language":"json","code":"{}","name":"","status":200},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":""},"body":"In order to call the medvid.io API a bearer token must be created. In all API documentation you are to replace the variable `<token>` value in the `'Authorization: Bearer <token>'` portion of the call with the token you create using these steps.\n##Overview##\nA medvid.io Application has a secret key and a public key.\n\nThe public key is the unique identifier for the app. It can be embedded in a 3rd party client mobile or browser app. It is prefixed with `pk_`.\n\nExample:\n`pk_live_p3gwlklzba5TeZS1BapAgpXS`\n\nThe secret key is the password. It is intended to be kept secret and should only be stored on a backend server, never on a client. It is prefixed with `sk_`.\n\nExample:\n`sk_live_1FxOEoiIrGvkNZnxbSmqGHCe`\n\n##JSON Web Token##\nThese keys are used to create a [JSON Web Token (JWT)](http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html) that will act as the bearer token for all API calls.\n\nA JWT consists of three main parts; the first contains the following info for all medvid.io API calls:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"typ\\\": \\\"JWT\\\",\\n  \\\"alg\\\": \\\"HS256\\\"\\n} \",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nThis identifies the object as a JWT.\n\nThe second part contains the JWT payload. **Payloads are different depending on which kind of user you are acting as.**\n\n**Account User**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"aud\\\": <your_pk_value>,\\n  \\\"iat\\\": <issue_time_as_unix_timestamp>,\\n  \\\"exp\\\": <expire_time_as_unix_timestamp>\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n**Application User**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"aud\\\": <your_pk_value>,\\n  \\\"iat\\\": <issue_time_as_unix_timestamp>,\\n  \\\"exp\\\": <expire_time_as_unix_timestamp>,\\n  \\\"sub\\\": <unique_user_id>\\n} \",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nAll payloads must include Unix timestamps for both the issue (`iat`) and expire (`exp`) times as well as your application's public key value (`aud`).\n\nFor **Application Users** a unique user id (`sub`) field should be added. The unique user id should be a value used in your own application or system that you use to identify a specific user. The medvid.io API consumes this unique user id and will associate all API calls that include this to the unique id. By doing this you can leverage existing user id systems within your existing application or system without having to create additional users in medvid.io.\n\nThe third part is a cryptographic signature that can be used to verify that the JWT is valid.\n\nAn easy way to visualize a JWT is to play with [jwt.io](http://jwt.io/); this site also links to [libraries in various languages](http://jwt.io/#libraries) that allow you to create JWTs programmatically in your code.\n\nFor example a JWT generator in Ruby would be:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"require 'jwt'\\n\\nREELDX_PUBLIC_KEY = 'pk_live_p3gwlklzba5TeZS1BapAgpXS'\\nREELDX_SECRET_KEY = 'sk_live_1FxOEoiIrGvkNZnxbSmqGHCe'\\n\\njwt_token = JWT.encode({\\n  aud: REELDX_PUBLIC_KEY,\\n  iat: Time.now.to_i,             # issued at timestamp, now\\n  exp: (Time.now + (60*60)).to_i, # expire an hour from now\\n  sub: \\\"app-user-1234\\\"            # unique string id for the user\\n}, REELDX_SECRET_KEY)\\n\\n# return jwt_token back to the client app \",\n      \"language\": \"ruby\"\n    }\n  ]\n}\n[/block]\n##Verification##\nTo verify you are generating a proper JWT you can test against the medvid.io API Authentication endpoint:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl \\\\\\n   -H 'Authorization: Bearer <token>' \\\\\\n   -i \\\\\\n   https://mercury.reeldx.com/api/v1/ping\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\nIf the back end is able to verify the token, you will see something like:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HTTP/1.1 200 OK\\nContent-Type: application/json\\nDate: Mon, 05 Jan 2015 01:42:14 GMT\\nServer: nginx/1.6.2\\nStrict-Transport-Security: max-age=315360000\\nX-Frame-Options: DENY\\nX-Xss-Protection: 1; mode=block\\nContent-Length: 16\\nConnection: keep-alive\\n\\n{\\\"status\\\":\\\"ok\\\"}\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nIf the access token was left off or could not be verified, you should see:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HTTP/1.1 401 Unauthorized\\nContent-Type: text/plain; charset=utf-8\\nDate: Mon, 05 Jan 2015 01:45:06 GMT\\nServer: nginx/1.6.2\\nStrict-Transport-Security: max-age=315360000\\nX-Frame-Options: DENY\\nX-Xss-Protection: 1; mode=block\\nContent-Length: 0\\nConnection: keep-alive\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nOnce you have verified that your token is properly accepted you can use it to access the API.","excerpt":"","order":0,"sync_unique":"","user":"5671bb4d5e49250d006648fd","__v":2,"hidden":false,"slug":"auth-bearer-tokens","project":"5671bb91a0ee9b0d00185322","createdAt":"2016-02-09T23:45:42.805Z","githubsync":"","link_external":false,"link_url":"","title":"Bearer Tokens","type":"basic","updates":[],"category":"56ba7c6503e4a61900a52145","version":"5671bb92a0ee9b0d00185325","childrenPages":[]}

Bearer Tokens


In order to call the medvid.io API a bearer token must be created. In all API documentation you are to replace the variable `<token>` value in the `'Authorization: Bearer <token>'` portion of the call with the token you create using these steps. ##Overview## A medvid.io Application has a secret key and a public key. The public key is the unique identifier for the app. It can be embedded in a 3rd party client mobile or browser app. It is prefixed with `pk_`. Example: `pk_live_p3gwlklzba5TeZS1BapAgpXS` The secret key is the password. It is intended to be kept secret and should only be stored on a backend server, never on a client. It is prefixed with `sk_`. Example: `sk_live_1FxOEoiIrGvkNZnxbSmqGHCe` ##JSON Web Token## These keys are used to create a [JSON Web Token (JWT)](http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html) that will act as the bearer token for all API calls. A JWT consists of three main parts; the first contains the following info for all medvid.io API calls: [block:code] { "codes": [ { "code": "{\n \"typ\": \"JWT\",\n \"alg\": \"HS256\"\n} ", "language": "json" } ] } [/block] This identifies the object as a JWT. The second part contains the JWT payload. **Payloads are different depending on which kind of user you are acting as.** **Account User** [block:code] { "codes": [ { "code": "{\n \"aud\": <your_pk_value>,\n \"iat\": <issue_time_as_unix_timestamp>,\n \"exp\": <expire_time_as_unix_timestamp>\n}", "language": "json" } ] } [/block] **Application User** [block:code] { "codes": [ { "code": "{\n \"aud\": <your_pk_value>,\n \"iat\": <issue_time_as_unix_timestamp>,\n \"exp\": <expire_time_as_unix_timestamp>,\n \"sub\": <unique_user_id>\n} ", "language": "json" } ] } [/block] All payloads must include Unix timestamps for both the issue (`iat`) and expire (`exp`) times as well as your application's public key value (`aud`). For **Application Users** a unique user id (`sub`) field should be added. The unique user id should be a value used in your own application or system that you use to identify a specific user. The medvid.io API consumes this unique user id and will associate all API calls that include this to the unique id. By doing this you can leverage existing user id systems within your existing application or system without having to create additional users in medvid.io. The third part is a cryptographic signature that can be used to verify that the JWT is valid. An easy way to visualize a JWT is to play with [jwt.io](http://jwt.io/); this site also links to [libraries in various languages](http://jwt.io/#libraries) that allow you to create JWTs programmatically in your code. For example a JWT generator in Ruby would be: [block:code] { "codes": [ { "code": "require 'jwt'\n\nREELDX_PUBLIC_KEY = 'pk_live_p3gwlklzba5TeZS1BapAgpXS'\nREELDX_SECRET_KEY = 'sk_live_1FxOEoiIrGvkNZnxbSmqGHCe'\n\njwt_token = JWT.encode({\n aud: REELDX_PUBLIC_KEY,\n iat: Time.now.to_i, # issued at timestamp, now\n exp: (Time.now + (60*60)).to_i, # expire an hour from now\n sub: \"app-user-1234\" # unique string id for the user\n}, REELDX_SECRET_KEY)\n\n# return jwt_token back to the client app ", "language": "ruby" } ] } [/block] ##Verification## To verify you are generating a proper JWT you can test against the medvid.io API Authentication endpoint: [block:code] { "codes": [ { "code": "curl \\\n -H 'Authorization: Bearer <token>' \\\n -i \\\n https://mercury.reeldx.com/api/v1/ping", "language": "curl" } ] } [/block] If the back end is able to verify the token, you will see something like: [block:code] { "codes": [ { "code": "HTTP/1.1 200 OK\nContent-Type: application/json\nDate: Mon, 05 Jan 2015 01:42:14 GMT\nServer: nginx/1.6.2\nStrict-Transport-Security: max-age=315360000\nX-Frame-Options: DENY\nX-Xss-Protection: 1; mode=block\nContent-Length: 16\nConnection: keep-alive\n\n{\"status\":\"ok\"}", "language": "text" } ] } [/block] If the access token was left off or could not be verified, you should see: [block:code] { "codes": [ { "code": "HTTP/1.1 401 Unauthorized\nContent-Type: text/plain; charset=utf-8\nDate: Mon, 05 Jan 2015 01:45:06 GMT\nServer: nginx/1.6.2\nStrict-Transport-Security: max-age=315360000\nX-Frame-Options: DENY\nX-Xss-Protection: 1; mode=block\nContent-Length: 0\nConnection: keep-alive", "language": "text" } ] } [/block] Once you have verified that your token is properly accepted you can use it to access the API.
In order to call the medvid.io API a bearer token must be created. In all API documentation you are to replace the variable `<token>` value in the `'Authorization: Bearer <token>'` portion of the call with the token you create using these steps. ##Overview## A medvid.io Application has a secret key and a public key. The public key is the unique identifier for the app. It can be embedded in a 3rd party client mobile or browser app. It is prefixed with `pk_`. Example: `pk_live_p3gwlklzba5TeZS1BapAgpXS` The secret key is the password. It is intended to be kept secret and should only be stored on a backend server, never on a client. It is prefixed with `sk_`. Example: `sk_live_1FxOEoiIrGvkNZnxbSmqGHCe` ##JSON Web Token## These keys are used to create a [JSON Web Token (JWT)](http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html) that will act as the bearer token for all API calls. A JWT consists of three main parts; the first contains the following info for all medvid.io API calls: [block:code] { "codes": [ { "code": "{\n \"typ\": \"JWT\",\n \"alg\": \"HS256\"\n} ", "language": "json" } ] } [/block] This identifies the object as a JWT. The second part contains the JWT payload. **Payloads are different depending on which kind of user you are acting as.** **Account User** [block:code] { "codes": [ { "code": "{\n \"aud\": <your_pk_value>,\n \"iat\": <issue_time_as_unix_timestamp>,\n \"exp\": <expire_time_as_unix_timestamp>\n}", "language": "json" } ] } [/block] **Application User** [block:code] { "codes": [ { "code": "{\n \"aud\": <your_pk_value>,\n \"iat\": <issue_time_as_unix_timestamp>,\n \"exp\": <expire_time_as_unix_timestamp>,\n \"sub\": <unique_user_id>\n} ", "language": "json" } ] } [/block] All payloads must include Unix timestamps for both the issue (`iat`) and expire (`exp`) times as well as your application's public key value (`aud`). For **Application Users** a unique user id (`sub`) field should be added. The unique user id should be a value used in your own application or system that you use to identify a specific user. The medvid.io API consumes this unique user id and will associate all API calls that include this to the unique id. By doing this you can leverage existing user id systems within your existing application or system without having to create additional users in medvid.io. The third part is a cryptographic signature that can be used to verify that the JWT is valid. An easy way to visualize a JWT is to play with [jwt.io](http://jwt.io/); this site also links to [libraries in various languages](http://jwt.io/#libraries) that allow you to create JWTs programmatically in your code. For example a JWT generator in Ruby would be: [block:code] { "codes": [ { "code": "require 'jwt'\n\nREELDX_PUBLIC_KEY = 'pk_live_p3gwlklzba5TeZS1BapAgpXS'\nREELDX_SECRET_KEY = 'sk_live_1FxOEoiIrGvkNZnxbSmqGHCe'\n\njwt_token = JWT.encode({\n aud: REELDX_PUBLIC_KEY,\n iat: Time.now.to_i, # issued at timestamp, now\n exp: (Time.now + (60*60)).to_i, # expire an hour from now\n sub: \"app-user-1234\" # unique string id for the user\n}, REELDX_SECRET_KEY)\n\n# return jwt_token back to the client app ", "language": "ruby" } ] } [/block] ##Verification## To verify you are generating a proper JWT you can test against the medvid.io API Authentication endpoint: [block:code] { "codes": [ { "code": "curl \\\n -H 'Authorization: Bearer <token>' \\\n -i \\\n https://mercury.reeldx.com/api/v1/ping", "language": "curl" } ] } [/block] If the back end is able to verify the token, you will see something like: [block:code] { "codes": [ { "code": "HTTP/1.1 200 OK\nContent-Type: application/json\nDate: Mon, 05 Jan 2015 01:42:14 GMT\nServer: nginx/1.6.2\nStrict-Transport-Security: max-age=315360000\nX-Frame-Options: DENY\nX-Xss-Protection: 1; mode=block\nContent-Length: 16\nConnection: keep-alive\n\n{\"status\":\"ok\"}", "language": "text" } ] } [/block] If the access token was left off or could not be verified, you should see: [block:code] { "codes": [ { "code": "HTTP/1.1 401 Unauthorized\nContent-Type: text/plain; charset=utf-8\nDate: Mon, 05 Jan 2015 01:45:06 GMT\nServer: nginx/1.6.2\nStrict-Transport-Security: max-age=315360000\nX-Frame-Options: DENY\nX-Xss-Protection: 1; mode=block\nContent-Length: 0\nConnection: keep-alive", "language": "text" } ] } [/block] Once you have verified that your token is properly accepted you can use it to access the API.
{"_id":"56ba7d0b8cf7c92100096733","link_external":false,"link_url":"","project":"5671bb91a0ee9b0d00185322","slug":"data-pagination","type":"basic","hidden":false,"api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"updates":[],"version":"5671bb92a0ee9b0d00185325","excerpt":"","title":"Pagination","body":"For some API calls the returned data may be paginated. Refer to the specific API calls below for more details.\n##Request Parameters##\nData that is paginated is controlled by two query string parameters: limit and offset.\n###Limit###\nlimit controls the number of records returned, and defaults to 20. The maximum allowed limit is 100.\n###Offset###\noffset controls the starting position, and defaults to 0. If limit is 20 and offset is 20, the second set of 20 records is returned, etc.\n###Example Request###\n`https://mercury.reeldx.com/api/v1/users?limit=20&offset=20`\n##Response Headers##\nSome list responses include two additional HTTP headers which provide pagination information, `X-Total-Count` and `Link`.\n###X-Total-Count###\nThe `X-Total-Count` header returns an integer value representing the total number of records in the list. Example:\n`X-Total-Count: 3493`\n\n###Link###\nThe `Link` ([more details](http://tools.ietf.org/html/rfc5988)) header returns an integer value representing the total number of records in the list. Example:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Link: <https://mercury.reeldx.com/api/v1/users?limit=20&offset=40>; rel=\\\"next\\\", <https://mercury.reeldx.com/api/v1/users?limit=20&offset=3480>; rel=\\\"last\\\", <https://mercury.reeldx.com/api/v1/users?limit=20&offset=0>; rel=\\\"first\\\", <https://mercury.reeldx.com/api/v1/users?limit=20&offset=0>; rel=\\\"prev\\\"\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]","category":"56ba7ef1b77e261700bc14ea","createdAt":"2016-02-09T23:58:03.185Z","githubsync":"","order":0,"sync_unique":"","user":"5671bb4d5e49250d006648fd","__v":2,"childrenPages":[]}

Pagination


For some API calls the returned data may be paginated. Refer to the specific API calls below for more details. ##Request Parameters## Data that is paginated is controlled by two query string parameters: limit and offset. ###Limit### limit controls the number of records returned, and defaults to 20. The maximum allowed limit is 100. ###Offset### offset controls the starting position, and defaults to 0. If limit is 20 and offset is 20, the second set of 20 records is returned, etc. ###Example Request### `https://mercury.reeldx.com/api/v1/users?limit=20&offset=20` ##Response Headers## Some list responses include two additional HTTP headers which provide pagination information, `X-Total-Count` and `Link`. ###X-Total-Count### The `X-Total-Count` header returns an integer value representing the total number of records in the list. Example: `X-Total-Count: 3493` ###Link### The `Link` ([more details](http://tools.ietf.org/html/rfc5988)) header returns an integer value representing the total number of records in the list. Example: [block:code] { "codes": [ { "code": "Link: <https://mercury.reeldx.com/api/v1/users?limit=20&offset=40>; rel=\"next\", <https://mercury.reeldx.com/api/v1/users?limit=20&offset=3480>; rel=\"last\", <https://mercury.reeldx.com/api/v1/users?limit=20&offset=0>; rel=\"first\", <https://mercury.reeldx.com/api/v1/users?limit=20&offset=0>; rel=\"prev\"", "language": "text" } ] } [/block]
For some API calls the returned data may be paginated. Refer to the specific API calls below for more details. ##Request Parameters## Data that is paginated is controlled by two query string parameters: limit and offset. ###Limit### limit controls the number of records returned, and defaults to 20. The maximum allowed limit is 100. ###Offset### offset controls the starting position, and defaults to 0. If limit is 20 and offset is 20, the second set of 20 records is returned, etc. ###Example Request### `https://mercury.reeldx.com/api/v1/users?limit=20&offset=20` ##Response Headers## Some list responses include two additional HTTP headers which provide pagination information, `X-Total-Count` and `Link`. ###X-Total-Count### The `X-Total-Count` header returns an integer value representing the total number of records in the list. Example: `X-Total-Count: 3493` ###Link### The `Link` ([more details](http://tools.ietf.org/html/rfc5988)) header returns an integer value representing the total number of records in the list. Example: [block:code] { "codes": [ { "code": "Link: <https://mercury.reeldx.com/api/v1/users?limit=20&offset=40>; rel=\"next\", <https://mercury.reeldx.com/api/v1/users?limit=20&offset=3480>; rel=\"last\", <https://mercury.reeldx.com/api/v1/users?limit=20&offset=0>; rel=\"first\", <https://mercury.reeldx.com/api/v1/users?limit=20&offset=0>; rel=\"prev\"", "language": "text" } ] } [/block]
{"_id":"56ba847df816c20d00c9fec3","link_external":false,"order":0,"title":"Overview","user":"5671bb4d5e49250d006648fd","createdAt":"2016-02-10T00:29:49.889Z","category":"56ba82398fce0e1900d99339","link_url":"","slug":"events-overview","sync_unique":"","type":"basic","updates":[],"body":"##General##\nThe medvid.io platform generates server-side events for every interaction you carry out with the system. These events are presented via the [Developer Portal](https://mercury.reeldx.com) in the Requests -> Events page:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/CAap7nGmRxWLv2p0fSsV_medvidio_events_list.png\",\n        \"medvidio_events_list.png\",\n        \"1278\",\n        \"1013\",\n        \"#112d35\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nEach event can be viewed by clicking on the “folder view” icon on the right side of its row:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/1dbzV02TO8OP32vOghMQ_medvidio_events_streamed.png\",\n        \"medvidio_events_streamed.png\",\n        \"1284\",\n        \"687\",\n        \"#0e2c35\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n##Event Structure##\nEvents are made up of the following items:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Event Attribute\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"type\",\n    \"0-1\": \"The type of event, e.g. stream.started, video_file.uploaded, etc. See list below for valid types.\",\n    \"1-0\": \"request_id\",\n    \"1-1\": \"ID of the API request that caused the event. If empty string, event was automatic.\",\n    \"2-0\": \"api_version\",\n    \"2-1\": \"The medvid.io API version used to render data.\",\n    \"3-0\": \"created_at\",\n    \"3-1\": \"The date/time the event occurred. Format: 2015-07-14T05:07:25.735147Z\",\n    \"4-0\": \"account_id\",\n    \"4-1\": \"The relevant account id for this event.\",\n    \"5-0\": \"user_id\",\n    \"5-1\": \"The relevant user id for this event.\",\n    \"6-0\": \"data\",\n    \"6-1\": \"Hash containing data associated with the event, such as the video, user, etc.\"\n  },\n  \"cols\": 2,\n  \"rows\": 7\n}\n[/block]\n##Event Data Example##\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"event\\\": {\\n      \\\"type\\\": \\\"event.action\\\",\\n      \\\"request_id\\\": \\\"71996457-1676-4482-a9f8-6b0960d86585\\\",\\n      \\\"created_at\\\": \\\"2015-07-14T05:08:42.641684Z\\\",\\n      \\\"api_version\\\": \\\"2015-02-03\\\",\\n      \\\"account_id\\\": 1,\\n      \\\"user_id\\\": 2,\\n      \\\"data\\\": {\\n        \\\"video\\\": {\\n          \\\"id\\\": 123,\\n          \\\"title\\\": \\\"My video\\\",\\n          // additional video attributes\\n        }\\n      }\\n    }\\n  }\\n\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","api":{"auth":"required","params":[],"results":{"codes":[{"language":"json","code":"{}","name":"","status":200},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":""},"excerpt":"","githubsync":"","version":"5671bb92a0ee9b0d00185325","hidden":false,"project":"5671bb91a0ee9b0d00185322","__v":1,"childrenPages":[]}

Overview


##General## The medvid.io platform generates server-side events for every interaction you carry out with the system. These events are presented via the [Developer Portal](https://mercury.reeldx.com) in the Requests -> Events page: [block:image] { "images": [ { "image": [ "https://files.readme.io/CAap7nGmRxWLv2p0fSsV_medvidio_events_list.png", "medvidio_events_list.png", "1278", "1013", "#112d35", "" ] } ] } [/block] Each event can be viewed by clicking on the “folder view” icon on the right side of its row: [block:image] { "images": [ { "image": [ "https://files.readme.io/1dbzV02TO8OP32vOghMQ_medvidio_events_streamed.png", "medvidio_events_streamed.png", "1284", "687", "#0e2c35", "" ] } ] } [/block] ##Event Structure## Events are made up of the following items: [block:parameters] { "data": { "h-0": "Event Attribute", "h-1": "Description", "0-0": "type", "0-1": "The type of event, e.g. stream.started, video_file.uploaded, etc. See list below for valid types.", "1-0": "request_id", "1-1": "ID of the API request that caused the event. If empty string, event was automatic.", "2-0": "api_version", "2-1": "The medvid.io API version used to render data.", "3-0": "created_at", "3-1": "The date/time the event occurred. Format: 2015-07-14T05:07:25.735147Z", "4-0": "account_id", "4-1": "The relevant account id for this event.", "5-0": "user_id", "5-1": "The relevant user id for this event.", "6-0": "data", "6-1": "Hash containing data associated with the event, such as the video, user, etc." }, "cols": 2, "rows": 7 } [/block] ##Event Data Example## [block:code] { "codes": [ { "code": "{\n \"event\": {\n \"type\": \"event.action\",\n \"request_id\": \"71996457-1676-4482-a9f8-6b0960d86585\",\n \"created_at\": \"2015-07-14T05:08:42.641684Z\",\n \"api_version\": \"2015-02-03\",\n \"account_id\": 1,\n \"user_id\": 2,\n \"data\": {\n \"video\": {\n \"id\": 123,\n \"title\": \"My video\",\n // additional video attributes\n }\n }\n }\n }\n", "language": "json" } ] } [/block]
##General## The medvid.io platform generates server-side events for every interaction you carry out with the system. These events are presented via the [Developer Portal](https://mercury.reeldx.com) in the Requests -> Events page: [block:image] { "images": [ { "image": [ "https://files.readme.io/CAap7nGmRxWLv2p0fSsV_medvidio_events_list.png", "medvidio_events_list.png", "1278", "1013", "#112d35", "" ] } ] } [/block] Each event can be viewed by clicking on the “folder view” icon on the right side of its row: [block:image] { "images": [ { "image": [ "https://files.readme.io/1dbzV02TO8OP32vOghMQ_medvidio_events_streamed.png", "medvidio_events_streamed.png", "1284", "687", "#0e2c35", "" ] } ] } [/block] ##Event Structure## Events are made up of the following items: [block:parameters] { "data": { "h-0": "Event Attribute", "h-1": "Description", "0-0": "type", "0-1": "The type of event, e.g. stream.started, video_file.uploaded, etc. See list below for valid types.", "1-0": "request_id", "1-1": "ID of the API request that caused the event. If empty string, event was automatic.", "2-0": "api_version", "2-1": "The medvid.io API version used to render data.", "3-0": "created_at", "3-1": "The date/time the event occurred. Format: 2015-07-14T05:07:25.735147Z", "4-0": "account_id", "4-1": "The relevant account id for this event.", "5-0": "user_id", "5-1": "The relevant user id for this event.", "6-0": "data", "6-1": "Hash containing data associated with the event, such as the video, user, etc." }, "cols": 2, "rows": 7 } [/block] ##Event Data Example## [block:code] { "codes": [ { "code": "{\n \"event\": {\n \"type\": \"event.action\",\n \"request_id\": \"71996457-1676-4482-a9f8-6b0960d86585\",\n \"created_at\": \"2015-07-14T05:08:42.641684Z\",\n \"api_version\": \"2015-02-03\",\n \"account_id\": 1,\n \"user_id\": 2,\n \"data\": {\n \"video\": {\n \"id\": 123,\n \"title\": \"My video\",\n // additional video attributes\n }\n }\n }\n }\n", "language": "json" } ] } [/block]
{"_id":"56ba8507bb36440d0001f5d7","body":"[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Event Type\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"account.created\",\n    \"0-1\": \"Occurs whenever an account is created.\",\n    \"1-0\": \"account.updated\",\n    \"1-1\": \"Occurs whenever an account is updated.\",\n    \"2-0\": \"account.deleted\",\n    \"2-1\": \"Occurs whenever an account is deleted.\",\n    \"3-0\": \"account_user.created\",\n    \"4-0\": \"account_user.updated\",\n    \"5-0\": \"account_user.deleted\",\n    \"3-1\": \"Occurs whenever an account user is created.\",\n    \"4-1\": \"Occurs whenever an account user is updated.\",\n    \"5-1\": \"Occurs whenever an account user is deleted.\",\n    \"6-0\": \"application.created\",\n    \"7-0\": \"application.updated\",\n    \"8-0\": \"application.deleted\",\n    \"6-1\": \"Occurs whenever an application is created.\",\n    \"7-1\": \"Occurs whenever an application is updated.\",\n    \"8-1\": \"Occurs whenever an application is deleted.\",\n    \"9-0\": \"billing_cycle.created\",\n    \"11-0\": \"group.updated\",\n    \"12-0\": \"group.deleted\",\n    \"9-1\": \"Occurs whenever a billing cycle is created.\",\n    \"11-1\": \"Occurs whenever a group is updated.\",\n    \"12-1\": \"Occurs whenever a group is deleted.\",\n    \"13-0\": \"group_viewer.created\",\n    \"14-0\": \"group_viewer.deleted\",\n    \"13-1\": \"Occurs whenever a group viewer is created.\",\n    \"14-1\": \"Occurs whenever a group viewer is deleted.\",\n    \"15-0\": \"user.created\",\n    \"16-0\": \"user.updated\",\n    \"17-0\": \"user.deleted\",\n    \"15-1\": \"Occurs whenever a user is created.\",\n    \"16-1\": \"Occurs whenever a user is updated.\",\n    \"17-1\": \"Occurs whenever a user is deleted.\",\n    \"18-0\": \"user_policy.created\",\n    \"19-0\": \"user_policy.updated\",\n    \"20-0\": \"user_policy.deleted\",\n    \"18-1\": \"Occurs whenever a user policy is created.\",\n    \"19-1\": \"Occurs whenever a user policy is updated.\",\n    \"20-1\": \"Occurs whenever a user policy is deleted.\",\n    \"21-0\": \"user_viewer.created\",\n    \"22-0\": \"user_viewer.deleted\",\n    \"23-0\": \"video_record.created\",\n    \"21-1\": \"Occurs whenever a user viewer is created.\",\n    \"22-1\": \"Occurs whenever a user viewer is deleted.\",\n    \"23-1\": \"Occurs whenever a video record is created.\",\n    \"24-0\": \"video_record.updated\",\n    \"25-0\": \"video_record.deleted\",\n    \"24-1\": \"Occurs whenever a video record is updated.\",\n    \"25-1\": \"Occurs whenever a video record is deleted.\",\n    \"26-0\": \"video_file.created\",\n    \"27-0\": \"video_file.deleted\",\n    \"26-1\": \"Occurs whenever a video file is uploaded.\",\n    \"27-1\": \"Occurs whenever a video file is deleted.\",\n    \"28-0\": \"transcode.started\",\n    \"29-0\": \"transcode.ended\",\n    \"28-1\": \"Occurs whenever the creation of a video artifact begins.\",\n    \"29-1\": \"Occurs whenever the creation of a video artifact ends.\",\n    \"30-0\": \"artifact.created\",\n    \"31-0\": \"artifact.deleted\",\n    \"30-1\": \"Occurs whenever a video artifact is created.\",\n    \"31-1\": \"Occurs whenever a video artifact is deleted.\",\n    \"32-0\": \"stream.started\",\n    \"33-0\": \"stream.ended\",\n    \"32-1\": \"Occurs whenever a stream begins.\",\n    \"33-1\": \"Occurs whenever a stream ends.\",\n    \"10-1\": \"Occurs whenever a group is created.\",\n    \"10-0\": \"group.created\"\n  },\n  \"cols\": 2,\n  \"rows\": 34\n}\n[/block]","category":"56ba82398fce0e1900d99339","createdAt":"2016-02-10T00:32:07.175Z","excerpt":"","githubsync":"","project":"5671bb91a0ee9b0d00185322","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","url":""},"user":"5671bb4d5e49250d006648fd","title":"Types of Events","updates":[],"slug":"types-of-events","sync_unique":"","type":"basic","version":"5671bb92a0ee9b0d00185325","hidden":false,"link_external":false,"order":1,"__v":2,"link_url":"","childrenPages":[]}

Types of Events


[block:parameters] { "data": { "h-0": "Event Type", "h-1": "Description", "0-0": "account.created", "0-1": "Occurs whenever an account is created.", "1-0": "account.updated", "1-1": "Occurs whenever an account is updated.", "2-0": "account.deleted", "2-1": "Occurs whenever an account is deleted.", "3-0": "account_user.created", "4-0": "account_user.updated", "5-0": "account_user.deleted", "3-1": "Occurs whenever an account user is created.", "4-1": "Occurs whenever an account user is updated.", "5-1": "Occurs whenever an account user is deleted.", "6-0": "application.created", "7-0": "application.updated", "8-0": "application.deleted", "6-1": "Occurs whenever an application is created.", "7-1": "Occurs whenever an application is updated.", "8-1": "Occurs whenever an application is deleted.", "9-0": "billing_cycle.created", "11-0": "group.updated", "12-0": "group.deleted", "9-1": "Occurs whenever a billing cycle is created.", "11-1": "Occurs whenever a group is updated.", "12-1": "Occurs whenever a group is deleted.", "13-0": "group_viewer.created", "14-0": "group_viewer.deleted", "13-1": "Occurs whenever a group viewer is created.", "14-1": "Occurs whenever a group viewer is deleted.", "15-0": "user.created", "16-0": "user.updated", "17-0": "user.deleted", "15-1": "Occurs whenever a user is created.", "16-1": "Occurs whenever a user is updated.", "17-1": "Occurs whenever a user is deleted.", "18-0": "user_policy.created", "19-0": "user_policy.updated", "20-0": "user_policy.deleted", "18-1": "Occurs whenever a user policy is created.", "19-1": "Occurs whenever a user policy is updated.", "20-1": "Occurs whenever a user policy is deleted.", "21-0": "user_viewer.created", "22-0": "user_viewer.deleted", "23-0": "video_record.created", "21-1": "Occurs whenever a user viewer is created.", "22-1": "Occurs whenever a user viewer is deleted.", "23-1": "Occurs whenever a video record is created.", "24-0": "video_record.updated", "25-0": "video_record.deleted", "24-1": "Occurs whenever a video record is updated.", "25-1": "Occurs whenever a video record is deleted.", "26-0": "video_file.created", "27-0": "video_file.deleted", "26-1": "Occurs whenever a video file is uploaded.", "27-1": "Occurs whenever a video file is deleted.", "28-0": "transcode.started", "29-0": "transcode.ended", "28-1": "Occurs whenever the creation of a video artifact begins.", "29-1": "Occurs whenever the creation of a video artifact ends.", "30-0": "artifact.created", "31-0": "artifact.deleted", "30-1": "Occurs whenever a video artifact is created.", "31-1": "Occurs whenever a video artifact is deleted.", "32-0": "stream.started", "33-0": "stream.ended", "32-1": "Occurs whenever a stream begins.", "33-1": "Occurs whenever a stream ends.", "10-1": "Occurs whenever a group is created.", "10-0": "group.created" }, "cols": 2, "rows": 34 } [/block]
[block:parameters] { "data": { "h-0": "Event Type", "h-1": "Description", "0-0": "account.created", "0-1": "Occurs whenever an account is created.", "1-0": "account.updated", "1-1": "Occurs whenever an account is updated.", "2-0": "account.deleted", "2-1": "Occurs whenever an account is deleted.", "3-0": "account_user.created", "4-0": "account_user.updated", "5-0": "account_user.deleted", "3-1": "Occurs whenever an account user is created.", "4-1": "Occurs whenever an account user is updated.", "5-1": "Occurs whenever an account user is deleted.", "6-0": "application.created", "7-0": "application.updated", "8-0": "application.deleted", "6-1": "Occurs whenever an application is created.", "7-1": "Occurs whenever an application is updated.", "8-1": "Occurs whenever an application is deleted.", "9-0": "billing_cycle.created", "11-0": "group.updated", "12-0": "group.deleted", "9-1": "Occurs whenever a billing cycle is created.", "11-1": "Occurs whenever a group is updated.", "12-1": "Occurs whenever a group is deleted.", "13-0": "group_viewer.created", "14-0": "group_viewer.deleted", "13-1": "Occurs whenever a group viewer is created.", "14-1": "Occurs whenever a group viewer is deleted.", "15-0": "user.created", "16-0": "user.updated", "17-0": "user.deleted", "15-1": "Occurs whenever a user is created.", "16-1": "Occurs whenever a user is updated.", "17-1": "Occurs whenever a user is deleted.", "18-0": "user_policy.created", "19-0": "user_policy.updated", "20-0": "user_policy.deleted", "18-1": "Occurs whenever a user policy is created.", "19-1": "Occurs whenever a user policy is updated.", "20-1": "Occurs whenever a user policy is deleted.", "21-0": "user_viewer.created", "22-0": "user_viewer.deleted", "23-0": "video_record.created", "21-1": "Occurs whenever a user viewer is created.", "22-1": "Occurs whenever a user viewer is deleted.", "23-1": "Occurs whenever a video record is created.", "24-0": "video_record.updated", "25-0": "video_record.deleted", "24-1": "Occurs whenever a video record is updated.", "25-1": "Occurs whenever a video record is deleted.", "26-0": "video_file.created", "27-0": "video_file.deleted", "26-1": "Occurs whenever a video file is uploaded.", "27-1": "Occurs whenever a video file is deleted.", "28-0": "transcode.started", "29-0": "transcode.ended", "28-1": "Occurs whenever the creation of a video artifact begins.", "29-1": "Occurs whenever the creation of a video artifact ends.", "30-0": "artifact.created", "31-0": "artifact.deleted", "30-1": "Occurs whenever a video artifact is created.", "31-1": "Occurs whenever a video artifact is deleted.", "32-0": "stream.started", "33-0": "stream.ended", "32-1": "Occurs whenever a stream begins.", "33-1": "Occurs whenever a stream ends.", "10-1": "Occurs whenever a group is created.", "10-0": "group.created" }, "cols": 2, "rows": 34 } [/block]
{"_id":"56ba89fe0082ba1900c2541c","hidden":false,"order":2,"project":"5671bb91a0ee9b0d00185322","title":"Event Data Values","api":{"url":"","auth":"required","params":[],"results":{"codes":[{"language":"json","code":"{}","name":"","status":200},{"status":400,"language":"json","code":"{}","name":""}]},"settings":""},"createdAt":"2016-02-10T00:53:18.692Z","excerpt":"","githubsync":"","user":"5671bb4d5e49250d006648fd","body":"##stream.started##\n**Start Stream Event**\nInvoked when a video stream is started. There may be 1-n Start Stream Events per video stream.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Data Attribute\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"streaming_session_id\",\n    \"0-1\": \"Unique session ID per stream.\",\n    \"1-0\": \"occurred_at\",\n    \"1-1\": \"ISO 8601 timestamp of the stream end time in UTC.\",\n    \"2-0\": \"video_id\",\n    \"2-1\": \"ID of video file being streamed.\",\n    \"3-0\": \"bytes_streamed\",\n    \"3-1\": \"Bytes streamed for a given streaming session; 0 for start events.\",\n    \"4-0\": \"referrer\",\n    \"5-0\": \"client_ip\",\n    \"6-0\": \"user_agent\",\n    \"6-1\": \"Requesting user agent for stream.\",\n    \"5-1\": \"IP of client where video stream is sent.\",\n    \"4-1\": \"Referrer agent of stream requester.\"\n  },\n  \"cols\": 2,\n  \"rows\": 7\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"event\\\": {\\n      \\\"type\\\": \\\"stream.started\\\",\\n      \\\"request_id\\\": \\\"71996457-1676-4482-a9f8-6b0960d86585\\\",\\n      \\\"created_at\\\": \\\"2015-07-14T05:08:42.641684Z\\\",\\n      \\\"api_version\\\": \\\"2015-02-03\\\",\\n      \\\"account_id\\\": 1,\\n      \\\"user_id\\\": 2,\\n      \\\"data\\\": {\\n        \\\"stream_event\\\": {\\n          \\\"streaming_session_id\\\": \\\"123-abcd\\\",\\n          \\\"occurred_at\\\": \\\"2015-07-14T05:08:42.641684Z\\\",\\n          \\\"video_id\\\": 123,\\n          \\\"bytes_streamed\\\": 0,\\n          \\\"referrer\\\": \\\"http://localhost:8080/video_play\\\",\\n          \\\"client_ip\\\": \\\"127.0.0.1\\\",\\n          \\\"user_agent\\\": \\\"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36\\\"\\n        }\\n      }\\n    }\\n  }\\n\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n##stream.ended##\n**End Stream Event**\n\nInvoked when a video stream is ended; includes bytes streamed from server to client. There may be 1-n End Stream Events per video stream.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Data Attribute\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"streaming_session_id\",\n    \"1-0\": \"occurred_at\",\n    \"2-0\": \"video_id\",\n    \"3-0\": \"bytes_streamed\",\n    \"4-0\": \"referrer\",\n    \"5-0\": \"client_ip\",\n    \"6-0\": \"user_agent\",\n    \"0-1\": \"Unique session ID per stream.\",\n    \"1-1\": \"ISO 8601 timestamp of the stream end time in UTC.\",\n    \"2-1\": \"ID of video file being streamed.\",\n    \"3-1\": \"Bytes streamed for a given streaming session; 0 for start events.\",\n    \"4-1\": \"Referrer agent of stream requester.\",\n    \"5-1\": \"IP of client where video stream is sent.\",\n    \"6-1\": \"Requesting user agent for stream.\"\n  },\n  \"cols\": 2,\n  \"rows\": 7\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"event\\\": {\\n      \\\"type\\\": \\\"stream.ended\\\",\\n      \\\"request_id\\\": \\\"719923457-1676-4482-a9f8-6b0960d86585\\\",\\n      \\\"created_at\\\": \\\"2015-07-14T05:11:42.600684Z\\\",\\n      \\\"api_version\\\": \\\"2015-02-03\\\",\\n      \\\"account_id\\\": 1,\\n      \\\"user_id\\\": 2,\\n      \\\"data\\\": {\\n        \\\"stream_event\\\": {\\n          \\\"streaming_session_id\\\": \\\"123-abcd\\\",\\n          \\\"occurred_at\\\": \\\"2015-07-14T05:11:42.600684Z\\\",\\n          \\\"video_id\\\": 123,\\n          \\\"bytes_streamed\\\": 9878321,\\n          \\\"referrer\\\": \\\"http://localhost:8080/video_play\\\",\\n          \\\"client_ip\\\": \\\"127.0.0.1\\\",\\n          \\\"user_agent\\\": \\\"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36\\\"\\n        }\\n      }\\n    }\\n  }\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n##video_record.*##\n**VideoRecord Events**\n\nThere are several video-related events that are generated by usage of the medvid.io API. The API that generated these events is described here: [medvid.io APIs - Videos](/docs/videos-overview). For each of these events the data item is the JSON representation of the video record in the medvid.io platform.\n\nHere is an example of the event generated by calling the Create Video API endpoint:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"event\\\": {\\n        \\\"id\\\": \\\"\\\",\\n        \\\"account_id\\\": 99,\\n        \\\"user_id\\\": 4,\\n        \\\"api_version\\\": \\\"2015-10-08\\\",\\n        \\\"request_id\\\": \\\"3f0dfc4e-530a-4aef-903c-3bc75a7bcc38\\\",\\n        \\\"type\\\": \\\"video_record.created\\\",\\n        \\\"data\\\": {\\n            \\\"video\\\": {\\n                \\\"id\\\": 259,\\n                \\\"title\\\": \\\"_title\\\",\\n                \\\"description\\\": \\\"_description\\\",\\n                \\\"location\\\": \\\"_location\\\",\\n                \\\"file_name_input\\\": \\\"testcc.mp4\\\",\\n                \\\"file_name_raw\\\": \\\"KITfPTFxaejWQzbNQdyXsHzNOV.mp4\\\",\\n                \\\"file_name_encoded\\\": \\\"KITfPTFxaejWQzbNQdyXsHzNOV.mp4\\\",\\n                \\\"created_at\\\": \\\"2015-10-14T16:21:04.446571Z\\\",\\n                \\\"updated_at\\\": \\\"2015-10-14T16:21:04.446571Z\\\",\\n                \\\"owner_id\\\": 4,\\n                \\\"subject_id\\\": 0,\\n                \\\"user_viewers\\\": [\\n                    {\\n                        \\\"id\\\": 261,\\n                        \\\"video_id\\\": 259,\\n                        \\\"user_id\\\": 4,\\n                        \\\"name\\\": \\\"\\\",\\n                        \\\"created_at\\\": \\\"2015-10-14T16:21:04.472944Z\\\",\\n                        \\\"updated_at\\\": \\\"2015-10-14T16:21:04.472944Z\\\"\\n                    }\\n                ],\\n                \\\"user_viewer_ids\\\": [\\n                    4\\n                ],\\n                \\\"group_viewers\\\": [\\n                    {\\n                        \\\"id\\\": 402,\\n                        \\\"video_id\\\": 259,\\n                        \\\"group_id\\\": 12,\\n                        \\\"name\\\": \\\"\\\",\\n                        \\\"created_at\\\": \\\"2015-10-14T16:21:04.454682Z\\\",\\n                        \\\"updated_at\\\": \\\"2015-10-14T16:21:04.454682Z\\\"\\n                    },\\n                    {\\n                        \\\"id\\\": 403,\\n                        \\\"video_id\\\": 259,\\n                        \\\"group_id\\\": 13,\\n                        \\\"name\\\": \\\"\\\",\\n                        \\\"created_at\\\": \\\"2015-10-14T16:21:04.461082Z\\\",\\n                        \\\"updated_at\\\": \\\"2015-10-14T16:21:04.461082Z\\\"\\n                    },\\n                    {\\n                        \\\"id\\\": 404,\\n                        \\\"video_id\\\": 259,\\n                        \\\"group_id\\\": 14,\\n                        \\\"name\\\": \\\"\\\",\\n                        \\\"created_at\\\": \\\"2015-10-14T16:21:04.46713Z\\\",\\n                        \\\"updated_at\\\": \\\"2015-10-14T16:21:04.46713Z\\\"\\n                    }\\n                ],\\n                \\\"group_viewer_ids\\\": [\\n                    12,\\n                    13,\\n                    14\\n                ],\\n                \\\"storage_billable\\\": true,\\n                \\\"size description:\\\": 1234567,\\n                \\\"account_id\\\": 99\\n            }\\n        },\\n        \\\"created_at\\\": \\\"2015-10-14T16:21:04.686040262Z\\\"\\n    }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n##video_file.*##\n**VideoFile Events**\n\nWhen a video is created or deleted, an event of this type is generated. These events represent the creation or deletion of the actual video file in the medvid.io system. For each of these events, the data item is of the same form as for the video_record event.\n\n##group_viewer.*##\n**GroupViewer Events**\n\nWhen a group viewer is added or removed from a video, an event of this type is generated. For each of these events, the data item is the representation of the group viewer record in the medvid.io platform:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"group_viewer\\\": {\\n        \\\"id\\\": 37809212344\\n        \\\"video_id\\\": 123\\n        \\\"group_id\\\": 987\\n        \\\"name\\\": \\\"permission name\\\"\\n        \\\"created_at\\\": \\\"2015-10-18T13:27:16.447328Z\\\"\\n        \\\"updated_at\\\": \\\"2015-10-18T13:27:16.447328Z\\\"\\n    }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n##user_viewer.*##\n**UserViewer Events**\n\nWhen a user viewer is added or removed from a video, an event of this type is generated. For each of these events, the data item is the representation of the user viewer record in the medvid.io platform:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"user_viewer\\\": {\\n        \\\"id\\\": 37123260234\\n        \\\"video_id\\\": 123\\n        \\\"user_id\\\": 567\\n        \\\"name\\\": \\\"permission name\\\"\\n        \\\"created_at\\\": \\\"2015-10-18T13:27:16.447328Z\\\"\\n        \\\"updated_at\\\": \\\"2015-10-18T13:27:16.447328Z\\\"\\n    }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n##artifact.*##\n**Artifact Events**\n\nWhen an event related to video artifacts occurs, an event of this type is generated. These events represent the creation phase or deletion of the actual artifact file in the medvid.io platform. For each of these events, the data item is a JSON object containing the name and video format details of the artifact file that was the subject of the event.","category":"56ba82398fce0e1900d99339","link_url":"","version":"5671bb92a0ee9b0d00185325","updates":[],"slug":"event-data-values","sync_unique":"","type":"basic","__v":2,"link_external":false,"childrenPages":[]}

Event Data Values


##stream.started## **Start Stream Event** Invoked when a video stream is started. There may be 1-n Start Stream Events per video stream. [block:parameters] { "data": { "h-0": "Data Attribute", "h-1": "Description", "0-0": "streaming_session_id", "0-1": "Unique session ID per stream.", "1-0": "occurred_at", "1-1": "ISO 8601 timestamp of the stream end time in UTC.", "2-0": "video_id", "2-1": "ID of video file being streamed.", "3-0": "bytes_streamed", "3-1": "Bytes streamed for a given streaming session; 0 for start events.", "4-0": "referrer", "5-0": "client_ip", "6-0": "user_agent", "6-1": "Requesting user agent for stream.", "5-1": "IP of client where video stream is sent.", "4-1": "Referrer agent of stream requester." }, "cols": 2, "rows": 7 } [/block] [block:code] { "codes": [ { "code": "{\n \"event\": {\n \"type\": \"stream.started\",\n \"request_id\": \"71996457-1676-4482-a9f8-6b0960d86585\",\n \"created_at\": \"2015-07-14T05:08:42.641684Z\",\n \"api_version\": \"2015-02-03\",\n \"account_id\": 1,\n \"user_id\": 2,\n \"data\": {\n \"stream_event\": {\n \"streaming_session_id\": \"123-abcd\",\n \"occurred_at\": \"2015-07-14T05:08:42.641684Z\",\n \"video_id\": 123,\n \"bytes_streamed\": 0,\n \"referrer\": \"http://localhost:8080/video_play\",\n \"client_ip\": \"127.0.0.1\",\n \"user_agent\": \"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36\"\n }\n }\n }\n }\n", "language": "json" } ] } [/block] ##stream.ended## **End Stream Event** Invoked when a video stream is ended; includes bytes streamed from server to client. There may be 1-n End Stream Events per video stream. [block:parameters] { "data": { "h-0": "Data Attribute", "h-1": "Description", "0-0": "streaming_session_id", "1-0": "occurred_at", "2-0": "video_id", "3-0": "bytes_streamed", "4-0": "referrer", "5-0": "client_ip", "6-0": "user_agent", "0-1": "Unique session ID per stream.", "1-1": "ISO 8601 timestamp of the stream end time in UTC.", "2-1": "ID of video file being streamed.", "3-1": "Bytes streamed for a given streaming session; 0 for start events.", "4-1": "Referrer agent of stream requester.", "5-1": "IP of client where video stream is sent.", "6-1": "Requesting user agent for stream." }, "cols": 2, "rows": 7 } [/block] [block:code] { "codes": [ { "code": "{\n \"event\": {\n \"type\": \"stream.ended\",\n \"request_id\": \"719923457-1676-4482-a9f8-6b0960d86585\",\n \"created_at\": \"2015-07-14T05:11:42.600684Z\",\n \"api_version\": \"2015-02-03\",\n \"account_id\": 1,\n \"user_id\": 2,\n \"data\": {\n \"stream_event\": {\n \"streaming_session_id\": \"123-abcd\",\n \"occurred_at\": \"2015-07-14T05:11:42.600684Z\",\n \"video_id\": 123,\n \"bytes_streamed\": 9878321,\n \"referrer\": \"http://localhost:8080/video_play\",\n \"client_ip\": \"127.0.0.1\",\n \"user_agent\": \"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36\"\n }\n }\n }\n }", "language": "json" } ] } [/block] ##video_record.*## **VideoRecord Events** There are several video-related events that are generated by usage of the medvid.io API. The API that generated these events is described here: [medvid.io APIs - Videos](/docs/videos-overview). For each of these events the data item is the JSON representation of the video record in the medvid.io platform. Here is an example of the event generated by calling the Create Video API endpoint: [block:code] { "codes": [ { "code": "{\n \"event\": {\n \"id\": \"\",\n \"account_id\": 99,\n \"user_id\": 4,\n \"api_version\": \"2015-10-08\",\n \"request_id\": \"3f0dfc4e-530a-4aef-903c-3bc75a7bcc38\",\n \"type\": \"video_record.created\",\n \"data\": {\n \"video\": {\n \"id\": 259,\n \"title\": \"_title\",\n \"description\": \"_description\",\n \"location\": \"_location\",\n \"file_name_input\": \"testcc.mp4\",\n \"file_name_raw\": \"KITfPTFxaejWQzbNQdyXsHzNOV.mp4\",\n \"file_name_encoded\": \"KITfPTFxaejWQzbNQdyXsHzNOV.mp4\",\n \"created_at\": \"2015-10-14T16:21:04.446571Z\",\n \"updated_at\": \"2015-10-14T16:21:04.446571Z\",\n \"owner_id\": 4,\n \"subject_id\": 0,\n \"user_viewers\": [\n {\n \"id\": 261,\n \"video_id\": 259,\n \"user_id\": 4,\n \"name\": \"\",\n \"created_at\": \"2015-10-14T16:21:04.472944Z\",\n \"updated_at\": \"2015-10-14T16:21:04.472944Z\"\n }\n ],\n \"user_viewer_ids\": [\n 4\n ],\n \"group_viewers\": [\n {\n \"id\": 402,\n \"video_id\": 259,\n \"group_id\": 12,\n \"name\": \"\",\n \"created_at\": \"2015-10-14T16:21:04.454682Z\",\n \"updated_at\": \"2015-10-14T16:21:04.454682Z\"\n },\n {\n \"id\": 403,\n \"video_id\": 259,\n \"group_id\": 13,\n \"name\": \"\",\n \"created_at\": \"2015-10-14T16:21:04.461082Z\",\n \"updated_at\": \"2015-10-14T16:21:04.461082Z\"\n },\n {\n \"id\": 404,\n \"video_id\": 259,\n \"group_id\": 14,\n \"name\": \"\",\n \"created_at\": \"2015-10-14T16:21:04.46713Z\",\n \"updated_at\": \"2015-10-14T16:21:04.46713Z\"\n }\n ],\n \"group_viewer_ids\": [\n 12,\n 13,\n 14\n ],\n \"storage_billable\": true,\n \"size description:\": 1234567,\n \"account_id\": 99\n }\n },\n \"created_at\": \"2015-10-14T16:21:04.686040262Z\"\n }\n}", "language": "json" } ] } [/block] ##video_file.*## **VideoFile Events** When a video is created or deleted, an event of this type is generated. These events represent the creation or deletion of the actual video file in the medvid.io system. For each of these events, the data item is of the same form as for the video_record event. ##group_viewer.*## **GroupViewer Events** When a group viewer is added or removed from a video, an event of this type is generated. For each of these events, the data item is the representation of the group viewer record in the medvid.io platform: [block:code] { "codes": [ { "code": "{\n \"group_viewer\": {\n \"id\": 37809212344\n \"video_id\": 123\n \"group_id\": 987\n \"name\": \"permission name\"\n \"created_at\": \"2015-10-18T13:27:16.447328Z\"\n \"updated_at\": \"2015-10-18T13:27:16.447328Z\"\n }\n}", "language": "json" } ] } [/block] ##user_viewer.*## **UserViewer Events** When a user viewer is added or removed from a video, an event of this type is generated. For each of these events, the data item is the representation of the user viewer record in the medvid.io platform: [block:code] { "codes": [ { "code": "{\n \"user_viewer\": {\n \"id\": 37123260234\n \"video_id\": 123\n \"user_id\": 567\n \"name\": \"permission name\"\n \"created_at\": \"2015-10-18T13:27:16.447328Z\"\n \"updated_at\": \"2015-10-18T13:27:16.447328Z\"\n }\n}", "language": "json" } ] } [/block] ##artifact.*## **Artifact Events** When an event related to video artifacts occurs, an event of this type is generated. These events represent the creation phase or deletion of the actual artifact file in the medvid.io platform. For each of these events, the data item is a JSON object containing the name and video format details of the artifact file that was the subject of the event.
##stream.started## **Start Stream Event** Invoked when a video stream is started. There may be 1-n Start Stream Events per video stream. [block:parameters] { "data": { "h-0": "Data Attribute", "h-1": "Description", "0-0": "streaming_session_id", "0-1": "Unique session ID per stream.", "1-0": "occurred_at", "1-1": "ISO 8601 timestamp of the stream end time in UTC.", "2-0": "video_id", "2-1": "ID of video file being streamed.", "3-0": "bytes_streamed", "3-1": "Bytes streamed for a given streaming session; 0 for start events.", "4-0": "referrer", "5-0": "client_ip", "6-0": "user_agent", "6-1": "Requesting user agent for stream.", "5-1": "IP of client where video stream is sent.", "4-1": "Referrer agent of stream requester." }, "cols": 2, "rows": 7 } [/block] [block:code] { "codes": [ { "code": "{\n \"event\": {\n \"type\": \"stream.started\",\n \"request_id\": \"71996457-1676-4482-a9f8-6b0960d86585\",\n \"created_at\": \"2015-07-14T05:08:42.641684Z\",\n \"api_version\": \"2015-02-03\",\n \"account_id\": 1,\n \"user_id\": 2,\n \"data\": {\n \"stream_event\": {\n \"streaming_session_id\": \"123-abcd\",\n \"occurred_at\": \"2015-07-14T05:08:42.641684Z\",\n \"video_id\": 123,\n \"bytes_streamed\": 0,\n \"referrer\": \"http://localhost:8080/video_play\",\n \"client_ip\": \"127.0.0.1\",\n \"user_agent\": \"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36\"\n }\n }\n }\n }\n", "language": "json" } ] } [/block] ##stream.ended## **End Stream Event** Invoked when a video stream is ended; includes bytes streamed from server to client. There may be 1-n End Stream Events per video stream. [block:parameters] { "data": { "h-0": "Data Attribute", "h-1": "Description", "0-0": "streaming_session_id", "1-0": "occurred_at", "2-0": "video_id", "3-0": "bytes_streamed", "4-0": "referrer", "5-0": "client_ip", "6-0": "user_agent", "0-1": "Unique session ID per stream.", "1-1": "ISO 8601 timestamp of the stream end time in UTC.", "2-1": "ID of video file being streamed.", "3-1": "Bytes streamed for a given streaming session; 0 for start events.", "4-1": "Referrer agent of stream requester.", "5-1": "IP of client where video stream is sent.", "6-1": "Requesting user agent for stream." }, "cols": 2, "rows": 7 } [/block] [block:code] { "codes": [ { "code": "{\n \"event\": {\n \"type\": \"stream.ended\",\n \"request_id\": \"719923457-1676-4482-a9f8-6b0960d86585\",\n \"created_at\": \"2015-07-14T05:11:42.600684Z\",\n \"api_version\": \"2015-02-03\",\n \"account_id\": 1,\n \"user_id\": 2,\n \"data\": {\n \"stream_event\": {\n \"streaming_session_id\": \"123-abcd\",\n \"occurred_at\": \"2015-07-14T05:11:42.600684Z\",\n \"video_id\": 123,\n \"bytes_streamed\": 9878321,\n \"referrer\": \"http://localhost:8080/video_play\",\n \"client_ip\": \"127.0.0.1\",\n \"user_agent\": \"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36\"\n }\n }\n }\n }", "language": "json" } ] } [/block] ##video_record.*## **VideoRecord Events** There are several video-related events that are generated by usage of the medvid.io API. The API that generated these events is described here: [medvid.io APIs - Videos](/docs/videos-overview). For each of these events the data item is the JSON representation of the video record in the medvid.io platform. Here is an example of the event generated by calling the Create Video API endpoint: [block:code] { "codes": [ { "code": "{\n \"event\": {\n \"id\": \"\",\n \"account_id\": 99,\n \"user_id\": 4,\n \"api_version\": \"2015-10-08\",\n \"request_id\": \"3f0dfc4e-530a-4aef-903c-3bc75a7bcc38\",\n \"type\": \"video_record.created\",\n \"data\": {\n \"video\": {\n \"id\": 259,\n \"title\": \"_title\",\n \"description\": \"_description\",\n \"location\": \"_location\",\n \"file_name_input\": \"testcc.mp4\",\n \"file_name_raw\": \"KITfPTFxaejWQzbNQdyXsHzNOV.mp4\",\n \"file_name_encoded\": \"KITfPTFxaejWQzbNQdyXsHzNOV.mp4\",\n \"created_at\": \"2015-10-14T16:21:04.446571Z\",\n \"updated_at\": \"2015-10-14T16:21:04.446571Z\",\n \"owner_id\": 4,\n \"subject_id\": 0,\n \"user_viewers\": [\n {\n \"id\": 261,\n \"video_id\": 259,\n \"user_id\": 4,\n \"name\": \"\",\n \"created_at\": \"2015-10-14T16:21:04.472944Z\",\n \"updated_at\": \"2015-10-14T16:21:04.472944Z\"\n }\n ],\n \"user_viewer_ids\": [\n 4\n ],\n \"group_viewers\": [\n {\n \"id\": 402,\n \"video_id\": 259,\n \"group_id\": 12,\n \"name\": \"\",\n \"created_at\": \"2015-10-14T16:21:04.454682Z\",\n \"updated_at\": \"2015-10-14T16:21:04.454682Z\"\n },\n {\n \"id\": 403,\n \"video_id\": 259,\n \"group_id\": 13,\n \"name\": \"\",\n \"created_at\": \"2015-10-14T16:21:04.461082Z\",\n \"updated_at\": \"2015-10-14T16:21:04.461082Z\"\n },\n {\n \"id\": 404,\n \"video_id\": 259,\n \"group_id\": 14,\n \"name\": \"\",\n \"created_at\": \"2015-10-14T16:21:04.46713Z\",\n \"updated_at\": \"2015-10-14T16:21:04.46713Z\"\n }\n ],\n \"group_viewer_ids\": [\n 12,\n 13,\n 14\n ],\n \"storage_billable\": true,\n \"size description:\": 1234567,\n \"account_id\": 99\n }\n },\n \"created_at\": \"2015-10-14T16:21:04.686040262Z\"\n }\n}", "language": "json" } ] } [/block] ##video_file.*## **VideoFile Events** When a video is created or deleted, an event of this type is generated. These events represent the creation or deletion of the actual video file in the medvid.io system. For each of these events, the data item is of the same form as for the video_record event. ##group_viewer.*## **GroupViewer Events** When a group viewer is added or removed from a video, an event of this type is generated. For each of these events, the data item is the representation of the group viewer record in the medvid.io platform: [block:code] { "codes": [ { "code": "{\n \"group_viewer\": {\n \"id\": 37809212344\n \"video_id\": 123\n \"group_id\": 987\n \"name\": \"permission name\"\n \"created_at\": \"2015-10-18T13:27:16.447328Z\"\n \"updated_at\": \"2015-10-18T13:27:16.447328Z\"\n }\n}", "language": "json" } ] } [/block] ##user_viewer.*## **UserViewer Events** When a user viewer is added or removed from a video, an event of this type is generated. For each of these events, the data item is the representation of the user viewer record in the medvid.io platform: [block:code] { "codes": [ { "code": "{\n \"user_viewer\": {\n \"id\": 37123260234\n \"video_id\": 123\n \"user_id\": 567\n \"name\": \"permission name\"\n \"created_at\": \"2015-10-18T13:27:16.447328Z\"\n \"updated_at\": \"2015-10-18T13:27:16.447328Z\"\n }\n}", "language": "json" } ] } [/block] ##artifact.*## **Artifact Events** When an event related to video artifacts occurs, an event of this type is generated. These events represent the creation phase or deletion of the actual artifact file in the medvid.io platform. For each of these events, the data item is a JSON object containing the name and video format details of the artifact file that was the subject of the event.
{"_id":"56b0f8834b05c50d001ceaeb","body":"For some API calls it will be necessary to know various user ID values. To identify these values various calls can be made to https://mercury.reeldx.com.\n\nYou can also log into the https://mercury.reeldx.com UI (navigate to https://mercury.reeldx.com in any web browser and login with your user credentials) and navigate to User Management -> Users to view the respective User IDs.","createdAt":"2016-02-02T18:42:11.988Z","slug":"users-overview","user":"5671bb4d5e49250d006648fd","__v":4,"githubsync":"","hidden":false,"order":0,"project":"5671bb91a0ee9b0d00185322","sync_unique":"","updates":[],"api":{"auth":"required","params":[],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{}"},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"link_external":false,"title":"Overview","version":"5671bb92a0ee9b0d00185325","category":"56aff2d53c70b01700facf52","excerpt":"Overview of User Endpoints","link_url":"","type":"basic","childrenPages":[]}

Overview

Overview of User Endpoints

For some API calls it will be necessary to know various user ID values. To identify these values various calls can be made to https://mercury.reeldx.com. You can also log into the https://mercury.reeldx.com UI (navigate to https://mercury.reeldx.com in any web browser and login with your user credentials) and navigate to User Management -> Users to view the respective User IDs.
For some API calls it will be necessary to know various user ID values. To identify these values various calls can be made to https://mercury.reeldx.com. You can also log into the https://mercury.reeldx.com UI (navigate to https://mercury.reeldx.com in any web browser and login with your user credentials) and navigate to User Management -> Users to view the respective User IDs.
{"_id":"56aff4b83c70b01700facf53","githubsync":"","order":1,"createdAt":"2016-02-02T00:13:44.235Z","user":"5671bb4d5e49250d006648fd","__v":21,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"users\": [\n    {\n      \"id\": 2,\n      \"email\": \"some.guy@gmail.com\",\n      \"family_name\": \"Guy\",\n      \"gender\": \"male\",\n      \"given_name\": \"Some\",\n      \"locale\": \"en\",\n      \"name\": \"Some Guy\",\n      \"nickname\": \"some.guy\",\n      \"picture\": \"https://lh5.googleusercontent.com/XXXXXXXX/YYYYYYYY/ZZZZZZZZZZ/Abcdefg/photo.jpg\",\n      \"auth0_user_id\": \"google-oauth2|1234556789845634345345\",\n      \"auth0_profile_synced_at\": \"2014-10-03T16:21:11.65016-07:00\",\n      \"created_at\": \"2014-10-03T16:13:01.023603-07:00\",\n      \"updated_at\": \"2014-10-03T16:21:11.650388-07:00\"\n    }\n  ]\n} ","name":null},{"status":401,"language":"text","code":"No response content; Invalid Token","name":null}]},"settings":"56aff341e0b1e40d00c5379a","url":"/users","auth":"required","examples":{"codes":[{"code":"curl \\\n  -H 'Content-type: application/json' \\\n  -H 'Accept: application/json' \\\n  -H 'Authorization: Bearer <token>' \\\n  -i \\\n  https://mercury.reeldx.com/api/v1/users","language":"curl"}]},"method":"get","params":[]},"excerpt":"/users","slug":"users","title":"Get User List","type":"get","body":"Get a list of users you can access\n\n**Data Pagination:**\n- Enabled: Yes\n- Limit: Yes\n- Offset: Yes\n- Response Headers: Yes","category":"56aff2d53c70b01700facf52","hidden":false,"link_external":false,"link_url":"","project":"5671bb91a0ee9b0d00185322","sync_unique":"","updates":[],"version":"5671bb92a0ee9b0d00185325","childrenPages":[]}

getGet User List

/users

Get a list of users you can access **Data Pagination:** - Enabled: Yes - Limit: Yes - Offset: Yes - Response Headers: Yes

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Get a list of users you can access **Data Pagination:** - Enabled: Yes - Limit: Yes - Offset: Yes - Response Headers: Yes
{"_id":"56aff88fd21e9c0d00b6299b","link_url":"","type":"get","api":{"examples":{"codes":[{"language":"curl","code":"curl \\\n  -H 'Content-type: application/json' \\\n  -H 'Accept: application/json' \\\n  -H 'Authorization: Bearer <token>' \\\n  -i \\\n  https://mercury.reeldx.com/api/v1/users/2"}]},"method":"get","params":[{"_id":"56aff88fd21e9c0d00b6299c","required":true,"desc":"ID of user","default":"","type":"int","name":"id","in":"path"}],"results":{"codes":[{"code":"{\n  \"users\": {\n      \"id\": 2,\n      \"email\": \"some.guy@gmail.com\",\n      \"family_name\": \"Guy\",\n      \"gender\": \"male\",\n      \"given_name\": \"Some\",\n      \"locale\": \"en\",\n      \"name\": \"Some Guy\",\n      \"nickname\": \"some.guy\",\n      \"picture\": \"https://lh5.googleusercontent.com/XXXXXXXX/YYYYYYYY/ZZZZZZZZZZ/Abcdefg/photo.jpg\",\n      \"auth0_user_id\": \"google-oauth2|1234556789845634345345\",\n      \"auth0_profile_synced_at\": \"2014-10-03T16:21:11.65016-07:00\",\n      \"created_at\": \"2014-10-03T16:13:01.023603-07:00\",\n      \"updated_at\": \"2014-10-03T16:21:11.650388-07:00\"\n      \"user_policies\": [\n      {\n        \"group_id\": 1,\n        \"roles\": [\n          \"video:list\",\n          \"video:read\"\n        ],\n        \"created_at\": \"2014-11-19T16:12:53.524934-08:00\",\n        \"updated_at\": \"2014-11-19T16:12:53.524934-08:00\"\n      }\n    ]\n  }\n}","language":"json","status":200,"name":""},{"name":"","code":"No response content; Invalid Token","language":"text","status":401},{"status":404,"language":"text","code":"No response content; User ID not found / not authorized"}]},"settings":"56aff341e0b1e40d00c5379a","url":"/users/:id","auth":"required"},"category":"56aff2d53c70b01700facf52","hidden":false,"project":"5671bb91a0ee9b0d00185322","title":"Get User","updates":[],"version":"5671bb92a0ee9b0d00185325","body":"Get information on a specific User.","excerpt":"/users/:id","githubsync":"","order":2,"sync_unique":"","__v":0,"createdAt":"2016-02-02T00:30:07.726Z","editedParams2":true,"user":"5671bb4d5e49250d006648fd","editedParams":true,"link_external":false,"slug":"usersid","childrenPages":[]}

getGet User

/users/:id

Path Params

id:
required
integer
ID of user
Get information on a specific User.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Get information on a specific User.
{"_id":"56b0fca602f4bc0d006ce273","type":"get","version":"5671bb92a0ee9b0d00185325","body":"Get the profile for a specific User. Functionally same as get user, but for the current user as defined in the JWT used for the Bearer Token. For convenience you don't need to know the user id.\n\n**Secondary Behavior:**\nWhen this call is executed, and the user defined in the `sub` field of the JWT has not been created in the given account, a new **Account User** is automatically created with the name defined in the `sub` field of the JWT and added to the application.","excerpt":"/profile","hidden":false,"slug":"usersprofile","title":"Get User Profile","order":3,"project":"5671bb91a0ee9b0d00185322","__v":10,"category":"56aff2d53c70b01700facf52","link_external":false,"link_url":"","api":{"method":"get","params":[],"results":{"codes":[{"name":"","code":"{\n  \"users\": {\n      \"id\": 2,\n      \"email\": \"some.guy@gmail.com\",\n      \"family_name\": \"Guy\",\n      \"gender\": \"male\",\n      \"given_name\": \"Some\",\n      \"locale\": \"en\",\n      \"name\": \"Some Guy\",\n      \"nickname\": \"some.guy\",\n      \"picture\": \"https://lh5.googleusercontent.com/XXXXXXXX/YYYYYYYY/ZZZZZZZZZZ/Abcdefg/photo.jpg\",\n      \"auth0_user_id\": \"google-oauth2|1234556789845634345345\",\n      \"auth0_profile_synced_at\": \"2014-10-03T16:21:11.65016-07:00\",\n      \"created_at\": \"2014-10-03T16:13:01.023603-07:00\",\n      \"updated_at\": \"2014-10-03T16:21:11.650388-07:00\"\n      \"user_policies\": [\n      {\n        \"group_id\": 1,\n        \"roles\": [\n          \"video:list\",\n          \"video:read\"\n        ],\n        \"created_at\": \"2014-11-19T16:12:53.524934-08:00\",\n        \"updated_at\": \"2014-11-19T16:12:53.524934-08:00\"\n      }\n    ]\n  }\n}","language":"json","status":200},{"name":"","code":"No response content; Invalid Token","language":"text","status":401}]},"settings":"56aff341e0b1e40d00c5379a","url":"/profile","auth":"required","examples":{"codes":[{"language":"curl","code":"curl \\\n  -H 'Content-type: application/json' \\\n  -H 'Accept: application/json' \\\n  -H 'Authorization: Bearer <token>' \\\n  -i \\\n  https://mercury.reeldx.com/api/v1/profile"}]}},"createdAt":"2016-02-02T18:59:50.777Z","sync_unique":"","user":"5671bb4d5e49250d006648fd","githubsync":"","updates":[],"childrenPages":[]}

getGet User Profile

/profile

Get the profile for a specific User. Functionally same as get user, but for the current user as defined in the JWT used for the Bearer Token. For convenience you don't need to know the user id. **Secondary Behavior:** When this call is executed, and the user defined in the `sub` field of the JWT has not been created in the given account, a new **Account User** is automatically created with the name defined in the `sub` field of the JWT and added to the application.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Get the profile for a specific User. Functionally same as get user, but for the current user as defined in the JWT used for the Bearer Token. For convenience you don't need to know the user id. **Secondary Behavior:** When this call is executed, and the user defined in the `sub` field of the JWT has not been created in the given account, a new **Account User** is automatically created with the name defined in the `sub` field of the JWT and added to the application.
{"_id":"56b10063f48f270d00e0dd33","sync_unique":"","type":"basic","excerpt":"Overview of Group Endpoints","githubsync":"","link_external":false,"slug":"groups-overview","version":"5671bb92a0ee9b0d00185325","__v":2,"body":"For some API calls it will be necessary to know various group ID values. To identify these values various calls can be made to https://mercury.reeldx.com.\n\nYou can also log into the https://mercury.reeldx.com UI (navigate to https://mercury.reeldx.com in any web browser and login with your user credentials) and navigate to User Management -> Groups to view the respective Group IDs.","link_url":"","order":0,"title":"Overview","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"","auth":"required","params":[]},"category":"56b100328f7a4f0d0029dd9c","createdAt":"2016-02-02T19:15:47.447Z","hidden":false,"project":"5671bb91a0ee9b0d00185322","updates":[],"user":"5671bb4d5e49250d006648fd","childrenPages":[]}

Overview

Overview of Group Endpoints

For some API calls it will be necessary to know various group ID values. To identify these values various calls can be made to https://mercury.reeldx.com. You can also log into the https://mercury.reeldx.com UI (navigate to https://mercury.reeldx.com in any web browser and login with your user credentials) and navigate to User Management -> Groups to view the respective Group IDs.
For some API calls it will be necessary to know various group ID values. To identify these values various calls can be made to https://mercury.reeldx.com. You can also log into the https://mercury.reeldx.com UI (navigate to https://mercury.reeldx.com in any web browser and login with your user credentials) and navigate to User Management -> Groups to view the respective Group IDs.
{"_id":"56b101ad6d004b170080665a","api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"groups\": [\n    {\n      \"id\": 2,\n      \"name\": \"Admins\",\n      \"created_at\": \"2014-09-15T17:49:57.913415Z\",\n      \"updated_at\": \"2014-09-15T17:49:57.913415Z\"\n    }\n  ]\n} ","name":""},{"status":401,"language":"text","code":"No response content; Invalid Token","name":""}]},"settings":"56aff341e0b1e40d00c5379a","url":"/groups","auth":"required","examples":{"codes":[{"language":"curl","code":"curl \\\n  -H 'Content-type: application/json' \\\n  -H 'Accept: application/json' \\\n  -H 'Authorization: Bearer <token>' \\\n  -i \\\n  https://mercury.reeldx.com/api/v1/groups"}]},"method":"get","params":[]},"createdAt":"2016-02-02T19:21:17.125Z","excerpt":"/groups","link_external":false,"project":"5671bb91a0ee9b0d00185322","slug":"groups-get","body":"Get a list of groups you can access. If this is run as an **Application User** then this will return all groups that the **Application User** has a Policy with. If this is run as an **Account User** then this will return all Groups in the Account.\n\n**Data Pagination:**\n- Enabled: Yes\n- Limit: Yes\n- Offset: Yes\n- Response Headers: Yes","githubsync":"","hidden":false,"sync_unique":"","updates":[],"link_url":"","order":1,"version":"5671bb92a0ee9b0d00185325","__v":14,"category":"56b100328f7a4f0d0029dd9c","title":"Get Group List","type":"get","user":"5671bb4d5e49250d006648fd","childrenPages":[]}

getGet Group List

/groups

Get a list of groups you can access. If this is run as an **Application User** then this will return all groups that the **Application User** has a Policy with. If this is run as an **Account User** then this will return all Groups in the Account. **Data Pagination:** - Enabled: Yes - Limit: Yes - Offset: Yes - Response Headers: Yes

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Get a list of groups you can access. If this is run as an **Application User** then this will return all groups that the **Application User** has a Policy with. If this is run as an **Account User** then this will return all Groups in the Account. **Data Pagination:** - Enabled: Yes - Limit: Yes - Offset: Yes - Response Headers: Yes
{"_id":"56b1113fbf040b0d00588b03","editedParams":true,"type":"get","user":"5671bb4d5e49250d006648fd","category":"56b100328f7a4f0d0029dd9c","api":{"settings":"56aff341e0b1e40d00c5379a","url":"/groups?ids=:ids","auth":"required","examples":{"codes":[{"language":"curl","code":"curl \\\n  -H 'Content-type: application/json' \\\n  -H 'Accept: application/json' \\\n  -H 'Authorization: Bearer <token>' \\\n  -i \\\n  https://mercury.reeldx.com/api/v1/groups?ids=1,2"}]},"method":"get","params":[{"required":true,"type":"string","in":"path","_id":"56b111e76d004b1700806673","default":"","desc":"Comma-delimited list of Group ID integers","name":"ids"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"groups\": [\n    {\n      \"id\": 1,\n      \"name\": \"ReelDx\",\n      \"created_at\": \"2014-09-15T17:49:57.913415Z\",\n      \"updated_at\": \"2014-09-15T17:49:57.913415Z\"\n    },\n    {\n      \"id\": 2,\n      \"name\": \"Acme Corp\",\n      \"created_at\": \"2014-09-15T17:49:57.913415Z\",\n      \"updated_at\": \"2014-09-15T17:49:57.913415Z\"\n    }\n  ]\n}","name":""},{"status":401,"language":"text","code":"No response content; Invalid Token","name":""}]}},"body":"Get a list of groups you can access based on a list of specified Group IDs\n\n**Data Pagination:**\n- Enabled: Yes\n- Limit: Yes\n- Offset: Yes\n- Response Headers: Yes","createdAt":"2016-02-02T20:27:43.487Z","editedParams2":true,"link_external":false,"link_url":"","version":"5671bb92a0ee9b0d00185325","__v":1,"excerpt":"/groups:ids","hidden":false,"order":2,"sync_unique":"","updates":[],"project":"5671bb91a0ee9b0d00185322","slug":"groupsids","title":"Get Group List by ID","githubsync":"","childrenPages":[]}

getGet Group List by ID

/groups:ids

Path Params

ids:
required
string
Comma-delimited list of Group ID integers
Get a list of groups you can access based on a list of specified Group IDs **Data Pagination:** - Enabled: Yes - Limit: Yes - Offset: Yes - Response Headers: Yes

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Get a list of groups you can access based on a list of specified Group IDs **Data Pagination:** - Enabled: Yes - Limit: Yes - Offset: Yes - Response Headers: Yes
{"_id":"56b117047ae4550d00062842","updates":[],"user":"5671bb4d5e49250d006648fd","api":{"settings":"56aff341e0b1e40d00c5379a","url":"/groups/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl \\\n  -H 'Content-type: application/json' \\\n  -H 'Accept: application/json' \\\n  -H 'Authorization: Bearer <token>' \\\n  -i \\\n  https://mercury.reeldx.com/api/v1/groups/2"}]},"method":"get","params":[{"name":"id","in":"path","_id":"56aff88fd21e9c0d00b6299c","required":true,"desc":"ID of group","default":"","type":"int"}],"results":{"codes":[{"name":"","code":"{\n  \"group\": {\n    \"id\": 2,\n    \"name\": \"Admins\",\n    \"created_at\": \"2014-09-15T17:49:57.913415Z\",\n    \"updated_at\": \"2014-09-15T17:49:57.913415Z\"\n  }\n}","language":"json","status":200},{"name":"","code":"No response content; Invalid Token","language":"text","status":401},{"status":404,"language":"text","code":"No response content; Group ID not found / not authorized"}]}},"hidden":false,"order":3,"slug":"groupsid-get","link_external":false,"project":"5671bb91a0ee9b0d00185322","sync_unique":"","editedParams2":true,"githubsync":"","title":"Get Group","__v":0,"body":"Get information on a specific Group.","category":"56b100328f7a4f0d0029dd9c","createdAt":"2016-02-02T20:52:20.998Z","editedParams":true,"excerpt":"/groups/:id","link_url":"","type":"get","version":"5671bb92a0ee9b0d00185325","childrenPages":[]}

getGet Group

/groups/:id

Path Params

id:
required
integer
ID of group
Get information on a specific Group.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Get information on a specific Group.
{"_id":"56b127104b05c50d001ceb1d","project":"5671bb91a0ee9b0d00185322","title":"Create Group","user":"5671bb4d5e49250d006648fd","__v":4,"excerpt":"/groups","order":4,"editedParams2":true,"hidden":false,"slug":"groups-post","updates":[],"api":{"method":"post","params":[{"type":"string","name":"group.name","in":"body","_id":"56b127104b05c50d001ceb1f","required":true,"desc":"Name of the Group.","default":""},{"_id":"56b127104b05c50d001ceb1e","required":true,"desc":"Account id the group will belong to","default":"","type":"int","name":"group.account_id","in":"body"}],"results":{"codes":[{"language":"json","status":200,"name":"","code":"{\n  \"group\": {\n    \"id\": 2,\n    \"name\": \"Admins\",\n    \"account_id\":1,\n    \"created_at\": \"2014-09-15T17:49:57.913415218Z\",\n    \"updated_at\": \"2014-09-15T17:49:57.913415218Z\"\n  }\n}"},{"status":400,"name":"","code":"{\n  \"errors\": {\n    \"body\":[\"could not be decoded\"]\n  }\n}","language":"json"},{"code":"No response content; Invalid Token","language":"text","status":401}]},"settings":"56aff341e0b1e40d00c5379a","url":"/groups","auth":"required","examples":{"codes":[{"language":"curl","code":"curl \\\n  -H 'Content-type: application/json' \\\n  -H 'Accept: application/json' \\\n  -H 'Authorization: Bearer <token>' \\\n  -i \\\n  -X POST \\\n  -d '{\"group\":{\"name\":\"Admins\",”account_id”:1}}' \\\n  https://mercury.reeldx.com/api/v1/groups"}]}},"createdAt":"2016-02-02T22:00:48.295Z","editedParams":true,"body":"###MUST ACT AS ACCOUNT USER###\nCreate a group\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"group\\\": {\\n    \\\"name\\\":\\\"Admins\\\",\\n    ”account_id”:1\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nJSON Sample","category":"56b100328f7a4f0d0029dd9c","link_external":false,"sync_unique":"","type":"post","version":"5671bb92a0ee9b0d00185325","githubsync":"","link_url":"","childrenPages":[]}

postCreate Group

/groups

Body Params

group.name:
required
string
Name of the Group.
group.account_id:
required
integer
Account id the group will belong to
###MUST ACT AS ACCOUNT USER### Create a group [block:code] { "codes": [ { "code": "{\n \"group\": {\n \"name\":\"Admins\",\n ”account_id”:1\n }\n}", "language": "json" } ] } [/block] JSON Sample

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



###MUST ACT AS ACCOUNT USER### Create a group [block:code] { "codes": [ { "code": "{\n \"group\": {\n \"name\":\"Admins\",\n ”account_id”:1\n }\n}", "language": "json" } ] } [/block] JSON Sample
{"_id":"56b133966d004b170080669e","__v":1,"createdAt":"2016-02-02T22:54:14.478Z","editedParams2":true,"sync_unique":"","user":"5671bb4d5e49250d006648fd","api":{"results":{"codes":[{"name":"","code":"{\n  \"group\": {\n    \"id\": 2,\n    \"name\": \"Different Name\",\n    \"created_at\": \"2014-09-15T17:49:57.913415Z\",\n    \"updated_at\": \"2014-09-15T17:51:23.470943241Z\"\n  }\n}","language":"json","status":200},{"status":400,"language":"json","code":"{\n  \"errors\": {\n    \"body\":[\"could not be decoded\"]\n  }\n}"},{"status":401,"language":"text","code":"No response content; Invalid Token"}]},"settings":"56aff341e0b1e40d00c5379a","url":"/groups/:id","auth":"required","examples":{"codes":[{"code":"curl \\\n  -H 'Content-type: application/json' \\\n  -H 'Accept: application/json' \\\n  -H 'Authorization: Bearer <token>' \\\n  -i \\\n  -X PUT \\\n  -d '{\"group\":{\"name\":\"Different Name\"}}' \\\n  https://mercury.reeldx.com/api/v1/groups/2","language":"curl"}]},"method":"put","params":[{"desc":"ID of group to update","default":"","type":"int","name":"id","in":"path","_id":"56b133966d004b170080669f","required":true},{"default":"","type":"string","name":"group.name","in":"body","_id":"56b127104b05c50d001ceb1f","required":true,"desc":"Name of the Group."}]},"order":5,"project":"5671bb91a0ee9b0d00185322","slug":"groupsid-put","updates":[],"githubsync":"","hidden":false,"link_external":false,"title":"Update Group","type":"put","body":"###MUST ACT AS ACCOUNT USER###\nUpdate a group\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"group\\\": {\\n    \\\"name\\\":\\\"Different Name\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nJSON Sample","category":"56b100328f7a4f0d0029dd9c","editedParams":true,"excerpt":"/groups/:id","link_url":"","version":"5671bb92a0ee9b0d00185325","childrenPages":[]}

putUpdate Group

/groups/:id

Path Params

id:
required
integer
ID of group to update

Body Params

group.name:
required
string
Name of the Group.
###MUST ACT AS ACCOUNT USER### Update a group [block:code] { "codes": [ { "code": "{\n \"group\": {\n \"name\":\"Different Name\"\n }\n}", "language": "json" } ] } [/block] JSON Sample

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



###MUST ACT AS ACCOUNT USER### Update a group [block:code] { "codes": [ { "code": "{\n \"group\": {\n \"name\":\"Different Name\"\n }\n}", "language": "json" } ] } [/block] JSON Sample
{"_id":"56b1370036d2580d002478d4","__v":0,"api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl \\\n  -H 'Content-type: application/json' \\\n  -H 'Accept: application/json' \\\n  -H 'Authorization: Bearer <token>' \\\n  -i \\\n  -X DELETE \\\n  https://mercury.reeldx.com/api/v1/groups/2"}]},"method":"delete","params":[{"_id":"56b1370036d2580d002478d5","required":true,"desc":"ID of Group to be deleted","default":"","type":"int","name":"id","in":"path"}],"results":{"codes":[{"language":"text","code":"No Content","name":"","status":204},{"status":401,"language":"text","code":"No response content; Invalid Token","name":""},{"status":404,"language":"text","code":"\"Not Found\""}]},"settings":"56aff341e0b1e40d00c5379a","url":"/groups/:id"},"excerpt":"/groups/:id","hidden":false,"link_external":false,"project":"5671bb91a0ee9b0d00185322","type":"delete","editedParams":true,"editedParams2":true,"githubsync":"","order":6,"sync_unique":"","category":"56b100328f7a4f0d0029dd9c","slug":"groupsid-delete","version":"5671bb92a0ee9b0d00185325","body":"###MUST ACT AS ACCOUNT USER###\nDelete a group","createdAt":"2016-02-02T23:08:48.885Z","link_url":"","title":"Delete Group","updates":[],"user":"5671bb4d5e49250d006648fd","childrenPages":[]}

deleteDelete Group

/groups/:id

Path Params

id:
required
integer
ID of Group to be deleted
###MUST ACT AS ACCOUNT USER### Delete a group

User Information

Try It Out

delete
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



###MUST ACT AS ACCOUNT USER### Delete a group
{"_id":"56b13b9f4b05c50d001ceb35","type":"basic","version":"5671bb92a0ee9b0d00185325","body":"Policies define the relationship between Users, Groups, and the Videos associated with said Users and Groups.","title":"Overview","updates":[],"user":"5671bb4d5e49250d006648fd","hidden":false,"link_url":"","order":0,"project":"5671bb91a0ee9b0d00185322","sync_unique":"","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":""},"githubsync":"","category":"56b13b22f48f270d00e0dd83","createdAt":"2016-02-02T23:28:31.738Z","excerpt":"Overview of Policy Endpoints","link_external":false,"slug":"policies-overview","__v":2,"childrenPages":[]}

Overview

Overview of Policy Endpoints

Policies define the relationship between Users, Groups, and the Videos associated with said Users and Groups.
Policies define the relationship between Users, Groups, and the Videos associated with said Users and Groups.
{"_id":"56b27f4e2d964617005992bc","createdAt":"2016-02-03T22:29:34.930Z","editedParams":true,"editedParams2":true,"hidden":false,"updates":[],"api":{"url":"/users/:user_id/user_policies","auth":"required","examples":{"codes":[{"code":"curl \\\n  -H 'Content-type: application/json' \\\n  -H 'Accept: application/json' \\\n  -H 'Authorization: Bearer <token>' \\\n  -i \\\n  https://mercury.reeldx.com/api/v1/users/1/user_policies","language":"curl"}]},"method":"get","params":[{"desc":"ID of user to list policies for","name":"user_id","required":true,"type":"int","in":"path","_id":"56b27f4e2d964617005992bd","default":""}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"user_policies\": [\n    {\n      \"id\": 1,\n      \"user_id\": 1,\n      \"group_id\": 1,\n      \"permissions\": [\"create:video\", \"read:video\", \"update:video\", \"delete:video\", \"list:video\"],\n      \"created_at\": \"2014-09-15T17:49:57.913415Z\",\n      \"updated_at\": \"2014-09-15T17:49:57.913415Z\"\n    },\n    {\n      \"id\": 2,\n      \"user_id\": 1,\n      \"group_id\": 2,\n      \"permissions\": [\"read:video\", \"list:video\"],\n      \"created_at\": \"2014-09-15T17:49:57.913415Z\",\n      \"updated_at\": \"2014-09-15T17:49:57.913415Z\"\n    }\n  ]\n} ","name":""},{"status":401,"language":"text","code":"No response content; Invalid Token","name":""}]},"settings":"56aff341e0b1e40d00c5379a"},"sync_unique":"","title":"Get Policy List for User","type":"get","version":"5671bb92a0ee9b0d00185325","category":"56b13b22f48f270d00e0dd83","body":"Get a list of all policies for a given user.\n\n**Data Pagination:**\n- Enabled: Yes\n- Limit: Yes\n- Offset: Yes\n- Response Headers: Yes","link_external":false,"order":1,"project":"5671bb91a0ee9b0d00185322","excerpt":"/users/:user_id/user_policies","githubsync":"","link_url":"","slug":"usersuser_iduser_policies","user":"5671bb4d5e49250d006648fd","__v":0,"childrenPages":[]}

getGet Policy List for User

/users/:user_id/user_policies

Path Params

user_id:
required
integer
ID of user to list policies for
Get a list of all policies for a given user. **Data Pagination:** - Enabled: Yes - Limit: Yes - Offset: Yes - Response Headers: Yes

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Get a list of all policies for a given user. **Data Pagination:** - Enabled: Yes - Limit: Yes - Offset: Yes - Response Headers: Yes
{"_id":"56b280a740856919000e9cfd","api":{"method":"get","params":[{"name":"policy_id","required":true,"type":"int","in":"path","_id":"56b28156a5a1020d00cf4d00","default":"","desc":"ID of policy to load"}],"results":{"codes":[{"language":"json","status":200,"name":"","code":"{\n  \"user_policy\": {\n    \"id\": 1,\n    \"user_id\": 1,\n    \"group_id\": 1,\n    \"permissions\": [\"create:video\", \"read:video\", \"update:video\", \"delete:video\", \"list:video\"],\n    \"created_at\": \"2014-09-15T17:49:57.913415Z\",\n    \"updated_at\": \"2014-09-15T17:49:57.913415Z\"\n  }\n}"},{"name":"","code":"No response content; Invalid Token","language":"text","status":401},{"status":404,"language":"text","code":"No response content; User ID not found / not authorized"}]},"settings":"56aff341e0b1e40d00c5379a","url":"/user_policies/:policy_id","auth":"required","examples":{"codes":[{"code":"curl \\\n  -H 'Content-type: application/json' \\\n  -H 'Accept: application/json' \\\n  -H 'Authorization: Bearer <token>' \\\n  -i \\\n  https://mercury.reeldx.com/api/v1/user_policies/1","language":"curl"}]}},"editedParams2":true,"githubsync":"","sync_unique":"","title":"Get Policy","updates":[],"link_external":false,"link_url":"","order":2,"project":"5671bb91a0ee9b0d00185322","slug":"user_policiespolicy_id","__v":3,"editedParams":true,"excerpt":"/user_policies/:policy_id","version":"5671bb92a0ee9b0d00185325","type":"get","user":"5671bb4d5e49250d006648fd","body":"###MUST ACT AS ACCOUNT USER###\nGet information on a specific User Policy.","category":"56b13b22f48f270d00e0dd83","createdAt":"2016-02-03T22:35:19.979Z","hidden":false,"childrenPages":[]}

getGet Policy

/user_policies/:policy_id

Path Params

policy_id:
required
integer
ID of policy to load
###MUST ACT AS ACCOUNT USER### Get information on a specific User Policy.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



###MUST ACT AS ACCOUNT USER### Get information on a specific User Policy.
{"_id":"56b284194e71701700232e95","api":{"method":"post","params":[{"type":"int","name":"user_policy.user_id","in":"body","_id":"56b284194e71701700232e98","required":true,"desc":"ID of user to apply policy to","default":""},{"_id":"56b284194e71701700232e97","required":true,"desc":"ID of group to apply policy to","default":"","type":"int","name":"user_policy.group_id","in":"body"},{"_id":"56b284194e71701700232e96","default":"","desc":"List of policy permissions","name":"user_policy.permissions","required":true,"type":"array_string","in":"body"}],"results":{"codes":[{"status":201,"language":"json","code":"{\n  \"user_policy\": {\n    \"id\": 1,\n    \"user_id\": 1,\n    \"group_id\": 1,\n    \"permissions\": [\"read:video\", \"list:video\"],\n    \"created_at\": \"2014-09-15T17:49:57.913415Z\",\n    \"updated_at\": \"2014-09-15T17:49:57.913415Z\"\n  }\n}","name":""},{"status":401,"language":"text","code":"No response content; Invalid Token","name":""},{"code":"{\n    \"errors\": {\n        \"permissions\": [\n            \"must contain only valid permissions\"\n        ]\n    }\n}","language":"json","status":422},{"status":422,"language":"text","code":"No response content; User ID / Group ID not found / not authorized"}]},"settings":"56aff341e0b1e40d00c5379a","url":"/user_policies","auth":"required","examples":{"codes":[{"language":"curl","code":"curl \\\n  -H 'Content-type: application/json' \\\n  -H 'Accept: application/json' \\\n  -H 'Authorization: Bearer <token>' \\\n  -i \\\n  -X POST \\\n  -d '{\"user_policy\":{\"user_id\":1,\"group_id\":1,\"permissions\":[\"read:video\",\"list:video\"]}}' \\\n  https://mercury.reeldx.com/api/v1/user_policies"}]}},"category":"56b13b22f48f270d00e0dd83","githubsync":"","hidden":false,"sync_unique":"","title":"Create Policy","user":"5671bb4d5e49250d006648fd","__v":0,"body":"###MUST ACT AS ACCOUNT USER###\nCreate a User Policy for a given User and Group.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"user_policy\\\":{\\n    \\\"user_id\\\":1,\\n    \\\"group_id\\\":1,\\n    \\\"permissions\\\":[\\n      \\\"create:video\\\",\\n      \\\"read:video\\\",\\n      \\\"update:video\\\",\\n      \\\"delete:video\\\",\\n      \\\"list:video\\\"]\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nSample JSON","createdAt":"2016-02-03T22:50:01.141Z","editedParams":true,"excerpt":"/user_policies","order":3,"link_external":false,"link_url":"","type":"post","version":"5671bb92a0ee9b0d00185325","editedParams2":true,"slug":"user_policies-post","updates":[],"project":"5671bb91a0ee9b0d00185322","childrenPages":[]}

postCreate Policy

/user_policies

Body Params

user_policy.user_id:
required
integer
ID of user to apply policy to
user_policy.group_id:
required
integer
ID of group to apply policy to
user_policy.permissions:
required
array of strings
List of policy permissions
###MUST ACT AS ACCOUNT USER### Create a User Policy for a given User and Group. [block:code] { "codes": [ { "code": "{\n \"user_policy\":{\n \"user_id\":1,\n \"group_id\":1,\n \"permissions\":[\n \"create:video\",\n \"read:video\",\n \"update:video\",\n \"delete:video\",\n \"list:video\"]\n }\n}", "language": "json" } ] } [/block] Sample JSON

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



###MUST ACT AS ACCOUNT USER### Create a User Policy for a given User and Group. [block:code] { "codes": [ { "code": "{\n \"user_policy\":{\n \"user_id\":1,\n \"group_id\":1,\n \"permissions\":[\n \"create:video\",\n \"read:video\",\n \"update:video\",\n \"delete:video\",\n \"list:video\"]\n }\n}", "language": "json" } ] } [/block] Sample JSON
{"_id":"56b2889040856919000e9d07","api":{"method":"put","params":[{"type":"int","name":"policy_id","in":"path","_id":"56b2889040856919000e9d08","required":true,"desc":"ID of policy to update","default":""},{"_id":"56b284194e71701700232e98","required":true,"desc":"ID of user to apply policy to","default":"","type":"int","name":"user_policy.user_id","in":"body"},{"_id":"56b284194e71701700232e97","required":true,"desc":"ID of group to apply policy to","default":"","type":"int","name":"user_policy.group_id","in":"body"},{"in":"body","_id":"56b284194e71701700232e96","required":true,"desc":"List of policy permissions","default":"","type":"array_string","name":"user_policy.permissions"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"user_policy\": {\n    \"id\": 1,\n    \"user_id\": 1,\n    \"group_id\": 1,\n    \"permissions\": [\"read:video\", \"list:video\"],\n    \"created_at\": \"2014-09-15T17:49:57.913415Z\",\n    \"updated_at\": \"2014-09-15T17:49:57.913415Z\"\n  }\n}","name":""},{"status":401,"language":"text","code":"No response content; Invalid Token","name":""},{"code":"{\n    \"errors\": {\n        \"permissions\": [\n            \"must contain only valid permissions\"\n        ]\n    }\n}","language":"json","status":422},{"status":422,"language":"text","code":"No response content; User ID / Group ID not found / not authorized"}]},"settings":"56aff341e0b1e40d00c5379a","url":"/user_policies/:policy_id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl \\\n  -H 'Content-type: application/json' \\\n  -H 'Accept: application/json' \\\n  -H 'Authorization: Bearer <token>' \\\n  -i \\\n  -X PUT \\\n  -d '{\"user_policy\":{\"user_id\":1,\"group_id\":1,\"permissions\":[\"read:video\",\"list:video\"]}}' \\\n  https://mercury.reeldx.com/api/v1/user_policies/1"}]}},"link_url":"","hidden":false,"order":4,"project":"5671bb91a0ee9b0d00185322","slug":"user_policiespolicy_id-put","updates":[],"user":"5671bb4d5e49250d006648fd","createdAt":"2016-02-03T23:09:04.044Z","title":"Update Policy","version":"5671bb92a0ee9b0d00185325","__v":0,"body":"###MUST ACT AS ACCOUNT USER###\nUpdate a User Policy.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"user_policy\\\":{\\n    \\\"user_id\\\":1,\\n    \\\"group_id\\\":1,\\n    \\\"permissions\\\":[\\n      \\\"create:video\\\",\\n      \\\"read:video\\\",\\n      \\\"upload:video\\\",\\n      \\\"delete:video\\\",\\n      \\\"list:video\\\"]\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nSample JSON","editedParams2":true,"excerpt":"/user_policies/:policy_id","githubsync":"","link_external":false,"sync_unique":"","type":"put","category":"56b13b22f48f270d00e0dd83","editedParams":true,"childrenPages":[]}

putUpdate Policy

/user_policies/:policy_id

Path Params

policy_id:
required
integer
ID of policy to update

Body Params

user_policy.user_id:
required
integer
ID of user to apply policy to
user_policy.group_id:
required
integer
ID of group to apply policy to
user_policy.permissions:
required
array of strings
List of policy permissions
###MUST ACT AS ACCOUNT USER### Update a User Policy. [block:code] { "codes": [ { "code": "{\n \"user_policy\":{\n \"user_id\":1,\n \"group_id\":1,\n \"permissions\":[\n \"create:video\",\n \"read:video\",\n \"upload:video\",\n \"delete:video\",\n \"list:video\"]\n }\n}", "language": "json" } ] } [/block] Sample JSON

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



###MUST ACT AS ACCOUNT USER### Update a User Policy. [block:code] { "codes": [ { "code": "{\n \"user_policy\":{\n \"user_id\":1,\n \"group_id\":1,\n \"permissions\":[\n \"create:video\",\n \"read:video\",\n \"upload:video\",\n \"delete:video\",\n \"list:video\"]\n }\n}", "language": "json" } ] } [/block] Sample JSON
{"_id":"56b289b63b6f690d00bdb784","hidden":false,"project":"5671bb91a0ee9b0d00185322","title":"Delete Policy","api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl \\\n  -H 'Content-type: application/json' \\\n  -H 'Accept: application/json' \\\n  -H 'Authorization: Bearer <token>' \\\n  -i \\\n  -X DELETE \\\n  https://mercury.reeldx.com/api/v1/user_policies/1"}]},"method":"delete","params":[{"in":"path","_id":"56b1370036d2580d002478d5","required":true,"desc":"ID of Policy to be deleted","default":"","type":"int","name":"policy_id"}],"results":{"codes":[{"status":204,"language":"text","code":"No Content","name":""},{"status":401,"language":"text","code":"No response content; Invalid Token","name":""},{"language":"text","code":"\"Not Found\"","status":404}]},"settings":"56aff341e0b1e40d00c5379a","url":"/user_policies/:policy_id"},"createdAt":"2016-02-03T23:13:58.828Z","editedParams2":true,"order":5,"slug":"user_policiespolicy_id-delete","sync_unique":"","version":"5671bb92a0ee9b0d00185325","body":"###MUST ACT AS ACCOUNT USER###\nDelete a policy","link_external":false,"editedParams":true,"type":"delete","user":"5671bb4d5e49250d006648fd","githubsync":"","link_url":"","updates":[],"__v":0,"category":"56b13b22f48f270d00e0dd83","excerpt":"/user_policies/:policy_id","childrenPages":[]}

deleteDelete Policy

/user_policies/:policy_id

Path Params

policy_id:
required
integer
ID of Policy to be deleted
###MUST ACT AS ACCOUNT USER### Delete a policy

User Information

Try It Out

delete
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



###MUST ACT AS ACCOUNT USER### Delete a policy
{"_id":"56ba74040082ba1900c25409","link_url":"","order":0,"project":"5671bb91a0ee9b0d00185322","sync_unique":"","__v":1,"body":"Core object of the API","excerpt":"Overview of Video Endpoints","type":"basic","api":{"url":"","auth":"required","params":[],"results":{"codes":[{"language":"json","code":"{}","name":"","status":200},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":""},"createdAt":"2016-02-09T23:19:32.060Z","slug":"videos-overview","title":"Overview","updates":[],"category":"56b28a3140856919000e9d0d","hidden":false,"link_external":false,"version":"5671bb92a0ee9b0d00185325","githubsync":"","user":"5671bb4d5e49250d006648fd","childrenPages":[]}

Overview

Overview of Video Endpoints

Core object of the API
Core object of the API
{"_id":"56b28ae0e969500d00ac0ed7","hidden":false,"link_external":false,"link_url":"","slug":"videosuserid","updates":[],"__v":0,"createdAt":"2016-02-03T23:18:56.280Z","version":"5671bb92a0ee9b0d00185325","excerpt":"/videos/user/:id","sync_unique":"","title":"Get Videos for User","user":"5671bb4d5e49250d006648fd","api":{"method":"get","params":[{"default":"","type":"int","name":"id","in":"path","_id":"56b28ae0e969500d00ac0ed8","required":true,"desc":"ID of user to list videos for"}],"results":{"codes":[{"status":200,"language":"json","code":"{  \n   \"videos\":[  \n      {\n         \"id\":6472,\n         \"title\":\"ReelDx Video\",\n         \"description\":\"\",\n         \"location\":\"\",\n         \"file_name_input\":\"c5e84cf7-0248-492d-a204-71d19d7f6b02.mp4\",\n         \"file_name_raw\":\"EzrNGLtfbnbaSAptikmErjwlNAjYFoKb.mp4\",\n         \"file_name_encoded\":\"EzrNGLtfbnbaSAptikmErjwlNAjYFoKb.mp4\",\n         \"created_at\":\"2015-12-28T18:59:19.453581Z\",\n         \"updated_at\":\"2015-12-28T18:59:19.453581Z\",\n         \"owner_id\":1122,\n         \"subject_id\":0,\n         \"user_viewers\":null,\n         \"user_viewer_ids\":null,\n         \"group_viewers\":null,\n         \"group_viewer_ids\":null,\n         \"storage_billable\":true,\n         \"size\":5787120,\n         \"account_id\":5577\n      },\n      {  \n         \"id\":6348,\n         \"title\":\"Chopper Oregon\",\n         \"description\":\"\",\n         \"location\":\"\",\n         \"file_name_input\":\"b41a3f09-2de0-450f-aebc-cd1471fabee5.MOV\",\n         \"file_name_raw\":\"MgVkwViwiDKDbsyLQWqJDFqLlmcAPRKO.MOV\",\n         \"file_name_encoded\":\"MgVkwViwiDKDbsyLQWqJDFqLlmcAPRKO.MOV\",\n         \"created_at\":\"2015-12-28T21:23:56.610858Z\",\n         \"updated_at\":\"2015-12-28T21:23:56.610858Z\",\n         \"owner_id\":1122,\n         \"subject_id\":0,\n         \"user_viewers\":null,\n         \"user_viewer_ids\":null,\n         \"group_viewers\":null,\n         \"group_viewer_ids\":null,\n         \"storage_billable\":true,\n         \"size\":1833517,\n         \"account_id\":5577\n      }\n   ]\n}","name":""},{"status":401,"language":"text","code":"No response content; Invalid Token","name":""},{"language":"json","code":"{\n    \"errors\": {\n        \"permission\": [\n            \"no permission found\"\n        ]\n    }\n}","status":403}]},"settings":"56aff347bc304a0d00ace27e","url":"/videos/user/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl \\\n   -H 'Content-type: application/json' \\\n   -H 'Accept: application/json' \\\n   -H 'Authorization: Bearer <token>' \\\n   -i https://apollo.reeldx.com/api/v1/videos/user/6655"}]}},"body":"Gets a list of videos for a user that is set as the `owner`, `subject`, or is listed in the `user_view_ids` field of a video. Does not include videos a user can view via a permission / group relation however.\n\n**Data Pagination:**\n- Enabled: Yes\n- Limit: Yes\n- Offset: Yes\n- Response Headers: No\n\nYou can use the `offset` and `limit` parameters as follows with this API endpoint:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl \\\\\\n   -H 'Content-type: application/json' \\\\\\n   -H 'Accept: application/json' \\\\\\n   -H 'Authorization: Bearer <token>' \\\\\\n   -i https://apollo.reeldx.com/api/v1/videos/user/1122?offset=30&limit=10\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]","editedParams2":true,"githubsync":"","type":"get","project":"5671bb91a0ee9b0d00185322","category":"56b28a3140856919000e9d0d","editedParams":true,"order":1,"childrenPages":[]}

getGet Videos for User

/videos/user/:id

Path Params

id:
required
integer
ID of user to list videos for
Gets a list of videos for a user that is set as the `owner`, `subject`, or is listed in the `user_view_ids` field of a video. Does not include videos a user can view via a permission / group relation however. **Data Pagination:** - Enabled: Yes - Limit: Yes - Offset: Yes - Response Headers: No You can use the `offset` and `limit` parameters as follows with this API endpoint: [block:code] { "codes": [ { "code": "curl \\\n -H 'Content-type: application/json' \\\n -H 'Accept: application/json' \\\n -H 'Authorization: Bearer <token>' \\\n -i https://apollo.reeldx.com/api/v1/videos/user/1122?offset=30&limit=10", "language": "curl" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Gets a list of videos for a user that is set as the `owner`, `subject`, or is listed in the `user_view_ids` field of a video. Does not include videos a user can view via a permission / group relation however. **Data Pagination:** - Enabled: Yes - Limit: Yes - Offset: Yes - Response Headers: No You can use the `offset` and `limit` parameters as follows with this API endpoint: [block:code] { "codes": [ { "code": "curl \\\n -H 'Content-type: application/json' \\\n -H 'Accept: application/json' \\\n -H 'Authorization: Bearer <token>' \\\n -i https://apollo.reeldx.com/api/v1/videos/user/1122?offset=30&limit=10", "language": "curl" } ] } [/block]
{"_id":"56b29a65a5a1020d00cf4d14","__v":0,"api":{"examples":{"codes":[{"language":"curl","code":"curl \\\n   -H 'Content-type: application/json' \\\n   -H 'Accept: application/json' \\\n   -H 'Authorization: Bearer <token>' \\\n   -i https://apollo.reeldx.com/api/v1/videos/group/29"}]},"method":"get","params":[{"type":"int","in":"path","_id":"56b28ae0e969500d00ac0ed8","default":"","desc":"ID of group to list videos for","name":"group_id","required":true}],"results":{"codes":[{"status":200,"language":"json","code":"{  \n   \"videos\":[  \n      {\n         \"id\":6472,\n         \"title\":\"ReelDx Video\",\n         \"description\":\"\",\n         \"location\":\"\",\n         \"file_name_input\":\"c5e84cf7-0248-492d-a204-71d19d7f6b02.mp4\",\n         \"file_name_raw\":\"EzrNGLtfbnbaSAptikmErjwlNAjYFoKb.mp4\",\n         \"file_name_encoded\":\"EzrNGLtfbnbaSAptikmErjwlNAjYFoKb.mp4\",\n         \"created_at\":\"2015-12-28T18:59:19.453581Z\",\n         \"updated_at\":\"2015-12-28T18:59:19.453581Z\",\n         \"owner_id\":1122,\n         \"subject_id\":0,\n         \"user_viewers\":null,\n         \"user_viewer_ids\":null,\n         \"group_viewers\":null,\n         \"group_viewer_ids\":null,\n         \"storage_billable\":true,\n         \"size\":5787120,\n         \"account_id\":5577\n      },\n      {  \n         \"id\":6348,\n         \"title\":\"Chopper Oregon\",\n         \"description\":\"\",\n         \"location\":\"\",\n         \"file_name_input\":\"b41a3f09-2de0-450f-aebc-cd1471fabee5.MOV\",\n         \"file_name_raw\":\"MgVkwViwiDKDbsyLQWqJDFqLlmcAPRKO.MOV\",\n         \"file_name_encoded\":\"MgVkwViwiDKDbsyLQWqJDFqLlmcAPRKO.MOV\",\n         \"created_at\":\"2015-12-28T21:23:56.610858Z\",\n         \"updated_at\":\"2015-12-28T21:23:56.610858Z\",\n         \"owner_id\":1212,\n         \"subject_id\":0,\n         \"user_viewers\":null,\n         \"user_viewer_ids\":null,\n         \"group_viewers\":null,\n         \"group_viewer_ids\":null,\n         \"storage_billable\":true,\n         \"size\":1833517,\n         \"account_id\":5577\n      }\n   ]\n}","name":""},{"status":401,"language":"text","code":"No response content; Invalid Token","name":""},{"language":"json","code":"{\n    \"errors\": {\n        \"permission\": [\n            \"no permission found\"\n        ]\n    }\n}","status":403}]},"settings":"56aff347bc304a0d00ace27e","url":"/videos/group/:group_id","auth":"required"},"category":"56b28a3140856919000e9d0d","editedParams2":true,"hidden":false,"user":"5671bb4d5e49250d006648fd","body":"Gets a list of videos tagged with the specified group.\n\n**Data Pagination:**\n- Enabled: Yes\n- Limit: Yes\n- Offset: Yes\n- Response Headers: No\n\nYou can use the `offset` and `limit` parameters as follows with this API endpoint:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl \\\\\\n   -H 'Content-type: application/json' \\\\\\n   -H 'Accept: application/json' \\\\\\n   -H 'Authorization: Bearer <token>' \\\\\\n   -i https://apollo.reeldx.com/api/v1/videos/group/29?offset=30&limit=10\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]","excerpt":"/videos/group/:id","link_url":"","project":"5671bb91a0ee9b0d00185322","title":"Get Videos for Group","order":2,"sync_unique":"","type":"get","updates":[],"createdAt":"2016-02-04T00:25:09.695Z","editedParams":true,"githubsync":"","link_external":false,"slug":"videosgroupgroupid","version":"5671bb92a0ee9b0d00185325","childrenPages":[]}

getGet Videos for Group

/videos/group/:id

Path Params

group_id:
required
integer
ID of group to list videos for
Gets a list of videos tagged with the specified group. **Data Pagination:** - Enabled: Yes - Limit: Yes - Offset: Yes - Response Headers: No You can use the `offset` and `limit` parameters as follows with this API endpoint: [block:code] { "codes": [ { "code": "curl \\\n -H 'Content-type: application/json' \\\n -H 'Accept: application/json' \\\n -H 'Authorization: Bearer <token>' \\\n -i https://apollo.reeldx.com/api/v1/videos/group/29?offset=30&limit=10", "language": "curl" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Gets a list of videos tagged with the specified group. **Data Pagination:** - Enabled: Yes - Limit: Yes - Offset: Yes - Response Headers: No You can use the `offset` and `limit` parameters as follows with this API endpoint: [block:code] { "codes": [ { "code": "curl \\\n -H 'Content-type: application/json' \\\n -H 'Accept: application/json' \\\n -H 'Authorization: Bearer <token>' \\\n -i https://apollo.reeldx.com/api/v1/videos/group/29?offset=30&limit=10", "language": "curl" } ] } [/block]
{"_id":"56b29fc065ddf50d0076baf3","title":"Get Video","hidden":false,"project":"5671bb91a0ee9b0d00185322","editedParams2":true,"excerpt":"/video/:video_id","githubsync":"","link_url":"","sync_unique":"","api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl   \\\n   -H 'Accept: application/json' \\\n   -H 'Authorization: Bearer <token>' \\\n   -i https://apollo.reeldx.com/api/v1/video/36"}]},"method":"get","params":[{"type":"int","name":"video_id","in":"path","_id":"56b28ae0e969500d00ac0ed8","required":true,"desc":"ID of video to get","default":""}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"video\": {\n        \"id\": 36,\n        \"title\": \"_title\",\n        \"description\": \"_description\",\n        \"location\": \"_location\",\n        \"file_name_input\": \"testcc.mp4\",\n        \"file_name_raw\": \"nOahMUpVpGEmIkifhhdCdETTrqgjEGKV.mp4\",\n        \"file_name_encoded\": \"nOahMUpVpGEmIkifhhdCdETTrqgjEGKV.mp4\",\n        \"created_at\": \"2015-07-28T00:04:57.66137Z\",\n        \"updated_at\": \"2015-07-28T00:04:57.66137Z\",\n        \"owner_id\": 4,\n        \"subject_id\": 0,\n        \"user_viewers\": [\n            {\n                \"id\": 36,\n                \"video_id\": 36,\n                \"user_id\": 4,\n                \"name\": \"\",\n                \"created_at\": \"2015-07-28T00:04:57.686785Z\",\n                \"updated_at\": \"2015-07-28T00:04:57.686785Z\"\n            }\n        ],\n        \"user_viewer_ids\": [\n            4\n        ],\n        \"group_viewers\": [\n            {\n                \"id\": 93,\n                \"video_id\": 36,\n                \"group_id\": 12,\n                \"name\": \"\",\n                \"created_at\": \"2015-07-28T00:04:57.668307Z\",\n                \"updated_at\": \"2015-07-28T00:04:57.668307Z\"\n            },\n            {\n                \"id\": 94,\n                \"video_id\": 36,\n                \"group_id\": 13,\n                \"name\": \"\",\n                \"created_at\": \"2015-07-28T00:04:57.674936Z\",\n                \"updated_at\": \"2015-07-28T00:04:57.674936Z\"\n            },\n            {\n                \"id\": 95,\n                \"video_id\": 36,\n                \"group_id\": 14,\n                \"name\": \"\",\n                \"created_at\": \"2015-07-28T00:04:57.680665Z\",\n                \"updated_at\": \"2015-07-28T00:04:57.680665Z\"\n            }\n        ],\n        \"group_viewer_ids\": [\n            12,\n            13,\n            14\n        ],\n        \"storage_billable\": true,\n        \"size description:\": 0\n    },\n    \"hls_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHBpcmVzX2F0IjoxNDM4MDQzNDkzLCJ2aWRlb19maWxlX25hbWUiOiJuT2FoTVVwVnBHRW1Ja2lmaGhkQ2RFVFRycWdqRUdLVi5tcDQiLCJ2aWRlb19pZCI6MzYsInZpZXdpbmdfdXNlcl9pZCI6NCwidmlld2luZ191c2VyX2lwX2FkZHJlc3MiOiIxNzIuMTcuNDIuMTo1MDU3MyJ9.Wgpb0N0B7BncH5PZ9iGe57zBtipO8lr6dVKpw08fTQ0\",\n    \"hls_url\": \"https://<video-server>.reeldx.com:4433/vostokwowzaplugin/_definst_/amazons3/reeldx-apollo-stag/incoming/nOahMUpVpGEmIkifhhdCdETTrqgjEGKV.mp4/playlist.m3u8?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHBpcmVzX2F0IjoxNDM4MDQzNDkzLCJ2aWRlb19maWxlX25hbWUiOiJuT2FoTVVwVnBHRW1Ja2lmaGhkQ2RFVFRycWdqRUdLVi5tcDQiLCJ2aWRlb19pZCI6MzYsInZpZXdpbmdfdXNlcl9pZCI6NCwidmlld2luZ191c2VyX2lwX2FkZHJlc3MiOiIxNzIuMTcuNDIuMTo1MDU3MyJ9.Wgpb0N0B7BncH5PZ9iGe57zBtipO8lr6dVKpw08fTQ0\",\n    \"smil_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHBpcmVzX2F0IjoxNDM4MDQzNDkzLCJ2aWRlb19maWxlX25hbWUiOiJuT2FoTVVwVnBHRW1Ja2lmaGhkQ2RFVFRycWdqRUdLVi5zbWlsIiwidmlkZW9faWQiOjM2LCJ2aWV3aW5nX3VzZXJfaWQiOjQsInZpZXdpbmdfdXNlcl9pcF9hZGRyZXNzIjoiMTcyLjE3LjQyLjE6NTA1NzMifQ.uyUTpzJvLfiYBfC6NQ5zaEAcO7La8Th-OLSi-rGLZyo\",\n    \"smil_url\": \"https://<video-server>.reeldx.com:4433/vostokwowzaplugin/_definst_/amazons3/reeldx-apollo-stag/transcoded/nOahMUpVpGEmIkifhhdCdETTrqgjEGKV.smil/playlist.m3u8?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHBpcmVzX2F0IjoxNDM4MDQzNDkzLCJ2aWRlb19maWxlX25hbWUiOiJuT2FoTVVwVnBHRW1Ja2lmaGhkQ2RFVFRycWdqRUdLVi5zbWlsIiwidmlkZW9faWQiOjM2LCJ2aWV3aW5nX3VzZXJfaWQiOjQsInZpZXdpbmdfdXNlcl9pcF9hZGRyZXNzIjoiMTcyLjE3LjQyLjE6NTA1NzMifQ.uyUTpzJvLfiYBfC6NQ5zaEAcO7La8Th-OLSi-rGLZyo\"\n}","name":""},{"language":"json","code":"{\n    \"video\": {\n        \"id\": 36,\n        \"title\": \"_title\",\n        \"description\": \"_description\",\n        \"location\": \"_location\",\n        \"file_name_input\": \"testcc.mp4\",\n        \"file_name_raw\": \"nOahMUpVpGEmIkifhhdCdETTrqgjEGKV.mp4\",\n        \"file_name_encoded\": \"nOahMUpVpGEmIkifhhdCdETTrqgjEGKV.mp4\",\n        \"created_at\": \"2015-07-28T00:04:57.66137Z\",\n        \"updated_at\": \"2015-07-28T00:04:57.66137Z\",\n        \"owner_id\": 4,\n        \"subject_id\": 0,\n        \"user_viewers\": [\n            {\n                \"id\": 36,\n                \"video_id\": 36,\n                \"user_id\": 4,\n                \"name\": \"\",\n                \"created_at\": \"2015-07-28T00:04:57.686785Z\",\n                \"updated_at\": \"2015-07-28T00:04:57.686785Z\"\n            }\n        ],\n        \"user_viewer_ids\": [\n            4\n        ],\n        \"group_viewers\": [\n            {\n                \"id\": 93,\n                \"video_id\": 36,\n                \"group_id\": 12,\n                \"name\": \"\",\n                \"created_at\": \"2015-07-28T00:04:57.668307Z\",\n                \"updated_at\": \"2015-07-28T00:04:57.668307Z\"\n            },\n            {\n                \"id\": 94,\n                \"video_id\": 36,\n                \"group_id\": 13,\n                \"name\": \"\",\n                \"created_at\": \"2015-07-28T00:04:57.674936Z\",\n                \"updated_at\": \"2015-07-28T00:04:57.674936Z\"\n            },\n            {\n                \"id\": 95,\n                \"video_id\": 36,\n                \"group_id\": 14,\n                \"name\": \"\",\n                \"created_at\": \"2015-07-28T00:04:57.680665Z\",\n                \"updated_at\": \"2015-07-28T00:04:57.680665Z\"\n            }\n        ],\n        \"group_viewer_ids\": [\n            12,\n            13,\n            14\n        ],\n        \"storage_billable\": true,\n        \"size description:\": 0\n    },\n    \"message\": \"Transcoding is in progress\"\n}","name":"","status":200},{"code":"No response content; Invalid Token","status":401,"language":"text"},{"status":403,"language":"json","code":"{\n    \"errors\": {\n        \"permission\": [\n            \"no permission found\"\n        ]\n    }\n}"},{"status":404,"language":"json","code":"{\n  \"errors\":{\n    \"id\":[\"not found\"]\n  }\n}"}]},"settings":"56aff347bc304a0d00ace27e","url":"/video/:video_id"},"body":"Gets the metadata and the video stream link for the specified `video_id`.\n\nNote that the returned JSON includes both the access token for the video as well as a number of URLs that may be used to access the video. Each of these URLs also contains the access token. \n\nAt this time the only supported video streams are:\n- **HLS:** see the `hls_url` value.\n     - The stream is 128-Bit AES Encrypted delivered over https; please use a compatible video player to play this stream.\n- **SMIL:** see the `smil_url` value.\n     - The stream is HLS, 128-Bit AES Encrypted delivered over https with **automatic adaptive bitrate**; please use a compatible video player to play this stream.\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Transcoding Operations\",\n  \"body\": \"If you GET a video before transcoding has created a playable video artifact, then you will get a `\\\"message\\\": \\\"Transcoding is in progress\\\"` object in the returned JSON instead of `hls_token`,`hls_url`,`smil_token` and `smil_url` objects\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Warning for HLS_URL and HLS_TOKEN values:\",\n  \"body\": \"- The `hls_url` value will only be present for videos of .mp4 / .mov format; it will be omitted for videos of any other format.\\n- The `hls_token` value will only be present for videos of .mp4 / .mov format; it will be omitted for videos of any other format.\\n- Both the `hls_url` and `hls_token` values will be deprecated in a future API version; it is recommended that the `smil_url` and `smil_token` values are utilized for all current and future integrations.\"\n}\n[/block]","category":"56b28a3140856919000e9d0d","type":"get","updates":[],"user":"5671bb4d5e49250d006648fd","version":"5671bb92a0ee9b0d00185325","createdAt":"2016-02-04T00:48:00.094Z","order":3,"slug":"videovideo_id","__v":0,"editedParams":true,"link_external":false,"childrenPages":[]}

getGet Video

/video/:video_id

Path Params

video_id:
required
integer
ID of video to get
Gets the metadata and the video stream link for the specified `video_id`. Note that the returned JSON includes both the access token for the video as well as a number of URLs that may be used to access the video. Each of these URLs also contains the access token. At this time the only supported video streams are: - **HLS:** see the `hls_url` value. - The stream is 128-Bit AES Encrypted delivered over https; please use a compatible video player to play this stream. - **SMIL:** see the `smil_url` value. - The stream is HLS, 128-Bit AES Encrypted delivered over https with **automatic adaptive bitrate**; please use a compatible video player to play this stream. [block:callout] { "type": "warning", "title": "Transcoding Operations", "body": "If you GET a video before transcoding has created a playable video artifact, then you will get a `\"message\": \"Transcoding is in progress\"` object in the returned JSON instead of `hls_token`,`hls_url`,`smil_token` and `smil_url` objects" } [/block] [block:callout] { "type": "warning", "title": "Warning for HLS_URL and HLS_TOKEN values:", "body": "- The `hls_url` value will only be present for videos of .mp4 / .mov format; it will be omitted for videos of any other format.\n- The `hls_token` value will only be present for videos of .mp4 / .mov format; it will be omitted for videos of any other format.\n- Both the `hls_url` and `hls_token` values will be deprecated in a future API version; it is recommended that the `smil_url` and `smil_token` values are utilized for all current and future integrations." } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Gets the metadata and the video stream link for the specified `video_id`. Note that the returned JSON includes both the access token for the video as well as a number of URLs that may be used to access the video. Each of these URLs also contains the access token. At this time the only supported video streams are: - **HLS:** see the `hls_url` value. - The stream is 128-Bit AES Encrypted delivered over https; please use a compatible video player to play this stream. - **SMIL:** see the `smil_url` value. - The stream is HLS, 128-Bit AES Encrypted delivered over https with **automatic adaptive bitrate**; please use a compatible video player to play this stream. [block:callout] { "type": "warning", "title": "Transcoding Operations", "body": "If you GET a video before transcoding has created a playable video artifact, then you will get a `\"message\": \"Transcoding is in progress\"` object in the returned JSON instead of `hls_token`,`hls_url`,`smil_token` and `smil_url` objects" } [/block] [block:callout] { "type": "warning", "title": "Warning for HLS_URL and HLS_TOKEN values:", "body": "- The `hls_url` value will only be present for videos of .mp4 / .mov format; it will be omitted for videos of any other format.\n- The `hls_token` value will only be present for videos of .mp4 / .mov format; it will be omitted for videos of any other format.\n- Both the `hls_url` and `hls_token` values will be deprecated in a future API version; it is recommended that the `smil_url` and `smil_token` values are utilized for all current and future integrations." } [/block]
{"_id":"56b2a1ebe969500d00ac0ee8","editedParams":true,"project":"5671bb91a0ee9b0d00185322","sync_unique":"","updates":[],"version":"5671bb92a0ee9b0d00185325","api":{"auth":"required","examples":{"codes":[{"code":"curl \\\n   -H 'Accept: application/json' \\\n   -H 'Authorization: Bearer <token>' \\\n   --form 'json={\"owner_id\":6655,\"title\":\"_title\",\"description\":\"_description\",\"location\":\"_location\"  ,\"group_viewer_ids\":[1234,2345]}' \\\n   -F \"media=@./files/xylophone.mp4\" \\\n   -i https://apollo.reeldx.com/api/v1/video","language":"curl"}]},"method":"post","params":[{"name":"title","in":"body","_id":"56b2a1ebe969500d00ac0ef0","required":true,"desc":"Title of the video.","default":"","type":"string"},{"name":"description","in":"body","_id":"56b2a1ebe969500d00ac0eef","required":false,"desc":"Description of the video.","default":"","type":"string"},{"desc":"Location the video was captured.","default":"","type":"string","name":"location","in":"body","_id":"56b2a1ebe969500d00ac0eee","required":false},{"default":"","type":"int","name":"owner_id","in":"body","_id":"56b2a1ebe969500d00ac0eed","required":true,"desc":"Owner of the video as medvid.io User ID (usually the user that uploaded it). This user will have Read, Update, Delete, and List rights for this video."},{"required":false,"desc":"Subject of the video as medvid.io User ID (can be same as owner_id). This user will have Read, Update, Delete, and List rights for this video.","default":"","type":"int","name":"subject_id","in":"body","_id":"56b2a1ebe969500d00ac0eec"},{"name":"user_viewer_ids","in":"body","_id":"56b2a1ebe969500d00ac0eeb","required":false,"desc":"List of medvid.io User IDs that can Read and List this video. Videos can be associated with 0-n user viewers","default":"","type":"array_int"},{"name":"group_viewer_ids","in":"body","_id":"56b2a1ebe969500d00ac0eea","required":false,"desc":"List of medvid.io Group IDs for those groups whose users can Read and List this video. Videos can be associated with 0-n Groups.","default":"","type":"array_int"}],"results":{"codes":[{"status":201,"language":"json","code":"{  \n   \"video\":{  \n      \"id\":16,\n      \"title\":\"_title\",\n      \"description\":\"_description\",\n      \"location\":\"_location\",\n      \"file_name_input\":\"xylophone.mp4\",\n      \"file_name_raw\":\"/home/gregz/tmp/psVgzHblmYYtEjVgwfFbbGGcnqbaEREu\",\n      \"file_name_encoded\":\"\",\n      \"encoding_status\":1,\n      \"created_at\":\"2014-12-02T15:13:54.237935321-08:00\",\n      \"updated_at\":\"2014-12-02T15:13:54.237935321-08:00\",\n      \"group_viewers\":[  \n         {  \n            \"id\":29,\n            \"video_id\":16,\n            \"group_id\":1234,\n            \"name\":\"\",\n            \"created_at\":\"2014-12-02T15:13:54.239187875-08:00\",\n            \"updated_at\":\"2014-12-02T15:13:54.239187875-08:00\"\n         },\n         {  \n            \"id\":30,\n            \"video_id\":16,\n            \"group_id\":2345,\n            \"name\":\"\",\n            \"created_at\":\"2014-12-02T15:13:54.24027218-08:00\",\n            \"updated_at\":\"2014-12-02T15:13:54.24027218-08:00\"\n         }\n      ],\n      \"group_viewer_ids\":null,\n      \"user_id\":6655\n   }\n}","name":""},{"code":"{\n  \"errors\":{\n    \"videojson\":[\n      \"could not be JSON encoded\"]\n  }\n}","name":"","status":400,"language":"json"},{"status":401,"language":"text","code":"No response content; Invalid Token"},{"language":"text","code":"No response content; Not authorized to add to owner_id, group_id, user_viewer_ids, and or group_viewer_ids","status":403},{"status":413,"language":"text","code":"Video file exceeds maximum file size allowed for uploads."},{"code":"No response content; title cannot be blank","status":422,"language":"text"}]},"settings":"56aff347bc304a0d00ace27e","url":"/video"},"body":"Though this request contains an element with the name `json`, the request is not in JSON form, so do not specify `-H 'Content-type: application/json'` as is expected elsewhere.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"When a video is uploaded it will automatically be added to the medvid.io Transcoder Queue; it will be transcoded such that it can be streamed back as an HLS video. Transcoding also enables adaptive bitrate streaming.\",\n  \"title\": \"Automatic Transcoding\"\n}\n[/block]\nNote that the JSON body:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"owner_id\\\":6655,\\n  \\\"title\\\":\\\"_title\\\",\\n  \\\"description\\\":\\\"_description\\\",\\n  \\\"location\\\":\\\"_location\\\",\\n  \\\"user_viewer_ids\\\":[123,321],\\n  \\\"group_viewer_ids\\\":[1234,2345]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nIs separate from the file object in this API call:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\\"media=@./files/xylophone.mp4\\\"\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Account Users / Application Users\",\n  \"body\": \"When creating a video it is recommended that you use an Application User JWT and set the `owner_id` value to match the user defined in the Application User JWT. Using an Account User JWT when creating a video limits the usable security features of the medvid.io API as the created video is not uniquely tied to a specific Application User.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"Security Warning\",\n  \"body\": \"This endpoint cannot be accessed using the \\\"API Explorer\\\" feature on this webpage. The endpoint is still accessible via other means / integrations.\"\n}\n[/block]","category":"56b28a3140856919000e9d0d","link_url":"","slug":"video","title":"Create Video","editedParams2":true,"excerpt":"/video","hidden":false,"order":4,"type":"post","__v":1,"createdAt":"2016-02-04T00:57:15.377Z","link_external":false,"githubsync":"","user":"5671bb4d5e49250d006648fd","childrenPages":[]}

postCreate Video

/video

Body Params

title:
required
string
Title of the video.
description:
string
Description of the video.
location:
string
Location the video was captured.
owner_id:
required
integer
Owner of the video as medvid.io User ID (usually the user that uploaded it). This user will have Read, Update, Delete, and List rights for this video.
subject_id:
integer
Subject of the video as medvid.io User ID (can be same as owner_id). This user will have Read, Update, Delete, and List rights for this video.
user_viewer_ids:
array of integers
List of medvid.io User IDs that can Read and List this video. Videos can be associated with 0-n user viewers
group_viewer_ids:
array of integers
List of medvid.io Group IDs for those groups whose users can Read and List this video. Videos can be associated with 0-n Groups.
Though this request contains an element with the name `json`, the request is not in JSON form, so do not specify `-H 'Content-type: application/json'` as is expected elsewhere. [block:callout] { "type": "info", "body": "When a video is uploaded it will automatically be added to the medvid.io Transcoder Queue; it will be transcoded such that it can be streamed back as an HLS video. Transcoding also enables adaptive bitrate streaming.", "title": "Automatic Transcoding" } [/block] Note that the JSON body: [block:code] { "codes": [ { "code": "{\n \"owner_id\":6655,\n \"title\":\"_title\",\n \"description\":\"_description\",\n \"location\":\"_location\",\n \"user_viewer_ids\":[123,321],\n \"group_viewer_ids\":[1234,2345]\n}", "language": "json" } ] } [/block] Is separate from the file object in this API call: [block:code] { "codes": [ { "code": "\"media=@./files/xylophone.mp4\"", "language": "text" } ] } [/block] [block:callout] { "type": "warning", "title": "Account Users / Application Users", "body": "When creating a video it is recommended that you use an Application User JWT and set the `owner_id` value to match the user defined in the Application User JWT. Using an Account User JWT when creating a video limits the usable security features of the medvid.io API as the created video is not uniquely tied to a specific Application User." } [/block] [block:callout] { "type": "danger", "title": "Security Warning", "body": "This endpoint cannot be accessed using the \"API Explorer\" feature on this webpage. The endpoint is still accessible via other means / integrations." } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Though this request contains an element with the name `json`, the request is not in JSON form, so do not specify `-H 'Content-type: application/json'` as is expected elsewhere. [block:callout] { "type": "info", "body": "When a video is uploaded it will automatically be added to the medvid.io Transcoder Queue; it will be transcoded such that it can be streamed back as an HLS video. Transcoding also enables adaptive bitrate streaming.", "title": "Automatic Transcoding" } [/block] Note that the JSON body: [block:code] { "codes": [ { "code": "{\n \"owner_id\":6655,\n \"title\":\"_title\",\n \"description\":\"_description\",\n \"location\":\"_location\",\n \"user_viewer_ids\":[123,321],\n \"group_viewer_ids\":[1234,2345]\n}", "language": "json" } ] } [/block] Is separate from the file object in this API call: [block:code] { "codes": [ { "code": "\"media=@./files/xylophone.mp4\"", "language": "text" } ] } [/block] [block:callout] { "type": "warning", "title": "Account Users / Application Users", "body": "When creating a video it is recommended that you use an Application User JWT and set the `owner_id` value to match the user defined in the Application User JWT. Using an Account User JWT when creating a video limits the usable security features of the medvid.io API as the created video is not uniquely tied to a specific Application User." } [/block] [block:callout] { "type": "danger", "title": "Security Warning", "body": "This endpoint cannot be accessed using the \"API Explorer\" feature on this webpage. The endpoint is still accessible via other means / integrations." } [/block]
{"_id":"56b2a9759621f20d00efb387","sync_unique":"","__v":0,"editedParams":true,"link_url":"","order":5,"type":"put","body":"Updates the meta-data associated with a video. **When Updating a video all Data Attributes must be specified; if an attribute is not specified it will be replaced with a default empty or null value.**","category":"56b28a3140856919000e9d0d","link_external":false,"hidden":false,"project":"5671bb91a0ee9b0d00185322","api":{"settings":"56aff347bc304a0d00ace27e","url":"/video/:video_id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl  \\\n   -H 'Content-type: application/json' \\\n   -H 'Accept: application/json' \\\n   -H 'Authorization: Bearer <token>' \\\n   -d '{\"video\":{\"title\":\"_title\",\"description\":\"new__desc\",\"location\":\"_location\"}}' \\\n   -X PUT \\\n   -i https://apollo.reeldx.com/api/v1/video/18"}]},"method":"put","params":[{"in":"path","_id":"56b2a9759621f20d00efb388","required":true,"desc":"ID of video to update","default":"","type":"int","name":"video_id"},{"name":"video.title","required":true,"type":"string","in":"body","_id":"56b2a1ebe969500d00ac0ef0","default":"","desc":"Title of the video."},{"in":"body","_id":"56b2a1ebe969500d00ac0eef","default":"","desc":"Description of the video.","name":"video.description","required":false,"type":"string"},{"required":false,"type":"string","in":"body","_id":"56b2a1ebe969500d00ac0eee","default":"","desc":"Location the video was captured.","name":"video.location"},{"_id":"56b2a1ebe969500d00ac0eeb","default":"","desc":"List of medvid.io User IDs that can Read and List this video. Videos can be associated with 0-n user viewers","name":"video.user_viewer_ids","required":false,"type":"array_int","in":"body"},{"_id":"56b2a1ebe969500d00ac0eea","default":"","desc":"List of medvid.io Group IDs for those groups whose users can Read and List this video. Videos can be associated with 0-n Groups.","name":"video.group_viewer_ids","required":false,"type":"array_int","in":"body"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"video\": {\n        \"id\": 18,\n        \"title\": \"_title\",\n        \"description\": \"new_desc\",\n        \"location\": \"_location\",\n        \"file_name_input\": \"79b050fe-4a56-9e14-e84d0eebd89f.MOV\",\n        \"file_name_raw\": \"GlVweRXBPvzFEJPHGYmOh.MOV\",\n        \"file_name_encoded\": \"GlVweRXBPvzFEJPHGYmOh.MOV\",\n        \"created_at\": \"2014-02-04T01:13:43.76417Z\",\n        \"updated_at\": \"2014-02-04T01:33:43.499787Z\",\n        \"owner_id\": 999,\n        \"subject_id\": 0,\n        \"user_viewers\": [\n            {\n                \"id\": 1234,\n                \"video_id\": 18,\n                \"user_id\": 1001,\n                \"name\": \"\",\n                \"created_at\": \"2014-02-04T01:33:43.706396Z\",\n                \"updated_at\": \"2014-02-04T01:33:43.720281Z\"\n            }\n        ],\n        \"user_viewer_ids\": [\n            1001\n        ],\n        \"group_viewers\": [\n            {\n                \"id\": 4321,\n                \"video_id\": 18,\n                \"group_id\": 777,\n                \"name\": \"\",\n                \"created_at\": \"2014-02-04T01:33:43.516627Z\",\n                \"updated_at\": \"2014-02-04T01:33:43.5317Z\"\n            }\n        ],\n        \"group_viewer_ids\": [\n            777\n        ],\n        \"size\": 1833517,\n        \"account_id\": 99\n    }\n}","name":""},{"status":400,"language":"json","code":"{\n  \"errors\":{\n    \"videojson\":[\n      \"could not be JSON encoded\"]\n  }\n}","name":""},{"code":"No response content; Invalid Token","status":401,"language":"text"},{"status":403,"language":"json","code":"{\n  \"errors\":{\n    \"permission\":[\n      \"new user_viewer not in account\"]\n  }\n}"},{"status":403,"language":"json","code":"{\n  \"errors\":{\n    \"permission\":[\n      \"need create permission for all added groups: no permission found (group)\"]\n  }\n}"},{"status":422,"language":"json","code":"{\n  \"errors\":{\n    \"title\":[\n      \"can't be blank\"]\n  }\n}"}]}},"createdAt":"2016-02-04T01:29:25.087Z","githubsync":"","title":"Update Video","updates":[],"user":"5671bb4d5e49250d006648fd","version":"5671bb92a0ee9b0d00185325","editedParams2":true,"excerpt":"/video/:video_id","slug":"videovideo_id-put","childrenPages":[]}

putUpdate Video

/video/:video_id

Path Params

video_id:
required
integer
ID of video to update

Body Params

video.title:
required
string
Title of the video.
video.description:
string
Description of the video.
video.location:
string
Location the video was captured.
video.user_viewer_ids:
array of integers
List of medvid.io User IDs that can Read and List this video. Videos can be associated with 0-n user viewers
video.group_viewer_ids:
array of integers
List of medvid.io Group IDs for those groups whose users can Read and List this video. Videos can be associated with 0-n Groups.
Updates the meta-data associated with a video. **When Updating a video all Data Attributes must be specified; if an attribute is not specified it will be replaced with a default empty or null value.**

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Updates the meta-data associated with a video. **When Updating a video all Data Attributes must be specified; if an attribute is not specified it will be replaced with a default empty or null value.**
{"_id":"56b2ad853b6f690d00bdb79d","editedParams":true,"githubsync":"","link_url":"","slug":"videovideo_id-delete","sync_unique":"","version":"5671bb92a0ee9b0d00185325","api":{"url":"/video/:video_id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl \\\n   -H 'Content-type: application/json' \\\n   -H 'Accept: application/json' \\\n   -H 'Authorization: Bearer <token>' \\\n   -i \\\n   -X DELETE \\\n   -i https://apollo.reeldx.com/api/v1/video/16"}]},"method":"delete","params":[{"required":true,"desc":"ID of video to delete","default":"","type":"int","name":"video_id","in":"path","_id":"56b2a9759621f20d00efb388"}],"results":{"codes":[{"status":204,"language":"text","code":"No response content; delete successful","name":""},{"status":401,"language":"text","code":"No response content; Invalid Token"},{"language":"json","code":"{\n  \"errors\":{\n    \"base\":[\n      \"not found\"]\n  }\n}","status":404}]},"settings":"56aff347bc304a0d00ace27e"},"createdAt":"2016-02-04T01:46:45.084Z","hidden":false,"link_external":false,"user":"5671bb4d5e49250d006648fd","body":"Deletes the specified video.","editedParams2":true,"excerpt":"/video/:video_id","order":6,"updates":[],"__v":0,"category":"56b28a3140856919000e9d0d","project":"5671bb91a0ee9b0d00185322","title":"Delete Video","type":"delete","childrenPages":[]}

deleteDelete Video

/video/:video_id

Path Params

video_id:
required
integer
ID of video to delete
Deletes the specified video.

User Information

Try It Out

delete
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Deletes the specified video.