Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add many endpoints #213

Open
jacksnailgo opened this issue Nov 1, 2021 · 2 comments
Open

add many endpoints #213

jacksnailgo opened this issue Nov 1, 2021 · 2 comments
Labels

Comments

@jacksnailgo
Copy link

we manage mutiple docker node by ETCD ,like docker swarms . how can i build many endPoints by portainer batch command?

@huib-portainer
Copy link

Please have a look at the documentation:
https://docs.portainer.io/v/ce-2.9/admin/environments/add/api

And for more details on the API see:
https://app.swaggerhub.com/apis/portainer/portainer-ce/2.9.2#/endpoints/EndpointCreate

Or use this example as a starting point:

curl --request POST --insecure --write-out "%{http_code}" \
  --url https://192.168.189.128:9443/api/endpoints \
  --header 'Authorization: Bearer eyJhbGc...pjIuAm8Yaj4qXfyY' \
  --header 'Content-Type: multipart/form-data; boundary=---011000010111000001101001' \
  --form Name=api-swarm \
  --form EndpointCreationType=2 \
  --form URL=tcp://192.168.189.128:9001 \
  --form GroupID=1 \
  --form PublicURL=192.168.189.128 \
  --form TLS=true \
  --form TLSSkipVerify=true \
  --form 'TagIds=[]' \
  --form TLSCACertFile=null \
  --form TLSCertFile=null \
  --form TLSKeyFile=null \
  --form TLSSkipClientVerify=true

@jacksnailgo
Copy link
Author

thx, i will try this example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants