Wiki source code of Email Addresses

Last modified by michaely on 2021/09/10 23:34

Show last authors
1 {{layout}}
2 {{layout-section ac:type="two_right_sidebar"}}
3 {{layout-cell}}
4 {{warning}}
5 This page is currently being written. Although the information below is probably accurate, it may not be complete or may have errors.
6 {{/warning}}
7
8 {{info}}
9 The information on this page applies to **iSymphony 3.1+**.
10 {{/info}}
11
12 = (% style="color: rgb(0,0,0);" %)Description(%%) =
13
14 The email addresses REST resource allows access to the email addresses for a user's contact information. This resources allows adding, removing, and updating of user email addresses.
15
16
17 {{/layout-cell}}
18
19 {{layout-cell}}
20 {{panel title="On this page:"}}
21
22
23 {{toc maxLevel="2" indent="1"/}}
24 {{/panel}}
25 {{/layout-cell}}
26 {{/layout-section}}
27
28 {{layout-section ac:type="single"}}
29 {{layout-cell}}
30 = (% style="color: rgb(0,0,0);" %)Root Resource Path(%%) =
31
32 {{code}}
33 communication_manager/rest/config/contact/{coreServerId}/users/{userId}/emailAdresses
34 {{/code}}
35
36 = JSON Representation =
37
38 {{code}}
39 {
40 "id": "706db59d-d30c-4175-aef1-cc019bde4888",
41 "address": "myemail@mydomain.com",
42 "type": "Work"
43 }
44 {{/code}}
45
46 |=(((
47 Property
48 )))|=(((
49 Type
50 )))|=(((
51 Description
52 )))
53 |(((
54 {{{id}}}
55 )))|(((
56 String
57 )))|(((
58 Configuration id of the email address
59 )))
60 |(% colspan="1" %)(% colspan="1" %)
61 (((
62 address
63 )))|(% colspan="1" %)(% colspan="1" %)
64 (((
65 String
66 )))|(% colspan="1" %)(% colspan="1" %)
67 (((
68 Email address.
69 )))
70 |(% colspan="1" %)(% colspan="1" %)
71 (((
72 type
73 )))|(% colspan="1" %)(% colspan="1" %)
74 (((
75 String
76 )))|(% colspan="1" %)(% colspan="1" %)
77 (((
78 The email address type label.
79 )))
80
81 = Resource Paths =
82
83 |=(% colspan="2" %)(% colspan="2" %)
84 (((
85 {{{communication_manager/rest/config/contact/{coreServerId}/users/{userId}/emailAdresses}}}
86 )))
87 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
88 (((
89 **Description**
90 )))|(((
91 Accesses all the email addresses for the user.
92 )))
93 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
94 (((
95 **GET**
96 )))|(((
97 Gets all the email addresses for the user.
98 )))
99 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
100 (((
101 **POST
102 **
103 )))|(% colspan="1" %)(% colspan="1" %)
104 (((
105 Adds an email address to the user.
106
107 (% style="line-height: 1.42857;" %)**Errors:**
108
109 * 412 'No address provided.': Returned if no address was provided.
110 * 412 'No type provided.': Returned if no type was provided.
111 )))
112 |(% colspan="2" %)(% colspan="2" %)
113 (((
114
115 )))
116 |=(% colspan="2" %)(% colspan="2" %)
117 (((
118 {{{communication_manager/rest/config/contact/{coreServerId}/users/{userId}/emailAddresses/{emailAddressId}}}}
119 )))
120 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
121 (((
122 **Description**
123 )))|(((
124 Accesses a specific email address on a user.
125
126 **Parameters:**
127
128 * emailAddressId: The configuration id of the email address.
129 )))
130 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
131 (((
132 **GET**
133 )))|(((
134 Gets a specific email address on a user.
135
136 **Errors:**
137
138 * 404 'An address with the given id does not exist': Returned if no email adress exists with the given id.
139 )))
140 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
141 (((
142 **PUT**
143 )))|(% colspan="1" %)(% colspan="1" %)
144 (((
145 Updates the specified email address.
146
147 **Errors:**
148
149 * 404 'An address with the given id does not exist': Returned if no address exists with the given id.
150 * 412 'No address provided.': Returned if no mail address was provided.
151 * 412 'No type provided.': Returned if no type was provided.
152 )))
153 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
154 (((
155 **DELETE**
156 )))|(% colspan="1" %)(% colspan="1" %)
157 (((
158 Deletes the specified email address.
159
160 **Errors:**
161
162 * 404 'An address with the given id does not exist': Returned if no email address exists with the given id.
163 )))
164
165 = Curl Examples =
166
167 === Get all email addresses for a user ===
168
169 {{code language="bash"}}
170 curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/config/contact/ee828da8-5ee6-412d-82ac-1273f598659d/users/56cf70a3-1ee0-4b09-8f40-297430eeeddf/emailAddresses
171 {{/code}}
172
173 === Get a specific email address ===
174
175 {{code language="bash"}}
176 curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/config/contact/ee828da8-5ee6-412d-82ac-1273f598659d/users/56cf70a3-1ee0-4b09-8f40-297430eeeddf/emailAddresses/a737ddc1-783b-4b69-8e1f-7fd7491f1c1c
177 {{/code}}
178
179 === Add a new email address ===
180
181 {{code language="bash"}}
182 curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"id":"706db59d-d30c-4175-aef1-cc019bde4888","address":"myemail@mydomain.com","type":"Work"}' http://localhost:58080/communication_manager/rest/config/contact/ee828da8-5ee6-412d-82ac-1273f598659d/users/56cf70a3-1ee0-4b09-8f40-297430eeeddf/emailAddresses
183 {{/code}}
184
185 === Delete an email address ===
186
187 {{code language="bash"}}
188 curl --user manager:manag3rpa55word -k -i -X DELETE http://localhost:58080/communication_manager/rest/config/contact/ee828da8-5ee6-412d-82ac-1273f598659d/users/56cf70a3-1ee0-4b09-8f40-297430eeeddf/emailAddresses/a737ddc1-783b-4b69-8e1f-7fd7491f1c1c
189 {{/code}}
190
191 === Update an email address ===
192
193 {{code language="bash"}}
194 curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X PUT -d '{"id":"706db59d-d30c-4175-aef1-cc019bde4888","address":"myemail@mydomain.com","type":"Personal"}' http://localhost:58080/communication_manager/rest/config/contact/ee828da8-5ee6-412d-82ac-1273f598659d/users/56cf70a3-1ee0-4b09-8f40-297430eeeddf/emailAddresses/706db59d-d30c-4175-aef1-cc019bde4888
195 {{/code}}
196 {{/layout-cell}}
197 {{/layout-section}}
198 {{/layout}}
iSymphony