Skip to content

Latest commit

 

History

History
428 lines (311 loc) · 20.2 KB

File metadata and controls

428 lines (311 loc) · 20.2 KB

affinidi_tdk_iota_client.IotaApi

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

Method HTTP request Description
aws_exchange_credentials POST /v1/aws-exchange-credentials
aws_exchange_credentials_project_token POST /v1/aws-exchange-credentials/project-token
fetch_iota_vp_response POST /v1/fetch-iota-response
initiate_data_sharing_request POST /v1/initiate-data-sharing-request
iota_exchange_credentials POST /v1/exchange-credentials

aws_exchange_credentials

AwsExchangeCredentialsOK aws_exchange_credentials(aws_exchange_credentials)

Exchange a limited-scoped token into a Cognito credential to generate the identity credential. The identity credential initiates the secure WebSocket connection from the client. This method is used only in WebSocket data-sharing mode.

Example

import time
import os
import affinidi_tdk_iota_client
from affinidi_tdk_iota_client.models.aws_exchange_credentials import AwsExchangeCredentials
from affinidi_tdk_iota_client.models.aws_exchange_credentials_ok import AwsExchangeCredentialsOK
from affinidi_tdk_iota_client.rest import ApiException
from pprint import pprint

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


# Enter a context with an instance of the API client
with affinidi_tdk_iota_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = affinidi_tdk_iota_client.IotaApi(api_client)
    aws_exchange_credentials = affinidi_tdk_iota_client.AwsExchangeCredentials() # AwsExchangeCredentials | AwsExchangeCredentials

    try:
        api_response = api_instance.aws_exchange_credentials(aws_exchange_credentials)
        print("The response of IotaApi->aws_exchange_credentials:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling IotaApi->aws_exchange_credentials: %s\n" % e)

Parameters

Name Type Description Notes
aws_exchange_credentials AwsExchangeCredentials AwsExchangeCredentials

Return type

AwsExchangeCredentialsOK

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 AwsExchangeCredentialsOK _ Access-Control-Allow-Origin -
_ Access-Control-Allow-Methods -
* Access-Control-Allow-Headers -
400 BadRequestError _ Access-Control-Allow-Origin -
_ Access-Control-Allow-Methods -
* Access-Control-Allow-Headers -
403 ForbiddenError _ Access-Control-Allow-Origin -
_ Access-Control-Allow-Methods -
* Access-Control-Allow-Headers -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

aws_exchange_credentials_project_token

IotaExchangeCredentialsOK aws_exchange_credentials_project_token(aws_exchange_credentials_project_token)

Exchange a Project Scoped Token into an identity credential directly to initiate a secure WebSocket connection. This method is used only in WebSocket data-sharing mode.

Example

  • Api Key Authentication (ProjectTokenAuth):
import time
import os
import affinidi_tdk_iota_client
from affinidi_tdk_iota_client.models.aws_exchange_credentials_project_token import AwsExchangeCredentialsProjectToken
from affinidi_tdk_iota_client.models.iota_exchange_credentials_ok import IotaExchangeCredentialsOK
from affinidi_tdk_iota_client.rest import ApiException
from pprint import pprint

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

# 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: ProjectTokenAuth
configuration.api_key['ProjectTokenAuth'] = 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['ProjectTokenAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with affinidi_tdk_iota_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = affinidi_tdk_iota_client.IotaApi(api_client)
    aws_exchange_credentials_project_token = affinidi_tdk_iota_client.AwsExchangeCredentialsProjectToken() # AwsExchangeCredentialsProjectToken | AwsExchangeCredentialsProjectToken

    try:
        api_response = api_instance.aws_exchange_credentials_project_token(aws_exchange_credentials_project_token)
        print("The response of IotaApi->aws_exchange_credentials_project_token:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling IotaApi->aws_exchange_credentials_project_token: %s\n" % e)

Parameters

Name Type Description Notes
aws_exchange_credentials_project_token AwsExchangeCredentialsProjectToken AwsExchangeCredentialsProjectToken

Return type

IotaExchangeCredentialsOK

Authorization

ProjectTokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 IotaExchangeCredentialsOK _ Access-Control-Allow-Origin -
_ Access-Control-Allow-Methods -
* Access-Control-Allow-Headers -
400 BadRequestError _ Access-Control-Allow-Origin -
_ Access-Control-Allow-Methods -
* Access-Control-Allow-Headers -
403 ForbiddenError _ Access-Control-Allow-Origin -
_ Access-Control-Allow-Methods -
* Access-Control-Allow-Headers -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

fetch_iota_vp_response

FetchIOTAVPResponseOK fetch_iota_vp_response(fetch_iotavp_response_input)

Fetches the client's callback that contains the user's shared data in a Verifiable Presentation format after a successful data-sharing flow.

Example

  • Api Key Authentication (ProjectTokenAuth):
import time
import os
import affinidi_tdk_iota_client
from affinidi_tdk_iota_client.models.fetch_iotavp_response_input import FetchIOTAVPResponseInput
from affinidi_tdk_iota_client.models.fetch_iotavp_response_ok import FetchIOTAVPResponseOK
from affinidi_tdk_iota_client.rest import ApiException
from pprint import pprint

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

# 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: ProjectTokenAuth
configuration.api_key['ProjectTokenAuth'] = 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['ProjectTokenAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with affinidi_tdk_iota_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = affinidi_tdk_iota_client.IotaApi(api_client)
    fetch_iotavp_response_input = affinidi_tdk_iota_client.FetchIOTAVPResponseInput() # FetchIOTAVPResponseInput | FetchIOTAVPResponseInput

    try:
        api_response = api_instance.fetch_iota_vp_response(fetch_iotavp_response_input)
        print("The response of IotaApi->fetch_iota_vp_response:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling IotaApi->fetch_iota_vp_response: %s\n" % e)

Parameters

Name Type Description Notes
fetch_iotavp_response_input FetchIOTAVPResponseInput FetchIOTAVPResponseInput

Return type

FetchIOTAVPResponseOK

Authorization

ProjectTokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 FetchIOTAVPResponseOK _ Access-Control-Allow-Origin -
_ Access-Control-Allow-Methods -
* Access-Control-Allow-Headers -
400 BadRequestError _ Access-Control-Allow-Origin -
_ Access-Control-Allow-Methods -
* Access-Control-Allow-Headers -
403 ForbiddenError _ Access-Control-Allow-Origin -
_ Access-Control-Allow-Methods -
* Access-Control-Allow-Headers -
404 NotFoundError _ Access-Control-Allow-Origin -
_ Access-Control-Allow-Methods -
* Access-Control-Allow-Headers -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

initiate_data_sharing_request

InitiateDataSharingRequestOK initiate_data_sharing_request(initiate_data_sharing_request_input)

Generates the request token for the Redirect mode to initiate the data-sharing flow.

Example

  • Api Key Authentication (ProjectTokenAuth):
import time
import os
import affinidi_tdk_iota_client
from affinidi_tdk_iota_client.models.initiate_data_sharing_request_input import InitiateDataSharingRequestInput
from affinidi_tdk_iota_client.models.initiate_data_sharing_request_ok import InitiateDataSharingRequestOK
from affinidi_tdk_iota_client.rest import ApiException
from pprint import pprint

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

# 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: ProjectTokenAuth
configuration.api_key['ProjectTokenAuth'] = 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['ProjectTokenAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with affinidi_tdk_iota_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = affinidi_tdk_iota_client.IotaApi(api_client)
    initiate_data_sharing_request_input = affinidi_tdk_iota_client.InitiateDataSharingRequestInput() # InitiateDataSharingRequestInput | InitiateDataSharingRequestInput

    try:
        api_response = api_instance.initiate_data_sharing_request(initiate_data_sharing_request_input)
        print("The response of IotaApi->initiate_data_sharing_request:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling IotaApi->initiate_data_sharing_request: %s\n" % e)

Parameters

Name Type Description Notes
initiate_data_sharing_request_input InitiateDataSharingRequestInput InitiateDataSharingRequestInput

Return type

InitiateDataSharingRequestOK

Authorization

ProjectTokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 InitiateDataSharingRequestOK _ Access-Control-Allow-Origin -
_ Access-Control-Allow-Methods -
* Access-Control-Allow-Headers -
400 BadRequestError _ Access-Control-Allow-Origin -
_ Access-Control-Allow-Methods -
* Access-Control-Allow-Headers -
403 ForbiddenError _ Access-Control-Allow-Origin -
_ Access-Control-Allow-Methods -
* Access-Control-Allow-Headers -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

iota_exchange_credentials

IotaExchangeCredentialsOK iota_exchange_credentials(iota_exchange_credentials)

Exchange a limited-scoped token into an identity credential directly to initiate a secure WebSocket connection. This method is used only in WebSocket data-sharing mode.

Example

import time
import os
import affinidi_tdk_iota_client
from affinidi_tdk_iota_client.models.iota_exchange_credentials import IotaExchangeCredentials
from affinidi_tdk_iota_client.models.iota_exchange_credentials_ok import IotaExchangeCredentialsOK
from affinidi_tdk_iota_client.rest import ApiException
from pprint import pprint

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


# Enter a context with an instance of the API client
with affinidi_tdk_iota_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = affinidi_tdk_iota_client.IotaApi(api_client)
    iota_exchange_credentials = affinidi_tdk_iota_client.IotaExchangeCredentials() # IotaExchangeCredentials | IotaAwsExchangeCredentials

    try:
        api_response = api_instance.iota_exchange_credentials(iota_exchange_credentials)
        print("The response of IotaApi->iota_exchange_credentials:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling IotaApi->iota_exchange_credentials: %s\n" % e)

Parameters

Name Type Description Notes
iota_exchange_credentials IotaExchangeCredentials IotaAwsExchangeCredentials

Return type

IotaExchangeCredentialsOK

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 IotaExchangeCredentialsOK _ Access-Control-Allow-Origin -
_ Access-Control-Allow-Methods -
* Access-Control-Allow-Headers -
400 BadRequestError _ Access-Control-Allow-Origin -
_ Access-Control-Allow-Methods -
* Access-Control-Allow-Headers -
403 ForbiddenError _ Access-Control-Allow-Origin -
_ Access-Control-Allow-Methods -
* Access-Control-Allow-Headers -

[Back to top] [Back to API list] [Back to Model list] [Back to README]