-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not list all cortex jobs through API #133
Comments
I can't reproduce your problem. Do you have any job in your Cortex instance ? |
I have about 6k jobs jn cortex instance and I want to delete them at once
but somehow I want to save some jobs. So whole going to list these jobs
through API, I got an errror.
SHUBHAM
…On Mon 8 Oct, 2018, 2:27 PM To-om, ***@***.***> wrote:
I can't reproduce your problem. Do you have any job in your Cortex
instance ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#133 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYMDjpBQLkxdVWCdbtSVQgtFG5c4KkA9ks5uixN2gaJpZM4W3UEd>
.
|
With another range (rang=0-20 for example), does it work ? |
Nop, It is not working in range.
…On Mon 8 Oct, 2018, 3:15 PM To-om, ***@***.***> wrote:
With another range (rang=0-20 for example), does it work ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#133 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYMDjmzfmYglh0ON5JrNhxaSdcmrVLa6ks5uix7GgaJpZM4W3UEd>
.
|
what is the role of the user associated with the API key ? Is it in the same organization of the jobs ? |
The user belongs to same organization and it has all three admin rights.
Shubham
…On Mon 8 Oct, 2018, 5:33 PM To-om, ***@***.***> wrote:
what is the role of the user associated with the API key ? Is it in the
same organization of the jobs ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#133 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYMDjmfDNSfsjVOOhi7yV7a9NOF2tMKfks5uiz8dgaJpZM4W3UEd>
.
|
You probably use Cortex 2.0.4. Please update your Cortex and check if the error still occurs. |
I have already used cortex 2.0.4. please let me know whether any new
version needs to be updated.
Shubham
…On Mon 8 Oct, 2018, 6:42 PM To-om, ***@***.***> wrote:
You probably use Cortex 2.0.4. Please update your Cortex and check if the
error still occurs.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#133 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYMDjjixN2v5xsVW9PStntP1aVBE-Mxmks5ui08ggaJpZM4W3UEd>
.
|
The latest version of Cortex is 2.1.0 (2.1.1 will be released soon). |
I have just installed latest verison and let me check these. I will get
bach to you once any problem appears.
Shubh
…On Mon 8 Oct, 2018, 7:06 PM To-om, ***@***.***> wrote:
The latest version of Cortex is 2.1.0 (2.1.1 will be released soon).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#133 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYMDjgIJS3kohXulXs4n1jj29YGbsUkpks5ui1TCgaJpZM4W3UEd>
.
|
[root@ti~]# curl -H 'Authorization: Bearer s7FTpcrb6bdmhrUa5mNjT2NK+3bDoo4H' 'http://192.168.0.170:9001/api/job/_search?range=all' Again same error occured. |
You have this error because you do a GET not a POST. Add |
This sounds like a doc error in fact |
Right ! |
As I have soun d knowledge of API thing. Let me check this out. |
Yea, It gets worked. A last single question, Can I delete all jobs at once ??? |
If I get all the jobs gets deleted at once then it would be best for me. In addition to this, is there any settings or API to delete these job entries from database ? |
No you can't delete all job with only one API call. You can list all jobs, get there ID and delete them one by one. The script should not be hard to write. |
Okay, script can be worked. But can't we have any way to delete them from database ? |
Working directly on the database is possible but not recommended as consistency of the data can be broken. |
Actually, I used it only for threat intelligence. I also subscribed many analyzers. But thing is that, If it gets deleted from database then we can also minimize system resource usage. I will work on that and it it gets required then I will probably raise the request. But thank you for your great support and suggestions. I appreciate this. Have a great time ahead..! |
Work Environment
Problem Description
I want to list all the jobs of an organization but could not do so with using API. It shows me below error logs in /var/log/messages :
Find Cortex Application Logs:
Steps to Reproduce
curl -H 'Authorization: Bearer API_KEY' 'https://CORTEX_APP_URL:9001/api/job/_search?range=all'
{"type":"java.util.NoSuchElementException","message":"head of empty stream"}
Kingly Help..!
The text was updated successfully, but these errors were encountered: