forked from Yelp/paasta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.json
172 lines (172 loc) · 4.58 KB
/
swagger.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
{
"swagger": "2.0",
"info": {
"title": "Paasta API",
"version": "1.0.0"
},
"host": "localhost:5054",
"basePath": "/v1",
"schemes": ["http"],
"consumes": ["application/x-www-form-urlencoded"],
"produces": ["application/json"],
"tags": [
{
"name": "instances",
"description": "Instances of a service"
},
{
"name": "status",
"description": "Status of a serivce instance"
}
],
"paths": {
"/version": {
"get": {
"responses": {
"200": {
"description": "Version of paasta_tools package",
"schema": {
"type": "string"
}
}
},
"summary": "Version of paasta_tools package",
"operationId": "showVersion"
}
},
"/services/{service}": {
"get": {
"responses": {
"200": {
"description": "Instances of a service",
"schema": {
"type": "object",
"properties": {
"instances": {
"type": "array",
"items": {"type": "string"}
}
}
}
}
},
"summary": "List instances of service_name",
"operationId": "listInstances",
"tags": ["instances"],
"parameters": [
{
"in": "path",
"description": "Service name",
"name": "service",
"required": true,
"type": "string"
}
]
}
},
"/services/{service}/{instance}/status": {
"get": {
"responses": {
"200": {
"description": "Detailed status of an instance",
"schema": {
"$ref":"#/definitions/InstanceStatus"
}
},
"404": {
"description": "Deployment key not found"
},
"500": {
"description": "Instance failure"
}
},
"summary": "Get status of service_name.instance_name",
"operationId": "statusInstance",
"tags": ["status"],
"parameters": [
{
"in": "path",
"description": "Service name",
"name": "service",
"required": true,
"type": "string"
},
{
"in": "path",
"description": "Instance name",
"name": "instance",
"required": true,
"type": "string"
}
]
}
}
},
"definitions": {
"InstanceStatus": {
"type": "object",
"properties": {
"service": {
"type": "string",
"description": "Service name"
},
"instance": {
"type": "string",
"description": "Instance name"
},
"git_sha": {
"type": "string",
"description": "Git sha of a service"
},
"marathon": {
"$ref": "#/definitions/InstanceStatusMarathon",
"description": "Marathon specific instance status"
}
}
},
"InstanceStatusMarathon": {
"type": "object",
"properties": {
"desired_state": {
"type": "string",
"description": "Desired state of a service, for both Marathon and Chronos",
"enum": ["start", "stop"]
},
"app_count": {
"type": "integer",
"format": "int32",
"description": "The number of different running versions of the same service (0 for stopped, 1 for running and 1+ for bouncing)"
},
"bounce_method": {
"type": "string",
"description": "Method to transit between new and old versions of a service",
"enum": ["brutal", "upthendown", "downthenup ", "crossover"]
},
"deploy_status": {
"type": "string",
"description": "Deploy status of a marathon service",
"enum": ["Running", "Deploying", "Stopped", "Delayed", "Waiting", "Not Running"]
},
"running_instance_count": {
"type": "integer",
"format": "int32",
"description": "The number of actual running instances of the service"
},
"expected_instance_count": {
"type": "integer",
"format": "int32",
"description": "The number of desired instances of the service"
},
"error_message": {
"type": "string",
"description": "Error message when a marathon job ID cannot be found"
}
},
"required": [
"desired_state",
"app_count",
"bounce_method"
]
}
}
}