Skip to content

Latest commit

 

History

History
810 lines (623 loc) · 27.2 KB

EnclaveServiceApi.md

File metadata and controls

810 lines (623 loc) · 27.2 KB

madana_apiclient.EnclaveServiceApi

All URIs are relative to http://api.madana.io/rest

Method HTTP request Description
add_history POST /enclaves/{uuid}/history
approve_enclave POST /enclaves/{uuid}/approval
assign_enclave_agent POST /enclaves/{uuid}/assign
attestate_enclave POST /enclaves/{uuid}/attestation
create_enclave_run_request POST /enclaves
get_enclave GET /enclaves/{uuid}
get_enclave_types GET /enclaves/types
get_enclaves GET /enclaves Returns UUIDs of existing analyses.
get_stats GET /enclaves/stats
kill_enclave POST /enclaves/{uuid}/kill

add_history

file_type add_history(uuid)

Example

import time
import madana_apiclient
from madana_apiclient.api import enclave_service_api
from madana_apiclient.model.json_signed_data import JsonSignedData
from pprint import pprint
# Defining the host is optional and defaults to http://api.madana.io/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = madana_apiclient.Configuration(
    host = "http://api.madana.io/rest"
)


# Enter a context with an instance of the API client
with madana_apiclient.ApiClient() as api_client:
    # Create an instance of the API class
    api_instance = enclave_service_api.EnclaveServiceApi(api_client)
    uuid = "uuid_example" # str | 
    body = JsonSignedData(
        data="data_example",
        fingerpint="fingerpint_example",
        signature="signature_example",
    ) # JsonSignedData |  (optional)

    # example passing only required values which don't have defaults set
    try:
        api_response = api_instance.add_history(uuid)
        pprint(api_response)
    except madana_apiclient.ApiException as e:
        print("Exception when calling EnclaveServiceApi->add_history: %s\n" % e)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        api_response = api_instance.add_history(uuid, body=body)
        pprint(api_response)
    except madana_apiclient.ApiException as e:
        print("Exception when calling EnclaveServiceApi->add_history: %s\n" % e)

Parameters

Name Type Description Notes
uuid str
body JsonSignedData [optional]

Return type

file_type

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 -

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

approve_enclave

file_type approve_enclave(uuid)

Example

import time
import madana_apiclient
from madana_apiclient.api import enclave_service_api
from madana_apiclient.model.json_enclave_running_attestation_approval import JsonEnclaveRunningAttestationApproval
from pprint import pprint
# Defining the host is optional and defaults to http://api.madana.io/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = madana_apiclient.Configuration(
    host = "http://api.madana.io/rest"
)


# Enter a context with an instance of the API client
with madana_apiclient.ApiClient() as api_client:
    # Create an instance of the API class
    api_instance = enclave_service_api.EnclaveServiceApi(api_client)
    uuid = "uuid_example" # str | 
    body = JsonEnclaveRunningAttestationApproval() # JsonEnclaveRunningAttestationApproval |  (optional)

    # example passing only required values which don't have defaults set
    try:
        api_response = api_instance.approve_enclave(uuid)
        pprint(api_response)
    except madana_apiclient.ApiException as e:
        print("Exception when calling EnclaveServiceApi->approve_enclave: %s\n" % e)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        api_response = api_instance.approve_enclave(uuid, body=body)
        pprint(api_response)
    except madana_apiclient.ApiException as e:
        print("Exception when calling EnclaveServiceApi->approve_enclave: %s\n" % e)

Parameters

Name Type Description Notes
uuid str
body JsonEnclaveRunningAttestationApproval [optional]

Return type

file_type

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 -

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

assign_enclave_agent

file_type assign_enclave_agent(uuid)

Example

import time
import madana_apiclient
from madana_apiclient.api import enclave_service_api
from madana_apiclient.model.json_node_info import JsonNodeInfo
from pprint import pprint
# Defining the host is optional and defaults to http://api.madana.io/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = madana_apiclient.Configuration(
    host = "http://api.madana.io/rest"
)


# Enter a context with an instance of the API client
with madana_apiclient.ApiClient() as api_client:
    # Create an instance of the API class
    api_instance = enclave_service_api.EnclaveServiceApi(api_client)
    uuid = "uuid_example" # str | 
    body = JsonNodeInfo(
        ipfs_info=JsonIPFSSystemInfo(
            public_key="public_key_example",
            id="id_example",
            protocol_version="protocol_version_example",
            swarm_connection="swarm_connection_example",
            agent_version="agent_version_example",
        ),
        cpu_logical_count=1,
        hardware_firmware="hardware_firmware_example",
        public_key="public_key_example",
        connection_url="connection_url_example",
        hardware_baseboard="hardware_baseboard_example",
        cpu_family="cpu_family_example",
        operating_system_uptime=3.14,
        sgx_info=JsonSGXInfo(
            status="status_example",
            version="version_example",
        ),
        cpu_model="cpu_model_example",
        memory="memory_example",
        operating_system="operating_system_example",
        status="status_example",
        cpu_frequency="cpu_frequency_example",
        processors=[
            "processors_example",
        ],
        owner="owner_example",
        cpu_physical_cores=1,
    ) # JsonNodeInfo |  (optional)

    # example passing only required values which don't have defaults set
    try:
        api_response = api_instance.assign_enclave_agent(uuid)
        pprint(api_response)
    except madana_apiclient.ApiException as e:
        print("Exception when calling EnclaveServiceApi->assign_enclave_agent: %s\n" % e)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        api_response = api_instance.assign_enclave_agent(uuid, body=body)
        pprint(api_response)
    except madana_apiclient.ApiException as e:
        print("Exception when calling EnclaveServiceApi->assign_enclave_agent: %s\n" % e)

Parameters

Name Type Description Notes
uuid str
body JsonNodeInfo [optional]

Return type

file_type

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 -

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

attestate_enclave

file_type attestate_enclave(uuid)

Example

import time
import madana_apiclient
from madana_apiclient.api import enclave_service_api
from madana_apiclient.model.json_enclave_running_attestation import JsonEnclaveRunningAttestation
from pprint import pprint
# Defining the host is optional and defaults to http://api.madana.io/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = madana_apiclient.Configuration(
    host = "http://api.madana.io/rest"
)


# Enter a context with an instance of the API client
with madana_apiclient.ApiClient() as api_client:
    # Create an instance of the API class
    api_instance = enclave_service_api.EnclaveServiceApi(api_client)
    uuid = "uuid_example" # str | 
    body = JsonEnclaveRunningAttestation(
        node_info=JsonNodeInfo(
            ipfs_info=JsonIPFSSystemInfo(
                public_key="public_key_example",
                id="id_example",
                protocol_version="protocol_version_example",
                swarm_connection="swarm_connection_example",
                agent_version="agent_version_example",
            ),
            cpu_logical_count=1,
            hardware_firmware="hardware_firmware_example",
            public_key="public_key_example",
            connection_url="connection_url_example",
            hardware_baseboard="hardware_baseboard_example",
            cpu_family="cpu_family_example",
            operating_system_uptime=3.14,
            sgx_info=JsonSGXInfo(
                status="status_example",
                version="version_example",
            ),
            cpu_model="cpu_model_example",
            memory="memory_example",
            operating_system="operating_system_example",
            status="status_example",
            cpu_frequency="cpu_frequency_example",
            processors=[
                "processors_example",
            ],
            owner="owner_example",
            cpu_physical_cores=1,
        ),
        enclave_process=JsonEnclaveProcess(
            signer_ident="signer_ident_example",
            status="status_example",
            wg_interface=JsonWireguardInterface(),
            startup_cmd="startup_cmd_example",
            ending_time="ending_time_example",
            remote_control_server="remote_control_server_example",
            internal_wireguard_server="internal_wireguard_server_example",
            internal_remote_control_server="internal_remote_control_server_example",
            internal_ident="internal_ident_example",
            kubernetes_enclave=JsonKubernetesEnclave(),
            wireguard_server="wireguard_server_example",
            port_mapping={
                "key": "key_example",
            },
            attestation_server="attestation_server_example",
            process=JsonProcess(
                input_stream={},
                alive=True,
                error_stream={},
                output_stream={},
            ),
            public_ident="public_ident_example",
            startup_time="startup_time_example",
            environment=JsonEnvironment(
                name="name_example",
                default_run_configuration=JsonRunConfig(
                    args=[
                        "args_example",
                    ],
                    run="run_example",
                    disk_config=[
                        JsonDiskConfig(
                            roothash="roothash_example",
                            roothash_offset=1,
                            disk="disk_example",
                            readonly=True,
                        ),
                    ],
                    environment={
                        "key": "key_example",
                    },
                ),
                ipfs_hash="ipfs_hash_example",
                root_hash_offset="root_hash_offset_example",
                content=[
                    "content_example",
                ],
                packages=[
                    "packages_example",
                ],
                description="description_example",
                published=True,
                uuid="uuid_example",
                roothash="roothash_example",
                size="size_example",
            ),
            console_output="console_output_example",
            wireguard_public_key="wireguard_public_key_example",
            enclave_ident="enclave_ident_example",
            internal_attesation_server="internal_attesation_server_example",
            enclave_inputstream={},
            ports=[
                JsonEnclavePort(
                    port="port_example",
                    protocol="protocol_example",
                    name="name_example",
                ),
            ],
        ),
    ) # JsonEnclaveRunningAttestation |  (optional)

    # example passing only required values which don't have defaults set
    try:
        api_response = api_instance.attestate_enclave(uuid)
        pprint(api_response)
    except madana_apiclient.ApiException as e:
        print("Exception when calling EnclaveServiceApi->attestate_enclave: %s\n" % e)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        api_response = api_instance.attestate_enclave(uuid, body=body)
        pprint(api_response)
    except madana_apiclient.ApiException as e:
        print("Exception when calling EnclaveServiceApi->attestate_enclave: %s\n" % e)

Parameters

Name Type Description Notes
uuid str
body JsonEnclaveRunningAttestation [optional]

Return type

file_type

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 -

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

create_enclave_run_request

file_type create_enclave_run_request()

Example

import time
import madana_apiclient
from madana_apiclient.api import enclave_service_api
from madana_apiclient.model.json_enclave_run_request import JsonEnclaveRunRequest
from pprint import pprint
# Defining the host is optional and defaults to http://api.madana.io/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = madana_apiclient.Configuration(
    host = "http://api.madana.io/rest"
)


# Enter a context with an instance of the API client
with madana_apiclient.ApiClient() as api_client:
    # Create an instance of the API class
    api_instance = enclave_service_api.EnclaveServiceApi(api_client)
    body = JsonEnclaveRunRequest(
        environment_uuid="environment_uuid_example",
        enclave_execution_type="enclave_execution_type_example",
        using_default_run_config=True,
        ports=[
            JsonEnclavePort(
                port="port_example",
                protocol="protocol_example",
                name="name_example",
            ),
        ],
        wireguard_public_key="wireguard_public_key_example",
    ) # JsonEnclaveRunRequest |  (optional)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        api_response = api_instance.create_enclave_run_request(body=body)
        pprint(api_response)
    except madana_apiclient.ApiException as e:
        print("Exception when calling EnclaveServiceApi->create_enclave_run_request: %s\n" % e)

Parameters

Name Type Description Notes
body JsonEnclaveRunRequest [optional]

Return type

file_type

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 -

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

get_enclave

file_type get_enclave(uuid)

Example

import time
import madana_apiclient
from madana_apiclient.api import enclave_service_api
from pprint import pprint
# Defining the host is optional and defaults to http://api.madana.io/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = madana_apiclient.Configuration(
    host = "http://api.madana.io/rest"
)


# Enter a context with an instance of the API client
with madana_apiclient.ApiClient() as api_client:
    # Create an instance of the API class
    api_instance = enclave_service_api.EnclaveServiceApi(api_client)
    uuid = "uuid_example" # str | 

    # example passing only required values which don't have defaults set
    try:
        api_response = api_instance.get_enclave(uuid)
        pprint(api_response)
    except madana_apiclient.ApiException as e:
        print("Exception when calling EnclaveServiceApi->get_enclave: %s\n" % e)

Parameters

Name Type Description Notes
uuid str

Return type

file_type

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

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

get_enclave_types

file_type get_enclave_types()

Example

import time
import madana_apiclient
from madana_apiclient.api import enclave_service_api
from pprint import pprint
# Defining the host is optional and defaults to http://api.madana.io/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = madana_apiclient.Configuration(
    host = "http://api.madana.io/rest"
)


# Enter a context with an instance of the API client
with madana_apiclient.ApiClient() as api_client:
    # Create an instance of the API class
    api_instance = enclave_service_api.EnclaveServiceApi(api_client)

    # example, this endpoint has no required or optional parameters
    try:
        api_response = api_instance.get_enclave_types()
        pprint(api_response)
    except madana_apiclient.ApiException as e:
        print("Exception when calling EnclaveServiceApi->get_enclave_types: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

file_type

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

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

get_enclaves

file_type get_enclaves()

Returns UUIDs of existing analyses.

Returns UUIDs of existing analyses.

Example

import time
import madana_apiclient
from madana_apiclient.api import enclave_service_api
from pprint import pprint
# Defining the host is optional and defaults to http://api.madana.io/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = madana_apiclient.Configuration(
    host = "http://api.madana.io/rest"
)


# Enter a context with an instance of the API client
with madana_apiclient.ApiClient() as api_client:
    # Create an instance of the API class
    api_instance = enclave_service_api.EnclaveServiceApi(api_client)
    authorization = "Authorization_example" # str | Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c (optional)
    created = "true" # str | - if Queryparam \"created=true\" only the UUIDs of own Requests are shown (optional) if omitted the server will use the default value of "true"
    limit = "30" # str | Used for offset pagination. Limit/Offset Paging would look like GET /request?limit=20&offset=100. This query would return the 20 rows starting with the 100th row (optional) if omitted the server will use the default value of "30"
    offset = "0" # str | Used for offset pagination. Limit/Offset Paging would look like GET /request?limit=20&offset=100. This query would return the 20 rows starting with the 100th row (optional) if omitted the server will use the default value of "0"
    status = "status_example" # str |  (optional)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        # Returns UUIDs of existing analyses.
        api_response = api_instance.get_enclaves(authorization=authorization, created=created, limit=limit, offset=offset, status=status)
        pprint(api_response)
    except madana_apiclient.ApiException as e:
        print("Exception when calling EnclaveServiceApi->get_enclaves: %s\n" % e)

Parameters

Name Type Description Notes
authorization str Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c [optional]
created str - if Queryparam "created=true" only the UUIDs of own Requests are shown [optional] if omitted the server will use the default value of "true"
limit str Used for offset pagination. Limit/Offset Paging would look like GET /request?limit=20&offset=100. This query would return the 20 rows starting with the 100th row [optional] if omitted the server will use the default value of "30"
offset str Used for offset pagination. Limit/Offset Paging would look like GET /request?limit=20&offset=100. This query would return the 20 rows starting with the 100th row [optional] if omitted the server will use the default value of "0"
status str [optional]

Return type

file_type

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 If the actions could be loaded -
500 If an servsided error occurs -

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

get_stats

file_type get_stats()

Example

import time
import madana_apiclient
from madana_apiclient.api import enclave_service_api
from pprint import pprint
# Defining the host is optional and defaults to http://api.madana.io/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = madana_apiclient.Configuration(
    host = "http://api.madana.io/rest"
)


# Enter a context with an instance of the API client
with madana_apiclient.ApiClient() as api_client:
    # Create an instance of the API class
    api_instance = enclave_service_api.EnclaveServiceApi(api_client)
    dayssince = "30" # str |  (optional) if omitted the server will use the default value of "30"

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        api_response = api_instance.get_stats(dayssince=dayssince)
        pprint(api_response)
    except madana_apiclient.ApiException as e:
        print("Exception when calling EnclaveServiceApi->get_stats: %s\n" % e)

Parameters

Name Type Description Notes
dayssince str [optional] if omitted the server will use the default value of "30"

Return type

file_type

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 -

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

kill_enclave

file_type kill_enclave(uuid)

Example

import time
import madana_apiclient
from madana_apiclient.api import enclave_service_api
from pprint import pprint
# Defining the host is optional and defaults to http://api.madana.io/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = madana_apiclient.Configuration(
    host = "http://api.madana.io/rest"
)


# Enter a context with an instance of the API client
with madana_apiclient.ApiClient() as api_client:
    # Create an instance of the API class
    api_instance = enclave_service_api.EnclaveServiceApi(api_client)
    uuid = "uuid_example" # str | 

    # example passing only required values which don't have defaults set
    try:
        api_response = api_instance.kill_enclave(uuid)
        pprint(api_response)
    except madana_apiclient.ApiException as e:
        print("Exception when calling EnclaveServiceApi->kill_enclave: %s\n" % e)

Parameters

Name Type Description Notes
uuid str

Return type

file_type

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 -

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