Results 1 to 5 of 5

Thread: Create user for REST API & enable Stream Targets for the Application

  1. #1

    Lightbulb [solved] Create user for REST API & enable Stream Targets for the Application

    Hi guys,

    I have two problems to solve on my project. We built a system around Wowza Streaming Engine with a setup script. But I didn't find:

    1 - How to create an user for REST API without the UI (using the command line or the API itself).

    2 - How to enable the Stream Targets through REST API. I know how to add new Stream Targets, but I don't know how to enable the Stream Targets option for the Application.

    Someone know something about?


    Thank you
    Last edited by leonardo.cabral; 11-27-2015 at 09:23 AM.

  2. #2

    Default

    Hi,

    For the first one, see https://www.wowza.com/forums/content...query-examples

    For the second one, you need to update the modules to add the Push Publish module. You need to include all of the existing modules in the application when you do the update so get the existing list of modules using the following request:
    curl -X GET --header 'Accept:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/modules
    That will return something like the following:
    {
      "version":"1448571999000",
      "serverName":"_defaultServer_",
      "moduleList": [
        {
          "order": 0,
          "name": "base",
          "description": "Base",
          "class": "com.wowza.wms.module.ModuleCore"
        },
        {
          "order": 1,
          "name": "logging",
          "description": "Client Logging",
          "class": "com.wowza.wms.module.ModuleClientLogging"
        },
        {
          "order": 2,
          "name": "flvplayback",
          "description": "FLVPlayback",
          "class": "com.wowza.wms.module.ModuleFLVPlayback"
        },
        {
          "order": 3,
          "name": "ModuleCoreSecurity",
          "description": "Core Security Module for Applications",
          "class": "com.wowza.wms.security.ModuleCoreSecurity"
        }
      ]
    }
    Add the Push Publish module to the list and submit it as a PUT request:
    curl -X PUT --header 'Accept:application/json; charset=utf-8' --header 'Content-type:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/modules -d'
    {
      "version":"1448571999000",
      "serverName":"_defaultServer_",
      "moduleList": [
        {
          "order": 0,
          "name": "base",
          "description": "Base",
          "class": "com.wowza.wms.module.ModuleCore"
        },
        {
          "order": 1,
          "name": "logging",
          "description": "Client Logging",
          "class": "com.wowza.wms.module.ModuleClientLogging"
        },
        {
          "order": 2,
          "name": "flvplayback",
          "description": "FLVPlayback",
          "class": "com.wowza.wms.module.ModuleFLVPlayback"
        },
        {
          "order": 3,
          "name": "ModulePushPublish",
          "description": "ModulePushPublish",
          "class": "com.wowza.wms.pushpublish.module.ModulePushPublish"
        },
        {
          "order": 4,
          "name": "ModuleCoreSecurity",
          "description": "Core Security Module for Applications",
          "class": "com.wowza.wms.security.ModuleCoreSecurity"
        }
      ]
    }'
    If the application is currently running, you will need to restart the it after the update:
    curl -X PUT --header 'Accept:application/json; charset=utf-8' --header 'Content-type:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/actions/restart

  3. #3

    Default

    Thank you Roger!
    Worked perfectly.

  4. #4
    Join Date
    Feb 2016
    Posts
    1

    Default

    Hi,

    I am facing a problem in creating a user. The rest API does create a publisher, but with null name. Neither can I edit it on my web version.
    Any Idea? Why is this happening?

  5. #5
    Join Date
    May 2013
    Posts
    681

    Default

    Hello

    Please try the following example:
    curl -X POST --header 'Accept:application/json; charset=utf-8' --header 'Content-type:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/publishers -d'
    {
    "description": "This is my live source encoder.",
    "name": "source1",
    "password": "myPassword"
    }'
    If it does not work for you, please reply with the exact cURL command you used and the response.

    Thanks,
    Matt

Similar Threads

  1. Replies: 4
    Last Post: 09-22-2015, 05:28 AM
  2. Issue on Create new application from REST API
    By rohit.p in forum Wowza Streaming Engine REST API
    Replies: 1
    Last Post: 08-24-2015, 06:32 AM
  3. REST API or Java call to Disable/Enable Stream Targets
    By mtownsend in forum Wowza Streaming Engine REST API
    Replies: 2
    Last Post: 07-30-2015, 11:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •