affinidi_tdk_iam_client 1.62.0
Iam
License: Apache-2.0
Requires Python: <4.0,>=3.8
Keywords: OpenAPI, OpenAPI-Generator, Iam

# affinidi_tdk_iam_client

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

For more information, please visit [https://www.affinidi.com](https://www.affinidi.com)

Documentation is available at [https://docs.affinidi.com/dev-tools/affinidi-tdk](https://docs.affinidi.com/dev-tools/affinidi-tdk)

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

Then import the package:

```python
import affinidi_tdk_iam_client
```

### Setuptools

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

```sh
python setup.py install --user
```

Then import the package:

```python
import affinidi_tdk_iam_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 affinidi_tdk_iam_client
from affinidi_tdk_iam_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://apse1.api.affinidi.io/iam
# See configuration.py for a list of all supported configuration parameters.
configuration = affinidi_tdk_iam_client.Configuration(
    host = "https://apse1.api.affinidi.io/iam"
)

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

# Configure a hook to auto-refresh API key for your personal access token (PAT), if expired
import affinidi_tdk_auth_provider

stats = {
  apiGatewayUrl,
  keyId,
  passphrase,
  privateKey,
  projectId,
  tokenEndpoint,
  tokenId,
}
authProvider = affinidi_tdk_auth_provider.AuthProvider(stats)
configuration.refresh_api_key_hook = lambda api_client: authProvider.fetch_project_scoped_token()

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


# Enter a context with an instance of the API client
with affinidi_tdk_iam_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = affinidi_tdk_iam_client.AuthzApi(api_client)
    grantee_did = 'grantee_did_example' # str |

    try:
        # delete access of granteeDid
        api_instance.delete_access_vfs(grantee_did)
    except ApiException as e:
        print("Exception when calling AuthzApi->delete_access_vfs: %s\n" % e)

```

## Documentation for API Endpoints

All URIs are relative to *https://apse1.api.affinidi.io/iam*

| Class             | Method                                                                                   | HTTP request                                     | Description                             |
| ----------------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------ | --------------------------------------- |
| _AuthzApi_        | [**delete_access_vfs**](docs/AuthzApi.md#delete_access_vfs)                              | **DELETE** /v1/authz/vfs/access/{granteeDid}     | delete access of granteeDid             |
| _AuthzApi_        | [**grant_access_vfs**](docs/AuthzApi.md#grant_access_vfs)                                | **POST** /v1/authz/vfs/access                    | Grant access to the virtual file system |
| _AuthzApi_        | [**update_access_vfs**](docs/AuthzApi.md#update_access_vfs)                              | **PUT** /v1/authz/vfs/access/{granteeDid}        | Update access of granteeDid             |
| _ConsumerAuthApi_ | [**consumer_auth_token_endpoint**](docs/ConsumerAuthApi.md#consumer_auth_token_endpoint) | **POST** /v1/consumer/oauth2/token               | The Consumer OAuth 2.0 Token Endpoint   |
| _DefaultApi_      | [**v1_auth_proxy_delete**](docs/DefaultApi.md#v1_auth_proxy_delete)                      | **DELETE** /v1/auth/{proxy+}                     |
| _DefaultApi_      | [**v1_auth_proxy_get**](docs/DefaultApi.md#v1_auth_proxy_get)                            | **GET** /v1/auth/{proxy+}                        |
| _DefaultApi_      | [**v1_auth_proxy_patch**](docs/DefaultApi.md#v1_auth_proxy_patch)                        | **PATCH** /v1/auth/{proxy+}                      |
| _DefaultApi_      | [**v1_auth_proxy_post**](docs/DefaultApi.md#v1_auth_proxy_post)                          | **POST** /v1/auth/{proxy+}                       |
| _DefaultApi_      | [**v1_auth_proxy_put**](docs/DefaultApi.md#v1_auth_proxy_put)                            | **PUT** /v1/auth/{proxy+}                        |
| _DefaultApi_      | [**v1_idp_proxy_delete**](docs/DefaultApi.md#v1_idp_proxy_delete)                        | **DELETE** /v1/idp/{proxy+}                      |
| _DefaultApi_      | [**v1_idp_proxy_get**](docs/DefaultApi.md#v1_idp_proxy_get)                              | **GET** /v1/idp/{proxy+}                         |
| _DefaultApi_      | [**v1_idp_proxy_patch**](docs/DefaultApi.md#v1_idp_proxy_patch)                          | **PATCH** /v1/idp/{proxy+}                       |
| _DefaultApi_      | [**v1_idp_proxy_post**](docs/DefaultApi.md#v1_idp_proxy_post)                            | **POST** /v1/idp/{proxy+}                        |
| _DefaultApi_      | [**v1_idp_proxy_put**](docs/DefaultApi.md#v1_idp_proxy_put)                              | **PUT** /v1/idp/{proxy+}                         |
| _PoliciesApi_     | [**get_policies**](docs/PoliciesApi.md#get_policies)                                     | **GET** /v1/policies/principals/{principalId}    |
| _PoliciesApi_     | [**update_policies**](docs/PoliciesApi.md#update_policies)                               | **PUT** /v1/policies/principals/{principalId}    |
| _ProjectsApi_     | [**add_principal_to_project**](docs/ProjectsApi.md#add_principal_to_project)             | **POST** /v1/projects/principals                 |
| _ProjectsApi_     | [**create_project**](docs/ProjectsApi.md#create_project)                                 | **POST** /v1/projects                            |
| _ProjectsApi_     | [**delete_principal_from_project**](docs/ProjectsApi.md#delete_principal_from_project)   | **DELETE** /v1/projects/principals/{principalId} |
| _ProjectsApi_     | [**list_principals_of_project**](docs/ProjectsApi.md#list_principals_of_project)         | **GET** /v1/projects/principals                  |
| _ProjectsApi_     | [**list_project**](docs/ProjectsApi.md#list_project)                                     | **GET** /v1/projects                             |
| _ProjectsApi_     | [**update_project**](docs/ProjectsApi.md#update_project)                                 | **PATCH** /v1/projects/{projectId}               |
| _StsApi_          | [**create_project_scoped_token**](docs/StsApi.md#create_project_scoped_token)            | **POST** /v1/sts/create-project-scoped-token     |
| _StsApi_          | [**whoami**](docs/StsApi.md#whoami)                                                      | **GET** /v1/sts/whoami                           |
| _TokensApi_       | [**create_token**](docs/TokensApi.md#create_token)                                       | **POST** /v1/tokens                              |
| _TokensApi_       | [**delete_token**](docs/TokensApi.md#delete_token)                                       | **DELETE** /v1/tokens/{tokenId}                  |
| _TokensApi_       | [**get_token**](docs/TokensApi.md#get_token)                                             | **GET** /v1/tokens/{tokenId}                     |
| _TokensApi_       | [**list_projects_of_token**](docs/TokensApi.md#list_projects_of_token)                   | **GET** /v1/tokens/{tokenId}/projects            |
| _TokensApi_       | [**list_token**](docs/TokensApi.md#list_token)                                           | **GET** /v1/tokens                               |
| _TokensApi_       | [**update_token**](docs/TokensApi.md#update_token)                                       | **PATCH** /v1/tokens/{tokenId}                   |
| _WellKnownApi_    | [**get_well_known_did**](docs/WellKnownApi.md#get_well_known_did)                        | **GET** /.well-known/did.json                    |
| _WellKnownApi_    | [**get_well_known_jwks**](docs/WellKnownApi.md#get_well_known_jwks)                      | **GET** /.well-known/jwks.json                   |

## Documentation For Models

- [ActionForbiddenError](docs/ActionForbiddenError.md)
- [AddUserToProjectInput](docs/AddUserToProjectInput.md)
- [ConsumerAuthTokenEndpointInput](docs/ConsumerAuthTokenEndpointInput.md)
- [ConsumerAuthTokenEndpointOutput](docs/ConsumerAuthTokenEndpointOutput.md)
- [CorsConsumerAuthTokenEndpointOK](docs/CorsConsumerAuthTokenEndpointOK.md)
- [CorsGrantAccessVfsOK](docs/CorsGrantAccessVfsOK.md)
- [CorsUpdateAccessVfsOK](docs/CorsUpdateAccessVfsOK.md)
- [CreateProjectInput](docs/CreateProjectInput.md)
- [CreateProjectScopedTokenInput](docs/CreateProjectScopedTokenInput.md)
- [CreateProjectScopedTokenOutput](docs/CreateProjectScopedTokenOutput.md)
- [CreateTokenInput](docs/CreateTokenInput.md)
- [DeleteAccessOutput](docs/DeleteAccessOutput.md)
- [GrantAccessInput](docs/GrantAccessInput.md)
- [GrantAccessOutput](docs/GrantAccessOutput.md)
- [InvalidDIDError](docs/InvalidDIDError.md)
- [InvalidJwtTokenError](docs/InvalidJwtTokenError.md)
- [InvalidParameterError](docs/InvalidParameterError.md)
- [JsonWebKeyDto](docs/JsonWebKeyDto.md)
- [JsonWebKeySetDto](docs/JsonWebKeySetDto.md)
- [NotFoundError](docs/NotFoundError.md)
- [PolicyDto](docs/PolicyDto.md)
- [PolicyStatementDto](docs/PolicyStatementDto.md)
- [PrincipalCannotBeDeletedError](docs/PrincipalCannotBeDeletedError.md)
- [PrincipalDoesNotBelongToProjectError](docs/PrincipalDoesNotBelongToProjectError.md)
- [ProjectDto](docs/ProjectDto.md)
- [ProjectList](docs/ProjectList.md)
- [ProjectWithPolicyDto](docs/ProjectWithPolicyDto.md)
- [ProjectWithPolicyList](docs/ProjectWithPolicyList.md)
- [PublicKeyCannotBeResolvedFromDidError](docs/PublicKeyCannotBeResolvedFromDidError.md)
- [RightsEnum](docs/RightsEnum.md)
- [ServiceErrorResponse](docs/ServiceErrorResponse.md)
- [ServiceErrorResponseDetailsInner](docs/ServiceErrorResponseDetailsInner.md)
- [TokenDto](docs/TokenDto.md)
- [TokenList](docs/TokenList.md)
- [TokenPrivateKeyAuthenticationMethodDto](docs/TokenPrivateKeyAuthenticationMethodDto.md)
- [TokenPrivateKeyAuthenticationMethodDtoPublicKeyInfo](docs/TokenPrivateKeyAuthenticationMethodDtoPublicKeyInfo.md)
- [TokenPrivateKeyAuthenticationMethodDtoPublicKeyInfoOneOf](docs/TokenPrivateKeyAuthenticationMethodDtoPublicKeyInfoOneOf.md)
- [TokenPrivateKeyAuthenticationMethodDtoPublicKeyInfoOneOf1](docs/TokenPrivateKeyAuthenticationMethodDtoPublicKeyInfoOneOf1.md)
- [TypedPrincipalId](docs/TypedPrincipalId.md)
- [UnauthorizedError](docs/UnauthorizedError.md)
- [UnexpectedError](docs/UnexpectedError.md)
- [UpdateAccessInput](docs/UpdateAccessInput.md)
- [UpdateAccessOutput](docs/UpdateAccessOutput.md)
- [UpdateProjectInput](docs/UpdateProjectInput.md)
- [UpdateTokenInput](docs/UpdateTokenInput.md)
- [UpdateTokenPrivateKeyAuthenticationMethodDto](docs/UpdateTokenPrivateKeyAuthenticationMethodDto.md)
- [UserDto](docs/UserDto.md)
- [UserList](docs/UserList.md)
- [WhoamiDto](docs/WhoamiDto.md)

<a id="documentation-for-authorization"></a>

## Documentation For Authorization

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

### HeritageTokenAuth

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

<a id="UserTokenAuth"></a>

### UserTokenAuth

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

<a id="ProjectTokenAuth"></a>

### ProjectTokenAuth

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

<a id="ConsumerTokenAuth"></a>

### ConsumerTokenAuth

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

## Author

info@affinidi.com