cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti Rest not work

karim
Champ in-the-making
Champ in-the-making
Hi!
When I use activiti-rest for reading the various resources (URIs) available through rest,

GET repository/deployments/{deploymentId}   (API)


curl - basic - user kermit: kermit http://localhost:8080/activiti-rest/service/deployments/15740


curl –basic –user kermit:kermit http://localhost:8080/activiti-rest/service/deployments%2F15740

I have the following message is:

(Tomcat)
INFO: 2013-07-31        22:51:27        0:0:0:0:0:0:0:1 kermit  0.0.0.0 8080    GET     /activiti-rest/service/deployments/15740        -       500     482     0       16      http://localhost:8080  curl/7.29.0     -
31-lug-2013 22.51.27 org.restlet.resource.UniformResource doCatch
AVVERTENZA: Exception or error caught in resource
org.activiti.engine.ActivitiException: No router defined
……………………………………………………………………………………….

The web.xml configuration is the default one, the activiti version 5.12, tomcat 7

However, if I use


curl –basic –user kermit:kermit http://localhost:8080/activiti-rest/service/deployments


{"data":[{"id":"15740","name":"user.bpmn20.xml","deploymentTime":"2013-06-05T14:44:29CEST","category":null},
………………………………………………………………………………………………………………….
,"total":109,"start":0,"sort":"id","order":"asc","size":10}

I get a valid response

I can't understand if it's because tomcat not work by default with backslash, but I honestly do not know how to set this property correctly.
. Or maybe it's for another reason.

Thanks for the support offered
6 REPLIES 6

trademak
Star Contributor
Star Contributor
As you stated yourself the REST API service is defined as:

GET repository/deployments/{deploymentId} (API)

I don't see repository in your curl command.

Best regards,

karim
Champ in-the-making
Champ in-the-making
Many thanks for your help.

The first call that I make is like this. So, I'm sure that's right ({id})

<code>
curl –basic –user kermit:kermit http://localhost:8080/activiti-rest/service/deployments
</code>

==>

{"data":[{"id":"15740","name" …………………………………………………….


I've tried with the above {id}, but the result is:

<code>
  curl –basic –user kermit:kermit http://localhost:8080/activiti-rest/repository/deployments/15740
</code>

==>


   Status Code:  404 Not Found
   Content-Length:  1035
   Content-Type:  text/html;charset=utf-8
   Date:  Thu, 01 Aug 2013 14:58:02 GMT
    Server: Apache-Coyote/1.1

I'm still thinking that it's the web.xml configuration.

………………………………………….
<code>
  <!– Catch all requests –> 
  <servlet-mapping> 
    <servlet-name>RestletServlet</servlet-name> 
    <url-pattern>/service/*</url-pattern> 
  </servlet-mapping> 
</code>
………………………………………….

I tested with some changes, but without success. So I don't know…

Best regards!

frederikherema1
Star Contributor
Star Contributor
-> the activiti version 5.12, tomcat 7

The NEW rest-API (http://localhost:8080/activiti-rest/repository/deployments/15740) you're using is only supported as of 5.13

shyshine
Champ in-the-making
Champ in-the-making
Hi Karim,
was the issue resolved when you tested the REST call with V 5.13?  I am facing the same issue (gives a 404 status) with 5.13

Regards,

shyshine
Champ in-the-making
Champ in-the-making
Also the url mentioned in the userGuide is "http://localhost:8080/activiti-rest/service/repository/deployments/15740"  and not "http://localhost:8080/activiti-rest/repository/deployments/15740"  [/service is missing in the latter]

thensgens
Champ in-the-making
Champ in-the-making
Yep, this one fixed the 404 issue for me as well.
Thanks.