Last active
September 28, 2024 10:54
-
-
Save eggplants/01cbf2f9fb2c4cfe101f1abfa059b74b to your computer and use it in GitHub Desktop.
http://localhost:40772/api/docs / https://tinyurl.com/2vtnjkjk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"openapi":"3.0.3","info":{"title":"mirakc Web API","description":"","contact":{"name":"Contributors of mirakc"},"license":{"name":"MIT OR Apache-2.0"},"version":"3.2.3"},"servers":[{"url":"/api"}],"paths":{"/channels":{"parameters":[],"get":{"tags":["channels"],"summary":"Lists channels.","operationId":"getChannels","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MirakurunChannel"}}}}},"500":{"description":"Internal Server Error"}}}},"/channels/{type}/{channel}/services/{sid}/stream":{"parameters":[],"get":{"tags":["channels::services::stream","stream"],"summary":"Gets a media stream of a service.","operationId":"getServiceStreamByChannel","parameters":[{"name":"X-Mirakurun-Priority","in":"header","description":"Priority of the tuner user","required":false,"schema":{"type":"integer","format":"int32","nullable":true}},{"name":"type","in":"path","description":"Channel type","required":true,"schema":{"$ref":"#/components/schemas/ChannelType"}},{"name":"channel","in":"path","description":"Channel number","required":true,"schema":{"type":"string"}},{"name":"sid","in":"path","description":"Service ID (not Mirakurun Service ID)","required":true,"schema":{"type":"integer","format":"int32","minimum":0}},{"name":"decode","in":"query","description":"`0` or `false` disables decoding.\n\nThe stream will be decoded by default if a decoder is specified in the\n`config.yml`.","required":false,"schema":{"type":"boolean"}},{"name":"pre-filters","in":"query","description":"A list of pre-filters to use.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"post-filters","in":"query","description":"A list of post-filters to use.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","headers":{"X-Mirakurun-Tuner-User-ID":{"schema":{"type":"string"},"description":"Tuner user ID"}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"},"503":{"description":"Tuner Resource Unavailable"}}},"head":{"tags":["channels::services::stream","stream"],"operationId":"head","parameters":[{"name":"X-Mirakurun-Priority","in":"header","description":"Priority of the tuner user","required":false,"schema":{"type":"integer","format":"int32","nullable":true}},{"name":"type","in":"path","description":"Channel type","required":true,"schema":{"$ref":"#/components/schemas/ChannelType"}},{"name":"channel","in":"path","description":"Channel number","required":true,"schema":{"type":"string"}},{"name":"sid","in":"path","description":"Service ID (not Mirakurun Service ID)","required":true,"schema":{"type":"integer","format":"int32","minimum":0}},{"name":"decode","in":"query","description":"`0` or `false` disables decoding.\n\nThe stream will be decoded by default if a decoder is specified in the\n`config.yml`.","required":false,"schema":{"type":"boolean"}},{"name":"pre-filters","in":"query","description":"A list of pre-filters to use.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"post-filters","in":"query","description":"A list of post-filters to use.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","headers":{"X-Mirakurun-Tuner-User-ID":{"schema":{"type":"string"},"description":"Tuner user ID"}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"},"503":{"description":"Tuner Resource Unavailable"}}}},"/channels/{type}/{channel}/stream":{"parameters":[],"get":{"tags":["channels::stream","stream"],"summary":"Gets a media stream of a channel.","operationId":"getChannelStream","parameters":[{"name":"X-Mirakurun-Priority","in":"header","description":"Priority of the tuner user","required":false,"schema":{"type":"integer","format":"int32","nullable":true}},{"name":"type","in":"path","description":"Channel type","required":true,"schema":{"$ref":"#/components/schemas/ChannelType"}},{"name":"channel","in":"path","description":"Channel number","required":true,"schema":{"type":"string"}},{"name":"decode","in":"query","description":"`0` or `false` disables decoding.\n\nThe stream will be decoded by default if a decoder is specified in the\n`config.yml`.","required":false,"schema":{"type":"boolean"}},{"name":"pre-filters","in":"query","description":"A list of pre-filters to use.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"post-filters","in":"query","description":"A list of post-filters to use.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","headers":{"X-Mirakurun-Tuner-User-ID":{"schema":{"type":"string"},"description":"Tuner user ID"}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"},"503":{"description":"Tuner Resource Unavailable"}}},"head":{"tags":["channels::stream","stream"],"operationId":"checkChannelStream","parameters":[{"name":"X-Mirakurun-Priority","in":"header","description":"Priority of the tuner user","required":false,"schema":{"type":"integer","format":"int32","nullable":true}},{"name":"type","in":"path","description":"Channel type","required":true,"schema":{"$ref":"#/components/schemas/ChannelType"}},{"name":"channel","in":"path","description":"Channel number","required":true,"schema":{"type":"string"}},{"name":"decode","in":"query","description":"`0` or `false` disables decoding.\n\nThe stream will be decoded by default if a decoder is specified in the\n`config.yml`.","required":false,"schema":{"type":"boolean"}},{"name":"pre-filters","in":"query","description":"A list of pre-filters to use.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"post-filters","in":"query","description":"A list of post-filters to use.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","headers":{"X-Mirakurun-Tuner-User-ID":{"schema":{"type":"string"},"description":"Tuner user ID"}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"},"503":{"description":"Tuner Resource Unavailable"}}}},"/iptv/epg":{"parameters":[],"get":{"tags":["iptv"],"summary":"Gets an XMLTV document containing all TV program information.","operationId":"epg","responses":{"200":{"description":"OK","content":{"application/xml":{"schema":{"type":"string"}}}},"500":{"description":"Internal Server Error"}}}},"/iptv/playlist":{"parameters":[],"get":{"tags":["iptv"],"summary":"Get an M3U8 playlist containing all available services.","operationId":"playlist","responses":{"200":{"description":"OK","content":{"application/x-mpegURL":{"schema":{"type":"string"}}}},"500":{"description":"Internal Server Error"}}}},"/iptv/xmltv":{"parameters":[],"get":{"tags":["iptv"],"summary":"Gets an XMLTV document containing all TV program information.","description":"For compatibility with Mirakurun.","operationId":"xmltv","responses":{"200":{"description":"OK","content":{"application/xml":{"schema":{"type":"string"}}}},"500":{"description":"Internal Server Error"}}}},"/onair":{"parameters":[],"get":{"tags":["onair"],"summary":"List on-air programs.","operationId":"getOnairPrograms","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebOnairProgram"}}}}},"500":{"description":"Internal Server Error"}}}},"/onair/{service_id}":{"parameters":[],"get":{"tags":["onair"],"summary":"Gets an on-air program of a specified service.","operationId":"getOnairProgram","parameters":[{"name":"service_id","in":"path","description":"Mirakurun service ID","required":true,"schema":{"type":"integer","format":"int64","minimum":0}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebOnairProgram"}}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"}}}},"/programs":{"parameters":[],"get":{"tags":["programs"],"summary":"Lists TV programs.","description":"The list contains TV programs that have ended.\n\nA newer Mirakurun returns information contained in EIT[schedule]\noverridded by EIT[p/f] from this endpoint. This may cause","operationId":"getPrograms","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MirakurunProgram"}}}}},"500":{"description":"Internal Server Error"}}}},"/programs/{id}":{"parameters":[],"get":{"tags":["programs"],"summary":"Gets a TV program.","description":"### A special hack for EPGStation\n\nIf the User-Agent header string starts with \"EPGStation/\", this endpoint\nreturns information contained in EIT[p/f] if it exists. Otherwise,\ninformation contained in EIT[schedule] is returned.\n\nEPGStation calls this endpoint in order to update the start time and the\nduration of the TV program while recording. The intention of this call is\nassumed that EPGStation wants to get the TV program information equivalent\nto EIT[p]. However, this endpoint should return information contained in\nEIT[schedule] basically in a web API consistency point of view. Information\ncontained in EIT[p/f] should be returned from other endpoints.\n\nSee also [/programs/{id}/stream](#/stream/getProgramStream).","operationId":"getProgram","parameters":[{"name":"id","in":"path","description":"Mirakurun program ID","required":true,"schema":{"type":"integer","format":"int64","minimum":0}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MirakurunProgram"}}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"}}}},"/programs/{id}/stream":{"parameters":[],"get":{"tags":["programs::stream","stream"],"summary":"Gets a media stream of a program.","description":"### A special hack for EPGStation\n\nIf the User-Agent header string starts with \"EPGStation/\", this endpoint\ncreates a temporal on-air program tracker if there is no tracker defined in\nconfig.yml, which can be reused for tracking changes of the TV program\nmetadata.\n\nThe temporal on-air program tracker will be stopped within 1 minute after\nthe streaming stopped.\n\nThe metadata will be returned from [/programs/{id}](#/programs/getProgram).","operationId":"getProgramStream","parameters":[{"name":"X-Mirakurun-Priority","in":"header","description":"Priority of the tuner user","required":false,"schema":{"type":"integer","format":"int32","nullable":true}},{"name":"id","in":"path","description":"Mirakurun program ID","required":true,"schema":{"type":"integer","format":"int64","minimum":0}},{"name":"decode","in":"query","description":"`0` or `false` disables decoding.\n\nThe stream will be decoded by default if a decoder is specified in the\n`config.yml`.","required":false,"schema":{"type":"boolean"}},{"name":"pre-filters","in":"query","description":"A list of pre-filters to use.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"post-filters","in":"query","description":"A list of post-filters to use.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","headers":{"X-Mirakurun-Tuner-User-ID":{"schema":{"type":"string"},"description":"Tuner user ID"}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"},"503":{"description":"Tuner Resource Unavailable"}}},"head":{"tags":["programs::stream","stream"],"operationId":"checkProgramStream","parameters":[{"name":"X-Mirakurun-Priority","in":"header","description":"Priority of the tuner user","required":false,"schema":{"type":"integer","format":"int32","nullable":true}},{"name":"id","in":"path","description":"Mirakurun program ID","required":true,"schema":{"type":"integer","format":"int64","minimum":0}},{"name":"decode","in":"query","description":"`0` or `false` disables decoding.\n\nThe stream will be decoded by default if a decoder is specified in the\n`config.yml`.","required":false,"schema":{"type":"boolean"}},{"name":"pre-filters","in":"query","description":"A list of pre-filters to use.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"post-filters","in":"query","description":"A list of post-filters to use.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","headers":{"X-Mirakurun-Tuner-User-ID":{"schema":{"type":"string"},"description":"Tuner user ID"}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"},"503":{"description":"Tuner Resource Unavailable"}}}},"/services":{"parameters":[],"get":{"tags":["services"],"summary":"Lists services.","operationId":"getServices","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MirakurunService"}}}}},"500":{"description":"Internal Server Error"}}}},"/services/{id}":{"parameters":[],"get":{"tags":["services"],"summary":"Gets a service.","operationId":"getService","parameters":[{"name":"id","in":"path","description":"Mirakurun service ID","required":true,"schema":{"type":"integer","format":"int64","minimum":0}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirakurunService"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"}}}},"/services/{id}/logo":{"parameters":[],"get":{"tags":["services"],"summary":"Gets a logo image of a service.","operationId":"getLogoImage","parameters":[{"name":"id","in":"path","description":"Mirakurun service ID","required":true,"schema":{"type":"integer","format":"int64","minimum":0}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"},"503":{"description":"Logo Data Unavailable"}}}},"/services/{id}/programs":{"parameters":[],"get":{"tags":["services"],"summary":"Lists TV programs of a service.","description":"The list contains TV programs that have ended.","operationId":"getProgramsOfService","parameters":[{"name":"id","in":"path","description":"Mirakurun service ID","required":true,"schema":{"type":"integer","format":"int64","minimum":0}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MirakurunProgram"}}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"}}}},"/services/{id}/stream":{"parameters":[],"get":{"tags":["services::stream","stream"],"summary":"Gets a media stream of a service.","operationId":"getServiceStream","parameters":[{"name":"X-Mirakurun-Priority","in":"header","description":"Priority of the tuner user","required":false,"schema":{"type":"integer","format":"int32","nullable":true}},{"name":"id","in":"path","description":"Mirakurun service ID","required":true,"schema":{"type":"integer","format":"int64","minimum":0}},{"name":"decode","in":"query","description":"`0` or `false` disables decoding.\n\nThe stream will be decoded by default if a decoder is specified in the\n`config.yml`.","required":false,"schema":{"type":"boolean"}},{"name":"pre-filters","in":"query","description":"A list of pre-filters to use.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"post-filters","in":"query","description":"A list of post-filters to use.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","headers":{"X-Mirakurun-Tuner-User-ID":{"schema":{"type":"string"},"description":"Tuner user ID"}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"},"503":{"description":"Tuner Resource Unavailable"}}},"head":{"tags":["services::stream","stream"],"operationId":"checkServiceStream","parameters":[{"name":"X-Mirakurun-Priority","in":"header","description":"Priority of the tuner user","required":false,"schema":{"type":"integer","format":"int32","nullable":true}},{"name":"id","in":"path","description":"Mirakurun service ID","required":true,"schema":{"type":"integer","format":"int64","minimum":0}},{"name":"decode","in":"query","description":"`0` or `false` disables decoding.\n\nThe stream will be decoded by default if a decoder is specified in the\n`config.yml`.","required":false,"schema":{"type":"boolean"}},{"name":"pre-filters","in":"query","description":"A list of pre-filters to use.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"post-filters","in":"query","description":"A list of post-filters to use.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","headers":{"X-Mirakurun-Tuner-User-ID":{"schema":{"type":"string"},"description":"Tuner user ID"}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"},"503":{"description":"Tuner Resource Unavailable"}}}},"/status":{"parameters":[],"get":{"tags":["status"],"summary":"Gets current status information.","description":"mirakc doesn't implement this endpoint and always returns an empty object.","operationId":"getStatus","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}}}}},"/tuners":{"parameters":[],"get":{"tags":["tuners"],"summary":"Lists tuners enabled in `config.yml`.","operationId":"getTuners","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MirakurunTuner"}}}}},"500":{"description":"Internal Server Error"}}}},"/tuners/{index}":{"parameters":[],"get":{"tags":["tuners"],"summary":"Gets a tuner model.","operationId":"getTuner","parameters":[{"name":"index","in":"path","description":"Tuner index","required":true,"schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirakurunTuner"}}}},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"}}}},"/version":{"parameters":[],"get":{"tags":["version"],"summary":"Gets version information.","operationId":"checkVersion","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Version"}}}}}}}},"components":{"schemas":{"ChannelType":{"type":"string","enum":["GR","BS","CS","SKY"]},"MirakurunChannel":{"type":"object","title":"Channel","required":["type","channel","name","services"],"properties":{"channel":{"type":"string"},"name":{"type":"string"},"services":{"type":"array","items":{"type":"object","required":["id","serviceId","networkId","name"],"properties":{"id":{"type":"integer","format":"int64","minimum":0},"name":{"type":"string"},"networkId":{"type":"integer","format":"int32","minimum":0},"serviceId":{"type":"integer","format":"int32","minimum":0}}}},"type":{"$ref":"#/components/schemas/ChannelType"}}},"MirakurunProgram":{"type":"object","title":"Program","required":["id","eventId","serviceId","networkId","startAt","duration","isFree"],"properties":{"audio":{"allOf":[{"type":"object","required":["componentType","isMain","samplingRate","langs"],"properties":{"componentType":{"type":"integer","format":"int32","minimum":0},"isMain":{"type":"boolean"},"langs":{"type":"array","items":{"type":"string"}},"samplingRate":{"type":"integer","format":"int32"}}}],"nullable":true},"audios":{"type":"array","items":{"type":"object","required":["componentType","isMain","samplingRate","langs"],"properties":{"componentType":{"type":"integer","format":"int32","minimum":0},"isMain":{"type":"boolean"},"langs":{"type":"array","items":{"type":"string"}},"samplingRate":{"type":"integer","format":"int32"}}}},"description":{"type":"string","nullable":true},"duration":{"type":"integer","format":"int64"},"eventId":{"type":"integer","format":"int32","minimum":0},"extended":{"type":"object"},"genres":{"type":"array","items":{"type":"object","required":["lv1","lv2","un1","un2"],"properties":{"lv1":{"type":"integer","format":"int32","minimum":0},"lv2":{"type":"integer","format":"int32","minimum":0},"un1":{"type":"integer","format":"int32","minimum":0},"un2":{"type":"integer","format":"int32","minimum":0}}},"nullable":true},"id":{"type":"integer","format":"int64","minimum":0},"isFree":{"type":"boolean"},"name":{"type":"string","nullable":true},"networkId":{"type":"integer","format":"int32","minimum":0},"relatedItems":{"type":"array","items":{"type":"object","required":["type","serviceId","eventId"],"properties":{"eventId":{"type":"integer","format":"int32","minimum":0},"networkId":{"type":"integer","format":"int32","nullable":true,"minimum":0},"serviceId":{"type":"integer","format":"int32","minimum":0},"type":{"type":"string"}}}},"series":{"allOf":[{"type":"object","required":["id","repeat","pattern","expireAt","episode","lastEpisode","name"],"properties":{"episode":{"type":"integer","format":"int32","minimum":0},"expireAt":{"type":"integer","format":"int64"},"id":{"type":"integer","format":"int32","minimum":0},"lastEpisode":{"type":"integer","format":"int32","minimum":0},"name":{"type":"string"},"pattern":{"type":"integer","format":"int32","minimum":0},"repeat":{"type":"integer","format":"int32","minimum":0}}}],"nullable":true},"serviceId":{"type":"integer","format":"int32","minimum":0},"startAt":{"type":"integer","format":"int64"},"video":{"allOf":[{"type":"object","required":["streamContent","componentType"],"properties":{"componentType":{"type":"integer","format":"int32","minimum":0},"resolution":{"type":"string","nullable":true},"streamContent":{"type":"integer","format":"int32","minimum":0},"type":{"type":"string","nullable":true}}}],"nullable":true}}},"MirakurunService":{"type":"object","title":"Service","required":["id","serviceId","networkId","type","name","channel","hasLogoData"],"properties":{"channel":{"type":"object","required":["type","channel"],"properties":{"channel":{"type":"string"},"type":{"$ref":"#/components/schemas/ChannelType"}}},"hasLogoData":{"type":"boolean"},"id":{"type":"integer","format":"int64","minimum":0},"logoId":{"type":"integer","format":"int32"},"name":{"type":"string"},"networkId":{"type":"integer","format":"int32","minimum":0},"remoteControlKeyId":{"type":"integer","format":"int32","minimum":0},"serviceId":{"type":"integer","format":"int32","minimum":0},"type":{"type":"integer","format":"int32","minimum":0}}},"MirakurunTuner":{"type":"object","title":"Tuner","required":["index","name","types","users","isAvailable","isRemote","isFree","isUsing","isFault"],"properties":{"command":{"type":"string","description":"A command to use getting a media stream from the tuner.","nullable":true},"index":{"type":"integer","description":"The index of the tuner defined in `config.yml`.","minimum":0},"isAvailable":{"type":"boolean","description":"Always `true`."},"isFault":{"type":"boolean","description":"Always `false`."},"isFree":{"type":"boolean","description":"`true` if the tuner is free, `false` otherwise."},"isRemote":{"type":"boolean","description":"Always `false`."},"isUsing":{"type":"boolean","description":"`false` if the tuner is free, `true` otherwise."},"name":{"type":"string","description":"The name of the tuner defined in `config.yml`."},"pid":{"type":"integer","format":"int32","description":"PID of a process to run the command.","nullable":true,"minimum":0},"types":{"type":"array","items":{"$ref":"#/components/schemas/ChannelType"},"description":"Channel types supported by the tuner."},"users":{"type":"array","items":{"type":"object","required":["id","priority"],"properties":{"agent":{"type":"string","description":"User-Agent string.","nullable":true},"id":{"type":"string","description":"User ID."},"priority":{"type":"integer","format":"int32","description":"Priority."}}},"description":"Users of the tuner."}}},"RecordingFailedReason":{"oneOf":[{"type":"object","required":["message","type"],"properties":{"message":{"type":"string"},"type":{"type":"string","enum":["start-recording-failed"]}}},{"type":"object","required":["message","type"],"properties":{"message":{"type":"string"},"osError":{"type":"integer","format":"int32","nullable":true},"type":{"type":"string","enum":["io-error"]}}},{"type":"object","required":["exitCode","type"],"properties":{"exitCode":{"type":"integer","format":"int32"},"type":{"type":"string","enum":["pipeline-error"]}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["need-rescheduling"]}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["schedule-expired"]}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["removed-from-epg"]}}}],"discriminator":{"propertyName":"type"}},"RecordingOptions":{"type":"object","title":"RecordingOptions","description":"Recording options.","required":["contentPath"],"properties":{"contentPath":{"type":"string","description":"A relative path of a file to store recorded data."},"postFilters":{"type":"array","items":{"type":"string"},"description":"A list of post-filters to use."},"preFilters":{"type":"array","items":{"type":"string"},"description":"A list of pre-filters to use."},"priority":{"type":"integer","format":"int32","description":"A priority of tuner usage."}}},"RecordingScheduleState":{"type":"string","title":"RecordingScheduleState","enum":["scheduled","tracking","recording","rescheduling","finished","failed"]},"Status":{"type":"object","description":"State information of mirakc currently running."},"Version":{"type":"object","description":"Version information of mirakc currently running.","required":["current","latest"],"properties":{"current":{"type":"string","description":"Current version."},"latest":{"type":"string","description":"Same as `current`."}}},"WebOnairProgram":{"type":"object","title":"OnairProgram","description":"Metadata of TV program that is now on-air in a service.\n\nThe metadata is collected from EIT[p/f] sections, not from EIT[schedule]\nsections.","required":["serviceId"],"properties":{"current":{"allOf":[{"$ref":"#/components/schemas/MirakurunProgram"}],"nullable":true},"next":{"allOf":[{"$ref":"#/components/schemas/MirakurunProgram"}],"nullable":true},"serviceId":{"type":"integer","format":"int64","description":"Mirakurun service ID.","minimum":0}}},"WebProcessModel":{"type":"object","title":"ProcessModel","description":"A process model constituting a pipeline.","required":["command"],"properties":{"command":{"type":"string","description":"A command currently running in the pipeline."},"pid":{"type":"integer","format":"int32","description":"The process ID of a process running the command.","nullable":true,"minimum":0}}},"WebRecordingRecorder":{"type":"object","title":"RecordingRecorder","description":"A recorder model.","required":["programId","startedAt","pipeline"],"properties":{"pipeline":{"type":"array","items":{"$ref":"#/components/schemas/WebProcessModel"},"description":"A list of process models constituting the recording pipeline."},"programId":{"type":"integer","format":"int64","description":"A Mirakurun program ID of the TV program currently being recorded.","minimum":0},"startedAt":{"type":"integer","format":"int64","description":"A time when the recording started.\n\nIt's may not be equal to the start time of the TV program."}}},"WebRecordingSchedule":{"type":"object","title":"RecordingSchedule","description":"A recording schedule model.","required":["state","program","options","tags"],"properties":{"failedReason":{"allOf":[{"$ref":"#/components/schemas/RecordingFailedReason"}],"nullable":true},"options":{"$ref":"#/components/schemas/RecordingOptions"},"program":{"$ref":"#/components/schemas/MirakurunProgram"},"state":{"$ref":"#/components/schemas/RecordingScheduleState"},"tags":{"type":"array","items":{"type":"string"},"description":"A list of tags."}}},"WebRecordingScheduleInput":{"type":"object","title":"RecordingScheduleInput","description":"Input data used when creating a recording schedule.","required":["programId","options"],"properties":{"options":{"$ref":"#/components/schemas/RecordingOptions"},"programId":{"type":"integer","format":"int64","description":"A Mirakurun program ID of the target TV program.","minimum":0},"tags":{"type":"array","items":{"type":"string"},"description":"A list of tags."}}},"WebTimeshiftRecord":{"type":"object","title":"TimeshiftRecord","description":"Metadata of a timeshift record.","required":["id","program","startTime","duration","size","recording"],"properties":{"duration":{"type":"integer","format":"int64","description":"The duration of the timeshift record in milliseconds."},"id":{"type":"integer","format":"int32","description":"A timeshift record ID.","minimum":0},"program":{"$ref":"#/components/schemas/MirakurunProgram"},"recording":{"type":"boolean","description":"`true` while recording, `false` otherwise."},"size":{"type":"integer","format":"int64","description":"The size of the timeshift record in bytes.","minimum":0},"startTime":{"type":"integer","format":"int64","description":"The start time of the timeshift record in UNIX time (milliseconds)."}}},"WebTimeshiftRecorder":{"type":"object","title":"TimeshiftRecorder","description":"A timeshift recorder model.","required":["name","service","duration","numRecords","pipeline","recording"],"properties":{"currentRecordId":{"type":"integer","format":"int32","description":"An ID of the record currently being recorded.","nullable":true,"minimum":0},"duration":{"type":"integer","format":"int64","description":"The duration of the timeshift timeline.\n\n`0` when there is no record."},"endTime":{"type":"integer","format":"int64","description":"The end time of the timeshift timeline.\n\n`null` when there is no record.","nullable":true},"name":{"type":"string","description":"The timeshift recorder name defined in `config.yml`."},"numRecords":{"type":"integer","description":"The number of records available for playback.\n\nThe number will change over the recording. For example,\n[/timeshift/{recorder}/records](#/timeshift::records/getTimeshiftRecords) may\nreturn different number of records from this value.","minimum":0},"pipeline":{"type":"array","items":{"$ref":"#/components/schemas/WebProcessModel"},"description":"A list of process models constituting the timeshift pipeline currently\nrunning."},"recording":{"type":"boolean","description":"`true` while recording, `false` otherwise.\n\nUsers can still access the records even if this property returns\n`false`."},"service":{"$ref":"#/components/schemas/MirakurunService"},"startTime":{"type":"integer","format":"int64","description":"The start time of the timeshift timeline.\n\n`null` when there is no record.","nullable":true}}}}}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
components: | |
schemas: | |
ChannelType: | |
enum: | |
- GR | |
- BS | |
- CS | |
- SKY | |
type: string | |
MirakurunChannel: | |
properties: | |
channel: | |
type: string | |
name: | |
type: string | |
services: | |
items: | |
properties: | |
id: | |
format: int64 | |
minimum: 0 | |
type: integer | |
name: | |
type: string | |
networkId: | |
format: int32 | |
minimum: 0 | |
type: integer | |
serviceId: | |
format: int32 | |
minimum: 0 | |
type: integer | |
required: | |
- id | |
- serviceId | |
- networkId | |
- name | |
type: object | |
type: array | |
type: | |
$ref: '#/components/schemas/ChannelType' | |
required: | |
- type | |
- channel | |
- name | |
- services | |
title: Channel | |
type: object | |
MirakurunProgram: | |
properties: | |
audio: | |
allOf: | |
- properties: | |
componentType: | |
format: int32 | |
minimum: 0 | |
type: integer | |
isMain: | |
type: boolean | |
langs: | |
items: | |
type: string | |
type: array | |
samplingRate: | |
format: int32 | |
type: integer | |
required: | |
- componentType | |
- isMain | |
- samplingRate | |
- langs | |
type: object | |
nullable: true | |
audios: | |
items: | |
properties: | |
componentType: | |
format: int32 | |
minimum: 0 | |
type: integer | |
isMain: | |
type: boolean | |
langs: | |
items: | |
type: string | |
type: array | |
samplingRate: | |
format: int32 | |
type: integer | |
required: | |
- componentType | |
- isMain | |
- samplingRate | |
- langs | |
type: object | |
type: array | |
description: | |
nullable: true | |
type: string | |
duration: | |
format: int64 | |
type: integer | |
eventId: | |
format: int32 | |
minimum: 0 | |
type: integer | |
extended: | |
type: object | |
genres: | |
items: | |
properties: | |
lv1: | |
format: int32 | |
minimum: 0 | |
type: integer | |
lv2: | |
format: int32 | |
minimum: 0 | |
type: integer | |
un1: | |
format: int32 | |
minimum: 0 | |
type: integer | |
un2: | |
format: int32 | |
minimum: 0 | |
type: integer | |
required: | |
- lv1 | |
- lv2 | |
- un1 | |
- un2 | |
type: object | |
nullable: true | |
type: array | |
id: | |
format: int64 | |
minimum: 0 | |
type: integer | |
isFree: | |
type: boolean | |
name: | |
nullable: true | |
type: string | |
networkId: | |
format: int32 | |
minimum: 0 | |
type: integer | |
relatedItems: | |
items: | |
properties: | |
eventId: | |
format: int32 | |
minimum: 0 | |
type: integer | |
networkId: | |
format: int32 | |
minimum: 0 | |
nullable: true | |
type: integer | |
serviceId: | |
format: int32 | |
minimum: 0 | |
type: integer | |
type: | |
type: string | |
required: | |
- type | |
- serviceId | |
- eventId | |
type: object | |
type: array | |
series: | |
allOf: | |
- properties: | |
episode: | |
format: int32 | |
minimum: 0 | |
type: integer | |
expireAt: | |
format: int64 | |
type: integer | |
id: | |
format: int32 | |
minimum: 0 | |
type: integer | |
lastEpisode: | |
format: int32 | |
minimum: 0 | |
type: integer | |
name: | |
type: string | |
pattern: | |
format: int32 | |
minimum: 0 | |
type: integer | |
repeat: | |
format: int32 | |
minimum: 0 | |
type: integer | |
required: | |
- id | |
- repeat | |
- pattern | |
- expireAt | |
- episode | |
- lastEpisode | |
- name | |
type: object | |
nullable: true | |
serviceId: | |
format: int32 | |
minimum: 0 | |
type: integer | |
startAt: | |
format: int64 | |
type: integer | |
video: | |
allOf: | |
- properties: | |
componentType: | |
format: int32 | |
minimum: 0 | |
type: integer | |
resolution: | |
nullable: true | |
type: string | |
streamContent: | |
format: int32 | |
minimum: 0 | |
type: integer | |
type: | |
nullable: true | |
type: string | |
required: | |
- streamContent | |
- componentType | |
type: object | |
nullable: true | |
required: | |
- id | |
- eventId | |
- serviceId | |
- networkId | |
- startAt | |
- duration | |
- isFree | |
title: Program | |
type: object | |
MirakurunService: | |
properties: | |
channel: | |
properties: | |
channel: | |
type: string | |
type: | |
$ref: '#/components/schemas/ChannelType' | |
required: | |
- type | |
- channel | |
type: object | |
hasLogoData: | |
type: boolean | |
id: | |
format: int64 | |
minimum: 0 | |
type: integer | |
logoId: | |
format: int32 | |
type: integer | |
name: | |
type: string | |
networkId: | |
format: int32 | |
minimum: 0 | |
type: integer | |
remoteControlKeyId: | |
format: int32 | |
minimum: 0 | |
type: integer | |
serviceId: | |
format: int32 | |
minimum: 0 | |
type: integer | |
type: | |
format: int32 | |
minimum: 0 | |
type: integer | |
required: | |
- id | |
- serviceId | |
- networkId | |
- type | |
- name | |
- channel | |
- hasLogoData | |
title: Service | |
type: object | |
MirakurunTuner: | |
properties: | |
command: | |
description: A command to use getting a media stream from the tuner. | |
nullable: true | |
type: string | |
index: | |
description: The index of the tuner defined in `config.yml`. | |
minimum: 0 | |
type: integer | |
isAvailable: | |
description: Always `true`. | |
type: boolean | |
isFault: | |
description: Always `false`. | |
type: boolean | |
isFree: | |
description: '`true` if the tuner is free, `false` otherwise.' | |
type: boolean | |
isRemote: | |
description: Always `false`. | |
type: boolean | |
isUsing: | |
description: '`false` if the tuner is free, `true` otherwise.' | |
type: boolean | |
name: | |
description: The name of the tuner defined in `config.yml`. | |
type: string | |
pid: | |
description: PID of a process to run the command. | |
format: int32 | |
minimum: 0 | |
nullable: true | |
type: integer | |
types: | |
description: Channel types supported by the tuner. | |
items: | |
$ref: '#/components/schemas/ChannelType' | |
type: array | |
users: | |
description: Users of the tuner. | |
items: | |
properties: | |
agent: | |
description: User-Agent string. | |
nullable: true | |
type: string | |
id: | |
description: User ID. | |
type: string | |
priority: | |
description: Priority. | |
format: int32 | |
type: integer | |
required: | |
- id | |
- priority | |
type: object | |
type: array | |
required: | |
- index | |
- name | |
- types | |
- users | |
- isAvailable | |
- isRemote | |
- isFree | |
- isUsing | |
- isFault | |
title: Tuner | |
type: object | |
RecordingFailedReason: | |
discriminator: | |
propertyName: type | |
oneOf: | |
- properties: | |
message: | |
type: string | |
type: | |
enum: | |
- start-recording-failed | |
type: string | |
required: | |
- message | |
- type | |
type: object | |
- properties: | |
message: | |
type: string | |
osError: | |
format: int32 | |
nullable: true | |
type: integer | |
type: | |
enum: | |
- io-error | |
type: string | |
required: | |
- message | |
- type | |
type: object | |
- properties: | |
exitCode: | |
format: int32 | |
type: integer | |
type: | |
enum: | |
- pipeline-error | |
type: string | |
required: | |
- exitCode | |
- type | |
type: object | |
- properties: | |
type: | |
enum: | |
- need-rescheduling | |
type: string | |
required: | |
- type | |
type: object | |
- properties: | |
type: | |
enum: | |
- schedule-expired | |
type: string | |
required: | |
- type | |
type: object | |
- properties: | |
type: | |
enum: | |
- removed-from-epg | |
type: string | |
required: | |
- type | |
type: object | |
RecordingOptions: | |
description: Recording options. | |
properties: | |
contentPath: | |
description: A relative path of a file to store recorded data. | |
type: string | |
postFilters: | |
description: A list of post-filters to use. | |
items: | |
type: string | |
type: array | |
preFilters: | |
description: A list of pre-filters to use. | |
items: | |
type: string | |
type: array | |
priority: | |
description: A priority of tuner usage. | |
format: int32 | |
type: integer | |
required: | |
- contentPath | |
title: RecordingOptions | |
type: object | |
RecordingScheduleState: | |
enum: | |
- scheduled | |
- tracking | |
- recording | |
- rescheduling | |
- finished | |
- failed | |
title: RecordingScheduleState | |
type: string | |
Status: | |
description: State information of mirakc currently running. | |
type: object | |
Version: | |
description: Version information of mirakc currently running. | |
properties: | |
current: | |
description: Current version. | |
type: string | |
latest: | |
description: Same as `current`. | |
type: string | |
required: | |
- current | |
- latest | |
type: object | |
WebOnairProgram: | |
description: 'Metadata of TV program that is now on-air in a service. | |
The metadata is collected from EIT[p/f] sections, not from EIT[schedule] | |
sections.' | |
properties: | |
current: | |
allOf: | |
- $ref: '#/components/schemas/MirakurunProgram' | |
nullable: true | |
next: | |
allOf: | |
- $ref: '#/components/schemas/MirakurunProgram' | |
nullable: true | |
serviceId: | |
description: Mirakurun service ID. | |
format: int64 | |
minimum: 0 | |
type: integer | |
required: | |
- serviceId | |
title: OnairProgram | |
type: object | |
WebProcessModel: | |
description: A process model constituting a pipeline. | |
properties: | |
command: | |
description: A command currently running in the pipeline. | |
type: string | |
pid: | |
description: The process ID of a process running the command. | |
format: int32 | |
minimum: 0 | |
nullable: true | |
type: integer | |
required: | |
- command | |
title: ProcessModel | |
type: object | |
WebRecordingRecorder: | |
description: A recorder model. | |
properties: | |
pipeline: | |
description: A list of process models constituting the recording pipeline. | |
items: | |
$ref: '#/components/schemas/WebProcessModel' | |
type: array | |
programId: | |
description: A Mirakurun program ID of the TV program currently being recorded. | |
format: int64 | |
minimum: 0 | |
type: integer | |
startedAt: | |
description: 'A time when the recording started. | |
It''s may not be equal to the start time of the TV program.' | |
format: int64 | |
type: integer | |
required: | |
- programId | |
- startedAt | |
- pipeline | |
title: RecordingRecorder | |
type: object | |
WebRecordingSchedule: | |
description: A recording schedule model. | |
properties: | |
failedReason: | |
allOf: | |
- $ref: '#/components/schemas/RecordingFailedReason' | |
nullable: true | |
options: | |
$ref: '#/components/schemas/RecordingOptions' | |
program: | |
$ref: '#/components/schemas/MirakurunProgram' | |
state: | |
$ref: '#/components/schemas/RecordingScheduleState' | |
tags: | |
description: A list of tags. | |
items: | |
type: string | |
type: array | |
required: | |
- state | |
- program | |
- options | |
- tags | |
title: RecordingSchedule | |
type: object | |
WebRecordingScheduleInput: | |
description: Input data used when creating a recording schedule. | |
properties: | |
options: | |
$ref: '#/components/schemas/RecordingOptions' | |
programId: | |
description: A Mirakurun program ID of the target TV program. | |
format: int64 | |
minimum: 0 | |
type: integer | |
tags: | |
description: A list of tags. | |
items: | |
type: string | |
type: array | |
required: | |
- programId | |
- options | |
title: RecordingScheduleInput | |
type: object | |
WebTimeshiftRecord: | |
description: Metadata of a timeshift record. | |
properties: | |
duration: | |
description: The duration of the timeshift record in milliseconds. | |
format: int64 | |
type: integer | |
id: | |
description: A timeshift record ID. | |
format: int32 | |
minimum: 0 | |
type: integer | |
program: | |
$ref: '#/components/schemas/MirakurunProgram' | |
recording: | |
description: '`true` while recording, `false` otherwise.' | |
type: boolean | |
size: | |
description: The size of the timeshift record in bytes. | |
format: int64 | |
minimum: 0 | |
type: integer | |
startTime: | |
description: The start time of the timeshift record in UNIX time (milliseconds). | |
format: int64 | |
type: integer | |
required: | |
- id | |
- program | |
- startTime | |
- duration | |
- size | |
- recording | |
title: TimeshiftRecord | |
type: object | |
WebTimeshiftRecorder: | |
description: A timeshift recorder model. | |
properties: | |
currentRecordId: | |
description: An ID of the record currently being recorded. | |
format: int32 | |
minimum: 0 | |
nullable: true | |
type: integer | |
duration: | |
description: 'The duration of the timeshift timeline. | |
`0` when there is no record.' | |
format: int64 | |
type: integer | |
endTime: | |
description: 'The end time of the timeshift timeline. | |
`null` when there is no record.' | |
format: int64 | |
nullable: true | |
type: integer | |
name: | |
description: The timeshift recorder name defined in `config.yml`. | |
type: string | |
numRecords: | |
description: 'The number of records available for playback. | |
The number will change over the recording. For example, | |
[/timeshift/{recorder}/records](#/timeshift::records/getTimeshiftRecords) | |
may | |
return different number of records from this value.' | |
minimum: 0 | |
type: integer | |
pipeline: | |
description: 'A list of process models constituting the timeshift pipeline | |
currently | |
running.' | |
items: | |
$ref: '#/components/schemas/WebProcessModel' | |
type: array | |
recording: | |
description: '`true` while recording, `false` otherwise. | |
Users can still access the records even if this property returns | |
`false`.' | |
type: boolean | |
service: | |
$ref: '#/components/schemas/MirakurunService' | |
startTime: | |
description: 'The start time of the timeshift timeline. | |
`null` when there is no record.' | |
format: int64 | |
nullable: true | |
type: integer | |
required: | |
- name | |
- service | |
- duration | |
- numRecords | |
- pipeline | |
- recording | |
title: TimeshiftRecorder | |
type: object | |
info: | |
contact: | |
name: Contributors of mirakc | |
description: '' | |
license: | |
name: MIT OR Apache-2.0 | |
title: mirakc Web API | |
version: 3.2.3 | |
openapi: 3.0.3 | |
paths: | |
/channels: | |
get: | |
operationId: getChannels | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
items: | |
$ref: '#/components/schemas/MirakurunChannel' | |
type: array | |
description: OK | |
'500': | |
description: Internal Server Error | |
summary: Lists channels. | |
tags: | |
- channels | |
parameters: [] | |
/channels/{type}/{channel}/services/{sid}/stream: | |
get: | |
operationId: getServiceStreamByChannel | |
parameters: | |
- description: Priority of the tuner user | |
in: header | |
name: X-Mirakurun-Priority | |
required: false | |
schema: | |
format: int32 | |
nullable: true | |
type: integer | |
- description: Channel type | |
in: path | |
name: type | |
required: true | |
schema: | |
$ref: '#/components/schemas/ChannelType' | |
- description: Channel number | |
in: path | |
name: channel | |
required: true | |
schema: | |
type: string | |
- description: Service ID (not Mirakurun Service ID) | |
in: path | |
name: sid | |
required: true | |
schema: | |
format: int32 | |
minimum: 0 | |
type: integer | |
- description: '`0` or `false` disables decoding. | |
The stream will be decoded by default if a decoder is specified in the | |
`config.yml`.' | |
in: query | |
name: decode | |
required: false | |
schema: | |
type: boolean | |
- description: A list of pre-filters to use. | |
in: query | |
name: pre-filters | |
required: false | |
schema: | |
items: | |
type: string | |
type: array | |
- description: A list of post-filters to use. | |
in: query | |
name: post-filters | |
required: false | |
schema: | |
items: | |
type: string | |
type: array | |
responses: | |
'200': | |
description: OK | |
headers: | |
X-Mirakurun-Tuner-User-ID: | |
description: Tuner user ID | |
schema: | |
type: string | |
'404': | |
description: Not Found | |
'500': | |
description: Internal Server Error | |
'503': | |
description: Tuner Resource Unavailable | |
summary: Gets a media stream of a service. | |
tags: | |
- channels::services::stream | |
- stream | |
head: | |
operationId: head | |
parameters: | |
- description: Priority of the tuner user | |
in: header | |
name: X-Mirakurun-Priority | |
required: false | |
schema: | |
format: int32 | |
nullable: true | |
type: integer | |
- description: Channel type | |
in: path | |
name: type | |
required: true | |
schema: | |
$ref: '#/components/schemas/ChannelType' | |
- description: Channel number | |
in: path | |
name: channel | |
required: true | |
schema: | |
type: string | |
- description: Service ID (not Mirakurun Service ID) | |
in: path | |
name: sid | |
required: true | |
schema: | |
format: int32 | |
minimum: 0 | |
type: integer | |
- description: '`0` or `false` disables decoding. | |
The stream will be decoded by default if a decoder is specified in the | |
`config.yml`.' | |
in: query | |
name: decode | |
required: false | |
schema: | |
type: boolean | |
- description: A list of pre-filters to use. | |
in: query | |
name: pre-filters | |
required: false | |
schema: | |
items: | |
type: string | |
type: array | |
- description: A list of post-filters to use. | |
in: query | |
name: post-filters | |
required: false | |
schema: | |
items: | |
type: string | |
type: array | |
responses: | |
'200': | |
description: OK | |
headers: | |
X-Mirakurun-Tuner-User-ID: | |
description: Tuner user ID | |
schema: | |
type: string | |
'404': | |
description: Not Found | |
'500': | |
description: Internal Server Error | |
'503': | |
description: Tuner Resource Unavailable | |
tags: | |
- channels::services::stream | |
- stream | |
parameters: [] | |
/channels/{type}/{channel}/stream: | |
get: | |
operationId: getChannelStream | |
parameters: | |
- description: Priority of the tuner user | |
in: header | |
name: X-Mirakurun-Priority | |
required: false | |
schema: | |
format: int32 | |
nullable: true | |
type: integer | |
- description: Channel type | |
in: path | |
name: type | |
required: true | |
schema: | |
$ref: '#/components/schemas/ChannelType' | |
- description: Channel number | |
in: path | |
name: channel | |
required: true | |
schema: | |
type: string | |
- description: '`0` or `false` disables decoding. | |
The stream will be decoded by default if a decoder is specified in the | |
`config.yml`.' | |
in: query | |
name: decode | |
required: false | |
schema: | |
type: boolean | |
- description: A list of pre-filters to use. | |
in: query | |
name: pre-filters | |
required: false | |
schema: | |
items: | |
type: string | |
type: array | |
- description: A list of post-filters to use. | |
in: query | |
name: post-filters | |
required: false | |
schema: | |
items: | |
type: string | |
type: array | |
responses: | |
'200': | |
description: OK | |
headers: | |
X-Mirakurun-Tuner-User-ID: | |
description: Tuner user ID | |
schema: | |
type: string | |
'404': | |
description: Not Found | |
'500': | |
description: Internal Server Error | |
'503': | |
description: Tuner Resource Unavailable | |
summary: Gets a media stream of a channel. | |
tags: | |
- channels::stream | |
- stream | |
head: | |
operationId: checkChannelStream | |
parameters: | |
- description: Priority of the tuner user | |
in: header | |
name: X-Mirakurun-Priority | |
required: false | |
schema: | |
format: int32 | |
nullable: true | |
type: integer | |
- description: Channel type | |
in: path | |
name: type | |
required: true | |
schema: | |
$ref: '#/components/schemas/ChannelType' | |
- description: Channel number | |
in: path | |
name: channel | |
required: true | |
schema: | |
type: string | |
- description: '`0` or `false` disables decoding. | |
The stream will be decoded by default if a decoder is specified in the | |
`config.yml`.' | |
in: query | |
name: decode | |
required: false | |
schema: | |
type: boolean | |
- description: A list of pre-filters to use. | |
in: query | |
name: pre-filters | |
required: false | |
schema: | |
items: | |
type: string | |
type: array | |
- description: A list of post-filters to use. | |
in: query | |
name: post-filters | |
required: false | |
schema: | |
items: | |
type: string | |
type: array | |
responses: | |
'200': | |
description: OK | |
headers: | |
X-Mirakurun-Tuner-User-ID: | |
description: Tuner user ID | |
schema: | |
type: string | |
'404': | |
description: Not Found | |
'500': | |
description: Internal Server Error | |
'503': | |
description: Tuner Resource Unavailable | |
tags: | |
- channels::stream | |
- stream | |
parameters: [] | |
/iptv/epg: | |
get: | |
operationId: epg | |
responses: | |
'200': | |
content: | |
application/xml: | |
schema: | |
type: string | |
description: OK | |
'500': | |
description: Internal Server Error | |
summary: Gets an XMLTV document containing all TV program information. | |
tags: | |
- iptv | |
parameters: [] | |
/iptv/playlist: | |
get: | |
operationId: playlist | |
responses: | |
'200': | |
content: | |
application/x-mpegURL: | |
schema: | |
type: string | |
description: OK | |
'500': | |
description: Internal Server Error | |
summary: Get an M3U8 playlist containing all available services. | |
tags: | |
- iptv | |
parameters: [] | |
/iptv/xmltv: | |
get: | |
description: For compatibility with Mirakurun. | |
operationId: xmltv | |
responses: | |
'200': | |
content: | |
application/xml: | |
schema: | |
type: string | |
description: OK | |
'500': | |
description: Internal Server Error | |
summary: Gets an XMLTV document containing all TV program information. | |
tags: | |
- iptv | |
parameters: [] | |
/onair: | |
get: | |
operationId: getOnairPrograms | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
items: | |
$ref: '#/components/schemas/WebOnairProgram' | |
type: array | |
description: OK | |
'500': | |
description: Internal Server Error | |
summary: List on-air programs. | |
tags: | |
- onair | |
parameters: [] | |
/onair/{service_id}: | |
get: | |
operationId: getOnairProgram | |
parameters: | |
- description: Mirakurun service ID | |
in: path | |
name: service_id | |
required: true | |
schema: | |
format: int64 | |
minimum: 0 | |
type: integer | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
items: | |
$ref: '#/components/schemas/WebOnairProgram' | |
type: array | |
description: OK | |
'404': | |
description: Not Found | |
'500': | |
description: Internal Server Error | |
summary: Gets an on-air program of a specified service. | |
tags: | |
- onair | |
parameters: [] | |
/programs: | |
get: | |
description: 'The list contains TV programs that have ended. | |
A newer Mirakurun returns information contained in EIT[schedule] | |
overridded by EIT[p/f] from this endpoint. This may cause' | |
operationId: getPrograms | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
items: | |
$ref: '#/components/schemas/MirakurunProgram' | |
type: array | |
description: OK | |
'500': | |
description: Internal Server Error | |
summary: Lists TV programs. | |
tags: | |
- programs | |
parameters: [] | |
/programs/{id}: | |
get: | |
description: '### A special hack for EPGStation | |
If the User-Agent header string starts with "EPGStation/", this endpoint | |
returns information contained in EIT[p/f] if it exists. Otherwise, | |
information contained in EIT[schedule] is returned. | |
EPGStation calls this endpoint in order to update the start time and the | |
duration of the TV program while recording. The intention of this call is | |
assumed that EPGStation wants to get the TV program information equivalent | |
to EIT[p]. However, this endpoint should return information contained in | |
EIT[schedule] basically in a web API consistency point of view. Information | |
contained in EIT[p/f] should be returned from other endpoints. | |
See also [/programs/{id}/stream](#/stream/getProgramStream).' | |
operationId: getProgram | |
parameters: | |
- description: Mirakurun program ID | |
in: path | |
name: id | |
required: true | |
schema: | |
format: int64 | |
minimum: 0 | |
type: integer | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
items: | |
$ref: '#/components/schemas/MirakurunProgram' | |
type: array | |
description: OK | |
'404': | |
description: Not Found | |
'500': | |
description: Internal Server Error | |
summary: Gets a TV program. | |
tags: | |
- programs | |
parameters: [] | |
/programs/{id}/stream: | |
get: | |
description: '### A special hack for EPGStation | |
If the User-Agent header string starts with "EPGStation/", this endpoint | |
creates a temporal on-air program tracker if there is no tracker defined in | |
config.yml, which can be reused for tracking changes of the TV program | |
metadata. | |
The temporal on-air program tracker will be stopped within 1 minute after | |
the streaming stopped. | |
The metadata will be returned from [/programs/{id}](#/programs/getProgram).' | |
operationId: getProgramStream | |
parameters: | |
- description: Priority of the tuner user | |
in: header | |
name: X-Mirakurun-Priority | |
required: false | |
schema: | |
format: int32 | |
nullable: true | |
type: integer | |
- description: Mirakurun program ID | |
in: path | |
name: id | |
required: true | |
schema: | |
format: int64 | |
minimum: 0 | |
type: integer | |
- description: '`0` or `false` disables decoding. | |
The stream will be decoded by default if a decoder is specified in the | |
`config.yml`.' | |
in: query | |
name: decode | |
required: false | |
schema: | |
type: boolean | |
- description: A list of pre-filters to use. | |
in: query | |
name: pre-filters | |
required: false | |
schema: | |
items: | |
type: string | |
type: array | |
- description: A list of post-filters to use. | |
in: query | |
name: post-filters | |
required: false | |
schema: | |
items: | |
type: string | |
type: array | |
responses: | |
'200': | |
description: OK | |
headers: | |
X-Mirakurun-Tuner-User-ID: | |
description: Tuner user ID | |
schema: | |
type: string | |
'404': | |
description: Not Found | |
'500': | |
description: Internal Server Error | |
'503': | |
description: Tuner Resource Unavailable | |
summary: Gets a media stream of a program. | |
tags: | |
- programs::stream | |
- stream | |
head: | |
operationId: checkProgramStream | |
parameters: | |
- description: Priority of the tuner user | |
in: header | |
name: X-Mirakurun-Priority | |
required: false | |
schema: | |
format: int32 | |
nullable: true | |
type: integer | |
- description: Mirakurun program ID | |
in: path | |
name: id | |
required: true | |
schema: | |
format: int64 | |
minimum: 0 | |
type: integer | |
- description: '`0` or `false` disables decoding. | |
The stream will be decoded by default if a decoder is specified in the | |
`config.yml`.' | |
in: query | |
name: decode | |
required: false | |
schema: | |
type: boolean | |
- description: A list of pre-filters to use. | |
in: query | |
name: pre-filters | |
required: false | |
schema: | |
items: | |
type: string | |
type: array | |
- description: A list of post-filters to use. | |
in: query | |
name: post-filters | |
required: false | |
schema: | |
items: | |
type: string | |
type: array | |
responses: | |
'200': | |
description: OK | |
headers: | |
X-Mirakurun-Tuner-User-ID: | |
description: Tuner user ID | |
schema: | |
type: string | |
'404': | |
description: Not Found | |
'500': | |
description: Internal Server Error | |
'503': | |
description: Tuner Resource Unavailable | |
tags: | |
- programs::stream | |
- stream | |
parameters: [] | |
/services: | |
get: | |
operationId: getServices | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
items: | |
$ref: '#/components/schemas/MirakurunService' | |
type: array | |
description: OK | |
'500': | |
description: Internal Server Error | |
summary: Lists services. | |
tags: | |
- services | |
parameters: [] | |
/services/{id}: | |
get: | |
operationId: getService | |
parameters: | |
- description: Mirakurun service ID | |
in: path | |
name: id | |
required: true | |
schema: | |
format: int64 | |
minimum: 0 | |
type: integer | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/MirakurunService' | |
description: OK | |
'404': | |
description: Not Found | |
'500': | |
description: Internal Server Error | |
summary: Gets a service. | |
tags: | |
- services | |
parameters: [] | |
/services/{id}/logo: | |
get: | |
operationId: getLogoImage | |
parameters: | |
- description: Mirakurun service ID | |
in: path | |
name: id | |
required: true | |
schema: | |
format: int64 | |
minimum: 0 | |
type: integer | |
responses: | |
'200': | |
description: OK | |
'404': | |
description: Not Found | |
'500': | |
description: Internal Server Error | |
'503': | |
description: Logo Data Unavailable | |
summary: Gets a logo image of a service. | |
tags: | |
- services | |
parameters: [] | |
/services/{id}/programs: | |
get: | |
description: The list contains TV programs that have ended. | |
operationId: getProgramsOfService | |
parameters: | |
- description: Mirakurun service ID | |
in: path | |
name: id | |
required: true | |
schema: | |
format: int64 | |
minimum: 0 | |
type: integer | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
items: | |
$ref: '#/components/schemas/MirakurunProgram' | |
type: array | |
description: OK | |
'404': | |
description: Not Found | |
'500': | |
description: Internal Server Error | |
summary: Lists TV programs of a service. | |
tags: | |
- services | |
parameters: [] | |
/services/{id}/stream: | |
get: | |
operationId: getServiceStream | |
parameters: | |
- description: Priority of the tuner user | |
in: header | |
name: X-Mirakurun-Priority | |
required: false | |
schema: | |
format: int32 | |
nullable: true | |
type: integer | |
- description: Mirakurun service ID | |
in: path | |
name: id | |
required: true | |
schema: | |
format: int64 | |
minimum: 0 | |
type: integer | |
- description: '`0` or `false` disables decoding. | |
The stream will be decoded by default if a decoder is specified in the | |
`config.yml`.' | |
in: query | |
name: decode | |
required: false | |
schema: | |
type: boolean | |
- description: A list of pre-filters to use. | |
in: query | |
name: pre-filters | |
required: false | |
schema: | |
items: | |
type: string | |
type: array | |
- description: A list of post-filters to use. | |
in: query | |
name: post-filters | |
required: false | |
schema: | |
items: | |
type: string | |
type: array | |
responses: | |
'200': | |
description: OK | |
headers: | |
X-Mirakurun-Tuner-User-ID: | |
description: Tuner user ID | |
schema: | |
type: string | |
'404': | |
description: Not Found | |
'500': | |
description: Internal Server Error | |
'503': | |
description: Tuner Resource Unavailable | |
summary: Gets a media stream of a service. | |
tags: | |
- services::stream | |
- stream | |
head: | |
operationId: checkServiceStream | |
parameters: | |
- description: Priority of the tuner user | |
in: header | |
name: X-Mirakurun-Priority | |
required: false | |
schema: | |
format: int32 | |
nullable: true | |
type: integer | |
- description: Mirakurun service ID | |
in: path | |
name: id | |
required: true | |
schema: | |
format: int64 | |
minimum: 0 | |
type: integer | |
- description: '`0` or `false` disables decoding. | |
The stream will be decoded by default if a decoder is specified in the | |
`config.yml`.' | |
in: query | |
name: decode | |
required: false | |
schema: | |
type: boolean | |
- description: A list of pre-filters to use. | |
in: query | |
name: pre-filters | |
required: false | |
schema: | |
items: | |
type: string | |
type: array | |
- description: A list of post-filters to use. | |
in: query | |
name: post-filters | |
required: false | |
schema: | |
items: | |
type: string | |
type: array | |
responses: | |
'200': | |
description: OK | |
headers: | |
X-Mirakurun-Tuner-User-ID: | |
description: Tuner user ID | |
schema: | |
type: string | |
'404': | |
description: Not Found | |
'500': | |
description: Internal Server Error | |
'503': | |
description: Tuner Resource Unavailable | |
tags: | |
- services::stream | |
- stream | |
parameters: [] | |
/status: | |
get: | |
description: mirakc doesn't implement this endpoint and always returns an empty | |
object. | |
operationId: getStatus | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Status' | |
description: OK | |
summary: Gets current status information. | |
tags: | |
- status | |
parameters: [] | |
/tuners: | |
get: | |
operationId: getTuners | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
items: | |
$ref: '#/components/schemas/MirakurunTuner' | |
type: array | |
description: OK | |
'500': | |
description: Internal Server Error | |
summary: Lists tuners enabled in `config.yml`. | |
tags: | |
- tuners | |
parameters: [] | |
/tuners/{index}: | |
get: | |
operationId: getTuner | |
parameters: | |
- description: Tuner index | |
in: path | |
name: index | |
required: true | |
schema: | |
minimum: 0 | |
type: integer | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/MirakurunTuner' | |
description: OK | |
'404': | |
description: Not Found | |
'500': | |
description: Internal Server Error | |
summary: Gets a tuner model. | |
tags: | |
- tuners | |
parameters: [] | |
/version: | |
get: | |
operationId: checkVersion | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Version' | |
description: OK | |
summary: Gets version information. | |
tags: | |
- version | |
parameters: [] | |
servers: | |
- url: /api | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment