Skip to content

Commit 2af04ec

Browse files
author
Steve Szyszkiewicz
authored
Merge pull request #2 from Dorthu/managedContacts
Managed contacts
2 parents 5b8fc56 + 19bcc92 commit 2af04ec

File tree

3 files changed

+121
-0
lines changed

3 files changed

+121
-0
lines changed

prebuild.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,12 @@ const endpointMap = {
388388
routePath: `${ROUTE_BASE_PATH}/volumes`,
389389
groups: {},
390390
},
391+
managed: {
392+
name: 'Managed',
393+
path: '/managed',
394+
routePath: `${ROUTE_BASE_PATH}/managed`,
395+
groups: {},
396+
},
391397
};
392398

393399
allEndpoints.forEach(function (endpointContainer) {

src/data/endpoints/managed.yaml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# vim: set et ts=2 sw=2 tw=80 :
2+
name: Managed
3+
sort: 1
4+
description: >
5+
Managed service endpoints provide a means of manipulating the information related to your Managed service preferences.
6+
endpoints:
7+
/managed/contacts:
8+
group: Contacts
9+
type: resource
10+
description: >
11+
Manage your managed service contacts list.
12+
methods:
13+
GET:
14+
response: ManagedContact
15+
description: >
16+
Returns your contact list.
17+
examples:
18+
curl: |
19+
curl https://$api_root/$version/managed/contacts
20+
POST:
21+
description: >
22+
Registers a new contact to your managed service contacts list.
23+
params:
24+
name:
25+
description: The contact's full name.
26+
type: String
27+
limit: "1-64 characters"
28+
email:
29+
description: The email address for the contact.
30+
type: String
31+
phone_primary:
32+
description: A primary phone number for the contact.
33+
type: String
34+
phone_secondary:
35+
description: A secondary phone number for the contact.
36+
type: String
37+
group:
38+
description: Contacts can be associated with a monitored service by the group they belong to.
39+
type: String
40+
examples:
41+
curl: |
42+
curl -H "Content-Type: application/json" \
43+
-H "Authorization: Bearer $TOKEN" \
44+
-X POST -d '{
45+
"name": "John Q. Public",
46+
"email": "johnqpublic@linode.com",
47+
"phone_primary": "215-555-3000",
48+
"phone_secondary": "215-555-3001",
49+
"group": "Support",
50+
}' \
51+
https://$api_root/$version/managed/contacts
52+
53+
/managed/contacts/$id:
54+
group: Contacts
55+
type: resource
56+
authenticated: true
57+
description: >
58+
Manage a particular Managed service contact your account may access.
59+
methods:
60+
GET:
61+
response: ManagedContact
62+
description: >
63+
Returns information about this contact.
64+
examples:
65+
curl: |
66+
curl -H "Authorization: Bearer $TOKEN" \
67+
https://$api_root/$version/managed/contact/$contact_id
68+
PUT:
69+
description: >
70+
Edits this contact.
71+
examples:
72+
curl: |
73+
curl -H "Content-Type: application/json" \
74+
-H "Authorization: Bearer $TOKEN" \
75+
-X PUT -d '{
76+
"name": "John Q. Public, Jr.",
77+
"email": "johnqpublicjr@linode.com",
78+
"phone": {
79+
"primary": "215-555-4000",
80+
"secondary": "215-555-4001",
81+
"group": "Developers"
82+
}' \
83+
https://$api_root/$version/account/oauth-clients/$client_id
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# vim: set et ts=2 sw=2 tw=80 :
2+
name: ManagedContact
3+
prefix: managed/contacts
4+
description: >
5+
A list of people we can contact if we require further information regarding your Managed service.
6+
schema:
7+
name:
8+
value: John Q. Public
9+
type: String
10+
description: >
11+
The name of the contact person.
12+
email:
13+
value: jsmith@mycompany.com
14+
type: String
15+
description: >
16+
The email address of the contact person.
17+
phone:
18+
primary:
19+
value: 215-555-3000
20+
type: String
21+
description: >
22+
If we need further information regarding a service, we may call this contact if a phone number is provided.
23+
secondary:
24+
value: 215-555-3001
25+
type: String
26+
description: >
27+
The secondary phone number of the contact person.
28+
group:
29+
value: Support
30+
type: String
31+
description: >
32+
Contacts can be associated with a monitored service by the group they belong to.

0 commit comments

Comments
 (0)