Hi,
I have deployed camunda as a docker container using docker_compose.yaml file (Camunda 8.6).
I want to deploy the bpmn workflow file using REST API.
But I could not able to deploy using curl command / postman.
Using curl command:
curl -X POST 'http://x.x.x.x:26500/v2/deployments' -H 'Content-Type: multipart/form-data' -H 'Accept: application/json' -F 'resources=@kayal_Demo_QOD_Workflow_1_testing.bpmn'
ERROR: curl: (1) Received HTTP/0.9 when not allowed
ZEEBE CONTAINER LOGS:
Nov 14, 2024 10:26:12 AM io.grpc.netty.NettyServerTransport notifyTerminated
INFO: Transport failed
io.netty.handler.codec.http2.Http2Exception: Unexpected HTTP/1.x request: POST /v2/deployments
at io.netty.handler.codec.http2.Http2Exception.connectionError(Http2Exception.java:107)
at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.readClientPrefaceString(Http2ConnectionHandler.java:315)
at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.decode(Http2ConnectionHandler.java:245)
at io.netty.handler.codec.http2.Http2ConnectionHandler.decode(Http2ConnectionHandler.java:451)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:530)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:469)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1407)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:918)
at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:799)
at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:501)
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:399)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Unknown Source)
Hi @rohwerj,
Now I could able to access curl command.
But after executing the curl ( Content-Type ‘multipart/form-data; boundary=------------------------c85114a79fddf60f’ is not supported) this error has been thrown.
In the camunda 8, deployment REST API. Bpmn file and tenant id is required ,Which is form data format.
In the documentation of camunda 8 , it shows content type multipart/form-data. But after executing the command it is showing not supported. Could you please tell me the correct format for deployment REST API?
As @GotnOGuts mentioned, 26500 is grpc port. Find out your Rest API Port from your configuration.
As we are running Self Hosted, we can skip the tenant details.
When I ran the command as it is, got the error, saying resource is not found. After fine tuning the call, able to deploy the bpmn using REST API.
Here is the result:
C:\camunda\v8>curl -X POST “http://192.168.101.152:8088/v2/deployments” -H “Accept: application/json” -F “tenantId=default;type=text/plain” -F ‘resources=@demo.bpmn;type=application/octet-stream’ {“type”:“about:blank”,“title”:“Bad Request”,“status”:400,“detail”:“Required part ‘resources’ is not present.”,“instance”:“/v2/deployments”}