Syntropy SDK for Python
Project description
Syntropy SDK
Syntropy SDK for Python allows you to manage Syntropy Networks using simple Python interface.
This Python package is automatically generated by the Swagger Codegen project:
- API version: 0.1.0
- Package version: 0.3.0
Requirements.
Python 3.6+
Installation & Usage
pip install
Install the SDK simply using pip:
pip install syntropy_sdk
If the python package is hosted on Github, you can install directly from Github
pip install git+https://github.com/SyntropyNet/syntropy-python-sdk.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/SyntropyNet/syntropy-python-sdk.git
)
Then import the package:
import syntropy_sdk
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import syntropy_sdk
Getting Started
Please follow the installation procedure and then use the following as a reference:
import syntropy_sdk as sdk
from syntropy_sdk.exceptions import ApiException
from syntropy_sdk.utils import WithRetry
from pprint import pprint
# Configure API
config = sdk.Configuration()
config.host = "url to the Syntropy Stack"
config.api_key["Authorization"] = "your api authorizaton token"
api = sdk.ApiClient(config)
platform_api = sdk.NetworkApi(api)
try:
api_response = WithRetry(platform_api.platform_network_info)()
pprint(api_response)
except ApiException as e:
print("Exception when calling NetworkApi->platform_network_info: %s\n" % e)
# Create connections
connections_api = sdk.ConectionsApi(api)
try:
body = {
"agent_ids": [
0, 1, # Valid agent IDs
1, 2,
2, 4,
],
}
connections = connections_api.platform_connection_create_p2p(body=body)["data"]
except ApiException as e:
print("Exception when creating a network: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to /
Class | Method | HTTP request | Description |
---|---|---|---|
APIAuthApi | v1_auth_acess_token_login | POST /api/auth/v1/access-token/login | Access Token Login |
APIKeysApi | create_api_key | POST /auth/api-key | Create API key |
APIKeysApi | delete_api_key | DELETE /auth/api-key/{api_key_id} | Delete API keys |
APIKeysApi | get_api_key | GET /auth/api-key | Get API keys |
AuthApi | add_contact | POST /auth/authorization/contact | Update user contacts |
AuthApi | auth_access_token_list | GET /auth/authorization/access-token | Get access tokens |
AuthApi | auth_access_token_login | POST /auth/authorization/access-token/login | Login (access token) |
AuthApi | auth_access_token_permissions_list | GET /auth/authorization/permissions/access-token | Get access token permissions |
AuthApi | auth_access_token_user_create | POST /auth/authorization/access-token | Create access token |
AuthApi | auth_access_token_user_delete | DELETE /auth/authorization/access-token/{id} | Delete access token |
AuthApi | auth_logout | POST /auth/authorization/logout | Logout |
AuthApi | auth_show_user | GET /auth/authorization/user | Get user info |
AuthApi | auth_verify_email | GET /auth/authorization/verify-email/{code} | Verify email |
AuthApi | update_settings | PUT /auth/authorization/settings | Update user settings |
MFAApi | confirm_mfa_secret | POST /auth/mfa/confirm | Confirm MFA |
MFAApi | disable_mfa | POST /auth/mfa/disable | Disable MFA |
MFAApi | disable_mfa_using_backup | POST /auth/mfa/disable-using-backup | Disable MFA (backup) |
MFAApi | generate_mfa_secret | GET /auth/mfa/generate | Generate MFA |
AgentsApi | platform_agent_config | GET /api/platform/agent/{agent_id}/config | Get agent config |
AgentsApi | platform_agent_coordinates | POST /api/platform/agents/coordinates | Get coordinates |
AgentsApi | platform_agent_create | POST /api/platform/agents | Create agent |
AgentsApi | platform_agent_id_name_pairs | GET /api/platform/agents/filters | Get agents (id,name) |
AgentsApi | platform_agent_index | GET /api/platform/agents | Get agents |
AgentsApi | platform_agent_provider_index | GET /api/platform/agent-providers | Get agent providers |
AgentsApi | platform_agent_provider_show | GET /api/platform/agent-providers/{id} | Get agent provider |
AgentsApi | platform_agent_tag_index | GET /api/platform/agent-tags | Get agent tags |
AgentsApi | platform_agent_update | PATCH /api/platform/agents/{agent_id} | Update agent |
AgentsApi | platform_agents_destroy | POST /api/platform/agents/remove | Delete agent |
AgentsApi | platform_config | GET /api/platform/agent/{agent_id}/wg-config | Get agent wg config |
AgentsApi | platform_logs_read_timestamp | POST /api/platform/logs-reads-timestamp | Get logs reads timestamps |
AgentsApi | v1_platform_delete_agents | POST /api/platform/v1/agents/delete | Delete Agents |
AgentsApi | v1_platform_get_agents | POST /api/platform/v1/agents | Get Agents |
AgentsLogsApi | search_platform_agent | POST /api/search/platform-agents | Get agents log |
AgentsLogsApi | search_platform_agent_error | POST /api/search/platform-agents-errors | Get agents errors log |
ConnectionsApi | platform_connection_agents_destroy | POST /api/platform/connections/agents/remove | Delete connections |
ConnectionsApi | platform_connection_create_mesh | POST /api/platform/connections/mesh | Create connections (mesh) |
ConnectionsApi | platform_connection_create_p2p | POST /api/platform/connections/point-to-point | Create connections (p2p) |
ConnectionsApi | platform_connection_groups_destroy | POST /api/platform/connections/groups/remove | Delete connections (groups) |
ConnectionsApi | platform_connection_groups_index | GET /api/platform/connections/groups | Get connections (groups) |
ConnectionsApi | platform_connection_groups_sdn_toggle | PATCH /api/platform/connections/groups | Toggles SDN for specific connection |
ConnectionsApi | platform_connection_index | GET /api/platform/connections | Get connections |
ConnectionsApi | v1_platform_create_connections_mesh | POST /api/platform/v1/connections/mesh | Create Connections Mesh |
ConnectionsApi | v1_platform_create_p2p_connections | POST /api/platform/v1/connections/point-to-point | Create P2P Connections |
ConnectionsApi | v1_platform_delete_connections_groups | POST /api/platform/v1/connections/groups/delete | Delete Connections |
ConnectionsApi | v1_platform_get_connections_groups | POST /api/platform/v1/connections/groups | Get Connections |
NetworkApi | platform_network_info | GET /api/platform/network/info | Get network |
PublicApi | public_health | GET /api/public/health | Get health |
PublicApi | public_info | GET /api/public/info | Get info |
ServicesApi | platform_agent_service_destroy | POST /api/platform/agent-services-delete | Delete services |
ServicesApi | platform_agent_service_index | GET /api/platform/agent-services | Get services |
ServicesApi | platform_agent_service_subnet_update | POST /api/platform/agent-services-subnets | Update service status |
ServicesApi | platform_connection_service_show | GET /api/platform/connections/services | Get services |
ServicesApi | platform_connection_service_update | POST /api/platform/connections/services | Create services |
ServicesApi | platform_connection_subnet_destroy | POST /api/platform/connections/services/remove | Delete services |
UserApi | setting_create | POST /api/settings | Update user settings |
UserApi | setting_index | GET /api/settings | Get user settings |
RulesApi | rules_connection_point_to_tag_create | POST /api/rules/connections/point-to-tag | Create point-to-tag |
RulesApi | rules_connection_point_to_tag_remove | POST /api/rules/connections/point-to-tag/remove | Remove point-to-tag |
RulesApi | rules_connection_point_to_tag_search | POST /api/rules/connections/point-to-tag/search | Search point-to-tag |
RulesApi | rules_connection_point_to_tag_show_by_id | GET /api/rules/connections/point-to-tag/{agent_id} | Get point-to-tag |
RulesApi | rules_connection_point_to_tag_update | PATCH /api/rules/connections/point-to-tag | Patch point-to-tag |
RulesApi | rules_search | POST /api/rules/search | Search rules |
Documentation For Models
- AccessTokenData
- AccessTokenLoginRequestV1
- AccessTokenOrder
- AccessTokenReadData
- AccessTokenWriteData
- AnyOfApiKeyCreateRequestApiKeyValidUntil
- AnyOfApiKeyDtoApiKeyCreatedAt
- AnyOfApiKeyDtoApiKeyUpdatedAt
- AnyOfApiKeyDtoApiKeyValidUntil
- AnyOfApiKeyObjectApiKeyCreatedAt
- AnyOfApiKeyObjectApiKeyUpdatedAt
- AnyOfApiKeyObjectApiKeyValidUntil
- AnyOfAuthResponseV1AzureUserTokenDto_
- AnyOfVerifyMFARequestCode
- ApiKeyCreateRequest
- ApiKeyDto
- ApiKeyId
- ApiKeyObject
- ApiResponseApiKeyDtoArray_
- ApiResponseApiKeyObject_
- AuthErrorResponseV1
- AuthErrorResponseV1Errors
- AuthResponseV1AzureUserTokenDto_
- AuthSource
- AuthSuccessResponseV1AzureUserTokenDto_
- AzureUserTokenDto
- CheckMFAForNewSocialAccountRequest
- CheckMFAForNewSocialAccountResponse
- CodeGenerationResponse
- ConfirmMFARequest
- ContactRequest
- DisableMFARequest
- DisableMFAUsingBackupRequest
- LoginRequest
- MFABackupCode
- MFACode
- MfaCodeType
- PermissionObject
- UserDataResponse
- UserSettingsObject
- VerifyMFARequest
- AdminAgentConfig
- AgentConnGroupAgentObject
- AgentConnGroupFindAndCountObject
- AgentConnGroupWithServicesObject
- AgentConnectionAgentAgentTagObject
- AgentConnectionAgentObject
- AgentConnectionFindAndCountObject
- AgentConnectionGroupIdObject
- AgentConnectionObject
- AgentConnectionStatus
- AgentConnectionSubnetStatuses
- AgentConnectionSubnetsDeletionObject
- AgentConnectionWithServicesAgent
- AgentConnectionWithServicesAgentAgentServiceSubnets
- AgentConnectionWithServicesAgentAgentServices
- AgentCoordinatesObject
- AgentCreateAgentObject
- AgentFiltersObject
- AgentFoundAndCountObject
- AgentInterfaceBwObject
- AgentInterfaceMetadata
- AgentInterfaceModelObject
- AgentInterfaceObject
- AgentInterfacesMetadata
- AgentLockedFields
- AgentMessagePayload
- AgentMessageType
- AgentNetworkObject
- AgentObject
- AgentPathObject
- AgentProvider
- AgentProviderObject
- AgentProviderOrderString
- AgentServiceGetServicesByAgentIdUserIdObject
- AgentServiceTypes
- AgentServicesDeletionObject
- AgentServicesUpdateChangesObject
- AgentSuccessResponse
- AgentTagModelObject
- AgentVersion
- AgentWgConfig
- AgentsCoordinatesBody
- AgentsObject
- AgentsPairObject
- AllOfUserAgentPatchObjectAgentLocationCity
- AllOfUserAgentPatchObjectAgentLocationCountry
- AllOfUserAgentPatchObjectAgentLocationLat
- AllOfUserAgentPatchObjectAgentLocationLon
- AllOfUserAgentPatchObjectAgentProviderId
- AnyOfAgentMessagePayload
- AnyOfConnectionCreationBodyAgentIds
- AnyOfGetAgentsRequestOrderV1
- AnyOfGetConnectionsGroupsRequestOrderV1
- AnyOfPlatformResponseErrorItemValue
- AnyOfPlatformResponseV1GetAgentsResponseV1_
- AnyOfPlatformResponseV1GetConnectionsGroupsResponseV1_
- AnyOfVppCallableObject
- AnyOfWgCallableObject
- ApiKeyObject
- AutoPingPayload
- BaseRequestOrderV1
- BehaviorType
- BiStatistics
- BiStatisticsEdgesPost
- ChangePathObject
- ChangePathObjectData
- ChangePathObjectDataCosts
- ColorObject
- ConnGroupSdnChangeObject
- ConnGroupSdnToggleObject
- ConnectionCreationBody
- ConnectionCreationBodyMesh
- ConnectionCreationBodyP2p
- ConnectionGroupServicesUpdateObject
- ConstraintEnum
- ContentObject
- ContextType
- CreateConnectionsMeshRequestV1
- CreateP2pConnectionsRequestV1
- CreateP2pConnectionsRequestV1AgentPairs
- DefaultString
- DeleteAgentsRequestV1
- DeleteAgentsRequestV1Inner
- DeleteConnectionsGroupsRequestV1
- DeleteConnectionsGroupsRequestV1Inner
- GetAgentsRequestFilterAgentStatusV1
- GetAgentsRequestFilterAgentTypeV1
- GetAgentsRequestFilterV1
- GetAgentsRequestOrderV1
- GetAgentsRequestV1
- GetAgentsResponseV1
- GetAgentsResponseV1Inner
- GetConnectionsGroupsAgentResponseV1
- GetConnectionsGroupsRequestFilterV1
- GetConnectionsGroupsRequestOrderV1
- GetConnectionsGroupsRequestV1
- GetConnectionsGroupsResponseV1
- GetConnectionsGroupsResponseV1Inner
- IdNumber
- InterfaceObject
- InterfaceType
- Ipv4
- LanguageObject
- Latitude
- LinkObject
- LinkTag
- LogsReadTimestampEntityTypes
- LogsReadTimestampObject
- Longitude
- NetworkInfoAgent
- NetworkInfoAgentConnectionGroupsObject
- NetworkInfoObject
- OrderString
- PlatformAgentStatus
- PlatformAgentTypeLocal
- PlatformAgentsBodyObject
- PlatformAgentsErrorBody
- PlatformAgentsErrorResponse
- PlatformAgentsErrorResponseHits
- PlatformAgentsHitObject
- PlatformAgentsHitObjectSource
- PlatformErrorResponseV1
- PlatformErrorResponseV1Errors
- PlatformResponseAdminAgentConfig_
- PlatformResponseAgentConnGroupFindAndCountObjectArray_
- PlatformResponseAgentConnGroupWithServicesObjectArray_
- PlatformResponseAgentConnectionFindAndCountObjectArray_
- PlatformResponseAgentCoordinatesObjectArray_
- PlatformResponseAgentCreateAgentObject_
- PlatformResponseAgentFiltersObject_
- PlatformResponseAgentFoundAndCountObjectArray_
- PlatformResponseAgentProviderArray_
- PlatformResponseAgentProvider_
- PlatformResponseAgentServiceGetServicesByAgentIdUserIdObjectArray_
- PlatformResponseAgentSuccessResponse_
- PlatformResponseAgentTagModelObjectArray_
- PlatformResponseAgentWgConfig_
- PlatformResponseApiKeyObjectArray_
- PlatformResponseApiKeyObject_
- PlatformResponseErrorItem
- PlatformResponseNetworkInfoObject_
- PlatformResponseSuccessBoolean_
- PlatformResponseSuccessbooleanData
- PlatformResponseV1GetAgentsResponseV1_
- PlatformResponseV1GetConnectionsGroupsResponseV1_
- PlatformSuccessResponseV1GetAgentsResponseV1_
- PlatformSuccessResponseV1GetConnectionsGroupsResponseV1_
- Port
- ProviderObject
- PublicAppInfoObject
- PublicLanguageObject
- PublicLanguagesObject
- PublicLinkObject
- PublicLinksLangCodeObject
- PublicLinksObject
- PublicTranslationObject
- PublicTranslationsLangCodeObject
- PublicTranslationsObject
- PublicVersionsObject
- RegionObject
- ResetServerObject
- RestartAgentObject
- RouteObject
- S3ObjectListItem
- S3ObjectListItemOwner
- S3SendData
- SdnPathsV1
- ServerAgentStatus
- ServerObject
- ServerSrSoftware
- SettingReadObject
- SettingWriteObject
- SettingsTypes
- ShowSdnConnections
- SkipNumber
- SkipNumberV1
- SrPathObject
- SrPolicyObject
- Status
- TakeNumber
- TakeNumberV1
- TopologyObject
- TranslationObject
- TsoaAgentConfigInfoNetwork
- TsoaAgentConfigInfoNetworkPUBLIC
- TsoaOmitAgentInterfaceAgent_
- TsoaOmitAgentServiceModelAgentOrAgentServiceSubnets_
- TsoaOmitAgentServiceSubnetAgentServiceOrAgentNetworkOrAgentOrAgentConnectionSubnets_
- TsoaPartialAgentConnectionObject_
- TsoaPartialAgentInterfaceBwObject_
- TsoaPartialAgentInterfaceObject_
- TsoaPartialAgentNetworkObject_
- TsoaPartialAgentObject_
- TsoaPartialAgentPathObject_
- TsoaPartialAgentProviderObject_
- TsoaPartialApiKeyObject_
- TsoaPartialColorObject_
- TsoaPartialContentObject_
- TsoaPartialInterfaceObject_
- TsoaPartialLanguageObject_
- TsoaPartialLinkObject_
- TsoaPartialProviderObject_
- TsoaPartialRegionObject_
- TsoaPartialRouteObject_
- TsoaPartialServerObject_
- TsoaPartialTopologyObject_
- TsoaPartialTranslationObject_
- TsoaPartialTunnelObject_
- TsoaPartialUserSrObject_
- TsoaPartialVersionObject_
- TsoaPartialVpnObject_
- TsoaPickAgentAgentIdOrAgentLocationLatOrAgentLocationLon_
- TsoaPickAgentAgentLocationCountry_
- TsoaPickAgentAgentNameOrAgentId_
- TsoaPickAgentAgentVersion_
- TsoaPickAgentConnectionGroupAgentConnectionGroupId_
- TsoaPickAgentConnectionGroupOrAgentConnectionGroupIdOrAgentConnectionGroupUpdatedAtOrAgentConnectionGroupSdnEnabledOrAgentConnectionGroupCreatedBy_
- TsoaPickAgentConnectionOrAgentConnectionIdOrAgentConnectionUpdatedAtOrAgentConnectionLinkTagOrAgentConnectionStatusOrAgentConnectionStatusReason_
- TsoaPickAgentConnectionSubnetOrAgentConnectionSubnetIdOrAgentServiceSubnetIdOrAgentConnectionSubnetIsEnabledOrAgentConnectionSubnetErrorOrAgentConnectionSubnetStatus_
- TsoaPickAgentInterfaceExcludeKeyofAgentInterfaceAgent_
- TsoaPickAgentOrAgentIdOrAgentPublicIpv4OrAgentLocationCityOrAgentLockedFieldsOrAgentNameOrAgentTypeOrAgentVersionOrAgentModifiedAtOrAgentStatusOrAgentIsOnlineOrAgentIsVirtual_
- TsoaPickAgentProviderAgentProviderNameOrAgentProviderId_
- TsoaPickAgentServiceModelExcludeKeyofAgentServiceModelAgentOrAgentServiceSubnets_
- TsoaPickAgentServiceSubnetExcludeKeyofAgentServiceSubnetAgentServiceOrAgentNetworkOrAgentOrAgentConnectionSubnets_
- TsoaPickAgentTagAgentTagIdOrAgentTagName_
- TsoaPickAgentTagAgentTagIdOrUserIdOrAgentTagName_
- TsoaPickAgentTagAgentTagNameOrAgentTagId_
- TunnelObject
- UpdateStatusBody
- UpdateStatusBodySubnetsToUpdate
- UserAdminObject
- UserAgentCreateObject
- UserAgentPatchObject
- UserApiKeyCreateObject
- UserSettings
- UserSrDirection
- UserSrObject
- VersionObject
- VersionType
- VisibilityType
- VpnObject
- VppCallableObject
- VppCallableObjectArgs
- VppCallableObjectArgs1
- VppCallableObjectArgs10
- VppCallableObjectArgs11
- VppCallableObjectArgs12
- VppCallableObjectArgs13
- VppCallableObjectArgs14
- VppCallableObjectArgs15
- VppCallableObjectArgs16
- VppCallableObjectArgs2
- VppCallableObjectArgs3
- VppCallableObjectArgs4
- VppCallableObjectArgs5
- VppCallableObjectArgs6
- VppCallableObjectArgs7
- VppCallableObjectArgs8
- VppCallableObjectArgs9
- WgAddPeer
- WgAddPeerArgs
- WgAddPeerMetadata
- WgAddPeerMetadataAllowedIpsInfo
- WgCallableObject
- WgCreateInterface
- WgCreateInterfaceArgs
- WgCreateInterfaceMetadata
- WgKeypairObject
- WgPublicKey
- WgRemoveInterface
- WgRemoveInterfaceArgs
- WgRemovePeer
- WgRemovePeerArgs
- WhereString
- ConnectionsPointtotagBody
- PointtotagPointToTag
- PointtotagResponse
- PointtotagSearchFilter
- PointtotagSearchRequest
- PointtotagSearchResponse
- RulesRequest
- RulesRequestFilter
- RulesResponse
- RulesSimpleRuleLine
- TypesErrorMsg
- TypesErrorResponse
Documentation For Authorization
In order to use this SDK you must have a valid API Authorization token.
This token can be obtained either by using AuthApi.local
method or using the UI.
This token should be passed to the configuration object like so:
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
jwt
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
Author
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for syntropy_sdk-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbe48b084719cf051d2e5410324cdd7d5d6d42d1d232db78087c0586531f8b11 |
|
MD5 | ec5df276eb3423ba67b96704bdf90fc6 |
|
BLAKE2b-256 | a800b1fdef33be38c8560820b6b590367c67ad2ba9cbb7ebcf1ce38de0565ff8 |