Skip to content

Commit

Permalink
update on docs for update min
Browse files Browse the repository at this point in the history
  • Loading branch information
henrod committed Aug 11, 2017
1 parent bed3e1c commit 387e8d1
Showing 1 changed file with 81 additions and 52 deletions.
133 changes: 81 additions & 52 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -568,60 +568,75 @@ All API responses include a `X-Maestro-Version` header with the current Maestro

```
{
"name": "room-name",
"game": "game-name",
"image": "somens/someimage:v123",
"ports": [
{
"containerPort": 5050,
"protocol": "UDP",
"name": "port1"
},
{
"containerPort": 8888,
"protocol": "TCP",
"name": "port2"
}
],
"limits": {
"memory": "128Mi",
"cpu": "1"
},
"shutdownTimeout": 180,
"autoscaling": {
"min": 100,
"up": {
"delta": 10,
"trigger": {
"usage": 70,
"time": 600
},
"cooldown": 300
},
"down": {
"delta": 2,
"trigger": {
"usage": 50,
"time": 900
},
"cooldown": 300
}
},
"env": [
{
"name": "EXAMPLE_ENV_VAR",
"value": "examplevalue"
},
"image": "new-image",
}
```

* Success Response
* Code: `200`
* Content:

```
{
"name": "ANOTHER_ENV_VAR",
"value": "anothervalue"
"success": true
}
],
"cmd": [
"./room-binary",
"-serverType",
"6a8e136b-2dc1-417e-bbe8-0f0a2d2df431"
]
```

* Error Response

It will return an error if scheduler to update is not found on DB

* Code: `404`
* Content:

```
{
"code": [string]<error-code>,
"error": [string]<error-message>,
"description": [string]<error-description>,
"success": [bool]false
}
```

It will return an error if image was not sent on body

* Code: `422`
* Content:

```
{
"code": [string]<error-code>,
"error": [string]<error-message>,
"description": [string]<error-description>,
"success": [bool]false
}
```

It will return an error if some other error occurred.

* Code: `500`
* Content:

```
{
"code": [string]<error-code>,
"error": [string]<error-message>,
"description": [string]<error-description>,
"success": [bool]false
}
```

### Update Min

`PUT /scheduler/:schedulerName/min`

This route updates a scheduler's minimum number of GRUs. If scheduler already has this min, nothing is done.

* Request

```
{
"min": [int],
}
```

Expand Down Expand Up @@ -651,6 +666,20 @@ All API responses include a `X-Maestro-Version` header with the current Maestro
}
```

It will return an error if min was not sent on body

* Code: `422`
* Content:

```
{
"code": [string]<error-code>,
"error": [string]<error-message>,
"description": [string]<error-description>,
"success": [bool]false
}
```

It will return an error if some other error occurred.

* Code: `500`
Expand Down

0 comments on commit 387e8d1

Please sign in to comment.