func (r *marathonClient) Deployments() ([]*Deployment, error) {
	var deployments []*Deployment
	err := r.apiGet(marathonAPIDeployments, nil, &deployments)
	if err != nil {
		return nil, err
	}
	for _, deployment := range deployments {
		if err := json.Unmarshal(deployment.XXStepsRaw, &deployment.Steps); err != nil {
			deployment.Steps = make([][]*DeploymentStep, 0)
			var steps []*StepActions
			if err := json.Unmarshal(deployment.XXStepsRaw, &steps); err != nil {
				return nil, err
			}
			for stepIndex, step := range steps {
				deployment.Steps = append(deployment.Steps, make([]*DeploymentStep, len(step.Actions)))
				for actionIndex, action := range step.Actions {
					var stepAction string
					if action.Type != "" {
						stepAction = action.Type
					} else {
						stepAction = action.Action
					}
					deployment.Steps[stepIndex][actionIndex] = &DeploymentStep{
						Action: stepAction,
						App:    action.App,
					}
				}
			}
		}
	}
	return deployments, nil
}
Deployments retrieves a list of current deployments
package marathon
import (
	"encoding/json"
	"fmt"
	"time"
)
type Deployment struct {
	ID             string              `json:"id"`
	Version        string              `json:"version"`
	CurrentStep    int                 `json:"currentStep"`
	TotalSteps     int                 `json:"totalSteps"`
	AffectedApps   []string            `json:"affectedApps"`
	Steps          [][]*DeploymentStep `json:"-"`
	XXStepsRaw     json.RawMessage     `json:"steps"`  
	CurrentActions []*DeploymentStep   `json:"currentActions"`
}
type DeploymentID struct {
	DeploymentID string `json:"deploymentId"`
	Version      string `json:"version"`
}
type DeploymentStep struct {
	Action                string                  `json:"action"`
	App                   string                  `json:"app"`
	ReadinessCheckResults *[]ReadinessCheckResult `json:"readinessCheckResults,omitempty"`
}
type StepActions struct {
	Actions []struct {
		Action string `json:"action"`  
		Type   string `json:"type"`    
		App    string `json:"app"`
	}
}
type DeploymentPlan struct {
	ID       string         `json:"id"`
	Version  string         `json:"version"`
	Original *Group         `json:"original"`
	Target   *Group         `json:"target"`
	Steps    []*StepActions `json:"steps"`
}