GithubHelp home page GithubHelp logo

Comments (6)

RadAd avatar RadAd commented on June 18, 2024 1

It seems to work without the tree option. ie:
https://builds.apache.org/api/json?depth=999&pretty=true

from anystatus.

RadAd avatar RadAd commented on June 18, 2024 1

Well that seemd to work:
https://builds.apache.org/api/json?tree=jobs[name,buildable,jobs[name,buildable,jobs[name,buildable]]]&pretty

Maybe the depth could be an option when adding the top level entry.

from anystatus.

AlonAm avatar AlonAm commented on June 18, 2024

Tried it once. I found it difficult to get the full jobs tree from Jenkins
for example, the link below returns just the top level
https://builds.apache.org/api/json?tree=jobs[name]&depth=999

from anystatus.

RadAd avatar RadAd commented on June 18, 2024

Oh ok. My jenkins server only has about 10 items and they are all at the top level. The drop down in the jenkins widget finds them all.

from anystatus.

AlonAm avatar AlonAm commented on June 18, 2024

According to this SO question the query can either return all information using the depth parameter, which is too much data in my opinion. In the case of "builds.apache.org" I was unable to get a response from the server.

Alternatively, the query can concatenate the levels within the tree parameter. For example (depth = 3):
api/json?tree=jobs[name,buildable,jobs[name,buildable,jobs[name,buildable]]]

I prefer the second option because of the limited amount of data returned.
If we can build a query that is "deep" enough for most users, that would be a break through for me to complete the feature.
Also, I'm not sure how the query handles tree items such as Folders, etc.

from anystatus.

AlonAm avatar AlonAm commented on June 18, 2024

Nice idea! the depth may be configured by the user and have a reasonable default of 3-5 levels.
We will then be able to generate the query string dynamically. Cool!

One more thing to check (I'm also trying to find answers in my spare time) is how to query the entire tree, if the tree contains both Jobs and Folders together. I'm not sure that "Folder" and "Job" are the same in Jenkins and both are returned in the tree.

from anystatus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.