#Singularity REST API Singularity Mesos Framework API Terms of Service: []() Contact: [](mailto:) License: []() BasePath: http://example.com Api Version: 1.0 ## APIs ### /api/deploys #### **POST** `/api/deploys` ##### deploy Create a new deployment. ###### URL http://example.com/api/deploys ###### Parameters - body <table border="1"> <tr> <th>Parameter</th> <th>Required</th> <th>Description</th> <th>Data Type</th> </tr> <tr> <th>body</th> <td>true</td> <td></td> <td><a href="#SingularityDeployRequest">SingularityDeployRequest</a></td> </tr> </table> ###### Response [](#) ###### Errors | Status Code | Reason | Response Model | |-------------|-------------|----------------| | 200 | Deploy successfully scheduled. | - | | 400 | Deploy object is invalid. | - | | 409 | A current deploy is in progress. | - | - - - #### **GET** `/api/deploys/pending` ##### getPendingDeploys Retrieve the list of pending deploys. ###### URL http://example.com/api/deploys/pending ###### Parameters ###### Response [](#) ###### Errors | Status Code | Reason | Response Model | |-------------|-------------|----------------| - - - #### **DELETE** `/api/deploys/deploy/{deployId}/request/{requestId}` ##### cancelDeploy Delete a pending deployment from a request. ###### URL http://example.com/api/deploys/deploy/{deployId}/request/{requestId} ###### Parameters - query <table border="1"> <tr> <th>Parameter</th> <th>Required</th> <th>Description</th> <th>Data Type</th> </tr> <tr> <th>user</th> <td>false</td> <td>The user which executes the delete request.</td> <td><a href="#UNKNOWN[string]">UNKNOWN[string]</a></td> </tr> </table> - path <table border="1"> <tr> <th>Parameter</th> <th>Required</th> <th>Description</th> <th>Data Type</th> </tr> <tr> <th>requestId</th> <td>true</td> <td>The Singularity Request Id from which the deployment is removed.</td> <td>string</td> </tr> <tr> <th>deployId</th> <td>true</td> <td>The Singularity Deploy Id that should be removed.</td> <td>string</td> </tr> </table> ###### Response [](#) ###### Errors | Status Code | Reason | Response Model | |-------------|-------------|----------------| | 400 | Deploy is not pending or not present. | - | | 200 | Pending deploy successfully removed. | - | - - - ## Data Types ## <a name="SingularityDeploy">SingularityDeploy</a> <table border="1"> <tr> <th>type</th> <th>required</th> <th>access</th> <th>description</th> <th>notes</th> </tr> <tr> <td><a href="#com.google.common.base.Optional&lt;java.lang.String&gt;">com.google.common.base.Optional&lt;java.lang.String&gt;</a></td> <td>optional</td> <td>-</td> <td>Custom Mesos executor id.</td> <td>Custom Mesos executor id.</td> </tr> <tr> <td><a href="#com.hubspot.mesos.Resources">com.hubspot.mesos.Resources</a></td> <td>optional</td> <td>-</td> <td>Resources required for this deploy.</td> <td>Resources required for this deploy.</td> </tr> <tr> <td><a href="#com.google.common.base.Optional&lt;java.util.List&lt;java.lang.String&gt;&gt;">com.google.common.base.Optional&lt;java.util.List&lt;java.lang.String&gt;&gt;</a></td> <td>optional</td> <td>-</td> <td>List of URIs to download before executing the deploy command.</td> <td>List of URIs to download before executing the deploy command.</td> </tr> <tr> <td><a href="#SingularityContainerInfo">SingularityContainerInfo</a></td> <td>optional</td> <td>-</td> <td>Container information for deployment into a container.</td> <td>Container information for deployment into a container.</td> </tr> <tr> <td><a href="#com.google.common.base.Optional&lt;java.util.List&lt;java.lang.String&gt;&gt;">com.google.common.base.Optional&lt;java.util.List&lt;java.lang.String&gt;&gt;</a></td> <td>optional</td> <td>-</td> <td>Command arguments.</td> <td>Command arguments.</td> </tr> <tr> <td><a href="#com.google.common.base.Optional&lt;java.lang.String&gt;">com.google.common.base.Optional&lt;java.lang.String&gt;</a></td> <td>optional</td> <td>-</td> <td>The base path for the API exposed by the deploy. Used in conjunction with the Load balancer API.</td> <td>The base path for the API exposed by the deploy. Used in conjunction with the Load balancer API.</td> </tr> <tr> <td><a href="#com.google.common.base.Optional&lt;java.util.Map&lt;java.lang.String, java.lang.String&gt;&gt;">com.google.common.base.Optional&lt;java.util.Map&lt;java.lang.String, java.lang.String&gt;&gt;</a></td> <td>optional</td> <td>-</td> <td>Map of metadata key/value pairs associated with the deployment.</td> <td>Map of metadata key/value pairs associated with the deployment.</td> </tr> <tr> <td><a href="#com.google.common.base.Optional&lt;java.lang.String&gt;">com.google.common.base.Optional&lt;java.lang.String&gt;</a></td> <td>optional</td> <td>-</td> <td>Custom Mesos executor source.</td> <td>Custom Mesos executor source.</td> </tr> <tr> <td><a href="#com.google.common.base.Optional&lt;java.lang.Long&gt;">com.google.common.base.Optional&lt;java.lang.Long&gt;</a></td> <td>optional</td> <td>-</td> <td>Health check timeout in seconds.</td> <td>Health check timeout in seconds.</td> </tr> <tr> <td><a href="#com.google.common.base.Optional&lt;java.lang.String&gt;">com.google.common.base.Optional&lt;java.lang.String&gt;</a></td> <td>optional</td> <td>-</td> <td>Deployment Healthcheck URI.</td> <td>Deployment Healthcheck URI.</td> </tr> <tr> <td>string</td> <td>required</td> <td>-</td> <td>Singularity Request Id which is associated with this deploy.</td> <td>Singularity Request Id which is associated with this deploy.</td> </tr> <tr> <td><a href="#com.google.common.base.Optional&lt;java.util.List&lt;java.lang.String&gt;&gt;">com.google.common.base.Optional&lt;java.util.List&lt;java.lang.String&gt;&gt;</a></td> <td>optional</td> <td>-</td> <td>List of load balancer groups associated with this deployment.</td> <td>List of load balancer groups associated with this deployment.</td> </tr> <tr> <td><a href="#com.google.common.base.Optional&lt;java.lang.Boolean&gt;">com.google.common.base.Optional&lt;java.lang.Boolean&gt;</a></td> <td>optional</td> <td>-</td> <td>Allows skipping of health checks when deploying.</td> <td>Allows skipping of health checks when deploying.</td> </tr> <tr> <td><a href="#com.google.common.base.Optional&lt;java.lang.Long&gt;">com.google.common.base.Optional&lt;java.lang.Long&gt;</a></td> <td>optional</td> <td>-</td> <td>Health check interval in seconds.</td> <td>Health check interval in seconds.</td> </tr> <tr> <td><a href="#com.google.common.base.Optional&lt;com.hubspot.deploy.ExecutorData&gt;">com.google.common.base.Optional&lt;com.hubspot.deploy.ExecutorData&gt;</a></td> <td>optional</td> <td>-</td> <td>Executor specific information</td> <td>Executor specific information</td> </tr> <tr> <td><a href="#com.google.common.base.Optional&lt;java.lang.String&gt;">com.google.common.base.Optional&lt;java.lang.String&gt;</a></td> <td>optional</td> <td>-</td> <td>Command to execute for this deployment.</td> <td>Command to execute for this deployment.</td> </tr> <tr> <td><a href="#com.google.common.base.Optional&lt;java.lang.Long&gt;">com.google.common.base.Optional&lt;java.lang.Long&gt;</a></td> <td>optional</td> <td>-</td> <td>Number of seconds that a service must be healthy to consider the deployment to be successful.</td> <td>Number of seconds that a service must be healthy to consider the deployment to be successful.</td> </tr> <tr> <td><a href="#com.google.common.base.Optional&lt;java.lang.Long&gt;">com.google.common.base.Optional&lt;java.lang.Long&gt;</a></td> <td>optional</td> <td>-</td> <td>Deploy timestamp.</td> <td>Deploy timestamp.</td> </tr> <tr> <td><a href="#com.google.common.base.Optional&lt;java.util.Map&lt;java.lang.String, java.lang.Object&gt;&gt;">com.google.common.base.Optional&lt;java.util.Map&lt;java.lang.String, java.lang.Object&gt;&gt;</a></td> <td>optional</td> <td>-</td> <td>Map (Key/Value) of options for the load balancer.</td> <td>Map (Key/Value) of options for the load balancer.</td> </tr> <tr> <td>string</td> <td>optional</td> <td>-</td> <td>Custom Mesos executor</td> <td>Custom Mesos executor</td> </tr> <tr> <td><a href="#com.google.common.base.Optional&lt;java.util.Map&lt;java.lang.String, java.lang.String&gt;&gt;">com.google.common.base.Optional&lt;java.util.Map&lt;java.lang.String, java.lang.String&gt;&gt;</a></td> <td>optional</td> <td>-</td> <td>Map of environment variable definitions.</td> <td>Map of environment variable definitions.</td> </tr> <tr> <td><a href="#com.google.common.base.Optional&lt;java.lang.String&gt;">com.google.common.base.Optional&lt;java.lang.String&gt;</a></td> <td>optional</td> <td>-</td> <td>Deploy version</td> <td>Deploy version</td> </tr> <tr> <td><a href="#com.google.common.base.Optional&lt;java.lang.Long&gt;">com.google.common.base.Optional&lt;java.lang.Long&gt;</a></td> <td>optional</td> <td>-</td> <td>Number of seconds that singularity waits for this service to become healthy.</td> <td>Number of seconds that singularity waits for this service to become healthy.</td> </tr> <tr> <td>string</td> <td>required</td> <td>-</td> <td>Singularity deploy id.</td> <td>Singularity deploy id.</td> </tr> </table> ## <a name="SingularityDeployRequest">SingularityDeployRequest</a> <table border="1"> <tr> <th>type</th> <th>required</th> <th>access</th> <th>description</th> <th>notes</th> </tr> <tr> <td><a href="#com.google.common.base.Optional&lt;java.lang.Boolean&gt;">com.google.common.base.Optional&lt;java.lang.Boolean&gt;</a></td> <td>optional</td> <td>-</td> <td>If deploy is successful, also unpause the request.</td> <td>If deploy is successful, also unpause the request.</td> </tr> <tr> <td><a href="#SingularityDeploy">SingularityDeploy</a></td> <td>required</td> <td>-</td> <td>The Singularity deploy object</td> <td>The Singularity deploy object</td> </tr> <tr> <td><a href="#com.google.common.base.Optional&lt;java.lang.String&gt;">com.google.common.base.Optional&lt;java.lang.String&gt;</a></td> <td>optional</td> <td>-</td> <td>User owning this deploy.</td> <td>User owning this deploy.</td> </tr> </table>