Provisioning Management » History » Version 17
jerome bonnet, 05/12/2015 05:33 PM
| 1 | 1 | Eric Vieillevigne | {{>toc}} |
|---|---|---|---|
| 2 | |||
| 3 | h1. Provisioning Management |
||
| 4 | 2 | Eric Vieillevigne | |
| 5 | Provisionning Management allows a thirdParty Application to create, update, delete an account of FamilyWall, Set the member profile right, set member premium type and select/update the services enable for such user. |
||
| 6 | |||
| 7 | h2. Search User - _provsearch_ |
||
| 8 | |||
| 9 | This method returns the accountId of a Valid user by Identifiers (email, login or MSISDN) |
||
| 10 | |||
| 11 | 4 | Eric Vieillevigne | By sending an HTTP request http://devserver/api/prov/search?identifier=test@gmail.com |
| 12 | 2 | Eric Vieillevigne | |
| 13 | *Parameters*: |
||
| 14 | |||
| 15 | |*Name*|*Type*|*Description*| |
||
| 16 | |email|String|Email identifier| |
||
| 17 | |MSISDN|String|internationalized 10 digits number| |
||
| 18 | |login|String|login of a valid account| |
||
| 19 | |||
| 20 | *Response*: |
||
| 21 | <pre><code class="javascript"> |
||
| 22 | { |
||
| 23 | "a01":{ |
||
| 24 | "r":{ |
||
| 25 | "r":"12345" |
||
| 26 | }, |
||
| 27 | "cn":"provsearch" |
||
| 28 | } |
||
| 29 | } |
||
| 30 | </code></pre> |
||
| 31 | The Method response is a *Long* which represents the _AccountId_ of the account searched. |
||
| 32 | |||
| 33 | In case, the method encounter any error, the response is an exception with specific parameters detailed below. |
||
| 34 | |||
| 35 | *Error*: |
||
| 36 | |||
| 37 | |*Error Code*|*Type*|*Value*|*Description*| |
||
| 38 | |FizApiAccIdentifierInvalidException |Ex|21|User does not exist| |
||
| 39 | 3 | Eric Vieillevigne | |
| 40 | |||
| 41 | 5 | Eric Vieillevigne | h2. Create Family - _provcreatefamily_ |
| 42 | 3 | Eric Vieillevigne | |
| 43 | 4 | Eric Vieillevigne | This method create a family with no member, set premium type, Set Enable Service (e.g. Calendar, Media management, Location...) |
| 44 | 3 | Eric Vieillevigne | |
| 45 | By sending an HTTP request http://devserver/api/prov/createfamily |
||
| 46 | |||
| 47 | *Parameters*: |
||
| 48 | |||
| 49 | |*Name*|*Type*|*Description*| |
||
| 50 | |FamilyName|String|Name of the Family| |
||
| 51 | 17 | jerome bonnet | |FamilyImage|file|Binary file of Family image| |
| 52 | 4 | Eric Vieillevigne | |Premium_Type|Long|Free(0),Premium(1),Premium_Plus(2)| |
| 53 | 3 | Eric Vieillevigne | |Calendar_Service|Boolean|Default true| |
| 54 | |Location_Service|Boolean|Default true| |
||
| 55 | 8 | Eric Vieillevigne | |Autotracking_Service|Boolean|Default false| |
| 56 | 3 | Eric Vieillevigne | |Message_Service|Boolean|Default true| |
| 57 | |Photo_Service|Boolean|Default true| |
||
| 58 | |Video_Service|Boolean|Default true| |
||
| 59 | |Audio_Service|Boolean|Default true| |
||
| 60 | |Task_Service|Boolean|Default true| |
||
| 61 | |||
| 62 | |||
| 63 | *Response*: |
||
| 64 | <pre><code class="javascript"> |
||
| 65 | { |
||
| 66 | "a01":{ |
||
| 67 | "r":{ |
||
| 68 | "r":"12345" |
||
| 69 | }, |
||
| 70 | 4 | Eric Vieillevigne | "cn":"provcreatefamily" |
| 71 | 3 | Eric Vieillevigne | } |
| 72 | } |
||
| 73 | </code></pre> |
||
| 74 | 4 | Eric Vieillevigne | The Method response is a *Long* which represents the _FamilyId_ of the familycreated. |
| 75 | 3 | Eric Vieillevigne | |
| 76 | 1 | Eric Vieillevigne | In case, the method encounter any error, the response is an exception with specific parameters detailed below. |
| 77 | 3 | Eric Vieillevigne | |
| 78 | *Error*: |
||
| 79 | |||
| 80 | |*Error Code*|*Type*|*Value*|*Description*| |
||
| 81 | 6 | Eric Vieillevigne | |AFizApiUnattendedException|Ex|21|Unknown exception| |
| 82 | 7 | Eric Vieillevigne | |
| 83 | 1 | Eric Vieillevigne | h2. Update Family - _provupdatefamily_ |
| 84 | 7 | Eric Vieillevigne | |
| 85 | 17 | jerome bonnet | This method update a family, set premium type, Set Enable Service (e.g. Calendar, Media management, Location...) |
| 86 | 7 | Eric Vieillevigne | |
| 87 | By sending an HTTP request http://devserver/api/prov/updatefamily?familyId=12345 |
||
| 88 | |||
| 89 | *Parameters*: |
||
| 90 | |||
| 91 | |*Name*|*Type*|*Description*| |
||
| 92 | 1 | Eric Vieillevigne | |
| 93 | 7 | Eric Vieillevigne | |FamilyName|String|Name of the Family| |
| 94 | |familyId|Long|Family Id | |
||
| 95 | 17 | jerome bonnet | |FamilyImage|file|Binary file of Family image| |
| 96 | 7 | Eric Vieillevigne | |Premium_Type|Long|Free(0),Premium(1),Premium_Plus(2)| |
| 97 | |Calendar_Service|Boolean|Default true| |
||
| 98 | |Location_Service|Boolean|Default true| |
||
| 99 | 8 | Eric Vieillevigne | |Autotracking_Service|Boolean|Default false| |
| 100 | 7 | Eric Vieillevigne | |Message_Service|Boolean|Default true| |
| 101 | |Photo_Service|Boolean|Default true| |
||
| 102 | |Video_Service|Boolean|Default true| |
||
| 103 | |Audio_Service|Boolean|Default true| |
||
| 104 | |Task_Service|Boolean|Default true| |
||
| 105 | |||
| 106 | |||
| 107 | *Response*: |
||
| 108 | <pre><code class="javascript"> |
||
| 109 | { |
||
| 110 | "a01":{ |
||
| 111 | "r":{ |
||
| 112 | "r":"12345" |
||
| 113 | }, |
||
| 114 | "cn":"provupdatefamily" |
||
| 115 | } |
||
| 116 | } |
||
| 117 | </code></pre> |
||
| 118 | 15 | Eric Vieillevigne | The Method response is a *Long* which represents the _FamilyId_ of the family updated. |
| 119 | 7 | Eric Vieillevigne | |
| 120 | In case, the method encounter any error, the response is an exception with specific parameters detailed below. |
||
| 121 | |||
| 122 | *Error*: |
||
| 123 | 1 | Eric Vieillevigne | |
| 124 | 7 | Eric Vieillevigne | |*Error Code*|*Type*|*Value*|*Description*| |
| 125 | 1 | Eric Vieillevigne | |AFizFamilyIdDoesNotExist|Ex|11|Family Id Does not Exists| |
| 126 | 7 | Eric Vieillevigne | |
| 127 | 1 | Eric Vieillevigne | |
| 128 | 17 | jerome bonnet | h2. Delete Family - _provdeletefamily_ |
| 129 | 1 | Eric Vieillevigne | |
| 130 | 17 | jerome bonnet | This method remove a family with non members |
| 131 | 1 | Eric Vieillevigne | |
| 132 | 17 | jerome bonnet | By sending an HTTP request http://devserver/api/prov/deletefamily?familyId=12345 |
| 133 | |||
| 134 | *Parameters*: |
||
| 135 | |||
| 136 | |*Name*|*Type*|*Description*| |
||
| 137 | |||
| 138 | |familyId|Long|Family Id | |
||
| 139 | |||
| 140 | |||
| 141 | *Response*: |
||
| 142 | <pre><code class="javascript"> |
||
| 143 | { |
||
| 144 | "a01":{ |
||
| 145 | "r":{ |
||
| 146 | "r":"true" |
||
| 147 | }, |
||
| 148 | "cn":"provupdatefamily" |
||
| 149 | } |
||
| 150 | } |
||
| 151 | </code></pre> |
||
| 152 | The Method response is true when the operation is successful. |
||
| 153 | |||
| 154 | In case the method encounter any error, the response is an exception with specific parameters detailed below. |
||
| 155 | |||
| 156 | *Error*: |
||
| 157 | |||
| 158 | |*Error Code*|*Type*|*Value*|*Description*| |
||
| 159 | |AFizFamilyIdDoesNotExist|Ex|11|Family Id Does not Exists| |
||
| 160 | |AFizFamilyNotEmpty|Ex|31|Family contains members| |
||
| 161 | |||
| 162 | |||
| 163 | 13 | Eric Vieillevigne | h2. Create Account - _provcreateaccount_ |
| 164 | 1 | Eric Vieillevigne | |
| 165 | 17 | jerome bonnet | This method create a member for a family and set the member type (member=(0),adminsitrator=(1),founder=(2)). Note that after this method, the user receive an invitation email or an SMS with link to complete the account creation. |
| 166 | 10 | Eric Vieillevigne | |
| 167 | 17 | jerome bonnet | By sending an HTTP request http://devserver/api/prov/createaccount?type=Email&identifier=test@gmail.com&countryCode=FR |
| 168 | &accountType=2&locale=FR&familyId=12345&UserName=myFirstName&Locale=fr |
||
| 169 | 10 | Eric Vieillevigne | |
| 170 | *Parameters*: |
||
| 171 | |||
| 172 | |*Name*|*Type*|*Description*| |
||
| 173 | 17 | jerome bonnet | |familyId|Long|Family Id where the member shall be added| |
| 174 | 10 | Eric Vieillevigne | |Type|String|Email,phone,login| |
| 175 | |Identifier|String|User Identifier Email or MSISDN depending on the type| |
||
| 176 | |UserName|String|User First Name| |
||
| 177 | |UserCountryCode|String|Country Code International Two letters| |
||
| 178 | 17 | jerome bonnet | |AccountType|Long|Account Type (member=(0),administrator=(1),founder=(2))| |
| 179 | 10 | Eric Vieillevigne | |Locale|String|Country Code International Two letters| |
| 180 | |||
| 181 | |||
| 182 | *Response*: |
||
| 183 | <pre><code class="javascript"> |
||
| 184 | { |
||
| 185 | "a01":{ |
||
| 186 | 15 | Eric Vieillevigne | "r":{ |
| 187 | 10 | Eric Vieillevigne | "r":"123455" |
| 188 | }, |
||
| 189 | "cn":"provcreateaccount" |
||
| 190 | } |
||
| 191 | } |
||
| 192 | </code></pre> |
||
| 193 | 1 | Eric Vieillevigne | The Method response is a *Long* which represents the _AccountId_ of the account created. |
| 194 | |||
| 195 | In case, the method encounter any error, the response is an exception with specific parameters detailed below. |
||
| 196 | |||
| 197 | *Error*: |
||
| 198 | 15 | Eric Vieillevigne | |
| 199 | |*Error Code*|*Type*|*Value*|*Description*| |
||
| 200 | |AFizFamilyIdDoesNotExist|Ex|11|Family Id Does not Exists| |
||
| 201 | 1 | Eric Vieillevigne | |FizAccountAlreadyExistsException |Ex|2|Account Identifier already exists| |
| 202 | 15 | Eric Vieillevigne | |FizFounderAlreadyExistsException |Ex|15|Founder already exists| |
| 203 | |AFizInvalidIdentifierException|Ex|21|Identifier has an invalid format| |
||
| 204 | |AFizInvalidEmailException|Ex|17|Email has an invalid format| |
||
| 205 | |AFizInvalidMSISDNException|Ex|22|MSISDN has an invalid format| |
||
| 206 | |||
| 207 | 17 | jerome bonnet | h2. Update Account - _provupdateaccount_ |
| 208 | 15 | Eric Vieillevigne | |
| 209 | 17 | jerome bonnet | This method update a member for a family and set the member type (member=(0),administrator=(1),founder=(2)). |
| 210 | 15 | Eric Vieillevigne | |
| 211 | 17 | jerome bonnet | By sending an HTTP request http://devserver/api/prov/updateaccount?UserCountryCode=FR |
| 212 | &AccountType=2&locale=FR&UserName=myNewFirstName&Locale=fr&accountId=123455 |
||
| 213 | 15 | Eric Vieillevigne | |
| 214 | *Parameters*: |
||
| 215 | |||
| 216 | |*Name*|*Type*|*Description*| |
||
| 217 | 17 | jerome bonnet | |accountId|Long|Account Id of the modified account| |
| 218 | 15 | Eric Vieillevigne | |UserName|String|User First Name| |
| 219 | |UserCountryCode|String|Country Code International Two letters| |
||
| 220 | |AccountType|Long|Account Type (member=(0),adminitrator=(1),founder=(3))| |
||
| 221 | |Locale|String|Country Code International Two letters| |
||
| 222 | |||
| 223 | |||
| 224 | *Response*: |
||
| 225 | <pre><code class="javascript"> |
||
| 226 | { |
||
| 227 | "a01":{ |
||
| 228 | "r":{ |
||
| 229 | "r":"123455" |
||
| 230 | }, |
||
| 231 | 1 | Eric Vieillevigne | "cn":"provupdateaccount" |
| 232 | } |
||
| 233 | } |
||
| 234 | </code></pre> |
||
| 235 | The Method response is a *Long* which represents the _AccountId_ of the account updated. |
||
| 236 | |||
| 237 | In case, the method encounter any error, the response is an exception with specific parameters detailed below. |
||
| 238 | |||
| 239 | *Error*: |
||
| 240 | |||
| 241 | |*Error Code*|*Type*|*Value*|*Description*| |
||
| 242 | |AFizFamilyIdDoesNotExist|Ex|11|Family Id Does not Exists| |
||
| 243 | |FizAccountAlreadyExistsException |Ex|2|Account Identifier already exists| |
||
| 244 | |FizFounderAlreadyExistsException |Ex|15|Founder already exists| |
||
| 245 | |AFizInvalidIdentifierException|Ex|21|Identifier has an invalid format| |
||
| 246 | |AFizInvalidEmailException|Ex|17|Email has an invalid format| |
||
| 247 | |AFizInvalidMSISDNException|Ex|22|MSISDN has an invalid format| |
||
| 248 | 17 | jerome bonnet | |
| 249 | h2. Add Account to family- _provaddaccount2family_ |
||
| 250 | |||
| 251 | This method add an existing account to a family and set the member type (member=(0),administrator=(1),founder=(2)). |
||
| 252 | |||
| 253 | By sending an HTTP request http://devserver/api/prov/addaccount2family?accountId=123455&familyId=333445 |
||
| 254 | |||
| 255 | *Parameters*: |
||
| 256 | |||
| 257 | |*Name*|*Type*|*Description*| |
||
| 258 | |accountId|Long|Family Id where the member shall added| |
||
| 259 | |familyId|Long|Family Id where the member shall be added| |
||
| 260 | |||
| 261 | *Response*: |
||
| 262 | <pre><code class="javascript"> |
||
| 263 | { |
||
| 264 | "a01":{ |
||
| 265 | "r":{ |
||
| 266 | "r":"true" |
||
| 267 | }, |
||
| 268 | "cn":"provupdateaccount" |
||
| 269 | } |
||
| 270 | } |
||
| 271 | </code></pre> |
||
| 272 | The Method response is true when the operation is successful. |
||
| 273 | |||
| 274 | In case the method encounter any error, the response is an exception with specific parameters detailed below. |
||
| 275 | |||
| 276 | *Error*: |
||
| 277 | |||
| 278 | |*Error Code*|*Type*|*Value*|*Description*| |
||
| 279 | |AFizFamilyIdDoesNotExist|Ex|11|Family Id Does not Exists| |
||
| 280 | |FizFounderAlreadyExistsException |Ex|15|Founder already exists| |
||
| 281 | |||
| 282 | h2. Remove Account from family- _provremoveaccount2family_ |
||
| 283 | |||
| 284 | This method remove an existing account from a family. |
||
| 285 | |||
| 286 | By sending an HTTP request http://devserver/api/prov/removeaccount2family?accountId=123455&familyId=333445 |
||
| 287 | |||
| 288 | *Parameters*: |
||
| 289 | |||
| 290 | |*Name*|*Type*|*Description*| |
||
| 291 | |accountId|Long|Family Id where the member shall added| |
||
| 292 | |familyId|Long|Family Id where the member shall be added| |
||
| 293 | |||
| 294 | *Response*: |
||
| 295 | <pre><code class="javascript"> |
||
| 296 | { |
||
| 297 | "a01":{ |
||
| 298 | "r":{ |
||
| 299 | "r":"true" |
||
| 300 | }, |
||
| 301 | "cn":"provupdateaccount" |
||
| 302 | } |
||
| 303 | } |
||
| 304 | </code></pre> |
||
| 305 | The Method response is true when the operation is successful. |
||
| 306 | |||
| 307 | In case the method encounter any error, the response is an exception with specific parameters detailed below. |
||
| 308 | |||
| 309 | *Error*: |
||
| 310 | |||
| 311 | |*Error Code*|*Type*|*Value*|*Description*| |
||
| 312 | |AFizFamilyIdDoesNotExist|Ex|11|Family Id Does not Exists| |
||
| 313 | |FizFounderAlreadyExistsException |Ex|15|Founder already exists| |
||
| 314 | |||
| 315 | h2. Delete Account _provdeleteaccount_ |
||
| 316 | |||
| 317 | This method delete an existing account. It will be removed from all his families beforehand. |
||
| 318 | |||
| 319 | By sending an HTTP request http://devserver/api/prov/deleteaccount?accountId=123455 |
||
| 320 | |||
| 321 | *Parameters*: |
||
| 322 | |||
| 323 | |*Name*|*Type*|*Description*| |
||
| 324 | |accountId|Long|Family Id where the member shall added| |
||
| 325 | |||
| 326 | *Response*: |
||
| 327 | <pre><code class="javascript"> |
||
| 328 | { |
||
| 329 | "a01":{ |
||
| 330 | "r":{ |
||
| 331 | "r":"true" |
||
| 332 | }, |
||
| 333 | "cn":"provupdateaccount" |
||
| 334 | } |
||
| 335 | } |
||
| 336 | </code></pre> |
||
| 337 | The Method response is true when the operation is successful. |
||
| 338 | |||
| 339 | In case the method encounter any error, the response is an exception with specific parameters detailed below. |
||
| 340 | |||
| 341 | *Error*: |
||
| 342 | |||
| 343 | |*Error Code*|*Type*|*Value*|*Description*| |
||
| 344 | |AFizFamilyIdDoesNotExist|Ex|11|Family Id Does not Exists| |
||
| 345 | |FizAccountDoesNotExistException |Un|507|Account is not found| |
||
| 346 | |||
| 347 | |||
| 348 | h2. get Account information _provgetaccount_ |
||
| 349 | |||
| 350 | This method returns the information about an existing account, mainly the family he has subscribed to. |
||
| 351 | |||
| 352 | By sending an HTTP request http://devserver/api/prov/getaccount?accountId=123455 |
||
| 353 | |||
| 354 | *Parameters*: |
||
| 355 | |||
| 356 | |*Name*|*Type*|*Description*| |
||
| 357 | |accountId|Long|Family Id where the member shall added| |
||
| 358 | |||
| 359 | *Response*: |
||
| 360 | <pre><code class="javascript"> |
||
| 361 | { |
||
| 362 | "a01": "a00": { |
||
| 363 | "r": { |
||
| 364 | "r": { |
||
| 365 | "accountId": "123455", |
||
| 366 | "identifiers": [ |
||
| 367 | { |
||
| 368 | "validated": "true", |
||
| 369 | "id": "41602", |
||
| 370 | "type": "Email", |
||
| 371 | "value": "dbfw1@gmail.com" |
||
| 372 | } |
||
| 373 | ], |
||
| 374 | "name": "Eric Vieillevigne", |
||
| 375 | "lastLoginDate": "2015-05-12T17:24:08.782Z", |
||
| 376 | "families" : [ |
||
| 377 | { |
||
| 378 | "familyName": "myfamily", |
||
| 379 | "pictureURIs": [ |
||
| 380 | "http://dev.familywall.com/media/33182_24g29rc4x_37304?" |
||
| 381 | ], |
||
| 382 | "premiumType": "2", |
||
| 383 | "Calendar_Service": "true", |
||
| 384 | "Location_Service": "false", |
||
| 385 | "Autotracking_Service": "false", |
||
| 386 | "Message_Service": "true", |
||
| 387 | "Photo_Service": "true", |
||
| 388 | "Video_Service": "true", |
||
| 389 | "Audio_Service": "true", |
||
| 390 | "Task_Service": "true", |
||
| 391 | "metaId": "family/33202", |
||
| 392 | "familyId": "33202" |
||
| 393 | }, |
||
| 394 | { |
||
| 395 | "familyName": "myfamily2", |
||
| 396 | "pictureURIs": [ |
||
| 397 | "http://dev.familywall.com/media/33183_24g29rc4x_37312?" |
||
| 398 | ], |
||
| 399 | "premiumType": "2", |
||
| 400 | "Calendar_Service": "true", |
||
| 401 | "Location_Service": "false", |
||
| 402 | "Autotracking_Service": "false", |
||
| 403 | "Message_Service": "true", |
||
| 404 | "Photo_Service": "true", |
||
| 405 | "Video_Service": "true", |
||
| 406 | "Audio_Service": "true", |
||
| 407 | "Task_Service": "true", |
||
| 408 | "metaId": "family/33202", |
||
| 409 | "familyId": "33203" |
||
| 410 | } |
||
| 411 | ] |
||
| 412 | } |
||
| 413 | }, |
||
| 414 | "cn": "accgetloggedaccount" |
||
| 415 | } |
||
| 416 | </code></pre> |
||
| 417 | The Method response is true when the operation is successful. |
||
| 418 | |||
| 419 | In case the method encounter any error, the response is an exception with specific parameters detailed below. |
||
| 420 | |||
| 421 | *Error*: |
||
| 422 | |||
| 423 | |*Error Code*|*Type*|*Value*|*Description*| |
||
| 424 | |AFizFamilyIdDoesNotExist|Ex|11|Family Id Does not Exists| |
||
| 425 | |FizAccountDoesNotExistException |Un|507|Account is not found| |