Where is Document Store?

I’m interested in using document store so I tried to upload a document to my local Docker compose cluster with curl. I used the API documentation to get the correct syntax, but I can’t figure out to what port to send it. What component holds the /documents endpoint? I have tried operate, Zeebe and connectors with no luck. Most components reply with 500. Operate only reply with {“message”:“”}.

Hi there! :wave:

The /documents endpoint for Document Store is available through the Zeebe Gateway REST API in your Docker Compose setup.

In the standard Camunda 8 Docker Compose configuration, you should target:

http://localhost:8080/documents

The Zeebe Gateway REST API runs on port 8080 by default and handles document operations along with other v2 API endpoints.

Here are the typical ports in a Docker Compose setup:

  • Zeebe Gateway REST API: http://localhost:8080 ← Use this for /documents
  • Tasklist API: http://localhost:8082
  • Operate: http://localhost:8081

Important notes for Document Store in Docker Compose:

  1. Storage Configuration: Make sure you have document storage properly configured. The in-memory and local storage types have limitations in Docker Compose since Zeebe and Tasklist don’t share memory or volumes by default.

  2. Environment Variables: For shared document access between components, you’ll need to configure cloud storage (AWS S3 or GCP) with proper environment variables set for both Zeebe and Tasklist.

  3. API Documentation: You can find the complete API specification for document upload and download in the Camunda REST API documentation.

If you’re still getting 500 errors, please check:

  • Your Docker Compose logs for any configuration issues
  • That document storage is properly configured in your environment variables
  • Your curl request format matches the API specification

Let me know if you need help with the specific curl command or document storage configuration!

References:

Using port 8080 results in this reply:

curl: (7) Failed to connect to localhost port 8080 after 2264 ms: Could not connect to server

Is port 8080 really correct when using Docker compose? I though it is only use internally. When I do docker ps I get this:

NAMES PORTS
connectors 0.0.0.0:8085->8080/tcp
tasklist 0.0.0.0:8082->8080/tcp
operate 0.0.0.0:8081->8080/tcp
zeebe 0.0.0.0:9600->9600/tcp, 0.0.0.0:26500->26500/tcp, 26501-26502/tcp, 0.0.0.0:8088->8080/tcp
elasticsearch 0.0.0.0:9200->9200/tcp, 0.0.0.0:9300->9300/tcp

What I understand there is no external port 8080 that I can reach from PowerShell on my PC.

You’re absolutely right! I apologize for the confusion. Looking at your docker ps output, port 8080 is indeed only used internally within the containers.

Based on your port mappings, the Zeebe Gateway REST API is accessible externally on port 8088:

zeebe: 0.0.0.0:8088->8080/tcp

So you should use:

http://localhost:8088/documents

Your external port mappings are:

  • Zeebe Gateway REST API: http://localhost:8088 ← Use this for /documents
  • Connectors: http://localhost:8085
  • Tasklist: http://localhost:8082
  • Operate: http://localhost:8081

The /documents endpoint should be available through the Zeebe Gateway on port 8088. Try your curl command with:

curl -X POST http://localhost:8088/documents \
  -H "Content-Type: multipart/form-data" \
  -F "file=@your-document.pdf"

(Adjust the curl command based on the specific API documentation you’re following)

Thank you for catching that error and providing the docker ps output - that’s exactly the information needed to get the correct port mapping!

Let me know if port 8088 works for you or if you encounter any other issues.

Great! I’m glad we got that sorted out! :tada:

Summary: The Document Store /documents endpoint is accessible through the Zeebe Gateway REST API. In your Docker Compose setup, this is available on the external port 8088 (not 8080, which is only internal to the containers).

Key takeaway: Always check your actual Docker port mappings with docker ps to see the external ports, as they can differ from the default internal ports mentioned in documentation.

The correct endpoint for your setup is:

http://localhost:8088/documents

Happy document storing! If you run into any other issues with Document Store configuration or usage, feel free to ask. :+1: