Created
August 21, 2021 11:30
-
-
Save ci7lus/48fe213cb99117c8ba46bad72d57cd8f to your computer and use it in GitHub Desktop.
Mirakurun 3.9.0-beta.1 Swagger
This file contains 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
{ | |
"swagger": "2.0", | |
"info": { | |
"title": "Mirakurun", | |
"version": "3.9.0-beta.1", | |
"description": "DVR Tuner Server Service for Chinachu Air.", | |
"contact": { "name": "kanreisa", "url": "https://github.com/kanreisa" } | |
}, | |
"basePath": "/api", | |
"consumes": ["application/json"], | |
"produces": ["application/json"], | |
"paths": { | |
"/version/update": { | |
"parameters": [], | |
"put": { | |
"tags": ["version"], | |
"operationId": "updateVersion", | |
"produces": ["text/plain", "application/json"], | |
"parameters": [ | |
{ | |
"in": "query", | |
"name": "force", | |
"type": "boolean", | |
"required": false | |
} | |
], | |
"responses": { | |
"202": { "description": "Accepted" }, | |
"409": { | |
"description": "Update Nothing", | |
"schema": { "$ref": "#/definitions/Error" } | |
}, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
}, | |
"/version": { | |
"parameters": [], | |
"get": { | |
"tags": ["version"], | |
"operationId": "checkVersion", | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { "$ref": "#/definitions/Version" } | |
}, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
}, | |
"/tuners": { | |
"parameters": [], | |
"get": { | |
"tags": ["tuners"], | |
"operationId": "getTuners", | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { | |
"type": "array", | |
"items": { "$ref": "#/definitions/TunerDevice" } | |
} | |
}, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
}, | |
"/status": { | |
"parameters": [], | |
"get": { | |
"tags": ["status"], | |
"summary": "Get Status", | |
"operationId": "getStatus", | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { "$ref": "#/definitions/Status" } | |
}, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
}, | |
"/services": { | |
"parameters": [], | |
"get": { | |
"tags": ["services"], | |
"operationId": "getServices", | |
"parameters": [ | |
{ | |
"in": "query", | |
"name": "serviceId", | |
"type": "integer", | |
"required": false | |
}, | |
{ | |
"in": "query", | |
"name": "networkId", | |
"type": "integer", | |
"required": false | |
}, | |
{ | |
"in": "query", | |
"name": "name", | |
"type": "string", | |
"required": false | |
}, | |
{ | |
"in": "query", | |
"name": "type", | |
"type": "integer", | |
"required": false | |
}, | |
{ | |
"in": "query", | |
"name": "channel.type", | |
"type": "string", | |
"enum": ["GR", "BS", "CS", "SKY"], | |
"required": false | |
}, | |
{ | |
"in": "query", | |
"name": "channel.channel", | |
"type": "string", | |
"required": false | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { | |
"type": "array", | |
"items": { "$ref": "#/definitions/Service" } | |
} | |
}, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
}, | |
"/restart": { | |
"parameters": [], | |
"put": { | |
"tags": ["misc"], | |
"summary": "Restart Mirakurun", | |
"operationId": "restart", | |
"produces": ["application/json"], | |
"responses": { | |
"202": { "description": "Accepted" }, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
}, | |
"/programs": { | |
"parameters": [], | |
"get": { | |
"tags": ["programs"], | |
"operationId": "getPrograms", | |
"parameters": [ | |
{ | |
"in": "query", | |
"name": "networkId", | |
"type": "integer", | |
"required": false | |
}, | |
{ | |
"in": "query", | |
"name": "serviceId", | |
"type": "integer", | |
"required": false | |
}, | |
{ | |
"in": "query", | |
"name": "eventId", | |
"type": "integer", | |
"required": false | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { | |
"type": "array", | |
"items": { "$ref": "#/definitions/Program" } | |
} | |
}, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
}, | |
"/log/stream": { | |
"parameters": [], | |
"get": { | |
"tags": ["log", "stream"], | |
"operationId": "getLogStream", | |
"responses": { | |
"200": { "description": "OK" }, | |
"default": { "description": "Unexpected Error" } | |
} | |
} | |
}, | |
"/log": { | |
"parameters": [], | |
"get": { | |
"tags": ["log"], | |
"operationId": "getLog", | |
"produces": ["text/plain"], | |
"responses": { | |
"200": { "description": "OK" }, | |
"default": { "description": "Unexpected Error" } | |
} | |
} | |
}, | |
"/iptv/xmltv": { | |
"parameters": [], | |
"get": { | |
"tags": ["iptv"], | |
"summary": "IPTV - XMLTV EPG Data", | |
"produces": ["text/xml"], | |
"responses": { | |
"200": { "description": "OK" }, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
}, | |
"/iptv/playlist": { | |
"parameters": [], | |
"get": { | |
"tags": ["iptv"], | |
"summary": "IPTV - M3U Playlist", | |
"produces": ["application/x-mpegURL"], | |
"responses": { | |
"200": { "description": "OK" }, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
}, | |
"/iptv/lineup.json": { | |
"parameters": [], | |
"get": { | |
"tags": ["iptv"], | |
"summary": "IPTV - Media Server Support", | |
"responses": { | |
"200": { "description": "OK" }, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
}, | |
"/iptv/lineup_status.json": { | |
"parameters": [], | |
"get": { | |
"tags": ["iptv"], | |
"summary": "IPTV - Media Server Support", | |
"responses": { | |
"200": { "description": "OK" }, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
}, | |
"/iptv/discover.json": { | |
"parameters": [], | |
"get": { | |
"tags": ["iptv"], | |
"summary": "IPTV - Media Server Support", | |
"responses": { | |
"200": { "description": "OK" }, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
}, | |
"/events/stream": { | |
"parameters": [], | |
"get": { | |
"tags": ["events", "stream"], | |
"operationId": "getEventsStream", | |
"parameters": [ | |
{ | |
"in": "query", | |
"name": "resource", | |
"type": "string", | |
"enum": ["program", "service", "tuner"], | |
"required": false | |
}, | |
{ | |
"in": "query", | |
"name": "type", | |
"type": "string", | |
"enum": ["create", "update", "redefine"], | |
"required": false | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { | |
"type": "array", | |
"items": { "$ref": "#/definitions/Event" } | |
} | |
}, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
}, | |
"/events": { | |
"parameters": [], | |
"get": { | |
"tags": ["events"], | |
"operationId": "getEvents", | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { | |
"type": "array", | |
"items": { "$ref": "#/definitions/Event" } | |
} | |
}, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
}, | |
"/config/tuners": { | |
"parameters": [], | |
"get": { | |
"tags": ["config"], | |
"operationId": "getTunersConfig", | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { "$ref": "#/definitions/ConfigTuners" } | |
}, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
}, | |
"put": { | |
"tags": ["config"], | |
"operationId": "updateTunersConfig", | |
"parameters": [ | |
{ | |
"in": "body", | |
"name": "body", | |
"schema": { "$ref": "#/definitions/ConfigTuners" } | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { "$ref": "#/definitions/ConfigTuners" } | |
}, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
}, | |
"/config/server": { | |
"parameters": [], | |
"get": { | |
"tags": ["config"], | |
"operationId": "getServerConfig", | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { "$ref": "#/definitions/ConfigServer" } | |
}, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
}, | |
"put": { | |
"tags": ["config"], | |
"operationId": "updateServerConfig", | |
"parameters": [ | |
{ | |
"in": "body", | |
"name": "body", | |
"schema": { "$ref": "#/definitions/ConfigServer" } | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { "$ref": "#/definitions/ConfigServer" } | |
}, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
}, | |
"/config/channels/scan": { | |
"parameters": [], | |
"put": { | |
"tags": ["config"], | |
"summary": "Channel Scan", | |
"description": "Entry rewriting specifications:\n- The scan is performed on a range of channels of the specified type and the entries for those channels, if any, are saved in the configuration file.\n- If the channel to be scanned is described in the configuration file and is enabled, the scan will not be performed for that channel and the entries described will remain intact. If you do not want to keep the entries, use the `refresh` option.\n- All entries outside the channel range of the specified type will be deleted.\n- All entries of a type other than the specified type will remain.\n\nAbout BS Subchannel Style:\n- Only when scanning BS, you can specify the channel number in the subchannel style (e.g. BS01_0). To specify the channel number, use minSubCh and maxSubCh in addition to minCh and maxCh.\n- The subchannel number parameters (minSubCh, maxSubCh) are used only if the type is BS and are ignored otherwise.\n- Subchannel style scans scan in the following range:\n From `BS${minCh}_${minSubCh}` to `BS${maxCh}_${maxSubCh}`\n- In the subchannel style, minCh and maxCh are zero padded to two digits. minSubCh and maxSubCh are not padded.\n- BS \"non\" subchannel style scans and GR scans are basically the same. Note that if you scan the wrong channel range, the GR channel will be registered as BS and the BS channel will be registered as GR. This problem does not occur because CS scan uses a character string with `CS` added as a channel number prefix.", | |
"operationId": "channelScan", | |
"produces": ["text/plain", "application/json"], | |
"parameters": [ | |
{ | |
"in": "query", | |
"name": "dryRun", | |
"type": "boolean", | |
"allowEmptyValue": true, | |
"default": false, | |
"description": "dry run. If `true`, the scanned result will not be saved." | |
}, | |
{ | |
"in": "query", | |
"name": "type", | |
"type": "string", | |
"enum": ["GR", "BS", "CS"], | |
"default": "GR", | |
"description": "Specifies the channel type to scan." | |
}, | |
{ | |
"in": "query", | |
"name": "minCh", | |
"type": "integer", | |
"description": "Specifies the minimum number of channel numbers to scan." | |
}, | |
{ | |
"in": "query", | |
"name": "maxCh", | |
"type": "integer", | |
"description": "Specifies the maximum number of channel numbers to scan." | |
}, | |
{ | |
"in": "query", | |
"name": "minSubCh", | |
"type": "integer", | |
"description": "Specifies the minimum number of subchannel numbers to scan. This parameter is only used if the type is `BS` and the bs_subch_style is `true`." | |
}, | |
{ | |
"in": "query", | |
"name": "maxSubCh", | |
"type": "integer", | |
"description": "Specifies the maximum number of subchannel numbers to scan. This parameter is only used if the type is `BS` and the bs_subch_style is `true`." | |
}, | |
{ | |
"in": "query", | |
"name": "useSubCh", | |
"type": "boolean", | |
"allowEmptyValue": true, | |
"default": true, | |
"description": "Specify true to specify the channel in the subchannel style. Only used for BS scans. (e.g. BS01_0)" | |
}, | |
{ | |
"in": "query", | |
"name": "scanMode", | |
"type": "string", | |
"enum": ["Channel", "Service"], | |
"description": "To specify the service explictly, use the `Service` mode.\n\n_Default value (GR)_: Channel\n_Default value (BS/CS)_: Service" | |
}, | |
{ | |
"in": "query", | |
"name": "setDisabledOnAdd", | |
"type": "boolean", | |
"allowEmptyValue": true, | |
"description": "If `true`, set disable on add channel.\n\n_Default value (GR)_: false\n_Default value (BS/CS)_: true" | |
}, | |
{ | |
"in": "query", | |
"name": "refresh", | |
"type": "boolean", | |
"allowEmptyValue": true, | |
"default": false, | |
"description": "If `true`, update the existing settings without inheriting them.\nHowever, non-scanned types of channels will always be inherited." | |
} | |
], | |
"responses": { | |
"200": { "description": "OK" }, | |
"409": { | |
"description": "Already Scanning", | |
"schema": { "$ref": "#/definitions/Error" } | |
}, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
}, | |
"/config/channels": { | |
"parameters": [], | |
"get": { | |
"tags": ["config"], | |
"operationId": "getChannelsConfig", | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { "$ref": "#/definitions/ConfigChannels" } | |
}, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
}, | |
"put": { | |
"tags": ["config"], | |
"operationId": "updateChannelsConfig", | |
"parameters": [ | |
{ | |
"in": "body", | |
"name": "body", | |
"schema": { "$ref": "#/definitions/ConfigChannels" } | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { "$ref": "#/definitions/ConfigChannels" } | |
}, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
}, | |
"/channels": { | |
"parameters": [], | |
"get": { | |
"tags": ["channels"], | |
"operationId": "getChannels", | |
"parameters": [ | |
{ | |
"in": "query", | |
"name": "type", | |
"type": "string", | |
"enum": ["GR", "BS", "CS", "SKY"], | |
"required": false | |
}, | |
{ | |
"in": "query", | |
"name": "channel", | |
"type": "string", | |
"required": false | |
}, | |
{ "in": "query", "name": "name", "type": "string", "required": false } | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { | |
"type": "array", | |
"items": { "$ref": "#/definitions/Channel" } | |
} | |
}, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
}, | |
"/tuners/{index}/process": { | |
"parameters": [ | |
{ | |
"in": "path", | |
"name": "index", | |
"type": "integer", | |
"minimum": 0, | |
"required": true | |
} | |
], | |
"get": { | |
"tags": ["tuners"], | |
"summary": "Get Tuner Process Info", | |
"operationId": "getTunerProcess", | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { "$ref": "#/definitions/TunerProcess" } | |
}, | |
"404": { | |
"description": "Not Found", | |
"schema": { "$ref": "#/definitions/Error" } | |
}, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
}, | |
"delete": { | |
"tags": ["tuners"], | |
"summary": "Kill Tuner Process", | |
"operationId": "killTunerProcess", | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { | |
"type": "object", | |
"properties": { "pid": { "type": "null" } } | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"schema": { "$ref": "#/definitions/Error" } | |
}, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
}, | |
"/tuners/{index}": { | |
"parameters": [ | |
{ | |
"in": "path", | |
"name": "index", | |
"type": "integer", | |
"minimum": 0, | |
"required": true | |
} | |
], | |
"get": { | |
"tags": ["tuners"], | |
"operationId": "getTuner", | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { "$ref": "#/definitions/TunerDevice" } | |
}, | |
"404": { | |
"description": "Not Found", | |
"schema": { "$ref": "#/definitions/Error" } | |
}, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
}, | |
"/services/{id}/stream": { | |
"parameters": [ | |
{ | |
"in": "path", | |
"name": "id", | |
"type": "integer", | |
"maximum": 6553565535, | |
"required": true | |
}, | |
{ | |
"in": "header", | |
"name": "X-Mirakurun-Priority", | |
"type": "integer", | |
"minimum": 0 | |
}, | |
{ | |
"in": "query", | |
"name": "decode", | |
"type": "integer", | |
"minimum": 0, | |
"maximum": 1 | |
} | |
], | |
"get": { | |
"tags": ["services", "stream"], | |
"operationId": "getServiceStream", | |
"produces": ["video/MP2T"], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"headers": { "X-Mirakurun-Tuner-User-ID": { "type": "string" } } | |
}, | |
"404": { "description": "Not Found" }, | |
"503": { "description": "Tuner Resource Unavailable" }, | |
"default": { "description": "Unexpected Error" } | |
} | |
} | |
}, | |
"/services/{id}/logo": { | |
"parameters": [ | |
{ | |
"in": "path", | |
"name": "id", | |
"type": "integer", | |
"maximum": 6553565535, | |
"required": true | |
} | |
], | |
"get": { | |
"tags": ["services"], | |
"operationId": "getLogoImage", | |
"produces": ["image/png"], | |
"responses": { | |
"200": { "description": "OK" }, | |
"404": { "description": "Not Found" }, | |
"503": { "description": "Logo Data Unavailable" }, | |
"default": { "description": "Unexpected Error" } | |
} | |
} | |
}, | |
"/services/{id}": { | |
"parameters": [ | |
{ | |
"in": "path", | |
"name": "id", | |
"type": "integer", | |
"maximum": 6553565535, | |
"required": true | |
} | |
], | |
"get": { | |
"tags": ["services"], | |
"operationId": "getService", | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { "$ref": "#/definitions/Service" } | |
}, | |
"404": { | |
"description": "Not Found", | |
"schema": { "$ref": "#/definitions/Error" } | |
}, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
}, | |
"/programs/{id}/stream": { | |
"parameters": [ | |
{ | |
"in": "path", | |
"name": "id", | |
"type": "integer", | |
"minimum": 10000000000, | |
"maximum": 655356553565535, | |
"required": true | |
}, | |
{ | |
"in": "header", | |
"name": "X-Mirakurun-Priority", | |
"type": "integer", | |
"minimum": 0 | |
}, | |
{ | |
"in": "query", | |
"name": "decode", | |
"type": "integer", | |
"minimum": 0, | |
"maximum": 1 | |
} | |
], | |
"get": { | |
"tags": ["programs", "stream"], | |
"operationId": "getProgramStream", | |
"produces": ["video/MP2T"], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"headers": { "X-Mirakurun-Tuner-User-ID": { "type": "string" } } | |
}, | |
"404": { "description": "Not Found" }, | |
"503": { "description": "Tuner Resource Unavailable" }, | |
"default": { "description": "Unexpected Error" } | |
} | |
} | |
}, | |
"/programs/{id}": { | |
"parameters": [ | |
{ | |
"in": "path", | |
"name": "id", | |
"type": "integer", | |
"minimum": 10000000000, | |
"maximum": 655356553565535, | |
"required": true | |
} | |
], | |
"get": { | |
"tags": ["programs"], | |
"operationId": "getProgram", | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { "$ref": "#/definitions/Program" } | |
}, | |
"404": { | |
"description": "Not Found", | |
"schema": { "$ref": "#/definitions/Error" } | |
}, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
}, | |
"/channels/{type}/{channel}/stream": { | |
"parameters": [ | |
{ | |
"in": "path", | |
"name": "type", | |
"type": "string", | |
"enum": ["GR", "BS", "CS", "SKY"], | |
"required": true | |
}, | |
{ "in": "path", "name": "channel", "type": "string", "required": true }, | |
{ | |
"in": "header", | |
"name": "X-Mirakurun-Priority", | |
"type": "integer", | |
"minimum": 0 | |
}, | |
{ | |
"in": "query", | |
"name": "decode", | |
"type": "integer", | |
"minimum": 0, | |
"maximum": 1 | |
} | |
], | |
"get": { | |
"tags": ["channels", "stream"], | |
"operationId": "getChannelStream", | |
"produces": ["video/MP2T"], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"headers": { "X-Mirakurun-Tuner-User-ID": { "type": "string" } } | |
}, | |
"404": { "description": "Not Found" }, | |
"503": { "description": "Tuner Resource Unavailable" }, | |
"default": { "description": "Unexpected Error" } | |
} | |
} | |
}, | |
"/channels/{type}/{channel}/services/{id}/stream": { | |
"parameters": [ | |
{ | |
"in": "path", | |
"name": "type", | |
"type": "string", | |
"enum": ["GR", "BS", "CS", "SKY"], | |
"required": true | |
}, | |
{ "in": "path", "name": "channel", "type": "string", "required": true }, | |
{ | |
"in": "path", | |
"name": "id", | |
"type": "integer", | |
"maximum": 6553565535, | |
"required": true | |
}, | |
{ | |
"in": "header", | |
"name": "X-Mirakurun-Priority", | |
"type": "integer", | |
"minimum": 0 | |
}, | |
{ | |
"in": "query", | |
"name": "decode", | |
"type": "integer", | |
"minimum": 0, | |
"maximum": 1 | |
} | |
], | |
"get": { | |
"tags": ["channels", "services", "stream"], | |
"operationId": "getServiceStreamByChannel", | |
"produces": ["video/MP2T"], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"headers": { "X-Mirakurun-Tuner-User-ID": { "type": "string" } } | |
}, | |
"404": { "description": "Not Found" }, | |
"503": { "description": "Tuner Resource Unavailable" }, | |
"default": { "description": "Unexpected Error" } | |
} | |
} | |
}, | |
"/channels/{type}/{channel}/services/{id}": { | |
"parameters": [ | |
{ | |
"in": "path", | |
"name": "type", | |
"type": "string", | |
"enum": ["GR", "BS", "CS", "SKY"], | |
"required": true | |
}, | |
{ "in": "path", "name": "channel", "type": "string", "required": true }, | |
{ | |
"in": "path", | |
"name": "id", | |
"type": "integer", | |
"maximum": 6553565535, | |
"required": true | |
} | |
], | |
"get": { | |
"tags": ["channels", "services"], | |
"operationId": "getServiceByChannel", | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { | |
"type": "array", | |
"items": { "$ref": "#/definitions/Service" } | |
} | |
}, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
}, | |
"/channels/{type}/{channel}/services": { | |
"parameters": [ | |
{ | |
"in": "path", | |
"name": "type", | |
"type": "string", | |
"enum": ["GR", "BS", "CS", "SKY"], | |
"required": true | |
}, | |
{ "in": "path", "name": "channel", "type": "string", "required": true } | |
], | |
"get": { | |
"tags": ["channels", "services"], | |
"operationId": "getServicesByChannel", | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { | |
"type": "array", | |
"items": { "$ref": "#/definitions/Service" } | |
} | |
}, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
}, | |
"/channels/{type}/{channel}": { | |
"parameters": [ | |
{ | |
"in": "path", | |
"name": "type", | |
"type": "string", | |
"enum": ["GR", "BS", "CS", "SKY"], | |
"required": true | |
}, | |
{ "in": "path", "name": "channel", "type": "string", "required": true } | |
], | |
"get": { | |
"tags": ["channels"], | |
"operationId": "getChannel", | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { "$ref": "#/definitions/Channel" } | |
}, | |
"404": { | |
"description": "Not Found", | |
"schema": { "$ref": "#/definitions/Error" } | |
}, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
}, | |
"/channels/{type}": { | |
"parameters": [ | |
{ | |
"in": "path", | |
"name": "type", | |
"type": "string", | |
"enum": ["GR", "BS", "CS", "SKY"], | |
"required": true | |
} | |
], | |
"get": { | |
"tags": ["channels"], | |
"operationId": "getChannelsByType", | |
"parameters": [ | |
{ | |
"in": "query", | |
"name": "channel", | |
"type": "string", | |
"required": false | |
}, | |
{ "in": "query", "name": "name", "type": "string", "required": false } | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { | |
"type": "array", | |
"items": { "$ref": "#/definitions/Channel" } | |
} | |
}, | |
"default": { | |
"description": "Unexpected Error", | |
"schema": { "$ref": "#/definitions/Error" } | |
} | |
} | |
} | |
} | |
}, | |
"definitions": { | |
"Error": { | |
"type": "object", | |
"properties": { | |
"code": { "type": "integer" }, | |
"reason": { "type": "string" }, | |
"errors": { | |
"type": "array", | |
"items": { "$ref": "#/definitions/ErrorOfOpenAPI" } | |
} | |
} | |
}, | |
"ErrorOfOpenAPI": { | |
"type": "object", | |
"properties": { | |
"errorCode": { "type": "string" }, | |
"message": { "type": "string" }, | |
"location": { "type": "string" } | |
} | |
}, | |
"ProgramId": { "type": "integer", "maximum": 655356553565535 }, | |
"EventId": { "type": "integer", "maximum": 65535 }, | |
"ServiceId": { "type": "integer", "maximum": 65535 }, | |
"NetworkId": { "type": "integer", "maximum": 65535 }, | |
"ServiceItemId": { "type": "integer", "maximum": 6553565535 }, | |
"UnixtimeMS": { "type": "integer" }, | |
"Channel": { | |
"type": "object", | |
"required": ["type", "channel"], | |
"properties": { | |
"type": { "$ref": "#/definitions/ChannelType" }, | |
"channel": { "type": "string" }, | |
"name": { "type": "string" }, | |
"satellite": { "type": "string" }, | |
"space": { "type": "integer" }, | |
"freq": { "type": "number" }, | |
"polarity": { "type": "string", "enum": ["H", "V"] }, | |
"tsmfRelTs": { "type": "integer" }, | |
"services": { | |
"type": "array", | |
"items": { "$ref": "#/definitions/Service" } | |
} | |
} | |
}, | |
"ChannelType": { "type": "string", "enum": ["GR", "BS", "CS", "SKY"] }, | |
"Service": { | |
"type": "object", | |
"required": ["id", "serviceId", "networkId", "name", "type"], | |
"properties": { | |
"id": { "$ref": "#/definitions/ServiceItemId" }, | |
"serviceId": { "$ref": "#/definitions/ServiceId" }, | |
"networkId": { "$ref": "#/definitions/NetworkId" }, | |
"name": { "type": "string" }, | |
"type": { "type": "integer" }, | |
"logoId": { "type": "integer" }, | |
"hasLogoData": { "type": "boolean" }, | |
"remoteControlKeyId": { "type": "integer" }, | |
"epgReady": { "type": "boolean" }, | |
"epgUpdatedAt": { "$ref": "#/definitions/UnixtimeMS" }, | |
"channel": { "$ref": "#/definitions/Channel" } | |
} | |
}, | |
"Program": { | |
"type": "object", | |
"required": [ | |
"id", | |
"eventId", | |
"serviceId", | |
"networkId", | |
"startAt", | |
"duration", | |
"isFree" | |
], | |
"properties": { | |
"id": { "$ref": "#/definitions/ProgramId" }, | |
"eventId": { "$ref": "#/definitions/EventId" }, | |
"serviceId": { "$ref": "#/definitions/ServiceId" }, | |
"networkId": { "$ref": "#/definitions/NetworkId" }, | |
"startAt": { "$ref": "#/definitions/UnixtimeMS" }, | |
"duration": { "type": "integer" }, | |
"isFree": { "type": "boolean" }, | |
"name": { "type": "string" }, | |
"description": { "type": "string" }, | |
"genres": { | |
"type": "array", | |
"items": { "$ref": "#/definitions/ProgramGenre" } | |
}, | |
"video": { | |
"type": "object", | |
"properties": { | |
"type": { "$ref": "#/definitions/ProgramVideoType" }, | |
"resolution": { "$ref": "#/definitions/ProgramVideoResolution" }, | |
"streamContent": { "type": "integer" }, | |
"componentType": { "type": "integer" } | |
} | |
}, | |
"audios": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"componentType": { "type": "integer" }, | |
"componentTag": { "type": "integer" }, | |
"isMain": { "type": "boolean" }, | |
"samplingRate": { | |
"$ref": "#/definitions/ProgramAudioSamplingRate" | |
}, | |
"langs": { | |
"type": "array", | |
"items": { | |
"type": "string", | |
"enum": [ | |
"jpn", | |
"eng", | |
"deu", | |
"fra", | |
"ita", | |
"rus", | |
"zho", | |
"kor", | |
"spa", | |
"etc" | |
] | |
} | |
} | |
} | |
} | |
}, | |
"extended": { "type": "object" }, | |
"relatedItems": { | |
"type": "array", | |
"items": { "$ref": "#/definitions/RelatedItem" } | |
}, | |
"series": { | |
"type": "object", | |
"properties": { | |
"id": { "type": "integer" }, | |
"repeat": { "type": "integer", "minimum": 0 }, | |
"pattern": { "$ref": "#/definitions/ProgramPattern" }, | |
"expiresAt": { "$ref": "#/definitions/UnixtimeMS" }, | |
"episode": { "$ref": "#/definitions/ProgramEpisodeNumber" }, | |
"lastEpisode": { "$ref": "#/definitions/ProgramEpisodeNumber" }, | |
"name": { "type": "string" } | |
} | |
} | |
} | |
}, | |
"ProgramGenre": { | |
"type": "object", | |
"properties": { | |
"lv1": { "type": "integer" }, | |
"lv2": { "type": "integer" }, | |
"un1": { "type": "integer" }, | |
"un2": { "type": "integer" } | |
} | |
}, | |
"ProgramVideoType": { | |
"type": "string", | |
"enum": ["mpeg2", "h.264", "h.265"] | |
}, | |
"ProgramVideoResolution": { | |
"type": "string", | |
"enum": [ | |
"240p", | |
"480i", | |
"480p", | |
"720p", | |
"1080i", | |
"1080p", | |
"2160p", | |
"4320p" | |
] | |
}, | |
"ProgramAudioSamplingRate": { | |
"type": "integer", | |
"enum": [16000, 22050, 24000, 32000, 44100, 48000] | |
}, | |
"ProgramPattern": { "type": "integer", "minimum": 0, "maximum": 7 }, | |
"ProgramEpisodeNumber": { | |
"type": "integer", | |
"minimum": 1, | |
"maximum": 4095 | |
}, | |
"RelatedItem": { | |
"type": "object", | |
"properties": { | |
"type": { "type": "string", "enum": ["shared", "relay", "movement"] }, | |
"networkId": { "type": "integer" }, | |
"serviceId": { "type": "integer" }, | |
"eventId": { "type": "integer" } | |
} | |
}, | |
"TunerDevice": { | |
"type": "object", | |
"required": [ | |
"index", | |
"name", | |
"types", | |
"command", | |
"pid", | |
"users", | |
"isAvailable", | |
"isFree", | |
"isUsing", | |
"isFault" | |
], | |
"properties": { | |
"index": { "type": "integer" }, | |
"name": { "type": "string" }, | |
"types": { | |
"type": "array", | |
"items": { "$ref": "#/definitions/ChannelType" } | |
}, | |
"command": { "type": "string" }, | |
"pid": { "type": "integer" }, | |
"users": { | |
"type": "array", | |
"items": { "$ref": "#/definitions/TunerUser" } | |
}, | |
"isAvailable": { "type": "boolean" }, | |
"isRemote": { "type": "boolean" }, | |
"isFree": { "type": "boolean" }, | |
"isUsing": { "type": "boolean" }, | |
"isFault": { "type": "boolean" } | |
} | |
}, | |
"TunerUser": { | |
"type": "object", | |
"required": ["id", "priority"], | |
"properties": { | |
"id": { "type": "string" }, | |
"priority": { "type": "integer", "minimum": -1 }, | |
"agent": { "type": "string" }, | |
"url": { "type": "string" }, | |
"disableDecoder": { "type": "boolean" }, | |
"streamSetting": { | |
"type": "object", | |
"required": ["channel"], | |
"properties": { | |
"channel": { "$ref": "#/definitions/ConfigChannelsItem" }, | |
"networkId": { "type": "integer" }, | |
"serviceId": { "type": "integer" }, | |
"eventId": { "type": "integer" }, | |
"noProvide": { "type": "boolean" }, | |
"parseNIT": { "type": "boolean" }, | |
"parseSDT": { "type": "boolean" }, | |
"parseEIT": { "type": "boolean" } | |
} | |
}, | |
"streamInfo": { | |
"type": "object", | |
"additionalProperties": { | |
"type": "object", | |
"required": ["packet", "drop"], | |
"properties": { | |
"packet": { "type": "integer" }, | |
"drop": { "type": "integer" } | |
} | |
} | |
} | |
} | |
}, | |
"TunerProcess": { | |
"type": "object", | |
"required": ["pid"], | |
"properties": { "pid": { "type": "integer" } } | |
}, | |
"Event": { | |
"type": "object", | |
"required": ["resource", "type", "data", "time"], | |
"properties": { | |
"resource": { "$ref": "#/definitions/EventResource" }, | |
"type": { "$ref": "#/definitions/EventType" }, | |
"data": { "type": "object" }, | |
"time": { "$ref": "#/definitions/UnixtimeMS" } | |
} | |
}, | |
"EventResource": { | |
"type": "string", | |
"enum": ["program", "service", "tuner"] | |
}, | |
"EventType": { "type": "string", "enum": ["create", "update", "redefine"] }, | |
"ConfigServer": { | |
"type": "object", | |
"properties": { | |
"path": { "type": "string" }, | |
"port": { "type": "integer", "minimum": 1, "maximum": 65535 }, | |
"hostname": { "type": "string" }, | |
"disableIPv6": { "type": "boolean" }, | |
"logLevel": { "type": "integer", "minimum": -1, "maximum": 3 }, | |
"maxLogHistory": { "type": "integer", "minimum": 0 }, | |
"highWaterMark": { "type": "integer" }, | |
"maxBufferBytesBeforeReady": { "type": "integer" }, | |
"eventEndTimeout": { "type": "integer", "minimum": 0 }, | |
"programGCInterval": { "type": "integer" }, | |
"epgGatheringInterval": { "type": "integer" }, | |
"epgRetrievalTime": { "type": "integer" }, | |
"logoDataInterval": { "type": "integer" }, | |
"disableEITParsing": { "type": "boolean" } | |
} | |
}, | |
"ConfigTuners": { | |
"type": "array", | |
"items": { "$ref": "#/definitions/ConfigTunersItem" } | |
}, | |
"ConfigTunersItem": { | |
"type": "object", | |
"required": ["name", "types"], | |
"properties": { | |
"name": { "type": "string" }, | |
"types": { | |
"type": "array", | |
"items": { "$ref": "#/definitions/ChannelType" } | |
}, | |
"command": { "type": "string" }, | |
"dvbDevicePath": { "type": "string" }, | |
"remoteMirakurunHost": { "type": "string" }, | |
"remoteMirakurunPort": { "type": "integer" }, | |
"remoteMirakurunDecoder": { "type": "boolean" }, | |
"decoder": { "type": "string" }, | |
"isDisabled": { "type": "boolean" } | |
} | |
}, | |
"ConfigChannels": { | |
"type": "array", | |
"items": { "$ref": "#/definitions/ConfigChannelsItem" } | |
}, | |
"ConfigChannelsItem": { | |
"type": "object", | |
"required": ["name", "type", "channel"], | |
"properties": { | |
"name": { "type": "string" }, | |
"type": { "$ref": "#/definitions/ChannelType" }, | |
"channel": { "type": "string" }, | |
"serviceId": { "$ref": "#/definitions/ServiceId" }, | |
"satellite": { "type": "string" }, | |
"space": { "type": "integer" }, | |
"freq": { "type": "number" }, | |
"polarity": { "type": "string", "enum": ["H", "V"] }, | |
"isDisabled": { "type": "boolean" } | |
} | |
}, | |
"Version": { | |
"type": "object", | |
"properties": { | |
"current": { "type": "string" }, | |
"latest": { "type": "string" } | |
} | |
}, | |
"Status": { | |
"type": "object", | |
"properties": { | |
"time": { "type": "integer" }, | |
"version": { "type": "string" }, | |
"process": { | |
"type": "object", | |
"properties": { | |
"arch": { "type": "string" }, | |
"platform": { "type": "string" }, | |
"versions": { "type": "object" }, | |
"env": { "type": "object" }, | |
"pid": { "type": "integer" }, | |
"memoryUsage": { | |
"type": "object", | |
"properties": { | |
"rss": { "type": "integer" }, | |
"heapTotal": { "type": "integer" }, | |
"heapUsed": { "type": "integer" } | |
} | |
} | |
} | |
}, | |
"epg": { | |
"type": "object", | |
"properties": { | |
"gatheringNetworks": { | |
"type": "array", | |
"items": { "$ref": "#/definitions/NetworkId" } | |
}, | |
"storedEvents": { "type": "integer" } | |
} | |
}, | |
"rpcCount": { "type": "integer" }, | |
"streamCount": { | |
"type": "object", | |
"properties": { | |
"tunerDevice": { "type": "integer" }, | |
"tsFilter": { "type": "integer" }, | |
"decoder": { "type": "integer" } | |
} | |
}, | |
"errorCount": { | |
"type": "object", | |
"properties": { | |
"uncaughtException": { "type": "integer" }, | |
"unhandledRejection": { "type": "integer" }, | |
"bufferOverflow": { "type": "integer" }, | |
"tunerDeviceRespawn": { "type": "integer" }, | |
"decoderRespawn": { "type": "integer" } | |
} | |
}, | |
"timerAccuracy": { | |
"type": "object", | |
"properties": { | |
"last": { "type": "number" }, | |
"m1": { | |
"type": "object", | |
"properties": { | |
"avg": { "type": "number" }, | |
"min": { "type": "number" }, | |
"max": { "type": "number" } | |
} | |
}, | |
"m5": { | |
"type": "object", | |
"properties": { | |
"avg": { "type": "number" }, | |
"min": { "type": "number" }, | |
"max": { "type": "number" } | |
} | |
}, | |
"m15": { | |
"type": "object", | |
"properties": { | |
"avg": { "type": "number" }, | |
"min": { "type": "number" }, | |
"max": { "type": "number" } | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"tags": [ | |
{ "name": "channels" }, | |
{ "name": "config" }, | |
{ "name": "events" }, | |
{ "name": "iptv" }, | |
{ "name": "log" }, | |
{ "name": "misc" }, | |
{ "name": "programs" }, | |
{ "name": "services" }, | |
{ "name": "status" }, | |
{ "name": "stream" }, | |
{ "name": "tuners" }, | |
{ "name": "version" } | |
], | |
"host": "127.0.0.1:40772" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment