Skip to content

Commit f67e837

Browse files
Josh SagerDorthu
authored andcommitted
Created Managed service endpoint and contacts object
Added managed to prebuild.js Created Manged Contacts object Created endpoints for managed services Included both GET, POST, and PUT endpoints (consolidating two API-based tasks into one docs PR)
1 parent 04e1b99 commit f67e837

File tree

3 files changed

+120
-0
lines changed

3 files changed

+120
-0
lines changed

docs/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+
phone1:
32+
description: A primary phone number for the contact.
33+
type: String
34+
phone2:
35+
description: A primary 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": "[email protected]",
47+
"phone1": "215-555-3000",
48+
"phone2": "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": "[email protected]",
78+
"phone1": "215-555-4000",
79+
"phone2": "215-555-4001",
80+
"group": "Developers"
81+
}' \
82+
https://$api_root/$version/account/oauth-clients/$client_id
83+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
14+
type: String
15+
description: >
16+
The email address of the contact person.
17+
phone1:
18+
value: 215-555-3000
19+
type: String
20+
description: >
21+
If we need further information regarding a service, we may call this contact if a phone number is provided.
22+
phone2:
23+
value: 215-555-3001
24+
type: String
25+
description: >
26+
The secondary phone number of the contact person.
27+
group:
28+
value: Support
29+
type: String
30+
description: >
31+
Contacts can be associated with a monitored service by the group they belong to.

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) {

0 commit comments

Comments
 (0)