-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathopenapi.json
More file actions
160 lines (160 loc) · 4.96 KB
/
openapi.json
File metadata and controls
160 lines (160 loc) · 4.96 KB
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
{
"openapi": "3.1.0",
"info": {
"title": "Portainer Stack Webhook",
"version": "0.2.5",
"description": "## Overview\n\nUse the [`Update Stack Webhook`](#POST/api/webhook/stacks/{stackId})\nendpoint to trigger portainer to pull the latest images for a stack and\nrestart.\n\nThis API provides some other endpoints for a health check and to list\nstacks present if you need help finding the stack ID to use.\n\n## Environment Variables\n\nConfigure how the application runs with environment variables:\n\n- `PORT` (_default: `3000`_) – Set to an integer to change the port the app is served over.\n- `PORTAINER_API_URL` (_required_) – The URL to your portainer instance's API endpoint, including the `/api` suffix.\n- `PORTAINER_USERNAME` (_required_) – Portainer username used to authenticate requests.\n- `PORTAINER_PASSWORD` (_required_) – Portainer password used to authenticate requests.\n- `API_KEY` (_optional_) – If defined, you must pass the defined API key in the `X-API-Key: <API_KEY>` header for all requests other than `/api/health`.\n- `LOG_FORMAT` (_optional_) – Control if logs are printed as \"pretty\" or \"json\". Defaults to \"json\" in production."
},
"paths": {
"/api/health": {
"get": {
"operationId": "getHealth",
"summary": "Get Health",
"parameters": [],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServerHealth"
}
}
}
}
}
}
},
"/api/stacks": {
"get": {
"operationId": "listStacks",
"summary": "List Stacks",
"parameters": [],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Stack"
}
}
}
}
}
}
}
},
"/api/webhook/stacks/{stackId}": {
"post": {
"operationId": "updateStackWebhook",
"summary": "Update Stack Webhook",
"parameters": [
{
"name": "stackId",
"in": "path",
"schema": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"required": true
}
],
"responses": {
"202": {
"description": "Stack update submitted"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"ErrorResponse": {
"type": "object",
"properties": {
"status": {
"type": "number",
"description": "HTTP status code",
"example": 400
},
"name": {
"type": "string",
"description": "The error's name",
"example": "Bad Request"
},
"message": {
"type": "string",
"description": "User-facing error message",
"example": "Property 'name' is required"
}
},
"required": [
"status",
"name",
"message"
]
},
"ServerHealth": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"uptime": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Uptime in seconds"
},
"since": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
"version": {
"type": "string"
}
},
"required": [
"status",
"uptime",
"since",
"version"
],
"additionalProperties": false
},
"Stack": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
}
}
}
}