Skip to content

Repository files navigation

jasperclient

A Python client for the Cisco IoT Control Center (Jasper) REST API.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Generator version: 7.14.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.9+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/titobrasolin/jasper-client-python.git

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

Then import the package:

import jasperclient

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 jasperclient

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import jasperclient
from jasperclient.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://restapi3.jasper.com/rws/api
# See configuration.py for a list of all supported configuration parameters.
configuration = jasperclient.Configuration(
    host = "https://restapi3.jasper.com/rws/api"
)

# 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 HTTP basic authorization: basicAuth
configuration = jasperclient.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)


# Enter a context with an instance of the API client
with jasperclient.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = jasperclient.APIKeyApi(api_client)
    user_id = 'user_id_example' # str | userId
    api_version = '1' # str | Defaults to 1 (default to '1')

    try:
        # GET API Key for a given user
        api_instance.get_api_key_for_an_user(user_id, api_version)
    except ApiException as e:
        print("Exception when calling APIKeyApi->get_api_key_for_an_user: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://restapi3.jasper.com/rws/api

Class Method HTTP request Description
APIKeyApi get_api_key_for_an_user GET /v{apiVersion}/apikey/{userId} GET API Key for a given user
AssignEventRatePlanToDeviceApi activate_terminal_event PUT /v{apiVersion}/eventplan/{iccid} Triggers activation of an event for a device on the effective date
CustomersApi create_customer POST /v{apiVersion}/customers Creates a customer
CustomersApi get_customer_details GET /v{apiVersion}/customers/{customerId} Get details for a given customerId
CustomersApi update_customer PUT /v{apiVersion}/customers/{customerId} Edits a customer
EchoApi get_msg GET /v{apiVersion}/echo/{param} Simply returns a parameter passed by the client.
EditDeviceApi edit_device PUT /v{apiVersion}/devices/{iccid} Modify any device attributes such as Status, Rate Plan, Communication Plan, Custom Fields and other identifiers.
EditEventRatePlansAssignedToDeviceApi edit_event_instances PUT /v{apiVersion}/editeventplan/{iccid} Cancel Pending Events for device
GetDeviceAuditTrailsApi get_device_audit_trails GET /v{apiVersion}/devices/{iccid}/auditTrails Retrieve audit history for a device based on various filters.
GetDeviceDetailsApi get_device_by_iccid GET /v{apiVersion}/devices/{iccid} Return detailed information for a given device.
GetDeviceLocationHistoryApi get_device_location_history GET /v{apiVersion}/devices/{iccid}/locationHistory Get Device Location History during a specified time frame.
GetDeviceUsageApi get_usages_by_iccid GET /v{apiVersion}/devices/{iccid}/ctdUsages Return usage related details for a given device.
GetDeviceUsageByZoneApi get_device_cycle_usage_in_zones GET /v{apiVersion}/devices/{iccid}/usageInZone Return usage related details for a device under different zones and rate plans.
GetEventRatePlansAssignedToDeviceApi get_terminal_events GET /v{apiVersion}/eventplan/{iccid} List of currently active and future-dated event plans for device.
GetSMSDetailsApi get_sms_message_detail GET /v{apiVersion}/smsMessages/{smsMsgId} Returns detailed information about a message.
GetSessionDetailsApi get_session_info_by_iccid GET /v{apiVersion}/devices/{iccid}/sessionInfo Return information related to the current or most recent session.
GetUsageByRatePlanApi get_usage_by_rate_plan GET /v{apiVersion}/usages Get Usage by RatePlan
GetListOfAggregatedUsageDetailsGroupByCarrierCountryRatePlanRatingZoneForGivenAccountApi get_aggregated_usage_by_account GET /v{apiVersion}/dynareport/acct/usage Return list of Aggregated Usage Details Group by Carrier, Country, RatePlan, RatingZone for given account.
GetListOfDeviceSubscriptionDetailsForGivenAccountApi get_acct_device_response GET /v{apiVersion}/dynareport/acct/device/subscriptions Return list of Device Subscription Details for given account.
GetListOfTOPKUsageDetailsGroupByCarrierCountryRatePlanRatingZoneForGivenAccountApi get_top_k_usage_by_account GET /v{apiVersion}/dynareport/acct/topk/usage Return list of TOP K Usage Details Group by Carrier, Country, RatePlan, RatingZone for given account.
SearchDevicesApi search_devices GET /v{apiVersion}/devices Search for devices based on various filters.
SearchSMSApi get_sms_messages GET /v{apiVersion}/smsMessages Search for messages that have been sent or received during a specified time frame.
SendSMSApi send_sms_messages POST /v{apiVersion}/devices/{iccid}/smsMessages Send SMS message to a device.
UsersApi create_user POST /v{apiVersion}/users Create user.
UsersApi delete_user_by_id DELETE /v{apiVersion}/users/{userId} Delete user for a given userId
UsersApi get_all_users GET /v{apiVersion}/users Get all users based on the authority of the user invoking this API
UsersApi get_user_by_id GET /v{apiVersion}/users/{userId} Get user details for a given userId
UsersApi reset_user_password PUT /v{apiVersion}/users/{userId}/resetPassword Reset password for the given user
UsersApi update_user PUT /v{apiVersion}/users/{userId} Update user

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

basicAuth

  • Type: HTTP basic authentication

Author

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages