JSON
// このブロックは公開側には表示されません。
// このブロックを消すとコピーボタンが機能しなくなるので消さないでください。

guide

Guide service provides an API to get the list of supported services on the server.


getSupportedApiInfo (v1.0)

This API provides the supported services and their information. This API is used in the initialization sequence to dynamically fetch the service compatibility of the server.

Syntax

HTML
http://{IP address} or {Host name}/sony/guide

Authentication Level

none

Request

params' Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
servicesstring-array?nullServices to fetch API information.
Null or empty arrays are treated as all services.

JSON Example

JSON
{
    "method": "getSupportedApiInfo",
    "id": 5,
    "params": [{"services": [
        "system",
        "avContent"
    ]}],
    "version": "1.0"
}

Response

result's Elements
An array of objects composed of the following pairs.

service
typemultiplicitydefaultdescription
string1Name of this service.
protocols
typemultiplicitydefaultdescription
string-array1Supported transports.
apis
typemultiplicitydefaultdescription
(object-array)1Supported APIs.
name
typemultiplicitydefaultdescription
string1Name of this API.
versions
typemultiplicitydefaultdescription
(object-array)1Detail of supported versions of this API.

version

typemultiplicitydefaultdescription
string1Version of this API.

protocols

typemultiplicitydefaultdescription
string-array?nullTransport for this API, if there are any exception from that of belonging service.

authLevel

typemultiplicitydefaultdescription
string?"none"Authentication level of this API.
notifications
typemultiplicitydefaultdescription
(object-array)?nullSupported Notification APIs.
name
typemultiplicitydefaultdescription
string1Name of this API.
versions
typemultiplicitydefaultdescription
(object-array)1Detail of supported versions of this API.

version

typemultiplicitydefaultdescription
string1Version of this API.

authLevel

typemultiplicitydefaultdescription
string?"none"Authentication level of this API.

JSON Example

JSON
{
    "result": [[
        {
            "apis": [{
                "versions": [{"version": "1.0"}],
                "name": "getSystemInformation"
            }],
            "service": "system",
            "protocols": ["xhrpost:jsonizer"]
        },
        {
            "apis": [
                {
                    "versions": [{
                        "version": "1.0",
                        "authLevel": "generic"
                    }],
                    "name": "setPlayContent"
                },
                {
                    "versions": [
                        {"version": "1.1"},
                        {"version": "1.0"}
                    ],
                    "name": "getCurrentExternalInputsStatus"
                }
            ],
            "service": "avContent",
            "protocols": ["xhrpost:jsonizer"]
        }
    ]],
    "id": 5
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

appControl

This service handles APIs that launch the application itself and the accompanying manipulations related to specific applications.


prepareAppUpload v1.0

This API provides a function to launch an upload server and returns assetId.
By calling this API, the upload server is launched and you can upload the APK file to install via the following URL:

HTML
http://{ip address}/sony/appupload/{assetId}

Example:

HTML
http://127.0.0.1/sony/appupload/1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed

For more deitals, please see Appendix 1: The application upload and install process.

Syntax

HTML
http://{IP address} or {Host name}/sony/appControl

Authentication Level

generic

Request

JSON example:

JSON
{
    "method": "prepareAppUpload",
    "id": 104,
    "params": [],
    "version": "1.0"
}

Response

nametypemultiplicitydefaultdescription
assetIdstring1This is generated with UUIDv4 and used as an identifier for both upload and install processes.
It will be automatically expired after 5 minutes.

JSON example:

JSON
{
    "result": [
        "assetId": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed"
    ],
    "id": 104
}

Error codes:

CodeDescription
[40507, “No free port found”]

uninstallApp v1.0

This API provides a function to uninstall an application.

Syntax

HTML
http://{IP address} or {Host name}/sony/appControl

Authentication Level

generic

Request

nametypemultiplicitydefaultdescription
packageNamestring1

JSON example:

JSON
{
    "method": "uninstallApp",
    "id": 106,
    "params": [{
        "packageName": "com.sony.dtv.b2b.sample"
    }],
    "version": "1.0"
}

Response

JSON example:

JSON
{
    "result": []
    "id": 106
}

Error codes:

CodeDescription
[40506, “Invalid packageName”]

installApp v1.0

This API provides a function to install an application.
It is necessary to call prepareAppUpload API and complete upload process before calling this API.

For more details, please see Appendix 1: The application upload and install process.

Syntax

HTML
http://{IP address} or {Host name}/sony/appControl

Authentication Level

generic

Request

nametypetype multiplicitydefaultdescription
assetIdstring1
afterInstallActionstring?This parameter specify an action after the installation is completed
"startApplication": an application is launched with parameter "uri".
uristring?This parameter is compliant with android-app scheme spec. Please see
https://developer.android.com/reference/android/content/Intent#URI_ANDROID_APP_SCHEME.

JSON example:

JSON
{
    "method": "installApp",
    "id": 105,
    "params": [{
        "assetId": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed",
        "afterInstallAction": "startApplication",
        "uri": "android-app://com.sony.dtv.b2b.sample"
    }],
    "version": "1.0"
}

Response

JSON example:

JSON
{
    "result": []
    "id": 105
}

Error codes:

CodeDescription
[40500, “Invalid assetId”]
[40501, “autorunScript failed”]
[40502, “Install failed”]
[40503, “Invalid afterInstallAction”]
[40504, “Invalid uri”]
[40505, “Invalid autorunScript”]

The application upload and install process

This appendix outlines the steps for clients to upload and install APK file using our APIs.

1.Initiate app upload and get assetId
  • The client must call prepareAppUpload API to obtain an assetId
  • When prepareAppUpload is called, it starts an HTTP server dedicated to APK transfers
  • The API issues an assetId, and then returns this assetId as the response to the prepareAppUpload call
2.Transfer the APK file via POST
  • The client should POST the APK file to the following URL:
    • http://{ip adddress}/sony/appupload/{assetId}
  • Important Notes:
    • Authentication: Similar to all Web API calls, the PSK information must be included in the POST header during the transfer (mandatry requirement)
    • Timeout for transfer start: If the file transfer does not begin within specific period (5 minutes), the Web API will cancel the corresponding assetId
    • APK storage: Web API saves the transferred APK file as an application-specific persistent file
    • Automatic deletion: The file will be automatically deleted by the system after the installApp process completes or if the assetId is canceled
3.Initiate app installation
  • Once the transfer is complete, the client must call installApp API, specifying assetId
  • Important Notes:
    • Timeout for installaltion call: If the client does not call installApp within a certain period after the file trasfer is complete (5 minutes), the system will cancel the assetId
    • HTTP server persistence: The HTTP server for APK transfers, once started, will remain active until Control remotely is turned off or the system restarts

getTextForm (v1.1)

This API returns the current text input on the field of the software keyboard. This version supports encrypted text data transmission and is primarily used by TV SideView.

Note

Please find more details about encryption here.

Syntax

HTML
http://{IP address} or {Host name}/sony/appControl

Authentication Level

private

Request

params' Elements
An object composed of the following pair(s).

nametypemultiplicitymultiplicitydescription
encKeystring?""Encryption key encrypted by the public key. The default value is "", which means the data is not encrypted.

JSON example:

JSON
{
    "method": "getTextForm",
    "id": 60,
    "params": [{}],
    "version": "1.1"
}
JSON
{
    "method": "getTextForm",
    "id": 60,
    "params": [{"encKey": "AAAAB3NzaC1yc2EAAAABIwAAAQEA3p6TmGYDRtnnmzckD5leg7lHIUY9cuV6vFvacew1uZ7Bmx2MF9a7SqmtiLDkLS3P9y9eobRjuWriSfgmqDPRFRU2mdwAmRm2aIvYa6WkzvnrfUhGR+SCT/Z62j7V9ps6Mt5HB8mFQj3494p4StTPVS1nFqvEUazEx13EJnJyHsdYqsV6UJV169e43oLSSccb3lr8BzeMUnGEfY+NKlAxDpEycr5jJYyTkLfrbX0lyAPs+vLwLRYhm+h2qJYAZUwknus4vD7aki4G69S+gnENClglh/e9ut9Q5BrtxiBQCEikn9V9rlnVkbp1eEUf89XFiHRWMVrRAINtJyQFvvoPOQ=="}],
    "version": "1.1"
}

Response

nametypemultiplicitydefaultdescription
textstring1Text data encoded by UTF8. If encKey is set, this must be encrypted.

JSON example:

JSON
{
    "result": [{"text": "hello world!!"}],
    "id": 60
}
JSON
{
    "result": [{"text": "dtA6UNsMnahxCkfGdrc8AFhisnFZg8FnKTl7Sk4Wg9J8gYK8+Dv6Io7Ssef7ZPTo"}],
    "id": 60
}
codeExplanation
7Software keyboard is not active
40002Encryption error
40003Client must wait for the previous response.

Appendix

Guide about Request
  • “encKey” must always be set.
  • Otherwise, error #3 “Illegal Argument” is returned.

setTextForm (v1.1)

This API provides the function to input text on the field of the software keyboard. This version supports encrypted text data transmission and is primarily used by TV SideView.

Note

Please find more details about encryption :

Syntax

HTML
http://{IP address} or {Host name}/sony/appControl

Authentication Level

generic

Request

params' Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
encKeystring?""Encryption key encrypted by the public key.
The default value is "", which means the data is not encrypted.
textstring1Text data encoded by UTF8. If encKey is set, this must be encrypted.

JSON Example

JSON
{
    "method": "setTextForm",
    "id": 601,
    "params": [{
        "encKey": "AAAAB3NzaC1yc2EAAAABIwAAAQEA3p6TmGYDRtnnmzckD5leg7lHIUY9cuV6vFvacew1uZ7Bmx2MF9a7SqmtiLDkLS3P9y9eobRjuWriSfgmqDPRFRU2mdwAmRm2aIvYa6WkzvnrfUhGR+SCT/Z62j7V9ps6Mt5HB8mFQj3494p4StTPVS1nFqvEUazEx13EJnJyHsdYqsV6UJV169e43oLSSccb3lr8BzeMUnGEfY+NKlAxDpEycr5jJYyTkLfrbX0lyAPs+vLwLRYhm+h2qJYAZUwknus4vD7aki4G69S+gnENClglh/e9ut9Q5BrtxiBQCEikn9V9rlnVkbp1eEUf89XFiHRWMVrRAINtJyQFvvoPOQ==",
        "text": "dtA6UNsMnahxCkfGdrc8AFhisnFZg8FnKTl7Sk4Wg9J8gYK8+Dv6Io7Ssef7ZPTo"
    }],
    "version": "1.1"
}

Response

result's Elements
Not necessary.
JSON Example

JSON
{
    "result": [],
    "id": 601
}

Error Code
The following error codes are important for this API. Refer to error code for other errors.

codeExplanation
7Software keyboard is not active.
40002Encryption error.

Appendix

Guide about Request
  • “encKey” must always be set.
  • Otherwise, error #3 “Illegal Argument” is returned.

setTextForm (v1.0)

This API provides the function to input text on the field of the software keyboard.

This version is primarily used by TV SideView.

Syntax

HTML
http://{IP address} or {Host name}/sony/appControl

Authentication Level

generic

Request

params' Elements
The following value.

typedescription
stringText data encoded by UTF8.

JSON Example

JSON
{
    "method": "setTextForm",
    "id": 601,
    "params": ["hello world!!"],
    "version": "1.0"
}

Response

result's Elements
The following value.

typedescription
integerOnly 0 is returned.

JSON Example

JSON
{
    "result": [0],
    "id": 601
}

Error Code
The following error codes are important for this API. Refer to error code for other errors.

codeExplanation
7Software keyboard is not active.

terminateApps (v1.0)

This API provides the function to terminate all applications.

Syntax

HTML
http://{IP address} or {Host name}/sony/appControl

Authentication Level

generic

Request

params' Elements
Not necessary.
JSON Example

JSON
{
    "method": "terminateApps",
    "id": 55,
    "params": [],
    "version": "1.0"
}

Response

result's Elements
Not necessary.
JSON Example

JSON
{
    "result": [],
    "id": 55
}

Error Code
The following error codes are important for this API. Refer to error code for other errors.

codeExplanation
41403Some applications can't be terminated.

setActiveApp (v1.0)

This API provides functions to launch an application.

Syntax

HTML
http://{IP address} or {Host name}/sony/appControl

Authentication Level

generic

Request

params' Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
uristring1URI of target application.
"localapp://webappruntime?url=target_url" - launch target_url.
"localapp://webappruntime?manifest=manifest_url"
 - launch an application in manifest_url.
"localapp://webappruntime?auid=application_unique_id"
 - launch the application in auid=application_unique_id in the USB storage.

JSON Example

JSON
{
    "method": "setActiveApp",
    "id": 601,
    "params": [{
        "uri": "localapp://webappruntime?url=http%3A%2F%2Fexample.com%2F"
    }],
    "version": "1.0"
}

Response

result's Elements
Not necessary.
JSON Example

JSON
{
    "result": [],
    "id": 601
}

Error Code
The following error codes are important for this API. Refer to error code for other errors.

codeExplanation
41400Another request is in progress
41401Failed to launch, for example, because another application is running.
41402Request is accepted, but the completion of application launch cannot be decided.

getApplicationList (v1.0)

This API provides the list of applications that can be launched by setActiveApp

Syntax

HTML
http://{IP address} or {Host name}/sony/appControl

Authentication Level

private

Request

params' Elements
Not necessary.
JSON Example

JSON
{
    "method": "getApplicationList",
    "id": 60,
    "params": [],
    "version": "1.0"
}

Response

result's Elements
An array of objects composed of the following pairs.

nametypemultiplicitydefaultdescription
titlestring1Application name
uristring1Application URI
iconstring?""URL that indicates the application's icon location.
If this member is skipped, the default is "",
which means that there is no icon for the application.

JSON Example

JSON
{
    "result": [[
        {
            "title": "YouTube",
            "uri": "com.sony.dtv.com.google.android.youtube.tv.com.google.android.apps.youtube.tv.activity.ShellActivity",
            "icon": "http://43.3.149.111/DIAL/icon/com.sony.dtv.com.google.android.youtube.tv.com.google.android.apps.youtube.tv.activity.ShellActivity.png"
        },
        {
            "title": "Screen mirroring",
            "uri": "com.sony.dtv.screnmirroring.com.screnmirroring.com.StartScreenMirroringHomeActivity",
            "icon": "http://43.3.149.111/DIAL/icon/com.sony.dtv.screnmirroring.com.screnmirroring.com.StartScreenMirroringHomeActivity.png"
        }
    ]],
    "id": 60
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

getWebAppStatus (v1.0)

This API provides functions to retrieve the status of WebAppRuntime and to retrieve the URL of the current webpage to open on WebApp.

Syntax

HTML
http://{IP address} or {Host name}/sony/appControl

Authentication Level

private

Request

params' Elements
Not necessary.
JSON Example

JSON
{
    "method": "getWebAppStatus",
    "id": 1,
    "params": [],
    "version": "1.0"
}

Response

result's Elements
An array of objects composed by following pairs.

nametypemultiplicitydefaultdescription
activeboolean1WebAppRuntime application status.
・"true" - active.
・"false" - inactive.
urlstring?""The URL of the current webpage to open on WebApp

JSON Example

JSON
{
    "result": [{
        "active": true,
        "url": "http://example.com/"
    }],
    "id": 1
}

Error Code
Following error codes are important for this API. Refer to error code for other errors.

codeExplanation
7Device is in the power off state.

getApplicationStatusList (v1.0)

This API provides the status of the application itself or the accompanying status related to a specific application.

Syntax

HTML
http://{IP address} or {Host name}/sony/appControl

Authentication Level

none

Request

params' Elements
Not necessary.
JSON Example

JSON
{
    "method": "getApplicationStatusList",
    "id": 55,
    "params": [],
    "version": "1.0"
}

Response

result's Elements
An array of objects composed of the following pairs.

nametypemultiplicitydefaultdescription
namestring1Application name. The following values are defined.
・"textInput" - software keyboard
・"cursorDisplay" - application using a cursor
・"webBrowse" - web browser
statusstring1Application status. The following values are defined.
・"off" - application is inactive
・"on" - application is active

JSON Example

JSON
{
    "result": [[
        {
            "name": "textInput",
            "status": "off"
        },
        {
            "name": "cursorDisplay",
            "status": "off"
        },
        {
            "name": "webBrowse",
            "status": "off"
        }
    ]],
    "id": 55
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

getTextForm (v1.1)

This API returns the current text input on the field of the software keyboard. This version supports encrypted text data transmission.

Note

Please find more details about encryption here.

Syntax

HTML
http://{IP address} or {Host name}/sony/appControl

Authentication Level

private

Request

params' Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
encKeystring?""Encryption key encrypted by the public key.
The default value is "", which means the data is not encrypted.

JSON Example

JSON
{
    "result": [{"text": "hello world!!"}],
    "id": 60
}
JSON
{
    "result": [{"text": "dtA6UNsMnahxCkfGdrc8AFhisnFZg8FnKTl7Sk4Wg9J8gYK8+Dv6Io7Ssef7ZPTo"}],
    "id": 60
}

Error Code
The following error codes are important for this API. Refer to error code for other errors.

code
7Software keyboard is not active
40002Encryption error
40003Client must wait for the previous response.

Appendix

Guide about Request
  • “encKey” must always be set.
  • Otherwise, error #3 “Illegal Argument” is returned.

audio

This service handles APIs that are related to audio functions like volume, sound effects and so on.


setAudioVolume (v1.0)

This API provides the function to change the audio volume level.

Syntax

HTML
http://{IP address} or {Host name}/sony/audio

Authentication Level

generic

Request

params' Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
targetstring1Output target of the sound. The following values are defined.
・"" - outputs sound to all output equipment of the device.
 If the mute information of all outputs is the same, this value is set.
・"speaker" - outputs sound to the speaker(s).
・"headphone" - outputs sound to the headphones
volumestring1Volume level to set. The following formats are applied.
・"N" - N is a numeric string (ex. "25"). The volume is set to level N.
・"+N" - N is a numeric string (ex. "+14"). The volume is increased by an increment of N.
・"-N" - N is a numeric string (ex. "-10"). The volume is reduced by an increment of N.

JSON Example
Set the volume to level 18.

JSON
{
    "method": "setAudioVolume",
    "id": 601,
    "params": [{
        "volume": "18",
        "target": "speaker"
    }],
    "version": "1.0"
}

Increase the volume level by 1.

JSON
{
    "method": "setAudioVolume",
    "id": 601,
    "params": [{
        "volume": "+1",
        "target": "speaker"
    }],
    "version": "1.0"
}

Response

result's Elements
The following value.

typedescription
integerOnly 0 is returned.

JSON Example

JSON
{
    "result": [0],
    "id": 601
}

Error Code
The following error codes are important for this API. Refer to error code for other errors.

codeExplanation
40800Target is not supported or cannot be controlled for some device-specific reason.
40801Volume is out of range.

getSpeakerSettings (v1.0)

This API provides current settings and supported settings related to speaker configuration items.

Syntax

HTML
http://{IP address} or {Host name}/sony/audio

Authentication Level

none

Request

params' Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
targetstring?""Target name. The default value is "". This indicates the settings of all targets.
The client can get all speaker setting information by setting the empty string to "target".
The client can get specific speaker setting values by explicitly setting the target name
to "target".

・"" - Settings of all targets.
・"tvPosition" - Sets the sound according to the display position.
・"subwooferLevel" - Sets the level of the Subwoofer speaker.
 Note that the range and step values vary depending on the device.
・"subwooferFreq" - Adjusts the cut off frequency of the Wireless Subwoofer.
 All frequencies the cut off frequency are output to the Wireless Subwoofer
 instead of the display speakers.
・"subwooferPhase" - Sets the phase polarity of the subwoofer.
・"subwooferPower" - Sets the power control method of the Wireless Subwoofer.

JSON Example

JSON
{
    "method": "getSpeakerSettings",
    "id": 67,
    "params": [{"target": "tvPosition"}],
    "version": "1.0"
}

Response

result's Elements
An array of objects composed of the following pairs.

nametypemultiplicitydefaultdescription
targetstring1Target name.
・"tvPosition" - Sets the sound according to the display position.
・"subwooferLevel" - Sets the level of the Subwoofer speaker.
 Note that the range and step values vary depending on the device.
・"subwooferFreq" - Adjusts the cut off frequency of the Wireless Subwoofer.
 All frequencies the cut off frequency are output to the Wireless Subwoofer
 instead of the display speakers.
・"subwooferPhase" - Sets the phase polarity of the subwoofer.
・"subwooferPower" - Sets the power control method of the Wireless Subwoofer.
currentValuestring1Current value of the target.

If "target" is "tvPosition"
・"tableTop" - Provides the best sound quality when you place
 the display on a table.
・"wallMount" - Provides the best sound quality when you hang
 the display on a wall.

If "target" is "subwooferLevel"
・0 - Minimum value.
・:(step by 1)
・24 - Maximum value.

If "target" is "subwooferFreq"
・0 - Minimum value.
・:(step by 1)
・30 - Maximum value.

If "target" is "subwooferPhase"
・"normal" - normal.
・"reverse" - reverse.

If "target" is "subwooferPower"
・"on" - on.
・"off" - off.

JSON Example

JSON
{
    "result": [[{
        "currentValue": "tableTop",
        "target": "tvPosition"
    }]],
    "id": 67
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

getVolumeInformation (v1.0)

This API provides information about the sound volume (and mute status) of the device.

Syntax

HTML
http://{IP address} or {Host name}/sony/audio

Authentication Level

none

Request

params' Elements
Not necessary.
JSON Example

JSON
{
    "method": "getVolumeInformation",
    "id": 33,
    "params": [],
    "version": "1.0"
}

Response

result's Elements
An array of objects composed of the following pairs.

nametypemultiplicitydefaultdescription
targetstring1Output target of the sound. The following values are defined.
・"speaker" - outputs sound to the speaker(s)
・"headphone" - outputs sound to the headphones
volumeinteger1Current volume.
muteboolean1Current mute status.
・true - mute
・false - not mute
maxVolumeinteger1Max volume level (ex. 100)
minVolumeinteger1Min volume level (ex. 0)
JSON
{
    "result": [[
        {
            "volume": 25,
            "minVolume": 0,
            "mute": false,
            "maxVolume": 100,
            "target": "speaker"
        },
        {
            "volume": 10,
            "minVolume": 0,
            "mute": false,
            "maxVolume": 100,
            "target": "headphone"
        }
    ]],
    "id": 33
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

setAudioMute (v1.0)

This API provides the function to change the audio mute status.

Syntax

HTML
http://{IP address} or {Host name}/sony/audio

Authentication Level

generic

Request

params' Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
statusboolean1Mute status to set.
・true - mute
・false - not mute

JSON Example

JSON
{
    "method": "setAudioMute",
    "id": 601,
    "params": [{"status": true}],
    "version": "1.0"
}

Response

result's Elements
The following value.

typedescription
integerOnly 0 is returned.

JSON Example

JSON
{
    "result": [0],
    "id": 601
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

setAudioVolume (v1.2)

This API provides the function to change the audio volume level.

Syntax

HTML
http://{IP address} or {Host name}/sony/audio

Authentication Level

generic

Request

params' Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
targetstring1Output target of the sound. The following values are defined.
・"" - outputs sound to all output equipment of the device.
 If the mute information of all outputs is the same, this value is set.
・"speaker" - outputs sound to the speaker(s)
・"headphone" - outputs sound to the headphones
volumestring1Volume level to set. The following formats are applied.
・"N" - N is a numeric string (ex. "25"). The volume is set to level N.
・"+N" - N is a numeric string (ex. "+14"). The volume is increased by an increment of N.
・"-N" - N is a numeric string (ex. "-10"). The volume is reduced by an increment of N.
uistring?nullIf the UI (volume bar, etc.) should be displayed, set this "on".
・"on" - UI is displayed.
・"off" - UI is not displayed.
・null - Not specified. (depends on the server)

JSON Example

JSON
{
    "method": "setAudioVolume",
    "id": 98,
    "params": [{
        "volume": "5",
        "ui": "on",
        "target": "speaker"
    }],
    "version": "1.2"
}

Response

result's Elements
Not necessary.
JSON Example

JSON
{
    "result": [],
    "id": 98
}

Error Code
The following error codes are important for this API. Refer to error code for other errors.

code
40800Target is not supported or cannot be controlled for some device-specific reason.
40801Volume is out of range.

setSoundSettings (v1.1)

This API provides the function to change the settings related to sound setting items.

Syntax

HTML
http://{IP address} or {Host name}/sony/audio

Authentication Level

generic

Request

params' Elements
An object composed of the following pair(s).

settings
typemultiplicitydefaultdescription
(object-array)1Object to accommodate one or more target/value pair(s).
target
typemultiplicitydefaultdescription
string1Target name (UI setting target)
・"outputTerminal" - Selecting speakers or terminals to output sound.
value
typemultiplicitydefaultdescription
string1The value to set for the target name.

If "target" is "outputTerminal"
・"speaker" - Audio is output from the speaker.
・"speaker_hdmi" - Audio is output from the speaker and HDMI.
・"hdmi" - Audio is output from HDMI.
・"audioSystem" - Audio is output from HDMI or digital audio ・output.

JSON Example

JSON
{
    "method": "setSoundSettings",
    "id": 5,
    "params": [{"settings": [{
        "value": "speaker",
        "target": "outputTerminal"
    }]}],
    "version": "1.1"
}

Response

result's Elements
Not necessary.
JSON Example

JSON
{
    "result": [],
    "id": 5
}

Error Code
The following error codes are important for this API. Refer to error code for other errors.

codeExplanation
40004One or more settings are not set by error when multiple settings are set.
The client needs to call paired APIs (getXXXSettings) to identify which parameters failed to be updated.

setSpeakerSettings (v1.0)

This API provides the function to change the settings related to speaker setting items.

Syntax

HTML
http://{IP address} or {Host name}/sony/audio

Authentication Level

generic

Request

params' Elements
An object composed of the following pair(s).

settings
typemultiplicitydefaultdescription
(object-array)1Object to accommodate one or more target/value pair(s).
target
typemultiplicitydefaultdescription
string1Target name. (UI setting target)

・"tvPosition" - Sets the sound according to the display position.
・"subwooferLevel" - Sets the level of the Subwoofer speaker.
 Note that the range and step values vary depending on the device.
・"subwooferFreq" - Adjusts the cut off frequency of the Wireless Subwoofer.
 All frequencies below the cut off frequency are output to the Wireless Subwoofer
 instead of the display speakers.
・"subwooferPhase" - Sets the phase polarity of the subwoofer.
・"subwooferPower" - Sets the power control method of the Wireless Subwoofer.
value
typemultiplicitydefaultdescription
string1The value to set for the target name.

If "target" is "tvPosition"
・"tableTop" - Provides the best sound quality when you place the display on a TV stand.
・"wallMount" - Provides the best sound quality when you hang the display on a wall.

If "target" is "subwooferLevel"
・0 - Minimum value.
・:(step by 1)
・24 - Maximum value.

If "target" is "subwooferFreq"
・0 - Minimum value.
・:(step by 1)
・30 - Maximum value.

If "target" is "subwooferPhase"
・"normal" - normal.
・"reverse" - reverse.

If "target" is "subwooferPower"
・"on" - on.
・"off" - off.

JSON Example

JSON
{
    "method": "setSpeakerSettings",
    "id": 62,
    "params": [{"settings": [{
        "value": "wallMount",
        "target": "tvPosition"
    }]}],
    "version": "1.0"
}

Response

result's Elements
Not necessary.
JSON Example

JSON
{
    "result": [],
    "id": 62
}

Error Code
The following error codes are important for this API. Refer to error code for other errors.

codeExplanation
40004One or more settings are not set by error when multiple settings are set.
The client needs to call paired APIs (getXXXSettings) to identify which parameters failed to be updated.

avContent

This service handles overall control of input and output of the device for AV contents and manipulating AV contents themselves on the device. For example, there is an API to request display channel list, request it to set to a certain channel, and also request it to change to an external input like HDMI. Several APIs have URI parameters to specify the input and output of the device or contents itself. Please find more details about the concept of URI <a href="">here</a>.


setPlayContent (v1.0)

This API provides the function to play content. With this API, content specified in the request parameter is shown to the user.

Syntax

HTML
http://{IP address} or {Host name}/sony/avContent

Authentication Level

generic

Request

params' Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
uristring1URI obtained from getContentList API. Refer to here to learn the URI structure in detail.

JSON Example

JSON
{
    "method": "setPlayContent",
    "id": 101,
    "params": [{"uri": "extInput:hdmi?port=2"}],
    "version": "1.0"
}

Response

result's Elements
Not necessary.
JSON Example

JSON
{
    "result": [],
    "id": 101
}

Error Code
The following error codes are important for this API. Refer to error code for other errors.

codeExplanation
41001Content does not exist.
41011Channel is fixed by USB recording.
41012Channel is fixed by SCART recording.

Appendix

Guide about Request
  • The types of lists that this API doesn’t play are:
    • Media files in USB storage. For example, mp3 music files jpeg files, or mp4 video files.
    • Media files provided by a DLNA server.

getCurrentExternalInputsStatus (v1.1)

This API provides information on the current status of all external input sources of the device.

Syntax

HTML
http://{IP address} or {Host name}/sony/system

Authentication Level

none

Request

params' Elements
Not necessary.
JSON Example

JSON
{
    "method": "getCurrentExternalInputsStatus",
    "id": 105,
    "params": [],
    "version": "1.1"
}

Response

result's Elements
An array of objects composed of the following pairs.

nametypemultiplicitydefaultdescription
uristring1URI to identify the content. Refer to here to learn the URI structure in detail.
・(ex) "extInput:hdmi?port=2"
titlestring1Name of input.
・(ex) "HDMI 2"
・(ex) "Component 1"
connectionboolean1Input connection status.
・true - connected
・false - not connected
labelstring1Label name of the input set by the user.
・(ex) "Game"
iconstring1Icon type to give a hint to the application which icon to show for the user.
The type is indicated by a "meta" URI format and implies that the developers
of the client side should prepare some actual images with respect to the meta URI.
The following meta URIs are defined.

・"meta:composite" - Composite input
・"meta:svideo" - S-Video input
・"meta:composite_componentd" - Composite and D-Component combined input
・"meta:component" - Component input (Y and Pb/Cb and Pr/Cr connectors)
・"meta:componentd" - D-Component input
・"meta:scart" - SCART input
・"meta:hdmi" - HDMI input
・"meta:dsub15" - D-subminiature 15pin input
・"meta:tuner" - Tuner device is connected.
・"meta:tape" - Tape player device is connected.
・"meta:disc" - Disk player device is connected.
・"meta:complex" - Complex device is connected.
・"meta:avamp" - AV amp device is connected.
・"meta:hometheater" - Home theater device is connected.
・"meta:game" - Game player is connected.
・"meta:camcoder" - Video camera is connected.
・"meta:digitalcamera" - Still camera is connected.
・"meta:pc" - Personal computer is connected.
・"meta:tv" - TV-type CEC device is connected.
・"meta:audiosystem" - Audio system-type CEC device is connected.
・"meta:recordingdevice" - Recording-type CEC device is connected.
・"meta:playbackdevice" - Playback-type CEC device is connected.
・"meta:tunerdevice" - Tuner-type CEC device is connected.
・"meta:wifidisplay" - WiFi Display input
statusstring?nullInput signal status.

・"true" - signal is detected.
・"false" - signal is not detected.
・null - unknown

JSON Example

JSON
{
    "result": [[
        {
            "icon": "meta:game",
            "connection": false,
            "label": "GAME",
            "title": "Component1",
            "uri": "extInput:component?port=1",
            "status": "false"
        },
        {
            "icon": "meta:component",
            "connection": true,
            "label": "",
            "title": "Component2",
            "uri": "extInput:component?port=2",
            "status": "false"
        },
        {
            "icon": "meta:hdmi",
            "connection": true,
            "label": "",
            "title": "HDMI1",
            "uri": "extInput:hdmi?port=1",
            "status": "true"
        },
        {
            "icon": "meta:recordingdevice",
            "connection": true,
            "label": "BDPlayer",
            "title": "Player1",
            "uri": "extInputs:cec?type=player&port=1",
            "status": "false"
        }
    ]],
    "id": 105
}

Error CodeNo additional error codes are defined. Refer to error code for common errors.

getCurrentExternalInputsStatus (v1.0)

This API provides information on the current status of all external input sources of the device.

Syntax

HTML
http://{IP address} or {Host name}/sony/avContent

Authentication Level

none

Request

params' Elements
Not necessary.
JSON Example

JSON
{
    "method": "getCurrentExternalInputsStatus",
    "id": 105,
    "params": [],
    "version": "1.0"
}

Response

result's Elements
An array of objects composed of the following pairs.

nametypemultiplicitydefaultdescription
uristring1URI to identify the content. Refer to here to learn the URI structure in detail.
・(ex) "extInput:hdmi?port=2"
titlestring1Name of input.
・(ex) "HDMI 2"
・(ex) "Component 1"
connectionboolean1Input connection status.
・true - connected
・false - not connected
labelstring1Label name of the input set by the user.
・(ex) "Game"
iconstringIcon type to give a hint to the application which icon to show for the user.
The type is indicated by a "meta" URI format and implies that the developers
of the client side should prepare some actual images with respect to the meta URI.
The following meta URIs are defined.

・"meta:composite" - Composite input
・"meta:svideo" - S-Video input
・"meta:composite_componentd" - Composite and D-Component combined input
・"meta:component" - Component input (Y and Pb/Cb and Pr/Cr connectors)
・"meta:componentd" - D-Component input
・"meta:scart" - SCART input
・"meta:hdmi" - HDMI input
・"meta:dsub15" - D-subminiature 15pin input
・"meta:tuner" - Tuner device is connected.
・"meta:tape" - Tape player device is connected.
・"meta:disc" - Disk player device is connected.
・"meta:complex" - Complex device is connected.
・"meta:avamp" - AV amp device is connected.
・"meta:hometheater" - Home theater device is connected.
・"meta:game" - Game player is connected.
・"meta:camcoder" - Video camera is connected.
・"meta:digitalcamera" - Still camera is connected.
・"meta:pc" - Personal computer is connected.
・"meta:tv" - TV-type CEC device is connected.
・"meta:audiosystem" - Audio system-type CEC device is connected.
・"meta:recordingdevice" - Recording-type CEC device is connected.
・"meta:playbackdevice" - Playback-type CEC device is connected.
・"meta:tunerdevice" - Tuner-type CEC device is connected.
・"meta:wifidisplay" - WiFi Display input

JSON Example

JSON
{
    "result": [[
        {
            "icon": "meta:game",
            "connection": false,
            "label": "GAME",
            "title": "Component1",
            "uri": "extInput:component?port=1"
        },
        {
            "icon": "meta:component",
            "connection": true,
            "label": "",
            "title": "Component2",
            "uri": "extInput:component?port=2"
        },
        {
            "icon": "meta:hdmi",
            "connection": true,
            "label": "",
            "title": "HDMI1",
            "uri": "extInput:hdmi?port=1"
        },
        {
            "icon": "meta:recordingdevice",
            "connection": true,
            "label": "BDPlayer",
            "title": "Player1",
            "uri": "extInputs:cec?type=player&port=1"
        }
    ]],
    "id": 105
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

getPlayingContentInfo (v1.0)

This API provides information of the currently playing content or the currently selected input.

Syntax

HTML
http://{IP address} or {Host name}/sony/avContent

Authentication Level

private

Request

params' Elements
Not necessary.
JSON Example

JSON
{
    "method": "getPlayingContentInfo",
    "id": 103,
    "params": [],
    "version": "1.0"
}

Response

result's Elements
An object composed of the following pair(s).

In case of “extInput:*” as source
nametypemultiplicitydefaultdescription
uristring1URI to identify the content. Refer to here to learn the URI structure in detail.
・(ex) "extInput:hdmi?port=1"
sourcestring1Source of the content.
titlestring1Title of this content to be recognized by the user.
・(ex) "HDMI 1"
・(ex) "AV2/Component"
Note: Use the getCurrentExternalInputStatus method to get the label name
that a user sets via the UI setting.

JSON Example

JSON
{
    "result": [{
        "source": "extInput:hdmi",
        "title": "HDMI 2",
        "uri": "extInput:hdmi?port=2"
    }],
    "id": 103
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

getContentCount (v1.0)

This API provides the count of contents in the source. For example, this API returns the number of external inputs by indicating "extInput:hdmi" as the source.

Syntax

HTML
http://{IP address} or {Host name}/sony/avContent

Authentication Level

private

Request

params' Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
sourcestring1Source name composed of the URI with a scheme and path.
Refer to here to learn the source and URI structure in detail.
typestring?""(Refer to the type parameter of GetContentList)

JSON Example

JSON
{
    "method": "getContentCount",
    "id": 11,
    "params": [{"source": "extInput:hdmi"}],
    "version": "1.0"
}

Response

result's Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
countinteger1The number of contents in the source.

JSON Example

JSON
{
    "result": [{"count": 4}],
    "id": 11
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

getContentCount (v1.1)

This API provides the count of contents in the source. For example, this API returns the number of external inputs by indicating "extInput:hdmi" as the source.

Syntax

HTML
http://{IP address} or {Host name}/sony/avContent

Authentication Level

private

Request

params' Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
sourcestring1Source name composed of the URI with a scheme and path.
Refer to here to learn the source and URI structure in detail.
typestring?""(Refer to the type parameter of GetContentList)
targetstring?""(Refer to the type parameter of GetContentList)

JSON Example

JSON
{
    "method": "getContentCount",
    "id": 11,
    "params": [{"source": "extInput:hdmi"}],
    "version": "1.1"
}

Response

result's Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
countinteger1The number of contents in the source.

JSON Example

JSON
{
    "result": [{"count": 4}],
    "id": 11
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

getContentList (v1.5)

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.

Getting content information:

To retrieve information about the content on a device, the client needs to know the source URI. The client can obtain the source URI using getSchemeList and getSourceList.

  1. First, the client calls getSchemeList to get a list of available schemes.
  2. Then, the client sets one of these schemes to the scheme parameter of getSourceList and calls this API to obtain the source URI.
  3. Finally, the client sets the obtained source URI to the uri parameter of getContentList and calls this API to retrieve or browse the content information.

For details on how to get content information, see Getting content information.

Syntax

HTML
http://{IP address} or {Host name}/sony/avContent

Authentication Level

private

Request

params' Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
uristring?nullURI to identify the content. Null means all contents are supported by the device.
Refer to here to learn the URI
stIdxinteger?0Start index to get list items.
cntinteger?50Count of the maximum number of items that can be listed, starting from "stIdx".

JSON Example

JSON
{
    "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:*”
nametypemultiplicitydefaultdescription
uristring1URI to identify the content. Refer to here to learn the URI structure in detail.
・(ex) "extInput:hdmi?port=1"
titlestring?nullTitle of this content to be recognized by the user. The default value is null.
This means that there is no title information.
indexinteger?0Index 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

JSON
{
    "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.

codeExplanation
41020Storage 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
uriincludedPlease refer to REST API Device Resource URI.
titleincludedInput 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.
indexincluded

getSchemeList (v1.0)

This API provides the list of schemes that the device can handle.

Syntax

HTML
http://{IP address} or {Host name}/sony/avContent

Authentication Level

none

Request

params' Elements
Not necessary.
JSON Example

JSON
{
    "method": "getSchemeList",
    "id": 1,
    "params": [],
    "version": "1.0"
}

Response

result's Elements
An array of objects composed of the following pairs.

nametypemultiplicitydefaultdescription
schemestring1Scheme name. Refer to here to learn the scheme and URI structure in detail.

JSON Example

JSON
{
    "result": [[
        {"scheme": "extInput"},
        {"scheme": "fav"}
    ]],
    "id": 1
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

Appendix

Guide about Response
  • This API doesn’t support media contents in DLNA and USB storage.

getSourceList (v1.0)

This API provides the list of sources in the scheme.

Syntax

HTML
http://{IP address} or {Host name}/sony/avContent

Authentication Level

none

Request

params' Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
schemestring1Scheme name. Refer to here to learn the scheme and URI structure in detail.
JSON
{
    "method": "getSourceList",
    "id": 1,
    "params": [{"scheme": "extInput"}],
    "version": "1.0"
}

Response

result's Elements
An array of objects composed of the following pairs.

nametypemultiplicitydefaultdescription
sourcestring1Source name composed by a URI with a scheme and path.
Refer to here to learn the source and URI structure in detail.

JSON Example

JSON
{
    "result": [[
        {"source": "extInput:hdmi"},
        {"source": "extInput:component"},
        {"source": "extInput:cec"},
        {"source": "extInput:widi"}
    ]],
    "id": 1
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

Appendix

Guide about Request
  • Supported schemes are replied to by getSchemeList.

encryption

This service handles APIs that are related to encryption.


getPublicKey (v1.0)

This API requests the device to provide an RSA public key for encryption. For details on encryption specifications, please see Data Encryption.

Syntax

HTML
http://{IP address} or {Host name}/sony/encryption

Authentication Level

none

Request

params' Elements
Not necessary.
JSON Example

JSON
{
    "method": "getPublicKey",
    "id": 1,
    "params": [],
    "version": "1.0"
}

Response

result's Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
publicKeystring1RSA public key.

JSON Example

JSON
{
    "result": [{"publicKey": "AAAAB3NzaC1yc2EAAAABIwAAAQEA3p6TmGYDRtnnmzckD5leg7lHIUY9cuV6vFvacew1uZ7Bmx2MF9a7SqmtiLDkLS3P9y9eobRjuWriSfgmqDPRFRU2mdwAmRm2aIvYa6WkzvnrfUhGR+SCT/Z62j7V9ps6Mt5HB8mFQj3494p4StTPVS1nFqvEUazEx13EJnJyHsdYqsV6UJV169e43oLSSccb3lr8BzeMUnGEfY+NKlAxDpEycr5jJYyTkLfrbX0lyAPs+vLwLRYhm+h2qJYAZUwknus4vD7aki4G69S+gnENClglh/e9ut9Q5BrtxiBQCEikn9V9rlnVkbp1eEUf89XFiHRWMVrRAINtJyQFvvoPOQ=="}],
    "id": 1
}

Error Code
The following error codes are important for this API. Refer to error code for other errors.

codeExplanation
42400Key does not exist yet.

system

This service handles APIs that are related to basic device functions like as follows. ・To provide device related information like category, serial number and so on. ・To provide/change general setting information like network setting, power status, clock setting and so on. ・To provide function to access general component to Sony device, like Remote Commander.


getScreenshot v1.0

This API provides a function to capture screenshot image and returns 320x180 jpeg data encoded Base64.

Syntax

HTML
http://{IP address} or {Host name}/sony/system

Authentication Level

private

Request

nametypemultiplicitydefaultdescription
planestring?"mixed"Target plane.
"video": HDMI plane
"graphics": UI plane
"mixed": HDMI and UI planes

JSON example:

JSON
{
    "method": "getScreenshot",
    "id": 51,
    "params": [{
        "plane": "video"
    }],
    "version": "1.0"
}

Response

nametypemultiplicitydefaultdescription
datastring1Base64 encoded 320x180 or 1920x1080 jpeg data. 

JSON example:

JSON
{
    "result": [{
        "data": "\/9j\/4AAQSkZJRgABAQAAAQAB..."
    }]
    "id": 51
}

Error codes:

CodeDescription
[7,”Illegal State”]ex. Screen saver is launched
[40005,”Display Is Turned off”]
[40007, “Security error”]

setPowerSavingMode (v1.0)

his API provides the function to change the setting of the power saving mode and adjust the device's power consumption.

Syntax

HTML
http://{IP address} or {Host name}/sony/system

Authentication Level

generic

Request

params' Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
modestring1Current power saving mode. The following values are defined.
・"off" - Power saving mode is disabled.
・"low" - Power saving mode is enabled at a low level.
・"high" - Power saving mode is enabled at a high level.
・"pictureOff" - Power saving mode is enabled with the panel output off.

JSON Example

JSON
{
    "method": "setPowerSavingMode",
    "id": 52,
    "params": [{"mode": "pictureOff"}],
    "version": "1.0"
}

Response

result's Elements
Not necessary.
JSON Example

JSON
{
    "result": [],
    "id": 52
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

getCurrentTime (v1.0)

This API provides the current time set in the device.

Syntax

HTML
http://{IP address} or {Host name}/sony/system

Authentication Level

none

Request

params' Elements
Not necessary.

JSON
{
    "method": "getCurrentTime",
    "id": 51,
    "params": [],
    "version": "1.0"
}

Response

result's Elements
The following value.

typedescription
stringCurrent time set in the device.(ISO8601 format)

JSON Example

JSON
{
    "result": ["2018-10-03T13:03:04+0100"],
    "id": 51
}

Error Code
The following error codes are important for this API. Refer to error code for other errors.

codeExplanation
7Clock is not set on the device.

getCurrentTime (v1.1)

This API provides the current time set in the device. This version has the additional response parameters of timezone and DST (Daylight Saving Time) offset information.

Syntax

HTML
http://{IP address} or {Host name}/sony/system

Authentication Level

none

Request

params' Elements
Not necessary.
JSON Example

JSON
{
    "method": "getCurrentTime",
    "id": 51,
    "params": [],
    "version": "1.1"
}

Response

result's Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
dateTimestring1Current time set in the device.(ISO8601 format).
timeZoneOffsetMinuteinteger1Timezone offset. (unit: minute, range: ±(23*60+59))
dstOffsetMinuteinteger1DST offset. (unit: minute, range: ±(23*60+59))

JSON Example

JSON
{
    "result": [{
        "dateTime": "2018-10-03T13:03:59+0100",
        "timeZoneOffsetMinute": 60,
        "dstOffsetMinute": 60
    }],
    "id": 51
}

Error Code
The following error codes are important for this API. Refer to error code for other errors.

codeExplanation
7Clock is not set on the device

getNetworkSettings (v1.0)

This API provides information about network settings.

Syntax

HTML
http://{IP address} or {Host name}/sony/system

Authentication Level

generic

Request

params' Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
netifstring?""Network interface. The default value is "". (This indicates all interfaces.)

JSON Example

JSON
{
    "method": "getNetworkSettings",
    "id": 2,
    "params": [{"netif": "eth0"}],
    "version": "1.0"
}

Response

result's Elements
An array of objects composed of the following pairs.

nametypemultiplicitydefaultdescription
netifstring1Network Interface.
・(ex) "eth0"
・(ex) "wlan0"
hwAddrstring1Hardware address. (MAC Address)
ipAddrV4string1IP Address for IPv4.
ipAddrV6string1IP Address for IPv6.
netmaskstring1Netmask.
gatewaystring1Gateway.
dnsstring-array1DNS

JSON Example

JSON
{
    "result": [[
        {
            "hwAddr": "FF-FF-FF-FF-FF-FF",
            "netmask": "255.255.255.0",
            "ipAddrV4": "0.0.0.0",
            "netif": "eth0",
            "ipAddrV6": "ffff::ffff:ffff:fffd%7",
            "dns": [
                "0.0.0.0",
                "1.1.1.1"
            ],
            "gateway": "0.0.0.0"
        },
        {
            "hwAddr": "00-00-00-00-00-00",
            "netmask": "255.255.255.0",
            "ipAddrV4": "0.0.0.1",
            "netif": "wlan0",
            "ipAddrV6": "ffff::ffff:ffff:fffd%8",
            "dns": [
                "0.0.0.0",
                "fec0:0:0:ffff::1%1"
            ],
            "gateway": "0.0.0.0"
        }
    ]],
    "id": 2
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

Appendix

  • This API provides information about network settings.
  • The response includes information only about the active network interface.
  • The active network interface is assigned an IP address.
  • It is possible to set up connection of either Wired or Wi-Fi.
  • It depends on the current network settings of “Wired + (Wi-Fi Direct)” or “Wi-Fi + (Wi-Fi Direct)”.
  • When the “built-in Wi-Fi” set is on and the connection setup is Wi-Fi, an IP address is assigned even if it is not connected to the access point.
Guide about Request
nameexplanation
netifThe value of “netif” is “eth0”, “wlan0”, “p2p1”, or “”. If the value is empty, this indicates all interfaces.

getInterfaceInformation (v1.0)

This API provides information of the REST API interface provided by the server. This API must not include private information.

Syntax

HTML
http://{IP address} or {Host name}/sony/system

Authentication Level

none

Request

params' Elements
Not necessary.
JSON Example

JSON
{
    "method": "getInterfaceInformation",
    "id": 33,
    "params": [],
    "version": "1.0"
}

Response

result's Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
productCategorystring1Category name of the device.
productNamestring1More detailed product information can be returned if productCategory
is not enough.
modelNamestring1Model name.
serverNamestring1Server name. If the device can launch multiple REST API servers,
return this server's name for the client to distinguish.
interfaceVersionstring1Version for the client to change its behavior with regards to significant
differences within productCategory.
This version is managed/controlled within each productCategory.
The composition of this parameter is "[X].[Y].[Z]", where [X], [Y], and [Z] are
strings each representing an integer and concatenated with periods "."
in between.

・[X]: This value is assigned and incremented so that the client can distinguish
any significant differences between devices or groups of devices
within productCategory.
How this value is assigned depends on each productCategory.
・[Y]: This value represents the versions of API sets supported within [X].
This version must be incremented if supported APIs are added or deleted.
・[Z]: This value must be incremented if any behavior of existing APIs is changed
within [X.Y].

JSON Example

JSON
{
    "result": [{
        "modelName": "FW-55BZ35F",
        "serverName": "",
        "interfaceVersion": "5.0.1",
        "productName": "BRAVIA",
        "productCategory": "tv"
    }],
    "id": 33
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

Appendix

Guide about Response
  • BRAVIA Professional Display returns fixed values for the following parameters.
namevalue
productCategory“tv”
productName“BRAVIA”
serverName””
  • "interfaceVersion” is stored as below. This value should match with the version of the interface.
Softwarevalue
PKG6.5603.0175“5.0.1”

getRemoteDeviceSettings (v1.0)

This API provides the current settings and supported settings related to remote devices, which can access the server device from outside the door.

Syntax

HTML
http://{IP address} or {Host name}/sony/system

Authentication Level

none

Request

params' Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
targetstring?""Target name. The default value is "". This indicates the settings of all targets.
The client can get all remote device setting information by setting the empty string
to "target".
The client can get specific remote device setting values by explicitly setting the target name
to "target".

・"accessPermission" - Sets whether to permit access from remote devices,
 which can access the server device from outside the door.
・"" - Settings of all targets.
JSON
{
    "method": "getRemoteDeviceSettings",
    "id": 44,
    "params": [{"target": "accessPermission"}],
    "version": "1.0"
}

Response

result's Elements
An array of objects composed of the following pairs.

nametypemultiplicitydefaultdescription
targetstring1Target name.

・"accessPermission" - Sets whether to permit access from remote devices,
 which can access the server device from outside the door.
currentValuestring1Current value of the target.

・If "target" is "accessPermission"
"on" - access is permitted.
"off" - access is not permitted.

JSON Example

JSON
{
    "result": [[{
        "currentValue": "on",
        "target": "accessPermission"
    }]],
    "id": 44
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

Appendix

Guide about Response
  • The value for “currentValue” when the value for “target” is “accessPermission” indicates the remote start setting for BRAVIA Professional Display.

getLEDIndicatorStatus (v1.0)

This API provides function to get the LED Indicator mode.

Syntax

HTML
http://{IP address} or {Host name}/sony/system

Authentication Level

generic

Request

params' Elements
Not necessary.
JSON Example

JSON
{
    "method": "getLEDIndicatorStatus",
    "id": 45,
    "params": [],
    "version": "1.0"
}

Response

result's Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
modestring1Functional meaning of the target LED.
・"Demo"
・"AutoBrightnessAdjust"
・"Dark"
・"SimpleResponse"
・"Off"
statusstring?nullLED Indicator status.
・"true" - On
・"false" - Off
・null - Unknown

JSON Example

JSON
{
    "result": [{
        "mode": "Demo",
        "status": "true"
    }],
    "id": 45
}

Error Code
Following error codes are important for this API. Refer to error code for other errors.

codeExplanation
7Cannot change the status of the LED for device-specific reasons.

getPowerSavingMode (v1.0)

This API provides the setting of the power saving mode to adjust the device's power consumption.

Syntax

HTML
http://{IP address} or {Host name}/sony/system

Authentication Level

none

Request

params' Elements
Not necessary.
JSON Example

JSON
{
    "method": "getPowerSavingMode",
    "id": 51,
    "params": [],
    "version": "1.0"
}

Response

result's Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
modestring1Current power saving mode. The following values are defined.
・"off" - Power saving mode is disabled.
・"low" - Power saving mode is enabled at a low level.
・"high" - Power saving mode is enabled at a high level.
・"pictureOff" - Power saving mode is enabled with the panel output off.

JSON Example

JSON
{
    "result": [{"mode": "high"}],
    "id": 51
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

getPowerStatus (v1.0)

This API provides the current power status of the device.

Note

It is possible that some devices may not respond when they are in the power off state.

Syntax

HTML
http://{IP address} or {Host name}/sony/system

Authentication Level

none

Request

params' Elements
Not necessary.
JSON Example

JSON
{
    "method": "getPowerStatus",
    "id": 50,
    "params": [],
    "version": "1.0"
}

Response

result's Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
statusstring1Current power status. The following values are defined.
・"standby" - Device is in the power off state.
・"active" - Device is in the power on state.

JSON Example

JSON
{
    "result": [{"status": "standby"}],
    "id": 50
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

getRemoteControllerInfo (v1.0)

This API provides the information of the device's remote controller.

Syntax

HTML
http://{IP address} or {Host name}/sony/system

Authentication Level

none

Request

params' Elements
Not necessary.
JSON Example

JSON
{
    "method": "getRemoteControllerInfo",
    "id": 54,
    "params": [],
    "version": "1.0"
}

Response

result's Elements (1st)
This element is deprecated. Please don't use.
result's Elements (2nd)
An array of objects composed of the following pairs.

nametypemultiplicitydefaultdescription
namestring1Name of remote controll button.
valuestring1IRCC code value that is supported in this device

JSON Example

JSON
{
    "result": [
        {
            "bundled": true,
            "type": "IR_REMOTE_BUNDLE_TYPE_AEP"
        },
        [
            {
                "name": "PowerOff",
                "value": "AAAAAQAAAAEAAAAvAw=="
            },
            {
                "name": "Input",
                "value": "AAAAAQAAAAEAAAAlAw=="
            },
            {
                "name": "Home",
                "value": "AAAAAQAAAAEAAABgAw=="
            }
        ]
    ],
    "id": 54
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

Appendix

Guide about Response

  • The values listed below are included in 2nd Element.
namevalue
“Display”“AAAAAQAAAAEAAAA6Aw==”
“Home”“AAAAAQAAAAEAAABgAw==”
“Options”“AAAAAgAAAJcAAAA2Aw==”
“Return”“AAAAAgAAAJcAAAAjAw==”
“Up”“AAAAAQAAAAEAAAB0Aw==”
“Down”“AAAAAQAAAAEAAAB1Aw==”
“Right”“AAAAAQAAAAEAAAAzAw==”
“Left”“AAAAAQAAAAEAAAA0Aw==”
“Confirm”“AAAAAQAAAAEAAABlAw==”
“Red”“AAAAAgAAAJcAAAAlAw==”
“Green”“AAAAAgAAAJcAAAAmAw==”
“Yellow”“AAAAAgAAAJcAAAAnAw==”
“Blue”“AAAAAgAAAJcAAAAkAw==”
“Num1”“AAAAAQAAAAEAAAAAAw==”
“Num2”“AAAAAQAAAAEAAAABAw==”
“Num3”“AAAAAQAAAAEAAAACAw==”
“Num4”“AAAAAQAAAAEAAAADAw==”
“Num5”“AAAAAQAAAAEAAAAEAw==”
“Num6”“AAAAAQAAAAEAAAAFAw==”
“Num7”“AAAAAQAAAAEAAAAGAw==”
“Num8”“AAAAAQAAAAEAAAAHAw==”
“Num9”“AAAAAQAAAAEAAAAIAw==”
“Num0”“AAAAAQAAAAEAAAAJAw==”
“VolumeUp”“AAAAAQAAAAEAAAASAw==”
“VolumeDown”“AAAAAQAAAAEAAAATAw==”
“Mute”“AAAAAQAAAAEAAAAUAw==”
“ChannelUp”“AAAAAQAAAAEAAAAQAw==”
“ChannelDown”“AAAAAQAAAAEAAAARAw==”
“SubTitle”“AAAAAgAAAJcAAAAoAw==”
“DOT”“AAAAAgAAAJcAAAAdAw==”
“PicOff”, “PictureOff”“AAAAAQAAAAEAAAA+Aw==”
“Wide”“AAAAAgAAAKQAAAA9Aw==”
“Jump”“AAAAAQAAAAEAAAA7Aw==”
“SyncMenu”“AAAAAgAAABoAAABYAw==”
“Forward”“AAAAAgAAAJcAAAAcAw==”
“Play”“AAAAAgAAAJcAAAAaAw==”
“Rewind”“AAAAAgAAAJcAAAAbAw==”
“Prev”“AAAAAgAAAJcAAAA8Aw==”
“Stop”“AAAAAgAAAJcAAAAYAw==”
“Next”“AAAAAgAAAJcAAAA9Aw==”
“Pause”“AAAAAgAAAJcAAAAZAw==”
“FlashPlus”“AAAAAgAAAJcAAAB4Aw==”
“FlashMinus”“AAAAAgAAAJcAAAB5Aw==”
“TvPower”“AAAAAQAAAAEAAAAVAw==”
“Audio”“AAAAAQAAAAEAAAAXAw==”
“Input”“AAAAAQAAAAEAAAAlAw==”
“PowerOff”, “Sleep”“AAAAAQAAAAEAAAAvAw==”
“SleepTimer”“AAAAAQAAAAEAAAAvAw==”
“Video2”“AAAAAQAAAAEAAABBAw==”
“PictureMode”“AAAAAQAAAAEAAABkAw==”
“DemoSurround”“AAAAAgAAAHcAAAB7Aw==”
“Hdmi1”“AAAAAgAAABoAAABaAw==”
“Hdmi2”“AAAAAgAAABoAAABbAw==”
“Hdmi3”“AAAAAgAAABoAAABcAw==”
“Hdmi4”“AAAAAgAAABoAAABdAw==”
“ActionMenu”“AAAAAgAAAMQAAABLAw==”
“Help”“AAAAAgAAAMQAAABNAw==”
“AndroidMenu”“AAAAAgAAAMQAAABPAw==”

getSystemInformation (v1.0)

This API provides general information on the device.

Syntax

HTML
http://{IP address} or {Host name}/sony/system

Authentication Level

private

Request

params' Elements
Not necessary.
JSON Example

JSON
{
    "method": "getSystemInformation",
    "id": 33,
    "params": [],
    "version": "1.0"
}

Response

result's Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
productstring1Device category. The following values are currently defined.
languagestring?""Language code of the device, represented by ISO-639 alpha-3. The default value is "",
and if the server device cannot send this parameter, an empty string is returned.
modelstring1Name of the product. This must be unique within each product.
The actual value is defined by each product and is outside the scope of this document.
serialstring?""Serial ID assigned to each device. The default value is "",
and if the server device cannot send this parameter, an empty string is returned.
The actual value is defined by each product and outside the scope of this document.
macAddrstring?""Ethernet MAC address.
Default value is "" and in case server device can not send this parameter,
empty string is returned.
namestring1Product name. This must be unique within each category.
generationstring?""Represents the rough age and season of the device in the market.
The parameter is composed of "[X].[Y].[Z]",
where [X], [Y], and [Z] are strings each representing an integer,
concatenated with periods "." in between.
This must be unique within each category.
The default value is, "" and if the server device cannot send this parameter,
an empty string is returned.

JSON Example

JSON
{
    "result": [{
        "generation": "5.0.1",
        "product": "TV",
        "serial": "1000001",
        "name": "BRAVIA",
        "language": "eng",
        "model": "FW-55BZ35F",
        "macAddr": "04:5D:4B:AD:6D:E1"
    }],
    "id": 33
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

Appendix

Guide about Response
  • The BRAVIA Professional Display returns fixed values for the following parameters.
namevalue
product“TV”
name“BRAVIA”
  • The BRAVIA Professional Display also extends ISO-639 alpha-3 on “language”.
  • “macAddr” stores valid MAC addresses of active NICs. The format must be “xx:xx:xx:xx:xx:xx”. In the BRAVIA Professional Display, only one NIC is active.
  • “generation” stores same values as interfaceVersion in getInterfaceInformation.

getSystemInformation (v1.7)

This API provides general information on the device.

Syntax

HTML
http://{IP address} or {Host name}/sony/system

Authentication Level

private

Request

params' Elements
Not necessary.
JSON Example

JSON
{
    "method": "getSystemInformation",
    "id": 33,
    "params": [],
    "version": "1.7"
}

Response

result's Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
productstring1Device category. The following values are currently defined.
languagestring7""Language code of the device, represented by ISO-639 alpha-3.
The default value is "",
and if the server device cannot send this parameter,
an empty string is returned.
modelstring1Name of the product. This must be unique within each product.
The actual value is defined by each product and is outside
the scope of this document.
serialstring?""Serial ID assigned to each device. The default value is "",
and if the server device cannot send this parameter,
an empty string is returned.
The actual value is defined by each product and outside
the scope of this document.
macAddrstring?""Ethernet MAC address. Default value is "" and in case server device
can not send this parameter, empty string is returned.
namestring1Product name. This must be unique within each category.
generationstring?""Represents the rough age and season of the device in the market.
The parameter is composed of "[X].[Y].[Z]",
where [X], [Y], and [Z] are strings each representing an integer,
concatenated with periods "." in between.
This must be unique within each category.
The default value is, "" and if the server device cannot send
this parameter, an empty string is returned.
fwVersionstring?""BRAVIA software version.
androidOsstring?""Android version.
webAppRuntimeVersionstring?""WebAppRuntime version.
modestring?""This value represents the current mode in terms of Pro mode.
Normal, ProSettings, Pro.

JSON Example

JSON
{
    "result": [{
        "generation": "5.6.0",
        "product": "TV",
        "serial": "xxxxxxx",
        "name": "BRAVIA",
        "language": "eng",
        "model": "FW-43BZ35J",
        "macAddr": "xx:xx:xx:xx:xx:xx",
        "fwVersion": "PKG0.6.0.81.00.1.00.0951BBA",
        "androidOs": "12",
        "webAppRuntimeVersion": "4.0.0+7",
        "mode": "Normal"
    }],
    "id": 33
}

Error CodeNo additional error codes are defined. Refer to error code for common errors.

Appendix

Guide about Response
  • The BRAVIA Professional Display returns fixed values for the following parameters.
namevalue
product“TV”
name“BRAVIA”
  • The BRAVIA Professional Display also extends ISO-639 alpha-3 on “language”.
  • “macAddr” stores valid MAC addresses of active NICs. The format must be “xx:xx:xx:xx:xx:xx”. In the BRAVIA Professional Display, only one NIC is active.
  • “generation” stores same values as interfaceVersion in getInterfaceInformation.

getSystemSupportedFunction (v1.0)

This API provides the list of device capabilities within the scope of system service handling.

Syntax

HTML
http://{IP address} or {Host name}/sony/system

Authentication Level

none

Request

params' Elements
Not necessary.
JSON Example

JSON
{
    "method": "getSystemSupportedFunction",
    "id": 55,
    "params": [],
    "version": "1.0"
}

Response

result's Elements
An array of objects composed of the following pairs.

nametypemultiplicitydefaultdescription
optionstring1Option name to identify the function.
・"WOL" - If the server supports WOL, the MAC address is set as a value.
valuestring1Current value for each option.
The value varies per option and the following value is defined.
・(ex) "00:00:00:00:00:00:00:E0" (The MAC Address when the option value is "WOL".)

JSON Example

JSON
{
    "result": [[{
        "value": "00:00:00:00:00:00:00:E0",
        "option": "WOL"
    }]],
    "id": 55
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

Appendix

Guide about Response
  • When the value of the option parameter is “WOL”, the value of the value parameter stores MAC addresses of active NICs.If this API is called via a wireless NIC, the value stores the MAC address of the wireless NIC.

getWolMode (v1.0)

This API provides information on the device's WoL (Wake-on-LAN) mode settings. The mode indicates whether the device receives the WoL packet to power on.

Syntax

HTML
http://{IP address} or {Host name}/sony/system

Authentication Level

generic

Request

params' Elements
Not necessary.
JSON Example

JSON
{
    "method": "getWolMode",
    "id": 50,
    "params": [],
    "version": "1.0"
}

Response

result's Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
enabledboolean1Information on the WoL mode setting.
・true - enabled.
・false - disabled.

JSON Example

JSON
{
    "result": [{"enabled": true}],
    "id": 50
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

requestReboot (v1.0)

This API provides the function to reboot the device.

Syntax

HTML
http://{IP address} or {Host name}/sony/system

Authentication Level

generic

Request

params' Elements
Not necessary.
JSON Example

JSON
{
    "method": "requestReboot",
    "id": 10,
    "params": [],
    "version": "1.0"
}

Response

result's Elements
Not necessary.
JSON Example

JSON
{
    "result": [],
    "id": 10
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

setLEDIndicatorStatus (v1.1)

This API provides the function to light up a specific LED Indicator, usually equipped in the front of the device to show the current device status to the user.

Note

When requesting to change the LED indicator status with this API, you should take care not to return it to its original status when terminating your application.

Syntax

HTML
http://{IP address} or {Host name}/sony/system

Authentication Level

generic

Request

params' Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
modestring1Functional meaning of the target LED.

・"Demo"
・"AutoBrightnessAdjust"
・"Dark"
・"SimpleResponse"
・"Off"
statusstring?nullTurns on the LED Indicator.

・"true" - On
・"false" - Off
・null - The server decides the behavior.

JSON Example

JSON
{
    "method": "setLEDIndicatorStatus",
    "id": 53,
    "params": [{
        "mode": "Demo",
        "status": "true"
    }],
    "version": "1.1"
}

Response

result's Elements
Not necessary.
JSON Example

JSON
{
    "result": [],
    "id": 53
}

Error Code
The following error codes are important for this API. Refer to error code for other errors.

codeExplanation
7Cannot change the status of the LED for device-specific reasons.

setPowerStatus (v1.0)

This API provides the function to change the current power status of the device.

Syntax

HTML
http://{IP address} or {Host name}/sony/system

Authentication Level

generic

Request

params' Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
statusboolean1Power status.
・true - indicates the power on state.
・false - indicates the power off state.

JSON Example

JSON
{
    "method": "setPowerStatus",
    "id": 55,
    "params": [{"status": false}],
    "version": "1.0"
}

Response

result's Elements
Not necessary.
JSON Example

JSON
{
    "result": [],
    "id": 55
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

Appendix

  • The power-on request is supported only in “Sleep” mode. Refer to here to know “Sleep” in detail.
  • If the Remote start setting (Settings - Network) is OFF, an error is received form the client when caling SetPowerStatus(ON).

setWolMode (v1.0)

This API is for changing the WoL (Wake-on-LAN) mode settings of the device. The mode indicates whether the device receives the WoL packet to power on.

Syntax

HTML
http://{IP address} or {Host name}/sony/system

Authentication Level

generic

Request

params' Elements
An object composed of the following pair(s).

nametypemultiplicitydefaultdescription
enabledboolean1Information on the WoL mode setting
・true - enabled
・false - disabled

JSON Example

JSON
{
    "method": "setWolMode",
    "id": 55,
    "params": [{"enabled": false}],
    "version": "1.0"
}

Response

result's Elements
Not necessary.
JSON Example

JSON
{
    "result": [],
    "id": 55
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

video

This service handles APIs that are related to video functions.


getScreenRotation v1.0

This API returns the current screen rotation value.

Syntax

HTML
http://{IP address} or {Host name}/sony/video

Authentication Level

none

Request

JSON example:

JSON
{
    "method": "getScreenRotation",
    "id": 52,
    "params": [],
    "version": "1.0"
}

Response

nametypemultiplicitydefaultdescription
rotationint1screen rotation value.
0: Landscape
90: Portrait
180: Reversed landscape
270: Reversed portrait

JSON example:

JSON
{
    "result": [{
        "rotation": 90
    }],
    "id": 52
}

setScreenRotation v1.0

This API provides a function to set screen rotation.

Syntax

HTML
http://{IP address} or {Host name}/sony/video

Authentication Level

generic

Request

nametypemultiplicitydefaultdescription
rotationint1screen rotation value. 0, 90, 180, 270.

JSON example:

JSON
{
    "method": "setScreenRotation",
    "id": 53,
    "params": [{
        "rotation": 0
    }],
    "version": "1.0"
}

Response

JSON example:

JSON
{
    "result": []
    "id": y
}

getPictureQualitySettings (v1.0)

This API provides current settings and supported settings related to picture quality configuration items.

Syntax

HTML
http://{IP address} or {Host name}/sony/video

Authentication Level

none

Request

params' Elements
An object composed by following pair(s).

nametypemultiplicitydefaultdescription
targetstring
?
""Target name. Default value is "". It means settings of all targets.
Client can get all custom picture quality settings information by setting empty string
to "target". Client can get specific custom picture quality setting value by explicitly
setting target name to "target".

・"color" - Adjust the color saturation level.
・"brightness" - Adjust the luminance level of the screen.
・"contrast" - Adjust the picture white level.
・"sharpness" - Adjust the picture detail.
・"pictureMode" - Set picture mode.
・"lightSensor" - Optimize brightness according to ambient light.
・"colorSpace" - Change the color reproduction range.
・"colorTemperature" - Adjust the color temperature.
・"autoPictureMode"
 - Automatically selects the picture mode based on the viewing content.
・"hdrMode" - Picture that is suitable for a High Dynamic Range signal.
・"autoLocalDimming"
 - Optimizes contrast by adjusting brightness in individual sections of the screen.
・"xtendedDynamicRange"
 - Adjust peak luminance for the brightness whites and blackest blacks.
・"" - Settings of all targets.

JSON Example

JSON
{
    "method": "getPictureQualitySettings",
    "id": 52,
    "params": [{
        "target": "color"
    }],
    "version": "1.0"
}

Response

result's Elements
An array of objects composed of the following pairs.

target
typemultiplicitydefaultdescription
string1Target name.
currentValue
typemultiplicitydefaultdescription
string1Current value of target.
isAvailable
typemultiplicitydefaultdescription
boolean?trueThis target is currently available or not.
candidate
typemultiplicitydefaultdescription
(object-array)?nullCandidates of specified settings. Only If there is no candidate, null is set.
value
typemultiplicitydefaultdescription
string?""Value of candidate. "" can be set only when settings value is integer
and the candidate can be represented by "max", "min", and "step".
max
typemultiplicitydefaultdescription
double?-1Max value of specified settings. Only If value of target is not indicated
by numerical number, -1 is set.
min
typemultiplicitydefaultdescription
double?-1Min value of specified settings. Only If value of target is not indicated
by numerical number, -1 is set.
step
typemultiplicitydefaultdescription
double?-1Step value of specified settings. Only If value of target is not indicated
by numerical number, -1 is set.

JSON Example

JSON
{
    "result": [[{
        "target": "color",
        "currentValue": "2",
        "isAvailable": true,
        "candidate": [{
            "max": 100,
            "min": 0,
            "step": 1
        }],
    }]],
    "id": 52
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

getPictureQualitySettings (v1.1)

This API provides current settings and supported settings related to picture quality configuration items.

Syntax

HTML
http://{IP address} or {Host name}/sony/video

Authentication Level

none

Request

params' Elements
An object composed by following pair(s).

nametypemultiplicitydefaultdescription
targetstring
?
""Target name. Default value is "". It means settings of all targets. Client can get all custom picture quality
settings information by setting empty string to "target". Client can get specific custom picture quality
setting value by explicitly setting target name to "target".
Request for single target

JSON Example

JSON
{
    "method": "getPictureQualitySettings",
    "id": 52,
    "params": [{
        "target": "color"
    }],
    "version": "1.1"
}
Request for all targets

JSON Example

JSON
{
    "method": "getPictureQualitySettings",
    "id": 52,
    "params": [{
    }],
    "version": "1.1"
}

Response

result's Elements
An array of objects composed of the following pairs.

target
typemultiplicitydefaultdescription
string1Target name.
currentValue
typemultiplicitydefaultdescription
string1Current value of target.
isAvailable
typemultiplicitydefaultdescription
boolean?trueThis target is currently available or not.
candidate
typemultiplicitydefaultdescription
(object-array)?nullCandidates of specified settings. Only If there is no candidate, null is set.
value
typemultiplicitydefaultdescription
string?""Value of candidate. "" can be set only when settings value is integer and the candidate can be represented
by "max", "min", and "step".
max
typemultiplicitydefaultdescription
double?-1Max value of specified settings. Only If value of target is not indicated by numerical number, -1 is set.
min
typemultiplicitydefaultdescription
double?-1Min value of specified settings. Only If value of target is not indicated by numerical number, -1 is set.
step
typemultiplicitydefaultdescription
double?-1Step value of specified settings. Only If value of target is not indicated by numerical number, -1 is set.
Response for single target

JSON Example

JSON
{
    "result": [[{
        "target": "color",
        "currentValue": "4",
        "isAvailable": true,
        "candidate": [{
            "max": 100,
            "min": 0,
            "step": 1
        }],
    }]],
    "id": 52
}

Error Code
No additional error codes are defined. Refer to error code for common errors.

Response for all targets

Please see page.14; “Appendix 2: getPictureQualitySettings: Response for all targets”.

setPictureQualitySettings (v1.0)

This API provides a function to change settings related to picture quality setting items.

Syntax

HTML
http://{IP address} or {Host name}/sony/video

Authentication Level

generic

Request

params' Elements
An object composed by following pair(s).

nametypemultiplicitydefaultdescription
targetstring?nullTarget name (UI setting target).
Please use getPictureQualitySettings to acquire the available targets.

・"color" - Adjust the color saturation level.
・"brightness" - Adjust the luminance level of the screen.
・"contrast" - Adjust the picture white level.
・"sharpness" - Adjust the picture detail.
・"pictureMode" - Set picture mode.
・"lightSensor" - Optimize brightness according to ambient light.
・"colorSpace" - Change the color reproduction range.
・"colorTemperature" - Adjust the color temperature.
・"autoPictureMode"
 - Automatically selects the picture mode based on the viewing content.
・"hdrMode" - Picture that is suitable for a High Dynamic Range signal.
・"autoLocalDimming"
 - Optimizes contrast by adjusting brightness in individual sections of the screen.
・"xtendedDynamicRange"
 - Adjust peak luminance for the brightness whites and blackest blacks.
valuestring?nullThe value to set for target name.
Please use getPictureQualitySettings to acquire the candidate values of target.

JSON Example

JSON
{
    "method": "setPictureQualitySettings",
    "id": 12,
    "params": [{"settings": [{
        "value": "2",
        "target": "color"
    }]}],
    "version": "1.0"
}

Response

result's Elements
Not necessary.
JSON Example

JSON
{
    "result": [],
    "id": 12
}

Error Code
Following error codes are important for this API. Refer to error code for other errors.

codeExplanation
40004One or more settings are not set by error when multiple settings are set.
Client needs to call paired APIs (getXXXSettings) to identify which parameters fail to be updated.

setPictureQualitySettings (v1.1)

This API provides a function to change settings related to picture quality setting items.

Syntax

HTML
http://{IP address} or {Host name}/sony/video

Authentication Level

generic

Request

params' Elements
An object composed by following pair(s).

nametypemultiplicitydefaultdescription
targetstring?""Target name (UI setting target). Please use getPictureQualitySettings v1.1 to acquire the available targets.
For reference, please also see page.11; "Appendix 1: Target list".
valuestring?nullThe value to set for target name. Please use getPictureQualitySettings v1.1 to acquire the candidate values
of target.

JSON Example

JSON
{
    "method": "setPictureQualitySettings",
    "id": 12,
    "params": [{"settings": [{
        "value": "2",
        "target": "color"
    }]}],
    "version": "1.1"
}

It also supports specifying multiple targets.
The following example means that the contentType is changed to ‘video’, the pictureMode is changed to ‘standard’, and then
the color and brightness are changed to 50.

JSON Example

JSON
{
    "method": "setPictureQualitySettings",
    "id": 12,
    "params": [{"settings": [{
        "value": "2",
        "target": "contentType"
      },{
        "value": "standard",
        "target": "pictureMode"
      },{
        "value": "50",
        "target": "brightness"
      },{
        "value": "50",
        "target": "color"
      },{
    }]}],
    "version": "1.1"
}

Response

result's Elements
Not necessary.
JSON Example

JSON
{
    "result": [],
    "id": 12
}

Error Code
Following error codes are important for this API. Refer to error code for other errors.

codeExplanation
40004One or more settings are not set by error when multiple settings are set.
Client needs to call paired APIs (getXXXSettings) to identify which parameters fail to be updated.

Response

About HDMI signal format (hdmiSignalFormat and hdmiSignalFormatVrr)

Specifying multiple targets in a single http request with this API may cause the API to fail under certain signal conditions.
To avoid this issue, ensure that only one target is specified per http request.

videoScreen

This service handles APIs that are related to video screen functions.


getSceneSetting (v1.0)

Note:

BZ40P / BZ35P / BZ30P: not supported.

This API provides function to get current scene setting value and the list of scene setting values which are able to be set.

Note

This API retrieves scene information at the time of the API call. The returned values may vary depending on the device state — for example, the currently selected input source — and the available scene setting options are also dependent on the current input source. If scene settings are not supported for the active input source, the candidate list will be empty.

Syntax

HTML
http://{IP address} or {Host name}/sony/videoScreen
ws://{IP address} or {Host name}/sony/videoScreen​

Bluetooth SPP supported

Authentication Level

none

Request

params' Elements
Not necessary.
JSON Example

JSON
{
    "method": "getSceneSetting",
    "id": 79,
    "params": [],
    "version": "1.0"
}

Response

result's Elements
An array of objects composed of the following pairs.

currentValue
typemultiplicitydefaultdescription
string1Current scene setting value.
"auto" - Automatically selects the scene based on the viewing content.
"auto24pSync" - Automatically selects "Cinema" for 24Hz signal content. Behaves as "Auto" for all other signals.
"general" - Turn off scene select for general content.
candidate
typemultiplicitydefaultdescription
(object-array)?nullCandidate scene setting value to set.
value
typemultiplicitydefaultdescription
string?""Value of candidate.

JSON Example

JSON
{
    "result": [{
        "candidate": [
            {"value": "auto"},
            {"value": "auto24pSync"},
            {"value": "general"}
        ],
        "currentValue": "auto"
    }],
    "id": 79
}

Error Code

The following error codes are important for this API. Refer to error code for other errors.

codeExplanation
7Device is power-off status.
7The scene select is not supported.

setSceneSetting (v1.0)

Note:

BZ40P / BZ35P / BZ30P: not supported.

This API provides the function to change the current scene setting value.

Note

This API is able to set the value at API call timing, which might vary depending on the device state. (For example, depending on the "current" input source.)

Syntax

HTML
http://{IP address} or {Host name}/sony/videoScreen

Authentication Level

generic

Request

params' ElementsAn object composed of the following pair(s).

nametypemultiplicitydefaultdescription
valuestring1Scene of the input source.
・"auto" - Automatically selects the scene based on the viewing content.
・"auto24pSync" - Automatically selects "Cinema" for 24Hz signal content.
 Behaves as "Auto" for all other signals.
・"general" - Turns off scene select for general content.
JSON Example
JSON
{
    "method": "setSceneSetting",
    "id": 40,
    "params": [{"value": "auto"}],
    "version": "1.0"
}

Response

result's Elements
Not necessary.

JSON Example

JSON
{
  "result": [],
  "id": 40
}

Error Code

The following error codes are important for this API. Refer to error code for other errors.

codeExplanation
3The value of "value" in Request is empty.
3The value of "value" in Request is invalid.
7Device is in the power off state.
7Scene select is not supported.
7The value of "value" in Request is not supported by the current input source of the device.

Error Code

In the REST API protocol, HTTP and JSON-RPC are used, so you can use the status codes of both layers. This document describes handling errors in different layers and lists examples for major errors.

Overview

  • The error code is defined between 0-65535. The error code is divided into two areas (REST API system area and user area).
error codearea
0 - 32767REST API system area
32768 - 65535user area
  • The user area is divided between the common area and each service.
error codearea
32768 - 39999Unused areas.
40000 - 40199Service common areas.
40200 - 40399System service area.
40400 - 40599Camera service area.
40600 - 40799videoScreen service area.
40800 - 40999Audio service area.
41000 - 41199avContent service area.
41200 - 41399Recording service area.
41400 - 41599appControl service area.
41600 - 41799Browser service area.
42000 - 42199accessControl service.
42200 - 42399contentDownload service.
42400 - 42599Encryption service.
42600 - 42799contentSync service.
42800 - 42999contentSync service.
43000 - 65535A reserved area.
  • This is legend of error code’s explanation table.
codeReason phrase exampleJSON exampleExplanation
Error code. This is the 1st Element of “error”.Example of the error reason message. This is the 2nd Element of “error”.Example of the “error” member’s response. This is shown in bold and italics.Explanation of the error case.

HTTP Major Error Codes in REST API.

This is the basic policy.

  • Should follow the original HTTP definition.
  • Should not map others to HTTP errors forcibly.

If the HTTP status code is anything other than 200 OK. and if the HTTP server returns a response body in accordance with the REST API protocol, the error code must be same as the HTTP error code. Major error codes are listed as follows.

codeReason phrase exampleJSON exampleExplanation
401Unauthorized“error”: [401, “Unauthorized”]Request requires user authentication.
403Forbidden“error”: [403, “Forbidden”]Server understood the request, but is refusing to fulfill it. The client does not have permission to access.
404Not Found“error”: [404, “Not Found”]For cases where the request is not matched to any supported API version.
413Request Entity Too Large“error”: [413, “Request Entity Too Large”]The accepted body size of the client request exceeds the maximum limit.
414Request-URI Too Long“error”: [414, “Request-URI Too Long”]The accepted URI length of the client request exceeds the maximum limit.
501Not Implemented“error”: [501, “Not Implemented”]When the request method is not implemented on the server.
503Service Unavailable“error”: [503, “Service Unavailable”]When the server is in a temporarily unavailable state which may occur due to other concurrent connections. (The number of maximum connections is not defined because it depends on the server.)

System Error Code

codeReason phrase exampleJSON ExampleExplanation
1Any“error”: [1, “Any”]A generic error code which can be used with any error.
2Timeout“error”: [2, “Timeout”]For cases when the server cannot reply in time.
3Illegal Argument“error”: [3, “Illegal Argument”]For cases when the “params” value in the request does not follow API specifications.
5Illegal Request“error”: [5, “Illegal Request”]For cases when the request body is empty, has no ID or has an invalid ID, has no method, has no params, or the params is not an array.
7Illegal State“error”: [7, “Illegal State”]For cases when the server cannot handle the request at this time.
12No Such Method“error”: [12, “No Such Method”]For cases when the requested API does not exist.
14Unsupported Version“error”: [14, “Unsupported Version”]For cases when the requested version is not supported on the specified service.
15Unsupported Operation“error”: [15, “Unsupported Operation”]For cases when the server cannot handle the request with respect to the specified parameters.

Common Error Code

codeReason phrase exampleJSON ExampleExplanation
40000Request Retry“error”: [40000, “Request Retry”]Long Polling timeout happens.
40001Client Over Maximum“error”: [40001, “Clients Over Maximum”]The number of Long Polling clients exceeds the maximum limit.
40002Encryption Failed“error”: [40002, “Encryption Failed”]Encryption error. Failed to encrypt/decrypt in the encryption API.
40003Request Duplicated“error”: [40003, “Request Duplicated”]Client must wait for the previous response.
40004Multiple Settings Failed“error”: [40004, “Multiple Settings Failed”]One or more settings are not set by error when multiple settings are set. The client needs to call paired APIs (getXXXSettings) to identify which parameters failed to be updated.
40005Display is turned off“error”: [40005, “Display is turned off”]Display is turned off.
40006Please contact the inquiry counter“error”: [40006, “Exxxx”]A common error code used among services to be used for general errors. This error code can be used only to identify general errors, but has different messages (like error codes) in “error_message” just for debugging or display purposes.

system Service Error Code

codeReason phrase exampleJSON ExampleExplanation
40200Password expired“error”: [40200, “Password expired”]Password is expired.
40201AC power required“error”: [40201, “AC power required”]Server cannot run this method without AC power.

videoScreen Service Error Code

codeReason phrase exampleJSON ExampleExplanation
40600Screen Change in Progress“error”: [40600, “Screen Change in Progress”]Another request is in progress.

audio Service Error Code

codeReason phrase exampleJSON ExampleExplanation
40800Target Not Supported“error”: [40800, “Target Not Supported”]Target is not supported or cannot be controlled for some device specific reason.
40801Volume Out of Range“error”: [40801, “Volume Out of Range”]Volume is out of range.

avContent Service Error Code

codeReason phrase exampleJSON ExampleExplanation
41000Content is Protected“error”: [41000, “Content is Protected”]Content is protected.
41001Content does Not Exist“error”: [41001, “Content does Not Exist”]Content does not exist.
41002Storage has no content.“error”: [41002, “Storage has no content.”]Storage has no content.
41003Some content could not be deleted“error”: [41003, “Some content could not be deleted”]Some content could not be deleted.
41011Channel Fixed by USB Recording“error”: [41011, “Channel Fixed by USB Recording”]Channel is fixed by USB recording.
41012Channel Fixed by SCART Recording“error”: [41012, “Channel Fixed by SCART Recording”]Channel is fixed by SCART recording.
41013Chapter doesn’t exist“error”: [41013, “Chapter doesn’t exist”]Chapter doesn’t exist.
41014Channel can’t be uniquely determind.“error”: [41014, “Channel can’t be uniquely determind”]Channel can’t be uniquely determined.
41015Empty Channel list.“error”: [41015, “Empty Channel list”]Empty channel list.
41020Storage doesn’t exist“error”: [41020, “Storage doesn’t exist”]Storage doesn’t exist.
41021Storage is full“error”: [41021, “Storage is full”]Storage is full.
41022Content attribute setting failed.“error”: [41022, “Content attribute setting failed.”]Content attribute setting failed.
41023Unknown group id.“error”: [41023, “Unknown group id.”]Unknown group ID.
41024Content is not supported.“error”: [41024, “Unsupported content”]Content is not supported.

appControl Service Error Code

codeReason phrase exampleJSON ExampleExplanation
41400Another Request in Progress“error”: [41400, “Another Request in Progress”]Another request is in progress.
41401Failed to Launch“error”: [41401, “Failed to Launch”]Failed to launch, for example, because another application is running.
41402Request In Progress“error”: [41402, “Request In Progress”]Request is accepted, but completion of the application’s launch cannot be decided.
41403Failed to Terminate“error”: [41403, “Failed to Terminate”]Some applications can’t be terminated.

encryption Service Error Code

codeReason phrase exampleJSON ExampleExplanation
42400Key doesn’t exist“error”: [42400, “Key doesn’t exist”]Key doesn’t exist yet.