Eval API returning an error about maximum number of beans in the response being exceeded

Hi,

We are using the rest/api/2/eval API in our application in order to provide some of our JQL functions and recently when returning issues inside a sprint we have started seeing the error below returned by the API when returning issues in a sprint which we specify using a JQL query.

{“errorMessages”:[“Maximum number of beans in the response exceeded. Limit: 1000”],“errors”:{}}

We can confirm the request body we are sending is just a standard body that uses the structure below.

{“expression”:“issues”,“context”:{“board”:12345,“issues”:{“jql”:{“query”:“sprint = ‘Sprint Name Here’”,“startAt”:0}}}}

Can, you please confirm have any changes have been made to this API recently which have caused this issue to start occurring along with what this error means?

Regards,
Kristian

Hello, @kwalker,

Apparently your JQL query returns more than 1000 issues. And as the error message says, there is a limit of 1000 beans (beans are Jira domain objects, like issues, transformed into rich JSON representations in the response) returned from an expression in the eval API.

To make it work, you can limit your JQL query to 1000 results like this:

{
    "expression": "issues",
    "context": {
        "issues": {
            "jql": {
                "query": "sprint = ‘Sprint Name Here’",
                "startAt": 0,
                "maxResults": 1000
            }
        }
    }
}

You could also return just issue IDs, in which case the limit would be 10,000:

{
    "expression": "issues.map(i => i.id)",
    "context": {
        "issues": {
            "jql": {
                "query": "sprint = ‘Sprint Name Here’",
                "startAt": 0,
                "maxResults": 10000
            }
        }
    }
}

Hope this helps! Let me know if you have any more questions.

2 Likes

Hi @kkercz,

Thank you for this response.

We will look at making this change suggested to see if it resolves this error.

Regards,
Kristian