0
votes

I am trying to create a repository with rest call

type: POST url : http://localhost:8080/jbpm-console/rest/repositories/ body: { "name":"new-repo", "description":"new project", "userName":null, "password":null, "requestType":"new", "gitURL":null } authorization: basic Auth

but the outcome of this call is

WARN [org.jboss.resteasy.core.ExceptionHandler] (default task-16) failed to execute: javax.ws.rs.WebApplicationException: HTTP 404 Not Found at org.guvnor.rest.backend.ProjectResource.checkOrganizationalUnitExistence(ProjectResource.java:589) [guvnor-rest-backend-6.2.0.Final.jar:6.2.0.Final] at org.guvnor.rest.backend.ProjectResource.createOrCloneRepository(ProjectResource.java:194) [guvnor-rest-backend-6.2.0.Final.jar:6.2.0.Final] at org.guvnor.rest.backend.ProjectResource$Proxy$_$$_WeldClientProxy.createOrCloneRepository(Unknown Source) [guvnor-rest-backend-6.2.0.Final.jar:6.2.0.Final] ....................

1

1 Answers

0
votes

Something that does not clarify the documentation

you miss organizational unit (organizationalUnitName).

This works for my

POST http://localhost:8080/jbpm-console/rest/repositories

HEADERS: Content-Type application/json

Body:

{
  "name": "pruebaRest",
  "description": "prueba",
  "gitURL": "git://pruebaRest",
  "userName":"youuser",
  "password":"youpass",
  "requestType":"new",
  "organizationalUnitName": "demo"
}

if it works for you, you can close https://issues.jboss.org/browse/JBPM-4951 ;)

I hope to help