Giter Site home page Giter Site logo

Comments (10)

nadouani avatar nadouani commented on May 28, 2024

Hello, I guess the analyzer used quota means the number of jobs of that analyzer, during a given period?

from cortex4py.

geekscrapy avatar geekscrapy commented on May 28, 2024

I think, I probably used the wrong terms! was referring to the rate and rateUnit associated with each analyzer.

Each time a submission is sent to the analyzer I presume there is an internal counter which is decremented in order to track the number of submissions?
I would like to access to this counter via the API (and GUI).

E.g. I set my VT analyzer to rate of 100 and a rateUnit of 1 day. This means I can use the VT analyzer 100 times that day.

Throughout the day I want to see how many submissions I have left before I reach my limit (in this case, 100).

from cortex4py.

nadouani avatar nadouani commented on May 28, 2024

That's what I understood, it's 100 - countAnalyzerCallsOfThatDay

from cortex4py.

geekscrapy avatar geekscrapy commented on May 28, 2024

Yes 😁

from cortex4py.

nadouani avatar nadouani commented on May 28, 2024

I don't remember if you still need something for this question or if it has been answered :)

from cortex4py.

geekscrapy avatar geekscrapy commented on May 28, 2024

Hey, yes, I needed to know if getting the remaining quota for an analyzer was possible via the API?

It seems like there is no use for the "rate" variable per analyzer if there isn't?! 🙄

from cortex4py.

nadouani avatar nadouani commented on May 28, 2024

There is not API that returns the remaining rate but as I said, you can compute it by counting the already executed analysis, during the month, and subtract that count the rate value.

from cortex4py.

geekscrapy avatar geekscrapy commented on May 28, 2024

Thanks - I get how to calculate it, however, when Cortex is being used by many clients this would mean that each client would have to implement its own logic to track the analyzers usage. This seems a bit flawed when there is a field to input the rate for a given analyzer/API?

My suggestion is to track the used rate/quota and expose it via the API - this would allow clients to check if there are any API calls left for that particular service before issuing them and potentially be blacklisted from the service?

from cortex4py.

nadouani avatar nadouani commented on May 28, 2024

Well, once again, this is tricky because 1 analyzer might use several external server calls: Imagine VT scan analyzer polling for analysis status from VT.

What we can try to add is a header that contains the remaining possible analyzer calls.

from cortex4py.

geekscrapy avatar geekscrapy commented on May 28, 2024

Yea, this is potentially an issue... This may be something to work into the cortexutils lib (when in an analyzer that makes a call to another service, it calls an endpoint in cortexutils which decreases the amount of quota available to that API). This would require a reworking of the current Analyzers though.

It'd be good to have something which gives an idea of the amount available though.
Thanks

from cortex4py.

Related Issues (17)

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.