All URIs are relative to https://foo-api.esper.cloud/api
Method | HTTP request | Description |
---|---|---|
create_group | POST /enterprise/{enterprise_id}/devicegroup/ | Create a device group |
delete_group | DELETE /enterprise/{enterprise_id}/devicegroup/{group_id}/ | Delete a device group |
get_all_groups | GET /enterprise/{enterprise_id}/devicegroup/ | List device groups |
get_group_by_id | GET /enterprise/{enterprise_id}/devicegroup/{group_id}/ | Get device group information |
partial_update_group | PATCH /enterprise/{enterprise_id}/devicegroup/{group_id}/ | Partial update group |
update_group | PUT /enterprise/{enterprise_id}/devicegroup/{group_id}/ | Update device group |
DeviceGroup create_group(enterprise_id, data)
Create a device group
Returns EnterpriseDeviceGroup instance
import esperclient
from esperclient.rest import ApiException
# Configure API key authorization: apiKey
configuration = esperclient.Configuration()
configuration.host = 'SERVER_URL'
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = esperclient.DeviceGroupApi(esperclient.ApiClient(configuration))
enterprise_id = 'enterprise_id_example' # str | A UUID string identifying enterprise.
data = esperclient.DeviceGroupUpdate() # DeviceGroupUpdate |
try:
# Create a device group
api_response = api_instance.create_group(enterprise_id, data)
print(api_response)
except ApiException as e:
print("Exception when calling DeviceGroupApi->create_group: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
enterprise_id | str | A UUID string identifying enterprise. | |
data | DeviceGroupUpdate |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_group(group_id, enterprise_id)
Delete a device group
Emtpy response
import esperclient
from esperclient.rest import ApiException
# Configure API key authorization: apiKey
configuration = esperclient.Configuration()
configuration.host = 'SERVER_URL'
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = esperclient.DeviceGroupApi(esperclient.ApiClient(configuration))
group_id = 'group_id_example' # str | A UUID string identifying this enterprise device group.
enterprise_id = 'enterprise_id_example' # str | A UUID string identifying enterprise.
try:
# Delete a device group
api_instance.delete_group(group_id, enterprise_id)
except ApiException as e:
print("Exception when calling DeviceGroupApi->delete_group: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
group_id | str | A UUID string identifying this enterprise device group. | |
enterprise_id | str | A UUID string identifying enterprise. |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2007 get_all_groups(enterprise_id, name=name, limit=limit, offset=offset)
List device groups
Returns EnterpriseDeviceGroup list
import esperclient
from esperclient.rest import ApiException
# Configure API key authorization: apiKey
configuration = esperclient.Configuration()
configuration.host = 'SERVER_URL'
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = esperclient.DeviceGroupApi(esperclient.ApiClient(configuration))
enterprise_id = 'enterprise_id_example' # str | A UUID string identifying enterprise.
name = 'name_example' # str | Filter by group name (optional)
limit = 20 # int | Number of results to return per page. (optional) (default to 20)
offset = 0 # int | The initial index from which to return the results. (optional) (default to 0)
try:
# List device groups
api_response = api_instance.get_all_groups(enterprise_id, name=name, limit=limit, offset=offset)
print(api_response)
except ApiException as e:
print("Exception when calling DeviceGroupApi->get_all_groups: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
enterprise_id | str | A UUID string identifying enterprise. | |
name | str | Filter by group name | [optional] |
limit | int | Number of results to return per page. | [optional] [default to 20] |
offset | int | The initial index from which to return the results. | [optional] [default to 0] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeviceGroup get_group_by_id(group_id, enterprise_id)
Get device group information
Returns EnterpriseDeviceGroup instance
import esperclient
from esperclient.rest import ApiException
# Configure API key authorization: apiKey
configuration = esperclient.Configuration()
configuration.host = 'SERVER_URL'
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = esperclient.DeviceGroupApi(esperclient.ApiClient(configuration))
group_id = 'group_id_example' # str | A UUID string identifying this enterprise device group.
enterprise_id = 'enterprise_id_example' # str | A UUID string identifying enterprise.
try:
# Get device group information
api_response = api_instance.get_group_by_id(group_id, enterprise_id)
print(api_response)
except ApiException as e:
print("Exception when calling DeviceGroupApi->get_group_by_id: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
group_id | str | A UUID string identifying this enterprise device group. | |
enterprise_id | str | A UUID string identifying enterprise. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeviceGroup partial_update_group(group_id, enterprise_id, data, action=action)
Partial update group
Returns EnterpriseDeviceGroup instance
import esperclient
from esperclient.rest import ApiException
# Configure API key authorization: apiKey
configuration = esperclient.Configuration()
configuration.host = 'SERVER_URL'
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = esperclient.DeviceGroupApi(esperclient.ApiClient(configuration))
group_id = 'group_id_example' # str | A UUID string identifying this enterprise device group.
enterprise_id = 'enterprise_id_example' # str | A UUID string identifying enterprise.
data = esperclient.DeviceGroupPartialUpdate() # DeviceGroupPartialUpdate |
action = 'action_example' # str | add / remove / rename / move (optional)
try:
# Partial update group
api_response = api_instance.partial_update_group(group_id, enterprise_id, data, action=action)
print(api_response)
except ApiException as e:
print("Exception when calling DeviceGroupApi->partial_update_group: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
group_id | str | A UUID string identifying this enterprise device group. | |
enterprise_id | str | A UUID string identifying enterprise. | |
data | DeviceGroupPartialUpdate | ||
action | str | add / remove / rename / move | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeviceGroup update_group(group_id, enterprise_id, data, action=action)
Update device group
Returns EnterpriseDeviceGroup instance
import esperclient
from esperclient.rest import ApiException
# Configure API key authorization: apiKey
configuration = esperclient.Configuration()
configuration.host = 'SERVER_URL'
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = esperclient.DeviceGroupApi(esperclient.ApiClient(configuration))
group_id = 'group_id_example' # str | A UUID string identifying this enterprise device group.
enterprise_id = 'enterprise_id_example' # str | A UUID string identifying enterprise.
data = esperclient.DeviceGroupUpdate() # DeviceGroupUpdate |
action = 'action_example' # str | add / remove / rename / move (optional)
try:
# Update device group
api_response = api_instance.update_group(group_id, enterprise_id, data, action=action)
print(api_response)
except ApiException as e:
print("Exception when calling DeviceGroupApi->update_group: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
group_id | str | A UUID string identifying this enterprise device group. | |
enterprise_id | str | A UUID string identifying enterprise. | |
data | DeviceGroupUpdate | ||
action | str | add / remove / rename / move | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]