Skip to content
Snippets Groups Projects
Commit e081e92a authored by Marek Chrastina's avatar Marek Chrastina
Browse files

test manual strict md docs.

parent fac5cd37
No related branches found
No related tags found
6 merge requests!368Update prace.md to document the change from qprace to qprod as the default...,!367Update prace.md to document the change from qprace to qprod as the default...,!366Update prace.md to document the change from qprace to qprod as the default...,!323extended-acls-storage-section,!196Master,!178Apidocs
<div class="document"> API Documentation<a href="#module-scs_api.server" class="headerlink" title="Permalink to this headline">¶</a>
=============================================================================================================
<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. Implements API for IT4I SCS Information System.
- api revision: `9eb0678f / 2017-12-08 11:06:12 +0100`{.docutils - api revision: `9eb0678f / 2017-12-08 11:06:12 +0100`
.literal} - api version: `0.9-11-g9eb0678`
- api version: `0.9-11-g9eb0678`{.docutils .literal} - apidoc building date: `2017-12-11 09:14:53 +0100`
- apidoc building date: `2017-12-08 16:05:36 +0100`{.docutils
.literal} Summary<a href="#summary" class="headerlink" title="Permalink to this headline">¶</a>
-------------------------------------------------------------------------------------
<div id="summary" class="section">
<table>
Summary[](#summary "Permalink to this headline"){.headerlink} <colgroup>
-------------------------------------------------------------- <col width="20%" />
<col width="40%" />
Resource Operation Description <col width="40%" />
------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ </colgroup>
account-expire [GET /api/v1/account-expire/(login)](#get--api-v1-account-expire-(login)){.reference .external} Account expiration date <thead>
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 <tr class="header">
check-access [POST /api/v1/check-access](#post--api-v1-check-access){.reference .external} Access check to queue <th>Resource</th>
dedicated-time [GET /api/v1/dedicated-time/(cluster\_type)](#get--api-v1-dedicated-time-(cluster_type)){.reference .external} HPC dedicated time <th>Operation</th>
graph\_affiliation\_stats [GET /api/v1/graph\_affiliation\_stats](#get--api-v1-graph_affiliation_stats){.reference .external} Graph affiliation statistics <th>Description</th>
graph\_research\_area\_stats [GET /api/v1/graph\_research\_area\_stats](#get--api-v1-graph_research_area_stats){.reference .external} Graph research area statistics </tr>
graph\_utilization\_stats [GET /api/v1/graph\_utilization\_stats](#get--api-v1-graph_utilization_stats){.reference .external} Graph utilization statistics </thead>
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 <tbody>
it4ifree [POST /api/v1/it4ifree/(login)](#post--api-v1-it4ifree-(login)){.reference .external} Free account resources <tr class="odd">
it4ifreetoken [GET /api/v1/it4ifreetoken/(login)](#get--api-v1-it4ifreetoken-(login)){.reference .external} Free account token <td>account-expire</td>
motd [GET /api/v1/motd/(category)](#get--api-v1-motd-(category)){.reference .external} SCS messages of the day <td><a href="#get--api-v1-account-expire-(login)" class="reference external">GET /api/v1/account-expire/(login)</a></td>
ping [GET /api/v1/ping](#get--api-v1-ping){.reference .external} Connection test <td>Account expiration date</td>
quota-extra [GET /api/v1/quota-extra](#get--api-v1-quota-extra){.reference .external} User extra quota </tr>
version [GET /api/v1/version](#get--api-v1-version){.reference .external} API version <tr class="even">
<td>accounts-to-close</td>
</div> <td><a href="#get--api-v1-accounts-to-close-(category)" class="reference external">GET /api/v1/accounts-to-close/(category)</a></td>
<td>Standard accounts close to expiration date</td>
<div id="api-details" class="section"> </tr>
<tr class="odd">
API Details[](#api-details "Permalink to this headline"){.headerlink} <td>check-access</td>
---------------------------------------------------------------------- <td><a href="#post--api-v1-check-access" class="reference external">POST /api/v1/check-access</a></td>
<td>Access check to queue</td>
`GET `{.descname}`/api/v1/account-expire/`{.descname}[(]{.sig-paren}*login*[)]{.sig-paren}[](#get--api-v1-account-expire-(login) "Permalink to this definition"){.headerlink} </tr>
<tr class="even">
: Access to this service is restricted to just few source ipv4 <td>dedicated-time</td>
addresses. <td><a href="#get--api-v1-dedicated-time-(cluster_type)" class="reference external">GET /api/v1/dedicated-time/(cluster_type)</a></td>
<td>HPC dedicated time</td>
It returns the account expiration date. The account may participates </tr>
on several projects. If all projects were already finished, there <tr class="odd">
will come a time when the account expires as well. It will happen <td>graph_affiliation_stats</td>
after: <td><a href="#get--api-v1-graph_affiliation_stats" class="reference external">GET /api/v1/graph_affiliation_stats</a></td>
<td>Graph affiliation statistics</td>
> <div> </tr>
> <tr class="even">
> - 365 days - for all standard accounts <td>graph_research_area_stats</td>
> - 31 days - for special (e.g. training) accounts <td><a href="#get--api-v1-graph_research_area_stats" class="reference external">GET /api/v1/graph_research_area_stats</a></td>
> <td>Graph research area statistics</td>
> </div> </tr>
<tr class="odd">
<td>graph_utilization_stats</td>
<td><a href="#get--api-v1-graph_utilization_stats" class="reference external">GET /api/v1/graph_utilization_stats</a></td>
<td>Graph utilization statistics</td>
</tr>
<tr class="even">
<td>irregular-accounts-to-close</td>
<td><a href="#get--api-v1-irregular-accounts-to-close" class="reference external">GET /api/v1/irregular-accounts-to-close</a></td>
<td>Special accounts close to expiration date</td>
</tr>
<tr class="odd">
<td>it4ifree</td>
<td><a href="#post--api-v1-it4ifree-(login)" class="reference external">POST /api/v1/it4ifree/(login)</a></td>
<td>Free account resources</td>
</tr>
<tr class="even">
<td>it4ifreetoken</td>
<td><a href="#get--api-v1-it4ifreetoken-(login)" class="reference external">GET /api/v1/it4ifreetoken/(login)</a></td>
<td>Free account token</td>
</tr>
<tr class="odd">
<td>motd</td>
<td><a href="#get--api-v1-motd-(category)" class="reference external">GET /api/v1/motd/(category)</a></td>
<td>SCS messages of the day</td>
</tr>
<tr class="even">
<td>ping</td>
<td><a href="#get--api-v1-ping" class="reference external">GET /api/v1/ping</a></td>
<td>Connection test</td>
</tr>
<tr class="odd">
<td>quota-extra</td>
<td><a href="#get--api-v1-quota-extra" class="reference external">GET /api/v1/quota-extra</a></td>
<td>User extra quota</td>
</tr>
<tr class="even">
<td>version</td>
<td><a href="#get--api-v1-version" class="reference external">GET /api/v1/version</a></td>
<td>API version</td>
</tr>
</tbody>
</table>
API Details<a href="#api-details" class="headerlink" title="Permalink to this headline">¶</a>
---------------------------------------------------------------------------------------------
`GET /api/v1/account-expire/`<span class="sig-paren">(</span>*login*<span class="sig-paren">)</span><a href="#get--api-v1-account-expire-(login)" class="headerlink" title="Permalink to this definition"></a>
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:
- 365 days - for all standard accounts
- 31 days - for special (e.g. training) accounts
Query Parameters: Query Parameters:
...@@ -72,31 +118,17 @@ API Details[](#api-details "Permalink to this headline"){.headerlink} ...@@ -72,31 +118,17 @@ API Details[](#api-details "Permalink to this headline"){.headerlink}
Status Codes: Status Codes:
- [200 - <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1" class="reference external">200 OK</a>
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference – no error
.external} – no error - <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6" class="reference external">405 Method Not Allowed</a>
- [405 Method Not – restricted access, your ipv4 is not allowed
Allowed](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6){.reference
.external} – restricted access, your ipv4 is not allowed
**Example request**: **Example request**:
<div class="highlight-console">
<div class="highlight">
curl -i https://scs.it4i.cz/api/v1/account-expire/chr0139 curl -i https://scs.it4i.cz/api/v1/account-expire/chr0139
</div>
</div>
**Example response**: **Example response**:
<div class="highlight-http">
<div class="highlight">
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/json Content-Type: application/json
...@@ -107,21 +139,15 @@ API Details[](#api-details "Permalink to this headline"){.headerlink} ...@@ -107,21 +139,15 @@ API Details[](#api-details "Permalink to this headline"){.headerlink}
} }
] ]
</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} `GET /api/v1/accounts-to-close/`<span class="sig-paren">(</span>*category*<span class="sig-paren">)</span><a href="#get--api-v1-accounts-to-close-(category)" class="headerlink" title="Permalink to this definition"></a>
Access to this service is restricted to just few source ipv4 addresses.
: Access to this service is restricted to just few source ipv4
addresses.
The standard account expires 365 days after the date when the last The standard account expires 365 days after the date when the last
project was finished. This service returns the list of standard project was finished. This service returns the list of standard accounts
accounts which are close to the expiration date. The closeness time which are close to the expiration date. The closeness time interval
interval depends on requested parameter. depends on requested parameter.
Query Parameters: Query Parameters:
...@@ -143,31 +169,17 @@ API Details[](#api-details "Permalink to this headline"){.headerlink} ...@@ -143,31 +169,17 @@ API Details[](#api-details "Permalink to this headline"){.headerlink}
Status Codes: Status Codes:
- [200 - <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1" class="reference external">200 OK</a>
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference – no error
.external} – no error - <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6" class="reference external">405 Method Not Allowed</a>
- [405 Method Not – restricted access, your ipv4 address is not allowed
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**: **Example request**:
<div class="highlight-console">
<div class="highlight">
curl -i https://scs.it4i.cz/api/v1/accounts-to-close/second curl -i https://scs.it4i.cz/api/v1/accounts-to-close/second
</div>
</div>
**Example response**: **Example response**:
<div class="highlight-http">
<div class="highlight">
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/json Content-Type: application/json
...@@ -180,16 +192,11 @@ API Details[](#api-details "Permalink to this headline"){.headerlink} ...@@ -180,16 +192,11 @@ API Details[](#api-details "Permalink to this headline"){.headerlink}
} }
] ]
</div>
</div>
<!-- --> <!-- -->
`POST `{.descname}`/api/v1/check-access`{.descname}[](#post--api-v1-check-access "Permalink to this definition"){.headerlink} `POST /api/v1/check-access`<a href="#post--api-v1-check-access" class="headerlink" title="Permalink to this definition"></a>
A service to check if account and/or related project has the access to
: A service to check if account and/or related project has the access specified queue.
to specified queue.
Request JSON Object: Request JSON Object:
...@@ -202,45 +209,27 @@ API Details[](#api-details "Permalink to this headline"){.headerlink} ...@@ -202,45 +209,27 @@ API Details[](#api-details "Permalink to this headline"){.headerlink}
Status Codes: Status Codes:
- [200 - <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1" class="reference external">200 OK</a>
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference – no error
.external} – no error
**Example request**: **Example request**:
<div class="highlight-console">
<div class="highlight">
curl -i -H "Content-Type:application/json" -X POST \ curl -i -H "Content-Type:application/json" -X POST \
--data '{"pid":"DD-13-5","login":"johnsm","queue":"qfat"}' \ --data '{"pid":"DD-13-5","login":"johnsm","queue":"qfat"}' \
https://scs.it4i.cz/api/v1/check-access https://scs.it4i.cz/api/v1/check-access
</div>
</div>
**Example response**: **Example response**:
<div class="highlight-http">
<div class="highlight">
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/json Content-Type: application/json
"OK Access granted for regular queue." "OK Access granted for regular queue."
</div>
</div>
<!-- --> <!-- -->
`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} `GET /api/v1/dedicated-time/`<span class="sig-paren">(</span>*cluster\_type*<span class="sig-paren">)</span><a href="#get--api-v1-dedicated-time-(cluster_type)" class="headerlink" title="Permalink to this definition"></a>
Returns list of times dedicated for HPC maintainance. It is not possible
: Returns list of times dedicated for HPC maintainance. It is not to use HPC services during maintainance.
possible to use HPC services during maintainance.
Query Parameters: Query Parameters:
...@@ -249,38 +238,24 @@ API Details[](#api-details "Permalink to this headline"){.headerlink} ...@@ -249,38 +238,24 @@ API Details[](#api-details "Permalink to this headline"){.headerlink}
- **all** – returns all dedicated times for all clusters - **all** – returns all dedicated times for all clusters
- **salomon** – returns all times just for salomon cluster - **salomon** – returns all times just for salomon cluster
- **anselm** – returns all times just for anselm cluster - **anselm** – returns all times just for anselm cluster
- **active** – returns dedicated times for all clusters which are - **active** – returns dedicated times for all clusters which are now
now active active
- **planned** – returns dedicated times for all clusters which are - **planned** – returns dedicated times for all clusters which are now
now active or scheduled in the future active or scheduled in the future
Status Codes: Status Codes:
- [200 - <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1" class="reference external">200 OK</a>
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference – no error
.external} – no error - <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6" class="reference external">405 Method Not Allowed</a>
- [405 Method Not – invalid requested query parameter
Allowed](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6){.reference
.external} – invalid requested query parameter
**Example request**: **Example request**:
<div class="highlight-console">
<div class="highlight">
curl -i curl https://scs.it4i.cz/api/v1/dedicated-time/all curl -i curl https://scs.it4i.cz/api/v1/dedicated-time/all
</div>
</div>
**Example response**: **Example response**:
<div class="highlight-http">
<div class="highlight">
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/json Content-Type: application/json
...@@ -293,16 +268,10 @@ API Details[](#api-details "Permalink to this headline"){.headerlink} ...@@ -293,16 +268,10 @@ API Details[](#api-details "Permalink to this headline"){.headerlink}
} }
] ]
</div>
</div>
<!-- --> <!-- -->
`GET `{.descname}`/api/v1/graph_affiliation_stats`{.descname}[](#get--api-v1-graph_affiliation_stats "Permalink to this definition"){.headerlink} `GET /api/v1/graph_affiliation_stats`<a href="#get--api-v1-graph_affiliation_stats" class="headerlink" title="Permalink to this definition"></a>
Access to this service is restricted to just few source ipv4 addresses.
: 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 It returns graph data useful to plot statistics of using HPC by some
affiliations. affiliations.
...@@ -317,32 +286,18 @@ API Details[](#api-details "Permalink to this headline"){.headerlink} ...@@ -317,32 +286,18 @@ API Details[](#api-details "Permalink to this headline"){.headerlink}
Status Codes: Status Codes:
- [200 - <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1" class="reference external">200 OK</a>
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference – no error
.external} – no error - <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6" class="reference external">405 Method Not Allowed</a>
- [405 Method Not – restricted access, your ipv4 address is not allowed
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**: **Example request**:
<div class="highlight-console">
<div class="highlight">
curl -i -X GET --data height=50 -d sizepct=50 \ curl -i -X GET --data height=50 -d sizepct=50 \
-G https://scs.it4i.cz/api/v1/graph_affiliation_stats -G https://scs.it4i.cz/api/v1/graph_affiliation_stats
</div>
</div>
**Example response**: **Example response**:
<div class="highlight-http">
<div class="highlight">
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/json Content-Type: application/json
...@@ -399,19 +354,13 @@ API Details[](#api-details "Permalink to this headline"){.headerlink} ...@@ -399,19 +354,13 @@ API Details[](#api-details "Permalink to this headline"){.headerlink}
} }
" "
</div>
</div>
<!-- --> <!-- -->
`GET `{.descname}`/api/v1/graph_research_area_stats`{.descname}[](#get--api-v1-graph_research_area_stats "Permalink to this definition"){.headerlink} `GET /api/v1/graph_research_area_stats`<a href="#get--api-v1-graph_research_area_stats" class="headerlink" title="Permalink to this definition"></a>
Access to this service is restricted to just few source ipv4 addresses.
: Access to this service is restricted to just few source ipv4 It returns graph data useful to plot statistics of using HPC by various
addresses. science fields.
It returns graph data useful to plot statistics of using HPC by
various science fields.
Query Parameters: Query Parameters:
...@@ -423,31 +372,17 @@ API Details[](#api-details "Permalink to this headline"){.headerlink} ...@@ -423,31 +372,17 @@ API Details[](#api-details "Permalink to this headline"){.headerlink}
Status Codes: Status Codes:
- [200 - <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1" class="reference external">200 OK</a>
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference – no error
.external} – no error - <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6" class="reference external">405 Method Not Allowed</a>
- [405 Method Not – restricted access, your ipv4 address is not allowed
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**: **Example request**:
<div class="highlight-console">
<div class="highlight">
curl -i -X GET -G https://scs.it4i.cz/api/v1/graph_research_area_stats curl -i -X GET -G https://scs.it4i.cz/api/v1/graph_research_area_stats
</div>
</div>
**Example response**: **Example response**:
<div class="highlight-http">
<div class="highlight">
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/json Content-Type: application/json
...@@ -504,19 +439,13 @@ API Details[](#api-details "Permalink to this headline"){.headerlink} ...@@ -504,19 +439,13 @@ API Details[](#api-details "Permalink to this headline"){.headerlink}
} }
" "
</div>
</div>
<!-- --> <!-- -->
`GET `{.descname}`/api/v1/graph_utilization_stats`{.descname}[](#get--api-v1-graph_utilization_stats "Permalink to this definition"){.headerlink} `GET /api/v1/graph_utilization_stats`<a href="#get--api-v1-graph_utilization_stats" class="headerlink" title="Permalink to this definition"></a>
Access to this service is restricted to just few source ipv4 addresses.
: Access to this service is restricted to just few source ipv4 It returns graph data to plot statistics of HPC week utilization during
addresses. last 100 days.
It returns graph data to plot statistics of HPC week utilization
during last 100 days.
Query Parameters: Query Parameters:
...@@ -528,31 +457,17 @@ API Details[](#api-details "Permalink to this headline"){.headerlink} ...@@ -528,31 +457,17 @@ API Details[](#api-details "Permalink to this headline"){.headerlink}
Status Codes: Status Codes:
- [200 - <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1" class="reference external">200 OK</a>
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference – no error
.external} – no error - <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6" class="reference external">405 Method Not Allowed</a>
- [405 Method Not – restricted access, your ipv4 address is not allowed
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**: **Example request**:
<div class="highlight-console">
<div class="highlight">
curl -i -X GET -G https://scs.it4i.cz/api/v1/graph_utilization_stats curl -i -X GET -G https://scs.it4i.cz/api/v1/graph_utilization_stats
</div>
</div>
**Example response**: **Example response**:
<div class="highlight-http">
<div class="highlight">
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/json Content-Type: application/json
...@@ -671,20 +586,14 @@ API Details[](#api-details "Permalink to this headline"){.headerlink} ...@@ -671,20 +586,14 @@ API Details[](#api-details "Permalink to this headline"){.headerlink}
} }
" "
</div>
</div>
<!-- --> <!-- -->
`GET `{.descname}`/api/v1/irregular-accounts-to-close`{.descname}[](#get--api-v1-irregular-accounts-to-close "Permalink to this definition"){.headerlink} `GET /api/v1/irregular-accounts-to-close`<a href="#get--api-v1-irregular-accounts-to-close" class="headerlink" title="Permalink to this definition"></a>
Access to this service is restricted to just few source ipv4 addresses.
: Access to this service is restricted to just few source ipv4
addresses.
The special (e.g. training) account expires 31 days after the date The special (e.g. training) account expires 31 days after the date when
when the last project was finished. This service returns the list of the last project was finished. This service returns the list of special
special accounts which are already after this the expiration date. accounts which are already after this the expiration date.
Response JSON Object: Response JSON Object:
...@@ -695,31 +604,17 @@ API Details[](#api-details "Permalink to this headline"){.headerlink} ...@@ -695,31 +604,17 @@ API Details[](#api-details "Permalink to this headline"){.headerlink}
Status Codes: Status Codes:
- [200 - <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1" class="reference external">200 OK</a>
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference – no error
.external} – no error - <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6" class="reference external">405 Method Not Allowed</a>
- [405 Method Not – restricted access, your ipv4 address is not allowed
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**: **Example request**:
<div class="highlight-console">
<div class="highlight">
curl -i https://scs.it4i.cz/api/v1/irregular-accounts-to-close curl -i https://scs.it4i.cz/api/v1/irregular-accounts-to-close
</div>
</div>
**Example response**: **Example response**:
<div class="highlight-http">
<div class="highlight">
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/json Content-Type: application/json
...@@ -730,32 +625,22 @@ API Details[](#api-details "Permalink to this headline"){.headerlink} ...@@ -730,32 +625,22 @@ API Details[](#api-details "Permalink to this headline"){.headerlink}
} }
] ]
</div>
</div>
<!-- --> <!-- -->
`POST `{.descname}`/api/v1/it4ifree/`{.descname}[(]{.sig-paren}*login*[)]{.sig-paren}[](#post--api-v1-it4ifree-(login) "Permalink to this definition"){.headerlink} `POST /api/v1/it4ifree/`<span class="sig-paren">(</span>*login*<span class="sig-paren">)</span><a href="#post--api-v1-it4ifree-(login)" class="headerlink" title="Permalink to this definition"></a>
A service to check resources of the projects on which the account
: 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 participate. If the calculation run on 1 cpu core during 1 hour, it
consumes 1 core-hour from the project resources. However, some consumes 1 core-hour from the project resources. However, some
calculations (or their placement) can be cheaper. Actual consumed calculations (or their placement) can be cheaper. Actual consumed
core-hours are reduced by a cheaping factor and then deduct from the core-hours are reduced by a cheaping factor and then deduct from the
project resources. See project resources. See
<https://docs.it4i.cz/salomon/resources-allocation-policy/#normalized-core-hours-nch> <a href="https://docs.it4i.cz/salomon/resources-allocation-policy/#normalized-core-hours-nch" class="uri" class="reference external">https://docs.it4i.cz/salomon/resources-allocation-policy/#normalized-core-hours-nch</a>
for more details about so-called normalized core-hours. The json for more details about so-called normalized core-hours. The json
response contains two parts: response contains two parts:
> <div> - `me` – data from projects, where the account has access
> - `me_as_pi` – data from projects, where the account is PI (primary
> - `me`{.docutils .literal} – data from projects, where the investigator)
> account has access
> - `me_as_pi`{.docutils .literal} – data from projects, where the
> account is PI (primary investigator)
>
> </div>
Request JSON Object: Request JSON Object:
...@@ -771,9 +656,8 @@ API Details[](#api-details "Permalink to this headline"){.headerlink} ...@@ -771,9 +656,8 @@ API Details[](#api-details "Permalink to this headline"){.headerlink}
- **login** (*string*) – account id - **login** (*string*) – account id
- **pid** (*string*) – project id - **pid** (*string*) – project id
- **pi\_login** (*string*) – account id which is PI - **pi\_login** (*string*) – account id which is PI
- **days\_left** (*string*) – days to the end of project, - **days\_left** (*string*) – days to the end of project, `---` if
`---`{.docutils .literal} if project is inactive or not yet project is inactive or not yet started
started
- **free** (*int*) – free core-hours which can be still consumed - **free** (*int*) – free core-hours which can be still consumed
- **total** (*int*) – total core-hours assigned to the project - **total** (*int*) – total core-hours assigned to the project
- **used** (*int*) – actual consumed core-hours - **used** (*int*) – actual consumed core-hours
...@@ -787,33 +671,19 @@ API Details[](#api-details "Permalink to this headline"){.headerlink} ...@@ -787,33 +671,19 @@ API Details[](#api-details "Permalink to this headline"){.headerlink}
Status Codes: Status Codes:
- [200 - <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1" class="reference external">200 OK</a>
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference – no error
.external} – no error - <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6" class="reference external">405 Method Not Allowed</a>
- [405 Method Not – token does not match
Allowed](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6){.reference
.external} – token does not match
**Example request**: **Example request**:
<div class="highlight-console">
<div class="highlight">
curl -i -H "Content-Type:application/json" -X POST \ curl -i -H "Content-Type:application/json" -X POST \
--data '{"login":"johnsm", "it4ifreetoken": "abc"}' \ --data '{"login":"johnsm", "it4ifreetoken": "abc"}' \
https://scs.it4i.cz/api/v1/it4ifree/johnsm https://scs.it4i.cz/api/v1/it4ifree/johnsm
</div>
</div>
**Example response**: **Example response**:
<div class="highlight-http">
<div class="highlight">
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/json Content-Type: application/json
...@@ -860,16 +730,10 @@ API Details[](#api-details "Permalink to this headline"){.headerlink} ...@@ -860,16 +730,10 @@ API Details[](#api-details "Permalink to this headline"){.headerlink}
] ]
} }
</div>
</div>
<!-- --> <!-- -->
`GET `{.descname}`/api/v1/it4ifreetoken/`{.descname}[(]{.sig-paren}*login*[)]{.sig-paren}[](#get--api-v1-it4ifreetoken-(login) "Permalink to this definition"){.headerlink} `GET /api/v1/it4ifreetoken/`<span class="sig-paren">(</span>*login*<span class="sig-paren">)</span><a href="#get--api-v1-it4ifreetoken-(login)" class="headerlink" title="Permalink to this definition"></a>
Access to this service is restricted to just few source ipv4 addresses.
: Access to this service is restricted to just few source ipv4
addresses.
It returns free token for the account. It returns free token for the account.
...@@ -881,31 +745,17 @@ API Details[](#api-details "Permalink to this headline"){.headerlink} ...@@ -881,31 +745,17 @@ API Details[](#api-details "Permalink to this headline"){.headerlink}
Status Codes: Status Codes:
- [200 - <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1" class="reference external">200 OK</a>
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference – no error
.external} – no error - <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6" class="reference external">405 Method Not Allowed</a>
- [405 Method Not – restricted access, your ipv4 address is not allowed
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**: **Example request**:
<div class="highlight-console">
<div class="highlight">
curl -i https://scs.it4i.cz/api/v1/it4ifreetoken/johnsm curl -i https://scs.it4i.cz/api/v1/it4ifreetoken/johnsm
</div>
</div>
**Example response**: **Example response**:
<div class="highlight-http">
<div class="highlight">
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/json Content-Type: application/json
...@@ -913,15 +763,10 @@ API Details[](#api-details "Permalink to this headline"){.headerlink} ...@@ -913,15 +763,10 @@ API Details[](#api-details "Permalink to this headline"){.headerlink}
"it4ifreetoken": "abc" "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} `GET /api/v1/motd/`<span class="sig-paren">(</span>*category*<span class="sig-paren">)</span><a href="#get--api-v1-motd-(category)" class="headerlink" title="Permalink to this definition"></a>
Returns SCS messages of the day.
: Returns SCS messages of the day.
Query Parameters: Query Parameters:
...@@ -933,31 +778,17 @@ API Details[](#api-details "Permalink to this headline"){.headerlink} ...@@ -933,31 +778,17 @@ API Details[](#api-details "Permalink to this headline"){.headerlink}
Status Codes: Status Codes:
- [200 - <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1" class="reference external">200 OK</a>
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference – no error
.external} – no error - <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6" class="reference external">405 Method Not Allowed</a>
- [405 Method Not – invalid requested query parameter
Allowed](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6){.reference
.external} – invalid requested query parameter
**Example request**: **Example request**:
<div class="highlight-console">
<div class="highlight">
curl -i https://scs.it4i.cz/api/v1/motd/notice curl -i https://scs.it4i.cz/api/v1/motd/notice
</div>
</div>
**Example response**: **Example response**:
<div class="highlight-http">
<div class="highlight">
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/json Content-Type: application/json
...@@ -981,38 +812,28 @@ API Details[](#api-details "Permalink to this headline"){.headerlink} ...@@ -981,38 +812,28 @@ API Details[](#api-details "Permalink to this headline"){.headerlink}
} }
] ]
</div>
</div>
<!-- --> <!-- -->
`GET `{.descname}`/api/v1/ping`{.descname}[](#get--api-v1-ping "Permalink to this definition"){.headerlink} `GET /api/v1/ping`<a href="#get--api-v1-ping" class="headerlink" title="Permalink to this definition"></a>
A service for testing connection to API.
: A service for testing connection to API. <table>
<tbody>
--------------- ----------------------------------------------------------------------------------------------------------------- <tr class="odd">
Status Codes: - [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference .external} – no error <td>Status Codes:</td>
--------------- ----------------------------------------------------------------------------------------------------------------- <td><ul>
<li><a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1" class="reference external">200 OK</a> – no error</li>
</ul></td>
</tr>
</tbody>
</table>
**Example request**: **Example request**:
<div class="highlight-console">
<div class="highlight">
curl -i https://scs.it4i.cz/api/v1/ping curl -i https://scs.it4i.cz/api/v1/ping
</div>
</div>
**Example response**: **Example response**:
<div class="highlight-http">
<div class="highlight">
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/json Content-Type: application/json
...@@ -1020,16 +841,10 @@ API Details[](#api-details "Permalink to this headline"){.headerlink} ...@@ -1020,16 +841,10 @@ API Details[](#api-details "Permalink to this headline"){.headerlink}
"message": "pong" "message": "pong"
} }
</div>
</div>
<!-- --> <!-- -->
`GET `{.descname}`/api/v1/quota-extra`{.descname}[](#get--api-v1-quota-extra "Permalink to this definition"){.headerlink} `GET /api/v1/quota-extra`<a href="#get--api-v1-quota-extra" class="headerlink" title="Permalink to this definition"></a>
Access to this service is restricted to just few source ipv4 addresses.
: Access to this service is restricted to just few source ipv4
addresses.
Returns all accounts which have active filesystem quotas bigger than Returns all accounts which have active filesystem quotas bigger than
standard. standard.
...@@ -1048,31 +863,17 @@ API Details[](#api-details "Permalink to this headline"){.headerlink} ...@@ -1048,31 +863,17 @@ API Details[](#api-details "Permalink to this headline"){.headerlink}
Status Codes: Status Codes:
- [200 - <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1" class="reference external">200 OK</a>
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference – no error
.external} – no error - <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6" class="reference external">405 Method Not Allowed</a>
- [405 Method Not – restricted access, your ipv4 is not allowed
Allowed](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6){.reference
.external} – restricted access, your ipv4 is not allowed
**Example request**: **Example request**:
<div class="highlight-console">
<div class="highlight">
curl -i curl https://scs.it4i.cz/api/v1/quota-extra curl -i curl https://scs.it4i.cz/api/v1/quota-extra
</div>
</div>
**Example response**: **Example response**:
<div class="highlight-http">
<div class="highlight">
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/json Content-Type: application/json
...@@ -1089,38 +890,28 @@ API Details[](#api-details "Permalink to this headline"){.headerlink} ...@@ -1089,38 +890,28 @@ API Details[](#api-details "Permalink to this headline"){.headerlink}
} }
] ]
</div>
</div>
<!-- --> <!-- -->
`GET `{.descname}`/api/v1/version`{.descname}[](#get--api-v1-version "Permalink to this definition"){.headerlink} `GET /api/v1/version`<a href="#get--api-v1-version" class="headerlink" title="Permalink to this definition"></a>
Returns basic information about API.
: Returns basic information about API.
--------------- ----------------------------------------------------------------------------------------------------------------- <table>
Status Codes: - [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference .external} – no error <tbody>
--------------- ----------------------------------------------------------------------------------------------------------------- <tr class="odd">
<td>Status Codes:</td>
<td><ul>
<li><a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1" class="reference external">200 OK</a> – no error</li>
</ul></td>
</tr>
</tbody>
</table>
**Example request**: **Example request**:
<div class="highlight-console">
<div class="highlight">
curl -i https://scs.it4i.cz/api/v1/version curl -i https://scs.it4i.cz/api/v1/version
</div>
</div>
**Example response**: **Example response**:
<div class="highlight-http">
<div class="highlight">
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/json Content-Type: application/json
...@@ -1130,28 +921,6 @@ API Details[](#api-details "Permalink to this headline"){.headerlink} ...@@ -1130,28 +921,6 @@ API Details[](#api-details "Permalink to this headline"){.headerlink}
"version": "0.8.2-34-gceac8aa" "version": "0.8.2-34-gceac8aa"
} }
</div>
</div>
</div>
</div>
</div>
</div>
<div class="clearer">
</div>
</div>
<div class="footer">
©2017, IT4Innovations. | Powered by [Sphinx ©2017, IT4Innovations. | Powered by [Sphinx
1.5.6](http://sphinx-doc.org/) & [Alabaster 1.5.6](http://sphinx-doc.org/) & [Alabaster
0.7.10](https://github.com/bitprophet/alabaster) 0.7.10](https://github.com/bitprophet/alabaster)
</div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment