{"openapi":"3.0.0","info":{"title":"4P-VIDEO ADAPTER","description":"ADAPTER FOR THE INTEGRATION BETWEEN 4P AND VIDEO","version":"0.5","x-fp-apiPrefix":"/videoadapter","x-fp-health":"http://www.example.com/servicestatus.html"},"servers":[{"url":"http://127.0.0.1:80","description":"local"}],"components":{"parameters":{"instance_id":{"name":"instance_id","in":"path","description":"Internal Video Platform Country ID <BR>- 25 (Brasil) <BR>- 29 (Argentina) <BR>- 26 (Chile) <BR>- 28 (Peru) <BR>- 33 (Colombia) <BR>- 34 (Costa Rica) <BR>- 35 (El Salvador) <BR>- 36 (Guatemala) <BR>- 37 (Nicaragua) <BR>- 38 (Panamá) <BR>- 40 (Uruguay) <BR>- 41 (Ecuador)\n","schema":{"type":"string","enum":[25,26,28,29,33,34,35,36,37,38,40,41]},"example":29,"required":true},"user_id":{"name":"user_id","description":"User id in 4P which will be translated internally to the Video user_id by the Video Adapter","in":"query","schema":{"type":"string"},"example":"6071435","required":false},"device_type":{"name":"device_type","in":"query","description":"Device type id defined as enumerator <BR>-    102, 106, 107, 108, 116, 118 --> hibridos <BR>-    120, 121, 122, 123   --> híbridos Graphene <BR>-    130    --> Android TV <BR>-    301    --> SMARTTV.SAMSUNG <BR>-    302    --> SMARTTV.LG <BR>-    401    --> PC <BR>-    501    --> MOBILE.PHONE.ANDROID <BR>-    502    --> MOBILE.PHONE.IOS <BR>-    601    --> MOBILE.TABLET.ANDROID <BR>-    602    --> MOBILE.TABLET.IOS <BR>-    701    --> SMARTTV.SAMSUNG <BR>-    702    --> SMARTTV.LG <BR>-    703    --> SMARTTV.LG  <BR>-    801    --> STB.MEDIAROOM  <BR>-    802    --> STB.OPENPLATFORM <BR>-    samsung--> para Smart Tv Samsung <BR>-    samsung_tizen--> para Smart TV Samsung Tizen <BR>-    lg     --> para Smart TV LG <BR>-    ps3    --> para Playstation 3 <BR>-    ps4    --> para Playstation 4 <BR>-    xbox360--> para Xbox 360 <BR>-    ipad2  --> para iPad <BR>-    iphone2--> para iPhone <BR>-    android.cell  --> para Smartphone Android <BR>-    android.tablet  --> para tableta Android <BR>-    webplayer       --> para navegadores distintos de Chrome <BR>-    webplayer.hls   --> para navegador Chrome <BR>-    android.tv      --> para Android TV \n","schema":{"type":"string","enum":[102,106,107,108,116,118,120,121,122,123,130,301,302,401,501,502,601,602,701,702,703,801,802,"samsung","samsung_tizen","lg","ps3","ps4","xbox360","ipad2","iphone2","android.cell","android.tablet","webplayer","webplayer.hls","android.tv"]},"example":"501","required":true},"adult":{"name":"adult","description":"Flag to indicate if the resposes must be Adult (true) or Non Adult (false) contents","in":"query","schema":{"type":"boolean","default":false},"example":"false"},"force_subscribed":{"name":"force_subscribed","description":"Flag to force the search to return only contents in the subscriptions of the user","in":"query","schema":{"type":"boolean","default":false},"example":"false"},"commercial_offer":{"name":"commercial_offer","description":"Oferta comercial del usuario, permite filtrar los contenidos que el usuario no puede contratar por encontrarse fuera de su Oferta.","in":"query","schema":{"type":"string"},"example":2},"packages":{"name":"packages","description":"Paquetes comerciales o subscripciones contratadas o asignadas al usuario.  <BR>Permite filtrar (con 'force_subscribed=true') para que los resultados sean contenidos que el usuario tiene derecho a ver. <BR>Es un String que contiene una lista de identificadores de subscripciones separados por comas. <BR>Con 'force_subscribed=flase' es preferible no pasar este parametro para mejorar el rendimiento de la cache.","in":"query","schema":{"type":"string"},"example":"SUB123,SUB88,SUB124"},"catalog_type":{"name":"catalog_type","description":"PENDING. Este campo hay que analizar entre todos si tendría sentido en los casos de uso. Se trataria de restringir los resultados a solo contenido VOD, solo LIVE o solo L7D (Catchup). Para indicar combinaciones, se pasar´án varios valores separados por comas. OpenPlatform no soporta las combinaciones, ni grabaciones. Solo los valores VOD, LIVE, L7D Y ALL.","in":"query","schema":{"type":"string","enum":["VOD","LIVE","L7D","RECORDINGS","ALL"],"default":"ALL"},"example":"VOD"},"only_live_events":{"name":"only_live_events","description":"Flag to force the search to return only original contents or 'directos', it is 'live' airing of sport matches, special events and so...","in":"query","schema":{"type":"boolean","default":false},"example":"false"},"start_time":{"name":"start_time","in":"query","description":"Timestamp to start search from, epoch time in milliseconds.","schema":{"type":"integer","format":"int64"},"example":1550230078310},"end_time":{"name":"end_time","in":"query","description":"Timestamp to end search from, epoch time in milliseconds.","schema":{"type":"integer","format":"int64"},"example":1550230078310},"similar_to":{"name":"similar_to","description":"Id of the content for which we wont similar ones","in":"query","schema":{"type":"string"},"example":"MOV94302","required":false},"similar_to_title":{"name":"similar_to_title","description":"Title of the content for which we wont similar ones","in":"query","schema":{"type":"string"},"example":"MOV94302","required":false},"search_query":{"name":"search_query","in":"query","description":"This fields describes the logic condition of the Search, allowing create logical operations with ANDs and ORs on metadata fields and values. <BR>Brackets are allowed between conditions. <BR>Metadata fields supported are    <BR>-title <BR>-actor <BR>-director  <BR>-genre  <BR>-channel  <BR>-provider <BR>-participante (presentador, actor, director, deportista, invitado, director) <BR>Otros posibles valores (revisar el martes), a incluir para España <BR>-  Episodio <BR>-  Temporada <BR>-  Etiqueta <BR>-  Categoría (película, serie, programa, documental, corto, …) <BR>-  Título de episodio & padre -> Validar con todos si se necesita el campo <BR>-  Id de contenido <BR>-  Id de canal (channel name y channel id)\n  \nOtros temas a debarir el martes <BR>-  cada deporte es un genero ? <BR>-  se pueden repetir los filtros en las consultas de search query (varios géneros, …) --> es OR, si <BR>-¿Cómo especificamos “champions”, “Liga”, “Mundial”, “premier”, … seasons, circuitos? <BR>-Faltan los posibles valores de cada cosa","schema":{"type":"string"},"example":"genre:accion AND (actor:\"Clint Eastwood\" OR director:\"Clint Eastwood\")","required":false},"order":{"name":"order","description":"Defines the order to be used to return the results","in":"query","schema":{"type":"string","enum":["personal","views","available_from_utc:d","title:a","title:d","release_date:d","duration:a","available_until_utc:a","añadir el resto de ordenes que necesite España, TODO cuales son ?"],"default":"personal"},"example":"personal","required":false},"showseries":{"name":"showseries","description":"<BR>Formas diferentes de devolver el resultado (result_format). <BR>Si es True, plataforma tratara de devolver contenedore de series en lugar de episodios sueltos. Tanto en VoD como en Live según sea soportado (Ej, GVP ahora no soporta contenedores de series para Live pero en el futuro lo hará)  <BR>Si es False, se devolverán episodios en lugar de la serie.\n","schema":{"type":"boolean","default":true},"example":0,"in":"query"},"user_profile":{"name":"user_profile","description":"Perfil con el que te has logueado. <BR>Para permitir funcionalidad con subperfiles dentro de una misma cuenta, como en España. <BR>No soportado en GVP","schema":{"type":"string","default":0},"example":0,"in":"query"},"page":{"name":"page","description":"Defines the number of page when pagination is used","in":"query","schema":{"type":"integer","default":0},"example":0},"per_page":{"name":"per_page","description":"Atribute to limit the items of the response, allowing pagination","in":"query","schema":{"type":"integer","default":20},"example":5}},"schemas":{"response_contents_list":{"type":"object","properties":{"Severity":{"type":"integer","description":"Severity"},"HttpStatusCode":{"type":"integer","description":"HTTP Status Code"},"StatusCode":{"type":"integer","description":"Status Code"},"StatusMessage":{"type":"string","description":"Message"},"Contents":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/video_content_movie"},{"$ref":"#/components/schemas/video_content_serie"},{"$ref":"#/components/schemas/video_content_vod_episode"},{"$ref":"#/components/schemas/video_content_liveschedule"}]}}},"example":{"Content":{"List":["{}","{}"],"Count":0,"Limit":6,"Offset":1},"HttpStatusCode":5,"Severity":5,"StatusCode":2,"StatusMessage":"StatusMessage"}},"basic_vod_content":{"type":"object","properties":{"Pid":{"$ref":"#/components/schemas/pid"},"Title":{"$ref":"#/components/schemas/title"},"CommercializationType":{"$ref":"#/components/schemas/commercialization_type"},"CatalogType":{"$ref":"#/components/schemas/catalog_type"},"Images":{"$ref":"#/components/schemas/content_images"},"Genres":{"$ref":"#/components/schemas/genres"},"Subscriptions":{"$ref":"#/components/schemas/subscriptions"},"Provider":{"$ref":"#/components/schemas/provider"},"Distributor":{"$ref":"#/components/schemas/distributor"},"RequiresPin":{"$ref":"#/components/schemas/requires_pin"},"DeviceTypesAvailable":{"$ref":"#/components/schemas/device_types_available"}}},"video_content_movie":{"allOf":[{"type":null,"properties":{"ContentType":{"type":"string","value":"MOV"},"Pid":{"exmaple":"MOV39393"}}},{"$ref":"#/components/schemas/basic_vod_content"},{"type":null,"properties":{"Duration":{"$ref":"#/components/schemas/duration"},"IsDTP":{"$ref":"#/components/schemas/isdtp"}}}]},"video_content_serie":{"allOf":[{"type":null,"properties":{"ContentType":{"type":"string","value":"SER"}}},{"$ref":"#/components/schemas/basic_vod_content"}]},"video_content_vod_episode":{"allOf":[{"type":null,"properties":{"ContentType":{"type":"string","value":"EPI"}}},{"$ref":"#/components/schemas/basic_vod_content"},{"type":null,"properties":{"Duration":{"$ref":"#/components/schemas/duration"},"IsDTP":{"$ref":"#/components/schemas/isdtp"},"SeriesID":{"$ref":"#/components/schemas/series_id"},"SeriesName":{"$ref":"#/components/schemas/series_name"},"SeasonId":{"$ref":"#/components/schemas/season_id"},"SeasonNumber":{"$ref":"#/components/schemas/season_number"},"EpisodeNumber":{"$ref":"#/components/schemas/episode_number"}}}]},"video_content_liveschedule":{"type":"object","properties":{"Pid":{"type":"string","description":"Product Id","example":"LSC484839303"},"ContentType":{"type":"string","value":"LSC"},"CatalogType":{"$ref":"#/components/schemas/catalog_type"},"Duration":{"$ref":"#/components/schemas/duration"},"Images":{"$ref":"#/components/schemas/content_images"},"Genres":{"$ref":"#/components/schemas/genres"},"Description":{"$ref":"#/components/schemas/synopsis"},"Start":{"$ref":"#/components/schemas/schedule_start"},"End":{"$ref":"#/components/schemas/schedule_end"},"LiveChannelPid":{"$ref":"#/components/schemas/live_channel_pid"},"ChannelName":{"$ref":"#/components/schemas/channel_name"},"LiveProgramPid":{"$ref":"#/components/schemas/live_program_pid"},"ReleaseDate":{"$ref":"#/components/schemas/release_date"},"AgeRatingPid":{"$ref":"#/components/schemas/age_rating_pid"},"RequiresPin":{"$ref":"#/components/schemas/requires_pin"}}},"pid":{"type":"string","description":"Product Id","example":"SER115777"},"title":{"type":"string","description":"Title of the content","example":"Gravity"},"commercialization_type":{"description":"Type of commertialization of the content enum\n  - SVOD\n  - TVOD\n  - FREEVOD\n  - CATCHUP\n  - TransparentCatchup\n  - ExternalCatchup\n  - NetworkCatchup\n  - Unknown\n  - completar\n","type":"string","example":"SVOD"},"catalog_type":{"description":"Define el tipo de catalog al que pertenece el contenido.  entre los tipos VOD (no L7D), LIVE, L7D, RECORDINGS.","schema":{"type":"string","enum":["VOD","LIVE","L7D","RECORDINGS"]}},"device_types_available":{"description":"List of device types, where the content is available","type":"array","items":{"$ref":"#/components/schemas/device_type"}},"device_type":{"description":"device type where a content is avaiable","type":"string","example":401},"duration":{"type":"integer","description":"duration of the content in seconds, 0 for series or if unknown","example":4308},"genres":{"description":"List of genres asociated to the content","type":"array","items":{"$ref":"#/components/schemas/genre"},"example":[{"Id:109":null,"Name":"Drama"},{"Id:110":null,"Name":"Infantil"}]},"genre":{"type":"object","properties":{"Id":{"type":"string","description":"ID of the Genre","example":108},"Name":{"type":"string","description":"Name of the Genre","example":"Drama"}}},"provider":{"description":"Provider of the content","type":"object","properties":{"Pid":{"type":"string","description":"ID of the Provider","example":"CMP998"},"Name":{"type":"string","description":"Name of the Provider","example":"HBO"}}},"distributor":{"description":"Distributor of the content","type":"object","properties":{"Pid":{"type":"string","description":"ID of the Distributor","example":"CD998"},"Name":{"type":"string","description":"Name of the Distributor","example":"FOX"}}},"content_images":{"type":"object","properties":{"Cover":{"$ref":"#/components/schemas/image"},"LandscapeCover":{"$ref":"#/components/schemas/image"},"PortraitCover":{"$ref":"#/components/schemas/image"},"Banner":{"$ref":"#/components/schemas/image"},"VideoFrame":{"$ref":"#/components/schemas/image"}}},"subscriptions":{"type":"array","description":"List of genres asociated to the content","example":["SUB430","SUB431","SUB432","SUB650","SUB888","SUB901","SUB915","SUB1002"],"items":{"type":"string"}},"image":{"type":"object","properties":{"Url":{"type":"string","description":"URL of the image resource","example":"http://media.gvp.telefonica.com/storagearea0/IMAGES/00/03/43/3431513_2408C5D20B8FB977.jpg"},"Height":{"type":"integer","description":"Height of the image in pixels","example":720},"Width":{"type":"integer","description":"Width of the image in pixels","example":1280},"Format":{"type":"string","description":"Format of the image","example":"Jpeg"},"ImageClass":{"type":"string","description":"????","example":0}}},"isdtp":{"type":"bool","description":"flag indicating if the content support the service 'download to play'"},"requires_pin":{"type":"bool","description":"flag indicating if the content is for adult or requires parental pin to access it"},"synopsis":{"Description":"Short synopsis of the content","type":"string"},"series_id":{"type":"integer","description":"Pid of the serie","example":110093},"series_name":{"type":"integer","description":"Name of the serie","example":"Juego de Tronos"},"season_id":{"type":"integer","description":"identificator of the season in the catalog","example":4},"season_number":{"type":"integer","description":"number (order) of season in the serie","example":4},"episode_number":{"type":"integer","description":"number (order) of the episode in the season","example":10},"schedule_start":{"description":"Datetime when the airing of the live schedule starts","type":"integer","format":"int64","example":1551434100},"schedule_end":{"description":"Datetime when the airing of the live schedule ends","type":"integer","format":"int64","example":1551434700},"live_channel_pid":{"description":"Pid of the Live channel where the live schedule is aired","type":"string","example":"LCH364"},"channel_name":{"type":"string","description":"Name of the Live channel where the live schedule is aired","example":"NAT GEO KIDS HD"},"live_program_pid":{"type":"string","description":"Pid of the Program Object where metadata of the live schedule is available","example":"LPR242751599"},"release_date":{"type":"integer","format":"int64","description":"date of release of the program (first aired)","example":1483225200},"age_rating_pid":{"type":"object","description":"Age Rating classification of the program","properties":{"Pid":{"type":"string","description":"ID of the Age Rating","example":"AGE175"},"Name":{"type":"string","description":"Value (to be shown) of the Age Rating","example":18}}}}},"paths":{"/videoadapter/{instance_id}/search":{"get":{"summary":"Performs a search request","tags":["SEARCH"],"description":"It requests for a search in Recommendation Engine. <BR>This request also covers the case 'for me' when no conditions are passed in the search_query. <BR> <BR>TODO Origin. producto o servicio que llama, en este caso Aura. Pendiente resolver si este dato se parsara en una header o como","parameters":[{"$ref":"#/components/parameters/instance_id"},{"$ref":"#/components/parameters/user_id"},{"$ref":"#/components/parameters/device_type"},{"$ref":"#/components/parameters/adult"},{"$ref":"#/components/parameters/force_subscribed"},{"$ref":"#/components/parameters/commercial_offer"},{"$ref":"#/components/parameters/packages"},{"$ref":"#/components/parameters/catalog_type"},{"$ref":"#/components/parameters/only_live_events"},{"$ref":"#/components/parameters/start_time"},{"$ref":"#/components/parameters/end_time"},{"$ref":"#/components/parameters/search_query"},{"$ref":"#/components/parameters/order"},{"$ref":"#/components/parameters/showseries"},{"$ref":"#/components/parameters/user_profile"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per_page"}],"responses":{"200":{"description":"Successful operation. Returns desired Contents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/response_contents_list"}}}}}}},"/videoadapter/{instance_id}/recomm/similar":{"get":{"summary":"Returns contents similar to a certain content passed as argument","tags":["RECOMMENDATIONS"],"description":"Returns contents similar to a certain content. <BR>It is madatory to pass similar_to or similar_to_title. <BR>Both ways of request for similar will be supported","parameters":[{"$ref":"#/components/parameters/instance_id"},{"$ref":"#/components/parameters/user_id"},{"$ref":"#/components/parameters/device_type"},{"$ref":"#/components/parameters/adult"},{"$ref":"#/components/parameters/force_subscribed"},{"$ref":"#/components/parameters/commercial_offer"},{"$ref":"#/components/parameters/packages"},{"$ref":"#/components/parameters/similar_to"},{"$ref":"#/components/parameters/similar_to_title"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per_page"}],"responses":{"200":{"description":"Successful operation. Returns desired Contents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/response_contents_list"}}}}}}}}}