0

Unable to put video mode

Going by this documentation:

https://docs.brightsign.biz/display/DOC/Remote+DWS#RemoteDWS-/video/{:connector}/output/{:device}/

I'm trying to make a PUT request to change my XD234's video mode.

I'm making a PUT call to my device to change its video mode, like so:
http://player_id/api/v1/video/0/output/0/mode

I've set the x-api-key in the headers and I'm using this as the body:
{"data":{"mode":"1920x1080x60i"}}

I keep getting this response:
{"data":{"error":{"status":500,"message":"[json.exception.type_error.304] cannot use at() with null"}}}

I verified that I'm using the right x-api-key because this GET request works fine:

http://player_id/api/v1/video/0/output/0/mode

 

Any ideas?

1 comment

  • 0
    Avatar
    Strube, David A

    I found the answer. (Thanks Alex in Support!)

    Not only the body of my request incomplete, but I also had to set the content-type from Text to JSON.

    The correct body of the request will look something like this:

    {"name":{"colorDepth":"8bit","colorSpace":"rgb","dropFrame":false,"frequency":30,"graphicsPlaneHeight":1080,"graphicsPlaneWidth":1920,"height":1080,"interlaced":true,"modeName":"1920x1080x60i","overscan":true,"preferred":false,"width":1920}}

    The exact text of the request can be found in Chrome by right-clicking on the Change Mode button, selecting Inspect, then clicking on the Network tab at the top, then proceeding with the change and looking at what was sent in the Request Payload.

Please sign in to leave a comment.