-
Notifications
You must be signed in to change notification settings - Fork 58
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
Error using pagination in experimental calls #152
Labels
Comments
This error also happens in syscollector API calls: # curl -u foo:bar "localhost:55000/experimental/syscollector/hardware?pretty&search=3024112"
{
"error": 1000,
"message": "list index out of range"
} |
Issue updateSummaryWith # curl -u foo:bar -k -X GET "http://127.0.0.1:55000/experimental/ciscat/results?offset=0&pretty"
{
"error": 0,
"data": {
"items": [
{
"scan": {
"id": 790125247,
"time": "2019-04-23T16:19:36.720+02:00"
},
"profile": "xccdf_org.cisecurity.benchmarks_profile_Level_2_-_Server",
"unknown": 0,
"fail": 92,
"pass": 99,
"notchecked": 31,
"error": 0,
"score": 52,
"benchmark": "CIS CentOS Linux 7 Benchmark",
"agent_id": "000"
},
{
"scan": {
"id": 1744690172,
"time": "2019-04-23T15:12:38.234+02:00"
},
"profile": "xccdf_org.cisecurity.benchmarks_profile_Level_2_-_Server",
"unknown": 0,
"fail": 89,
"pass": 102,
"notchecked": 31,
"error": 0,
"score": 53,
"benchmark": "CIS CentOS Linux 7 Benchmark",
"agent_id": "001"
}
],
"totalItems": 2
}
}
# curl -u foo:bar -k -X GET "http://127.0.0.1:55000/experimental/ciscat/results?offset=1&pretty"
{
"error": 0,
"data": {
"items": [],
"totalItems": 2
}
} Other filters are working: # curl -u foo:bar -k -X GET "http://127.0.0.1:55000/experimental/ciscat/results?limit=1&sort=-score&pretty"
{
"error": 0,
"data": {
"items": [
{
"scan": {
"id": 790125247,
"time": "2019-04-23T16:19:36.720+02:00"
},
"profile": "xccdf_org.cisecurity.benchmarks_profile_Level_2_-_Server",
"score": 52,
"error": 0,
"unknown": 0,
"notchecked": 31,
"pass": 99,
"benchmark": "CIS CentOS Linux 7 Benchmark",
"fail": 92,
"agent_id": "000"
}
],
"totalItems": 2
}
} |
druizz90
changed the title
GET/experimental/ciscat/results crashes using pagination
Error using pagination in experimental calls
May 9, 2019
Issue update
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi team,
If offset/limit is used in
GET/experimental/ciscat/results
the following error takes place:The API call works ok without pagination:
Best regards,
Marta
The text was updated successfully, but these errors were encountered: