stacks
Associate an orphaned stack to a new environment(endpoint)
Changed onAccess policy: administrator
put/stacks/{id}/associate
Request
- Base URL/api (relative, and the document was published on a file host, not at the API’s origin)
- URL/api/stacks/{id}/associate
- Auth
- API key in header X-API-KEY
- or API key in header Authorization
Path parameters
idinteger required
Stack identifier
Query parameters
endpointIdinteger required
Environment identifier
swarmIdinteger required
Swarm identifier
orphanedRunningboolean required
Indicates whether the stack is orphaned
Response
Success
Example response
{
"AutoUpdate": {
"Interval": "1m30s",
"JobID": "15",
"Webhook": "05de31a2-79fa-4644-9c12-faa67e5c49f0"
},
"CreatedBy": "admin",
"CreationDate": 1587399600,
"EndpointId": 1,
"EntryPoint": "docker-compose.yml",
"Env": [
{
"name": "name",
"value": "value"
}
],
"GitConfig": {
"ConfigFilePath": "docker-compose.yml",
"ConfigHash": "bc4c183d756879ea4d173315338110b31004b8e0",
"ReferenceName": "refs/heads/branch_name",
"URL": "https://github.com/portainer/portainer.git"
},
"Id": 1,
"Name": "myStack",
"Namespace": "default",
"ProjectPath": "/data/compose/myStack_jpofkc0i9uo9wtx1zesuk649w",
"ResourceControl": {
"AdministratorsOnly": true,
"Id": 1,
"Public": true,
"ResourceId": "617c5f22bb9b023d6daab7cba43a57576f83492867bc767d1c59416b065e5f08",
"SubResourceIds": [
"617c5f22bb9b023d6daab7cba43a57576f83492867bc767d1c59416b065e5f08"
]
},
"SwarmId": "jpofkc0i9uo9wtx1zesuk649w",
"UpdateDate": 1587399600,
"UpdatedBy": "bob"
}Changes
- info
added the optional property
//////////to the response with the status
- info