Skip to content

yuregir/Lora-AppServer-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metacore Lora Server API client

For more information about the usage of the LoRa App Server (REST) API, see https://docs.loraserver.io/lora-app-server/api/.

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.PythonClientCodegen

Requirements.

Python 2.7 or 3.4+

Installation & Usage

pip install

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

pip install git+https://github.com/yuregir/Lora-AppServer-API.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/yuregir/Lora-AppServer-API.git)

Then import the package:

import swagger_client 

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 swagger_client

Getting Started

Please follow the installation procedure and then run the following:

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

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

# create an instance of the API class
api_instance = swagger_client.ApplicationServiceApi(swagger_client.ApiClient(configuration))
body = swagger_client.ApiCreateApplicationRequest() # ApiCreateApplicationRequest | 

try:
    # Create creates the given application.
    api_response = api_instance.create(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ApplicationServiceApi->create: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://api.teke.li:9090

Class Method HTTP request Description
ApplicationServiceApi create POST /api/applications Create creates the given application.
ApplicationServiceApi create_http_integration POST /api/applications/{integration.application_id}/integrations/http CreateHTTPIntegration creates a HTTP application-integration.
ApplicationServiceApi create_influx_db_integration POST /api/applications/{integration.application_id}/integrations/influxdb CreateInfluxDBIntegration create an InfluxDB application-integration.
ApplicationServiceApi create_things_board_integration POST /api/applications/{integration.application_id}/integrations/thingsboard CreateThingsBoardIntegration creates a ThingsBoard application-integration.
ApplicationServiceApi delete DELETE /api/applications/{id} Delete deletes the given application.
ApplicationServiceApi delete_http_integration DELETE /api/applications/{application_id}/integrations/http DeleteIntegration deletes the HTTP application-integration.
ApplicationServiceApi delete_influx_db_integration DELETE /api/applications/{application_id}/integrations/influxdb DeleteInfluxDBIntegration deletes the InfluxDB application-integration.
ApplicationServiceApi delete_things_board_integration DELETE /api/applications/{application_id}/integrations/thingsboard DeleteThingsBoardIntegration deletes the ThingsBoard application-integration.
ApplicationServiceApi get GET /api/applications/{id} Get returns the requested application.
ApplicationServiceApi get_http_integration GET /api/applications/{application_id}/integrations/http GetHTTPIntegration returns the HTTP application-integration.
ApplicationServiceApi get_influx_db_integration GET /api/applications/{application_id}/integrations/influxdb GetInfluxDBIntegration returns the InfluxDB application-integration.
ApplicationServiceApi get_things_board_integration GET /api/applications/{application_id}/integrations/thingsboard GetThingsBoardIntegration returns the ThingsBoard application-integration.
ApplicationServiceApi list GET /api/applications List lists the available applications.
ApplicationServiceApi list_integrations GET /api/applications/{application_id}/integrations ListIntegrations lists all configured integrations.
ApplicationServiceApi update PUT /api/applications/{application.id} Update updates the given application.
ApplicationServiceApi update_http_integration PUT /api/applications/{integration.application_id}/integrations/http UpdateHTTPIntegration updates the HTTP application-integration.
ApplicationServiceApi update_influx_db_integration PUT /api/applications/{integration.application_id}/integrations/influxdb UpdateInfluxDBIntegration updates the InfluxDB application-integration.
ApplicationServiceApi update_things_board_integration PUT /api/applications/{integration.application_id}/integrations/thingsboard UpdateThingsBoardIntegration updates the ThingsBoard application-integration.
DeviceProfileServiceApi create POST /api/device-profiles Create creates the given device-profile.
DeviceProfileServiceApi delete DELETE /api/device-profiles/{id} Delete deletes the device-profile matching the given id.
DeviceProfileServiceApi get GET /api/device-profiles/{id} Get returns the device-profile matching the given id.
DeviceProfileServiceApi list GET /api/device-profiles List lists the available device-profiles.
DeviceProfileServiceApi update PUT /api/device-profiles/{device_profile.id} Update updates the given device-profile.
DeviceQueueServiceApi enqueue POST /api/devices/{device_queue_item.dev_eui}/queue Enqueue adds the given item to the device-queue.
DeviceQueueServiceApi flush DELETE /api/devices/{dev_eui}/queue Flush flushes the downlink device-queue.
DeviceQueueServiceApi list GET /api/devices/{dev_eui}/queue List lists the items in the device-queue.
DeviceServiceApi activate POST /api/devices/{device_activation.dev_eui}/activate Activate (re)activates the device (only when ABP is set to true).
DeviceServiceApi create POST /api/devices Create creates the given device.
DeviceServiceApi create_keys POST /api/devices/{device_keys.dev_eui}/keys CreateKeys creates the given device-keys.
DeviceServiceApi deactivate DELETE /api/devices/{dev_eui}/activation Deactivate de-activates the device.
DeviceServiceApi delete DELETE /api/devices/{dev_eui} Delete deletes the device matching the given DevEUI.
DeviceServiceApi delete_keys DELETE /api/devices/{dev_eui}/keys DeleteKeys deletes the device-keys for the given DevEUI.
DeviceServiceApi get GET /api/devices/{dev_eui} Get returns the device matching the given DevEUI.
DeviceServiceApi get_activation GET /api/devices/{dev_eui}/activation GetActivation returns the current activation details of the device (OTAA and ABP).
DeviceServiceApi get_keys GET /api/devices/{dev_eui}/keys GetKeys returns the device-keys for the given DevEUI.
DeviceServiceApi get_random_dev_addr POST /api/devices/{dev_eui}/getRandomDevAddr GetRandomDevAddr returns a random DevAddr taking the NwkID prefix into account.
DeviceServiceApi list GET /api/devices List returns the available devices.
DeviceServiceApi stream_event_logs GET /api/devices/{dev_eui}/events StreamEventLogs stream the device events (uplink payloads, ACKs, joins, errors). * This endpoint is intended for debugging only. * This endpoint does not work from a web-browser.
DeviceServiceApi stream_frame_logs GET /api/devices/{dev_eui}/frames StreamFrameLogs streams the uplink and downlink frame-logs for the given DevEUI. * These are the raw LoRaWAN frames and this endpoint is intended for debugging only. * This endpoint does not work from a web-browser.
DeviceServiceApi update PUT /api/devices/{device.dev_eui} Update updates the device matching the given DevEUI.
DeviceServiceApi update_keys PUT /api/devices/{device_keys.dev_eui}/keys UpdateKeys updates the device-keys.
FUOTADeploymentServiceApi create_for_device POST /api/devices/{dev_eui}/fuota-deployments CreateForDevice creates a deployment for the given DevEUI.
FUOTADeploymentServiceApi get GET /api/fuota-deployments/{id} Get returns the fuota deployment for the given id.
FUOTADeploymentServiceApi get_deployment_device GET /api/fuota-deployments/{fuota_deployment_id}/devices/{dev_eui} GetDeploymentDevice returns the deployment device.
FUOTADeploymentServiceApi list GET /api/fuota-deployments List lists the fuota deployments.
FUOTADeploymentServiceApi list_deployment_devices GET /api/fuota-deployments/{fuota_deployment_id}/devices ListDeploymentDevices lists the devices (and status) for the given fuota deployment ID.
GatewayProfileServiceApi create POST /api/gateway-profiles Create creates the given gateway-profile.
GatewayProfileServiceApi delete DELETE /api/gateway-profiles/{id} Delete deletes the gateway-profile matching the given id.
GatewayProfileServiceApi get GET /api/gateway-profiles/{id} Get returns the gateway-profile matching the given id.
GatewayProfileServiceApi list GET /api/gateway-profiles List returns the existing gateway-profiles.
GatewayProfileServiceApi update PUT /api/gateway-profiles/{gateway_profile.id} Update updates the given gateway-profile.
GatewayServiceApi create POST /api/gateways Create creates the given gateway.
GatewayServiceApi delete DELETE /api/gateways/{id} Delete deletes the gateway matching the given mac address.
GatewayServiceApi get GET /api/gateways/{id} Get returns the gateway for the requested mac address.
GatewayServiceApi get_last_ping GET /api/gateways/{gateway_id}/pings/last GetLastPing returns the last emitted ping and gateways receiving this ping.
GatewayServiceApi get_stats GET /api/gateways/{gateway_id}/stats GetStats lists the gateway stats given the query parameters.
GatewayServiceApi list GET /api/gateways List lists the gateways.
GatewayServiceApi stream_frame_logs GET /api/gateways/{gateway_id}/frames StreamFrameLogs streams the uplink and downlink frame-logs for the given gateway ID. Notes: * These are the raw LoRaWAN frames and this endpoint is intended for debugging only. * This endpoint does not work from a web-browser.
GatewayServiceApi update PUT /api/gateways/{gateway.id} Update updates the gateway matching the given mac address.
InternalServiceApi branding GET /api/internal/branding Get the branding for the UI
InternalServiceApi global_search GET /api/internal/search Perform a global search.
InternalServiceApi login POST /api/internal/login Log in a user
InternalServiceApi profile GET /api/internal/profile Get the current user's profile
MulticastGroupServiceApi add_device POST /api/multicast-groups/{multicast_group_id}/devices AddDevice adds the given device to the multicast-group.
MulticastGroupServiceApi create POST /api/multicast-groups Create creates the given multicast-group.
MulticastGroupServiceApi delete DELETE /api/multicast-groups/{id} Delete deletes a multicast-group given an ID.
MulticastGroupServiceApi enqueue POST /api/multicast-groups/{multicast_queue_item.multicast_group_id}/queue Enqueue adds the given item to the multicast-queue.
MulticastGroupServiceApi flush_queue DELETE /api/multicast-groups/{multicast_group_id}/queue FlushQueue flushes the multicast-group queue.
MulticastGroupServiceApi get GET /api/multicast-groups/{id} Get returns a multicast-group given an ID.
MulticastGroupServiceApi list GET /api/multicast-groups List lists the available multicast-groups.
MulticastGroupServiceApi list_queue GET /api/multicast-groups/{multicast_group_id}/queue ListQueue lists the items in the multicast-group queue.
MulticastGroupServiceApi remove_device DELETE /api/multicast-groups/{multicast_group_id}/devices/{dev_eui} RemoveDevice removes the given device from the multicast-group.
MulticastGroupServiceApi update PUT /api/multicast-groups/{multicast_group.id} Update updates the given multicast-group.
NetworkServerServiceApi create POST /api/network-servers Create creates the given network-server.
NetworkServerServiceApi delete DELETE /api/network-servers/{id} Delete deletes the network-server matching the given id.
NetworkServerServiceApi get GET /api/network-servers/{id} Get returns the network-server matching the given id.
NetworkServerServiceApi list GET /api/network-servers List lists the available network-servers.
NetworkServerServiceApi update PUT /api/network-servers/{network_server.id} Update updates the given network-server.
OrganizationServiceApi add_user POST /api/organizations/{organization_user.organization_id}/users Add a new user to an organization.
OrganizationServiceApi create POST /api/organizations Create a new organization.
OrganizationServiceApi delete DELETE /api/organizations/{id} Delete an organization.
OrganizationServiceApi delete_user DELETE /api/organizations/{organization_id}/users/{user_id} Delete a user from an organization.
OrganizationServiceApi get GET /api/organizations/{id} Get data for a particular organization.
OrganizationServiceApi get_user GET /api/organizations/{organization_id}/users/{user_id} Get data for a particular organization user.
OrganizationServiceApi list GET /api/organizations Get organization list.
OrganizationServiceApi list_users GET /api/organizations/{organization_id}/users Get organization's user list.
OrganizationServiceApi update PUT /api/organizations/{organization.id} Update an existing organization.
OrganizationServiceApi update_user PUT /api/organizations/{organization_user.organization_id}/users/{organization_user.user_id} Update a user in an organization.
ServiceProfileServiceApi create POST /api/service-profiles Create creates the given service-profile.
ServiceProfileServiceApi delete DELETE /api/service-profiles/{id} Delete deletes the service-profile matching the given id.
ServiceProfileServiceApi get GET /api/service-profiles/{id} Get returns the service-profile matching the given id.
ServiceProfileServiceApi list GET /api/service-profiles List lists the available service-profiles.
ServiceProfileServiceApi update PUT /api/service-profiles/{service_profile.id} Update updates the given serviceprofile.
UserServiceApi create POST /api/users Create a new user.
UserServiceApi delete DELETE /api/users/{id} Delete a user.
UserServiceApi get GET /api/users/{id} Get data for a particular user.
UserServiceApi list GET /api/users Get user list.
UserServiceApi update PUT /api/users/{user.id} Update an existing user.
UserServiceApi update_password PUT /api/users/{user_id}/password UpdatePassword updates a password.

Documentation For Models

Documentation For Authorization

ApiKeyHeaderAuth

  • Type: API key
  • API key parameter name: Grpc-Metadata-Authorization
  • Location: HTTP header

Author

Yuregir TEKELI

About

Lora App Server REST API Python Client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published