Skip to content

Latest commit

 

History

History
518 lines (419 loc) · 19.4 KB

DevicesApi.md

File metadata and controls

518 lines (419 loc) · 19.4 KB

metacore_obs_api.DevicesApi

All URIs are relative to https://api.teke.li/api/v1/obs

Method HTTP request Description
getdevices GET /devices Retrieves one or more devices
getdevices_item GET /devices/{devicesId} Retrieves a devices document
patchdevices_item PATCH /devices/{devicesId} Updates a devices document
postdevices POST /devices Stores one or more devices.
putdevices_item PUT /devices/{devicesId} Replaces a devices document

getdevices

InlineResponse2003 getdevices(where=where, sort=sort, page=page, max_results=max_results)

Retrieves one or more devices

Example

  • Api Key Authentication (ApiKeyHeaderAuth):
from __future__ import print_function
import time
import metacore_obs_api
from metacore_obs_api.rest import ApiException
from pprint import pprint
configuration = metacore_obs_api.Configuration()
# Configure API key authorization: ApiKeyHeaderAuth
configuration.api_key['X-Api-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Api-Key'] = 'Bearer'
configuration = metacore_obs_api.Configuration()
# Configure API key authorization: ApiKeyQueryAuth
configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'

# Defining host is optional and default to https://api.teke.li/api/v1/obs
configuration.host = "https://api.teke.li/api/v1/obs"
# Create an instance of the API class
api_instance = metacore_obs_api.DevicesApi(metacore_obs_api.ApiClient(configuration))
where = 'where_example' # str | the filters query parameter (ex.: {\"number\": 10}) (optional)
sort = 'sort_example' # str | the sort query parameter (ex.: \"city,-lastname\") (optional)
page = 1 # int | the pages query parameter (optional)
max_results = 25 # int | the max results query parameter (optional)

try:
    # Retrieves one or more devices
    api_response = api_instance.getdevices(where=where, sort=sort, page=page, max_results=max_results)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DevicesApi->getdevices: %s\n" % e)
  • Api Key Authentication (ApiKeyQueryAuth):
from __future__ import print_function
import time
import metacore_obs_api
from metacore_obs_api.rest import ApiException
from pprint import pprint
configuration = metacore_obs_api.Configuration()
# Configure API key authorization: ApiKeyHeaderAuth
configuration.api_key['X-Api-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Api-Key'] = 'Bearer'
configuration = metacore_obs_api.Configuration()
# Configure API key authorization: ApiKeyQueryAuth
configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'

# Defining host is optional and default to https://api.teke.li/api/v1/obs
configuration.host = "https://api.teke.li/api/v1/obs"
# Create an instance of the API class
api_instance = metacore_obs_api.DevicesApi(metacore_obs_api.ApiClient(configuration))
where = 'where_example' # str | the filters query parameter (ex.: {\"number\": 10}) (optional)
sort = 'sort_example' # str | the sort query parameter (ex.: \"city,-lastname\") (optional)
page = 1 # int | the pages query parameter (optional)
max_results = 25 # int | the max results query parameter (optional)

try:
    # Retrieves one or more devices
    api_response = api_instance.getdevices(where=where, sort=sort, page=page, max_results=max_results)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DevicesApi->getdevices: %s\n" % e)

Parameters

Name Type Description Notes
where str the filters query parameter (ex.: {"number": 10}) [optional]
sort str the sort query parameter (ex.: "city,-lastname") [optional]
page int the pages query parameter [optional]
max_results int the max results query parameter [optional]

Return type

InlineResponse2003

Authorization

ApiKeyHeaderAuth, ApiKeyQueryAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 An array of devices -
0 An error message -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getdevices_item

Devices getdevices_item(devices_id)

Retrieves a devices document

Example

  • Api Key Authentication (ApiKeyHeaderAuth):
from __future__ import print_function
import time
import metacore_obs_api
from metacore_obs_api.rest import ApiException
from pprint import pprint
configuration = metacore_obs_api.Configuration()
# Configure API key authorization: ApiKeyHeaderAuth
configuration.api_key['X-Api-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Api-Key'] = 'Bearer'
configuration = metacore_obs_api.Configuration()
# Configure API key authorization: ApiKeyQueryAuth
configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'

# Defining host is optional and default to https://api.teke.li/api/v1/obs
configuration.host = "https://api.teke.li/api/v1/obs"
# Create an instance of the API class
api_instance = metacore_obs_api.DevicesApi(metacore_obs_api.ApiClient(configuration))
devices_id = 'devices_id_example' # str | 

try:
    # Retrieves a devices document
    api_response = api_instance.getdevices_item(devices_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DevicesApi->getdevices_item: %s\n" % e)
  • Api Key Authentication (ApiKeyQueryAuth):
from __future__ import print_function
import time
import metacore_obs_api
from metacore_obs_api.rest import ApiException
from pprint import pprint
configuration = metacore_obs_api.Configuration()
# Configure API key authorization: ApiKeyHeaderAuth
configuration.api_key['X-Api-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Api-Key'] = 'Bearer'
configuration = metacore_obs_api.Configuration()
# Configure API key authorization: ApiKeyQueryAuth
configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'

# Defining host is optional and default to https://api.teke.li/api/v1/obs
configuration.host = "https://api.teke.li/api/v1/obs"
# Create an instance of the API class
api_instance = metacore_obs_api.DevicesApi(metacore_obs_api.ApiClient(configuration))
devices_id = 'devices_id_example' # str | 

try:
    # Retrieves a devices document
    api_response = api_instance.getdevices_item(devices_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DevicesApi->getdevices_item: %s\n" % e)

Parameters

Name Type Description Notes
devices_id str

Return type

Devices

Authorization

ApiKeyHeaderAuth, ApiKeyQueryAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 devices document fetched successfully -
0 An error message -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

patchdevices_item

patchdevices_item(devices_id, if_match, devices)

Updates a devices document

Example

  • Api Key Authentication (ApiKeyHeaderAuth):
from __future__ import print_function
import time
import metacore_obs_api
from metacore_obs_api.rest import ApiException
from pprint import pprint
configuration = metacore_obs_api.Configuration()
# Configure API key authorization: ApiKeyHeaderAuth
configuration.api_key['X-Api-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Api-Key'] = 'Bearer'
configuration = metacore_obs_api.Configuration()
# Configure API key authorization: ApiKeyQueryAuth
configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'

# Defining host is optional and default to https://api.teke.li/api/v1/obs
configuration.host = "https://api.teke.li/api/v1/obs"
# Create an instance of the API class
api_instance = metacore_obs_api.DevicesApi(metacore_obs_api.ApiClient(configuration))
devices_id = 'devices_id_example' # str | 
if_match = 'if_match_example' # str | Current value of the _etag field
devices = metacore_obs_api.Devices() # Devices | A devices or list of devices documents

try:
    # Updates a devices document
    api_instance.patchdevices_item(devices_id, if_match, devices)
except ApiException as e:
    print("Exception when calling DevicesApi->patchdevices_item: %s\n" % e)
  • Api Key Authentication (ApiKeyQueryAuth):
from __future__ import print_function
import time
import metacore_obs_api
from metacore_obs_api.rest import ApiException
from pprint import pprint
configuration = metacore_obs_api.Configuration()
# Configure API key authorization: ApiKeyHeaderAuth
configuration.api_key['X-Api-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Api-Key'] = 'Bearer'
configuration = metacore_obs_api.Configuration()
# Configure API key authorization: ApiKeyQueryAuth
configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'

# Defining host is optional and default to https://api.teke.li/api/v1/obs
configuration.host = "https://api.teke.li/api/v1/obs"
# Create an instance of the API class
api_instance = metacore_obs_api.DevicesApi(metacore_obs_api.ApiClient(configuration))
devices_id = 'devices_id_example' # str | 
if_match = 'if_match_example' # str | Current value of the _etag field
devices = metacore_obs_api.Devices() # Devices | A devices or list of devices documents

try:
    # Updates a devices document
    api_instance.patchdevices_item(devices_id, if_match, devices)
except ApiException as e:
    print("Exception when calling DevicesApi->patchdevices_item: %s\n" % e)

Parameters

Name Type Description Notes
devices_id str
if_match str Current value of the _etag field
devices Devices A devices or list of devices documents

Return type

void (empty response body)

Authorization

ApiKeyHeaderAuth, ApiKeyQueryAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 devices document updated successfully -
0 An error message -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

postdevices

postdevices(devices)

Stores one or more devices.

Example

  • Api Key Authentication (ApiKeyHeaderAuth):
from __future__ import print_function
import time
import metacore_obs_api
from metacore_obs_api.rest import ApiException
from pprint import pprint
configuration = metacore_obs_api.Configuration()
# Configure API key authorization: ApiKeyHeaderAuth
configuration.api_key['X-Api-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Api-Key'] = 'Bearer'
configuration = metacore_obs_api.Configuration()
# Configure API key authorization: ApiKeyQueryAuth
configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'

# Defining host is optional and default to https://api.teke.li/api/v1/obs
configuration.host = "https://api.teke.li/api/v1/obs"
# Create an instance of the API class
api_instance = metacore_obs_api.DevicesApi(metacore_obs_api.ApiClient(configuration))
devices = metacore_obs_api.Devices() # Devices | A devices or list of devices documents

try:
    # Stores one or more devices.
    api_instance.postdevices(devices)
except ApiException as e:
    print("Exception when calling DevicesApi->postdevices: %s\n" % e)
  • Api Key Authentication (ApiKeyQueryAuth):
from __future__ import print_function
import time
import metacore_obs_api
from metacore_obs_api.rest import ApiException
from pprint import pprint
configuration = metacore_obs_api.Configuration()
# Configure API key authorization: ApiKeyHeaderAuth
configuration.api_key['X-Api-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Api-Key'] = 'Bearer'
configuration = metacore_obs_api.Configuration()
# Configure API key authorization: ApiKeyQueryAuth
configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'

# Defining host is optional and default to https://api.teke.li/api/v1/obs
configuration.host = "https://api.teke.li/api/v1/obs"
# Create an instance of the API class
api_instance = metacore_obs_api.DevicesApi(metacore_obs_api.ApiClient(configuration))
devices = metacore_obs_api.Devices() # Devices | A devices or list of devices documents

try:
    # Stores one or more devices.
    api_instance.postdevices(devices)
except ApiException as e:
    print("Exception when calling DevicesApi->postdevices: %s\n" % e)

Parameters

Name Type Description Notes
devices Devices A devices or list of devices documents

Return type

void (empty response body)

Authorization

ApiKeyHeaderAuth, ApiKeyQueryAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 operation has been successful -
0 An error message -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

putdevices_item

putdevices_item(devices_id, if_match, devices)

Replaces a devices document

Example

  • Api Key Authentication (ApiKeyHeaderAuth):
from __future__ import print_function
import time
import metacore_obs_api
from metacore_obs_api.rest import ApiException
from pprint import pprint
configuration = metacore_obs_api.Configuration()
# Configure API key authorization: ApiKeyHeaderAuth
configuration.api_key['X-Api-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Api-Key'] = 'Bearer'
configuration = metacore_obs_api.Configuration()
# Configure API key authorization: ApiKeyQueryAuth
configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'

# Defining host is optional and default to https://api.teke.li/api/v1/obs
configuration.host = "https://api.teke.li/api/v1/obs"
# Create an instance of the API class
api_instance = metacore_obs_api.DevicesApi(metacore_obs_api.ApiClient(configuration))
devices_id = 'devices_id_example' # str | 
if_match = 'if_match_example' # str | Current value of the _etag field
devices = metacore_obs_api.Devices() # Devices | A devices or list of devices documents

try:
    # Replaces a devices document
    api_instance.putdevices_item(devices_id, if_match, devices)
except ApiException as e:
    print("Exception when calling DevicesApi->putdevices_item: %s\n" % e)
  • Api Key Authentication (ApiKeyQueryAuth):
from __future__ import print_function
import time
import metacore_obs_api
from metacore_obs_api.rest import ApiException
from pprint import pprint
configuration = metacore_obs_api.Configuration()
# Configure API key authorization: ApiKeyHeaderAuth
configuration.api_key['X-Api-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Api-Key'] = 'Bearer'
configuration = metacore_obs_api.Configuration()
# Configure API key authorization: ApiKeyQueryAuth
configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'

# Defining host is optional and default to https://api.teke.li/api/v1/obs
configuration.host = "https://api.teke.li/api/v1/obs"
# Create an instance of the API class
api_instance = metacore_obs_api.DevicesApi(metacore_obs_api.ApiClient(configuration))
devices_id = 'devices_id_example' # str | 
if_match = 'if_match_example' # str | Current value of the _etag field
devices = metacore_obs_api.Devices() # Devices | A devices or list of devices documents

try:
    # Replaces a devices document
    api_instance.putdevices_item(devices_id, if_match, devices)
except ApiException as e:
    print("Exception when calling DevicesApi->putdevices_item: %s\n" % e)

Parameters

Name Type Description Notes
devices_id str
if_match str Current value of the _etag field
devices Devices A devices or list of devices documents

Return type

void (empty response body)

Authorization

ApiKeyHeaderAuth, ApiKeyQueryAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 devices document replaced successfully -
0 An error message -

[Back to top] [Back to API list] [Back to Model list] [Back to README]