From aec3af955f7531579dabeb337e2c8b41d9f98a8b Mon Sep 17 00:00:00 2001 From: Marek Chrastina <marek.chrastina@vsb.cz> Date: Wed, 13 Dec 2017 10:02:40 +0100 Subject: [PATCH] new final test --- .gitlab-ci.yml | 2 +- docs.it4i/apidocs.md | 104 +++++++++++++++++++++++++++++++++++++++---- 2 files changed, 96 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9980b9919..a2147e7a3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,7 @@ docs: stage: test image: davidhrbac/docker-mdcheck:latest script: - - mdl -r ~MD013,~MD033,~MD014,~MD026,~MD037,~MD034 *.md docs.it4i + - mdl -r ~MD013,~MD033,~MD014,~MD026,~MD037 *.md docs.it4i two spaces: stage: test diff --git a/docs.it4i/apidocs.md b/docs.it4i/apidocs.md index d4138df57..7eecdf2a8 100644 --- a/docs.it4i/apidocs.md +++ b/docs.it4i/apidocs.md @@ -3,9 +3,9 @@ API Documentation Implements API for IT4I SCS Information System. -- api revision: `9eb0678f / 2017-12-08 11:06:12 +0100` -- api version: `0.9-11-g9eb0678` -- apidoc building date: `2017-12-12 08:50:03 +0100` +- api revision: `94b65742 / 2017-12-12 09:01:42 +0100` +- api version: `0.9-16-g94b6574` +- apidoc building date: `2017-12-13 09:59:31 +0100` Summary ------------------------------------------------------------------------------------- @@ -86,10 +86,15 @@ Summary </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><a href="#get--api-v1-quota-extra.csv-(system_name)" class="reference external">GET /api/v1/quota-extra.csv/(system_name)</a></td> <td>User extra quota</td> </tr> <tr class="even"> +<td> </td> +<td><a href="#get--api-v1-quota-extra-(system_name)" class="reference external">GET /api/v1/quota-extra/(system_name)</a></td> +<td> </td> +</tr> +<tr class="odd"> <td>version</td> <td><a href="#get--api-v1-version" class="reference external">GET /api/v1/version</a></td> <td>API version</td> @@ -260,7 +265,7 @@ Status Codes: **Example request**: - curl -i curl https://scs.it4i.cz/api/v1/dedicated-time/all + curl -i https://scs.it4i.cz/api/v1/dedicated-time/all **Example response**: @@ -652,7 +657,7 @@ 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 -<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> +<a href="https://docs.it4i.cz/salomon/resources-allocation-policy/#normalized-core-hours-nch" class="reference external">link</a> for more details about so-called normalized core-hours. The json response contains two parts: @@ -867,14 +872,95 @@ Status Codes: <!-- --> -<a name="get--api-v1-quota-extra" class="headerlink" title="Permalink to this definition"></a> - **GET /api/v1/quota-extra** +<a name="get--api-v1-quota-extra.csv-(system_name)" class="headerlink" title="Permalink to this definition"></a> + **GET /api/v1/quota-extra.csv/**(system\_name) + +Access to this service is restricted to just few source ipv4 addresses. + +Returns all accounts which have active filesystem quotas bigger than +standard. + +Available output data format: + +- json: use + <a href="#get--api-v1-quota-extra-(system_name)" class="reference external">quota-extra</a> +- csv (tab separated): use + <a href="#get--api-v1-quota-extra.csv-(system_name)" class="reference external">quota-extra.csv</a> + +Query Parameters: + + + +- **all** – returns accounts for all clusters +- **salomon** – returns accounts just for salomon cluster +- **anselm** – returns accounts just for anselm cluster + +Response JSON Object: + + + +- **login** (*string*) – account id +- **system\_name** (*string*) – computer system name +- **filesystem** (*string*) – folder name +- **quota\_gb** (*int*) – disk usage quota for in GB +- **quota\_ki** (*int*) – quota for number of files in thousands +- **expiration** (*string*) – expiration date +- **description** (*string*) – reason for allocation extra quotas + +Status Codes: + +- <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1" class="reference external">200 OK</a> + – no error +- <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6" class="reference external">405 Method Not Allowed</a> + – restricted access, your ipv4 is not allowed + +**Example request**: + + curl -i https://scs.it4i.cz/api/v1/quota-extra/all + +**Example response**: + + HTTP/1.1 200 OK + Content-Type: application/json + + [ + { + "login": "johnsm", + "system_name": "anselm", + "filesystem": "HOME", + "quota_gb": 500, + "quota_ki": 1500, + "expiration": "2017-12-31", + "description": "build SW" + + } + ] + +<!-- --> + +<a name="get--api-v1-quota-extra-(system_name)" class="headerlink" title="Permalink to this definition"></a> + **GET /api/v1/quota-extra/**(system\_name) Access to this service is restricted to just few source ipv4 addresses. Returns all accounts which have active filesystem quotas bigger than standard. +Available output data format: + +- json: use + <a href="#get--api-v1-quota-extra-(system_name)" class="reference external">quota-extra</a> +- csv (tab separated): use + <a href="#get--api-v1-quota-extra.csv-(system_name)" class="reference external">quota-extra.csv</a> + +Query Parameters: + + + +- **all** – returns accounts for all clusters +- **salomon** – returns accounts just for salomon cluster +- **anselm** – returns accounts just for anselm cluster + Response JSON Object: @@ -896,7 +982,7 @@ Status Codes: **Example request**: - curl -i curl https://scs.it4i.cz/api/v1/quota-extra + curl -i https://scs.it4i.cz/api/v1/quota-extra/all **Example response**: -- GitLab