# access-server-connector-v2
Mentortools service for Access Packages with lazy access resolution

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

- API version: 0.1.0
- Package version: 1.0.0+2677876553
- Generator version: 7.23.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.

Python 3.10+

## 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 access_server_connector_v2
```

### 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 access_server_connector_v2
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

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

```python

import access_server_connector_v2
from access_server_connector_v2.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 = access_server_connector_v2.Configuration(
    host = "http://localhost"
)



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

    try:
        # Health check
        api_response = await api_instance.health_health_get()
        print("The response of HealthApi->health_health_get:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling HealthApi->health_health_get: %s\n" % e)

```

## Documentation for API Endpoints

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

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*HealthApi* | [**health_health_get**](docs/HealthApi.md#health_health_get) | **GET** /health | Health check
*IndividualApi* | [**batch_overrides_v1_individual_overrides_post**](docs/IndividualApi.md#batch_overrides_v1_individual_overrides_post) | **POST** /v1/individual/overrides | Batch-write per-member access overrides
*IndividualApi* | [**member_overrides_v1_individual_members_member_id_overrides_get**](docs/IndividualApi.md#member_overrides_v1_individual_members_member_id_overrides_get) | **GET** /v1/individual/members/{member_id}/overrides | List a member&#39;s effective overrides (latest-wins)
*OwnershipApi* | [**deactivate_v1_ownership_reasons_reason_id_deactivate_post**](docs/OwnershipApi.md#deactivate_v1_ownership_reasons_reason_id_deactivate_post) | **POST** /v1/ownership/reasons/{reason_id}/deactivate | Deactivate (revoke) an ownership reason
*OwnershipApi* | [**grant_v1_ownership_grant_post**](docs/OwnershipApi.md#grant_v1_ownership_grant_post) | **POST** /v1/ownership/grant | Manually grant an access package
*OwnershipApi* | [**member_packages_count_v1_ownership_members_member_id_packages_count_get**](docs/OwnershipApi.md#member_packages_count_v1_ownership_members_member_id_packages_count_get) | **GET** /v1/ownership/members/{member_id}/packages/count | Count the access packages a member owns
*OwnershipApi* | [**member_packages_v1_ownership_members_member_id_packages_get**](docs/OwnershipApi.md#member_packages_v1_ownership_members_member_id_packages_get) | **GET** /v1/ownership/members/{member_id}/packages | List the access packages a member owns (paginated)
*OwnershipApi* | [**ownership_list_v1_ownership_members_member_id_reasons_get**](docs/OwnershipApi.md#ownership_list_v1_ownership_members_member_id_reasons_get) | **GET** /v1/ownership/members/{member_id}/reasons | List a member&#39;s ownership reasons
*PackagesApi* | [**count_members_v1_packages_access_package_id_members_count_get**](docs/PackagesApi.md#count_members_v1_packages_access_package_id_members_count_get) | **GET** /v1/packages/{access_package_id}/members/count | Count the package&#39;s members (distinct)
*PackagesApi* | [**count_ownerships_v1_packages_access_package_id_ownerships_count_get**](docs/PackagesApi.md#count_ownerships_v1_packages_access_package_id_ownerships_count_get) | **GET** /v1/packages/{access_package_id}/ownerships/count | Count the package&#39;s grants (ownership reasons)
*PackagesApi* | [**count_packages_v1_packages_count_get**](docs/PackagesApi.md#count_packages_v1_packages_count_get) | **GET** /v1/packages/count | Count a portal&#39;s access packages
*PackagesApi* | [**create_package_v1_packages_post**](docs/PackagesApi.md#create_package_v1_packages_post) | **POST** /v1/packages | Create an access package
*PackagesApi* | [**delete_package_v1_packages_access_package_id_delete**](docs/PackagesApi.md#delete_package_v1_packages_access_package_id_delete) | **DELETE** /v1/packages/{access_package_id} | Delete an access package
*PackagesApi* | [**delete_rule_v1_packages_access_package_id_rules_rule_id_delete**](docs/PackagesApi.md#delete_rule_v1_packages_access_package_id_rules_rule_id_delete) | **DELETE** /v1/packages/{access_package_id}/rules/{rule_id} | Remove an access rule from a package
*PackagesApi* | [**get_package_by_slug_v1_packages_by_slug_slug_get**](docs/PackagesApi.md#get_package_by_slug_v1_packages_by_slug_slug_get) | **GET** /v1/packages/by-slug/{slug} | Get public package data by its direct-link slug (unauthenticated)
*PackagesApi* | [**get_package_v1_packages_access_package_id_get**](docs/PackagesApi.md#get_package_v1_packages_access_package_id_get) | **GET** /v1/packages/{access_package_id} | Get a single access package (with its rules)
*PackagesApi* | [**get_rules_v1_packages_access_package_id_rules_get**](docs/PackagesApi.md#get_rules_v1_packages_access_package_id_rules_get) | **GET** /v1/packages/{access_package_id}/rules | List a package&#39;s access rules
*PackagesApi* | [**link_product_v1_packages_access_package_id_products_put**](docs/PackagesApi.md#link_product_v1_packages_access_package_id_products_put) | **PUT** /v1/packages/{access_package_id}/products | Link a marketplace product to a package
*PackagesApi* | [**list_members_v1_packages_access_package_id_members_get**](docs/PackagesApi.md#list_members_v1_packages_access_package_id_members_get) | **GET** /v1/packages/{access_package_id}/members | List the package&#39;s members with their grants — one row per member (paginated)
*PackagesApi* | [**list_ownerships_v1_packages_access_package_id_ownerships_get**](docs/PackagesApi.md#list_ownerships_v1_packages_access_package_id_ownerships_get) | **GET** /v1/packages/{access_package_id}/ownerships | List the package&#39;s grants — one row per ownership reason (paginated)
*PackagesApi* | [**list_packages_v1_packages_get**](docs/PackagesApi.md#list_packages_v1_packages_get) | **GET** /v1/packages | List a portal&#39;s access packages (paginated)
*PackagesApi* | [**list_product_links_v1_packages_access_package_id_products_get**](docs/PackagesApi.md#list_product_links_v1_packages_access_package_id_products_get) | **GET** /v1/packages/{access_package_id}/products | List the marketplace products linked to a package
*PackagesApi* | [**patch_package_v1_packages_access_package_id_patch**](docs/PackagesApi.md#patch_package_v1_packages_access_package_id_patch) | **PATCH** /v1/packages/{access_package_id} | Toggle is_active / is_locked
*PackagesApi* | [**set_rule_v1_packages_access_package_id_rules_put**](docs/PackagesApi.md#set_rule_v1_packages_access_package_id_rules_put) | **PUT** /v1/packages/{access_package_id}/rules | Set an access rule on a package
*PackagesApi* | [**unlink_product_v1_packages_access_package_id_products_link_id_delete**](docs/PackagesApi.md#unlink_product_v1_packages_access_package_id_products_link_id_delete) | **DELETE** /v1/packages/{access_package_id}/products/{link_id} | Unlink a marketplace product from a package
*RulePresetsApi* | [**create_v1_rule_presets_post**](docs/RulePresetsApi.md#create_v1_rule_presets_post) | **POST** /v1/rule-presets | Create a reusable rule preset
*RulePresetsApi* | [**delete_preset_v1_rule_presets_preset_id_delete**](docs/RulePresetsApi.md#delete_preset_v1_rule_presets_preset_id_delete) | **DELETE** /v1/rule-presets/{preset_id} | Delete a rule preset
*RulePresetsApi* | [**get_preset_v1_rule_presets_preset_id_get**](docs/RulePresetsApi.md#get_preset_v1_rule_presets_preset_id_get) | **GET** /v1/rule-presets/{preset_id} | Get one rule preset
*RulePresetsApi* | [**list_presets_v1_rule_presets_get**](docs/RulePresetsApi.md#list_presets_v1_rule_presets_get) | **GET** /v1/rule-presets | List the portal&#39;s rule presets (flat + grouped per resource type)
*RulePresetsApi* | [**update_preset_v1_rule_presets_preset_id_patch**](docs/RulePresetsApi.md#update_preset_v1_rule_presets_preset_id_patch) | **PATCH** /v1/rule-presets/{preset_id} | Edit a rule preset (name / type hint / body)
*ServerApi* | [**check_v1_access_check_post**](docs/ServerApi.md#check_v1_access_check_post) | **POST** /v1/access/check | Check a single resource
*ServerApi* | [**consume_v1_admin_consume_post**](docs/ServerApi.md#consume_v1_admin_consume_post) | **POST** /v1/admin/consume | Apply an access.order-events payload
*ServerApi* | [**resolve_v1_access_resolve_post**](docs/ServerApi.md#resolve_v1_access_resolve_post) | **POST** /v1/access/resolve | Resolve a resource tree
*ServerApi* | [**resources_summary_v1_access_members_member_id_resources_get**](docs/ServerApi.md#resources_summary_v1_access_members_member_id_resources_get) | **GET** /v1/access/members/{member_id}/resources | List the granted resources (of a type) a member reaches


## Documentation For Models

 - [AccessMode](docs/AccessMode.md)
 - [AccessOrderEvent](docs/AccessOrderEvent.md)
 - [AccessResultOut](docs/AccessResultOut.md)
 - [Binding](docs/Binding.md)
 - [CheckIn](docs/CheckIn.md)
 - [ConsumeOut](docs/ConsumeOut.md)
 - [EventOrder](docs/EventOrder.md)
 - [EventProduct](docs/EventProduct.md)
 - [EventSubscription](docs/EventSubscription.md)
 - [GrantIn](docs/GrantIn.md)
 - [HTTPValidationError](docs/HTTPValidationError.md)
 - [HealthOut](docs/HealthOut.md)
 - [IdOut](docs/IdOut.md)
 - [LocationInner](docs/LocationInner.md)
 - [LockReason](docs/LockReason.md)
 - [MemberOwnershipOut](docs/MemberOwnershipOut.md)
 - [NodeAccessOut](docs/NodeAccessOut.md)
 - [OverrideBatchIn](docs/OverrideBatchIn.md)
 - [OverrideItem](docs/OverrideItem.md)
 - [OverrideOut](docs/OverrideOut.md)
 - [OwnedPackageOut](docs/OwnedPackageOut.md)
 - [OwnershipReasonOut](docs/OwnershipReasonOut.md)
 - [PackageDetailOut](docs/PackageDetailOut.md)
 - [PackageIn](docs/PackageIn.md)
 - [PackageMemberOut](docs/PackageMemberOut.md)
 - [PackageOut](docs/PackageOut.md)
 - [PackagePatchIn](docs/PackagePatchIn.md)
 - [PackageRuleIn](docs/PackageRuleIn.md)
 - [ProductLinkIn](docs/ProductLinkIn.md)
 - [ProductLinkOut](docs/ProductLinkOut.md)
 - [PublicPackageOut](docs/PublicPackageOut.md)
 - [ReasonKind](docs/ReasonKind.md)
 - [ReasonStatus](docs/ReasonStatus.md)
 - [ResolveIn](docs/ResolveIn.md)
 - [ResolveOut](docs/ResolveOut.md)
 - [ResourceNodeIn](docs/ResourceNodeIn.md)
 - [ResourceSummaryOut](docs/ResourceSummaryOut.md)
 - [ResourceType](docs/ResourceType.md)
 - [RuleBody](docs/RuleBody.md)
 - [RuleBodyOut](docs/RuleBodyOut.md)
 - [RuleOut](docs/RuleOut.md)
 - [RulePresetIn](docs/RulePresetIn.md)
 - [RulePresetListOut](docs/RulePresetListOut.md)
 - [RulePresetOut](docs/RulePresetOut.md)
 - [RulePresetPatchIn](docs/RulePresetPatchIn.md)
 - [State](docs/State.md)
 - [UnlockSpec](docs/UnlockSpec.md)
 - [ValidationError](docs/ValidationError.md)
 - [WinningLayer](docs/WinningLayer.md)
 - [WrappedResponseAccessResultOut](docs/WrappedResponseAccessResultOut.md)
 - [WrappedResponseConsumeOut](docs/WrappedResponseConsumeOut.md)
 - [WrappedResponseHealthOut](docs/WrappedResponseHealthOut.md)
 - [WrappedResponseIdOut](docs/WrappedResponseIdOut.md)
 - [WrappedResponseInt](docs/WrappedResponseInt.md)
 - [WrappedResponseListMemberOwnershipOut](docs/WrappedResponseListMemberOwnershipOut.md)
 - [WrappedResponseListOverrideOut](docs/WrappedResponseListOverrideOut.md)
 - [WrappedResponseListOwnedPackageOut](docs/WrappedResponseListOwnedPackageOut.md)
 - [WrappedResponseListOwnershipReasonOut](docs/WrappedResponseListOwnershipReasonOut.md)
 - [WrappedResponseListPackageMemberOut](docs/WrappedResponseListPackageMemberOut.md)
 - [WrappedResponseListPackageOut](docs/WrappedResponseListPackageOut.md)
 - [WrappedResponseListProductLinkOut](docs/WrappedResponseListProductLinkOut.md)
 - [WrappedResponseListResourceSummaryOut](docs/WrappedResponseListResourceSummaryOut.md)
 - [WrappedResponseListRuleOut](docs/WrappedResponseListRuleOut.md)
 - [WrappedResponsePackageDetailOut](docs/WrappedResponsePackageDetailOut.md)
 - [WrappedResponsePublicPackageOut](docs/WrappedResponsePublicPackageOut.md)
 - [WrappedResponseResolveOut](docs/WrappedResponseResolveOut.md)
 - [WrappedResponseRulePresetListOut](docs/WrappedResponseRulePresetListOut.md)
 - [WrappedResponseRulePresetOut](docs/WrappedResponseRulePresetOut.md)
 - [WrappedResponseWrittenOut](docs/WrappedResponseWrittenOut.md)
 - [WrittenOut](docs/WrittenOut.md)


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


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

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

<a id="Bearer Authorization"></a>
### Bearer Authorization

- **Type**: Bearer authentication


## Author




