Newer
Older
<div class="document">
<div class="documentwrapper">
<div class="body" role="main">
<div id="module-scs_api.server" class="section">
[]{#api-documentation}
API Documentation[](#module-scs_api.server "Permalink to this headline"){.headerlink}
======================================================================================
Implements API for IT4I SCS Information System.
- api revision: `9eb0678f / 2017-12-08 11:06:12 +0100`{.docutils
.literal}
- api version: `0.9-11-g9eb0678`{.docutils .literal}
- apidoc building date: `2017-12-08 16:05:36 +0100`{.docutils
Summary[](#summary "Permalink to this headline"){.headerlink}
--------------------------------------------------------------
Resource Operation Description
------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
account-expire [GET /api/v1/account-expire/(login)](#get--api-v1-account-expire-(login)){.reference .external} Account expiration date
accounts-to-close [GET /api/v1/accounts-to-close/(category)](#get--api-v1-accounts-to-close-(category)){.reference .external} Standard accounts close to expiration date
check-access [POST /api/v1/check-access](#post--api-v1-check-access){.reference .external} Access check to queue
dedicated-time [GET /api/v1/dedicated-time/(cluster\_type)](#get--api-v1-dedicated-time-(cluster_type)){.reference .external} HPC dedicated time
graph\_affiliation\_stats [GET /api/v1/graph\_affiliation\_stats](#get--api-v1-graph_affiliation_stats){.reference .external} Graph affiliation statistics
graph\_research\_area\_stats [GET /api/v1/graph\_research\_area\_stats](#get--api-v1-graph_research_area_stats){.reference .external} Graph research area statistics
graph\_utilization\_stats [GET /api/v1/graph\_utilization\_stats](#get--api-v1-graph_utilization_stats){.reference .external} Graph utilization statistics
irregular-accounts-to-close [GET /api/v1/irregular-accounts-to-close](#get--api-v1-irregular-accounts-to-close){.reference .external} Special accounts close to expiration date
it4ifree [POST /api/v1/it4ifree/(login)](#post--api-v1-it4ifree-(login)){.reference .external} Free account resources
it4ifreetoken [GET /api/v1/it4ifreetoken/(login)](#get--api-v1-it4ifreetoken-(login)){.reference .external} Free account token
motd [GET /api/v1/motd/(category)](#get--api-v1-motd-(category)){.reference .external} SCS messages of the day
ping [GET /api/v1/ping](#get--api-v1-ping){.reference .external} Connection test
quota-extra [GET /api/v1/quota-extra](#get--api-v1-quota-extra){.reference .external} User extra quota
version [GET /api/v1/version](#get--api-v1-version){.reference .external} API version
</div>
<div id="api-details" class="section">
API Details[](#api-details "Permalink to this headline"){.headerlink}
----------------------------------------------------------------------
`GET `{.descname}`/api/v1/account-expire/`{.descname}[(]{.sig-paren}*login*[)]{.sig-paren}[](#get--api-v1-account-expire-(login) "Permalink to this definition"){.headerlink}
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
: Access to this service is restricted to just few source ipv4
addresses.
It returns the account expiration date. The account may participates
on several projects. If all projects were already finished, there
will come a time when the account expires as well. It will happen
after:
> <div>
>
> - 365 days - for all standard accounts
> - 31 days - for special (e.g. training) accounts
>
> </div>
Query Parameters:
- **login** – account id
Status Codes:
- [200
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference
.external} – no error
- [405 Method Not
Allowed](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6){.reference
.external} – restricted access, your ipv4 is not allowed
**Example request**:
<div class="highlight-console">
<div class="highlight">
curl -i https://scs.it4i.cz/api/v1/account-expire/chr0139
</div>
</div>
**Example response**:
<div class="highlight-http">
<div class="highlight">
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"login": "chr0139",
"projectendtime": "2019-07-25 21:59:59"
}
]
</div>
</div>
<!-- -->
`GET `{.descname}`/api/v1/accounts-to-close/`{.descname}[(]{.sig-paren}*category*[)]{.sig-paren}[](#get--api-v1-accounts-to-close-(category) "Permalink to this definition"){.headerlink}
: Access to this service is restricted to just few source ipv4
addresses.
The standard account expires 365 days after the date when the last
project was finished. This service returns the list of standard
accounts which are close to the expiration date. The closeness time
interval depends on requested parameter.
Query Parameters:
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
- **first** – 93±2 days before expiration date
- **second** – 31±2 days before expiration date
- **third** – 7±2 days before expiration date
Response JSON Object:
- **fullname** (*string*) – user full name
- **login** (*string*) – account id
- **projectendtime** (*string*) – project end date
- **userclosetime** (*string*) – project end date shifted by
272/334/358 days
Status Codes:
- [200
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference
.external} – no error
- [405 Method Not
Allowed](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6){.reference
.external} – restricted access, your ipv4 address is not allowed
**Example request**:
<div class="highlight-console">
<div class="highlight">
curl -i https://scs.it4i.cz/api/v1/accounts-to-close/second
</div>
</div>
**Example response**:
<div class="highlight-http">
<div class="highlight">
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"fullname": "Smith John",
"login": "johnsm",
"projectendtime": "2017-01-08 22:59:59",
"userclosetime": "2017-11-09 22:59:59"
}
]
</div>
</div>
<!-- -->
`POST `{.descname}`/api/v1/check-access`{.descname}[](#post--api-v1-check-access "Permalink to this definition"){.headerlink}
: A service to check if account and/or related project has the access
to specified queue.
Request JSON Object:
- **login** (*string*) – account id
- **queue** (*string*) – queue id
- **pid** (*string*) – project id, not required if querying
projectless queue
- [200
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference
.external} – no error
<div class="highlight-console">
<div class="highlight">
curl -i -H "Content-Type:application/json" -X POST \
--data '{"pid":"DD-13-5","login":"johnsm","queue":"qfat"}' \
https://scs.it4i.cz/api/v1/check-access
<div class="highlight-http">
<div class="highlight">
HTTP/1.1 200 OK
Content-Type: application/json
"OK Access granted for regular queue."
`GET `{.descname}`/api/v1/dedicated-time/`{.descname}[(]{.sig-paren}*cluster\_type*[)]{.sig-paren}[](#get--api-v1-dedicated-time-(cluster_type) "Permalink to this definition"){.headerlink}
: Returns list of times dedicated for HPC maintainance. It is not
possible to use HPC services during maintainance.
Query Parameters:
- **all** – returns all dedicated times for all clusters
- **salomon** – returns all times just for salomon cluster
- **anselm** – returns all times just for anselm cluster
- **active** – returns dedicated times for all clusters which are
- **planned** – returns dedicated times for all clusters which are
now active or scheduled in the future
Status Codes:
- [200
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference
.external} – no error
- [405 Method Not
Allowed](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6){.reference
.external} – invalid requested query parameter
<div class="highlight-console">
<div class="highlight">
curl -i curl https://scs.it4i.cz/api/v1/dedicated-time/all
<div class="highlight-http">
<div class="highlight">
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"cluster_type": "salomon",
"dateEfficiency": "2017-11-21 09:45:00",
"dateExpiration": "2017-11-21 23:59:00",
"updated_at": "2017-11-21 09:45:00"
}
]
`GET `{.descname}`/api/v1/graph_affiliation_stats`{.descname}[](#get--api-v1-graph_affiliation_stats "Permalink to this definition"){.headerlink}
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
: Access to this service is restricted to just few source ipv4
addresses.
It returns graph data useful to plot statistics of using HPC by some
affiliations.
Query Parameters:
- **height** – optional, graph height in pixels, default 300
- **width** – optional, graph width in pixels, default 420
- **sizepct** – optional, graph size in percents, default 40
Status Codes:
- [200
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference
.external} – no error
- [405 Method Not
Allowed](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6){.reference
.external} – restricted access, your ipv4 address is not allowed
**Example request**:
<div class="highlight-console">
<div class="highlight">
curl -i -X GET --data height=50 -d sizepct=50 \
-G https://scs.it4i.cz/api/v1/graph_affiliation_stats
</div>
</div>
**Example response**:
<div class="highlight-http">
<div class="highlight">
HTTP/1.1 200 OK
Content-Type: application/json
"
{
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
height: 50,
width: 420,
},
credits: {
text: 'IT4Innovations 2017-11-14 13:21'
},
title: {
text: ''
},
exporting: {
enabled: false
},
tooltip: {
pointFormat: '{point.percentage:.1f} %'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
size: '50%',
startAngle: 315,
dataLabels: {
enabled: true,
format: '{point.name}',
}
}
},
series: [
{
type: 'pie',
data: [
['IT4Innovations', 143320459.886 ],
['Akademie věd ČR', 67329442.8672 ],
['CEITEC', 41987818.0711 ],
['Masarykova univerzita', 22767491.1453 ],
['VUT Brno', 18184662.5402 ],
['Univerzita Karlova', 15544836.8455 ],
['ČVUT', 12383341.426 ],
['Matematicko-fyzikální fakulta', 4583152.32333 ],
['Uppsala University', 4562701.04 ],
['Others', 36525837.5894 ],
]
}
]
}
"
</div>
</div>
<!-- -->
`GET `{.descname}`/api/v1/graph_research_area_stats`{.descname}[](#get--api-v1-graph_research_area_stats "Permalink to this definition"){.headerlink}
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
: Access to this service is restricted to just few source ipv4
addresses.
It returns graph data useful to plot statistics of using HPC by
various science fields.
Query Parameters:
- **height** – optional, graph height in pixels, default 300
- **width** – optional, graph width in pixels, default 420
- **sizepct** – optional, graph size in percents, default 40
Status Codes:
- [200
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference
.external} – no error
- [405 Method Not
Allowed](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6){.reference
.external} – restricted access, your ipv4 address is not allowed
**Example request**:
<div class="highlight-console">
<div class="highlight">
curl -i -X GET -G https://scs.it4i.cz/api/v1/graph_research_area_stats
</div>
</div>
**Example response**:
<div class="highlight-http">
<div class="highlight">
HTTP/1.1 200 OK
Content-Type: application/json
"
{
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
height: 300,
width: 420,
},
credits: {
text: 'IT4Innovations 2017-11-14 13:43'
},
title: {
text: ''
},
exporting: {
enabled: false
},
tooltip: {
pointFormat: '{point.percentage:.1f} %'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
size: '40%',
startAngle: 315,
dataLabels: {
enabled: true,
format: '{point.name}',
}
}
},
series: [
{
type: 'pie',
data: [
['Materials Science ', 205656805 ],
['Bio Sciences ', 65319185 ],
['Plasma & Particle Physics ', 21935334 ],
['Service', 20537970 ],
['Engineering ', 15691906 ],
['Informatics', 12335969 ],
['Applied Mathematics', 9458711 ],
['Earth Sciences ', 8804183 ],
['Astro Sciences ', 4229242 ],
['Other Research Areas', 2493851 ],
]
}
]
}
"
</div>
</div>
<!-- -->
`GET `{.descname}`/api/v1/graph_utilization_stats`{.descname}[](#get--api-v1-graph_utilization_stats "Permalink to this definition"){.headerlink}
: Access to this service is restricted to just few source ipv4
addresses.
It returns graph data to plot statistics of HPC week utilization
during last 100 days.
Query Parameters:
- **height** – optional, graph height in pixels, default 300
- **width** – optional, graph width in pixels, default 420
- **sizepct** – optional, graph size in percents, default 40
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
Status Codes:
- [200
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference
.external} – no error
- [405 Method Not
Allowed](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6){.reference
.external} – restricted access, your ipv4 address is not allowed
**Example request**:
<div class="highlight-console">
<div class="highlight">
curl -i -X GET -G https://scs.it4i.cz/api/v1/graph_utilization_stats
</div>
</div>
**Example response**:
<div class="highlight-http">
<div class="highlight">
HTTP/1.1 200 OK
Content-Type: application/json
"
{
chart: {
zoomType: 'x',
plotBorderWidth: 0,
borderWidth: 0,
borderRadius: 0,
borderColor: '#DDDDDD',
height: 300,
width: 420
},
series: [
{
name: 'Cores utilized',
type: 'areaspline',
data: [
[ Date.UTC(2017,7,6), 18466],
[ Date.UTC(2017,7,7), 18606],
[ Date.UTC(2017,7,8), 19075],
[ Date.UTC(2017,7,9), 19962],
[ Date.UTC(2017,7,10), 20239],
[ Date.UTC(2017,7,11), 20425],
[ Date.UTC(2017,7,12), 20110],
[ Date.UTC(2017,7,13), 19413],
[ Date.UTC(2017,7,14), 20204],
[ Date.UTC(2017,7,15), 20058],
[ Date.UTC(2017,7,16), 19890],
[ Date.UTC(2017,7,17), 18102],
[ Date.UTC(2017,7,18), 18529],
[ Date.UTC(2017,7,19), 18871],
[ Date.UTC(2017,7,20), 18704],
[ Date.UTC(2017,7,21), 17106],
[ Date.UTC(2017,7,22), 17854],
[ Date.UTC(2017,7,23), 19541],
[ Date.UTC(2017,7,24), 19691],
[ Date.UTC(2017,7,25), 19335],
[ Date.UTC(2017,7,26), 20776],
[ Date.UTC(2017,7,27), 20856],
[ Date.UTC(2017,7,28), 21116],
[ Date.UTC(2017,7,29), 21705],
[ Date.UTC(2017,7,30), 17907],
[ Date.UTC(2017,7,31), 18085],
[ Date.UTC(2017,8,1), 18564],
[ Date.UTC(2017,8,2), 17449],
[ Date.UTC(2017,8,3), 17472],
[ Date.UTC(2017,8,4), 17173],
[ Date.UTC(2017,8,5), 14445],
[ Date.UTC(2017,8,6), 17952],
[ Date.UTC(2017,8,7), 18813],
[ Date.UTC(2017,8,8), 17847],
[ Date.UTC(2017,8,9), 16434],
[ Date.UTC(2017,8,10), 14957],
[ Date.UTC(2017,8,11), 15695],
[ Date.UTC(2017,8,12), 15495],
[ Date.UTC(2017,8,13), 11848],
[ Date.UTC(2017,8,14), 9612],
[ Date.UTC(2017,8,15), 9765],
[ Date.UTC(2017,8,16), 11730],
[ Date.UTC(2017,8,17), 12932],
[ Date.UTC(2017,8,18), 12296],
[ Date.UTC(2017,8,19), 11230],
],
color: '#AA4643'
}
],
title: {
text: ''
},
credits: {
text: 'IT4Innovations 2017-11-14 14:14'
},
exporting: {
enabled: false
},
plotOptions: {
areaspline: {
fillOpacity: 0.5
},
pie: {
dataLabels: {
enabled: false
},
showInLegend: true
},
series: {
turboThreshold: 0
},
line: {
marker: {
enabled: false
}
}
},
xAxis: {
type: 'datetime',
title: {
text: 'Date',
style: {
color: '#000000'
}
}
},
yAxis: {
min: 0,
tickInterval: 1000,
title: {
text: 'Cores [-]',
style: {
color: '#000000'
}
}
},
}
"
</div>
</div>
<!-- -->
`GET `{.descname}`/api/v1/irregular-accounts-to-close`{.descname}[](#get--api-v1-irregular-accounts-to-close "Permalink to this definition"){.headerlink}
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
: Access to this service is restricted to just few source ipv4
addresses.
The special (e.g. training) account expires 31 days after the date
when the last project was finished. This service returns the list of
special accounts which are already after this the expiration date.
Response JSON Object:
- **login** (*string*) – account id
- **projectendtime** (*string*) – project end date
Status Codes:
- [200
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference
.external} – no error
- [405 Method Not
Allowed](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6){.reference
.external} – restricted access, your ipv4 address is not allowed
**Example request**:
<div class="highlight-console">
<div class="highlight">
curl -i https://scs.it4i.cz/api/v1/irregular-accounts-to-close
</div>
</div>
**Example response**:
<div class="highlight-http">
<div class="highlight">
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"login": "dd-01",
"projectendtime": "2009-09-19 23:59:59"
}
]
</div>
</div>
<!-- -->
`POST `{.descname}`/api/v1/it4ifree/`{.descname}[(]{.sig-paren}*login*[)]{.sig-paren}[](#post--api-v1-it4ifree-(login) "Permalink to this definition"){.headerlink}
: A service to check resources of the projects on which the account
participate. If the calculation run on 1 cpu core during 1 hour, it
consumes 1 core-hour from the project resources. However, some
calculations (or their placement) can be cheaper. Actual consumed
core-hours are reduced by a cheaping factor and then deduct from the
project resources. See
<https://docs.it4i.cz/salomon/resources-allocation-policy/#normalized-core-hours-nch>
for more details about so-called normalized core-hours. The json
response contains two parts:
> <div>
>
> - `me`{.docutils .literal} – data from projects, where the
> account has access
> - `me_as_pi`{.docutils .literal} – data from projects, where the
> account is PI (primary investigator)
>
> </div>
- **login** (*string*) – account id
- **it4ifreetoken** (*string*) – token
- **login** (*string*) – account id
- **pid** (*string*) – project id
- **pi\_login** (*string*) – account id which is PI
- **days\_left** (*string*) – days to the end of project,
`---`{.docutils .literal} if project is inactive or not yet
- **free** (*int*) – free core-hours which can be still consumed
- **total** (*int*) – total core-hours assigned to the project
- **used** (*int*) – actual consumed core-hours
- **used\_with\_factor** (*int*) – consumed normalized core-hours
- **used\_by\_me** (*int*) – core-hours consumed by the account
- **used\_by\_me\_with\_factor** (*int*) – normalized core-hours
- **corehours** (*int*) – core-hours consumed by the account
- **core\_hours\_with\_factor** (*int*) – normalized core-hours
consumed by the account
Status Codes:
- [200
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference
.external} – no error
- [405 Method Not
Allowed](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6){.reference
.external} – token does not match
<div class="highlight-console">
<div class="highlight">
curl -i -H "Content-Type:application/json" -X POST \
--data '{"login":"johnsm", "it4ifreetoken": "abc"}' \
https://scs.it4i.cz/api/v1/it4ifree/johnsm
<div class="highlight-http">
<div class="highlight">
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
HTTP/1.1 200 OK
Content-Type: application/json
{
"me": [
{
"days_left": "---",
"free": 17124,
"login": "johnsm",
"pid": "DD-13-6",
"total": 100000,
"used": 82876,
"used_by_me": 0,
"used_by_me_with_factor": 0,
"used_with_factor":82876
},
{
"days_left": "---",
"free": 0,
"login": "johnsm",
"pid": "DD-14-12",
"total": 1000,
"used": 8641,
"used_by_me": 0,
"used_by_me_with_factor": 0,
"used_with_factor": 8641
}
],
"me_as_pi": [
{
"core_hours": 82876,
"core_hours_with_factor": 82876,
"login":"abc",
"pi_login": "johnsm",
"pid": "DD-13-6"
},
{
"core_hours": 0,
"core_hours_with_factor": 0,
"login": "johnsm",
"pi_login": "johnsm",
"pid":"DD-13-6"
}
]
}
`GET `{.descname}`/api/v1/it4ifreetoken/`{.descname}[(]{.sig-paren}*login*[)]{.sig-paren}[](#get--api-v1-it4ifreetoken-(login) "Permalink to this definition"){.headerlink}
: Access to this service is restricted to just few source ipv4
addresses.
It returns free token for the account.
- [200
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference
.external} – no error
- [405 Method Not
Allowed](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6){.reference
.external} – restricted access, your ipv4 address is not allowed
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
<div class="highlight-console">
<div class="highlight">
curl -i https://scs.it4i.cz/api/v1/it4ifreetoken/johnsm
</div>
</div>
**Example response**:
<div class="highlight-http">
<div class="highlight">
HTTP/1.1 200 OK
Content-Type: application/json
{
"it4ifreetoken": "abc"
}
</div>
</div>
<!-- -->
`GET `{.descname}`/api/v1/motd/`{.descname}[(]{.sig-paren}*category*[)]{.sig-paren}[](#get--api-v1-motd-(category) "Permalink to this definition"){.headerlink}
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
: Returns SCS messages of the day.
Query Parameters:
- **notice** – returns only notice messages
- **important** – returns only important messages
- **all** – returns all messages
Status Codes:
- [200
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference
.external} – no error
- [405 Method Not
Allowed](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6){.reference
.external} – invalid requested query parameter
**Example request**:
<div class="highlight-console">
<div class="highlight">
curl -i https://scs.it4i.cz/api/v1/motd/notice
<div class="highlight-http">
<div class="highlight">
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"author": "svi47",
"category": "notice",
"created_at": "2017-10-12 11:44:51",
"dateEfficiency": "2017-10-12 11:41:00",
"dateExpiration": "2017-11-28 14:30:00",
"dateModification": "2017-10-12 13:44:51",
"deleted_at": null,
"id": 169,
"messageBody": "For more information about the course,
please visit its web page: https://goo.gl/cvFsFH",
"state": null,
"title": "Invitation to the Course Productivity Tools
for High Performance Computing (2017-11-27 to 2017-11-28)",
"typeMotd": null,
"updated_at": "2017-10-12 11:44:51"
}
]
`GET `{.descname}`/api/v1/ping`{.descname}[](#get--api-v1-ping "Permalink to this definition"){.headerlink}
--------------- -----------------------------------------------------------------------------------------------------------------
Status Codes: - [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference .external} – no error
--------------- -----------------------------------------------------------------------------------------------------------------