Skip to content
Snippets Groups Projects
apidocs.md 35 KiB
Newer Older
  • Learn to ignore specific revisions
  • Marek Chrastina's avatar
    Marek Chrastina committed
    
        <div class="highlight">
    
    
            curl -i https://scs.it4i.cz/api/v1/ping
    
    
        **Example response**:
    
    
    Marek Chrastina's avatar
    Marek Chrastina committed
        <div class="highlight-http">
    
        <div class="highlight">
    
    
            HTTP/1.1 200 OK
            Content-Type: application/json
    
            {
               "message": "pong"
            }
    
    
    Marek Chrastina's avatar
    Marek Chrastina committed
        </div>
    
        </div>
    
    <!-- -->
    
     `GET `{.descname}`/api/v1/quota-extra`{.descname}[](#get--api-v1-quota-extra "Permalink to this definition"){.headerlink}
    
    :   Access to this service is restricted to just few source ipv4
        addresses.
    
    Marek Chrastina's avatar
    Marek Chrastina committed
        Returns all accounts which have active filesystem quotas bigger than
        standard.
    
        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
    
    Marek Chrastina's avatar
    Marek Chrastina committed
        Status Codes:
    
    Marek Chrastina's avatar
    Marek Chrastina committed
        -   [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
    
    Marek Chrastina's avatar
    Marek Chrastina committed
        **Example request**:
    
    Marek Chrastina's avatar
    Marek Chrastina committed
        <div class="highlight-console">
    
        <div class="highlight">
    
            curl -i curl https://scs.it4i.cz/api/v1/quota-extra
    
        </div>
    
        </div>
    
        **Example response**:
    
        <div class="highlight-http">
    
        <div class="highlight">
    
            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"
    
              }
            ]
    
        </div>
    
        </div>
    
    <!-- -->
    
     `GET `{.descname}`/api/v1/version`{.descname}[](#get--api-v1-version "Permalink to this definition"){.headerlink}
    
    :   Returns basic information about API.
    
          --------------- -----------------------------------------------------------------------------------------------------------------
          Status Codes:   -   [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1){.reference .external} – no error
          --------------- -----------------------------------------------------------------------------------------------------------------
    
        **Example request**:
    
        <div class="highlight-console">
    
        <div class="highlight">
    
    
            curl -i https://scs.it4i.cz/api/v1/version
    
    
        **Example response**:
    
    
    Marek Chrastina's avatar
    Marek Chrastina committed
        <div class="highlight-http">
    
        <div class="highlight">
    
    
            HTTP/1.1 200 OK
            Content-Type: application/json
    
            {
               "hostname": "scs.it4i.cz",
               "revision": "ceac8aa / 2017-11-01 12:25:27 +0100",
               "version": "0.8.2-34-gceac8aa"
            }
    
    
    ©2017, IT4Innovations. | Powered by [Sphinx
    1.5.6](http://sphinx-doc.org/) & [Alabaster
    0.7.10](https://github.com/bitprophet/alabaster)