Hi,
i got bad request, if i am trying to run " Find ‘Project’ entities using the specified (body) parameters." Can someone have a look at this, thanks.
Error on Postman:
{
“type”: “SchemaValidationError”,
“code”: “API_INVALID_INPUT_DATA”,
“message”: “Validation failed because no alternatives match: ‘String must have the following value: ‘seq’ at DataReadParams.order.0.order, String must have one of the allowed values: asc|desc at DataReadParams.order.0.order’ at DataReadParams.order.0”,
“reqid”: “GTGybZlt9X8tEtsBUBqd”
}
1 Answer
1
Hi and welcome to the forum!
According to the error, you have specified something invalid for the “order” object in the body of the POST request.
If you don’t need the result in a specific order, you can just remove it from the body.
If you want to order the result by a column, e.g. “title” in ascending order, it would look like this:
order: [{
column: "title",
order: "asc"
}]
and for descending order:
order: [{
column: "title",
order: "desc"
}]
I hope this information helps to resolve your issue. If not, it would be great if you could post the body of your request so that I can say for sure what’s causing the error.
Best regards,
Hanna
Thanks for replay. After modfiying i get this error message: { "type": "SchemaValidationError", "code": "API_INVALID_INPUT_DATA", "message": "Invalid number: '0' is not a valid ID at DataReadParams.id", "reqid": "l7qpZpzjDQxQ2mWVG8t3" } Where can i find the id?
– Ozkan_Peksando you have a valid post for me? i can try with this. The example on this https://www.testiny.io/docs/rest-api/find-project-entities-using-the-specified-body-parameters/ page is not working
– Ozkan_PeksanIf you want to fetch a project with a certain id, you need to specify an ID. IDs are always > 0, so you get this error because you wanted to fetch a project with id "0" which does not exist. The sample in the docs is there to help you fill out the request body. If you want to fetch all projects, you can leave the body empty. If you want to fetch a certain project you can specify the id with
– hanna_muellerid: 3. Maybe you can tell me more about what you want to achieve?