Apifox calls the camunda engine-rest interface and reports an error "type": "NotFoundException"

The official documentation is here:
https://docs.camunda.org/rest/camunda-bpm-platform/7.19/

insert image description here

Phenomenon

Engine-rest can be requested directly. I imported openapi into apifox. I tested the interface but failed to request successfully. Basically, the following errors were reported.

The error is as follows

{
    
    
    "type": "NotFoundException",
    "message": "RESTEASY003870: Unable to extract parameter from http request: javax.ws.rs.QueryParam(\"firstResult\") value is ''",
    "code": null
}

Solution

It took me half a day to solve this pit, until I occasionally use a browser to request the following address, and the request can be successful.
http://localhost:8080/engine-rest/authorization?userIdIn=demo,jonny2

It turned out that this pit was caused by apifox.

insert image description here
In apifox, remove the ticks in front of the parameters that do not need to be passed. Because if it is not removed, apifox will pass an empty content by default. as follows:

http://localhost:8080/engine-rest/authorization?id=&type=&userIdIn=demo,jonny2&groupIdIn=&resourceType=&resourceId=&sortBy=&sortOrder=&firstResult=&maxResults=

This causes the interface to return an error.

If the useless parameters are manually removed, the request content is as follows:

http://localhost:8080/engine-rest/authorization?userIdIn=demo,jonny2

Summarize

I want to cry but have no tears, and the pit I stepped on inadvertently almost wasted my whole day. I even wonder if there is something wrong with my ability to understand the document. Why is it so simple as stated in the document? No matter how I try, I can't succeed.

The harvest is not to hang on a tree, I should change the tool to test the interface earlier. or another way.

I have always suspected that there is a problem with the interface path I wrote.

Guess you like

Origin blog.csdn.net/lxyoucan/article/details/131958661