Skip to content

Latest commit

 

History

History
409 lines (325 loc) · 14.3 KB

DevicesApi.md

File metadata and controls

409 lines (325 loc) · 14.3 KB

Org.OpenAPITools.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
GetdevicesItem GET /devices/{devicesId} Retrieves a devices document
PatchdevicesItem PATCH /devices/{devicesId} Updates a devices document
Postdevices POST /devices Stores one or more devices.
PutdevicesItem PUT /devices/{devicesId} Replaces a devices document

Getdevices

InlineResponse2003 Getdevices (string where = null, string sort = null, int? page = null, int? maxResults = null)

Retrieves one or more devices

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class GetdevicesExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://api.teke.li/api/v1/obs";
            // Configure API key authorization: ApiKeyHeaderAuth
            Configuration.Default.AddApiKey("X-Api-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("X-Api-Key", "Bearer");
            // Configure API key authorization: ApiKeyQueryAuth
            Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");

            var apiInstance = new DevicesApi(Configuration.Default);
            var where = where_example;  // string | the filters query parameter (ex.: {\"number\": 10}) (optional) 
            var sort = sort_example;  // string | the sort query parameter (ex.: \"city,-lastname\") (optional) 
            var page = 1;  // int? | the pages query parameter (optional) 
            var maxResults = 25;  // int? | the max results query parameter (optional) 

            try
            {
                // Retrieves one or more devices
                InlineResponse2003 result = apiInstance.Getdevices(where, sort, page, maxResults);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling DevicesApi.Getdevices: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
where string the filters query parameter (ex.: {"number": 10}) [optional]
sort string the sort query parameter (ex.: "city,-lastname") [optional]
page int? the pages query parameter [optional]
maxResults 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]

GetdevicesItem

Devices GetdevicesItem (string devicesId)

Retrieves a devices document

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class GetdevicesItemExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://api.teke.li/api/v1/obs";
            // Configure API key authorization: ApiKeyHeaderAuth
            Configuration.Default.AddApiKey("X-Api-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("X-Api-Key", "Bearer");
            // Configure API key authorization: ApiKeyQueryAuth
            Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");

            var apiInstance = new DevicesApi(Configuration.Default);
            var devicesId = devicesId_example;  // string | 

            try
            {
                // Retrieves a devices document
                Devices result = apiInstance.GetdevicesItem(devicesId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling DevicesApi.GetdevicesItem: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
devicesId string

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]

PatchdevicesItem

void PatchdevicesItem (string devicesId, string ifMatch, Devices devices)

Updates a devices document

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class PatchdevicesItemExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://api.teke.li/api/v1/obs";
            // Configure API key authorization: ApiKeyHeaderAuth
            Configuration.Default.AddApiKey("X-Api-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("X-Api-Key", "Bearer");
            // Configure API key authorization: ApiKeyQueryAuth
            Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");

            var apiInstance = new DevicesApi(Configuration.Default);
            var devicesId = devicesId_example;  // string | 
            var ifMatch = ifMatch_example;  // string | Current value of the _etag field
            var devices = new Devices(); // Devices | A devices or list of devices documents

            try
            {
                // Updates a devices document
                apiInstance.PatchdevicesItem(devicesId, ifMatch, devices);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling DevicesApi.PatchdevicesItem: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
devicesId string
ifMatch string 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

void Postdevices (Devices devices)

Stores one or more devices.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class PostdevicesExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://api.teke.li/api/v1/obs";
            // Configure API key authorization: ApiKeyHeaderAuth
            Configuration.Default.AddApiKey("X-Api-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("X-Api-Key", "Bearer");
            // Configure API key authorization: ApiKeyQueryAuth
            Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");

            var apiInstance = new DevicesApi(Configuration.Default);
            var devices = new Devices(); // Devices | A devices or list of devices documents

            try
            {
                // Stores one or more devices.
                apiInstance.Postdevices(devices);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling DevicesApi.Postdevices: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

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]

PutdevicesItem

void PutdevicesItem (string devicesId, string ifMatch, Devices devices)

Replaces a devices document

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class PutdevicesItemExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://api.teke.li/api/v1/obs";
            // Configure API key authorization: ApiKeyHeaderAuth
            Configuration.Default.AddApiKey("X-Api-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("X-Api-Key", "Bearer");
            // Configure API key authorization: ApiKeyQueryAuth
            Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer");

            var apiInstance = new DevicesApi(Configuration.Default);
            var devicesId = devicesId_example;  // string | 
            var ifMatch = ifMatch_example;  // string | Current value of the _etag field
            var devices = new Devices(); // Devices | A devices or list of devices documents

            try
            {
                // Replaces a devices document
                apiInstance.PutdevicesItem(devicesId, ifMatch, devices);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling DevicesApi.PutdevicesItem: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
devicesId string
ifMatch string 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]