agent
agent copied to clipboard
add many endpoints
we manage mutiple docker node by ETCD ,like docker swarms . how can i build many endPoints by portainer batch command?
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
thx, i will try this example