CAYIN SDK v2.0

CAYIN SDK v2.0

CAYIN digital signage system provides you with powerful SDK (software development kit), allowing you to create your proprietary management tools via HTTP-based APIs. There are five major sections:

Enable/Disable CAYIN SDK

Files & Folders

Log in CMS’ Web Manager and go to SYSTEM > Service > SDK Configuration page. There are 3 modes for CAYIN SDK

  1. Disable
  2. Enable without authentication key
  3. Enable with authentication key
    • Manually enter the key
    • Click on Random to generate a random key. (Please save the key for later use.)
Note

Authentication key: 4 – 64 English alphabet and numbers

Back to Top

Usage of CAYIN SDK

Send an HTTP GET or POST request to SMP’s or CMS’ internal web server. You can write your own program by almost every modern language to send the request. If you want to make a try, entering the command in a browser’s address bar is usually the easiest way to send a HTTP GET request to SMP/CMS.

Send a command with the form of following example:

http://<ip>/cysdk/?cmd1=value1&cmd2=value2

or

http://<ip>/cysdk/?cmd1=attribute1:value1;attribute2:value2

Note

ip is the IP address (or domain name) of the SMP/CMS.

API interface:

  • Support HTTP GET and POST method
  • One command is able to contain many attributes.
  • Separate each attribute by character ‘;’
  • Separate the name and value of each attribute by character ‘:’
  • Separate each command by character ‘&’
  • First in first execution

Example: Set display resolution with CySDK commands

http://<ip>/cysdk/?k=0000&dpyOutput=mode:distinct;rotate:left
&dpy1Setting=output:HDMI1;size:1920x1080@60&dpy2Setting=output:auto;size:1024x768

  • Authentication: k=0000 (You can ignore it if you choose to disable the authentication)
  • Command 1: dpyOutput=mode:distinct;rotate:left
    • Attribute 1: mode:distinct
    • Attribute 2: rotate:left
  • Command 2: dpy1Setting=output:HDMI1;size:1920x1080@60
    • Attribute 1: output:HDMI1
    • Attribute 2: size:1920x1080@60
  • Command 3: dpy2Setting=output:auto;size:1024x768
    • Attribute 1: output:auto
    • Attribute 2: size:1024x768

Command Result

Function 1~8:

SMP/CMS returns HTTP response status code to the client/calling program.

  • Success: return code 200 success with blank html page
  • Failure: return code 500 (Internal Server Error)
Note

For more information about HTTP response code, please refer to the following Wiki page: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes

Function 9~28:

All responses of the commands are in json format in HTTP body. You can use json library to decode and further process the results (responses).


Back to Top

Functions

CAYIN SDK allows you to control the following functions:

  1. Security authentication (authentication key):
  2. Operation Attribute Value Description
    k   alphabets and numbers
      Key: 4 - 64 length English alphabets and numbers
      UI: System -> Service -> SDK Configuration -> Authentication

    Example:

    Process a CAYIN SDK command with key protection
    http://<ip>/cysdk/?k=0123456789abcdef&play=skin:skin-1
    Process a CAYIN SDK command without key protection
    http://<ip>/cysdk/?play=skin:skin-1

  3. System control (SMP and CMS):
  4. Operation Attribute Value Description
    sysRestart   0, 1
    0: No action
    1: Restart player/server

    Example:

    Restart your system
    http://<ip>/cysdk/?sysRestart=1

  5. Display configuration (SMP only):
  6. Operation Attribute Value Description
    dpyOutput mode single, clone, extended, distinct
     
    model1
    model2
    model3
    model4
    1x1, 2x2, 2x1, 1x2, 3x1, 1x3, 4x1 and 1x4 SMP-2100/2200/2300
    Extended mode: 1x2, 2x1
    Distinct mode: 1x1
    SMP-2210/2310
    Extended mode: 1x3, 3x1, 1x2, 2x1
    Distinct mode: 1x1, 2x1, 1x2
    SMP-8000/8000QD
    Extended mode: 2x2, 1x4, 4x1, 1x3, 3x1, 1x2, 2x1
    Distinct mode: 1x1, 2x1, 1x2, 3x1, 1x3

    dpy1

    dpy2
    output Auto, VGA, DVI, HDMI1, HDMI2, DP1, DP2, DP3, DP4 Set the display output
    VGA, DVI, HDMI (SMP-6000)
    HDMI1 and HDMI2 (SMP-2100, SMP-2200 series, SMP-2300 series)
    DP1 ~ DP4 (SMP-8000 series)
    size WxH[i][@R] Set the screen resolution and refresh rate
    W: Width
    H: Height
    i: Interlace (Optional)
    @R: Refresh rate (Optional)
    e.g. 1920x1080@auto
    rotate 0, 1, 2 Display rotation:
    0: No rotate (Landscape)
    1: 90 degree clock-wise (Portrait)
    2: 90 degree counter clock-wise (Portrait)
    dpyPwSave  

    on

    off
    Set the screen on/off
    on: turn on the screen
    off: turn off the screen

    Example:

    Set display layout to clone mode and Display1 choose HDMI output with 1920x1080i screen resolution

    http://<ip>/cysdk/?dpyOutput=mode:clone&dpy1=output:HDMI;size:1920x1080i@60;rotate:0

  7. Video-input configuration (SMP only):
  8. Operation Attribute Value Description
    videoIn src internal, 1, 2
    internal: built-in capture card
    1, 2: external USB UVC device
    std NTSC, PAL Video Standard
    bri 0, 1, …, 100 Brightness
    con 0, 1, …, 100 Contrast
    sat 0, 1, …, 100 Saturation
    overScan 0, 1, …, 100 Over scan

    Example:

    Set Video-in source from internal video capture card with NTSC

    http://<ip>/cysdk/?videoIn=src:internal;std:NTSC;bri:50;con:50;sat:50;overScan:0

  9. Sound configuration (SMP only):
  10. Operation Attribute Value Description
    sndOutput   analog
    digital
    Analog: Stereo out (phone jack or RCA)
    Digital: HDMI digital sound
    sound   0 – 100 For analog output only

    Example:

    Change sound output to analog output
    http://<ip>/cysdk/?sndOutput=analog

  11. Time configuration: (SMP & CMS)
  12. Operation Attribute Value Description
    timeSetting date YYYYMMDDhhmmss,
    YYYYMMDD,
    hhmmss
    Example:
    Set date: 20150209
    Set time: 101530
    Set date & time: 20150209101530
    timezone City or region name Check Appendix A for valid names

    Example:

    http://<ip>/cysdk/?timeSetting=timezone:Eastern Time
    http://<ip>/cysdk/?timeSetting=timezone:London
    http://<ip>/cysdk/?timeSetting=timezone:Taipei

  13. Playback control (SMP):
  14. Operation Attribute Value Description
    play skin [Skin Name] Skin name
    program [Program Name] Program name
    playlist [Playlist Name] Playlist name
    centralctl 1 Central schedule
    display 1, 2 Choose playback on display 1 or display 2
    pbVo1Play
    pbVo2Play
    src file://file
    mms://url
    http://url
    rtb://[ip:]port
    rtp://ip:port
    src://local-all
    src://video-in
    src://usb-storage
    src://central-schedule
     
    ratio auto (default), 4:3, 16:9  
    mute 0, 1  
    random 0, 1  
    display 1, 2 Set the zone on display 1 or display 2
    pbIm1Play
    pbIm2Play
    src file://file
    src://local-all
    src://usb-storage
    src://central-schedule
     
    duration 1-999 Duration of displaying each image.
    sequence forward
    backward
    random
    Sequence
    scale_fit 0
    1 (default)
    2
    Scale to fit area
    0: Disable
    1: Fit to area (Proportional)
    2: Fit to area (Non-Proportional)
    transition_effect 0
    1
    2
    3
    4

    255
    0: No effect (default)
    1: Wipe Right (old name: Left to right)
    2: Wipe Left (old name: Right to left)
    3: Wipe Bottom (old name: Top to bottom)
    4: Wipe Top (old name: Bottom to top)

    255: Random
    Please refer to online user manual for the complete list of all transition effects.
    display 1, 2 Set the zone on display 1 or display 2
    pbTk1Play
    pbTk2Play
    src text://file
    http://rss-feed
    rss://url
    src://file
    src://central-schedule
     
    direction 1,2 1: Left to Right
    2: Right to left
    font [font name]  
    fsize 10 to 200  
    fcolor [font color] Default font color: 0xFFFFFF
    Example: 0x118A3F
    • First 11 means color Red
    • Mid 8A means color Green
    • Last 3F means color Blue
    All numbers use hexadecimal values.
    bcolor [background color] Default background color: 0x000000
    Example: 0x118A3F
    • First 11 means color Red
    • Mid 8A means color Green
    • Last 3F means color Blue
    All numbers use hexadecimal values.
    seffect 1, 2, 3, 4 Text scrolling effect
    1: No scrolling effect
    2: Simple crawl
    3: Simple Bottom up
    4: Bottom up and crawl
    speed 1, 2, 3, 4, 5, 6  
    pause 0, 0.5, 1, 1.5, 2, 2.5, 3 Pause
    spacing 0, 0.25, 0.5, 1, 1.25, 1.5 Line spacing
    display 1, 2 Set the zone on display 1 or display 2
    pbHtm1Play
    pbHtm2Play
    pbHtm3Play
    src file://file
    http://url
    https://url
    twitter://user
    weather://id
    central-schedule
     
    template 0, 1, … , 12 Twitter
    title [title] Twitter
    subject [subject] Twitter
    size 250x75
    285x170
    550x230
    Weather
    fcolor [foreground color] Weather
    bcolor [background color] Weather
    effect 0, 1 Weather
    units 0, 1 Weather
    pause 0-9 Weather
    icons 0, 1 Weather
    display 1, 2 Set the zone on display 1 or display 2
    pbAttr scrollbar auto, hide  
    hwaccel 0, 1 0: off, 1: on
    flashver 9, 24 Flash version 9 or 24
    autoUpdate 1-999
    disable
     

    Example:

    Change playback to play skin “skin-1”
    http://<ip>/cysdk/?play=skin:skin-1;display:1
    Set Image zone 1 to play a file and a folder in the media folder
    http://<ip>/cysdk/?pbIm1Play=src:file://file1.jpg;src:file://folder/;duration:1
    Set Ticker zone 1 to play an RSS feed
    http://<ip>/cysdk/?pbTk1Play=rss://url;seffect:1
    Set HTML zone 1 to play a file in the media folder
    http://<ip>/cysdk/?pbHtm1Play=src:file://file1.html
    Change Adobe Flash player to version 9
    http://<ip>/cysdk/?pbAttr=flashver:9

  15. RTB configuration (CMS only)
  16. Operation Attribute Value Description
    rtb channel 1, 2 Input port
    active enable
    disable
     
    port UDP port number 8100, 8102, ..., 8226
    input composite
    s-video
     
    std NTSC, PAL  
    bri 0,1…,100  
    con 0,1…,100  
    sat 0,1…,100  
    format mpeg2, mpeg4  
    bit 256k, 512k, 1M, 2M, 3M,  4M, 5M  
    bocast 1/enable
    0/disable
    1: enable
    0: disable
    mtcast ip, disable Multicast
    uncast ip, enable, disable Unicast

    Example:

    Enable channel 1 with MPEG-4@512k bps rate streaming out and stream to target “192.168.1.2” by uni-cast
    http://<ip>/cysdk/?rtb=channel:1;active:enable;input:composite;format:mpeg4;bit:512k;uncast:192.168.1.2

  17. Login/Logout commands (CMS only)
  18. Command Authentication
    (optional)
    Attribute Value Note
    login k=your_authencation_key user [User name] Log in as a specified user
    pass [Password]
    Result Body Note

    {
    "result":"0",
    "session":"1038858172"
    }

    Result:
    0: Success
    Other: Failure

    Example:

    http://CMS_IP/cysdk/?k=UXWdFUURPmLbF&login=user:administrator;pass:admin


    Command Authentication
    (optional)
    Attribute Value Note
    logout k=your_authencation_key session [Session id] Logout
    Result Body Note

    N/A

     

    Example:

    http://CMS_IP/cysdk/?k=UXWdFUURPmLbF &logout=session:session-id

    Note

    Please use login command to get session id. This session id will be used in the following SDK commands (No. 10-28).

  19. Get SMP list (CMS only)
  20. Command Authentication
    (optional)
    Attribute Value Note
    query k=your_authencation_key get smplist Get the SMP list which connects to this CMS
    Result Body Note
    {
    "result":"string",
    "client":[
    {
    "hostname":"string",
    "model":"string",
    "version":"string",
    "IP":"string",
    "mac":"string",
    "group":"string",
    "cms":"string",
    "connect":"string"
    },
    {client2….}, {client3….}
    ]
    }
    Result:
    0: Success
    Other: Failure

    Example:

    Query http://CMS_IP/cysdk/?k=UXWdFUURPmLbF&session=session_id&query=get:smplist;
    Response {
    "Result":"0",
    "client":[
    {
    "hostname":"1F-001",
    "model":"SMP-2100",
    "version":"2.1",
    "group":"groupA",
    "connect":"1",
    "IP":"10.0.0.10",
    "mac":"00:30:18:CD:10:01",
    "cms":"hostname"
    },
    {
    "hostname":"1F-002",
    "model":"SMP-2100",
    "version":"2.1",
    "group":"groupA",
    "connect":"1",
    "IP":"10.0.0.11",
    "mac":"00:30:18:CD:10:02",
    "cms":"hostname"
    },
    {client3….},
    {client4…},
    {client5…}
    ]
    }

  21. Get CMS/SMP log records (CMS only)
  22. Command Authentication
    (optional)
    Attribute Value Note
    query k=your_authencation_key get log  
    target mac_address SMP or CMS MAC address
    retrivefrom YYYYMMDDhhmmss e.g. Log records from date 20170629120000 (optional)
    Result Body Note

    {
    "result":"string",
    "logs":[
    {
    "time":"string",
    "type":"string",
    "category":"string",
    "msg":"string",
    }
    {log2….}, {log3….}
    ]
    }

    Result:
    0: Success
    Other: Failure

    Example:

    Query http://CMS_IP/cysdk/?k=UXWdFUURPmLbF&session=session_id&query=get:log;
    target:4C02890A25C7;retrivefrom:20170629120000
    Response {
    "Result":"0",
    "logs":[
    {
    "time":"Mon Jun 26 15:33:44 2017",
    "type":"INFORMATION",
    "category":"SYSTEM",
    "msg":"[SMP-2100]: SYSTEM: System start up."
    },
    {log2….}, { log3….}
    ]
    }

  23. Get SMP hardware status (e.g. CPU utility, etc.) (CMS only)
  24. Command Authentication
    (optional)
    Attribute Value Note
    query k=your_authencation_key get hwinfo  
    target mac_address SMP or CMS MAC address
    Result Body Note
    {
    "result":"string",
    "client":{
    "cpu":{"usage": "string", "temp": INT, "fan": INT},
    "mem":{"total": "string", "used": "string", "usage": "string"},
    "disk":{
    "system":["string", "string", "string"],
    "resource":["string", "string", "string"],
    "media":["string", "string", "string"],
    "external": ["string", "string", "string"]
    },
    "sys":{"temp":INT, "fan":INT}
    }
    }
    Result:
    0: Success
    Other: Failure

    Example:

    Query http://CMS_IP/cysdk/?k=UXWdFUURPmLbF&session=session_id&query=get:hwinfo;
    target:4C02890A25C7
    Response {
    "result":"0",
    "client":{
    "cpu":{"usage":"0.7%", "temp":-1, "fan":-1},
    "mem":{"total": "3.72GB", "used":"768.14MB", "usage":"20.2%"},
    "disk":{
    "drive":["26.42GB", "522.99MB", "1.9%"],
    "system":["1.91GB", "318.22MB", "16.3%"],
    "resource":["3.81GB", "160.85MB", "4.1%"],
    "media":["20.70GB", "43.92MB","0.2%"],
    "external": ["20.70GB", "43.92MB","0.2%"]
    },
    "sys":{"temp":-1, "fan":-1}
    }
    }

  25. Get CMS/SMP patch information (CMS only)
  26. Command Authentication
    (optional)
    Attribute Value Note
    query k=your_authencation_key get patchlist  
    target mac_address SMP or CMS MAC address
    Result Body Note

    {
    "result":"string",
    "patch": [
    "patch1",
    "patch2",
    "patch3"
    ]
    }

    Result:
    0: Success
    Other: Failure

    Example:

    Query http://CMS_IP/cysdk/?k=UXWdFUURPmLbF&session=session_id&query=get:patchlist;
    target:4C02890A25C7
    Response {
    "Result":"0",
    "patch":[
    "P17684: Fix a problem causing player not booting due to log locked by system"
    ]
    }

  27. Upload patch to SMP (CMS only)
  28. Command Authentication
    (optional)
    Attribute Value Note
    action k=your_authencation_key do upPatch  
    target mac_address SMP or CMS MAC address
    group Group name Upload patch to the players in a specific group
    file smb, http, or ftp URL The patch file URL
    Result Body Note

    {
    "result":"string",
    "detail": [
    { "hostname":"string",
    "IP":"string",
    "mac":"string",
    "result":"string"},
    {…}
    ]
    }

    Result:
    0: Success
    Other: Failure
    Note

    You cannot use the target and group attribute in one command.

    Example:

    Query http://CMS_IP/cysdk/?k=UXWdFUURPmLbF&session=session_id&action=do:upPatch;
    target:4C02890A25C7;file:smb://account:password@172.16.0.7/temp/P17699.psu

  29. Change SMP group (CMS only)
  30. Command Authentication
    (optional)
    Attribute Value Note
    action k=your_authencation_key do chGroup  
    target mac_address SMP MAC address
    toGroup Group name The target group you want to change
    Result Body Note

    {
    "result":"string",
    }

    Result:
    0: Success
    Other: Failure

    Example:

    Query http://CMS_IP/cysdk/?k=UXWdFUURPmLbF&session=session_id&action=do:chGroup;
    target:4C02890A25C7;toGroup:mygroup

  31. Change emergency schedule and trigger groups (CMS only)
  32. Command Authentication
    (optional)
    Attribute Value Note
    emergency k=your_authencation_key skin Skin name  
    program Program name  
    playlist Playlist name  
    playback all, 1, 2, 3, 4 Playback ID
    all: all playback (default)
    1: Playback 1
    2: Playback 2
    3: Playback 3
    4: Playback 4
    group Group name  
    trigger 0, 1 0: Disable
    1: Enable
    Result Body Note

    {
    "result":"0",
    "cms":[
    {
    "hostname":"string",
    "IP":"string",
    "mac":"string",
    "result":"0"
    },
    {cms-2},
    {cms-3},
    ]
    }

    Result:
    0: Success
    Other: Failure
    Note

    You cannot use skin, program, and playlist attributes at the same time.

    Example:

    Query http://CMS_IP/cysdk/?k=UXWdFUURPmLbF&session=session_id&emergency=skin:skin1;
    playback:all;group:groupA;trigger:1
    Response {"result":"0",
    "cms":[
    {"hostname":"CMS-40-Hub","IP":"172.16.100.250","mac":"00:90:0B:26:CD:3A",
    "result":"0"},
    {"hostname":"CMS-40-Backup","IP":"172.16.12.59","mac":"00:90:0B:27:CC:FC",
    "result":"0"},
    {"hostname":"CMS-40-site2","IP":"172.16.100.251","mac":"00:0C:29:0F:AA:E2",
    "result":"0"},
    {"hostname":"CMS-40-site1","IP":"172.16.12.186","mac":"00:0C:29:03:1E:4F",
    "result":"0"}
    ]
    }
    Note

    The response includes all results in main server, site server, and backup server.

  33. Get group list (CMS only)
  34. Command Authentication
    (optional)
    Attribute Value Note
    query k=your_authencation_key get grouplist Get the entire group list of the CMS
    Result Body Note

    {
    "result":"0",
    "group": [{
    "name": "string",
    "folder": "string",
    "child": [{
    "name": "string",
    "folder": "string",
    "child": [{
    "name": "string",
    "folder": "string",
    }]
    }]
    },
    {next group}
    ]
    }

    Result:
    0: Success
    Other: Failure

    Example:

    Query http://CMS_IP/cysdk/?k=UXWdFUURPmLbF&session=session_id&query=get:grouplist
    Response {
    "result": "0",
    "group": [{
    "name": "A_layer1",
    "folder": "folder_1",
    "child": [{
    "name": "A_layer2",
    "folder": "folder_2",
    "child": [{
    "name": "A_layer3",
    "folder": "folder_3",
    }]
    }]
    }, {
    "name": "B_layer1",
    "folder": "folder_4",
    }]
    }

  35. Modify group attribute (CMS only)
  36. Command Authentication
    (optional)
    Attribute Value Note
    action k=your_authencation_key do modgroup  
    group group name The group to be modified
    newgroup new group name Change the group name
    parent parent group name Change the group’s parent to a new one
    top 1 Change the group to the first layer (no parent)
    Result Body Note

    {
    "result":"string"
    }

    Result:
    0: Success
    Other: Failure

    Example:

    Query http://CMS_IP/cysdk/?k=UXWdFUURPmLbF&session=session_id&action=do:modgroup;
    group:group_a;newgroup:group_c
    Response {
    "result": "0",
    }
    Note

    Top attribute cannot be used with parent attribute.

  37. Get Skin schedule (CMS only)
  38. Get current skin schedule for a specific group and the current skin.

    Command Authentication
    (optional)
    Attribute Value Note
    action k=your_authencation_key get skinlist  
    group group name The group to be queried
    Result Body Note

    {
    "result":"0",
    "skin": [
    {"name": "string",
    "group": "string",
    "currentSchedule":"sting"}
    ]
    }

    Result:
    0: Success
    Other: Failure

    Example:

    Query http://CMS_IP/cysdk/?k=UXWdFUURPmLbF&session=session_id&query=get:skinlist;
    group:my_group
    Response {
    "result": "0",
    "skin": [
    {"name":"skin1", "group": "A_layer3", "currentSchedule":"0"},
    {"name":"skin2", "group": "A_layer3", "currentSchedule":"0"},
    {"name":"skin4", "group": "A_layer2", "currentSchedule":"0"},
    {"name":"skin5", "group": "A_layer1", "currentSchedule":"1"},
    ]
    }

  39. Set Main CMS (CMS only)
  40. Set the CMS as a Main server and its options.

    Command Authentication
    (optional)
    Attribute Value Note
    redundancy k=your_authencation_key mode 1  
    mCode Authentication code The authentication code between main and backup server.
    port Port number  
    backupIP Backup server IP  
    reverseSync 0, 1 0: Disable reverse sync
    1: Enable reverse sync
    Result Body Note

    {
    "result":"0",
    "mode":"1"
    }

    Result:
    0: Success
    Other: Failure

    Example:

    Query http://CMS_IP/cysdk/?k=UXWdFUURPmLbF&session=session_id&&redundancy=mode:1;
    mCode:1234567890;port:40001;backupIP:IP;reverseSync:0
    Response {
    "result":"0",
    "mode":"1"
    }

  41. Set Backup CMS (CMS only)
  42. Set the CMS as a Backup server and its options.

    Command Authentication
    (optional)
    Attribute Value Note
    redundancy k=your_authencation_key mode 2  
    bCode Authentication code The authentication code between main and backup server.
    connectIp IP address Main server IP address
    updateFirst 0, 1 1: Sync immediately
    freqType 0 Sync with main server every "period" minutes
    period minutes
    Result Body Note
    {
    "result":"0",
    "mode":"2"
    }
    Result:
    0: Success
    Other: Failure

    Example:

    Query http://CMS_IP/cysdk/?k=UXWdFUURPmLbF&session=session_id&redundancy=mode:2;
    bCode:1234567890;connectIp:192.168.1.8;updateFirst:1;freqType:0;period:5
    Response {
    "result":"0",
    "mode":"2"
    }

  43. Get CMS redundancy configurations (CMS only)
  44. Get CMS’ redundancy configurations.

    Command Authentication
    (optional)
    Attribute Value Note
    query k=your_authencation_key get redundancy  
    Result Body Note
    {
    "result":"0",
    "self": {
    "hostname": "string",
    "mac": "string",
    "IP": "string",
    "mode": "string"
    },
    "another": {
    "status": "string",
    "hostname": "string",
    "mac": "string",
    "IP": "string",
    "mode": "string"
    }
    }
    Result:
    0: Success
    Other: Failure

    Example:

    Query http://CMS_IP/cysdk/?k=UXWdFUURPmLbF&session=session_id&query=get:redundancy
    Response {
    "result":"0",
    "self": {
    "hostname": "cms-main",
    "mac": "00:0C:29:0F:AA:E2",
    "IP": "172.16.12.59",
    "mode": "1"
    },
    "another": {
    "status": "1",
    "hostname": "cms-backup",
    "mac": "00:0C:29:0F:AA:E2",
    "IP": "172.16.12.59",
    "mode": "2"
    }
    }

  45. Get CMS Emergency schedule status (CMS only)
  46. Command Authentication
    (optional)
    Attribute Value Note
    query k=your_authencation_key get emergency  
    Result Body Note
    {
    "result":"0",
    "group": [{
    "name": "string",
    "trigger": "string",
    "playback": [
    {
    "enable": "string",
    "type": "string",
    "name": "string",
    "playbackOutput": "string"
    }
    ]
    }
    ]
    }
    Result:
    0: Success
    Other: Failure

    Example:

    Query http://CMS_IP/cysdk/?k=UXWdFUURPmLbF&session=session_id&query=get:emergency
    Response {
    "result":"0",
    "group": [{
    "name": "aaaaa",
    "trigger": "1",
    "playback": [
    {"enable": "1", "type": "skin", "name": "Basic-2", "playbackOutput": "1"},
    {"enable": "1", "type": "skin", "name": "Basic-3" , "playbackOutput": "2"},
    {"enable": "0", "type": "playlist", "name": "playlist1", "playbackOutput": "3"},
    {"enable": "0", "type": "program", "name": "program1", "playbackOutput": "4"}
    ]
    }
    ]
    }

  47. Manually set CMS Emergency schedule of Site server (CMS only)
  48. Command Authentication
    (optional)
    Attribute Value Note
    query k=your_authencation_key trigger 0, 1 0: Disable
    1: Enable
    group Group name  
    playback 1, 2, 3, 4  
    skin Skin name  
    program Program name  
    playlist Playlist name  
    manually 0, 1 0: Control by Main server
    1: Trigger manually by Site server
    Result Body Note
    {
    "result":"0",
    "cms":[
    {"hostname":"string","IP":"string","mac":"string","result":"0"}
    ]
    }
    Result:
    0: Success
    Other: Failure
    Note

    You cannot use skin, program, and playlist attributes at the same time.

    Example:

    Query http://CMS_IP/cysdk/?k=UXWdFUURPmLbF&session=session_id&emergency=trigger:1;
    group:SMP-8000;playback:1;skin:Basic-2;manually:1
    Response {
    "result":"0",
    "cms":[
    {"hostname":"station_cms","IP":"172.16.100.250","mac":"00:90:0B:26:CD:3A","result":"0"}
    ]
    }

  49. Add user account and set access right (CMS only)
  50. Command Authentication
    (optional)
    Attribute Value Note
    action k=your_authencation_key do addacc  
    acc User name User name
    pass Password Password of the account
    group Group name Can assign multiple group names. Separate each group name by ",".
    r_group Access right hex code See below tables. Use bit or choose multiple attributes. (e.g. 0x01011)
    r_lib
    r_sch
    r_mbyftp
    r_emergsch
    Result Body Note
    {
    "result":"0"
    }
    Result:
    0: Success
    Other: Failure

    Example:

    Query http://CMS_IP/cysdk/?k=UXWdFUURPmLbF&session=session_id&action=do:addacc;
    acc:user_a;pass:12345;group:aaaaa,bbbbb,ccccc;r_group:0x11;r_lib:0x111111;
    r_sch:0x1111111;r_mbyftp:0x1;r_emergsch:0x1
    Response {
    "result":"0"
    }

    Attribute codes of adding an account’s access right

    Attribute Function Code
    r_group Access-Folder 0x01
    Access-Group 0x10
    r_lib Library-File 0x000001
    Library-Font 0x000010
    Library-Clock 0x000100
    Library-Skin 0x001000
    Library-Program 0x010000
    Library-Playlist 0x100000
    r_sch Schedule-Playback 0x00000001
    Schedule-Video 0x00000010
    Schedule-Image Slideshow 0x00000100
    Schedule-Ticker 0x00001000
    Schedule-HTML 0x00010000
    Schedule-Volume 0x00100000
    Schedule-Skin 0x01000000
    Schedule-Playlist 0x10000000
    r_mbyftp Media Folder Access By FTP 0x1
    r_emergsch Trigger Emergency Schedule 0x1

  51. Remove account (CMS only)
  52. Command Authentication
    (optional)
    Attribute Value Note
    action k=your_authencation_key do rmacc  
    acc User name  
    Result Body Note
    {
    "result":"0"
    }
    Result:
    0: Success
    Other: Failure

    Example:

    Query http://CMS_IP/cysdk/?k=UXWdFUURPmLbF&session=session_id&action=do:rmacc;
    acc:user_a
    Response {
    "result":"0"
    }

  53. Modify account attributes (CMS only)
  54. Command Authentication
    (optional)
    Attribute Value Note
    action k=your_authencation_key do modacc  
    acc User name  
    pass Password Password for the account
    newacc User name Change user name
    newpass Password Change password
    r_group Group name Can assign multiple group names. Separate each group name by ",".
    r_lib Access right hex code Change access right. Use bit or choose multiple attributes. (e.g. 0x01011)
    r_sch
    r_mbyftp
    r_emergsch
    Result Body Note
    {
    "result":"0"
    }
    Result:
    0: Success
    Other: Failure

    Example:

    Query http://CMS_IP/cysdk/?k=UXWdFUURPmLbF&session=session_id&action=do:modacc;
    acc:user_a;pass:12345;newacc:user_b;newpass:67890;group:aaaaa,bbbbb,ccccc;
    r_group:0x11;r_lib:0x111111;r_sch:0x1111111
    Response {
    "result":"0"
    }

  55. Get skin layout (CMS only)
  56. Command Authentication
    (optional)
    Attribute Value Note
    query k=your_authencation_key get skin  
    skin Skin name  
    group Group name  
    Result Body Note
    {
    "result":"0"
    "skin":[ {
    "name":"string",
    "layout":[
    {
    "w":INT,"h":INT,
    "zones": INT,
    "zone":[
    {"type":"string","loc":{"x":INT,"y":INT,"w":INT,
    "h":INT,"z":INT}},
    {"type":"string","loc":{"x":INT,"y":INT,"w":INT,
    "h":INT,"z":INT}}
    ]
    }
    ]
    }]
    }

    Result:
    0: Success
    Other: Failure


    name: Skin name
    w: Skin width
    h: Skin height
    zones: number of zone
    zone: zone information
    type: multimedia type
    loc: zone coordinate and size

    Example:

    Query http://CMS_IP/cysdk/?k=UXWdFUURPmLbF&session=session_id&query=get:skin;
    skin:Skin-1;group:group_a
    Response {
    "result":"0"
    "skin":[ {
    "name":"Skin18",
    "layout":[
    {
    "w":1920,"h":1080,
    "zones": 3,
    "zone":[
    {"type":"video","loc":{"x":67,"y":62,"w":609,"h":385,"z":1}},
    {"type":"image","loc":{"x":1037,"y":44,"w":677,"h":484,"z":7}},
    {"type":"html","loc":{"x":2,"y":514,"w":842,"h":492,"z":7}}
    ]
    }
    ]
    }]
    }

  57. Wifi configuration (SMP only):
  58. Operation Attribute Value Description
    scan_ssid   0, 1 0: Disable (connect ordinary WiFi)
    1: Enable (connect WiFi with hidden ssid)

    Example:

    http://<ip>/cysdk/?scan_ssid=0
    http://<ip>/cysdk/?scan_ssid=1

  59. Batch enable or disable emergency scheduling for all CMS systems.
  60. http://<ip>/cysdk/?emAction=trigger_all
    http://<ip>/cysdk/?emAction=stop_all
    http://<ip>/cysdk/?emAction=trigger&group={group's name}
    http://<ip>/cysdk/?emAction=stop&group={group's name}

Back to Top

Appendix A: Valid cities for time zone settings

(GMT-12:00) Eniwetok, Kwajalein
(GMT-11:00) MidwayIsland, Samoa
(GMT-10:00) Hawaii
(GMT-09:00) Alaska
(GMT-08:00) Pacific Time (US & Canada); Tijuana
(GMT-07:00) Arizona
(GMT-07:00) Mountain Time (US & Canada)
(GMT-06:00) Central Time (US & Canada)
(GMT-06:00) Mexico City, Tegucigalpa
(GMT-06:00) Saskatchewan
(GMT-05:00) Bogota, Lima, Quito
(GMT-05:00) Eastern Time (US & Canada)
(GMT-05:00) Indiana (East)
(GMT-04:00) Atlantic Time (Canada)
(GMT-04:00) Caracas, La Paz
(GMT-04:00) Santiago
(GMT-03:30) Newfoundland
(GMT-03:00) Brasilia
(GMT-03:00) Buenos Aires, Georgetown
(GMT-02:00) Mid-Atlantic
(GMT-01:00) Azores, Cape Verde Is.
(GMT) Casablanca, Monrovia
(GMT) Greenwich Mean Time: Dublin, Edinburgh, Lisbon, London
(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna
(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague
(GMT+01:00) Brussels, Copenhagen, Madrid, Paris, Vilnius
(GMT+01:00) Sarajevo, Skopje, Sofija, Warsaw, Zagreb
(GMT+02:00) Athens, Istanbul, Minsk
(GMT+02:00) Bucharest
(GMT+02:00) Cairo
(GMT+02:00) Harare, Pretoria
(GMT+02:00) Helsinki, Riga, Tallinn
(GMT+02:00) Israel
(GMT+03:00) Baghdad, Kuwait, Riyadh
(GMT+03:00) Moscow, St. Petersburg, Volgograd
(GMT+03:00) Nairobi
(GMT+03:30) Tehran
(GMT+04:00) Abu Dhabi, Muscat
(GMT+04:00) Baku, Tbilisi
(GMT+04:30) Kabul
(GMT+05:00) Eekaterinburg
(GMT+05:00) Islamabad, Karachi, Tashkent
(GMT+05:30) Bombay, Calcutta, Madras, New Delhi
(GMT+06:00) Almaty, Dhaka
(GMT+06:00) Colombo
(GMT+07:00) Bangkok, Hanoi, Jakarta
(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi
(GMT+08:00) Perth
(GMT+08:00) Singapore
(GMT+08:00) Taipei
(GMT+09:00) Osaka, Sapporo, Tokyo
(GMT+09:00) Seoul
(GMT+09:00) Yakutsk
(GMT+09:30) Adelaide
(GMT+09:30) Darwin
(GMT+10:00) Brisbane
(GMT+10:00) Canberra, Melbourne, Sydney
(GMT+10:00) Guam, Port Moresby
(GMT+10:00) Hobart
(GMT+10:00) Vladivostok
(GMT+11:00) Magadan, Solomon Is., New Caledonia
(GMT+12:00) Auckland, Wellington
(GMT+12:00) Fiji, Kamchatka, Marshall Is.

Example:

http://<ip>/cysdk/?timeSetting=timezone:Eastern Time
http://<ip>/cysdk/?timeSetting=timezone:London
http://<ip>/cysdk/?timeSetting=timezone:Taipei


Back to Top

Appendix B: SDK result codes

-1 : Timeout. The default value of timeout is 30 seconds.
 0 : Success.
 1 : Make sure your account and password are correct.
 2 : Fail to log out.
 3 : The session is invalid.
 4 : The keyword of operation is invalid.
 5 : The keyword of attribute for query command is invalid.
 6 : The value of attribute get for query command is invalid.
 7 : Fail to get CMSList.
 8 : Fail to get SMPList.
 9 : The target of SMP or CMS is not connected.
10 : The target of SMP or CMS is not found.
11 : Fail to get HWInfo of SMP.
12 : Fail to get PatchList of SMP or CMS.
13 : Fail to get log records of SMP or CMS. ( It happens when log is empty.)
14 : Someone is getting the log records of the same target now. You need to wait for a moment.
15 : The keyword of attribute for action command is invalid.
16 : The value of attribute-do for action command is invalid.
17 : Fail to change the group of SMP.
18 : You need to enter the patch file.
19 : The patch file cannot be downloaded.
20 : The patch file format is not supported. It should be .psu.
21 : The group is invalid.
22 : You should not enter a target and a group at the same time.
23 : Please enter a target or a group.
24 : Please wait a moment when a patch is uploading.
25 : Fail to upload a patch.
26 : The keyword of attribute for query command is invalid.
27 : The value of attribute playback for emergency command is invalid.
28 : The value of attribute group for emergency command is invalid. Or, this group is not controlled by the account.
29 : Only one selected resource is allowed.
30 : The selected resource is invalid.
31 : The value of attribute trigger for emergency command is invalid.
32 : Your account has no access right for emergency schedule.
33 : Fail to trigger Emergency schedule.
34 : Fail to send notification.
35 : The group is invalid.
36 : You can’t move the group to the top group because this group has child groups.
37 : The group name already exists. You can’t add/modify the same name.
38 : The group name is invalid. It should contain letters (a~z or A~Z), numbers (0-9), underscore (_), and hyphen (-).
39 : Parent group name is invalid or does not exist.
40 : The group is invalid.
41 : The account name you add is invalid. It should contain letters (a~z), numbers (0-9) and underscore (_).
42 : The account already exists.
43 : The password is invalid.
44 : Some of the groups are invalid.
45 : The account is invalid.
46 : Fail to modify the account.
47 : The account name is invalid or does not exist.
48 : The account password is invalid.
49 : The account name is invalid.
50 : The new account already exists.
51 : The new password is invalid.
52 : Some of the groups are invalid.
53 : The group does not exist or is invalid.
54 : The skin does not exist in this group.

Back to Top