ホーム > 開発 > IP コントロール > REST API > APIリスト
getContentList (v1.5)
Estimated reading time: 3 minutes
- This API provides the list of contents under the URI. For example, this API returns external inputs by indicating "extInput:*" as the URI.
If the number of contents is too large to be retrieved in a single request, the 'stIdx' and 'cnt' parameters should be used to retrieve partial lists. To get the complete list, multiple requests are to be made by adjusting the 'stIdx' and 'cnt' parameters. There is a maximum limit on the number of contents that can be retrieved in a single request. This limit is device specific. The 'cnt' parameter also has the same maximum limit.
For details on how to get content information, see Getting content information.
Syntax
- http://<Base URL>/avContent
Authentication Level
- private
Request
- params' Elements
- An object composed of the following pair(s).
name | type | multiplicity | default | description |
---|---|---|---|---|
uri | string | ? | null | URI to identify the content. Null means all contents are supported by the device. Refer to here to learn the URI |
stIdx | integer | ? | 0 | Start index to get list items. |
cnt | integer | ? | 50 | Count of the maximum number of items that can be listed, starting from "stIdx". |
- JSON Example
-
{ "method": "getContentList", "id": 88, "params": [{ "stIdx": 0, "cnt": 50, "uri": "extInput:hdmi" }], "version": "1.5" }
Response
- result's Elements
- An array of objects composed by following pairs.
In case uri parameter in response is “extInput:*”
name | type | multiplicity | default | description |
---|---|---|---|---|
uri | string | 1 | URI to identify the content. Refer to here to learn the URI structure in detail.
|
|
title | string | ? | null | Title of this content to be recognized by the user. The default value is null. This means that there is no title information. |
index | integer | ? | 0 | Index of the list. This starts with "stIdx" that is indicated in the request. When this value is -1. this indicates that the content itself is specified by the URI in the request parameter. |
- JSON Example
-
Example of Video Content
{ "result": [[ { "uri": "extInput:hdmi?port=1", "title": "HDMI 1", "index": 0 }, { "uri": "extInput:hdmi?port=2", "title": "HDMI 2", "index": 1 }, { "uri": "extInput:hdmi?port=3", "title": "HDMI 3/ARC", "index": 2 }, { "uri": "extInput:hdmi?port=4", "title": "HDMI 4", "index": 3 } ]], "id": 88 }
- Error Code
- The following error codes are important for this API. Refer to error code for other errors.
code | Explanation |
---|---|
41020 |
Storage doesn't exist.
|
Guide about Request
- Supported sources are replied by the getSourceList.
- The maximum value of cnt is 200.
Guide about Response
- The following list types are not returned by this API:
- Media file lists in USB storage. For example, mp3 music files, jpeg files or mp4 video files.
- Media file lists provided by a DLNA server.
sources in “extInput” scheme
pair's key | "extInput:*" (same on all sources) | explanation |
---|---|---|
uri | included | Please refer to REST API Device Resource URI. |
title | included | Input name. This is preset text on the BRAVIA Professional Display. Note: Use the getCurrentExternalInputStatus method to get the label name that a user sets via the UI setting. |
index | included |
Last modified: 26 Jul 2024