Fixed example response Added extra info to from and until query params

#%RAML 0.8
title: api-gateway
version: 2.0

traits:
  - responses-all: !include traits/responses.raml
  - dates: !include traits/daterange.raml

/asset:
  /{pid}:
    uriParameters:
        pid:
          description: "The pid of the asset"
          pattern: "[A-Za-z0-9]{10}"
          example: 6m33208w27
          required: true
    get:
      description: "Get asset's info based on pid"
      is: [responses-all: {
        example200: '"data":{"asset_id":"e1NCVSPPlZ6X9b5ocK5U9b7G","app_id":"2","provider_id":"","owner_id":"bart.debunne@viaa.be","group_id":"","videotimestamp":"2014-05-23 16:01:21","videotimestampmodified":"2016-10-28 13:02:20","play_restriction_start":"","play_restriction_end":"","reference_id":"","isprivate":"FALSE","mediafile_duration":"00:02:10.86","mediafile_container_type":"mov;mp4;m4a;3gp;3g2;mj2","mediafile_filename":"1210071009352242421.m4v","is_unappropriate":"FALSE","is_external":"FALSE","is_empty_asset":"FALSE","viewed":"206","played":"2442","is_protected":"FALSE","mediafile_mime_type":"video/mp4","asset_type":"video","is_unappropiate":"FALSE","app_3":{"total_comments":"","total_favourites":"","viaa_org":"OR-rf5kf25","viaa_pid":"6m33208w27"},"asset":{"aggregate":"","aggregate_type":"","component":"","component_order":"","draft_asset_id":"","lock_date":"","lock_owner":"","original_asset_id":"","published":"TRUE","trashcan":"FALSE","trashcan_date":"","trashcan_user":""},"czp":{"aggregatieniveau":"","auteursrechten":"","beoogde_eindgebruiker":"Student","beoogde_leeftijdsgroep":"Lager 3de graad","beschrijving":"Fragment van Karrewiet waarin kinderen een bezoek brengen aan soldatenkerkhoven in de Westhoek. Hierin wordt op een begrijpbaar niveau uitleg gegeven over de Eerste Wereldoorlog. De leerlingen staan stil bij de gruwel van de de oorlog. ","classificatie":"mens en maatschappij","context":"Lager onderwijs","identificatiecode":"","kosten":"","omschrijving_rechten":"","schemanaam":"","sleutelwoord":"","soort_leermateriaal":"Video","status":"","taal":"nl","titel":"","versie":""},"dublin_core":{"contributor":"","coverage_spatial":"","coverage_temporal":"","creator":"VRT","date":"","description":"In dit fragment wordt de Eerste Wereldoorlog herdacht. Op het soldatenkerkhof in Veltem brengen de leerlingen van Mater Dei in Erps Kwerps een bezoek. Er volgt een  interview met de leerlingen.\r\n","format":"Video","identifier":"1210071009352242421","language":"nl","publisher":"VRT","relation":"AIM00262447","rights":"Rechten voorbehouden","source":"","subject":"Veltem","title":"Karrewiet: soldatenkerkhof WO I","type":"Nieuws"},"qualified_dublin_core":{"created":"","description_abstract":"","format_extent":"","format_medium":"","hasformat":"","isformatof":"","isreferencedby":"","issued":"2005-11-11 00:00:00","license":"","rightsholder":"","title_alternative":"Karrewiet"},"is_favorite":"FALSE","granted":"TRUE","has_streamable_mediafiles":"TRUE","ega_still_url":"","vpx_still_url":"https://salsa1.viaa.be/media/3/T/TcNi9QIPPBtKgjUUkkj8M6t1/TcNi9QIPPBtKgjUUkkj8M6t1.jpg"}',
        description: "Get asset's info based on pid"}]
    /{type}:
      uriParameters:
        type:
          description: "The type of information to retrieve"
          example: "plays"
          enum: [favorites, plays, views, still, media]
      get:
        description: Get assets {info} based on pid
        is: [responses-all: {
          example200: '"data":{"plays":"0"}',
          description: "Get assets {info} based on pid"}]
  /mm/{id}:
    uriParameters:
      id:
        description: "The mediamosa id of the asset"
        required: true
        example: e1NCVSPPlZ6X9b5ocK5U9b7G
        minLength: 1
    get:
      description: "Get asset's info based on asset_id"
      is: [responses-all: {
        example200: '"data":{"asset_id":"z1gdeWNEVWqhSbcjMSyMrFab","app_id":"2","provider_id":"","owner_id":"bart.debunne@viaa.be","group_id":"","videotimestamp":"2017-01-15 23:48:07","videotimestampmodified":"2017-01-15 23:59:32","play_restriction_start":"","play_restriction_end":"","reference_id":"","isprivate":"FALSE","mediafile_duration":"","mediafile_container_type":"","mediafile_filename":"","is_unappropriate":"FALSE","is_external":"TRUE","is_empty_asset":"FALSE","viewed":"0","played":"0","is_protected":"FALSE","mediafile_mime_type":"","asset_type":"video","is_unappropiate":"FALSE","app_3":{"total_comments":"","total_favourites":"","viaa_org":"OR-rf5kf25","viaa_pid":"862b85r567"},"asset":{"aggregate":"","aggregate_type":"","component":"","component_order":"","draft_asset_id":"","lock_date":"","lock_owner":"","original_asset_id":"","published":"TRUE","trashcan":"FALSE","trashcan_date":"","trashcan_user":""},"czp":{"aggregatieniveau":"1","auteursrechten":"","beoogde_eindgebruiker":"Student","beoogde_leeftijdsgroep":"Secundair 3de graad","beschrijving":"","classificatie":"politieke en sociale wetenschappen - maatschappijleer","context":"Secundair onderwijs","identificatiecode":"","kosten":"","omschrijving_rechten":"","schemanaam":"","sleutelwoord":"","soort_leermateriaal":"","status":"","taal":"","titel":"","versie":""},"dublin_core":{"contributor":"","coverage_spatial":"","coverage_temporal":"","creator":"","date":"","description":"Tweede deel van de reportage van Stefaan Meerbergen in Noord-Korea.\n\nBeelden van Pyongyang: op zijn hotelkamer kijkt Meerbergen naar de staatsomroep met propaganda voor de leiders.\n\nBeelden van de geliefde Kim Il-sung, Noord-Koreanen dansen bij een vlag en lijken gelukkig. Meerbergen loopt rond in zijn hotel en vertelt dat er in geen enkel hotel een vijfde verdieping is. Hij vertelt over de samenzweringstheorieën die er rond de vijfde verdieping bestaan.\n\nAfspraak met gids Ri Chung Il in een boekenwinkel. Hij toont de boeken die zogezegd geschreven zijn door de leiders, over het beleid van Noord-Korea. De gids leest voor uit een boek en licht de inhoud toe. Het gaat over Juche, de Noord-Koreaanse politieke filosofie. Hij vindt Kim Il-sung en Kim Jong-il de beste regeringsleiders in de wereld. Archiefbeelden van Kim Jong-il.\n\nUitleg met foto over Kim Il-sung, Kim Jong-il en Kim Jong-un.\n\nBeelden van een weverij in Noord-Korea.\n\nMeerbergen in zijn hotelkamer: hij vertelt over zijn gids en vraagt zich af of het gemeend is wat hij zegt. Meerbergen vertelt dat hij wil opklimmen in de partij. Hij vertelt over het in stand houden van de devotie van de inwoners en over het mythologiseren van de regeringsleiders. Hij vertelt over de moeilijke relatie met de klankman en vermoedt dat hij een spion is.\n\nBedrijfsbezoek: een tolk praat voornamelijk over Grote Leider Kim Il-sung. Meerbergen toont de ruimte waar de grote leiders worden verheerlijkt.\nBezoek aan de paardrijdclub. Een gids vertelt dat Kim Jong-un persoonlijk heeft meegeholpen met de bouw van de club.\n\nLuchtfoto met aanduiding van enkele mogelijke strafkampen. Meerbergen vertelt over de schending van de mensenrechten in Noord-Korea.\n\nBeelden van een restaurant op een boot. Fotosessie met een Noord-Koreaans kind en een gezellige avond.","format":"","identifier":"862b85r567","language":"nl","publisher":"VRT","relation":"ms3jw8sf5j","rights":"","source":"","subject":"propaganda","title":"Terzake: Noord-Korea","type":""},"qualified_dublin_core":{"created":"","description_abstract":"","format_extent":"","format_medium":"","hasformat":"","isformatof":"","isreferencedby":"65cdc5ff-c143-47a6-ac14-bcceb85ff67a","issued":"2014-11-18 00:00:00","license":"","rightsholder":"","title_alternative":"Terzake"},"is_favorite":"FALSE","granted":"TRUE","has_streamable_mediafiles":"TRUE","ega_still_url":"","vpx_still_url":"http://archief-media.viaa.be/viaa/TESTBEELD/445f64899bcc47e88e4e35592ce701fafb61ce18d8fe45b2a9490846027eb943/keyframes/keyframes_1_1/keyframe1.jpg"}',
        description: "Get asset's info based on asset_id"}]
    /{type}:
      uriParameters:
        type:
          description: "The type of information to retrieve"
          example: "plays"
          enum: [favorites, plays, views, still, media]
      get:
        description: "Get asset's favorites based on asset_id"
        is: [responses-all: {
          example200: '"data":{"plays":"0"}',
          description: "Get asset's favorites based on asset_id"}]
/assets:
  /count:
    get:
      description: "Count all assets grouped by type"
      is: [responses-all: {
        example200: '"data":{"collectie":"845","thema":"181","video":"8556","audio":"719"}',
        description: "Count all assets grouped by type"}, dates]
    /{type}:
      uriParameters:
          type:
            description: "The type of asset"
            enum: [video, audio, collectie, thema]
      get:
        description: "Count all assets of type: video/adio/collectie/thema"
        is: [responses-all: {
          example200: '"data":{"video":"8556"}',
          description: "Count all assets of type: video/adio/collectie/thema"}, dates]
  /mostrecent:
    get:
      description: "Gets the most recent asset independent of type"
      is: [responses-all: {
        example200: '"data":{"asset_id":"I2mTZfCXeECZRNYqaFMnNjZd","app_id":"3","provider_id":"","owner_id":"is_app_admin","group_id":"","videotimestamp":"2017-01-17 14:02:21","videotimestampmodified":"2017-01-17 14:02:21","play_restriction_start":"","play_restriction_end":"","reference_id":"","isprivate":"FALSE","mediafile_duration":"","mediafile_container_type":"","mediafile_filename":"","is_unappropriate":"FALSE","is_external":"FALSE","is_empty_asset":"FALSE","viewed":"0","played":"0","is_protected":"FALSE","mediafile_mime_type":"","asset_type":"collectie","is_unappropiate":"FALSE","app_3":{"total_comments":"","total_favourites":"","viaa_org":"","viaa_pid":""},"asset":{"aggregate":"","aggregate_type":"","component":"","component_order":"","draft_asset_id":"","lock_date":"","lock_owner":"","original_asset_id":"","published":"TRUE","trashcan":"FALSE","trashcan_date":"","trashcan_user":""},"czp":{"aggregatieniveau":"","auteursrechten":"","beoogde_eindgebruiker":"","beoogde_leeftijdsgroep":"","beschrijving":"","classificatie":"","context":"","identificatiecode":"","kosten":"","omschrijving_rechten":"","schemanaam":"","sleutelwoord":"","soort_leermateriaal":"","status":"","taal":"","titel":"","versie":""},"dublin_core":{"contributor":"","coverage_spatial":"","coverage_temporal":"","creator":"","date":"","description":"","format":"","identifier":"","language":"","publisher":"VRT","relation":"","rights":"","source":"","subject":"zoekgeschiedenis","title":"gevaren internet","type":"Praatprogramma"},"qualified_dublin_core":{"created":"","description_abstract":"","format_extent":"","format_medium":"","hasformat":"","isformatof":"","isreferencedby":"","issued":"","license":"","rightsholder":"","title_alternative":""},"is_favorite":"FALSE","granted":"TRUE","has_streamable_mediafiles":"FALSE","ega_still_url":"","vpx_still_url":""}',
        description: "Gets the most recent asset independent of type"}]
    /{type}:
      uriParameters:
        type:
          description: "The type of asset"
          enum: [video, audio, collectie, thema]
      get:
        description: "find most recent of type: video/adio/collectie/thema"
        is: [responses-all: {
          example200: '"data":{"collectie":{"asset_id":"I2mTZfCXeECZRNYqaFMnNjZd","app_id":"3","provider_id":"","owner_id":"is_app_admin","group_id":"","videotimestamp":"2017-01-17 14:02:21","videotimestampmodified":"2017-01-17 14:02:21","play_restriction_start":"","play_restriction_end":"","reference_id":"","isprivate":"FALSE","mediafile_duration":"","mediafile_container_type":"","mediafile_filename":"","is_unappropriate":"FALSE","is_external":"FALSE","is_empty_asset":"FALSE","viewed":"0","played":"0","is_protected":"FALSE","mediafile_mime_type":"","asset_type":"collectie","is_unappropiate":"FALSE","app_3":{"total_comments":"","total_favourites":"","viaa_org":"","viaa_pid":""},"asset":{"aggregate":"","aggregate_type":"","component":"","component_order":"","draft_asset_id":"","lock_date":"","lock_owner":"","original_asset_id":"","published":"TRUE","trashcan":"FALSE","trashcan_date":"","trashcan_user":""},"czp":{"aggregatieniveau":"","auteursrechten":"","beoogde_eindgebruiker":"","beoogde_leeftijdsgroep":"","beschrijving":"","classificatie":"","context":"","identificatiecode":"","kosten":"","omschrijving_rechten":"","schemanaam":"","sleutelwoord":"","soort_leermateriaal":"","status":"","taal":"","titel":"","versie":""},"dublin_core":{"contributor":"","coverage_spatial":"","coverage_temporal":"","creator":"","date":"","description":"","format":"","identifier":"","language":"","publisher":"VRT","relation":"","rights":"","source":"","subject":"zoekgeschiedenis","title":"gevaren internet","type":"Praatprogramma"},"qualified_dublin_core":{"created":"","description_abstract":"","format_extent":"","format_medium":"","hasformat":"","isformatof":"","isreferencedby":"","issued":"","license":"","rightsholder":"","title_alternative":""},"is_favorite":"FALSE","granted":"TRUE","has_streamable_mediafiles":"FALSE","ega_still_url":"","vpx_still_url":""}}',
          description: "find most recent of type: video/adio/collectie/thema"}]
  /mostviewed:
    get:
      description: "Find most viewed asset - ON HOLD. WILL RETURN NOTHING"
      is: [responses-all: {
        example200: '"data":{}',
        description: "Find most viewed asset"}]
    /{type}:
      uriParameters:
        type:
          description: "The type of asset"
          enum: [video, audio, collectie, thema]
      get:
        description: "find most viewed of type: video/adio/collectie/thema - ON HOLD. WILL RETURN NOTHING"
        is: [responses-all: {
          example200: '"data":{}',
          description: "find most viewed of type: video/adio/collectie/thema"}]
  /mostfavorites:
    get:
      description: "Find most favorited asset"
      is: [responses-all: {
        example200: '"data":{"asset_id":"I2mTZfCXeECZRNYqaFMnNjZd","app_id":"3","provider_id":"","owner_id":"is_app_admin","group_id":"","videotimestamp":"2017-01-17 14:02:21","videotimestampmodified":"2017-01-17 14:02:21","play_restriction_start":"","play_restriction_end":"","reference_id":"","isprivate":"FALSE","mediafile_duration":"","mediafile_container_type":"","mediafile_filename":"","is_unappropriate":"FALSE","is_external":"FALSE","is_empty_asset":"FALSE","viewed":"0","played":"0","is_protected":"FALSE","mediafile_mime_type":"","asset_type":"collectie","is_unappropiate":"FALSE","app_3":{"total_comments":"","total_favourites":"","viaa_org":"","viaa_pid":""},"asset":{"aggregate":"","aggregate_type":"","component":"","component_order":"","draft_asset_id":"","lock_date":"","lock_owner":"","original_asset_id":"","published":"TRUE","trashcan":"FALSE","trashcan_date":"","trashcan_user":""},"czp":{"aggregatieniveau":"","auteursrechten":"","beoogde_eindgebruiker":"","beoogde_leeftijdsgroep":"","beschrijving":"","classificatie":"","context":"","identificatiecode":"","kosten":"","omschrijving_rechten":"","schemanaam":"","sleutelwoord":"","soort_leermateriaal":"","status":"","taal":"","titel":"","versie":""},"dublin_core":{"contributor":"","coverage_spatial":"","coverage_temporal":"","creator":"","date":"","description":"","format":"","identifier":"","language":"","publisher":"VRT","relation":"","rights":"","source":"","subject":"zoekgeschiedenis","title":"gevaren internet","type":"Praatprogramma"},"qualified_dublin_core":{"created":"","description_abstract":"","format_extent":"","format_medium":"","hasformat":"","isformatof":"","isreferencedby":"","issued":"","license":"","rightsholder":"","title_alternative":""},"is_favorite":"FALSE","granted":"TRUE","has_streamable_mediafiles":"FALSE","ega_still_url":"","vpx_still_url":""}',
        description: "Find most favorited asset"}]
    /{type}:
      uriParameters:
        type:
          description: "The type of asset"
          enum: [video, audio, collectie, thema]
      get:
        description: "find most favorited of type: video/adio/collectie/thema"
        is: [responses-all: {
          example200: '"data":{"audio":{"asset_id":"O1WgWX6mfevPZdfOdWn3oTHR","app_id":"2","provider_id":"","owner_id":"bart.debunne@viaa.be","group_id":"bart.debunne@viaa.be","videotimestamp":"2016-10-20 21:34:41","videotimestampmodified":"2016-10-28 12:50:26","play_restriction_start":"","play_restriction_end":"","reference_id":"","isprivate":"FALSE","mediafile_duration":"00:11:53.52","mediafile_container_type":"mov;mp4;m4a;3gp;3g2;mj2","mediafile_filename":"1210160928655888321.m4a","is_unappropriate":"FALSE","is_external":"FALSE","is_empty_asset":"FALSE","viewed":"68","played":"1","is_protected":"FALSE","mediafile_mime_type":"audio/mp4","asset_type":"audio","is_unappropiate":"FALSE","app_3":{"total_comments":"","total_favourites":"","viaa_org":"OR-rf5kf25","viaa_pid":"td9n30653g"},"asset":{"aggregate":"","aggregate_type":"","component":"","component_order":"","draft_asset_id":"","lock_date":"","lock_owner":"","original_asset_id":"","published":"TRUE","trashcan":"FALSE","trashcan_date":"","trashcan_user":""},"czp":{"aggregatieniveau":"","auteursrechten":"","beoogde_eindgebruiker":"Student","beoogde_leeftijdsgroep":"Secundair 3de graad","beschrijving":"In dit fragment van De kunstberg wordt het boek van Ad Ten Bosch over Ida Gerhardt besproken.","classificatie":"PAV - MAVO - GASV - ASPV","context":"Secundair onderwijs","identificatiecode":"","kosten":"","omschrijving_rechten":"","schemanaam":"","sleutelwoord":"","soort_leermateriaal":"Audio","status":"","taal":"nl","titel":"","versie":""},"dublin_core":{"contributor":"Xavier Vandamme","coverage_spatial":"","coverage_temporal":"","creator":"VRT","date":"2016-09-28","description":"In dit fragment van De kunstberg wordt het boek van Ad Ten Bosch over Ida Gerhardt besproken.\r\n\r\nIn de poëziekroniek wordt aandacht besteed aan het boek van Ad Ten Bosch, ‘Gebroken lied - Een vriendschap met Ida Gerhardt’. Een gesprek met poëziekenner Mark Van den Hoof over dit werk.  ","format":"Audio","identifier":"1210160928655888321","language":"nl","publisher":"VRT","relation":"AIM01206668","rights":"Rechten voorbehouden","source":"1210130603147265121","subject":"poëzie","title":"De kunstberg: de biografie van Ida Gerhardt","type":"Duiding"},"qualified_dublin_core":{"created":"1999-09-07 00:00:00","description_abstract":"","format_extent":"","format_medium":"","hasformat":"","isformatof":"","isreferencedby":"","issued":"1999-09-07 00:00:00","license":"","rightsholder":"","title_alternative":"De kunstberg"},"is_favorite":"FALSE","granted":"TRUE","has_streamable_mediafiles":"TRUE","ega_still_url":"","vpx_still_url":"https://salsa1.viaa.be/media/3/y/y2ZLFVrZZhVYZgYofQDcaIg2/y2ZLFVrZZhVYZgYofQDcaIg2.jpg"}}',
          description: "find most favorited of type: video/adio/collectie/thema"}]
/user:
  /{uid}:
    uriParameters:
      uid:
        description: "The ID of the user"
        required: true
        pattern: "[0-9]+"
    get:
        description: "Get user information based on uid"
        is: [responses-all: {
          example200: '"data":{"active":1,"created":"2000-01-01T00:00:00","access":"2000-01-01T00:00:00","uid":123456789,"naam":"John Doe","rol":"god","vestigingsnummer":"0123456789","pid":123456789,"e-mail":"john.doe@example.com","lerarenkaart":null,"graad":"Hoogste","school":"Harvard"}',
          description: "Get user information based on uid"}]
    /collections:
      get:
        description: "users collection numbers"
        is: [responses-all: {
          example200: '"data":[{"video_asset":"e1NCVSPPlZ6X9b5ocK5U9b7G","nid":53741,"title":"Soldatenhuwelijk in de loopgraven","collection_id":"C2YJVZHOPE8iYDWUbdcsAU3w","col_title":"WOI (4de lj)"},{"video_asset":"I2MSaSijUgIjFXIThZ8gB1xU","nid":53741,"title":"Dodengang","collection_id":"C2YJVZHOPE8iYDWUbdcsAU3w","col_title":"WOI (4de lj)"},{"video_asset":"p1JrMHdoSSZbERcGZiKkkftZ","nid":53741,"title":"DOVO ontmijnt","collection_id":"C2YJVZHOPE8iYDWUbdcsAU3w","col_title":"WOI (4de lj)"},{"video_asset":"p2Bsc9dlBSPLbaZ9YIiiR7lN","nid":53741,"title":"Wapenstilstand","collection_id":"C2YJVZHOPE8iYDWUbdcsAU3w","col_title":"WOI (4de lj)"},{"video_asset":"e1ZUFfemPXwfkZhsL3cPWxuU","nid":53741,"title":"11 november","collection_id":"C2YJVZHOPE8iYDWUbdcsAU3w","col_title":"WOI (4de lj)"},{"video_asset":"O2fOlHTJZTNTeTYj2Z0P61oc","nid":116301,"title":"1. Marc De Bel drinkt biomelk","collection_id":"Z1RcNFjgMsmWZVWVmF0hzYmr","col_title":"Het werk van auteur Marc De Bel"},{"video_asset":"x1ZIMMNO5JZUXLKFWhorWWV6","nid":116301,"title":"2. De Miss Griezelverkiezing'' van Marc De Bel","collection_id":"Z1RcNFjgMsmWZVWVmF0hzYmr","col_title":"Het werk van auteur Marc De Bel"},{"video_asset":"vyeR8faUqJMbRYfQDpCT25cE","nid":116301,"title":"3. Marc De Bel stelt nieuw boek voor ''Kapitein Cacao''","collection_id":"Z1RcNFjgMsmWZVWVmF0hzYmr","col_title":"Het werk van auteur Marc De Bel"},{"video_asset":"mKSOcnmbjxNcOWXVRJsIO0GZ","nid":116301,"title":"4. Opname van jeugdfilm ''Blinker en de bakfietsbioscoop''","collection_id":"Z1RcNFjgMsmWZVWVmF0hzYmr","col_title":"Het werk van auteur Marc De Bel"},{"video_asset":"c1ASsMRNQbKmWQQNXl9E2J1R","nid":116301,"title":"5. Boeboeks","collection_id":"Z1RcNFjgMsmWZVWVmF0hzYmr","col_title":"Het werk van auteur Marc De Bel"},{"video_asset":"V1INNUlfpVgunOfOnSZh1qx1","nid":532741,"title":"Onze ruimte: planeten om de zon","collection_id":"iXJHIaKVMXZWGKhdmiaFZVJO","col_title":"zon"}]',
          description: "users collection numbers"}]
    /favorites:
      get:
        description: "users favourite assets"
        is: [responses-all: {
          example200: '"data":[{"video_asset":"e1NCVSPPlZ6X9b5ocK5U9b7G","nid":53741,"title":"Soldatenhuwelijk in de loopgraven","collection_id":"C2YJVZHOPE8iYDWUbdcsAU3w","col_title":"WOI (4de lj)"},{"video_asset":"I2MSaSijUgIjFXIThZ8gB1xU","nid":53741,"title":"Dodengang","collection_id":"C2YJVZHOPE8iYDWUbdcsAU3w","col_title":"WOI (4de lj)"},{"video_asset":"p1JrMHdoSSZbERcGZiKkkftZ","nid":53741,"title":"DOVO ontmijnt","collection_id":"C2YJVZHOPE8iYDWUbdcsAU3w","col_title":"WOI (4de lj)"},{"video_asset":"p2Bsc9dlBSPLbaZ9YIiiR7lN","nid":53741,"title":"Wapenstilstand","collection_id":"C2YJVZHOPE8iYDWUbdcsAU3w","col_title":"WOI (4de lj)"},{"video_asset":"e1ZUFfemPXwfkZhsL3cPWxuU","nid":53741,"title":"11 november","collection_id":"C2YJVZHOPE8iYDWUbdcsAU3w","col_title":"WOI (4de lj)"},{"video_asset":"O2fOlHTJZTNTeTYj2Z0P61oc","nid":116301,"title":"1. Marc De Bel drinkt biomelk","collection_id":"Z1RcNFjgMsmWZVWVmF0hzYmr","col_title":"Het werk van auteur Marc De Bel"},{"video_asset":"x1ZIMMNO5JZUXLKFWhorWWV6","nid":116301,"title":"2. De Miss Griezelverkiezing'' van Marc De Bel","collection_id":"Z1RcNFjgMsmWZVWVmF0hzYmr","col_title":"Het werk van auteur Marc De Bel"},{"video_asset":"vyeR8faUqJMbRYfQDpCT25cE","nid":116301,"title":"3. Marc De Bel stelt nieuw boek voor ''Kapitein Cacao''","collection_id":"Z1RcNFjgMsmWZVWVmF0hzYmr","col_title":"Het werk van auteur Marc De Bel"},{"video_asset":"mKSOcnmbjxNcOWXVRJsIO0GZ","nid":116301,"title":"4. Opname van jeugdfilm ''Blinker en de bakfietsbioscoop''","collection_id":"Z1RcNFjgMsmWZVWVmF0hzYmr","col_title":"Het werk van auteur Marc De Bel"},{"video_asset":"c1ASsMRNQbKmWQQNXl9E2J1R","nid":116301,"title":"5. Boeboeks","collection_id":"Z1RcNFjgMsmWZVWVmF0hzYmr","col_title":"Het werk van auteur Marc De Bel"},{"video_asset":"V1INNUlfpVgunOfOnSZh1qx1","nid":532741,"title":"Onze ruimte: planeten om de zon","collection_id":"iXJHIaKVMXZWGKhdmiaFZVJO","col_title":"zon"}]',
          description: "users favourite assets"}]
    /active:
      get:
        description: "check if user is active"
        is: [responses-all: {
          example200: '"data":{"status":"active","last-active":"2000-01-01T00:00:00"}',
          description: "check if user is active"}]
/users:
  /roles:
    get:
      description: "get different roles"
      is: [responses-all: {
        example200: '"data":{"1":"anonymous user","2":"authenticated user","21":"Content beheerder","31":"Docent","41":"Platform beheerder","51":"Student","61":"Testgebruiker onderwijs","71":"Testgebruiker viaa","81":"administrator"}',
        description: "get different roles"}]
  /count:
    get:
      description: "count users/role"
      is: [responses-all: {
        example200: '"data":{"administrator":25,"Testgebruiker viaa":57,"Testgebruiker onderwijs":78,"Student":15178,"Platform beheerder":1,"Docent":17008,"Content beheerder":1}',
        description: "count users/role"}, dates]
    /active:
      get:
        description: "count how many users were active in daterange"
        is: [responses-all: {
          example200: '"data":{"Docent":16787,"Student":8123,"Testgebruiker onderwijs":78,"Testgebruiker viaa":57,"administrator":25}',
          description: "count how many users were active in daterange"}, dates]
    /registered:
      get:
        description: "count how many users registered in daterange"
        is: [responses-all: {
          example200: '"data":{"administrator":25,"Docent":16787,"Student":8123,"Testgebruiker onderwijs":78,"Testgebruiker viaa":57}',
          description: "count how many users registered in daterange"}, dates]
    /conversions:
      get:
        description: "get google analyitcs info of user conversions - TODO"
        is: [responses-all: {
          example200: '"data":{"ratio": "4.619299275787825"}',
          description: "get google analyitcs info of user conversions"},dates]
  /export:
    get:
      description: "Export the users registered in AvO"
      queryParameters:
        format:
          description: "The format of the response"
          required: true
          enum: [CSV, JSON]
        slack:
          description: "The slack user to send a notification to"
          required: false
          example: "@johndoe"
        email:
          description: "The email address to send a notification to"
          required: false
          example: "john.doe@example.com"
      is: [responses-all: {
          example200: '"data":{"outcome":"started","format":"JSON","slack":"@johndoe","email":"john.doe@example.com"}',
          description: "get google analyitcs info of user conversions"},dates]
/report:
  /ams:
    get:
      description: "Get all registered assets for a content provider within a specific period from AMS"
      queryParameters:
        cp:
          description: "The content provider"
          pattern: "OR-[A-Za-z0-9]{7}"
          required: false
        gran:
          description: "The granularity"
          enum: [all-time, last-year, last-month, last-week, last-day]
      is: [responses-all: {
        example200: '"data":{"total":[{"x":1483434099,"y":1595}],"audio":[{"x":1483434099,"y":1595}],"video":[{"x":1483434099,"y":0}],"paper":[{"x":1483434099,"y":0}],"film":[{"x":1483434099,"y":0}]}',
        description: "Get all registered assets for a content provider within a specific period from AMS"}]
  /mam:
    get:
      description: "Get all registered assets for a content provider within a specific period from MAM"
      queryParameters:
        cp:
          description: "The content provider"
          pattern: "OR-[A-Za-z0-9]{7}"
          required: false
        gran:
          description: "The granularity"
          enum: [all-time, last-year, last-month, last-week, last-day]
      is: [responses-all: {
        example200: '"data":{"items":[{"x":1482105600,"y":0},{"x":1482192000,"y":0},{"x":1482278400,"y":0},{"x":1482364800,"y":598},{"x":1482451200,"y":376},{"x":1482537600,"y":621},{"x":1482624000,"y":429},{"x":1482710400,"y":4},{"x":1482796800,"y":0},{"x":1482883200,"y":85},{"x":1482969600,"y":1065},{"x":1483056000,"y":0},{"x":1483142400,"y":0},{"x":1483228800,"y":0},{"x":1483315200,"y":0},{"x":1483401600,"y":1936},{"x":1483488000,"y":1872},{"x":1483574400,"y":336},{"x":1483660800,"y":2156},{"x":1483747200,"y":516},{"x":1483833600,"y":211},{"x":1483920000,"y":1083},{"x":1484006400,"y":2},{"x":1484092800,"y":493},{"x":1484179200,"y":638},{"x":1484265600,"y":363},{"x":1484352000,"y":0},{"x":1484438400,"y":0},{"x":1484524800,"y":1373},{"x":1484611200,"y":76},{"x":1484697600,"y":135},{"x":1484784000,"y":0}],"bytes":[{"x":1482105600,"y":0},{"x":1482192000,"y":0},{"x":1482278400,"y":0},{"x":1482364800,"y":3910316633930},{"x":1482451200,"y":3500747082754},{"x":1482537600,"y":12239982232444},{"x":1482624000,"y":4679568560180},{"x":1482710400,"y":168120087088},{"x":1482796800,"y":0},{"x":1482883200,"y":4012243578646},{"x":1482969600,"y":4632079868858},{"x":1483056000,"y":0},{"x":1483142400,"y":0},{"x":1483228800,"y":0},{"x":1483315200,"y":0},{"x":1483401600,"y":22471125177616},{"x":1483488000,"y":22343940060464},{"x":1483574400,"y":2811797976022},{"x":1483660800,"y":9286361278400},{"x":1483747200,"y":2977156454538},{"x":1483833600,"y":821179244118},{"x":1483920000,"y":3254768709334},{"x":1484006400,"y":10586229296},{"x":1484092800,"y":4824845190694},{"x":1484179200,"y":4480964202138},{"x":1484265600,"y":2107351322887},{"x":1484352000,"y":0},{"x":1484438400,"y":0},{"x":1484524800,"y":4668914695388},{"x":1484611200,"y":168832846472},{"x":1484697600,"y":1388874523358},{"x":1484784000,"y":0}]}',
        description: "Get all registered assets for a content provider within a specific period from MAM"}]
  /global:
    get:
      description: "Create a global report for a content provider"
      queryParameters:
        cp:
          description: "The content provider"
          pattern: "OR-[A-Za-z0-9]{7}"
          required: false
      is: [responses-all: {
        example200: '"data":
          {
            "registered": {
                "video": 17934,
                "audio": 51003,
                "film": 0,
                "paper": 0,
                "total": 68937
            },
            "archived": {
                "video": {
                    "amount": {
                        "ok": 221914,
                        "nok": 500
                    },
                    "bytes": {
                        "ok": 1723706304848077,
                        "nok": 14381461746970
                    }
                },
                "audio": {
                    "amount": {
                        "ok": 17392,
                        "nok": 19
                    },
                    "bytes": {
                        "ok": 4560979880346,
                        "nok": 3086470424
                    }
                },
                "unknown": {
                    "amount": {
                        "ok": 0,
                        "nok": 5
                    },
                    "bytes": {
                        "ok": 0,
                        "nok": 0
                    }
                },
                "document": {
                    "amount": {
                        "ok": 0,
                        "nok": 2
                    },
                    "bytes": {
                        "ok": 0,
                        "nok": 0
                    }
                },
                "total": {
                    "amount": {
                        "ok": 239306,
                        "nok": 526
                    },
                    "bytes": {
                        "ok": 1728267284728423,
                        "nok": 14384548217394
                    }
                }
            },
            "digitised": {
                "video": {
                    "ok": 13595,
                    "nok": 38
                },
                "audio": {
                    "ok": 44549,
                    "nok": 6
                },
                "film": {
                    "ok": 0,
                    "nok": 0
                },
                "paper": {
                    "ok": 58144,
                    "nok": 44
                },
                "total": {
                    "ok": 116288,
                    "nok": 88
                }
            }
        }',
        description: "Create a global report for a content provider"}]
/vrt:
  /delay:
    get:
      description: "Gets the current delay on the VRT ingest"
      is: [responses-all: {
        example200: '"data":
          {
            "gemiddelde_starttijd": "2017-01-11T10:14:52",
            "gemiddelde_duur": {
              "hours": 8,
              "months": 0,
              "minutes": 45,
              "type": "interval",
              "years": 0,
              "seconds": 59.564462,
              "days": 7,
              "value": "0 years 0 mons 7 days 8 hours 45 mins 59.564462 secs"
            }
          }',
        description: "Gets the current delay on the VRT ingest"}]
  /{id}:
    uriParameters:
      id:
        description: "The pid or media_id of the asset"
        required: true
        pattern: "[A-Za-z0-9]+"
        example: "x34mk6vd1v"
    get:
      description: "Get the ingest status based on the pid or media id"
      is: [responses-all: {
        example200: '"data":
        {
          "pid": "x34mk6vd1v",
          "media_id": "23rmpl201701161200",
          "status": "awaitingMetadataUpdate7d"
        }',
        description: "Get the ingest status based on the pid or media id"}]
/ingest:
  displayName: Ingest reporting
  description: Retrieve information about ingest
  get:
    queryParameters:
      cp_id:
        type: string
        required: true
        minLength: 4
        pattern: OR-.*
        displayName: CP ID
        description: The CP ID
      startIndex:
        type: integer
        required: false
        minimum: 0
        default: 0
        displayName: Start Index
        description: Index to start at
      nrOfResults:
        type: integer
        required: false
        default: 25
        minimum: 0
        displayName: Number of results
        description: Number of results to return
      local_id:
        type: string
        required: false
        displayName: Local ID
        description: The local_id of the sip
      md5:
        type: string
        required: false
        minLength: 32
        maxLength: 32
        pattern: "[a-z0-9]{32}"
        displayName: MD5
        description: The MD5 of the sip
      organisation:
        type: string
        required: false
        displayName: Organisation
        description: The organisation name this sip belongs to
      filename:
        type: string
        required: false
        displayName: Filename
        description: The filename of the sip
      archive_status:
        type: string
        required: false
        displayName: Archive status
        description: The archive status of the sip
        enum: ['in_progress', 'OK']
      pid:
        type: string
        required: false
        displayName: PID
        description: The PID of the sip
      comment:
        type: string
        required: false
        displayName: Comment
        description: The comment of the sip
      preingest_status:
        type: string
        required: false
        displayName: Pre-ingest status
        description: The pre-ingest status of the sip
      from:
        type: string
        required: false
        default: "-infinity"
        example: "2017-04-06T11:30:38"
        displayName: From
        description: Query from last_event_date
      until:
        type: string
        required: false
        default: "infinity"
        example: "2017-04-06T23:30:38"
        displayName: Until
        description: Query until last_event_date
    is: [responses-all: {
        example200: '"data": [
          {
          "last_event_date": "2017-04-20T16:56:27",
          "local_id": "1002249",
          "comment": "Met succes verstuurd naar ingestfolder MAM",
          "filename": "20121002_VE_BIN_PM_dl2.mov",
          "pid": "qs058c9rf3z",
          "md5": "a5756b2e7dcd6c1584ad1d729686b471",
          "archive_status": "in_progress",
          "organisation": "vlaamsparlement",
          "preingest_status": "OK"
        },
        {
          "last_event_date": "2017-04-20T15:13:06",
          "local_id": "680985",
          "comment": "Met succes verstuurd naar ingestfolder MAM",
          "filename": "20120927_VE_PM_OPE.mov",
          "pid": "qs06k06xc6f",
          "md5": "27751d32c29cffe0987ac42a30db7e36",
          "archive_status": "in_progress",
          "organisation": "vlaamsparlement",
          "preingest_status": "OK"
        }
          ]',
        description: "Get all export jobs"}]
  /{id}:
    displayName: Single SIP
    description: Get events from one sip
    uriParameters:
      id:
        required: true
        type: string
        example: "002cfcb6-3ca5-4093-bde4-179da239d8c5"
        displayName: ID
        description: The ID of the record to get
    get:
      queryParameters:
        cp_id:
          type: string
          minLength: 4
          pattern: OR-.*
          required: true
      is: [responses-all: {
        example200: '"data": [
          {
              "type": "AV",
              "notification_sent": true,
              "job_completed_date": "2017-03-02T14:51:45",
              "file_count": 2,
              "metadata": "",
              "tenant": "pz51g0km6m_2017321488462567398",
              "metadata_format": "MEM",
              "complete": true,
              "export_id": "pz51g0km6m_2017321488462567398",
              "pid": "pz51g0km6m",
              "id": 170970
          },
          {
              "type": "AV",
              "notification_sent": true,
              "job_completed_date": "2017-03-02T13:57:44",
              "file_count": 2,
              "metadata": "",
              "tenant": "pz51g0km6m_2017321488457134555",
              "metadata_format": "MEM",
              "complete": true,
              "export_id": "pz51g0km6m_2017321488457134555",
              "pid": "pz51g0km6m",
              "id": 170963
          }
          ]',
        description: "Get all export jobs"}]

/export:
  displayName: All things export jobs
  description: Everything that has to do with exports
  get:
    queryParameters:
      nrOfResults:
        example: 25
        default: 25
      startIndex:
        example: 0
        default: 0
    description: Gets all export jobs
    is: [responses-all: {
        example200: '"data": [
          {
            "local_id": "002cfcb6-3ca5-4093-bde4-179da239d8c5",
            "retry_count": 0,
            "message": null,
            "filename": "original",
            "comment": null,
            "md5": "39f0f02fc506d6ef470547b512099934",
            "filepath": "/export/home/provant/incoming/Processing/002cfcb6-3ca5-4093-bde4-179da239d8c5/002cfcb6-3ca5-4093-bde4-179da239d8c5/data",
            "fragment_id": null,
            "pid": "qs02w37kx3g",
            "id": 25,
            "archive_status": null,
            "last_event_date": "2017-03-24T13:50:20",
            "is_deleted": false,
            "host": "dg-qas-ftp-01.dg.viaa.be",
            "reported": false,
            "organisation": "provant",
            "preingest_status": null
          },
          {
            "local_id": "19fd3a67-c8e6-492c-aacd-53b546e1988e",
            "retry_count": 0,
            "message": null,
            "filename": "original",
            "comment": null,
            "md5": "68980fe753232673181a20b4fedc790d",
            "filepath": "/export/home/provant/incoming/Processing/19fd3a67-c8e6-492c-aacd-53b546e1988e/19fd3a67-c8e6-492c-aacd-53b546e1988e/data",
            "fragment_id": null,
            "pid": "qs01kh0f02r",
            "id": 27,
            "archive_status": null,
            "last_event_date": "2017-03-24T13:53:38",
            "is_deleted": false,
            "host": "dg-qas-ftp-01.dg.viaa.be",
            "reported": false,
            "organisation": "provant",
            "preingest_status": null
          }
          ]',
        description: "Get all export jobs"}]
  /{id}:
    uriParameters:
      id:
        displayName: ID
        description: The ID of the export job
        example: 'pz51g0km6m_2017321488462567398'
    displayName: Job
    get:
      description: Gets information on a specific export job

#%RAML 0.8
title: api-gateway
version: 2.0

traits:
  - responses-all: !include traits/responses.raml
  - dates: !include traits/daterange.raml

/asset:
  /{pid}:
    uriParameters:
        pid:
          description: "The pid of the asset"
          pattern: "[A-Za-z0-9]{10}"
          example: 6m33208w27
          required: true
    get:
      description: "Get asset's info based on pid"
      is: [responses-all: {
        example200: '"data":{"asset_id":"e1NCVSPPlZ6X9b5ocK5U9b7G","app_id":"2","provider_id":"","owner_id":"bart.debunne@viaa.be","group_id":"","videotimestamp":"2014-05-23 16:01:21","videotimestampmodified":"2016-10-28 13:02:20","play_restriction_start":"","play_restriction_end":"","reference_id":"","isprivate":"FALSE","mediafile_duration":"00:02:10.86","mediafile_container_type":"mov;mp4;m4a;3gp;3g2;mj2","mediafile_filename":"1210071009352242421.m4v","is_unappropriate":"FALSE","is_external":"FALSE","is_empty_asset":"FALSE","viewed":"206","played":"2442","is_protected":"FALSE","mediafile_mime_type":"video/mp4","asset_type":"video","is_unappropiate":"FALSE","app_3":{"total_comments":"","total_favourites":"","viaa_org":"OR-rf5kf25","viaa_pid":"6m33208w27"},"asset":{"aggregate":"","aggregate_type":"","component":"","component_order":"","draft_asset_id":"","lock_date":"","lock_owner":"","original_asset_id":"","published":"TRUE","trashcan":"FALSE","trashcan_date":"","trashcan_user":""},"czp":{"aggregatieniveau":"","auteursrechten":"","beoogde_eindgebruiker":"Student","beoogde_leeftijdsgroep":"Lager 3de graad","beschrijving":"Fragment van Karrewiet waarin kinderen een bezoek brengen aan soldatenkerkhoven in de Westhoek. Hierin wordt op een begrijpbaar niveau uitleg gegeven over de Eerste Wereldoorlog. De leerlingen staan stil bij de gruwel van de de oorlog. ","classificatie":"mens en maatschappij","context":"Lager onderwijs","identificatiecode":"","kosten":"","omschrijving_rechten":"","schemanaam":"","sleutelwoord":"","soort_leermateriaal":"Video","status":"","taal":"nl","titel":"","versie":""},"dublin_core":{"contributor":"","coverage_spatial":"","coverage_temporal":"","creator":"VRT","date":"","description":"In dit fragment wordt de Eerste Wereldoorlog herdacht. Op het soldatenkerkhof in Veltem brengen de leerlingen van Mater Dei in Erps Kwerps een bezoek. Er volgt een  interview met de leerlingen.\r\n","format":"Video","identifier":"1210071009352242421","language":"nl","publisher":"VRT","relation":"AIM00262447","rights":"Rechten voorbehouden","source":"","subject":"Veltem","title":"Karrewiet: soldatenkerkhof WO I","type":"Nieuws"},"qualified_dublin_core":{"created":"","description_abstract":"","format_extent":"","format_medium":"","hasformat":"","isformatof":"","isreferencedby":"","issued":"2005-11-11 00:00:00","license":"","rightsholder":"","title_alternative":"Karrewiet"},"is_favorite":"FALSE","granted":"TRUE","has_streamable_mediafiles":"TRUE","ega_still_url":"","vpx_still_url":"https://salsa1.viaa.be/media/3/T/TcNi9QIPPBtKgjUUkkj8M6t1/TcNi9QIPPBtKgjUUkkj8M6t1.jpg"}',
        description: "Get asset's info based on pid"}]
    /{type}:
      uriParameters:
        type:
          description: "The type of information to retrieve"
          example: "plays"
          enum: [favorites, plays, views, still, media]
      get:
        description: Get assets {info} based on pid
        is: [responses-all: {
          example200: '"data":{"plays":"0"}',
          description: "Get assets {info} based on pid"}]
  /mm/{id}:
    uriParameters:
      id:
        description: "The mediamosa id of the asset"
        required: true
        example: e1NCVSPPlZ6X9b5ocK5U9b7G
        minLength: 1
    get:
      description: "Get asset's info based on asset_id"
      is: [responses-all: {
        example200: '"data":{"asset_id":"z1gdeWNEVWqhSbcjMSyMrFab","app_id":"2","provider_id":"","owner_id":"bart.debunne@viaa.be","group_id":"","videotimestamp":"2017-01-15 23:48:07","videotimestampmodified":"2017-01-15 23:59:32","play_restriction_start":"","play_restriction_end":"","reference_id":"","isprivate":"FALSE","mediafile_duration":"","mediafile_container_type":"","mediafile_filename":"","is_unappropriate":"FALSE","is_external":"TRUE","is_empty_asset":"FALSE","viewed":"0","played":"0","is_protected":"FALSE","mediafile_mime_type":"","asset_type":"video","is_unappropiate":"FALSE","app_3":{"total_comments":"","total_favourites":"","viaa_org":"OR-rf5kf25","viaa_pid":"862b85r567"},"asset":{"aggregate":"","aggregate_type":"","component":"","component_order":"","draft_asset_id":"","lock_date":"","lock_owner":"","original_asset_id":"","published":"TRUE","trashcan":"FALSE","trashcan_date":"","trashcan_user":""},"czp":{"aggregatieniveau":"1","auteursrechten":"","beoogde_eindgebruiker":"Student","beoogde_leeftijdsgroep":"Secundair 3de graad","beschrijving":"","classificatie":"politieke en sociale wetenschappen - maatschappijleer","context":"Secundair onderwijs","identificatiecode":"","kosten":"","omschrijving_rechten":"","schemanaam":"","sleutelwoord":"","soort_leermateriaal":"","status":"","taal":"","titel":"","versie":""},"dublin_core":{"contributor":"","coverage_spatial":"","coverage_temporal":"","creator":"","date":"","description":"Tweede deel van de reportage van Stefaan Meerbergen in Noord-Korea.\n\nBeelden van Pyongyang: op zijn hotelkamer kijkt Meerbergen naar de staatsomroep met propaganda voor de leiders.\n\nBeelden van de geliefde Kim Il-sung, Noord-Koreanen dansen bij een vlag en lijken gelukkig. Meerbergen loopt rond in zijn hotel en vertelt dat er in geen enkel hotel een vijfde verdieping is. Hij vertelt over de samenzweringstheorieën die er rond de vijfde verdieping bestaan.\n\nAfspraak met gids Ri Chung Il in een boekenwinkel. Hij toont de boeken die zogezegd geschreven zijn door de leiders, over het beleid van Noord-Korea. De gids leest voor uit een boek en licht de inhoud toe. Het gaat over Juche, de Noord-Koreaanse politieke filosofie. Hij vindt Kim Il-sung en Kim Jong-il de beste regeringsleiders in de wereld. Archiefbeelden van Kim Jong-il.\n\nUitleg met foto over Kim Il-sung, Kim Jong-il en Kim Jong-un.\n\nBeelden van een weverij in Noord-Korea.\n\nMeerbergen in zijn hotelkamer: hij vertelt over zijn gids en vraagt zich af of het gemeend is wat hij zegt. Meerbergen vertelt dat hij wil opklimmen in de partij. Hij vertelt over het in stand houden van de devotie van de inwoners en over het mythologiseren van de regeringsleiders. Hij vertelt over de moeilijke relatie met de klankman en vermoedt dat hij een spion is.\n\nBedrijfsbezoek: een tolk praat voornamelijk over Grote Leider Kim Il-sung. Meerbergen toont de ruimte waar de grote leiders worden verheerlijkt.\nBezoek aan de paardrijdclub. Een gids vertelt dat Kim Jong-un persoonlijk heeft meegeholpen met de bouw van de club.\n\nLuchtfoto met aanduiding van enkele mogelijke strafkampen. Meerbergen vertelt over de schending van de mensenrechten in Noord-Korea.\n\nBeelden van een restaurant op een boot. Fotosessie met een Noord-Koreaans kind en een gezellige avond.","format":"","identifier":"862b85r567","language":"nl","publisher":"VRT","relation":"ms3jw8sf5j","rights":"","source":"","subject":"propaganda","title":"Terzake: Noord-Korea","type":""},"qualified_dublin_core":{"created":"","description_abstract":"","format_extent":"","format_medium":"","hasformat":"","isformatof":"","isreferencedby":"65cdc5ff-c143-47a6-ac14-bcceb85ff67a","issued":"2014-11-18 00:00:00","license":"","rightsholder":"","title_alternative":"Terzake"},"is_favorite":"FALSE","granted":"TRUE","has_streamable_mediafiles":"TRUE","ega_still_url":"","vpx_still_url":"http://archief-media.viaa.be/viaa/TESTBEELD/445f64899bcc47e88e4e35592ce701fafb61ce18d8fe45b2a9490846027eb943/keyframes/keyframes_1_1/keyframe1.jpg"}',
        description: "Get asset's info based on asset_id"}]
    /{type}:
      uriParameters:
        type:
          description: "The type of information to retrieve"
          example: "plays"
          enum: [favorites, plays, views, still, media]
      get:
        description: "Get asset's favorites based on asset_id"
        is: [responses-all: {
          example200: '"data":{"plays":"0"}',
          description: "Get asset's favorites based on asset_id"}]
/assets:
  /count:
    get:
      description: "Count all assets grouped by type"
      is: [responses-all: {
        example200: '"data":{"collectie":"845","thema":"181","video":"8556","audio":"719"}',
        description: "Count all assets grouped by type"}, dates]
    /{type}:
      uriParameters:
          type:
            description: "The type of asset"
            enum: [video, audio, collectie, thema]
      get:
        description: "Count all assets of type: video/adio/collectie/thema"
        is: [responses-all: {
          example200: '"data":{"video":"8556"}',
          description: "Count all assets of type: video/adio/collectie/thema"}, dates]
  /mostrecent:
    get:
      description: "Gets the most recent asset independent of type"
      is: [responses-all: {
        example200: '"data":{"asset_id":"I2mTZfCXeECZRNYqaFMnNjZd","app_id":"3","provider_id":"","owner_id":"is_app_admin","group_id":"","videotimestamp":"2017-01-17 14:02:21","videotimestampmodified":"2017-01-17 14:02:21","play_restriction_start":"","play_restriction_end":"","reference_id":"","isprivate":"FALSE","mediafile_duration":"","mediafile_container_type":"","mediafile_filename":"","is_unappropriate":"FALSE","is_external":"FALSE","is_empty_asset":"FALSE","viewed":"0","played":"0","is_protected":"FALSE","mediafile_mime_type":"","asset_type":"collectie","is_unappropiate":"FALSE","app_3":{"total_comments":"","total_favourites":"","viaa_org":"","viaa_pid":""},"asset":{"aggregate":"","aggregate_type":"","component":"","component_order":"","draft_asset_id":"","lock_date":"","lock_owner":"","original_asset_id":"","published":"TRUE","trashcan":"FALSE","trashcan_date":"","trashcan_user":""},"czp":{"aggregatieniveau":"","auteursrechten":"","beoogde_eindgebruiker":"","beoogde_leeftijdsgroep":"","beschrijving":"","classificatie":"","context":"","identificatiecode":"","kosten":"","omschrijving_rechten":"","schemanaam":"","sleutelwoord":"","soort_leermateriaal":"","status":"","taal":"","titel":"","versie":""},"dublin_core":{"contributor":"","coverage_spatial":"","coverage_temporal":"","creator":"","date":"","description":"","format":"","identifier":"","language":"","publisher":"VRT","relation":"","rights":"","source":"","subject":"zoekgeschiedenis","title":"gevaren internet","type":"Praatprogramma"},"qualified_dublin_core":{"created":"","description_abstract":"","format_extent":"","format_medium":"","hasformat":"","isformatof":"","isreferencedby":"","issued":"","license":"","rightsholder":"","title_alternative":""},"is_favorite":"FALSE","granted":"TRUE","has_streamable_mediafiles":"FALSE","ega_still_url":"","vpx_still_url":""}',
        description: "Gets the most recent asset independent of type"}]
    /{type}:
      uriParameters:
        type:
          description: "The type of asset"
          enum: [video, audio, collectie, thema]
      get:
        description: "find most recent of type: video/adio/collectie/thema"
        is: [responses-all: {
          example200: '"data":{"collectie":{"asset_id":"I2mTZfCXeECZRNYqaFMnNjZd","app_id":"3","provider_id":"","owner_id":"is_app_admin","group_id":"","videotimestamp":"2017-01-17 14:02:21","videotimestampmodified":"2017-01-17 14:02:21","play_restriction_start":"","play_restriction_end":"","reference_id":"","isprivate":"FALSE","mediafile_duration":"","mediafile_container_type":"","mediafile_filename":"","is_unappropriate":"FALSE","is_external":"FALSE","is_empty_asset":"FALSE","viewed":"0","played":"0","is_protected":"FALSE","mediafile_mime_type":"","asset_type":"collectie","is_unappropiate":"FALSE","app_3":{"total_comments":"","total_favourites":"","viaa_org":"","viaa_pid":""},"asset":{"aggregate":"","aggregate_type":"","component":"","component_order":"","draft_asset_id":"","lock_date":"","lock_owner":"","original_asset_id":"","published":"TRUE","trashcan":"FALSE","trashcan_date":"","trashcan_user":""},"czp":{"aggregatieniveau":"","auteursrechten":"","beoogde_eindgebruiker":"","beoogde_leeftijdsgroep":"","beschrijving":"","classificatie":"","context":"","identificatiecode":"","kosten":"","omschrijving_rechten":"","schemanaam":"","sleutelwoord":"","soort_leermateriaal":"","status":"","taal":"","titel":"","versie":""},"dublin_core":{"contributor":"","coverage_spatial":"","coverage_temporal":"","creator":"","date":"","description":"","format":"","identifier":"","language":"","publisher":"VRT","relation":"","rights":"","source":"","subject":"zoekgeschiedenis","title":"gevaren internet","type":"Praatprogramma"},"qualified_dublin_core":{"created":"","description_abstract":"","format_extent":"","format_medium":"","hasformat":"","isformatof":"","isreferencedby":"","issued":"","license":"","rightsholder":"","title_alternative":""},"is_favorite":"FALSE","granted":"TRUE","has_streamable_mediafiles":"FALSE","ega_still_url":"","vpx_still_url":""}}',
          description: "find most recent of type: video/adio/collectie/thema"}]
  /mostviewed:
    get:
      description: "Find most viewed asset - ON HOLD. WILL RETURN NOTHING"
      is: [responses-all: {
        example200: '"data":{}',
        description: "Find most viewed asset"}]
    /{type}:
      uriParameters:
        type:
          description: "The type of asset"
          enum: [video, audio, collectie, thema]
      get:
        description: "find most viewed of type: video/adio/collectie/thema - ON HOLD. WILL RETURN NOTHING"
        is: [responses-all: {
          example200: '"data":{}',
          description: "find most viewed of type: video/adio/collectie/thema"}]
  /mostfavorites:
    get:
      description: "Find most favorited asset"
      is: [responses-all: {
        example200: '"data":{"asset_id":"I2mTZfCXeECZRNYqaFMnNjZd","app_id":"3","provider_id":"","owner_id":"is_app_admin","group_id":"","videotimestamp":"2017-01-17 14:02:21","videotimestampmodified":"2017-01-17 14:02:21","play_restriction_start":"","play_restriction_end":"","reference_id":"","isprivate":"FALSE","mediafile_duration":"","mediafile_container_type":"","mediafile_filename":"","is_unappropriate":"FALSE","is_external":"FALSE","is_empty_asset":"FALSE","viewed":"0","played":"0","is_protected":"FALSE","mediafile_mime_type":"","asset_type":"collectie","is_unappropiate":"FALSE","app_3":{"total_comments":"","total_favourites":"","viaa_org":"","viaa_pid":""},"asset":{"aggregate":"","aggregate_type":"","component":"","component_order":"","draft_asset_id":"","lock_date":"","lock_owner":"","original_asset_id":"","published":"TRUE","trashcan":"FALSE","trashcan_date":"","trashcan_user":""},"czp":{"aggregatieniveau":"","auteursrechten":"","beoogde_eindgebruiker":"","beoogde_leeftijdsgroep":"","beschrijving":"","classificatie":"","context":"","identificatiecode":"","kosten":"","omschrijving_rechten":"","schemanaam":"","sleutelwoord":"","soort_leermateriaal":"","status":"","taal":"","titel":"","versie":""},"dublin_core":{"contributor":"","coverage_spatial":"","coverage_temporal":"","creator":"","date":"","description":"","format":"","identifier":"","language":"","publisher":"VRT","relation":"","rights":"","source":"","subject":"zoekgeschiedenis","title":"gevaren internet","type":"Praatprogramma"},"qualified_dublin_core":{"created":"","description_abstract":"","format_extent":"","format_medium":"","hasformat":"","isformatof":"","isreferencedby":"","issued":"","license":"","rightsholder":"","title_alternative":""},"is_favorite":"FALSE","granted":"TRUE","has_streamable_mediafiles":"FALSE","ega_still_url":"","vpx_still_url":""}',
        description: "Find most favorited asset"}]
    /{type}:
      uriParameters:
        type:
          description: "The type of asset"
          enum: [video, audio, collectie, thema]
      get:
        description: "find most favorited of type: video/adio/collectie/thema"
        is: [responses-all: {
          example200: '"data":{"audio":{"asset_id":"O1WgWX6mfevPZdfOdWn3oTHR","app_id":"2","provider_id":"","owner_id":"bart.debunne@viaa.be","group_id":"bart.debunne@viaa.be","videotimestamp":"2016-10-20 21:34:41","videotimestampmodified":"2016-10-28 12:50:26","play_restriction_start":"","play_restriction_end":"","reference_id":"","isprivate":"FALSE","mediafile_duration":"00:11:53.52","mediafile_container_type":"mov;mp4;m4a;3gp;3g2;mj2","mediafile_filename":"1210160928655888321.m4a","is_unappropriate":"FALSE","is_external":"FALSE","is_empty_asset":"FALSE","viewed":"68","played":"1","is_protected":"FALSE","mediafile_mime_type":"audio/mp4","asset_type":"audio","is_unappropiate":"FALSE","app_3":{"total_comments":"","total_favourites":"","viaa_org":"OR-rf5kf25","viaa_pid":"td9n30653g"},"asset":{"aggregate":"","aggregate_type":"","component":"","component_order":"","draft_asset_id":"","lock_date":"","lock_owner":"","original_asset_id":"","published":"TRUE","trashcan":"FALSE","trashcan_date":"","trashcan_user":""},"czp":{"aggregatieniveau":"","auteursrechten":"","beoogde_eindgebruiker":"Student","beoogde_leeftijdsgroep":"Secundair 3de graad","beschrijving":"In dit fragment van De kunstberg wordt het boek van Ad Ten Bosch over Ida Gerhardt besproken.","classificatie":"PAV - MAVO - GASV - ASPV","context":"Secundair onderwijs","identificatiecode":"","kosten":"","omschrijving_rechten":"","schemanaam":"","sleutelwoord":"","soort_leermateriaal":"Audio","status":"","taal":"nl","titel":"","versie":""},"dublin_core":{"contributor":"Xavier Vandamme","coverage_spatial":"","coverage_temporal":"","creator":"VRT","date":"2016-09-28","description":"In dit fragment van De kunstberg wordt het boek van Ad Ten Bosch over Ida Gerhardt besproken.\r\n\r\nIn de poëziekroniek wordt aandacht besteed aan het boek van Ad Ten Bosch, ‘Gebroken lied - Een vriendschap met Ida Gerhardt’. Een gesprek met poëziekenner Mark Van den Hoof over dit werk.  ","format":"Audio","identifier":"1210160928655888321","language":"nl","publisher":"VRT","relation":"AIM01206668","rights":"Rechten voorbehouden","source":"1210130603147265121","subject":"poëzie","title":"De kunstberg: de biografie van Ida Gerhardt","type":"Duiding"},"qualified_dublin_core":{"created":"1999-09-07 00:00:00","description_abstract":"","format_extent":"","format_medium":"","hasformat":"","isformatof":"","isreferencedby":"","issued":"1999-09-07 00:00:00","license":"","rightsholder":"","title_alternative":"De kunstberg"},"is_favorite":"FALSE","granted":"TRUE","has_streamable_mediafiles":"TRUE","ega_still_url":"","vpx_still_url":"https://salsa1.viaa.be/media/3/y/y2ZLFVrZZhVYZgYofQDcaIg2/y2ZLFVrZZhVYZgYofQDcaIg2.jpg"}}',
          description: "find most favorited of type: video/adio/collectie/thema"}]
/user:
  /{uid}:
    uriParameters:
      uid:
        description: "The ID of the user"
        required: true
        pattern: "[0-9]+"
    get:
        description: "Get user information based on uid"
        is: [responses-all: {
          example200: '"data":{"active":1,"created":"2000-01-01T00:00:00","access":"2000-01-01T00:00:00","uid":123456789,"naam":"John Doe","rol":"god","vestigingsnummer":"0123456789","pid":123456789,"e-mail":"john.doe@example.com","lerarenkaart":null,"graad":"Hoogste","school":"Harvard"}',
          description: "Get user information based on uid"}]
    /collections:
      get:
        description: "users collection numbers"
        is: [responses-all: {
          example200: '"data":[{"video_asset":"e1NCVSPPlZ6X9b5ocK5U9b7G","nid":53741,"title":"Soldatenhuwelijk in de loopgraven","collection_id":"C2YJVZHOPE8iYDWUbdcsAU3w","col_title":"WOI (4de lj)"},{"video_asset":"I2MSaSijUgIjFXIThZ8gB1xU","nid":53741,"title":"Dodengang","collection_id":"C2YJVZHOPE8iYDWUbdcsAU3w","col_title":"WOI (4de lj)"},{"video_asset":"p1JrMHdoSSZbERcGZiKkkftZ","nid":53741,"title":"DOVO ontmijnt","collection_id":"C2YJVZHOPE8iYDWUbdcsAU3w","col_title":"WOI (4de lj)"},{"video_asset":"p2Bsc9dlBSPLbaZ9YIiiR7lN","nid":53741,"title":"Wapenstilstand","collection_id":"C2YJVZHOPE8iYDWUbdcsAU3w","col_title":"WOI (4de lj)"},{"video_asset":"e1ZUFfemPXwfkZhsL3cPWxuU","nid":53741,"title":"11 november","collection_id":"C2YJVZHOPE8iYDWUbdcsAU3w","col_title":"WOI (4de lj)"},{"video_asset":"O2fOlHTJZTNTeTYj2Z0P61oc","nid":116301,"title":"1. Marc De Bel drinkt biomelk","collection_id":"Z1RcNFjgMsmWZVWVmF0hzYmr","col_title":"Het werk van auteur Marc De Bel"},{"video_asset":"x1ZIMMNO5JZUXLKFWhorWWV6","nid":116301,"title":"2. De Miss Griezelverkiezing'' van Marc De Bel","collection_id":"Z1RcNFjgMsmWZVWVmF0hzYmr","col_title":"Het werk van auteur Marc De Bel"},{"video_asset":"vyeR8faUqJMbRYfQDpCT25cE","nid":116301,"title":"3. Marc De Bel stelt nieuw boek voor ''Kapitein Cacao''","collection_id":"Z1RcNFjgMsmWZVWVmF0hzYmr","col_title":"Het werk van auteur Marc De Bel"},{"video_asset":"mKSOcnmbjxNcOWXVRJsIO0GZ","nid":116301,"title":"4. Opname van jeugdfilm ''Blinker en de bakfietsbioscoop''","collection_id":"Z1RcNFjgMsmWZVWVmF0hzYmr","col_title":"Het werk van auteur Marc De Bel"},{"video_asset":"c1ASsMRNQbKmWQQNXl9E2J1R","nid":116301,"title":"5. Boeboeks","collection_id":"Z1RcNFjgMsmWZVWVmF0hzYmr","col_title":"Het werk van auteur Marc De Bel"},{"video_asset":"V1INNUlfpVgunOfOnSZh1qx1","nid":532741,"title":"Onze ruimte: planeten om de zon","collection_id":"iXJHIaKVMXZWGKhdmiaFZVJO","col_title":"zon"}]',
          description: "users collection numbers"}]
    /favorites:
      get:
        description: "users favourite assets"
        is: [responses-all: {
          example200: '"data":[{"video_asset":"e1NCVSPPlZ6X9b5ocK5U9b7G","nid":53741,"title":"Soldatenhuwelijk in de loopgraven","collection_id":"C2YJVZHOPE8iYDWUbdcsAU3w","col_title":"WOI (4de lj)"},{"video_asset":"I2MSaSijUgIjFXIThZ8gB1xU","nid":53741,"title":"Dodengang","collection_id":"C2YJVZHOPE8iYDWUbdcsAU3w","col_title":"WOI (4de lj)"},{"video_asset":"p1JrMHdoSSZbERcGZiKkkftZ","nid":53741,"title":"DOVO ontmijnt","collection_id":"C2YJVZHOPE8iYDWUbdcsAU3w","col_title":"WOI (4de lj)"},{"video_asset":"p2Bsc9dlBSPLbaZ9YIiiR7lN","nid":53741,"title":"Wapenstilstand","collection_id":"C2YJVZHOPE8iYDWUbdcsAU3w","col_title":"WOI (4de lj)"},{"video_asset":"e1ZUFfemPXwfkZhsL3cPWxuU","nid":53741,"title":"11 november","collection_id":"C2YJVZHOPE8iYDWUbdcsAU3w","col_title":"WOI (4de lj)"},{"video_asset":"O2fOlHTJZTNTeTYj2Z0P61oc","nid":116301,"title":"1. Marc De Bel drinkt biomelk","collection_id":"Z1RcNFjgMsmWZVWVmF0hzYmr","col_title":"Het werk van auteur Marc De Bel"},{"video_asset":"x1ZIMMNO5JZUXLKFWhorWWV6","nid":116301,"title":"2. De Miss Griezelverkiezing'' van Marc De Bel","collection_id":"Z1RcNFjgMsmWZVWVmF0hzYmr","col_title":"Het werk van auteur Marc De Bel"},{"video_asset":"vyeR8faUqJMbRYfQDpCT25cE","nid":116301,"title":"3. Marc De Bel stelt nieuw boek voor ''Kapitein Cacao''","collection_id":"Z1RcNFjgMsmWZVWVmF0hzYmr","col_title":"Het werk van auteur Marc De Bel"},{"video_asset":"mKSOcnmbjxNcOWXVRJsIO0GZ","nid":116301,"title":"4. Opname van jeugdfilm ''Blinker en de bakfietsbioscoop''","collection_id":"Z1RcNFjgMsmWZVWVmF0hzYmr","col_title":"Het werk van auteur Marc De Bel"},{"video_asset":"c1ASsMRNQbKmWQQNXl9E2J1R","nid":116301,"title":"5. Boeboeks","collection_id":"Z1RcNFjgMsmWZVWVmF0hzYmr","col_title":"Het werk van auteur Marc De Bel"},{"video_asset":"V1INNUlfpVgunOfOnSZh1qx1","nid":532741,"title":"Onze ruimte: planeten om de zon","collection_id":"iXJHIaKVMXZWGKhdmiaFZVJO","col_title":"zon"}]',
          description: "users favourite assets"}]
    /active:
      get:
        description: "check if user is active"
        is: [responses-all: {
          example200: '"data":{"status":"active","last-active":"2000-01-01T00:00:00"}',
          description: "check if user is active"}]
/users:
  /roles:
    get:
      description: "get different roles"
      is: [responses-all: {
        example200: '"data":{"1":"anonymous user","2":"authenticated user","21":"Content beheerder","31":"Docent","41":"Platform beheerder","51":"Student","61":"Testgebruiker onderwijs","71":"Testgebruiker viaa","81":"administrator"}',
        description: "get different roles"}]
  /count:
    get:
      description: "count users/role"
      is: [responses-all: {
        example200: '"data":{"administrator":25,"Testgebruiker viaa":57,"Testgebruiker onderwijs":78,"Student":15178,"Platform beheerder":1,"Docent":17008,"Content beheerder":1}',
        description: "count users/role"}, dates]
    /active:
      get:
        description: "count how many users were active in daterange"
        is: [responses-all: {
          example200: '"data":{"Docent":16787,"Student":8123,"Testgebruiker onderwijs":78,"Testgebruiker viaa":57,"administrator":25}',
          description: "count how many users were active in daterange"}, dates]
    /registered:
      get:
        description: "count how many users registered in daterange"
        is: [responses-all: {
          example200: '"data":{"administrator":25,"Docent":16787,"Student":8123,"Testgebruiker onderwijs":78,"Testgebruiker viaa":57}',
          description: "count how many users registered in daterange"}, dates]
    /conversions:
      get:
        description: "get google analyitcs info of user conversions - TODO"
        is: [responses-all: {
          example200: '"data":{"ratio": "4.619299275787825"}',
          description: "get google analyitcs info of user conversions"},dates]
  /export:
    get:
      description: "Export the users registered in AvO"
      queryParameters:
        format:
          description: "The format of the response"
          required: true
          enum: [CSV, JSON]
        slack:
          description: "The slack user to send a notification to"
          required: false
          example: "@johndoe"
        email:
          description: "The email address to send a notification to"
          required: false
          example: "john.doe@example.com"
      is: [responses-all: {
          example200: '"data":{"outcome":"started","format":"JSON","slack":"@johndoe","email":"john.doe@example.com"}',
          description: "get google analyitcs info of user conversions"},dates]
/report:
  /ams:
    get:
      description: "Get all registered assets for a content provider within a specific period from AMS"
      queryParameters:
        cp:
          description: "The content provider"
          pattern: "OR-[A-Za-z0-9]{7}"
          required: false
        gran:
          description: "The granularity"
          enum: [all-time, last-year, last-month, last-week, last-day]
      is: [responses-all: {
        example200: '"data":{"total":[{"x":1483434099,"y":1595}],"audio":[{"x":1483434099,"y":1595}],"video":[{"x":1483434099,"y":0}],"paper":[{"x":1483434099,"y":0}],"film":[{"x":1483434099,"y":0}]}',
        description: "Get all registered assets for a content provider within a specific period from AMS"}]
  /mam:
    get:
      description: "Get all registered assets for a content provider within a specific period from MAM"
      queryParameters:
        cp:
          description: "The content provider"
          pattern: "OR-[A-Za-z0-9]{7}"
          required: false
        gran:
          description: "The granularity"
          enum: [all-time, last-year, last-month, last-week, last-day]
      is: [responses-all: {
        example200: '"data":{"items":[{"x":1482105600,"y":0},{"x":1482192000,"y":0},{"x":1482278400,"y":0},{"x":1482364800,"y":598},{"x":1482451200,"y":376},{"x":1482537600,"y":621},{"x":1482624000,"y":429},{"x":1482710400,"y":4},{"x":1482796800,"y":0},{"x":1482883200,"y":85},{"x":1482969600,"y":1065},{"x":1483056000,"y":0},{"x":1483142400,"y":0},{"x":1483228800,"y":0},{"x":1483315200,"y":0},{"x":1483401600,"y":1936},{"x":1483488000,"y":1872},{"x":1483574400,"y":336},{"x":1483660800,"y":2156},{"x":1483747200,"y":516},{"x":1483833600,"y":211},{"x":1483920000,"y":1083},{"x":1484006400,"y":2},{"x":1484092800,"y":493},{"x":1484179200,"y":638},{"x":1484265600,"y":363},{"x":1484352000,"y":0},{"x":1484438400,"y":0},{"x":1484524800,"y":1373},{"x":1484611200,"y":76},{"x":1484697600,"y":135},{"x":1484784000,"y":0}],"bytes":[{"x":1482105600,"y":0},{"x":1482192000,"y":0},{"x":1482278400,"y":0},{"x":1482364800,"y":3910316633930},{"x":1482451200,"y":3500747082754},{"x":1482537600,"y":12239982232444},{"x":1482624000,"y":4679568560180},{"x":1482710400,"y":168120087088},{"x":1482796800,"y":0},{"x":1482883200,"y":4012243578646},{"x":1482969600,"y":4632079868858},{"x":1483056000,"y":0},{"x":1483142400,"y":0},{"x":1483228800,"y":0},{"x":1483315200,"y":0},{"x":1483401600,"y":22471125177616},{"x":1483488000,"y":22343940060464},{"x":1483574400,"y":2811797976022},{"x":1483660800,"y":9286361278400},{"x":1483747200,"y":2977156454538},{"x":1483833600,"y":821179244118},{"x":1483920000,"y":3254768709334},{"x":1484006400,"y":10586229296},{"x":1484092800,"y":4824845190694},{"x":1484179200,"y":4480964202138},{"x":1484265600,"y":2107351322887},{"x":1484352000,"y":0},{"x":1484438400,"y":0},{"x":1484524800,"y":4668914695388},{"x":1484611200,"y":168832846472},{"x":1484697600,"y":1388874523358},{"x":1484784000,"y":0}]}',
        description: "Get all registered assets for a content provider within a specific period from MAM"}]
  /global:
    get:
      description: "Create a global report for a content provider"
      queryParameters:
        cp:
          description: "The content provider"
          pattern: "OR-[A-Za-z0-9]{7}"
          required: false
      is: [responses-all: {
        example200: '"data":
          {
            "registered": {
                "video": 17934,
                "audio": 51003,
                "film": 0,
                "paper": 0,
                "total": 68937
            },
            "archived": {
                "video": {
                    "amount": {
                        "ok": 221914,
                        "nok": 500
                    },
                    "bytes": {
                        "ok": 1723706304848077,
                        "nok": 14381461746970
                    }
                },
                "audio": {
                    "amount": {
                        "ok": 17392,
                        "nok": 19
                    },
                    "bytes": {
                        "ok": 4560979880346,
                        "nok": 3086470424
                    }
                },
                "unknown": {
                    "amount": {
                        "ok": 0,
                        "nok": 5
                    },
                    "bytes": {
                        "ok": 0,
                        "nok": 0
                    }
                },
                "document": {
                    "amount": {
                        "ok": 0,
                        "nok": 2
                    },
                    "bytes": {
                        "ok": 0,
                        "nok": 0
                    }
                },
                "total": {
                    "amount": {
                        "ok": 239306,
                        "nok": 526
                    },
                    "bytes": {
                        "ok": 1728267284728423,
                        "nok": 14384548217394
                    }
                }
            },
            "digitised": {
                "video": {
                    "ok": 13595,
                    "nok": 38
                },
                "audio": {
                    "ok": 44549,
                    "nok": 6
                },
                "film": {
                    "ok": 0,
                    "nok": 0
                },
                "paper": {
                    "ok": 58144,
                    "nok": 44
                },
                "total": {
                    "ok": 116288,
                    "nok": 88
                }
            }
        }',
        description: "Create a global report for a content provider"}]
/vrt:
  /delay:
    get:
      description: "Gets the current delay on the VRT ingest"
      is: [responses-all: {
        example200: '"data":
          {
            "gemiddelde_starttijd": "2017-01-11T10:14:52",
            "gemiddelde_duur": {
              "hours": 8,
              "months": 0,
              "minutes": 45,
              "type": "interval",
              "years": 0,
              "seconds": 59.564462,
              "days": 7,
              "value": "0 years 0 mons 7 days 8 hours 45 mins 59.564462 secs"
            }
          }',
        description: "Gets the current delay on the VRT ingest"}]
  /{id}:
    uriParameters:
      id:
        description: "The pid or media_id of the asset"
        required: true
        pattern: "[A-Za-z0-9]+"
        example: "x34mk6vd1v"
    get:
      description: "Get the ingest status based on the pid or media id"
      is: [responses-all: {
        example200: '"data":
        {
          "pid": "x34mk6vd1v",
          "media_id": "23rmpl201701161200",
          "status": "awaitingMetadataUpdate7d"
        }',
        description: "Get the ingest status based on the pid or media id"}]
/ingest:
  displayName: Ingest reporting
  description: Retrieve information about ingest
  get:
    queryParameters:
      cp_id:
        type: string
        required: true
        minLength: 4
        pattern: OR-.*
        displayName: CP ID
        description: The CP ID
      startIndex:
        type: integer
        required: false
        minimum: 0
        default: 0
        displayName: Start Index
        description: Index to start at
      nrOfResults:
        type: integer
        required: false
        default: 25
        minimum: 0
        displayName: Number of results
        description: Number of results to return
      local_id:
        type: string
        required: false
        displayName: Local ID
        description: The local_id of the sip
      md5:
        type: string
        required: false
        minLength: 32
        maxLength: 32
        pattern: "[a-z0-9]{32}"
        displayName: MD5
        description: The MD5 of the sip
      organisation:
        type: string
        required: false
        displayName: Organisation
        description: The organisation name this sip belongs to
      filename:
        type: string
        required: false
        displayName: Filename
        description: The filename of the sip
      archive_status:
        type: string
        required: false
        displayName: Archive status
        description: The archive status of the sip
        enum: ['in_progress', 'OK']
      pid:
        type: string
        required: false
        displayName: PID
        description: The PID of the sip
      comment:
        type: string
        required: false
        displayName: Comment
        description: The comment of the sip
      preingest_status:
        type: string
        required: false
        displayName: Pre-ingest status
        description: The pre-ingest status of the sip
      from:
        type: string
        required: false
        default: "-infinity"
        example: "2017-04-06T11:30:38"
        displayName: From
        description: The start date/datetime
      until:
        type: string
        required: false
        default: "infinity"
        example: "2017-04-06T23:30:38"
        displayName: Until
        description: The end date/datetime
    is: [responses-all: {
        example200: '"data": [
          {
              "type": "AV",
              "notification_sent": true,
              "job_completed_date": "2017-03-02T14:51:45",
              "file_count": 2,
              "metadata": "",
              "tenant": "pz51g0km6m_2017321488462567398",
              "metadata_format": "MEM",
              "complete": true,
              "export_id": "pz51g0km6m_2017321488462567398",
              "pid": "pz51g0km6m",
              "id": 170970
          },
          {
              "type": "AV",
              "notification_sent": true,
              "job_completed_date": "2017-03-02T13:57:44",
              "file_count": 2,
              "metadata": "",
              "tenant": "pz51g0km6m_2017321488457134555",
              "metadata_format": "MEM",
              "complete": true,
              "export_id": "pz51g0km6m_2017321488457134555",
              "pid": "pz51g0km6m",
              "id": 170963
          }
          ]',
        description: "Get all export jobs"}]
  /{id}:
    displayName: Single SIP
    description: Get events from one sip
    uriParameters:
      id:
        required: true
        type: string
        example: "002cfcb6-3ca5-4093-bde4-179da239d8c5"
        displayName: ID
        description: The ID of the record to get
    get:
      queryParameters:
        cp_id:
          type: string
          minLength: 4
          pattern: OR-.*
          required: true
      is: [responses-all: {
        example200: '"data": [
          {
              "type": "AV",
              "notification_sent": true,
              "job_completed_date": "2017-03-02T14:51:45",
              "file_count": 2,
              "metadata": "",
              "tenant": "pz51g0km6m_2017321488462567398",
              "metadata_format": "MEM",
              "complete": true,
              "export_id": "pz51g0km6m_2017321488462567398",
              "pid": "pz51g0km6m",
              "id": 170970
          },
          {
              "type": "AV",
              "notification_sent": true,
              "job_completed_date": "2017-03-02T13:57:44",
              "file_count": 2,
              "metadata": "",
              "tenant": "pz51g0km6m_2017321488457134555",
              "metadata_format": "MEM",
              "complete": true,
              "export_id": "pz51g0km6m_2017321488457134555",
              "pid": "pz51g0km6m",
              "id": 170963
          }
          ]',
        description: "Get all export jobs"}]

/export:
  displayName: All things export jobs
  description: Everything that has to do with exports
  get:
    queryParameters:
      nrOfResults:
        example: 25
        default: 25
      startIndex:
        example: 0
        default: 0
    description: Gets all export jobs
    is: [responses-all: {
        example200: '"data": [
          {
            "local_id": "002cfcb6-3ca5-4093-bde4-179da239d8c5",
            "retry_count": 0,
            "message": null,
            "filename": "original",
            "comment": null,
            "md5": "39f0f02fc506d6ef470547b512099934",
            "filepath": "/export/home/provant/incoming/Processing/002cfcb6-3ca5-4093-bde4-179da239d8c5/002cfcb6-3ca5-4093-bde4-179da239d8c5/data",
            "fragment_id": null,
            "pid": "qs02w37kx3g",
            "id": 25,
            "archive_status": null,
            "last_event_date": "2017-03-24T13:50:20",
            "is_deleted": false,
            "host": "dg-qas-ftp-01.dg.viaa.be",
            "reported": false,
            "organisation": "provant",
            "preingest_status": null
          },
          {
            "local_id": "19fd3a67-c8e6-492c-aacd-53b546e1988e",
            "retry_count": 0,
            "message": null,
            "filename": "original",
            "comment": null,
            "md5": "68980fe753232673181a20b4fedc790d",
            "filepath": "/export/home/provant/incoming/Processing/19fd3a67-c8e6-492c-aacd-53b546e1988e/19fd3a67-c8e6-492c-aacd-53b546e1988e/data",
            "fragment_id": null,
            "pid": "qs01kh0f02r",
            "id": 27,
            "archive_status": null,
            "last_event_date": "2017-03-24T13:53:38",
            "is_deleted": false,
            "host": "dg-qas-ftp-01.dg.viaa.be",
            "reported": false,
            "organisation": "provant",
            "preingest_status": null
          }
          ]',
        description: "Get all export jobs"}]
  /{id}:
    uriParameters:
      id:
        displayName: ID
        description: The ID of the export job
        example: 'pz51g0km6m_2017321488462567398'
    displayName: Job
    get:
      description: Gets information on a specific export job