Project

General

Profile

Event Management » History » Version 1

Eric Vieillevigne, 05/12/2015 01:26 PM

1 1 Eric Vieillevigne
{{>toc}}
2
3
h1. Event Management - evt
4
5
The Event Apis enable the developper to access the event module of the platform, manage, create, delete or update any event of the family and his account based on his associated 
6
7
access right.
8
9
h2. Create an Event- _evtcreate_
10
11
The method evtcreate enables a logged user to create an event.
12
13
The method returns the Ievent as a result.
14
15
By sending an HTTP request http://testserver/api/evt/evtcreate
16
17
*Parameters*:
18
19
|*Name*|*Type*|*Description*|
20
|text|String|event title|
21
|description|String|event description|
22
|startDate|String|Start Date of the event string containing an ISO-8601 formatted date-time.If it contains a time zone (not recommended), it will be converted to user time zone in utc|
23
|endDate|String|End Date of the eventstring containing an ISO-8601 formatted date-time.If it contains a time zone (not recommended), it will be converted to user time zone in utc|
24
|type|String|UNKNOWN(default);BIRTHDAY|
25
|placeId|String|associated place id information|
26
|contactId|String|associated contact id information for birthday, only available to define the birthday of contacts; for family members, use the method accgsetprofile instead|
27
|file|binary|binary associated photo may be multiple|
28
29
30
31
*Response*:
32
<pre><code class="javascript">
33
{
34
  "cn":"evtcreate",
35
  "feed":{
36
    "startDate":"2011-04-01T08:00:00.00Z",
37
    "modifDate":"2011-07-28T13:00:36.88Z",
38
    "text":"test ",
39
    "pictureURI":"http:\/\/testserver\/media\/144_2987?",
40
    "accountId":"130",
41
    "eventId":"144_2151",
42
    "placeId":"144_123",
43
    "description":"test event description",
44
    "eventType":"UNKNOWN",
45
    "refPersonId":"110",
46
    "comments":[]
47
  }
48
}
49
        
50
</code></pre>
51
The Method response returns the Ievent Feed.
52
53
54
In case, the method encounter any error, the response is an exeception with specific parameters detailed below.
55
56
*Error*:
57
58
|*Error Code*|*Type*|*Value*|*Description*|
59
|FizMediaQuotaExceededException|ex|601|Media Quota exceedded|
60
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
61
|FizApiInvalidParameterException|un|502|invalid token|
62
|FizApiModelDoesNotExistException|un|503|Object does not exists|
63
|FizApiModelRightException|un|504|Right exception to use this method|
64
65
h2. Create an Event- _evtupdate_
66
67
The method evtupdate enables a logged user to create an event.
68
69
The method returns the Ievent as a result.
70
71
By sending an HTTP request http://testserver/api/evt/evtcreate
72
73
*Parameters*:
74
75
|*Name*|*Type*|*Description*|
76
|eventid|String|Event id to be updated|
77
|text|String|event title|
78
|description|String|event description|
79
|startDate|String|Start Date of the event string containing an ISO-8601 formatted date/time.If it contains a time zone (not recommended), it will be converted to user time zone 
80
81
in utc|
82
|endDate|String|End Date of the eventstring containing an ISO-8601 formatted date/time.If it contains a time zone (not recommended), it will be converted to user time zone in 
83
84
utc|
85
|type|String|UNKNOWN(default);BIRTHDAY;BIRTHDAY_ACCOUNT|
86
|placeId|String|associated place id information|
87
|accountId|String|associated contact id information for birthday|
88
|file|binary|binary associated photo may be multiple|
89
90
91
92
*Response*:
93
<pre><code class="javascript">
94
{
95
  "cn":"evtcreate",
96
  "feed":{
97
    "startDate":"2011-04-01T08:00:00.00Z",
98
    "modifDate":"2011-07-28T13:00:36.88Z",
99
    "text":"test ",
100
    "pictureURI":"http:\/\/testserver\/media\/144_2987?",
101
    "accountId":"130",
102
    "eventId":"144_2151",
103
    "placeId":"144_123",
104
    "description":"test event description",
105
    "eventType":"UNKNOWN",
106
    "refPersonId":"110",
107
    "comments":[]
108
  }
109
}
110
        
111
</code></pre>
112
The Method response returns the Ievent Feed.
113
114
115
In case, the method encounter any error, the response is an exeception with specific parameters detailed below.
116
117
*Error*:
118
119
|*Error Code*|*Type*|*Value*|*Description*|
120
|FizMediaQuotaExceededException|ex|601|Media Quota exceedded|
121
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
122
|FizApiInvalidParameterException|un|502|invalid token|
123
|FizApiModelDoesNotExistException|un|503|Object does not exists|
124
|FizApiModelRightException|un|504|Right exception to use this method|
125
126
h2. Delete an Event- _evtdelete_
127
128
The method evtdelete enables a logged user to delete an event for a certain eventId.
129
130
The method returns a boolean.
131
132
By sending an HTTP request http://testserver/api/api/evt/delete?eventId=1234
133
134
*Parameters*:
135
136
|*Name*|*Type*|*Description*|
137
|eventId|String|eventid information|
138
139
140
*Response*:
141
<pre><code class="javascript">
142
{
143
  "cn":"evtdelete",
144
  "feed":"true"
145
}       
146
</code></pre>
147
The Method response returns a boolean (TRUE=deleted)
148
149
150
In case, the method encounter any error, the response is an exeception with specific parameters detailed below.
151
152
*Error*:
153
154
|*Error Code*|*Type*|*Value*|*Description*|
155
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
156
|FizApiInvalidParameterException|un|502|invalid token|
157
|FizApiModelDoesNotExistException|un|503|Object does not exists|
158
|FizApiModelRightException|un|504|Right exception to use this method|
159
160
h2. Comment an Event- _evtcomment_
161
162
The method evtcomment enables a logged user to comment an event for a certain eventId.
163
164
The method returns the comment of the event feed.
165
166
By sending an HTTP request http://testserver/api/api/evt/comment?eventId=144_2153&text=text_here
167
168
*Parameters*:
169
170
|*Name*|*Type*|*Description*|
171
|eventId|String|eventid information|
172
|text|String|comment text string shall be url encoded|
173
174
*Response*:
175
<pre><code class="javascript">
176
{
177
  "cn":"evtcomment",
178
  "feed":{
179
    "modifDate":"2011-07-28T13:10:10.26Z",
180
    "text":"élement",
181
    "accountId":"130",
182
    "commentId":"144_2011_2153_766"
183
  }
184
}      
185
</code></pre>
186
187
188
In case, the method encounter any error, the response is an exeception with specific parameters detailed below.
189
190
*Error*:
191
192
|*Error Code*|*Type*|*Value*|*Description*|
193
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
194
|FizApiInvalidParameterException|un|502|invalid token|
195
|FizApiModelDoesNotExistException|un|503|Object does not exists|
196
|FizApiModelRightException|un|504|Right exception to use this method|
197
198
h2. Get Event- _evtget_
199
200
The method evtget enables a logged user to get an event for a certain eventId.
201
202
The method returns the Ievents feed (note that if a parameter does not appear it shall be consider as empty)
203
204
By sending an HTTP request http://testserver/api/api/evt/get?eventId=1234
205
206
*Parameters*:
207
208
|*Name*|*Type*|*Description*|
209
|eventId|String|eventid information|
210
211
212
*Response*:
213
<pre><code class="javascript">
214
{
215
  "cn":"evtget",
216
  "feed":{
217
    "startDate":"2011-04-01T08:00:00.00Z",
218
    "modifDate":"2011-07-28T13:12:47.00Z",
219
    "text":"test ",
220
    "pictureURI":"http:\/\/testserver\/media\/144_2990?",
221
    "accountId":"130",
222
    "eventId":"144_2154",
223
    "placeId":"144_123",
224
    "description":"test event description",
225
    "eventType":"UNKNOWN",
226
    "refPersonId":"110",
227
    "comments":[]
228
  }
229
}  
230
</code></pre>
231
232
233
In case, the method encounter any error, the response is an exeception with specific parameters detailed below.
234
235
*Error*:
236
237
|*Error Code*|*Type*|*Value*|*Description*|
238
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
239
|FizApiInvalidParameterException|un|502|invalid token|
240
|FizApiModelDoesNotExistException|un|503|Object does not exists|
241
|FizApiModelRightException|un|504|Right exception to use this method|
242
243
h2. Get Event for certain Place- _evtgetbyplace_
244
245
The method evtgetbyplace enables a logged user to get a list of event for a certain placeId.
246
247
The method returns the list of Ievents feed corresponding to the placeId(note that if a parameter does not appear it shall be consider as empty)
248
249
By sending an HTTP request http://testserver/api/api/evt/getbyplace?placeId=144_123
250
251
*Parameters*:
252
253
|*Name*|*Type*|*Description*|
254
|placeId|String|Id of the place|
255
256
257
*Response*:
258
<pre><code class="javascript">
259
{
260
  "cn":"evtgetbyplace",
261
  "feed":[
262
    {
263
      "startDate":"2011-04-01T08:00:00.00Z",
264
      "modifDate":"2011-07-28T12:58:53.00Z",
265
      "text":"test ",
266
      "accountId":"130",
267
      "eventId":"144_2147",
268
      "placeId":"144_123",
269
      "description":"test event description",
270
      "eventType":"UNKNOWN",
271
      "comments":[]
272
    },{
273
      "startDate":"2011-04-01T08:00:00.00Z",
274
      "modifDate":"2011-07-28T13:10:10.00Z",
275
      "text":"test ",
276
      "pictureURI":"http:\/\/testserver\/media\/144_2988?",
277
      "accountId":"130",
278
      "eventId":"144_2153",
279
      "placeId":"144_123",
280
      "description":"test event description",
281
      "eventType":"UNKNOWN",
282
      "refPersonId":"110",
283
      "comments":[
284
        {
285
          "modifDate":"2011-07-28T13:08:59.00Z",
286
          "text":"comment text here",
287
          "accountId":"130",
288
          "commentId":"144_2011_2153_765"
289
        },{
290
          "modifDate":"2011-07-28T13:10:10.00Z",
291
          "text":"element text here",
292
          "accountId":"130",
293
          "commentId":"144_2011_2153_766"
294
        }
295
      ]
296
    },{
297
      "startDate":"2011-04-01T08:00:00.00Z",
298
      "modifDate":"2011-07-28T13:12:47.00Z",
299
      "text":"test ",
300
      "pictureURI":"http:\/\/testserver\/media\/144_2990?",
301
      "accountId":"130",
302
      "eventId":"144_2154",
303
      "placeId":"144_123",
304
      "description":"test event description",
305
      "eventType":"UNKNOWN",
306
      "refPersonId":"110",
307
      "comments":[]
308
    }
309
  ]
310
}  
311
</code></pre>
312
313
314
In case, the method encounter any error, the response is an exeception with specific parameters detailed below.
315
316
*Error*:
317
318
|*Error Code*|*Type*|*Value*|*Description*|
319
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
320
|FizApiInvalidParameterException|un|502|invalid token|
321
|FizApiModelDoesNotExistException|un|503|Object does not exists|
322
|FizApiModelRightException|un|504|Right exception to use this method|
323
324
h2. Get Event List- _evtlist_
325
326
The method evtlist enables a logged user to get a list of events.
327
328
The method returns the list of Ievents feed.
329
330
By sending an HTTP request http://testserver/api/api/evt/list?
331
332
*Parameters*:
333
334
No parameters in this method
335
336
337
*Response*:
338
<pre><code class="javascript">
339
{
340
  "cn":"evtlist",
341
  "feed":[
342
    {
343
      "startDate":"2011-04-11T17:00:00.00Z",
344
      "modifDate":"2011-06-09T13:10:54.00Z",
345
      "text":"Dinner at Gran Pa",
346
      "accountId":"130",
347
      "eventId":"144_95",
348
      "description":"",
349
      "endDate":"2011-04-11T21:00:00.00Z",
350
      "eventType":"UNKNOWN",
351
      "comments":[]
352
    },{
353
      "startDate":"2011-07-07T03:31:38.00Z",
354
      "modifDate":"2011-07-07T03:31:59.00Z",
355
      "text":"text here",
356
      "accountId":"131",
357
      "eventId":"144_607",
358
      "description":"",
359
      "endDate":"2011-07-07T04:31:38.00Z",
360
      "eventType":"UNKNOWN",
361
      "comments":[]
362
    },{
363
      "startDate":"2011-07-07T03:37:55.00Z",
364
      "modifDate":"2011-07-07T03:38:16.00Z",
365
      "text":"test event",
366
      "accountId":"131",
367
      "eventId":"144_617",
368
      "description":"",
369
      "endDate":"2011-07-07T04:37:55.00Z",
370
      "eventType":"UNKNOWN",
371
      "comments":[]
372
    },{
373
      "startDate":"2011-07-11T14:56:52.00Z",
374
      "modifDate":"2011-07-28T06:59:25.00Z",
375
      "text":"test event2",
376
      "accountId":"131",
377
      "eventId":"144_743",
378
      "description":"description here",
379
      "endDate":"2011-07-12T15:56:52.00Z",
380
      "eventType":"UNKNOWN",
381
      "comments":[
382
        {
383
          "modifDate":"2011-07-11T10:12:21.00Z",
384
          "text":"text here",
385
          "accountId":"131",
386
          "commentId":"144_2011_743_182"
387
        }
388
      ]
389
    },{
390
      "startDate":"2011-07-11T12:59:18.00Z",
391
      "modifDate":"2011-07-11T12:59:27.00Z",
392
      "text":"text here",
393
      "accountId":"131",
394
      "eventId":"144_753",
395
      "description":"",
396
      "endDate":"2011-07-11T13:59:18.00Z",
397
      "eventType":"UNKNOWN",
398
      "comments":[]
399
    },{
400
      "startDate":"2011-07-26T03:49:17.00Z",
401
      "modifDate":"2011-07-26T03:50:00.00Z",
402
      "text":"",
403
      "accountId":"130",
404
      "eventId":"144_1866",
405
      "description":"",
406
      "endDate":"2011-07-26T04:49:17.00Z",
407
      "eventType":"UNKNOWN",
408
      "comments":[]
409
    },{
410
      "startDate":"2011-04-01T08:00:00.00Z",
411
      "modifDate":"2011-07-28T13:12:47.00Z",
412
      "text":"text here",
413
      "pictureURI":"http:\/\/testserver\/media\/144_2990?",
414
      "accountId":"130",
415
      "eventId":"144_2154",
416
      "placeId":"144_123",
417
      "description":"test event description",
418
      "eventType":"UNKNOWN",
419
      "refPersonId":"110",
420
      "comments":[]
421
    }
422
  ]
423
} 
424
</code></pre>
425
426
427
In case, the method encounter any error, the response is an exeception with specific parameters detailed below.
428
429
*Error*:
430
431
|*Error Code*|*Type*|*Value*|*Description*|
432
|FizApiUnattendedException|un|500|Unexpected Server Error|
433
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
434
|FizApiInvalidParameterException|un|502|invalid token|
435
|FizApiModelDoesNotExistException|un|503|Object does not exists|
436
|FizApiModelRightException|un|504|Right exception to use this method|
437
438
h2. Get Event List for specific interval- _evtlistinterval_
439
440
The method evtlistinterval enables a logged user to get a list of events for a certain interval.
441
442
The method returns the list of Ievents feed.
443
444
By sending an HTTP request http://testserver/api/api/evt/listinterval?from=2011-04-01T08%3A00&to=2011-05-01T08%3A00
445
446
*Parameters*:
447
448
|*Name*|*Type*|*Description*|
449
|from|String|Start Date of the interval containing an ISO-8601 formatted date/time|
450
|to|String|End Date of the interval containing an ISO-8601 formatted date/time|
451
452
453
*Response*:
454
<pre><code class="javascript">
455
{
456
  "cn":"evtlistinterval",
457
  "feed":[
458
    {
459
      "startDate":"2011-04-01T08:00:00Z",
460
      "modifDate":"2011-07-28T08:30:07Z",
461
      "text":"test event title",
462
      "accountId":"130",
463
      "eventId":"144_2135",
464
      "description":"test event description",
465
      "endDate":"2011-04-01T09:00:00Z",
466
      "eventType":"UNKNOWN",
467
      "comments":[]
468
    },{
469
      "startDate":"2011-04-01T08:00:00Z",
470
      "modifDate":"2011-07-28T08:40:32Z",
471
      "text":"test event title",
472
      "accountId":"130",
473
      "eventId":"144_2136",
474
      "description":"test event description",
475
      "eventType":"UNKNOWN",
476
      "comments":[]
477
    },
478
    }
479
  ]
480
} 
481
</code></pre>
482
483
484
In case, the method encounter any error, the response is an exeception with specific parameters detailed below.
485
486
*Error*:
487
488
|*Error Code*|*Type*|*Value*|*Description*|
489
|FizApiUnattendedException|un|500|Unexpected Server Error|
490
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
491
|FizApiInvalidParameterException|un|502|invalid token|
492
|FizApiModelDoesNotExistException|un|503|Object does not exists|
493
|FizApiModelRightException|un|504|Right exception to use this method|
494
495
h2. Get Event List for specific month- _evtlistmonth_
496
497
The method evtlistmonth enables a logged user to get a list of events for a certain month.
498
499
The method returns the list of Ievents feed.
500
501
By sending an HTTP request http://testserver/api/api/evt/listmonth?date=2011-06-01T08%3A00
502
503
*Parameters*:
504
505
|*Name*|*Type*|*Description*|
506
|from|String|Current Date of the selected month (if empty current month)|
507
508
*Response*:
509
<pre><code class="javascript">
510
{
511
  "cn":"evtlistmonth",
512
  "feed":[
513
    {
514
      "startDate":"2011-07-01T14:06:15.000Z",
515
      "modifDate":"2011-07-01T14:06:45.000Z",
516
      "text":"Working",
517
      "accountId":"130",
518
      "eventId":"144_383",
519
      "placeId":"144_84",
520
      "description":"",
521
      "endDate":"2011-07-01T15:06:15.000Z",
522
      "eventType":"UNKNOWN",
523
      "comments":[]
524
    },{
525
      "startDate":"2011-07-01T14:07:21.000Z",
526
      "modifDate":"2011-07-01T14:07:56.000Z",
527
      "text":"text here",
528
      "accountId":"130",
529
      "eventId":"144_384",
530
      "description":"",
531
      "endDate":"2011-07-02T15:07:21.000Z",
532
      "eventType":"UNKNOWN",
533
      "comments":[]
534
    },
535
    }
536
  ]
537
} 
538
</code></pre>
539
540
541
In case, the method encounter any error, the response is an exeception with specific parameters detailed below.
542
543
*Error*:
544
545
|*Error Code*|*Type*|*Value*|*Description*|
546
|FizApiUnattendedException|un|500|Unexpected Server Error|
547
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
548
|FizApiInvalidParameterException|un|502|invalid token|
549
|FizApiModelDoesNotExistException|un|503|Object does not exists|
550
|FizApiModelRightException|un|504|Right exception to use this method|
551
552
h2. Get Event List for specific week- _evtlistweek_
553
554
The method evtlistweek enables a logged user to get a list of events for a certain week.
555
556
The method returns the list of Ievents feed.
557
558
By sending an HTTP request http://testserver/api/api/evt/listweek?date=2011-07-01T08%3A00
559
560
*Parameters*:
561
562
|*Name*|*Type*|*Description*|
563
|from|String|Current Date of the selected month (if empty current week)|
564
565
*Response*:
566
<pre><code class="javascript">
567
{
568
  "cn":"evtlistmonth",
569
  "feed":[
570
    {
571
      "startDate":"2011-07-01T14:06:15.000Z",
572
      "modifDate":"2011-07-01T14:06:45.000Z",
573
      "text":"Working",
574
      "accountId":"130",
575
      "eventId":"144_383",
576
      "placeId":"144_84",
577
      "description":"",
578
      "endDate":"2011-07-01T15:06:15.000Z",
579
      "eventType":"UNKNOWN",
580
      "comments":[]
581
    },{
582
      "startDate":"2011-07-01T14:07:21.000Z",
583
      "modifDate":"2011-07-01T14:07:56.000Z",
584
      "text":"text here",
585
      "accountId":"130",
586
      "eventId":"144_384",
587
      "description":"",
588
      "endDate":"2011-07-02T15:07:21.000Z",
589
      "eventType":"UNKNOWN",
590
      "comments":[]
591
    },{
592
      "startDate":"2011-07-05T16:00:00.000Z",
593
      "modifDate":"2011-07-06T02:56:04.000Z",
594
      "text":"text here",
595
      "accountId":"133",
596
      "eventId":"144_535",
597
      "description":"",
598
      "endDate":"2011-07-06T16:00:00.000Z",
599
      "eventType":"UNKNOWN",
600
      "comments":[]
601
    },
602
    }
603
  ]
604
} 
605
</code></pre>
606
607
608
In case, the method encounter any error, the response is an exeception with specific parameters detailed below.
609
610
*Error*:
611
612
|*Error Code*|*Type*|*Value*|*Description*|
613
|FizApiUnattendedException|un|500|Unexpected Server Error|
614
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
615
|FizApiInvalidParameterException|un|502|invalid token|
616
|FizApiModelDoesNotExistException|un|503|Object does not exists|
617
|FizApiModelRightException|un|504|Right exception to use this method|
618
619
h2. List a number of X events from a certain event- _evtnavigate_
620
621
The method evtlistnavigate enables a logged user to get a list of X events from a certain event id .
622
623
The method returns the list of Ievents feed.
624
625
By sending an HTTP request http://testserver/api/api/evt/navigate?eventId=144_383&offset=10
626
627
*Parameters*:
628
629
|*Name*|*Type*|*Description*|
630
|eventid|String|Start Event Id from the list|
631
|offset|String|Number of subsequent additional event from the start evend id. Offset may be negative to display X previous events|
632
633
*Response*:
634
<pre><code class="javascript">
635
"cn":"evtnavigate",
636
  "feed":[
637
    {
638
      "startDate":"2011-07-01T14:07:21.000Z",
639
      "modifDate":"2011-07-01T14:07:56.000Z",
640
      "text":"text here",
641
      "accountId":"130",
642
      "eventId":"144_384",
643
      "description":"",
644
      "endDate":"2011-07-02T15:07:21.000Z",
645
      "eventType":"UNKNOWN",
646
      "comments":[]
647
    },{
648
      "startDate":"2011-07-05T16:00:00.000Z",
649
      "modifDate":"2011-07-06T02:56:04.000Z",
650
      "text":"text here",
651
      "accountId":"133",
652
      "eventId":"144_535",
653
      "description":"",
654
      "endDate":"2011-07-06T16:00:00.000Z",
655
      "eventType":"UNKNOWN",
656
      "comments":[]
657
    },{
658
      "startDate":"2011-07-05T22:00:00.000Z",
659
      "modifDate":"2011-07-05T16:41:21.000Z",
660
      "text":"Work",
661
      "accountId":"130",
662
      "eventId":"144_534",
663
      "description":"",
664
      "endDate":"2011-07-05T22:00:00.000Z",
665
      "eventType":"UNKNOWN",
666
      "comments":[]
667
    },
668
    }
669
  ]
670
} 
671
</code></pre>
672
673
674
In case, the method encounter any error, the response is an exeception with specific parameters detailed below.
675
676
*Error*:
677
678
|*Error Code*|*Type*|*Value*|*Description*|
679
|FizApiUnattendedException|un|500|Unexpected Server Error|
680
|FizAccountNotFoundInSessionException|un|501|Session is invalid|
681
|FizApiInvalidParameterException|un|502|invalid token|
682
|FizApiModelDoesNotExistException|un|503|Object does not exists|
683
|FizApiModelRightException|un|504|Right exception to use this method|