stairwell 0.0.4
A Python client for the Stairwell platform.
License: Apache 2.0
Requires Python: >=3.8,<4.0
Keywords: OpenAPI,OpenAPI-Generator,Stairwell V1 HTTP APIs

# stairwell-api
Restful APIs for the Stairwell platform. Most APIs expose named resources: each resource has a unique identifier that users use to reference that resource, and these names are what users should store as the canonical names for the resources. The base URL for this API is https://app.stairwell.com

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

- API version: 1.0.0
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.PythonPydanticV1ClientCodegen

## Requirements.

Python 3.8+

## 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/stairwell-inc/stairwell-python.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/stairwell-inc/stairwell-python.git`)

Then import the package:
```python
import stairwell_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 stairwell_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 stairwell_openapi_client
from stairwell_openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.stairwell.com
# See configuration.py for a list of all supported configuration parameters.
configuration = stairwell_openapi_client.Configuration(
    host = "https://app.stairwell.com"
)

# 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: AuthToken
configuration.api_key['AuthToken'] = os.environ["API_KEY"]

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


# Enter a context with an instance of the API client
async with stairwell_openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = stairwell_openapi_client.AssetsApi(api_client)
    asset = 'asset_example' # str | The asset id.
    tag = stairwell_openapi_client.Tag() # Tag | 

    try:
        # CreateTag
        api_response = await api_instance.assets_create_tag(asset, tag)
        print("The response of AssetsApi->assets_create_tag:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AssetsApi->assets_create_tag: %s\n" % e)

```

## Documentation for API Endpoints

All URIs are relative to *https://app.stairwell.com*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AssetsApi* | [**assets_create_tag**](docs/AssetsApi.md#assets_create_tag) | **POST** /v1/assets/{asset}/tags | CreateTag
*AssetsApi* | [**assets_delete_tag**](docs/AssetsApi.md#assets_delete_tag) | **DELETE** /v1/assets/{asset}/tags/{tag} | DeleteTag
*AssetsApi* | [**assets_get_asset**](docs/AssetsApi.md#assets_get_asset) | **GET** /v1/assets/{asset} | GetAsset
*AssetsApi* | [**assets_get_tag**](docs/AssetsApi.md#assets_get_tag) | **GET** /v1/assets/{asset}/tags/{tag} | GetTag
*AssetsApi* | [**assets_list_assets**](docs/AssetsApi.md#assets_list_assets) | **GET** /v1/environments/{environment}/assets | ListAssets
*AssetsApi* | [**assets_list_tags**](docs/AssetsApi.md#assets_list_tags) | **GET** /v1/assets/{asset}/tags | ListTags
*HostnamesApi* | [**hostnames_create_comment**](docs/HostnamesApi.md#hostnames_create_comment) | **POST** /v1/hostnames/{hostname}/comments | CreateComment
*HostnamesApi* | [**hostnames_create_opinion**](docs/HostnamesApi.md#hostnames_create_opinion) | **POST** /v1/hostnames/{hostname}/opinions | CreateOpinion
*HostnamesApi* | [**hostnames_create_tag**](docs/HostnamesApi.md#hostnames_create_tag) | **POST** /v1/hostnames/{hostname}/tags | CreateTag
*HostnamesApi* | [**hostnames_delete_tag**](docs/HostnamesApi.md#hostnames_delete_tag) | **DELETE** /v1/hostnames/{hostname}/tags/{tag} | DeleteTag
*HostnamesApi* | [**hostnames_get_hostname_metadata**](docs/HostnamesApi.md#hostnames_get_hostname_metadata) | **GET** /v1/hostnames/{hostname}/metadata | GetHostnameMetadata
*HostnamesApi* | [**hostnames_get_tag**](docs/HostnamesApi.md#hostnames_get_tag) | **GET** /v1/hostnames/{hostname}/tags/{tag} | GetTag
*HostnamesApi* | [**hostnames_list_comments**](docs/HostnamesApi.md#hostnames_list_comments) | **GET** /v1/hostnames/{hostname}/comments | ListComments
*HostnamesApi* | [**hostnames_list_opinions**](docs/HostnamesApi.md#hostnames_list_opinions) | **GET** /v1/hostnames/{hostname}/opinions | ListOpinions
*HostnamesApi* | [**hostnames_list_tags**](docs/HostnamesApi.md#hostnames_list_tags) | **GET** /v1/hostnames/{hostname}/tags | ListTags
*IpAddressesApi* | [**ip_addresses_create_comment**](docs/IpAddressesApi.md#ip_addresses_create_comment) | **POST** /v1/ipAddresses/{ipAddress}/comments | CreateComment
*IpAddressesApi* | [**ip_addresses_create_opinion**](docs/IpAddressesApi.md#ip_addresses_create_opinion) | **POST** /v1/ipAddresses/{ipAddress}/opinions | CreateOpinion
*IpAddressesApi* | [**ip_addresses_create_tag**](docs/IpAddressesApi.md#ip_addresses_create_tag) | **POST** /v1/ipAddresses/{ipAddress}/tags | CreateTag
*IpAddressesApi* | [**ip_addresses_delete_tag**](docs/IpAddressesApi.md#ip_addresses_delete_tag) | **DELETE** /v1/ipAddresses/{ipAddress}/tags/{tag} | DeleteTag
*IpAddressesApi* | [**ip_addresses_get_ip_address_metadata**](docs/IpAddressesApi.md#ip_addresses_get_ip_address_metadata) | **GET** /v1/ipAddresses/{ipAddress}/metadata | GetIpAddressMetadata
*IpAddressesApi* | [**ip_addresses_get_tag**](docs/IpAddressesApi.md#ip_addresses_get_tag) | **GET** /v1/ipAddresses/{ipAddress}/tags/{tag} | GetTag
*IpAddressesApi* | [**ip_addresses_list_comments**](docs/IpAddressesApi.md#ip_addresses_list_comments) | **GET** /v1/ipAddresses/{ipAddress}/comments | ListComments
*IpAddressesApi* | [**ip_addresses_list_opinions**](docs/IpAddressesApi.md#ip_addresses_list_opinions) | **GET** /v1/ipAddresses/{ipAddress}/opinions | ListOpinions
*IpAddressesApi* | [**ip_addresses_list_tags**](docs/IpAddressesApi.md#ip_addresses_list_tags) | **GET** /v1/ipAddresses/{ipAddress}/tags | ListTags
*ObjectsApi* | [**objects_create_comment**](docs/ObjectsApi.md#objects_create_comment) | **POST** /v1/objects/{object}/comments | CreateComment
*ObjectsApi* | [**objects_create_opinion**](docs/ObjectsApi.md#objects_create_opinion) | **POST** /v1/objects/{object}/opinions | CreateOpinion
*ObjectsApi* | [**objects_create_tag**](docs/ObjectsApi.md#objects_create_tag) | **POST** /v1/objects/{object}/tags | CreateTag
*ObjectsApi* | [**objects_delete_tag**](docs/ObjectsApi.md#objects_delete_tag) | **DELETE** /v1/objects/{object}/tags/{tag} | DeleteTag
*ObjectsApi* | [**objects_download_object**](docs/ObjectsApi.md#objects_download_object) | **GET** /v1/objects/{object}:download | DownloadObject
*ObjectsApi* | [**objects_get_object_detonation**](docs/ObjectsApi.md#objects_get_object_detonation) | **GET** /v1/objects/{object}/detonation | GetObjectDetonation
*ObjectsApi* | [**objects_get_object_metadata**](docs/ObjectsApi.md#objects_get_object_metadata) | **GET** /v1/objects/{object}/metadata | GetObjectMetadata
*ObjectsApi* | [**objects_get_tag**](docs/ObjectsApi.md#objects_get_tag) | **GET** /v1/objects/{object}/tags/{tag} | GetTag
*ObjectsApi* | [**objects_list_comments**](docs/ObjectsApi.md#objects_list_comments) | **GET** /v1/objects/{object}/comments | ListComments
*ObjectsApi* | [**objects_list_object_metadata**](docs/ObjectsApi.md#objects_list_object_metadata) | **GET** /v1/objects/metadata | ListObjectMetadata
*ObjectsApi* | [**objects_list_object_sightings**](docs/ObjectsApi.md#objects_list_object_sightings) | **GET** /v1/objects/{object}/sightings | ListObjectSightings
*ObjectsApi* | [**objects_list_object_variants**](docs/ObjectsApi.md#objects_list_object_variants) | **GET** /v1/objects/{object}/variants | ListObjectVariants
*ObjectsApi* | [**objects_list_opinions**](docs/ObjectsApi.md#objects_list_opinions) | **GET** /v1/objects/{object}/opinions | ListOpinions
*ObjectsApi* | [**objects_list_tags**](docs/ObjectsApi.md#objects_list_tags) | **GET** /v1/objects/{object}/tags | ListTags
*ObjectsApi* | [**objects_trigger_object_detonation**](docs/ObjectsApi.md#objects_trigger_object_detonation) | **POST** /v1/objects/{object}/detonation:trigger | TriggerObjectDetonation
*YaraRulesApi* | [**yara_rules_create_tag**](docs/YaraRulesApi.md#yara_rules_create_tag) | **POST** /v1/environments/{environment}/yaraRules/{yaraRule}/tags | CreateTag
*YaraRulesApi* | [**yara_rules_create_yara_rule**](docs/YaraRulesApi.md#yara_rules_create_yara_rule) | **POST** /v1/environments/{environment}/yaraRules | CreateYaraRule
*YaraRulesApi* | [**yara_rules_delete_tag**](docs/YaraRulesApi.md#yara_rules_delete_tag) | **DELETE** /v1/environments/{environment}/yaraRules/{yaraRule}/tags/{tag} | DeleteTag
*YaraRulesApi* | [**yara_rules_delete_yara_rule**](docs/YaraRulesApi.md#yara_rules_delete_yara_rule) | **DELETE** /v1/environments/{environment}/yaraRules/{yaraRule} | DeleteYaraRule
*YaraRulesApi* | [**yara_rules_get_tag**](docs/YaraRulesApi.md#yara_rules_get_tag) | **GET** /v1/environments/{environment}/yaraRules/{yaraRule}/tags/{tag} | GetTag
*YaraRulesApi* | [**yara_rules_get_yara_rule**](docs/YaraRulesApi.md#yara_rules_get_yara_rule) | **GET** /v1/environments/{environment}/yaraRules/{yaraRule} | GetYaraRule
*YaraRulesApi* | [**yara_rules_list_tags**](docs/YaraRulesApi.md#yara_rules_list_tags) | **GET** /v1/environments/{environment}/yaraRules/{yaraRule}/tags | ListTags
*YaraRulesApi* | [**yara_rules_list_yara_rules**](docs/YaraRulesApi.md#yara_rules_list_yara_rules) | **GET** /v1/environments/{environment}/yaraRules | ListYaraRules
*YaraRulesApi* | [**yara_rules_update_yara_rule**](docs/YaraRulesApi.md#yara_rules_update_yara_rule) | **PATCH** /v1/environments/{environment}/yaraRules/{yaraRule} | UpdateYaraRule


## Documentation For Models

 - [Asset](docs/Asset.md)
 - [Comment](docs/Comment.md)
 - [DNSLookupResult](docs/DNSLookupResult.md)
 - [Detection](docs/Detection.md)
 - [FileAction](docs/FileAction.md)
 - [HostnameMetadata](docs/HostnameMetadata.md)
 - [IpAddressMetadata](docs/IpAddressMetadata.md)
 - [ListAssetsResponse](docs/ListAssetsResponse.md)
 - [ListCommentsResponse](docs/ListCommentsResponse.md)
 - [ListObjectMetadataResponse](docs/ListObjectMetadataResponse.md)
 - [ListObjectSightingsResponse](docs/ListObjectSightingsResponse.md)
 - [ListObjectVariantsResponse](docs/ListObjectVariantsResponse.md)
 - [ListOpinionsResponse](docs/ListOpinionsResponse.md)
 - [ListTagsResponse](docs/ListTagsResponse.md)
 - [ListYaraRulesResponse](docs/ListYaraRulesResponse.md)
 - [MalEval](docs/MalEval.md)
 - [MitreAttackTTP](docs/MitreAttackTTP.md)
 - [NetworkIndicators](docs/NetworkIndicators.md)
 - [ObjectDetonation](docs/ObjectDetonation.md)
 - [ObjectMetadata](docs/ObjectMetadata.md)
 - [ObjectSighting](docs/ObjectSighting.md)
 - [ObjectSignature](docs/ObjectSignature.md)
 - [ObjectVariant](docs/ObjectVariant.md)
 - [Opinion](docs/Opinion.md)
 - [RegistryKeyAction](docs/RegistryKeyAction.md)
 - [Tag](docs/Tag.md)
 - [TriggerObjectDetonationRequest](docs/TriggerObjectDetonationRequest.md)
 - [X509Certificate](docs/X509Certificate.md)
 - [YaraRule](docs/YaraRule.md)


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


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

- **Type**: API key
- **API key parameter name**: Authorization
- **Location**: HTTP header