Skip to content

Commit 2c83d15

Browse files
author
Steve Szyszkiewicz
authored
Merge pull request #3 from Dorthu/managedServiceIssueHistory
Managed service issue history
2 parents 736d084 + 65f4ca9 commit 2c83d15

File tree

6 files changed

+459
-3
lines changed

6 files changed

+459
-3
lines changed

src/data/endpoints/managed.yaml

Lines changed: 202 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ endpoints:
2424
name:
2525
description: The contact's full name.
2626
type: String
27-
limit: "1-64 characters"
27+
limit: 1-64 characters
2828
email:
2929
description: The email address for the contact.
3030
type: String
@@ -49,7 +49,6 @@ endpoints:
4949
"group": "Support",
5050
}' \
5151
https://$api_root/$version/managed/contacts
52-
5352
/managed/contacts/$id:
5453
group: Contacts
5554
type: resource
@@ -81,3 +80,204 @@ endpoints:
8180
"group": "Developers"
8281
}' \
8382
https://$api_root/$version/account/oauth-clients/$client_id
83+
#/managed/history:
84+
# group: History
85+
# type: resource
86+
# description: >
87+
# A list of the issues created from monitoring your Services.
88+
# methods:
89+
# GET:
90+
# response: ManagedHistory
91+
# description: >
92+
# Returns your managed service issue history list.
93+
# examples:
94+
# curl: |
95+
# curl -H "Authorization: Bearer $TOKEN" \
96+
# https://$api_root/$version/managed/history
97+
/managed/services:
98+
group: Services
99+
type: resource
100+
description: >
101+
A list of the service monitors your account may access.
102+
methods:
103+
GET:
104+
response: ManagedService
105+
description: >
106+
Returns your managed services list.
107+
examples:
108+
curl: |
109+
curl https://$api_root/$version/managed/services
110+
POST:
111+
description: >
112+
Registers a new service to monitor.
113+
params:
114+
label:
115+
description: A unique label for the service.
116+
type: String
117+
limit: 3-64 characters
118+
service_type:
119+
description: Which service type being used.
120+
type: String
121+
value: url
122+
address:
123+
description: The URL to request. If service_type is TCP, must include port number. For example, tcp://monitor.example.org:23
124+
type: String
125+
value: https://monitor.example.org
126+
timeout:
127+
description: Response must be received before this timeout or an alert will be triggered.
128+
value: 30
129+
limit: 1-255
130+
body:
131+
description: Response must contain this string or an alert will be triggered.
132+
type: String
133+
value: Success!
134+
limit: 0-100 chracters
135+
optional: true
136+
consultation_group:
137+
description: If we need help along the way, we'll contact someone from this group.
138+
value: Support
139+
limit: 0-50 characters
140+
optional: true
141+
region:
142+
description: Required if address is a private IP, otherwise not used.
143+
type: String
144+
value: us-east-1a
145+
notes:
146+
description: We'll refer to these instructions when responding to a service-related issue.
147+
type: String
148+
value: If the Linode needs to be rebooted, please contact us first.
149+
limit: 0-1000 characters
150+
optional: true
151+
examples:
152+
curl: |
153+
curl -H "Content-Type: application/json" \
154+
-H "Authorization: Bearer $TOKEN" \
155+
-X POST -d '{
156+
"label": "NewMonitor",
157+
"service_type": "url",
158+
"address": "https://monitor.example.org",
159+
"timeout": 30,
160+
"consultation_group": "Support",
161+
"region": "us-east-1a",
162+
"body": "Success!",
163+
"notes": "Please contact us if the Linode must be rebooted",
164+
"credentials": 12345,23456,34567
165+
}' \
166+
https://$api_root/$version/managed/contacts
167+
/managed/services/$id:
168+
group: Services
169+
type: resource
170+
authenticated: true
171+
description: >
172+
Manage a particular Managed service your account may access.
173+
methods:
174+
GET:
175+
response: ManagedService
176+
description: >
177+
Returns information about this service.
178+
examples:
179+
curl: |
180+
curl -H "Authorization: Bearer $TOKEN" \
181+
https://$api_root/$version/managed/services/$service_id
182+
/managed/credentials:
183+
group: Credentials
184+
type: resource
185+
description: >
186+
Manage your managed service credentials list.
187+
methods:
188+
GET:
189+
response: ManagedCredential
190+
description: >
191+
Returns your credentials list.
192+
examples:
193+
curl: |
194+
curl https://$api_root/$version/managed/credentials
195+
POST:
196+
description: >
197+
Registers a new credential.
198+
params:
199+
label:
200+
type: String
201+
limit: 2-75 characters
202+
description: >
203+
A unique label describing the credential being added.
204+
username:
205+
type: String
206+
optional: true
207+
description: >
208+
An optional login username.
209+
password:
210+
type: String
211+
description: >
212+
A password or passphrase that provides access.
213+
examples:
214+
curl: |
215+
curl -H "Content-Type: application/json" \
216+
-H "Authorization: Bearer $TOKEN" \
217+
-X POST -d '{
218+
"label": "MyCredential",
219+
"username": "myusername",
220+
"pasword": "mypassword",
221+
}' \
222+
https://$api_root/$version/managed/credentials
223+
/managed/credentials/$id:
224+
group: Credentials
225+
type: resource
226+
authenticated: true
227+
description: >
228+
Manage a particular Managed service credential your account may access.
229+
methods:
230+
GET:
231+
response: ManagedCredential
232+
description: >
233+
Returns information about this credential.
234+
examples:
235+
curl: |
236+
curl -H "Authorization: Bearer $TOKEN" \
237+
https://$api_root/$version/managed/credential/$credential_id
238+
PUT:
239+
description: >
240+
Edits this credential.
241+
examples:
242+
curl: |
243+
curl -H "Content-Type: application/json" \
244+
-H "Authorization: Bearer $TOKEN" \
245+
-X PUT -d '{
246+
"label": "MyNewCredential",
247+
"username": "myusername2",
248+
}' \
249+
https://$api_root/$version/managed/credentials/$credential_id
250+
/managed/credentials/$id/password:
251+
group: Credentials
252+
type: resource
253+
authenticated: true
254+
description: >
255+
Change the password for a credential.
256+
methods:
257+
POST:
258+
response: ManagedCredential
259+
description: >
260+
Changes the password for a credential.
261+
examples:
262+
curl: |
263+
curl -H "Content-Type: application/json" \
264+
-H "Authorization: Bearer $TOKEN" \
265+
-X POST -d '{
266+
"pasword": "mypassword",
267+
}' \
268+
https://$api_root/$version/managed/credentials/$credential_id/password
269+
/managed/credentials/$id/revoke:
270+
group: Credentials
271+
type: resource
272+
authenticated: true
273+
description: >
274+
Revokes a credential.
275+
methods:
276+
POST:
277+
description: >
278+
Revokes a credential.
279+
examples:
280+
curl: |
281+
curl -H "Content-Type: application/json" \
282+
-H "Authorization: Bearer $TOKEN" \
283+
https://$api_root/$version/managed/credentials/$credential_id/revoke

src/data/objects/event.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ schema:
3939
description: >
4040
The action that caused this event.
4141
username:
42-
type: String
4342
type: String
4443
value: example_user
4544
description: >

src/data/objects/managedcontact.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ prefix: managed/contacts
44
description: >
55
A list of people we can contact if we require further information regarding your Managed service.
66
schema:
7+
id:
8+
type: Integer
9+
value: 123
10+
description: This contact's ID.
711
name:
812
value: John Q. Public
913
type: String
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# vim: set et ts=2 sw=2 tw=80 :
2+
name: ManagedCredential
3+
prefix: managed/credentials
4+
description: >
5+
Managed Service credential objects describe monitoring service credentials associated with a service.
6+
schema:
7+
id:
8+
type: Integer
9+
value: 123
10+
description: >
11+
This credential's ID.
12+
label:
13+
type: String
14+
value: CredentialLabel
15+
description: >
16+
A unique Label describing the credential.
17+
username:
18+
type: String
19+
value: myusername
20+
description: >
21+
An optional login username.
22+
last_decryption:
23+
type: Object
24+
description: >
25+
The username and datetime of the last login using this credential.
26+
who:
27+
type: String
28+
value: myusername
29+
description: >
30+
The username of the last successful login.
31+
when:
32+
type: Datetime
33+
value: 2017-10-31T11:12:21
34+
description: >
35+
The datetime of the last successful login.

src/data/objects/managedhistory.yaml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
# vim: set et ts=2 sw=2 tw=80 :
2+
name: ManagedHistory
3+
prefix: managed/history
4+
description: >
5+
Managed History objects describe support ticket issues that have occurred while subscribed to your Managed service.
6+
schema:
7+
created:
8+
type: Datetime
9+
value: 2017-10-31T11:12:21
10+
entity:
11+
description: >
12+
Displays information related to the type of issue being monitored by your Service.
13+
id:
14+
type: Integer
15+
value: 1234567
16+
type:
17+
type: String
18+
value: ticket
19+
description: >
20+
The type of service issue being reported.
21+
label:
22+
type: String
23+
value: Could not connect to URL
24+
description: >
25+
A summary of the issue being reported.
26+
url:
27+
type: String
28+
value: /support/tickets/1234567
29+
description: >
30+
The endpoint URI related to the Support Ticket that was created.
31+
service:
32+
description: >
33+
Displays information related to the Service being monitored.
34+
id:
35+
type: Integer
36+
value: 111
37+
updated:
38+
type: Datetime
39+
value: 2017-10-31T22:34:50
40+
status:
41+
type: Enum
42+
subtype: ManagedServiceStatus
43+
value: "active"
44+
description: >
45+
Describes the status of your Service.
46+
label:
47+
type: String
48+
value: myLabel
49+
description: >
50+
Describes the Service you want monitored.
51+
type:
52+
type: Enum
53+
subtype: ManagedServiceType
54+
value: "url"
55+
description: >
56+
Describes the type of monitoring you want.
57+
body:
58+
type: String
59+
value: String to match.
60+
description: >
61+
Response must contain this string or an alert will be triggered.
62+
method:
63+
type: Enum
64+
subtype: ManagedServiceMethod
65+
value: "get"
66+
description: >
67+
The method by which the URL is accessed.
68+
#TODO credentials:
69+
created:
70+
type: Datetime
71+
value: 2017-10-31T19:20:33
72+
consultation_group:
73+
type: String
74+
value: Support Manager
75+
description: >
76+
If we need help along the way, we'll contact someone from this group.
77+
path:
78+
type: String
79+
value: /
80+
description: >
81+
Defaults to "/" for url.
82+
url:
83+
type: String
84+
value: https://mydomain.domain.com/
85+
description: >
86+
The URL to request.
87+
timeout:
88+
type: Integer
89+
value: 10
90+
description: >
91+
Response must be received before this timeout or an alert will be triggered.
92+
port:
93+
type: Integer
94+
value: 80
95+
description: >
96+
Defaults to 80 if HTTP/TCP, 443 if HTTPS
97+
protocol:
98+
type: Enum
99+
subtype: ManagedServiceProtocol
100+
value: "https"
101+
description: >
102+
Defaults to HTTP in URL mode, TCP in TCP mode.
103+
domain:
104+
type: String
105+
value: mydomain.domain.com
106+
description: >
107+
The domain name of the URL to request.
108+
enums:
109+
ManagedServiceStatus:
110+
new: A newly-created Service.
111+
active: An active Service to monitor.
112+
disabled: A disabled Service to monitor.
113+
ManagedServiceType:
114+
url: Monitor a specific URL.
115+
tcp: Monitor a port via TCP.
116+
ManagedServiceMethod:
117+
get: Monitor a specific URL/port via GET.
118+
post: Monitor a specific URL/port via POST.
119+
ManagedServiceProtocol:
120+
http: HTTP
121+
https: HTTPS
122+
tcp: TCP

0 commit comments

Comments
 (0)