Forum Discussion

bowbth's avatar
bowbth
Visitor
4 years ago

No matches between SwarmID returns by Portainer API and Swarm ID of node in cluster

From my understanding, the Endpoint https://{portainer_url}/api/stacks/{id} should return ID of a particular node which that stack deployed to.

 

{
  "Id": "myStack_jpofkc0i9uo9wtx1zesuk649w",
  "Name": "myStack",
  "Type": 1,
  "EndpointID": 1,
  "EntryPoint": "docker-compose.yml",
  "SwarmID": "jpofkc0i9uo9wtx1zesuk649w",
  "ProjectPath": "/data/compose/myStack_jpofkc0i9uo9wtx1zesuk649w",
  "Env": [
    {
      "name": "MYSQL_ROOT_PASSWORD",
      "value": "password"
    }
  ]
}   

 According to the SwarmID returned, I've searched for all the given ID of all my entire cluster, there are no any matches found.
Any misunderstanding ? or any alternative ways that possibly help my aquire that node url from the API?

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    Hi bowbth,

    SwaggerHub is just a hosting platform for API docs. Please contact the API vendor - Portainer.io - for questions or assistance with their API.