Results 1 to 7 of 7

Thread: Swagger json and 2.0?

  1. #1

    Question Swagger json and 2.0?

    Two questions about the REST API documentation through Swagger:
    1. Is there any source available for the "swagger.json" that can be used in tooling to exposed the models and apis for orchestration and development?
    2. Is there any plan to update this to Swagger 2.0, since it seems like most tooling and integration stuff has moved pretty aggressively in that direction?

  2. #2
    Join Date
    May 2013
    Posts
    681

    Default

    Hello Matt-Presto,

    To answer your questions:

    1. You can obtain endpoint information to build your own tool by querying against the http://localhost:8089/api-docs url.

    2. It is in our sights but no timeframe specified.

    Thanks,
    Matt

  3. #3

    Arrow

    I can see a raw json file by going to that url, but it's not a valid swagger definition file, so you can't import it to anything, and it doesn't give the needed information to get any of the details. The results on a 4.4.1 server are:

    {"info":null,"swaggerVersion":"1.2","apis":[{"b":"Application Operations","path":"/v2/servers/{serverName}/vhosts/{vhostName}/applications","description":"Application Operations"},{"b":"Machine Level Current Statistics","path":"/v2/machine/monitoring/current","description":"Machine Level Current Statistics"},{"b":"Machine Level Historic Statistics","path":"/v2/machine/monitoring/historic","description":"Machine Level Historic Statistics"},{"b":"Server Licenses","path":"/v2/servers/{serverName}/licenses","description":"Server Licenses"},{"b":"Server Listeners","path":"/v2/servers/{serverName}/listeners","description":"Server Listeners"},{"b":"Server log4j system","path":"/v2/servers/{serverName}/log4j","description":"Server log4j system"},{"b":"Server MediaCache","path":"/v2/servers/{serverName}/mediacache","description":"Server MediaCache"},{"b":"Server MediaCasters","path":"/v2/servers/{serverName}/mediacasters","description":"Server MediaCasters"},{"b":"Server Monitoring","path":"/v2/servers/{serverName}/monitoring","description":"Server Monitoring"},{"b":"Server Publishers","path":"/v2/servers/{serverName}/publishers","description":"Server Publishers"},{"b":"REST information","path":"/restinfo","description":"REST information"},{"b":"Servers Configuration","path":"/v2/servers","description":"Servers Configuration"},{"b":"Server Status","path":"/v2/servers/{serverName}/status","description":"Server Status"},{"b":"Server Transcoder","path":"/v2/servers/{serverName}/transcoder","description":"Server Transcoder"},{"b":"Server Tuning","path":"/v2/servers/{serverName}/tune","description":"Server Tuning"},{"b":"Server Users","path":"/v2/servers/{serverName}/users","description":"Server Users"},{"b":"VHost Operations","path":"/v2/servers/{serverName}/vhosts","description":"VHost Operations"}],"authorizations":null,"apiVersion":"1.0.0"}
    
    it gives the meta-endpoints for all of the top-level service groups, but it doesn't supply a base url, or how to get to the individual services. The number of tools that can handle the v1.2 swagger is a lot smaller than 2.0, so mostly I've tried the importer for Postman, and it won't accept it. It always gives: "Error while importing Swagger: ReferenceError: dir is not defined".

  4. #4
    Join Date
    May 2013
    Posts
    681

    Default

    Hello Matt-Presto

    I downloaded the 3rd party app to give it a test and did come up with the same result that you did. Even when I tried to add the json via "Paste Raw Text" and included a basepath (and other variations as found within their support boards) and was also unsuccessful. Are you just looking to have a tool to test the API? Are you looking to embed the data into an application?

    Thanks,
    Matt

  5. #5

    Default

    Thanks Matt,
    Yeah, I tried the same things. I use a couple of standalone tools for testing the API calls and working out the calls I want to build into my app. Eventually I'll be building all of it into our app for integration, but being able to pull all the models and APIs into the tool would make things a lot cleaner/faster.

  6. #6

    Default

    Yahtzee! Ok, so if you look in the swagger interface, next to each grouping, there's a "Raw" link which ends up with you getting something like:
    http://server:8089/api-docs/v2/serve...D/applications. I was able to import that in Postman.

  7. #7
    Join Date
    May 2013
    Posts
    681

    Default

    Great! Thanks for sharing your findings!

Similar Threads

  1. REST API 4.1.2 call problem - POST methods not working in Swagger UI
    By keiserSoze in forum Wowza Streaming Engine REST API
    Replies: 1
    Last Post: 06-30-2015, 06:45 AM
  2. JSON data to SMIL schedule with wowza on ec2
    By hundstage in forum Wowza Media Server 3 for Amazon EC2 Discussion
    Replies: 0
    Last Post: 12-18-2011, 08:23 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
  •