cancel
Showing results for 
Search instead for 
Did you mean: 

REST API GET 'No Router defined' problems

alvin_ge
Champ in-the-making
Champ in-the-making
Sorry guys, I'm a new activiti user, I was trying use activiti-rest API, but when I tested the URI just like this:

GET http://localhost/activiti-rest/service/process-definitions

then the rest API returned me correct data:

<javascript>
{
    "data": [{
        "id": "ask_for_leave:1:4",
        "key": "ask_for_leave",
        "name": "xxx",
        …

    }],
    "total": 1,
    "start": 0,
    "sort": "id",
    "order": "asc",
    "size": 1
}
</javascript>

But if I want to query the process using this URI:

GET http://localhost/activiti-rest/service/process-definitions/ask_for_leave:1:4

then the rest API returned me an error:

<javascript>
{
    "errorMessage": "No router defined",
    "statusCode": 500
}
</javascript>

I'm sure I gave the rest app an authorization in header with basic auth (kermit/kermit):

Basic a2VybWl0Omtlcm1pdA==

What should I do? Maybe I miss something.

BTW: I use chrome plugin (REST console) to test the API.
10 REPLIES 10

frederikherema1
Star Contributor
Star Contributor
Check the userguide. All returned URL's for process-definitions have the "funny characters" escaped, eg:


"url" : "http://localhost:8182/repository/process-definitions/oneTaskProcess%3A1%3A4",

So try escaping the colons, that could help…

frederikherema1
Star Contributor
Star Contributor
Also, double-check the URL Smiley Wink

alvin_ge
Champ in-the-making
Champ in-the-making
Thanks, but I'm trying to use %3A instead colones just like this:
http://localhost/activiti-rest/service/process-definitions/ask_for_leave%3A1%3A4
But the problem always in there. T_T

alvin_ge
Champ in-the-making
Champ in-the-making
Sorry, I fixed it…..
I typing wrong url:
I use

GET http://localhost/activiti-rest/service/process-definitions

to get the correct data, so I think maybe the
GET http://localhost/activiti-rest/service/process-definitions/ask_for_leave:1:4
is correct too.

But the truth uri is
http://localhost/activiti-rest/service/repository/process-definitions/ask_for_leave:1:4

I missed repository in my uri.
Sorry guys.

muthaks
Champ in-the-making
Champ in-the-making
I anm using the following URl : http://localhost:8080/activiti-rest/service/repository/process-definitions/

but the response is

{
errorMessage: "No router defined",
statusCode: 500
}

Please assist

kohir_rajesh
Champ in-the-making
Champ in-the-making

Include activiti-rest.war file in webapp folder

I also face same issue, including activiti-rest.war file in webapp folder resolved the issue.

jbarrez
Star Contributor
Star Contributor
Which version of Activiti are you using?

mohammed8960
Champ in-the-making
Champ in-the-making
can you please advise for REST APIs user guide of Activiti 5.14 as currently we are using it