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

Manual mdl fix fo test

parent cf32111b
No related branches found
Tags
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
API Documentation_public API Documentation_public
============================================================================================= =============================================================================================
Implements API for IT4I SCS Information System. Implements API for IT4I SCS Information System.
- api revision: `9eb0678f / 2017-12-08 11:06:12 +0100` - api revision: `9eb0678f / 2017-12-08 11:06:12 +0100`
- api version: `0.9-11-g9eb0678` - api version: `0.9-11-g9eb0678`
- apidoc building date: `2017-12-08 15:01:48 +0100` - apidoc building date: `2017-12-08 15:01:48 +0100`
Summary Summary
-------------------------------------------------------------- --------------------------------------------------------------
Resource | Operation | Description Resource | Operation | Description
------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------| ----------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------| ----------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
...@@ -28,85 +24,63 @@ API Details ...@@ -28,85 +24,63 @@ API Details
`POST /api/v1/check-access` {#post--api-v1-check-access} `POST /api/v1/check-access` {#post--api-v1-check-access}
: A service to check if account and/or related project has the access : A service to check if account and/or related project has the access
to specified queue. to specified queue.
Request JSON Object: Request JSON Object:
- **login** (*string*) – account id
- **queue** (*string*) – queue id
- **login** (*string*) – account id - **pid** (*string*) – project id, not required if querying projectless queue
- **queue** (*string*) – queue id
- **pid** (*string*) – project id, not required if querying
projectless queue
Status Codes: Status Codes:
- [200 - [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1)
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1)
– no error – no error
**Example request**: **Example request**:
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
**Example response**: **Example response**:
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."
<!-- -->
`GET /api/v1/dedicated-time/`(*cluster\_type*) {#get--api-v1-dedicated-time-cluster_type} `GET /api/v1/dedicated-time/`(*cluster\_type*) {#get--api-v1-dedicated-time-cluster_type}
: Returns list of times dedicated for HPC maintainance. It is not : Returns list of times dedicated for HPC maintainance. It is not
possible to use HPC services during maintainance. possible to use HPC services during maintainance.
Query Parameters: Query Parameters:
- **all** – returns all dedicated times for all clusters
- **salomon** – returns all times just for salomon cluster
- **all** – returns all dedicated times for all clusters - **anselm** – returns all times just for anselm cluster
- **salomon** – returns all times just for salomon cluster - **active** – returns dedicated times for all clusters which are
- **anselm** – returns all times just for anselm cluster
- **active** – returns dedicated times for all clusters which are
now active now active
- **planned** – returns dedicated times for all clusters which are - **planned** – returns dedicated times for all clusters which are
now active or scheduled in the future now active or scheduled in the future
Status Codes: Status Codes:
- [200 - [200
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1)
– no error – no error
- [405 Method Not - [405 Method Not
Allowed](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6) Allowed](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6)
– invalid requested query parameter – invalid requested query parameter
**Example request**: **Example request**:
curl -i curl https://scs.it4i.cz/api/v1/dedicated-time/all curl -i curl https://scs.it4i.cz/api/v1/dedicated-time/all
**Example response**: **Example response**:
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/json Content-Type: application/json
...@@ -119,13 +93,9 @@ API Details ...@@ -119,13 +93,9 @@ API Details
} }
] ]
<!-- -->
`POST /api/v1/it4ifree/`(*login*) {#post--api-v1-it4ifree-login} `POST /api/v1/it4ifree/`(*login*) {#post--api-v1-it4ifree-login}
: 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
...@@ -135,64 +105,50 @@ API Details ...@@ -135,64 +105,50 @@ API Details
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:
> - `me` – data from projects, where the account has access
> - `me` – data from projects, where the - `me_as_pi` – data from projects, where the account is PI (primary investigator)
> account has access
> - `me_as_pi` – data from projects, where the
> account is PI (primary investigator)
>
Request JSON Object: Request JSON Object:
- **login** (*string*) – account id
- **it4ifreetoken** (*string*) – token
- **login** (*string*) – account id
- **it4ifreetoken** (*string*) – token
Response JSON Object: Response JSON Object:
- **login** (*string*) – account id
- **pid** (*string*) – project id
- **login** (*string*) – account id - **pi\_login** (*string*) – account id which is PI
- **pid** (*string*) – project id - **days\_left** (*string*) – days to the end of project,
- **pi\_login** (*string*) – account id which is PI
- **days\_left** (*string*) – days to the end of project,
`---` if project is inactive or not yet `---` if 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
- **used\_with\_factor** (*int*) – consumed normalized core-hours - **used\_with\_factor** (*int*) – consumed normalized core-hours
- **used\_by\_me** (*int*) – core-hours consumed by the account - **used\_by\_me** (*int*) – core-hours consumed by the account
- **used\_by\_me\_with\_factor** (*int*) – normalized core-hours - **used\_by\_me\_with\_factor** (*int*) – normalized core-hours
consumed by the account consumed by the account
- **corehours** (*int*) – core-hours consumed by the account - **corehours** (*int*) – core-hours consumed by the account
- **core\_hours\_with\_factor** (*int*) – normalized core-hours - **core\_hours\_with\_factor** (*int*) – normalized core-hours
consumed by the account consumed by the account
Status Codes: Status Codes:
- [200 - [200
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1)
– no error – no error
- [405 Method Not - [405 Method Not
Allowed](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6) Allowed](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6)
– token does not match – token does not match
**Example request**: **Example request**:
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
**Example response**: **Example response**:
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/json Content-Type: application/json
...@@ -239,43 +195,31 @@ API Details ...@@ -239,43 +195,31 @@ API Details
] ]
} }
<!-- -->
`GET /api/v1/motd/`(*category*) {#get--api-v1-motd-category} `GET /api/v1/motd/`(*category*) {#get--api-v1-motd-category}
: Returns SCS messages of the day. : Returns SCS messages of the day.
Query Parameters: Query Parameters:
- **notice** – returns only notice messages
- **important** – returns only important messages
- **notice** – returns only notice messages - **all** – returns all messages
- **important** – returns only important messages
- **all** – returns all messages
Status Codes: Status Codes:
- [200 - [200
OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1)
– no error – no error
- [405 Method Not - [405 Method Not
Allowed](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6) Allowed](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6)
– invalid requested query parameter – invalid requested query parameter
**Example request**: **Example request**:
curl -i https://scs.it4i.cz/api/v1/motd/notice curl -i https://scs.it4i.cz/api/v1/motd/notice
**Example response**: **Example response**:
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/json Content-Type: application/json
...@@ -299,30 +243,19 @@ API Details ...@@ -299,30 +243,19 @@ API Details
} }
] ]
<!-- -->
`GET /api/v1/ping` {#get--api-v1-ping} `GET /api/v1/ping` {#get--api-v1-ping}
: A service for testing connection to API. : A service for testing connection to API.
--------------- ----------------------------------------------------------------------------------------------------------------- Status Codes:
Status Codes: - [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) – no error - [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) – no error
--------------- -----------------------------------------------------------------------------------------------------------------
**Example request**: **Example request**:
curl -i https://scs.it4i.cz/api/v1/ping curl -i https://scs.it4i.cz/api/v1/ping
**Example response**: **Example response**:
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/json Content-Type: application/json
...@@ -330,30 +263,20 @@ API Details ...@@ -330,30 +263,20 @@ API Details
"message": "pong" "message": "pong"
} }
<!-- -->
`GET /api/v1/version` {#get--api-v1-version} `GET /api/v1/version` {#get--api-v1-version}
: Returns basic information about API. : Returns basic information about API.
--------------- ----------------------------------------------------------------------------------------------------------------- Status Codes:
Status Codes: - [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) – no error
--------------- -----------------------------------------------------------------------------------------------------------------
**Example request**:
- [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) – no error
**Example request**:
curl -i https://scs.it4i.cz/api/v1/version curl -i https://scs.it4i.cz/api/v1/version
**Example response**: **Example response**:
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/json Content-Type: application/json
...@@ -363,17 +286,6 @@ API Details ...@@ -363,17 +286,6 @@ API Details
"version": "0.8.2-34-gceac8aa" "version": "0.8.2-34-gceac8aa"
} }
©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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment