diff --git a/scs_api.server_public.md b/scs_api.server_public.md index d3abb9dd37a8788667f07d90f03c2f0290f6fe80..6e86b247fb6b2c88f2eaa4a7a196325d28cbf3d7 100644 --- a/scs_api.server_public.md +++ b/scs_api.server_public.md @@ -15,11 +15,11 @@ is 6 requests per minute. Exceeding the limit will lead to your IP address being temporarily blocked from making further requests. The block will automatically be lifted by waiting an hour. -- api revision: `5a830e3f / 2021-03-22 17:37:01 +0100` +- api revision: `5c6c88e9 / 2021-03-22 18:20:16 +0100` -- api version: `0.9-271-g5a830e3` +- api version: `0.9-272-g5c6c88e` -- apidoc building date: `2021-03-22 16:55:30 +0000` +- apidoc building date: `2021-03-22 17:30:47 +0000` Summary ------------------------------------------------------------------------------------- @@ -74,6 +74,11 @@ Summary <td><p>Connection test</p></td> </tr> <tr class="even"> +<td><p>user-fs-usage</p></td> +<td><p><a href="#post--api-v1-user-fs-usage" class="reference external">POST /api/v1/user-fs-usage</a></p></td> +<td><p>Shows user filesystem usage</p></td> +</tr> +<tr class="odd"> <td><p>version</p></td> <td><p><a href="#get--api-v1-version" class="reference external">GET /api/v1/version</a></p></td> <td><p>API version</p></td> @@ -193,8 +198,8 @@ Status Codes A service to show filesystem usage. -Terminal implementation is available at -<a href="https://pypi.org/project/it4i.portal.clients/#it4ifsusage" class="reference external">it4ifsusage</a> +Terminal implementation is available at [<span id="id3" +class="problematic">it4ifsusage\_</span>](#id2) Request JSON Object @@ -494,6 +499,70 @@ Status Codes "message": "pong" } +<a name="post--api-v1-user-fs-usage" class="headerlink" title="Permalink to this definition"></a> + **POST /api/v1/user-fs-usage** + +A service to show user filesystem usage. + +Terminal implementation is available at [<span id="id5" +class="problematic">it4iuserfsusage\_</span>](#id4) + +Request JSON Object + +- **login** (*string*) – account id + +- **it4ifreetoken** (*string*) – token + +- **cluster** (*string*) – cluster id or ‘all’ + +Response JSON Object + +- **cluster** (*string*) – cluster name + +- **fs** (*string*) – filesystem name + +- **usage\_space** (*int*) – amount of space used (in KB) + +- **usage\_files** (*int*) – number of files on filesystem + +- **hard\_quota\_space** (*int*) – space quota (in KB) + +- **hard\_quota\_files** (*int*) – file number quota + +- **updated\_at** (*string*) – date of last update + +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> + – invalid requested query parameter + +**Example request**: + + curl -i -H "Content-Type:application/json" -X POST \ + --data '{"login":"johnsm", "it4ifreetoken": "abc","cluster":"all"}' \ + https://scs.it4i.cz/api/v1/user-fs-usage + +**Example response**: + + HTTP/1.1 200 OK + Content-Type: application/json + + [ + { + "cluster": "anselm", + "fs": "/home", + "hard_quota_files": 500000, + "hard_quota_space": 250000000, + "ldapuser": "johnsm", + "updated_at": "2019-03-11 13:25:16", + "usage_files": 19, + "usage_space": 2620 + } + ] + <a name="get--api-v1-version" class="headerlink" title="Permalink to this definition"></a> **GET /api/v1/version**