Skip to content

Error using pagination in experimental calls #152

Open
@mgmacias95

Description

@mgmacias95

Hi team,

If offset/limit is used in GET/experimental/ciscat/results the following error takes place:

# curl -u foo:bar -k -X GET "https://127.0.0.1:55000/experimental/ciscat/results?pretty&limit=2&offset=10&sort=-score"
{
   "error": 1000,
   "message": "Wazuh-Python Internal Error: list index out of range"
}

The API call works ok without pagination:

# curl -u foo:bar -k -X GET "https://127.0.0.1:55000/experimental/ciscat/results?pretty&sort=-score"
{
   "error": 0,
   "data": {
      "totalItems": 1,
      "items": [
         {
            "profile": "xccdf_org.cisecurity.benchmarks_profile_Level_2_-_Server",
            "scan": {
               "id": 1260865673,
               "time": "2018-09-06T07:58:39.342-07:00"
            },
            "notchecked": 36,
            "pass": 104,
            "benchmark": "CIS Ubuntu Linux 16.04 LTS Benchmark",
            "unknown": 1,
            "score": 57,
            "agent_id": "001",
            "error": 0,
            "fail": 79
         }
      ]
   }
}

Best regards,
Marta

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions