# openapi-client
API to access and control Slurm.

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 0.0.38
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://www.schedmd.com/](https://www.schedmd.com/)

## Requirements.

Python 3.7+

## Installation & Usage
### pip install

If the python package is hosted on a repository, you can install directly using:

```sh
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)

Then import the package:
```python
import openapi_client
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import openapi_client
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: user
configuration.api_key['user'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['user'] = 'Bearer'

# Configure API key authorization: token
configuration.api_key['token'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['token'] = 'Bearer'


# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = openapi_client.OpenapiApi(api_client)

    try:
        # Retrieve OpenAPI Specification
        api_instance.openapi_get()
    except ApiException as e:
        print("Exception when calling OpenapiApi->openapi_get: %s\n" % e)

```

## Documentation for API Endpoints

All URIs are relative to *http://localhost*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*OpenapiApi* | [**openapi_get**](docs/OpenapiApi.md#openapi_get) | **GET** /openapi | Retrieve OpenAPI Specification
*OpenapiApi* | [**openapi_json_get**](docs/OpenapiApi.md#openapi_json_get) | **GET** /openapi.json | Retrieve OpenAPI Specification
*OpenapiApi* | [**openapi_v3_get**](docs/OpenapiApi.md#openapi_v3_get) | **GET** /openapi/v3 | Retrieve OpenAPI Specification
*OpenapiApi* | [**openapi_yaml_get**](docs/OpenapiApi.md#openapi_yaml_get) | **GET** /openapi.yaml | Retrieve OpenAPI Specification
*SlurmApi* | [**slurm_v0038_cancel_job**](docs/SlurmApi.md#slurm_v0038_cancel_job) | **DELETE** /slurm/v0.0.38/job/{job_id} | cancel or signal job
*SlurmApi* | [**slurm_v0038_diag**](docs/SlurmApi.md#slurm_v0038_diag) | **GET** /slurm/v0.0.38/diag | get diagnostics
*SlurmApi* | [**slurm_v0038_get_job**](docs/SlurmApi.md#slurm_v0038_get_job) | **GET** /slurm/v0.0.38/job/{job_id} | get job info
*SlurmApi* | [**slurm_v0038_get_jobs**](docs/SlurmApi.md#slurm_v0038_get_jobs) | **GET** /slurm/v0.0.38/jobs | get list of jobs
*SlurmApi* | [**slurm_v0038_get_node**](docs/SlurmApi.md#slurm_v0038_get_node) | **GET** /slurm/v0.0.38/node/{node_name} | get node info
*SlurmApi* | [**slurm_v0038_get_nodes**](docs/SlurmApi.md#slurm_v0038_get_nodes) | **GET** /slurm/v0.0.38/nodes | get all node info
*SlurmApi* | [**slurm_v0038_get_partition**](docs/SlurmApi.md#slurm_v0038_get_partition) | **GET** /slurm/v0.0.38/partition/{partition_name} | get partition info
*SlurmApi* | [**slurm_v0038_get_partitions**](docs/SlurmApi.md#slurm_v0038_get_partitions) | **GET** /slurm/v0.0.38/partitions | get all partition info
*SlurmApi* | [**slurm_v0038_get_reservation**](docs/SlurmApi.md#slurm_v0038_get_reservation) | **GET** /slurm/v0.0.38/reservation/{reservation_name} | get reservation info
*SlurmApi* | [**slurm_v0038_get_reservations**](docs/SlurmApi.md#slurm_v0038_get_reservations) | **GET** /slurm/v0.0.38/reservations | get all reservation info
*SlurmApi* | [**slurm_v0038_ping**](docs/SlurmApi.md#slurm_v0038_ping) | **GET** /slurm/v0.0.38/ping | ping test
*SlurmApi* | [**slurm_v0038_slurmctld_get_licenses**](docs/SlurmApi.md#slurm_v0038_slurmctld_get_licenses) | **GET** /slurm/v0.0.38/licenses | get all Slurm tracked license info
*SlurmApi* | [**slurm_v0038_submit_job**](docs/SlurmApi.md#slurm_v0038_submit_job) | **POST** /slurm/v0.0.38/job/submit | submit new job
*SlurmApi* | [**slurm_v0038_update_job**](docs/SlurmApi.md#slurm_v0038_update_job) | **POST** /slurm/v0.0.38/job/{job_id} | update job


## Documentation For Models

 - [V0038Diag](docs/V0038Diag.md)
 - [V0038DiagRpcm](docs/V0038DiagRpcm.md)
 - [V0038DiagRpcu](docs/V0038DiagRpcu.md)
 - [V0038DiagStatistics](docs/V0038DiagStatistics.md)
 - [V0038Error](docs/V0038Error.md)
 - [V0038JobProperties](docs/V0038JobProperties.md)
 - [V0038JobResources](docs/V0038JobResources.md)
 - [V0038JobResponseProperties](docs/V0038JobResponseProperties.md)
 - [V0038JobSubmission](docs/V0038JobSubmission.md)
 - [V0038JobSubmissionResponse](docs/V0038JobSubmissionResponse.md)
 - [V0038JobsResponse](docs/V0038JobsResponse.md)
 - [V0038License](docs/V0038License.md)
 - [V0038Licenses](docs/V0038Licenses.md)
 - [V0038Meta](docs/V0038Meta.md)
 - [V0038MetaPlugin](docs/V0038MetaPlugin.md)
 - [V0038MetaSlurm](docs/V0038MetaSlurm.md)
 - [V0038MetaSlurmVersion](docs/V0038MetaSlurmVersion.md)
 - [V0038Node](docs/V0038Node.md)
 - [V0038NodeAllocation](docs/V0038NodeAllocation.md)
 - [V0038NodeAllocationSockets](docs/V0038NodeAllocationSockets.md)
 - [V0038NodesResponse](docs/V0038NodesResponse.md)
 - [V0038Partition](docs/V0038Partition.md)
 - [V0038PartitionsResponse](docs/V0038PartitionsResponse.md)
 - [V0038Ping](docs/V0038Ping.md)
 - [V0038Pings](docs/V0038Pings.md)
 - [V0038Reservation](docs/V0038Reservation.md)
 - [V0038ReservationPurgeCompleted](docs/V0038ReservationPurgeCompleted.md)
 - [V0038ReservationsResponse](docs/V0038ReservationsResponse.md)
 - [V0038Signal](docs/V0038Signal.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization


Authentication schemes defined for the API:
<a id="user"></a>
### user

- **Type**: API key
- **API key parameter name**: X-SLURM-USER-NAME
- **Location**: HTTP header

<a id="token"></a>
### token

- **Type**: API key
- **API key parameter name**: X-SLURM-USER-TOKEN
- **Location**: HTTP header


## Author

sales@schedmd.com


