Skip to main content

Sematext Cloud API

Project description

  sematext-api-client-python


A Sematext Cloud API client, for interaction with Sematext Cloud solution monitoring, alerting and log shipping.


License


One of a family of clients in following flavours:


Refer to below link for deeper information on the API itself.


Contents


Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Authentication

This client code requires a Sematext API Access token to function. You can find this by logging into your Sematext Cloud Account

Requirements.

Python 2.7 and 3.4+

Installation

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com/sematext/sematext-api-client-python.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/sematext-api-client-python.git)

Then import the package:

import stcloud

Testing

python -m unittest discover

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 stcloud

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import stcloud
from stcloud.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
configuration = stcloud.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = stcloud.AlertNotificationsApi(stcloud.ApiClient(configuration))
app_id = 789 # int | appId
time_interval = stcloud.AlertNotificationRequest() # AlertNotificationRequest | Time Interval

try:
    # Get alert notifications for an app
    api_response = api_instance.get_alert_notifications_for_app_using_post(app_id, time_interval)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AlertNotificationsApi->get_alert_notifications_for_app_using_post: %s\n" % e)

Reference

All URIs are relative to https://localhost

Class Method HTTP request Description
AlertNotificationsApi get_alert_notifications_for_app_using_post POST /users-web/api/v3/apps/{appId}/notifications/alerts Get alert notifications for an app
AlertNotificationsApi get_alert_notifications_for_user_using_post1 POST /users-web/api/v3/notifications/alerts Get alert notifications for a user
AlertsApi create_alert_using_post POST /users-web/api/v3/alerts Create alert rule
AlertsApi delete_alert_rule_using_delete1 DELETE /users-web/api/v3/alerts/{updateableAlertId} Delete alert rule
AlertsApi disable_alert_rule_using_put1 PUT /users-web/api/v3/alerts/{updateableAlertId}/disable Disable alert rule
AlertsApi enable_alert_rule_using_put1 PUT /users-web/api/v3/alerts/{updateableAlertId}/enable Enable alert rule
AlertsApi get_alert_rules_for_app_using_get1 GET /users-web/api/v3/apps/{appId}/alerts Get alert rules for an app
AppsApi delete_using_delete1 DELETE /users-web/api/v3/apps/{anyStateAppId} delete
AppsApi get_app_types_using_get GET /users-web/api/v3/apps/types Get all App types supported for the account identified with apiKey
AppsApi get_using_get1 GET /users-web/api/v3/apps/{anyStateAppId} Gets defails for one particular App
AppsApi invite_app_guests_using_post1 POST /users-web/api/v3/apps/guests Invite guests to an app
AppsApi list_apps_users_using_get1 GET /users-web/api/v3/apps/users Get all users of apps accessible to this account
AppsApi list_using_get GET /users-web/api/v3/apps Get all apps accessible by account identified with apiKey
AppsApi update_description_using_put PUT /users-web/api/v3/apps/{anyStateAppId}/description Update description of the app
AppsApi update_using_put2 PUT /users-web/api/v3/apps/{anyStateAppId} Update app
BillingApi get_detailed_invoice_using_get1 GET /users-web/api/v3/billing/invoice/{service}/{year}/{month} Get invoice details
BillingApi list_available_plans_using_get GET /users-web/api/v3/billing/availablePlans Get available plans
BillingApi update_plan_using_put PUT /users-web/api/v3/billing/info/{appId} Update plan for an app
LogsAppApi create_logsene_application POST /logsene-reports/api/v3/apps Create Logs App
MonitoringAppApi create_spm_application1 POST /spm-reports/api/v3/apps Create Monitoring App
ResetPasswordApi reset_password_using_post1 POST /users-web/api/v3/account/password/reset Reset Password
SubscriptionsApi create_for_app_using_post1 POST /users-web/api/v3/apps/{appId}/subscription Create App subscription
SubscriptionsApi create_for_dash_using_post1 POST /users-web/api/v3/dashboards/{dashId}/subscription Create dashboard subscription
SubscriptionsApi delete_using_delete3 DELETE /users-web/api/v3/subscriptions/{updateableSubscriptionId} Delete subscription
SubscriptionsApi list_using_get3 GET /users-web/api/v3/apps/{appId}/subscriptions Get subscriptions for an App
SubscriptionsApi list_using_get4 GET /users-web/api/v3/subscriptions Get current account's subscriptions
SubscriptionsApi send_app_report_using_post1 POST /users-web/api/v3/apps/{appId}/report/send Email an App report
SubscriptionsApi send_dash_report_using_post1 POST /users-web/api/v3/dashboards/{dashId}/report/send Email a dashboard report
SubscriptionsApi toggle_enabled_using_put1 PUT /users-web/api/v3/subscriptions/{updateableSubscriptionId} Toggle subscription status
SubscriptionsApi update_for_app_using_put PUT /users-web/api/v3/apps/{appId}/subscription Update App subscription
SubscriptionsApi update_for_dash_using_put1 PUT /users-web/api/v3/dashboards/{dashId}/subscription Update dashboard subscription
AwsSettingsControllerApi update_using_put PUT /users-web/api/v3/apps/{appId}/aws Update App's AWS CloudWatch settings
TagApiControllerApi get_tag_names_using_get1 GET /spm-reports/api/v3/apps/{appIds}/tagNames Gets tag names for the given application identifiers appearing in the given time frame.
TagApiControllerApi get_using_get1 GET /spm-reports/api/v3/apps/{appIds}/tags Gets values for specified tags for the given application identifiers appearing in the given time frame.
TagApiControllerApi get_using_get2 GET /spm-reports/api/v3/apps/{appIds}/metrics/filters Gets values for specified tags for the given application identifiers appearing in the given time frame.
TokensApiControllerApi create_app_token1 POST /users-web/api/v3/apps/{appId}/tokens Create new app token
TokensApiControllerApi delete_app_token1 DELETE /users-web/api/v3/apps/{appId}/tokens/{tokenId} Delete app token
TokensApiControllerApi get_app_tokens GET /users-web/api/v3/apps/{appId}/tokens Get app available tokens
TokensApiControllerApi regenerate_app_token1 POST /users-web/api/v3/apps/{appId}/tokens/{tokenId}/regenerate Regenerate app token)
TokensApiControllerApi update_app_token PUT /users-web/api/v3/apps/{appId}/tokens/{tokenId} Update app token (enable/disable or name)

Documentation For Models

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sematext-cloud-client-0.3.0.tar.gz (75.6 kB view details)

Uploaded Source

Built Distribution

sematext_cloud_client-0.3.0-py3-none-any.whl (219.5 kB view details)

Uploaded Python 3

File details

Details for the file sematext-cloud-client-0.3.0.tar.gz.

File metadata

  • Download URL: sematext-cloud-client-0.3.0.tar.gz
  • Upload date:
  • Size: 75.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for sematext-cloud-client-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ac2edeea53d28fc442ae5c5e1cae9cabd74983cbd65af007497078682f0e804b
MD5 df8fd550feb5c118842b9c226018569b
BLAKE2b-256 deb05bb23577c21d3d02c1185f92c9b8806d30cca8e48d016c95a434a7a42ae1

See more details on using hashes here.

File details

Details for the file sematext_cloud_client-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: sematext_cloud_client-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 219.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for sematext_cloud_client-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fb6f00b5fd4f33f1f3f6a1b58c6f70f888730bef24842f07c7cc581856643e65
MD5 daf3d77a49a359f73168e2e171743568
BLAKE2b-256 f8ca1a244ee0aa1c9dd0b4d20623a13ac77511add5794ed84d65633866de7f85

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page