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.4.3
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 API"
config.api_key["api-key"] = "your api key"
api = sdk.ApiClient(config)
agents_api = sdk.AgentsApi(api)
try:
api_response = WithRetry(agents_api.v1_network_agents_get)()
pprint(api_response)
except ApiException as e:
print("Exception when calling NetworkApi->v1_network_get: %s\n" % e)
# Create connections
connections_api = sdk.ConectionsApi(api)
try:
body = sdk.V1NetworkConnectionsCreateP2PRequest(
agent_pairs=[
sdk.V1NetworkConnectionsCreateP2PRequestAgentPairs(agent_2_id=1, agent_1_id=0),
sdk.V1NetworkConnectionsCreateP2PRequestAgentPairs(agent_2_id=2, agent_1_id=1),
sdk.V1NetworkConnectionsCreateP2PRequestAgentPairs(agent_2_id=4, agent_1_id=2),
],
)
connections = connections_api.v1_network_connections_create_p2_p(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 https://api.syntropystack.com
Class | Method | HTTP request | Description |
---|---|---|---|
AgentsApi | v1_network_agents_coordinates_search | POST /v1/network/agents/coordinates/search | Search Agent location coordinates |
AgentsApi | v1_network_agents_create | POST /v1/network/agents | Create Agent |
AgentsApi | v1_network_agents_delete | DELETE /v1/network/agents/{agent_id} | Delete Agent |
AgentsApi | v1_network_agents_filters_search | POST /v1/network/agents/filters/search | Search Agent filters |
AgentsApi | v1_network_agents_get | GET /v1/network/agents | Get Agents |
AgentsApi | v1_network_agents_logs_errors_search | POST /v1/network/agents/logs/errors/search | Search Agent error logs |
AgentsApi | v1_network_agents_logs_reads_timestamp_search | POST /v1/network/agents/logs-reads-timestamp | Save log read timestamp |
AgentsApi | v1_network_agents_logs_search | POST /v1/network/agents/logs/search | Search Agent logs |
AgentsApi | v1_network_agents_providers_get | GET /v1/network/agents/providers | Get Agent providers |
AgentsApi | v1_network_agents_remove | POST /v1/network/agents/remove | Delete Agents |
AgentsApi | v1_network_agents_search | POST /v1/network/agents/search | Search Agents |
AgentsApi | v1_network_agents_services_delete | DELETE /v1/network/agents/services/{agent_service_subnet_id} | Delete Agent service |
AgentsApi | v1_network_agents_services_get | GET /v1/network/agents/services | Get Agent services. |
AgentsApi | v1_network_agents_services_remove | POST /v1/network/agents/services/remove | Delete Agent services |
AgentsApi | v1_network_agents_services_update | PATCH /v1/network/agents/services/bulk | Update Agent services |
AgentsApi | v1_network_agents_settings_get | GET /v1/network/agents/settings | Get Agent settings |
AgentsApi | v1_network_agents_settings_update | PATCH /v1/network/agents/settings | Update Agent settings |
AgentsApi | v1_network_agents_tags_get | GET /v1/network/agents/tags | Get Agent tags |
AgentsApi | v1_network_agents_update | PATCH /v1/network/agents/{agent_id} | Updates Agent |
AgentsApi | v1_network_agents_wg_config_get_one | GET /v1/network/agents/wg-config/{agent_id} | Get Agent Wg config |
AnalyticsApi | v1_network_a_bandwidth_get | GET /v1/network/a/bandwidth | Get bandwidth |
AnalyticsApi | v1_network_a_iface_active_change_get | GET /v1/network/a/iface-active-change | Get active iface changes |
AnalyticsApi | v1_network_a_latency_get | GET /v1/network/a/latency | Get latency |
AnalyticsApi | v1_network_a_packet_loss_get | GET /v1/network/a/packet-loss | Get packet loss |
AnalyticsApi | v1_network_a_statuses_search | POST /v1/network/a/statuses/search | Search statuses |
AnalyticsApi | v1_network_a_statuses_warnings_search | POST /v1/network/a/statuses/warnings/search | Search status warnings |
AuditApi | v1_network_audit_search | POST /v1/network/audit/logs/search | Search audit logs |
AuthApi | v1_network_auth_access_token_login | POST /v1/network/auth/access-token/login | Login (Access token) |
AuthApi | v1_network_auth_access_tokens_create | POST /v1/network/auth/access-tokens | Create Access token |
AuthApi | v1_network_auth_access_tokens_delete | DELETE /v1/network/auth/access-tokens/{access_token_id} | Delete Access token |
AuthApi | v1_network_auth_access_tokens_get | GET /v1/network/auth/access-tokens | Get Access tokens |
AuthApi | v1_network_auth_access_tokens_permissions_get | GET /v1/network/auth/access-tokens/permissions | Get Access token permissions |
AuthApi | v1_network_auth_api_keys_create | POST /v1/network/auth/api-keys | Create API key |
AuthApi | v1_network_auth_api_keys_delete | DELETE /v1/network/auth/api-keys/{api_key_id} | Delete API key |
AuthApi | v1_network_auth_api_keys_get | GET /v1/network/auth/api-keys | Get API keys |
AuthApi | v1_network_auth_logout | POST /v1/network/auth/logout | Logout |
AuthApi | v1_network_auth_mfa_confirm | POST /v1/network/auth/mfa/confirm | Confirm MFA |
AuthApi | v1_network_auth_mfa_disable | POST /v1/network/auth/mfa/disable | Disable MFA |
AuthApi | v1_network_auth_mfa_disable_using_backup | POST /v1/network/auth/mfa/disable-using-backup | Disable MFA (backup) |
AuthApi | v1_network_auth_mfa_generate | GET /v1/network/auth/mfa/generate | Generate MFA |
AuthApi | v1_network_auth_settings_update | PATCH /v1/network/auth/user/settings | Update User settings |
AuthApi | v1_network_auth_user_get | GET /v1/network/auth/user | Get User info |
AuthApi | v1_network_auth_user_invitations_get | GET /v1/network/auth/user/invitations | Get invitations for authenticated user |
AuthApi | v1_network_auth_users_get | GET /v1/network/auth/users | Get workspace users |
AuthApi | v1_network_auth_users_remove | POST /v1/network/auth/users/remove | Remove users from workspace |
AuthApi | v1_network_auth_users_role_update | PATCH /v1/network/auth/users/{user_id}/role | Update user role in the workspace |
AuthApi | v1_network_auth_verify_email | POST /v1/network/auth/verify-email/{code} | Verify email |
AuthApi | v1_network_auth_workspace_create | POST /v1/network/auth/workspaces | Create workspace |
AuthApi | v1_network_auth_workspace_delete | DELETE /v1/network/auth/workspaces/{workspace_id} | Delete workspace |
AuthApi | v1_network_auth_workspace_get | GET /v1/network/auth/workspaces | Get workspaces |
AuthApi | v1_network_auth_workspace_update | PATCH /v1/network/auth/workspaces/{workspace_id} | Update workspace |
AuthApi | v1_network_auth_workspaces_invitations_accept | POST /v1/network/auth/workspaces/invitations/{invitation_id}/accept | Accept workspace invitation |
AuthApi | v1_network_auth_workspaces_invitations_create | POST /v1/network/auth/workspaces/invitations | Create workspace invitation |
AuthApi | v1_network_auth_workspaces_invitations_decline | POST /v1/network/auth/workspaces/invitations/{invitation_id}/decline | Decline workspace invitation |
AuthApi | v1_network_auth_workspaces_invitations_get | GET /v1/network/auth/workspaces/invitations | Get workspace invitations |
AuthApi | v1_network_auth_workspaces_invitations_remove | POST /v1/network/auth/workspaces/invitations/remove | Delete workspace invitations |
AuthApi | v1_network_auth_workspaces_leave | POST /v1/network/auth/workspaces/leave | Leave workspace |
ConnectionsApi | v1_network_connections_create_mesh | POST /v1/network/connections/mesh | Create Connections Mesh |
ConnectionsApi | v1_network_connections_create_p2_p | POST /v1/network/connections/point-to-point | Create P2P Connections |
ConnectionsApi | v1_network_connections_delete | DELETE /v1/network/connections/{agent_connection_group_id} | Delete Connection |
ConnectionsApi | v1_network_connections_get | GET /v1/network/connections | Get Connections |
ConnectionsApi | v1_network_connections_remove | POST /v1/network/connections/remove | Delete Connections |
ConnectionsApi | v1_network_connections_search | POST /v1/network/connections/search | Search Connections |
ConnectionsApi | v1_network_connections_services_delete | DELETE /v1/network/connections/services/{agent_connection_subnet_id} | Delete Connection service |
ConnectionsApi | v1_network_connections_services_get | GET /v1/network/connections/services | Get Connection services |
ConnectionsApi | v1_network_connections_services_remove | POST /v1/network/connections/services/remove | Delete Connection services |
ConnectionsApi | v1_network_connections_services_update | PATCH /v1/network/connections/services | Update Connection services |
ConnectionsApi | v1_network_connections_update | PATCH /v1/network/connections | Update Connections |
NetworkApi | v1_network_get | GET /v1/network | Get Network view |
NotificationApi | v1_network_notification_user_contact_update | POST /v1/network/notification/user-contact | Update User contact |
RulesApi | rules_connection_point_to_tag_update | PATCH /v1/network/rules/connections/point-to-tag | Upsert point-to-tag |
RulesApi | v1_network_rules_connections_point_to_tag_create | POST /v1/network/rules/connections/point-to-tag | Create point-to-tag |
RulesApi | v1_network_rules_connections_point_to_tag_get_one | GET /v1/network/rules/connections/point-to-tag/{agent_id} | Get point-to-tag |
RulesApi | v1_network_rules_connections_point_to_tag_search | POST /v1/network/rules/connections/point-to-tag/search | Search point-to-tag Rules |
RulesApi | v1_network_rules_search | POST /v1/network/rules/search | Search Rules |
RulesApi | v1_rules_connection_point_to_tag_remove | POST /v1/network/rules/connections/point-to-tag/remove | Remove point-to-tag |
SDNAgentsApi | v1_network_sdn_agents_get | GET /v1/network/sdn-agents/ips | Get SDN Agent ips |
Documentation For Models
- AData
- ADataResponse
- AccessTokenOrder
- AgentConnectionSubnetStatuses
- AgentFilterAgentStatus
- AgentLockedFields
- AgentLogLabels
- AgentLogLog
- AgentLogSource
- AgentProvider
- AgentProviderNameAndId
- AgentProviderOrderString
- AgentServiceSubnetIdAndIp
- AgentServiceTypes
- AgentServicesUpdateChanges
- AgentStatus
- AgentTag
- AgentType
- AgentTypeParam
- AgentWgConfig
- AnyOfV1AgentOrderItems
- AuditLog
- AuthSource
- ConnectionsPointtotagBody
- CoordinatesSearchBody
- DefaultString
- GetUserInvitationResponse
- IdNumber
- Ipv4
- LatencyDiff
- LatencyRatio
- Latitude
- LogsReadTimestampEntityType
- Longitude
- MFABackupCode
- MFACode
- NetworkInfoAgentConnectionGroupAgent
- OneOfV1ConnectionOrderItems
- OneOfV1NetworkAgentsSettingsUpdateRequest
- OrderString
- Permission
- Role
- SkipNumber
- TakeNumber
- User
- UserSettings
- UserTheme
- UserWithRole
- UserWorkspace
- V1AAgentPair
- V1AStatus
- V1AStatusAgentStatus
- V1AStatusWarning
- V1Agent
- V1AgentCoordinates
- V1AgentCreateItem
- V1AgentErrorLog
- V1AgentErrorLogSource
- V1AgentFilter
- V1AgentFilters
- V1AgentFiltersAgentName
- V1AgentLog
- V1AgentLogSeverity
- V1AgentLogSort
- V1AgentOrder
- V1AgentService
- V1AgentSettings
- V1AgentSettingsReroutingThreshold
- V1AgentTag
- V1AuthAccessToken
- V1AuthAccessTokenLoginItem
- V1AuthAccessTokenPermissions
- V1AuthAccessTokensCreateItem
- V1AuthApiKey
- V1AuthApiKeysCreateItem
- V1AuthMfaConfirm
- V1AuthMfaGenerate
- V1AuthUser
- V1Connection
- V1ConnectionAgent
- V1ConnectionCreatedBy
- V1ConnectionFilter
- V1ConnectionOrder
- V1ConnectionService
- V1ConnectionServiceAgent
- V1ConnectionServiceAgentService
- V1ConnectionServiceAgentServiceAgentServiceSubnets
- V1ConnectionServiceSubnet
- V1ConnectionStatus
- V1ConnectionUpdateChange
- V1ErrorResponse
- V1ErrorResponseErrors
- V1Network
- V1NetworkAStatusesSearchRequest
- V1NetworkAStatusesSearchRequestFilter
- V1NetworkAStatusesSearchResponse
- V1NetworkAStatusesWarningsSearchRequest
- V1NetworkAStatusesWarningsSearchRequestFilter
- V1NetworkAStatusesWarningsSearchRequestOrder
- V1NetworkAStatusesWarningsSearchResponse
- V1NetworkAgent
- V1NetworkAgentsCoordinatesSearchResponse
- V1NetworkAgentsCreateRequest
- V1NetworkAgentsCreateResponse
- V1NetworkAgentsFiltersSearchResponse
- V1NetworkAgentsGetResponse
- V1NetworkAgentsLogsErrorsSearchRequest
- V1NetworkAgentsLogsErrorsSearchResponse
- V1NetworkAgentsLogsReadsTimestampSearchRequest
- V1NetworkAgentsLogsSearchRequest
- V1NetworkAgentsLogsSearchResponse
- V1NetworkAgentsProvidersGetResponse
- V1NetworkAgentsRemoveRequest
- V1NetworkAgentsSearchRequest
- V1NetworkAgentsSearchResponse
- V1NetworkAgentsServicesGetResponse
- V1NetworkAgentsServicesRemoveRequest
- V1NetworkAgentsServicesUpdateRequest
- V1NetworkAgentsServicesUpdateRequestSubnetsToUpdate
- V1NetworkAgentsSettingsGetResponse
- V1NetworkAgentsSettingsUpdateRequest
- V1NetworkAgentsTagsGetResponse
- V1NetworkAgentsUpdateRequest
- V1NetworkAgentsWgConfigGetOneResponse
- V1NetworkAuditSearchRequest
- V1NetworkAuditSearchResponse
- V1NetworkAuthAccessTokenLoginRequest
- V1NetworkAuthAccessTokenLoginResponse
- V1NetworkAuthAccessTokensCreateRequest
- V1NetworkAuthAccessTokensCreateResponse
- V1NetworkAuthAccessTokensGetResponse
- V1NetworkAuthAccessTokensPermissionsGetResponse
- V1NetworkAuthApiKeysCreateRequest
- V1NetworkAuthApiKeysCreateResponse
- V1NetworkAuthApiKeysGetResponse
- V1NetworkAuthMfaConfirmRequest
- V1NetworkAuthMfaConfirmResponse
- V1NetworkAuthMfaDisableRequest
- V1NetworkAuthMfaDisableUsingBackupRequest
- V1NetworkAuthMfaGenerateResponse
- V1NetworkAuthUserGetResponse
- V1NetworkAuthUserInvitationsGetResponse
- V1NetworkAuthUsersGetResponse
- V1NetworkAuthUsersRemoveRequest
- V1NetworkAuthUsersRoleUpdateRequest
- V1NetworkAuthWorkspaceCreateRequest
- V1NetworkAuthWorkspaceCreateResponse
- V1NetworkAuthWorkspaceGetResponse
- V1NetworkAuthWorkspaceUpdateRequest
- V1NetworkAuthWorkspacesInvitationsCreateRequest
- V1NetworkAuthWorkspacesInvitationsCreateResponse
- V1NetworkAuthWorkspacesInvitationsGetResponse
- V1NetworkAuthWorkspacesInvitationsRemoveRequest
- V1NetworkConnectionGroup
- V1NetworkConnectionsCreateMeshRequest
- V1NetworkConnectionsCreateMeshRequestAgentIds
- V1NetworkConnectionsCreateP2PRequest
- V1NetworkConnectionsCreateP2PRequestAgentPairs
- V1NetworkConnectionsGetResponse
- V1NetworkConnectionsRemoveRequest
- V1NetworkConnectionsSearchRequest
- V1NetworkConnectionsSearchResponse
- V1NetworkConnectionsServicesGetResponse
- V1NetworkConnectionsServicesRemoveRequest
- V1NetworkConnectionsServicesUpdateRequest
- V1NetworkConnectionsUpdateRequest
- V1NetworkGetResponse
- V1NetworkNotificationContactUpdateRequest
- V1NetworkRulesConnectionsPointToTagCreateResponse
- V1NetworkRulesConnectionsPointToTagGetOneResponse
- V1NetworkRulesConnectionsPointToTagSearchRequest
- V1NetworkRulesConnectionsPointToTagSearchResponse
- V1NetworkRulesSearchRequest
- V1NetworkRulesSearchRequestFilter
- V1NetworkRulesSearchResponse
- V1NetworkSdnAgentsGetResponse
- V1RulesPointToTag
- V1RulesPointToTagCreateItem
- V1RulesPointToTagFilter
- V1RulesSearchItem
- V1SdnPaths
- V1SkipNumber
- V1TakeNumber
- V1UpdateAgentRoutingSettings
- V1UpdateAgentRoutingSettingsReroutingThreshold
- V1UpdateAgentRoutingSettingsReset
- WhereString
- Workspace
- WorkspaceInvitation
- WorkspaceInvitationResponse
- WorkspaceName
- WorkspaceRoleName
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