diff --git a/scs_api.server_public.md b/scs_api.server_public.md index 6e86b247fb6b2c88f2eaa4a7a196325d28cbf3d7..ff1020f59b8e2d6d68bfd330ab0d2f5382bdb36b 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: `5c6c88e9 / 2021-03-22 18:20:16 +0100` +- api revision: `28a4523a / 2021-03-23 16:43:25 +0100` -- api version: `0.9-272-g5c6c88e` +- api version: `0.9-273-g28a4523` -- apidoc building date: `2021-03-22 17:30:47 +0000` +- apidoc building date: `2021-03-23 15:47:10 +0000` Summary ------------------------------------------------------------------------------------- @@ -74,11 +74,16 @@ Summary <td><p>Connection test</p></td> </tr> <tr class="even"> +<td><p>project-fs-usage</p></td> +<td><p><a href="#post--api-v1-project-fs-usage" class="reference external">POST /api/v1/project-fs-usage</a></p></td> +<td><p>Shows project filesystem usage</p></td> +</tr> +<tr class="odd"> <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"> +<tr class="even"> <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> @@ -198,8 +203,8 @@ Status Codes A service to show filesystem usage. -Terminal implementation is available at [<span id="id3" -class="problematic">it4ifsusage\_</span>](#id2) +Terminal implementation is available at +<a href="https://pypi.org/project/it4i.portal.clients/#it4ifsusage" class="reference external">it4ifsusage</a> Request JSON Object @@ -247,7 +252,7 @@ Status Codes [ { "login": "johnsm", - "type": "User Quota", + "type": "User", "cluster_or_pid": "salomon" "fs": "/home", "hard_quota_files": 500000, @@ -499,13 +504,69 @@ Status Codes "message": "pong" } +<a name="post--api-v1-project-fs-usage" class="headerlink" title="Permalink to this definition"></a> + **POST /api/v1/project-fs-usage** + +A service to show project filesystem usage. + +Terminal implementation is available at +<a href="https://pypi.org/project/it4i.portal.clients/#it4iprojectfsusage" class="reference external">it4iprojectfsusage</a> + +Request JSON Object + +- **login** (*string*) – account id + +- **it4ifreetoken** (*string*) – token + +- **pid** (*string*) – project identifier or all + +Response JSON Object + +- **pid** (*string*) – project identifier + +- **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 + +**Example request**: + + curl -i -H "Content-Type:application/json" -X POST \ + --data '{"login":"johnsm", "it4ifreetoken": "abc","pid":"all"}' \ + https://scs.it4i.cz/api/v1/project-fs-usage + +**Example response**: + + HTTP/1.1 200 OK + Content-Type: application/json + + [ + { + "pid": "dd-13-5", + "fs": "/home", + "hard_quota_files": 500000, + "hard_quota_space": 250000000, + "login": "johnsm", + "updated_at": "2019-03-11 13:25:16", + "usage_files": 19, + "usage_space": 2620 + } + ] + <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) +Terminal implementation is available at +<a href="https://pypi.org/project/it4i.portal.clients/#it4iuserfsusage" class="reference external">it4iuserfsusage</a> Request JSON Object @@ -513,7 +574,7 @@ Request JSON Object - **it4ifreetoken** (*string*) – token -- **cluster** (*string*) – cluster id or ‘all’ +- **cluster** (*string*) – cluster name or ‘all’ Response JSON Object