Rest API Methods

Discussion in 'Web Call Server 5' started by James Smith, May 16, 2017.

  1. James Smith

    James Smith New Member

  2. Max

    Max Administrator Staff Member

    REST API is enabled by default.
    Make sure your request is
    Code:
    URL: http://192.168.88.59:9091/rest-api/stream/find_all (example)
    Method: POST
    Content-Type: application/json
    What is your version of WCS server?
    If you are using pre-configured instance from Amazon EC2 (2106), you have to update to latest server to get the latest REST API
  3. James Smith

    James Smith New Member

    Server Version:
    5.0.2227

    Request:
    Code:
    POST /rest-api/stream/find_all HTTP/1.1
    Host: ourhost.com:9091
    Content-Type: application/json
    Cache-Control: no-cache
    Postman-Token: 8e64c415-814c-9e01-48ab-f893905697c6
    
    {}
    Response:
    Code:
    {"timestamp":1495028300573,"status":500,"error":"Internal Server Error","exception":"com.flashphoner.server.manager.controller.exception.InternalErrorException","message":null,"path":"/rest-api/stream/find_all"}
  4. Max

    Max Administrator Staff Member

    Make sure your WCS server has been started properly.
    Code:
    ps aux | grep java
    It should display two processes.
    Please read the troubleshooting guide:
    http://forum.flashphoner.com/threads/troubleshooting.10768/

    It seems WCS core is not started and REST part (manager process) can't access to core process and raises this error.
    You can send SSH details to logs@flashphoner.com. We will check it.
    Or please send zipped conf and logs to the same email.
    Code:
    WCS_HOME/conf
    WCS_HOME/logs
  5. Max

    Max Administrator Staff Member

    We have checked your logs. It looks correct.

    You can also check with our demo server, build 2228:
    Code:
    http://wcs5-eu.flashphoner.com:9091/rest-api/stream/find_all
    {}
    It works. Returns normal 'Not found' response.

    rest-console.jpg

    To proceed with your server we need SSH access (private key for EC2).
    You can either provide access to your existing instance or create a new one for security needs.
    If you can arrange such access, please send it to logs@flashphoner.com

Share This Page