navbuilder.rest should accept a rest root path component and version

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Unresolved
    • None
    • Component/s: API - Front end
    • None
    • 3
    • 1

      Currently it accepts a path component (where "api", which houses Stash's core REST APIs, is the default), but this is undocumented. It should also accept a version string to use in place of "latest".

      E.g.

      require(['stash/api/util/navbuilder'], function(navbuilder) {
          var url = navbuilder.rest('my-rest-things', '2.0')
                  .addPathComponents('a', 'b')
                  .build();
          console.log(url); // /stash/rest/my-rest-things/2.0/a/b
      });
      

            Assignee:
            Unassigned
            Reporter:
            Adam Ahmed (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: